From b855240b782395f94315f43ea3e7e182299fac48 Mon Sep 17 00:00:00 2001 From: Matthew Vogt Date: Thu, 16 Feb 2012 14:43:03 +1000 Subject: [PATCH] Rename QDeclarative symbols to QQuick and QQml Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones --- bin/rename-qtdeclarative-symbols.sh | 639 ++++++++++ doc/src/localstorage/localstorage.qdoc | 2 +- doc/src/qml/basictypes.qdoc | 2 +- doc/src/qml/c++models.qdoc | 10 +- doc/src/qml/codingconventions.qdoc | 20 +- doc/src/qml/debugging.qdoc | 10 +- doc/src/qml/dynamicobjects.qdoc | 32 +- doc/src/qml/extending-tutorial.qdoc | 30 +- doc/src/qml/integrating.qdoc | 18 +- doc/src/qml/javascriptblocks.qdoc | 40 +- doc/src/qml/modules.qdoc | 44 +- doc/src/qml/network.qdoc | 10 +- doc/src/qml/propertybinding.qdoc | 54 +- doc/src/qml/qmlcomponents.qdoc | 40 +- doc/src/qml/qmldocument.qdoc | 10 +- doc/src/qml/qmlengine.qdoc | 136 +- doc/src/qml/qmlevents.qdoc | 16 +- doc/src/qml/qmlintro.qdoc | 2 +- doc/src/qml/qmlplugins.qdoc | 12 +- doc/src/qml/qmlruntime.qdoc | 38 +- doc/src/qml/qmlsyntax.qdoc | 2 +- doc/src/qml/qmltypes.qdoc | 10 +- doc/src/qml/qmlviewer.qdoc | 2 +- doc/src/qml/qtbinding.qdoc | 166 +-- doc/src/qml/qtdeclarative.qdoc | 48 +- doc/src/qml/qtprogrammers.qdoc | 14 +- doc/src/qtquick2/animation.qdoc | 28 +- doc/src/qtquick2/focus.qdoc | 22 +- doc/src/qtquick2/modelview.qdoc | 30 +- doc/src/qtquick2/mouseevents.qdoc | 6 +- doc/src/qtquick2/positioners.qdoc | 8 +- doc/src/qtquick2/qmltexthandling.qdoc | 4 +- doc/src/qtquick2/qtquick-intro.qdoc | 10 +- doc/src/qtquick2/qtquick2.qdoc | 2 +- doc/src/qtquick2/righttoleft.qdoc | 12 +- doc/src/qtquick2/states.qdoc | 6 +- doc/src/qtquick2/writingcomponents.qdoc | 34 +- .../snippets/{declarative => qml}/Button.qml | 0 .../SelfDestroyingRect.qml | 0 .../snippets/{declarative => qml}/Sprite.qml | 0 .../{declarative => qml}/anchoranimation.qml | 0 .../{declarative => qml}/anchorchanges.qml | 0 .../{declarative => qml}/animatedimage.qml | 0 .../{declarative => qml}/animation.qml | 0 .../{declarative => qml}/application.qml | 0 .../{declarative => qml}/behavior.qml | 0 .../borderimage/borderimage-scaled.qml | 0 .../borderimage/borderimage-tiled.qml | 0 .../borderimage/normal-image.qml | 0 .../codingconventions/dotproperties.qml | 0 .../codingconventions/javascript-imports.qml | 0 .../codingconventions/javascript.qml | 0 .../codingconventions/lists.qml | 0 .../codingconventions/myscript.js | 0 .../codingconventions/photo.qml | 0 .../codingconventions/private.qml | 0 .../{declarative => qml}/coloranimation.qml | 0 .../snippets/{declarative => qml}/colors.qml | 0 .../column/column-transitions.qml | 0 .../{declarative => qml}/column/column.qml | 0 .../column/vertical-positioner.qml | 0 .../{declarative => qml}/comments.qml | 0 .../{declarative => qml}/component.qml | 0 .../{declarative => qml}/componentCreation.js | 0 .../createComponent-simple.qml | 0 .../{declarative => qml}/createComponent.qml | 0 .../{declarative => qml}/createQmlObject.qml | 0 .../snippets/{declarative => qml}/drag.qml | 0 .../dynamicObjects-destroy.qml | 0 .../snippets/{declarative => qml}/events.qml | 0 .../{declarative => qml}/flickable.qml | 0 .../flickableScrollbar.qml | 0 .../flipable/flipable.qml | 0 .../snippets/{declarative => qml}/flow.qml | 0 .../focus/MyClickableWidget.qml | 0 .../{declarative => qml}/focus/MyWidget.qml | 0 .../focus/advancedFocus.qml | 0 .../focus/basicwidget.qml | 0 .../focus/clickablewidget.qml | 0 .../focus/myfocusscopewidget.qml | 0 .../{declarative => qml}/focus/rectangle.qml | 0 .../{declarative => qml}/focus/widget.qml | 0 .../{declarative => qml}/folderlistmodel.qml | 0 .../{declarative => qml}/gradient.qml | 0 .../{declarative => qml}/grid-spacing.qml | 0 .../{declarative => qml}/grid/grid-items.qml | 0 .../grid/grid-no-spacing.qml | 0 .../grid/grid-spacing.qml | 0 .../{declarative => qml}/grid/grid.qml | 0 .../gridview/ContactModel.qml | 0 .../gridview/gridview.qml | 0 .../snippets/{declarative => qml}/image.qml | 0 .../{declarative => qml}/imports/chart.qml | 0 .../imports/installed-module.qml | 0 .../imports/merged-named-imports.qml | 0 .../imports/named-imports.qml | 0 .../imports/network-imports.qml | 0 .../imports/qtquick-1.0.qml | 0 .../imports/timeexample.qml | 0 .../integrating-javascript/connectjs.qml | 0 .../integrating-javascript/includejs/app.qml | 0 .../includejs/factorial.js | 0 .../includejs/script.js | 0 .../scarceresources/avatarExample.cpp | 14 +- .../scarceresources/avatarExample.h | 0 .../scarceresources/exampleFive.qml | 0 .../scarceresources/exampleFour.js | 0 .../scarceresources/exampleFour.qml | 0 .../scarceresources/exampleOne.qml | 0 .../scarceresources/exampleThree.js | 0 .../scarceresources/exampleThree.qml | 0 .../scarceresources/exampleTwo.qml | 0 .../integrating-javascript/script.js | 0 .../{declarative => qml}/keynavigation.qml | 0 .../keys/keys-handler.qml | 0 .../keys/keys-pressed.qml | 0 .../{declarative => qml}/layoutmirroring.qml | 0 .../{declarative => qml}/listmodel-modify.qml | 0 .../{declarative => qml}/listmodel-nested.qml | 0 .../{declarative => qml}/listmodel-simple.qml | 0 .../{declarative => qml}/listmodel.qml | 0 .../listview-decorations.qml | 0 .../listview-sections.qml | 0 .../{declarative => qml}/listview.qml | 0 .../listview/ContactModel.qml | 0 .../listview/listview-snippet.qml | 0 .../listview/listview.qml | 0 .../{declarative => qml}/loader/KeyReader.qml | 0 .../{declarative => qml}/loader/MyItem.qml | 0 .../loader/connections.qml | 0 .../{declarative => qml}/loader/focus.qml | 0 .../{declarative => qml}/loader/simple.qml | 0 .../{declarative => qml}/loader/sizeitem.qml | 0 .../loader/sizeloader.qml | 0 .../models/views-models-delegates.qml | 0 .../models/visual-model-and-view.qml | 0 .../mousearea/mousearea-snippet.qml | 0 .../mousearea/mousearea.qml | 0 .../mousearea/mouseareadragfilter.qml | 0 .../multipointtoucharea.qml | 0 .../{declarative => qml}/numberanimation.qml | 0 .../parallelanimation.qml | 0 .../{declarative => qml}/parentanimation.qml | 0 .../{declarative => qml}/parentchange.qml | 0 .../path/arcdirection.qml | 0 .../{declarative => qml}/path/arcradius.qml | 0 .../{declarative => qml}/path/basicarc.qml | 0 .../{declarative => qml}/path/basiccurve.qml | 0 .../{declarative => qml}/path/largearc.qml | 0 .../{declarative => qml}/pathinterpolator.qml | 0 .../pathview/ContactModel.qml | 0 .../pathview/pathattributes.qml | 0 .../pathview/pathview.qml | 0 .../{declarative => qml}/properties.qml | 0 .../propertyaction-sequential.qml | 0 .../{declarative => qml}/propertyaction.qml | 0 .../propertyanimation.qml | 0 .../{declarative => qml}/propertychanges.qml | 0 .../qml-data-models/dynamic-listmodel.qml | 0 .../qml-data-models/listelements.qml | 0 .../qml-data-models/listmodel-listview.qml | 0 .../qml-documents/inline-component.qml | 0 .../qml-documents/inline-text-component.qml | 0 .../qml-documents/non-trivial.qml | 0 .../qml-documents/qmldocuments.qml | 0 .../qml-intro/images/qt-logo.svg | 0 .../qtbinding/context-advanced/MyItem.qml | 0 .../context-advanced/applicationdata.h | 0 .../context-advanced/connections.qml | 0 .../qtbinding/context-advanced/main.cpp | 4 +- .../qtbinding/context/MyItem.qml | 0 .../qtbinding/context/main.cpp | 4 +- .../qtbinding/enums/imageviewer.h | 6 +- .../qtbinding/enums/standalone.qml | 0 .../qtbinding/functions-cpp/MyItem.qml | 0 .../qtbinding/functions-cpp/main.cpp | 4 +- .../qtbinding/functions-cpp/myclass.h | 0 .../qtbinding/functions-qml/MyItem.qml | 0 .../qtbinding/functions-qml/main.cpp | 6 +- .../qtbinding/loading/MyItem.qml | 0 .../qtbinding/loading/main.cpp | 28 +- .../qtbinding/newelements/imageviewer.h | 4 +- .../qtbinding/newelements/main.cpp | 4 +- .../qtbinding/newelements/standalone.qml | 0 .../qtbinding/properties-cpp/MyItem.qml | 0 .../properties-cpp/applicationdata.h | 0 .../qtbinding/properties-qml/MyItem.qml | 0 .../qtbinding/properties-qml/main.cpp | 10 +- .../qtbinding/resources/example.qrc | 0 .../qtbinding/resources/main.cpp | 6 +- .../qtbinding/resources/main.qml | 0 .../qtbinding/resources/resources.pro | 2 +- .../qtbinding/signals-cpp/MyItem.qml | 0 .../qtbinding/signals-cpp/imageviewer.h | 6 +- .../qtbinding/signals-cpp/main.cpp | 10 +- .../qtbinding/signals-cpp/standalone.qml | 0 .../qtbinding/signals-qml/MyItem.qml | 0 .../qtbinding/signals-qml/main.cpp | 4 +- .../qtbinding/signals-qml/myclass.h | 0 .../qtbinding/variantlistmap/MyItem.qml | 0 .../qtbinding/variantlistmap/main.cpp | 4 +- .../{declarative => qml}/qtobject.qml | 0 .../rectangle/rect-border-width.qml | 0 .../rectangle/rectangle-colors.qml | 0 .../rectangle/rectangle-gradient.qml | 0 .../rectangle/rectangle.qml | 0 .../repeaters/repeater-grid-index.qml | 0 .../repeaters/repeater.qml | 0 .../reusablecomponents/Button.qml | 0 .../reusablecomponents/application.qml | 0 .../reusablecomponents/component.qml | 0 .../reusablecomponents/focusbutton.qml | 0 .../reusablecomponents/qmldir | 0 .../{declarative => qml}/righttoleft.qml | 0 .../righttoleft/Child.qml | 0 .../{declarative => qml}/rotation.qml | 0 .../rotationanimation.qml | 0 doc/src/snippets/{declarative => qml}/row.qml | 0 .../snippets/{declarative => qml}/row/row.qml | 0 .../snippets/{declarative => qml}/script.js | 0 .../sequentialanimation.qml | 0 .../smoothedanimation.qml | 0 .../{declarative => qml}/springanimation.qml | 0 .../{declarative => qml}/state-when.qml | 0 .../snippets/{declarative => qml}/state.qml | 0 .../snippets/{declarative => qml}/states.qml | 0 .../states/statechangescript.qml | 0 .../{declarative => qml}/systempalette.qml | 0 .../text/onLinkActivated.qml | 2 +- .../{declarative => qml}/texthandling.qml | 0 .../transition-from-to-modified.qml | 0 .../transition-from-to.qml | 0 .../transition-reversible.qml | 0 .../{declarative => qml}/transition.qml | 0 .../{declarative => qml}/transitions-list.qml | 0 .../viewtransitions/viewtransitions-basic.qml | 0 .../viewtransitions-delayedbyindex.qml | 0 .../viewtransitions-intermediatemove.qml | 0 .../viewtransitions-interruptedgood.qml | 0 .../viewtransitions-pathanim.qml | 0 .../viewtransitions-scriptactionbad.qml | 0 .../viewtransitions-scriptactiongood.qml | 0 .../{declarative => qml}/visualdatagroup.qml | 0 .../{declarative => qml}/visualdatamodel.qml | 0 .../visualdatamodel_rootindex/main.cpp | 8 +- .../visualdatamodel_rootindex/view.qml | 0 .../{declarative => qml}/workerscript.qml | 0 .../snippets/{declarative => qml}/xmlrole.qml | 0 .../snippets/{declarative => qml}/xmlrole.xml | 0 .../snippets/qtjavascript/evaluation/main.cpp | 2 +- .../qtjavascript/registeringobjects/main.cpp | 2 +- .../qtjavascript/registeringvalues/main.cpp | 2 +- doc/src/whatsnew.qdoc | 4 +- .../canvas/stockchart/stockchart.pro | 20 - .../painteditem/textballoons/textballoons.pro | 23 - .../embedded/qmlcalculator/deployment.pri | 2 +- .../embedded/qmlcalculator/qmlcalculator.cpp | 8 +- .../embedded/qmlcalculator/qmlcalculator.pro | 2 +- examples/embedded/qmlclocks/deployment.pri | 2 +- examples/embedded/qmlclocks/qmlclocks.cpp | 8 +- examples/embedded/qmlclocks/qmlclocks.pro | 2 +- .../embedded/qmldialcontrol/deployment.pri | 2 +- .../qmldialcontrol/qmldialcontrol.cpp | 8 +- .../qmldialcontrol/qmldialcontrol.pro | 2 +- examples/embedded/qmleasing/deployment.pri | 2 +- examples/embedded/qmleasing/qmleasing.cpp | 8 +- examples/embedded/qmleasing/qmleasing.pro | 2 +- examples/embedded/qmlflickr/deployment.pri | 2 +- examples/embedded/qmlflickr/qmlflickr.cpp | 14 +- examples/embedded/qmlflickr/qmlflickr.pro | 2 +- .../embedded/qmlphotoviewer/deployment.pri | 2 +- .../qmlphotoviewer/qmlphotoviewer.cpp | 12 +- .../qmlphotoviewer/qmlphotoviewer.pro | 2 +- examples/embedded/qmltwitter/deployment.pri | 2 +- examples/embedded/qmltwitter/qmltwitter.cpp | 12 +- examples/embedded/qmltwitter/qmltwitter.pro | 2 +- examples/examples.pro | 2 +- examples/{declarative => qml}/README | 0 .../accessibility/accessibility.qml | 2 +- .../accessibility/widgets/Button.qml | 2 +- .../animation/animation.qml | 0 .../animation/animation.qmlproject | 0 .../animation/basics/color-animation.qml | 0 .../animation/basics/images/face-smile.png | Bin .../animation/basics/images/moon.png | Bin .../animation/basics/images/shadow.png | Bin .../animation/basics/images/star.png | Bin .../animation/basics/images/sun.png | Bin .../animation/basics/property-animation.qml | 0 .../animation/behaviors/SideRect.qml | 0 .../animation/behaviors/behavior-example.qml | 0 .../animation/behaviors/wigglytext.qml | 0 .../animation/easing/content/QuitButton.qml | 0 .../animation/easing/content/quit.png | Bin .../animation/easing/easing.qml | 0 .../animation/pathanimation/pathanimation.qml | 0 .../pathinterpolator/pathinterpolator.qml | 0 .../animation/states/qt-logo.png | Bin .../animation/states/states.qml | 0 .../animation/states/transitions.qml | 0 .../calculator/calculator.qml | 2 +- .../calculator/content/Button.qml | 2 +- .../calculator/content/Display.qml | 2 +- .../calculator/content/calculator.js | 0 .../calculator/content/images/button-.png | Bin .../calculator/content/images/button-blue.png | Bin .../content/images/button-green.png | Bin .../content/images/button-purple.png | Bin .../calculator/content/images/button-red.png | Bin .../calculator/content/images/display.png | Bin .../calculator/content/qmldir | 0 .../canvas/bezierCurve/bezierCurve.qml | 0 .../{declarative => qml}/canvas/clip/clip.qml | 0 .../canvas/contents/Button.qml | 0 .../canvas/contents/ScrollBar.qml | 0 .../canvas/contents/Slider.qml | 0 .../canvas/contents/Stocks.qml | 0 .../canvas/contents/TitleBar.qml | 0 .../canvas/contents/ToolBar.qml | 0 .../canvas/contents/images/button-pressed.png | Bin .../canvas/contents/images/button.png | Bin .../canvas/contents/images/default.svg | 0 .../canvas/contents/images/gloss.png | Bin .../canvas/contents/images/lineedit.png | Bin .../canvas/contents/images/lineedit.sci | 0 .../canvas/contents/images/quit.png | Bin .../canvas/contents/images/stripes.png | Bin .../canvas/contents/images/titlebar.png | Bin .../canvas/contents/images/titlebar.sci | 0 .../canvas/contents/images/toolbutton.png | Bin .../canvas/contents/images/toolbutton.sci | 0 .../canvas/contents/qt-logo.png | Bin .../quadraticCurveTo/quadraticCurveTo.qml | 0 .../canvas/roundedrect/roundedrect.qml | 0 .../canvas/smile/smile.qml | 0 .../canvas/squircle/squircle.png | Bin .../canvas/squircle/squircle.qml | 0 .../canvas/stockchart/README | 0 .../com/nokia/StockChartExample/qmldir | 0 .../canvas/stockchart/model.cpp | 0 .../canvas/stockchart/model.h | 0 .../canvas/stockchart/plugin.cpp | 6 +- .../canvas/stockchart/stock.qml | 0 examples/qml/canvas/stockchart/stockchart.pro | 20 + .../canvas/tiger/tiger.js | 0 .../canvas/tiger/tiger.qml | 0 .../canvas/twitterfriends/TwitterUser.qml | 0 .../canvas/twitterfriends/cache.js | 0 .../canvas/twitterfriends/twitter.qml | 0 .../cppextensions/cppextensions.pro | 0 .../cppextensions/cppextensions.qmlproject | 0 .../imageprovider/ImageProviderCore/qmldir | 0 .../imageprovider/imageprovider-example.qml | 0 .../imageprovider/imageprovider.cpp | 14 +- .../imageprovider/imageprovider.pro | 8 +- .../imageprovider/imageprovider.qmlproject | 0 .../networkaccessmanagerfactory/main.cpp | 8 +- .../networkaccessmanagerfactory.pro | 2 +- .../networkaccessmanagerfactory.qmlproject | 0 .../networkaccessmanagerfactory.qrc | 0 .../networkaccessmanagerfactory/view.qml | 0 .../cppextensions/plugins/README | 0 .../plugins/com/nokia/TimeExample/Clock.qml | 0 .../plugins/com/nokia/TimeExample/center.png | Bin .../plugins/com/nokia/TimeExample/clock.png | Bin .../plugins/com/nokia/TimeExample/hour.png | Bin .../plugins/com/nokia/TimeExample/minute.png | Bin .../plugins/com/nokia/TimeExample/qmldir | 0 .../cppextensions/plugins/plugin.cpp | 6 +- .../cppextensions/plugins/plugins.pro | 12 +- .../cppextensions/plugins/plugins.qml | 0 .../cppextensions/plugins/plugins.qmlproject | 0 .../referenceexamples/adding/adding.pro | 6 +- .../referenceexamples/adding/adding.qrc | 0 .../referenceexamples/adding/example.qml | 0 .../referenceexamples/adding/main.cpp | 8 +- .../referenceexamples/adding/person.cpp | 0 .../referenceexamples/adding/person.h | 0 .../referenceexamples/attached/attached.pro | 6 +- .../referenceexamples/attached/attached.qrc | 0 .../attached/birthdayparty.cpp | 4 +- .../attached/birthdayparty.h | 6 +- .../referenceexamples/attached/example.qml | 0 .../referenceexamples/attached/main.cpp | 8 +- .../referenceexamples/attached/person.cpp | 0 .../referenceexamples/attached/person.h | 0 .../referenceexamples/binding/binding.pro | 6 +- .../referenceexamples/binding/binding.qrc | 0 .../binding/birthdayparty.cpp | 4 +- .../referenceexamples/binding/birthdayparty.h | 6 +- .../referenceexamples/binding/example.qml | 0 .../binding/happybirthdaysong.cpp | 2 +- .../binding/happybirthdaysong.h | 12 +- .../referenceexamples/binding/main.cpp | 8 +- .../referenceexamples/binding/person.cpp | 0 .../referenceexamples/binding/person.h | 0 .../coercion/birthdayparty.cpp | 4 +- .../coercion/birthdayparty.h | 6 +- .../referenceexamples/coercion/coercion.pro | 6 +- .../referenceexamples/coercion/coercion.qrc | 0 .../referenceexamples/coercion/example.qml | 0 .../referenceexamples/coercion/main.cpp | 8 +- .../referenceexamples/coercion/person.cpp | 0 .../referenceexamples/coercion/person.h | 0 .../default/birthdayparty.cpp | 4 +- .../referenceexamples/default/birthdayparty.h | 6 +- .../referenceexamples/default/default.pro | 6 +- .../referenceexamples/default/default.qrc | 0 .../referenceexamples/default/example.qml | 0 .../referenceexamples/default/main.cpp | 8 +- .../referenceexamples/default/person.cpp | 0 .../referenceexamples/default/person.h | 0 .../referenceexamples/extended/example.qml | 0 .../referenceexamples/extended/extended.pro | 6 +- .../referenceexamples/extended/extended.qrc | 0 .../referenceexamples/extended/lineedit.cpp | 2 +- .../referenceexamples/extended/lineedit.h | 0 .../referenceexamples/extended/main.cpp | 8 +- .../grouped/birthdayparty.cpp | 4 +- .../referenceexamples/grouped/birthdayparty.h | 6 +- .../referenceexamples/grouped/example.qml | 0 .../referenceexamples/grouped/grouped.pro | 6 +- .../referenceexamples/grouped/grouped.qrc | 0 .../referenceexamples/grouped/main.cpp | 8 +- .../referenceexamples/grouped/person.cpp | 0 .../referenceexamples/grouped/person.h | 0 .../methods/birthdayparty.cpp | 4 +- .../referenceexamples/methods/birthdayparty.h | 6 +- .../referenceexamples/methods/example.qml | 0 .../referenceexamples/methods/main.cpp | 8 +- .../referenceexamples/methods/methods.pro | 6 +- .../referenceexamples/methods/methods.qrc | 0 .../referenceexamples/methods/person.cpp | 0 .../referenceexamples/methods/person.h | 0 .../properties/birthdayparty.cpp | 4 +- .../properties/birthdayparty.h | 6 +- .../referenceexamples/properties/example.qml | 0 .../referenceexamples/properties/main.cpp | 8 +- .../referenceexamples/properties/person.cpp | 0 .../referenceexamples/properties/person.h | 0 .../properties/properties.pro | 6 +- .../properties/properties.qrc | 0 .../referenceexamples/referenceexamples.pro | 0 .../referenceexamples.qmlproject | 0 .../signal/birthdayparty.cpp | 4 +- .../referenceexamples/signal/birthdayparty.h | 6 +- .../referenceexamples/signal/example.qml | 0 .../referenceexamples/signal/main.cpp | 8 +- .../referenceexamples/signal/person.cpp | 0 .../referenceexamples/signal/person.h | 0 .../referenceexamples/signal/signal.pro | 6 +- .../referenceexamples/signal/signal.qrc | 0 .../valuesource/birthdayparty.cpp | 4 +- .../valuesource/birthdayparty.h | 6 +- .../referenceexamples/valuesource/example.qml | 0 .../valuesource/happybirthdaysong.cpp | 2 +- .../valuesource/happybirthdaysong.h | 14 +- .../referenceexamples/valuesource/main.cpp | 8 +- .../referenceexamples/valuesource/person.cpp | 0 .../referenceexamples/valuesource/person.h | 0 .../valuesource/valuesource.pro | 6 +- .../valuesource/valuesource.qrc | 0 .../draganddrop/dragtarget.qmlproject | 0 .../draganddrop/tiles/DragTile.qml | 0 .../draganddrop/tiles/DropTile.qml | 0 .../draganddrop/tiles/tiles.qml | 0 .../draganddrop/views/gridview.qml | 0 .../flickr/content/Button.qml | 2 +- .../flickr/content/GridDelegate.qml | 2 +- .../flickr/content/ImageDetails.qml | 2 +- .../flickr/content/ListDelegate.qml | 2 +- .../flickr/content/Progress.qml | 2 +- .../flickr/content/RssModel.qml | 2 +- .../flickr/content/ScrollBar.qml | 2 +- .../flickr/content/Slider.qml | 2 +- .../flickr/content/TitleBar.qml | 2 +- .../flickr/content/ToolBar.qml | 2 +- .../flickr/content/UnifiedDelegate.qml | 2 +- .../flickr/content/images/gloss.png | Bin .../flickr/content/images/lineedit.png | Bin .../flickr/content/images/lineedit.sci | 0 .../flickr/content/images/noise.png | Bin .../flickr/content/images/particle.png | Bin .../flickr/content/images/quit.png | Bin .../flickr/content/images/squareParticle.png | Bin .../flickr/content/images/stripes.png | Bin .../flickr/content/images/titlebar.png | Bin .../flickr/content/images/titlebar.sci | 0 .../flickr/content/images/toolbutton.png | Bin .../flickr/content/images/toolbutton.sci | 0 .../flickr/content/qmldir | 0 .../{declarative => qml}/flickr/flickr-90.qml | 2 +- .../{declarative => qml}/flickr/flickr.qml | 2 +- .../flickr/flickr.qmlproject | 0 examples/{declarative => qml}/i18n/i18n.qml | 0 .../{declarative => qml}/i18n/i18n/base.ts | 0 .../i18n/i18n/qml_en_AU.ts | 0 .../{declarative => qml}/i18n/i18n/qml_fr.ts | 0 .../imageelements/borderimage.qml | 0 .../imageelements/content/BearSheet.png | Bin .../imageelements/content/ImageCell.qml | 0 .../imageelements/content/MyBorderImage.qml | 0 .../imageelements/content/ShadowRectangle.qml | 0 .../imageelements/content/bw.png | Bin .../imageelements/content/colors-round.sci | 0 .../imageelements/content/colors-stretch.sci | 0 .../imageelements/content/colors.png | Bin .../imageelements/content/qt-logo.png | Bin .../imageelements/content/shadow.png | Bin .../imageelements/content/speaker.png | Bin .../imageelements/image.qml | 0 .../imageelements/imageelements.qml | 0 .../imageelements/imageelements.qmlproject | 0 .../imageelements/shadows.qml | 0 .../imageelements/simplesprite.qml | 0 .../imageelements/spriteimage.qml | 0 .../keyinteraction/focus/Core/ContextMenu.qml | 0 .../keyinteraction/focus/Core/GridMenu.qml | 0 .../keyinteraction/focus/Core/ListMenu.qml | 0 .../focus/Core/ListViewDelegate.qml | 0 .../focus/Core/images/arrow.png | Bin .../focus/Core/images/qt-logo.png | Bin .../keyinteraction/focus/focus.qml | 0 .../{declarative => qml}/locale/locale.qml | 0 .../minehunt/MinehuntCore/Explosion.qml | 2 +- .../minehunt/MinehuntCore/Tile.qml | 2 +- .../minehunt/MinehuntCore/pics/back.png | Bin .../minehunt/MinehuntCore/pics/background.png | Bin .../minehunt/MinehuntCore/pics/bomb-color.png | Bin .../minehunt/MinehuntCore/pics/bomb.png | Bin .../minehunt/MinehuntCore/pics/face-sad.png | Bin .../MinehuntCore/pics/face-smile-big.png | Bin .../minehunt/MinehuntCore/pics/face-smile.png | Bin .../minehunt/MinehuntCore/pics/flag-color.png | Bin .../minehunt/MinehuntCore/pics/flag.png | Bin .../minehunt/MinehuntCore/pics/front.png | Bin .../minehunt/MinehuntCore/pics/quit.png | Bin .../minehunt/MinehuntCore/pics/star.png | Bin .../minehunt/MinehuntCore/qmldir | 0 examples/{declarative => qml}/minehunt/README | 0 .../{declarative => qml}/minehunt/main.cpp | 4 +- .../minehunt/minehunt.cpp | 10 +- .../{declarative => qml}/minehunt/minehunt.h | 6 +- .../minehunt/minehunt.pro | 2 +- .../minehunt/minehunt.qml | 2 +- .../minehunt/minehunt.qmlproject | 0 .../minehunt/minehunt.qrc | 0 .../abstractitemmodel/abstractitemmodel.pro | 2 +- .../abstractitemmodel/abstractitemmodel.qrc | 0 .../modelviews/abstractitemmodel/main.cpp | 8 +- .../modelviews/abstractitemmodel/model.cpp | 0 .../modelviews/abstractitemmodel/model.h | 0 .../modelviews/abstractitemmodel/view.qml | 0 .../modelviews/gridview/gridview-example.qml | 0 .../gridview/pics/AddressBook_48.png | Bin .../gridview/pics/AudioPlayer_48.png | Bin .../modelviews/gridview/pics/Camera_48.png | Bin .../modelviews/gridview/pics/DateBook_48.png | Bin .../modelviews/gridview/pics/EMail_48.png | Bin .../modelviews/gridview/pics/TodoList_48.png | Bin .../gridview/pics/VideoPlayer_48.png | Bin .../modelviews/listview/content/PetsModel.qml | 0 .../listview/content/PressAndHoldButton.qml | 0 .../listview/content/RecipesModel.qml | 0 .../listview/content/TextButton.qml | 0 .../listview/content/ToggleButton.qml | 2 +- .../listview/content/pics/arrow-down.png | Bin .../listview/content/pics/arrow-up.png | Bin .../listview/content/pics/fruit-salad.jpg | Bin .../listview/content/pics/hamburger.jpg | Bin .../listview/content/pics/lemonade.jpg | Bin .../listview/content/pics/list-delete.png | Bin .../listview/content/pics/minus-sign.png | Bin .../listview/content/pics/moreDown.png | Bin .../listview/content/pics/moreUp.png | Bin .../listview/content/pics/pancakes.jpg | Bin .../listview/content/pics/plus-sign.png | Bin .../listview/content/pics/vegetable-soup.jpg | Bin .../modelviews/listview/dynamiclist.qml | 0 .../listview/expandingdelegates.qml | 0 .../modelviews/listview/highlight.qml | 0 .../modelviews/listview/highlightranges.qml | 0 .../modelviews/listview/sections.qml | 0 .../modelviews/modelviews.pro | 0 .../modelviews/modelviews.qml | 0 .../modelviews/modelviews.qmlproject | 0 .../modelviews/objectlistmodel/dataobject.cpp | 0 .../modelviews/objectlistmodel/dataobject.h | 0 .../modelviews/objectlistmodel/main.cpp | 8 +- .../objectlistmodel/objectlistmodel.pro | 2 +- .../objectlistmodel.qmlproject | 0 .../objectlistmodel/objectlistmodel.qrc | 0 .../modelviews/objectlistmodel/view.qml | 0 .../modelviews/package/Delegate.qml | 0 .../modelviews/package/view.qml | 0 .../parallax/content/ParallaxView.qml | 0 .../modelviews/parallax/content/Smiley.qml | 0 .../parallax/content/pics/background.jpg | Bin .../parallax/content/pics/face-smile.png | Bin .../parallax/content/pics/home-page.png | Bin .../parallax/content/pics/home-page.svg | 0 .../parallax/content/pics/shadow.png | Bin .../parallax/content/pics/yast-joystick.png | Bin .../parallax/content/pics/yast-wol.png | Bin .../modelviews/parallax/parallax.qml | 0 .../modelviews/pathview/pathview-example.qml | 0 .../pathview/pics/AddressBook_48.png | Bin .../pathview/pics/AudioPlayer_48.png | Bin .../modelviews/pathview/pics/Camera_48.png | Bin .../modelviews/pathview/pics/DateBook_48.png | Bin .../modelviews/pathview/pics/EMail_48.png | Bin .../modelviews/pathview/pics/TodoList_48.png | Bin .../pathview/pics/VideoPlayer_48.png | Bin .../modelviews/stringlistmodel/main.cpp | 8 +- .../stringlistmodel/stringlistmodel.pro | 2 +- .../stringlistmodel/stringlistmodel.qrc | 0 .../modelviews/stringlistmodel/view.qml | 0 .../visualdatamodel/dragselection.qml | 0 .../modelviews/visualdatamodel/slideshow.qml | 0 .../visualdatamodel/sortedmodel.qml | 0 .../visualdatamodel.qmlproject | 0 .../visualitemmodel/visualitemmodel.qml | 0 .../openglunderqml/main.cpp | 0 .../openglunderqml/main.qml | 0 .../openglunderqml/openglunderqml.pro | 2 +- .../openglunderqml/squircle.cpp | 0 .../openglunderqml/squircle.h | 0 .../painteditem/painteditem.pro | 0 .../painteditem/smile/main.cpp | 2 +- .../painteditem/smile/smile.pro | 2 +- .../painteditem/smile/smile.qml | 0 .../textballoons/TextBalloonPlugin/plugin.h | 4 +- .../textballoons/TextBalloonPlugin/qmldir | 0 .../painteditem/textballoons/textballoon.cpp | 0 .../painteditem/textballoons/textballoon.h | 0 .../painteditem/textballoons/textballoons.pro | 23 + .../painteditem/textballoons/textballoons.qml | 0 .../particles/affectors/age.qml | 0 .../particles/affectors/attractor.qml | 0 .../particles/affectors/customaffector.qml | 0 .../particles/affectors/friction.qml | 0 .../particles/affectors/gravity.qml | 0 .../particles/affectors/groupgoal.qml | 0 .../particles/affectors/move.qml | 0 .../particles/affectors/spritegoal.qml | 0 .../particles/affectors/turbulence.qml | 0 .../particles/affectors/wander.qml | 0 .../customparticle/blurparticles.qml | 0 .../customparticle/fragmentshader.qml | 0 .../particles/customparticle/imagecolors.qml | 0 .../particles/emitters/burstandpulse.qml | 0 .../particles/emitters/customemitter.qml | 0 .../particles/emitters/emitmask.qml | 0 .../particles/emitters/maximumemitted.qml | 0 .../particles/emitters/shapeanddirection.qml | 0 .../particles/emitters/timedgroupchanges.qml | 0 .../particles/emitters/trailemitter.qml | 0 .../particles/emitters/velocityfrommotion.qml | 0 .../exampleslauncher/content/Button.qml | 0 .../exampleslauncher/content/Shell.qml | 0 .../exampleslauncher/content/launcher.js | 0 .../exampleslauncher/exampleslauncher.qml | 0 .../particles/imageparticle/allatonce.qml | 0 .../particles/imageparticle/colored.qml | 0 .../particles/imageparticle/colortable.qml | 0 .../particles/imageparticle/deformation.qml | 0 .../particles/imageparticle/rotation.qml | 0 .../particles/imageparticle/sharing.qml | 0 .../particles/imageparticle/sprites.qml | 0 .../particles/images/_explo.png | Bin .../particles/images/backgroundLeaves.jpg | Bin .../particles/images/bear_tiles.png | Bin .../particles/images/candle.png | Bin .../particles/images/colortable.png | Bin .../particles/images/finalfrontier.png | Bin .../particles/images/flower.png | Bin .../images/launcherIcons/allatonce.png | Bin .../images/launcherIcons/attractor.png | Bin .../images/launcherIcons/blurparticles.png | Bin .../particles/images/launcherIcons/close.png | Bin .../images/launcherIcons/colortable.png | Bin .../images/launcherIcons/customaffector.png | Bin .../images/launcherIcons/customemitter.png | Bin .../images/launcherIcons/deformation.png | Bin .../images/launcherIcons/delegates.png | Bin .../images/launcherIcons/dynamicemitters.png | Bin .../images/launcherIcons/emitmask.png | Bin .../particles/images/launcherIcons/flickr.png | Bin .../images/launcherIcons/fragmentshader.png | Bin .../images/launcherIcons/gridsplosion.png | Bin .../images/launcherIcons/groupgoal.png | Bin .../images/launcherIcons/imagecolors.png | Bin .../particles/images/launcherIcons/list.png | Bin .../images/launcherIcons/maximumemitted.png | Bin .../images/launcherIcons/multiplepainters.png | Bin .../images/launcherIcons/package.png | Bin .../images/launcherIcons/particleview.png | Bin .../images/launcherIcons/plasmapatrol.png | Bin .../particles/images/launcherIcons/remove.png | Bin .../images/launcherIcons/rotation.png | Bin .../images/launcherIcons/samegame.png | Bin .../launcherIcons/shapeanddirection.png | Bin .../images/launcherIcons/spaceexplorer.png | Bin .../images/launcherIcons/spritegoal.png | Bin .../images/launcherIcons/sprites.png | Bin .../launcherIcons/spritevariedparticles.png | Bin .../images/launcherIcons/startstop.png | Bin .../launcherIcons/timedgroupchanges.png | Bin .../images/launcherIcons/trailemitter.png | Bin .../particles/images/launcherIcons/trails.png | Bin .../images/launcherIcons/turbulence.png | Bin .../launcherIcons/velocityfrommotion.png | Bin .../particles/images/launcherIcons/wander.png | Bin .../particles/images/matchmask.png | Bin .../particles/images/meteor.png | Bin .../particles/images/meteor_explo.png | Bin .../particles/images/meteors.png | Bin .../particles/images/nullRock.png | Bin .../particles/images/particle.png | Bin .../particles/images/particle2.png | Bin .../particles/images/particle3.png | Bin .../particles/images/particle4.png | Bin .../particles/images/particleA.png | Bin .../particles/images/portal_bg.png | Bin .../particles/images/realLeaf1.png | Bin .../particles/images/realLeaf2.png | Bin .../particles/images/realLeaf3.png | Bin .../particles/images/realLeaf4.png | Bin .../particles/images/rocket.png | Bin .../particles/images/rocket2.png | Bin .../particles/images/sizeInOut.png | Bin .../particles/images/snowflake.png | Bin .../particles/images/sparkleSize.png | Bin .../particles/images/star.png | Bin .../particles/images/starfish_0.png | Bin .../particles/images/starfish_1.png | Bin .../particles/images/starfish_2.png | Bin .../particles/images/starfish_3.png | Bin .../particles/images/starfish_4.png | Bin .../particles/images/starfish_mask.png | Bin .../itemparticle/content/Delegate.qml | 0 .../itemparticle/content/Delegate2.qml | 0 .../content/ExpandingDelegate.qml | 0 .../itemparticle/content/RssModel.qml | 0 .../particles/itemparticle/content/bubble.png | Bin .../particles/itemparticle/content/script.js | 0 .../particles/itemparticle/delegates.qml | 0 .../particles/itemparticle/particleview.qml | 0 .../plasmapatrol/PlasmaPatrol.qmlproject | 0 .../particles/plasmapatrol/TODO | 0 .../plasmapatrol/content/BlasterHardpoint.qml | 2 +- .../particles/plasmapatrol/content/Button.qml | 2 +- .../plasmapatrol/content/CannonHardpoint.qml | 2 +- .../plasmapatrol/content/ChoiceBox.qml | 2 +- .../plasmapatrol/content/Cruiser.qml | 2 +- .../plasmapatrol/content/Frigate.qml | 2 +- .../plasmapatrol/content/Hardpoint.qml | 2 +- .../plasmapatrol/content/HelpScreens.qml | 2 +- .../plasmapatrol/content/LaserHardpoint.qml | 2 +- .../content/PlasmaPatrolParticles.qml | 2 +- .../plasmapatrol/content/SequentialLoader.qml | 2 +- .../particles/plasmapatrol/content/Ship.qml | 2 +- .../particles/plasmapatrol/content/Sloop.qml | 2 +- .../plasmapatrol/content/pics/TitleText.png | Bin .../content/pics/blur-circle2.png | Bin .../content/pics/blur-circle3.png | Bin .../content/pics/finalfrontier.png | Bin .../plasmapatrol/content/pics/meteor.png | Bin .../content/pics/meteor_explo.png | Bin .../plasmapatrol/content/pics/nullRock.png | Bin .../plasmapatrol/content/pics/particle.png | Bin .../plasmapatrol/content/pics/star.png | Bin .../plasmapatrol/content/pics/star2.png | Bin .../plasmapatrol/content/pics/star3.png | Bin .../particles/plasmapatrol/plasmapatrol.qml | 2 +- .../particles/simple/dynamiccomparison.qml | 0 .../particles/simple/dynamicemitters.qml | 0 .../particles/simple/multiplepainters.qml | 0 .../particles/simple/startstop.qml | 0 .../PhotoViewerCore/AlbumDelegate.qml | 2 +- .../PhotoViewerCore/BusyIndicator.qml | 2 +- .../photoviewer/PhotoViewerCore/Button.qml | 2 +- .../PhotoViewerCore/EditableButton.qml | 2 +- .../PhotoViewerCore/PhotoDelegate.qml | 2 +- .../PhotoViewerCore/ProgressBar.qml | 2 +- .../photoviewer/PhotoViewerCore/RssModel.qml | 2 +- .../photoviewer/PhotoViewerCore/Tag.qml | 2 +- .../PhotoViewerCore/images/box-shadow.png | Bin .../PhotoViewerCore/images/busy.png | Bin .../PhotoViewerCore/images/cardboard.png | Bin .../photoviewer/PhotoViewerCore/qmldir | 0 .../PhotoViewerCore/script/script.js | 0 .../photoviewer/i18n/base.ts | 0 .../photoviewer/i18n/qml_fr.qm | Bin .../photoviewer/i18n/qml_fr.ts | 0 .../photoviewer/photoviewer.qml | 2 +- .../photoviewer/photoviewer.qmlproject | 0 .../positioners/content/Button.qml | 0 .../positioners/content/add.png | Bin .../positioners/content/del.png | Bin .../positioners-attachedproperties.qml | 0 .../positioners/positioners.qml | 0 .../declarative.pro => qml/qml.pro} | 2 +- .../layoutdirection/layoutdirection.qml | 0 .../layoutdirection.qmlproject | 0 .../layoutmirroring/layoutmirroring.qml | 0 .../layoutmirroring.qmlproject | 0 .../textalignment/textalignment.qml | 0 .../textalignment/textalignment.qmlproject | 0 .../rssnews/content/BusyIndicator.qml | 2 +- .../rssnews/content/CategoryDelegate.qml | 2 +- .../rssnews/content/NewsDelegate.qml | 2 +- .../rssnews/content/RssFeeds.qml | 2 +- .../rssnews/content/ScrollBar.qml | 2 +- .../rssnews/content/images/busy.png | Bin .../rssnews/content/images/scrollbar.png | Bin .../{declarative => qml}/rssnews/rssnews.qml | 2 +- .../rssnews/rssnews.qmlproject | 0 .../samegame/content/BoomBlock.qml | 2 +- .../samegame/content/Button.qml | 2 +- .../samegame/content/Dialog.qml | 2 +- .../samegame/content/GameArea.qml | 2 +- .../samegame/content/NameInputDialog.qml | 2 +- .../samegame/content/pics/background.png | Bin .../samegame/content/pics/blueStone.png | Bin .../samegame/content/pics/greenStone.png | Bin .../samegame/content/pics/particle.png | Bin .../samegame/content/pics/redStone.png | Bin .../samegame/content/pics/yellowStone.png | Bin .../samegame/content/samegame.js | 0 .../samegame/samegame.qml | 2 +- .../samegame/samegame.qmlproject | 0 .../{declarative => qml}/script/script.pro | 0 .../script/shell/main.cpp | 2 +- .../script/shell/shell.pro | 2 +- .../shadereffects/content/Slider.qml | 0 .../shadereffects/content/face-smile.png | Bin .../shadereffects/content/qt-logo.png | Bin .../shadereffects/shadereffects.qml | 0 .../{declarative => qml}/shared/Button.qml | 0 .../shared/LauncherList.qml | 0 examples/{declarative => qml}/shared/README | 0 .../shared/SimpleLauncherDelegate.qml | 0 examples/{declarative => qml}/shared/back.png | Bin .../snake/content/Button.qml | 2 +- .../snake/content/Cookie.qml | 2 +- .../snake/content/HighScoreModel.qml | 2 +- .../snake/content/Link.qml | 2 +- .../snake/content/Skull.qml | 2 +- .../snake/content/pics/README | 0 .../snake/content/pics/background.png | Bin .../snake/content/pics/blueStar.png | Bin .../snake/content/pics/blueStone.png | Bin .../snake/content/pics/cookie.png | Bin .../snake/content/pics/eyes.svg | 0 .../snake/content/pics/head.png | Bin .../snake/content/pics/pause.png | Bin .../snake/content/pics/redStar.png | Bin .../snake/content/pics/redStone.png | Bin .../snake/content/pics/skull.png | Bin .../snake/content/pics/snake.jpg | Bin .../snake/content/pics/star.png | Bin .../snake/content/pics/stoneShadow.png | Bin .../snake/content/pics/yellowStar.png | Bin .../snake/content/pics/yellowStone.png | Bin .../snake/content/snake.js | 0 examples/{declarative => qml}/snake/snake.qml | 2 +- .../snake/snake.qmlproject | 0 .../sqllocalstorage/hello.qml | 0 .../text/fonts/availableFonts.qml | 0 .../text/fonts/banner.qml | 0 .../fonts/content/fonts/tarzeau_ocr_a.ttf | Bin .../{declarative => qml}/text/fonts/fonts.qml | 0 .../{declarative => qml}/text/fonts/hello.qml | 0 .../text/imgtag/TextWithImage.qml | 0 .../text/imgtag/images/face-sad.png | Bin .../text/imgtag/images/face-smile-big.png | Bin .../text/imgtag/images/face-smile.png | Bin .../text/imgtag/images/heart200.png | Bin .../text/imgtag/images/qtlogo.png | Bin .../text/imgtag/images/starfish_2.png | Bin .../text/imgtag/imgtag.qml | 0 .../text/styledtext-layout.qml | 0 examples/{declarative => qml}/text/text.qml | 0 .../{declarative => qml}/text/text.qmlproject | 0 .../text/textselection/pics/endHandle.png | Bin .../text/textselection/pics/endHandle.sci | 0 .../text/textselection/pics/startHandle.png | Bin .../text/textselection/pics/startHandle.sci | 0 .../text/textselection/textselection.qml | 0 .../threading/threadedlistmodel/dataloader.js | 0 .../threadedlistmodel.qmlproject | 0 .../threadedlistmodel/timedisplay.qml | 0 .../threading/workerscript/workerscript.js | 0 .../threading/workerscript/workerscript.qml | 0 .../workerscript/workerscript.qmlproject | 0 .../mousearea/mousearea-example.qml | 0 .../multipointtouch/bearwhack.qml | 0 .../content/AugmentedTouchPoint.qml | 0 .../multipointtouch/content/Bear0.png | Bin .../multipointtouch/content/Bear1.png | Bin .../multipointtouch/content/Bear2.png | Bin .../multipointtouch/content/Bear3.png | Bin .../multipointtouch/content/BearB.png | Bin .../content/BearWhackParticleSystem.qml | 0 .../multipointtouch/content/ParticleFlame.qml | 0 .../multipointtouch/content/blur-circle.png | Bin .../multipointtouch/content/blur-circle3.png | Bin .../multipointtouch/content/heart-blur.png | Bin .../multipointtouch/content/title.png | Bin .../multipointtouch/multiflame.qml | 0 .../pincharea/flickresize.qml | 0 .../touchinteraction/pincharea/qt-logo.jpg | Bin .../touchinteraction/touchinteraction.qml | 0 .../touchinteraction.qmlproject | 0 .../toys/clocks/clocks.qml | 0 .../toys/clocks/content/Clock.qml | 0 .../toys/clocks/content/QuitButton.qml | 0 .../toys/clocks/content/arrow.png | Bin .../toys/clocks/content/background.png | Bin .../toys/clocks/content/center.png | Bin .../toys/clocks/content/clock-night.png | Bin .../toys/clocks/content/clock.png | Bin .../toys/clocks/content/hour.png | Bin .../toys/clocks/content/minute.png | Bin .../toys/clocks/content/quit.png | Bin .../toys/clocks/content/second.png | Bin .../toys/corkboards/content/Day.qml | 0 .../toys/corkboards/content/cork.jpg | Bin .../toys/corkboards/content/note-yellow.png | Bin .../toys/corkboards/content/tack.png | Bin .../toys/corkboards/corkboards.qml | 0 .../toys/dynamicscene/content/Button.qml | 0 .../dynamicscene/content/GenericSceneItem.qml | 0 .../toys/dynamicscene/content/PaletteItem.qml | 0 .../dynamicscene/content/PerspectiveItem.qml | 0 .../toys/dynamicscene/content/Sun.qml | 0 .../toys/dynamicscene/content/images/NOTE | 0 .../content/images/face-smile.png | Bin .../toys/dynamicscene/content/images/moon.png | Bin .../content/images/rabbit_brown.png | Bin .../dynamicscene/content/images/rabbit_bw.png | Bin .../toys/dynamicscene/content/images/star.png | Bin .../toys/dynamicscene/content/images/sun.png | Bin .../dynamicscene/content/images/tree_s.png | Bin .../toys/dynamicscene/content/itemCreation.js | 0 .../toys/dynamicscene/dynamicscene.qml | 0 .../toys/tic-tac-toe/content/Button.qml | 0 .../toys/tic-tac-toe/content/TicTac.qml | 0 .../toys/tic-tac-toe/content/pics/board.png | Bin .../toys/tic-tac-toe/content/pics/o.png | Bin .../toys/tic-tac-toe/content/pics/x.png | Bin .../toys/tic-tac-toe/content/tic-tac-toe.js | 0 .../toys/tic-tac-toe/tic-tac-toe.qml | 0 .../toys/tvtennis/tvtennis.qml | 0 .../dynamicview/dynamicview1/PetsModel.qml | 0 .../dynamicview/dynamicview1/dynamicview.qml | 0 .../dynamicview/dynamicview2/PetsModel.qml | 0 .../dynamicview/dynamicview2/dynamicview.qml | 0 .../dynamicview/dynamicview3/PetsModel.qml | 0 .../dynamicview/dynamicview3/dynamicview.qml | 0 .../dynamicview/dynamicview4/ListSelector.qml | 0 .../dynamicview/dynamicview4/PetsModel.qml | 0 .../dynamicview/dynamicview4/dynamicview.qml | 0 .../extending/chapter1-basics/app.qml | 0 .../chapter1-basics/chapter1-basics.pro | 2 +- .../extending/chapter1-basics/main.cpp | 0 .../extending/chapter1-basics/piechart.cpp | 0 .../extending/chapter1-basics/piechart.h | 0 .../extending/chapter2-methods/app.qml | 0 .../chapter2-methods/chapter2-methods.pro | 2 +- .../extending/chapter2-methods/main.cpp | 0 .../extending/chapter2-methods/piechart.cpp | 0 .../extending/chapter2-methods/piechart.h | 0 .../extending/chapter3-bindings/app.qml | 0 .../chapter3-bindings/chapter3-bindings.pro | 2 +- .../extending/chapter3-bindings/main.cpp | 0 .../extending/chapter3-bindings/piechart.cpp | 0 .../extending/chapter3-bindings/piechart.h | 0 .../chapter4-customPropertyTypes/app.qml | 0 .../chapter4-customPropertyTypes.pro | 2 +- .../chapter4-customPropertyTypes/main.cpp | 0 .../chapter4-customPropertyTypes/piechart.cpp | 0 .../chapter4-customPropertyTypes/piechart.h | 0 .../chapter4-customPropertyTypes/pieslice.cpp | 0 .../chapter4-customPropertyTypes/pieslice.h | 0 .../extending/chapter5-listproperties/app.qml | 0 .../chapter5-listproperties.pro | 2 +- .../chapter5-listproperties/main.cpp | 0 .../chapter5-listproperties/piechart.cpp | 6 +- .../chapter5-listproperties/piechart.h | 6 +- .../chapter5-listproperties/pieslice.cpp | 0 .../chapter5-listproperties/pieslice.h | 0 .../chapter6-plugins/ChartsPlugin/qmldir | 0 .../extending/chapter6-plugins/app.qml | 0 .../chapter6-plugins/chapter6-plugins.pro | 2 +- .../chapter6-plugins/chartsplugin.cpp | 2 +- .../extending/chapter6-plugins/chartsplugin.h | 4 +- .../extending/chapter6-plugins/piechart.cpp | 6 +- .../extending/chapter6-plugins/piechart.h | 6 +- .../extending/chapter6-plugins/pieslice.cpp | 0 .../extending/chapter6-plugins/pieslice.h | 0 .../tutorials/extending/extending.pro | 0 .../tutorials/helloworld/Cell.qml | 0 .../tutorials/helloworld/tutorial1.qml | 0 .../tutorials/helloworld/tutorial2.qml | 0 .../tutorials/helloworld/tutorial3.qml | 0 .../tutorials/samegame/samegame1/Block.qml | 0 .../tutorials/samegame/samegame1/Button.qml | 0 .../tutorials/samegame/samegame1/samegame.qml | 0 .../samegame/samegame1/samegame1.qmlproject | 0 .../tutorials/samegame/samegame2/Block.qml | 0 .../tutorials/samegame/samegame2/Button.qml | 0 .../tutorials/samegame/samegame2/samegame.js | 0 .../tutorials/samegame/samegame2/samegame.qml | 0 .../samegame/samegame2/samegame2.qmlproject | 0 .../tutorials/samegame/samegame3/Block.qml | 0 .../tutorials/samegame/samegame3/Button.qml | 0 .../tutorials/samegame/samegame3/Dialog.qml | 0 .../tutorials/samegame/samegame3/samegame.js | 0 .../tutorials/samegame/samegame3/samegame.qml | 0 .../samegame/samegame3/samegame3.qmlproject | 0 .../samegame/samegame4/content/BoomBlock.qml | 0 .../samegame/samegame4/content/Button.qml | 0 .../samegame/samegame4/content/Dialog.qml | 0 .../samegame/samegame4/content/samegame.js | 0 .../samegame/samegame4/highscores/README | 0 .../samegame4/highscores/score_data.xml | 0 .../samegame4/highscores/score_style.xsl | 0 .../samegame/samegame4/highscores/scores.php | 0 .../tutorials/samegame/samegame4/samegame.qml | 0 .../samegame/samegame4/samegame4.qmlproject | 0 .../samegame/shared/pics/background.jpg | Bin .../samegame/shared/pics/blueStar.png | Bin .../samegame/shared/pics/blueStone.png | Bin .../samegame/shared/pics/greenStar.png | Bin .../samegame/shared/pics/greenStone.png | Bin .../samegame/shared/pics/redStar.png | Bin .../samegame/shared/pics/redStone.png | Bin .../tutorials/samegame/shared/pics/star.png | Bin .../samegame/shared/pics/yellowStone.png | Bin .../tutorials/tutorials.pro | 0 .../tutorials/tutorials.qmlproject | 0 .../twitter/TwitterCore/Button.qml | 2 +- .../twitter/TwitterCore/FatDelegate.qml | 2 +- .../twitter/TwitterCore/Input.qml | 2 +- .../twitter/TwitterCore/Loading.qml | 2 +- .../twitter/TwitterCore/MultiTitleBar.qml | 2 +- .../twitter/TwitterCore/RssModel.qml | 2 +- .../twitter/TwitterCore/SearchView.qml | 2 +- .../twitter/TwitterCore/TitleBar.qml | 2 +- .../twitter/TwitterCore/ToolBar.qml | 2 +- .../twitter/TwitterCore/UserModel.qml | 2 +- .../twitter/TwitterCore/images/gloss.png | Bin .../twitter/TwitterCore/images/lineedit.png | Bin .../twitter/TwitterCore/images/lineedit.sci | 0 .../twitter/TwitterCore/images/loading.png | Bin .../twitter/TwitterCore/images/quit.png | Bin .../twitter/TwitterCore/images/stripes.png | Bin .../twitter/TwitterCore/images/titlebar.png | Bin .../twitter/TwitterCore/images/titlebar.sci | 0 .../twitter/TwitterCore/images/toolbutton.png | Bin .../twitter/TwitterCore/images/toolbutton.sci | 0 .../twitter/TwitterCore/qmldir | 0 .../{declarative => qml}/twitter/twitter.qml | 2 +- .../twitter/twitter.qmlproject | 0 .../dialcontrol/content/Dial.qml | 0 .../dialcontrol/content/QuitButton.qml | 0 .../dialcontrol/content/background.png | Bin .../dialcontrol/content/needle.png | Bin .../dialcontrol/content/needle_shadow.png | Bin .../dialcontrol/content/overlay.png | Bin .../dialcontrol/content/quit.png | Bin .../ui-components/dialcontrol/dialcontrol.qml | 0 .../flipable/content/5_heart.png | Bin .../ui-components/flipable/content/9_club.png | Bin .../ui-components/flipable/content/Card.qml | 0 .../ui-components/flipable/content/back.png | Bin .../ui-components/flipable/flipable.qml | 0 .../progressbar/content/ProgressBar.qml | 0 .../progressbar/content/background.png | Bin .../ui-components/progressbar/main.qml | 0 .../ui-components/scrollbar/ScrollBar.qml | 0 .../ui-components/scrollbar/main.qml | 0 .../scrollbar/pics/niagara_falls.jpg | Bin .../scrollbar/scrollbar.qmlproject | 0 .../ui-components/searchbox/SearchBox.qml | 0 .../ui-components/searchbox/images/clear.png | Bin .../searchbox/images/lineedit-bg-focus.png | Bin .../searchbox/images/lineedit-bg.png | Bin .../ui-components/searchbox/main.qml | 0 .../searchbox/searchbox.qmlproject | 0 .../slideswitch/content/Switch.qml | 0 .../slideswitch/content/background.png | Bin .../slideswitch/content/background.svg | 0 .../slideswitch/content/knob.png | Bin .../slideswitch/content/knob.svg | 0 .../ui-components/slideswitch/slideswitch.qml | 0 .../ui-components/spinner/content/Spinner.qml | 0 .../spinner/content/spinner-bg.png | Bin .../spinner/content/spinner-select.png | Bin .../ui-components/spinner/main.qml | 0 .../ui-components/spinner/spinner.qmlproject | 0 .../ui-components/tabwidget/TabWidget.qml | 0 .../ui-components/tabwidget/main.qml | 0 .../ui-components/tabwidget/tab.png | Bin .../tabwidget/tabwidget.qmlproject | 0 .../{declarative => qml}/window/Window.qml | 0 .../window/screen/screenInfo.qml | 0 .../window/standalone.qml | 0 .../{declarative => qml}/window/window.cpp | 8 +- .../{declarative => qml}/window/window.pro | 2 +- .../xml/xmlhttprequest/data.xml | 0 .../xmlhttprequest/xmlhttprequest-example.qml | 0 .../gettingStartedQml/core/Button.qml | 2 +- .../gettingStartedQml/core/EditMenu.qml | 2 +- .../gettingStartedQml/core/FileDialog.qml | 2 +- .../gettingStartedQml/core/FileMenu.qml | 2 +- .../gettingStartedQml/core/MenuBar.qml | 2 +- .../gettingStartedQml/core/TextArea.qml | 2 +- .../filedialog/dialogPlugin.cpp | 4 +- .../filedialog/dialogPlugin.h | 8 +- .../filedialog/directory.cpp | 16 +- .../gettingStartedQml/filedialog/directory.h | 8 +- .../gettingStartedQml/filedialog/file.cpp | 2 +- .../gettingStartedQml/filedialog/file.h | 2 +- .../filedialog/filedialog.pro | 2 +- .../gettingStartedQml/parts/part0/Button.qml | 2 +- .../gettingStartedQml/parts/part1/Button.qml | 2 +- .../parts/part1/EditMenu.qml | 2 +- .../parts/part1/FileMenu.qml | 2 +- .../parts/part1/SimpleButton.qml | 2 +- .../gettingStartedQml/parts/part2/Button.qml | 2 +- .../parts/part2/EditMenu.qml | 2 +- .../parts/part2/FileMenu.qml | 2 +- .../gettingStartedQml/parts/part2/MenuBar.qml | 2 +- .../gettingStartedQml/parts/part3/Button.qml | 2 +- .../parts/part3/EditMenu.qml | 2 +- .../parts/part3/FileMenu.qml | 2 +- .../gettingStartedQml/parts/part3/MenuBar.qml | 2 +- .../parts/part3/TextArea.qml | 2 +- .../parts/part3/TextEditor.qml | 2 +- .../gettingStartedQml/parts/part4/Button.qml | 2 +- .../parts/part4/EditMenu.qml | 2 +- .../parts/part4/FileMenu.qml | 2 +- .../gettingStartedQml/parts/part4/MenuBar.qml | 2 +- .../parts/part4/SimpleButton.qml | 2 +- .../parts/part4/TextArea.qml | 2 +- .../parts/part4/TextEditor.qml | 2 +- .../parts/part5/TextEditor.qml | 2 +- .../parts/part5/core/Button.qml | 2 +- .../parts/part5/core/EditMenu.qml | 2 +- .../parts/part5/core/FileDialog.qml | 2 +- .../parts/part5/core/FileMenu.qml | 2 +- .../parts/part5/core/MenuBar.qml | 2 +- .../parts/part5/core/TextArea.qml | 2 +- .../parts/part5/filedialog/dialogPlugin.cpp | 6 +- .../parts/part5/filedialog/dialogPlugin.h | 8 +- .../parts/part5/filedialog/directory.cpp | 18 +- .../parts/part5/filedialog/directory.h | 8 +- .../parts/part5/filedialog/file.cpp | 2 +- .../parts/part5/filedialog/file.h | 2 +- .../parts/part5/filedialog/filedialog.pro | 2 +- .../gettingStartedQml/texteditor.qml | 2 +- modules/qt_declarative.pri | 17 - modules/qt_qml.pri | 17 + modules/qt_qmltest.pri | 2 +- modules/qt_quick.pri | 2 +- src/declarative/debugger/debugger.pri | 32 - .../debugger/qdeclarativeenginedebug.cpp | 1072 ---------------- .../debugger/qdeclarativeenginedebug_p.h | 397 ------ src/declarative/qml/parser/parser.pri | 19 - src/declarative/qml/qdeclarative.h | 451 ------- src/declarative/qml/qdeclarativecompiler_p.h | 466 ------- .../qml/qdeclarativeextensioninterface.h | 75 -- src/declarative/qml/qdeclarativeinfo.h | 103 -- src/declarative/qml/qml.pri | 125 -- src/declarative/qml/v4/qv4irbuilder_p.h | 240 ---- src/declarative/util/util.pri | 5 - .../folderlistmodel/folderlistmodel.pro | 8 +- src/imports/folderlistmodel/plugin.cpp | 12 +- ...istmodel.cpp => qquickfolderlistmodel.cpp} | 82 +- ...derlistmodel.h => qquickfolderlistmodel.h} | 26 +- src/imports/localstorage/localstorage.pro | 4 +- src/imports/localstorage/plugin.cpp | 46 +- src/imports/qimportbase.pri | 2 +- src/imports/qtquick2/plugin.cpp | 8 +- src/imports/qtquick2/qtquick2.pro | 4 +- src/imports/testlib/main.cpp | 28 +- src/imports/testlib/signalspy.h | 6 +- src/imports/testlib/testcase.h | 6 +- src/imports/testlib/testlib.pro | 6 +- src/imports/xmllistmodel/plugin.cpp | 14 +- ...exmllistmodel.cpp => qqmlxmllistmodel.cpp} | 276 ++--- ...exmllistmodel_p.h => qqmlxmllistmodel_p.h} | 52 +- src/imports/xmllistmodel/xmllistmodel.pro | 8 +- src/plugins/accessible/quick/main.cpp | 4 +- .../accessible/quick/qaccessiblequickitem.cpp | 4 +- .../accessible/quick/qaccessiblequickitem.h | 6 +- .../accessible/quick/qaccessiblequickview.cpp | 4 +- .../accessible/quick/qaccessiblequickview.h | 2 +- src/plugins/accessible/quick/quick.pro | 2 +- .../accessible/shared/qaccessiblebase.pri | 4 +- ...ativeaccessible.cpp => qqmlaccessible.cpp} | 18 +- ...clarativeaccessible.h => qqmlaccessible.h} | 18 +- .../qmltooling/qmldbg_ost/qmldbg_ost.pro | 4 +- .../qmltooling/qmldbg_ost/qmlostplugin.cpp | 12 +- .../qmltooling/qmldbg_ost/qmlostplugin.h | 12 +- .../qmltooling/qmldbg_ost/qostdevice.cpp | 2 +- .../qmltooling/qmldbg_ost/qostdevice.h | 2 +- .../qmltooling/qmldbg_ost/usbostcomm.h | 2 +- .../qmltooling/qmldbg_qtquick2/highlight.cpp | 2 +- .../qmltooling/qmldbg_qtquick2/highlight.h | 2 +- .../qmldbg_qtquick2/qmldbg_qtquick2.pro | 6 +- .../qmldbg_qtquick2/qquickviewinspector.cpp | 6 +- .../qmldbg_qtquick2/qquickviewinspector.h | 4 +- .../qmldbg_qtquick2/qtquick2plugin.cpp | 4 +- .../qmldbg_qtquick2/qtquick2plugin.h | 16 +- .../qmldbg_qtquick2/selectiontool.cpp | 2 +- .../qmldbg_qtquick2/selectiontool.h | 2 +- .../qmltooling/qmldbg_tcp/qmldbg_tcp.pro | 6 +- .../qmldbg_tcp/qtcpserverconnection.cpp | 16 +- .../qmldbg_tcp/qtcpserverconnection.h | 12 +- .../qmltooling/shared/abstracttool.cpp | 2 +- src/plugins/qmltooling/shared/abstracttool.h | 2 +- .../shared/abstractviewinspector.cpp | 30 +- .../qmltooling/shared/abstractviewinspector.h | 14 +- .../qmltooling/shared/qmlinspectorconstants.h | 4 +- ...ctorprotocol.h => qqmlinspectorprotocol.h} | 8 +- .../animations/animations.pri | 0 .../animations/qabstractanimationjob.cpp | 58 +- .../animations/qabstractanimationjob_p.h | 17 +- .../animations/qanimationgroupjob.cpp | 2 +- .../animations/qanimationgroupjob_p.h | 6 +- .../animations/qanimationjobutil_p.h | 2 +- .../animations/qparallelanimationgroupjob.cpp | 2 +- .../animations/qparallelanimationgroupjob_p.h | 6 +- .../animations/qpauseanimationjob.cpp | 2 +- .../animations/qpauseanimationjob_p.h | 6 +- .../qsequentialanimationgroupjob.cpp | 2 +- .../qsequentialanimationgroupjob_p.h | 6 +- src/qml/debugger/debugger.pri | 32 + .../debugger/qdebugmessageservice.cpp | 16 +- .../debugger/qdebugmessageservice_p.h | 8 +- .../debugger/qpacketprotocol.cpp | 2 +- .../debugger/qpacketprotocol_p.h | 10 +- .../debugger/qqmldebug.h} | 18 +- .../debugger/qqmldebugclient.cpp} | 128 +- .../debugger/qqmldebugclient_p.h} | 42 +- .../debugger/qqmldebughelper.cpp} | 22 +- .../debugger/qqmldebughelper_p.h} | 18 +- .../debugger/qqmldebugserver.cpp} | 189 +-- .../debugger/qqmldebugserver_p.h} | 46 +- .../debugger/qqmldebugserverconnection_p.h} | 23 +- .../debugger/qqmldebugservice.cpp} | 82 +- .../debugger/qqmldebugservice_p.h} | 28 +- .../debugger/qqmldebugservice_p_p.h} | 20 +- .../debugger/qqmldebugstatesdelegate_p.h} | 28 +- src/qml/debugger/qqmlenginedebug.cpp | 1072 ++++++++++++++++ src/qml/debugger/qqmlenginedebug_p.h | 397 ++++++ .../debugger/qqmlenginedebugservice.cpp} | 232 ++-- .../debugger/qqmlenginedebugservice_p.h} | 60 +- .../debugger/qqmlinspectorinterface_p.h} | 18 +- .../debugger/qqmlinspectorservice.cpp} | 56 +- .../debugger/qqmlinspectorservice_p.h} | 24 +- .../debugger/qqmlprofilerservice.cpp} | 138 +-- .../debugger/qqmlprofilerservice_p.h} | 32 +- .../debugger/qv8debugservice.cpp | 12 +- .../debugger/qv8debugservice_p.h | 6 +- .../debugger/qv8profilerservice.cpp | 16 +- .../debugger/qv8profilerservice_p.h | 8 +- .../declarative.pro => qml/qml.pro} | 15 +- src/{declarative => qml}/qml/ftw/ftw.pri | 14 +- .../qml/ftw/qbitfield_p.h | 2 +- .../qml/ftw/qdeletewatcher_p.h | 2 +- .../qml/ftw/qfastmetabuilder.cpp | 2 +- .../qml/ftw/qfastmetabuilder_p.h | 2 +- .../qml/ftw/qfieldlist_p.h | 2 +- .../qml/ftw/qfinitestack_p.h | 2 +- .../qml/ftw/qflagpointer_p.h | 2 +- .../qml/ftw/qhashedstring.cpp | 2 +- .../qml/ftw/qhashedstring_p.h | 2 +- .../qml/ftw/qhashfield_p.h | 2 +- .../qml/ftw/qintrusivelist.cpp | 2 +- .../qml/ftw/qintrusivelist_p.h | 2 +- .../qml/ftw/qlazilyallocated_p.h | 2 +- .../qml/ftw/qpodvector_p.h | 2 +- .../qml/ftw/qpointervaluepair_p.h | 2 +- .../qml/ftw/qqmlpool.cpp} | 12 +- .../qml/ftw/qqmlpool_p.h} | 60 +- .../qml/ftw/qqmlrefcount_p.h} | 54 +- .../qml/ftw/qqmlthread.cpp} | 76 +- .../qml/ftw/qqmlthread_p.h} | 70 +- .../qml/ftw/qqmltrace.cpp} | 52 +- .../qml/ftw/qqmltrace_p.h} | 78 +- .../qml/ftw/qrecursionwatcher_p.h | 2 +- .../qml/ftw/qrecyclepool_p.h | 2 +- src/qml/qml/parser/parser.pri | 19 + .../qml/parser/qqmljs.g} | 46 +- .../qml/parser/qqmljsast.cpp} | 10 +- .../qml/parser/qqmljsast_p.h} | 196 +-- .../qml/parser/qqmljsastfwd_p.h} | 10 +- .../qml/parser/qqmljsastvisitor.cpp} | 8 +- .../qml/parser/qqmljsastvisitor_p.h} | 16 +- .../qml/parser/qqmljsengine_p.cpp} | 14 +- .../qml/parser/qqmljsengine_p.h} | 18 +- .../qml/parser/qqmljsglobal_p.h} | 10 +- .../qml/parser/qqmljsgrammar.cpp} | 18 +- .../qml/parser/qqmljsgrammar_p.h} | 8 +- .../qml/parser/qqmljskeywords_p.h} | 8 +- .../qml/parser/qqmljslexer.cpp} | 32 +- .../qml/parser/qqmljslexer_p.h} | 16 +- .../qml/parser/qqmljsmemorypool_p.h} | 12 +- .../qml/parser/qqmljsparser.cpp} | 26 +- .../qml/parser/qqmljsparser_p.h} | 22 +- .../qml/qlistmodelinterface.cpp | 4 +- .../qml/qlistmodelinterface_p.h | 6 +- src/qml/qml/qml.pri | 125 ++ src/qml/qml/qqml.h | 451 +++++++ .../qml/qqmlaccessors.cpp} | 34 +- .../qml/qqmlaccessors_p.h} | 45 +- .../qml/qqmlbinding.cpp} | 220 ++-- .../qml/qqmlbinding_p.h} | 124 +- .../qml/qqmlbinding_p_p.h} | 26 +- .../qml/qqmlboundsignal.cpp} | 104 +- .../qml/qqmlboundsignal_p.h} | 36 +- .../qml/qqmlcleanup.cpp} | 38 +- .../qml/qqmlcleanup_p.h} | 30 +- .../qml/qqmlcompileddata.cpp} | 76 +- .../qml/qqmlcompiler.cpp} | 612 ++++----- src/qml/qml/qqmlcompiler_p.h | 466 +++++++ .../qml/qqmlcomponent.cpp} | 419 ++++--- .../qml/qqmlcomponent.h} | 80 +- .../qml/qqmlcomponent_p.h} | 62 +- .../qml/qqmlcomponentattached_p.h} | 26 +- .../qml/qqmlcontext.cpp} | 274 ++--- .../qml/qqmlcontext.h} | 60 +- .../qml/qqmlcontext_p.h} | 178 +-- .../qml/qqmlcustomparser.cpp} | 102 +- .../qml/qqmlcustomparser_p.h} | 94 +- .../qml/qqmlcustomparser_p_p.h} | 28 +- .../qml/qqmldata_p.h} | 76 +- .../qml/qqmldirparser.cpp} | 54 +- .../qml/qqmldirparser_p.h} | 26 +- .../qml/qqmlengine.cpp} | 650 +++++----- .../qml/qqmlengine.h} | 64 +- .../qml/qqmlengine_p.h} | 276 ++--- .../qml/qqmlerror.cpp} | 62 +- .../qml/qqmlerror.h} | 26 +- .../qml/qqmlexpression.cpp} | 342 +++--- .../qml/qqmlexpression.h} | 66 +- .../qml/qqmlexpression_p.h} | 194 +-- .../qml/qqmlextensioninterface.h} | 30 +- .../qml/qqmlextensionplugin.cpp} | 24 +- .../qml/qqmlextensionplugin.h} | 28 +- .../qml/qqmlglobal_p.h} | 18 +- .../qml/qqmlguard_p.h} | 74 +- .../qml/qqmlimageprovider.cpp} | 56 +- .../qml/qqmlimageprovider.h} | 27 +- .../qml/qqmlimport.cpp} | 366 +++--- .../qml/qqmlimport_p.h} | 78 +- .../qml/qqmlincubator.cpp} | 250 ++-- .../qml/qqmlincubator.h} | 52 +- .../qml/qqmlincubator_p.h} | 52 +- .../qml/qqmlinfo.cpp} | 62 +- src/qml/qml/qqmlinfo.h | 103 ++ .../qml/qqmlinstruction.cpp} | 148 +-- .../qml/qqmlinstruction_p.h} | 36 +- .../qml/qqmlintegercache.cpp} | 16 +- .../qml/qqmlintegercache_p.h} | 24 +- .../qml/qqmllist.cpp} | 142 +-- .../qdeclarativelist.h => qml/qml/qqmllist.h} | 62 +- .../qml/qqmllist_p.h} | 24 +- .../qml/qqmllocale.cpp} | 42 +- .../qml/qqmllocale_p.h} | 18 +- .../qml/qqmlmetatype.cpp} | 388 +++--- .../qml/qqmlmetatype_p.h} | 118 +- .../qml/qqmlnetworkaccessmanagerfactory.cpp} | 16 +- .../qml/qqmlnetworkaccessmanagerfactory.h} | 13 +- .../qml/qqmlnotifier.cpp} | 18 +- .../qml/qqmlnotifier_p.h} | 84 +- .../qml/qqmlnullablevalue_p_p.h} | 20 +- .../qml/qqmlopenmetaobject.cpp} | 104 +- .../qml/qqmlopenmetaobject_p.h} | 46 +- .../qml/qqmlparserstatus.cpp} | 28 +- .../qml/qqmlparserstatus.h} | 27 +- .../qml/qqmlprivate.h} | 48 +- .../qml/qqmlproperty.cpp} | 548 ++++----- .../qml/qqmlproperty.h} | 55 +- .../qml/qqmlproperty_p.h} | 110 +- .../qml/qqmlpropertycache.cpp} | 296 ++--- .../qml/qqmlpropertycache_p.h} | 178 +-- .../qml/qqmlpropertyvalueinterceptor.cpp} | 20 +- .../qml/qqmlpropertyvalueinterceptor_p.h} | 21 +- .../qml/qqmlpropertyvaluesource.cpp} | 18 +- src/qml/qml/qqmlpropertyvaluesource.h | 67 + .../qml/qqmlproxymetaobject.cpp} | 14 +- .../qml/qqmlproxymetaobject_p.h} | 16 +- .../qml/qqmlrewrite.cpp} | 22 +- .../qml/qqmlrewrite_p.h} | 24 +- .../qml/qqmlscript.cpp} | 394 +++--- .../qml/qqmlscript_p.h} | 104 +- .../qml/qqmlscriptstring.cpp} | 42 +- .../qml/qqmlscriptstring.h} | 35 +- .../qml/qqmlscriptstring_p.h} | 16 +- .../qml/qqmlstringconverters.cpp} | 26 +- .../qml/qqmlstringconverters_p.h} | 34 +- .../qml/qqmltypeloader.cpp} | 618 +++++----- .../qml/qqmltypeloader_p.h} | 246 ++-- .../qml/qqmltypenamecache.cpp} | 22 +- .../qml/qqmltypenamecache_p.h} | 64 +- .../qml/qqmltypenotavailable.cpp} | 8 +- .../qml/qqmltypenotavailable_p.h} | 16 +- .../qml/qqmlvaluetype.cpp} | 310 ++--- .../qml/qqmlvaluetype_p.h} | 122 +- .../qml/qqmlvme.cpp} | 340 ++--- .../qml/qqmlvme_p.h} | 106 +- .../qml/qqmlvmemetaobject.cpp} | 260 ++-- .../qml/qqmlvmemetaobject_p.h} | 58 +- .../qml/qqmlwatcher.cpp} | 82 +- .../qml/qqmlwatcher_p.h} | 22 +- .../qml/qqmlxmlhttprequest.cpp} | 264 ++-- .../qml/qqmlxmlhttprequest_p.h} | 10 +- .../qml/qquickapplication.cpp} | 28 +- .../qml/qquickapplication_p.h} | 26 +- .../qml/qquicklistmodel.cpp} | 248 ++-- .../qml/qquicklistmodel_p.h} | 60 +- .../qml/qquicklistmodel_p_p.h} | 46 +- .../qml/qquicklistmodelworkeragent.cpp} | 64 +- .../qml/qquicklistmodelworkeragent_p.h} | 44 +- .../qml/qquickworkerscript.cpp} | 162 +-- .../qml/qquickworkerscript_p.h} | 50 +- .../qml/rewriter/rewriter.pri | 0 .../qml/rewriter/textwriter.cpp | 4 +- .../qml/rewriter/textwriter_p.h | 8 +- .../qml/v4/qv4bindings.cpp | 86 +- .../qml/v4/qv4bindings_p.h | 40 +- .../qml/v4/qv4compiler.cpp | 35 +- .../qml/v4/qv4compiler_p.h | 28 +- .../qml/v4/qv4compiler_p_p.h | 90 +- .../qml/v4/qv4instruction.cpp | 6 +- .../qml/v4/qv4instruction_p.h | 10 +- src/{declarative => qml}/qml/v4/qv4ir.cpp | 50 +- src/{declarative => qml}/qml/v4/qv4ir_p.h | 78 +- .../qml/v4/qv4irbuilder.cpp | 45 +- src/qml/qml/v4/qv4irbuilder_p.h | 240 ++++ .../qml/v4/qv4program_p.h | 4 +- src/{declarative => qml}/qml/v4/v4.pri | 0 src/{declarative => qml}/qml/v8/notes.txt | 2 +- .../qml/v8/qjsconverter_impl_p.h | 2 +- .../qml/v8/qjsconverter_p.h | 0 src/{declarative => qml}/qml/v8/qjsengine.cpp | 0 src/{declarative => qml}/qml/v8/qjsengine.h | 4 +- src/{declarative => qml}/qml/v8/qjsengine_p.h | 0 src/{declarative => qml}/qml/v8/qjsvalue.cpp | 0 src/{declarative => qml}/qml/v8/qjsvalue.h | 5 +- .../qml/v8/qjsvalue_impl_p.h | 0 src/{declarative => qml}/qml/v8/qjsvalue_p.h | 0 .../qml/v8/qjsvalueiterator.cpp | 0 .../qml/v8/qjsvalueiterator.h | 4 +- .../qml/v8/qjsvalueiterator_impl_p.h | 2 +- .../qml/v8/qjsvalueiterator_p.h | 2 +- .../qml/v8/qqmlbuiltinfunctions.cpp} | 88 +- .../qml/v8/qqmlbuiltinfunctions_p.h} | 10 +- .../qml/v8/qscript_impl_p.h | 0 .../qml/v8/qscriptisolate_p.h | 0 .../qml/v8/qscriptoriginalglobalobject_p.h | 0 .../qml/v8/qscriptshareddata_p.h | 0 .../qml/v8/qscripttools_p.h | 0 src/{declarative => qml}/qml/v8/qv8_p.h | 2 +- .../qml/v8/qv8bindings.cpp | 60 +- .../qml/v8/qv8bindings_p.h | 48 +- .../qml/v8/qv8contextwrapper.cpp | 60 +- .../qml/v8/qv8contextwrapper_p.h | 12 +- src/{declarative => qml}/qml/v8/qv8debug_p.h | 2 +- .../qml/v8/qv8domerrors.cpp | 2 +- .../qml/v8/qv8domerrors_p.h | 2 +- src/{declarative => qml}/qml/v8/qv8engine.cpp | 54 +- .../qml/v8/qv8engine_impl_p.h | 2 +- src/{declarative => qml}/qml/v8/qv8engine_p.h | 78 +- .../qml/v8/qv8include.cpp | 20 +- .../qml/v8/qv8include_p.h | 14 +- .../qml/v8/qv8listwrapper.cpp | 12 +- .../qml/v8/qv8listwrapper_p.h | 6 +- .../qml/v8/qv8profiler_p.h | 2 +- .../qml/v8/qv8qobjectwrapper.cpp | 250 ++-- .../qml/v8/qv8qobjectwrapper_p.h | 20 +- .../qml/v8/qv8sequencewrapper.cpp | 4 +- .../qml/v8/qv8sequencewrapper_p.h | 2 +- .../qml/v8/qv8sequencewrapper_p_p.h | 16 +- .../qml/v8/qv8sqlerrors.cpp | 2 +- .../qml/v8/qv8sqlerrors_p.h | 2 +- .../qml/v8/qv8stringwrapper.cpp | 2 +- .../qml/v8/qv8stringwrapper_p.h | 12 +- .../qml/v8/qv8typewrapper.cpp | 30 +- .../qml/v8/qv8typewrapper_p.h | 10 +- .../qml/v8/qv8valuetypewrapper.cpp | 40 +- .../qml/v8/qv8valuetypewrapper_p.h | 10 +- .../qml/v8/qv8variantresource_p.h | 6 +- .../qml/v8/qv8variantwrapper.cpp | 10 +- .../qml/v8/qv8variantwrapper_p.h | 4 +- src/{declarative => qml}/qml/v8/qv8worker.cpp | 14 +- src/{declarative => qml}/qml/v8/qv8worker_p.h | 2 +- src/{declarative => qml}/qml/v8/script.pri | 0 src/{declarative => qml}/qml/v8/v8.pri | 4 +- src/qml/qtqmlglobal.h | 67 + src/qml/qtqmlglobal_p.h | 60 + .../util/qqmlpropertymap.cpp} | 100 +- .../util/qqmlpropertymap.h} | 20 +- src/qml/util/util.pri | 5 + src/qmldevtools/qmldevtools.pro | 2 +- src/qmltest/qmltest.pro | 2 +- src/qmltest/quicktest.cpp | 18 +- src/qmltest/quicktestevent.cpp | 4 +- src/quick/designer/designersupport.cpp | 16 +- src/quick/designer/designersupport.h | 8 +- .../items/context2d/qquickcanvascontext.cpp | 2 +- .../items/context2d/qquickcanvascontext_p.h | 2 +- .../items/context2d/qquickcanvasitem.cpp | 32 +- .../items/context2d/qquickcanvasitem_p.h | 12 +- .../items/context2d/qquickcanvasitemnode.cpp | 2 +- .../items/context2d/qquickcanvasitemnode_p.h | 2 +- src/quick/items/context2d/qquickcontext2d.cpp | 14 +- src/quick/items/context2d/qquickcontext2d_p.h | 8 +- .../qquickcontext2dcommandbuffer.cpp | 4 +- .../qquickcontext2dcommandbuffer_p.h | 4 +- .../context2d/qquickcontext2dtexture.cpp | 2 +- .../context2d/qquickcontext2dtexture_p.h | 2 +- .../items/context2d/qquickcontext2dtile.cpp | 2 +- .../items/context2d/qquickcontext2dtile_p.h | 2 +- src/quick/items/items.pri | 6 +- src/quick/items/qquickaccessibleattached.cpp | 2 +- src/quick/items/qquickaccessibleattached_p.h | 2 +- src/quick/items/qquickanchors.cpp | 4 +- src/quick/items/qquickanchors_p.h | 4 +- src/quick/items/qquickanchors_p_p.h | 2 +- src/quick/items/qquickanimatedimage.cpp | 12 +- src/quick/items/qquickanimatedimage_p.h | 2 +- src/quick/items/qquickanimatedimage_p_p.h | 2 +- src/quick/items/qquickborderimage.cpp | 29 +- src/quick/items/qquickborderimage_p.h | 2 +- src/quick/items/qquickborderimage_p_p.h | 4 +- src/quick/items/qquickcanvas.cpp | 20 +- src/quick/items/qquickcanvas.h | 8 +- src/quick/items/qquickcanvas_p.h | 6 +- src/quick/items/qquickclipnode.cpp | 2 +- src/quick/items/qquickclipnode_p.h | 2 +- src/quick/items/qquickdrag.cpp | 12 +- src/quick/items/qquickdrag_p.h | 10 +- src/quick/items/qquickdroparea.cpp | 10 +- src/quick/items/qquickdroparea_p.h | 6 +- src/quick/items/qquickevents.cpp | 2 +- src/quick/items/qquickevents_p_p.h | 4 +- src/quick/items/qquickflickable.cpp | 38 +- src/quick/items/qquickflickable_p.h | 10 +- src/quick/items/qquickflickable_p_p.h | 28 +- src/quick/items/qquickflipable.cpp | 14 +- src/quick/items/qquickflipable_p.h | 2 +- src/quick/items/qquickfocusscope.cpp | 2 +- src/quick/items/qquickfocusscope_p.h | 2 +- src/quick/items/qquickgridview.cpp | 34 +- src/quick/items/qquickgridview_p.h | 6 +- src/quick/items/qquickimage.cpp | 8 +- src/quick/items/qquickimage_p.h | 2 +- src/quick/items/qquickimage_p_p.h | 2 +- src/quick/items/qquickimagebase.cpp | 10 +- src/quick/items/qquickimagebase_p.h | 2 +- src/quick/items/qquickimagebase_p_p.h | 6 +- src/quick/items/qquickimplicitsizeitem.cpp | 2 +- src/quick/items/qquickimplicitsizeitem_p.h | 2 +- src/quick/items/qquickimplicitsizeitem_p_p.h | 2 +- src/quick/items/qquickitem.cpp | 115 +- src/quick/items/qquickitem.h | 36 +- src/quick/items/qquickitem_p.h | 86 +- ...kanimation.cpp => qquickitemanimation.cpp} | 82 +- ...kanimation_p.h => qquickitemanimation_p.h} | 40 +- ...mation_p_p.h => qquickitemanimation_p_p.h} | 36 +- src/quick/items/qquickitemchangelistener_p.h | 2 +- src/quick/items/qquickitemsmodule.cpp | 50 +- src/quick/items/qquickitemsmodule_p.h | 4 +- src/quick/items/qquickitemview.cpp | 118 +- src/quick/items/qquickitemview_p.h | 78 +- src/quick/items/qquickitemview_p_p.h | 56 +- src/quick/items/qquicklistview.cpp | 60 +- src/quick/items/qquicklistview_p.h | 14 +- src/quick/items/qquickloader.cpp | 78 +- src/quick/items/qquickloader_p.h | 10 +- src/quick/items/qquickloader_p_p.h | 20 +- src/quick/items/qquickmousearea.cpp | 14 +- src/quick/items/qquickmousearea_p.h | 4 +- src/quick/items/qquickmousearea_p_p.h | 4 +- src/quick/items/qquickmultipointtoucharea.cpp | 4 +- src/quick/items/qquickmultipointtoucharea_p.h | 20 +- src/quick/items/qquickninepatchnode.cpp | 2 +- src/quick/items/qquickninepatchnode_p.h | 2 +- src/quick/items/qquickpainteditem.cpp | 2 +- src/quick/items/qquickpainteditem.h | 2 +- src/quick/items/qquickpainteditem_p.h | 2 +- src/quick/items/qquickpathview.cpp | 69 +- src/quick/items/qquickpathview_p.h | 30 +- src/quick/items/qquickpathview_p_p.h | 30 +- src/quick/items/qquickpositioners.cpp | 62 +- src/quick/items/qquickpositioners_p.h | 16 +- src/quick/items/qquickpositioners_p_p.h | 20 +- src/quick/items/qquickrectangle.cpp | 16 +- src/quick/items/qquickrectangle_p.h | 6 +- src/quick/items/qquickrectangle_p_p.h | 2 +- src/quick/items/qquickrepeater.cpp | 40 +- src/quick/items/qquickrepeater_p.h | 12 +- src/quick/items/qquickrepeater_p_p.h | 4 +- src/quick/items/qquickscalegrid.cpp | 4 +- src/quick/items/qquickscalegrid_p_p.h | 6 +- src/quick/items/qquickscreen.cpp | 2 +- src/quick/items/qquickscreen_p.h | 6 +- src/quick/items/qquickshadereffect.cpp | 2 +- src/quick/items/qquickshadereffect_p.h | 2 +- src/quick/items/qquickshadereffectmesh.cpp | 2 +- src/quick/items/qquickshadereffectmesh_p.h | 4 +- src/quick/items/qquickshadereffectnode.cpp | 2 +- src/quick/items/qquickshadereffectnode_p.h | 2 +- src/quick/items/qquickshadereffectsource.cpp | 2 +- src/quick/items/qquickshadereffectsource_p.h | 2 +- src/quick/items/qquicksprite.cpp | 2 +- src/quick/items/qquicksprite_p.h | 6 +- src/quick/items/qquickspriteengine.cpp | 30 +- src/quick/items/qquickspriteengine_p.h | 36 +- src/quick/items/qquickspriteimage.cpp | 10 +- src/quick/items/qquickspriteimage_p.h | 4 +- src/quick/items/qquickstateoperations.cpp | 358 +++--- src/quick/items/qquickstateoperations_p.h | 98 +- src/quick/items/qquicktext.cpp | 59 +- src/quick/items/qquicktext_p.h | 2 +- src/quick/items/qquicktext_p_p.h | 16 +- src/quick/items/qquicktextedit.cpp | 24 +- src/quick/items/qquicktextedit_p.h | 8 +- src/quick/items/qquicktextedit_p_p.h | 6 +- src/quick/items/qquicktextinput.cpp | 20 +- src/quick/items/qquicktextinput_p.h | 10 +- src/quick/items/qquicktextinput_p_p.h | 8 +- src/quick/items/qquicktextnode.cpp | 4 +- src/quick/items/qquicktextnode_p.h | 2 +- src/quick/items/qquicktranslate.cpp | 2 +- src/quick/items/qquicktranslate_p.h | 2 +- src/quick/items/qquickview.cpp | 62 +- src/quick/items/qquickview.h | 16 +- src/quick/items/qquickview_p.h | 14 +- src/quick/items/qquickvisualadaptormodel.cpp | 38 +- src/quick/items/qquickvisualadaptormodel_p.h | 6 +- src/quick/items/qquickvisualdatamodel.cpp | 168 +-- src/quick/items/qquickvisualdatamodel_p.h | 54 +- src/quick/items/qquickvisualdatamodel_p_p.h | 98 +- src/quick/items/qquickvisualitemmodel.cpp | 28 +- src/quick/items/qquickvisualitemmodel_p.h | 12 +- src/quick/items/qquickwindowmanager.cpp | 4 +- src/quick/items/qquickwindowmanager_p.h | 2 +- src/quick/items/qquickwindowmodule_p.h | 2 +- src/quick/items/syncexcludes | 4 +- .../particles/qquickcumulativedirection.cpp | 4 +- .../particles/qquickcumulativedirection_p.h | 6 +- src/quick/particles/qquickcustomaffector.cpp | 14 +- src/quick/particles/qquickcustomaffector_p.h | 2 +- src/quick/particles/qquickcustomparticle.cpp | 2 +- src/quick/particles/qquickcustomparticle_p.h | 2 +- src/quick/particles/qquickimageparticle.cpp | 8 +- src/quick/particles/qquickimageparticle_p.h | 10 +- src/quick/particles/qquickitemparticle.cpp | 2 +- src/quick/particles/qquickitemparticle_p.h | 12 +- src/quick/particles/qquickmaskextruder.cpp | 4 +- src/quick/particles/qquickmaskextruder_p.h | 4 +- src/quick/particles/qquickparticleemitter.cpp | 8 +- src/quick/particles/qquickparticleemitter_p.h | 2 +- src/quick/particles/qquickparticlegroup.cpp | 8 +- src/quick/particles/qquickparticlegroup_p.h | 10 +- src/quick/particles/qquickparticlesmodule_p.h | 2 +- src/quick/particles/qquickparticlesystem.cpp | 9 +- src/quick/particles/qquickparticlesystem_p.h | 8 +- src/quick/particles/qquickspritegoal_p.h | 2 +- src/quick/particles/qquicktrailemitter.cpp | 10 +- src/quick/particles/qquicktrailemitter_p.h | 2 +- src/quick/particles/qquickturbulence_p.h | 2 +- src/quick/particles/qquickv8particledata.cpp | 4 +- src/quick/particles/qquickv8particledata_p.h | 2 +- src/quick/qtquick2.cpp | 86 +- src/quick/qtquick2_p.h | 4 +- src/quick/qtquickglobal.h | 2 +- src/quick/qtquickglobal_p.h | 2 +- src/quick/quick.pro | 12 +- .../scenegraph/coreapi/qsgdefaultrenderer.cpp | 2 +- .../scenegraph/coreapi/qsgdefaultrenderer_p.h | 2 +- src/quick/scenegraph/coreapi/qsggeometry_p.h | 2 +- src/quick/scenegraph/coreapi/qsgmaterial.cpp | 2 +- src/quick/scenegraph/coreapi/qsgmaterial.h | 2 +- src/quick/scenegraph/coreapi/qsgnode.cpp | 2 +- src/quick/scenegraph/coreapi/qsgnode.h | 2 +- .../scenegraph/coreapi/qsgnodeupdater.cpp | 2 +- .../scenegraph/coreapi/qsgnodeupdater_p.h | 2 +- src/quick/scenegraph/coreapi/qsgrenderer.cpp | 2 +- src/quick/scenegraph/coreapi/qsgrenderer_p.h | 2 +- src/quick/scenegraph/qsgadaptationlayer.cpp | 2 +- src/quick/scenegraph/qsgadaptationlayer_p.h | 2 +- src/quick/scenegraph/qsgcontext.cpp | 16 +- src/quick/scenegraph/qsgcontext_p.h | 8 +- src/quick/scenegraph/qsgcontextplugin.cpp | 6 +- src/quick/scenegraph/qsgcontextplugin_p.h | 8 +- .../qsgdefaultdistancefieldglyphcache.cpp | 2 +- .../qsgdefaultdistancefieldglyphcache_p.h | 2 +- src/quick/scenegraph/qsgdefaultglyphnode.cpp | 2 +- .../scenegraph/qsgdefaultglyphnode_p.cpp | 2 +- src/quick/scenegraph/qsgdefaultglyphnode_p.h | 2 +- .../scenegraph/qsgdefaultglyphnode_p_p.h | 2 +- src/quick/scenegraph/qsgdefaultimagenode.cpp | 2 +- src/quick/scenegraph/qsgdefaultimagenode_p.h | 2 +- .../scenegraph/qsgdefaultrectanglenode.cpp | 2 +- .../scenegraph/qsgdefaultrectanglenode_p.h | 2 +- .../scenegraph/qsgdistancefieldglyphnode.cpp | 2 +- .../qsgdistancefieldglyphnode_p.cpp | 2 +- .../scenegraph/qsgdistancefieldglyphnode_p.h | 2 +- .../qsgdistancefieldglyphnode_p_p.h | 2 +- src/quick/scenegraph/qsgflashnode.cpp | 2 +- src/quick/scenegraph/qsgflashnode_p.h | 2 +- src/quick/scenegraph/qsgpathsimplifier.cpp | 2 +- src/quick/scenegraph/qsgpathsimplifier_p.h | 2 +- .../qsgshareddistancefieldglyphcache.cpp | 2 +- .../qsgshareddistancefieldglyphcache_p.h | 2 +- .../scenegraph/util/qsgareaallocator.cpp | 2 +- .../scenegraph/util/qsgareaallocator_p.h | 2 +- .../scenegraph/util/qsgdistancefieldutil.cpp | 2 +- .../scenegraph/util/qsgdistancefieldutil_p.h | 2 +- src/quick/scenegraph/util/qsgengine.cpp | 2 +- src/quick/scenegraph/util/qsgengine.h | 2 +- .../scenegraph/util/qsgflatcolormaterial.cpp | 2 +- .../scenegraph/util/qsgflatcolormaterial.h | 2 +- src/quick/scenegraph/util/qsgpainternode.cpp | 2 +- src/quick/scenegraph/util/qsgpainternode_p.h | 2 +- src/quick/scenegraph/util/qsgsimplematerial.h | 2 +- .../scenegraph/util/qsgsimplerectnode.cpp | 2 +- src/quick/scenegraph/util/qsgsimplerectnode.h | 2 +- .../scenegraph/util/qsgsimpletexturenode.cpp | 2 +- .../scenegraph/util/qsgsimpletexturenode.h | 2 +- src/quick/scenegraph/util/qsgtexture.cpp | 5 +- src/quick/scenegraph/util/qsgtexture.h | 2 +- src/quick/scenegraph/util/qsgtexture_p.h | 2 +- .../scenegraph/util/qsgtexturematerial.cpp | 2 +- .../scenegraph/util/qsgtexturematerial.h | 2 +- .../scenegraph/util/qsgtexturematerial_p.h | 2 +- .../scenegraph/util/qsgtextureprovider.cpp | 2 +- .../scenegraph/util/qsgtextureprovider.h | 2 +- .../util/qsgvertexcolormaterial.cpp | 2 +- .../scenegraph/util/qsgvertexcolormaterial.h | 2 +- src/quick/util/qdeclarativeutilmodule.cpp | 103 -- ...ativeanimation.cpp => qquickanimation.cpp} | 716 +++++------ ...ativeanimation_p.h => qquickanimation_p.h} | 234 ++-- ...eanimation_p_p.h => qquickanimation_p_p.h} | 124 +- ...ller.cpp => qquickanimationcontroller.cpp} | 68 +- ...ller_p.h => qquickanimationcontroller_p.h} | 32 +- ...arativebehavior.cpp => qquickbehavior.cpp} | 86 +- ...arativebehavior_p.h => qquickbehavior_p.h} | 36 +- .../{qdeclarativebind.cpp => qquickbind.cpp} | 108 +- .../{qdeclarativebind_p.h => qquickbind_p.h} | 26 +- ...ativechangeset.cpp => qquickchangeset.cpp} | 52 +- ...ativechangeset_p.h => qquickchangeset_p.h} | 30 +- ...econnections.cpp => qquickconnections.cpp} | 100 +- ...econnections_p.h => qquickconnections_p.h} | 32 +- ...ivefontloader.cpp => qquickfontloader.cpp} | 94 +- ...ivefontloader_p.h => qquickfontloader_p.h} | 24 +- ...istaccessor.cpp => qquicklistaccessor.cpp} | 34 +- ...istaccessor_p.h => qquicklistaccessor_p.h} | 18 +- ...ompositor.cpp => qquicklistcompositor.cpp} | 276 ++--- ...ompositor_p.h => qquicklistcompositor_p.h} | 58 +- ...clarativepackage.cpp => qquickpackage.cpp} | 72 +- ...clarativepackage_p.h => qquickpackage_p.h} | 40 +- .../{qdeclarativepath.cpp => qquickpath.cpp} | 330 ++--- .../{qdeclarativepath_p.h => qquickpath_p.h} | 146 +-- ...declarativepath_p_p.h => qquickpath_p_p.h} | 28 +- ...polator.cpp => qquickpathinterpolator.cpp} | 26 +- ...polator_p.h => qquickpathinterpolator_p.h} | 26 +- ...epixmapcache.cpp => qquickpixmapcache.cpp} | 486 ++++---- ...epixmapcache_p.h => qquickpixmapcache_p.h} | 50 +- ...ychanges.cpp => qquickpropertychanges.cpp} | 312 ++--- ...ychanges_p.h => qquickpropertychanges_p.h} | 34 +- ...mation.cpp => qquicksmoothedanimation.cpp} | 110 +- ...mation_p.h => qquicksmoothedanimation_p.h} | 30 +- ...on_p_p.h => qquicksmoothedanimation_p_p.h} | 34 +- ...nimation.cpp => qquickspringanimation.cpp} | 108 +- ...nimation_p.h => qquickspringanimation_p.h} | 30 +- ...{qdeclarativestate.cpp => qquickstate.cpp} | 294 ++--- ...{qdeclarativestate_p.h => qquickstate_p.h} | 120 +- ...clarativestate_p_p.h => qquickstate_p_p.h} | 108 +- ...ations.cpp => qquickstatechangescript.cpp} | 67 +- ...ations_p.h => qquickstatechangescript_p.h} | 30 +- ...ivestategroup.cpp => qquickstategroup.cpp} | 176 +-- ...ivestategroup_p.h => qquickstategroup_p.h} | 42 +- ...ivestyledtext.cpp => qquickstyledtext.cpp} | 102 +- ...ivestyledtext_p.h => qquickstyledtext_p.h} | 40 +- ...ativesvgparser.cpp => qquicksvgparser.cpp} | 6 +- ...ativesvgparser_p.h => qquicksvgparser_p.h} | 8 +- ...tempalette.cpp => qquicksystempalette.cpp} | 90 +- ...tempalette_p.h => qquicksystempalette_p.h} | 28 +- ...arativetimeline.cpp => qquicktimeline.cpp} | 232 ++-- ...ivetimeline_p_p.h => qquicktimeline_p_p.h} | 106 +- ...{qdeclarativetimer.cpp => qquicktimer.cpp} | 78 +- ...{qdeclarativetimer_p.h => qquicktimer_p.h} | 20 +- ...ivetransition.cpp => qquicktransition.cpp} | 146 +-- ...ivetransition_p.h => qquicktransition_p.h} | 48 +- ...anager.cpp => qquicktransitionmanager.cpp} | 98 +- ...er_p_p.h => qquicktransitionmanager_p_p.h} | 32 +- src/quick/util/qquickutilmodule.cpp | 103 ++ ...iveutilmodule_p.h => qquickutilmodule_p.h} | 12 +- src/quick/util/util.pri | 116 +- src/src.pro | 2 +- sync.profile | 8 +- tests/auto/auto.pro | 4 +- tests/auto/compilerwarnings/data/test_cpp.txt | 2 +- .../tst_qdeclarativedebugservice.cpp | 216 ---- .../qdeclarativeinspector.pro | 3 - tests/auto/declarative/declarative.pro | 55 - .../qdeclarativechangeset.pro | 9 - .../qdeclarativeconnection.pro | 15 - .../qdeclarativecpputils.pro | 9 - .../qdeclarativeengine/qdeclarativeengine.pro | 9 - .../qdeclarativeexpression.pro | 15 - .../qdeclarativefolderlistmodel.pro | 14 - .../qdeclarativeimageprovider.pro | 9 - .../qdeclarativeinstruction.pro | 8 - .../qdeclarativelistcompositor.pro | 9 - .../qdeclarativelistmodel.pro | 15 - .../qdeclarativelistreference.pro | 15 - .../qdeclarativemetatype.pro | 7 - .../tst_qdeclarativemetatype.cpp | 202 --- .../qdeclarativeproperty.pro | 15 - .../qdeclarativepropertycache.pro | 8 - .../qdeclarativepropertymap.pro | 9 - .../qdeclarativeqt/qdeclarativeqt.pro | 15 - .../qdeclarativesqldatabase.pro | 15 - .../qdeclarativeworkerscript.pro | 15 - tests/auto/headersclean/headersclean.pro | 2 +- tests/auto/headersclean/tst_headersclean.cpp | 2 +- tests/auto/particles/qquickage/qquickage.pro | 2 +- .../qquickangleddirection.pro | 2 +- .../qquickcumulativedirection.pro | 2 +- .../qquickcustomaffector.pro | 2 +- .../qquickcustomparticle.pro | 2 +- .../qquickellipseextruder.pro | 2 +- .../qquickfriction/qquickfriction.pro | 2 +- .../particles/qquickgravity/qquickgravity.pro | 2 +- .../qquickgroupgoal/qquickgroupgoal.pro | 2 +- .../qquickimageparticle.pro | 2 +- .../qquickitemparticle/qquickitemparticle.pro | 2 +- .../qquicklineextruder/qquicklineextruder.pro | 2 +- .../qquickmaskextruder/qquickmaskextruder.pro | 2 +- .../qquickparticlegroup.pro | 2 +- .../qquickparticlesystem.pro | 2 +- .../qquickpointattractor.pro | 2 +- .../qquickpointdirection.pro | 2 +- .../qquickrectangleextruder.pro | 2 +- .../qquickspritegoal/qquickspritegoal.pro | 2 +- .../qquicktargetdirection.pro | 2 +- .../qquicktrailemitter/qquicktrailemitter.pro | 2 +- .../qquickturbulence/qquickturbulence.pro | 2 +- .../particles/qquickwander/qquickwander.pro | 2 +- .../animation/animation.pro | 0 .../qabstractanimationjob.pro | 2 +- .../tst_qabstractanimationjob.cpp | 4 +- .../qanimationgroupjob/qanimationgroupjob.pro | 2 +- .../tst_qanimationgroupjob.cpp | 6 +- .../qparallelanimationgroupjob.pro | 2 +- .../tst_qparallelanimationgroupjob.cpp | 2 +- .../qpauseanimationjob/qpauseanimationjob.pro | 2 +- .../tst_qpauseanimationjob.cpp | 6 +- .../qsequentialanimationgroupjob.pro | 2 +- .../tst_qsequentialanimationgroupjob.cpp | 6 +- .../debugger/debugger.pro | 12 +- .../qdebugmessageservice/data/test.qml | 0 .../qdebugmessageservice.pro | 2 +- .../tst_qdebugmessageservice.cpp | 42 +- .../qpacketprotocol/qpacketprotocol.pro | 2 +- .../qpacketprotocol/tst_qpacketprotocol.cpp | 10 +- .../qqmldebugclient/qqmldebugclient.pro} | 6 +- .../qqmldebugclient/tst_qqmldebugclient.cpp} | 88 +- .../data/breakpointRelocation.qml | 0 .../qqmldebugjs}/data/changeBreakpoint.qml | 0 .../debugger/qqmldebugjs}/data/condition.qml | 0 .../qqmldebugjs}/data/createComponent.qml | 0 .../debugger/qqmldebugjs}/data/exception.qml | 0 .../debugger/qqmldebugjs}/data/loadjsfile.qml | 0 .../qqmldebugjs}/data/oncompleted.qml | 0 .../debugger/qqmldebugjs}/data/stepAction.qml | 0 .../debugger/qqmldebugjs}/data/test.js | 0 .../debugger/qqmldebugjs}/data/test.qml | 0 .../debugger/qqmldebugjs}/data/timer.qml | 0 .../debugger/qqmldebugjs/qqmldebugjs.pro} | 6 +- .../debugger/qqmldebugjs/tst_qqmldebugjs.cpp} | 242 ++-- .../qqmldebugservice/qqmldebugservice.pro} | 6 +- .../qqmldebugservice/tst_qqmldebugservice.cpp | 216 ++++ .../qqmlenginedebug/qqmlenginedebug.pro} | 6 +- .../qqmlenginedebug/tst_qqmlenginedebug.cpp} | 468 +++---- .../debugger/qqmlinspector}/app/app.pro | 2 +- .../debugger/qqmlinspector}/app/main.cpp | 0 .../debugger/qqmlinspector}/app/qtquick2.qml | 0 .../debugger/qqmlinspector/qqmlinspector.pro | 3 + .../qqmlinspector/tst_qqmlinspector.cpp} | 52 +- .../qqmlinspector/tst_qqmlinspector.pro} | 6 +- .../qqmlprofilerservice}/data/exit.qml | 0 .../qqmlprofilerservice}/data/test.qml | 0 .../qqmlprofilerservice.pro} | 6 +- .../tst_qqmlprofilerservice.cpp} | 128 +- .../qv8profilerservice/data/console.qml | 0 .../debugger/qv8profilerservice/data/exit.qml | 0 .../debugger/qv8profilerservice/data/test.qml | 0 .../qv8profilerservice/qv8profilerservice.pro | 2 +- .../tst_qv8profilerservice.cpp | 46 +- .../debugger/shared/debugutil.cpp | 46 +- .../debugger/shared/debugutil_p.h | 22 +- .../parserstress/parserstress.pro | 2 +- .../parserstress/tests/ecma/Array/15.4-1.js | 0 .../parserstress/tests/ecma/Array/15.4-2.js | 0 .../parserstress/tests/ecma/Array/15.4.1.1.js | 0 .../parserstress/tests/ecma/Array/15.4.1.2.js | 0 .../parserstress/tests/ecma/Array/15.4.1.3.js | 0 .../parserstress/tests/ecma/Array/15.4.1.js | 0 .../tests/ecma/Array/15.4.2.1-1.js | 0 .../tests/ecma/Array/15.4.2.1-2.js | 0 .../tests/ecma/Array/15.4.2.1-3.js | 0 .../tests/ecma/Array/15.4.2.2-1.js | 0 .../tests/ecma/Array/15.4.2.2-2.js | 0 .../parserstress/tests/ecma/Array/15.4.2.3.js | 0 .../tests/ecma/Array/15.4.3.1-2.js | 0 .../parserstress/tests/ecma/Array/15.4.3.2.js | 0 .../parserstress/tests/ecma/Array/15.4.4.1.js | 0 .../parserstress/tests/ecma/Array/15.4.4.2.js | 0 .../tests/ecma/Array/15.4.4.3-1.js | 0 .../tests/ecma/Array/15.4.4.4-1.js | 0 .../tests/ecma/Array/15.4.4.4-2.js | 0 .../tests/ecma/Array/15.4.4.5-1.js | 0 .../tests/ecma/Array/15.4.4.5-2.js | 0 .../tests/ecma/Array/15.4.4.5-3.js | 0 .../parserstress/tests/ecma/Array/15.4.4.js | 0 .../tests/ecma/Array/15.4.5.1-1.js | 0 .../tests/ecma/Array/15.4.5.1-2.js | 0 .../tests/ecma/Array/15.4.5.2-1.js | 0 .../tests/ecma/Array/15.4.5.2-2.js | 0 .../parserstress/tests/ecma/Array/browser.js | 0 .../parserstress/tests/ecma/Array/shell.js | 0 .../parserstress/tests/ecma/Boolean/15.6.1.js | 0 .../parserstress/tests/ecma/Boolean/15.6.2.js | 0 .../tests/ecma/Boolean/15.6.3.1-1.js | 0 .../tests/ecma/Boolean/15.6.3.1-2.js | 0 .../tests/ecma/Boolean/15.6.3.1-3.js | 0 .../tests/ecma/Boolean/15.6.3.1-4.js | 0 .../tests/ecma/Boolean/15.6.3.1.js | 0 .../tests/ecma/Boolean/15.6.4-1.js | 0 .../tests/ecma/Boolean/15.6.4.1.js | 0 .../tests/ecma/Boolean/15.6.4.2-1.js | 0 .../tests/ecma/Boolean/15.6.4.2-2.js | 0 .../tests/ecma/Boolean/15.6.4.2-3.js | 0 .../tests/ecma/Boolean/15.6.4.2-4-n.js | 0 .../tests/ecma/Boolean/15.6.4.3-1.js | 0 .../tests/ecma/Boolean/15.6.4.3-2.js | 0 .../tests/ecma/Boolean/15.6.4.3-3.js | 0 .../tests/ecma/Boolean/15.6.4.3-4-n.js | 0 .../tests/ecma/Boolean/15.6.4.3.js | 0 .../parserstress/tests/ecma/Boolean/15.6.4.js | 0 .../tests/ecma/Boolean/browser.js | 0 .../parserstress/tests/ecma/Boolean/shell.js | 0 .../tests/ecma/Date/15.9.1.1-1.js | 0 .../tests/ecma/Date/15.9.1.1-2.js | 0 .../tests/ecma/Date/15.9.1.13-1.js | 0 .../parserstress/tests/ecma/Date/15.9.2.1.js | 0 .../tests/ecma/Date/15.9.2.2-1.js | 0 .../tests/ecma/Date/15.9.2.2-2.js | 0 .../tests/ecma/Date/15.9.2.2-3.js | 0 .../tests/ecma/Date/15.9.2.2-4.js | 0 .../tests/ecma/Date/15.9.2.2-5.js | 0 .../tests/ecma/Date/15.9.2.2-6.js | 0 .../tests/ecma/Date/15.9.3.1-1.js | 0 .../tests/ecma/Date/15.9.3.1-2.js | 0 .../tests/ecma/Date/15.9.3.1-3.js | 0 .../tests/ecma/Date/15.9.3.1-4.js | 0 .../tests/ecma/Date/15.9.3.1-5.js | 0 .../tests/ecma/Date/15.9.3.2-1.js | 0 .../tests/ecma/Date/15.9.3.2-2.js | 0 .../tests/ecma/Date/15.9.3.2-3.js | 0 .../tests/ecma/Date/15.9.3.2-4.js | 0 .../tests/ecma/Date/15.9.3.2-5.js | 0 .../tests/ecma/Date/15.9.3.8-1.js | 0 .../tests/ecma/Date/15.9.3.8-2.js | 0 .../tests/ecma/Date/15.9.3.8-3.js | 0 .../tests/ecma/Date/15.9.3.8-4.js | 0 .../tests/ecma/Date/15.9.3.8-5.js | 0 .../tests/ecma/Date/15.9.4.2-1.js | 0 .../parserstress/tests/ecma/Date/15.9.4.2.js | 0 .../parserstress/tests/ecma/Date/15.9.4.3.js | 0 .../parserstress/tests/ecma/Date/15.9.5.1.js | 0 .../tests/ecma/Date/15.9.5.10-1.js | 0 .../tests/ecma/Date/15.9.5.10-10.js | 0 .../tests/ecma/Date/15.9.5.10-11.js | 0 .../tests/ecma/Date/15.9.5.10-12.js | 0 .../tests/ecma/Date/15.9.5.10-13.js | 0 .../tests/ecma/Date/15.9.5.10-2.js | 0 .../tests/ecma/Date/15.9.5.10-3.js | 0 .../tests/ecma/Date/15.9.5.10-4.js | 0 .../tests/ecma/Date/15.9.5.10-5.js | 0 .../tests/ecma/Date/15.9.5.10-6.js | 0 .../tests/ecma/Date/15.9.5.10-7.js | 0 .../tests/ecma/Date/15.9.5.10-8.js | 0 .../tests/ecma/Date/15.9.5.10-9.js | 0 .../tests/ecma/Date/15.9.5.11-1.js | 0 .../tests/ecma/Date/15.9.5.11-2.js | 0 .../tests/ecma/Date/15.9.5.11-3.js | 0 .../tests/ecma/Date/15.9.5.11-4.js | 0 .../tests/ecma/Date/15.9.5.11-5.js | 0 .../tests/ecma/Date/15.9.5.11-6.js | 0 .../tests/ecma/Date/15.9.5.11-7.js | 0 .../tests/ecma/Date/15.9.5.12-1.js | 0 .../tests/ecma/Date/15.9.5.12-2.js | 0 .../tests/ecma/Date/15.9.5.12-3.js | 0 .../tests/ecma/Date/15.9.5.12-4.js | 0 .../tests/ecma/Date/15.9.5.12-5.js | 0 .../tests/ecma/Date/15.9.5.12-6.js | 0 .../tests/ecma/Date/15.9.5.12-7.js | 0 .../tests/ecma/Date/15.9.5.12-8.js | 0 .../tests/ecma/Date/15.9.5.13-1.js | 0 .../tests/ecma/Date/15.9.5.13-2.js | 0 .../tests/ecma/Date/15.9.5.13-3.js | 0 .../tests/ecma/Date/15.9.5.13-4.js | 0 .../tests/ecma/Date/15.9.5.13-5.js | 0 .../tests/ecma/Date/15.9.5.13-6.js | 0 .../tests/ecma/Date/15.9.5.13-7.js | 0 .../tests/ecma/Date/15.9.5.13-8.js | 0 .../parserstress/tests/ecma/Date/15.9.5.14.js | 0 .../parserstress/tests/ecma/Date/15.9.5.15.js | 0 .../parserstress/tests/ecma/Date/15.9.5.16.js | 0 .../parserstress/tests/ecma/Date/15.9.5.17.js | 0 .../parserstress/tests/ecma/Date/15.9.5.18.js | 0 .../parserstress/tests/ecma/Date/15.9.5.19.js | 0 .../tests/ecma/Date/15.9.5.2-1.js | 0 .../tests/ecma/Date/15.9.5.2-2-n.js | 0 .../parserstress/tests/ecma/Date/15.9.5.2.js | 0 .../parserstress/tests/ecma/Date/15.9.5.20.js | 0 .../tests/ecma/Date/15.9.5.21-1.js | 0 .../tests/ecma/Date/15.9.5.21-2.js | 0 .../tests/ecma/Date/15.9.5.21-3.js | 0 .../tests/ecma/Date/15.9.5.21-4.js | 0 .../tests/ecma/Date/15.9.5.21-5.js | 0 .../tests/ecma/Date/15.9.5.21-6.js | 0 .../tests/ecma/Date/15.9.5.21-7.js | 0 .../tests/ecma/Date/15.9.5.21-8.js | 0 .../tests/ecma/Date/15.9.5.22-1.js | 0 .../tests/ecma/Date/15.9.5.22-2.js | 0 .../tests/ecma/Date/15.9.5.22-3.js | 0 .../tests/ecma/Date/15.9.5.22-4.js | 0 .../tests/ecma/Date/15.9.5.22-5.js | 0 .../tests/ecma/Date/15.9.5.22-6.js | 0 .../tests/ecma/Date/15.9.5.22-7.js | 0 .../tests/ecma/Date/15.9.5.22-8.js | 0 .../tests/ecma/Date/15.9.5.23-1.js | 0 .../tests/ecma/Date/15.9.5.23-10.js | 0 .../tests/ecma/Date/15.9.5.23-11.js | 0 .../tests/ecma/Date/15.9.5.23-12.js | 0 .../tests/ecma/Date/15.9.5.23-13.js | 0 .../tests/ecma/Date/15.9.5.23-14.js | 0 .../tests/ecma/Date/15.9.5.23-15.js | 0 .../tests/ecma/Date/15.9.5.23-16.js | 0 .../tests/ecma/Date/15.9.5.23-17.js | 0 .../tests/ecma/Date/15.9.5.23-18.js | 0 .../tests/ecma/Date/15.9.5.23-2.js | 0 .../tests/ecma/Date/15.9.5.23-3-n.js | 0 .../tests/ecma/Date/15.9.5.23-4.js | 0 .../tests/ecma/Date/15.9.5.23-5.js | 0 .../tests/ecma/Date/15.9.5.23-6.js | 0 .../tests/ecma/Date/15.9.5.23-7.js | 0 .../tests/ecma/Date/15.9.5.23-8.js | 0 .../tests/ecma/Date/15.9.5.23-9.js | 0 .../tests/ecma/Date/15.9.5.24-1.js | 0 .../tests/ecma/Date/15.9.5.24-2.js | 0 .../tests/ecma/Date/15.9.5.24-3.js | 0 .../tests/ecma/Date/15.9.5.24-4.js | 0 .../tests/ecma/Date/15.9.5.24-5.js | 0 .../tests/ecma/Date/15.9.5.24-6.js | 0 .../tests/ecma/Date/15.9.5.24-7.js | 0 .../tests/ecma/Date/15.9.5.24-8.js | 0 .../tests/ecma/Date/15.9.5.25-1.js | 0 .../tests/ecma/Date/15.9.5.26-1.js | 0 .../tests/ecma/Date/15.9.5.27-1.js | 0 .../tests/ecma/Date/15.9.5.28-1.js | 0 .../tests/ecma/Date/15.9.5.29-1.js | 0 .../tests/ecma/Date/15.9.5.3-1-n.js | 0 .../tests/ecma/Date/15.9.5.3-2.js | 0 .../tests/ecma/Date/15.9.5.30-1.js | 0 .../tests/ecma/Date/15.9.5.31-1.js | 0 .../tests/ecma/Date/15.9.5.32-1.js | 0 .../tests/ecma/Date/15.9.5.33-1.js | 0 .../tests/ecma/Date/15.9.5.34-1.js | 0 .../tests/ecma/Date/15.9.5.35-1.js | 0 .../tests/ecma/Date/15.9.5.36-1.js | 0 .../tests/ecma/Date/15.9.5.36-2.js | 0 .../tests/ecma/Date/15.9.5.36-3.js | 0 .../tests/ecma/Date/15.9.5.36-4.js | 0 .../tests/ecma/Date/15.9.5.36-5.js | 0 .../tests/ecma/Date/15.9.5.36-6.js | 0 .../tests/ecma/Date/15.9.5.36-7.js | 0 .../tests/ecma/Date/15.9.5.37-1.js | 0 .../tests/ecma/Date/15.9.5.37-2.js | 0 .../tests/ecma/Date/15.9.5.37-3.js | 0 .../tests/ecma/Date/15.9.5.37-4.js | 0 .../tests/ecma/Date/15.9.5.37-5.js | 0 .../tests/ecma/Date/15.9.5.4-1.js | 0 .../tests/ecma/Date/15.9.5.4-2-n.js | 0 .../parserstress/tests/ecma/Date/15.9.5.5.js | 0 .../parserstress/tests/ecma/Date/15.9.5.6.js | 0 .../parserstress/tests/ecma/Date/15.9.5.7.js | 0 .../parserstress/tests/ecma/Date/15.9.5.8.js | 0 .../parserstress/tests/ecma/Date/15.9.5.9.js | 0 .../parserstress/tests/ecma/Date/15.9.5.js | 0 .../parserstress/tests/ecma/Date/browser.js | 0 .../parserstress/tests/ecma/Date/shell.js | 0 .../tests/ecma/ExecutionContexts/10.1.3-1.js | 0 .../tests/ecma/ExecutionContexts/10.1.3-2.js | 0 .../tests/ecma/ExecutionContexts/10.1.3.js | 0 .../tests/ecma/ExecutionContexts/10.1.4-1.js | 0 .../tests/ecma/ExecutionContexts/10.1.4-10.js | 0 .../tests/ecma/ExecutionContexts/10.1.4-2.js | 0 .../tests/ecma/ExecutionContexts/10.1.4-3.js | 0 .../tests/ecma/ExecutionContexts/10.1.4-4.js | 0 .../tests/ecma/ExecutionContexts/10.1.4-5.js | 0 .../tests/ecma/ExecutionContexts/10.1.4-6.js | 0 .../tests/ecma/ExecutionContexts/10.1.4-7.js | 0 .../tests/ecma/ExecutionContexts/10.1.4-8.js | 0 .../tests/ecma/ExecutionContexts/10.1.5-1.js | 0 .../tests/ecma/ExecutionContexts/10.1.5-2.js | 0 .../tests/ecma/ExecutionContexts/10.1.5-3.js | 0 .../tests/ecma/ExecutionContexts/10.1.5-4.js | 0 .../tests/ecma/ExecutionContexts/10.1.8-2.js | 0 .../tests/ecma/ExecutionContexts/10.1.8-3.js | 0 .../tests/ecma/ExecutionContexts/10.2.1.js | 0 .../tests/ecma/ExecutionContexts/10.2.2-1.js | 0 .../tests/ecma/ExecutionContexts/10.2.2-2.js | 0 .../tests/ecma/ExecutionContexts/10.2.3-1.js | 0 .../tests/ecma/ExecutionContexts/10.2.3-2.js | 0 .../tests/ecma/ExecutionContexts/browser.js | 0 .../tests/ecma/ExecutionContexts/shell.js | 0 .../tests/ecma/Expressions/11.1.1.js | 0 .../tests/ecma/Expressions/11.10-1.js | 0 .../tests/ecma/Expressions/11.10-2.js | 0 .../tests/ecma/Expressions/11.10-3.js | 0 .../tests/ecma/Expressions/11.12-1.js | 0 .../tests/ecma/Expressions/11.12-2-n.js | 0 .../tests/ecma/Expressions/11.12-3.js | 0 .../tests/ecma/Expressions/11.12-4.js | 0 .../tests/ecma/Expressions/11.13.1.js | 0 .../tests/ecma/Expressions/11.13.2-1.js | 0 .../tests/ecma/Expressions/11.13.2-2.js | 0 .../tests/ecma/Expressions/11.13.2-3.js | 0 .../tests/ecma/Expressions/11.13.2-4.js | 0 .../tests/ecma/Expressions/11.13.2-5.js | 0 .../tests/ecma/Expressions/11.13.js | 0 .../tests/ecma/Expressions/11.14-1.js | 0 .../tests/ecma/Expressions/11.2.1-1.js | 0 .../tests/ecma/Expressions/11.2.1-2.js | 0 .../tests/ecma/Expressions/11.2.1-3-n.js | 0 .../tests/ecma/Expressions/11.2.1-4-n.js | 0 .../tests/ecma/Expressions/11.2.1-5.js | 0 .../tests/ecma/Expressions/11.2.2-1-n.js | 0 .../tests/ecma/Expressions/11.2.2-1.js | 0 .../tests/ecma/Expressions/11.2.2-10-n.js | 0 .../tests/ecma/Expressions/11.2.2-11.js | 0 .../tests/ecma/Expressions/11.2.2-2-n.js | 0 .../tests/ecma/Expressions/11.2.2-3-n.js | 0 .../tests/ecma/Expressions/11.2.2-4-n.js | 0 .../tests/ecma/Expressions/11.2.2-5-n.js | 0 .../tests/ecma/Expressions/11.2.2-6-n.js | 0 .../tests/ecma/Expressions/11.2.2-7-n.js | 0 .../tests/ecma/Expressions/11.2.2-8-n.js | 0 .../tests/ecma/Expressions/11.2.2-9-n.js | 0 .../tests/ecma/Expressions/11.2.3-1.js | 0 .../tests/ecma/Expressions/11.2.3-2-n.js | 0 .../tests/ecma/Expressions/11.2.3-3-n.js | 0 .../tests/ecma/Expressions/11.2.3-4-n.js | 0 .../tests/ecma/Expressions/11.2.3-5.js | 0 .../tests/ecma/Expressions/11.3.1.js | 0 .../tests/ecma/Expressions/11.3.2.js | 0 .../tests/ecma/Expressions/11.4.1.js | 0 .../tests/ecma/Expressions/11.4.2.js | 0 .../tests/ecma/Expressions/11.4.3.js | 0 .../tests/ecma/Expressions/11.4.4.js | 0 .../tests/ecma/Expressions/11.4.5.js | 0 .../tests/ecma/Expressions/11.4.6.js | 0 .../tests/ecma/Expressions/11.4.7-01.js | 0 .../tests/ecma/Expressions/11.4.7-02.js | 0 .../tests/ecma/Expressions/11.4.8.js | 0 .../tests/ecma/Expressions/11.4.9.js | 0 .../tests/ecma/Expressions/11.5.1.js | 0 .../tests/ecma/Expressions/11.5.2.js | 0 .../tests/ecma/Expressions/11.5.3.js | 0 .../tests/ecma/Expressions/11.6.1-1.js | 0 .../tests/ecma/Expressions/11.6.1-2.js | 0 .../tests/ecma/Expressions/11.6.1-3.js | 0 .../tests/ecma/Expressions/11.6.2-1.js | 0 .../tests/ecma/Expressions/11.6.3.js | 0 .../tests/ecma/Expressions/11.7.1.js | 0 .../tests/ecma/Expressions/11.7.2.js | 0 .../tests/ecma/Expressions/11.7.3.js | 0 .../tests/ecma/Expressions/11.8.1.js | 0 .../tests/ecma/Expressions/11.8.2.js | 0 .../tests/ecma/Expressions/11.8.3.js | 0 .../tests/ecma/Expressions/11.8.4.js | 0 .../tests/ecma/Expressions/11.9.1.js | 0 .../tests/ecma/Expressions/11.9.2.js | 0 .../tests/ecma/Expressions/11.9.3.js | 0 .../tests/ecma/Expressions/browser.js | 0 .../tests/ecma/Expressions/shell.js | 0 .../tests/ecma/FunctionObjects/15.3.1.1-1.js | 0 .../tests/ecma/FunctionObjects/15.3.1.1-2.js | 0 .../tests/ecma/FunctionObjects/15.3.1.1-3.js | 0 .../tests/ecma/FunctionObjects/15.3.2.1-1.js | 0 .../tests/ecma/FunctionObjects/15.3.2.1-2.js | 0 .../tests/ecma/FunctionObjects/15.3.2.1-3.js | 0 .../tests/ecma/FunctionObjects/15.3.3.1-2.js | 0 .../tests/ecma/FunctionObjects/15.3.3.1-3.js | 0 .../tests/ecma/FunctionObjects/15.3.3.1-4.js | 0 .../tests/ecma/FunctionObjects/15.3.3.2.js | 0 .../tests/ecma/FunctionObjects/15.3.4-1.js | 0 .../tests/ecma/FunctionObjects/15.3.4.1.js | 0 .../tests/ecma/FunctionObjects/15.3.4.js | 0 .../tests/ecma/FunctionObjects/15.3.5-1.js | 0 .../tests/ecma/FunctionObjects/15.3.5-2.js | 0 .../tests/ecma/FunctionObjects/15.3.5.1.js | 0 .../tests/ecma/FunctionObjects/15.3.5.3.js | 0 .../tests/ecma/FunctionObjects/browser.js | 0 .../tests/ecma/FunctionObjects/shell.js | 0 .../tests/ecma/GlobalObject/15.1-1-n.js | 0 .../tests/ecma/GlobalObject/15.1-2-n.js | 0 .../tests/ecma/GlobalObject/15.1.1.1.js | 0 .../tests/ecma/GlobalObject/15.1.1.2.js | 0 .../tests/ecma/GlobalObject/15.1.2.1-2.js | 0 .../tests/ecma/GlobalObject/15.1.2.2-1.js | 0 .../tests/ecma/GlobalObject/15.1.2.2-2.js | 0 .../tests/ecma/GlobalObject/15.1.2.3-1.js | 0 .../tests/ecma/GlobalObject/15.1.2.3-2.js | 0 .../tests/ecma/GlobalObject/15.1.2.4.js | 0 .../tests/ecma/GlobalObject/15.1.2.5-1.js | 0 .../tests/ecma/GlobalObject/15.1.2.5-2.js | 0 .../tests/ecma/GlobalObject/15.1.2.5-3.js | 0 .../tests/ecma/GlobalObject/15.1.2.6.js | 0 .../tests/ecma/GlobalObject/15.1.2.7.js | 0 .../tests/ecma/GlobalObject/browser.js | 0 .../tests/ecma/GlobalObject/shell.js | 0 .../tests/ecma/LexicalConventions/7.1-1.js | 0 .../tests/ecma/LexicalConventions/7.1-2.js | 0 .../tests/ecma/LexicalConventions/7.1-3.js | 0 .../tests/ecma/LexicalConventions/7.2-1.js | 0 .../tests/ecma/LexicalConventions/7.2-2-n.js | 0 .../tests/ecma/LexicalConventions/7.2-3-n.js | 0 .../tests/ecma/LexicalConventions/7.2-4-n.js | 0 .../tests/ecma/LexicalConventions/7.2-5-n.js | 0 .../tests/ecma/LexicalConventions/7.2-6.js | 0 .../tests/ecma/LexicalConventions/7.3-1.js | 0 .../tests/ecma/LexicalConventions/7.3-10.js | 0 .../tests/ecma/LexicalConventions/7.3-11.js | 0 .../tests/ecma/LexicalConventions/7.3-12.js | 0 .../tests/ecma/LexicalConventions/7.3-13-n.js | 0 .../tests/ecma/LexicalConventions/7.3-2.js | 0 .../tests/ecma/LexicalConventions/7.3-3.js | 0 .../tests/ecma/LexicalConventions/7.3-4.js | 0 .../tests/ecma/LexicalConventions/7.3-5.js | 0 .../tests/ecma/LexicalConventions/7.3-6.js | 0 .../tests/ecma/LexicalConventions/7.3-7.js | 0 .../tests/ecma/LexicalConventions/7.3-8.js | 0 .../tests/ecma/LexicalConventions/7.3-9.js | 0 .../ecma/LexicalConventions/7.4.1-1-n.js | 0 .../ecma/LexicalConventions/7.4.1-2-n.js | 0 .../ecma/LexicalConventions/7.4.1-3-n.js | 0 .../ecma/LexicalConventions/7.4.2-1-n.js | 0 .../ecma/LexicalConventions/7.4.2-10-n.js | 0 .../ecma/LexicalConventions/7.4.2-11-n.js | 0 .../ecma/LexicalConventions/7.4.2-12-n.js | 0 .../ecma/LexicalConventions/7.4.2-13-n.js | 0 .../ecma/LexicalConventions/7.4.2-14-n.js | 0 .../ecma/LexicalConventions/7.4.2-15-n.js | 0 .../ecma/LexicalConventions/7.4.2-16-n.js | 0 .../ecma/LexicalConventions/7.4.2-2-n.js | 0 .../ecma/LexicalConventions/7.4.2-3-n.js | 0 .../ecma/LexicalConventions/7.4.2-4-n.js | 0 .../ecma/LexicalConventions/7.4.2-5-n.js | 0 .../ecma/LexicalConventions/7.4.2-6-n.js | 0 .../ecma/LexicalConventions/7.4.2-7-n.js | 0 .../ecma/LexicalConventions/7.4.2-8-n.js | 0 .../ecma/LexicalConventions/7.4.2-9-n.js | 0 .../ecma/LexicalConventions/7.4.3-1-n.js | 0 .../ecma/LexicalConventions/7.4.3-10-n.js | 0 .../ecma/LexicalConventions/7.4.3-11-n.js | 0 .../ecma/LexicalConventions/7.4.3-12-n.js | 0 .../ecma/LexicalConventions/7.4.3-13-n.js | 0 .../ecma/LexicalConventions/7.4.3-14-n.js | 0 .../ecma/LexicalConventions/7.4.3-15-n.js | 0 .../ecma/LexicalConventions/7.4.3-16-n.js | 0 .../ecma/LexicalConventions/7.4.3-2-n.js | 0 .../ecma/LexicalConventions/7.4.3-3-n.js | 0 .../ecma/LexicalConventions/7.4.3-4-n.js | 0 .../ecma/LexicalConventions/7.4.3-5-n.js | 0 .../ecma/LexicalConventions/7.4.3-6-n.js | 0 .../ecma/LexicalConventions/7.4.3-7-n.js | 0 .../ecma/LexicalConventions/7.4.3-8-n.js | 0 .../ecma/LexicalConventions/7.4.3-9-n.js | 0 .../tests/ecma/LexicalConventions/7.5-1.js | 0 .../tests/ecma/LexicalConventions/7.5-10-n.js | 0 .../tests/ecma/LexicalConventions/7.5-2-n.js | 0 .../tests/ecma/LexicalConventions/7.5-3-n.js | 0 .../tests/ecma/LexicalConventions/7.5-4-n.js | 0 .../tests/ecma/LexicalConventions/7.5-5-n.js | 0 .../tests/ecma/LexicalConventions/7.5-6.js | 0 .../tests/ecma/LexicalConventions/7.5-7.js | 0 .../tests/ecma/LexicalConventions/7.5-8-n.js | 0 .../tests/ecma/LexicalConventions/7.5-9-n.js | 0 .../tests/ecma/LexicalConventions/7.6.js | 0 .../tests/ecma/LexicalConventions/7.7.1.js | 0 .../tests/ecma/LexicalConventions/7.7.2.js | 0 .../tests/ecma/LexicalConventions/7.7.3-1.js | 0 .../tests/ecma/LexicalConventions/7.7.3-2.js | 0 .../tests/ecma/LexicalConventions/7.7.3.js | 0 .../tests/ecma/LexicalConventions/7.7.4.js | 0 .../tests/ecma/LexicalConventions/7.8.2-n.js | 0 .../tests/ecma/LexicalConventions/browser.js | 0 .../tests/ecma/LexicalConventions/shell.js | 0 .../parserstress/tests/ecma/Math/15.8-2-n.js | 0 .../parserstress/tests/ecma/Math/15.8-3-n.js | 0 .../tests/ecma/Math/15.8.1.1-1.js | 0 .../tests/ecma/Math/15.8.1.1-2.js | 0 .../tests/ecma/Math/15.8.1.2-1.js | 0 .../tests/ecma/Math/15.8.1.2-2.js | 0 .../tests/ecma/Math/15.8.1.3-1.js | 0 .../tests/ecma/Math/15.8.1.3-2.js | 0 .../tests/ecma/Math/15.8.1.4-1.js | 0 .../tests/ecma/Math/15.8.1.4-2.js | 0 .../tests/ecma/Math/15.8.1.5-1.js | 0 .../tests/ecma/Math/15.8.1.5-2.js | 0 .../tests/ecma/Math/15.8.1.6-1.js | 0 .../tests/ecma/Math/15.8.1.6-2.js | 0 .../tests/ecma/Math/15.8.1.7-1.js | 0 .../tests/ecma/Math/15.8.1.7-2.js | 0 .../tests/ecma/Math/15.8.1.8-1.js | 0 .../tests/ecma/Math/15.8.1.8-2.js | 0 .../tests/ecma/Math/15.8.1.8-3.js | 0 .../parserstress/tests/ecma/Math/15.8.1.js | 0 .../parserstress/tests/ecma/Math/15.8.2.1.js | 0 .../parserstress/tests/ecma/Math/15.8.2.10.js | 0 .../parserstress/tests/ecma/Math/15.8.2.11.js | 0 .../parserstress/tests/ecma/Math/15.8.2.12.js | 0 .../parserstress/tests/ecma/Math/15.8.2.13.js | 0 .../parserstress/tests/ecma/Math/15.8.2.14.js | 0 .../parserstress/tests/ecma/Math/15.8.2.15.js | 0 .../parserstress/tests/ecma/Math/15.8.2.16.js | 0 .../parserstress/tests/ecma/Math/15.8.2.17.js | 0 .../parserstress/tests/ecma/Math/15.8.2.18.js | 0 .../parserstress/tests/ecma/Math/15.8.2.2.js | 0 .../parserstress/tests/ecma/Math/15.8.2.3.js | 0 .../parserstress/tests/ecma/Math/15.8.2.4.js | 0 .../parserstress/tests/ecma/Math/15.8.2.5.js | 0 .../parserstress/tests/ecma/Math/15.8.2.6.js | 0 .../parserstress/tests/ecma/Math/15.8.2.7.js | 0 .../parserstress/tests/ecma/Math/15.8.2.8.js | 0 .../parserstress/tests/ecma/Math/15.8.2.9.js | 0 .../parserstress/tests/ecma/Math/browser.js | 0 .../parserstress/tests/ecma/Math/shell.js | 0 .../tests/ecma/NativeObjects/browser.js | 0 .../tests/ecma/NativeObjects/shell.js | 0 .../parserstress/tests/ecma/Number/15.7.1.js | 0 .../parserstress/tests/ecma/Number/15.7.2.js | 0 .../tests/ecma/Number/15.7.3.1-1.js | 0 .../tests/ecma/Number/15.7.3.1-2.js | 0 .../tests/ecma/Number/15.7.3.1-3.js | 0 .../tests/ecma/Number/15.7.3.2-1.js | 0 .../tests/ecma/Number/15.7.3.2-2.js | 0 .../tests/ecma/Number/15.7.3.2-3.js | 0 .../tests/ecma/Number/15.7.3.2-4.js | 0 .../tests/ecma/Number/15.7.3.3-1.js | 0 .../tests/ecma/Number/15.7.3.3-2.js | 0 .../tests/ecma/Number/15.7.3.3-3.js | 0 .../tests/ecma/Number/15.7.3.3-4.js | 0 .../tests/ecma/Number/15.7.3.4-1.js | 0 .../tests/ecma/Number/15.7.3.4-2.js | 0 .../tests/ecma/Number/15.7.3.4-3.js | 0 .../tests/ecma/Number/15.7.3.4-4.js | 0 .../tests/ecma/Number/15.7.3.5-1.js | 0 .../tests/ecma/Number/15.7.3.5-2.js | 0 .../tests/ecma/Number/15.7.3.5-3.js | 0 .../tests/ecma/Number/15.7.3.5-4.js | 0 .../tests/ecma/Number/15.7.3.6-1.js | 0 .../tests/ecma/Number/15.7.3.6-2.js | 0 .../tests/ecma/Number/15.7.3.6-3.js | 0 .../tests/ecma/Number/15.7.3.6-4.js | 0 .../parserstress/tests/ecma/Number/15.7.3.js | 0 .../tests/ecma/Number/15.7.4-1.js | 0 .../tests/ecma/Number/15.7.4.1.js | 0 .../tests/ecma/Number/15.7.4.2-1.js | 0 .../tests/ecma/Number/15.7.4.2-2-n.js | 0 .../tests/ecma/Number/15.7.4.2-3-n.js | 0 .../tests/ecma/Number/15.7.4.2-4.js | 0 .../tests/ecma/Number/15.7.4.3-1.js | 0 .../tests/ecma/Number/15.7.4.3-2.js | 0 .../tests/ecma/Number/15.7.4.3-3-n.js | 0 .../parserstress/tests/ecma/Number/browser.js | 0 .../parserstress/tests/ecma/Number/shell.js | 0 .../tests/ecma/ObjectObjects/15.2.1.1.js | 0 .../tests/ecma/ObjectObjects/15.2.1.2.js | 0 .../tests/ecma/ObjectObjects/15.2.2.1.js | 0 .../tests/ecma/ObjectObjects/15.2.2.2.js | 0 .../tests/ecma/ObjectObjects/15.2.3-1.js | 0 .../tests/ecma/ObjectObjects/15.2.3.1-1.js | 0 .../tests/ecma/ObjectObjects/15.2.3.1-2.js | 0 .../tests/ecma/ObjectObjects/15.2.3.1-3.js | 0 .../tests/ecma/ObjectObjects/15.2.3.1-4.js | 0 .../tests/ecma/ObjectObjects/15.2.3.js | 0 .../tests/ecma/ObjectObjects/15.2.4.1.js | 0 .../tests/ecma/ObjectObjects/15.2.4.2.js | 0 .../tests/ecma/ObjectObjects/15.2.4.3.js | 0 .../tests/ecma/ObjectObjects/browser.js | 0 .../tests/ecma/ObjectObjects/shell.js | 0 .../parserstress/tests/ecma/README | 0 .../parserstress/tests/ecma/SourceText/6-1.js | 0 .../parserstress/tests/ecma/SourceText/6-2.js | 0 .../tests/ecma/SourceText/browser.js | 0 .../tests/ecma/SourceText/shell.js | 0 .../tests/ecma/Statements/12.10-1.js | 0 .../tests/ecma/Statements/12.10.js | 0 .../tests/ecma/Statements/12.2-1.js | 0 .../tests/ecma/Statements/12.5-1.js | 0 .../tests/ecma/Statements/12.5-2.js | 0 .../tests/ecma/Statements/12.6.1-1.js | 0 .../tests/ecma/Statements/12.6.2-1.js | 0 .../tests/ecma/Statements/12.6.2-2.js | 0 .../tests/ecma/Statements/12.6.2-3.js | 0 .../tests/ecma/Statements/12.6.2-4.js | 0 .../tests/ecma/Statements/12.6.2-5.js | 0 .../tests/ecma/Statements/12.6.2-6.js | 0 .../tests/ecma/Statements/12.6.2-7.js | 0 .../tests/ecma/Statements/12.6.2-8.js | 0 .../tests/ecma/Statements/12.6.2-9-n.js | 0 .../tests/ecma/Statements/12.6.3-1.js | 0 .../tests/ecma/Statements/12.6.3-10.js | 0 .../tests/ecma/Statements/12.6.3-11.js | 0 .../tests/ecma/Statements/12.6.3-12.js | 0 .../tests/ecma/Statements/12.6.3-19.js | 0 .../tests/ecma/Statements/12.6.3-2.js | 0 .../tests/ecma/Statements/12.6.3-3.js | 0 .../tests/ecma/Statements/12.6.3-4.js | 0 .../tests/ecma/Statements/12.6.3-5-n.js | 0 .../tests/ecma/Statements/12.6.3-6-n.js | 0 .../tests/ecma/Statements/12.6.3-7-n.js | 0 .../tests/ecma/Statements/12.6.3-8-n.js | 0 .../tests/ecma/Statements/12.6.3-9-n.js | 0 .../tests/ecma/Statements/12.7-1-n.js | 0 .../tests/ecma/Statements/12.8-1-n.js | 0 .../tests/ecma/Statements/12.9-1-n.js | 0 .../tests/ecma/Statements/browser.js | 0 .../tests/ecma/Statements/shell.js | 0 .../parserstress/tests/ecma/String/15.5.1.js | 0 .../parserstress/tests/ecma/String/15.5.2.js | 0 .../tests/ecma/String/15.5.3.1-1.js | 0 .../tests/ecma/String/15.5.3.1-2.js | 0 .../tests/ecma/String/15.5.3.1-3.js | 0 .../tests/ecma/String/15.5.3.1-4.js | 0 .../tests/ecma/String/15.5.3.2-1.js | 0 .../tests/ecma/String/15.5.3.2-2.js | 0 .../tests/ecma/String/15.5.3.2-3.js | 0 .../parserstress/tests/ecma/String/15.5.3.js | 0 .../tests/ecma/String/15.5.4.1.js | 0 .../tests/ecma/String/15.5.4.10-1.js | 0 .../tests/ecma/String/15.5.4.11-1.js | 0 .../tests/ecma/String/15.5.4.11-2.js | 0 .../tests/ecma/String/15.5.4.11-3.js | 0 .../tests/ecma/String/15.5.4.11-4.js | 0 .../tests/ecma/String/15.5.4.11-5.js | 0 .../tests/ecma/String/15.5.4.11-6.js | 0 .../tests/ecma/String/15.5.4.12-1.js | 0 .../tests/ecma/String/15.5.4.12-2.js | 0 .../tests/ecma/String/15.5.4.12-3.js | 0 .../tests/ecma/String/15.5.4.12-4.js | 0 .../tests/ecma/String/15.5.4.12-5.js | 0 .../tests/ecma/String/15.5.4.2-1.js | 0 .../tests/ecma/String/15.5.4.2-2-n.js | 0 .../tests/ecma/String/15.5.4.2-3.js | 0 .../tests/ecma/String/15.5.4.2.js | 0 .../tests/ecma/String/15.5.4.3-1.js | 0 .../tests/ecma/String/15.5.4.3-2.js | 0 .../tests/ecma/String/15.5.4.3-3-n.js | 0 .../tests/ecma/String/15.5.4.4-1.js | 0 .../tests/ecma/String/15.5.4.4-2.js | 0 .../tests/ecma/String/15.5.4.4-3.js | 0 .../tests/ecma/String/15.5.4.4-4.js | 0 .../tests/ecma/String/15.5.4.5-1.js | 0 .../tests/ecma/String/15.5.4.5-2.js | 0 .../tests/ecma/String/15.5.4.5-3.js | 0 .../tests/ecma/String/15.5.4.5-4.js | 0 .../tests/ecma/String/15.5.4.5-5.js | 0 .../tests/ecma/String/15.5.4.6-1.js | 0 .../tests/ecma/String/15.5.4.6-2.js | 0 .../tests/ecma/String/15.5.4.7-1.js | 0 .../tests/ecma/String/15.5.4.7-2.js | 0 .../tests/ecma/String/15.5.4.8-1.js | 0 .../tests/ecma/String/15.5.4.8-2.js | 0 .../tests/ecma/String/15.5.4.8-3.js | 0 .../tests/ecma/String/15.5.4.9-1.js | 0 .../parserstress/tests/ecma/String/15.5.4.js | 0 .../tests/ecma/String/15.5.5.1.js | 0 .../parserstress/tests/ecma/String/browser.js | 0 .../parserstress/tests/ecma/String/shell.js | 0 .../tests/ecma/TypeConversion/9.2.js | 0 .../tests/ecma/TypeConversion/9.3-1.js | 0 .../tests/ecma/TypeConversion/9.3.1-1.js | 0 .../tests/ecma/TypeConversion/9.3.1-2.js | 0 .../tests/ecma/TypeConversion/9.3.1-3.js | 0 .../tests/ecma/TypeConversion/9.3.js | 0 .../tests/ecma/TypeConversion/9.4-1.js | 0 .../tests/ecma/TypeConversion/9.4-2.js | 0 .../tests/ecma/TypeConversion/9.5-2.js | 0 .../tests/ecma/TypeConversion/9.6.js | 0 .../tests/ecma/TypeConversion/9.7.js | 0 .../tests/ecma/TypeConversion/9.8.1.js | 0 .../tests/ecma/TypeConversion/9.9-1.js | 0 .../tests/ecma/TypeConversion/browser.js | 0 .../tests/ecma/TypeConversion/shell.js | 0 .../parserstress/tests/ecma/Types/8.1.js | 0 .../parserstress/tests/ecma/Types/8.4.js | 0 .../tests/ecma/Types/8.6.2.1-1.js | 0 .../parserstress/tests/ecma/Types/browser.js | 0 .../parserstress/tests/ecma/Types/shell.js | 0 .../parserstress/tests/ecma/browser.js | 0 .../tests/ecma/extensions/10.1.4-9.js | 0 .../tests/ecma/extensions/10.1.6.js | 0 .../tests/ecma/extensions/10.1.8-1.js | 0 .../tests/ecma/extensions/11.6.1-1.js | 0 .../tests/ecma/extensions/11.6.1-2.js | 0 .../tests/ecma/extensions/11.6.1-3.js | 0 .../tests/ecma/extensions/11.6.2-1.js | 0 .../tests/ecma/extensions/15-1.js | 0 .../tests/ecma/extensions/15-2.js | 0 .../tests/ecma/extensions/15.1.2.1-1.js | 0 .../tests/ecma/extensions/15.2.1.1.js | 0 .../tests/ecma/extensions/15.2.3-1.js | 0 .../tests/ecma/extensions/15.2.4.js | 0 .../tests/ecma/extensions/15.3.1.1-1.js | 0 .../tests/ecma/extensions/15.3.1.1-2.js | 0 .../tests/ecma/extensions/15.3.2.1-1.js | 0 .../tests/ecma/extensions/15.3.2.1-2.js | 0 .../tests/ecma/extensions/15.3.3.1-1.js | 0 .../tests/ecma/extensions/15.4.3.js | 0 .../tests/ecma/extensions/15.5.3.js | 0 .../tests/ecma/extensions/15.5.4.2.js | 0 .../tests/ecma/extensions/15.5.4.4-4.js | 0 .../tests/ecma/extensions/15.5.4.5-6.js | 0 .../tests/ecma/extensions/15.5.4.7-3.js | 0 .../tests/ecma/extensions/15.6.3.1-5.js | 0 .../tests/ecma/extensions/15.6.3.js | 0 .../tests/ecma/extensions/15.6.4-2.js | 0 .../tests/ecma/extensions/15.7.3.js | 0 .../tests/ecma/extensions/15.7.4.js | 0 .../tests/ecma/extensions/15.8-1.js | 0 .../tests/ecma/extensions/15.9.5.js | 0 .../tests/ecma/extensions/8.6.2.1-1.js | 0 .../tests/ecma/extensions/9.9-1.js | 0 .../tests/ecma/extensions/browser.js | 0 .../tests/ecma/extensions/shell.js | 0 .../parserstress/tests/ecma/jsref.js | 0 .../parserstress/tests/ecma/shell.js | 0 .../parserstress/tests/ecma/template.js | 0 .../tests/ecma_2/Exceptions/boolean-001.js | 0 .../tests/ecma_2/Exceptions/boolean-002.js | 0 .../tests/ecma_2/Exceptions/browser.js | 0 .../tests/ecma_2/Exceptions/date-001.js | 0 .../tests/ecma_2/Exceptions/date-002.js | 0 .../tests/ecma_2/Exceptions/date-003.js | 0 .../tests/ecma_2/Exceptions/date-004.js | 0 .../tests/ecma_2/Exceptions/exception-001.js | 0 .../tests/ecma_2/Exceptions/exception-002.js | 0 .../tests/ecma_2/Exceptions/exception-003.js | 0 .../tests/ecma_2/Exceptions/exception-004.js | 0 .../tests/ecma_2/Exceptions/exception-005.js | 0 .../tests/ecma_2/Exceptions/exception-006.js | 0 .../tests/ecma_2/Exceptions/exception-007.js | 0 .../tests/ecma_2/Exceptions/exception-008.js | 0 .../tests/ecma_2/Exceptions/exception-009.js | 0 .../ecma_2/Exceptions/exception-010-n.js | 0 .../ecma_2/Exceptions/exception-011-n.js | 0 .../tests/ecma_2/Exceptions/expression-001.js | 0 .../tests/ecma_2/Exceptions/expression-002.js | 0 .../tests/ecma_2/Exceptions/expression-003.js | 0 .../tests/ecma_2/Exceptions/expression-004.js | 0 .../tests/ecma_2/Exceptions/expression-005.js | 0 .../tests/ecma_2/Exceptions/expression-006.js | 0 .../tests/ecma_2/Exceptions/expression-007.js | 0 .../tests/ecma_2/Exceptions/expression-008.js | 0 .../tests/ecma_2/Exceptions/expression-009.js | 0 .../tests/ecma_2/Exceptions/expression-010.js | 0 .../tests/ecma_2/Exceptions/expression-011.js | 0 .../tests/ecma_2/Exceptions/expression-012.js | 0 .../tests/ecma_2/Exceptions/expression-013.js | 0 .../tests/ecma_2/Exceptions/expression-014.js | 0 .../tests/ecma_2/Exceptions/expression-015.js | 0 .../tests/ecma_2/Exceptions/expression-016.js | 0 .../tests/ecma_2/Exceptions/expression-017.js | 0 .../tests/ecma_2/Exceptions/expression-019.js | 0 .../tests/ecma_2/Exceptions/function-001.js | 0 .../tests/ecma_2/Exceptions/global-001.js | 0 .../tests/ecma_2/Exceptions/global-002.js | 0 .../tests/ecma_2/Exceptions/lexical-001.js | 0 .../tests/ecma_2/Exceptions/lexical-002.js | 0 .../tests/ecma_2/Exceptions/lexical-003.js | 0 .../tests/ecma_2/Exceptions/lexical-004.js | 0 .../tests/ecma_2/Exceptions/lexical-005.js | 0 .../tests/ecma_2/Exceptions/lexical-006.js | 0 .../tests/ecma_2/Exceptions/lexical-007.js | 0 .../tests/ecma_2/Exceptions/lexical-008.js | 0 .../tests/ecma_2/Exceptions/lexical-009.js | 0 .../tests/ecma_2/Exceptions/lexical-010.js | 0 .../tests/ecma_2/Exceptions/lexical-011.js | 0 .../tests/ecma_2/Exceptions/lexical-012.js | 0 .../tests/ecma_2/Exceptions/lexical-013.js | 0 .../tests/ecma_2/Exceptions/lexical-014.js | 0 .../tests/ecma_2/Exceptions/lexical-015.js | 0 .../tests/ecma_2/Exceptions/lexical-016.js | 0 .../tests/ecma_2/Exceptions/lexical-017.js | 0 .../tests/ecma_2/Exceptions/lexical-018.js | 0 .../tests/ecma_2/Exceptions/lexical-019.js | 0 .../tests/ecma_2/Exceptions/lexical-020.js | 0 .../tests/ecma_2/Exceptions/lexical-021.js | 0 .../tests/ecma_2/Exceptions/lexical-022.js | 0 .../tests/ecma_2/Exceptions/lexical-023.js | 0 .../tests/ecma_2/Exceptions/lexical-024.js | 0 .../tests/ecma_2/Exceptions/lexical-025.js | 0 .../tests/ecma_2/Exceptions/lexical-026.js | 0 .../tests/ecma_2/Exceptions/lexical-027.js | 0 .../tests/ecma_2/Exceptions/lexical-028.js | 0 .../tests/ecma_2/Exceptions/lexical-029.js | 0 .../tests/ecma_2/Exceptions/lexical-030.js | 0 .../tests/ecma_2/Exceptions/lexical-031.js | 0 .../tests/ecma_2/Exceptions/lexical-032.js | 0 .../tests/ecma_2/Exceptions/lexical-033.js | 0 .../tests/ecma_2/Exceptions/lexical-034.js | 0 .../tests/ecma_2/Exceptions/lexical-035.js | 0 .../tests/ecma_2/Exceptions/lexical-036.js | 0 .../tests/ecma_2/Exceptions/lexical-037.js | 0 .../tests/ecma_2/Exceptions/lexical-038.js | 0 .../tests/ecma_2/Exceptions/lexical-039.js | 0 .../tests/ecma_2/Exceptions/lexical-040.js | 0 .../tests/ecma_2/Exceptions/lexical-041.js | 0 .../tests/ecma_2/Exceptions/lexical-042.js | 0 .../tests/ecma_2/Exceptions/lexical-047.js | 0 .../tests/ecma_2/Exceptions/lexical-048.js | 0 .../tests/ecma_2/Exceptions/lexical-049.js | 0 .../tests/ecma_2/Exceptions/lexical-050.js | 0 .../tests/ecma_2/Exceptions/lexical-051.js | 0 .../tests/ecma_2/Exceptions/lexical-052.js | 0 .../tests/ecma_2/Exceptions/lexical-053.js | 0 .../tests/ecma_2/Exceptions/lexical-054.js | 0 .../tests/ecma_2/Exceptions/number-001.js | 0 .../tests/ecma_2/Exceptions/number-002.js | 0 .../tests/ecma_2/Exceptions/number-003.js | 0 .../tests/ecma_2/Exceptions/shell.js | 0 .../tests/ecma_2/Exceptions/statement-001.js | 0 .../tests/ecma_2/Exceptions/statement-002.js | 0 .../tests/ecma_2/Exceptions/statement-003.js | 0 .../tests/ecma_2/Exceptions/statement-004.js | 0 .../tests/ecma_2/Exceptions/statement-005.js | 0 .../tests/ecma_2/Exceptions/statement-006.js | 0 .../tests/ecma_2/Exceptions/statement-007.js | 0 .../tests/ecma_2/Exceptions/statement-008.js | 0 .../tests/ecma_2/Exceptions/statement-009.js | 0 .../tests/ecma_2/Exceptions/string-001.js | 0 .../tests/ecma_2/Exceptions/string-002.js | 0 .../ecma_2/Expressions/StrictEquality-001.js | 0 .../tests/ecma_2/Expressions/browser.js | 0 .../tests/ecma_2/Expressions/shell.js | 0 .../ecma_2/FunctionObjects/apply-001-n.js | 0 .../tests/ecma_2/FunctionObjects/browser.js | 0 .../tests/ecma_2/FunctionObjects/call-1.js | 0 .../tests/ecma_2/FunctionObjects/shell.js | 0 .../ecma_2/LexicalConventions/browser.js | 0 .../ecma_2/LexicalConventions/keywords-001.js | 0 .../LexicalConventions/regexp-literals-001.js | 0 .../LexicalConventions/regexp-literals-002.js | 0 .../tests/ecma_2/LexicalConventions/shell.js | 0 .../parserstress/tests/ecma_2/README | 0 .../tests/ecma_2/RegExp/browser.js | 0 .../tests/ecma_2/RegExp/constructor-001.js | 0 .../tests/ecma_2/RegExp/exec-001.js | 0 .../tests/ecma_2/RegExp/exec-002.js | 0 .../tests/ecma_2/RegExp/function-001.js | 0 .../tests/ecma_2/RegExp/hex-001.js | 0 .../tests/ecma_2/RegExp/multiline-001.js | 0 .../tests/ecma_2/RegExp/octal-001.js | 0 .../tests/ecma_2/RegExp/octal-002.js | 0 .../tests/ecma_2/RegExp/octal-003.js | 0 .../tests/ecma_2/RegExp/properties-001.js | 0 .../tests/ecma_2/RegExp/properties-002.js | 0 .../ecma_2/RegExp/regexp-enumerate-001.js | 0 .../tests/ecma_2/RegExp/regress-001.js | 0 .../parserstress/tests/ecma_2/RegExp/shell.js | 0 .../tests/ecma_2/RegExp/unicode-001.js | 0 .../tests/ecma_2/Statements/browser.js | 0 .../tests/ecma_2/Statements/dowhile-001.js | 0 .../tests/ecma_2/Statements/dowhile-002.js | 0 .../tests/ecma_2/Statements/dowhile-003.js | 0 .../tests/ecma_2/Statements/dowhile-004.js | 0 .../tests/ecma_2/Statements/dowhile-005.js | 0 .../tests/ecma_2/Statements/dowhile-006.js | 0 .../tests/ecma_2/Statements/dowhile-007.js | 0 .../tests/ecma_2/Statements/forin-001.js | 0 .../tests/ecma_2/Statements/forin-002.js | 0 .../tests/ecma_2/Statements/if-001.js | 0 .../tests/ecma_2/Statements/label-001.js | 0 .../tests/ecma_2/Statements/label-002.js | 0 .../tests/ecma_2/Statements/shell.js | 0 .../tests/ecma_2/Statements/switch-001.js | 0 .../tests/ecma_2/Statements/switch-002.js | 0 .../tests/ecma_2/Statements/switch-003.js | 0 .../tests/ecma_2/Statements/switch-004.js | 0 .../tests/ecma_2/Statements/try-001.js | 0 .../tests/ecma_2/Statements/try-003.js | 0 .../tests/ecma_2/Statements/try-004.js | 0 .../tests/ecma_2/Statements/try-005.js | 0 .../tests/ecma_2/Statements/try-006.js | 0 .../tests/ecma_2/Statements/try-007.js | 0 .../tests/ecma_2/Statements/try-008.js | 0 .../tests/ecma_2/Statements/try-009.js | 0 .../tests/ecma_2/Statements/try-010.js | 0 .../tests/ecma_2/Statements/try-012.js | 0 .../tests/ecma_2/Statements/while-001.js | 0 .../tests/ecma_2/Statements/while-002.js | 0 .../tests/ecma_2/Statements/while-003.js | 0 .../tests/ecma_2/Statements/while-004.js | 0 .../tests/ecma_2/String/browser.js | 0 .../tests/ecma_2/String/match-001.js | 0 .../tests/ecma_2/String/match-002.js | 0 .../tests/ecma_2/String/match-003.js | 0 .../tests/ecma_2/String/match-004.js | 0 .../tests/ecma_2/String/replace-001.js | 0 .../parserstress/tests/ecma_2/String/shell.js | 0 .../tests/ecma_2/String/split-001.js | 0 .../tests/ecma_2/String/split-002.js | 0 .../tests/ecma_2/String/split-003.js | 0 .../parserstress/tests/ecma_2/browser.js | 0 .../tests/ecma_2/extensions/browser.js | 0 .../ecma_2/extensions/constructor-001.js | 0 .../tests/ecma_2/extensions/function-001.js | 0 .../tests/ecma_2/extensions/instanceof-001.js | 0 .../tests/ecma_2/extensions/instanceof-002.js | 0 .../ecma_2/extensions/instanceof-003-n.js | 0 .../ecma_2/extensions/instanceof-004-n.js | 0 .../ecma_2/extensions/instanceof-005-n.js | 0 .../tests/ecma_2/extensions/instanceof-006.js | 0 .../tests/ecma_2/extensions/shell.js | 0 .../tests/ecma_2/instanceof/browser.js | 0 .../tests/ecma_2/instanceof/instanceof-001.js | 0 .../tests/ecma_2/instanceof/instanceof-002.js | 0 .../tests/ecma_2/instanceof/instanceof-003.js | 0 .../tests/ecma_2/instanceof/regress-7635.js | 0 .../tests/ecma_2/instanceof/shell.js | 0 .../parserstress/tests/ecma_2/jsref.js | 0 .../parserstress/tests/ecma_2/shell.js | 0 .../parserstress/tests/ecma_2/template.js | 0 .../tests/ecma_3/Array/15.4.4.11-01.js | 0 .../tests/ecma_3/Array/15.4.4.3-1.js | 0 .../tests/ecma_3/Array/15.4.4.4-001.js | 0 .../tests/ecma_3/Array/15.4.5.1-01.js | 0 .../tests/ecma_3/Array/browser.js | 0 .../tests/ecma_3/Array/regress-101488.js | 0 .../tests/ecma_3/Array/regress-130451.js | 0 .../tests/ecma_3/Array/regress-322135-01.js | 0 .../tests/ecma_3/Array/regress-322135-02.js | 0 .../tests/ecma_3/Array/regress-322135-03.js | 0 .../tests/ecma_3/Array/regress-322135-04.js | 0 .../tests/ecma_3/Array/regress-387501.js | 0 .../tests/ecma_3/Array/regress-421325.js | 0 .../tests/ecma_3/Array/regress-430717.js | 0 .../parserstress/tests/ecma_3/Array/shell.js | 0 .../tests/ecma_3/Date/15.9.1.2-01.js | 0 .../tests/ecma_3/Date/15.9.3.2-1.js | 0 .../tests/ecma_3/Date/15.9.4.3.js | 0 .../tests/ecma_3/Date/15.9.5.3.js | 0 .../tests/ecma_3/Date/15.9.5.4.js | 0 .../tests/ecma_3/Date/15.9.5.5-02.js | 0 .../tests/ecma_3/Date/15.9.5.5.js | 0 .../tests/ecma_3/Date/15.9.5.6.js | 0 .../tests/ecma_3/Date/15.9.5.7.js | 0 .../parserstress/tests/ecma_3/Date/browser.js | 0 .../parserstress/tests/ecma_3/Date/shell.js | 0 .../tests/ecma_3/Exceptions/15.11.1.1.js | 0 .../tests/ecma_3/Exceptions/15.11.4.4-1.js | 0 .../tests/ecma_3/Exceptions/15.11.7.6-001.js | 0 .../tests/ecma_3/Exceptions/15.11.7.6-002.js | 0 .../tests/ecma_3/Exceptions/15.11.7.6-003.js | 0 .../tests/ecma_3/Exceptions/binding-001.js | 0 .../tests/ecma_3/Exceptions/browser.js | 0 .../tests/ecma_3/Exceptions/regress-181654.js | 0 .../tests/ecma_3/Exceptions/regress-181914.js | 0 .../tests/ecma_3/Exceptions/regress-58946.js | 0 .../tests/ecma_3/Exceptions/regress-95101.js | 0 .../tests/ecma_3/Exceptions/shell.js | 0 .../ecma_3/ExecutionContexts/10.1.3-1.js | 0 .../ecma_3/ExecutionContexts/10.1.3-2.js | 0 .../tests/ecma_3/ExecutionContexts/10.1.3.js | 0 .../ecma_3/ExecutionContexts/10.1.4-1.js | 0 .../ecma_3/ExecutionContexts/10.6.1-01.js | 0 .../tests/ecma_3/ExecutionContexts/browser.js | 0 .../ecma_3/ExecutionContexts/regress-23346.js | 0 .../ExecutionContexts/regress-448595-01.js | 0 .../tests/ecma_3/ExecutionContexts/shell.js | 0 .../tests/ecma_3/Expressions/11.10-01.js | 0 .../tests/ecma_3/Expressions/11.10-02.js | 0 .../tests/ecma_3/Expressions/11.10-03.js | 0 .../tests/ecma_3/Expressions/11.6.1-1.js | 0 .../tests/ecma_3/Expressions/11.7.1-01.js | 0 .../tests/ecma_3/Expressions/11.7.2-01.js | 0 .../tests/ecma_3/Expressions/11.7.3-01.js | 0 .../tests/ecma_3/Expressions/11.9.6-1.js | 0 .../tests/ecma_3/Expressions/browser.js | 0 .../tests/ecma_3/Expressions/shell.js | 0 .../tests/ecma_3/FunExpr/browser.js | 0 .../tests/ecma_3/FunExpr/fe-001-n.js | 0 .../tests/ecma_3/FunExpr/fe-001.js | 0 .../tests/ecma_3/FunExpr/fe-002.js | 0 .../tests/ecma_3/FunExpr/shell.js | 0 .../tests/ecma_3/Function/15.3.4.3-1.js | 0 .../tests/ecma_3/Function/15.3.4.4-1.js | 0 .../tests/ecma_3/Function/arguments-001.js | 0 .../tests/ecma_3/Function/arguments-002.js | 0 .../tests/ecma_3/Function/browser.js | 0 .../tests/ecma_3/Function/call-001.js | 0 .../tests/ecma_3/Function/regress-131964.js | 0 .../tests/ecma_3/Function/regress-137181.js | 0 .../tests/ecma_3/Function/regress-193555.js | 0 .../tests/ecma_3/Function/regress-313570.js | 0 .../tests/ecma_3/Function/regress-49286.js | 0 .../tests/ecma_3/Function/regress-58274.js | 0 .../tests/ecma_3/Function/regress-85880.js | 0 .../tests/ecma_3/Function/regress-94506.js | 0 .../tests/ecma_3/Function/regress-97921.js | 0 .../tests/ecma_3/Function/scope-001.js | 0 .../tests/ecma_3/Function/scope-002.js | 0 .../tests/ecma_3/Function/shell.js | 0 .../tests/ecma_3/LexicalConventions/7.9.1.js | 0 .../ecma_3/LexicalConventions/browser.js | 0 .../tests/ecma_3/LexicalConventions/shell.js | 0 .../tests/ecma_3/Number/15.7.4.2-01.js | 0 .../tests/ecma_3/Number/15.7.4.3-01.js | 0 .../tests/ecma_3/Number/15.7.4.3-02.js | 0 .../tests/ecma_3/Number/15.7.4.5-1.js | 0 .../tests/ecma_3/Number/15.7.4.6-1.js | 0 .../tests/ecma_3/Number/15.7.4.7-1.js | 0 .../tests/ecma_3/Number/15.7.4.7-2.js | 0 .../tests/ecma_3/Number/browser.js | 0 .../tests/ecma_3/Number/regress-442242-01.js | 0 .../parserstress/tests/ecma_3/Number/shell.js | 0 .../tests/ecma_3/NumberFormatting/browser.js | 0 .../tests/ecma_3/NumberFormatting/shell.js | 0 .../ecma_3/NumberFormatting/tostring-001.js | 0 .../tests/ecma_3/Object/8.6.1-01.js | 0 .../tests/ecma_3/Object/8.6.2.6-001.js | 0 .../tests/ecma_3/Object/browser.js | 0 .../tests/ecma_3/Object/class-001.js | 0 .../tests/ecma_3/Object/class-002.js | 0 .../tests/ecma_3/Object/class-003.js | 0 .../tests/ecma_3/Object/class-004.js | 0 .../tests/ecma_3/Object/class-005.js | 0 .../tests/ecma_3/Object/regress-361274.js | 0 .../tests/ecma_3/Object/regress-385393-07.js | 0 .../tests/ecma_3/Object/regress-72773.js | 0 .../tests/ecma_3/Object/regress-79129-001.js | 0 .../parserstress/tests/ecma_3/Object/shell.js | 0 .../tests/ecma_3/Operators/11.13.1-001.js | 0 .../tests/ecma_3/Operators/11.13.1-002.js | 0 .../tests/ecma_3/Operators/11.4.1-001.js | 0 .../tests/ecma_3/Operators/11.4.1-002.js | 0 .../tests/ecma_3/Operators/browser.js | 0 .../tests/ecma_3/Operators/order-01.js | 0 .../tests/ecma_3/Operators/shell.js | 0 .../parserstress/tests/ecma_3/README | 0 .../tests/ecma_3/RegExp/15.10.2-1.js | 0 .../tests/ecma_3/RegExp/15.10.2.12.js | 0 .../tests/ecma_3/RegExp/15.10.3.1-1.js | 0 .../tests/ecma_3/RegExp/15.10.3.1-2.js | 0 .../tests/ecma_3/RegExp/15.10.4.1-1.js | 0 .../tests/ecma_3/RegExp/15.10.4.1-2.js | 0 .../tests/ecma_3/RegExp/15.10.4.1-3.js | 0 .../tests/ecma_3/RegExp/15.10.4.1-4.js | 0 .../tests/ecma_3/RegExp/15.10.4.1-5-n.js | 0 .../tests/ecma_3/RegExp/15.10.6.2-1.js | 0 .../tests/ecma_3/RegExp/15.10.6.2-2.js | 0 .../tests/ecma_3/RegExp/browser.js | 0 .../tests/ecma_3/RegExp/octal-001.js | 0 .../tests/ecma_3/RegExp/octal-002.js | 0 .../tests/ecma_3/RegExp/perlstress-001.js | 0 .../tests/ecma_3/RegExp/perlstress-002.js | 0 .../tests/ecma_3/RegExp/regress-100199.js | 0 .../tests/ecma_3/RegExp/regress-105972.js | 0 .../tests/ecma_3/RegExp/regress-119909.js | 0 .../tests/ecma_3/RegExp/regress-122076.js | 0 .../tests/ecma_3/RegExp/regress-123437.js | 0 .../tests/ecma_3/RegExp/regress-165353.js | 0 .../tests/ecma_3/RegExp/regress-169497.js | 0 .../tests/ecma_3/RegExp/regress-169534.js | 0 .../tests/ecma_3/RegExp/regress-187133.js | 0 .../tests/ecma_3/RegExp/regress-188206.js | 0 .../tests/ecma_3/RegExp/regress-191479.js | 0 .../tests/ecma_3/RegExp/regress-202564.js | 0 .../tests/ecma_3/RegExp/regress-209067.js | 0 .../tests/ecma_3/RegExp/regress-209919.js | 0 .../tests/ecma_3/RegExp/regress-216591.js | 0 .../tests/ecma_3/RegExp/regress-220367-001.js | 0 .../tests/ecma_3/RegExp/regress-223273.js | 0 .../tests/ecma_3/RegExp/regress-223535.js | 0 .../tests/ecma_3/RegExp/regress-224676.js | 0 .../tests/ecma_3/RegExp/regress-225289.js | 0 .../tests/ecma_3/RegExp/regress-225343.js | 0 .../tests/ecma_3/RegExp/regress-24712.js | 0 .../tests/ecma_3/RegExp/regress-285219.js | 0 .../tests/ecma_3/RegExp/regress-28686.js | 0 .../tests/ecma_3/RegExp/regress-289669.js | 0 .../tests/ecma_3/RegExp/regress-307456.js | 0 .../tests/ecma_3/RegExp/regress-309840.js | 0 .../tests/ecma_3/RegExp/regress-311414.js | 0 .../tests/ecma_3/RegExp/regress-312351.js | 0 .../tests/ecma_3/RegExp/regress-31316.js | 0 .../tests/ecma_3/RegExp/regress-330684.js | 0 .../tests/ecma_3/RegExp/regress-334158.js | 0 .../tests/ecma_3/RegExp/regress-346090.js | 0 .../tests/ecma_3/RegExp/regress-367888.js | 0 .../tests/ecma_3/RegExp/regress-375642.js | 0 .../tests/ecma_3/RegExp/regress-375711.js | 0 .../ecma_3/RegExp/regress-375715-01-n.js | 0 .../tests/ecma_3/RegExp/regress-375715-02.js | 0 .../tests/ecma_3/RegExp/regress-375715-03.js | 0 .../tests/ecma_3/RegExp/regress-375715-04.js | 0 .../tests/ecma_3/RegExp/regress-57572.js | 0 .../tests/ecma_3/RegExp/regress-57631.js | 0 .../tests/ecma_3/RegExp/regress-67773.js | 0 .../tests/ecma_3/RegExp/regress-72964.js | 0 .../tests/ecma_3/RegExp/regress-76683.js | 0 .../tests/ecma_3/RegExp/regress-78156.js | 0 .../tests/ecma_3/RegExp/regress-85721.js | 0 .../tests/ecma_3/RegExp/regress-87231.js | 0 .../tests/ecma_3/RegExp/regress-98306.js | 0 .../parserstress/tests/ecma_3/RegExp/shell.js | 0 .../tests/ecma_3/Regress/browser.js | 0 .../tests/ecma_3/Regress/regress-385393-04.js | 0 .../tests/ecma_3/Regress/regress-419152.js | 0 .../tests/ecma_3/Regress/regress-420087.js | 0 .../tests/ecma_3/Regress/regress-420610.js | 0 .../tests/ecma_3/Regress/regress-441477-01.js | 0 .../tests/ecma_3/Regress/shell.js | 0 .../tests/ecma_3/Statements/12.6.3.js | 0 .../tests/ecma_3/Statements/browser.js | 0 .../tests/ecma_3/Statements/regress-121744.js | 0 .../tests/ecma_3/Statements/regress-131348.js | 0 .../tests/ecma_3/Statements/regress-157509.js | 0 .../tests/ecma_3/Statements/regress-194364.js | 0 .../tests/ecma_3/Statements/regress-226517.js | 0 .../tests/ecma_3/Statements/regress-302439.js | 0 .../tests/ecma_3/Statements/regress-324650.js | 0 .../ecma_3/Statements/regress-74474-001.js | 0 .../ecma_3/Statements/regress-74474-002.js | 0 .../ecma_3/Statements/regress-74474-003.js | 0 .../ecma_3/Statements/regress-83532-001.js | 0 .../ecma_3/Statements/regress-83532-002.js | 0 .../tests/ecma_3/Statements/shell.js | 0 .../tests/ecma_3/Statements/switch-001.js | 0 .../tests/ecma_3/String/15.5.4.11.js | 0 .../tests/ecma_3/String/15.5.4.14.js | 0 .../tests/ecma_3/String/browser.js | 0 .../tests/ecma_3/String/regress-104375.js | 0 .../tests/ecma_3/String/regress-189898.js | 0 .../tests/ecma_3/String/regress-304376.js | 0 .../tests/ecma_3/String/regress-313567.js | 0 .../tests/ecma_3/String/regress-392378.js | 0 .../tests/ecma_3/String/regress-83293.js | 0 .../parserstress/tests/ecma_3/String/shell.js | 0 .../tests/ecma_3/Unicode/browser.js | 0 .../tests/ecma_3/Unicode/regress-352044-01.js | 0 .../ecma_3/Unicode/regress-352044-02-n.js | 0 .../tests/ecma_3/Unicode/shell.js | 0 .../tests/ecma_3/Unicode/uc-001-n.js | 0 .../tests/ecma_3/Unicode/uc-001.js | 0 .../tests/ecma_3/Unicode/uc-002-n.js | 0 .../tests/ecma_3/Unicode/uc-002.js | 0 .../tests/ecma_3/Unicode/uc-003.js | 0 .../tests/ecma_3/Unicode/uc-004.js | 0 .../tests/ecma_3/Unicode/uc-005.js | 0 .../parserstress/tests/ecma_3/browser.js | 0 .../tests/ecma_3/extensions/10.1.3-2.js | 0 .../tests/ecma_3/extensions/7.9.1.js | 0 .../tests/ecma_3/extensions/browser.js | 0 .../tests/ecma_3/extensions/regress-103087.js | 0 .../ecma_3/extensions/regress-188206-01.js | 0 .../ecma_3/extensions/regress-188206-02.js | 0 .../ecma_3/extensions/regress-220367-002.js | 0 .../tests/ecma_3/extensions/regress-228087.js | 0 .../tests/ecma_3/extensions/regress-274152.js | 0 .../tests/ecma_3/extensions/regress-320854.js | 0 .../tests/ecma_3/extensions/regress-327170.js | 0 .../tests/ecma_3/extensions/regress-368516.js | 0 .../ecma_3/extensions/regress-385393-03.js | 0 .../tests/ecma_3/extensions/regress-429248.js | 0 .../tests/ecma_3/extensions/regress-430740.js | 0 .../tests/ecma_3/extensions/shell.js | 0 .../parserstress/tests/ecma_3/shell.js | 0 .../parserstress/tests/ecma_3/template.js | 0 .../parserstress/tests/shell.js | 0 .../parserstress/tst_parserstress.cpp | 8 +- .../qjsengine/qjsengine.pro | 2 +- .../qjsengine/script/com/__init__.js | 0 .../script/com/trolltech/__init__.js | 0 .../com/trolltech/recursive/__init__.js | 0 .../com/trolltech/syntaxerror/__init__.js | 0 .../qjsengine/tst_qjsengine.cpp | 0 .../qjsvalue/qjsvalue.pro | 2 +- .../qjsvalue/tst_qjsvalue.cpp | 0 .../qjsvalue/tst_qjsvalue.h | 0 .../qjsvalueiterator/qjsvalueiterator.pro | 2 +- .../qjsvalueiterator/tst_qjsvalueiterator.cpp | 0 tests/auto/qml/qml.pro | 55 + .../{declarative => qml}/qmlmin/qmlmin.pro | 2 +- .../qmlmin/tst_qmlmin.cpp | 40 +- .../qmlplugindump/qmlplugindump.pro | 0 .../qmlplugindump/tst_qmlplugindump.cpp | 0 .../qqmlcomponent}/data/createObject.qml | 0 .../data/createObjectWithScript.qml | 0 .../qqmlcomponent}/data/incubateObject.qml | 0 .../qqmlcomponent/qqmlcomponent.pro} | 14 +- .../qqmlcomponent/tst_qqmlcomponent.cpp} | 52 +- .../qqmlconsole}/data/assert.qml | 0 .../qqmlconsole}/data/exception.qml | 0 .../qqmlconsole}/data/logging.qml | 0 .../qqmlconsole}/data/profiling.qml | 0 .../qqmlconsole}/data/tracing.qml | 2 +- .../qqmlconsole/qqmlconsole.pro} | 10 +- .../qqmlconsole/tst_qqmlconsole.cpp} | 34 +- .../qqmlcontext}/data/Object_22535.qml | 0 .../data/RefreshExpressionsType.qml | 0 .../qqmlcontext}/data/qtbug_22535.qml | 0 .../qqmlcontext}/data/refreshExpressions.qml | 0 .../data/refreshExpressionsRootContext.qml | 0 .../qqmlcontext/qqmlcontext.pro} | 11 +- .../qqmlcontext/tst_qqmlcontext.cpp} | 202 +-- tests/auto/qml/qqmlcpputils/qqmlcpputils.pro | 9 + .../qqmlcpputils/tst_qqmlcpputils.cpp} | 14 +- .../data/AliasBindingsAssignCorrectlyType.qml | 0 .../data/AliasBindingsOverrideTargetType.qml | 0 .../data/AliasBindingsOverrideTargetType3.qml | 0 .../data/AliasToCompositeElementType1.qml | 0 .../data/AliasToCompositeElementType2.qml | 0 .../data/ConstantsOverrideBindings.qml | 0 .../qqmlecmascript}/data/CustomObject.qml | 0 .../data/ElementAssignType.qml | 0 .../qqmlecmascript}/data/MethodsObject.qml | 0 .../data/NestedTypeTransientErrors.qml | 0 .../data/PropertyVarBaseItem.qml | 0 .../data/PropertyVarCircularComponent.qml | 0 .../data/PropertyVarCircularComponent2.qml | 0 .../data/PropertyVarCircularComponent3.qml | 0 .../data/PropertyVarCircularComponent4.qml | 0 .../data/PropertyVarCircularComponent5.qml | 0 .../data/PropertyVarInheritanceComponent.qml | 0 .../data/PropertyVarOwnershipComponent.qml | 0 .../data/ScarceResourceSignalComponentVar.qml | 0 .../ScarceResourceSignalComponentVariant.qml | 0 .../data/ScarceResourceVarComponent.qml | 0 .../qqmlecmascript}/data/Scope6Nested.qml | 0 .../qqmlecmascript}/data/ScopeObject.qml | 0 .../data/SequenceConversionComponent.qml | 0 .../qqmlecmascript}/data/SpuriousWarning.qml | 0 .../data/TypeForDynamicCreation.qml | 0 .../data/aliasBindingsAssignCorrectly.qml | 0 .../data/aliasBindingsOverrideTarget.2.qml | 0 .../data/aliasBindingsOverrideTarget.3.qml | 0 .../data/aliasBindingsOverrideTarget.qml | 0 .../data/aliasPropertyAndBinding.qml | 0 .../data/aliasToCompositeElement.qml | 0 .../data/aliasWritesOverrideBindings.2.qml | 0 .../data/aliasWritesOverrideBindings.3.qml | 0 .../data/aliasWritesOverrideBindings.qml | 0 .../aliasreset/AliasPropertyComponent.qml | 0 .../data/aliasreset/aliasPropertyReset.1.qml | 0 .../data/aliasreset/aliasPropertyReset.2.qml | 0 .../data/aliasreset/aliasPropertyReset.3.qml | 0 .../data/aliasreset/aliasPropertyReset.4.qml | 0 .../data/aliasreset/aliasPropertyReset.5.qml | 0 .../aliasreset/aliasPropertyReset.error.1.qml | 0 .../data/assignBasicTypes.2.qml | 0 .../qqmlecmascript}/data/assignBasicTypes.qml | 0 .../data/assignSequenceTypes.1.qml | 0 .../data/assignSequenceTypes.2.qml | 0 .../data/assignSequenceTypes.3.qml | 0 .../data/assignSequenceTypes.4.qml | 0 .../data/assignSequenceTypes.5.qml | 0 .../data/assignSequenceTypes.6.qml | 0 .../data/assignSequenceTypes.7.qml | 0 .../data/attachedProperty.2.qml | 0 .../qqmlecmascript}/data/attachedProperty.qml | 0 .../data/attachedPropertyScope.qml | 0 .../data/automaticSemicolon.qml | 0 .../qqmlecmascript}/data/bindingLoop.qml | 0 .../qqmlecmascript}/data/blank.js | 0 .../data/boolPropertiesEvaluateAsBool.1.qml | 0 .../data/boolPropertiesEvaluateAsBool.2.qml | 0 .../data/booleanConversion.qml | 0 .../qqmlecmascript}/data/bug.1.qml | 0 .../data/canAssignNullToQObject.1.qml | 0 .../data/canAssignNullToQObject.2.qml | 0 .../propertyChangeSlotErrors.1.qml | 0 .../propertyChangeSlotErrors.2.qml | 0 .../propertyChangeSlotErrors.3.qml | 0 .../propertyChangeSlotErrors.4.qml | 0 .../data/changeslots/propertyChangeSlots.qml | 0 .../qqmlecmascript}/data/compiled.qml | 0 .../data/compositePropertyType.qml | 0 .../data/constantsOverrideBindings.1.qml | 0 .../data/constantsOverrideBindings.2.qml | 0 .../data/constantsOverrideBindings.3.qml | 0 .../data/constantsOverrideBindings.4.qml | 0 .../data/deferredProperties.qml | 0 .../data/deferredPropertiesErrors.qml | 0 .../qqmlecmascript}/data/deleteLater.qml | 0 .../data/deleteWhileBindingRunning.qml | 0 .../qqmlecmascript}/data/deletedEngine.qml | 0 .../qqmlecmascript}/data/deletedObject.qml | 0 .../qqmlecmascript}/data/doubleEvaluate.qml | 0 .../data/dynamicCreation.helper.qml | 0 .../qqmlecmascript}/data/dynamicCreation.qml | 0 .../data/dynamicCreationOwnership.qml | 0 .../data/dynamicDeletion.2.qml | 0 .../qqmlecmascript}/data/dynamicDeletion.qml | 0 .../qqmlecmascript}/data/dynamicString.qml | 0 .../qqmlecmascript}/data/elementAssign.qml | 0 .../qqmlecmascript}/data/enums.1.qml | 0 .../qqmlecmascript}/data/enums.2.qml | 0 .../qqmlecmascript}/data/eval.qml | 0 .../qqmlecmascript}/data/exception.js | 0 .../data/exceptionClearsOnReeval.qml | 0 .../data/exceptionProducesWarning.qml | 0 .../data/exceptionProducesWarning2.qml | 0 .../data/extendedObjectPropertyLookup.qml | 0 .../data/extendedObjectPropertyLookup2.qml | 0 .../qqmlecmascript}/data/extensionObjects.qml | 0 .../data/extensionObjectsPropertyOverride.qml | 0 .../qqmlecmascript}/data/forInLoop.qml | 0 .../qqmlecmascript}/data/function.qml | 0 .../data/functionAssignment.1.qml | 0 .../data/functionAssignment.2.qml | 0 .../data/functionAssignment.js | 0 .../qqmlecmascript}/data/functionErrors.qml | 0 .../handleReferenceManagement.handle.1.qml | 0 .../handleReferenceManagement.handle.2.qml | 0 .../handleReferenceManagement.object.1.qml | 0 .../handleReferenceManagement.object.2.qml | 0 .../data/idShortcutInvalidates.1.qml | 0 .../data/idShortcutInvalidates.qml | 0 .../qqmlecmascript}/data/importScope.1.js | 0 .../qqmlecmascript}/data/importScope.2.js | 0 .../qqmlecmascript}/data/importScope.qml | 0 .../qqmlecmascript}/data/in.qml | 0 .../qqmlecmascript}/data/include.js | 0 .../qqmlecmascript}/data/include.qml | 0 .../qqmlecmascript}/data/include_callback.js | 0 .../qqmlecmascript}/data/include_callback.qml | 0 .../qqmlecmascript}/data/include_pragma.qml | 0 .../data/include_pragma_inner.js | 0 .../data/include_pragma_outer.js | 0 .../qqmlecmascript}/data/include_remote.js | 0 .../qqmlecmascript}/data/include_remote.qml | 0 .../data/include_remote_missing.js | 0 .../data/include_remote_missing.qml | 0 .../qqmlecmascript}/data/include_shared.js | 0 .../qqmlecmascript}/data/include_shared.qml | 0 .../data/invokableObjectArg.qml | 0 .../data/invokableObjectRet.qml | 0 .../qqmlecmascript}/data/js/include2.js | 0 .../qqmlecmascript}/data/js/include3.js | 0 .../qqmlecmascript}/data/jsObject.qml | 0 .../data/jsimport/SpecialRectangleOne.qml | 0 .../data/jsimport/SpecialRectangleTwo.qml | 0 .../data/jsimport/importFive.js | 0 .../data/jsimport/importFour.js | 0 .../data/jsimport/importOne.js | 0 .../data/jsimport/importPragmaLibrary.js | 0 .../importPragmaLibraryWithImports.js | 0 ...rtPragmaLibraryWithPragmaLibraryImports.js | 0 .../data/jsimport/importThree.js | 0 .../data/jsimport/importTwo.js | 0 .../data/jsimport/importWithNoImports.js | 0 .../data/jsimport/testImport.qml | 0 .../data/jsimport/testImportPragmaLibrary.qml | 0 .../testImportPragmaLibraryWithImports.qml | 0 ...tPragmaLibraryWithPragmaLibraryImports.qml | 0 .../data/jsimport/testImportScoping.qml | 0 .../data/jsimport/testModuleImport.js | 0 .../data/jsimport/testScriptImport.js | 0 .../data/jsimportfail/failFive.qml | 0 .../data/jsimportfail/failFour.qml | 0 .../data/jsimportfail/failOne.qml | 0 .../data/jsimportfail/failThree.qml | 0 .../data/jsimportfail/failTwo.qml | 0 .../data/jsimportfail/importOne.js | 0 .../data/jsimportfail/importPragmaLibrary.js | 0 .../data/jsimportfail/importWithImports.js | 0 .../jsimportfail/testImportPragmaLibrary.qml | 0 .../data/jsimportfail/testModuleImport.js | 0 .../data/jsimportfail/testScriptImport.js | 0 .../data/libraryScriptAssert.js | 0 .../data/libraryScriptAssert.qml | 0 .../qqmlecmascript}/data/listAssignment.qml | 0 .../qqmlecmascript}/data/listProperties.qml | 0 .../qqmlecmascript}/data/listToVariant.qml | 0 .../data/metaobjectRevision.qml | 0 .../data/metaobjectRevision2.qml | 0 .../data/metaobjectRevision3.qml | 0 .../data/metaobjectRevision4.qml | 0 .../data/metaobjectRevisionErrors.qml | 0 .../data/metaobjectRevisionErrors2.qml | 0 .../data/metaobjectRevisionErrors3.qml | 0 .../qqmlecmascript}/data/methods.1.qml | 0 .../qqmlecmascript}/data/methods.2.qml | 0 .../qqmlecmascript}/data/methods.3.qml | 0 .../qqmlecmascript}/data/methods.4.qml | 0 .../qqmlecmascript}/data/methods.5.qml | 0 .../moduleapi/moduleApiMajorVersionFail.qml | 0 .../moduleapi/moduleApiMinorVersionFail.qml | 0 .../data/moduleapi/qobjectModuleApi.qml | 0 .../moduleapi/qobjectModuleApiCaching.qml | 0 .../data/moduleapi/qobjectModuleApiEnums.qml | 0 .../moduleapi/qobjectModuleApiWriting.qml | 0 .../data/moduleapi/scriptModuleApi.qml | 0 .../data/moduleapi/scriptModuleApiCaching.qml | 0 .../data/moduleapi/scriptModuleApiWriting.qml | 0 .../data/multiEngineObject.qml | 0 .../data/noSpuriousWarningsAtShutdown.2.qml | 0 .../data/noSpuriousWarningsAtShutdown.qml | 0 .../data/nonExistentAttachedObject.qml | 0 .../qqmlecmascript}/data/nonNotifyable.qml | 0 .../qqmlecmascript}/data/nonscriptable.qml | 0 .../data/nullObjectBinding.qml | 0 .../qqmlecmascript}/data/numberAssignment.qml | 0 .../qqmlecmascript}/data/objectConversion.qml | 0 .../qqmlecmascript}/data/objectName.qml | 0 .../data/objectsCompareAsEqual.qml | 0 .../data/objectsPassThroughSignals.qml | 0 .../outerBindingOverridesInnerBinding.qml | 0 .../qqmlecmascript}/data/ownership.qml | 0 .../data/propertyAssignmentErrors.qml | 0 .../qqmlecmascript}/data/propertySplicing.qml | 0 .../qqmlecmascript}/data/propertyVar.1.qml | 0 .../qqmlecmascript}/data/propertyVar.10.qml | 0 .../qqmlecmascript}/data/propertyVar.2.qml | 0 .../qqmlecmascript}/data/propertyVar.3.qml | 0 .../qqmlecmascript}/data/propertyVar.4.qml | 0 .../qqmlecmascript}/data/propertyVar.5.qml | 0 .../qqmlecmascript}/data/propertyVar.6.qml | 0 .../qqmlecmascript}/data/propertyVar.7.qml | 0 .../qqmlecmascript}/data/propertyVar.8.qml | 0 .../qqmlecmascript}/data/propertyVar.9.qml | 0 .../data/propertyVar.circular.2.qml | 0 .../data/propertyVar.circular.qml | 0 .../data/propertyVar.inherit.qml | 0 .../data/propertyVar.reparent.qml | 0 .../qqmlecmascript}/data/propertyVarCpp.qml | 0 .../data/propertyVarImplicitOwnership.qml | 0 .../data/propertyVarOwnership.2.qml | 0 .../data/propertyVarOwnership.3.qml | 0 .../data/propertyVarOwnership.3.type.qml | 0 .../data/propertyVarOwnership.4.qml | 0 .../data/propertyVarOwnership.4.type1.qml | 0 .../data/propertyVarOwnership.4.type2.qml | 0 .../data/propertyVarOwnership.qml | 0 .../data/qlistqobjectMethods.qml | 0 .../data/qmlHasOwnProperty.qml} | 0 .../qqmlecmascript/data/qmlToString.qml} | 0 ...qobjectConnectionListExceptionHandling.qml | 0 .../data/qobjectDerivedArgument.qml | 0 .../qqmlecmascript}/data/qtbug_10696.qml | 0 .../qqmlecmascript}/data/qtbug_11600.js | 0 .../qqmlecmascript}/data/qtbug_11600.qml | 0 .../qqmlecmascript}/data/qtbug_11606.qml | 0 .../qqmlecmascript}/data/qtbug_20344.qml | 0 .../qqmlecmascript}/data/qtbug_21580.qml | 0 .../qqmlecmascript}/data/qtbug_21864.js | 0 .../qqmlecmascript}/data/qtbug_21864.qml | 0 .../qqmlecmascript}/data/qtbug_22464.qml | 0 .../qqmlecmascript}/data/qtbug_22679.qml | 0 .../qqmlecmascript}/data/qtbug_22843.js | 0 .../data/qtbug_22843.library.js | 0 .../data/qtbug_22843.library.qml | 0 .../qqmlecmascript}/data/qtbug_22843.qml | 0 .../qqmlecmascript}/data/qtbug_9792.qml | 0 .../data/qtcreatorbug_1289.qml | 0 .../data/readonlyDeclaration.qml | 0 .../qqmlecmascript}/data/realToInt.qml | 0 .../qqmlecmascript}/data/regExp.2.qml | 0 .../qqmlecmascript}/data/regExp.qml | 0 .../qqmlecmascript}/data/remote_file.js | 0 .../data/rewriteMultiLineStrings.qml | 0 .../data/scarceResourceCopy.var.qml | 0 .../data/scarceResourceCopy.variant.qml | 0 .../data/scarceResourceCopyFromJs.var.qml | 0 .../data/scarceResourceCopyFromJs.variant.qml | 0 .../data/scarceResourceCopyImport.var.js | 0 .../data/scarceResourceCopyImport.var.qml | 0 .../data/scarceResourceCopyImport.variant.js | 0 .../data/scarceResourceCopyImport.variant.qml | 0 .../scarceResourceCopyImportDifferent.var.js | 0 .../scarceResourceCopyImportDifferent.var.qml | 0 .../data/scarceResourceCopyImportFail.var.js | 0 .../data/scarceResourceCopyImportFail.var.qml | 0 .../scarceResourceCopyImportFail.variant.js | 0 .../scarceResourceCopyImportFail.variant.qml | 0 .../scarceResourceCopyImportNoBinding.var.js | 0 .../scarceResourceCopyImportNoBinding.var.qml | 0 ...arceResourceCopyImportNoBinding.variant.js | 0 ...rceResourceCopyImportNoBinding.variant.qml | 0 .../data/scarceResourceCopyNoBinding.var.qml | 0 .../scarceResourceCopyNoBinding.variant.qml | 0 .../data/scarceResourceDestroyedCopy.var.qml | 0 .../scarceResourceDestroyedCopy.variant.qml | 0 .../data/scarceResourceFunction.var.qml | 0 .../data/scarceResourceFunction.variant.qml | 0 .../data/scarceResourceFunctionFail.var.qml | 2 +- .../scarceResourceFunctionFail.variant.qml | 2 +- ...eResourceMultipleDifferentNoBinding.var.js | 0 ...ResourceMultipleDifferentNoBinding.var.qml | 0 ...scarceResourceMultipleSameNoBinding.var.js | 0 ...carceResourceMultipleSameNoBinding.var.qml | 0 ...rceResourceMultipleSameWithBinding.var.qml | 0 .../data/scarceResourceObjectGc.var.qml | 0 .../data/scarceResourceSignal.var.qml | 0 .../data/scarceResourceSignal.variant.qml | 0 .../data/scarceResourceTest.var.js | 0 .../data/scarceResourceTest.var.qml | 0 .../data/scarceResourceTest.variant.js | 0 .../data/scarceResourceTest.variant.qml | 0 .../data/scarceResourceTestMultiple.var.qml | 0 .../scarceResourceTestMultiple.variant.qml | 0 .../data/scarceResourceTestPreserve.var.qml | 0 .../scarceResourceTestPreserve.variant.qml | 0 .../qqmlecmascript}/data/scope.2.qml | 0 .../qqmlecmascript}/data/scope.3.qml | 0 .../qqmlecmascript}/data/scope.4.qml | 0 .../qqmlecmascript}/data/scope.5.qml | 0 .../qqmlecmascript}/data/scope.6.qml | 0 .../qqmlecmascript}/data/scope.qml | 0 .../qqmlecmascript}/data/scriptConnect.1.js | 0 .../qqmlecmascript}/data/scriptConnect.1.qml | 0 .../qqmlecmascript}/data/scriptConnect.2.js | 0 .../qqmlecmascript}/data/scriptConnect.2.qml | 0 .../qqmlecmascript}/data/scriptConnect.3.qml | 0 .../qqmlecmascript}/data/scriptConnect.4.qml | 0 .../qqmlecmascript}/data/scriptConnect.5.qml | 0 .../qqmlecmascript}/data/scriptConnect.6.js | 0 .../qqmlecmascript}/data/scriptConnect.6.qml | 0 .../data/scriptDisconnect.1.js | 0 .../data/scriptDisconnect.1.qml | 0 .../data/scriptDisconnect.2.qml | 0 .../data/scriptDisconnect.3.qml | 0 .../data/scriptDisconnect.4.qml | 0 .../qqmlecmascript}/data/scriptErrors.js | 0 .../qqmlecmascript}/data/scriptErrors.qml | 0 .../data/selfDeletingBinding.2.qml | 0 .../data/selfDeletingBinding.qml | 0 .../data/sequenceConversion.array.qml | 0 .../sequenceConversion.bindings.error.qml | 0 .../data/sequenceConversion.bindings.qml | 0 .../data/sequenceConversion.copy.qml | 0 .../data/sequenceConversion.indexes.qml | 0 .../data/sequenceConversion.read.error.qml | 0 .../data/sequenceConversion.read.qml | 0 .../data/sequenceConversion.threads.qml | 0 .../data/sequenceConversion.write.error.qml | 0 .../data/sequenceConversion.write.qml | 0 .../data/sharedAttachedObject.qml | 0 .../qqmlecmascript}/data/shutdownErrors.qml | 0 .../data/signalAssignment.1.qml | 0 .../data/signalAssignment.2.qml | 0 .../qqmlecmascript}/data/signalHandlers.qml | 0 .../data/signalParameterTypes.qml | 0 .../data/signalTriggeredBindings.qml | 0 .../data/signalWithJSValueInVariant.qml | 0 .../data/signalWithQJSValue.qml | 0 .../data/signalWithUnknownTypes.qml | 0 .../qqmlecmascript}/data/strictlyEquals.qml | 0 .../qqmlecmascript}/data/stringArg.qml | 0 .../data/switchStatement.1.qml | 0 .../data/switchStatement.2.qml | 0 .../data/switchStatement.3.qml | 0 .../data/switchStatement.4.qml | 0 .../data/switchStatement.5.qml | 0 .../data/switchStatement.6.qml | 0 .../qqmlecmascript}/data/threadScript.js | 0 .../data/transientErrors.2.qml | 0 .../qqmlecmascript}/data/transientErrors.qml | 0 .../qqmlecmascript}/data/tryStatement.1.qml | 0 .../qqmlecmascript}/data/tryStatement.2.qml | 0 .../qqmlecmascript}/data/tryStatement.3.qml | 0 .../qqmlecmascript}/data/tryStatement.4.qml | 0 .../qqmlecmascript}/data/typeOf.js | 0 .../qqmlecmascript}/data/typeOf.qml | 0 .../qqmlecmascript}/data/unaryExpression.qml | 0 .../data/undefinedResetsProperty.2.qml | 0 .../data/undefinedResetsProperty.qml | 0 .../qqmlecmascript}/data/urlListProperty.qml | 0 .../qqmlecmascript}/data/urlProperty.1.qml | 0 .../qqmlecmascript}/data/urlProperty.2.qml | 0 .../data/v8bindingException.qml | 0 .../data/v8functionException.qml | 0 .../data/valueTypeFunctions.qml | 0 .../data/variantsAssignedUndefined.qml | 0 .../qqmlecmascript}/data/withStatement.1.qml | 0 .../data/writeAttachedProperty.qml | 0 .../data/writeRemovesBinding.qml | 0 .../qqmlecmascript/qqmlecmascript.pro} | 6 +- .../qqmlecmascript}/testtypes.cpp | 12 +- .../qqmlecmascript}/testtypes.h | 56 +- .../qqmlecmascript/tst_qqmlecmascript.cpp} | 1094 ++++++++--------- tests/auto/qml/qqmlengine/qqmlengine.pro | 9 + .../qqmlengine/tst_qqmlengine.cpp} | 132 +- .../qqmlerror}/data/test.txt | 0 tests/auto/qml/qqmlerror/qqmlerror.pro | 15 + .../qqmlerror/tst_qqmlerror.cpp} | 54 +- .../qqmlexpression}/data/scriptString.qml | 0 .../qml/qqmlexpression/qqmlexpression.pro | 15 + .../qqmlexpression/tst_qqmlexpression.cpp} | 54 +- .../qqmlimageprovider/qqmlimageprovider.pro | 9 + .../tst_qqmlimageprovider.cpp} | 80 +- .../data/AsynchronousIfNestedType.qml | 0 .../data/asynchronousIfNested.1.qml | 0 .../data/asynchronousIfNested.2.qml | 0 .../data/asynchronousIfNested.3.qml | 0 .../qqmlincubator}/data/chainInCompletion.qml | 0 .../data/chainedAsynchronousIfNested.qml | 0 .../qqmlincubator}/data/clear.qml | 0 .../data/clearDuringCompletion.qml | 0 .../qqmlincubator}/data/contextDelete.qml | 0 .../qqmlincubator}/data/forceCompletion.qml | 0 .../qqmlincubator}/data/nestedComponent.js | 0 .../qqmlincubator}/data/nestedComponent.qml | 0 .../data/noIncubationController.qml | 0 .../data/objectDeleted.errors.txt | 0 .../qqmlincubator}/data/objectDeleted.qml | 0 .../qqmlincubator}/data/recursiveClear.1.qml | 0 .../qqmlincubator}/data/recursiveClear.2.qml | 0 .../qqmlincubator}/data/selfDelete.qml | 0 .../qqmlincubator}/data/setInitialState.qml | 0 .../data/statusChanged.nested.qml | 0 .../qqmlincubator}/data/statusChanged.qml | 0 .../qqmlincubator/qqmlincubator.pro} | 10 +- .../qqmlincubator}/testtypes.cpp | 2 +- .../qqmlincubator}/testtypes.h | 10 +- .../qqmlincubator/tst_qqmlincubator.cpp} | 292 ++--- .../qqmlinfo}/data/NestedComponent.qml | 0 .../qqmlinfo}/data/NestedObject.qml | 0 .../qqmlinfo}/data/nestedQmlObject.qml | 0 .../qqmlinfo}/data/qmlObject.qml | 0 tests/auto/qml/qqmlinfo/qqmlinfo.pro | 14 + .../qqmlinfo/tst_qqmlinfo.cpp} | 44 +- .../qml/qqmlinstruction/qqmlinstruction.pro | 8 + .../qqmlinstruction/tst_qqmlinstruction.cpp} | 194 +-- .../qqmllanguage}/data/Alias.qml | 0 .../qqmllanguage}/data/Alias2.qml | 0 .../qqmllanguage}/data/Alias3.qml | 0 .../qqmllanguage}/data/Alias4.qml | 0 .../data/AliasPropertyChangeSignalsType.qml | 0 .../qqmllanguage}/data/ComponentComposite.qml | 0 .../qqmllanguage}/data/CompositeType.qml | 0 .../qqmllanguage}/data/CompositeType2.qml | 0 .../qqmllanguage}/data/CompositeType3.qml | 0 .../qqmllanguage}/data/CompositeType4.qml | 0 .../data/DontDoubleCallClassBeginItem.qml | 0 .../data/DynamicPropertiesNestedType.qml | 0 .../qqmllanguage}/data/HelperAlias.qml | 0 .../qqmllanguage}/data/I18n.qml | 0 .../qqmllanguage}/data/I18nType30.qml | 0 .../InlineAssignmentsOverrideBindingsType.qml | 0 ...InlineAssignmentsOverrideBindingsType2.qml | 0 .../qqmllanguage}/data/LocalLast.qml | 0 .../qqmllanguage}/data/MyComponent.qml | 0 .../data/MyCompositeValueSource.qml | 0 .../data/MyContainerComponent.qml | 0 .../qqmllanguage}/data/NestedAlias.qml | 0 .../data/NestedComponentRoot.qml | 0 .../qqmllanguage}/data/NestedErrorsType.qml | 0 .../qqmllanguage}/data/OnCompletedType.qml | 0 .../qqmllanguage}/data/OnDestructionType.qml | 0 .../qqmllanguage}/data/ReadOnlyType.qml | 0 .../qqmllanguage}/data/alias.1.qml | 0 .../qqmllanguage}/data/alias.10.qml | 0 .../qqmllanguage}/data/alias.11.qml | 0 .../qqmllanguage}/data/alias.2.qml | 0 .../qqmllanguage}/data/alias.3.qml | 0 .../qqmllanguage}/data/alias.4.qml | 0 .../qqmllanguage}/data/alias.5.qml | 0 .../qqmllanguage}/data/alias.6.qml | 0 .../qqmllanguage}/data/alias.7.qml | 0 .../qqmllanguage}/data/alias.8.qml | 0 .../qqmllanguage}/data/alias.9.qml | 0 .../data/aliasPropertiesAndSignals.qml | 0 .../data/aliasPropertyChangeSignals.2.qml | 0 .../data/aliasPropertyChangeSignals.qml | 0 .../data/allowedRevisionOverloads.qml | 0 .../qqmllanguage}/data/assignBasicTypes.qml | 0 .../data/assignCompositeToType.qml | 0 .../data/assignLiteralSignalProperty.qml | 0 .../qqmllanguage}/data/assignLiteralToVar.qml | 0 .../data/assignLiteralToVariant.qml | 0 .../data/assignObjectToSignal.qml | 0 .../data/assignObjectToVariant.qml | 0 .../qqmllanguage}/data/assignQmlComponent.qml | 0 .../qqmllanguage}/data/assignSignal.qml | 0 .../data/assignToNamespace.errors.txt | 0 .../qqmllanguage}/data/assignToNamespace.qml | 0 .../qqmllanguage}/data/assignTypeExtremes.qml | 0 .../data/assignValueToSignal.errors.txt | 0 .../data/assignValueToSignal.qml | 0 .../qqmllanguage}/data/attachedProperties.qml | 0 .../data/autoComponentCreation.qml | 0 .../data/autoNotifyConnection.qml | 0 .../qqmllanguage}/data/component.1.errors.txt | 0 .../qqmllanguage}/data/component.1.qml | 0 .../qqmllanguage}/data/component.2.errors.txt | 0 .../qqmllanguage}/data/component.2.qml | 0 .../qqmllanguage}/data/component.3.errors.txt | 0 .../qqmllanguage}/data/component.3.qml | 0 .../qqmllanguage}/data/component.4.errors.txt | 0 .../qqmllanguage}/data/component.4.qml | 0 .../qqmllanguage}/data/component.5.errors.txt | 0 .../qqmllanguage}/data/component.5.qml | 0 .../qqmllanguage}/data/component.6.errors.txt | 0 .../qqmllanguage}/data/component.6.qml | 0 .../qqmllanguage}/data/component.7.errors.txt | 0 .../qqmllanguage}/data/component.7.qml | 0 .../qqmllanguage}/data/component.8.errors.txt | 0 .../qqmllanguage}/data/component.8.qml | 0 .../qqmllanguage}/data/component.9.errors.txt | 0 .../qqmllanguage}/data/component.9.qml | 0 .../data/componentCompositeType.qml | 0 .../qqmllanguage}/data/cppnamespace.2.qml | 0 .../qqmllanguage}/data/cppnamespace.qml | 0 .../qqmllanguage}/data/crash2.qml | 0 .../qqmllanguage}/data/customOnProperty.qml | 0 .../data/customParserIdNotAllowed.errors.txt | 0 .../data/customParserIdNotAllowed.qml | 0 .../qqmllanguage}/data/customParserTypes.qml | 0 .../qqmllanguage}/data/customVariantTypes.qml | 0 .../data/declaredPropertyValues.qml | 0 .../data/defaultGrouped.errors.txt | 0 .../qqmllanguage}/data/defaultGrouped.qml | 0 .../data/defaultPropertyListOrder.qml | 0 .../data/destroyedSignal.errors.txt | 0 .../qqmllanguage}/data/destroyedSignal.qml | 0 .../disallowedRevisionOverloads.errors.txt | 0 .../data/disallowedRevisionOverloads.qml | 0 .../data/dontDoubleCallClassBegin.qml | 0 .../data/doubleSignal.errors.txt | 0 .../qqmllanguage}/data/doubleSignal.qml | 0 .../data/duplicateIDs.errors.txt | 0 .../qqmllanguage}/data/duplicateIDs.qml | 0 .../data/dynamicMeta.1.errors.txt | 0 .../qqmllanguage}/data/dynamicMeta.1.qml | 0 .../data/dynamicMeta.2.errors.txt | 0 .../qqmllanguage}/data/dynamicMeta.2.qml | 0 .../data/dynamicMeta.3.errors.txt | 0 .../qqmllanguage}/data/dynamicMeta.3.qml | 0 .../data/dynamicMeta.4.errors.txt | 0 .../qqmllanguage}/data/dynamicMeta.4.qml | 0 .../data/dynamicMeta.5.errors.txt | 0 .../qqmllanguage}/data/dynamicMeta.5.qml | 0 .../qqmllanguage}/data/dynamicObject.1.qml | 0 .../data/dynamicObjectProperties.2.qml | 0 .../data/dynamicObjectProperties.qml | 0 .../qqmllanguage}/data/dynamicProperties.qml | 0 .../data/dynamicPropertiesNested.qml | 0 .../data/dynamicSignalsAndSlots.qml | 0 .../qqmllanguage}/data/empty.errors.txt | 0 .../qqmllanguage}/data/empty.qml | 0 .../qqmllanguage}/data/emptySignal.errors.txt | 0 .../qqmllanguage}/data/emptySignal.qml | 0 .../qqmllanguage}/data/enumTypes.errors.txt | 0 .../qqmllanguage}/data/enumTypes.qml | 0 .../data/failingComponent.errors.txt | 0 .../data/failingComponentTest.qml | 0 .../data/fakeDotProperty.errors.txt | 0 .../qqmllanguage}/data/fakeDotProperty.qml | 0 .../data/finalOverride.errors.txt | 0 .../qqmllanguage}/data/finalOverride.qml | 0 .../data/i18nDeclaredPropertyNames.qml | 0 .../data/i18nDeclaredPropertyUse.qml | 0 .../qqmllanguage}/data/i18nNameSpace.qml | 0 .../qqmllanguage}/data/i18nScript.qml | 0 .../qqmllanguage}/data/i18nStrings.qml | 0 .../qqmllanguage}/data/i18nType.qml | 0 .../qqmllanguage}/data/idProperty.qml | 0 .../qqmllanguage}/data/importFile.errors.txt | 0 .../qqmllanguage}/data/importFile.qml | 0 .../data/importIncorrectCase.qml | 0 .../qqmllanguage}/data/importJs.1.errors.txt | 0 .../qqmllanguage}/data/importJs.1.qml | 0 .../qqmllanguage}/data/importJs.10.errors.txt | 0 .../qqmllanguage}/data/importJs.10.qml | 0 .../qqmllanguage}/data/importJs.2.errors.txt | 0 .../qqmllanguage}/data/importJs.2.qml | 0 .../qqmllanguage}/data/importJs.3.errors.txt | 0 .../qqmllanguage}/data/importJs.3.qml | 0 .../qqmllanguage}/data/importJs.4.errors.txt | 0 .../qqmllanguage}/data/importJs.4.qml | 0 .../qqmllanguage}/data/importJs.5.errors.txt | 0 .../qqmllanguage}/data/importJs.5.qml | 0 .../qqmllanguage}/data/importJs.6.errors.txt | 0 .../qqmllanguage}/data/importJs.6.qml | 0 .../qqmllanguage}/data/importJs.7.errors.txt | 0 .../qqmllanguage}/data/importJs.7.qml | 0 .../qqmllanguage}/data/importJs.8.errors.txt | 0 .../qqmllanguage}/data/importJs.8.qml | 0 .../qqmllanguage}/data/importJs.9.errors.txt | 0 .../qqmllanguage}/data/importJs.9.qml | 0 .../data/importNamespaceConflict.errors.txt | 0 .../data/importNamespaceConflict.qml | 0 .../data/importNewerVersion.errors.txt | 0 .../qqmllanguage}/data/importNewerVersion.qml | 0 .../data/importNonExist.errors.txt | 0 .../qqmllanguage}/data/importNonExist.qml | 0 .../data/importNonExistOlder.errors.txt | 0 .../data/importNonExistOlder.qml | 0 .../importVersionMissingBuiltIn.errors.txt | 0 .../data/importVersionMissingBuiltIn.qml | 0 .../importVersionMissingInstalled.errors.txt | 0 .../data/importVersionMissingInstalled.qml | 0 .../data/importscript.1.errors.txt | 0 .../qqmllanguage}/data/importscript.1.qml | 0 .../data/incorrectCase.errors.insensitive.txt | 0 .../data/incorrectCase.errors.sensitive.txt | 0 .../qqmllanguage}/data/incorrectCase.qml | 0 .../qqmllanguage}/data/incorrectCaseType.qml | 0 .../inlineAssignmentsOverrideBindings.qml | 0 .../data/inlineQmlComponents.qml | 0 .../data/insertedSemicolon.1.errors.txt | 0 .../data/insertedSemicolon.1.qml | 0 .../qqmllanguage}/data/interfaceProperty.qml | 0 .../qqmllanguage}/data/interfaceQList.qml | 0 .../data/invalidAlias.1.errors.txt | 0 .../qqmllanguage}/data/invalidAlias.1.qml | 0 .../data/invalidAlias.10.errors.txt | 0 .../qqmllanguage}/data/invalidAlias.10.qml | 0 .../data/invalidAlias.2.errors.txt | 0 .../qqmllanguage}/data/invalidAlias.2.qml | 0 .../data/invalidAlias.3.errors.txt | 0 .../qqmllanguage}/data/invalidAlias.3.qml | 0 .../data/invalidAlias.4.errors.txt | 0 .../qqmllanguage}/data/invalidAlias.4.qml | 0 .../data/invalidAlias.5.errors.txt | 0 .../qqmllanguage}/data/invalidAlias.5.qml | 0 .../data/invalidAlias.6.errors.txt | 0 .../qqmllanguage}/data/invalidAlias.6.qml | 0 .../data/invalidAlias.7.errors.txt | 0 .../qqmllanguage}/data/invalidAlias.7.qml | 0 .../data/invalidAlias.8.errors.txt | 0 .../qqmllanguage}/data/invalidAlias.8.qml | 0 .../data/invalidAlias.9.errors.txt | 0 .../qqmllanguage}/data/invalidAlias.9.qml | 0 .../data/invalidAttachedProperty.1.errors.txt | 0 .../data/invalidAttachedProperty.1.qml | 0 .../invalidAttachedProperty.10.errors.txt | 0 .../data/invalidAttachedProperty.10.qml | 0 .../invalidAttachedProperty.11.errors.txt | 0 .../data/invalidAttachedProperty.11.qml | 0 .../invalidAttachedProperty.12.errors.txt | 0 .../data/invalidAttachedProperty.12.qml | 0 .../invalidAttachedProperty.13.errors.txt | 0 .../data/invalidAttachedProperty.13.qml | 0 .../data/invalidAttachedProperty.2.errors.txt | 0 .../data/invalidAttachedProperty.2.qml | 0 .../data/invalidAttachedProperty.3.errors.txt | 0 .../data/invalidAttachedProperty.3.qml | 0 .../data/invalidAttachedProperty.4.errors.txt | 0 .../data/invalidAttachedProperty.4.qml | 0 .../data/invalidAttachedProperty.5.errors.txt | 0 .../data/invalidAttachedProperty.5.qml | 0 .../data/invalidAttachedProperty.6.errors.txt | 0 .../data/invalidAttachedProperty.6.qml | 0 .../data/invalidAttachedProperty.7.errors.txt | 0 .../data/invalidAttachedProperty.7.qml | 0 .../data/invalidAttachedProperty.8.errors.txt | 0 .../data/invalidAttachedProperty.8.qml | 0 .../data/invalidAttachedProperty.9.errors.txt | 0 .../data/invalidAttachedProperty.9.qml | 0 .../data/invalidGroupedProperty.1.errors.txt | 0 .../data/invalidGroupedProperty.1.qml | 0 .../data/invalidGroupedProperty.10.errors.txt | 0 .../data/invalidGroupedProperty.10.qml | 0 .../data/invalidGroupedProperty.2.errors.txt | 0 .../data/invalidGroupedProperty.2.qml | 0 .../data/invalidGroupedProperty.3.errors.txt | 0 .../data/invalidGroupedProperty.3.qml | 0 .../data/invalidGroupedProperty.4.errors.txt | 0 .../data/invalidGroupedProperty.4.qml | 0 .../data/invalidGroupedProperty.5.errors.txt | 0 .../data/invalidGroupedProperty.5.qml | 0 .../data/invalidGroupedProperty.6.errors.txt | 0 .../data/invalidGroupedProperty.6.qml | 0 .../data/invalidGroupedProperty.7.errors.txt | 0 .../data/invalidGroupedProperty.7.qml | 0 .../data/invalidGroupedProperty.8.errors.txt | 0 .../data/invalidGroupedProperty.8.qml | 0 .../data/invalidGroupedProperty.9.errors.txt | 0 .../data/invalidGroupedProperty.9.qml | 0 .../qqmllanguage}/data/invalidID.2.errors.txt | 0 .../qqmllanguage}/data/invalidID.2.qml | 0 .../qqmllanguage}/data/invalidID.3.errors.txt | 0 .../qqmllanguage}/data/invalidID.3.qml | 0 .../qqmllanguage}/data/invalidID.4.errors.txt | 0 .../qqmllanguage}/data/invalidID.4.qml | 0 .../qqmllanguage}/data/invalidID.5.errors.txt | 0 .../qqmllanguage}/data/invalidID.5.qml | 0 .../qqmllanguage}/data/invalidID.6.errors.txt | 0 .../qqmllanguage}/data/invalidID.6.qml | 0 .../qqmllanguage}/data/invalidID.7.errors.txt | 0 .../qqmllanguage}/data/invalidID.7.qml | 0 .../qqmllanguage}/data/invalidID.8.errors.txt | 0 .../qqmllanguage}/data/invalidID.8.qml | 0 .../qqmllanguage}/data/invalidID.9.errors.txt | 0 .../qqmllanguage}/data/invalidID.9.qml | 0 .../qqmllanguage}/data/invalidID.errors.txt | 0 .../qqmllanguage}/data/invalidID.qml | 0 .../data/invalidImportID.errors.txt | 0 .../qqmllanguage}/data/invalidImportID.qml | 0 .../qqmllanguage}/data/invalidOn.errors.txt | 0 .../qqmllanguage}/data/invalidOn.qml | 0 .../data/invalidProperty.errors.txt | 0 .../qqmllanguage}/data/invalidProperty.qml | 0 .../data/invalidRoot.1.errors.txt | 0 .../qqmllanguage}/data/invalidRoot.1.qml | 0 .../data/invalidRoot.2.errors.txt | 0 .../qqmllanguage}/data/invalidRoot.2.qml | 0 .../data/invalidRoot.3.errors.txt | 0 .../qqmllanguage}/data/invalidRoot.3.qml | 0 .../data/invalidRoot.4.errors.txt | 0 .../qqmllanguage}/data/invalidRoot.4.qml | 0 .../data/invalidTypeName.1.errors.txt | 0 .../qqmllanguage}/data/invalidTypeName.1.qml | 0 .../data/invalidTypeName.2.errors.txt | 0 .../qqmllanguage}/data/invalidTypeName.2.qml | 0 .../data/invalidTypeName.3.errors.txt | 0 .../qqmllanguage}/data/invalidTypeName.3.qml | 0 .../data/invalidTypeName.4.errors.txt | 0 .../qqmllanguage}/data/invalidTypeName.4.qml | 0 .../nokia/PureJsModule.1.6/FirstAPI.1.6.js | 0 .../com/nokia/PureJsModule.1.6/FirstAPI.js | 0 .../com/nokia/PureJsModule.1.6/SecondAPI.js | 0 .../lib/com/nokia/PureJsModule.1.6/qmldir | 0 .../lib/com/nokia/PureJsModule/FirstAPI.js | 0 .../lib/com/nokia/PureJsModule/SecondAPI.js | 0 .../data/lib/com/nokia/PureJsModule/qmldir | 0 .../VersionedOnlyJsModule.9.0/SomeAPI.js | 0 .../nokia/VersionedOnlyJsModule.9.0/qmldir | 0 .../com/nokia/installedtest/InstalledTest.qml | 0 .../nokia/installedtest/InstalledTest2.qml | 0 .../lib/com/nokia/installedtest/LocalLast.qml | 0 .../com/nokia/installedtest/PrivateType.qml | 0 .../data/lib/com/nokia/installedtest/qmldir | 0 .../nokia/installedtest0/InstalledTest.qml | 0 .../nokia/installedtest0/InstalledTest2.qml | 0 .../data/lib/com/nokia/installedtest0/qmldir | 0 .../data/listAssignment.1.errors.txt | 0 .../qqmllanguage}/data/listAssignment.1.qml | 0 .../data/listAssignment.2.errors.txt | 0 .../qqmllanguage}/data/listAssignment.2.qml | 0 .../data/listAssignment.3.errors.txt | 0 .../qqmllanguage}/data/listAssignment.3.qml | 0 .../qqmllanguage}/data/listItemDeleteSelf.qml | 0 .../qqmllanguage}/data/listProperties.qml | 0 .../data/majorVersionIsolation.errors.txt | 0 .../data/majorVersionIsolation.qml | 0 .../data/metaobjectRevision.1.errors.txt | 0 .../data/metaobjectRevision.1.qml | 0 .../data/metaobjectRevision.2.errors.txt | 0 .../data/metaobjectRevision.2.qml | 0 .../data/metaobjectRevision.3.errors.txt | 0 .../data/metaobjectRevision.3.qml | 0 .../qqmllanguage}/data/method.1.errors.txt | 0 .../qqmllanguage}/data/method.1.qml | 0 .../data/missingObject.errors.txt | 0 .../qqmllanguage}/data/missingObject.qml | 0 .../data/missingSignal.errors.txt | 0 .../qqmllanguage}/data/missingSignal.qml | 0 .../data/missingValueTypeProperty.errors.txt | 0 .../data/missingValueTypeProperty.qml | 0 .../qqmllanguage}/data/multiSet.1.errors.txt | 0 .../qqmllanguage}/data/multiSet.1.qml | 0 .../qqmllanguage}/data/multiSet.10.errors.txt | 0 .../qqmllanguage}/data/multiSet.10.qml | 0 .../qqmllanguage}/data/multiSet.11.errors.txt | 0 .../qqmllanguage}/data/multiSet.11.qml | 0 .../qqmllanguage}/data/multiSet.2.errors.txt | 0 .../qqmllanguage}/data/multiSet.2.qml | 0 .../qqmllanguage}/data/multiSet.3.errors.txt | 0 .../qqmllanguage}/data/multiSet.3.qml | 0 .../qqmllanguage}/data/multiSet.4.errors.txt | 0 .../qqmllanguage}/data/multiSet.4.qml | 0 .../qqmllanguage}/data/multiSet.5.errors.txt | 0 .../qqmllanguage}/data/multiSet.5.qml | 0 .../qqmllanguage}/data/multiSet.6.errors.txt | 0 .../qqmllanguage}/data/multiSet.6.qml | 0 .../qqmllanguage}/data/multiSet.7.errors.txt | 0 .../qqmllanguage}/data/multiSet.7.qml | 0 .../qqmllanguage}/data/multiSet.8.errors.txt | 0 .../qqmllanguage}/data/multiSet.8.qml | 0 .../qqmllanguage}/data/multiSet.9.errors.txt | 0 .../qqmllanguage}/data/multiSet.9.qml | 0 .../data/nestedComponentRoots.qml | 0 .../data/nestedErrors.errors.txt | 0 .../qqmllanguage}/data/nestedErrors.qml | 0 .../qqmllanguage}/data/noCreation.errors.txt | 0 .../qqmllanguage}/data/noCreation.qml | 0 .../data/nonScriptableProperty.errors.txt | 0 .../data/nonScriptableProperty.qml | 0 .../data/nonexistantProperty.1.errors.txt | 0 .../data/nonexistantProperty.1.qml | 0 .../data/nonexistantProperty.2.errors.txt | 0 .../data/nonexistantProperty.2.qml | 0 .../data/nonexistantProperty.3.errors.txt | 0 .../data/nonexistantProperty.3.qml | 0 .../data/nonexistantProperty.4.errors.txt | 0 .../data/nonexistantProperty.4.qml | 0 .../data/nonexistantProperty.5.errors.txt | 0 .../data/nonexistantProperty.5.qml | 0 .../data/nonexistantProperty.6.errors.txt | 0 .../data/nonexistantProperty.6.qml | 0 .../data/notAvailable.errors.txt | 0 .../qqmllanguage}/data/notAvailable.qml | 0 .../data/nullDotProperty.errors.txt | 0 .../qqmllanguage}/data/nullDotProperty.qml | 0 .../data/objectValueTypeProperty.errors.txt | 0 .../data/objectValueTypeProperty.qml | 0 .../qqmllanguage}/data/onCompleted.qml | 0 .../qqmllanguage}/data/onDestruction.qml | 0 .../qqmllanguage}/data/property.1.errors.txt | 0 .../qqmllanguage}/data/property.1.qml | 0 .../qqmllanguage}/data/property.2.errors.txt | 0 .../qqmllanguage}/data/property.2.qml | 0 .../qqmllanguage}/data/property.3.errors.txt | 0 .../qqmllanguage}/data/property.3.qml | 0 .../qqmllanguage}/data/property.4.errors.txt | 0 .../qqmllanguage}/data/property.4.qml | 0 .../qqmllanguage}/data/property.6.errors.txt | 0 .../qqmllanguage}/data/property.6.qml | 0 .../qqmllanguage}/data/property.7.errors.txt | 0 .../qqmllanguage}/data/property.7.qml | 0 .../qqmllanguage}/data/propertyInit.1.qml | 0 .../qqmllanguage}/data/propertyInit.2.qml | 0 .../data/propertyValueSource.2.qml | 0 .../data/propertyValueSource.qml | 0 .../qmlAttachedPropertiesObjectMethod.1.qml | 0 .../qmlAttachedPropertiesObjectMethod.2.qml | 0 .../qtest/qml/qqmllanguage}/LocalInternal.qml | 0 .../data/qtest/qml/qqmllanguage}/Test.qml | 0 .../qtest/qml/qqmllanguage}/TestLocal.qml | 0 .../qtest/qml/qqmllanguage}/TestNamed.qml | 0 .../qtest/qml/qqmllanguage}/TestSubDir.qml | 0 .../qml/qqmllanguage}/UndeclaredLocal.qml | 0 .../qml/qqmllanguage}/WrongTestLocal.qml | 0 .../qtest/qml/qqmllanguage}/noqmldir/Test.qml | 0 .../qtest/qml/qqmllanguage}/pics/blue.png | Bin .../data/qtest/qml/qqmllanguage}/qmldir | 0 .../qml/qqmllanguage}/subdir/SubTest.qml | 0 .../qtest/qml/qqmllanguage}/subdir/qmldir | 0 .../qqmllanguage}/data/readOnly.1.errors.txt | 0 .../qqmllanguage}/data/readOnly.1.qml | 0 .../qqmllanguage}/data/readOnly.2.errors.txt | 0 .../qqmllanguage}/data/readOnly.2.qml | 0 .../qqmllanguage}/data/readOnly.3.errors.txt | 0 .../qqmllanguage}/data/readOnly.3.qml | 0 .../qqmllanguage}/data/readOnly.4.errors.txt | 0 .../qqmllanguage}/data/readOnly.4.qml | 0 .../qqmllanguage}/data/readOnly.5.errors.txt | 0 .../qqmllanguage}/data/readOnly.5.qml | 0 .../qqmllanguage}/data/readonly.qml | 0 .../qqmllanguage}/data/registrationOrder.qml | 0 .../qqmllanguage}/data/remoteLoadCrash.qml | 0 .../qqmllanguage}/data/revisions11.qml | 0 .../qqmllanguage}/data/revisionsbasesub11.qml | 0 .../qqmllanguage}/data/revisionssub11.qml | 0 .../qqmllanguage}/data/rootAsQmlComponent.qml | 0 .../data/scriptString.1.errors.txt | 0 .../qqmllanguage}/data/scriptString.1.qml | 0 .../data/scriptString.2.errors.txt | 0 .../qqmllanguage}/data/scriptString.2.qml | 0 .../qqmllanguage}/data/scriptString.qml | 0 .../qqmllanguage}/data/scriptString2.qml | 0 .../qqmllanguage}/data/scriptString3.qml | 0 .../qqmllanguage}/data/scriptString4.qml | 0 .../qqmllanguage}/data/signal.1.errors.txt | 0 .../qqmllanguage}/data/signal.1.qml | 0 .../qqmllanguage}/data/signal.2.errors.txt | 0 .../qqmllanguage}/data/signal.2.qml | 0 .../qqmllanguage}/data/signal.3.errors.txt | 0 .../qqmllanguage}/data/signal.3.qml | 0 .../qqmllanguage}/data/signal.4.errors.txt | 0 .../qqmllanguage}/data/signal.4.qml | 0 .../qqmllanguage}/data/simpleBindings.qml | 0 .../qqmllanguage}/data/simpleContainer.qml | 0 .../qqmllanguage}/data/simpleObject.qml | 0 .../data/singularProperty.2.errors.txt | 0 .../qqmllanguage}/data/singularProperty.2.qml | 0 .../data/singularProperty.errors.txt | 0 .../qqmllanguage}/data/singularProperty.qml | 0 .../qqmllanguage}/data/subdir/Test.qml | 0 .../data/subdir/subsubdir/SubTest.qml | 0 .../qqmllanguage}/data/test.js | 0 .../qqmllanguage}/data/test2.js | 0 .../data/unregisteredObject.errors.txt | 0 .../qqmllanguage}/data/unregisteredObject.qml | 0 .../data/unsupportedProperty.errors.txt | 0 .../data/unsupportedProperty.qml | 0 .../qqmllanguage}/data/valueTypes.qml | 0 .../qqmllanguage}/data/variantNotify.qml | 0 .../qqmllanguage}/data/versionedbase.qml | 0 .../qqmllanguage}/data/wrongType.1.errors.txt | 0 .../qqmllanguage}/data/wrongType.1.qml | 0 .../data/wrongType.10.errors.txt | 0 .../qqmllanguage}/data/wrongType.10.qml | 0 .../data/wrongType.11.errors.txt | 0 .../qqmllanguage}/data/wrongType.11.qml | 0 .../data/wrongType.12.errors.txt | 0 .../qqmllanguage}/data/wrongType.12.qml | 0 .../data/wrongType.13.errors.txt | 0 .../qqmllanguage}/data/wrongType.13.qml | 0 .../data/wrongType.14.errors.txt | 0 .../qqmllanguage}/data/wrongType.14.qml | 0 .../data/wrongType.15.errors.txt | 0 .../qqmllanguage}/data/wrongType.15.qml | 0 .../data/wrongType.16.errors.txt | 0 .../qqmllanguage}/data/wrongType.16.qml | 0 .../data/wrongType.17.errors.txt | 0 .../qqmllanguage}/data/wrongType.17.qml | 0 .../qqmllanguage}/data/wrongType.2.errors.txt | 0 .../qqmllanguage}/data/wrongType.2.qml | 0 .../qqmllanguage}/data/wrongType.3.errors.txt | 0 .../qqmllanguage}/data/wrongType.3.qml | 0 .../qqmllanguage}/data/wrongType.4.errors.txt | 0 .../qqmllanguage}/data/wrongType.4.qml | 0 .../qqmllanguage}/data/wrongType.5.errors.txt | 0 .../qqmllanguage}/data/wrongType.5.qml | 0 .../qqmllanguage}/data/wrongType.6.errors.txt | 0 .../qqmllanguage}/data/wrongType.6.qml | 0 .../qqmllanguage}/data/wrongType.7.errors.txt | 0 .../qqmllanguage}/data/wrongType.7.qml | 0 .../qqmllanguage}/data/wrongType.8.errors.txt | 0 .../qqmllanguage}/data/wrongType.8.qml | 0 .../qqmllanguage}/data/wrongType.9.errors.txt | 0 .../qqmllanguage}/data/wrongType.9.qml | 0 .../qqmllanguage/qqmllanguage.pro} | 6 +- .../qqmllanguage}/testtypes.cpp | 0 .../qqmllanguage}/testtypes.h | 74 +- .../qqmllanguage/tst_qqmllanguage.cpp} | 384 +++--- .../qqmllistreference}/data/MyType.qml | 0 .../qqmllistreference}/data/engineTypes.qml | 0 .../qqmllistreference}/data/variantToList.qml | 0 .../qqmllistreference/qqmllistreference.pro | 15 + .../tst_qqmllistreference.cpp} | 186 +-- .../qqmllocale}/data/date.qml | 0 .../qqmllocale}/data/functions.qml | 0 .../qqmllocale}/data/localeCompare.qml | 0 .../qqmllocale}/data/number.qml | 0 .../qqmllocale}/data/properties.qml | 0 .../qqmllocale/qqmllocale.pro} | 10 +- .../qqmllocale/tst_qqmllocale.cpp} | 180 +-- tests/auto/qml/qqmlmetatype/qqmlmetatype.pro | 7 + .../qml/qqmlmetatype/tst_qqmlmetatype.cpp | 202 +++ .../data/implicit1/implicitQmldir.errors.txt | 0 .../qqmlmoduleplugin}/data/implicit1/qmldir | 0 .../data/implicit1/temptest.qml | 0 .../qqmlmoduleplugin}/data/implicit2/Test.qml | 0 .../implicit2/implicitQmldir.2.errors.txt | 0 .../qqmlmoduleplugin}/data/implicit2/qmldir | 0 .../data/implicit2/temptest2.qml | 0 .../data/importsMixedQmlCppPlugin.2.qml | 0 .../data/importsMixedQmlCppPlugin.qml | 0 .../qqmlmoduleplugin}/data/incorrectCase.qml | 0 .../data/pluginWithQmlFile.qml | 0 .../data/versionNotInstalled.2.errors.txt | 0 .../data/versionNotInstalled.2.qml | 0 .../data/versionNotInstalled.errors.txt | 0 .../data/versionNotInstalled.qml | 0 .../qqmlmoduleplugin}/data/works.qml | 0 .../qqmlmoduleplugin}/data/works2.qml | 0 .../qqmlmoduleplugin}/data/works21.qml | 0 .../AutoTestPluginWithQmlFile/MyQmlFile.qml | 0 .../nokia/AutoTestPluginWithQmlFile/qmldir | 0 .../nokia/AutoTestQmlMixedPluginType/Foo.qml | 0 .../nokia/AutoTestQmlMixedPluginType/qmldir | 0 .../nokia/AutoTestQmlPluginType.2.1/qmldir | 0 .../com/nokia/AutoTestQmlPluginType.2/qmldir | 0 .../com/nokia/AutoTestQmlPluginType/qmldir | 0 .../nokia/AutoTestQmlVersionPluginType/qmldir | 0 .../com/nokia/PureQmlModule/ComponentA.qml | 0 .../com/nokia/PureQmlModule/ComponentB.qml | 0 .../imports/com/nokia/PureQmlModule/qmldir | 0 .../imports/com/nokia/WrongCase/qmldir | 0 .../plugin.2.1/plugin.2.1.pro | 4 +- .../qqmlmoduleplugin}/plugin.2.1/plugin.cpp | 6 +- .../qqmlmoduleplugin}/plugin.2/plugin.2.pro | 4 +- .../qqmlmoduleplugin}/plugin.2/plugin.cpp | 6 +- .../qqmlmoduleplugin}/plugin/plugin.cpp | 6 +- .../qqmlmoduleplugin}/plugin/plugin.pro | 4 +- .../qqmlmoduleplugin}/pluginMixed/plugin.cpp | 6 +- .../pluginMixed/pluginMixed.pro | 4 +- .../pluginVersion/plugin.cpp | 6 +- .../pluginVersion/pluginVersion.pro | 4 +- .../pluginWithQmlFile/plugin.cpp | 6 +- .../pluginWithQmlFile/pluginWithQmlFile.pro | 4 +- .../pluginWrongCase/plugin.cpp | 6 +- .../pluginWrongCase/pluginWrongCase.pro | 4 +- .../qqmlmoduleplugin/qqmlmoduleplugin.pro} | 6 +- .../tst_qqmlmoduleplugin.cpp} | 110 +- .../tst_qqmlmoduleplugin.pro} | 6 +- .../qqmlparser/qqmlparser.pro} | 4 +- .../qqmlparser/tst_qqmlparser.cpp} | 40 +- .../qqmlpixmapcache}/data/dataLeak.qml | 0 .../qqmlproperty}/data/NoContextTypeA.qml | 0 .../qqmlproperty}/data/NoContextTypeB.qml | 0 .../qqmlproperty}/data/TestType.qml | 0 .../data/aliasPropertyBindings.qml | 0 .../data/assignEmptyVariantMap.qml | 0 .../data/readSynthesizedObject.qml | 0 tests/auto/qml/qqmlproperty/qqmlproperty.pro | 15 + .../qqmlproperty/tst_qqmlproperty.cpp} | 594 ++++----- .../qqmlpropertycache/qqmlpropertycache.pro | 8 + .../tst_qqmlpropertycache.cpp} | 68 +- .../qml/qqmlpropertymap/qqmlpropertymap.pro | 9 + .../qqmlpropertymap/tst_qqmlpropertymap.cpp} | 74 +- .../qqmlqt}/data/atob.qml | 0 .../qqmlqt}/data/btoa.qml | 0 .../qqmlqt}/data/createComponent.qml | 0 .../qqmlqt}/data/createComponentData.qml | 0 .../qqmlqt}/data/createComponent_lib.js | 0 .../qqmlqt}/data/createComponent_lib.qml | 0 .../qqmlqt}/data/createQmlObject.qml | 0 .../qqmlqt}/data/darker.qml | 0 .../qqmlqt}/data/dateTimeConversion.qml | 0 .../qqmlqt}/data/enums.qml | 0 .../qqmlqt}/data/fontFamilies.qml | 0 .../qqmlqt}/data/formatting.qml | 0 .../qqmlqt}/data/hsla.qml | 0 .../qqmlqt}/data/isQtObject.qml | 0 .../qqmlqt}/data/lighter.qml | 0 .../qqmlqt}/data/md5.qml | 0 .../qqmlqt}/data/openUrlExternally.qml | 0 .../qqmlqt}/data/openUrlExternally_lib.js | 0 .../qqmlqt}/data/openUrlExternally_lib.qml | 0 .../qqmlqt}/data/point.qml | 0 .../qqmlqt}/data/quit.qml | 0 .../qqmlqt}/data/rect.qml | 0 .../qqmlqt}/data/resolvedUrl.qml | 0 .../qqmlqt}/data/rgba.qml | 0 .../qqmlqt}/data/size.qml | 0 .../qqmlqt}/data/tint.qml | 0 .../qqmlqt}/data/vector.qml | 0 .../qqmlqt}/data/vector4.qml | 0 tests/auto/qml/qqmlqt/qqmlqt.pro | 15 + .../qqmlqt/tst_qqmlqt.cpp} | 132 +- .../qqmlsqldatabase}/data/README | 0 .../qqmlsqldatabase}/data/changeversion.js | 0 .../qqmlsqldatabase}/data/creation-a.js | 0 .../qqmlsqldatabase}/data/creation.js | 0 .../qqmlsqldatabase}/data/error-a.js | 0 .../qqmlsqldatabase}/data/error-b.js | 0 .../qqmlsqldatabase}/data/error-creation.js | 0 .../data/error-notransaction.js | 0 .../data/error-outsidetransaction.js | 0 .../data/iteration-forwardonly.js | 0 .../qqmlsqldatabase}/data/iteration.js | 0 .../qqmlsqldatabase}/data/readonly-error.js | 0 .../qqmlsqldatabase}/data/readonly.js | 0 .../qqmlsqldatabase}/data/reopen1.js | 0 .../qqmlsqldatabase}/data/reopen2.js | 0 .../data/selection-bindnames.js | 0 .../qqmlsqldatabase}/data/selection.js | 0 .../qqmlsqldatabase/qqmlsqldatabase.pro} | 10 +- .../qqmlsqldatabase/tst_qqmlsqldatabase.cpp} | 50 +- .../qqmltranslation}/data/idtranslation.qml | 0 .../qqmltranslation}/data/qml_fr.qm | Bin .../qqmltranslation}/data/qml_fr.ts | 0 .../qqmltranslation}/data/qmlid_fr.qm | Bin .../qqmltranslation}/data/qmlid_fr.ts | 0 .../qqmltranslation}/data/translation.qml | 0 .../qqmltranslation}/data/translation.qrc | 0 .../qqmltranslation/qqmltranslation.pro} | 6 +- .../qqmltranslation/tst_qqmltranslation.cpp} | 30 +- .../data/BindingsSpliceCorrectlyType.qml | 0 .../data/BindingsSpliceCorrectlyType4.qml | 0 .../data/BindingsSpliceCorrectlyType5.qml | 0 .../data/autoBindingRemoval.2.qml | 0 .../data/autoBindingRemoval.3.qml | 0 .../data/autoBindingRemoval.qml | 0 .../data/bindingAssignment.qml | 0 .../qqmlvaluetypes}/data/bindingConflict.qml | 0 .../qqmlvaluetypes}/data/bindingRead.qml | 0 .../data/bindingVariantCopy.qml | 0 .../data/bindingsSpliceCorrectly.1.qml | 0 .../data/bindingsSpliceCorrectly.2.qml | 0 .../data/bindingsSpliceCorrectly.3.qml | 0 .../data/bindingsSpliceCorrectly.4.qml | 0 .../data/bindingsSpliceCorrectly.5.qml | 0 .../qqmlvaluetypes}/data/color_compare.qml | 0 .../qqmlvaluetypes}/data/color_read.qml | 0 .../qqmlvaluetypes}/data/color_write.qml | 0 .../qqmlvaluetypes}/data/conflicting.1.qml | 0 .../qqmlvaluetypes}/data/conflicting.2.qml | 0 .../qqmlvaluetypes}/data/conflicting.3.qml | 0 .../qqmlvaluetypes}/data/deletedObject.js | 0 .../qqmlvaluetypes}/data/deletedObject.qml | 0 .../qqmlvaluetypes}/data/enums.1.qml | 0 .../qqmlvaluetypes}/data/enums.2.qml | 0 .../qqmlvaluetypes}/data/enums.3.qml | 0 .../qqmlvaluetypes}/data/enums.4.qml | 0 .../qqmlvaluetypes}/data/enums.5.qml | 0 .../qqmlvaluetypes}/data/font_compare.qml | 0 .../qqmlvaluetypes}/data/font_read.qml | 0 .../qqmlvaluetypes}/data/font_write.2.qml | 0 .../qqmlvaluetypes}/data/font_write.3.qml | 0 .../qqmlvaluetypes}/data/font_write.4.qml | 0 .../qqmlvaluetypes}/data/font_write.5.qml | 0 .../qqmlvaluetypes}/data/font_write.qml | 0 .../data/matrix4x4_compare.qml | 0 .../qqmlvaluetypes}/data/matrix4x4_read.qml | 0 .../qqmlvaluetypes}/data/matrix4x4_write.qml | 0 .../qqmlvaluetypes}/data/point_compare.qml | 0 .../qqmlvaluetypes}/data/point_read.qml | 0 .../qqmlvaluetypes}/data/point_write.qml | 0 .../qqmlvaluetypes}/data/pointf_compare.qml | 0 .../qqmlvaluetypes}/data/pointf_read.qml | 0 .../qqmlvaluetypes}/data/pointf_write.qml | 0 .../data/quaternion_compare.qml | 0 .../qqmlvaluetypes}/data/quaternion_read.qml | 0 .../qqmlvaluetypes}/data/quaternion_write.qml | 0 .../qqmlvaluetypes}/data/rect_compare.qml | 0 .../qqmlvaluetypes}/data/rect_read.qml | 0 .../qqmlvaluetypes}/data/rect_write.qml | 0 .../qqmlvaluetypes}/data/rectf_compare.qml | 0 .../qqmlvaluetypes}/data/rectf_read.qml | 0 .../qqmlvaluetypes}/data/rectf_write.qml | 0 .../qqmlvaluetypes}/data/returnValues.qml | 0 .../qqmlvaluetypes}/data/scriptAccess.qml | 0 .../data/scriptVariantCopy.qml | 0 .../qqmlvaluetypes}/data/size_compare.qml | 0 .../qqmlvaluetypes}/data/size_read.qml | 0 .../qqmlvaluetypes}/data/size_write.qml | 0 .../qqmlvaluetypes}/data/sizef_compare.qml | 0 .../qqmlvaluetypes}/data/sizef_read.qml | 0 .../qqmlvaluetypes}/data/sizef_write.qml | 0 .../data/sizereadonly_read.qml | 0 .../data/sizereadonly_writeerror.qml | 0 .../data/sizereadonly_writeerror2.qml | 0 .../data/sizereadonly_writeerror3.qml | 0 .../data/sizereadonly_writeerror4.qml | 0 .../qqmlvaluetypes}/data/staticAssignment.qml | 0 .../data/valueInterceptors.qml | 0 .../qqmlvaluetypes}/data/valueSources.qml | 0 .../qqmlvaluetypes}/data/varAssignment.qml | 0 .../qqmlvaluetypes}/data/variant_read.qml | 0 .../qqmlvaluetypes}/data/vector2d_compare.qml | 0 .../qqmlvaluetypes}/data/vector2d_read.qml | 0 .../qqmlvaluetypes}/data/vector2d_write.qml | 0 .../qqmlvaluetypes}/data/vector3d_compare.qml | 0 .../qqmlvaluetypes}/data/vector3d_read.qml | 0 .../qqmlvaluetypes}/data/vector3d_write.qml | 0 .../qqmlvaluetypes}/data/vector4d_compare.qml | 0 .../qqmlvaluetypes}/data/vector4d_read.qml | 0 .../qqmlvaluetypes}/data/vector4d_write.qml | 0 .../qqmlvaluetypes/qqmlvaluetypes.pro} | 10 +- .../qqmlvaluetypes}/testtypes.cpp | 0 .../qqmlvaluetypes}/testtypes.h | 26 +- .../qqmlvaluetypes/tst_qqmlvaluetypes.cpp} | 268 ++-- .../qqmlxmlhttprequest}/data/abort.expect | 0 .../qqmlxmlhttprequest}/data/abort.qml | 0 .../qqmlxmlhttprequest}/data/abort.reply | 0 .../qqmlxmlhttprequest}/data/abort_opened.qml | 0 .../qqmlxmlhttprequest}/data/abort_unsent.qml | 0 .../qqmlxmlhttprequest}/data/attr.qml | 0 .../qqmlxmlhttprequest}/data/attr.xml | 0 .../data/callbackException.qml | 0 .../qqmlxmlhttprequest}/data/cdata.qml | 0 .../qqmlxmlhttprequest}/data/cdata.xml | 0 .../qqmlxmlhttprequest}/data/constructor.qml | 0 .../qqmlxmlhttprequest}/data/defaultState.qml | 0 .../qqmlxmlhttprequest}/data/document.qml | 0 .../qqmlxmlhttprequest}/data/document.xml | 0 .../data/domExceptionCodes.qml | 0 .../qqmlxmlhttprequest}/data/element.qml | 0 .../qqmlxmlhttprequest}/data/element.xml | 0 .../data/getAllResponseHeaders.qml | 0 .../data/getAllResponseHeaders_args.qml | 0 .../data/getAllResponseHeaders_sent.qml | 0 .../data/getAllResponseHeaders_unsent.qml | 0 .../data/getResponseHeader.expect | 0 .../data/getResponseHeader.qml | 0 .../data/getResponseHeader.reply | 0 .../data/getResponseHeader_args.qml | 0 .../data/getResponseHeader_sent.qml | 0 .../data/getResponseHeader_unsent.qml | 0 .../data/instanceStateValues.qml | 0 .../data/invalidMethodUsage.qml | 0 .../qqmlxmlhttprequest}/data/open.qml | 0 .../data/open_arg_count.1.qml | 0 .../data/open_arg_count.2.qml | 0 .../data/open_invalid_method.qml | 0 .../data/open_network.expect | 0 .../data/open_network.reply | 0 .../data/open_network.wait | 0 .../qqmlxmlhttprequest}/data/open_sync.qml | 0 .../qqmlxmlhttprequest}/data/open_user.qml | 0 .../data/open_username.qml | 0 .../data/redirectError.qml | 0 .../data/redirectRecur.qml | 0 .../qqmlxmlhttprequest}/data/redirects.qml | 0 .../data/redirecttarget.html | 0 .../qqmlxmlhttprequest}/data/responseText.qml | 0 .../data/responseXML_invalid.qml | 0 .../data/seconddocument.html | 0 .../data/send_alreadySent.qml | 0 .../data/send_data.1.expect | 0 .../qqmlxmlhttprequest}/data/send_data.1.qml | 0 .../qqmlxmlhttprequest}/data/send_data.2.qml | 0 .../qqmlxmlhttprequest}/data/send_data.3.qml | 0 .../data/send_data.4.expect | 0 .../qqmlxmlhttprequest}/data/send_data.4.qml | 0 .../qqmlxmlhttprequest}/data/send_data.5.qml | 0 .../data/send_data.6.expect | 0 .../qqmlxmlhttprequest}/data/send_data.6.qml | 0 .../qqmlxmlhttprequest}/data/send_data.7.qml | 0 .../qqmlxmlhttprequest}/data/send_data.reply | 0 .../data/send_ignoreData.qml | 0 .../data/send_ignoreData.reply | 0 .../data/send_ignoreData_DELETE.expect | 0 .../data/send_ignoreData_GET.expect | 0 .../data/send_ignoreData_HEAD.expect | 0 .../qqmlxmlhttprequest}/data/send_unsent.qml | 0 .../data/setRequestHeader.expect | 0 .../data/setRequestHeader.qml | 0 .../data/setRequestHeader.reply | 0 .../data/setRequestHeader_args.qml | 0 .../data/setRequestHeader_caseInsensitive.qml | 0 .../data/setRequestHeader_illegalName.qml | 0 .../data/setRequestHeader_sent.qml | 0 .../data/setRequestHeader_unsent.qml | 0 .../data/staticStateValues.qml | 0 .../qqmlxmlhttprequest}/data/status.200.reply | 0 .../qqmlxmlhttprequest}/data/status.400.reply | 0 .../qqmlxmlhttprequest}/data/status.404.reply | 0 .../qqmlxmlhttprequest}/data/status.expect | 0 .../qqmlxmlhttprequest}/data/status.qml | 0 .../qqmlxmlhttprequest}/data/statusText.qml | 0 .../data/testdocument.html | 0 .../qqmlxmlhttprequest}/data/text.qml | 0 .../qqmlxmlhttprequest}/data/text.xml | 0 .../qqmlxmlhttprequest}/data/utf16.html | 0 .../qqmlxmlhttprequest}/data/utf16.qml | 0 .../qqmlxmlhttprequest}/data/utf16.xml | Bin .../qqmlxmlhttprequest.pro} | 6 +- .../tst_qqmlxmlhttprequest.cpp} | 216 ++-- .../qquickbinding}/data/deletedObject.qml | 0 .../qquickbinding}/data/restoreBinding.qml | 0 .../data/restoreBindingWithLoop.qml | 0 .../qquickbinding}/data/test-binding.qml | 0 .../qquickbinding}/data/test-binding2.qml | 0 .../auto/qml/qquickbinding/qquickbinding.pro | 15 + .../qquickbinding/tst_qquickbinding.cpp} | 52 +- .../qml/qquickchangeset/qquickchangeset.pro | 9 + .../qquickchangeset/tst_qquickchangeset.cpp} | 26 +- .../data/connection-targetchange.qml | 0 .../connection-unknownsignals-ignored.qml | 0 .../connection-unknownsignals-notarget.qml | 0 .../data/connection-unknownsignals-parent.qml | 0 .../data/connection-unknownsignals.qml | 0 .../qquickconnection}/data/error-object.qml | 0 .../qquickconnection}/data/error-property.qml | 0 .../data/error-property2.qml | 0 .../qquickconnection}/data/error-syntax.qml | 0 .../data/moduleapi-target.qml | 0 .../data/test-connection.qml | 0 .../data/test-connection2.qml | 0 .../data/test-connection3.qml | 0 .../qquickconnection}/data/trimming.qml | 0 .../qml/qquickconnection/qquickconnection.pro | 15 + .../tst_qquickconnection.cpp} | 82 +- .../qquickfolderlistmodel}/data/basic.qml | 0 .../qquickfolderlistmodel}/data/dummy.qml | 0 .../data/resetFiltering.qml | 0 .../data/resetfiltering/innerdir/test2.txt | 0 .../data/resetfiltering/test.txt | 0 .../qquickfolderlistmodel.pro | 14 + .../tst_qquickfolderlistmodel.cpp} | 36 +- .../qquicklistcompositor.pro | 9 + .../tst_qquicklistcompositor.cpp} | 86 +- .../qquicklistmodel}/data/enumerate.qml | 0 .../qquicklistmodel}/data/model.qml | 0 .../qquicklistmodel}/data/multipleroles.qml | 0 .../qquicklistmodel}/data/script.js | 0 .../data/setmodelcachelist.qml | 0 .../qquicklistmodel}/data/signalhandlers.qml | 0 .../data/workerremoveelement.js | 0 .../data/workerremoveelement.qml | 0 .../qquicklistmodel}/data/workerremovelist.js | 0 .../data/workerremovelist.qml | 0 .../qquicklistmodel}/data/workersync.js | 0 .../qquicklistmodel}/data/workersync.qml | 0 .../qml/qquicklistmodel/qquicklistmodel.pro | 15 + .../qquicklistmodel/tst_qquicklistmodel.cpp} | 294 ++--- .../qquickworkerscript}/data/BaseWorker.qml | 0 .../qquickworkerscript}/data/Global.js | 0 .../data/externalObjectWorker.qml | 0 .../qquickworkerscript}/data/script.js | 0 .../data/script_error_onCall.js | 0 .../data/script_error_onLoad.js | 0 .../data/script_fixed_return.js | 0 .../data/script_include.js | 0 .../qquickworkerscript}/data/script_pragma.js | 0 .../qquickworkerscript}/data/stressDispose.js | 0 .../data/stressDispose.qml | 0 .../qquickworkerscript}/data/worker.qml | 0 .../data/worker_error_onCall.qml | 0 .../data/worker_error_onLoad.qml | 0 .../data/worker_include.qml | 0 .../data/worker_pragma.qml | 0 .../qquickworkerscript/qquickworkerscript.pro | 15 + .../tst_qquickworkerscript.cpp} | 98 +- tests/auto/{declarative => qml}/runall.sh | 4 +- .../v4/data/conditionalExpr.qml | 0 .../v4/data/doubleBoolJump.qml | 0 .../v4/data/fetchException.qml | 0 .../v4/data/logicalOr.2.qml | 0 .../v4/data/logicalOr.qml | 0 .../v4/data/nestedLogicalOr.qml | 0 .../v4/data/nestedObjectAccess.qml | 0 .../v4/data/nullQObject.qml | 0 .../v4/data/qrealToIntRounding.qml | 0 .../v4/data/qtbug_21883.qml | 0 .../v4/data/qtbug_22816.qml | 0 .../v4/data/stringComparison.qml | 0 .../subscriptionsInConditionalExpressions.qml | 0 .../v4/data/unaryMinus.qml | 0 .../v4/data/unaryPlus.qml | 0 .../v4/data/unnecessaryReeval.qml | 0 .../{declarative => qml}/v4/testtypes.cpp | 2 +- .../auto/{declarative => qml}/v4/testtypes.h | 0 tests/auto/{declarative => qml}/v4/tst_v4.cpp | 36 +- tests/auto/{declarative => qml}/v4/v4.pro | 4 +- .../auto/qmldevtools/compile/tst_compile.cpp | 10 +- tests/auto/qmltest/createbenchmark/item.qml | 2 +- tests/auto/qmltest/qmltest.pro | 2 +- .../tst_binding.qml | 0 .../tst_binding2.qml | 0 .../qdeclarativeanimationcontroller.pro | 10 - .../qdeclarativeapplication.pro | 7 - .../qdeclarativebehaviors.pro | 15 - .../qdeclarativepath/qdeclarativepath.pro | 15 - .../qdeclarativesmoothedanimation.pro | 15 - .../qdeclarativespringanimation.pro | 15 - .../qdeclarativestates/qdeclarativestates.pro | 14 - .../qdeclarativestyledtext.pro | 8 - .../qdeclarativesystempalette.pro | 8 - .../qdeclarativetimer/qdeclarativetimer.pro | 8 - .../qdeclarativexmllistmodel.pro | 15 - .../examples/data/dummytest.qml | 0 .../examples/data/webbrowser/webbrowser.qml | 0 .../{qtquick2 => quick}/examples/examples.pro | 2 +- .../examples/tst_examples.cpp | 56 +- .../{qtquick2 => quick}/geometry/geometry.pro | 2 +- .../geometry/tst_geometry.cpp | 0 .../auto/{qtquick2 => quick}/nodes/nodes.pro | 2 +- .../nodes/tst_nodestest.cpp | 0 .../qquickaccessible/data/checkbuttons.qml | 0 .../qquickaccessible/data/hittest.qml | 2 +- .../qquickaccessible/data/pushbutton.qml | 0 .../qquickaccessible/data/statictext.qml | 0 .../data/widgets/TextRect.qml | 0 .../qquickaccessible/qquickaccessible.pro | 2 +- .../qquickaccessible/tst_qquickaccessible.cpp | 24 +- .../qquickanchors/data/anchors.qml | 0 .../qquickanchors/data/centerin.qml | 0 .../qquickanchors/data/centerinRotation.qml | 0 .../qquickanchors/data/crash1.qml | 0 .../qquickanchors/data/fill.qml | 0 .../qquickanchors/data/hvCenter.qml | 0 .../qquickanchors/data/loop1.qml | 0 .../qquickanchors/data/loop2.qml | 0 .../qquickanchors/data/margins.qml | 0 .../qquickanchors/qquickanchors.pro | 2 +- .../qquickanchors/tst_qquickanchors.cpp | 10 +- .../qquickanimatedimage/data/colors.gif | Bin .../qquickanimatedimage/data/colors.qml | 0 .../qquickanimatedimage/data/hearts.gif | Bin .../qquickanimatedimage/data/hearts.qml | 0 .../qquickanimatedimage/data/qmldir | 0 .../qquickanimatedimage/data/qtbug-16520.qml | 0 .../qquickanimatedimage/data/stickman.gif | Bin .../qquickanimatedimage/data/stickman.qml | 0 .../data/stickmanerror1.qml | 0 .../data/stickmanpause.qml | 0 .../data/stickmanscaled.qml | 0 .../data/stickmanstopped.qml | 0 .../qquickanimatedimage.pro | 2 +- .../tst_qquickanimatedimage.cpp | 54 +- .../data/tst_numberanimation.qml | 0 .../qquickanimationcontroller.pro | 10 + .../tst_qquickanimationcontroller.cpp} | 2 +- .../qquickanimations}/data/Double.qml | 0 .../qquickanimations}/data/attached.qml | 0 .../qquickanimations}/data/badproperty1.qml | 0 .../qquickanimations}/data/badproperty2.qml | 0 .../qquickanimations}/data/badtype1.qml | 0 .../qquickanimations}/data/badtype2.qml | 0 .../qquickanimations}/data/badtype3.qml | 0 .../qquickanimations}/data/badtype4.qml | 0 .../data/disabledTransition.qml | 0 .../qquickanimations}/data/dontAutoStart.qml | 0 .../qquickanimations}/data/dontStart.qml | 0 .../qquickanimations}/data/dontStart2.qml | 0 .../qquickanimations}/data/dotproperty.qml | 0 .../data/doubleRegistrationBug.qml | 0 .../qquickanimations}/data/looping.qml | 0 .../qquickanimations}/data/mixedtype1.qml | 0 .../qquickanimations}/data/mixedtype2.qml | 0 .../data/nonTransitionBug.qml | 0 .../qquickanimations}/data/pathAnimation.qml | 0 .../qquickanimations}/data/pathAnimation2.qml | 0 .../data/pathAnimationNoStart.qml | 0 .../data/pathInterpolator.qml | 0 .../data/pathInterpolatorBack.qml | 0 .../data/pathInterpolatorBack2.qml | 0 .../qquickanimations}/data/pathTransition.qml | 0 .../data/pauseBindingBug.qml | 0 .../qquickanimations}/data/pauseBug.qml | 0 .../qquickanimations}/data/properties.qml | 0 .../qquickanimations}/data/properties2.qml | 0 .../qquickanimations}/data/properties3.qml | 0 .../qquickanimations}/data/properties4.qml | 0 .../qquickanimations}/data/properties5.qml | 0 .../data/propertiesTransition.qml | 0 .../data/propertiesTransition2.qml | 0 .../data/propertiesTransition3.qml | 0 .../data/propertiesTransition4.qml | 0 .../data/propertiesTransition5.qml | 0 .../data/propertiesTransition6.qml | 0 .../data/propertiesTransition7.qml | 0 .../qquickanimations}/data/reanchor.qml | 0 .../data/registrationBug.qml | 0 .../qquickanimations}/data/reparent.qml | 0 .../qquickanimations}/data/rotation.qml | 0 .../qquickanimations}/data/runningTrueBug.qml | 0 .../data/transitionAssignmentBug.qml | 0 .../qquickanimations}/data/valuesource.qml | 0 .../qquickanimations}/data/valuesource2.qml | 0 .../qquickanimations/qquickanimations.pro} | 6 +- .../tst_qquickanimations.cpp} | 356 +++--- .../qquickapplication/qquickapplication.pro | 7 + .../tst_qquickapplication.cpp} | 34 +- .../qquickbehaviors}/data/binding.qml | 0 .../qquickbehaviors}/data/color.qml | 0 .../qquickbehaviors}/data/cpptrigger.qml | 0 .../data/delayedRegistration.qml | 0 .../qquickbehaviors}/data/disabled.qml | 0 .../qquickbehaviors}/data/dontStart.qml | 0 .../qquickbehaviors}/data/empty.qml | 0 .../qquickbehaviors}/data/explicit.qml | 0 .../qquickbehaviors}/data/groupProperty.qml | 0 .../qquickbehaviors}/data/groupProperty2.qml | 0 .../data/groupedPropertyCrash.qml | 0 .../qquickbehaviors}/data/loop.qml | 0 .../qquickbehaviors}/data/nonSelecting2.qml | 0 .../qquickbehaviors}/data/parent.qml | 0 .../qquickbehaviors}/data/qtbug12295.qml | 0 .../data/reassignedAnimation.qml | 0 .../qquickbehaviors}/data/runningTrue.qml | 0 .../qquickbehaviors}/data/scripttrigger.qml | 0 .../qquickbehaviors}/data/simple.qml | 0 .../data/startOnCompleted.qml | 0 .../qquickbehaviors}/data/startup.qml | 0 .../qquickbehaviors}/data/startup2.qml | 0 .../qquickbehaviors}/data/valueType.qml | 0 .../quick/qquickbehaviors/qquickbehaviors.pro | 15 + .../qquickbehaviors/tst_qquickbehaviors.cpp} | 162 +-- .../qquickborderimage/data/colors-mirror.png | Bin .../data/colors-round-quotes.sci | 0 .../data/colors-round-remote.sci | 0 .../qquickborderimage/data/colors-round.sci | 0 .../qquickborderimage/data/colors.png | Bin .../qquickborderimage/data/heart200.png | Bin .../qquickborderimage/data/invalid.sci | 0 .../qquickborderimage/data/mirror.qml | 0 .../qquickborderimage/qquickborderimage.pro | 2 +- .../tst_qquickborderimage.cpp | 32 +- .../data/AnimationsWhileHidden.qml | 0 .../qquickcanvas/data/Headless.qml | 0 .../qquickcanvas/data/colors.png | Bin .../qquickcanvas/data/focus.qml | 0 .../qquickcanvas/data/window.qml | 0 .../qquickcanvas/qquickcanvas.pro | 2 +- .../qquickcanvas/tst_qquickcanvas.cpp | 24 +- .../qquickcanvasitem/data/anim-gr.gif | Bin .../qquickcanvasitem/data/anim-gr.png | Bin .../qquickcanvasitem/data/anim-poster-gr.png | Bin .../qquickcanvasitem/data/background.png | Bin .../qquickcanvasitem/data/broken.png | Bin .../qquickcanvasitem/data/ggrr-256x256.png | Bin .../qquickcanvasitem/data/green-16x16.png | Bin .../qquickcanvasitem/data/green-1x1.png | Bin .../qquickcanvasitem/data/green-256x256.png | Bin .../qquickcanvasitem/data/green-2x2.png | Bin .../qquickcanvasitem/data/green.png | Bin .../qquickcanvasitem/data/grgr-256x256.png | Bin .../qquickcanvasitem/data/red-16x16.png | Bin .../qquickcanvasitem/data/red.png | Bin .../qquickcanvasitem/data/redtransparent.png | Bin .../qquickcanvasitem/data/rgrg-256x256.png | Bin .../qquickcanvasitem/data/rrgg-256x256.png | Bin .../qquickcanvasitem/data/testhelper.js | 0 .../qquickcanvasitem/data/transparent.png | Bin .../qquickcanvasitem/data/transparent50.png | Bin .../qquickcanvasitem/data/tst_arc.qml | 0 .../qquickcanvasitem/data/tst_arcto.qml | 0 .../qquickcanvasitem/data/tst_canvas.qml | 0 .../qquickcanvasitem/data/tst_composite.qml | 0 .../qquickcanvasitem/data/tst_context.qml | 0 .../qquickcanvasitem/data/tst_drawimage.qml | 0 .../qquickcanvasitem/data/tst_fillStyle.qml | 0 .../qquickcanvasitem/data/tst_fillrect.qml | 0 .../qquickcanvasitem/data/tst_gradient.qml | 0 .../qquickcanvasitem/data/tst_line.qml | 0 .../qquickcanvasitem/data/tst_path.qml | 0 .../qquickcanvasitem/data/tst_pattern.qml | 0 .../qquickcanvasitem/data/tst_pixel.qml | 0 .../qquickcanvasitem/data/tst_shadow.qml | 0 .../qquickcanvasitem/data/tst_state.qml | 0 .../qquickcanvasitem/data/tst_strokeStyle.qml | 0 .../qquickcanvasitem/data/tst_text.qml | 0 .../qquickcanvasitem/data/tst_transform.qml | 0 .../qquickcanvasitem/data/yellow.png | Bin .../qquickcanvasitem/data/yellow75.png | Bin .../qquickcanvasitem/qquickcanvasitem.pro | 2 +- .../qquickcanvasitem/tst_qquickcanvasitem.cpp | 0 .../qquickdrag/qquickdrag.pro | 2 +- .../qquickdrag/tst_qquickdrag.cpp | 30 +- .../qquickdroparea/qquickdroparea.pro | 2 +- .../qquickdroparea/tst_qquickdroparea.cpp | 30 +- .../qquickflickable/data/disabled.qml | 0 .../qquickflickable/data/flickable01.qml | 0 .../qquickflickable/data/flickable02.qml | 0 .../qquickflickable/data/flickable03.qml | 0 .../qquickflickable/data/flickable04.qml | 0 .../data/flickableqgraphicswidget.qml | 0 .../qquickflickable/data/margins.qml | 0 .../qquickflickable/data/nestedPressDelay.qml | 0 .../qquickflickable/data/resize.qml | 0 .../qquickflickable/data/wheel.qml | 0 .../qquickflickable/qquickflickable.pro | 2 +- .../qquickflickable/tst_qquickflickable.cpp | 48 +- .../qquickflipable/data/crash.qml | 0 .../qquickflipable/data/flipable-abort.qml | 0 .../qquickflipable/data/test-flipable.qml | 0 .../qquickflipable/qquickflipable.pro | 2 +- .../qquickflipable/tst_qquickflipable.cpp | 22 +- .../qquickfocusscope/data/canvasFocus.qml | 0 .../qquickfocusscope/data/chain.qml | 0 .../data/forceActiveFocus.qml | 0 .../qquickfocusscope/data/forcefocus.qml | 0 .../qquickfocusscope/data/qtBug13380.qml | 0 .../qquickfocusscope/data/signalEmission.qml | 0 .../qquickfocusscope/data/test.qml | 0 .../qquickfocusscope/data/test2.qml | 0 .../qquickfocusscope/data/test3.qml | 0 .../qquickfocusscope/data/test4.qml | 0 .../qquickfocusscope/data/test5.qml | 0 .../qquickfocusscope/qquickfocusscope.pro | 2 +- .../qquickfocusscope/tst_qquickfocusscope.cpp | 6 +- .../qquickfontloader}/data/daniel.ttf | Bin .../qquickfontloader}/data/dummy.ttf | 0 .../qquickfontloader}/data/qtbug-20268.qml | 0 .../qquickfontloader}/data/tarzeau_ocr_a.ttf | Bin .../qquickfontloader/qquickfontloader.pro} | 6 +- .../tst_qquickfontloader.cpp} | 106 +- .../qquickgridview/data/ComponentView.qml | 0 .../qquickgridview/data/addTransitions.qml | 2 +- .../qquickgridview/data/asyncloader.qml | 0 .../qquickgridview/data/attachedSignals.qml | 0 .../qquickgridview/data/creationContext.qml | 0 .../qquickgridview/data/displaygrid.qml | 0 .../qquickgridview/data/footer.qml | 0 .../data/gridview-enforcerange.qml | 0 .../data/gridview-initCurrent.qml | 0 .../data/gridview-noCurrent.qml | 0 .../qquickgridview/data/gridview1.qml | 0 .../qquickgridview/data/gridview2.qml | 0 .../qquickgridview/data/gridview3.qml | 0 .../qquickgridview/data/gridview4.qml | 0 .../qquickgridview/data/header.qml | 0 .../qquickgridview/data/manual-highlight.qml | 0 .../qquickgridview/data/margins.qml | 0 .../qquickgridview/data/mirroring.qml | 0 .../qquickgridview/data/moveTransitions.qml | 2 +- .../data/multipleTransitions.qml | 0 .../data/populateTransitions.qml | 0 .../data/propertychangestest.qml | 0 .../qquickgridview/data/removeTransitions.qml | 2 +- .../qquickgridview/data/resizeview.qml | 0 .../qquickgridview/data/setindex.qml | 0 .../qquickgridview/data/snapOneRow.qml | 0 .../qquickgridview/data/snapToRow.qml | 0 .../qquickgridview/data/unaligned.qml | 0 .../qquickgridview/data/unrequestedItems.qml | 0 .../qquickgridview/qquickgridview.pro | 2 +- .../qquickgridview/tst_qquickgridview.cpp | 124 +- .../qquickimage/data/aspectratio.qml | 0 .../qquickimage/data/big.jpeg | Bin .../qquickimage/data/big256.png | Bin .../qquickimage/data/colors.png | Bin .../qquickimage/data/colors1.png | Bin .../qquickimage/data/green.png | Bin .../qquickimage/data/heart-win32.png | Bin .../qquickimage/data/heart.png | Bin .../qquickimage/data/heart.svg | 0 .../qquickimage/data/heart200-win32.png | Bin .../qquickimage/data/heart200.png | Bin .../qquickimage/data/htiling.qml | 0 .../qquickimage/data/mirror.qml | 0 .../qquickimage/data/nullpixmap.qml | 0 .../qquickimage/data/pattern.png | Bin .../qquickimage/data/qtbug_16389.qml | 0 .../qquickimage/data/qtbug_22125.qml | 0 .../qquickimage/data/rect.png | Bin .../qquickimage/data/sourceSize.qml | 0 .../qquickimage/data/vtiling.qml | 0 .../qquickimage/qquickimage.pro | 2 +- .../qquickimage/tst_qquickimage.cpp | 48 +- .../qquickitem/data/order.1.qml | 0 .../qquickitem/data/order.2.qml | 0 .../qquickitem/data/polishOnCompleted.qml | 0 .../qquickitem/qquickitem.pro | 2 +- .../qquickitem/tst_qquickitem.cpp | 4 +- .../qquickitem2/data/childrenProperty.qml | 0 .../qquickitem2/data/childrenRect.qml | 0 .../qquickitem2/data/childrenRectBug.qml | 0 .../qquickitem2/data/childrenRectBug2.qml | 0 .../qquickitem2/data/childrenRectBug3.qml | 0 .../qquickitem2/data/implicitsize.qml | 0 .../qquickitem2/data/keynavigationtest.qml | 0 .../data/keynavigationtest_implicit.qml | 0 .../qquickitem2/data/keysim.qml | 0 .../qquickitem2/data/keyspriority.qml | 0 .../qquickitem2/data/keystest.qml | 0 .../qquickitem2/data/layoutmirroring.qml | 0 .../qquickitem2/data/mapCoordinates.qml | 0 .../qquickitem2/data/parentLoop.qml | 0 .../qquickitem2/data/propertychanges.qml | 0 .../qquickitem2/data/qtbug_16871.qml | 0 .../qquickitem2/data/resourcesProperty.qml | 0 .../qquickitem2/data/transformCrash.qml | 0 .../qquickitem2/data/visiblechildren.qml | 0 .../qquickitem2/qquickitem2.pro | 2 +- .../qquickitem2/tst_qquickitem.cpp | 26 +- .../qquickitemlayer/data/DisableLayer.qml | 0 .../qquickitemlayer/data/Effect.qml | 0 .../qquickitemlayer/data/Enabled.qml | 0 .../qquickitemlayer/data/ItemEffect.qml | 0 .../qquickitemlayer/data/Mipmap.qml | 0 .../qquickitemlayer/data/RectangleEffect.qml | 0 .../data/SamplerNameChange.qml | 0 .../qquickitemlayer/data/Smooth.qml | 0 .../qquickitemlayer/data/SourceRect.qml | 0 .../qquickitemlayer/data/TextureProvider.qml | 0 .../data/ToggleLayerAndEffect.qml | 0 .../qquickitemlayer/data/Visible.qml | 0 .../qquickitemlayer/data/ZOrder.qml | 0 .../qquickitemlayer/data/ZOrderChange.qml | 0 .../qquickitemlayer/qquickitemlayer.pro | 2 +- .../qquickitemlayer/tst_qquickitemlayer.cpp | 2 +- .../qquicklistview/data/ComponentView.qml | 0 .../qquicklistview/data/Page.qml | 0 .../qquicklistview/data/addTransitions.qml | 2 +- .../qquicklistview/data/asyncloader.qml | 0 .../qquicklistview/data/attachedSignals.qml | 0 .../qquicklistview/data/creationContext.qml | 0 .../qquicklistview/data/displaylist.qml | 0 .../data/fillModelOnComponentCompleted.qml | 0 .../qquicklistview/data/footer.qml | 0 .../qquicklistview/data/header.qml | 0 .../qquicklistview/data/headerfooter.qml | 0 .../qquicklistview/data/itemlist.qml | 0 .../listview-enforcerange-nohighlight.qml | 0 .../data/listview-enforcerange.qml | 0 .../data/listview-initCurrent.qml | 0 .../data/listview-noCurrent.qml | 0 .../data/listview-sections-package.qml | 0 .../qquicklistview/data/listview-sections.qml | 0 .../data/listview-sections_delegate.qml | 0 .../data/listviewtest-package.qml | 0 .../qquicklistview/data/listviewtest.qml | 0 .../qquicklistview/data/manual-highlight.qml | 0 .../qquicklistview/data/margins.qml | 0 .../qquicklistview/data/margins2.qml | 0 .../qquicklistview/data/moveTransitions.qml | 2 +- .../data/multipleTransitions.qml | 0 .../data/populateTransitions.qml | 0 .../data/propertychangestest.qml | 0 .../qquicklistview/data/qtbug-21742.qml | 0 .../qquicklistview/data/qtbug14821.qml | 0 .../qquicklistview/data/qtbug16037.qml | 0 .../qquicklistview/data/removeTransitions.qml | 2 +- .../qquicklistview/data/resizeview.qml | 0 .../qquicklistview/data/rightToLeft.qml | 0 .../qquicklistview/data/sizelessthan1.qml | 0 .../qquicklistview/data/snapOneItem.qml | 0 .../qquicklistview/data/snapToItem.qml | 0 .../data/strictlyenforcerange.qml | 0 .../qquicklistview/data/unrequestedItems.qml | 0 .../qquicklistview/incrementalmodel.cpp | 0 .../qquicklistview/incrementalmodel.h | 0 .../qquicklistview/qquicklistview.pro | 2 +- .../qquicklistview/tst_qquicklistview.cpp | 121 +- .../qquickloader/data/ActiveComponent.qml | 0 .../qquickloader/data/AnchoredLoader.qml | 0 .../qquickloader/data/BigComponent.qml | 0 .../qquickloader/data/BlueRect.qml | 0 .../data/CreationContextLoader.qml | 0 .../data/GraphicsWidget250x250.qml | 0 .../qquickloader/data/GreenRect.qml | 0 .../data/InitialPropertyValuesComponent.qml | 0 .../data/InvalidSourceComponent.qml | 0 .../qquickloader/data/NoResize.qml | 0 .../data/NoResizeGraphicsWidget.qml | 0 .../qquickloader/data/QTBUG_16928.qml | 0 .../qquickloader/data/QTBUG_17114.qml | 0 .../qquickloader/data/Rect120x60.qml | 0 .../qquickloader/data/SetSourceComponent.qml | 0 .../data/SizeGraphicsWidgetToLoader.qml | 0 .../data/SizeLoaderToGraphicsWidget.qml | 0 .../qquickloader/data/SizeToItem.qml | 0 .../qquickloader/data/SizeToLoader.qml | 0 .../qquickloader/data/VmeError.qml | 0 .../qquickloader/data/active.1.qml | 0 .../qquickloader/data/active.2.qml | 0 .../qquickloader/data/active.3.qml | 0 .../qquickloader/data/active.4.qml | 0 .../qquickloader/data/active.5.qml | 0 .../qquickloader/data/active.6.qml | 0 .../qquickloader/data/active.7.qml | 0 .../qquickloader/data/active.8.qml | 0 .../qquickloader/data/asynchronous.qml | 0 .../qquickloader/data/crash.qml | 0 .../qquickloader/data/creationContext.qml | 0 .../qquickloader/data/differentorigin.qml | 0 .../qquickloader/data/implicitSize.qml | 0 .../data/initialPropertyValues.1.qml | 0 .../data/initialPropertyValues.2.qml | 0 .../data/initialPropertyValues.3.qml | 0 .../data/initialPropertyValues.4.qml | 0 .../data/initialPropertyValues.5.qml | 0 .../data/initialPropertyValues.6.qml | 0 .../data/initialPropertyValues.7.qml | 0 .../data/initialPropertyValues.8.qml | 0 .../data/initialPropertyValues.binding.qml | 0 .../data/initialPropertyValues.error.1.qml | 0 .../data/initialPropertyValues.error.2.qml | 0 .../data/initialPropertyValues.error.3.qml | 0 .../data/initialPropertyValues.error.4.qml | 0 .../qquickloader/data/nonItem.qml | 0 .../qquickloader/data/parented.qml | 0 .../qquickloader/data/qmldir | 0 .../qquickloader/data/sameorigin-load.qml | 0 .../qquickloader/data/sameorigin.qml | 0 .../qquickloader/data/sizebound.qml | 0 .../qquickloader/data/vmeErrors.qml | 0 .../qquickloader/qquickloader.pro | 2 +- .../qquickloader/tst_qquickloader.cpp | 84 +- .../qquickmousearea/data/clickThrough.qml | 0 .../qquickmousearea/data/clickThrough2.qml | 0 .../qquickmousearea/data/clickandhold.qml | 0 .../qquickmousearea/data/clicktwice.qml | 0 .../qquickmousearea/data/doubleclick.qml | 0 .../qquickmousearea/data/dragging.qml | 0 .../qquickmousearea/data/dragproperties.qml | 0 .../qquickmousearea/data/dragreset.qml | 0 .../qquickmousearea/data/hoverPosition.qml | 0 .../qquickmousearea/data/hoverPropagation.qml | 0 .../qquickmousearea/data/hoverVisible.qml | 0 .../qquickmousearea/data/noclickandhold.qml | 0 .../qquickmousearea/data/pressedCanceled.qml | 0 .../qquickmousearea/data/pressedOrdering.qml | 0 .../qquickmousearea/data/preventstealing.qml | 0 .../qquickmousearea/data/rejectEvent.qml | 0 .../data/updateMousePosOnClick.qml | 0 .../data/updateMousePosOnResize.qml | 0 .../qquickmousearea/qquickmousearea.pro | 2 +- .../qquickmousearea/tst_qquickmousearea.cpp | 6 +- .../qquickmultipointtoucharea/data/basic.qml | 0 .../data/inFlickable.qml | 0 .../qquickmultipointtoucharea/data/nested.qml | 0 .../data/nonOverlapping.qml | 0 .../data/properties.qml | 0 .../data/signalTest.qml | 0 .../qquickmultipointtoucharea.pro | 2 +- .../tst_qquickmultipointtoucharea.cpp | 2 +- .../qquickpath}/data/arc.qml | 0 .../qquickpath}/data/closedcurve.qml | 0 .../qquickpath}/data/curve.qml | 0 .../qquickpath}/data/svg.qml | 0 tests/auto/quick/qquickpath/qquickpath.pro | 15 + .../qquickpath/tst_qquickpath.cpp} | 66 +- .../qquickpathview/data/ComponentView.qml | 0 .../qquickpathview/data/asyncloader.qml | 0 .../qquickpathview/data/closedPath.qml | 0 .../qquickpathview/data/creationContext.qml | 0 .../qquickpathview/data/datamodel.qml | 0 .../qquickpathview/data/displaypath.qml | 0 .../qquickpathview/data/dragpath.qml | 0 .../qquickpathview/data/emptymodel.qml | 0 .../qquickpathview/data/missingPercent.qml | 0 .../qquickpathview/data/openPath.qml | 0 .../qquickpathview/data/pathUpdate.qml | 0 .../data/pathUpdateOnStartChanged.qml | 0 .../qquickpathview/data/pathline.qml | 0 .../qquickpathview/data/pathtest.qml | 0 .../qquickpathview/data/pathview0.qml | 0 .../qquickpathview/data/pathview1.qml | 0 .../qquickpathview/data/pathview2.qml | 0 .../qquickpathview/data/pathview3.qml | 0 .../qquickpathview/data/pathview_package.qml | 0 .../qquickpathview/data/propertychanges.qml | 0 .../qquickpathview/data/treemodel.qml | 0 .../qquickpathview/data/undefinedpath.qml | 0 .../qquickpathview/data/vdm.qml | 0 .../qquickpathview/qquickpathview.pro | 2 +- .../qquickpathview/tst_qquickpathview.cpp | 118 +- .../qquickpincharea/data/pinchproperties.qml | 0 .../qquickpincharea/qquickpincharea.pro | 2 +- .../qquickpincharea/tst_qquickpincharea.cpp | 6 +- .../qquickpixmapcache}/data/exists.png | Bin .../qquickpixmapcache}/data/exists1.png | Bin .../qquickpixmapcache}/data/exists2.png | Bin .../qquickpixmapcache}/data/http/exists.png | Bin .../qquickpixmapcache}/data/http/exists1.png | Bin .../qquickpixmapcache}/data/http/exists2.png | Bin .../qquickpixmapcache}/data/http/exists3.png | Bin .../qquickpixmapcache}/data/http/exists4.png | Bin .../qquickpixmapcache}/data/http/exists5.png | Bin .../qquickpixmapcache}/data/http/exists6.png | Bin .../qquickpixmapcache}/data/http/exists7.png | Bin .../qquickpixmapcache}/data/http/exists8.png | Bin .../qquickpixmapcache}/data/massive.png | Bin .../qquickpixmapcache/qquickpixmapcache.pro} | 6 +- .../tst_qquickpixmapcache.cpp} | 106 +- .../qquickpositioners/data/allInvisible.qml | 0 .../data/attachedproperties-column.qml | 0 .../data/attachedproperties-dynamic.qml | 0 .../data/attachedproperties-flow.qml | 0 .../data/attachedproperties-grid.qml | 0 .../data/attachedproperties-row.qml | 0 .../data/flow-testimplicitsize.qml | 0 .../data/flowtest-toptobottom.qml | 0 .../qquickpositioners/data/flowtest.qml | 0 .../qquickpositioners/data/grid-animated.qml | 0 .../data/grid-row-column-spacing.qml | 0 .../qquickpositioners/data/grid-spacing.qml | 0 .../data/grid-toptobottom.qml | 0 .../qquickpositioners/data/gridtest.qml | 0 .../data/gridzerocolumns.qml | 0 .../data/horizontal-animated-disabled.qml | 0 .../data/horizontal-animated.qml | 0 .../data/horizontal-spacing.qml | 0 .../qquickpositioners/data/horizontal.qml | 0 .../data/propertychangestest.qml | 0 .../data/rectangleComponent.qml | 0 .../qquickpositioners/data/repeatertest.qml | 0 .../data/vertical-animated.qml | 0 .../data/vertical-spacing.qml | 0 .../qquickpositioners/data/vertical.qml | 0 .../qquickpositioners/qquickpositioners.pro | 2 +- .../tst_qquickpositioners.cpp | 20 +- .../qquickrepeater/data/asyncloader.qml | 0 .../qquickrepeater/data/initparent.qml | 0 .../qquickrepeater/data/intmodel.qml | 0 .../qquickrepeater/data/itemlist.qml | 0 .../qquickrepeater/data/modelChanged.qml | 0 .../qquickrepeater/data/objlist.qml | 0 .../qquickrepeater/data/properties.qml | 0 .../qquickrepeater/data/repeater1.qml | 0 .../qquickrepeater/data/repeater2.qml | 0 .../qquickrepeater/qquickrepeater.pro | 2 +- .../qquickrepeater/tst_qquickrepeater.cpp | 42 +- .../qquickscreen/data/screen.qml | 0 .../qquickscreen/qquickscreen.pro | 2 +- .../qquickscreen/tst_qquickscreen.cpp | 2 +- .../qquickshadereffect/qquickshadereffect.pro | 2 +- .../tst_qquickshadereffect.cpp | 0 .../data/deleteOnUpdate.qml | 0 .../data/simpleanimation.qml | 0 .../data/smoothedanimation1.qml | 0 .../data/smoothedanimation2.qml | 0 .../data/smoothedanimation3.qml | 0 .../data/smoothedanimationBehavior.qml | 0 .../data/smoothedanimationValueSource.qml | 0 .../qquicksmoothedanimation.pro | 15 + .../tst_qquicksmoothedanimation.cpp} | 86 +- .../data/springanimation1.qml | 0 .../data/springanimation2.qml | 0 .../data/springanimation3.qml | 0 .../qquickspringanimation.pro} | 10 +- .../tst_qquickspringanimation.cpp} | 44 +- .../qquickspriteimage/data/advance.qml | 0 .../qquickspriteimage/data/basic.qml | 0 .../data/squarefacesprite.png | Bin .../qquickspriteimage/qquickspriteimage.pro | 2 +- .../tst_qquickspriteimage.cpp | 2 +- .../qquickstates}/data/ExtendedRectangle.qml | 0 .../data/Implementation/MyType.qml | 0 .../data/Implementation/images/qt-logo.png | Bin .../qquickstates}/data/QTBUG-14830.qml | 0 .../qquickstates}/data/anchorChanges1.qml | 0 .../qquickstates}/data/anchorChanges2.qml | 0 .../qquickstates}/data/anchorChanges3.qml | 0 .../qquickstates}/data/anchorChanges4.qml | 0 .../qquickstates}/data/anchorChanges5.qml | 0 .../qquickstates}/data/anchorChangesCrash.qml | 0 .../qquickstates}/data/anchorRewindBug.qml | 0 .../qquickstates}/data/anchorRewindBug2.qml | 0 .../data/attachedPropertyChanges.qml | 0 .../data/autoStateAtStartupRestoreBug.qml | 0 .../qquickstates}/data/avoidFastForward.qml | 0 .../qquickstates}/data/basicBinding.qml | 0 .../qquickstates}/data/basicBinding2.qml | 0 .../qquickstates}/data/basicBinding3.qml | 0 .../qquickstates}/data/basicBinding4.qml | 0 .../qquickstates}/data/basicChanges.qml | 0 .../qquickstates}/data/basicChanges2.qml | 0 .../qquickstates}/data/basicChanges3.qml | 0 .../qquickstates}/data/basicChanges4.qml | 0 .../qquickstates}/data/basicExtension.qml | 0 .../qquickstates}/data/deleting.qml | 0 .../qquickstates}/data/deletingState.qml | 0 .../qquickstates}/data/editProperties.qml | 0 .../qquickstates}/data/explicit.qml | 0 .../qquickstates}/data/extendsBug.qml | 0 .../qquickstates}/data/fakeExtension.qml | 0 .../qquickstates}/data/illegalObj.qml | 0 .../qquickstates}/data/illegalTempState.qml | 0 .../qquickstates}/data/image.png | Bin .../qquickstates}/data/legalTempState.qml | 0 .../qquickstates}/data/nonExistantProp.qml | 0 .../qquickstates}/data/parentChange1.qml | 0 .../qquickstates}/data/parentChange2.qml | 0 .../qquickstates}/data/parentChange3.qml | 0 .../qquickstates}/data/parentChange4.qml | 0 .../qquickstates}/data/parentChange5.qml | 0 .../qquickstates}/data/parentChange6.qml | 0 .../qquickstates}/data/propertyErrors.qml | 0 .../qquickstates}/data/reset.qml | 0 .../qquickstates}/data/restoreEntryValues.qml | 0 .../qquickstates}/data/returnToBase.qml | 0 .../qquickstates}/data/revertListBug.qml | 0 .../qquickstates}/data/script.qml | 0 .../qquickstates}/data/signalOverride.qml | 0 .../qquickstates}/data/signalOverride2.qml | 0 .../data/signalOverrideCrash.qml | 0 .../data/signalOverrideCrash2.qml | 0 .../data/signalOverrideCrash3.qml | 0 .../qquickstates}/data/unnamedWhen.qml | 0 .../qquickstates}/data/urlResolution.qml | 0 .../qquickstates}/data/whenOrdering.qml | 0 .../qquickstates/qquickstates.pro} | 7 +- .../qquickstates/tst_qquickstates.cpp} | 376 +++--- .../qquickstyledtext/qquickstyledtext.pro | 8 + .../tst_qquickstyledtext.cpp} | 26 +- .../qquicksystempalette.pro | 8 + .../tst_qquicksystempalette.cpp} | 48 +- .../qquicktext/data/alignments.qml | 0 .../qquicktext/data/alignments_cb.png | Bin .../qquicktext/data/alignments_cc.png | Bin .../qquicktext/data/alignments_ct.png | Bin .../qquicktext/data/alignments_lb.png | Bin .../qquicktext/data/alignments_lc.png | Bin .../qquicktext/data/alignments_lt.png | Bin .../qquicktext/data/alignments_rb.png | Bin .../qquicktext/data/alignments_rc.png | Bin .../qquicktext/data/alignments_rt.png | Bin .../qquicktext/data/embeddedImagesLocal.qml | 0 .../data/embeddedImagesLocalError.qml | 0 .../data/embeddedImagesLocalRelative.qml | 0 .../qquicktext/data/embeddedImagesRemote.qml | 0 .../data/embeddedImagesRemoteError.qml | 0 .../data/embeddedImagesRemoteRelative.qml | 0 .../qquicktext/data/fontSizeMode.qml | 0 .../data/horizontalAlignment_RightToLeft.qml | 0 .../qquicktext/data/http/exists.png | Bin .../qquicktext/data/images/face-sad.png | Bin .../qquicktext/data/images/heart200.png | Bin .../qquicktext/data/images/starfish_2.png | Bin .../qquicktext/data/imgTagsElide.qml | 0 .../qquicktext/data/imgTagsUpdates.qml | 0 .../qquicktext/data/lineCount.qml | 0 .../qquicktext/data/lineHeight.qml | 0 .../qquicktext/data/lineLayout.qml | 0 .../qquicktext/data/multilengthStrings.qml | 0 .../data/multilengthStringsWrapped.qml | 0 .../qquicktext/data/multilineelide.qml | 0 .../qquicktext/data/qtbug_14734.qml | 0 .../qquicktext/data/rotated.qml | 0 .../qquicktext/qquicktext.pro | 2 +- .../qquicktext/tst_qquicktext.cpp | 164 +-- .../qquicktextedit/data/Cursor.qml | 0 .../qquicktextedit/data/CursorRect.qml | 0 .../qquicktextedit/data/alignments.qml | 0 .../qquicktextedit/data/alignments_cb.png | Bin .../qquicktextedit/data/alignments_cc.png | Bin .../qquicktextedit/data/alignments_ct.png | Bin .../qquicktextedit/data/alignments_lb.png | Bin .../qquicktextedit/data/alignments_lc.png | Bin .../qquicktextedit/data/alignments_lt.png | Bin .../qquicktextedit/data/alignments_rb.png | Bin .../qquicktextedit/data/alignments_rc.png | Bin .../qquicktextedit/data/alignments_rt.png | Bin .../qquicktextedit/data/cursorTest.qml | 0 .../data/cursorTestExternal.qml | 0 .../qquicktextedit/data/cursorTestInline.qml | 0 .../qquicktextedit/data/cursorVisible.qml | 0 .../data/embeddedImagesLocal.qml | 0 .../data/embeddedImagesLocalError.qml | 0 .../data/embeddedImagesLocalRelative.qml | 0 .../data/embeddedImagesRemote.qml | 0 .../data/embeddedImagesRemoteError.qml | 0 .../data/embeddedImagesRemoteRelative.qml | 0 .../qquicktextedit/data/geometrySignals.qml | 0 .../data/horizontalAlignment_RightToLeft.qml | 0 .../qquicktextedit/data/http/ErrItem.qml | 0 .../qquicktextedit/data/http/NormItem.qml | 0 .../data/http/cursorHttpTest.qml | 0 .../data/http/cursorHttpTestFail1.qml | 0 .../data/http/cursorHttpTestFail2.qml | 0 .../data/http/cursorHttpTestPass.qml | 0 .../qquicktextedit/data/http/exists.png | Bin .../qquicktextedit/data/http/qmldir | 0 .../qquicktextedit/data/httpfail/FailItem.qml | 0 .../qquicktextedit/data/httpslow/WaitItem.qml | 0 .../qquicktextedit/data/inputContext.qml | 0 .../qquicktextedit/data/inputMethodEvent.qml | 0 .../qquicktextedit/data/inputmethodhints.qml | 0 .../qquicktextedit/data/linkActivated.qml | 0 .../data/mouseselection_default.qml | 0 .../data/mouseselection_false.qml | 0 .../data/mouseselection_false_words.qml | 0 .../data/mouseselection_true.qml | 0 .../data/mouseselection_true_words.qml | 0 .../data/mouseselectionmode_characters.qml | 0 .../data/mouseselectionmode_default.qml | 0 .../data/mouseselectionmode_words.qml | 0 .../qquicktextedit/data/navigation.qml | 0 .../qquicktextedit/data/openInputPanel.qml | 0 .../data/persistentSelection.qml | 0 .../qquicktextedit/data/positionAt.qml | 0 .../qquicktextedit/data/qtbug-22058.qml | 0 .../qquicktextedit/data/readOnly.qml | 0 .../qquicktextedit/qquicktextedit.pro | 2 +- .../qquicktextedit/tst_qquicktextedit.cpp | 120 +- .../qquicktextinput/data/Cursor.qml | 0 .../qquicktextinput/data/cursorTest.qml | 0 .../data/cursorTestExternal.qml | 0 .../qquicktextinput/data/cursorTestInline.qml | 0 .../qquicktextinput/data/cursorVisible.qml | 0 .../qquicktextinput/data/echoMode.qml | 0 .../qquicktextinput/data/geometrySignals.qml | 0 .../qquicktextinput/data/halign_center.png | Bin .../qquicktextinput/data/halign_left.png | Bin .../qquicktextinput/data/halign_right.png | Bin .../data/horizontalAlignment.qml | 0 .../data/horizontalAlignment_RightToLeft.qml | 0 .../qquicktextinput/data/inputContext.qml | 0 .../qquicktextinput/data/inputMethodEvent.qml | 0 .../qquicktextinput/data/inputmethods.qml | 0 .../qquicktextinput/data/masks.qml | 0 .../qquicktextinput/data/maxLength.qml | 0 .../data/mouseselection_true.qml | 0 .../data/mouseselectionmode_characters.qml | 0 .../data/mouseselectionmode_default.qml | 0 .../data/mouseselectionmode_words.qml | 0 .../qquicktextinput/data/navigation.qml | 0 .../data/negativeDimensions.qml | 0 .../qquicktextinput/data/openInputPanel.qml | 0 .../data/persistentSelection.qml | 0 .../qquicktextinput/data/positionAt.qml | 0 .../data/preeditAutoScroll.qml | 0 .../data/qtbug-19956double.qml | 0 .../qquicktextinput/data/qtbug-19956int.qml | 0 .../data/qtbug-19956regexp.qml | 0 .../qquicktextinput/data/readOnly.qml | 0 .../qquicktextinput/data/validators.qml | 0 .../qquicktextinput/qquicktextinput.pro | 2 +- .../qquicktextinput/tst_qquicktextinput.cpp | 82 +- tests/auto/quick/qquicktimer/qquicktimer.pro | 8 + .../qquicktimer/tst_qquicktimer.cpp} | 102 +- .../qquickview/data/error1.qml | 0 .../qquickview/data/resizemodeitem.qml | 0 .../qquickview/qquickview.pro | 2 +- .../qquickview/tst_qquickview.cpp | 6 +- .../qquickvisualdatamodel/data/create.qml | 0 .../data/datalist-package.qml | 0 .../qquickvisualdatamodel/data/datalist.qml | 0 .../data/groups-invalid.qml | 0 .../data/groups-package.qml | 0 .../qquickvisualdatamodel/data/groups.qml | 0 .../data/itemsDestroyed_listView.qml | 0 .../data/itemsDestroyed_package.qml | 0 .../data/itemsDestroyed_pathView.qml | 0 .../data/itemsDestroyed_repeater.qml | 0 .../data/listmodelproperties-package.qml | 0 .../data/listmodelproperties.qml | 0 .../data/modelproperties.qml | 0 .../data/modelproperties2.qml | 0 .../data/multipleroleproperties-package.qml | 0 .../data/multipleroleproperties.qml | 0 .../qquickvisualdatamodel/data/objectlist.qml | 0 .../data/objectlistproperties-package.qml | 0 .../data/objectlistproperties.qml | 0 .../qquickvisualdatamodel/data/onChanged.qml | 0 .../data/packageView.qml | 0 .../data/singlerole1.qml | 0 .../data/singlerole2.qml | 0 .../data/singleroleproperties-package.qml | 0 .../data/singleroleproperties.qml | 0 .../data/stringlistproperties-package.qml | 0 .../data/stringlistproperties.qml | 0 .../data/visualdatamodel.qml | 0 .../qquickvisualdatamodel.pro | 2 +- .../tst_qquickvisualdatamodel.cpp | 90 +- .../qquickxmllistmodel}/data/empty.xml | 0 .../qquickxmllistmodel}/data/get.qml | 0 .../qquickxmllistmodel}/data/model.qml | 0 .../qquickxmllistmodel}/data/model.xml | 0 .../qquickxmllistmodel}/data/model2.xml | 0 .../data/propertychanges.qml | 0 .../qquickxmllistmodel}/data/recipes.qml | 0 .../qquickxmllistmodel}/data/recipes.xml | 0 .../qquickxmllistmodel}/data/roleCrash.qml | 0 .../qquickxmllistmodel}/data/roleErrors.qml | 0 .../qquickxmllistmodel}/data/roleKeys.qml | 0 .../qquickxmllistmodel}/data/testtypes.qml | 0 .../qquickxmllistmodel}/data/unique.qml | 0 .../qquickxmllistmodel/qquickxmllistmodel.pro | 15 + .../tst_qquickxmllistmodel.cpp} | 258 ++-- .../qtquick2.pro => quick/quick.pro} | 30 +- .../rendernode/data/MessUpState.qml | 0 .../rendernode/data/RenderOrder.qml | 0 .../rendernode/rendernode.pro | 2 +- .../rendernode/tst_rendernode.cpp | 2 +- .../auto/{qtquick2 => quick}/shared/util.pri | 2 +- .../shared/viewtestutil.cpp | 6 +- .../{qtquick2 => quick}/shared/viewtestutil.h | 4 +- .../shared/visualtestutil.cpp | 0 .../shared/visualtestutil.h | 4 +- tests/auto/shared/util.cpp | 32 +- tests/auto/shared/util.h | 24 +- tests/auto/shared/util.pri | 2 +- .../qdeclarativedebugtrace.pro | 8 - .../particles/affectors/affectors.pro | 2 +- .../particles/emission/emission.pro | 2 +- .../animation/animation.pro | 4 +- .../animation/data/animation.qml | 0 .../animation/tst_animation.cpp | 30 +- .../{declarative => qml}/binding/binding.pro | 2 +- .../binding/data/creation.txt | 0 .../binding/data/idproperty.txt | 0 .../binding/data/localproperty.txt | 0 .../binding/data/objectproperty.txt | 0 .../binding/testtypes.cpp | 0 .../{declarative => qml}/binding/testtypes.h | 6 +- .../binding/tst_binding.cpp | 10 +- .../compilation/compilation.pro | 2 +- .../compilation/data/BoomBlock.qml | 2 +- .../compilation/tst_compilation.cpp | 30 +- .../creation/creation.pro | 2 +- .../creation/data/item.qml | 2 +- .../creation/data/qobject.qml | 2 +- .../creation/tst_creation.cpp | 72 +- .../data/dynamicTargets/DynamicFour.qml | 0 .../data/dynamicTargets/DynamicOne.qml | 0 .../data/dynamicTargets/DynamicThree.qml | 0 .../data/dynamicTargets/DynamicTwo.qml | 0 .../holistic/data/jsImports/Mlbsi.qml | 0 .../holistic/data/jsImports/Mldsi.qml | 0 .../holistic/data/jsImports/Mlsi.qml | 0 .../holistic/data/jsImports/ModuleBm.qml | 0 .../holistic/data/jsImports/Msbsi.qml | 0 .../holistic/data/jsImports/Msdsi.qml | 0 .../holistic/data/jsImports/Mssi.qml | 0 .../holistic/data/jsImports/PragmaBm.qml | 0 .../data/jsImports/PragmaModuleBm.qml | 0 .../holistic/data/jsImports/Slsi.qml | 0 .../holistic/data/jsImports/Sssi.qml | 0 .../holistic/data/jsImports/mlbsi.js | 0 .../holistic/data/jsImports/mlbsi1.js | 0 .../holistic/data/jsImports/mlbsi10.js | 0 .../holistic/data/jsImports/mlbsi11.js | 0 .../holistic/data/jsImports/mlbsi12.js | 0 .../holistic/data/jsImports/mlbsi13.js | 0 .../holistic/data/jsImports/mlbsi14.js | 0 .../holistic/data/jsImports/mlbsi15.js | 0 .../holistic/data/jsImports/mlbsi2.js | 0 .../holistic/data/jsImports/mlbsi3.js | 0 .../holistic/data/jsImports/mlbsi4.js | 0 .../holistic/data/jsImports/mlbsi5.js | 0 .../holistic/data/jsImports/mlbsi6.js | 0 .../holistic/data/jsImports/mlbsi7.js | 0 .../holistic/data/jsImports/mlbsi8.js | 0 .../holistic/data/jsImports/mlbsi9.js | 0 .../holistic/data/jsImports/mldsi.js | 0 .../holistic/data/jsImports/mldsi1.js | 0 .../holistic/data/jsImports/mldsi10.js | 0 .../holistic/data/jsImports/mldsi11.js | 0 .../holistic/data/jsImports/mldsi12.js | 0 .../holistic/data/jsImports/mldsi13.js | 0 .../holistic/data/jsImports/mldsi14.js | 0 .../holistic/data/jsImports/mldsi15.js | 0 .../holistic/data/jsImports/mldsi2.js | 0 .../holistic/data/jsImports/mldsi3.js | 0 .../holistic/data/jsImports/mldsi4.js | 0 .../holistic/data/jsImports/mldsi5.js | 0 .../holistic/data/jsImports/mldsi6.js | 0 .../holistic/data/jsImports/mldsi7.js | 0 .../holistic/data/jsImports/mldsi8.js | 0 .../holistic/data/jsImports/mldsi9.js | 0 .../holistic/data/jsImports/mlsi.js | 0 .../holistic/data/jsImports/moduleBm.js | 0 .../holistic/data/jsImports/msbsi.js | 0 .../holistic/data/jsImports/msbsi1.js | 0 .../holistic/data/jsImports/msbsi10.js | 0 .../holistic/data/jsImports/msbsi11.js | 0 .../holistic/data/jsImports/msbsi12.js | 0 .../holistic/data/jsImports/msbsi13.js | 0 .../holistic/data/jsImports/msbsi14.js | 0 .../holistic/data/jsImports/msbsi15.js | 0 .../holistic/data/jsImports/msbsi2.js | 0 .../holistic/data/jsImports/msbsi3.js | 0 .../holistic/data/jsImports/msbsi4.js | 0 .../holistic/data/jsImports/msbsi5.js | 0 .../holistic/data/jsImports/msbsi6.js | 0 .../holistic/data/jsImports/msbsi7.js | 0 .../holistic/data/jsImports/msbsi8.js | 0 .../holistic/data/jsImports/msbsi9.js | 0 .../holistic/data/jsImports/msdsi.js | 0 .../holistic/data/jsImports/msdsi1.js | 0 .../holistic/data/jsImports/msdsi10.js | 0 .../holistic/data/jsImports/msdsi11.js | 0 .../holistic/data/jsImports/msdsi12.js | 0 .../holistic/data/jsImports/msdsi13.js | 0 .../holistic/data/jsImports/msdsi14.js | 0 .../holistic/data/jsImports/msdsi15.js | 0 .../holistic/data/jsImports/msdsi2.js | 0 .../holistic/data/jsImports/msdsi3.js | 0 .../holistic/data/jsImports/msdsi4.js | 0 .../holistic/data/jsImports/msdsi5.js | 0 .../holistic/data/jsImports/msdsi6.js | 0 .../holistic/data/jsImports/msdsi7.js | 0 .../holistic/data/jsImports/msdsi8.js | 0 .../holistic/data/jsImports/msdsi9.js | 0 .../holistic/data/jsImports/mssi.js | 0 .../holistic/data/jsImports/pragmaBmOne.js | 0 .../holistic/data/jsImports/pragmaBmTwo.js | 0 .../holistic/data/jsImports/pragmaLib.js | 0 .../holistic/data/jsImports/pragmaModuleBm.js | 0 .../holistic/data/jsImports/slsi.js | 0 .../holistic/data/jsImports/sssi.js | 0 .../holistic/data/jsTargets/JsOne.qml | 0 .../holistic/data/jsTargets/JsTwo.qml | 0 .../data/largeTargets/gridview-example.qml | 0 .../data/largeTargets/layoutdirection.qml | 0 .../data/largeTargets/mousearea-example.qml | 0 .../data/resolutionTargets/ResolveOne.qml | 0 .../holistic/data/scopeSwitching/CppToJs.qml | 0 .../holistic/data/scopeSwitching/CppToQml.qml | 0 .../data/scopeSwitching/JsToCppEight.qml | 0 .../data/scopeSwitching/JsToCppEleven.qml | 0 .../data/scopeSwitching/JsToCppFive.qml | 0 .../data/scopeSwitching/JsToCppFour.qml | 0 .../data/scopeSwitching/JsToCppNine.qml | 0 .../data/scopeSwitching/JsToCppOne.qml | 0 .../data/scopeSwitching/JsToCppSeven.qml | 0 .../data/scopeSwitching/JsToCppSix.qml | 0 .../data/scopeSwitching/JsToCppTen.qml | 0 .../data/scopeSwitching/JsToCppThree.qml | 0 .../data/scopeSwitching/JsToCppTwo.qml | 0 .../data/scopeSwitching/ScarceOne.qml | 0 .../data/scopeSwitching/ScarceTwo.qml | 0 .../holistic/data/scopeSwitching/cppToJs.js | 0 .../holistic/data/smallTargets/SmallFour.qml | 0 .../holistic/data/smallTargets/SmallOne.qml | 0 .../holistic/data/smallTargets/SmallThree.qml | 0 .../holistic/data/smallTargets/SmallTwo.qml | 0 .../holistic/holistic.pro | 2 +- .../holistic/testtypes.cpp | 8 +- .../{declarative => qml}/holistic/testtypes.h | 14 +- .../holistic/tst_holistic.cpp | 28 +- .../javascript/data/NestedIdObject.qml | 0 .../javascript/data/intQObjectProperty.qml | 0 .../javascript/data/localId.qml | 0 .../javascript/data/nestedId.qml | 0 .../javascript/data/stringQObjectProperty.qml | 0 .../javascript/javascript.pro | 2 +- .../javascript/testtypes.cpp | 2 +- .../javascript/testtypes.h | 0 .../javascript/tst_javascript.cpp | 8 +- .../benchmarks/{declarative => qml}/js/js.pro | 0 .../js/qjsengine/qjsengine.pro | 2 +- .../js/qjsengine/tst_qjsengine.cpp | 4 +- .../js/qjsvalue/qjsvalue.pro | 2 +- .../js/qjsvalue/tst_qjsvalue.cpp | 4 +- .../js/qjsvalueiterator/qjsvalueiterator.pro | 2 +- .../qjsvalueiterator/tst_qjsvalueiterator.cpp | 6 +- .../painting/data/63x63.png | Bin .../painting/data/63x63_opaque.png | Bin .../painting/data/64x64.png | Bin .../painting/data/64x64_opaque.png | Bin .../painting/paintbenchmark.cpp | 0 .../painting/painting.pro | 0 .../pointers/pointers.pro | 2 +- .../pointers/tst_pointers.cpp | 4 +- .../declarative.pro => qml/qml.pro} | 6 +- .../{declarative => qml}/qmltime/example.qml | 2 +- .../{declarative => qml}/qmltime/qmltime.cpp | 28 +- .../{declarative => qml}/qmltime/qmltime.pro | 2 +- .../qmltime/tests/anchors/empty.qml | 2 +- .../qmltime/tests/anchors/fill.qml | 2 +- .../qmltime/tests/anchors/null.qml | 2 +- .../qmltime/tests/animation/large.qml | 2 +- .../qmltime/tests/animation/largeNoProps.qml | 2 +- .../qmltime/tests/item_creation/children.qml | 2 +- .../qmltime/tests/item_creation/data.qml | 2 +- .../tests/item_creation/no_creation.qml | 2 +- .../qmltime/tests/item_creation/resources.qml | 2 +- .../qmltime/tests/loader/Loaded.qml | 2 +- .../qmltime/tests/loader/component_loader.qml | 2 +- .../qmltime/tests/loader/empty_loader.qml | 2 +- .../qmltime/tests/loader/no_loader.qml | 2 +- .../qmltime/tests/loader/source_loader.qml | 2 +- .../positioner_creation/no_positioner.qml | 2 +- .../positioner_creation/null_positioner.qml | 2 +- .../tests/positioner_creation/positioner.qml | 2 +- .../qmltime/tests/vmemetaobject/null.qml | 2 +- .../qmltime/tests/vmemetaobject/property.qml | 2 +- .../qqmlcomponent}/data/myqmlobject.qml | 2 +- .../data/myqmlobject_binding.qml | 2 +- .../qqmlcomponent}/data/object.qml | 2 +- .../qqmlcomponent}/data/object_id.qml | 2 +- .../data/samegame/BoomBlock.qml | 2 +- .../data/samegame/pics/blueStone.png | Bin .../data/samegame/pics/greenStone.png | Bin .../data/samegame/pics/redStone.png | Bin .../data/samegame/pics/yellowStone.png | Bin .../data/synthesized_properties.2.qml | 2 +- .../data/synthesized_properties.qml | 2 +- .../qqmlcomponent/qqmlcomponent.pro} | 6 +- .../qqmlcomponent}/testtypes.cpp | 0 .../qqmlcomponent}/testtypes.h | 6 +- .../qqmlcomponent/tst_qqmlcomponent.cpp} | 10 +- .../qml/qqmldebugtrace/qqmldebugtrace.pro | 8 + .../qqmldebugtrace/tst_qqmldebugtrace.cpp} | 16 +- .../qqmlimage}/image.png | Bin .../qqmlimage/qqmlimage.pro} | 6 +- .../qqmlimage/tst_qqmlimage.cpp} | 26 +- .../qqmlmetaproperty}/data/object.qml | 2 +- .../data/synthesized_object.qml | 2 +- .../qqmlmetaproperty/qqmlmetaproperty.pro} | 6 +- .../tst_qqmlmetaproperty.cpp} | 14 +- .../script/data/CustomObject.qml | 2 +- .../script/data/block.qml | 2 +- .../script/data/enums.qml | 0 .../script/data/global.js | 0 .../script/data/global_prop.qml | 0 .../script/data/namespacedEnums.qml | 0 .../script/data/script.js | 0 .../script/data/script2.js | 0 .../script/data/scriptCall.qml | 0 .../script/data/signal_args.qml | 2 +- .../script/data/signal_qml.qml | 2 +- .../script/data/signal_unconnected.qml | 2 +- .../script/data/signal_unusedArgs.qml | 2 +- .../script/data/slot_complex.qml | 2 +- .../script/data/slot_complex_js.js | 0 .../script/data/slot_complex_js.qml | 2 +- .../script/data/slot_simple.qml | 2 +- .../script/data/slot_simple_js.js | 0 .../script/data/slot_simple_js.qml | 2 +- .../{declarative => qml}/script/script.pro | 2 +- .../script/tst_script.cpp | 98 +- .../typeimports/data/QmlTestType1.qml | 2 +- .../typeimports/data/QmlTestType2.qml | 2 +- .../typeimports/data/QmlTestType3.qml | 2 +- .../typeimports/data/QmlTestType4.qml | 2 +- .../typeimports/data/cpp.qml | 2 +- .../typeimports/data/qml.qml | 2 +- .../typeimports/tst_typeimports.cpp | 20 +- .../typeimports/typeimports.pro | 2 +- tests/global/global.cfg | 2 +- tests/manual/accessibility/animation.qml | 2 +- tests/manual/accessibility/behavior.qml | 2 +- tests/manual/accessibility/flickable.qml | 2 +- tests/manual/accessibility/hittest.qml | 2 +- .../manual/accessibility/numberanimation.qml | 2 +- tests/manual/accessibility/textandbuttons.qml | 2 +- tests/manual/accessibility/transition.qml | 2 +- tests/testapplications/qsgimage/ImageNG.qml | 2 +- tests/testapplications/qsgimage/img-align.qml | 2 +- tools/qmleasing/TextField.qml | 2 +- tools/qmleasing/easing.qml | 2 +- tools/qmleasing/qmleasing.pro | 2 +- tools/qmlmin/main.cpp | 20 +- tools/qmlmin/qmlmin.pro | 2 +- tools/qmlplugindump/main.cpp | 66 +- tools/qmlplugindump/qmlplugindump.pro | 4 +- tools/qmlprofiler/commandlistener.cpp | 2 +- tools/qmlprofiler/commandlistener.h | 2 +- tools/qmlprofiler/constants.h | 2 +- tools/qmlprofiler/profileclient.cpp | 46 +- tools/qmlprofiler/profileclient.h | 16 +- tools/qmlprofiler/profiledata.cpp | 60 +- tools/qmlprofiler/profiledata.h | 10 +- tools/qmlprofiler/qmlprofiler.pro | 4 +- tools/qmlprofiler/qmlprofilerapplication.cpp | 10 +- tools/qmlprofiler/qmlprofilerapplication.h | 4 +- tools/qmlscene/main.cpp | 18 +- tools/qmlscene/qmlscene.pro | 4 +- tools/qmltestrunner/qmltestrunner.pro | 4 +- 5434 files changed, 24570 insertions(+), 23769 deletions(-) create mode 100755 bin/rename-qtdeclarative-symbols.sh rename doc/src/snippets/{declarative => qml}/Button.qml (100%) rename doc/src/snippets/{declarative => qml}/SelfDestroyingRect.qml (100%) rename doc/src/snippets/{declarative => qml}/Sprite.qml (100%) rename doc/src/snippets/{declarative => qml}/anchoranimation.qml (100%) rename doc/src/snippets/{declarative => qml}/anchorchanges.qml (100%) rename doc/src/snippets/{declarative => qml}/animatedimage.qml (100%) rename doc/src/snippets/{declarative => qml}/animation.qml (100%) rename doc/src/snippets/{declarative => qml}/application.qml (100%) rename doc/src/snippets/{declarative => qml}/behavior.qml (100%) rename doc/src/snippets/{declarative => qml}/borderimage/borderimage-scaled.qml (100%) rename doc/src/snippets/{declarative => qml}/borderimage/borderimage-tiled.qml (100%) rename doc/src/snippets/{declarative => qml}/borderimage/normal-image.qml (100%) rename doc/src/snippets/{declarative => qml}/codingconventions/dotproperties.qml (100%) rename doc/src/snippets/{declarative => qml}/codingconventions/javascript-imports.qml (100%) rename doc/src/snippets/{declarative => qml}/codingconventions/javascript.qml (100%) rename doc/src/snippets/{declarative => qml}/codingconventions/lists.qml (100%) rename doc/src/snippets/{declarative => qml}/codingconventions/myscript.js (100%) rename doc/src/snippets/{declarative => qml}/codingconventions/photo.qml (100%) rename doc/src/snippets/{declarative => qml}/codingconventions/private.qml (100%) rename doc/src/snippets/{declarative => qml}/coloranimation.qml (100%) rename doc/src/snippets/{declarative => qml}/colors.qml (100%) rename doc/src/snippets/{declarative => qml}/column/column-transitions.qml (100%) rename doc/src/snippets/{declarative => qml}/column/column.qml (100%) rename doc/src/snippets/{declarative => qml}/column/vertical-positioner.qml (100%) rename doc/src/snippets/{declarative => qml}/comments.qml (100%) rename doc/src/snippets/{declarative => qml}/component.qml (100%) rename doc/src/snippets/{declarative => qml}/componentCreation.js (100%) rename doc/src/snippets/{declarative => qml}/createComponent-simple.qml (100%) rename doc/src/snippets/{declarative => qml}/createComponent.qml (100%) rename doc/src/snippets/{declarative => qml}/createQmlObject.qml (100%) rename doc/src/snippets/{declarative => qml}/drag.qml (100%) rename doc/src/snippets/{declarative => qml}/dynamicObjects-destroy.qml (100%) rename doc/src/snippets/{declarative => qml}/events.qml (100%) rename doc/src/snippets/{declarative => qml}/flickable.qml (100%) rename doc/src/snippets/{declarative => qml}/flickableScrollbar.qml (100%) rename doc/src/snippets/{declarative => qml}/flipable/flipable.qml (100%) rename doc/src/snippets/{declarative => qml}/flow.qml (100%) rename doc/src/snippets/{declarative => qml}/focus/MyClickableWidget.qml (100%) rename doc/src/snippets/{declarative => qml}/focus/MyWidget.qml (100%) rename doc/src/snippets/{declarative => qml}/focus/advancedFocus.qml (100%) rename doc/src/snippets/{declarative => qml}/focus/basicwidget.qml (100%) rename doc/src/snippets/{declarative => qml}/focus/clickablewidget.qml (100%) rename doc/src/snippets/{declarative => qml}/focus/myfocusscopewidget.qml (100%) rename doc/src/snippets/{declarative => qml}/focus/rectangle.qml (100%) rename doc/src/snippets/{declarative => qml}/focus/widget.qml (100%) rename doc/src/snippets/{declarative => qml}/folderlistmodel.qml (100%) rename doc/src/snippets/{declarative => qml}/gradient.qml (100%) rename doc/src/snippets/{declarative => qml}/grid-spacing.qml (100%) rename doc/src/snippets/{declarative => qml}/grid/grid-items.qml (100%) rename doc/src/snippets/{declarative => qml}/grid/grid-no-spacing.qml (100%) rename doc/src/snippets/{declarative => qml}/grid/grid-spacing.qml (100%) rename doc/src/snippets/{declarative => qml}/grid/grid.qml (100%) rename doc/src/snippets/{declarative => qml}/gridview/ContactModel.qml (100%) rename doc/src/snippets/{declarative => qml}/gridview/gridview.qml (100%) rename doc/src/snippets/{declarative => qml}/image.qml (100%) rename doc/src/snippets/{declarative => qml}/imports/chart.qml (100%) rename doc/src/snippets/{declarative => qml}/imports/installed-module.qml (100%) rename doc/src/snippets/{declarative => qml}/imports/merged-named-imports.qml (100%) rename doc/src/snippets/{declarative => qml}/imports/named-imports.qml (100%) rename doc/src/snippets/{declarative => qml}/imports/network-imports.qml (100%) rename doc/src/snippets/{declarative => qml}/imports/qtquick-1.0.qml (100%) rename doc/src/snippets/{declarative => qml}/imports/timeexample.qml (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/connectjs.qml (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/includejs/app.qml (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/includejs/factorial.js (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/includejs/script.js (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/scarceresources/avatarExample.cpp (92%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/scarceresources/avatarExample.h (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/scarceresources/exampleFive.qml (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/scarceresources/exampleFour.js (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/scarceresources/exampleFour.qml (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/scarceresources/exampleOne.qml (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/scarceresources/exampleThree.js (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/scarceresources/exampleThree.qml (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/scarceresources/exampleTwo.qml (100%) rename doc/src/snippets/{declarative => qml}/integrating-javascript/script.js (100%) rename doc/src/snippets/{declarative => qml}/keynavigation.qml (100%) rename doc/src/snippets/{declarative => qml}/keys/keys-handler.qml (100%) rename doc/src/snippets/{declarative => qml}/keys/keys-pressed.qml (100%) rename doc/src/snippets/{declarative => qml}/layoutmirroring.qml (100%) rename doc/src/snippets/{declarative => qml}/listmodel-modify.qml (100%) rename doc/src/snippets/{declarative => qml}/listmodel-nested.qml (100%) rename doc/src/snippets/{declarative => qml}/listmodel-simple.qml (100%) rename doc/src/snippets/{declarative => qml}/listmodel.qml (100%) rename doc/src/snippets/{declarative => qml}/listview-decorations.qml (100%) rename doc/src/snippets/{declarative => qml}/listview-sections.qml (100%) rename doc/src/snippets/{declarative => qml}/listview.qml (100%) rename doc/src/snippets/{declarative => qml}/listview/ContactModel.qml (100%) rename doc/src/snippets/{declarative => qml}/listview/listview-snippet.qml (100%) rename doc/src/snippets/{declarative => qml}/listview/listview.qml (100%) rename doc/src/snippets/{declarative => qml}/loader/KeyReader.qml (100%) rename doc/src/snippets/{declarative => qml}/loader/MyItem.qml (100%) rename doc/src/snippets/{declarative => qml}/loader/connections.qml (100%) rename doc/src/snippets/{declarative => qml}/loader/focus.qml (100%) rename doc/src/snippets/{declarative => qml}/loader/simple.qml (100%) rename doc/src/snippets/{declarative => qml}/loader/sizeitem.qml (100%) rename doc/src/snippets/{declarative => qml}/loader/sizeloader.qml (100%) rename doc/src/snippets/{declarative => qml}/models/views-models-delegates.qml (100%) rename doc/src/snippets/{declarative => qml}/models/visual-model-and-view.qml (100%) rename doc/src/snippets/{declarative => qml}/mousearea/mousearea-snippet.qml (100%) rename doc/src/snippets/{declarative => qml}/mousearea/mousearea.qml (100%) rename doc/src/snippets/{declarative => qml}/mousearea/mouseareadragfilter.qml (100%) rename doc/src/snippets/{declarative => qml}/multipointtoucharea/multipointtoucharea.qml (100%) rename doc/src/snippets/{declarative => qml}/numberanimation.qml (100%) rename doc/src/snippets/{declarative => qml}/parallelanimation.qml (100%) rename doc/src/snippets/{declarative => qml}/parentanimation.qml (100%) rename doc/src/snippets/{declarative => qml}/parentchange.qml (100%) rename doc/src/snippets/{declarative => qml}/path/arcdirection.qml (100%) rename doc/src/snippets/{declarative => qml}/path/arcradius.qml (100%) rename doc/src/snippets/{declarative => qml}/path/basicarc.qml (100%) rename doc/src/snippets/{declarative => qml}/path/basiccurve.qml (100%) rename doc/src/snippets/{declarative => qml}/path/largearc.qml (100%) rename doc/src/snippets/{declarative => qml}/pathinterpolator.qml (100%) rename doc/src/snippets/{declarative => qml}/pathview/ContactModel.qml (100%) rename doc/src/snippets/{declarative => qml}/pathview/pathattributes.qml (100%) rename doc/src/snippets/{declarative => qml}/pathview/pathview.qml (100%) rename doc/src/snippets/{declarative => qml}/properties.qml (100%) rename doc/src/snippets/{declarative => qml}/propertyaction-sequential.qml (100%) rename doc/src/snippets/{declarative => qml}/propertyaction.qml (100%) rename doc/src/snippets/{declarative => qml}/propertyanimation.qml (100%) rename doc/src/snippets/{declarative => qml}/propertychanges.qml (100%) rename doc/src/snippets/{declarative => qml}/qml-data-models/dynamic-listmodel.qml (100%) rename doc/src/snippets/{declarative => qml}/qml-data-models/listelements.qml (100%) rename doc/src/snippets/{declarative => qml}/qml-data-models/listmodel-listview.qml (100%) rename doc/src/snippets/{declarative => qml}/qml-documents/inline-component.qml (100%) rename doc/src/snippets/{declarative => qml}/qml-documents/inline-text-component.qml (100%) rename doc/src/snippets/{declarative => qml}/qml-documents/non-trivial.qml (100%) rename doc/src/snippets/{declarative => qml}/qml-documents/qmldocuments.qml (100%) rename doc/src/snippets/{declarative => qml}/qml-intro/images/qt-logo.svg (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/context-advanced/MyItem.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/context-advanced/applicationdata.h (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/context-advanced/connections.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/context-advanced/main.cpp (97%) rename doc/src/snippets/{declarative => qml}/qtbinding/context/MyItem.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/context/main.cpp (97%) rename doc/src/snippets/{declarative => qml}/qtbinding/enums/imageviewer.h (95%) rename doc/src/snippets/{declarative => qml}/qtbinding/enums/standalone.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/functions-cpp/MyItem.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/functions-cpp/main.cpp (97%) rename doc/src/snippets/{declarative => qml}/qtbinding/functions-cpp/myclass.h (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/functions-qml/MyItem.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/functions-qml/main.cpp (95%) rename doc/src/snippets/{declarative => qml}/qtbinding/loading/MyItem.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/loading/main.cpp (85%) rename doc/src/snippets/{declarative => qml}/qtbinding/newelements/imageviewer.h (97%) rename doc/src/snippets/{declarative => qml}/qtbinding/newelements/main.cpp (97%) rename doc/src/snippets/{declarative => qml}/qtbinding/newelements/standalone.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/properties-cpp/MyItem.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/properties-cpp/applicationdata.h (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/properties-qml/MyItem.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/properties-qml/main.cpp (89%) rename doc/src/snippets/{declarative => qml}/qtbinding/resources/example.qrc (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/resources/main.cpp (96%) rename doc/src/snippets/{declarative => qml}/qtbinding/resources/main.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/resources/resources.pro (71%) rename doc/src/snippets/{declarative => qml}/qtbinding/signals-cpp/MyItem.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/signals-cpp/imageviewer.h (95%) rename doc/src/snippets/{declarative => qml}/qtbinding/signals-cpp/main.cpp (94%) rename doc/src/snippets/{declarative => qml}/qtbinding/signals-cpp/standalone.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/signals-qml/MyItem.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/signals-qml/main.cpp (96%) rename doc/src/snippets/{declarative => qml}/qtbinding/signals-qml/myclass.h (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/variantlistmap/MyItem.qml (100%) rename doc/src/snippets/{declarative => qml}/qtbinding/variantlistmap/main.cpp (96%) rename doc/src/snippets/{declarative => qml}/qtobject.qml (100%) rename doc/src/snippets/{declarative => qml}/rectangle/rect-border-width.qml (100%) rename doc/src/snippets/{declarative => qml}/rectangle/rectangle-colors.qml (100%) rename doc/src/snippets/{declarative => qml}/rectangle/rectangle-gradient.qml (100%) rename doc/src/snippets/{declarative => qml}/rectangle/rectangle.qml (100%) rename doc/src/snippets/{declarative => qml}/repeaters/repeater-grid-index.qml (100%) rename doc/src/snippets/{declarative => qml}/repeaters/repeater.qml (100%) rename doc/src/snippets/{declarative => qml}/reusablecomponents/Button.qml (100%) rename doc/src/snippets/{declarative => qml}/reusablecomponents/application.qml (100%) rename doc/src/snippets/{declarative => qml}/reusablecomponents/component.qml (100%) rename doc/src/snippets/{declarative => qml}/reusablecomponents/focusbutton.qml (100%) rename doc/src/snippets/{declarative => qml}/reusablecomponents/qmldir (100%) rename doc/src/snippets/{declarative => qml}/righttoleft.qml (100%) rename doc/src/snippets/{declarative => qml}/righttoleft/Child.qml (100%) rename doc/src/snippets/{declarative => qml}/rotation.qml (100%) rename doc/src/snippets/{declarative => qml}/rotationanimation.qml (100%) rename doc/src/snippets/{declarative => qml}/row.qml (100%) rename doc/src/snippets/{declarative => qml}/row/row.qml (100%) rename doc/src/snippets/{declarative => qml}/script.js (100%) rename doc/src/snippets/{declarative => qml}/sequentialanimation.qml (100%) rename doc/src/snippets/{declarative => qml}/smoothedanimation.qml (100%) rename doc/src/snippets/{declarative => qml}/springanimation.qml (100%) rename doc/src/snippets/{declarative => qml}/state-when.qml (100%) rename doc/src/snippets/{declarative => qml}/state.qml (100%) rename doc/src/snippets/{declarative => qml}/states.qml (100%) rename doc/src/snippets/{declarative => qml}/states/statechangescript.qml (100%) rename doc/src/snippets/{declarative => qml}/systempalette.qml (100%) rename doc/src/snippets/{declarative => qml}/text/onLinkActivated.qml (97%) rename doc/src/snippets/{declarative => qml}/texthandling.qml (100%) rename doc/src/snippets/{declarative => qml}/transition-from-to-modified.qml (100%) rename doc/src/snippets/{declarative => qml}/transition-from-to.qml (100%) rename doc/src/snippets/{declarative => qml}/transition-reversible.qml (100%) rename doc/src/snippets/{declarative => qml}/transition.qml (100%) rename doc/src/snippets/{declarative => qml}/transitions-list.qml (100%) rename doc/src/snippets/{declarative => qml}/viewtransitions/viewtransitions-basic.qml (100%) rename doc/src/snippets/{declarative => qml}/viewtransitions/viewtransitions-delayedbyindex.qml (100%) rename doc/src/snippets/{declarative => qml}/viewtransitions/viewtransitions-intermediatemove.qml (100%) rename doc/src/snippets/{declarative => qml}/viewtransitions/viewtransitions-interruptedgood.qml (100%) rename doc/src/snippets/{declarative => qml}/viewtransitions/viewtransitions-pathanim.qml (100%) rename doc/src/snippets/{declarative => qml}/viewtransitions/viewtransitions-scriptactionbad.qml (100%) rename doc/src/snippets/{declarative => qml}/viewtransitions/viewtransitions-scriptactiongood.qml (100%) rename doc/src/snippets/{declarative => qml}/visualdatagroup.qml (100%) rename doc/src/snippets/{declarative => qml}/visualdatamodel.qml (100%) rename doc/src/snippets/{declarative => qml}/visualdatamodel_rootindex/main.cpp (93%) rename doc/src/snippets/{declarative => qml}/visualdatamodel_rootindex/view.qml (100%) rename doc/src/snippets/{declarative => qml}/workerscript.qml (100%) rename doc/src/snippets/{declarative => qml}/xmlrole.qml (100%) rename doc/src/snippets/{declarative => qml}/xmlrole.xml (100%) delete mode 100644 examples/declarative/canvas/stockchart/stockchart.pro delete mode 100644 examples/declarative/painteditem/textballoons/textballoons.pro rename examples/{declarative => qml}/README (100%) rename examples/{declarative => qml}/accessibility/accessibility.qml (98%) rename examples/{declarative => qml}/accessibility/widgets/Button.qml (97%) rename examples/{declarative => qml}/animation/animation.qml (100%) rename examples/{declarative => qml}/animation/animation.qmlproject (100%) rename examples/{declarative => qml}/animation/basics/color-animation.qml (100%) rename examples/{declarative => qml}/animation/basics/images/face-smile.png (100%) rename examples/{declarative => qml}/animation/basics/images/moon.png (100%) rename examples/{declarative => qml}/animation/basics/images/shadow.png (100%) rename examples/{declarative => qml}/animation/basics/images/star.png (100%) rename examples/{declarative => qml}/animation/basics/images/sun.png (100%) rename examples/{declarative => qml}/animation/basics/property-animation.qml (100%) rename examples/{declarative => qml}/animation/behaviors/SideRect.qml (100%) rename examples/{declarative => qml}/animation/behaviors/behavior-example.qml (100%) rename examples/{declarative => qml}/animation/behaviors/wigglytext.qml (100%) rename examples/{declarative => qml}/animation/easing/content/QuitButton.qml (100%) rename examples/{declarative => qml}/animation/easing/content/quit.png (100%) rename examples/{declarative => qml}/animation/easing/easing.qml (100%) rename examples/{declarative => qml}/animation/pathanimation/pathanimation.qml (100%) rename examples/{declarative => qml}/animation/pathinterpolator/pathinterpolator.qml (100%) rename examples/{declarative => qml}/animation/states/qt-logo.png (100%) rename examples/{declarative => qml}/animation/states/states.qml (100%) rename examples/{declarative => qml}/animation/states/transitions.qml (100%) rename examples/{declarative => qml}/calculator/calculator.qml (99%) rename examples/{declarative => qml}/calculator/content/Button.qml (97%) rename examples/{declarative => qml}/calculator/content/Display.qml (97%) rename examples/{declarative => qml}/calculator/content/calculator.js (100%) rename examples/{declarative => qml}/calculator/content/images/button-.png (100%) rename examples/{declarative => qml}/calculator/content/images/button-blue.png (100%) rename examples/{declarative => qml}/calculator/content/images/button-green.png (100%) rename examples/{declarative => qml}/calculator/content/images/button-purple.png (100%) rename examples/{declarative => qml}/calculator/content/images/button-red.png (100%) rename examples/{declarative => qml}/calculator/content/images/display.png (100%) rename examples/{declarative => qml}/calculator/content/qmldir (100%) rename examples/{declarative => qml}/canvas/bezierCurve/bezierCurve.qml (100%) rename examples/{declarative => qml}/canvas/clip/clip.qml (100%) rename examples/{declarative => qml}/canvas/contents/Button.qml (100%) rename examples/{declarative => qml}/canvas/contents/ScrollBar.qml (100%) rename examples/{declarative => qml}/canvas/contents/Slider.qml (100%) rename examples/{declarative => qml}/canvas/contents/Stocks.qml (100%) rename examples/{declarative => qml}/canvas/contents/TitleBar.qml (100%) rename examples/{declarative => qml}/canvas/contents/ToolBar.qml (100%) rename examples/{declarative => qml}/canvas/contents/images/button-pressed.png (100%) rename examples/{declarative => qml}/canvas/contents/images/button.png (100%) rename examples/{declarative => qml}/canvas/contents/images/default.svg (100%) rename examples/{declarative => qml}/canvas/contents/images/gloss.png (100%) rename examples/{declarative => qml}/canvas/contents/images/lineedit.png (100%) rename examples/{declarative => qml}/canvas/contents/images/lineedit.sci (100%) rename examples/{declarative => qml}/canvas/contents/images/quit.png (100%) rename examples/{declarative => qml}/canvas/contents/images/stripes.png (100%) rename examples/{declarative => qml}/canvas/contents/images/titlebar.png (100%) rename examples/{declarative => qml}/canvas/contents/images/titlebar.sci (100%) rename examples/{declarative => qml}/canvas/contents/images/toolbutton.png (100%) rename examples/{declarative => qml}/canvas/contents/images/toolbutton.sci (100%) rename examples/{declarative => qml}/canvas/contents/qt-logo.png (100%) rename examples/{declarative => qml}/canvas/quadraticCurveTo/quadraticCurveTo.qml (100%) rename examples/{declarative => qml}/canvas/roundedrect/roundedrect.qml (100%) rename examples/{declarative => qml}/canvas/smile/smile.qml (100%) rename examples/{declarative => qml}/canvas/squircle/squircle.png (100%) rename examples/{declarative => qml}/canvas/squircle/squircle.qml (100%) rename examples/{declarative => qml}/canvas/stockchart/README (100%) rename examples/{declarative => qml}/canvas/stockchart/com/nokia/StockChartExample/qmldir (100%) rename examples/{declarative => qml}/canvas/stockchart/model.cpp (100%) rename examples/{declarative => qml}/canvas/stockchart/model.h (100%) rename examples/{declarative => qml}/canvas/stockchart/plugin.cpp (93%) rename examples/{declarative => qml}/canvas/stockchart/stock.qml (100%) create mode 100644 examples/qml/canvas/stockchart/stockchart.pro rename examples/{declarative => qml}/canvas/tiger/tiger.js (100%) rename examples/{declarative => qml}/canvas/tiger/tiger.qml (100%) rename examples/{declarative => qml}/canvas/twitterfriends/TwitterUser.qml (100%) rename examples/{declarative => qml}/canvas/twitterfriends/cache.js (100%) rename examples/{declarative => qml}/canvas/twitterfriends/twitter.qml (100%) rename examples/{declarative => qml}/cppextensions/cppextensions.pro (100%) rename examples/{declarative => qml}/cppextensions/cppextensions.qmlproject (100%) rename examples/{declarative => qml}/cppextensions/imageprovider/ImageProviderCore/qmldir (100%) rename examples/{declarative => qml}/cppextensions/imageprovider/imageprovider-example.qml (100%) rename examples/{declarative => qml}/cppextensions/imageprovider/imageprovider.cpp (89%) rename examples/{declarative => qml}/cppextensions/imageprovider/imageprovider.pro (60%) rename examples/{declarative => qml}/cppextensions/imageprovider/imageprovider.qmlproject (100%) rename examples/{declarative => qml}/cppextensions/networkaccessmanagerfactory/main.cpp (93%) rename examples/{declarative => qml}/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro (67%) rename examples/{declarative => qml}/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject (100%) rename examples/{declarative => qml}/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc (100%) rename examples/{declarative => qml}/cppextensions/networkaccessmanagerfactory/view.qml (100%) rename examples/{declarative => qml}/cppextensions/plugins/README (100%) rename examples/{declarative => qml}/cppextensions/plugins/com/nokia/TimeExample/Clock.qml (100%) rename examples/{declarative => qml}/cppextensions/plugins/com/nokia/TimeExample/center.png (100%) rename examples/{declarative => qml}/cppextensions/plugins/com/nokia/TimeExample/clock.png (100%) rename examples/{declarative => qml}/cppextensions/plugins/com/nokia/TimeExample/hour.png (100%) rename examples/{declarative => qml}/cppextensions/plugins/com/nokia/TimeExample/minute.png (100%) rename examples/{declarative => qml}/cppextensions/plugins/com/nokia/TimeExample/qmldir (100%) rename examples/{declarative => qml}/cppextensions/plugins/plugin.cpp (96%) rename examples/{declarative => qml}/cppextensions/plugins/plugins.pro (52%) rename examples/{declarative => qml}/cppextensions/plugins/plugins.qml (100%) rename examples/{declarative => qml}/cppextensions/plugins/plugins.qmlproject (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/adding/adding.pro (50%) rename examples/{declarative => qml}/cppextensions/referenceexamples/adding/adding.qrc (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/adding/example.qml (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/adding/main.cpp (93%) rename examples/{declarative => qml}/cppextensions/referenceexamples/adding/person.cpp (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/adding/person.h (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/attached/attached.pro (57%) rename examples/{declarative => qml}/cppextensions/referenceexamples/attached/attached.qrc (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/attached/birthdayparty.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/attached/birthdayparty.h (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/attached/example.qml (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/attached/main.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/attached/person.cpp (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/attached/person.h (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/binding/binding.pro (63%) rename examples/{declarative => qml}/cppextensions/referenceexamples/binding/binding.qrc (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/binding/birthdayparty.cpp (96%) rename examples/{declarative => qml}/cppextensions/referenceexamples/binding/birthdayparty.h (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/binding/example.qml (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/binding/happybirthdaysong.cpp (97%) rename examples/{declarative => qml}/cppextensions/referenceexamples/binding/happybirthdaysong.h (89%) rename examples/{declarative => qml}/cppextensions/referenceexamples/binding/main.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/binding/person.cpp (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/binding/person.h (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/coercion/birthdayparty.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/coercion/birthdayparty.h (94%) rename examples/{declarative => qml}/cppextensions/referenceexamples/coercion/coercion.pro (57%) rename examples/{declarative => qml}/cppextensions/referenceexamples/coercion/coercion.qrc (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/coercion/example.qml (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/coercion/main.cpp (94%) rename examples/{declarative => qml}/cppextensions/referenceexamples/coercion/person.cpp (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/coercion/person.h (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/default/birthdayparty.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/default/birthdayparty.h (94%) rename examples/{declarative => qml}/cppextensions/referenceexamples/default/default.pro (57%) rename examples/{declarative => qml}/cppextensions/referenceexamples/default/default.qrc (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/default/example.qml (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/default/main.cpp (94%) rename examples/{declarative => qml}/cppextensions/referenceexamples/default/person.cpp (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/default/person.h (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/extended/example.qml (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/extended/extended.pro (50%) rename examples/{declarative => qml}/cppextensions/referenceexamples/extended/extended.qrc (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/extended/lineedit.cpp (99%) rename examples/{declarative => qml}/cppextensions/referenceexamples/extended/lineedit.h (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/extended/main.cpp (93%) rename examples/{declarative => qml}/cppextensions/referenceexamples/grouped/birthdayparty.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/grouped/birthdayparty.h (94%) rename examples/{declarative => qml}/cppextensions/referenceexamples/grouped/example.qml (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/grouped/grouped.pro (57%) rename examples/{declarative => qml}/cppextensions/referenceexamples/grouped/grouped.qrc (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/grouped/main.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/grouped/person.cpp (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/grouped/person.h (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/methods/birthdayparty.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/methods/birthdayparty.h (94%) rename examples/{declarative => qml}/cppextensions/referenceexamples/methods/example.qml (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/methods/main.cpp (94%) rename examples/{declarative => qml}/cppextensions/referenceexamples/methods/methods.pro (57%) rename examples/{declarative => qml}/cppextensions/referenceexamples/methods/methods.qrc (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/methods/person.cpp (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/methods/person.h (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/properties/birthdayparty.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/properties/birthdayparty.h (94%) rename examples/{declarative => qml}/cppextensions/referenceexamples/properties/example.qml (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/properties/main.cpp (94%) rename examples/{declarative => qml}/cppextensions/referenceexamples/properties/person.cpp (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/properties/person.h (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/properties/properties.pro (57%) rename examples/{declarative => qml}/cppextensions/referenceexamples/properties/properties.qrc (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/referenceexamples.pro (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/referenceexamples.qmlproject (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/signal/birthdayparty.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/signal/birthdayparty.h (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/signal/example.qml (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/signal/main.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/signal/person.cpp (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/signal/person.h (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/signal/signal.pro (57%) rename examples/{declarative => qml}/cppextensions/referenceexamples/signal/signal.qrc (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/valuesource/birthdayparty.cpp (96%) rename examples/{declarative => qml}/cppextensions/referenceexamples/valuesource/birthdayparty.h (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/valuesource/example.qml (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp (97%) rename examples/{declarative => qml}/cppextensions/referenceexamples/valuesource/happybirthdaysong.h (88%) rename examples/{declarative => qml}/cppextensions/referenceexamples/valuesource/main.cpp (95%) rename examples/{declarative => qml}/cppextensions/referenceexamples/valuesource/person.cpp (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/valuesource/person.h (100%) rename examples/{declarative => qml}/cppextensions/referenceexamples/valuesource/valuesource.pro (62%) rename examples/{declarative => qml}/cppextensions/referenceexamples/valuesource/valuesource.qrc (100%) rename examples/{declarative => qml}/draganddrop/dragtarget.qmlproject (100%) rename examples/{declarative => qml}/draganddrop/tiles/DragTile.qml (100%) rename examples/{declarative => qml}/draganddrop/tiles/DropTile.qml (100%) rename examples/{declarative => qml}/draganddrop/tiles/tiles.qml (100%) rename examples/{declarative => qml}/draganddrop/views/gridview.qml (100%) rename examples/{declarative => qml}/flickr/content/Button.qml (97%) rename examples/{declarative => qml}/flickr/content/GridDelegate.qml (98%) rename examples/{declarative => qml}/flickr/content/ImageDetails.qml (99%) rename examples/{declarative => qml}/flickr/content/ListDelegate.qml (97%) rename examples/{declarative => qml}/flickr/content/Progress.qml (97%) rename examples/{declarative => qml}/flickr/content/RssModel.qml (97%) rename examples/{declarative => qml}/flickr/content/ScrollBar.qml (97%) rename examples/{declarative => qml}/flickr/content/Slider.qml (97%) rename examples/{declarative => qml}/flickr/content/TitleBar.qml (98%) rename examples/{declarative => qml}/flickr/content/ToolBar.qml (97%) rename examples/{declarative => qml}/flickr/content/UnifiedDelegate.qml (98%) rename examples/{declarative => qml}/flickr/content/images/gloss.png (100%) rename examples/{declarative => qml}/flickr/content/images/lineedit.png (100%) rename examples/{declarative => qml}/flickr/content/images/lineedit.sci (100%) rename examples/{declarative => qml}/flickr/content/images/noise.png (100%) rename examples/{declarative => qml}/flickr/content/images/particle.png (100%) rename examples/{declarative => qml}/flickr/content/images/quit.png (100%) rename examples/{declarative => qml}/flickr/content/images/squareParticle.png (100%) rename examples/{declarative => qml}/flickr/content/images/stripes.png (100%) rename examples/{declarative => qml}/flickr/content/images/titlebar.png (100%) rename examples/{declarative => qml}/flickr/content/images/titlebar.sci (100%) rename examples/{declarative => qml}/flickr/content/images/toolbutton.png (100%) rename examples/{declarative => qml}/flickr/content/images/toolbutton.sci (100%) rename examples/{declarative => qml}/flickr/content/qmldir (100%) rename examples/{declarative => qml}/flickr/flickr-90.qml (96%) rename examples/{declarative => qml}/flickr/flickr.qml (98%) rename examples/{declarative => qml}/flickr/flickr.qmlproject (100%) rename examples/{declarative => qml}/i18n/i18n.qml (100%) rename examples/{declarative => qml}/i18n/i18n/base.ts (100%) rename examples/{declarative => qml}/i18n/i18n/qml_en_AU.ts (100%) rename examples/{declarative => qml}/i18n/i18n/qml_fr.ts (100%) rename examples/{declarative => qml}/imageelements/borderimage.qml (100%) rename examples/{declarative => qml}/imageelements/content/BearSheet.png (100%) rename examples/{declarative => qml}/imageelements/content/ImageCell.qml (100%) rename examples/{declarative => qml}/imageelements/content/MyBorderImage.qml (100%) rename examples/{declarative => qml}/imageelements/content/ShadowRectangle.qml (100%) rename examples/{declarative => qml}/imageelements/content/bw.png (100%) rename examples/{declarative => qml}/imageelements/content/colors-round.sci (100%) rename examples/{declarative => qml}/imageelements/content/colors-stretch.sci (100%) rename examples/{declarative => qml}/imageelements/content/colors.png (100%) rename examples/{declarative => qml}/imageelements/content/qt-logo.png (100%) rename examples/{declarative => qml}/imageelements/content/shadow.png (100%) rename examples/{declarative => qml}/imageelements/content/speaker.png (100%) rename examples/{declarative => qml}/imageelements/image.qml (100%) rename examples/{declarative => qml}/imageelements/imageelements.qml (100%) rename examples/{declarative => qml}/imageelements/imageelements.qmlproject (100%) rename examples/{declarative => qml}/imageelements/shadows.qml (100%) rename examples/{declarative => qml}/imageelements/simplesprite.qml (100%) rename examples/{declarative => qml}/imageelements/spriteimage.qml (100%) rename examples/{declarative => qml}/keyinteraction/focus/Core/ContextMenu.qml (100%) rename examples/{declarative => qml}/keyinteraction/focus/Core/GridMenu.qml (100%) rename examples/{declarative => qml}/keyinteraction/focus/Core/ListMenu.qml (100%) rename examples/{declarative => qml}/keyinteraction/focus/Core/ListViewDelegate.qml (100%) rename examples/{declarative => qml}/keyinteraction/focus/Core/images/arrow.png (100%) rename examples/{declarative => qml}/keyinteraction/focus/Core/images/qt-logo.png (100%) rename examples/{declarative => qml}/keyinteraction/focus/focus.qml (100%) rename examples/{declarative => qml}/locale/locale.qml (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/Explosion.qml (97%) rename examples/{declarative => qml}/minehunt/MinehuntCore/Tile.qml (98%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/back.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/background.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/bomb-color.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/bomb.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/face-sad.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/face-smile-big.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/face-smile.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/flag-color.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/flag.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/front.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/quit.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/pics/star.png (100%) rename examples/{declarative => qml}/minehunt/MinehuntCore/qmldir (100%) rename examples/{declarative => qml}/minehunt/README (100%) rename examples/{declarative => qml}/minehunt/main.cpp (96%) rename examples/{declarative => qml}/minehunt/minehunt.cpp (94%) rename examples/{declarative => qml}/minehunt/minehunt.h (96%) rename examples/{declarative => qml}/minehunt/minehunt.pro (77%) rename examples/{declarative => qml}/minehunt/minehunt.qml (98%) rename examples/{declarative => qml}/minehunt/minehunt.qmlproject (100%) rename examples/{declarative => qml}/minehunt/minehunt.qrc (100%) rename examples/{declarative => qml}/modelviews/abstractitemmodel/abstractitemmodel.pro (87%) rename examples/{declarative => qml}/modelviews/abstractitemmodel/abstractitemmodel.qrc (100%) rename examples/{declarative => qml}/modelviews/abstractitemmodel/main.cpp (94%) rename examples/{declarative => qml}/modelviews/abstractitemmodel/model.cpp (100%) rename examples/{declarative => qml}/modelviews/abstractitemmodel/model.h (100%) rename examples/{declarative => qml}/modelviews/abstractitemmodel/view.qml (100%) rename examples/{declarative => qml}/modelviews/gridview/gridview-example.qml (100%) rename examples/{declarative => qml}/modelviews/gridview/pics/AddressBook_48.png (100%) rename examples/{declarative => qml}/modelviews/gridview/pics/AudioPlayer_48.png (100%) rename examples/{declarative => qml}/modelviews/gridview/pics/Camera_48.png (100%) rename examples/{declarative => qml}/modelviews/gridview/pics/DateBook_48.png (100%) rename examples/{declarative => qml}/modelviews/gridview/pics/EMail_48.png (100%) rename examples/{declarative => qml}/modelviews/gridview/pics/TodoList_48.png (100%) rename examples/{declarative => qml}/modelviews/gridview/pics/VideoPlayer_48.png (100%) rename examples/{declarative => qml}/modelviews/listview/content/PetsModel.qml (100%) rename examples/{declarative => qml}/modelviews/listview/content/PressAndHoldButton.qml (100%) rename examples/{declarative => qml}/modelviews/listview/content/RecipesModel.qml (100%) rename examples/{declarative => qml}/modelviews/listview/content/TextButton.qml (100%) rename examples/{declarative => qml}/modelviews/listview/content/ToggleButton.qml (97%) rename examples/{declarative => qml}/modelviews/listview/content/pics/arrow-down.png (100%) rename examples/{declarative => qml}/modelviews/listview/content/pics/arrow-up.png (100%) rename examples/{declarative => qml}/modelviews/listview/content/pics/fruit-salad.jpg (100%) rename examples/{declarative => qml}/modelviews/listview/content/pics/hamburger.jpg (100%) rename examples/{declarative => qml}/modelviews/listview/content/pics/lemonade.jpg (100%) rename examples/{declarative => qml}/modelviews/listview/content/pics/list-delete.png (100%) rename examples/{declarative => qml}/modelviews/listview/content/pics/minus-sign.png (100%) rename examples/{declarative => qml}/modelviews/listview/content/pics/moreDown.png (100%) rename examples/{declarative => qml}/modelviews/listview/content/pics/moreUp.png (100%) rename examples/{declarative => qml}/modelviews/listview/content/pics/pancakes.jpg (100%) rename examples/{declarative => qml}/modelviews/listview/content/pics/plus-sign.png (100%) rename examples/{declarative => qml}/modelviews/listview/content/pics/vegetable-soup.jpg (100%) rename examples/{declarative => qml}/modelviews/listview/dynamiclist.qml (100%) rename examples/{declarative => qml}/modelviews/listview/expandingdelegates.qml (100%) rename examples/{declarative => qml}/modelviews/listview/highlight.qml (100%) rename examples/{declarative => qml}/modelviews/listview/highlightranges.qml (100%) rename examples/{declarative => qml}/modelviews/listview/sections.qml (100%) rename examples/{declarative => qml}/modelviews/modelviews.pro (100%) rename examples/{declarative => qml}/modelviews/modelviews.qml (100%) rename examples/{declarative => qml}/modelviews/modelviews.qmlproject (100%) rename examples/{declarative => qml}/modelviews/objectlistmodel/dataobject.cpp (100%) rename examples/{declarative => qml}/modelviews/objectlistmodel/dataobject.h (100%) rename examples/{declarative => qml}/modelviews/objectlistmodel/main.cpp (95%) rename examples/{declarative => qml}/modelviews/objectlistmodel/objectlistmodel.pro (81%) rename examples/{declarative => qml}/modelviews/objectlistmodel/objectlistmodel.qmlproject (100%) rename examples/{declarative => qml}/modelviews/objectlistmodel/objectlistmodel.qrc (100%) rename examples/{declarative => qml}/modelviews/objectlistmodel/view.qml (100%) rename examples/{declarative => qml}/modelviews/package/Delegate.qml (100%) rename examples/{declarative => qml}/modelviews/package/view.qml (100%) rename examples/{declarative => qml}/modelviews/parallax/content/ParallaxView.qml (100%) rename examples/{declarative => qml}/modelviews/parallax/content/Smiley.qml (100%) rename examples/{declarative => qml}/modelviews/parallax/content/pics/background.jpg (100%) rename examples/{declarative => qml}/modelviews/parallax/content/pics/face-smile.png (100%) rename examples/{declarative => qml}/modelviews/parallax/content/pics/home-page.png (100%) rename examples/{declarative => qml}/modelviews/parallax/content/pics/home-page.svg (100%) rename examples/{declarative => qml}/modelviews/parallax/content/pics/shadow.png (100%) rename examples/{declarative => qml}/modelviews/parallax/content/pics/yast-joystick.png (100%) rename examples/{declarative => qml}/modelviews/parallax/content/pics/yast-wol.png (100%) rename examples/{declarative => qml}/modelviews/parallax/parallax.qml (100%) rename examples/{declarative => qml}/modelviews/pathview/pathview-example.qml (100%) rename examples/{declarative => qml}/modelviews/pathview/pics/AddressBook_48.png (100%) rename examples/{declarative => qml}/modelviews/pathview/pics/AudioPlayer_48.png (100%) rename examples/{declarative => qml}/modelviews/pathview/pics/Camera_48.png (100%) rename examples/{declarative => qml}/modelviews/pathview/pics/DateBook_48.png (100%) rename examples/{declarative => qml}/modelviews/pathview/pics/EMail_48.png (100%) rename examples/{declarative => qml}/modelviews/pathview/pics/TodoList_48.png (100%) rename examples/{declarative => qml}/modelviews/pathview/pics/VideoPlayer_48.png (100%) rename examples/{declarative => qml}/modelviews/stringlistmodel/main.cpp (94%) rename examples/{declarative => qml}/modelviews/stringlistmodel/stringlistmodel.pro (69%) rename examples/{declarative => qml}/modelviews/stringlistmodel/stringlistmodel.qrc (100%) rename examples/{declarative => qml}/modelviews/stringlistmodel/view.qml (100%) rename examples/{declarative => qml}/modelviews/visualdatamodel/dragselection.qml (100%) rename examples/{declarative => qml}/modelviews/visualdatamodel/slideshow.qml (100%) rename examples/{declarative => qml}/modelviews/visualdatamodel/sortedmodel.qml (100%) rename examples/{declarative => qml}/modelviews/visualdatamodel/visualdatamodel.qmlproject (100%) rename examples/{declarative => qml}/modelviews/visualitemmodel/visualitemmodel.qml (100%) rename examples/{declarative => qml}/openglunderqml/main.cpp (100%) rename examples/{declarative => qml}/openglunderqml/main.qml (100%) rename examples/{declarative => qml}/openglunderqml/openglunderqml.pro (77%) rename examples/{declarative => qml}/openglunderqml/squircle.cpp (100%) rename examples/{declarative => qml}/openglunderqml/squircle.h (100%) rename examples/{declarative => qml}/painteditem/painteditem.pro (100%) rename examples/{declarative => qml}/painteditem/smile/main.cpp (98%) rename examples/{declarative => qml}/painteditem/smile/smile.pro (81%) rename examples/{declarative => qml}/painteditem/smile/smile.qml (100%) rename examples/{declarative => qml}/painteditem/textballoons/TextBalloonPlugin/plugin.h (95%) rename examples/{declarative => qml}/painteditem/textballoons/TextBalloonPlugin/qmldir (100%) rename examples/{declarative => qml}/painteditem/textballoons/textballoon.cpp (100%) rename examples/{declarative => qml}/painteditem/textballoons/textballoon.h (100%) create mode 100644 examples/qml/painteditem/textballoons/textballoons.pro rename examples/{declarative => qml}/painteditem/textballoons/textballoons.qml (100%) rename examples/{declarative => qml}/particles/affectors/age.qml (100%) rename examples/{declarative => qml}/particles/affectors/attractor.qml (100%) rename examples/{declarative => qml}/particles/affectors/customaffector.qml (100%) rename examples/{declarative => qml}/particles/affectors/friction.qml (100%) rename examples/{declarative => qml}/particles/affectors/gravity.qml (100%) rename examples/{declarative => qml}/particles/affectors/groupgoal.qml (100%) rename examples/{declarative => qml}/particles/affectors/move.qml (100%) rename examples/{declarative => qml}/particles/affectors/spritegoal.qml (100%) rename examples/{declarative => qml}/particles/affectors/turbulence.qml (100%) rename examples/{declarative => qml}/particles/affectors/wander.qml (100%) rename examples/{declarative => qml}/particles/customparticle/blurparticles.qml (100%) rename examples/{declarative => qml}/particles/customparticle/fragmentshader.qml (100%) rename examples/{declarative => qml}/particles/customparticle/imagecolors.qml (100%) rename examples/{declarative => qml}/particles/emitters/burstandpulse.qml (100%) rename examples/{declarative => qml}/particles/emitters/customemitter.qml (100%) rename examples/{declarative => qml}/particles/emitters/emitmask.qml (100%) rename examples/{declarative => qml}/particles/emitters/maximumemitted.qml (100%) rename examples/{declarative => qml}/particles/emitters/shapeanddirection.qml (100%) rename examples/{declarative => qml}/particles/emitters/timedgroupchanges.qml (100%) rename examples/{declarative => qml}/particles/emitters/trailemitter.qml (100%) rename examples/{declarative => qml}/particles/emitters/velocityfrommotion.qml (100%) rename examples/{declarative => qml}/particles/exampleslauncher/content/Button.qml (100%) rename examples/{declarative => qml}/particles/exampleslauncher/content/Shell.qml (100%) rename examples/{declarative => qml}/particles/exampleslauncher/content/launcher.js (100%) rename examples/{declarative => qml}/particles/exampleslauncher/exampleslauncher.qml (100%) rename examples/{declarative => qml}/particles/imageparticle/allatonce.qml (100%) rename examples/{declarative => qml}/particles/imageparticle/colored.qml (100%) rename examples/{declarative => qml}/particles/imageparticle/colortable.qml (100%) rename examples/{declarative => qml}/particles/imageparticle/deformation.qml (100%) rename examples/{declarative => qml}/particles/imageparticle/rotation.qml (100%) rename examples/{declarative => qml}/particles/imageparticle/sharing.qml (100%) rename examples/{declarative => qml}/particles/imageparticle/sprites.qml (100%) rename examples/{declarative => qml}/particles/images/_explo.png (100%) rename examples/{declarative => qml}/particles/images/backgroundLeaves.jpg (100%) rename examples/{declarative => qml}/particles/images/bear_tiles.png (100%) rename examples/{declarative => qml}/particles/images/candle.png (100%) rename examples/{declarative => qml}/particles/images/colortable.png (100%) rename examples/{declarative => qml}/particles/images/finalfrontier.png (100%) rename examples/{declarative => qml}/particles/images/flower.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/allatonce.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/attractor.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/blurparticles.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/close.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/colortable.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/customaffector.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/customemitter.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/deformation.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/delegates.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/dynamicemitters.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/emitmask.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/flickr.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/fragmentshader.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/gridsplosion.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/groupgoal.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/imagecolors.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/list.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/maximumemitted.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/multiplepainters.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/package.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/particleview.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/plasmapatrol.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/remove.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/rotation.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/samegame.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/shapeanddirection.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/spaceexplorer.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/spritegoal.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/sprites.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/spritevariedparticles.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/startstop.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/timedgroupchanges.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/trailemitter.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/trails.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/turbulence.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/velocityfrommotion.png (100%) rename examples/{declarative => qml}/particles/images/launcherIcons/wander.png (100%) rename examples/{declarative => qml}/particles/images/matchmask.png (100%) rename examples/{declarative => qml}/particles/images/meteor.png (100%) rename examples/{declarative => qml}/particles/images/meteor_explo.png (100%) rename examples/{declarative => qml}/particles/images/meteors.png (100%) rename examples/{declarative => qml}/particles/images/nullRock.png (100%) rename examples/{declarative => qml}/particles/images/particle.png (100%) rename examples/{declarative => qml}/particles/images/particle2.png (100%) rename examples/{declarative => qml}/particles/images/particle3.png (100%) rename examples/{declarative => qml}/particles/images/particle4.png (100%) rename examples/{declarative => qml}/particles/images/particleA.png (100%) rename examples/{declarative => qml}/particles/images/portal_bg.png (100%) rename examples/{declarative => qml}/particles/images/realLeaf1.png (100%) rename examples/{declarative => qml}/particles/images/realLeaf2.png (100%) rename examples/{declarative => qml}/particles/images/realLeaf3.png (100%) rename examples/{declarative => qml}/particles/images/realLeaf4.png (100%) rename examples/{declarative => qml}/particles/images/rocket.png (100%) rename examples/{declarative => qml}/particles/images/rocket2.png (100%) rename examples/{declarative => qml}/particles/images/sizeInOut.png (100%) rename examples/{declarative => qml}/particles/images/snowflake.png (100%) rename examples/{declarative => qml}/particles/images/sparkleSize.png (100%) rename examples/{declarative => qml}/particles/images/star.png (100%) rename examples/{declarative => qml}/particles/images/starfish_0.png (100%) rename examples/{declarative => qml}/particles/images/starfish_1.png (100%) rename examples/{declarative => qml}/particles/images/starfish_2.png (100%) rename examples/{declarative => qml}/particles/images/starfish_3.png (100%) rename examples/{declarative => qml}/particles/images/starfish_4.png (100%) rename examples/{declarative => qml}/particles/images/starfish_mask.png (100%) rename examples/{declarative => qml}/particles/itemparticle/content/Delegate.qml (100%) rename examples/{declarative => qml}/particles/itemparticle/content/Delegate2.qml (100%) rename examples/{declarative => qml}/particles/itemparticle/content/ExpandingDelegate.qml (100%) rename examples/{declarative => qml}/particles/itemparticle/content/RssModel.qml (100%) rename examples/{declarative => qml}/particles/itemparticle/content/bubble.png (100%) rename examples/{declarative => qml}/particles/itemparticle/content/script.js (100%) rename examples/{declarative => qml}/particles/itemparticle/delegates.qml (100%) rename examples/{declarative => qml}/particles/itemparticle/particleview.qml (100%) rename examples/{declarative => qml}/particles/plasmapatrol/PlasmaPatrol.qmlproject (100%) rename examples/{declarative => qml}/particles/plasmapatrol/TODO (100%) rename examples/{declarative => qml}/particles/plasmapatrol/content/BlasterHardpoint.qml (98%) rename examples/{declarative => qml}/particles/plasmapatrol/content/Button.qml (97%) rename examples/{declarative => qml}/particles/plasmapatrol/content/CannonHardpoint.qml (97%) rename examples/{declarative => qml}/particles/plasmapatrol/content/ChoiceBox.qml (97%) rename examples/{declarative => qml}/particles/plasmapatrol/content/Cruiser.qml (98%) rename examples/{declarative => qml}/particles/plasmapatrol/content/Frigate.qml (98%) rename examples/{declarative => qml}/particles/plasmapatrol/content/Hardpoint.qml (98%) rename examples/{declarative => qml}/particles/plasmapatrol/content/HelpScreens.qml (99%) rename examples/{declarative => qml}/particles/plasmapatrol/content/LaserHardpoint.qml (98%) rename examples/{declarative => qml}/particles/plasmapatrol/content/PlasmaPatrolParticles.qml (98%) rename examples/{declarative => qml}/particles/plasmapatrol/content/SequentialLoader.qml (96%) rename examples/{declarative => qml}/particles/plasmapatrol/content/Ship.qml (98%) rename examples/{declarative => qml}/particles/plasmapatrol/content/Sloop.qml (98%) rename examples/{declarative => qml}/particles/plasmapatrol/content/pics/TitleText.png (100%) rename examples/{declarative => qml}/particles/plasmapatrol/content/pics/blur-circle2.png (100%) rename examples/{declarative => qml}/particles/plasmapatrol/content/pics/blur-circle3.png (100%) rename examples/{declarative => qml}/particles/plasmapatrol/content/pics/finalfrontier.png (100%) rename examples/{declarative => qml}/particles/plasmapatrol/content/pics/meteor.png (100%) rename examples/{declarative => qml}/particles/plasmapatrol/content/pics/meteor_explo.png (100%) rename examples/{declarative => qml}/particles/plasmapatrol/content/pics/nullRock.png (100%) rename examples/{declarative => qml}/particles/plasmapatrol/content/pics/particle.png (100%) rename examples/{declarative => qml}/particles/plasmapatrol/content/pics/star.png (100%) rename examples/{declarative => qml}/particles/plasmapatrol/content/pics/star2.png (100%) rename examples/{declarative => qml}/particles/plasmapatrol/content/pics/star3.png (100%) rename examples/{declarative => qml}/particles/plasmapatrol/plasmapatrol.qml (99%) rename examples/{declarative => qml}/particles/simple/dynamiccomparison.qml (100%) rename examples/{declarative => qml}/particles/simple/dynamicemitters.qml (100%) rename examples/{declarative => qml}/particles/simple/multiplepainters.qml (100%) rename examples/{declarative => qml}/particles/simple/startstop.qml (100%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/AlbumDelegate.qml (98%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/BusyIndicator.qml (96%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/Button.qml (97%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/EditableButton.qml (97%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/PhotoDelegate.qml (99%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/ProgressBar.qml (96%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/RssModel.qml (97%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/Tag.qml (97%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/images/box-shadow.png (100%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/images/busy.png (100%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/images/cardboard.png (100%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/qmldir (100%) rename examples/{declarative => qml}/photoviewer/PhotoViewerCore/script/script.js (100%) rename examples/{declarative => qml}/photoviewer/i18n/base.ts (100%) rename examples/{declarative => qml}/photoviewer/i18n/qml_fr.qm (100%) rename examples/{declarative => qml}/photoviewer/i18n/qml_fr.ts (100%) rename examples/{declarative => qml}/photoviewer/photoviewer.qml (98%) rename examples/{declarative => qml}/photoviewer/photoviewer.qmlproject (100%) rename examples/{declarative => qml}/positioners/content/Button.qml (100%) rename examples/{declarative => qml}/positioners/content/add.png (100%) rename examples/{declarative => qml}/positioners/content/del.png (100%) rename examples/{declarative => qml}/positioners/positioners-attachedproperties.qml (100%) rename examples/{declarative => qml}/positioners/positioners.qml (100%) rename examples/{declarative/declarative.pro => qml/qml.pro} (90%) rename examples/{declarative => qml}/righttoleft/layoutdirection/layoutdirection.qml (100%) rename examples/{declarative => qml}/righttoleft/layoutdirection/layoutdirection.qmlproject (100%) rename examples/{declarative => qml}/righttoleft/layoutmirroring/layoutmirroring.qml (100%) rename examples/{declarative => qml}/righttoleft/layoutmirroring/layoutmirroring.qmlproject (100%) rename examples/{declarative => qml}/righttoleft/textalignment/textalignment.qml (100%) rename examples/{declarative => qml}/righttoleft/textalignment/textalignment.qmlproject (100%) rename examples/{declarative => qml}/rssnews/content/BusyIndicator.qml (96%) rename examples/{declarative => qml}/rssnews/content/CategoryDelegate.qml (97%) rename examples/{declarative => qml}/rssnews/content/NewsDelegate.qml (97%) rename examples/{declarative => qml}/rssnews/content/RssFeeds.qml (97%) rename examples/{declarative => qml}/rssnews/content/ScrollBar.qml (98%) rename examples/{declarative => qml}/rssnews/content/images/busy.png (100%) rename examples/{declarative => qml}/rssnews/content/images/scrollbar.png (100%) rename examples/{declarative => qml}/rssnews/rssnews.qml (98%) rename examples/{declarative => qml}/rssnews/rssnews.qmlproject (100%) rename examples/{declarative => qml}/samegame/content/BoomBlock.qml (98%) rename examples/{declarative => qml}/samegame/content/Button.qml (97%) rename examples/{declarative => qml}/samegame/content/Dialog.qml (97%) rename examples/{declarative => qml}/samegame/content/GameArea.qml (97%) rename examples/{declarative => qml}/samegame/content/NameInputDialog.qml (97%) rename examples/{declarative => qml}/samegame/content/pics/background.png (100%) rename examples/{declarative => qml}/samegame/content/pics/blueStone.png (100%) rename examples/{declarative => qml}/samegame/content/pics/greenStone.png (100%) rename examples/{declarative => qml}/samegame/content/pics/particle.png (100%) rename examples/{declarative => qml}/samegame/content/pics/redStone.png (100%) rename examples/{declarative => qml}/samegame/content/pics/yellowStone.png (100%) rename examples/{declarative => qml}/samegame/content/samegame.js (100%) rename examples/{declarative => qml}/samegame/samegame.qml (97%) rename examples/{declarative => qml}/samegame/samegame.qmlproject (100%) rename examples/{declarative => qml}/script/script.pro (100%) rename examples/{declarative => qml}/script/shell/main.cpp (99%) rename examples/{declarative => qml}/script/shell/shell.pro (80%) rename examples/{declarative => qml}/shadereffects/content/Slider.qml (100%) rename examples/{declarative => qml}/shadereffects/content/face-smile.png (100%) rename examples/{declarative => qml}/shadereffects/content/qt-logo.png (100%) rename examples/{declarative => qml}/shadereffects/shadereffects.qml (100%) rename examples/{declarative => qml}/shared/Button.qml (100%) rename examples/{declarative => qml}/shared/LauncherList.qml (100%) rename examples/{declarative => qml}/shared/README (100%) rename examples/{declarative => qml}/shared/SimpleLauncherDelegate.qml (100%) rename examples/{declarative => qml}/shared/back.png (100%) rename examples/{declarative => qml}/snake/content/Button.qml (97%) rename examples/{declarative => qml}/snake/content/Cookie.qml (97%) rename examples/{declarative => qml}/snake/content/HighScoreModel.qml (98%) rename examples/{declarative => qml}/snake/content/Link.qml (98%) rename examples/{declarative => qml}/snake/content/Skull.qml (96%) rename examples/{declarative => qml}/snake/content/pics/README (100%) rename examples/{declarative => qml}/snake/content/pics/background.png (100%) rename examples/{declarative => qml}/snake/content/pics/blueStar.png (100%) rename examples/{declarative => qml}/snake/content/pics/blueStone.png (100%) rename examples/{declarative => qml}/snake/content/pics/cookie.png (100%) rename examples/{declarative => qml}/snake/content/pics/eyes.svg (100%) rename examples/{declarative => qml}/snake/content/pics/head.png (100%) rename examples/{declarative => qml}/snake/content/pics/pause.png (100%) rename examples/{declarative => qml}/snake/content/pics/redStar.png (100%) rename examples/{declarative => qml}/snake/content/pics/redStone.png (100%) rename examples/{declarative => qml}/snake/content/pics/skull.png (100%) rename examples/{declarative => qml}/snake/content/pics/snake.jpg (100%) rename examples/{declarative => qml}/snake/content/pics/star.png (100%) rename examples/{declarative => qml}/snake/content/pics/stoneShadow.png (100%) rename examples/{declarative => qml}/snake/content/pics/yellowStar.png (100%) rename examples/{declarative => qml}/snake/content/pics/yellowStone.png (100%) rename examples/{declarative => qml}/snake/content/snake.js (100%) rename examples/{declarative => qml}/snake/snake.qml (99%) rename examples/{declarative => qml}/snake/snake.qmlproject (100%) rename examples/{declarative => qml}/sqllocalstorage/hello.qml (100%) rename examples/{declarative => qml}/text/fonts/availableFonts.qml (100%) rename examples/{declarative => qml}/text/fonts/banner.qml (100%) rename examples/{declarative => qml}/text/fonts/content/fonts/tarzeau_ocr_a.ttf (100%) rename examples/{declarative => qml}/text/fonts/fonts.qml (100%) rename examples/{declarative => qml}/text/fonts/hello.qml (100%) rename examples/{declarative => qml}/text/imgtag/TextWithImage.qml (100%) rename examples/{declarative => qml}/text/imgtag/images/face-sad.png (100%) rename examples/{declarative => qml}/text/imgtag/images/face-smile-big.png (100%) rename examples/{declarative => qml}/text/imgtag/images/face-smile.png (100%) rename examples/{declarative => qml}/text/imgtag/images/heart200.png (100%) rename examples/{declarative => qml}/text/imgtag/images/qtlogo.png (100%) rename examples/{declarative => qml}/text/imgtag/images/starfish_2.png (100%) rename examples/{declarative => qml}/text/imgtag/imgtag.qml (100%) rename examples/{declarative => qml}/text/styledtext-layout.qml (100%) rename examples/{declarative => qml}/text/text.qml (100%) rename examples/{declarative => qml}/text/text.qmlproject (100%) rename examples/{declarative => qml}/text/textselection/pics/endHandle.png (100%) rename examples/{declarative => qml}/text/textselection/pics/endHandle.sci (100%) rename examples/{declarative => qml}/text/textselection/pics/startHandle.png (100%) rename examples/{declarative => qml}/text/textselection/pics/startHandle.sci (100%) rename examples/{declarative => qml}/text/textselection/textselection.qml (100%) rename examples/{declarative => qml}/threading/threadedlistmodel/dataloader.js (100%) rename examples/{declarative => qml}/threading/threadedlistmodel/threadedlistmodel.qmlproject (100%) rename examples/{declarative => qml}/threading/threadedlistmodel/timedisplay.qml (100%) rename examples/{declarative => qml}/threading/workerscript/workerscript.js (100%) rename examples/{declarative => qml}/threading/workerscript/workerscript.qml (100%) rename examples/{declarative => qml}/threading/workerscript/workerscript.qmlproject (100%) rename examples/{declarative => qml}/touchinteraction/mousearea/mousearea-example.qml (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/bearwhack.qml (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/Bear0.png (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/Bear1.png (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/Bear2.png (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/Bear3.png (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/BearB.png (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/ParticleFlame.qml (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/blur-circle.png (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/blur-circle3.png (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/heart-blur.png (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/content/title.png (100%) rename examples/{declarative => qml}/touchinteraction/multipointtouch/multiflame.qml (100%) rename examples/{declarative => qml}/touchinteraction/pincharea/flickresize.qml (100%) rename examples/{declarative => qml}/touchinteraction/pincharea/qt-logo.jpg (100%) rename examples/{declarative => qml}/touchinteraction/touchinteraction.qml (100%) rename examples/{declarative => qml}/touchinteraction/touchinteraction.qmlproject (100%) rename examples/{declarative => qml}/toys/clocks/clocks.qml (100%) rename examples/{declarative => qml}/toys/clocks/content/Clock.qml (100%) rename examples/{declarative => qml}/toys/clocks/content/QuitButton.qml (100%) rename examples/{declarative => qml}/toys/clocks/content/arrow.png (100%) rename examples/{declarative => qml}/toys/clocks/content/background.png (100%) rename examples/{declarative => qml}/toys/clocks/content/center.png (100%) rename examples/{declarative => qml}/toys/clocks/content/clock-night.png (100%) rename examples/{declarative => qml}/toys/clocks/content/clock.png (100%) rename examples/{declarative => qml}/toys/clocks/content/hour.png (100%) rename examples/{declarative => qml}/toys/clocks/content/minute.png (100%) rename examples/{declarative => qml}/toys/clocks/content/quit.png (100%) rename examples/{declarative => qml}/toys/clocks/content/second.png (100%) rename examples/{declarative => qml}/toys/corkboards/content/Day.qml (100%) rename examples/{declarative => qml}/toys/corkboards/content/cork.jpg (100%) rename examples/{declarative => qml}/toys/corkboards/content/note-yellow.png (100%) rename examples/{declarative => qml}/toys/corkboards/content/tack.png (100%) rename examples/{declarative => qml}/toys/corkboards/corkboards.qml (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/Button.qml (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/GenericSceneItem.qml (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/PaletteItem.qml (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/PerspectiveItem.qml (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/Sun.qml (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/images/NOTE (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/images/face-smile.png (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/images/moon.png (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/images/rabbit_brown.png (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/images/rabbit_bw.png (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/images/star.png (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/images/sun.png (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/images/tree_s.png (100%) rename examples/{declarative => qml}/toys/dynamicscene/content/itemCreation.js (100%) rename examples/{declarative => qml}/toys/dynamicscene/dynamicscene.qml (100%) rename examples/{declarative => qml}/toys/tic-tac-toe/content/Button.qml (100%) rename examples/{declarative => qml}/toys/tic-tac-toe/content/TicTac.qml (100%) rename examples/{declarative => qml}/toys/tic-tac-toe/content/pics/board.png (100%) rename examples/{declarative => qml}/toys/tic-tac-toe/content/pics/o.png (100%) rename examples/{declarative => qml}/toys/tic-tac-toe/content/pics/x.png (100%) rename examples/{declarative => qml}/toys/tic-tac-toe/content/tic-tac-toe.js (100%) rename examples/{declarative => qml}/toys/tic-tac-toe/tic-tac-toe.qml (100%) rename examples/{declarative => qml}/toys/tvtennis/tvtennis.qml (100%) rename examples/{declarative => qml}/tutorials/dynamicview/dynamicview1/PetsModel.qml (100%) rename examples/{declarative => qml}/tutorials/dynamicview/dynamicview1/dynamicview.qml (100%) rename examples/{declarative => qml}/tutorials/dynamicview/dynamicview2/PetsModel.qml (100%) rename examples/{declarative => qml}/tutorials/dynamicview/dynamicview2/dynamicview.qml (100%) rename examples/{declarative => qml}/tutorials/dynamicview/dynamicview3/PetsModel.qml (100%) rename examples/{declarative => qml}/tutorials/dynamicview/dynamicview3/dynamicview.qml (100%) rename examples/{declarative => qml}/tutorials/dynamicview/dynamicview4/ListSelector.qml (100%) rename examples/{declarative => qml}/tutorials/dynamicview/dynamicview4/PetsModel.qml (100%) rename examples/{declarative => qml}/tutorials/dynamicview/dynamicview4/dynamicview.qml (100%) rename examples/{declarative => qml}/tutorials/extending/chapter1-basics/app.qml (100%) rename examples/{declarative => qml}/tutorials/extending/chapter1-basics/chapter1-basics.pro (74%) rename examples/{declarative => qml}/tutorials/extending/chapter1-basics/main.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter1-basics/piechart.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter1-basics/piechart.h (100%) rename examples/{declarative => qml}/tutorials/extending/chapter2-methods/app.qml (100%) rename examples/{declarative => qml}/tutorials/extending/chapter2-methods/chapter2-methods.pro (74%) rename examples/{declarative => qml}/tutorials/extending/chapter2-methods/main.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter2-methods/piechart.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter2-methods/piechart.h (100%) rename examples/{declarative => qml}/tutorials/extending/chapter3-bindings/app.qml (100%) rename examples/{declarative => qml}/tutorials/extending/chapter3-bindings/chapter3-bindings.pro (74%) rename examples/{declarative => qml}/tutorials/extending/chapter3-bindings/main.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter3-bindings/piechart.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter3-bindings/piechart.h (100%) rename examples/{declarative => qml}/tutorials/extending/chapter4-customPropertyTypes/app.qml (100%) rename examples/{declarative => qml}/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro (83%) rename examples/{declarative => qml}/tutorials/extending/chapter4-customPropertyTypes/main.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter4-customPropertyTypes/piechart.h (100%) rename examples/{declarative => qml}/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter4-customPropertyTypes/pieslice.h (100%) rename examples/{declarative => qml}/tutorials/extending/chapter5-listproperties/app.qml (100%) rename examples/{declarative => qml}/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro (83%) rename examples/{declarative => qml}/tutorials/extending/chapter5-listproperties/main.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter5-listproperties/piechart.cpp (91%) rename examples/{declarative => qml}/tutorials/extending/chapter5-listproperties/piechart.h (92%) rename examples/{declarative => qml}/tutorials/extending/chapter5-listproperties/pieslice.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter5-listproperties/pieslice.h (100%) rename examples/{declarative => qml}/tutorials/extending/chapter6-plugins/ChartsPlugin/qmldir (100%) rename examples/{declarative => qml}/tutorials/extending/chapter6-plugins/app.qml (100%) rename examples/{declarative => qml}/tutorials/extending/chapter6-plugins/chapter6-plugins.pro (91%) rename examples/{declarative => qml}/tutorials/extending/chapter6-plugins/chartsplugin.cpp (98%) rename examples/{declarative => qml}/tutorials/extending/chapter6-plugins/chartsplugin.h (95%) rename examples/{declarative => qml}/tutorials/extending/chapter6-plugins/piechart.cpp (91%) rename examples/{declarative => qml}/tutorials/extending/chapter6-plugins/piechart.h (92%) rename examples/{declarative => qml}/tutorials/extending/chapter6-plugins/pieslice.cpp (100%) rename examples/{declarative => qml}/tutorials/extending/chapter6-plugins/pieslice.h (100%) rename examples/{declarative => qml}/tutorials/extending/extending.pro (100%) rename examples/{declarative => qml}/tutorials/helloworld/Cell.qml (100%) rename examples/{declarative => qml}/tutorials/helloworld/tutorial1.qml (100%) rename examples/{declarative => qml}/tutorials/helloworld/tutorial2.qml (100%) rename examples/{declarative => qml}/tutorials/helloworld/tutorial3.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame1/Block.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame1/Button.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame1/samegame.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame1/samegame1.qmlproject (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame2/Block.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame2/Button.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame2/samegame.js (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame2/samegame.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame2/samegame2.qmlproject (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame3/Block.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame3/Button.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame3/Dialog.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame3/samegame.js (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame3/samegame.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame3/samegame3.qmlproject (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame4/content/BoomBlock.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame4/content/Button.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame4/content/Dialog.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame4/content/samegame.js (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame4/highscores/README (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame4/highscores/score_data.xml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame4/highscores/score_style.xsl (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame4/highscores/scores.php (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame4/samegame.qml (100%) rename examples/{declarative => qml}/tutorials/samegame/samegame4/samegame4.qmlproject (100%) rename examples/{declarative => qml}/tutorials/samegame/shared/pics/background.jpg (100%) rename examples/{declarative => qml}/tutorials/samegame/shared/pics/blueStar.png (100%) rename examples/{declarative => qml}/tutorials/samegame/shared/pics/blueStone.png (100%) rename examples/{declarative => qml}/tutorials/samegame/shared/pics/greenStar.png (100%) rename examples/{declarative => qml}/tutorials/samegame/shared/pics/greenStone.png (100%) rename examples/{declarative => qml}/tutorials/samegame/shared/pics/redStar.png (100%) rename examples/{declarative => qml}/tutorials/samegame/shared/pics/redStone.png (100%) rename examples/{declarative => qml}/tutorials/samegame/shared/pics/star.png (100%) rename examples/{declarative => qml}/tutorials/samegame/shared/pics/yellowStone.png (100%) rename examples/{declarative => qml}/tutorials/tutorials.pro (100%) rename examples/{declarative => qml}/tutorials/tutorials.qmlproject (100%) rename examples/{declarative => qml}/twitter/TwitterCore/Button.qml (97%) rename examples/{declarative => qml}/twitter/TwitterCore/FatDelegate.qml (98%) rename examples/{declarative => qml}/twitter/TwitterCore/Input.qml (97%) rename examples/{declarative => qml}/twitter/TwitterCore/Loading.qml (96%) rename examples/{declarative => qml}/twitter/TwitterCore/MultiTitleBar.qml (96%) rename examples/{declarative => qml}/twitter/TwitterCore/RssModel.qml (97%) rename examples/{declarative => qml}/twitter/TwitterCore/SearchView.qml (98%) rename examples/{declarative => qml}/twitter/TwitterCore/TitleBar.qml (98%) rename examples/{declarative => qml}/twitter/TwitterCore/ToolBar.qml (97%) rename examples/{declarative => qml}/twitter/TwitterCore/UserModel.qml (97%) rename examples/{declarative => qml}/twitter/TwitterCore/images/gloss.png (100%) rename examples/{declarative => qml}/twitter/TwitterCore/images/lineedit.png (100%) rename examples/{declarative => qml}/twitter/TwitterCore/images/lineedit.sci (100%) rename examples/{declarative => qml}/twitter/TwitterCore/images/loading.png (100%) rename examples/{declarative => qml}/twitter/TwitterCore/images/quit.png (100%) rename examples/{declarative => qml}/twitter/TwitterCore/images/stripes.png (100%) rename examples/{declarative => qml}/twitter/TwitterCore/images/titlebar.png (100%) rename examples/{declarative => qml}/twitter/TwitterCore/images/titlebar.sci (100%) rename examples/{declarative => qml}/twitter/TwitterCore/images/toolbutton.png (100%) rename examples/{declarative => qml}/twitter/TwitterCore/images/toolbutton.sci (100%) rename examples/{declarative => qml}/twitter/TwitterCore/qmldir (100%) rename examples/{declarative => qml}/twitter/twitter.qml (98%) rename examples/{declarative => qml}/twitter/twitter.qmlproject (100%) rename examples/{declarative => qml}/ui-components/dialcontrol/content/Dial.qml (100%) rename examples/{declarative => qml}/ui-components/dialcontrol/content/QuitButton.qml (100%) rename examples/{declarative => qml}/ui-components/dialcontrol/content/background.png (100%) rename examples/{declarative => qml}/ui-components/dialcontrol/content/needle.png (100%) rename examples/{declarative => qml}/ui-components/dialcontrol/content/needle_shadow.png (100%) rename examples/{declarative => qml}/ui-components/dialcontrol/content/overlay.png (100%) rename examples/{declarative => qml}/ui-components/dialcontrol/content/quit.png (100%) rename examples/{declarative => qml}/ui-components/dialcontrol/dialcontrol.qml (100%) rename examples/{declarative => qml}/ui-components/flipable/content/5_heart.png (100%) rename examples/{declarative => qml}/ui-components/flipable/content/9_club.png (100%) rename examples/{declarative => qml}/ui-components/flipable/content/Card.qml (100%) rename examples/{declarative => qml}/ui-components/flipable/content/back.png (100%) rename examples/{declarative => qml}/ui-components/flipable/flipable.qml (100%) rename examples/{declarative => qml}/ui-components/progressbar/content/ProgressBar.qml (100%) rename examples/{declarative => qml}/ui-components/progressbar/content/background.png (100%) rename examples/{declarative => qml}/ui-components/progressbar/main.qml (100%) rename examples/{declarative => qml}/ui-components/scrollbar/ScrollBar.qml (100%) rename examples/{declarative => qml}/ui-components/scrollbar/main.qml (100%) rename examples/{declarative => qml}/ui-components/scrollbar/pics/niagara_falls.jpg (100%) rename examples/{declarative => qml}/ui-components/scrollbar/scrollbar.qmlproject (100%) rename examples/{declarative => qml}/ui-components/searchbox/SearchBox.qml (100%) rename examples/{declarative => qml}/ui-components/searchbox/images/clear.png (100%) rename examples/{declarative => qml}/ui-components/searchbox/images/lineedit-bg-focus.png (100%) rename examples/{declarative => qml}/ui-components/searchbox/images/lineedit-bg.png (100%) rename examples/{declarative => qml}/ui-components/searchbox/main.qml (100%) rename examples/{declarative => qml}/ui-components/searchbox/searchbox.qmlproject (100%) rename examples/{declarative => qml}/ui-components/slideswitch/content/Switch.qml (100%) rename examples/{declarative => qml}/ui-components/slideswitch/content/background.png (100%) rename examples/{declarative => qml}/ui-components/slideswitch/content/background.svg (100%) rename examples/{declarative => qml}/ui-components/slideswitch/content/knob.png (100%) rename examples/{declarative => qml}/ui-components/slideswitch/content/knob.svg (100%) rename examples/{declarative => qml}/ui-components/slideswitch/slideswitch.qml (100%) rename examples/{declarative => qml}/ui-components/spinner/content/Spinner.qml (100%) rename examples/{declarative => qml}/ui-components/spinner/content/spinner-bg.png (100%) rename examples/{declarative => qml}/ui-components/spinner/content/spinner-select.png (100%) rename examples/{declarative => qml}/ui-components/spinner/main.qml (100%) rename examples/{declarative => qml}/ui-components/spinner/spinner.qmlproject (100%) rename examples/{declarative => qml}/ui-components/tabwidget/TabWidget.qml (100%) rename examples/{declarative => qml}/ui-components/tabwidget/main.qml (100%) rename examples/{declarative => qml}/ui-components/tabwidget/tab.png (100%) rename examples/{declarative => qml}/ui-components/tabwidget/tabwidget.qmlproject (100%) rename examples/{declarative => qml}/window/Window.qml (100%) rename examples/{declarative => qml}/window/screen/screenInfo.qml (100%) rename examples/{declarative => qml}/window/standalone.qml (100%) rename examples/{declarative => qml}/window/window.cpp (93%) rename examples/{declarative => qml}/window/window.pro (73%) rename examples/{declarative => qml}/xml/xmlhttprequest/data.xml (100%) rename examples/{declarative => qml}/xml/xmlhttprequest/xmlhttprequest-example.qml (100%) delete mode 100644 modules/qt_declarative.pri create mode 100644 modules/qt_qml.pri delete mode 100644 src/declarative/debugger/debugger.pri delete mode 100644 src/declarative/debugger/qdeclarativeenginedebug.cpp delete mode 100644 src/declarative/debugger/qdeclarativeenginedebug_p.h delete mode 100644 src/declarative/qml/parser/parser.pri delete mode 100644 src/declarative/qml/qdeclarative.h delete mode 100644 src/declarative/qml/qdeclarativecompiler_p.h delete mode 100644 src/declarative/qml/qdeclarativeextensioninterface.h delete mode 100644 src/declarative/qml/qdeclarativeinfo.h delete mode 100644 src/declarative/qml/qml.pri delete mode 100644 src/declarative/qml/v4/qv4irbuilder_p.h delete mode 100644 src/declarative/util/util.pri rename src/imports/folderlistmodel/{qdeclarativefolderlistmodel.cpp => qquickfolderlistmodel.cpp} (83%) rename src/imports/folderlistmodel/{qdeclarativefolderlistmodel.h => qquickfolderlistmodel.h} (87%) rename src/imports/xmllistmodel/{qdeclarativexmllistmodel.cpp => qqmlxmllistmodel.cpp} (75%) rename src/imports/xmllistmodel/{qdeclarativexmllistmodel_p.h => qqmlxmllistmodel_p.h} (80%) rename src/plugins/accessible/shared/{qdeclarativeaccessible.cpp => qqmlaccessible.cpp} (89%) rename src/plugins/accessible/shared/{qdeclarativeaccessible.h => qqmlaccessible.h} (86%) rename src/plugins/qmltooling/shared/{qdeclarativeinspectorprotocol.h => qqmlinspectorprotocol.h} (95%) rename src/{declarative => qml}/animations/animations.pri (100%) rename src/{declarative => qml}/animations/qabstractanimationjob.cpp (88%) rename src/{declarative => qml}/animations/qabstractanimationjob_p.h (94%) rename src/{declarative => qml}/animations/qanimationgroupjob.cpp (98%) rename src/{declarative => qml}/animations/qanimationgroupjob_p.h (94%) rename src/{declarative => qml}/animations/qanimationjobutil_p.h (96%) rename src/{declarative => qml}/animations/qparallelanimationgroupjob.cpp (99%) rename src/{declarative => qml}/animations/qparallelanimationgroupjob_p.h (93%) rename src/{declarative => qml}/animations/qpauseanimationjob.cpp (96%) rename src/{declarative => qml}/animations/qpauseanimationjob_p.h (92%) rename src/{declarative => qml}/animations/qsequentialanimationgroupjob.cpp (99%) rename src/{declarative => qml}/animations/qsequentialanimationgroupjob_p.h (95%) create mode 100644 src/qml/debugger/debugger.pri rename src/{declarative => qml}/debugger/qdebugmessageservice.cpp (88%) rename src/{declarative => qml}/debugger/qdebugmessageservice_p.h (92%) rename src/{declarative => qml}/debugger/qpacketprotocol.cpp (99%) rename src/{declarative => qml}/debugger/qpacketprotocol_p.h (91%) rename src/{declarative/debugger/qdeclarativedebug.h => qml/debugger/qqmldebug.h} (80%) rename src/{declarative/debugger/qdeclarativedebugclient.cpp => qml/debugger/qqmldebugclient.cpp} (69%) rename src/{declarative/debugger/qdeclarativedebugclient_p.h => qml/debugger/qqmldebugclient_p.h} (74%) rename src/{declarative/debugger/qdeclarativedebughelper.cpp => qml/debugger/qqmldebughelper.cpp} (75%) rename src/{declarative/debugger/qdeclarativedebughelper_p.h => qml/debugger/qqmldebughelper_p.h} (86%) rename src/{declarative/debugger/qdeclarativedebugserver.cpp => qml/debugger/qqmldebugserver.cpp} (65%) rename src/{declarative/debugger/qdeclarativedebugserver_p.h => qml/debugger/qqmldebugserver_p.h} (65%) rename src/{declarative/debugger/qdeclarativedebugserverconnection_p.h => qml/debugger/qqmldebugserverconnection_p.h} (78%) rename src/{declarative/debugger/qdeclarativedebugservice.cpp => qml/debugger/qqmldebugservice.cpp} (68%) rename src/{declarative/debugger/qdeclarativedebugservice_p.h => qml/debugger/qqmldebugservice_p.h} (77%) rename src/{declarative/debugger/qdeclarativedebugservice_p_p.h => qml/debugger/qqmldebugservice_p_p.h} (82%) rename src/{declarative/debugger/qdeclarativedebugstatesdelegate_p.h => qml/debugger/qqmldebugstatesdelegate_p.h} (79%) create mode 100644 src/qml/debugger/qqmlenginedebug.cpp create mode 100644 src/qml/debugger/qqmlenginedebug_p.h rename src/{declarative/debugger/qdeclarativeenginedebugservice.cpp => qml/debugger/qqmlenginedebugservice.cpp} (67%) rename src/{declarative/debugger/qdeclarativeenginedebugservice_p.h => qml/debugger/qqmlenginedebugservice_p.h} (64%) rename src/{declarative/debugger/qdeclarativeinspectorinterface_p.h => qml/debugger/qqmlinspectorinterface_p.h} (81%) rename src/{declarative/debugger/qdeclarativeinspectorservice.cpp => qml/debugger/qqmlinspectorservice.cpp} (68%) rename src/{declarative/debugger/qdeclarativeinspectorservice_p.h => qml/debugger/qqmlinspectorservice_p.h} (79%) rename src/{declarative/debugger/qdeclarativeprofilerservice.cpp => qml/debugger/qqmlprofilerservice.cpp} (51%) rename src/{declarative/debugger/qdeclarativeprofilerservice_p.h => qml/debugger/qqmlprofilerservice_p.h} (84%) rename src/{declarative => qml}/debugger/qv8debugservice.cpp (95%) rename src/{declarative => qml}/debugger/qv8debugservice_p.h (94%) rename src/{declarative => qml}/debugger/qv8profilerservice.cpp (93%) rename src/{declarative => qml}/debugger/qv8profilerservice_p.h (93%) rename src/{declarative/declarative.pro => qml/qml.pro} (66%) rename src/{declarative => qml}/qml/ftw/ftw.pri (73%) rename src/{declarative => qml}/qml/ftw/qbitfield_p.h (98%) rename src/{declarative => qml}/qml/ftw/qdeletewatcher_p.h (97%) rename src/{declarative => qml}/qml/ftw/qfastmetabuilder.cpp (99%) rename src/{declarative => qml}/qml/ftw/qfastmetabuilder_p.h (98%) rename src/{declarative => qml}/qml/ftw/qfieldlist_p.h (99%) rename src/{declarative => qml}/qml/ftw/qfinitestack_p.h (98%) rename src/{declarative => qml}/qml/ftw/qflagpointer_p.h (99%) rename src/{declarative => qml}/qml/ftw/qhashedstring.cpp (99%) rename src/{declarative => qml}/qml/ftw/qhashedstring_p.h (99%) rename src/{declarative => qml}/qml/ftw/qhashfield_p.h (98%) rename src/{declarative => qml}/qml/ftw/qintrusivelist.cpp (98%) rename src/{declarative => qml}/qml/ftw/qintrusivelist_p.h (99%) rename src/{declarative => qml}/qml/ftw/qlazilyallocated_p.h (98%) rename src/{declarative => qml}/qml/ftw/qpodvector_p.h (98%) rename src/{declarative => qml}/qml/ftw/qpointervaluepair_p.h (98%) rename src/{declarative/qml/ftw/qdeclarativepool.cpp => qml/qml/ftw/qqmlpool.cpp} (88%) rename src/{declarative/qml/ftw/qdeclarativepool_p.h => qml/qml/ftw/qqmlpool_p.h} (80%) rename src/{declarative/qml/ftw/qdeclarativerefcount_p.h => qml/qml/ftw/qqmlrefcount_p.h} (70%) rename src/{declarative/qml/ftw/qdeclarativethread.cpp => qml/qml/ftw/qqmlthread.cpp} (77%) rename src/{declarative/qml/ftw/qdeclarativethread_p.h => qml/qml/ftw/qqmlthread_p.h} (80%) rename src/{declarative/qml/ftw/qdeclarativetrace.cpp => qml/qml/ftw/qqmltrace.cpp} (69%) rename src/{declarative/qml/ftw/qdeclarativetrace_p.h => qml/qml/ftw/qqmltrace_p.h} (73%) rename src/{declarative => qml}/qml/ftw/qrecursionwatcher_p.h (97%) rename src/{declarative => qml}/qml/ftw/qrecyclepool_p.h (98%) create mode 100644 src/qml/qml/parser/parser.pri rename src/{declarative/qml/parser/qdeclarativejs.g => qml/qml/parser/qqmljs.g} (98%) rename src/{declarative/qml/parser/qdeclarativejsast.cpp => qml/qml/parser/qqmljsast.cpp} (98%) rename src/{declarative/qml/parser/qdeclarativejsast_p.h => qml/qml/parser/qqmljsast_p.h} (92%) rename src/{declarative/qml/parser/qdeclarativejsastfwd_p.h => qml/qml/parser/qqmljsastfwd_p.h} (95%) rename src/{declarative/qml/parser/qdeclarativejsastvisitor.cpp => qml/qml/parser/qqmljsastvisitor.cpp} (90%) rename src/{declarative/qml/parser/qdeclarativejsastvisitor_p.h => qml/qml/parser/qqmljsastvisitor_p.h} (97%) rename src/{declarative/qml/parser/qdeclarativejsengine_p.cpp => qml/qml/parser/qqmljsengine_p.cpp} (91%) rename src/{declarative/qml/parser/qdeclarativejsengine_p.h => qml/qml/parser/qqmljsengine_p.h} (90%) rename src/{declarative/qml/parser/qdeclarativejsglobal_p.h => qml/qml/parser/qqmljsglobal_p.h} (91%) rename src/{declarative/qml/parser/qdeclarativejsgrammar.cpp => qml/qml/parser/qqmljsgrammar.cpp} (98%) rename src/{declarative/qml/parser/qdeclarativejsgrammar_p.h => qml/qml/parser/qqmljsgrammar_p.h} (97%) rename src/{declarative/qml/parser/qdeclarativejskeywords_p.h => qml/qml/parser/qqmljskeywords_p.h} (99%) rename src/{declarative/qml/parser/qdeclarativejslexer.cpp => qml/qml/parser/qqmljslexer.cpp} (96%) rename src/{declarative/qml/parser/qdeclarativejslexer_p.h => qml/qml/parser/qqmljslexer_p.h} (94%) rename src/{declarative/qml/parser/qdeclarativejsmemorypool_p.h => qml/qml/parser/qqmljsmemorypool_p.h} (94%) rename src/{declarative/qml/parser/qdeclarativejsparser.cpp => qml/qml/parser/qqmljsparser.cpp} (98%) rename src/{declarative/qml/parser/qdeclarativejsparser_p.h => qml/qml/parser/qqmljsparser_p.h} (93%) rename src/{declarative => qml}/qml/qlistmodelinterface.cpp (96%) rename src/{declarative => qml}/qml/qlistmodelinterface_p.h (93%) create mode 100644 src/qml/qml/qml.pri create mode 100644 src/qml/qml/qqml.h rename src/{declarative/qml/qdeclarativeaccessors.cpp => qml/qml/qqmlaccessors.cpp} (74%) rename src/{declarative/qml/qdeclarativeaccessors_p.h => qml/qml/qqmlaccessors_p.h} (76%) rename src/{declarative/qml/qdeclarativebinding.cpp => qml/qml/qqmlbinding.cpp} (57%) rename src/{declarative/qml/qdeclarativebinding_p.h => qml/qml/qqmlbinding_p.h} (53%) rename src/{declarative/qml/qdeclarativebinding_p_p.h => qml/qml/qqmlbinding_p_p.h} (78%) rename src/{declarative/qml/qdeclarativeboundsignal.cpp => qml/qml/qqmlboundsignal.cpp} (66%) rename src/{declarative/qml/qdeclarativeboundsignal_p.h => qml/qml/qqmlboundsignal_p.h} (69%) rename src/{declarative/qml/qdeclarativecleanup.cpp => qml/qml/qqmlcleanup.cpp} (65%) rename src/{declarative/qml/qdeclarativecleanup_p.h => qml/qml/qqmlcleanup_p.h} (78%) rename src/{declarative/qml/qdeclarativecompileddata.cpp => qml/qml/qqmlcompileddata.cpp} (68%) rename src/{declarative/qml/qdeclarativecompiler.cpp => qml/qml/qqmlcompiler.cpp} (85%) create mode 100644 src/qml/qml/qqmlcompiler_p.h rename src/{declarative/qml/qdeclarativecomponent.cpp => qml/qml/qqmlcomponent.cpp} (70%) rename src/{declarative/qml/qdeclarativecomponent.h => qml/qml/qqmlcomponent.h} (55%) rename src/{declarative/qml/qdeclarativecomponent_p.h => qml/qml/qqmlcomponent_p.h} (62%) rename src/{declarative/qml/qdeclarativecomponentattached_p.h => qml/qml/qqmlcomponentattached_p.h} (76%) rename src/{declarative/qml/qdeclarativecontext.cpp => qml/qml/qqmlcontext.cpp} (66%) rename src/{declarative/qml/qdeclarativecontext.h => qml/qml/qqmlcontext.h} (64%) rename src/{declarative/qml/qdeclarativecontext_p.h => qml/qml/qqmlcontext_p.h} (53%) rename src/{declarative/qml/qdeclarativecustomparser.cpp => qml/qml/qqmlcustomparser.cpp} (63%) rename src/{declarative/qml/qdeclarativecustomparser_p.h => qml/qml/qqmlcustomparser_p.h} (52%) rename src/{declarative/qml/qdeclarativecustomparser_p_p.h => qml/qml/qqmlcustomparser_p_p.h} (74%) rename src/{declarative/qml/qdeclarativedata_p.h => qml/qml/qqmldata_p.h} (75%) rename src/{declarative/qml/qdeclarativedirparser.cpp => qml/qml/qqmldirparser.cpp} (84%) rename src/{declarative/qml/qdeclarativedirparser_p.h => qml/qml/qqmldirparser_p.h} (87%) rename src/{declarative/qml/qdeclarativeengine.cpp => qml/qml/qqmlengine.cpp} (65%) rename src/{declarative/qml/qdeclarativeengine.h => qml/qml/qqmlengine.h} (67%) rename src/{declarative/qml/qdeclarativeengine_p.h => qml/qml/qqmlengine_p.h} (54%) rename src/{declarative/qml/qdeclarativeerror.cpp => qml/qml/qqmlerror.cpp} (79%) rename src/{declarative/qml/qdeclarativeerror.h => qml/qml/qqmlerror.h} (80%) rename src/{declarative/qml/qdeclarativeexpression.cpp => qml/qml/qqmlexpression.cpp} (66%) rename src/{declarative/qml/qdeclarativeexpression.h => qml/qml/qqmlexpression.h} (56%) rename src/{declarative/qml/qdeclarativeexpression_p.h => qml/qml/qqmlexpression_p.h} (54%) rename src/{declarative/qml/qdeclarativepropertyvaluesource.h => qml/qml/qqmlextensioninterface.h} (69%) rename src/{declarative/qml/qdeclarativeextensionplugin.cpp => qml/qml/qqmlextensionplugin.cpp} (85%) rename src/{declarative/qml/qdeclarativeextensionplugin.h => qml/qml/qqmlextensionplugin.h} (72%) rename src/{declarative/qml/qdeclarativeglobal_p.h => qml/qml/qqmlglobal_p.h} (89%) rename src/{declarative/qml/qdeclarativeguard_p.h => qml/qml/qqmlguard_p.h} (68%) rename src/{declarative/qml/qdeclarativeimageprovider.cpp => qml/qml/qqmlimageprovider.cpp} (85%) rename src/{declarative/qml/qdeclarativeimageprovider.h => qml/qml/qqmlimageprovider.h} (77%) rename src/{declarative/qml/qdeclarativeimport.cpp => qml/qml/qqmlimport.cpp} (67%) rename src/{declarative/qml/qdeclarativeimport_p.h => qml/qml/qqmlimport_p.h} (65%) rename src/{declarative/qml/qdeclarativeincubator.cpp => qml/qml/qqmlincubator.cpp} (64%) rename src/{declarative/qml/qdeclarativeincubator.h => qml/qml/qqmlincubator.h} (68%) rename src/{declarative/qml/qdeclarativeincubator_p.h => qml/qml/qqmlincubator_p.h} (65%) rename src/{declarative/qml/qdeclarativeinfo.cpp => qml/qml/qqmlinfo.cpp} (74%) create mode 100644 src/qml/qml/qqmlinfo.h rename src/{declarative/qml/qdeclarativeinstruction.cpp => qml/qml/qqmlinstruction.cpp} (78%) rename src/{declarative/qml/qdeclarativeinstruction_p.h => qml/qml/qqmlinstruction_p.h} (92%) rename src/{declarative/qml/qdeclarativeintegercache.cpp => qml/qml/qqmlintegercache.cpp} (82%) rename src/{declarative/qml/qdeclarativeintegercache_p.h => qml/qml/qqmlintegercache_p.h} (82%) rename src/{declarative/qml/qdeclarativelist.cpp => qml/qml/qqmllist.cpp} (60%) rename src/{declarative/qml/qdeclarativelist.h => qml/qml/qqmllist.h} (66%) rename src/{declarative/qml/qdeclarativelist_p.h => qml/qml/qqmllist_p.h} (77%) rename src/{declarative/qml/qdeclarativelocale.cpp => qml/qml/qqmllocale.cpp} (96%) rename src/{declarative/qml/qdeclarativelocale_p.h => qml/qml/qqmllocale_p.h} (92%) rename src/{declarative/qml/qdeclarativemetatype.cpp => qml/qml/qqmlmetatype.cpp} (69%) rename src/{declarative/qml/qdeclarativemetatype_p.h => qml/qml/qqmlmetatype_p.h} (64%) rename src/{declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp => qml/qml/qqmlnetworkaccessmanagerfactory.cpp} (85%) rename src/{declarative/qml/qdeclarativenetworkaccessmanagerfactory.h => qml/qml/qqmlnetworkaccessmanagerfactory.h} (84%) rename src/{declarative/qml/qdeclarativenotifier.cpp => qml/qml/qqmlnotifier.cpp} (82%) rename src/{declarative/qml/qdeclarativenotifier_p.h => qml/qml/qqmlnotifier_p.h} (64%) rename src/{declarative/qml/qdeclarativenullablevalue_p_p.h => qml/qml/qqmlnullablevalue_p_p.h} (82%) rename src/{declarative/qml/qdeclarativeopenmetaobject.cpp => qml/qml/qqmlopenmetaobject.cpp} (70%) rename src/{declarative/qml/qdeclarativeopenmetaobject_p.h => qml/qml/qqmlopenmetaobject_p.h} (70%) rename src/{declarative/qml/qdeclarativeparserstatus.cpp => qml/qml/qqmlparserstatus.cpp} (75%) rename src/{declarative/qml/qdeclarativeparserstatus.h => qml/qml/qqmlparserstatus.h} (75%) rename src/{declarative/qml/qdeclarativeprivate.h => qml/qml/qqmlprivate.h} (83%) rename src/{declarative/qml/qdeclarativeproperty.cpp => qml/qml/qqmlproperty.cpp} (72%) rename src/{declarative/qml/qdeclarativeproperty.h => qml/qml/qqmlproperty.h} (70%) rename src/{declarative/qml/qdeclarativeproperty_p.h => qml/qml/qqmlproperty_p.h} (54%) rename src/{declarative/qml/qdeclarativepropertycache.cpp => qml/qml/qqmlpropertycache.cpp} (68%) rename src/{declarative/qml/qdeclarativepropertycache_p.h => qml/qml/qqmlpropertycache_p.h} (64%) rename src/{declarative/qml/qdeclarativepropertyvalueinterceptor.cpp => qml/qml/qqmlpropertyvalueinterceptor.cpp} (75%) rename src/{declarative/qml/qdeclarativepropertyvalueinterceptor_p.h => qml/qml/qqmlpropertyvalueinterceptor_p.h} (77%) rename src/{declarative/qml/qdeclarativepropertyvaluesource.cpp => qml/qml/qqmlpropertyvaluesource.cpp} (76%) create mode 100644 src/qml/qml/qqmlpropertyvaluesource.h rename src/{declarative/qml/qdeclarativeproxymetaobject.cpp => qml/qml/qqmlproxymetaobject.cpp} (89%) rename src/{declarative/qml/qdeclarativeproxymetaobject_p.h => qml/qml/qqmlproxymetaobject_p.h} (86%) rename src/{declarative/qml/qdeclarativerewrite.cpp => qml/qml/qqmlrewrite.cpp} (94%) rename src/{declarative/qml/qdeclarativerewrite_p.h => qml/qml/qqmlrewrite_p.h} (87%) rename src/{declarative/qml/qdeclarativescript.cpp => qml/qml/qqmlscript.cpp} (77%) rename src/{declarative/qml/qdeclarativescript_p.h => qml/qml/qqmlscript_p.h} (82%) rename src/{declarative/qml/qdeclarativescriptstring.cpp => qml/qml/qqmlscriptstring.cpp} (68%) rename src/{declarative/qml/qdeclarativescriptstring.h => qml/qml/qqmlscriptstring.h} (72%) rename src/{declarative/qml/qdeclarativescriptstring_p.h => qml/qml/qqmlscriptstring_p.h} (80%) rename src/{declarative/qml/qdeclarativestringconverters.cpp => qml/qml/qqmlstringconverters.cpp} (89%) rename src/{declarative/qml/qdeclarativestringconverters_p.h => qml/qml/qqmlstringconverters_p.h} (64%) rename src/{declarative/qml/qdeclarativetypeloader.cpp => qml/qml/qqmltypeloader.cpp} (64%) rename src/{declarative/qml/qdeclarativetypeloader_p.h => qml/qml/qqmltypeloader_p.h} (52%) rename src/{declarative/qml/qdeclarativetypenamecache.cpp => qml/qml/qqmltypenamecache.cpp} (77%) rename src/{declarative/qml/qdeclarativetypenamecache_p.h => qml/qml/qqmltypenamecache_p.h} (69%) rename src/{declarative/qml/qdeclarativetypenotavailable.cpp => qml/qml/qqmltypenotavailable.cpp} (85%) rename src/{declarative/qml/qdeclarativetypenotavailable_p.h => qml/qml/qqmltypenotavailable_p.h} (83%) rename src/{declarative/qml/qdeclarativevaluetype.cpp => qml/qml/qqmlvaluetype.cpp} (58%) rename src/{declarative/qml/qdeclarativevaluetype_p.h => qml/qml/qqmlvaluetype_p.h} (80%) rename src/{declarative/qml/qdeclarativevme.cpp => qml/qml/qqmlvme.cpp} (76%) rename src/{declarative/qml/qdeclarativevme_p.h => qml/qml/qqmlvme_p.h} (60%) rename src/{declarative/qml/qdeclarativevmemetaobject.cpp => qml/qml/qqmlvmemetaobject.cpp} (76%) rename src/{declarative/qml/qdeclarativevmemetaobject_p.h => qml/qml/qqmlvmemetaobject_p.h} (77%) rename src/{declarative/qml/qdeclarativewatcher.cpp => qml/qml/qqmlwatcher.cpp} (60%) rename src/{declarative/qml/qdeclarativewatcher_p.h => qml/qml/qqmlwatcher_p.h} (85%) rename src/{declarative/qml/qdeclarativexmlhttprequest.cpp => qml/qml/qqmlxmlhttprequest.cpp} (84%) rename src/{declarative/qml/qdeclarativexmlhttprequest_p.h => qml/qml/qqmlxmlhttprequest_p.h} (90%) rename src/{declarative/qml/qdeclarativeapplication.cpp => qml/qml/qquickapplication.cpp} (79%) rename src/{declarative/qml/qdeclarativeapplication_p.h => qml/qml/qquickapplication_p.h} (79%) rename src/{declarative/qml/qdeclarativelistmodel.cpp => qml/qml/qquicklistmodel.cpp} (88%) rename src/{declarative/qml/qdeclarativelistmodel_p.h => qml/qml/qquicklistmodel_p.h} (70%) rename src/{declarative/qml/qdeclarativelistmodel_p_p.h => qml/qml/qquicklistmodel_p_p.h} (88%) rename src/{declarative/qml/qdeclarativelistmodelworkeragent.cpp => qml/qml/qquicklistmodelworkeragent.cpp} (69%) rename src/{declarative/qml/qdeclarativelistmodelworkeragent_p.h => qml/qml/qquicklistmodelworkeragent_p.h} (76%) rename src/{declarative/qml/qdeclarativeworkerscript.cpp => qml/qml/qquickworkerscript.cpp} (75%) rename src/{declarative/qml/qdeclarativeworkerscript_p.h => qml/qml/qquickworkerscript_p.h} (69%) rename src/{declarative => qml}/qml/rewriter/rewriter.pri (100%) rename src/{declarative => qml}/qml/rewriter/textwriter.cpp (98%) rename src/{declarative => qml}/qml/rewriter/textwriter_p.h (93%) rename src/{declarative => qml}/qml/v4/qv4bindings.cpp (93%) rename src/{declarative => qml}/qml/v4/qv4bindings_p.h (72%) rename src/{declarative => qml}/qml/v4/qv4compiler.cpp (96%) rename src/{declarative => qml}/qml/v4/qv4compiler_p.h (78%) rename src/{declarative => qml}/qml/v4/qv4compiler_p_p.h (65%) rename src/{declarative => qml}/qml/v4/qv4instruction.cpp (99%) rename src/{declarative => qml}/qml/v4/qv4instruction_p.h (98%) rename src/{declarative => qml}/qml/v4/qv4ir.cpp (93%) rename src/{declarative => qml}/qml/v4/qv4ir_p.h (85%) rename src/{declarative => qml}/qml/v4/qv4irbuilder.cpp (95%) create mode 100644 src/qml/qml/v4/qv4irbuilder_p.h rename src/{declarative => qml}/qml/v4/qv4program_p.h (96%) rename src/{declarative => qml}/qml/v4/v4.pri (100%) rename src/{declarative => qml}/qml/v8/notes.txt (76%) rename src/{declarative => qml}/qml/v8/qjsconverter_impl_p.h (99%) rename src/{declarative => qml}/qml/v8/qjsconverter_p.h (100%) rename src/{declarative => qml}/qml/v8/qjsengine.cpp (100%) rename src/{declarative => qml}/qml/v8/qjsengine.h (97%) rename src/{declarative => qml}/qml/v8/qjsengine_p.h (100%) rename src/{declarative => qml}/qml/v8/qjsvalue.cpp (100%) rename src/{declarative => qml}/qml/v8/qjsvalue.h (98%) rename src/{declarative => qml}/qml/v8/qjsvalue_impl_p.h (100%) rename src/{declarative => qml}/qml/v8/qjsvalue_p.h (100%) rename src/{declarative => qml}/qml/v8/qjsvalueiterator.cpp (100%) rename src/{declarative => qml}/qml/v8/qjsvalueiterator.h (95%) rename src/{declarative => qml}/qml/v8/qjsvalueiterator_impl_p.h (98%) rename src/{declarative => qml}/qml/v8/qjsvalueiterator_p.h (96%) rename src/{declarative/qml/v8/qdeclarativebuiltinfunctions.cpp => qml/qml/v8/qqmlbuiltinfunctions.cpp} (94%) rename src/{declarative/qml/v8/qdeclarativebuiltinfunctions_p.h => qml/qml/v8/qqmlbuiltinfunctions_p.h} (95%) rename src/{declarative => qml}/qml/v8/qscript_impl_p.h (100%) rename src/{declarative => qml}/qml/v8/qscriptisolate_p.h (100%) rename src/{declarative => qml}/qml/v8/qscriptoriginalglobalobject_p.h (100%) rename src/{declarative => qml}/qml/v8/qscriptshareddata_p.h (100%) rename src/{declarative => qml}/qml/v8/qscripttools_p.h (100%) rename src/{declarative => qml}/qml/v8/qv8_p.h (96%) rename src/{declarative => qml}/qml/v8/qv8bindings.cpp (78%) rename src/{declarative => qml}/qml/v8/qv8bindings_p.h (68%) rename src/{declarative => qml}/qml/v8/qv8contextwrapper.cpp (87%) rename src/{declarative => qml}/qml/v8/qv8contextwrapper_p.h (91%) rename src/{declarative => qml}/qml/v8/qv8debug_p.h (96%) rename src/{declarative => qml}/qml/v8/qv8domerrors.cpp (98%) rename src/{declarative => qml}/qml/v8/qv8domerrors_p.h (97%) rename src/{declarative => qml}/qml/v8/qv8engine.cpp (97%) rename src/{declarative => qml}/qml/v8/qv8engine_impl_p.h (98%) rename src/{declarative => qml}/qml/v8/qv8engine_p.h (90%) rename src/{declarative => qml}/qml/v8/qv8include.cpp (92%) rename src/{declarative => qml}/qml/v8/qv8include_p.h (89%) rename src/{declarative => qml}/qml/v8/qv8listwrapper.cpp (93%) rename src/{declarative => qml}/qml/v8/qv8listwrapper_p.h (94%) rename src/{declarative => qml}/qml/v8/qv8profiler_p.h (96%) rename src/{declarative => qml}/qml/v8/qv8qobjectwrapper.cpp (89%) rename src/{declarative => qml}/qml/v8/qv8qobjectwrapper_p.h (91%) rename src/{declarative => qml}/qml/v8/qv8sequencewrapper.cpp (98%) rename src/{declarative => qml}/qml/v8/qv8sequencewrapper_p.h (98%) rename src/{declarative => qml}/qml/v8/qv8sequencewrapper_p_p.h (97%) rename src/{declarative => qml}/qml/v8/qv8sqlerrors.cpp (97%) rename src/{declarative => qml}/qml/v8/qv8sqlerrors_p.h (97%) rename src/{declarative => qml}/qml/v8/qv8stringwrapper.cpp (97%) rename src/{declarative => qml}/qml/v8/qv8stringwrapper_p.h (90%) rename src/{declarative => qml}/qml/v8/qv8typewrapper.cpp (90%) rename src/{declarative => qml}/qml/v8/qv8typewrapper_p.h (90%) rename src/{declarative => qml}/qml/v8/qv8valuetypewrapper.cpp (91%) rename src/{declarative => qml}/qml/v8/qv8valuetypewrapper_p.h (91%) rename src/{declarative => qml}/qml/v8/qv8variantresource_p.h (92%) rename src/{declarative => qml}/qml/v8/qv8variantwrapper.cpp (95%) rename src/{declarative => qml}/qml/v8/qv8variantwrapper_p.h (97%) rename src/{declarative => qml}/qml/v8/qv8worker.cpp (96%) rename src/{declarative => qml}/qml/v8/qv8worker_p.h (97%) rename src/{declarative => qml}/qml/v8/script.pri (100%) rename src/{declarative => qml}/qml/v8/v8.pri (93%) create mode 100644 src/qml/qtqmlglobal.h create mode 100644 src/qml/qtqmlglobal_p.h rename src/{declarative/util/qdeclarativepropertymap.cpp => qml/util/qqmlpropertymap.cpp} (67%) rename src/{declarative/util/qdeclarativepropertymap.h => qml/util/qqmlpropertymap.h} (84%) create mode 100644 src/qml/util/util.pri rename src/quick/items/{qquickanimation.cpp => qquickitemanimation.cpp} (92%) rename src/quick/items/{qquickanimation_p.h => qquickitemanimation_p.h} (82%) rename src/quick/items/{qquickanimation_p_p.h => qquickitemanimation_p_p.h} (80%) delete mode 100644 src/quick/util/qdeclarativeutilmodule.cpp rename src/quick/util/{qdeclarativeanimation.cpp => qquickanimation.cpp} (73%) rename src/quick/util/{qdeclarativeanimation_p.h => qquickanimation_p.h} (54%) rename src/quick/util/{qdeclarativeanimation_p_p.h => qquickanimation_p_p.h} (62%) rename src/quick/util/{qdeclarativeanimationcontroller.cpp => qquickanimationcontroller.cpp} (69%) rename src/quick/util/{qdeclarativeanimationcontroller_p.h => qquickanimationcontroller_p.h} (71%) rename src/quick/util/{qdeclarativebehavior.cpp => qquickbehavior.cpp} (69%) rename src/quick/util/{qdeclarativebehavior_p.h => qquickbehavior_p.h} (70%) rename src/quick/util/{qdeclarativebind.cpp => qquickbind.cpp} (73%) rename src/quick/util/{qdeclarativebind_p.h => qquickbind_p.h} (79%) rename src/quick/util/{qdeclarativechangeset.cpp => qquickchangeset.cpp} (90%) rename src/quick/util/{qdeclarativechangeset_p.h => qquickchangeset_p.h} (81%) rename src/quick/util/{qdeclarativeconnections.cpp => qquickconnections.cpp} (68%) rename src/quick/util/{qdeclarativeconnections_p.h => qquickconnections_p.h} (75%) rename src/quick/util/{qdeclarativefontloader.cpp => qquickfontloader.cpp} (74%) rename src/quick/util/{qdeclarativefontloader_p.h => qquickfontloader_p.h} (81%) rename src/quick/util/{qdeclarativelistaccessor.cpp => qquicklistaccessor.cpp} (75%) rename src/quick/util/{qdeclarativelistaccessor_p.h => qquicklistaccessor_p.h} (84%) rename src/quick/util/{qdeclarativelistcompositor.cpp => qquicklistcompositor.cpp} (80%) rename src/quick/util/{qdeclarativelistcompositor_p.h => qquicklistcompositor_p.h} (85%) rename src/quick/util/{qdeclarativepackage.cpp => qquickpackage.cpp} (66%) rename src/quick/util/{qdeclarativepackage_p.h => qquickpackage_p.h} (68%) rename src/quick/util/{qdeclarativepath.cpp => qquickpath.cpp} (82%) rename src/quick/util/{qdeclarativepath_p.h => qquickpath_p.h} (70%) rename src/quick/util/{qdeclarativepath_p_p.h => qquickpath_p_p.h} (76%) rename src/quick/util/{qdeclarativepathinterpolator.cpp => qquickpathinterpolator.cpp} (84%) rename src/quick/util/{qdeclarativepathinterpolator_p.h => qquickpathinterpolator_p.h} (79%) rename src/quick/util/{qdeclarativepixmapcache.cpp => qquickpixmapcache.cpp} (59%) rename src/quick/util/{qdeclarativepixmapcache_p.h => qquickpixmapcache_p.h} (71%) rename src/quick/util/{qdeclarativepropertychanges.cpp => qquickpropertychanges.cpp} (61%) rename src/quick/util/{qdeclarativepropertychanges_p.h => qquickpropertychanges_p.h} (76%) rename src/quick/util/{qdeclarativesmoothedanimation.cpp => qquicksmoothedanimation.cpp} (80%) rename src/quick/util/{qdeclarativesmoothedanimation_p.h => qquicksmoothedanimation_p.h} (77%) rename src/quick/util/{qdeclarativesmoothedanimation_p_p.h => qquicksmoothedanimation_p_p.h} (80%) rename src/quick/util/{qdeclarativespringanimation.cpp => qquickspringanimation.cpp} (83%) rename src/quick/util/{qdeclarativespringanimation_p.h => qquickspringanimation_p.h} (78%) rename src/quick/util/{qdeclarativestate.cpp => qquickstate.cpp} (61%) rename src/quick/util/{qdeclarativestate_p.h => qquickstate_p.h} (57%) rename src/quick/util/{qdeclarativestate_p_p.h => qquickstate_p_p.h} (61%) rename src/quick/util/{qdeclarativestateoperations.cpp => qquickstatechangescript.cpp} (63%) rename src/quick/util/{qdeclarativestateoperations_p.h => qquickstatechangescript_p.h} (71%) rename src/quick/util/{qdeclarativestategroup.cpp => qquickstategroup.cpp} (62%) rename src/quick/util/{qdeclarativestategroup_p.h => qquickstategroup_p.h} (64%) rename src/quick/util/{qdeclarativestyledtext.cpp => qquickstyledtext.cpp} (86%) rename src/quick/util/{qdeclarativestyledtext_p.h => qquickstyledtext_p.h} (69%) rename src/quick/util/{qdeclarativesvgparser.cpp => qquicksvgparser.cpp} (99%) rename src/quick/util/{qdeclarativesvgparser_p.h => qquicksvgparser_p.h} (93%) rename src/quick/util/{qdeclarativesystempalette.cpp => qquicksystempalette.cpp} (74%) rename src/quick/util/{qdeclarativesystempalette_p.h => qquicksystempalette_p.h} (82%) rename src/quick/util/{qdeclarativetimeline.cpp => qquicktimeline.cpp} (69%) rename src/quick/util/{qdeclarativetimeline_p_p.h => qquicktimeline_p_p.h} (50%) rename src/quick/util/{qdeclarativetimer.cpp => qquicktimer.cpp} (82%) rename src/quick/util/{qdeclarativetimer_p.h => qquicktimer_p.h} (86%) rename src/quick/util/{qdeclarativetransition.cpp => qquicktransition.cpp} (67%) rename src/quick/util/{qdeclarativetransition_p.h => qquicktransition_p.h} (71%) rename src/quick/util/{qdeclarativetransitionmanager.cpp => qquicktransitionmanager.cpp} (67%) rename src/quick/util/{qdeclarativetransitionmanager_p_p.h => qquicktransitionmanager_p_p.h} (73%) create mode 100644 src/quick/util/qquickutilmodule.cpp rename src/quick/util/{qdeclarativeutilmodule_p.h => qquickutilmodule_p.h} (88%) delete mode 100644 tests/auto/declarative/debugger/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp delete mode 100644 tests/auto/declarative/debugger/qdeclarativeinspector/qdeclarativeinspector.pro delete mode 100644 tests/auto/declarative/declarative.pro delete mode 100644 tests/auto/declarative/qdeclarativechangeset/qdeclarativechangeset.pro delete mode 100644 tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro delete mode 100644 tests/auto/declarative/qdeclarativecpputils/qdeclarativecpputils.pro delete mode 100644 tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro delete mode 100644 tests/auto/declarative/qdeclarativeexpression/qdeclarativeexpression.pro delete mode 100644 tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro delete mode 100644 tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro delete mode 100644 tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro delete mode 100644 tests/auto/declarative/qdeclarativelistcompositor/qdeclarativelistcompositor.pro delete mode 100644 tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro delete mode 100644 tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro delete mode 100644 tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro delete mode 100644 tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp delete mode 100644 tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro delete mode 100644 tests/auto/declarative/qdeclarativepropertycache/qdeclarativepropertycache.pro delete mode 100644 tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro delete mode 100644 tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro delete mode 100644 tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro delete mode 100644 tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro rename tests/auto/{declarative => qml}/animation/animation.pro (100%) rename tests/auto/{declarative => qml}/animation/qabstractanimationjob/qabstractanimationjob.pro (74%) rename tests/auto/{declarative => qml}/animation/qabstractanimationjob/tst_qabstractanimationjob.cpp (98%) rename tests/auto/{declarative => qml}/animation/qanimationgroupjob/qanimationgroupjob.pro (73%) rename tests/auto/{declarative => qml}/animation/qanimationgroupjob/tst_qanimationgroupjob.cpp (98%) rename tests/auto/{declarative => qml}/animation/qparallelanimationgroupjob/qparallelanimationgroupjob.pro (72%) rename tests/auto/{declarative => qml}/animation/qparallelanimationgroupjob/tst_qparallelanimationgroupjob.cpp (99%) rename tests/auto/{declarative => qml}/animation/qpauseanimationjob/qpauseanimationjob.pro (66%) rename tests/auto/{declarative => qml}/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp (98%) rename tests/auto/{declarative => qml}/animation/qsequentialanimationgroupjob/qsequentialanimationgroupjob.pro (76%) rename tests/auto/{declarative => qml}/animation/qsequentialanimationgroupjob/tst_qsequentialanimationgroupjob.cpp (99%) rename tests/auto/{declarative => qml}/debugger/debugger.pro (50%) rename tests/auto/{declarative => qml}/debugger/qdebugmessageservice/data/test.qml (100%) rename tests/auto/{declarative => qml}/debugger/qdebugmessageservice/qdebugmessageservice.pro (90%) rename tests/auto/{declarative => qml}/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp (80%) rename tests/auto/{declarative => qml}/debugger/qpacketprotocol/qpacketprotocol.pro (83%) rename tests/auto/{declarative => qml}/debugger/qpacketprotocol/tst_qpacketprotocol.cpp (94%) rename tests/auto/{declarative/debugger/qdeclarativedebugclient/qdeclarativedebugclient.pro => qml/debugger/qqmldebugclient/qqmldebugclient.pro} (55%) rename tests/auto/{declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp => qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp} (54%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs => qml/debugger/qqmldebugjs}/data/breakpointRelocation.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs => qml/debugger/qqmldebugjs}/data/changeBreakpoint.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs => qml/debugger/qqmldebugjs}/data/condition.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs => qml/debugger/qqmldebugjs}/data/createComponent.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs => qml/debugger/qqmldebugjs}/data/exception.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs => qml/debugger/qqmldebugjs}/data/loadjsfile.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs => qml/debugger/qqmldebugjs}/data/oncompleted.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs => qml/debugger/qqmldebugjs}/data/stepAction.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs => qml/debugger/qqmldebugjs}/data/test.js (100%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs => qml/debugger/qqmldebugjs}/data/test.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs => qml/debugger/qqmldebugjs}/data/timer.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs/qdeclarativedebugjs.pro => qml/debugger/qqmldebugjs/qqmldebugjs.pro} (83%) rename tests/auto/{declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp => qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp} (87%) rename tests/auto/{declarative/debugger/qdeclarativedebugservice/qdeclarativedebugservice.pro => qml/debugger/qqmldebugservice/qqmldebugservice.pro} (57%) create mode 100644 tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp rename tests/auto/{declarative/debugger/qdeclarativeenginedebug/qdeclarativeenginedebug.pro => qml/debugger/qqmlenginedebug/qqmlenginedebug.pro} (50%) rename tests/auto/{declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp => qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp} (63%) rename tests/auto/{declarative/debugger/qdeclarativeinspector => qml/debugger/qqmlinspector}/app/app.pro (80%) rename tests/auto/{declarative/debugger/qdeclarativeinspector => qml/debugger/qqmlinspector}/app/main.cpp (100%) rename tests/auto/{declarative/debugger/qdeclarativeinspector => qml/debugger/qqmlinspector}/app/qtquick2.qml (100%) create mode 100644 tests/auto/qml/debugger/qqmlinspector/qqmlinspector.pro rename tests/auto/{declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.cpp => qml/debugger/qqmlinspector/tst_qqmlinspector.cpp} (70%) rename tests/auto/{declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.pro => qml/debugger/qqmlinspector/tst_qqmlinspector.pro} (63%) rename tests/auto/{declarative/debugger/qdeclarativeprofilerservice => qml/debugger/qqmlprofilerservice}/data/exit.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativeprofilerservice => qml/debugger/qqmlprofilerservice}/data/test.qml (100%) rename tests/auto/{declarative/debugger/qdeclarativeprofilerservice/qdeclarativeprofilerservice.pro => qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro} (64%) rename tests/auto/{declarative/debugger/qdeclarativeprofilerservice/tst_qdeclarativeprofilerservice.cpp => qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp} (59%) rename tests/auto/{declarative => qml}/debugger/qv8profilerservice/data/console.qml (100%) rename tests/auto/{declarative => qml}/debugger/qv8profilerservice/data/exit.qml (100%) rename tests/auto/{declarative => qml}/debugger/qv8profilerservice/data/test.qml (100%) rename tests/auto/{declarative => qml}/debugger/qv8profilerservice/qv8profilerservice.pro (89%) rename tests/auto/{declarative => qml}/debugger/qv8profilerservice/tst_qv8profilerservice.cpp (81%) rename tests/auto/{declarative => qml}/debugger/shared/debugutil.cpp (73%) rename tests/auto/{declarative => qml}/debugger/shared/debugutil_p.h (82%) rename tests/auto/{declarative => qml}/parserstress/parserstress.pro (77%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.1.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.1.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.1.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.2.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.2.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.2.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.2.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.2.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.2.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.3.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.3.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.4.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.4.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.4.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.4.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.4.4-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.4.5-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.4.5-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.4.5-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.5.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.5.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.5.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/15.4.5.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Array/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.3.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.3.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.3.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.3.1-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.3.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4.2-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4.2-4-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4.3-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4.3-4-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/15.6.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Boolean/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.1.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.1.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.1.13-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.2.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.2.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.2.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.2.2-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.2.2-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.2.2-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.2.2-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.1-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.1-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.2-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.2-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.2-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.8-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.8-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.8-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.8-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.3.8-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.4.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.4.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.4.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-10.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-11.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-12.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-13.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.10-9.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.11-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.11-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.11-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.11-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.11-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.11-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.11-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.12-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.12-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.12-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.12-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.12-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.12-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.12-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.12-8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.13-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.13-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.13-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.13-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.13-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.13-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.13-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.13-8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.14.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.15.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.16.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.17.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.18.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.19.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.2-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.20.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.21-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.21-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.21-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.21-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.21-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.21-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.21-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.21-8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.22-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.22-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.22-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.22-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.22-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.22-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.22-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.22-8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-10.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-11.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-12.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-13.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-14.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-15.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-16.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-17.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-18.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.23-9.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.24-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.24-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.24-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.24-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.24-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.24-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.24-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.24-8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.25-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.26-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.27-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.28-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.29-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.3-1-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.30-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.31-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.32-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.33-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.34-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.35-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.36-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.36-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.36-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.36-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.36-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.36-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.36-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.37-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.37-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.37-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.37-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.37-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.4-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.9.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/15.9.5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Date/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.4-10.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.4-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.4-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.4-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.4-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.4-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.4-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.4-8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.5-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.5-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.5-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.5-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.8-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.1.8-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.2.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.2.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.2.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.2.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/10.2.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ExecutionContexts/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.1.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.10-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.10-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.10-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.12-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.12-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.12-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.12-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.13.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.13.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.13.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.13.2-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.13.2-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.13.2-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.13.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.14-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.1-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.1-4-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.1-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-1-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-10-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-11.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-4-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-5-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-6-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-7-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-8-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.2-9-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.3-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.3-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.3-4-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.2.3-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.3.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.3.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.4.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.4.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.4.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.4.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.4.5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.4.6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.4.7-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.4.7-02.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.4.8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.4.9.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.5.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.5.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.5.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.6.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.6.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.6.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.6.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.6.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.7.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.7.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.7.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.8.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.8.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.8.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.8.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.9.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.9.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/11.9.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Expressions/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.1.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.1.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.1.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.2.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.2.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.2.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.3.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.3.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.3.1-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.3.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.4.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.5-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.5-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.5.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/15.3.5.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/FunctionObjects/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1-1-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.1.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.1.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.2.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.2.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.2.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.2.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.2.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.2.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.2.5-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.2.5-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.2.5-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.2.6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/15.1.2.7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/GlobalObject/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.2-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.2-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.2-4-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.2-5-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.2-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-10.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-11.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-12.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-13-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.3-9.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.1-1-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.1-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.1-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-1-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-10-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-11-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-12-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-13-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-14-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-15-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-16-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-4-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-5-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-6-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-7-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-8-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.2-9-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-1-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-10-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-11-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-12-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-13-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-14-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-15-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-16-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-4-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-5-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-6-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-7-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-8-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.4.3-9-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.5-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.5-10-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.5-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.5-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.5-4-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.5-5-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.5-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.5-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.5-8-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.5-9-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.7.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.7.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.7.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.7.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.7.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.7.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/7.8.2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/LexicalConventions/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.4-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.5-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.5-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.6-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.6-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.7-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.7-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.8-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.8-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.8-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.10.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.11.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.12.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.13.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.14.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.15.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.16.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.17.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.18.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/15.8.2.9.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Math/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/NativeObjects/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/NativeObjects/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.2-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.2-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.3-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.3-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.4-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.4-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.4-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.5-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.5-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.5-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.5-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.6-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.6-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.6-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.6-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.4.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.4.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.4.2-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.4.2-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.4.2-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.4.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.4.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/15.7.4.3-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Number/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.1.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.1.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.2.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.2.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.3.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.3.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.3.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.3.1-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.4.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.4.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/15.2.4.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/ObjectObjects/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/README (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/SourceText/6-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/SourceText/6-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/SourceText/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/SourceText/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.10-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.10.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.5-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.5-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.2-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.2-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.2-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.2-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.2-7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.2-8.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.2-9-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-10.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-11.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-12.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-19.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-5-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-6-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-7-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-8-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.6.3-9-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.7-1-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.8-1-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/12.9-1-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Statements/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.3.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.3.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.3.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.3.1-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.3.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.3.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.3.2-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.10-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.11-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.11-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.11-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.11-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.11-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.11-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.12-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.12-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.12-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.12-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.12-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.2-2-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.2-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.3-3-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.4-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.4-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.4-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.5-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.5-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.5-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.5-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.5-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.6-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.6-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.7-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.7-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.8-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.8-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.8-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.9-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/15.5.5.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/String/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.3.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.3.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.3.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.4-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.5-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.8.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/9.9-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/TypeConversion/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Types/8.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Types/8.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Types/8.6.2.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Types/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/Types/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/10.1.4-9.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/10.1.6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/10.1.8-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/11.6.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/11.6.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/11.6.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/11.6.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.1.2.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.2.1.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.2.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.2.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.3.1.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.3.1.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.3.2.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.3.2.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.3.3.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.4.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.5.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.5.4.2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.5.4.4-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.5.4.5-6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.5.4.7-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.6.3.1-5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.6.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.6.4-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.7.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.7.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.8-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/15.9.5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/8.6.2.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/9.9-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/extensions/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/jsref.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma/template.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/boolean-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/boolean-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/date-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/date-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/date-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/date-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/exception-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/exception-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/exception-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/exception-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/exception-005.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/exception-006.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/exception-007.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/exception-008.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/exception-009.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/exception-010-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/exception-011-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-005.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-006.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-007.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-008.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-009.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-010.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-011.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-012.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-013.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-014.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-015.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-016.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-017.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/expression-019.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/function-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/global-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/global-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-005.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-006.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-007.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-008.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-009.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-010.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-011.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-012.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-013.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-014.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-015.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-016.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-017.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-018.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-019.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-020.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-021.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-022.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-023.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-024.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-025.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-026.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-027.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-028.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-029.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-030.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-031.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-032.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-033.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-034.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-035.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-036.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-037.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-038.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-039.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-040.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-041.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-042.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-047.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-048.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-049.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-050.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-051.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-052.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-053.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/lexical-054.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/number-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/number-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/number-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/statement-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/statement-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/statement-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/statement-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/statement-005.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/statement-006.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/statement-007.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/statement-008.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/statement-009.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/string-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Exceptions/string-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Expressions/StrictEquality-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Expressions/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Expressions/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/FunctionObjects/apply-001-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/FunctionObjects/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/FunctionObjects/call-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/FunctionObjects/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/LexicalConventions/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/LexicalConventions/keywords-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/LexicalConventions/regexp-literals-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/LexicalConventions/regexp-literals-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/LexicalConventions/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/README (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/constructor-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/exec-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/exec-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/function-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/hex-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/multiline-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/octal-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/octal-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/octal-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/properties-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/properties-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/regexp-enumerate-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/regress-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/RegExp/unicode-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/dowhile-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/dowhile-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/dowhile-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/dowhile-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/dowhile-005.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/dowhile-006.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/dowhile-007.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/forin-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/forin-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/if-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/label-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/label-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/switch-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/switch-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/switch-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/switch-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/try-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/try-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/try-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/try-005.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/try-006.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/try-007.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/try-008.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/try-009.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/try-010.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/try-012.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/while-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/while-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/while-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/Statements/while-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/String/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/String/match-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/String/match-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/String/match-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/String/match-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/String/replace-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/String/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/String/split-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/String/split-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/String/split-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/extensions/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/extensions/constructor-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/extensions/function-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/extensions/instanceof-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/extensions/instanceof-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/extensions/instanceof-003-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/extensions/instanceof-004-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/extensions/instanceof-005-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/extensions/instanceof-006.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/extensions/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/instanceof/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/instanceof/instanceof-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/instanceof/instanceof-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/instanceof/instanceof-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/instanceof/regress-7635.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/instanceof/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/jsref.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_2/template.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/15.4.4.11-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/15.4.4.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/15.4.4.4-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/15.4.5.1-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/regress-101488.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/regress-130451.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/regress-322135-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/regress-322135-02.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/regress-322135-03.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/regress-322135-04.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/regress-387501.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/regress-421325.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/regress-430717.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Array/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Date/15.9.1.2-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Date/15.9.3.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Date/15.9.4.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Date/15.9.5.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Date/15.9.5.4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Date/15.9.5.5-02.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Date/15.9.5.5.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Date/15.9.5.6.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Date/15.9.5.7.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Date/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Date/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/15.11.1.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/15.11.4.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/15.11.7.6-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/15.11.7.6-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/15.11.7.6-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/binding-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/regress-181654.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/regress-181914.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/regress-58946.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/regress-95101.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Exceptions/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/ExecutionContexts/10.1.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/ExecutionContexts/10.1.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/ExecutionContexts/10.1.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/ExecutionContexts/10.1.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/ExecutionContexts/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/ExecutionContexts/regress-23346.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/ExecutionContexts/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Expressions/11.10-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Expressions/11.10-02.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Expressions/11.10-03.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Expressions/11.6.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Expressions/11.7.1-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Expressions/11.7.2-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Expressions/11.7.3-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Expressions/11.9.6-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Expressions/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Expressions/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/FunExpr/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/FunExpr/fe-001-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/FunExpr/fe-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/FunExpr/fe-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/FunExpr/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/15.3.4.3-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/15.3.4.4-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/arguments-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/arguments-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/call-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/regress-131964.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/regress-137181.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/regress-193555.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/regress-313570.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/regress-49286.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/regress-58274.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/regress-85880.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/regress-94506.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/regress-97921.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/scope-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/scope-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Function/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/LexicalConventions/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/LexicalConventions/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Number/15.7.4.2-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Number/15.7.4.3-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Number/15.7.4.3-02.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Number/15.7.4.5-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Number/15.7.4.6-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Number/15.7.4.7-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Number/15.7.4.7-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Number/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Number/regress-442242-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Number/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/NumberFormatting/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/NumberFormatting/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/NumberFormatting/tostring-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/8.6.1-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/8.6.2.6-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/class-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/class-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/class-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/class-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/class-005.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/regress-361274.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/regress-385393-07.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/regress-72773.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/regress-79129-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Object/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Operators/11.13.1-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Operators/11.13.1-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Operators/11.4.1-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Operators/11.4.1-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Operators/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Operators/order-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Operators/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/README (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/15.10.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/15.10.2.12.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/15.10.3.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/15.10.3.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/15.10.4.1-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/15.10.4.1-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/15.10.4.1-3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/15.10.4.1-4.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/15.10.4.1-5-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/15.10.6.2-1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/15.10.6.2-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/octal-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/octal-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/perlstress-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/perlstress-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-100199.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-105972.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-119909.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-122076.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-123437.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-165353.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-169497.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-169534.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-187133.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-188206.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-191479.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-202564.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-209067.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-209919.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-216591.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-220367-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-223273.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-223535.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-224676.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-225289.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-225343.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-24712.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-285219.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-28686.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-289669.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-307456.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-309840.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-311414.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-312351.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-31316.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-330684.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-334158.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-346090.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-367888.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-375642.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-375711.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-375715-02.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-375715-03.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-375715-04.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-57572.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-57631.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-67773.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-72964.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-76683.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-78156.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-85721.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-87231.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/regress-98306.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/RegExp/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Regress/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Regress/regress-385393-04.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Regress/regress-419152.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Regress/regress-420087.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Regress/regress-420610.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Regress/regress-441477-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Regress/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/12.6.3.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-121744.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-131348.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-157509.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-194364.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-226517.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-302439.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-324650.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-74474-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-74474-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-74474-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-83532-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/regress-83532-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Statements/switch-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/String/15.5.4.11.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/String/15.5.4.14.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/String/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/String/regress-104375.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/String/regress-189898.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/String/regress-304376.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/String/regress-313567.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/String/regress-392378.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/String/regress-83293.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/String/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Unicode/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Unicode/regress-352044-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Unicode/regress-352044-02-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Unicode/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Unicode/uc-001-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Unicode/uc-001.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Unicode/uc-002-n.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Unicode/uc-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Unicode/uc-003.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Unicode/uc-004.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/Unicode/uc-005.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/10.1.3-2.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/7.9.1.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/browser.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-103087.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-188206-01.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-188206-02.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-220367-002.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-228087.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-274152.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-320854.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-327170.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-368516.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-385393-03.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-429248.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/regress-430740.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/extensions/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/ecma_3/template.js (100%) rename tests/auto/{declarative => qml}/parserstress/tests/shell.js (100%) rename tests/auto/{declarative => qml}/parserstress/tst_parserstress.cpp (96%) rename tests/auto/{declarative => qml}/qjsengine/qjsengine.pro (88%) rename tests/auto/{declarative => qml}/qjsengine/script/com/__init__.js (100%) rename tests/auto/{declarative => qml}/qjsengine/script/com/trolltech/__init__.js (100%) rename tests/auto/{declarative => qml}/qjsengine/script/com/trolltech/recursive/__init__.js (100%) rename tests/auto/{declarative => qml}/qjsengine/script/com/trolltech/syntaxerror/__init__.js (100%) rename tests/auto/{declarative => qml}/qjsengine/tst_qjsengine.cpp (100%) rename tests/auto/{declarative => qml}/qjsvalue/qjsvalue.pro (78%) rename tests/auto/{declarative => qml}/qjsvalue/tst_qjsvalue.cpp (100%) rename tests/auto/{declarative => qml}/qjsvalue/tst_qjsvalue.h (100%) rename tests/auto/{declarative => qml}/qjsvalueiterator/qjsvalueiterator.pro (79%) rename tests/auto/{declarative => qml}/qjsvalueiterator/tst_qjsvalueiterator.cpp (100%) create mode 100644 tests/auto/qml/qml.pro rename tests/auto/{declarative => qml}/qmlmin/qmlmin.pro (85%) rename tests/auto/{declarative => qml}/qmlmin/tst_qmlmin.cpp (74%) rename tests/auto/{declarative => qml}/qmlplugindump/qmlplugindump.pro (100%) rename tests/auto/{declarative => qml}/qmlplugindump/tst_qmlplugindump.cpp (100%) rename tests/auto/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/createObject.qml (100%) rename tests/auto/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/createObjectWithScript.qml (100%) rename tests/auto/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/incubateObject.qml (100%) rename tests/auto/{declarative/qdeclarativeerror/qdeclarativeerror.pro => qml/qqmlcomponent/qqmlcomponent.pro} (59%) rename tests/auto/{declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp => qml/qqmlcomponent/tst_qqmlcomponent.cpp} (78%) rename tests/auto/{declarative/qdeclarativeconsole => qml/qqmlconsole}/data/assert.qml (100%) rename tests/auto/{declarative/qdeclarativeconsole => qml/qqmlconsole}/data/exception.qml (100%) rename tests/auto/{declarative/qdeclarativeconsole => qml/qqmlconsole}/data/logging.qml (100%) rename tests/auto/{declarative/qdeclarativeconsole => qml/qqmlconsole}/data/profiling.qml (100%) rename tests/auto/{declarative/qdeclarativeconsole => qml/qqmlconsole}/data/tracing.qml (96%) rename tests/auto/{declarative/qdeclarativelocale/qdeclarativelocale.pro => qml/qqmlconsole/qqmlconsole.pro} (65%) rename tests/auto/{declarative/qdeclarativeconsole/tst_qdeclarativeconsole.cpp => qml/qqmlconsole/tst_qqmlconsole.cpp} (87%) rename tests/auto/{declarative/qdeclarativecontext => qml/qqmlcontext}/data/Object_22535.qml (100%) rename tests/auto/{declarative/qdeclarativecontext => qml/qqmlcontext}/data/RefreshExpressionsType.qml (100%) rename tests/auto/{declarative/qdeclarativecontext => qml/qqmlcontext}/data/qtbug_22535.qml (100%) rename tests/auto/{declarative/qdeclarativecontext => qml/qqmlcontext}/data/refreshExpressions.qml (100%) rename tests/auto/{declarative/qdeclarativecontext => qml/qqmlcontext}/data/refreshExpressionsRootContext.qml (100%) rename tests/auto/{declarative/qdeclarativeinfo/qdeclarativeinfo.pro => qml/qqmlcontext/qqmlcontext.pro} (57%) rename tests/auto/{declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp => qml/qqmlcontext/tst_qqmlcontext.cpp} (73%) create mode 100644 tests/auto/qml/qqmlcpputils/qqmlcpputils.pro rename tests/auto/{declarative/qdeclarativecpputils/tst_qdeclarativecpputils.cpp => qml/qqmlcpputils/tst_qqmlcpputils.cpp} (90%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/AliasBindingsAssignCorrectlyType.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/AliasBindingsOverrideTargetType.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/AliasBindingsOverrideTargetType3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/AliasToCompositeElementType1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/AliasToCompositeElementType2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/ConstantsOverrideBindings.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/CustomObject.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/ElementAssignType.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/MethodsObject.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/NestedTypeTransientErrors.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/PropertyVarBaseItem.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/PropertyVarCircularComponent.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/PropertyVarCircularComponent2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/PropertyVarCircularComponent3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/PropertyVarCircularComponent4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/PropertyVarCircularComponent5.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/PropertyVarInheritanceComponent.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/PropertyVarOwnershipComponent.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/ScarceResourceSignalComponentVar.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/ScarceResourceSignalComponentVariant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/ScarceResourceVarComponent.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/Scope6Nested.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/ScopeObject.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/SequenceConversionComponent.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/SpuriousWarning.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/TypeForDynamicCreation.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasBindingsAssignCorrectly.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasBindingsOverrideTarget.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasBindingsOverrideTarget.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasBindingsOverrideTarget.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasPropertyAndBinding.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasToCompositeElement.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasWritesOverrideBindings.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasWritesOverrideBindings.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasWritesOverrideBindings.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasreset/AliasPropertyComponent.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasreset/aliasPropertyReset.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasreset/aliasPropertyReset.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasreset/aliasPropertyReset.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasreset/aliasPropertyReset.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasreset/aliasPropertyReset.5.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/aliasreset/aliasPropertyReset.error.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/assignBasicTypes.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/assignBasicTypes.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/assignSequenceTypes.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/assignSequenceTypes.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/assignSequenceTypes.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/assignSequenceTypes.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/assignSequenceTypes.5.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/assignSequenceTypes.6.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/assignSequenceTypes.7.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/attachedProperty.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/attachedProperty.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/attachedPropertyScope.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/automaticSemicolon.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/bindingLoop.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/blank.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/boolPropertiesEvaluateAsBool.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/boolPropertiesEvaluateAsBool.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/booleanConversion.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/bug.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/canAssignNullToQObject.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/canAssignNullToQObject.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/changeslots/propertyChangeSlotErrors.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/changeslots/propertyChangeSlotErrors.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/changeslots/propertyChangeSlotErrors.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/changeslots/propertyChangeSlotErrors.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/changeslots/propertyChangeSlots.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/compiled.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/compositePropertyType.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/constantsOverrideBindings.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/constantsOverrideBindings.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/constantsOverrideBindings.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/constantsOverrideBindings.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/deferredProperties.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/deferredPropertiesErrors.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/deleteLater.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/deleteWhileBindingRunning.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/deletedEngine.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/deletedObject.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/doubleEvaluate.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/dynamicCreation.helper.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/dynamicCreation.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/dynamicCreationOwnership.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/dynamicDeletion.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/dynamicDeletion.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/dynamicString.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/elementAssign.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/enums.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/enums.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/eval.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/exception.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/exceptionClearsOnReeval.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/exceptionProducesWarning.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/exceptionProducesWarning2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/extendedObjectPropertyLookup.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/extendedObjectPropertyLookup2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/extensionObjects.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/extensionObjectsPropertyOverride.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/forInLoop.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/function.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/functionAssignment.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/functionAssignment.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/functionAssignment.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/functionErrors.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/handleReferenceManagement.handle.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/handleReferenceManagement.handle.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/handleReferenceManagement.object.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/handleReferenceManagement.object.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/idShortcutInvalidates.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/idShortcutInvalidates.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/importScope.1.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/importScope.2.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/importScope.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/in.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include_callback.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include_callback.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include_pragma.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include_pragma_inner.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include_pragma_outer.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include_remote.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include_remote.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include_remote_missing.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include_remote_missing.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include_shared.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/include_shared.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/invokableObjectArg.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/invokableObjectRet.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/js/include2.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/js/include3.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsObject.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/SpecialRectangleOne.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/SpecialRectangleTwo.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/importFive.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/importFour.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/importOne.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/importPragmaLibrary.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/importPragmaLibraryWithImports.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/importPragmaLibraryWithPragmaLibraryImports.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/importThree.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/importTwo.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/importWithNoImports.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/testImport.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/testImportPragmaLibrary.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/testImportPragmaLibraryWithImports.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/testImportPragmaLibraryWithPragmaLibraryImports.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/testImportScoping.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/testModuleImport.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimport/testScriptImport.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimportfail/failFive.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimportfail/failFour.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimportfail/failOne.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimportfail/failThree.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimportfail/failTwo.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimportfail/importOne.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimportfail/importPragmaLibrary.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimportfail/importWithImports.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimportfail/testImportPragmaLibrary.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimportfail/testModuleImport.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/jsimportfail/testScriptImport.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/libraryScriptAssert.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/libraryScriptAssert.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/listAssignment.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/listProperties.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/listToVariant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/metaobjectRevision.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/metaobjectRevision2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/metaobjectRevision3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/metaobjectRevision4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/metaobjectRevisionErrors.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/metaobjectRevisionErrors2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/metaobjectRevisionErrors3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/methods.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/methods.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/methods.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/methods.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/methods.5.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/moduleapi/moduleApiMajorVersionFail.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/moduleapi/moduleApiMinorVersionFail.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/moduleapi/qobjectModuleApi.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/moduleapi/qobjectModuleApiCaching.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/moduleapi/qobjectModuleApiEnums.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/moduleapi/qobjectModuleApiWriting.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/moduleapi/scriptModuleApi.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/moduleapi/scriptModuleApiCaching.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/moduleapi/scriptModuleApiWriting.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/multiEngineObject.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/noSpuriousWarningsAtShutdown.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/noSpuriousWarningsAtShutdown.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/nonExistentAttachedObject.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/nonNotifyable.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/nonscriptable.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/nullObjectBinding.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/numberAssignment.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/objectConversion.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/objectName.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/objectsCompareAsEqual.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/objectsPassThroughSignals.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/outerBindingOverridesInnerBinding.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/ownership.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyAssignmentErrors.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertySplicing.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.10.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.5.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.6.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.7.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.8.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.9.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.circular.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.circular.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.inherit.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVar.reparent.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVarCpp.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVarImplicitOwnership.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVarOwnership.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVarOwnership.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVarOwnership.3.type.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVarOwnership.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVarOwnership.4.type1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVarOwnership.4.type2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/propertyVarOwnership.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qlistqobjectMethods.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript/data/declarativeHasOwnProperty.qml => qml/qqmlecmascript/data/qmlHasOwnProperty.qml} (100%) rename tests/auto/{declarative/qdeclarativeecmascript/data/declarativeToString.qml => qml/qqmlecmascript/data/qmlToString.qml} (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qobjectConnectionListExceptionHandling.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qobjectDerivedArgument.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_10696.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_11600.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_11600.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_11606.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_20344.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_21580.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_21864.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_21864.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_22464.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_22679.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_22843.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_22843.library.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_22843.library.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_22843.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtbug_9792.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/qtcreatorbug_1289.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/readonlyDeclaration.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/realToInt.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/regExp.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/regExp.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/remote_file.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/rewriteMultiLineStrings.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopy.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopy.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyFromJs.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyFromJs.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImport.var.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImport.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImport.variant.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImport.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImportDifferent.var.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImportDifferent.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImportFail.var.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImportFail.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImportFail.variant.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImportFail.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImportNoBinding.var.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImportNoBinding.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImportNoBinding.variant.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyImportNoBinding.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyNoBinding.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceCopyNoBinding.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceDestroyedCopy.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceDestroyedCopy.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceFunction.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceFunction.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceFunctionFail.var.qml (91%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceFunctionFail.variant.qml (91%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceMultipleDifferentNoBinding.var.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceMultipleDifferentNoBinding.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceMultipleSameNoBinding.var.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceMultipleSameNoBinding.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceMultipleSameWithBinding.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceObjectGc.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceSignal.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceSignal.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceTest.var.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceTest.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceTest.variant.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceTest.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceTestMultiple.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceTestMultiple.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceTestPreserve.var.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scarceResourceTestPreserve.variant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scope.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scope.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scope.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scope.5.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scope.6.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scope.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptConnect.1.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptConnect.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptConnect.2.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptConnect.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptConnect.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptConnect.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptConnect.5.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptConnect.6.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptConnect.6.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptDisconnect.1.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptDisconnect.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptDisconnect.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptDisconnect.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptDisconnect.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptErrors.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/scriptErrors.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/selfDeletingBinding.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/selfDeletingBinding.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/sequenceConversion.array.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/sequenceConversion.bindings.error.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/sequenceConversion.bindings.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/sequenceConversion.copy.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/sequenceConversion.indexes.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/sequenceConversion.read.error.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/sequenceConversion.read.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/sequenceConversion.threads.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/sequenceConversion.write.error.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/sequenceConversion.write.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/sharedAttachedObject.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/shutdownErrors.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/signalAssignment.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/signalAssignment.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/signalHandlers.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/signalParameterTypes.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/signalTriggeredBindings.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/signalWithJSValueInVariant.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/signalWithQJSValue.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/signalWithUnknownTypes.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/strictlyEquals.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/stringArg.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/switchStatement.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/switchStatement.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/switchStatement.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/switchStatement.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/switchStatement.5.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/switchStatement.6.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/threadScript.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/transientErrors.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/transientErrors.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/tryStatement.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/tryStatement.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/tryStatement.3.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/tryStatement.4.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/typeOf.js (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/typeOf.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/unaryExpression.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/undefinedResetsProperty.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/undefinedResetsProperty.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/urlListProperty.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/urlProperty.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/urlProperty.2.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/v8bindingException.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/v8functionException.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/valueTypeFunctions.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/variantsAssignedUndefined.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/withStatement.1.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/writeAttachedProperty.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/data/writeRemovesBinding.qml (100%) rename tests/auto/{declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro => qml/qqmlecmascript/qqmlecmascript.pro} (71%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/testtypes.cpp (95%) rename tests/auto/{declarative/qdeclarativeecmascript => qml/qqmlecmascript}/testtypes.h (95%) rename tests/auto/{declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp => qml/qqmlecmascript/tst_qqmlecmascript.cpp} (83%) create mode 100644 tests/auto/qml/qqmlengine/qqmlengine.pro rename tests/auto/{declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp => qml/qqmlengine/tst_qqmlengine.cpp} (65%) rename tests/auto/{declarative/qdeclarativeerror => qml/qqmlerror}/data/test.txt (100%) create mode 100644 tests/auto/qml/qqmlerror/qqmlerror.pro rename tests/auto/{declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp => qml/qqmlerror/tst_qqmlerror.cpp} (85%) rename tests/auto/{declarative/qdeclarativeexpression => qml/qqmlexpression}/data/scriptString.qml (100%) create mode 100644 tests/auto/qml/qqmlexpression/qqmlexpression.pro rename tests/auto/{declarative/qdeclarativeexpression/tst_qdeclarativeexpression.cpp => qml/qqmlexpression/tst_qqmlexpression.cpp} (62%) create mode 100644 tests/auto/qml/qqmlimageprovider/qqmlimageprovider.pro rename tests/auto/{declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp => qml/qqmlimageprovider/tst_qqmlimageprovider.cpp} (83%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/AsynchronousIfNestedType.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/asynchronousIfNested.1.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/asynchronousIfNested.2.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/asynchronousIfNested.3.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/chainInCompletion.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/chainedAsynchronousIfNested.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/clear.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/clearDuringCompletion.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/contextDelete.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/forceCompletion.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/nestedComponent.js (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/nestedComponent.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/noIncubationController.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/objectDeleted.errors.txt (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/objectDeleted.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/recursiveClear.1.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/recursiveClear.2.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/selfDelete.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/setInitialState.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/statusChanged.nested.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/data/statusChanged.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro => qml/qqmlincubator/qqmlincubator.pro} (60%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/testtypes.cpp (98%) rename tests/auto/{declarative/qdeclarativeincubator => qml/qqmlincubator}/testtypes.h (91%) rename tests/auto/{declarative/qdeclarativeincubator/tst_qdeclarativeincubator.cpp => qml/qqmlincubator/tst_qqmlincubator.cpp} (69%) rename tests/auto/{declarative/qdeclarativeinfo => qml/qqmlinfo}/data/NestedComponent.qml (100%) rename tests/auto/{declarative/qdeclarativeinfo => qml/qqmlinfo}/data/NestedObject.qml (100%) rename tests/auto/{declarative/qdeclarativeinfo => qml/qqmlinfo}/data/nestedQmlObject.qml (100%) rename tests/auto/{declarative/qdeclarativeinfo => qml/qqmlinfo}/data/qmlObject.qml (100%) create mode 100644 tests/auto/qml/qqmlinfo/qqmlinfo.pro rename tests/auto/{declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp => qml/qqmlinfo/tst_qqmlinfo.cpp} (86%) create mode 100644 tests/auto/qml/qqmlinstruction/qqmlinstruction.pro rename tests/auto/{declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp => qml/qqmlinstruction/tst_qqmlinstruction.cpp} (68%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/Alias.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/Alias2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/Alias3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/Alias4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/AliasPropertyChangeSignalsType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/ComponentComposite.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/CompositeType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/CompositeType2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/CompositeType3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/CompositeType4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/DontDoubleCallClassBeginItem.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/DynamicPropertiesNestedType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/HelperAlias.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/I18n.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/I18nType30.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/InlineAssignmentsOverrideBindingsType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/InlineAssignmentsOverrideBindingsType2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/LocalLast.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/MyComponent.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/MyCompositeValueSource.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/MyContainerComponent.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/NestedAlias.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/NestedComponentRoot.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/NestedErrorsType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/OnCompletedType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/OnDestructionType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/ReadOnlyType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/alias.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/alias.10.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/alias.11.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/alias.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/alias.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/alias.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/alias.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/alias.6.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/alias.7.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/alias.8.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/alias.9.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/aliasPropertiesAndSignals.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/aliasPropertyChangeSignals.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/aliasPropertyChangeSignals.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/allowedRevisionOverloads.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignBasicTypes.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignCompositeToType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignLiteralSignalProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignLiteralToVar.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignLiteralToVariant.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignObjectToSignal.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignObjectToVariant.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignQmlComponent.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignSignal.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignToNamespace.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignToNamespace.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignTypeExtremes.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignValueToSignal.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/assignValueToSignal.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/attachedProperties.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/autoComponentCreation.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/autoNotifyConnection.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.5.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.6.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.6.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.7.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.7.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.8.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.8.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.9.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/component.9.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/componentCompositeType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/cppnamespace.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/cppnamespace.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/crash2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/customOnProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/customParserIdNotAllowed.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/customParserIdNotAllowed.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/customParserTypes.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/customVariantTypes.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/declaredPropertyValues.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/defaultGrouped.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/defaultGrouped.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/defaultPropertyListOrder.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/destroyedSignal.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/destroyedSignal.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/disallowedRevisionOverloads.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/disallowedRevisionOverloads.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dontDoubleCallClassBegin.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/doubleSignal.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/doubleSignal.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/duplicateIDs.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/duplicateIDs.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicMeta.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicMeta.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicMeta.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicMeta.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicMeta.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicMeta.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicMeta.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicMeta.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicMeta.5.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicMeta.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicObject.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicObjectProperties.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicObjectProperties.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicProperties.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicPropertiesNested.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/dynamicSignalsAndSlots.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/empty.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/empty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/emptySignal.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/emptySignal.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/enumTypes.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/enumTypes.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/failingComponent.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/failingComponentTest.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/fakeDotProperty.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/fakeDotProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/finalOverride.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/finalOverride.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/i18nDeclaredPropertyNames.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/i18nDeclaredPropertyUse.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/i18nNameSpace.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/i18nScript.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/i18nStrings.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/i18nType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/idProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importFile.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importFile.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importIncorrectCase.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.10.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.10.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.5.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.6.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.6.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.7.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.7.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.8.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.8.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.9.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importJs.9.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importNamespaceConflict.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importNamespaceConflict.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importNewerVersion.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importNewerVersion.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importNonExist.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importNonExist.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importNonExistOlder.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importNonExistOlder.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importVersionMissingBuiltIn.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importVersionMissingBuiltIn.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importVersionMissingInstalled.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importVersionMissingInstalled.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importscript.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/importscript.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/incorrectCase.errors.insensitive.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/incorrectCase.errors.sensitive.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/incorrectCase.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/incorrectCaseType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/inlineAssignmentsOverrideBindings.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/inlineQmlComponents.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/insertedSemicolon.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/insertedSemicolon.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/interfaceProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/interfaceQList.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.10.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.10.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.5.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.6.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.6.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.7.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.7.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.8.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.8.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.9.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAlias.9.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.10.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.10.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.11.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.11.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.12.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.12.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.13.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.13.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.5.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.6.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.6.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.7.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.7.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.8.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.8.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.9.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidAttachedProperty.9.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.10.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.10.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.5.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.6.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.6.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.7.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.7.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.8.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.8.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.9.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidGroupedProperty.9.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.5.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.6.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.6.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.7.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.7.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.8.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.8.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.9.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.9.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidID.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidImportID.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidImportID.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidOn.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidOn.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidProperty.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidRoot.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidRoot.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidRoot.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidRoot.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidRoot.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidRoot.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidRoot.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidRoot.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidTypeName.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidTypeName.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidTypeName.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidTypeName.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidTypeName.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidTypeName.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidTypeName.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/invalidTypeName.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.1.6.js (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.js (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/PureJsModule.1.6/SecondAPI.js (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/PureJsModule.1.6/qmldir (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/PureJsModule/FirstAPI.js (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/PureJsModule/SecondAPI.js (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/PureJsModule/qmldir (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/VersionedOnlyJsModule.9.0/SomeAPI.js (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/VersionedOnlyJsModule.9.0/qmldir (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/installedtest/InstalledTest.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/installedtest/InstalledTest2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/installedtest/LocalLast.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/installedtest/PrivateType.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/installedtest/qmldir (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/installedtest0/InstalledTest.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/installedtest0/InstalledTest2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/lib/com/nokia/installedtest0/qmldir (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/listAssignment.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/listAssignment.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/listAssignment.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/listAssignment.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/listAssignment.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/listAssignment.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/listItemDeleteSelf.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/listProperties.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/majorVersionIsolation.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/majorVersionIsolation.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/metaobjectRevision.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/metaobjectRevision.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/metaobjectRevision.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/metaobjectRevision.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/metaobjectRevision.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/metaobjectRevision.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/method.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/method.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/missingObject.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/missingObject.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/missingSignal.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/missingSignal.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/missingValueTypeProperty.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/missingValueTypeProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.10.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.10.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.11.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.11.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.5.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.6.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.6.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.7.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.7.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.8.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.8.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.9.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/multiSet.9.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nestedComponentRoots.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nestedErrors.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nestedErrors.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/noCreation.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/noCreation.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonScriptableProperty.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonScriptableProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.5.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.6.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nonexistantProperty.6.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/notAvailable.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/notAvailable.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nullDotProperty.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/nullDotProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/objectValueTypeProperty.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/objectValueTypeProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/onCompleted.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/onDestruction.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.6.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.6.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.7.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/property.7.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/propertyInit.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/propertyInit.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/propertyValueSource.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/propertyValueSource.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/qmlAttachedPropertiesObjectMethod.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/qmlAttachedPropertiesObjectMethod.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/LocalInternal.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/Test.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/TestLocal.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/TestNamed.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/TestSubDir.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/UndeclaredLocal.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/WrongTestLocal.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/noqmldir/Test.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/pics/blue.png (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/qmldir (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/subdir/SubTest.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage => qml/qqmllanguage/data/qtest/qml/qqmllanguage}/subdir/qmldir (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/readOnly.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/readOnly.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/readOnly.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/readOnly.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/readOnly.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/readOnly.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/readOnly.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/readOnly.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/readOnly.5.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/readOnly.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/readonly.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/registrationOrder.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/remoteLoadCrash.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/revisions11.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/revisionsbasesub11.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/revisionssub11.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/rootAsQmlComponent.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/scriptString.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/scriptString.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/scriptString.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/scriptString.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/scriptString.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/scriptString2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/scriptString3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/scriptString4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/signal.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/signal.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/signal.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/signal.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/signal.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/signal.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/signal.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/signal.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/simpleBindings.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/simpleContainer.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/simpleObject.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/singularProperty.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/singularProperty.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/singularProperty.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/singularProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/subdir/Test.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/subdir/subsubdir/SubTest.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/test.js (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/test2.js (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/unregisteredObject.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/unregisteredObject.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/unsupportedProperty.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/unsupportedProperty.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/valueTypes.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/variantNotify.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/versionedbase.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.1.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.1.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.10.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.10.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.11.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.11.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.12.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.12.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.13.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.13.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.14.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.14.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.15.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.15.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.16.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.16.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.17.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.17.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.2.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.3.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.3.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.4.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.4.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.5.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.5.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.6.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.6.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.7.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.7.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.8.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.8.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.9.errors.txt (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/data/wrongType.9.qml (100%) rename tests/auto/{declarative/qdeclarativelanguage/qdeclarativelanguage.pro => qml/qqmllanguage/qqmllanguage.pro} (66%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/testtypes.cpp (100%) rename tests/auto/{declarative/qdeclarativelanguage => qml/qqmllanguage}/testtypes.h (88%) rename tests/auto/{declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp => qml/qqmllanguage/tst_qqmllanguage.cpp} (86%) rename tests/auto/{declarative/qdeclarativelistreference => qml/qqmllistreference}/data/MyType.qml (100%) rename tests/auto/{declarative/qdeclarativelistreference => qml/qqmllistreference}/data/engineTypes.qml (100%) rename tests/auto/{declarative/qdeclarativelistreference => qml/qqmllistreference}/data/variantToList.qml (100%) create mode 100644 tests/auto/qml/qqmllistreference/qqmllistreference.pro rename tests/auto/{declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp => qml/qqmllistreference/tst_qqmllistreference.cpp} (65%) rename tests/auto/{declarative/qdeclarativelocale => qml/qqmllocale}/data/date.qml (100%) rename tests/auto/{declarative/qdeclarativelocale => qml/qqmllocale}/data/functions.qml (100%) rename tests/auto/{declarative/qdeclarativelocale => qml/qqmllocale}/data/localeCompare.qml (100%) rename tests/auto/{declarative/qdeclarativelocale => qml/qqmllocale}/data/number.qml (100%) rename tests/auto/{declarative/qdeclarativelocale => qml/qqmllocale}/data/properties.qml (100%) rename tests/auto/{declarative/qdeclarativeconsole/qdeclarativeconsole.pro => qml/qqmllocale/qqmllocale.pro} (65%) rename tests/auto/{declarative/qdeclarativelocale/tst_qdeclarativelocale.cpp => qml/qqmllocale/tst_qqmllocale.cpp} (85%) create mode 100644 tests/auto/qml/qqmlmetatype/qqmlmetatype.pro create mode 100644 tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/implicit1/implicitQmldir.errors.txt (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/implicit1/qmldir (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/implicit1/temptest.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/implicit2/Test.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/implicit2/implicitQmldir.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/implicit2/qmldir (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/implicit2/temptest2.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/importsMixedQmlCppPlugin.2.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/importsMixedQmlCppPlugin.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/incorrectCase.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/pluginWithQmlFile.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/versionNotInstalled.2.errors.txt (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/versionNotInstalled.2.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/versionNotInstalled.errors.txt (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/versionNotInstalled.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/works.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/works2.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/data/works21.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/AutoTestPluginWithQmlFile/MyQmlFile.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/AutoTestPluginWithQmlFile/qmldir (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/AutoTestQmlMixedPluginType/Foo.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/AutoTestQmlMixedPluginType/qmldir (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/AutoTestQmlPluginType.2.1/qmldir (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/AutoTestQmlPluginType.2/qmldir (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/AutoTestQmlPluginType/qmldir (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/AutoTestQmlVersionPluginType/qmldir (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/PureQmlModule/ComponentA.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/PureQmlModule/ComponentB.qml (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/PureQmlModule/qmldir (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/imports/com/nokia/WrongCase/qmldir (100%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/plugin.2.1/plugin.2.1.pro (60%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/plugin.2.1/plugin.cpp (94%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/plugin.2/plugin.2.pro (59%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/plugin.2/plugin.cpp (94%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/plugin/plugin.cpp (94%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/plugin/plugin.pro (59%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/pluginMixed/plugin.cpp (93%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/pluginMixed/pluginMixed.pro (60%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/pluginVersion/plugin.cpp (93%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/pluginVersion/pluginVersion.pro (60%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/pluginWithQmlFile/plugin.cpp (92%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/pluginWithQmlFile/pluginWithQmlFile.pro (60%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/pluginWrongCase/plugin.cpp (94%) rename tests/auto/{declarative/qdeclarativemoduleplugin => qml/qqmlmoduleplugin}/pluginWrongCase/pluginWrongCase.pro (60%) rename tests/auto/{declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro => qml/qqmlmoduleplugin/qqmlmoduleplugin.pro} (51%) rename tests/auto/{declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp => qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp} (74%) rename tests/auto/{declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro => qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.pro} (68%) rename tests/auto/{declarative/qdeclarativeparser/qdeclarativeparser.pro => qml/qqmlparser/qqmlparser.pro} (66%) rename tests/auto/{declarative/qdeclarativeparser/tst_qdeclarativeparser.cpp => qml/qqmlparser/tst_qqmlparser.cpp} (83%) rename tests/auto/{declarative/qdeclarativepixmapcache => qml/qqmlpixmapcache}/data/dataLeak.qml (100%) rename tests/auto/{declarative/qdeclarativeproperty => qml/qqmlproperty}/data/NoContextTypeA.qml (100%) rename tests/auto/{declarative/qdeclarativeproperty => qml/qqmlproperty}/data/NoContextTypeB.qml (100%) rename tests/auto/{declarative/qdeclarativeproperty => qml/qqmlproperty}/data/TestType.qml (100%) rename tests/auto/{declarative/qdeclarativeproperty => qml/qqmlproperty}/data/aliasPropertyBindings.qml (100%) rename tests/auto/{declarative/qdeclarativeproperty => qml/qqmlproperty}/data/assignEmptyVariantMap.qml (100%) rename tests/auto/{declarative/qdeclarativeproperty => qml/qqmlproperty}/data/readSynthesizedObject.qml (100%) create mode 100644 tests/auto/qml/qqmlproperty/qqmlproperty.pro rename tests/auto/{declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp => qml/qqmlproperty/tst_qqmlproperty.cpp} (67%) create mode 100644 tests/auto/qml/qqmlpropertycache/qqmlpropertycache.pro rename tests/auto/{declarative/qdeclarativepropertycache/tst_qdeclarativepropertycache.cpp => qml/qqmlpropertycache/tst_qqmlpropertycache.cpp} (81%) create mode 100644 tests/auto/qml/qqmlpropertymap/qqmlpropertymap.pro rename tests/auto/{declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp => qml/qqmlpropertymap/tst_qqmlpropertymap.cpp} (82%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/atob.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/btoa.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/createComponent.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/createComponentData.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/createComponent_lib.js (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/createComponent_lib.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/createQmlObject.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/darker.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/dateTimeConversion.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/enums.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/fontFamilies.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/formatting.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/hsla.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/isQtObject.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/lighter.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/md5.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/openUrlExternally.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/openUrlExternally_lib.js (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/openUrlExternally_lib.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/point.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/quit.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/rect.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/resolvedUrl.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/rgba.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/size.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/tint.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/vector.qml (100%) rename tests/auto/{declarative/qdeclarativeqt => qml/qqmlqt}/data/vector4.qml (100%) create mode 100644 tests/auto/qml/qqmlqt/qqmlqt.pro rename tests/auto/{declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp => qml/qqmlqt/tst_qqmlqt.cpp} (89%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/README (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/changeversion.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/creation-a.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/creation.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/error-a.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/error-b.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/error-creation.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/error-notransaction.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/error-outsidetransaction.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/iteration-forwardonly.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/iteration.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/readonly-error.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/readonly.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/reopen1.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/reopen2.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/selection-bindnames.js (100%) rename tests/auto/{declarative/qdeclarativesqldatabase => qml/qqmlsqldatabase}/data/selection.js (100%) rename tests/auto/{declarative/qdeclarativecomponent/qdeclarativecomponent.pro => qml/qqmlsqldatabase/qqmlsqldatabase.pro} (56%) rename tests/auto/{declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp => qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp} (84%) rename tests/auto/{declarative/qdeclarativetranslation => qml/qqmltranslation}/data/idtranslation.qml (100%) rename tests/auto/{declarative/qdeclarativetranslation => qml/qqmltranslation}/data/qml_fr.qm (100%) rename tests/auto/{declarative/qdeclarativetranslation => qml/qqmltranslation}/data/qml_fr.ts (100%) rename tests/auto/{declarative/qdeclarativetranslation => qml/qqmltranslation}/data/qmlid_fr.qm (100%) rename tests/auto/{declarative/qdeclarativetranslation => qml/qqmltranslation}/data/qmlid_fr.ts (100%) rename tests/auto/{declarative/qdeclarativetranslation => qml/qqmltranslation}/data/translation.qml (100%) rename tests/auto/{declarative/qdeclarativetranslation => qml/qqmltranslation}/data/translation.qrc (100%) rename tests/auto/{declarative/qdeclarativetranslation/qdeclarativetranslation.pro => qml/qqmltranslation/qqmltranslation.pro} (61%) rename tests/auto/{declarative/qdeclarativetranslation/tst_qdeclarativetranslation.cpp => qml/qqmltranslation/tst_qqmltranslation.cpp} (87%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/BindingsSpliceCorrectlyType.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/BindingsSpliceCorrectlyType4.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/BindingsSpliceCorrectlyType5.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/autoBindingRemoval.2.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/autoBindingRemoval.3.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/autoBindingRemoval.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/bindingAssignment.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/bindingConflict.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/bindingRead.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/bindingVariantCopy.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/bindingsSpliceCorrectly.1.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/bindingsSpliceCorrectly.2.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/bindingsSpliceCorrectly.3.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/bindingsSpliceCorrectly.4.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/bindingsSpliceCorrectly.5.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/color_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/color_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/color_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/conflicting.1.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/conflicting.2.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/conflicting.3.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/deletedObject.js (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/deletedObject.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/enums.1.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/enums.2.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/enums.3.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/enums.4.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/enums.5.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/font_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/font_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/font_write.2.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/font_write.3.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/font_write.4.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/font_write.5.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/font_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/matrix4x4_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/matrix4x4_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/matrix4x4_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/point_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/point_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/point_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/pointf_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/pointf_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/pointf_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/quaternion_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/quaternion_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/quaternion_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/rect_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/rect_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/rect_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/rectf_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/rectf_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/rectf_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/returnValues.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/scriptAccess.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/scriptVariantCopy.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/size_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/size_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/size_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/sizef_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/sizef_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/sizef_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/sizereadonly_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/sizereadonly_writeerror.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/sizereadonly_writeerror2.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/sizereadonly_writeerror3.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/sizereadonly_writeerror4.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/staticAssignment.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/valueInterceptors.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/valueSources.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/varAssignment.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/variant_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/vector2d_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/vector2d_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/vector2d_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/vector3d_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/vector3d_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/vector3d_write.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/vector4d_compare.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/vector4d_read.qml (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/data/vector4d_write.qml (100%) rename tests/auto/{declarative/qdeclarativeincubator/qdeclarativeincubator.pro => qml/qqmlvaluetypes/qqmlvaluetypes.pro} (58%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/testtypes.cpp (100%) rename tests/auto/{declarative/qdeclarativevaluetypes => qml/qqmlvaluetypes}/testtypes.h (89%) rename tests/auto/{declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp => qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp} (80%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/abort.expect (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/abort.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/abort.reply (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/abort_opened.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/abort_unsent.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/attr.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/attr.xml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/callbackException.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/cdata.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/cdata.xml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/constructor.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/defaultState.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/document.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/document.xml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/domExceptionCodes.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/element.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/element.xml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/getAllResponseHeaders.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/getAllResponseHeaders_args.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/getAllResponseHeaders_sent.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/getAllResponseHeaders_unsent.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/getResponseHeader.expect (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/getResponseHeader.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/getResponseHeader.reply (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/getResponseHeader_args.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/getResponseHeader_sent.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/getResponseHeader_unsent.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/instanceStateValues.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/invalidMethodUsage.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/open.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/open_arg_count.1.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/open_arg_count.2.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/open_invalid_method.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/open_network.expect (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/open_network.reply (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/open_network.wait (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/open_sync.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/open_user.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/open_username.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/redirectError.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/redirectRecur.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/redirects.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/redirecttarget.html (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/responseText.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/responseXML_invalid.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/seconddocument.html (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_alreadySent.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_data.1.expect (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_data.1.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_data.2.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_data.3.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_data.4.expect (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_data.4.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_data.5.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_data.6.expect (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_data.6.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_data.7.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_data.reply (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_ignoreData.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_ignoreData.reply (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_ignoreData_DELETE.expect (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_ignoreData_GET.expect (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_ignoreData_HEAD.expect (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/send_unsent.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/setRequestHeader.expect (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/setRequestHeader.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/setRequestHeader.reply (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/setRequestHeader_args.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/setRequestHeader_caseInsensitive.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/setRequestHeader_illegalName.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/setRequestHeader_sent.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/setRequestHeader_unsent.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/staticStateValues.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/status.200.reply (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/status.400.reply (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/status.404.reply (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/status.expect (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/status.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/statusText.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/testdocument.html (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/text.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/text.xml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/utf16.html (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/utf16.qml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest => qml/qqmlxmlhttprequest}/data/utf16.xml (100%) rename tests/auto/{declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro => qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro} (65%) rename tests/auto/{declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp => qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp} (82%) rename tests/auto/{declarative/qdeclarativebinding => qml/qquickbinding}/data/deletedObject.qml (100%) rename tests/auto/{declarative/qdeclarativebinding => qml/qquickbinding}/data/restoreBinding.qml (100%) rename tests/auto/{declarative/qdeclarativebinding => qml/qquickbinding}/data/restoreBindingWithLoop.qml (100%) rename tests/auto/{declarative/qdeclarativebinding => qml/qquickbinding}/data/test-binding.qml (100%) rename tests/auto/{declarative/qdeclarativebinding => qml/qquickbinding}/data/test-binding2.qml (100%) create mode 100644 tests/auto/qml/qquickbinding/qquickbinding.pro rename tests/auto/{declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp => qml/qquickbinding/tst_qquickbinding.cpp} (78%) create mode 100644 tests/auto/qml/qquickchangeset/qquickchangeset.pro rename tests/auto/{declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp => qml/qquickchangeset/tst_qquickchangeset.cpp} (98%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/connection-targetchange.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/connection-unknownsignals-ignored.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/connection-unknownsignals-notarget.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/connection-unknownsignals-parent.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/connection-unknownsignals.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/error-object.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/error-property.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/error-property2.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/error-syntax.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/moduleapi-target.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/test-connection.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/test-connection2.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/test-connection3.qml (100%) rename tests/auto/{declarative/qdeclarativeconnection => qml/qquickconnection}/data/trimming.qml (100%) create mode 100644 tests/auto/qml/qquickconnection/qquickconnection.pro rename tests/auto/{declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp => qml/qquickconnection/tst_qquickconnection.cpp} (76%) rename tests/auto/{declarative/qdeclarativefolderlistmodel => qml/qquickfolderlistmodel}/data/basic.qml (100%) rename tests/auto/{declarative/qdeclarativefolderlistmodel => qml/qquickfolderlistmodel}/data/dummy.qml (100%) rename tests/auto/{declarative/qdeclarativefolderlistmodel => qml/qquickfolderlistmodel}/data/resetFiltering.qml (100%) rename tests/auto/{declarative/qdeclarativefolderlistmodel => qml/qquickfolderlistmodel}/data/resetfiltering/innerdir/test2.txt (100%) rename tests/auto/{declarative/qdeclarativefolderlistmodel => qml/qquickfolderlistmodel}/data/resetfiltering/test.txt (100%) create mode 100644 tests/auto/qml/qquickfolderlistmodel/qquickfolderlistmodel.pro rename tests/auto/{declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp => qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp} (84%) create mode 100644 tests/auto/qml/qquicklistcompositor/qquicklistcompositor.pro rename tests/auto/{declarative/qdeclarativelistcompositor/tst_qdeclarativelistcompositor.cpp => qml/qquicklistcompositor/tst_qquicklistcompositor.cpp} (97%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/enumerate.qml (100%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/model.qml (100%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/multipleroles.qml (100%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/script.js (100%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/setmodelcachelist.qml (100%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/signalhandlers.qml (100%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/workerremoveelement.js (100%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/workerremoveelement.qml (100%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/workerremovelist.js (100%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/workerremovelist.qml (100%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/workersync.js (100%) rename tests/auto/{declarative/qdeclarativelistmodel => qml/qquicklistmodel}/data/workersync.qml (100%) create mode 100644 tests/auto/qml/qquicklistmodel/qquicklistmodel.pro rename tests/auto/{declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp => qml/qquicklistmodel/tst_qquicklistmodel.cpp} (87%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/BaseWorker.qml (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/Global.js (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/externalObjectWorker.qml (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/script.js (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/script_error_onCall.js (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/script_error_onLoad.js (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/script_fixed_return.js (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/script_include.js (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/script_pragma.js (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/stressDispose.js (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/stressDispose.qml (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/worker.qml (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/worker_error_onCall.qml (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/worker_error_onLoad.qml (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/worker_include.qml (100%) rename tests/auto/{declarative/qdeclarativeworkerscript => qml/qquickworkerscript}/data/worker_pragma.qml (100%) create mode 100644 tests/auto/qml/qquickworkerscript/qquickworkerscript.pro rename tests/auto/{declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp => qml/qquickworkerscript/tst_qquickworkerscript.cpp} (69%) rename tests/auto/{declarative => qml}/runall.sh (96%) mode change 100755 => 100644 rename tests/auto/{declarative => qml}/v4/data/conditionalExpr.qml (100%) rename tests/auto/{declarative => qml}/v4/data/doubleBoolJump.qml (100%) rename tests/auto/{declarative => qml}/v4/data/fetchException.qml (100%) rename tests/auto/{declarative => qml}/v4/data/logicalOr.2.qml (100%) rename tests/auto/{declarative => qml}/v4/data/logicalOr.qml (100%) rename tests/auto/{declarative => qml}/v4/data/nestedLogicalOr.qml (100%) rename tests/auto/{declarative => qml}/v4/data/nestedObjectAccess.qml (100%) rename tests/auto/{declarative => qml}/v4/data/nullQObject.qml (100%) rename tests/auto/{declarative => qml}/v4/data/qrealToIntRounding.qml (100%) rename tests/auto/{declarative => qml}/v4/data/qtbug_21883.qml (100%) rename tests/auto/{declarative => qml}/v4/data/qtbug_22816.qml (100%) rename tests/auto/{declarative => qml}/v4/data/stringComparison.qml (100%) rename tests/auto/{declarative => qml}/v4/data/subscriptionsInConditionalExpressions.qml (100%) rename tests/auto/{declarative => qml}/v4/data/unaryMinus.qml (100%) rename tests/auto/{declarative => qml}/v4/data/unaryPlus.qml (100%) rename tests/auto/{declarative => qml}/v4/data/unnecessaryReeval.qml (100%) rename tests/auto/{declarative => qml}/v4/testtypes.cpp (97%) rename tests/auto/{declarative => qml}/v4/testtypes.h (100%) rename tests/auto/{declarative => qml}/v4/tst_v4.cpp (87%) rename tests/auto/{declarative => qml}/v4/v4.pro (70%) rename tests/auto/qmltest/{qdeclarativebinding => qqmlbinding}/tst_binding.qml (100%) rename tests/auto/qmltest/{qdeclarativebinding => qqmlbinding}/tst_binding2.qml (100%) delete mode 100644 tests/auto/qtquick2/qdeclarativeanimationcontroller/qdeclarativeanimationcontroller.pro delete mode 100644 tests/auto/qtquick2/qdeclarativeapplication/qdeclarativeapplication.pro delete mode 100644 tests/auto/qtquick2/qdeclarativebehaviors/qdeclarativebehaviors.pro delete mode 100644 tests/auto/qtquick2/qdeclarativepath/qdeclarativepath.pro delete mode 100644 tests/auto/qtquick2/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro delete mode 100644 tests/auto/qtquick2/qdeclarativespringanimation/qdeclarativespringanimation.pro delete mode 100644 tests/auto/qtquick2/qdeclarativestates/qdeclarativestates.pro delete mode 100644 tests/auto/qtquick2/qdeclarativestyledtext/qdeclarativestyledtext.pro delete mode 100644 tests/auto/qtquick2/qdeclarativesystempalette/qdeclarativesystempalette.pro delete mode 100644 tests/auto/qtquick2/qdeclarativetimer/qdeclarativetimer.pro delete mode 100644 tests/auto/qtquick2/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro rename tests/auto/{qtquick2 => quick}/examples/data/dummytest.qml (100%) rename tests/auto/{qtquick2 => quick}/examples/data/webbrowser/webbrowser.qml (100%) rename tests/auto/{qtquick2 => quick}/examples/examples.pro (62%) rename tests/auto/{qtquick2 => quick}/examples/tst_examples.cpp (82%) rename tests/auto/{qtquick2 => quick}/geometry/geometry.pro (60%) rename tests/auto/{qtquick2 => quick}/geometry/tst_geometry.cpp (100%) rename tests/auto/{qtquick2 => quick}/nodes/nodes.pro (58%) rename tests/auto/{qtquick2 => quick}/nodes/tst_nodestest.cpp (100%) rename tests/auto/{qtquick2 => quick}/qquickaccessible/data/checkbuttons.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickaccessible/data/hittest.qml (98%) rename tests/auto/{qtquick2 => quick}/qquickaccessible/data/pushbutton.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickaccessible/data/statictext.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickaccessible/data/widgets/TextRect.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickaccessible/qquickaccessible.pro (89%) rename tests/auto/{qtquick2 => quick}/qquickaccessible/tst_qquickaccessible.cpp (95%) rename tests/auto/{qtquick2 => quick}/qquickanchors/data/anchors.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanchors/data/centerin.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanchors/data/centerinRotation.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanchors/data/crash1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanchors/data/fill.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanchors/data/hvCenter.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanchors/data/loop1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanchors/data/loop2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanchors/data/margins.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanchors/qquickanchors.pro (76%) rename tests/auto/{qtquick2 => quick}/qquickanchors/tst_qquickanchors.cpp (99%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/colors.gif (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/colors.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/hearts.gif (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/hearts.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/qmldir (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/qtbug-16520.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/stickman.gif (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/stickman.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/stickmanerror1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/stickmanpause.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/stickmanscaled.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/data/stickmanstopped.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/qquickanimatedimage.pro (80%) rename tests/auto/{qtquick2 => quick}/qquickanimatedimage/tst_qquickanimatedimage.cpp (88%) rename tests/auto/{qtquick2/qdeclarativeanimationcontroller => quick/qquickanimationcontroller}/data/tst_numberanimation.qml (100%) create mode 100644 tests/auto/quick/qquickanimationcontroller/qquickanimationcontroller.pro rename tests/auto/{qtquick2/qdeclarativeanimationcontroller/tst_qdeclarativeanimationcontroller.cpp => quick/qquickanimationcontroller/tst_qquickanimationcontroller.cpp} (97%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/Double.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/attached.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/badproperty1.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/badproperty2.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/badtype1.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/badtype2.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/badtype3.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/badtype4.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/disabledTransition.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/dontAutoStart.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/dontStart.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/dontStart2.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/dotproperty.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/doubleRegistrationBug.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/looping.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/mixedtype1.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/mixedtype2.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/nonTransitionBug.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/pathAnimation.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/pathAnimation2.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/pathAnimationNoStart.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/pathInterpolator.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/pathInterpolatorBack.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/pathInterpolatorBack2.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/pathTransition.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/pauseBindingBug.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/pauseBug.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/properties.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/properties2.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/properties3.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/properties4.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/properties5.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/propertiesTransition.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/propertiesTransition2.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/propertiesTransition3.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/propertiesTransition4.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/propertiesTransition5.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/propertiesTransition6.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/propertiesTransition7.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/reanchor.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/registrationBug.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/reparent.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/rotation.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/runningTrueBug.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/transitionAssignmentBug.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/valuesource.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations => quick/qquickanimations}/data/valuesource2.qml (100%) rename tests/auto/{qtquick2/qdeclarativeanimations/qdeclarativeanimations.pro => quick/qquickanimations/qquickanimations.pro} (66%) rename tests/auto/{qtquick2/qdeclarativeanimations/tst_qdeclarativeanimations.cpp => quick/qquickanimations/tst_qquickanimations.cpp} (77%) create mode 100644 tests/auto/quick/qquickapplication/qquickapplication.pro rename tests/auto/{qtquick2/qdeclarativeapplication/tst_qdeclarativeapplication.cpp => quick/qquickapplication/tst_qquickapplication.cpp} (86%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/binding.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/color.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/cpptrigger.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/delayedRegistration.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/disabled.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/dontStart.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/empty.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/explicit.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/groupProperty.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/groupProperty2.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/groupedPropertyCrash.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/loop.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/nonSelecting2.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/parent.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/qtbug12295.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/reassignedAnimation.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/runningTrue.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/scripttrigger.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/simple.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/startOnCompleted.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/startup.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/startup2.qml (100%) rename tests/auto/{qtquick2/qdeclarativebehaviors => quick/qquickbehaviors}/data/valueType.qml (100%) create mode 100644 tests/auto/quick/qquickbehaviors/qquickbehaviors.pro rename tests/auto/{qtquick2/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp => quick/qquickbehaviors/tst_qquickbehaviors.cpp} (73%) rename tests/auto/{qtquick2 => quick}/qquickborderimage/data/colors-mirror.png (100%) rename tests/auto/{qtquick2 => quick}/qquickborderimage/data/colors-round-quotes.sci (100%) rename tests/auto/{qtquick2 => quick}/qquickborderimage/data/colors-round-remote.sci (100%) rename tests/auto/{qtquick2 => quick}/qquickborderimage/data/colors-round.sci (100%) rename tests/auto/{qtquick2 => quick}/qquickborderimage/data/colors.png (100%) rename tests/auto/{qtquick2 => quick}/qquickborderimage/data/heart200.png (100%) rename tests/auto/{qtquick2 => quick}/qquickborderimage/data/invalid.sci (100%) rename tests/auto/{qtquick2 => quick}/qquickborderimage/data/mirror.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickborderimage/qquickborderimage.pro (79%) rename tests/auto/{qtquick2 => quick}/qquickborderimage/tst_qquickborderimage.cpp (94%) rename tests/auto/{qtquick2 => quick}/qquickcanvas/data/AnimationsWhileHidden.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvas/data/Headless.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvas/data/colors.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvas/data/focus.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvas/data/window.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvas/qquickcanvas.pro (80%) rename tests/auto/{qtquick2 => quick}/qquickcanvas/tst_qquickcanvas.cpp (98%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/anim-gr.gif (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/anim-gr.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/anim-poster-gr.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/background.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/broken.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/ggrr-256x256.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/green-16x16.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/green-1x1.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/green-256x256.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/green-2x2.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/green.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/grgr-256x256.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/red-16x16.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/red.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/redtransparent.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/rgrg-256x256.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/rrgg-256x256.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/testhelper.js (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/transparent.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/transparent50.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_arc.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_arcto.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_canvas.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_composite.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_context.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_drawimage.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_fillStyle.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_fillrect.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_gradient.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_line.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_path.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_pattern.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_pixel.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_shadow.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_state.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_strokeStyle.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_text.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/tst_transform.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/yellow.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/data/yellow75.png (100%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/qquickcanvasitem.pro (92%) rename tests/auto/{qtquick2 => quick}/qquickcanvasitem/tst_qquickcanvasitem.cpp (100%) rename tests/auto/{qtquick2 => quick}/qquickdrag/qquickdrag.pro (60%) rename tests/auto/{qtquick2 => quick}/qquickdrag/tst_qquickdrag.cpp (98%) rename tests/auto/{qtquick2 => quick}/qquickdroparea/qquickdroparea.pro (62%) rename tests/auto/{qtquick2 => quick}/qquickdroparea/tst_qquickdroparea.cpp (98%) rename tests/auto/{qtquick2 => quick}/qquickflickable/data/disabled.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflickable/data/flickable01.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflickable/data/flickable02.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflickable/data/flickable03.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflickable/data/flickable04.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflickable/data/flickableqgraphicswidget.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflickable/data/margins.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflickable/data/nestedPressDelay.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflickable/data/resize.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflickable/data/wheel.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflickable/qquickflickable.pro (76%) rename tests/auto/{qtquick2 => quick}/qquickflickable/tst_qquickflickable.cpp (94%) rename tests/auto/{qtquick2 => quick}/qquickflipable/data/crash.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflipable/data/flipable-abort.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflipable/data/test-flipable.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickflipable/qquickflipable.pro (74%) rename tests/auto/{qtquick2 => quick}/qquickflipable/tst_qquickflipable.cpp (87%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/data/canvasFocus.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/data/chain.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/data/forceActiveFocus.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/data/forcefocus.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/data/qtBug13380.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/data/signalEmission.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/data/test.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/data/test2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/data/test3.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/data/test4.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/data/test5.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/qquickfocusscope.pro (77%) rename tests/auto/{qtquick2 => quick}/qquickfocusscope/tst_qquickfocusscope.cpp (99%) rename tests/auto/{qtquick2/qdeclarativefontloader => quick/qquickfontloader}/data/daniel.ttf (100%) rename tests/auto/{qtquick2/qdeclarativefontloader => quick/qquickfontloader}/data/dummy.ttf (100%) rename tests/auto/{qtquick2/qdeclarativefontloader => quick/qquickfontloader}/data/qtbug-20268.qml (100%) rename tests/auto/{qtquick2/qdeclarativefontloader => quick/qquickfontloader}/data/tarzeau_ocr_a.ttf (100%) rename tests/auto/{qtquick2/qdeclarativefontloader/qdeclarativefontloader.pro => quick/qquickfontloader/qquickfontloader.pro} (62%) rename tests/auto/{qtquick2/qdeclarativefontloader/tst_qdeclarativefontloader.cpp => quick/qquickfontloader/tst_qquickfontloader.cpp} (67%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/ComponentView.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/addTransitions.qml (98%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/asyncloader.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/attachedSignals.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/creationContext.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/displaygrid.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/footer.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/gridview-enforcerange.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/gridview-initCurrent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/gridview-noCurrent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/gridview1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/gridview2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/gridview3.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/gridview4.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/header.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/manual-highlight.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/margins.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/mirroring.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/moveTransitions.qml (98%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/multipleTransitions.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/populateTransitions.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/propertychangestest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/removeTransitions.qml (99%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/resizeview.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/setindex.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/snapOneRow.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/snapToRow.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/unaligned.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/data/unrequestedItems.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickgridview/qquickgridview.pro (71%) rename tests/auto/{qtquick2 => quick}/qquickgridview/tst_qquickgridview.cpp (98%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/aspectratio.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/big.jpeg (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/big256.png (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/colors.png (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/colors1.png (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/green.png (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/heart-win32.png (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/heart.png (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/heart.svg (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/heart200-win32.png (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/heart200.png (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/htiling.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/mirror.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/nullpixmap.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/pattern.png (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/qtbug_16389.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/qtbug_22125.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/rect.png (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/sourceSize.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/data/vtiling.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickimage/qquickimage.pro (81%) rename tests/auto/{qtquick2 => quick}/qquickimage/tst_qquickimage.cpp (95%) rename tests/auto/{qtquick2 => quick}/qquickitem/data/order.1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem/data/order.2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem/data/polishOnCompleted.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem/qquickitem.pro (72%) rename tests/auto/{qtquick2 => quick}/qquickitem/tst_qquickitem.cpp (99%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/childrenProperty.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/childrenRect.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/childrenRectBug.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/childrenRectBug2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/childrenRectBug3.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/implicitsize.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/keynavigationtest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/keynavigationtest_implicit.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/keysim.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/keyspriority.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/keystest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/layoutmirroring.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/mapCoordinates.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/parentLoop.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/propertychanges.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/qtbug_16871.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/resourcesProperty.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/transformCrash.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/data/visiblechildren.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitem2/qquickitem2.pro (70%) rename tests/auto/{qtquick2 => quick}/qquickitem2/tst_qquickitem.cpp (98%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/DisableLayer.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/Effect.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/Enabled.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/ItemEffect.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/Mipmap.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/RectangleEffect.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/SamplerNameChange.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/Smooth.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/SourceRect.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/TextureProvider.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/ToggleLayerAndEffect.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/Visible.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/ZOrder.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/data/ZOrderChange.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/qquickitemlayer.pro (88%) rename tests/auto/{qtquick2 => quick}/qquickitemlayer/tst_qquickitemlayer.cpp (99%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/ComponentView.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/Page.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/addTransitions.qml (98%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/asyncloader.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/attachedSignals.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/creationContext.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/displaylist.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/fillModelOnComponentCompleted.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/footer.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/header.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/headerfooter.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/itemlist.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/listview-enforcerange-nohighlight.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/listview-enforcerange.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/listview-initCurrent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/listview-noCurrent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/listview-sections-package.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/listview-sections.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/listview-sections_delegate.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/listviewtest-package.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/listviewtest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/manual-highlight.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/margins.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/margins2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/moveTransitions.qml (98%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/multipleTransitions.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/populateTransitions.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/propertychangestest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/qtbug-21742.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/qtbug14821.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/qtbug16037.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/removeTransitions.qml (99%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/resizeview.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/rightToLeft.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/sizelessthan1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/snapOneItem.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/snapToItem.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/strictlyenforcerange.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/data/unrequestedItems.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/incrementalmodel.cpp (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/incrementalmodel.h (100%) rename tests/auto/{qtquick2 => quick}/qquicklistview/qquicklistview.pro (71%) rename tests/auto/{qtquick2 => quick}/qquicklistview/tst_qquicklistview.cpp (98%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/ActiveComponent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/AnchoredLoader.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/BigComponent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/BlueRect.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/CreationContextLoader.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/GraphicsWidget250x250.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/GreenRect.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/InitialPropertyValuesComponent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/InvalidSourceComponent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/NoResize.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/NoResizeGraphicsWidget.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/QTBUG_16928.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/QTBUG_17114.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/Rect120x60.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/SetSourceComponent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/SizeGraphicsWidgetToLoader.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/SizeLoaderToGraphicsWidget.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/SizeToItem.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/SizeToLoader.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/VmeError.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/active.1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/active.2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/active.3.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/active.4.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/active.5.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/active.6.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/active.7.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/active.8.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/asynchronous.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/crash.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/creationContext.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/differentorigin.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/implicitSize.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.3.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.4.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.5.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.6.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.7.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.8.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.binding.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.error.1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.error.2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.error.3.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/initialPropertyValues.error.4.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/nonItem.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/parented.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/qmldir (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/sameorigin-load.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/sameorigin.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/sizebound.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/data/vmeErrors.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickloader/qquickloader.pro (81%) rename tests/auto/{qtquick2 => quick}/qquickloader/tst_qquickloader.cpp (91%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/clickThrough.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/clickThrough2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/clickandhold.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/clicktwice.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/doubleclick.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/dragging.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/dragproperties.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/dragreset.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/hoverPosition.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/hoverPropagation.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/hoverVisible.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/noclickandhold.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/pressedCanceled.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/pressedOrdering.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/preventstealing.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/rejectEvent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/updateMousePosOnClick.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/data/updateMousePosOnResize.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/qquickmousearea.pro (80%) rename tests/auto/{qtquick2 => quick}/qquickmousearea/tst_qquickmousearea.cpp (99%) rename tests/auto/{qtquick2 => quick}/qquickmultipointtoucharea/data/basic.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmultipointtoucharea/data/inFlickable.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmultipointtoucharea/data/nested.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmultipointtoucharea/data/nonOverlapping.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmultipointtoucharea/data/properties.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmultipointtoucharea/data/signalTest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickmultipointtoucharea/qquickmultipointtoucharea.pro (73%) rename tests/auto/{qtquick2 => quick}/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp (99%) rename tests/auto/{qtquick2/qdeclarativepath => quick/qquickpath}/data/arc.qml (100%) rename tests/auto/{qtquick2/qdeclarativepath => quick/qquickpath}/data/closedcurve.qml (100%) rename tests/auto/{qtquick2/qdeclarativepath => quick/qquickpath}/data/curve.qml (100%) rename tests/auto/{qtquick2/qdeclarativepath => quick/qquickpath}/data/svg.qml (100%) create mode 100644 tests/auto/quick/qquickpath/qquickpath.pro rename tests/auto/{qtquick2/qdeclarativepath/tst_qdeclarativepath.cpp => quick/qquickpath/tst_qquickpath.cpp} (70%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/ComponentView.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/asyncloader.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/closedPath.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/creationContext.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/datamodel.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/displaypath.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/dragpath.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/emptymodel.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/missingPercent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/openPath.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/pathUpdate.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/pathUpdateOnStartChanged.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/pathline.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/pathtest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/pathview0.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/pathview1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/pathview2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/pathview3.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/pathview_package.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/propertychanges.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/treemodel.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/undefinedpath.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/data/vdm.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpathview/qquickpathview.pro (74%) rename tests/auto/{qtquick2 => quick}/qquickpathview/tst_qquickpathview.cpp (92%) rename tests/auto/{qtquick2 => quick}/qquickpincharea/data/pinchproperties.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpincharea/qquickpincharea.pro (77%) rename tests/auto/{qtquick2 => quick}/qquickpincharea/tst_qquickpincharea.cpp (98%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/exists.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/exists1.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/exists2.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/http/exists.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/http/exists1.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/http/exists2.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/http/exists3.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/http/exists4.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/http/exists5.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/http/exists6.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/http/exists7.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/http/exists8.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache => quick/qquickpixmapcache}/data/massive.png (100%) rename tests/auto/{qtquick2/qdeclarativepixmapcache/qdeclarativepixmapcache.pro => quick/qquickpixmapcache/qquickpixmapcache.pro} (67%) rename tests/auto/{qtquick2/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp => quick/qquickpixmapcache/tst_qquickpixmapcache.cpp} (79%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/allInvisible.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/attachedproperties-column.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/attachedproperties-dynamic.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/attachedproperties-flow.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/attachedproperties-grid.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/attachedproperties-row.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/flow-testimplicitsize.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/flowtest-toptobottom.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/flowtest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/grid-animated.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/grid-row-column-spacing.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/grid-spacing.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/grid-toptobottom.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/gridtest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/gridzerocolumns.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/horizontal-animated-disabled.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/horizontal-animated.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/horizontal-spacing.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/horizontal.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/propertychangestest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/rectangleComponent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/repeatertest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/vertical-animated.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/vertical-spacing.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/data/vertical.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/qquickpositioners.pro (71%) rename tests/auto/{qtquick2 => quick}/qquickpositioners/tst_qquickpositioners.cpp (98%) rename tests/auto/{qtquick2 => quick}/qquickrepeater/data/asyncloader.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickrepeater/data/initparent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickrepeater/data/intmodel.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickrepeater/data/itemlist.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickrepeater/data/modelChanged.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickrepeater/data/objlist.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickrepeater/data/properties.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickrepeater/data/repeater1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickrepeater/data/repeater2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickrepeater/qquickrepeater.pro (78%) rename tests/auto/{qtquick2 => quick}/qquickrepeater/tst_qquickrepeater.cpp (94%) rename tests/auto/{qtquick2 => quick}/qquickscreen/data/screen.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickscreen/qquickscreen.pro (68%) rename tests/auto/{qtquick2 => quick}/qquickscreen/tst_qquickscreen.cpp (97%) rename tests/auto/{qtquick2 => quick}/qquickshadereffect/qquickshadereffect.pro (63%) rename tests/auto/{qtquick2 => quick}/qquickshadereffect/tst_qquickshadereffect.cpp (100%) rename tests/auto/{qtquick2/qdeclarativesmoothedanimation => quick/qquicksmoothedanimation}/data/deleteOnUpdate.qml (100%) rename tests/auto/{qtquick2/qdeclarativesmoothedanimation => quick/qquicksmoothedanimation}/data/simpleanimation.qml (100%) rename tests/auto/{qtquick2/qdeclarativesmoothedanimation => quick/qquicksmoothedanimation}/data/smoothedanimation1.qml (100%) rename tests/auto/{qtquick2/qdeclarativesmoothedanimation => quick/qquicksmoothedanimation}/data/smoothedanimation2.qml (100%) rename tests/auto/{qtquick2/qdeclarativesmoothedanimation => quick/qquicksmoothedanimation}/data/smoothedanimation3.qml (100%) rename tests/auto/{qtquick2/qdeclarativesmoothedanimation => quick/qquicksmoothedanimation}/data/smoothedanimationBehavior.qml (100%) rename tests/auto/{qtquick2/qdeclarativesmoothedanimation => quick/qquicksmoothedanimation}/data/smoothedanimationValueSource.qml (100%) create mode 100644 tests/auto/quick/qquicksmoothedanimation/qquicksmoothedanimation.pro rename tests/auto/{qtquick2/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp => quick/qquicksmoothedanimation/tst_qquicksmoothedanimation.cpp} (63%) rename tests/auto/{qtquick2/qdeclarativespringanimation => quick/qquickspringanimation}/data/springanimation1.qml (100%) rename tests/auto/{qtquick2/qdeclarativespringanimation => quick/qquickspringanimation}/data/springanimation2.qml (100%) rename tests/auto/{qtquick2/qdeclarativespringanimation => quick/qquickspringanimation}/data/springanimation3.qml (100%) rename tests/auto/{declarative/qdeclarativecontext/qdeclarativecontext.pro => quick/qquickspringanimation/qquickspringanimation.pro} (54%) rename tests/auto/{qtquick2/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp => quick/qquickspringanimation/tst_qquickspringanimation.cpp} (70%) rename tests/auto/{qtquick2 => quick}/qquickspriteimage/data/advance.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickspriteimage/data/basic.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickspriteimage/data/squarefacesprite.png (100%) rename tests/auto/{qtquick2 => quick}/qquickspriteimage/qquickspriteimage.pro (75%) rename tests/auto/{qtquick2 => quick}/qquickspriteimage/tst_qquickspriteimage.cpp (98%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/ExtendedRectangle.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/Implementation/MyType.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/Implementation/images/qt-logo.png (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/QTBUG-14830.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/anchorChanges1.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/anchorChanges2.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/anchorChanges3.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/anchorChanges4.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/anchorChanges5.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/anchorChangesCrash.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/anchorRewindBug.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/anchorRewindBug2.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/attachedPropertyChanges.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/autoStateAtStartupRestoreBug.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/avoidFastForward.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/basicBinding.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/basicBinding2.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/basicBinding3.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/basicBinding4.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/basicChanges.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/basicChanges2.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/basicChanges3.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/basicChanges4.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/basicExtension.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/deleting.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/deletingState.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/editProperties.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/explicit.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/extendsBug.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/fakeExtension.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/illegalObj.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/illegalTempState.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/image.png (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/legalTempState.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/nonExistantProp.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/parentChange1.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/parentChange2.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/parentChange3.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/parentChange4.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/parentChange5.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/parentChange6.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/propertyErrors.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/reset.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/restoreEntryValues.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/returnToBase.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/revertListBug.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/script.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/signalOverride.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/signalOverride2.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/signalOverrideCrash.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/signalOverrideCrash2.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/signalOverrideCrash3.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/unnamedWhen.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/urlResolution.qml (100%) rename tests/auto/{qtquick2/qdeclarativestates => quick/qquickstates}/data/whenOrdering.qml (100%) rename tests/auto/{declarative/qdeclarativebinding/qdeclarativebinding.pro => quick/qquickstates/qquickstates.pro} (55%) rename tests/auto/{qtquick2/qdeclarativestates/tst_qdeclarativestates.cpp => quick/qquickstates/tst_qquickstates.cpp} (81%) create mode 100644 tests/auto/quick/qquickstyledtext/qquickstyledtext.pro rename tests/auto/{qtquick2/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp => quick/qquickstyledtext/tst_qquickstyledtext.cpp} (95%) create mode 100644 tests/auto/quick/qquicksystempalette/qquicksystempalette.pro rename tests/auto/{qtquick2/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp => quick/qquicksystempalette/tst_qquicksystempalette.cpp} (80%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/alignments.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/alignments_cb.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/alignments_cc.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/alignments_ct.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/alignments_lb.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/alignments_lc.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/alignments_lt.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/alignments_rb.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/alignments_rc.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/alignments_rt.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/embeddedImagesLocal.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/embeddedImagesLocalError.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/embeddedImagesLocalRelative.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/embeddedImagesRemote.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/embeddedImagesRemoteError.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/embeddedImagesRemoteRelative.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/fontSizeMode.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/horizontalAlignment_RightToLeft.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/http/exists.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/images/face-sad.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/images/heart200.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/images/starfish_2.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/imgTagsElide.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/imgTagsUpdates.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/lineCount.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/lineHeight.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/lineLayout.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/multilengthStrings.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/multilengthStringsWrapped.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/multilineelide.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/qtbug_14734.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/data/rotated.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktext/qquicktext.pro (74%) rename tests/auto/{qtquick2 => quick}/qquicktext/tst_qquicktext.cpp (95%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/Cursor.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/CursorRect.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/alignments.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/alignments_cb.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/alignments_cc.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/alignments_ct.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/alignments_lb.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/alignments_lc.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/alignments_lt.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/alignments_rb.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/alignments_rc.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/alignments_rt.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/cursorTest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/cursorTestExternal.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/cursorTestInline.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/cursorVisible.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/embeddedImagesLocal.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/embeddedImagesLocalError.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/embeddedImagesLocalRelative.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/embeddedImagesRemote.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/embeddedImagesRemoteError.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/embeddedImagesRemoteRelative.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/geometrySignals.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/horizontalAlignment_RightToLeft.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/http/ErrItem.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/http/NormItem.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/http/cursorHttpTest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/http/cursorHttpTestFail1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/http/cursorHttpTestFail2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/http/cursorHttpTestPass.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/http/exists.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/http/qmldir (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/httpfail/FailItem.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/httpslow/WaitItem.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/inputContext.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/inputMethodEvent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/inputmethodhints.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/linkActivated.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/mouseselection_default.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/mouseselection_false.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/mouseselection_false_words.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/mouseselection_true.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/mouseselection_true_words.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/mouseselectionmode_characters.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/mouseselectionmode_default.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/mouseselectionmode_words.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/navigation.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/openInputPanel.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/persistentSelection.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/positionAt.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/qtbug-22058.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/data/readOnly.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/qquicktextedit.pro (71%) rename tests/auto/{qtquick2 => quick}/qquicktextedit/tst_qquicktextedit.cpp (97%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/Cursor.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/cursorTest.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/cursorTestExternal.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/cursorTestInline.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/cursorVisible.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/echoMode.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/geometrySignals.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/halign_center.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/halign_left.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/halign_right.png (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/horizontalAlignment.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/horizontalAlignment_RightToLeft.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/inputContext.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/inputMethodEvent.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/inputmethods.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/masks.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/maxLength.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/mouseselection_true.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/mouseselectionmode_characters.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/mouseselectionmode_default.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/mouseselectionmode_words.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/navigation.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/negativeDimensions.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/openInputPanel.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/persistentSelection.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/positionAt.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/preeditAutoScroll.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/qtbug-19956double.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/qtbug-19956int.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/qtbug-19956regexp.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/readOnly.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/data/validators.qml (100%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/qquicktextinput.pro (69%) rename tests/auto/{qtquick2 => quick}/qquicktextinput/tst_qquicktextinput.cpp (98%) create mode 100644 tests/auto/quick/qquicktimer/qquicktimer.pro rename tests/auto/{qtquick2/qdeclarativetimer/tst_qdeclarativetimer.cpp => quick/qquicktimer/tst_qquicktimer.cpp} (79%) rename tests/auto/{qtquick2 => quick}/qquickview/data/error1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickview/data/resizemodeitem.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickview/qquickview.pro (74%) rename tests/auto/{qtquick2 => quick}/qquickview/tst_qquickview.cpp (97%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/create.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/datalist-package.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/datalist.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/groups-invalid.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/groups-package.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/groups.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/itemsDestroyed_listView.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/itemsDestroyed_package.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/itemsDestroyed_pathView.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/itemsDestroyed_repeater.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/listmodelproperties-package.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/listmodelproperties.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/modelproperties.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/modelproperties2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/multipleroleproperties-package.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/multipleroleproperties.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/objectlist.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/objectlistproperties-package.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/objectlistproperties.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/onChanged.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/packageView.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/singlerole1.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/singlerole2.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/singleroleproperties-package.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/singleroleproperties.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/stringlistproperties-package.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/stringlistproperties.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/data/visualdatamodel.qml (100%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/qquickvisualdatamodel.pro (75%) rename tests/auto/{qtquick2 => quick}/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp (98%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/empty.xml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/get.qml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/model.qml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/model.xml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/model2.xml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/propertychanges.qml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/recipes.qml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/recipes.xml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/roleCrash.qml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/roleErrors.qml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/roleKeys.qml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/testtypes.qml (100%) rename tests/auto/{qtquick2/qdeclarativexmllistmodel => quick/qquickxmllistmodel}/data/unique.qml (100%) create mode 100644 tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro rename tests/auto/{qtquick2/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp => quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp} (78%) rename tests/auto/{qtquick2/qtquick2.pro => quick/quick.pro} (66%) rename tests/auto/{qtquick2 => quick}/rendernode/data/MessUpState.qml (100%) rename tests/auto/{qtquick2 => quick}/rendernode/data/RenderOrder.qml (100%) rename tests/auto/{qtquick2 => quick}/rendernode/rendernode.pro (78%) rename tests/auto/{qtquick2 => quick}/rendernode/tst_rendernode.cpp (99%) rename tests/auto/{qtquick2 => quick}/shared/util.pri (66%) rename tests/auto/{qtquick2 => quick}/shared/viewtestutil.cpp (98%) rename tests/auto/{qtquick2 => quick}/shared/viewtestutil.h (98%) rename tests/auto/{qtquick2 => quick}/shared/visualtestutil.cpp (100%) rename tests/auto/{qtquick2 => quick}/shared/visualtestutil.h (96%) delete mode 100644 tests/benchmarks/declarative/qdeclarativedebugtrace/qdeclarativedebugtrace.pro rename tests/benchmarks/{declarative => qml}/animation/animation.pro (55%) rename tests/benchmarks/{declarative => qml}/animation/data/animation.qml (100%) rename tests/benchmarks/{declarative => qml}/animation/tst_animation.cpp (86%) rename tests/benchmarks/{declarative => qml}/binding/binding.pro (89%) rename tests/benchmarks/{declarative => qml}/binding/data/creation.txt (100%) rename tests/benchmarks/{declarative => qml}/binding/data/idproperty.txt (100%) rename tests/benchmarks/{declarative => qml}/binding/data/localproperty.txt (100%) rename tests/benchmarks/{declarative => qml}/binding/data/objectproperty.txt (100%) rename tests/benchmarks/{declarative => qml}/binding/testtypes.cpp (100%) rename tests/benchmarks/{declarative => qml}/binding/testtypes.h (92%) rename tests/benchmarks/{declarative => qml}/binding/tst_binding.cpp (96%) rename tests/benchmarks/{declarative => qml}/compilation/compilation.pro (75%) rename tests/benchmarks/{declarative => qml}/compilation/data/BoomBlock.qml (97%) rename tests/benchmarks/{declarative => qml}/compilation/tst_compilation.cpp (83%) rename tests/benchmarks/{declarative => qml}/creation/creation.pro (63%) rename tests/benchmarks/{declarative => qml}/creation/data/item.qml (96%) rename tests/benchmarks/{declarative => qml}/creation/data/qobject.qml (96%) rename tests/benchmarks/{declarative => qml}/creation/tst_creation.cpp (77%) rename tests/benchmarks/{declarative => qml}/holistic/data/dynamicTargets/DynamicFour.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/dynamicTargets/DynamicOne.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/dynamicTargets/DynamicThree.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/dynamicTargets/DynamicTwo.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/Mlbsi.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/Mldsi.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/Mlsi.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/ModuleBm.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/Msbsi.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/Msdsi.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/Mssi.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/PragmaBm.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/PragmaModuleBm.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/Slsi.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/Sssi.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi1.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi10.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi11.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi12.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi13.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi14.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi15.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi2.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi3.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi4.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi5.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi6.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi7.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi8.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlbsi9.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi1.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi10.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi11.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi12.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi13.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi14.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi15.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi2.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi3.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi4.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi5.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi6.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi7.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi8.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mldsi9.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mlsi.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/moduleBm.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi1.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi10.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi11.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi12.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi13.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi14.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi15.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi2.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi3.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi4.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi5.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi6.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi7.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi8.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msbsi9.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi1.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi10.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi11.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi12.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi13.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi14.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi15.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi2.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi3.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi4.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi5.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi6.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi7.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi8.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/msdsi9.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/mssi.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/pragmaBmOne.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/pragmaBmTwo.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/pragmaLib.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/pragmaModuleBm.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/slsi.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsImports/sssi.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsTargets/JsOne.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/jsTargets/JsTwo.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/largeTargets/gridview-example.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/largeTargets/layoutdirection.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/largeTargets/mousearea-example.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/resolutionTargets/ResolveOne.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/CppToJs.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/CppToQml.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/JsToCppEight.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/JsToCppEleven.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/JsToCppFive.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/JsToCppFour.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/JsToCppNine.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/JsToCppOne.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/JsToCppSeven.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/JsToCppSix.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/JsToCppTen.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/JsToCppThree.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/JsToCppTwo.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/ScarceOne.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/ScarceTwo.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/scopeSwitching/cppToJs.js (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/smallTargets/SmallFour.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/smallTargets/SmallOne.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/smallTargets/SmallThree.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/data/smallTargets/SmallTwo.qml (100%) rename tests/benchmarks/{declarative => qml}/holistic/holistic.pro (86%) rename tests/benchmarks/{declarative => qml}/holistic/testtypes.cpp (92%) rename tests/benchmarks/{declarative => qml}/holistic/testtypes.h (96%) rename tests/benchmarks/{declarative => qml}/holistic/tst_holistic.cpp (96%) rename tests/benchmarks/{declarative => qml}/javascript/data/NestedIdObject.qml (100%) rename tests/benchmarks/{declarative => qml}/javascript/data/intQObjectProperty.qml (100%) rename tests/benchmarks/{declarative => qml}/javascript/data/localId.qml (100%) rename tests/benchmarks/{declarative => qml}/javascript/data/nestedId.qml (100%) rename tests/benchmarks/{declarative => qml}/javascript/data/stringQObjectProperty.qml (100%) rename tests/benchmarks/{declarative => qml}/javascript/javascript.pro (90%) rename tests/benchmarks/{declarative => qml}/javascript/testtypes.cpp (97%) rename tests/benchmarks/{declarative => qml}/javascript/testtypes.h (100%) rename tests/benchmarks/{declarative => qml}/javascript/tst_javascript.cpp (95%) rename tests/benchmarks/{declarative => qml}/js/js.pro (100%) rename tests/benchmarks/{declarative => qml}/js/qjsengine/qjsengine.pro (78%) rename tests/benchmarks/{declarative => qml}/js/qjsengine/tst_qjsengine.cpp (99%) rename tests/benchmarks/{declarative => qml}/js/qjsvalue/qjsvalue.pro (77%) rename tests/benchmarks/{declarative => qml}/js/qjsvalue/tst_qjsvalue.cpp (99%) rename tests/benchmarks/{declarative => qml}/js/qjsvalueiterator/qjsvalueiterator.pro (78%) rename tests/benchmarks/{declarative => qml}/js/qjsvalueiterator/tst_qjsvalueiterator.cpp (98%) rename tests/benchmarks/{declarative => qml}/painting/data/63x63.png (100%) rename tests/benchmarks/{declarative => qml}/painting/data/63x63_opaque.png (100%) rename tests/benchmarks/{declarative => qml}/painting/data/64x64.png (100%) rename tests/benchmarks/{declarative => qml}/painting/data/64x64_opaque.png (100%) rename tests/benchmarks/{declarative => qml}/painting/paintbenchmark.cpp (100%) rename tests/benchmarks/{declarative => qml}/painting/painting.pro (100%) rename tests/benchmarks/{declarative => qml}/pointers/pointers.pro (81%) rename tests/benchmarks/{declarative => qml}/pointers/tst_pointers.cpp (96%) rename tests/benchmarks/{declarative/declarative.pro => qml/qml.pro} (73%) rename tests/benchmarks/{declarative => qml}/qmltime/example.qml (96%) rename tests/benchmarks/{declarative => qml}/qmltime/qmltime.cpp (91%) rename tests/benchmarks/{declarative => qml}/qmltime/qmltime.pro (75%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/anchors/empty.qml (97%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/anchors/fill.qml (97%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/anchors/null.qml (96%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/animation/large.qml (97%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/animation/largeNoProps.qml (97%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/item_creation/children.qml (97%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/item_creation/data.qml (97%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/item_creation/no_creation.qml (96%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/item_creation/resources.qml (97%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/loader/Loaded.qml (96%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/loader/component_loader.qml (96%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/loader/empty_loader.qml (96%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/loader/no_loader.qml (96%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/loader/source_loader.qml (96%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/positioner_creation/no_positioner.qml (97%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/positioner_creation/null_positioner.qml (97%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/positioner_creation/positioner.qml (97%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/vmemetaobject/null.qml (96%) rename tests/benchmarks/{declarative => qml}/qmltime/tests/vmemetaobject/property.qml (96%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/myqmlobject.qml (96%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/myqmlobject_binding.qml (96%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/object.qml (96%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/object_id.qml (96%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/samegame/BoomBlock.qml (98%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/samegame/pics/blueStone.png (100%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/samegame/pics/greenStone.png (100%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/samegame/pics/redStone.png (100%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/samegame/pics/yellowStone.png (100%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/synthesized_properties.2.qml (96%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/data/synthesized_properties.qml (96%) rename tests/benchmarks/{declarative/qdeclarativecomponent/qdeclarativecomponent.pro => qml/qqmlcomponent/qqmlcomponent.pro} (58%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/testtypes.cpp (100%) rename tests/benchmarks/{declarative/qdeclarativecomponent => qml/qqmlcomponent}/testtypes.h (92%) rename tests/benchmarks/{declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp => qml/qqmlcomponent/tst_qqmlcomponent.cpp} (94%) create mode 100644 tests/benchmarks/qml/qqmldebugtrace/qqmldebugtrace.pro rename tests/benchmarks/{declarative/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp => qml/qqmldebugtrace/tst_qqmldebugtrace.cpp} (87%) rename tests/benchmarks/{declarative/qdeclarativeimage => qml/qqmlimage}/image.png (100%) rename tests/benchmarks/{declarative/qdeclarativeimage/qdeclarativeimage.pro => qml/qqmlimage/qqmlimage.pro} (54%) rename tests/benchmarks/{declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp => qml/qqmlimage/tst_qqmlimage.cpp} (79%) rename tests/benchmarks/{declarative/qdeclarativemetaproperty => qml/qqmlmetaproperty}/data/object.qml (96%) rename tests/benchmarks/{declarative/qdeclarativemetaproperty => qml/qqmlmetaproperty}/data/synthesized_object.qml (96%) rename tests/benchmarks/{declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro => qml/qqmlmetaproperty/qqmlmetaproperty.pro} (56%) rename tests/benchmarks/{declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp => qml/qqmlmetaproperty/tst_qqmlmetaproperty.cpp} (91%) rename tests/benchmarks/{declarative => qml}/script/data/CustomObject.qml (96%) rename tests/benchmarks/{declarative => qml}/script/data/block.qml (97%) rename tests/benchmarks/{declarative => qml}/script/data/enums.qml (100%) rename tests/benchmarks/{declarative => qml}/script/data/global.js (100%) rename tests/benchmarks/{declarative => qml}/script/data/global_prop.qml (100%) rename tests/benchmarks/{declarative => qml}/script/data/namespacedEnums.qml (100%) rename tests/benchmarks/{declarative => qml}/script/data/script.js (100%) rename tests/benchmarks/{declarative => qml}/script/data/script2.js (100%) rename tests/benchmarks/{declarative => qml}/script/data/scriptCall.qml (100%) rename tests/benchmarks/{declarative => qml}/script/data/signal_args.qml (96%) rename tests/benchmarks/{declarative => qml}/script/data/signal_qml.qml (96%) rename tests/benchmarks/{declarative => qml}/script/data/signal_unconnected.qml (96%) rename tests/benchmarks/{declarative => qml}/script/data/signal_unusedArgs.qml (96%) rename tests/benchmarks/{declarative => qml}/script/data/slot_complex.qml (96%) rename tests/benchmarks/{declarative => qml}/script/data/slot_complex_js.js (100%) rename tests/benchmarks/{declarative => qml}/script/data/slot_complex_js.qml (96%) rename tests/benchmarks/{declarative => qml}/script/data/slot_simple.qml (96%) rename tests/benchmarks/{declarative => qml}/script/data/slot_simple_js.js (100%) rename tests/benchmarks/{declarative => qml}/script/data/slot_simple_js.qml (96%) rename tests/benchmarks/{declarative => qml}/script/script.pro (74%) rename tests/benchmarks/{declarative => qml}/script/tst_script.cpp (85%) rename tests/benchmarks/{declarative => qml}/typeimports/data/QmlTestType1.qml (96%) rename tests/benchmarks/{declarative => qml}/typeimports/data/QmlTestType2.qml (96%) rename tests/benchmarks/{declarative => qml}/typeimports/data/QmlTestType3.qml (96%) rename tests/benchmarks/{declarative => qml}/typeimports/data/QmlTestType4.qml (96%) rename tests/benchmarks/{declarative => qml}/typeimports/data/cpp.qml (97%) rename tests/benchmarks/{declarative => qml}/typeimports/data/qml.qml (97%) rename tests/benchmarks/{declarative => qml}/typeimports/tst_typeimports.cpp (84%) rename tests/benchmarks/{declarative => qml}/typeimports/typeimports.pro (85%) diff --git a/bin/rename-qtdeclarative-symbols.sh b/bin/rename-qtdeclarative-symbols.sh new file mode 100755 index 0000000000..841850230f --- /dev/null +++ b/bin/rename-qtdeclarative-symbols.sh @@ -0,0 +1,639 @@ +#!/bin/sh +############################################################################# +## +## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +## Contact: http://www.qt-project.org/ +## +## This file is part of the QtQml module of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## GNU Lesser General Public License Usage +## 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. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU General +## Public License version 3.0 as published by the Free Software Foundation +## and appearing in the file LICENSE.GPL included in the packaging of this +## file. Please review the following information to ensure the GNU General +## Public License version 3.0 requirements will be met: +## http://www.gnu.org/copyleft/gpl.html. +## +## Other Usage +## Alternatively, this file may be used in accordance with the terms and +## conditions contained in a signed written agreement between you and Nokia. +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +# Replaces deprecated QDeclarative symbol names with their replacements +# +# Changes instances in all regular files under the specified directory; +# use on a clean source tree! + +if [ "$#" -lt "1" ] +then + echo " Usage: $0 " + exit 1; +fi + +MODIFY_DIR="$1" + +QML_SYMBOLS="\ + QDeclarativeAbstractBinding + QDeclarativeAbstractBoundSignal + QDeclarativeAbstractExpression + QDeclarativeAccessible + QDeclarativeAccessors + QDeclarativeAccessorProperties + QDeclarativeAnimationTimer + QDeclarativeAssociationList + QDeclarativeAttachedPropertiesFunc + QDeclarativeBinding + QDeclarativeBindingPrivate + QDeclarativeBindingProfiler + QDeclarativeBoundSignal + QDeclarativeBoundSignalParameters + QDeclarativeBoundSignalProxy + QDeclarativeBuiltinFunctions + QDeclarativeCleanup + QDeclarativeColorValueType + QDeclarativeCompiledData + QDeclarativeCompiler + QDeclarativeCompilerTypes + QDeclarativeComponent + QDeclarativeComponentAttached + QDeclarativeComponentExtension + QDeclarativeComponentPrivate + QDeclarativeComponent_setQmlParent + QDeclarativeCompositeTypeData + QDeclarativeConnectionsParser + QDeclarativeContext + QDeclarativeContextData + QDeclarativeContextPrivate + QDeclarativeCustomParser + QDeclarativeCustomParserNode + QDeclarativeCustomParserNodePrivate + QDeclarativeCustomParserProperty + QDeclarativeCustomParserPropertyPrivate + QDeclarativeData + QDeclarativeDataBlob + QDeclarativeDataExtended + QDeclarativeDataLoader + QDeclarativeDataLoaderNetworkReplyProxy + QDeclarativeDataLoaderThread + QDeclarativeDateExtension + QDeclarativeDataTest + QDeclarativeDebug + QDeclarativeDebugClient + QDeclarativeDebugClientPrivate + QDeclarativeDebugConnection + QDeclarativeDebugConnectionPrivate + QDeclarativeDebugContextReference + QDeclarativeDebugData + QDeclarativeDebugEngineReference + QDeclarativeDebugEnginesQuery + QDeclarativeDebugExpressionQuery + QDeclarativeDebugFileReference + QDeclarativeDebugger + QDeclarativeDebuggingEnabler + QDeclarativeDebugHelper + QDeclarativeDebugObjectExpressionWatch + QDeclarativeDebugObjectQuery + QDeclarativeDebugObjectReference + QDeclarativeDebugPropertyReference + QDeclarativeDebugPropertyWatch + QDeclarativeDebugQuery + QDeclarativeDebugRootContextQuery + QDeclarativeDebugServer + QDeclarativeDebugServerConnection + QDeclarativeDebugServerPrivate + QDeclarativeDebugServerThread + QDeclarativeDebugService + QDeclarativeDebugServicePrivate + QDeclarativeDebugStatesDelegate + QDeclarativeDebugTrace + QDeclarativeDebugWatch + QDeclarativeDelayedError + QDeclarativeDirComponents + QDeclarativeDirParser + QDeclarativeDirScripts + QDeclarativeDOMNodeResource + QDeclarativeEasingValueType + QDeclarativeElement + QDeclarativeEngine + QDeclarativeEngineDebug + QDeclarativeEngineDebugClient + QDeclarativeEngineDebugService + QDeclarativeEngineDebugPrivate + QDeclarativeEnginePrivate + QDeclarativeError + QDeclarativeErrorPrivate + QDeclarativeExpression + QDeclarativeExpressionPrivate + QDeclarativeExtensionInterface + QDeclarativeExtensionPlugin + QDeclarativeFontValueType + QDeclarativeGraphics_DerivedObject + QDeclarativeGuard + QDeclarativeGuardedContextData + QDeclarativeGuardImpl + QDeclarativeImageProvider + QDeclarativeImageProviderPrivate + QDeclarativeImportDatabase + QDeclarativeImportedNamespace + QDeclarativeImports + QDeclarativeImportsPrivate + QDeclarativeIncubationController + QDeclarativeIncubator + QDeclarativeIncubatorController + QDeclarativeIncubatorPrivate + QDeclarativeIncubators + QDeclarativeInfo + QDeclarativeInfoPrivate + QDeclarativeInspector + QDeclarativeInspectorInterface + QDeclarativeInspectorService + QDeclarativeInstruction + QDeclarativeInstructionData + QDeclarativeInstructionMeta + QDeclarativeIntegerCache + QDeclarativeJavaScriptExpression + QDeclarativeJavaScriptExpressionGuard + QDeclarativeJS + QDeclarativeJSGrammar + QDeclarativeListProperty + QDeclarativeListReference + QDeclarativeListReferencePrivate + QDeclarativeLocale + QDeclarativeLocalStoragePlugin + QDeclarativeMatrix4x4ValueType + QDeclarativeMetaType + QDeclarativeMetaTypeData + QDeclarativeNetworkAccessManagerFactory + QDeclarativeNotifier + QDeclarativeNotifierEndpoint + QDeclarativeNullableValue + QDeclarativeNumberExtension + QDeclarativeObjectData + QDeclarativeObjectProperty + QDeclarativeObserverMode + QDeclarativeOpenMetaObject + QDeclarativeOpenMetaObjectPrivate + QDeclarativeOpenMetaObjectType + QDeclarativeOpenMetaObjectTypePrivate + QDeclarativeParser + QDeclarativeParserStatus + QDeclarativePointFValueType + QDeclarativePointValueType + QDeclarativePool + QDeclarativePrivate + QDeclarativeProfilerData + QDeclarativeProfilerService + QDeclarativeProperties + QDeclarativeProperty + QDeclarativePropertyCache + QDeclarativePropertyCacheMethodArguments + QDeclarativePropertyData + QDeclarativePropertyMap + QDeclarativePropertyMapMetaObject + QDeclarativePropertyMapPrivate + QDeclarativePropertyPrivate + QDeclarativePropertyRawData + QDeclarativePropertyValueInterceptor + QDeclarativePropertyValueSource + QDeclarativeProxyMetaObject + QDeclarativeQmldirData + QDeclarativeQtQuick1Module + QDeclarativeQtQuick2Module + QDeclarativeQtQuick2DebugStatesDelegate + QDeclarativeQuaternionValueType + QDeclarativeRectFValueType + QDeclarativeRectValueType + QDeclarativeRefCount + QDeclarativeRefPointer + QDeclarativeRegisterType + QDeclarativeRewrite + QDeclarativeScript + QDeclarativeScriptBlob + QDeclarativeScriptData + QDeclarativeScriptPrivate + QDeclarativeScriptString + QDeclarativeScriptStringPrivate + QDeclarativeSizeFValueType + QDeclarativeSizeValueType + QDeclarativeSqlDatabaseData + QDeclarativeStringConverters + QDeclarativeThread + QDeclarativeThreadPrivate + QDeclarativeTrace + QDeclarativeType + QDeclarativeTypeData + QDeclarativeTypeInfo + QDeclarativeTypeLoader + QDeclarativeTypeModule + QDeclarativeTypeModulePrivate + QDeclarativeTypeModuleVersion + QDeclarativeTypeNameCache + QDeclarativeTypeNotAvailable + QDeclarativeTypePrivate + QDeclarativeTypesExtensionInterface + QDeclarativeV8Function + QDeclarativeV8Handle + QDeclarativeValueType + QDeclarativeValueTypeProxyBinding + QDeclarativeValueTypeFactory + QDeclarativeVector2DValueType + QDeclarativeVector3DValueType + QDeclarativeVector4DValueType + QDeclarativeVME + QDeclarativeVMEGuard + QDeclarativeVMEMetaData + QDeclarativeVMEMetaObject + QDeclarativeVMEMetaObjectEndpoint + QDeclarativeVMEVariant + QDeclarativeVMETypes + QDeclarativeWatcher + QDeclarativeWatchProxy + QDeclarativeXMLHttpRequest + QDeclarativeXMLHttpRequestData + QDeclarative_isFileCaseCorrect + QDeclarative_setParent_noEvent + QQuickProperties + QQuickPropertyCacheMethodArguments + QQuickPropertyData +" + +QUICK_SYMBOLS="\ + QDeclarativeAbstractAnimation + QDeclarativeAbstractAnimationAction + QDeclarativeAbstractAnimationPrivate + QDeclarativeAction + QDeclarativeActionEvent + QDeclarativeAnchors + QDeclarativeAnimationController + QDeclarativeAnimationControllerPrivate + QDeclarativeAnimationGroup + QDeclarativeAnimationGroupPrivate + QDeclarativeAnimationPropertyUpdater + QDeclarativeApplication + QDeclarativeApplicationPrivate + QDeclarativeBehavior + QDeclarativeBehaviorPrivate + QDeclarativeBind + QDeclarativeBindPrivate + QDeclarativeBulkValueAnimator + QDeclarativeBulkValueUpdater + QDeclarativeCachedBezier + QDeclarativeChangeSet + QDeclarativeColorAnimation + QDeclarativeConnections + QDeclarativeConnectionsPrivate + QDeclarativeCurve + QDeclarativeDefaultTextureFactory + QDeclarativeFlick + QDeclarativeFocusPanel + QDeclarativeFolderListModel + QDeclarativeFolderListModelPrivate + QDeclarativeFontLoader + QDeclarativeFontLoaderPrivate + QDeclarativeFontObject + QDeclarativeGestureArea + QDeclarativeGestureAreaParser + QDeclarativeGestureAreaPrivate + QDeclarativeGraphics + QDeclarativeItem + QDeclarativeItemAccessor + QDeclarativeItemChangeListener + QDeclarativeItemKeyFilter + QDeclarativeItemPrivate + QDeclarativeListAccessor + QDeclarativeListCompositor + QDeclarativeListElement + QDeclarativeListModel + QDeclarativeListModelParser + QDeclarativeListModelWorkerAgent + QDeclarativeListView + QDeclarativeNumberAnimation + QDeclarativePackage + QDeclarativePackageAttached + QDeclarativePackagePrivate + QDeclarativeParallelAnimation + QDeclarativeParticle + QDeclarativeParticleMotion + QDeclarativeParticleMotionGravity + QDeclarativeParticleMotionLinear + QDeclarativeParticleMotionWander + QDeclarativeParticles + QDeclarativeParticlesPainter + QDeclarativeParticlesPrivate + QDeclarativePath + QDeclarativePathArc + QDeclarativePathAttribute + QDeclarativePathCatmullRomCurve + QDeclarativePathCubic + QDeclarativePathCurve + QDeclarativePathData + QDeclarativePathElement + QDeclarativePathInterpolator + QDeclarativePathLine + QDeclarativePathPercent + QDeclarativePathPrivate + QDeclarativePathQuad + QDeclarativePathSvg + QDeclarativePauseAnimation + QDeclarativePauseAnimationPrivate + QDeclarativePixmap + QDeclarativePixmapData + QDeclarativePixmapKey + QDeclarativePixmapNull + QDeclarativePixmapReader + QDeclarativePixmapReaderThreadObject + QDeclarativePixmapReply + QDeclarativePixmapStore + QDeclarativePropertyAction + QDeclarativePropertyActionPrivate + QDeclarativePropertyAnimation + QDeclarativePropertyAnimationPrivate + QDeclarativePropertyChanges + QDeclarativePropertyChangesParser + QDeclarativePropertyChangesPrivate + QDeclarativeReplaceSignalHandler + QDeclarativeRevertAction + QDeclarativeRotationAnimation + QDeclarativeRotationAnimationPrivate + QDeclarativeSequentialAnimation + QDeclarativeScriptAction + QDeclarativeScriptActionPrivate + QDeclarativeSetPropertyAnimationAction + QDeclarativeSimpleAction + QDeclarativeSmoothedAnimation + QDeclarativeSmoothedAnimationPrivate + QDeclarativeSpringAnimation + QDeclarativeSpringAnimationPrivate + QDeclarativeState + QDeclarativeStateActions + QDeclarativeStateChange + QDeclarativeStateChangeScript + QDeclarativeStateChangeScriptPrivate + QDeclarativeStateGroup + QDeclarativeStateGroupPrivate + QDeclarativeStateOperation + QDeclarativeStateOperationPrivate + QDeclarativeStatePrivate + QDeclarativeStyledText + QDeclarativeStyledTextImgTag + QDeclarativeStyledTextPrivate + QDeclarativeSystemPalette + QDeclarativeSystemPalettePrivate + QDeclarativeTextureFactory + QDeclarativeTimeLine + QDeclarativeTimeLineCallback + QDeclarativeTimeLineObject + QDeclarativeTimeLinePrivate + QDeclarativeTimeLineValue + QDeclarativeTimeLineValueProxy + QDeclarativeTimeLineValues + QDeclarativeTimer + QDeclarativeTimerPrivate + QDeclarativeTransition + QDeclarativeTransitionInstance + QDeclarativeTransitionManager + QDeclarativeTransitionManagerPrivate + QDeclarativeTransitionPrivate + QDeclarativeUtilModule + QDeclarativeVector3dAnimation + QDeclarativeView + QDeclarativeViewInspector + QDeclarativeViewInspectorPrivate + QDeclarativeViewPrivate + QDeclarativeWebView + QDeclarativeXmlListModel + QDeclarativeXmlListModelPrivate + QDeclarativeXmlListModelRole + QDeclarativeXmlListRange + QDeclarativeXmlQueryEngine + QDeclarativeXmlQueryResult + QDeclarativeXmlQueryThreadObject + QDeclarativeXmlRoleList + QDeclarativeSvgParser + QDeclarativeWorkerScript + QDeclarativeWorkerScriptEngine + QDeclarativeWorkerScriptEnginePrivate +" + +QML_INCLUDE_FILES="\ + qdeclarativeaccessible.h + qdeclarativeaccessors_p.h + qdeclarativebinding_p.h + qdeclarativebinding_p_p.h + qdeclarativeboundsignal_p.h + qdeclarativebuiltinfunctions_p.h + qdeclarativecleanup_p.h + qdeclarativecompiler_p.h + qdeclarativecomponentattached_p.h + qdeclarativecomponent.h + qdeclarativecomponent_p.h + qdeclarativecontext.h + qdeclarativecontext_p.h + qdeclarativecustomparser_p.h + qdeclarativecustomparser_p_p.h + qdeclarativedata_p.h + qdeclarativedebugclient_p.h + qdeclarativedebug.h + qdeclarativedebughelper_p.h + qdeclarativedebugserverconnection_p.h + qdeclarativedebugserver_p.h + qdeclarativedebugservice_p.h + qdeclarativedebugservice_p_p.h + qdeclarativedebugstatesdelegate_p.h + qdeclarativedebugtrace_p.h + qdeclarativedirparser_p.h + qdeclarativeenginedebug_p.h + qdeclarativeenginedebugservice_p.h + qdeclarativeengine.h + qdeclarativeengine_p.h + qdeclarativeerror.h + qdeclarativeexpression.h + qdeclarativeexpression_p.h + qdeclarativeextensioninterface.h + qdeclarativeextensionplugin.h + qdeclarativeglobal_p.h + qdeclarativeguard_p.h + qdeclarative.h + qdeclarativeimageprovider.h + qdeclarativeimport_p.h + qdeclarativeincubator.h + qdeclarativeincubator_p.h + qdeclarativeinfo.h + qdeclarativeinspectorinterface_p.h + qdeclarativeinspectorprotocol.h + qdeclarativeinspectorservice_p.h + qdeclarativeinstruction_p.h + qdeclarativeintegercache_p.h + qdeclarativejsastfwd_p.h + qdeclarativejsast_p.h + qdeclarativejsastvisitor_p.h + qdeclarativejsengine_p.h + qdeclarativejsglobal_p.h + qdeclarativejsgrammar_p.h + qdeclarativejskeywords_p.h + qdeclarativejslexer_p.h + qdeclarativejsmemorypool_p.h + qdeclarativejsparser_p.h + qdeclarativelist.h + qdeclarativelist_p.h + qdeclarativelocale_p.h + qdeclarativemetatype_p.h + qdeclarativenetworkaccessmanagerfactory.h + qdeclarativenotifier_p.h + qdeclarativenullablevalue_p_p.h + qdeclarativeopenmetaobject_p.h + qdeclarativeparserstatus.h + qdeclarativepool_p.h + qdeclarativeprivate.h + qdeclarativeprofilerservice_p.h + qdeclarativepropertycache_p.h + qdeclarativeproperty.h + qdeclarativepropertymap.h + qdeclarativeproperty_p.h + qdeclarativepropertyvalueinterceptor_p.h + qdeclarativepropertyvaluesource.h + qdeclarativeproxymetaobject_p.h + qdeclarativerefcount_p.h + qdeclarativerewrite_p.h + qdeclarativescript_p.h + qdeclarativescriptstring.h + qdeclarativescriptstring_p.h + qdeclarativesqldatabase_p.h + qdeclarativestringconverters_p.h + qdeclarativethread_p.h + qdeclarativetrace_p.h + qdeclarativetypeloader_p.h + qdeclarativetypenamecache_p.h + qdeclarativetypenotavailable_p.h + qdeclarativevaluetype_p.h + qdeclarativevmemetaobject_p.h + qdeclarativevme_p.h + qdeclarativewatcher_p.h + qdeclarativexmlhttprequest_p.h + qdeclarativexmllistmodel_p.h +" + +QUICK_INCLUDE_FILES="\ + qdeclarativeanimation_p.h + qdeclarativeanimation_p_p.h + qdeclarativeanimationcontroller_p.h + qdeclarativeapplication_p.h + qdeclarativebehavior_p.h + qdeclarativebind_p.h + qdeclarativechangeset_p.h + qdeclarativeconnections_p.h + qdeclarativefolderlistmodel.h + qdeclarativefontloader_p.h + qdeclarativelistaccessor_p.h + qdeclarativelistcompositor_p.h + qdeclarativelistmodel_p.h + qdeclarativelistmodel_p_p.h + qdeclarativelistmodelworkeragent_p.h + qdeclarativepackage_p.h + qdeclarativepathinterpolator_p.h + qdeclarativepath_p.h + qdeclarativepath_p_p.h + qdeclarativepixmapcache_p.h + qdeclarativepropertychanges_p.h + qdeclarativesmoothedanimation_p.h + qdeclarativesmoothedanimation_p_p.h + qdeclarativespringanimation_p.h + qdeclarativestategroup_p.h + qdeclarativestateoperations_p.h + qdeclarativestate_p.h + qdeclarativestate_p_p.h + qdeclarativestyledtext_p.h + qdeclarativesvgparser_p.h + qdeclarativesystempalette_p.h + qdeclarativetimeline_p_p.h + qdeclarativetimer_p.h + qdeclarativetransitionmanager_p_p.h + qdeclarativetransition_p.h + qdeclarativeutilmodule_p.h + qdeclarativeworkerscript_p.h +" + +replaceMatch() +{ + SYMBOL="$1" + REPLACEMENT="$2" + echo "Replacing $SYMBOL with $REPLACEMENT:" + + CONTAINERS=$(find "$MODIFY_DIR" ! -path ".git" -type f | xargs grep -l -I "$SYMBOL") + for CONTAINER in $CONTAINERS + do + echo " $CONTAINER" + TMP_FILE="$CONTAINER.tmp" + + sed 's|'"$SYMBOL"'|'"$REPLACEMENT"'|g' <"$CONTAINER" >"$TMP_FILE" + mv "$TMP_FILE" "$CONTAINER" + done + echo +} + +for QML_SYMBOL in $QML_SYMBOLS +do + QML_REPLACEMENT="QQml${QML_SYMBOL#QDeclarative}" + replaceMatch "\" "QtQml/$QML_REPLACEMENT" + replaceMatch "\<$QML_SYMBOL\>" "$QML_REPLACEMENT" +done + +for QUICK_SYMBOL in $QUICK_SYMBOLS +do + QUICK_REPLACEMENT="QQuick${QUICK_SYMBOL#QDeclarative}" + replaceMatch "\" "QtQuick/$QUICK_REPLACEMENT" + replaceMatch "\<$QUICK_SYMBOL\>" "$QUICK_REPLACEMENT" +done + +for QML_INCLUDE_FILE in $QML_INCLUDE_FILES +do + QML_INCLUDE_REPLACEMENT="qqml${QML_INCLUDE_FILE#qdeclarative}" + replaceMatch "\<$QML_INCLUDE_FILE\>" "$QML_INCLUDE_REPLACEMENT" +done + +for QUICK_INCLUDE_FILE in $QUICK_INCLUDE_FILES +do + QUICK_INCLUDE_REPLACEMENT="qquick${QUICK_INCLUDE_FILE#qdeclarative}" + replaceMatch "\<$QUICK_INCLUDE_FILE\>" "$QUICK_INCLUDE_REPLACEMENT" +done + +# Various one-off replacements +replaceMatch "\" "QtQml" +replaceMatch "\") +for CONTAINER in $CONTAINERS +do + echo " $CONTAINER" + TMP_FILE="$CONTAINER.tmp" + + sed 's|\|qml|g' <"$CONTAINER" >"$TMP_FILE" + mv "$TMP_FILE" "$CONTAINER" +done +echo + +echo "Replacements complete" +exit 0 diff --git a/doc/src/localstorage/localstorage.qdoc b/doc/src/localstorage/localstorage.qdoc index bee491f9b9..406de25339 100644 --- a/doc/src/localstorage/localstorage.qdoc +++ b/doc/src/localstorage/localstorage.qdoc @@ -43,7 +43,7 @@ provide the ability to access local storage in an SQL database. These databases are user-specific and QML-specific, but accessible to all QML applications. They are stored in the \c Databases subdirectory -of QDeclarativeEngine::offlineStoragePath(), currently as SQLite databases. +of QQmlEngine::offlineStoragePath(), currently as SQLite databases. Database connections are automatically closed during Javascript garbage collection. diff --git a/doc/src/qml/basictypes.qdoc b/doc/src/qml/basictypes.qdoc index 150383fdc2..0f66a96731 100644 --- a/doc/src/qml/basictypes.qdoc +++ b/doc/src/qml/basictypes.qdoc @@ -180,7 +180,7 @@ \div{float-right} \inlineimage declarative-colors.png \enddiv - \snippet doc/src/snippets/declarative/colors.qml colors + \snippet doc/src/snippets/qml/colors.qml colors Or with the \l{QML:Qt::rgba()}{Qt.rgba()}, \l{QML:Qt::hsla()}{Qt.hsla()}, \l{QML:Qt::darker()}{Qt.darker()}, \l{QML:Qt::lighter()}{Qt.lighter()} or \l{QML:Qt::tint()}{Qt.tint()} functions: diff --git a/doc/src/qml/c++models.qdoc b/doc/src/qml/c++models.qdoc index e2498134fe..943c79c184 100644 --- a/doc/src/qml/c++models.qdoc +++ b/doc/src/qml/c++models.qdoc @@ -57,7 +57,7 @@ models. \bold{Note:} There is no way for the view to know that the contents of a QStringList have changed. If the QStringList changes, it will be necessary to reset - the model by calling QDeclarativeContext::setContextProperty() again. + the model by calling QQmlContext::setContextProperty() again. \section1 QObjectList-based model @@ -92,7 +92,7 @@ models. Note: There is no way for the view to know that the contents of a QList have changed. If the QList changes, it will be necessary to reset - the model by calling QDeclarativeContext::setContextProperty() again. + the model by calling QQmlContext::setContextProperty() again. \section1 QAbstractItemModel @@ -160,10 +160,10 @@ models. \section1 Exposing C++ Data Models to QML -The above examples use QDeclarativeContext::setContextProperty() to set +The above examples use QQmlContext::setContextProperty() to set model values directly in QML components. An alternative to this is to register the C++ model class as a QML type from a QML C++ plugin using -QDeclarativeExtensionPlugin. This would allow the model classes to be +QQmlExtensionPlugin. This would allow the model classes to be created directly as elements within QML: \table @@ -171,7 +171,7 @@ created directly as elements within QML: \o \code -class MyModelPlugin : public QDeclarativeExtensionPlugin +class MyModelPlugin : public QQmlExtensionPlugin { public: void registerTypes(const char *uri) diff --git a/doc/src/qml/codingconventions.qdoc b/doc/src/qml/codingconventions.qdoc index 89fdfd59f9..9e1ce34c2c 100644 --- a/doc/src/qml/codingconventions.qdoc +++ b/doc/src/qml/codingconventions.qdoc @@ -52,7 +52,7 @@ For better readability, we separate these different parts with an empty line. For example, a hypothetical \i photo QML object would look like this: -\snippet doc/src/snippets/declarative/codingconventions/photo.qml 0 +\snippet doc/src/snippets/qml/codingconventions/photo.qml 0 \section1 Grouped Properties @@ -62,11 +62,11 @@ we use the \i {group notation} rather than the \i {dot notation} to improve read For example, this: -\snippet doc/src/snippets/declarative/codingconventions/dotproperties.qml 0 +\snippet doc/src/snippets/qml/codingconventions/dotproperties.qml 0 can be written like this: -\snippet doc/src/snippets/declarative/codingconventions/dotproperties.qml 1 +\snippet doc/src/snippets/qml/codingconventions/dotproperties.qml 1 \section1 Private Properties @@ -78,7 +78,7 @@ the implementation. As a convention, private properties begin with two accessible but is not meant for public use. Note that QML and JavaScript will grant the user access to these properties. -\snippet doc/src/snippets/declarative/codingconventions/private.qml 0 +\snippet doc/src/snippets/qml/codingconventions/private.qml 0 \section1 Lists @@ -89,30 +89,30 @@ For example, it is very common for a component to only have one state. In this case, instead of: -\snippet doc/src/snippets/declarative/codingconventions/lists.qml 0 +\snippet doc/src/snippets/qml/codingconventions/lists.qml 0 we will write this: -\snippet doc/src/snippets/declarative/codingconventions/lists.qml 1 +\snippet doc/src/snippets/qml/codingconventions/lists.qml 1 \section1 JavaScript Code If the script is a single expression, we recommend writing it inline: -\snippet doc/src/snippets/declarative/codingconventions/javascript.qml 0 +\snippet doc/src/snippets/qml/codingconventions/javascript.qml 0 If the script is only a couple of lines long, we generally use a block: -\snippet doc/src/snippets/declarative/codingconventions/javascript.qml 1 +\snippet doc/src/snippets/qml/codingconventions/javascript.qml 1 If the script is more than a couple of lines long or can be used by different objects, we recommend creating a function and calling it like this: -\snippet doc/src/snippets/declarative/codingconventions/javascript.qml 2 +\snippet doc/src/snippets/qml/codingconventions/javascript.qml 2 For long scripts, we will put the functions in their own JavaScript file and import it like this: -\snippet doc/src/snippets/declarative/codingconventions/javascript-imports.qml 0 +\snippet doc/src/snippets/qml/codingconventions/javascript-imports.qml 0 */ diff --git a/doc/src/qml/debugging.qdoc b/doc/src/qml/debugging.qdoc index 520e23abb5..562464a419 100644 --- a/doc/src/qml/debugging.qdoc +++ b/doc/src/qml/debugging.qdoc @@ -148,11 +148,11 @@ If you set \c {QML_IMPORT_TRACE=1} before running the \l {QML Viewer} (or your QML C++ application), you will see output similar to this: \code -QDeclarativeImportDatabase::addImportPath "/qt-sdk/imports" -QDeclarativeImportDatabase::addImportPath "/qt-sdk/bin/QMLViewer.app/Contents/MacOS" -QDeclarativeImportDatabase::addToImport 0x106237370 "." -1.-1 File as "" -QDeclarativeImportDatabase::addToImport 0x106237370 "Qt" 4.7 Library as "" -QDeclarativeImportDatabase::resolveType "Rectangle" = "QDeclarativeRectangle" +QQmlImportDatabase::addImportPath "/qt-sdk/imports" +QQmlImportDatabase::addImportPath "/qt-sdk/bin/QMLViewer.app/Contents/MacOS" +QQmlImportDatabase::addToImport 0x106237370 "." -1.-1 File as "" +QQmlImportDatabase::addToImport 0x106237370 "Qt" 4.7 Library as "" +QQmlImportDatabase::resolveType "Rectangle" = "QDeclarativeRectangle" \endcode diff --git a/doc/src/qml/dynamicobjects.qdoc b/doc/src/qml/dynamicobjects.qdoc index e3d9adb49a..c50f9dd337 100644 --- a/doc/src/qml/dynamicobjects.qdoc +++ b/doc/src/qml/dynamicobjects.qdoc @@ -80,31 +80,31 @@ the component. This function can take one or two arguments: Here is an example. First there is \c Sprite.qml, which defines a simple QML component: -\snippet doc/src/snippets/declarative/Sprite.qml 0 +\snippet doc/src/snippets/qml/Sprite.qml 0 Our main application file, \c main.qml, imports a \c componentCreation.js JavaScript file that will create \c Sprite objects: -\snippet doc/src/snippets/declarative/createComponent.qml 0 +\snippet doc/src/snippets/qml/createComponent.qml 0 Here is \c componentCreation.js. Notice it checks whether the component \l{Component::status}{status} is \c Component.Ready before calling \l {Component::createObject()}{createObject()} in case the QML file is loaded over a network and thus is not ready immediately. -\snippet doc/src/snippets/declarative/componentCreation.js vars +\snippet doc/src/snippets/qml/componentCreation.js vars \codeline -\snippet doc/src/snippets/declarative/componentCreation.js func -\snippet doc/src/snippets/declarative/componentCreation.js remote -\snippet doc/src/snippets/declarative/componentCreation.js func-end +\snippet doc/src/snippets/qml/componentCreation.js func +\snippet doc/src/snippets/qml/componentCreation.js remote +\snippet doc/src/snippets/qml/componentCreation.js func-end \codeline -\snippet doc/src/snippets/declarative/componentCreation.js finishCreation +\snippet doc/src/snippets/qml/componentCreation.js finishCreation If you are certain the QML file to be loaded is a local file, you could omit the \c finishCreation() function and call \l {Component::createObject()}{createObject()} immediately: -\snippet doc/src/snippets/declarative/componentCreation.js func -\snippet doc/src/snippets/declarative/componentCreation.js local -\snippet doc/src/snippets/declarative/componentCreation.js func-end +\snippet doc/src/snippets/qml/componentCreation.js func +\snippet doc/src/snippets/qml/componentCreation.js local +\snippet doc/src/snippets/qml/componentCreation.js func-end Notice in both instances, \l {Component::createObject()}{createObject()} is called with \c appWindow passed as an argument so that the created object will become a child of the @@ -124,7 +124,7 @@ use the signal \c connect() method. See If the QML is not defined until runtime, you can create a QML item from a string of QML using the \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()} function, as in the following example: -\snippet doc/src/snippets/declarative/createQmlObject.qml 0 +\snippet doc/src/snippets/qml/createQmlObject.qml 0 The first argument is the string of QML to create. Just like in a new file, you will need to import any types you wish to use. The second argument is the parent item for the new item; @@ -145,7 +145,7 @@ The actual creation context depends on how an item is created: \list \o If \l {QML:Qt::createComponent()}{Qt.createComponent()} is used, the creation context - is the QDeclarativeContext in which this method is called + is the QQmlContext in which this method is called \o If \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()} if called, the creation context is the context of the parent item passed to this method \o If a \c {Component{}} item is defined and \l {Component::createObject()}{createObject()} @@ -181,8 +181,8 @@ component. Each instance runs a NumberAnimation, and when the animation has fini \o \c SelfDestroyingRect.qml \row -\o \snippet doc/src/snippets/declarative/dynamicObjects-destroy.qml 0 -\o \snippet doc/src/snippets/declarative/SelfDestroyingRect.qml 0 +\o \snippet doc/src/snippets/qml/dynamicObjects-destroy.qml 0 +\o \snippet doc/src/snippets/qml/SelfDestroyingRect.qml 0 \endtable @@ -209,6 +209,6 @@ destroyed if they were dynamically created. Objects created with \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()} can similarly be destroyed using \c destroy(): -\snippet doc/src/snippets/declarative/createQmlObject.qml 0 -\snippet doc/src/snippets/declarative/createQmlObject.qml destroy +\snippet doc/src/snippets/qml/createQmlObject.qml 0 +\snippet doc/src/snippets/qml/createQmlObject.qml destroy */ diff --git a/doc/src/qml/extending-tutorial.qdoc b/doc/src/qml/extending-tutorial.qdoc index 00f4bb5691..b995c32cca 100644 --- a/doc/src/qml/extending-tutorial.qdoc +++ b/doc/src/qml/extending-tutorial.qdoc @@ -100,14 +100,14 @@ Here is our \c PieChart class, defined in \c piechart.h: \snippet declarative/tutorials/extending/chapter1-basics/piechart.h 0 -The class inherits from QDeclarativeItem because we want to override -QDeclarativeItem::paint() in order to draw. If the class just represented some +The class inherits from QQuickItem because we want to override +QQuickItem::paint() in order to draw. If the class just represented some data type and was not an item that actually needed to be displayed, it could simply inherit from QObject. Or, if we want to extend the functionality of an existing QObject-based class, it could inherit from that class instead. The \c PieChart class defines the two properties, \c name and \c color, with the Q_PROPERTY macro, -and overrides QDeclarativeItem::paint(). The class implementation in \c piechart.cpp +and overrides QQuickItem::paint(). The class implementation in \c piechart.cpp simply sets and returns the \c m_name and \c m_color values as appropriate, and implements \c paint() to draw a simple pie chart. It also turns off the QGraphicsItem::ItemHasNoContents flag to enable painting: @@ -127,7 +127,7 @@ converted to a QColor object for the PieChart \c color property. Automatic conve provided for various other \l {QML Basic Types}{basic types}; for example, a string like "640x480" can be automatically converted to a QSize value. -We'll also create a C++ application that uses a QDeclarativeView to run and +We'll also create a C++ application that uses a QQuickView to run and display \c app.qml. The application must register the \c PieChart type using the qmlRegisterType() function, to allow it to be used from QML. If you don't register the type, \c app.qml won't be able to create a \c PieChart. @@ -265,7 +265,7 @@ int-type property to store an identifier for each chart: \code // C++ - class PieChart : public QDeclarativeItem + class PieChart : public QQuickItem { Q_PROPERTY(int chartId READ chartId WRITE setChartId NOTIFY chartIdChanged) ... @@ -306,7 +306,7 @@ we assign an \c PieSlice value which itself contains a \c color: \snippet declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml 0 -Like \c PieChart, this new \c PieSlice type inherits from QDeclarativeItem and declares +Like \c PieChart, this new \c PieSlice type inherits from QQuickItem and declares its properties with Q_PROPERTY(): \snippet declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h 0 @@ -324,7 +324,7 @@ and associated method signatures: There is one thing to be aware of when implementing \c setPieSlice(). The \c PieSlice is a visual item, so it must be set as a child of the \c PieChart using -QDeclarativeItem::setParentItem() so that the \c PieChart knows to paint this child +QQuickItem::setParentItem() so that the \c PieChart knows to paint this child item when its contents are drawn: \snippet declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp 0 @@ -359,7 +359,7 @@ have a \c slices property that accepts a list of \c PieSlice items: \image extending-tutorial-chapter5.png To do this, we replace the \c pieSlice property in \c PieChart with a \c slices property, -declared as a QDeclarativeListProperty type. The QDeclarativeListProperty class enables the +declared as a QQmlListProperty type. The QQmlListProperty class enables the creation of list properties in QML extensions. We replace the \c pieSlice() function with a \c slices() function that returns a list of slices, and add an internal \c append_slice() function (discussed below). We also use a QList to @@ -372,9 +372,9 @@ store the internal list of slices as \c m_slices: \snippet declarative/tutorials/extending/chapter5-listproperties/piechart.h 2 Although the \c slices property does not have an associated \c WRITE function, -it is still modifiable because of the way QDeclarativeListProperty works. +it is still modifiable because of the way QQmlListProperty works. In the \c PieChart implementation, we implement \c PieChart::slices() to -return a QDeclarativeListProperty value and indicate that the internal +return a QQmlListProperty value and indicate that the internal \c PieChart::append_slice() function is to be called whenever a request is made from QML to add items to the list: @@ -382,7 +382,7 @@ to add items to the list: The \c append_slice() function simply sets the parent item as before, and adds the new item to the \c m_slices list. As you can see, the append function for a -QDeclarativeListProperty is called with two arguments: the list property, and +QQmlListProperty is called with two arguments: the list property, and the item that is to be appended. The \c PieSlice class has also been modified to include \c fromAngle and \c angleSpan @@ -400,7 +400,7 @@ The complete code can be seen in the updated \c examples/tutorials/extending/cha \example declarative/tutorials/extending/chapter6-plugins Currently the \c PieChart and \c PieSlice types are used by \c app.qml, -which is displayed using a QDeclarativeView in a C++ application. An alternative +which is displayed using a QQuickView in a C++ application. An alternative way to use our QML extension is to create a plugin library to make it available to the QML engine. This allows \c app.qml to be loaded with the \l {QML Viewer} (or some other QML \l{Qt Declarative UI Runtime}{runtime} application) instead of writing a \c main.cpp file and @@ -414,8 +414,8 @@ To create a plugin library, we need: \o A \l{Writing a qmldir file}{qmldir} file that tells the QML engine to load the plugin \endlist -First, we create a plugin class named \c ChartsPlugin. It subclasses QDeclarativeExtensionPlugin -and registers our QML types in the inherited \l{QDeclarativeExtensionPlugin::}{registerTypes()} method. It also calls +First, we create a plugin class named \c ChartsPlugin. It subclasses QQmlExtensionPlugin +and registers our QML types in the inherited \l{QQmlExtensionPlugin::}{registerTypes()} method. It also calls Q_EXPORT_PLUGIN2 for Qt's \l{How to Create Qt Plugins}{plugin system}. Here is the \c ChartsPlugin definition in \c chartsplugin.h: @@ -464,7 +464,7 @@ In this tutorial, we've shown the basic steps for creating a QML extension: \o Add callable methods using Q_INVOKABLE or Qt slots, and connect to Qt signals with an \c onSignal syntax \o Add property bindings by defining \l{Qt's Property System}{NOTIFY} signals \o Define custom property types if the built-in types are not sufficient -\o Define list property types using QDeclarativeListProperty +\o Define list property types using QQmlListProperty \o Create a plugin library by defining a Qt plugin and writing a \c qmldir file \endlist diff --git a/doc/src/qml/integrating.qdoc b/doc/src/qml/integrating.qdoc index 7cd15a4fd4..2a88246006 100644 --- a/doc/src/qml/integrating.qdoc +++ b/doc/src/qml/integrating.qdoc @@ -38,13 +38,13 @@ depending on the characteristics of your existing UI code. \section1 Integrating with a \l{QWidget}-based UI If you have an existing QWidget-based UI, QML widgets can be integrated into -it using QDeclarativeView. QDeclarativeView is a subclass of QWidget so you +it using QQuickView. QQuickView is a subclass of QWidget so you can add it to your user interface like any other QWidget. Use -QDeclarativeView::setSource() to load a QML file into the view, then add the +QQuickView::setSource() to load a QML file into the view, then add the view to your UI: \code -QDeclarativeView *qmlView = new QDeclarativeView; +QQuickView *qmlView = new QQuickView; qmlView->setSource(QUrl::fromLocalFile("myqml.qml")); QWidget *widget = myExistingWidget(); @@ -52,11 +52,11 @@ QVBoxLayout *layout = new QVBoxLayout(widget); layout->addWidget(qmlView); \endcode -The one drawback to this approach is that QDeclarativeView is slower to initialize -and uses more memory than a QWidget, and creating large numbers of QDeclarativeView +The one drawback to this approach is that QQuickView is slower to initialize +and uses more memory than a QWidget, and creating large numbers of QQuickView objects may lead to performance degradation. If this is the case, it may be better to rewrite your widgets in QML, and load the widgets from a main QML widget -instead of using QDeclarativeView. +instead of using QQuickView. Keep in mind that QWidgets were designed for a different type of user interface than QML, so it is not always a good idea to port a QWidget-based application to @@ -71,7 +71,7 @@ of simple and dynamic elements. If you have an existing UI based on the \l{Graphics View Framework}, you can integrate QML widgets directly into your QGraphicsScene. Use -QDeclarativeComponent to create a QGraphicsObject from a QML file, and +QQmlComponent to create a QGraphicsObject from a QML file, and place the graphics object into your scene using \l{QGraphicsScene::addItem()}, or reparent it to an item already in the \l{QGraphicsScene}. @@ -79,8 +79,8 @@ For example: \code QGraphicsScene* scene = myExistingGraphicsScene(); -QDeclarativeEngine *engine = new QDeclarativeEngine; -QDeclarativeComponent component(engine, QUrl::fromLocalFile("myqml.qml")); +QQmlEngine *engine = new QQmlEngine; +QQmlComponent component(engine, QUrl::fromLocalFile("myqml.qml")); QGraphicsObject *object = qobject_cast(component.create()); scene->addItem(object); diff --git a/doc/src/qml/javascriptblocks.qdoc b/doc/src/qml/javascriptblocks.qdoc index 4cc98f1d7a..0c1d4c284c 100644 --- a/doc/src/qml/javascriptblocks.qdoc +++ b/doc/src/qml/javascriptblocks.qdoc @@ -200,8 +200,8 @@ in \c script.js: \table \row -\o \snippet doc/src/snippets/declarative/integrating-javascript/connectjs.qml 0 -\o \snippet doc/src/snippets/declarative/integrating-javascript/script.js 0 +\o \snippet doc/src/snippets/qml/integrating-javascript/connectjs.qml 0 +\o \snippet doc/src/snippets/qml/integrating-javascript/script.js 0 \endtable The \c jsFunction() will now be called whenever MouseArea's \c clicked signal is emitted. @@ -222,7 +222,7 @@ 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 component's \l {QDeclarativeComponent::status()}{status} is set to +resource, the component's \l {QQmlComponent::status()}{status} is set to "Loading" until the script has been downloaded. Imported JavaScript files are always qualified using the "as" keyword. The @@ -243,10 +243,10 @@ which in turn can call \c factorial() in \c factorial.js, as it has included \table \row -\o {1,2} \snippet doc/src/snippets/declarative/integrating-javascript/includejs/app.qml 0 -\o \snippet doc/src/snippets/declarative/integrating-javascript/includejs/script.js 0 +\o {1,2} \snippet doc/src/snippets/qml/integrating-javascript/includejs/app.qml 0 +\o \snippet doc/src/snippets/qml/integrating-javascript/includejs/script.js 0 \row -\o \snippet doc/src/snippets/declarative/integrating-javascript/includejs/factorial.js 0 +\o \snippet doc/src/snippets/qml/integrating-javascript/includejs/factorial.js 0 \endtable Notice that calling \l {QML:Qt::include()}{Qt.include()} imports all functions from @@ -479,11 +479,11 @@ themselves. For the following examples, imagine that we have defined the following class: -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.h 0 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.h 0 and that we have registered it with the QML type-system as follows: -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 0 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 0 The AvatarExample class has a property which is a pixmap. When the property is accessed in JavaScript scope, a copy of the resource will be created and @@ -498,9 +498,9 @@ unless the client explicitly preserves it. In the following example, the scarce resource will be automatically released after the binding evaluation is complete. -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleOne.qml 0 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleOne.qml 0 -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 1 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 1 \section2 Example Two: Automatic Release Prevented By Reference @@ -509,9 +509,9 @@ released after the binding expression evaluation is complete, because there is a property var referencing the scarce resource. -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleTwo.qml 0 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleTwo.qml 0 -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 2 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 2 \section2 Example Three: Explicit Preservation @@ -519,11 +519,11 @@ In this example, the resource must be explicitly preserved in order to prevent the declarative engine from automatically releasing the resource after evaluation of the imported script. -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.js 0 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.js 0 -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.qml 0 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.qml 0 -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 3 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 3 \section2 Example Four: Explicit Destruction @@ -532,11 +532,11 @@ scarce resource variant. This example shows how a client may free system resources by releasing the scarce resource held in a JavaScript object, if required, during evaluation of a JavaScript expression. -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.js 0 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.js 0 -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.qml 0 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.qml 0 -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 4 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 4 \section2 Example Five: Explicit Destruction And JavaScript References @@ -546,8 +546,8 @@ to one scarce resource is held, and the client calls destroy() on one of those references (to explicitly release the scarce resource), all of the references will be affected. -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFive.qml 0 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFive.qml 0 -\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 5 +\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 5 */ diff --git a/doc/src/qml/modules.qdoc b/doc/src/qml/modules.qdoc index f75c03301c..27f8ae8fb1 100644 --- a/doc/src/qml/modules.qdoc +++ b/doc/src/qml/modules.qdoc @@ -45,14 +45,14 @@ example, an \c import statement is required to use: \list \o A component defined in another QML file that is not in the same directory \o A component defined in a QML file located on a remote server -\o A \l{QDeclarativeExtensionPlugin}{QML extension plugin} library (unless the plugin is installed in the same directory) +\o A \l{QQmlExtensionPlugin}{QML extension plugin} library (unless the plugin is installed in the same directory) \o A JavaScript file (note this must be imported using \l {#namespaces}{named imports}) \endlist An \c import statement includes the module name, and possibly a version number. This can be seen in the snippet commonly found at the top of QML files: -\snippet doc/src/snippets/declarative/imports/qtquick-1.0.qml import +\snippet doc/src/snippets/qml/imports/qtquick-1.0.qml import This imports version 1.0 of the "QtQuick" module into the global namespace. (The QML library itself must be imported to use any of the \l {QML Elements}, as they @@ -111,7 +111,7 @@ Window { Similarly, if the directory resided on a network source, it could be imported like this: -\snippet doc/src/snippets/declarative/imports/network-imports.qml imports +\snippet doc/src/snippets/qml/imports/network-imports.qml imports A located module can also be imported as a network resource if it has a \l{Writing a qmldir file}{qmldir file} in the directory that specifies the QML files @@ -145,7 +145,7 @@ a later version was used, as the \c qmldir file specifies that these elements are only available in the 1.0 version. Note that modules imported as a network resource allow only access to components -defined in QML files; components defined by C++ \l{QDeclarativeExtensionPlugin}{QML extension plugins} +defined in QML files; components defined by C++ \l{QQmlExtensionPlugin}{QML extension plugins} are not available. @@ -153,7 +153,7 @@ are not available. \section1 Installed Modules Installed modules are modules that are made available through the QML import path, -as defined by QDeclarativeEngine::importPathList(), or modules defined within +as defined by QQmlEngine::importPathList(), or modules defined within C++ application code. An installed module is referred to by a URI, which allows the module to be imported from QML code without specifying a complete filesystem path or network resource URL. @@ -161,7 +161,7 @@ path or network resource URL. When importing an installed module, an un-quoted URI is used, with a mandatory version number: -\snippet doc/src/snippets/declarative/imports/installed-module.qml imports +\snippet doc/src/snippets/qml/imports/installed-module.qml imports When a module is imported, the QML engine searches the QML import path for a matching module. The root directory of the module must contain a @@ -177,7 +177,7 @@ module could be located under \c com/nokia/qml/mymodule.2/qmldir or \c com/nokia/qml/mymodule.2.1/qmldir. The engine will automatically load the module which matches best. -The import path, as returned by QDeclarativeEngine::importPathList(), defines the default +The import path, as returned by QQmlEngine::importPathList(), defines the default locations to be searched by the QML engine for a matching module. By default, this list contains: @@ -187,7 +187,7 @@ contains: \o Paths specified by the \c QML_IMPORT_PATH environment variable \endlist -Additional import paths can be added through QDeclarativeEngine::addImportPath() or the +Additional import paths can be added through QQmlEngine::addImportPath() or the \c QML_IMPORT_PATH environment variable. When running the \l {QML Viewer}, you can also use the \c -I option to add an import path. @@ -227,7 +227,7 @@ as \c http://www.some-server.com/qml and this URL was added to the QML import pa QML code would work just the same. Note that modules imported as a network resource allow only access to components -defined in QML files; components defined by C++ \l{QDeclarativeExtensionPlugin}{QML extension plugins} +defined in QML files; components defined by C++ \l{QQmlExtensionPlugin}{QML extension plugins} are not available. @@ -244,10 +244,10 @@ qmlRegisterType("Charts", 1, 0, "PieChart"); This allows the application's QML files to use the \c PieChart type by importing the declared \c Charts module: -\snippet doc/src/snippets/declarative/imports/chart.qml import +\snippet doc/src/snippets/qml/imports/chart.qml import -For \l{QDeclarativeExtensionPlugin}{QML plugins}, the -module URI is automatically passed to QDeclarativeExtensionPlugin::registerTypes(). This method +For \l{QQmlExtensionPlugin}{QML plugins}, the +module URI is automatically passed to QQmlExtensionPlugin::registerTypes(). This method can be reimplemented by the developer to register the necessary types for the module. Below is the \c registerTypes() implementation from the \l{declarative/cppextensions/plugins}{QML plugins} example: @@ -257,7 +257,7 @@ example: Once the plugin is built and installed, and includes a \l{Writing a qmldir file}{qmldir file}, the module can be imported from QML, like this: -\snippet doc/src/snippets/declarative/imports/timeexample.qml import +\snippet doc/src/snippets/qml/imports/timeexample.qml import Unlike QML types defined by QML files, a QML type defined in a C++ extension plugin cannot be loaded by a module that is imported as a network resource. @@ -271,15 +271,15 @@ By default, when a module is imported, its contents are imported into the global To import a module into a specific namespace, use the \i as keyword: -\snippet doc/src/snippets/declarative/imports/named-imports.qml imports +\snippet doc/src/snippets/qml/imports/named-imports.qml imports Types from these modules can then only be used when qualified by the namespace: -\snippet doc/src/snippets/declarative/imports/named-imports.qml imported items +\snippet doc/src/snippets/qml/imports/named-imports.qml imported items Multiple modules can be imported into the same namespace in the same way that multiple modules can be imported into the global namespace: -\snippet doc/src/snippets/declarative/imports/merged-named-imports.qml imports +\snippet doc/src/snippets/qml/imports/merged-named-imports.qml imports \section2 JavaScript Files @@ -381,14 +381,14 @@ into a Namespace exported by the module. The contents of the script file are ma available inside the namespace , which has the version number . -\bold {plugin []} lines are used to add \l{QDeclarativeExtensionPlugin}{QML C++ plugins} to the module. is the name of the library. It is usually not the same as the file name +\bold {plugin []} lines are used to add \l{QQmlExtensionPlugin}{QML C++ plugins} to the module. is the name of the library. It is usually not the same as the file name of the plugin binary, which is platform dependent; e.g. the library \c MyAppTypes would produce \c libMyAppTypes.so on Linux and \c MyAppTypes.dll on Windows. is an optional argument specifying either an absolute path to the directory containing the plugin file, or a relative path from the directory containing the \c qmldir file to the directory containing the plugin file. By default the engine searches for the plugin library in the directory that contains the \c qmldir -file. The plugin search path can be queried with QDeclarativeEngine::pluginPathList() and modified using QDeclarativeEngine::addPluginPath(). When running the \l {QML Viewer}, use the \c -P option to add paths to the plugin search path. +file. The plugin search path can be queried with QQmlEngine::pluginPathList() and modified using QQmlEngine::addPluginPath(). When running the \l {QML Viewer}, use the \c -P option to add paths to the plugin search path. \bold {typeinfo } lines add \l{Writing a qmltypes file}{type description files} to the module that can be read by QML tools such as Qt Creator to get information about the @@ -434,7 +434,7 @@ to \c /tmp/imports/My/Module/qmldir to register it. While the qmldump tool covers most cases, it does not work if: \list -\o The plugin uses a \l{QDeclarativeCustomParser}. The component that uses +\o The plugin uses a \l{QQmlCustomParser}. The component that uses the custom parser will not get its members documented. \o The plugin can not be loaded. In particular if you cross-compiled the plugin for a different architecture, qmldump will not be able to @@ -456,7 +456,7 @@ Module { // The name is a unique identifier used to refer to this type. // It is recommended you simply use the C++ type name. - name: "QDeclarativeAbstractAnimation" + name: "QQuickAbstractAnimation" // The name of the prototype Component. prototype: "QObject" @@ -492,12 +492,12 @@ Module { Property { name: "animations"; - type: "QDeclarativeAbstractAnimation" + type: "QQuickAbstractAnimation" // defaults to false, whether this property is read only isReadonly: true // defaults to false, whether the type of this property was a pointer in C++ isPointer: true - // defaults to false: whether the type actually is a QDeclarativeListProperty + // defaults to false: whether the type actually is a QQmlListProperty isList: true // defaults to 0: the meta object revision that introduced this property revision: 1 diff --git a/doc/src/qml/network.qdoc b/doc/src/qml/network.qdoc index 15a17203c3..71f42a4bfe 100644 --- a/doc/src/qml/network.qdoc +++ b/doc/src/qml/network.qdoc @@ -118,11 +118,11 @@ See the \tt examples/declarative/flickr for a real demonstration of this. \section1 Configuring the Network Access Manager -All network access from QML is managed by a QNetworkAccessManager set on the QDeclarativeEngine which executes the QML. +All network access from QML is managed by a QNetworkAccessManager set on the QQmlEngine which executes the QML. By default, this is an unmodified Qt QNetworkAccessManager. You may set a different manager by -providing a QDeclarativeNetworkAccessManagerFactory and setting it via -QDeclarativeEngine::setNetworkAccessManagerFactory(). -For example, the \l {QML Viewer} sets a QDeclarativeNetworkAccessManagerFactory which +providing a QQmlNetworkAccessManagerFactory and setting it via +QQmlEngine::setNetworkAccessManagerFactory(). +For example, the \l {QML Viewer} sets a QQmlNetworkAccessManagerFactory which creates QNetworkAccessManager that trusts HTTP Expiry headers to avoid network cache checks, allows HTTP Pipelining, adds a persistent HTTP CookieJar, a simple disk cache, and supports proxy settings. @@ -134,7 +134,7 @@ the executable using \l{The Qt Resource System}. Using this, an executable can r that is compiled into the executable: \code - QDeclarativeView *canvas = new QDeclarativeView; + QQuickView *canvas = new QQuickView; canvas->setUrl(QUrl("qrc:/dial.qml")); \endcode diff --git a/doc/src/qml/propertybinding.qdoc b/doc/src/qml/propertybinding.qdoc index b89b3d7a61..6dd862f55b 100644 --- a/doc/src/qml/propertybinding.qdoc +++ b/doc/src/qml/propertybinding.qdoc @@ -44,10 +44,10 @@ The syntax for properties is: Elements already possess useful properties but, to create custom properties, precede the property name with the keyword \c property. -\snippet doc/src/snippets/declarative/properties.qml parent begin -\snippet doc/src/snippets/declarative/properties.qml inherited properties -\snippet doc/src/snippets/declarative/properties.qml custom properties -\snippet doc/src/snippets/declarative/properties.qml parent end +\snippet doc/src/snippets/qml/properties.qml parent begin +\snippet doc/src/snippets/qml/properties.qml inherited properties +\snippet doc/src/snippets/qml/properties.qml custom properties +\snippet doc/src/snippets/qml/properties.qml parent end QML property rules coincide with many of JavaScript's property rules, for example, property names must begin with a lowercase letter. @@ -62,14 +62,14 @@ to other property values or data accessible in the application. The property val automatically kept up to date if the other properties or data values change. Property bindings are created in QML using the colon "\c {:}" before the value: -\snippet doc/src/snippets/declarative/properties.qml property binding +\snippet doc/src/snippets/qml/properties.qml property binding The property binding causes the width of the \c Rectangle to update whenever the \c {parent}'s width changes. QML extends a standards compliant JavaScript engine, so any valid JavaScript expression can be used as a property binding. Bindings can access object properties, make function calls and even use built-in JavaScript objects such as \c {Date} and \c {Math}. -\snippet doc/src/snippets/declarative/properties.qml JavaScript sample +\snippet doc/src/snippets/qml/properties.qml JavaScript sample 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 @@ -82,13 +82,13 @@ function. When working with both QML and JavaScript, it is important to differentiate between QML property binding and JavaScript value assignment. In QML, a property binding is created using the colon "\c {:}". -\snippet doc/src/snippets/declarative/properties.qml property binding +\snippet doc/src/snippets/qml/properties.qml property binding The property binding causes the width of the \c Rectangle to update whenever the \c {parent}'s width changes. Assigning a property value (using the equals sign "\c {=}") does not create a property binding. -\snippet doc/src/snippets/declarative/properties.qml property assignment +\snippet doc/src/snippets/qml/properties.qml property assignment Instead of creating a property binding, the assignment simply sets the \c Rectangle \c width value to a number when the \c Component.onCompleted code is invoked. @@ -186,7 +186,7 @@ Care must be taken when referring to the parent of an object property binding. Elements and components that are bound to properties are not necessarily set as children of the properties' component. -\snippet doc/src/snippets/declarative/properties.qml object binding +\snippet doc/src/snippets/qml/properties.qml object binding The code snippet has a \l Gradient element that attempts to print its parent's \c width value. However, the \c Gradient element is bound to the \c gradient property, not the \c children property of the \c Rectangle. As a result, the @@ -205,7 +205,7 @@ Certain objects provide additional properties by \i attaching properties to othe objects. For example, the \l Keys element have properties that can \i attach to other QML objects to provide keyboard handling. -\snippet doc/src/snippets/declarative/properties.qml list attached property +\snippet doc/src/snippets/qml/properties.qml list attached property The element \l ListView provides the delegate, \c listdelegate, the property \c isCurrentItem as an attached property. The \c ListView.isCurrentItem \i{attached property} provides highlight information to the delegate. @@ -221,7 +221,7 @@ to provide additional functionality to objects. Two prominent elements, \l Component and \l Keys element provide \l{QML Signal and Handler Event System}{signal handlers} as attached signal handlers. -\snippet doc/src/snippets/declarative/properties.qml attached signal handler +\snippet doc/src/snippets/qml/properties.qml attached signal handler Read the \l{QML Signal and Handler Event System} and the \l{Keyboard Focus in QML} articles for more information. @@ -232,14 +232,14 @@ Some properties may accept a binding to a list property, where more than one component can bind to the property. List properties allow multiple \l {State}{States}, \l {Gradient}{Gradients}, and other components to bind to a single property. -\snippet doc/src/snippets/declarative/properties.qml list property +\snippet doc/src/snippets/qml/properties.qml list property The list is enclosed in square brackets, with a comma separating the list elements. In cases where you are only assigning a single item to a list, you may omit the square brackets. -\snippet doc/src/snippets/declarative/properties.qml single property +\snippet doc/src/snippets/qml/properties.qml single property To access the list, use the \c index property. -\snippet doc/src/snippets/declarative/properties.qml print list property +\snippet doc/src/snippets/qml/properties.qml print list property The snippet code simply prints the name of the first state, \c FETCH. See the \l{list}{list type} documentation @@ -252,7 +252,7 @@ In some cases properties form a logical group and use either the \i dot notation or \i group notation. Grouped properties may be written both ways: -\snippet doc/src/snippets/declarative/properties.qml grouped properties +\snippet doc/src/snippets/qml/properties.qml grouped properties In the element documentation grouped properties are shown using the dot notation. @@ -275,18 +275,18 @@ Accessing the aliasing property is similar to accessing a regular property. In addition, the optional \c default keyword indicates that the aliasing property is a \l{Default Properties}{default property}. -\snippet doc/src/snippets/declarative/Button.qml property alias +\snippet doc/src/snippets/qml/Button.qml property alias When importing the component as a \c Button, the \c buttonlabel is directly accessible through the \c label property. -\snippet doc/src/snippets/declarative/properties.qml alias usage +\snippet doc/src/snippets/qml/properties.qml alias usage In addition, the \c id property may also be aliased and referred outside the component. -\snippet doc/src/snippets/declarative/Button.qml parent begin -\snippet doc/src/snippets/declarative/Button.qml id alias -\snippet doc/src/snippets/declarative/Button.qml parent end +\snippet doc/src/snippets/qml/Button.qml parent begin +\snippet doc/src/snippets/qml/Button.qml id alias +\snippet doc/src/snippets/qml/Button.qml parent end The \c imagebutton component has the ability to modify the child \l Image object and its properties. -\snippet doc/src/snippets/declarative/properties.qml image alias +\snippet doc/src/snippets/qml/properties.qml image alias Using aliases, properties may be exposed to the \l{qml-top-level-component}{top level component}. Exposing properties to the @@ -299,7 +299,7 @@ Aliases are only activated once the component when an uninitialized alias is referenced. Likewise, aliasing an aliasing property will also result in an error. -\snippet doc/src/snippets/declarative/properties.qml alias complete +\snippet doc/src/snippets/qml/properties.qml alias complete When importing the component, however, aliasing properties appear as regular Qt properties and consequently can be used in alias references. @@ -309,7 +309,7 @@ property, effectively overwriting the existing property. For example, the following component has a \c color alias property, named the same as the built-in \l {Rectangle::color} property: -\snippet doc/src/snippets/declarative/properties.qml alias overwrite +\snippet doc/src/snippets/qml/properties.qml alias overwrite Any object that use this component and refer to its \c color property will be referring to the alias rather than the ordinary \l {Rectangle::color} property. @@ -328,13 +328,13 @@ as the \i {default property}. For example, the State element's default property is its \l{State::changes}{changes} property. \l PropertyChanges elements may simply be placed as the \c{State}'s children and they will be bound to the \c changes property. -\snippet doc/src/snippets/declarative/properties.qml state default +\snippet doc/src/snippets/qml/properties.qml state default Similarly, the \l Item element's default property is its \l{Item::data}{data} property. The \c data property manages Item's \c children and \c resources properties. This way, different data types may be placed as direct children of the \c Item. -\snippet doc/src/snippets/declarative/properties.qml default property +\snippet doc/src/snippets/qml/properties.qml default property Reassigning a default property is useful when a component is reused. For example, the \l{declarative/ui-components/tabwidget}{TabWidget} example uses @@ -350,14 +350,14 @@ For example, to bind a property exposed from the \l{The QML Engine}{declarative runtime} or \l{QmlGlobalQtObject}{Qt object}, such as the \c system.brightness property, to a value written in QML, you could use the \l Binding element as follows: -\snippet doc/src/snippets/declarative/properties.qml binding element +\snippet doc/src/snippets/qml/properties.qml binding element \section1 Changing Property Values in States The \l PropertyChanges element is for setting property bindings within a \l State element to set a property binding. -\snippet doc/src/snippets/declarative/properties.qml PropertyChanges element +\snippet doc/src/snippets/qml/properties.qml PropertyChanges element The rectangle's \c color property will bind to the \c warning component's \c color property when its \c state is set to the \c WARNING state. */ diff --git a/doc/src/qml/qmlcomponents.qdoc b/doc/src/qml/qmlcomponents.qdoc index bcc465f4b2..21b94f2ae3 100644 --- a/doc/src/qml/qmlcomponents.qdoc +++ b/doc/src/qml/qmlcomponents.qdoc @@ -50,7 +50,7 @@ is the emphasis in QML. Any snippet of QML code may become a component, by placing the code in a QML file, whose file extension is \c .qml). A complete Button component that responds to user input may be in a Button.qml file. -\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml document +\snippet doc/src/snippets/qml/reusablecomponents/Button.qml document The component name, \c Button, matches the QML filename, \c Button.qml. Also, the first character is in upper case. Matching the names allow @@ -60,9 +60,9 @@ naming components with different filenames. Alternatively, a \l Component element may encapsulate a QML object to form a component. -\snippet doc/src/snippets/declarative/reusablecomponents/component.qml parent begin -\snippet doc/src/snippets/declarative/reusablecomponents/component.qml define inline component -\snippet doc/src/snippets/declarative/reusablecomponents/component.qml parent end +\snippet doc/src/snippets/qml/reusablecomponents/component.qml parent begin +\snippet doc/src/snippets/qml/reusablecomponents/component.qml define inline component +\snippet doc/src/snippets/qml/reusablecomponents/component.qml parent end Components may incorporate any \l{Qt Quick}{QML feature} such as: @@ -89,7 +89,7 @@ A component defined in a \c .qml file is directly usable by declaring the name of the component. For example, a button defined in \c Button.qml is created by declaring a \c Button. The button is defined in the \l {qml-define-components}{Defining New Components} section. -\snippet doc/src/snippets/declarative/reusablecomponents/application.qml document +\snippet doc/src/snippets/qml/reusablecomponents/application.qml document Note that the component name, \c Button, matches the QML filename, \c Button.qml. Also, the first character is in upper case. Matching the names allow @@ -100,7 +100,7 @@ For flexibility, a \c qmldir file is for dictating which additional components, plugins, or directories should be imported. By using a \c qmldir file, component names do not need to match the filenames. The \c qmldir file should, however, be in an imported path. -\snippet doc/src/snippets/declarative/reusablecomponents/qmldir document +\snippet doc/src/snippets/qml/reusablecomponents/qmldir document \section2 Loading an Inline Component @@ -109,8 +109,8 @@ delayed. A component may be created during a MouseArea event or by using a \l Loader element. The component can create an object, which is addressable in a similar way as an \l {qml-id}{identifier}. Thus, the created object may have its bindings set and read like a normal QML object. -\snippet doc/src/snippets/declarative/reusablecomponents/component.qml define inline component -\snippet doc/src/snippets/declarative/reusablecomponents/component.qml create inline component +\snippet doc/src/snippets/qml/reusablecomponents/component.qml define inline component +\snippet doc/src/snippets/qml/reusablecomponents/component.qml create inline component \keyword qml-component-properties \section1 Component Properties @@ -140,11 +140,11 @@ Consider the Button component from the object is a \l Rectangle. When imported, the Button component will possess the Rectangle's properties, methods, signals, and any custom properties. -\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent begin -\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml ellipses -\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml properties -\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml ellipses -\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent end +\snippet doc/src/snippets/qml/reusablecomponents/Button.qml parent begin +\snippet doc/src/snippets/qml/reusablecomponents/Button.qml ellipses +\snippet doc/src/snippets/qml/reusablecomponents/Button.qml properties +\snippet doc/src/snippets/qml/reusablecomponents/Button.qml ellipses +\snippet doc/src/snippets/qml/reusablecomponents/Button.qml parent end The Button's \c text alias is accessible from outside the component as well as the Rectangle's visual properties and signals such as \c x, \c y, \c anchors, @@ -156,7 +156,7 @@ children which is beneficial for certain types of interfaces. However, since \c FocusScopes are not visual elements, the visual properties of its child need to be exposed. -\snippet doc/src/snippets/declarative/reusablecomponents/focusbutton.qml document +\snippet doc/src/snippets/qml/reusablecomponents/focusbutton.qml document \keyword qml-id \section2 The Object Identifier @@ -165,7 +165,7 @@ Each QML object may be given a special unique identifier called an \c id. No other object within the same QML component (see \l{QML Documents}) can have the same \c id value. QML objects may then access an object using the \c id property. -\snippet doc/src/snippets/declarative/properties.qml id property +\snippet doc/src/snippets/qml/properties.qml id property A component may readily access its parent's properties by using the \c parent property. @@ -178,15 +178,15 @@ Note that an \c id must begin with a lower-case letter or an underscore. The Objects or Items declared within a component can be made accessible by binding their id to a property alias. -\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent begin -\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml object alias -\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml text -\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent end +\snippet doc/src/snippets/qml/reusablecomponents/Button.qml parent begin +\snippet doc/src/snippets/qml/reusablecomponents/Button.qml object alias +\snippet doc/src/snippets/qml/reusablecomponents/Button.qml text +\snippet doc/src/snippets/qml/reusablecomponents/Button.qml parent end The advantage of using an alias instead a property of type of the object is that the value of the alias cannot be overridden, and members of the object can be used in property bindings when declaring an instance of the component. -\snippet doc/src/snippets/declarative/reusablecomponents/application.qml grouped property +\snippet doc/src/snippets/qml/reusablecomponents/application.qml grouped property If a property of type \c Text was used instead of an alias in this instance there would be no guarantee that \c label would be initialized before the binding was attempted which would cause the binding to fail. diff --git a/doc/src/qml/qmldocument.qdoc b/doc/src/qml/qmldocument.qdoc index fedeba35e1..426f135a45 100644 --- a/doc/src/qml/qmldocument.qdoc +++ b/doc/src/qml/qmldocument.qdoc @@ -36,7 +36,7 @@ from text data. Here is a simple QML document: -\snippet doc/src/snippets/declarative/qml-documents/non-trivial.qml document +\snippet doc/src/snippets/qml/qml-documents/non-trivial.qml document QML documents are always encoded in UTF-8 format. @@ -79,7 +79,7 @@ text property: \o application.qml \row -\o \snippet doc/src/snippets/declarative/qml-documents/qmldocuments.qml document +\o \snippet doc/src/snippets/qml/qml-documents/qmldocuments.qml document \o \qml import QtQuick 2.0 @@ -138,14 +138,14 @@ These final two examples perform identically to the original document. \table \row \o -\snippet doc/src/snippets/declarative/qml-documents/inline-component.qml document +\snippet doc/src/snippets/qml/qml-documents/inline-component.qml document \o -\snippet doc/src/snippets/declarative/qml-documents/inline-text-component.qml document +\snippet doc/src/snippets/qml/qml-documents/inline-text-component.qml document \endtable For information about components, the \l{QML Components} article details the creation of components and how to load them in other components. -\sa QDeclarativeComponent +\sa QQmlComponent */ diff --git a/doc/src/qml/qmlengine.qdoc b/doc/src/qml/qmlengine.qdoc index 3e8ef1ae3f..0865755c7b 100644 --- a/doc/src/qml/qmlengine.qdoc +++ b/doc/src/qml/qmlengine.qdoc @@ -38,16 +38,16 @@ specified in QML files, plugins, or applications. \section1 Core Module Classes - The \l{QtDeclarative}{Qt Declarative} module provides a set of C++ APIs for + The \l{QtQml}{Qt Declarative} module provides a set of C++ APIs for extending your QML applications from C++ and embedding QML into C++ applications. There are several core classes in the Qt Declarative module that provide the essential capabilities for doing this. These are: \list - \o QDeclarativeEngine: A QML engine provides the environment for executing QML code. Every + \o QQmlEngine: A QML engine provides the environment for executing QML code. Every application requires at least one engine instance. - \o QDeclarativeComponent: A component encapsulates QML information. - \o QDeclarativeContext: A context allows an application to expose data to + \o QQmlComponent: A component encapsulates QML information. + \o QQmlContext: A context allows an application to expose data to the QML components created by an engine. \endlist @@ -61,27 +61,27 @@ specified in QML files, plugins, or applications. \endlist \section2 Declarative Engine - A QDeclarativeEngine allows the configuration of global settings that + A QQmlEngine allows the configuration of global settings that apply to all of its QML component instances: for example, the QNetworkAccessManager to be used for network communications, and the file path to be used for persistent storage. - QDeclarativeComponent is used to load QML documents. Each - QDeclarativeComponent instance represents a single document. A component + QQmlComponent is used to load QML documents. Each + QQmlComponent instance represents a single document. A component can be created from the URL or file path of a QML document, or the raw QML code of the document. Component instances are instatiated through - the QDeclarativeComponent::create() method, like this: + the QQmlComponent::create() method, like this: \code - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl::fromLocalFile("MyRectangle.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl::fromLocalFile("MyRectangle.qml")); QObject *rectangleInstance = component.create(); // ... delete rectangleInstance; \endcode - QML documents can also be loaded using QDeclarativeView. This class + QML documents can also be loaded using QQuickView. This class provides a convenient QWidget-based view for embedding QML components into QGraphicsView-based applications. (For other methods of integrating QML into QWidget-based applications, see \l {Integrating QML Code with @@ -91,44 +91,44 @@ specified in QML files, plugins, or applications. \section2 Loading QML Components from C++ - A QML document can be loaded with QDeclarativeComponent or QDeclarativeView. - QDeclarativeComponent loads a QML component as a C++ object; - QDeclarativeView also does this, but additionally loads the QML component + A QML document can be loaded with QQmlComponent or QQuickView. + QQmlComponent loads a QML component as a C++ object; + QQuickView also does this, but additionally loads the QML component directly into a QGraphicsView. It is convenient for loading a displayable QML component into a QWidget-based application. For example, suppose there is a \c MyItem.qml file that looks like this: - \snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml start - \snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml end + \snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml start + \snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml end - This QML document can be loaded with QDeclarativeComponent or - QDeclarativeView with the following C++ code. Using a QDeclarativeComponent - requires calling QDeclarativeComponent::create() to create a new instance of - the component, while a QDeclarativeView automatically creates an instance of - the component, which is accessible via QDeclarativeView::rootObject(): + This QML document can be loaded with QQmlComponent or + QQuickView with the following C++ code. Using a QQmlComponent + requires calling QQmlComponent::create() to create a new instance of + the component, while a QQuickView automatically creates an instance of + the component, which is accessible via QQuickView::rootObject(): \table \row \o - \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeComponent-a + \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQmlComponent-a \dots 0 - \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeComponent-b + \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQmlComponent-b \o - \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeView + \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQuickView \endtable This \c object is the instance of the \c MyItem.qml component that has been created. You can now modify the item's properties using - QObject::setProperty() or QDeclarativeProperty: + QObject::setProperty() or QQmlProperty: - \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp properties + \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp properties Alternatively, you can cast the object to its actual type and call functions with compile-time safety. In this case the base object of \c MyItem.qml is - an \l Item, which is defined by the QDeclarativeItem class: + an \l Item, which is defined by the QQuickItem class: - \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp cast + \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp cast You can also connect to any signals or call functions defined in the component using QMetaObject::invokeMethod() and QObject::connect(). See \l @@ -141,14 +141,14 @@ specified in QML files, plugins, or applications. the QObject::objectName property with QObject::findChild(). For example, if the root item in \c MyItem.qml had a child \l Rectangle item: - \snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml start + \snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml start \codeline - \snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml child - \snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml end + \snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml child + \snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml end The child could be located like this: - \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp findChild + \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp findChild If \c objectName is used inside a delegate of a ListView, \l Repeater or some other element that creates multiple instances of its delegates, there @@ -172,20 +172,20 @@ specified in QML files, plugins, or applications. \section2 Embedding C++ Objects into QML Components When loading a QML scene into a C++ application, it can be useful to - directly embed C++ data into the QML object. QDeclarativeContext enables + directly embed C++ data into the QML object. QQmlContext enables this by exposing data to the context of a QML component, allowing data to be injected from C++ into QML. For example, here is a QML item that refers to a \c currentDateTime value that does not exist in the current scope: - \snippet doc/src/snippets/declarative/qtbinding/context/MyItem.qml 0 + \snippet doc/src/snippets/qml/qtbinding/context/MyItem.qml 0 This \c currentDateTime value can be set directly by the C++ application that loads the QML component, using - QDeclarativeContext::setContextProperty(): + QQmlContext::setContextProperty(): - \snippet doc/src/snippets/declarative/qtbinding/context/main.cpp 0 + \snippet doc/src/snippets/qml/qtbinding/context/main.cpp 0 Context properties can hold either QVariant or QObject* values. This means custom C++ objects can also be injected using this approach, and these @@ -196,11 +196,11 @@ specified in QML files, plugins, or applications. \table \row \o - \snippet doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h 0 + \snippet doc/src/snippets/qml/qtbinding/context-advanced/applicationdata.h 0 \codeline - \snippet doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp 0 + \snippet doc/src/snippets/qml/qtbinding/context-advanced/main.cpp 0 \o - \snippet doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml 0 + \snippet doc/src/snippets/qml/qtbinding/context-advanced/MyItem.qml 0 \endtable (Note that date/time values returned from C++ to QML can be formatted through @@ -212,7 +212,7 @@ specified in QML files, plugins, or applications. connected to using an \c onDataChanged handler within a \l Connections object: - \snippet doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml 0 + \snippet doc/src/snippets/qml/qtbinding/context-advanced/connections.qml 0 Context properties can be useful for using C++ based data models in a QML view. See the \l {declarative/modelviews/stringlistmodel}{String ListModel}, @@ -221,7 +221,7 @@ specified in QML files, plugins, or applications. respective examples on using QStringListModel, QObjectList-based models and QAbstractItemModel in QML views. - Also see the QDeclarativeContext documentation for more information. + Also see the QQmlContext documentation for more information. \section1 Invoking QML Entities through the Engine @@ -246,8 +246,8 @@ specified in QML files, plugins, or applications. \table \row - \o \snippet doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml 0 - \o \snippet doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp 0 + \o \snippet doc/src/snippets/qml/qtbinding/functions-qml/MyItem.qml 0 + \o \snippet doc/src/snippets/qml/qtbinding/functions-qml/main.cpp 0 \endtable Notice the Q_RETURN_ARG() and Q_ARG() arguments for @@ -257,16 +257,16 @@ specified in QML files, plugins, or applications. To call a C++ function from QML, the function must be either a Qt slot, or a function marked with the Q_INVOKABLE macro, to be available to QML. In the following example, the QML code invokes methods on the \c myObject object, - which has been set using QDeclarativeContext::setContextProperty(): + which has been set using QQmlContext::setContextProperty(): \table \row \o - \snippet doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml 0 + \snippet doc/src/snippets/qml/qtbinding/functions-cpp/MyItem.qml 0 \o - \snippet doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h 0 + \snippet doc/src/snippets/qml/qtbinding/functions-cpp/myclass.h 0 \codeline - \snippet doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp 0 + \snippet doc/src/snippets/qml/qtbinding/functions-cpp/main.cpp 0 \endtable QML supports the calling of overloaded C++ functions. If there are multiple @@ -289,11 +289,11 @@ specified in QML files, plugins, or applications. \table \row \o - \snippet doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml 0 + \snippet doc/src/snippets/qml/qtbinding/signals-qml/MyItem.qml 0 \o - \snippet doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h 0 + \snippet doc/src/snippets/qml/qtbinding/signals-qml/myclass.h 0 \codeline - \snippet doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp 0 + \snippet doc/src/snippets/qml/qtbinding/signals-qml/main.cpp 0 \endtable To connect to Qt C++ signals from within QML, use a signal handler with the @@ -308,12 +308,12 @@ specified in QML files, plugins, or applications. \row \o - \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h start + \snippet doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h start \dots 4 - \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h end + \snippet doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h end \o - \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml 0 + \snippet doc/src/snippets/qml/qtbinding/signals-cpp/standalone.qml 0 \endtable (Note that if a signal has been declared as the NOTIFY signal for a @@ -326,13 +326,13 @@ specified in QML files, plugins, or applications. If, however, the object with the signal is not created from within the QML code, and the QML item only has a reference to the created object - for example, if the object was set using - QDeclarativeContext::setContextProperty() - then the \l Connections element + QQmlContext::setContextProperty() - then the \l Connections element can be used instead to create the signal handler: \table \row - \o \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp connections - \o \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml 0 + \o \snippet doc/src/snippets/qml/qtbinding/signals-cpp/main.cpp connections + \o \snippet doc/src/snippets/qml/qtbinding/signals-cpp/MyItem.qml 0 \endtable C++ signals can use enum values as parameters provided that the enum is @@ -346,14 +346,14 @@ specified in QML files, plugins, or applications. Any properties declared in a QML object are automatically accessible from C++. Given a QML item like this: - \snippet doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml 0 + \snippet doc/src/snippets/qml/qtbinding/properties-qml/MyItem.qml 0 The value of the \c someNumber property can be set and read using - QDeclarativeProperty, or QObject::setProperty() and QObject::property(): + QQmlProperty, or QObject::setProperty() and QObject::property(): - \snippet doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp 0 + \snippet doc/src/snippets/qml/qtbinding/properties-qml/main.cpp 0 - You should always use QObject::setProperty(), QDeclarativeProperty or + You should always use QObject::setProperty(), QQmlProperty or QMetaProperty::write() to change a QML property value, to ensure the QML engine is made aware of the property change. For example, say you have a custom element \c PushButton with a \c buttonText property that internally @@ -362,7 +362,7 @@ specified in QML files, plugins, or applications. \badcode // BAD! - QDeclarativeComponent component(engine, "MyButton.qml"); + QQmlComponent component(engine, "MyButton.qml"); PushButton *button = qobject_cast(component.create()); button->m_buttonText = "Click me"; \endcode @@ -381,8 +381,8 @@ specified in QML files, plugins, or applications. \table \row - \o \snippet doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h 0 - \o \snippet doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml 0 + \o \snippet doc/src/snippets/qml/qtbinding/properties-cpp/applicationdata.h 0 + \o \snippet doc/src/snippets/qml/qtbinding/properties-cpp/MyItem.qml 0 \endtable Notice the \c backgroundColorChanged signal is declared as the NOTIFY signal @@ -401,7 +401,7 @@ specified in QML files, plugins, or applications. Additional Qt code is runnable in the engine as a QML plugin. The \l{QML Plugins} article covers the creation and usage patterns of QML plugins. The - QDeclarativeExtensionPlugin class is an abstract class for writing QML + QQmlExtensionPlugin class is an abstract class for writing QML plugins. The \l {How to Create Qt Plugins} contains more information about Qt's plugin system. @@ -413,17 +413,17 @@ specified in QML files, plugins, or applications. initializing some costly data structures until after all the properties have been set. - The QML engine defines an interface class called QDeclarativeParserStatus, + The QML engine defines an interface class called QQmlParserStatus, which contains a number of virtual methods that are invoked at various stages during component instantiation. To receive these notifications, an - element implementation inherits QDeclarativeParserStatus and notifies the Qt + element implementation inherits QQmlParserStatus and notifies the Qt meta system using the Q_INTERFACES() macro. \code - class Example : public QObject, public QDeclarativeParserStatus + class Example : public QObject, public QQmlParserStatus { Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) public: virtual void componentComplete() { diff --git a/doc/src/qml/qmlevents.qdoc b/doc/src/qml/qmlevents.qdoc index f29b2f260b..1f2e7a9908 100644 --- a/doc/src/qml/qmlevents.qdoc +++ b/doc/src/qml/qmlevents.qdoc @@ -58,9 +58,9 @@ Attempting to declare two signals or methods with the same name in the same type block generates an error. However, a new signal may reuse the name of an existing signal on the type. (This should be done with caution, as the existing signal may be hidden and become inaccessible.) Here are various examples of signal declarations: -\snippet doc/src/snippets/declarative/events.qml parent begin -\snippet doc/src/snippets/declarative/events.qml signal declaration -\snippet doc/src/snippets/declarative/events.qml parent end +\snippet doc/src/snippets/qml/events.qml parent begin +\snippet doc/src/snippets/qml/events.qml signal declaration +\snippet doc/src/snippets/qml/events.qml parent end If the signal has no parameters, the "\c{()}" brackets are optional. If parameters are used, the parameter types must be declared, as for the \c string @@ -69,17 +69,17 @@ and \c variant arguments of the \c perform signal. Adding a signal to an item automatically adds a \i{signal handler} as well. The signal hander is named \c on, with the first letter of the signal in uppercase. The previous signals have the following signal handlers: -\snippet doc/src/snippets/declarative/events.qml signal handler declaration +\snippet doc/src/snippets/qml/events.qml signal handler declaration Further, each QML properties have a \c{Changed} signal and its corresponding \c{onChanged} signal handler. As a result, property changes may notify other components for any changes. -\snippet doc/src/snippets/declarative/events.qml automatic signals +\snippet doc/src/snippets/qml/events.qml automatic signals To emit a signal, invoke it as a method. The signal handler binding is similar to a property binding and it is invoked when the signal is emitted. Use the defined argument names to access the respective arguments. -\snippet doc/src/snippets/declarative/events.qml signal emit +\snippet doc/src/snippets/qml/events.qml signal emit Note that the \c Component.onCompleted is an \l{attached-signalhandlers}{attached signal handler}; it is invoked when the \l Component initialization is complete. @@ -93,7 +93,7 @@ automatically invoked whenever the signal is emitted. This mechanism enables a signal to be received by a method instead of a \l {Signal Handlers}{signal handler}. -\snippet doc/src/snippets/declarative/events.qml connect method +\snippet doc/src/snippets/qml/events.qml connect method The \c {connect()} method is appropriate when connecting a JavaScript method to a signal. @@ -104,7 +104,7 @@ signals. By connecting signals to other signals, the \c connect() method can form different signal chains. -\snippet doc/src/snippets/declarative/events.qml forward signal +\snippet doc/src/snippets/qml/events.qml forward signal Whenever the \l MouseArea \c clicked signal is emitted, the \c send diff --git a/doc/src/qml/qmlintro.qdoc b/doc/src/qml/qmlintro.qdoc index 03ee94d6d1..3290a27bc3 100644 --- a/doc/src/qml/qmlintro.qdoc +++ b/doc/src/qml/qmlintro.qdoc @@ -1197,7 +1197,7 @@ arrange a set of Rectangle items. The Repeater item creates a series of 24 rectangles for the Grid item to position in a 5 by 5 arrangement. \clearfloat -\snippet doc/src/snippets/declarative/repeaters/repeater-grid-index.qml document +\snippet doc/src/snippets/qml/repeaters/repeater-grid-index.qml document The number of items created by a Repeater is held by its \l{Repeater::}{count} property. It is not possible to set this property to determine the number of diff --git a/doc/src/qml/qmlplugins.qdoc b/doc/src/qml/qmlplugins.qdoc index 9b6fe29c1e..e41bba2906 100644 --- a/doc/src/qml/qmlplugins.qdoc +++ b/doc/src/qml/qmlplugins.qdoc @@ -36,16 +36,16 @@ C++ code as plugins. Plugins are imported and labeled as modules and its content are available as components. - QDeclarativeExtensionPlugin is a plugin interface that makes it possible to + QQmlExtensionPlugin is a plugin interface that makes it possible to create QML extensions that can be loaded dynamically into QML applications. These extensions allow custom QML types to be made available to the QML engine. To write a QML extension plugin: \list 1 - \o Subclass QDeclarativeExtensionPlugin - \o Implement QDeclarativeExtensionPlugin's - \l{QDeclarativeExtensionPlugin::}{registerTypes()} method + \o Subclass QQmlExtensionPlugin + \o Implement QQmlExtensionPlugin's + \l{QQmlExtensionPlugin::}{registerTypes()} method \o Register types with qmlRegisterType() \o Export the class using the Q_EXPORT_PLUGIN2() macro \o Write a project file for the plugin @@ -67,8 +67,8 @@ \dots A plugin class, \c QExampleQMLPlugin, is a subclass of - \l QDeclarativeExtensionPlugin and it implements the - \l{QDeclarativeExtensionPlugin::}{registerTypes()} method. + \l QQmlExtensionPlugin and it implements the + \l{QQmlExtensionPlugin::}{registerTypes()} method. In the registerTypes() method, the plugin class can \l{register-c++-type}{register} the \c TimeModel class to the declarative diff --git a/doc/src/qml/qmlruntime.qdoc b/doc/src/qml/qmlruntime.qdoc index 5853c14844..a803fabd7a 100644 --- a/doc/src/qml/qmlruntime.qdoc +++ b/doc/src/qml/qmlruntime.qdoc @@ -35,8 +35,8 @@ Declarative UI engine along with the built-in QML elements and plugin modules, and it also provides access to third-party QML elements and modules. Applications that use QML need to invoke the QML runtime in order to -execute QML documents. This can be done by creating a QDeclarativeView -or a QDeclarativeEngine, as described below. In addition, the Declarative UI +execute QML documents. This can be done by creating a QQuickView +or a QQmlEngine, as described below. In addition, the Declarative UI package includes the \QQV tool, which loads \c .qml files. This tool is useful for developing and testing QML code without the need to write a C++ application to load the QML runtime. @@ -47,17 +47,17 @@ a C++ application to load the QML runtime. To deploy an application that uses QML, the QML runtime must be invoked by the application. This is done by writing a Qt C++ application that loads the -QDeclarativeEngine by either: +QQmlEngine by either: \list -\o Loading the QML file through a QDeclarativeView instance, or -\o Creating a QDeclarativeEngine instance and loading QML files with QDeclarativeComponent +\o Loading the QML file through a QQuickView instance, or +\o Creating a QQmlEngine instance and loading QML files with QQmlComponent \endlist -\section2 Deploying with QDeclarativeView +\section2 Deploying with QQuickView -QDeclarativeView is a QWidget-based class that is able to load QML files. +QQuickView is a QWidget-based class that is able to load QML files. For example, if there is a QML file, \c application.qml, like this: \qml @@ -70,13 +70,13 @@ It can be loaded in a Qt application's \c main.cpp file like this: \code #include - #include + #include int main(int argc, char *argv[]) { QApplication app(argc, argv); - QDeclarativeView view; + QQuickView view; view.setSource(QUrl::fromLocalFile("application.qml")); view.show(); @@ -97,27 +97,27 @@ the \c declarative module for the \c QT variable. For example: \endcode -\section2 Creating a QDeclarativeEngine directly +\section2 Creating a QQmlEngine directly If \c application.qml does not have any graphical components, or if it is -preferred to avoid QDeclarativeView for other reasons, the QDeclarativeEngine +preferred to avoid QQuickView for other reasons, the QQmlEngine can be constructed directly instead. In this case, \c application.qml is -loaded as a QDeclarativeComponent instance rather than placed into a view: +loaded as a QQmlComponent instance rather than placed into a view: \code #include - #include - #include - #include + #include + #include + #include int main(int argc, char *argv[]) { QApplication app(argc, argv); - QDeclarativeEngine engine; - QDeclarativeContext *objectContext = new QDeclarativeContext(engine.rootContext()); + QQmlEngine engine; + QQmlContext *objectContext = new QQmlContext(engine.rootContext()); - QDeclarativeComponent component(&engine, "application.qml"); + QQmlComponent component(&engine, "application.qml"); QObject *object = component.create(objectContext); // ... delete object and objectContext when necessary @@ -127,7 +127,7 @@ loaded as a QDeclarativeComponent instance rather than placed into a view: \endcode See \l {Using QML Bindings in C++ Applications} for more information about using -QDeclarativeEngine, QDeclarativeContext and QDeclarativeComponent, as well +QQmlEngine, QQmlContext and QQmlComponent, as well as details on including QML files through \l{The Qt Resource System}{Qt's Resource system}. diff --git a/doc/src/qml/qmlsyntax.qdoc b/doc/src/qml/qmlsyntax.qdoc index b2b7fc89bd..1cd6ad7f46 100644 --- a/doc/src/qml/qmlsyntax.qdoc +++ b/doc/src/qml/qmlsyntax.qdoc @@ -133,7 +133,7 @@ Commenting in QML is similar to JavaScript. \o Multiline comments start with /* and finish with *\/ \endlist -\snippet doc/src/snippets/declarative/comments.qml 0 +\snippet doc/src/snippets/qml/comments.qml 0 Comments are ignored by the engine. They are useful for explaining what you are doing; for referring back to at a later date, or for others reading diff --git a/doc/src/qml/qmltypes.qdoc b/doc/src/qml/qmltypes.qdoc index 964ff98a15..9555e54f7e 100644 --- a/doc/src/qml/qmltypes.qdoc +++ b/doc/src/qml/qmltypes.qdoc @@ -350,7 +350,7 @@ Q_PROPERTY(int size READ size CONSTANT) Properties that are lists of objects or Qt interfaces are also declared with the Q_PROPERTY() macro. However, list properties must have the type - \l{QDeclarativeListProperty}{QDeclarativeListProperty}. + \l{QQmlListProperty}{QQmlListProperty}. \snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 2 @@ -361,7 +361,7 @@ Q_PROPERTY(int size READ size CONSTANT) \l {Extending QML - Object and List Property Types Example} shows the complete code used to create the \c BirthdayParty type. For more - information, visit \l{QDeclarativeListProperty}{QDeclarativeListProperty} + information, visit \l{QQmlListProperty}{QQmlListProperty} for creating list properties. \section2 Sequence Types @@ -756,8 +756,8 @@ itself, the QML engine sets up an association between the value source and the property. 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 +QQmlPropertyValueSource base class. This base class contains a single method, +QQmlPropertyValueSource::setTarget(), that the QML engine invokes when associating the property value source with a property. The relevant part of the \c HappyBirthdaySong type declaration looks like this: @@ -771,7 +771,7 @@ 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 \l {QDeclarativePropertyValueSource::}{setTarget()} method. This allows +assignment fails does the engine call the \l {QQmlPropertyValueSource::}{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 diff --git a/doc/src/qml/qmlviewer.qdoc b/doc/src/qml/qmlviewer.qdoc index 6439e95f4e..9006a053fc 100644 --- a/doc/src/qml/qmlviewer.qdoc +++ b/doc/src/qml/qmlviewer.qdoc @@ -160,7 +160,7 @@ QtObject { property int time: 54321 } \endqml To replace this with real data, you can simply bind the real data object to -the root context in C++ using QDeclarativeContext::setContextProperty(). This +the root context in C++ using QQmlContext::setContextProperty(). This is detailed in \l {Using QML Bindings in C++ Applications}. \section1 Using the \c runtime object diff --git a/doc/src/qml/qtbinding.qdoc b/doc/src/qml/qtbinding.qdoc index 10581857dc..7410836e9c 100644 --- a/doc/src/qml/qtbinding.qdoc +++ b/doc/src/qml/qtbinding.qdoc @@ -43,12 +43,12 @@ You may want to mix QML and C++ for a number of reasons. For example: \o To use functionality defined in a C++ source (for example, when using a C++ Qt-based data model, or calling functions in a third-party C++ library) \o To access functionality in the Qt Declarative module (for example, to dynamically generate -images using QDeclarativeImageProvider) +images using QQmlImageProvider) \o To write your own QML elements (whether for your applications, or for distribution to others) \endlist To use the Qt Declarative module, you must include and link to the module appropriately, as shown on -the \l {QtDeclarative}{module index page}. The \l {Qt Declarative UI Runtime} documentation +the \l {QtQml}{module index page}. The \l {Qt Declarative UI Runtime} documentation shows how to build a basic C++ application that uses this module. @@ -59,32 +59,32 @@ embedding QML into C++ applications. There are several core classes in the Qt De that provide the essential capabilities for doing this. These are: \list -\o QDeclarativeEngine: A QML engine provides the environment for executing QML code. Every +\o QQmlEngine: A QML engine provides the environment for executing QML code. Every application requires at least one engine instance. -\o QDeclarativeComponent: A component encapsulates a \l{QML Documents}{QML document}. -\o QDeclarativeContext: A context allows an application to expose data to the QML components +\o QQmlComponent: A component encapsulates a \l{QML Documents}{QML document}. +\o QQmlContext: A context allows an application to expose data to the QML components created by an engine. \endlist -A QDeclarativeEngine allows the configuration of global settings that apply to all of its QML +A QQmlEngine allows the configuration of global settings that apply to all of its QML component instances: for example, the QNetworkAccessManager to be used for network communications, and the file path to be used for persistent storage. -QDeclarativeComponent is used to load QML documents. Each QDeclarativeComponent instance represents +QQmlComponent is used to load QML documents. Each QQmlComponent instance represents a single document. A component can be created from the URL or file path of a QML document, or the raw QML code of the document. Component instances are instatiated through the -QDeclarativeComponent::create() method, like this: +QQmlComponent::create() method, like this: \code -QDeclarativeEngine engine; -QDeclarativeComponent component(&engine, QUrl::fromLocalFile("MyRectangle.qml")); +QQmlEngine engine; +QQmlComponent component(&engine, QUrl::fromLocalFile("MyRectangle.qml")); QObject *rectangleInstance = component.create(); // ... delete rectangleInstance; \endcode -QML documents can also be loaded using QDeclarativeView. This class provides a convenient +QML documents can also be loaded using QQuickView. This class provides a convenient QWidget-based view for embedding QML components into QGraphicsView-based applications. (For other methods of integrating QML into QWidget-based applications, see \l {Integrating QML Code with existing Qt UI code}.) @@ -108,41 +108,41 @@ these methods throughout your application as appropriate. \section2 Loading QML Components from C++ -A QML document can be loaded with QDeclarativeComponent or QDeclarativeView. QDeclarativeComponent -loads a QML component as a C++ object; QDeclarativeView also does this, +A QML document can be loaded with QQmlComponent or QQuickView. QQmlComponent +loads a QML component as a C++ object; QQuickView also does this, but additionally loads the QML component directly into a QGraphicsView. It is convenient for loading a displayable QML component into a QWidget-based application. For example, suppose there is a \c MyItem.qml file that looks like this: -\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml start -\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml end +\snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml start +\snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml end -This QML document can be loaded with QDeclarativeComponent or QDeclarativeView with the following -C++ code. Using a QDeclarativeComponent requires calling QDeclarativeComponent::create() to create -a new instance of the component, while a QDeclarativeView automatically creates an instance of the -component, which is accessible via QDeclarativeView::rootObject(): +This QML document can be loaded with QQmlComponent or QQuickView with the following +C++ code. Using a QQmlComponent requires calling QQmlComponent::create() to create +a new instance of the component, while a QQuickView automatically creates an instance of the +component, which is accessible via QQuickView::rootObject(): \table \row \o -\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeComponent-a +\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQmlComponent-a \dots 0 -\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeComponent-b +\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQmlComponent-b \o -\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeView +\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQuickView \endtable This \c object is the instance of the \c MyItem.qml component that has been created. You can now -modify the item's properties using QObject::setProperty() or QDeclarativeProperty: +modify the item's properties using QObject::setProperty() or QQmlProperty: -\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp properties +\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp properties Alternatively, you can cast the object to its actual type and call functions with compile-time safety. In this case the base object of \c MyItem.qml is an \l Item, which is defined by the -QDeclarativeItem class: +QQuickItem class: -\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp cast +\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp cast You can also connect to any signals or call functions defined in the component using QMetaObject::invokeMethod() and QObject::connect(). See \l {Exchanging data between QML and C++} @@ -154,14 +154,14 @@ QML components are essentially object trees with children that have siblings and Child objects of QML components can be located using the QObject::objectName property with QObject::findChild(). For example, if the root item in \c MyItem.qml had a child \l Rectangle item: -\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml start +\snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml start \codeline -\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml child -\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml end +\snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml child +\snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml end The child could be located like this: -\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp findChild +\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp findChild If \c objectName is used inside a delegate of a ListView, \l Repeater or some other element that creates multiple instances of its delegates, there will be multiple children with @@ -181,18 +181,18 @@ the QML user interface implementation and the composition of the QML object tree \section2 Embedding C++ Objects into QML Components When loading a QML scene into a C++ application, it can be useful to directly embed C++ data into -the QML object. QDeclarativeContext enables this by exposing data to the context of a QML +the QML object. QQmlContext enables this by exposing data to the context of a QML component, allowing data to be injected from C++ into QML. For example, here is a QML item that refers to a \c currentDateTime value that does not exist in the current scope: -\snippet doc/src/snippets/declarative/qtbinding/context/MyItem.qml 0 +\snippet doc/src/snippets/qml/qtbinding/context/MyItem.qml 0 This \c currentDateTime value can be set directly by the C++ application that loads the QML -component, using QDeclarativeContext::setContextProperty(): +component, using QQmlContext::setContextProperty(): -\snippet doc/src/snippets/declarative/qtbinding/context/main.cpp 0 +\snippet doc/src/snippets/qml/qtbinding/context/main.cpp 0 Context properties can hold either QVariant or QObject* values. This means custom C++ objects can also be injected using this approach, and these objects can be modified and read directly in QML. @@ -202,11 +202,11 @@ invokes a method on the object instance: \table \row \o -\snippet doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h 0 +\snippet doc/src/snippets/qml/qtbinding/context-advanced/applicationdata.h 0 \codeline -\snippet doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp 0 +\snippet doc/src/snippets/qml/qtbinding/context-advanced/main.cpp 0 \o -\snippet doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml 0 +\snippet doc/src/snippets/qml/qtbinding/context-advanced/MyItem.qml 0 \endtable (Note that date/time values returned from C++ to QML can be formatted through @@ -217,7 +217,7 @@ If the QML item needs to receive signals from the context property, it can conne dataChanged(), this signal can be connected to using an \c onDataChanged handler within a \l Connections object: -\snippet doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml 0 +\snippet doc/src/snippets/qml/qtbinding/context-advanced/connections.qml 0 Context properties can be useful for using C++ based data models in a QML view. See the \l {declarative/modelviews/stringlistmodel}{String ListModel}, @@ -226,7 +226,7 @@ Context properties can be useful for using C++ based data models in a QML view. respective examples on using QStringListModel, QObjectList-based models and QAbstractItemModel in QML views. -Also see the QDeclarativeContext documentation for more information. +Also see the QQmlContext documentation for more information. \section2 Defining New QML Elements @@ -236,30 +236,30 @@ defined by C++ classes; in fact, many of the core \l {QML Elements} are implemen C++ classes. When you create a QML object using one of these elements, you are simply creating an instance of a QObject-based C++ class and setting its properties. -To create a visual item that fits in with the Qt Quick elements, base your class off \l QDeclarativeItem instead of QObject directly. -You can then implement your own painting and functionality like any other QGraphicsObject. Note that QGraphicsItem::ItemHasNoContents is set by default on QDeclarativeItem because +To create a visual item that fits in with the Qt Quick elements, base your class off \l QQuickItem instead of QObject directly. +You can then implement your own painting and functionality like any other QGraphicsObject. Note that QGraphicsItem::ItemHasNoContents is set by default on QQuickItem because it does not paint anything; you will need to clear this if your item is supposed to paint anything (as opposed to being solely for input handling or logical grouping). For example, here is an \c ImageViewer class with an \c image URL property: -\snippet doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h 0 +\snippet doc/src/snippets/qml/qtbinding/newelements/imageviewer.h 0 -Aside from the fact that it inherits QDeclarativeItem, this is an ordinary class that could +Aside from the fact that it inherits QQuickItem, this is an ordinary class that could exist outside of QML. However, once it is registered with the QML engine using qmlRegisterType(): -\snippet doc/src/snippets/declarative/qtbinding/newelements/main.cpp register +\snippet doc/src/snippets/qml/qtbinding/newelements/main.cpp register -Then, any QML code loaded by your C++ application or \l{QDeclarativeExtensionPlugin}{plugin} can create and manipulate +Then, any QML code loaded by your C++ application or \l{QQmlExtensionPlugin}{plugin} can create and manipulate \c ImageViewer objects: -\snippet doc/src/snippets/declarative/qtbinding/newelements/standalone.qml 0 +\snippet doc/src/snippets/qml/qtbinding/newelements/standalone.qml 0 -It is advised that you avoid using QGraphicsItem functionality beyond the properties documented in QDeclarativeItem. +It is advised that you avoid using QGraphicsItem functionality beyond the properties documented in QQuickItem. This is because the GraphicsView backend is intended to be an implementation detail for QML, so the QtQuick items can be moved to faster backends as they become available with no change from a QML perspective. -To minimize any porting requirements for custom visual items, try to stick to the documented properties in QDeclarativeItem where possible. Properties QDeclarativeItem inherits but doesn't document are classed as implementation details; they are not officially supported and may disappear between releases. +To minimize any porting requirements for custom visual items, try to stick to the documented properties in QQuickItem where possible. Properties QQuickItem inherits but doesn't document are classed as implementation details; they are not officially supported and may disappear between releases. -Note that custom C++ types do not have to inherit from QDeclarativeItem; this is only necessary if it is +Note that custom C++ types do not have to inherit from QQuickItem; this is only necessary if it is a displayable item. If the item is not displayable, it can simply inherit from QObject. For more information on defining new QML elements, see the \l {Tutorial: Writing QML extensions with C++} @@ -286,8 +286,8 @@ QMetaObject::invokeMethod(). Here is a C++ application that uses this to call a \table \row -\o \snippet doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml 0 -\o \snippet doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp 0 +\o \snippet doc/src/snippets/qml/qtbinding/functions-qml/MyItem.qml 0 +\o \snippet doc/src/snippets/qml/qtbinding/functions-qml/main.cpp 0 \endtable Notice the Q_RETURN_ARG() and Q_ARG() arguments for QMetaObject::invokeMethod() must be specified as @@ -295,16 +295,16 @@ QVariant types, as this is the generic data type used for QML functions and retu To call a C++ function from QML, the function must be either a Qt slot, or a function marked with the Q_INVOKABLE macro, to be available to QML. In the following example, the QML code invokes -methods on the \c myObject object, which has been set using QDeclarativeContext::setContextProperty(): +methods on the \c myObject object, which has been set using QQmlContext::setContextProperty(): \table \row \o -\snippet doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml 0 +\snippet doc/src/snippets/qml/qtbinding/functions-cpp/MyItem.qml 0 \o -\snippet doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h 0 +\snippet doc/src/snippets/qml/qtbinding/functions-cpp/myclass.h 0 \codeline -\snippet doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp 0 +\snippet doc/src/snippets/qml/qtbinding/functions-cpp/main.cpp 0 \endtable QML supports the calling of overloaded C++ functions. If there are multiple C++ functions with the @@ -325,11 +325,11 @@ is emitted: \table \row \o -\snippet doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml 0 +\snippet doc/src/snippets/qml/qtbinding/signals-qml/MyItem.qml 0 \o -\snippet doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h 0 +\snippet doc/src/snippets/qml/qtbinding/signals-qml/myclass.h 0 \codeline -\snippet doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp 0 +\snippet doc/src/snippets/qml/qtbinding/signals-qml/main.cpp 0 \endtable To connect to Qt C++ signals from within QML, use a signal handler with the \c on syntax. @@ -342,12 +342,12 @@ C++ object are connected to through \c onImagedChanged and \c onLoadingError sig \row \o -\snippet doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h start +\snippet doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h start \dots 4 -\snippet doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h end +\snippet doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h end \o -\snippet doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml 0 +\snippet doc/src/snippets/qml/qtbinding/signals-cpp/standalone.qml 0 \endtable (Note that if a signal has been declared as the NOTIFY signal for a property, QML allows it to be @@ -357,13 +357,13 @@ received with an \c onChanged handler even if the signal's name does n If, however, the object with the signal is not created from within the QML code, and the QML item only has a reference to the created object - for example, if the object was set using -QDeclarativeContext::setContextProperty() - then the \l Connections element can be used +QQmlContext::setContextProperty() - then the \l Connections element can be used instead to create the signal handler: \table \row -\o \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp connections -\o \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml 0 +\o \snippet doc/src/snippets/qml/qtbinding/signals-cpp/main.cpp connections +\o \snippet doc/src/snippets/qml/qtbinding/signals-cpp/MyItem.qml 0 \endtable C++ signals can use enum values as parameters provided that the enum is declared in the @@ -376,14 +376,14 @@ See \l {Using enumerations of a custom type} below for details. Any properties declared in a QML object are automatically accessible from C++. Given a QML item like this: -\snippet doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml 0 +\snippet doc/src/snippets/qml/qtbinding/properties-qml/MyItem.qml 0 -The value of the \c someNumber property can be set and read using QDeclarativeProperty, or +The value of the \c someNumber property can be set and read using QQmlProperty, or QObject::setProperty() and QObject::property(): -\snippet doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp 0 +\snippet doc/src/snippets/qml/qtbinding/properties-qml/main.cpp 0 -You should always use QObject::setProperty(), QDeclarativeProperty or QMetaProperty::write() to +You should always use QObject::setProperty(), QQmlProperty or QMetaProperty::write() to change a QML property value, to ensure the QML engine is made aware of the property change. For example, say you have a custom element \c PushButton with a \c buttonText property that internally reflects the value of a \c m_buttonText member variable. Modifying the member variable directly like this is @@ -391,7 +391,7 @@ not a good idea: \badcode // BAD! -QDeclarativeComponent component(engine, "MyButton.qml"); +QQmlComponent component(engine, "MyButton.qml"); PushButton *button = qobject_cast(component.create()); button->m_buttonText = "Click me"; \endcode @@ -410,8 +410,8 @@ property. This property can be written to and read from QML: \table \row -\o \snippet doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h 0 -\o \snippet doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml 0 +\o \snippet doc/src/snippets/qml/qtbinding/properties-cpp/applicationdata.h 0 +\o \snippet doc/src/snippets/qml/qtbinding/properties-cpp/MyItem.qml 0 \endtable Notice the \c backgroundColorChanged signal is declared as the NOTIFY signal for the @@ -468,8 +468,8 @@ converted to JavaScript array and object values, repectively: \o String format \o Example \row -\o \snippet doc/src/snippets/declarative/qtbinding/variantlistmap/MyItem.qml 0 -\o \snippet doc/src/snippets/declarative/qtbinding/variantlistmap/main.cpp 0 +\o \snippet doc/src/snippets/qml/qtbinding/variantlistmap/MyItem.qml 0 +\o \snippet doc/src/snippets/qml/qtbinding/variantlistmap/main.cpp 0 \endtable This produces output like: @@ -492,13 +492,13 @@ side, and is automatically converted to a QVariantList or QVariantMap when it is To use an enumeration from a custom C++ component, the enumeration must be declared with Q_ENUMS() to register it with Qt's meta object system. For example, the following C++ type has a \c Status enum: -\snippet doc/src/snippets/declarative/qtbinding/enums/imageviewer.h start -\snippet doc/src/snippets/declarative/qtbinding/enums/imageviewer.h end +\snippet doc/src/snippets/qml/qtbinding/enums/imageviewer.h start +\snippet doc/src/snippets/qml/qtbinding/enums/imageviewer.h end Providing the \c ImageViewer class has been registered using qmlRegisterType(), its \c Status enum can now be used from QML: -\snippet doc/src/snippets/declarative/qtbinding/enums/standalone.qml 0 +\snippet doc/src/snippets/qml/qtbinding/enums/standalone.qml 0 The C++ type must be registered with QML to use its enums. If your C++ type is not instantiable, it can be registered using qmlRegisterUncreatableType(). To be accessible from QML, the names of enum values @@ -525,7 +525,7 @@ function, the enum type must be registered using qRegisterMetaType(). For QML signals, enum values may be used as signal parameters using the \c int type: -\snippet doc/src/snippets/declarative/qtbinding/enums/standalone.qml 1 +\snippet doc/src/snippets/qml/qtbinding/enums/standalone.qml 1 \section2 Automatic Type Conversion from Strings @@ -594,11 +594,11 @@ a QColor-type property or to call a C++ function that requires a QColor paramete \section1 Writing QML plugins -The Qt Declarative module includes the QDeclarativeExtensionPlugin class, which is an abstract +The Qt Declarative module includes the QQmlExtensionPlugin class, which is an abstract class for writing QML plugins. This allows QML extension types to be dynamically loaded into QML applications. -See the QDeclarativeExtensionPlugin documentation and \l {How to Create Qt Plugins} for more +See the QQmlExtensionPlugin documentation and \l {How to Create Qt Plugins} for more details. @@ -643,22 +643,22 @@ project The \c main.qml and \c background.png files will be packaged as resource files. This is done in the \c example.qrc resource collection file: -\quotefile doc/src/snippets/declarative/qtbinding/resources/example.qrc +\quotefile doc/src/snippets/qml/qtbinding/resources/example.qrc Since \c background.png is a resource file, \c main.qml can refer to it using the relative path specified in \c example.qrc: -\snippet doc/src/snippets/declarative/qtbinding/resources/main.qml 0 +\snippet doc/src/snippets/qml/qtbinding/resources/main.qml 0 To allow QML to locate resource files correctly, the \c main.cpp loads the main QML file, \c main.qml, as a resource file using the \c qrc scheme: -\snippet doc/src/snippets/declarative/qtbinding/resources/main.cpp 0 +\snippet doc/src/snippets/qml/qtbinding/resources/main.cpp 0 Finally \c project.pro uses the RESOURCES variable to indicate that \c example.qrc should be used to build the application resources: -\quotefile doc/src/snippets/declarative/qtbinding/resources/resources.pro +\quotefile doc/src/snippets/qml/qtbinding/resources/resources.pro See \l {The Qt Resource System} for more information. diff --git a/doc/src/qml/qtdeclarative.qdoc b/doc/src/qml/qtdeclarative.qdoc index c4b59fb07b..9d14f7fc57 100644 --- a/doc/src/qml/qtdeclarative.qdoc +++ b/doc/src/qml/qtdeclarative.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \module QtDeclarative + \module QtQml \title Qt Declarative Module \ingroup modules @@ -37,7 +37,7 @@ following directive: \code - #include + #include \endcode To link against the module, add this line to your \l qmake \c @@ -54,16 +54,16 @@ /*! \macro QML_DECLARE_TYPE() - \relates QDeclarativeEngine + \relates QQmlEngine - Equivalent to \c Q_DECLARE_METATYPE(TYPE *) and \c Q_DECLARE_METATYPE(QDeclarativeListProperty) + Equivalent to \c Q_DECLARE_METATYPE(TYPE *) and \c Q_DECLARE_METATYPE(QQmlListProperty) - #include to use this macro. + #include to use this macro. */ /*! \macro QML_DECLARE_TYPEINFO(Type,Flags) - \relates QDeclarativeEngine + \relates QQmlEngine Declares additional properties of the given \a Type as described by the specified \a Flags. @@ -71,13 +71,13 @@ Current the only supported type info is \c QML_HAS_ATTACHED_PROPERTIES which declares that the \a Type supports \l {Attached Properties}. - #include to use this macro. + #include to use this macro. */ /*! \fn int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) - \relates QDeclarativeEngine + \relates QQmlEngine 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 @@ -105,7 +105,7 @@ "com.mycompany.qmlcomponents": \code - #include + #include ... @@ -131,7 +131,7 @@ /*! \fn int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor) - \relates QDeclarativeEngine + \relates QQmlEngine This template function registers the specified revision of a C++ type in the QML system with the library imported from \a uri having the version number composed @@ -150,7 +150,7 @@ /*! \fn int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message) - \relates QDeclarativeEngine + \relates QQmlEngine 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 @@ -163,14 +163,14 @@ Returns the QML type id. - #include to use this function. + #include to use this function. \sa qmlRegisterTypeNotAvailable() */ /*! \fn int qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message) - \relates QDeclarativeEngine + \relates QQmlEngine 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 @@ -200,40 +200,40 @@ Without this, a generic "Game is not a type" message would be given. - #include to use this function. + #include to use this function. \sa qmlRegisterUncreatableType() */ /*! \fn int qmlRegisterType() - \relates QDeclarativeEngine + \relates QQmlEngine \overload This template function registers the C++ type in the QML system. Instances of this type cannot be created from the QML system. - #include to use this function. + #include to use this function. Returns the QML type id. */ /*! \fn int qmlRegisterInterface(const char *typeName) - \relates QDeclarativeEngine + \relates QQmlEngine This template function registers the C++ type in the QML system under the name \a typeName. - #include to use this function. + #include to use this function. Returns the QML type id. */ /*! - \fn int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, QJSValue (*callback)(QDeclarativeEngine *, QJSEngine *)) - \relates QDeclarativeEngine + \fn int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, QJSValue (*callback)(QQmlEngine *, QJSEngine *)) + \relates QQmlEngine This function may be used to register a module API provider \a callback in a particular \a uri with a version specified in \a versionMajor and \a versionMinor. @@ -250,7 +250,7 @@ Usage: \code // first, define the module API provider function (callback). - static QJSValue *example_qjsvalue_module_api_provider(QDeclarativeEngine *engine, QJSEngine *scriptEngine) + static QJSValue *example_qjsvalue_module_api_provider(QQmlEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(engine) @@ -278,8 +278,8 @@ */ /*! - \fn int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, QObject *(*callback)(QDeclarativeEngine *, QJSEngine *)) - \relates QDeclarativeEngine + \fn int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, QObject *(*callback)(QQmlEngine *, QJSEngine *)) + \relates QQmlEngine This function may be used to register a module API provider \a callback in a particular \a uri with a version specified in \a versionMajor and \a versionMinor. @@ -325,7 +325,7 @@ }; // second, define the module API provider function (callback). - static QObject *example_qobject_module_api_provider(QDeclarativeEngine *engine, QJSEngine *scriptEngine) + static QObject *example_qobject_module_api_provider(QQmlEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(engine) Q_UNUSED(scriptEngine) diff --git a/doc/src/qml/qtprogrammers.qdoc b/doc/src/qml/qtprogrammers.qdoc index 215f71859c..9338a2c29f 100644 --- a/doc/src/qml/qtprogrammers.qdoc +++ b/doc/src/qml/qtprogrammers.qdoc @@ -44,7 +44,7 @@ QML provides direct access to the following concepts from Qt: \o QAction - the \l {QML Basic Types}{action} type \o QObject signals and slots - available as functions to call in JavaScript \o QObject properties - available as variables in JavaScript - \o QWidget - QDeclarativeView is a QML-displaying widget + \o QWidget - QQuickView is a QML-displaying widget \o Qt models - used directly in data binding (QAbstractItemModel) \endlist @@ -71,12 +71,12 @@ QML Items also serve these purposes. Each is considered separately below. \section2 Simple Widgets -The most important rule to remember while implementing a new QDeclarativeItem in C++ +The most important rule to remember while implementing a new QQuickItem in C++ is that it should not contain any look and feel policies; leave that to the QML usage of the item. As an example, imagine you wanted a reusable Button item. If you therefore decided -to write a QDeclarativeItem subclass to implement a button, just as QToolButton +to write a QQuickItem subclass to implement a button, just as QToolButton subclasses QWidget for this purpose, following the rule above, your \c QDeclarativeButton would not have any appearance; just the notions of enabled, triggering, etc. @@ -92,7 +92,7 @@ between states, and exactly how it responds to mouse, key, or touch input, shoul all be left for definition in QML. It is illustrative to note that QDeclarativeTextEdit is built upon QTextControl, -QDeclarativeWebView is built upon QWebPage, and ListView uses QAbstractItemModel, +QQuickWebView is built upon QWebPage, and ListView uses QAbstractItemModel, just as QTextEdit, QWebView, and QListView are built upon those same UI-agnostic components. @@ -167,7 +167,7 @@ QGraphicsWidgets are usually designed to be laid out with QGraphicsLayouts. QML not use QGraphicsLayouts, as the Qt layouts do not mix well with animated and fluid UIs, so the geometry interface is one of the main differences. When writing QML elements, you allow the designers to place their bounding rectangle using absolute -geometry, bindings or anchors (all set up for you when you inherit QDeclarativeItem) +geometry, bindings or anchors (all set up for you when you inherit QQuickItem) and you do not use layouts or size hints. If size hints are appropriate, then place them in the QML documentation so that the designers know how to use the item best, but still have complete control over the look and feel. @@ -182,14 +182,14 @@ look and feel (which involves the UI logic) can be written in QML. Both differences are caused by the different method of interaction. QGraphicsWidget is a QGraphicsObject subclass which makes fluid UI development from C++ easier, and -QDeclarativeItem is a QGraphicsObject subclass which makes fluid UI development +QQuickItem is a QGraphicsObject subclass which makes fluid UI development from QML easier. The difference, therefore, is primarily one of the interface exposed, and the design of the items that come with it; the declarative primitives for QML and nothing for QGraphicsWidget, because you need to write your own UI logic into the subclass. If you wish to use both QML and C++ to write the UI, for example to ease the -transition period, it is recommended to use QDeclarativeItem subclasses, although +transition period, it is recommended to use QQuickItem subclasses, although you can use QGraphicsWidgets as well. To allow for easier use from C++, make the root item of each C++ component a \l LayoutItem, and load individual "widgets" of QML (possibly comprised of multiple files, and containing a self-contained bundle diff --git a/doc/src/qtquick2/animation.qdoc b/doc/src/qtquick2/animation.qdoc index 626571f50e..cf656fb209 100644 --- a/doc/src/qtquick2/animation.qdoc +++ b/doc/src/qtquick2/animation.qdoc @@ -76,14 +76,14 @@ There are several ways of setting animation to an object. To create an immediate movement or animated movement, set the property value directly. This may be done in signal handlers or attached properties. -\snippet doc/src/snippets/declarative/animation.qml direct property change +\snippet doc/src/snippets/qml/animation.qml direct property change However, to create more control, \i {property animations} apply smooth movements by interpolating values between property value changes. Property animations provide timing controls and allows different interpolations through \l{qml-easing-animation}{easing curves}. -\snippet doc/src/snippets/declarative/animation.qml property animation +\snippet doc/src/snippets/qml/animation.qml property animation Specialized \l{qml-property-animation-elements}{property animation elements} have more efficient implementations than the \l{PropertyAnimation} element. They @@ -112,14 +112,14 @@ change from the \c pressed state to the \c released state. Likewise, there would be an animation during the change from the \c released state to the \c pressed state. -\snippet doc/src/snippets/declarative/animation.qml transition animation +\snippet doc/src/snippets/qml/animation.qml transition animation Binding the \c to and \c from properties to the state's name will assign that particular transition to the state change. For simple or symmetric transitions, setting the to \c to property to the wild card symbol, "\c{*}", denotes that the transition applies to any state change. -\snippet doc/src/snippets/declarative/animation.qml wildcard animation +\snippet doc/src/snippets/qml/animation.qml wildcard animation \section2 Default Animation as Behaviors @@ -133,7 +133,7 @@ A ball component might have a behavior animation assigned to its \c x, \c y, and elastic effect. In effect, this behavior animation would apply the elastic effect to the properties whenever the ball moves. -\snippet doc/src/snippets/declarative/animation.qml behavior animation +\snippet doc/src/snippets/qml/animation.qml behavior animation There are several methods of assigning behavior animations to properties. The \c{Behavior on } declaration is a convenient way of assigning a @@ -156,7 +156,7 @@ object. Using the \l{SequentialAnimation} element, the opacity animations will play after the preceding animation finishes. The \l{ParallelAnimation} element will play the animations at the same time. -\snippet doc/src/snippets/declarative/animation.qml sequential animation +\snippet doc/src/snippets/qml/animation.qml sequential animation Once individual animations are placed into a SequentialAnimation or ParallelAnimation, they can no longer be started and stopped independently. The @@ -257,15 +257,15 @@ Rectangle { -\snippet doc/src/snippets/declarative/animation-elements.qml color -\snippet doc/src/snippets/declarative/animation-propertyvaluesource.qml 0 -\snippet doc/src/snippets/declarative/animation-signalhandler.qml 0 -\snippet doc/src/snippets/declarative/animation-standalone.qml 0 +\snippet doc/src/snippets/qml/animation-elements.qml color +\snippet doc/src/snippets/qml/animation-propertyvaluesource.qml 0 +\snippet doc/src/snippets/qml/animation-signalhandler.qml 0 +\snippet doc/src/snippets/qml/animation-standalone.qml 0 -\snippet doc/src/snippets/declarative/animation-transitions.qml 0 -\snippet doc/src/snippets/declarative/animation-groups.qml 0 +\snippet doc/src/snippets/qml/animation-transitions.qml 0 +\snippet doc/src/snippets/qml/animation-groups.qml 0 -\snippet doc/src/snippets/declarative/animation-groups.qml 1 -\snippet doc/src/snippets/declarative/animation-groups.qml 0 +\snippet doc/src/snippets/qml/animation-groups.qml 1 +\snippet doc/src/snippets/qml/animation-groups.qml 0 \image propanim.gif diff --git a/doc/src/qtquick2/focus.qdoc b/doc/src/qtquick2/focus.qdoc index 05d797e7be..e2c4c79d3c 100644 --- a/doc/src/qtquick2/focus.qdoc +++ b/doc/src/qtquick2/focus.qdoc @@ -43,7 +43,7 @@ and to address some of the cases unique to fluid user interfaces, the QML items When the user presses or releases a key, the following occurs: \list 1 \o Qt receives the key action and generates a key event. -\o If the Qt widget containing the \l QDeclarativeView has focus, the key event +\o If the Qt widget containing the \l QQuickView has focus, the key event is delivered to it. Otherwise, regular Qt key handling continues. \o The key event is delivered by the scene to the QML \l Item with \i {active focus}. If no Item has active focus, the key event is @@ -56,8 +56,8 @@ If the \c {Rectangle} element in the following example has active focus and the it will bubble up to its parent. However, pressing the \c B key will bubble up to the root item and thus subsequently be ignored. -\snippet doc/src/snippets/declarative/focus/rectangle.qml simple key event -\snippet doc/src/snippets/declarative/focus/rectangle.qml simple key event end +\snippet doc/src/snippets/qml/focus/rectangle.qml simple key event +\snippet doc/src/snippets/qml/focus/rectangle.qml simple key event end \o If the root \l Item is reached, the key event is \l {QEvent::ignore()}{ignored} and regular Qt key handling continues. @@ -71,7 +71,7 @@ Whether or not an \l Item has active focus can be queried through the property \c {Item::activeFocus} property. For example, here we have a \l Text element whose text is determined by whether or not it has active focus. -\snippet doc/src/snippets/declarative/focus/rectangle.qml active focus +\snippet doc/src/snippets/qml/focus/rectangle.qml active focus \section1 Acquiring Focus and Focus Scopes @@ -82,7 +82,7 @@ sufficient. If we run the following example with the \l {QML Viewer}, we see tha the \c {keyHandler} element has active focus and pressing the \c A, \c B, or \c C keys modifies the text appropriately. -\snippet doc/src/snippets/declarative/focus/basicwidget.qml focus true +\snippet doc/src/snippets/qml/focus/basicwidget.qml focus true \image declarative-qmlfocus1.png @@ -95,10 +95,10 @@ set the first one to have focus. The intention is that when the \c A, \c B, or responds accordingly. The code that imports and creates two MyWidget instances: -\snippet doc/src/snippets/declarative/focus/widget.qml window +\snippet doc/src/snippets/qml/focus/widget.qml window The MyWidget code: -\snippet doc/src/snippets/declarative/focus/MyWidget.qml mywidget +\snippet doc/src/snippets/qml/focus/MyWidget.qml mywidget We would like to have the first MyWidget object to have the focus by setting its \c focus property to \c true. However, by running the code, we can confirm that @@ -126,7 +126,7 @@ A focus scope is created by declaring the \l FocusScope element. In the next example, a \l FocusScope element is added to the component, and the visual result shown. -\snippet doc/src/snippets/declarative/focus/myfocusscopewidget.qml widget in focusscope +\snippet doc/src/snippets/qml/focus/myfocusscopewidget.qml widget in focusscope \image declarative-qmlfocus3.png @@ -158,10 +158,10 @@ Now, clicking either MyClickableWidget gives it focus and the other widget loses the focus. The code that imports and creates two MyClickableWidget instances: -\snippet doc/src/snippets/declarative/focus/clickablewidget.qml clickable window +\snippet doc/src/snippets/qml/focus/clickablewidget.qml clickable window The MyClickableWidget code: -\snippet doc/src/snippets/declarative/focus/MyClickableWidget.qml clickable in focusscope +\snippet doc/src/snippets/qml/focus/MyClickableWidget.qml clickable in focusscope \image declarative-qmlfocus4.png @@ -188,7 +188,7 @@ current item delegate to react to key presses. This contrived example shows how this works. Pressing the \c Return key will print the name of the current list item. -\snippet doc/src/snippets/declarative/focus/advancedFocus.qml FocusScope delegate +\snippet doc/src/snippets/qml/focus/advancedFocus.qml FocusScope delegate \image declarative-qmlfocus5.png diff --git a/doc/src/qtquick2/modelview.qdoc b/doc/src/qtquick2/modelview.qdoc index 56c726eab8..5d799027ad 100644 --- a/doc/src/qtquick2/modelview.qdoc +++ b/doc/src/qtquick2/modelview.qdoc @@ -80,13 +80,13 @@ To visualize data, bind the view's \c model property to a model and the Suppose that a specific club wants to decorate its members list with its brand colors. A member list is in a \c model and the \c delegate will display the model's content. - \snippet doc/src/snippets/declarative/listview-decorations.qml model - \snippet doc/src/snippets/declarative/listview-decorations.qml delegate + \snippet doc/src/snippets/qml/listview-decorations.qml model + \snippet doc/src/snippets/qml/listview-decorations.qml delegate The club may decorate the members list by binding visual objects to the \c header and \c footer properties. The visual object may be defined inline, in another file, or in a \l {Component} element. - \snippet doc/src/snippets/declarative/listview-decorations.qml decorations + \snippet doc/src/snippets/qml/listview-decorations.qml decorations \image listview-decorations.png \section2 Mouse and Touch Handling @@ -110,8 +110,8 @@ To visualize data, bind the view's \c model property to a model and the A list may contain a list indicating people's names and the team on which team the person belongs. - \snippet doc/src/snippets/declarative/listview-sections.qml model - \snippet doc/src/snippets/declarative/listview-sections.qml delegate + \snippet doc/src/snippets/qml/listview-sections.qml model + \snippet doc/src/snippets/qml/listview-sections.qml delegate The ListView element has the \c section \l{Property Binding in QML#Attached Properties}{attached property} that can combine adjacent and related @@ -119,7 +119,7 @@ To visualize data, bind the view's \c model property to a model and the which list element property to use as sections. The \c criteria can dictate how the section names are displayed and the \c delegate is similar to the views' \l {qml-view-delegate}{delegate} property. - \snippet doc/src/snippets/declarative/listview-sections.qml section + \snippet doc/src/snippets/qml/listview-sections.qml section \image listview-section.png \keyword qml-view-delegate @@ -129,7 +129,7 @@ To visualize data, bind the view's \c model property to a model and the visualize each item list according to the template defined by the delegate. Items in a model are accessible through the \c index property as well as the item's properties. - \snippet doc/src/snippets/declarative/listview.qml delegate + \snippet doc/src/snippets/qml/listview.qml delegate \image listview-setup.png \section2 Accessing Views and Models from Delegates @@ -150,7 +150,7 @@ To visualize data, bind the view's \c model property to a model and the the model, and the color of one of the fields depends on the property \i{fruit_color} of the view. - \snippet doc/src/snippets/declarative/models/views-models-delegates.qml rectangle + \snippet doc/src/snippets/qml/models/views-models-delegates.qml rectangle \keyword qml-data-models \section1 Models @@ -159,7 +159,7 @@ To visualize data, bind the view's \c model property to a model and the bind to. Here is a ListModel with two roles, \i type and \i age, and a ListView with a delegate that binds to these roles to display their values: - \snippet doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml document + \snippet doc/src/snippets/qml/qml-data-models/listmodel-listview.qml document If there is a naming clash between the model's properties and the delegate's properties, the roles can be accessed with the qualified \i model name @@ -197,12 +197,12 @@ To visualize data, bind the view's \c model property to a model and the ListModel is a simple hierarchy of elements specified in QML. The available roles are specified by the \l ListElement properties. - \snippet doc/src/snippets/declarative/qml-data-models/listelements.qml model + \snippet doc/src/snippets/qml/qml-data-models/listelements.qml model The above model has two roles, \i name and \i cost. These can be bound to by a ListView delegate, for example: - \snippet doc/src/snippets/declarative/qml-data-models/listelements.qml view + \snippet doc/src/snippets/qml/qml-data-models/listelements.qml view ListModel provides methods to manipulate the ListModel directly via JavaScript. In this case, the first item inserted determines the roles available @@ -210,9 +210,9 @@ To visualize data, bind the view's \c model property to a model and the created and populated via JavaScript, the roles provided by the first insertion are the only roles that will be shown in the view: - \snippet doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml model + \snippet doc/src/snippets/qml/qml-data-models/dynamic-listmodel.qml model \dots - \snippet doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml mouse area + \snippet doc/src/snippets/qml/qml-data-models/dynamic-listmodel.qml mouse area When the MouseArea is clicked, \c fruitModel will have two roles, \i cost and \i name. Even if subsequent roles are added, only the first two will be handled by views @@ -253,7 +253,7 @@ To visualize data, bind the view's \c model property to a model and the VisualItemModel provide the contents of the delegate. The model does not provide any roles. - \snippet doc/src/snippets/declarative/models/visual-model-and-view.qml visual model and view + \snippet doc/src/snippets/qml/models/visual-model-and-view.qml visual model and view Note that in the above example there is no delegate required. The items of the model itself provide the visual elements that @@ -347,7 +347,7 @@ The following example shows a repeater used with a \l{#Grid}{Grid} item to arrange a set of Rectangle items. The Repeater item creates a series of 24 rectangles for the Grid item to position in a 5 by 5 arrangement. -\snippet doc/src/snippets/declarative/repeaters/repeater-grid-index.qml document +\snippet doc/src/snippets/qml/repeaters/repeater-grid-index.qml document The number of items created by a Repeater is held by its \l{Repeater::}{count} property. It is not possible to set this property to determine the number of diff --git a/doc/src/qtquick2/mouseevents.qdoc b/doc/src/qtquick2/mouseevents.qdoc index d981c7c1dd..e452611416 100644 --- a/doc/src/qtquick2/mouseevents.qdoc +++ b/doc/src/qtquick2/mouseevents.qdoc @@ -55,7 +55,7 @@ to define this area is to anchor the \c MouseArea to its parent's area using the component), then the MouseArea will fill the area defined by the parent's dimensions. Alternatively, an area smaller or larger than the parent is definable. -\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml anchor fill +\snippet doc/src/snippets/qml/mousearea/mousearea-snippet.qml anchor fill \section1 Receiving Events @@ -77,7 +77,7 @@ gestures in greater detail: \endlist These signals have signal handlers that are invoked when the signals are emitted. -\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml mouse handlers +\snippet doc/src/snippets/qml/mousearea/mousearea-snippet.qml mouse handlers \section1 Enabling Gestures Some mouse gestures and button clicks need to be enabled before they send or @@ -95,7 +95,7 @@ positioning even when there are no mouse button presses. Setting the \c hoverEnabled property to \c true, in turn will enable the \c entered, \c exited, and \c positionChanged signal and their respective signal handlers. -\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml enable handlers +\snippet doc/src/snippets/qml/mousearea/mousearea-snippet.qml enable handlers Additionally, to disable the whole mouse area, set the \c MouseArea element's \c enabled property to \c false. diff --git a/doc/src/qtquick2/positioners.qdoc b/doc/src/qtquick2/positioners.qdoc index c7110f7cf9..55be7087fd 100644 --- a/doc/src/qtquick2/positioners.qdoc +++ b/doc/src/qtquick2/positioners.qdoc @@ -61,7 +61,7 @@ uses a Column item to arrange three \l Rectangle items in an area defined by an outer \l Item. The \l{Column::spacing}{spacing} property is set to include a small amount of space between the rectangles. -\snippet doc/src/snippets/declarative/column/column.qml document +\snippet doc/src/snippets/qml/column/column.qml document Note that, since Column inherits directly from Item, any background color must be added to a parent Rectangle, if desired. @@ -80,7 +80,7 @@ include a small amount of space between the rectangles. We ensure that the parent Rectangle is large enough so that there is some space left around the edges of the horizontally centered Row item. -\snippet doc/src/snippets/declarative/row.qml document +\snippet doc/src/snippets/qml/row.qml document \section2 Grid @@ -93,7 +93,7 @@ The following example uses a Grid item to place four \l Rectangle items in a 2-by-2 grid. As with the other positioners, the spacing between items can be specified using the \l{Grid::spacing}{spacing} property. -\snippet doc/src/snippets/declarative/grid-spacing.qml document +\snippet doc/src/snippets/qml/grid-spacing.qml document There is no difference between horizontal and vertical spacing inserted between items, so any additional space must be added within the items @@ -122,7 +122,7 @@ The following example shows a Flow item containing a number of \l Text child items. These are arranged in a similar way to those shown in the screenshots. -\snippet doc/src/snippets/declarative/flow.qml document +\snippet doc/src/snippets/qml/flow.qml document The main differences between the Grid and Flow positioners are that items inside a Flow will wrap when they run out of space on the minor axis, and diff --git a/doc/src/qtquick2/qmltexthandling.qdoc b/doc/src/qtquick2/qmltexthandling.qdoc index 876ab3c42f..6e6b2a4c6b 100644 --- a/doc/src/qtquick2/qmltexthandling.qdoc +++ b/doc/src/qtquick2/qmltexthandling.qdoc @@ -62,10 +62,10 @@ respective element documentation. The \l {Validators}{validator} elements enforce the type and format of \l TextInput objects. -\snippet doc/src/snippets/declarative/texthandling.qml int validator +\snippet doc/src/snippets/qml/texthandling.qml int validator The validator elements bind to \c {TextInput}'s \c validator property. -\snippet doc/src/snippets/declarative/texthandling.qml regexp validator +\snippet doc/src/snippets/qml/texthandling.qml regexp validator The regular expression in the snippet will only allow the inputted text to be \c {fruit basket}. diff --git a/doc/src/qtquick2/qtquick-intro.qdoc b/doc/src/qtquick2/qtquick-intro.qdoc index 8aeab7e199..9eebb0bddc 100644 --- a/doc/src/qtquick2/qtquick-intro.qdoc +++ b/doc/src/qtquick2/qtquick-intro.qdoc @@ -34,7 +34,7 @@ create the kind of intuitive, modern, and fluid user interfaces that are increasingly used on mobile phones, media players, set-top boxes, and other portable devices. Qt Quick consists of a rich set of user interface \l{QML Elements}{elements}, a \l{QML Syntax}{declarative} language for -describing user interfaces, and a language \l{QtDeclarative Module}{runtime}. A +describing user interfaces, and a language \l{QtQml Module}{runtime}. A collection of C++ APIs is used to integrate these high level features with classic Qt applications. Version 2.1 of the Qt Creator integrated development environment (IDE) introduces tools for developing Qt Quick applications. @@ -74,16 +74,16 @@ used to implement high level user interface logic. \l{How to Learn QML} introduces the reader to the language and declarative concepts. -\section1 QtDeclarative Module +\section1 QtQml Module -To make Qt Quick possible, Qt introduces the \l{QtDeclarative} module. The +To make Qt Quick possible, Qt introduces the \l{QtQml} module. The module creates a JavaScript runtime that QML runs under with a Qt based backend. -Because QtDeclarative and QML are built upon Qt, they inherit many of Qt's +Because QtQml and QML are built upon Qt, they inherit many of Qt's technology, namely the \l{Signals and Slots}{signals and slots} mechanism and the \l{The Meta-Object System}{meta-object} system. Data created using C++ are directly accessible from QML, and QML objects are also accessible from C++ code. -The QtDeclarative module separates the interface logic in QML from the +The QtQml module separates the interface logic in QML from the application logic in C++. It also allows the range of standard QML elements to be \l{Extending QML with C++}{extended with new ones written in C++}. diff --git a/doc/src/qtquick2/qtquick2.qdoc b/doc/src/qtquick2/qtquick2.qdoc index 6a1b7999c9..20361adb16 100644 --- a/doc/src/qtquick2/qtquick2.qdoc +++ b/doc/src/qtquick2/qtquick2.qdoc @@ -32,7 +32,7 @@ \brief The QML Elements This QML module contains all the QML elements that are - instantiated as objects of C++ classes in the QtDeclarative + instantiated as objects of C++ classes in the QtQml module. These elements work with the Scenegraph renderer and their own canvas. */ diff --git a/doc/src/qtquick2/righttoleft.qdoc b/doc/src/qtquick2/righttoleft.qdoc index b2cff57ee0..1781e3582a 100644 --- a/doc/src/qtquick2/righttoleft.qdoc +++ b/doc/src/qtquick2/righttoleft.qdoc @@ -68,7 +68,7 @@ Note that when \l LayoutMirroring is set, the \c horizontalAlignment property va the effective alignment of the text element that takes the mirroring into account can be read from the \c effectiveHorizontalAlignment property. -\snippet doc/src/snippets/declarative/righttoleft.qml 0 +\snippet doc/src/snippets/qml/righttoleft.qml 0 \section1 Layout direction of positioners and views @@ -84,7 +84,7 @@ This causes the effective \c layoutDirection of positioners and views to be mirr of the \c layoutDirection property will remain unchanged; the effective layout direction of positioners and views that takes the mirroring into account can be read from the \c effectiveLayoutDirection property. -\snippet doc/src/snippets/declarative/righttoleft.qml 1 +\snippet doc/src/snippets/qml/righttoleft.qml 1 \section1 Layout mirroring @@ -95,11 +95,11 @@ support for existing left-to-right Qt Quick applications. It mirrors the behavio You can enable layout mirroring for a particular \l Item: -\snippet doc/src/snippets/declarative/righttoleft.qml 2 +\snippet doc/src/snippets/qml/righttoleft.qml 2 Or set all child elements to also inherit the layout direction: -\snippet doc/src/snippets/declarative/righttoleft.qml 3 +\snippet doc/src/snippets/qml/righttoleft.qml 3 Applying mirroring in this manner does not change the actual value of the relevant anchor, \c layoutDirection or \c horizontalAlignment properties. The separate read-only property @@ -116,7 +116,7 @@ especially in views that rely on both the anchors and x coordinate-based positio the \l LayoutMirroring attached property to apply mirroring to an item that is positioned using \l {Item::}{x} coordinates: -\snippet doc/src/snippets/declarative/righttoleft.qml 4 +\snippet doc/src/snippets/qml/righttoleft.qml 4 Not all layouts should necessarily be mirrored. There are cases where a visual element is positioned to the right side of the screen for improved one-handed use, because most people are right-handed, and not @@ -135,7 +135,7 @@ aligned and just make sure that text is translated and aligned properly. Most images do not need to be mirrored, but some directional icons, such as arrows, may need to be mirrored. The painting of these icons can be mirrored with a dedicated \c mirror property introduced in Qt Quick 1.1: -\snippet doc/src/snippets/declarative/righttoleft.qml 5 +\snippet doc/src/snippets/qml/righttoleft.qml 5 \section1 Default layout direction diff --git a/doc/src/qtquick2/states.qdoc b/doc/src/qtquick2/states.qdoc index 559b4facac..622a1619b0 100644 --- a/doc/src/qtquick2/states.qdoc +++ b/doc/src/qtquick2/states.qdoc @@ -80,7 +80,7 @@ signal should be \c green and the warning \c flag is down. Meanwhile, in the \c CRITICAL state, the \c color should be \c red and the flag is \c up. We may model the states using the \c State element and the color and flag configurations with the \c PropertyChanges element. -\snippet doc/src/snippets/declarative/states.qml signal states +\snippet doc/src/snippets/qml/states.qml signal states The \l PropertyChanges element will change the values of object properties. Objects are referenced through their \l {qml-id}{id}. Objects outside the component are also referenced using the \c id property, exemplified by the @@ -89,7 +89,7 @@ property change to the external \c flag object. Further, the state may change by assigning the \c state property with the appropriate signal state. A state switch could be in a \l MouseArea element, assigning a different state whenever the signal receives a mouse click. -\snippet doc/src/snippets/declarative/states.qml switch states +\snippet doc/src/snippets/qml/states.qml switch states The State element is not limited to performing modifications on property values. It can also: @@ -115,7 +115,7 @@ expressions to change the state whenever the bound expression evaluates to \c true. The \c when property will revert the state back to the \l {The Default State}{default state} when the expression evaluates to false. -\snippet doc/src/snippets/declarative/states.qml when property +\snippet doc/src/snippets/qml/states.qml when property The \c bell component will change to the \c RINGING state whenever the \c signal.state is \c CRITICAL. diff --git a/doc/src/qtquick2/writingcomponents.qdoc b/doc/src/qtquick2/writingcomponents.qdoc index 64d28eff0b..31267cf20c 100644 --- a/doc/src/qtquick2/writingcomponents.qdoc +++ b/doc/src/qtquick2/writingcomponents.qdoc @@ -55,14 +55,14 @@ For example, one of the simplest and most common components you can build in QML button-type component. Below, we implement this component as a \l Rectangle with a clickable \l MouseArea, in a file named \c Button.qml: -\snippet doc/src/snippets/declarative/qml-extending-types/components/Button.qml 0 +\snippet doc/src/snippets/qml/qml-extending-types/components/Button.qml 0 Now this component can be reused by another file within the same directory. Since the file is named \c Button.qml, the component is referred to as \c Button: \table \row -\o \snippet doc/src/snippets/declarative/qml-extending-types/components/application.qml 0 +\o \snippet doc/src/snippets/qml/qml-extending-types/components/application.qml 0 \o \image qml-extending-types.png \endtable @@ -73,7 +73,7 @@ customize the \c width, \c height, \c radius and \c color properties of \c Butto If \c Button.qml was not in the same directory, \c application.qml would need to load it as a -\l {Modules}{module} from a specific filesystem path or \l{QDeclarativeExtensionPlugin}{plugin}. +\l {Modules}{module} from a specific filesystem path or \l{QQmlExtensionPlugin}{plugin}. Also, note the letter case of the component file name is significant on some (notably UNIX) filesystems. It is recommended the file name case matches the case of the QML component name exactly - for example, \c Box.qml and not \c BoX.qml - regardless of the platform to which the @@ -119,8 +119,8 @@ an \c ImageViewer object and read or modify the \c currentImage value: \table \row -\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/ImageViewer.qml 0 -\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/application.qml 0 +\o \snippet doc/src/snippets/qml/qml-extending-types/properties/ImageViewer.qml 0 +\o \snippet doc/src/snippets/qml/qml-extending-types/properties/application.qml 0 \endtable It is optional for a property to have a default value. The default value is a convenient shortcut, and is @@ -195,7 +195,7 @@ property name. For example, the following \c onMyNumberChanged signal handler is automatically called whenever the \c myNumber property changes: -\snippet doc/src/snippets/declarative/qml-extending-types/properties/property-signals.qml 0 +\snippet doc/src/snippets/qml/qml-extending-types/properties/property-signals.qml 0 \section2 Default properties @@ -266,7 +266,7 @@ declaring the alias, and, optionally, refers to a property on that ob For example, below is a \c Button.qml component with a \c buttonText aliased property which is connected to the child Text object's \c text property: -\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias.qml 0 +\snippet doc/src/snippets/qml/qml-extending-types/properties/alias.qml 0 The following code would create a \c Button with a defined text string for the child \l Text object: @@ -290,8 +290,8 @@ been changed to an alias to the child \l Image object: \table \row -\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/ImageViewer.qml 0 -\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/application.qml 0 +\o \snippet doc/src/snippets/qml/qml-extending-types/properties/alias/ImageViewer.qml 0 +\o \snippet doc/src/snippets/qml/qml-extending-types/properties/alias/application.qml 0 \endtable Instead of being limited to setting the \l Image source, \c application.qml can now directly @@ -335,7 +335,7 @@ It is possible for an aliased property to have the same name as an existing prop the following component has a \c color alias property, named the same as the built-in \l {Rectangle::color} property: -\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias-override.qml 0 +\snippet doc/src/snippets/qml/qml-extending-types/properties/alias-override.qml 0 Any objects that use this component and refer to its \c color property will be referring to the alias rather than the ordinary \l {Rectangle::color} property. Internally, @@ -366,7 +366,7 @@ the parameters by name. Here is an example of a component with a \c say() method that accepts a single \c text argument: -\snippet doc/src/snippets/declarative/qml-extending-types/methods/app.qml 0 +\snippet doc/src/snippets/qml/qml-extending-types/methods/app.qml 0 A method can be connected to a signal so that it is automatically invoked whenever the signal is emitted. See \l {Connecting signals to methods and other signals} below. @@ -422,8 +422,8 @@ signal is received by \c application.qml through an \c onButtonClicked signal ha \table \row -\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/basic.qml 0 -\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/no-parameters.qml 0 +\o \snippet doc/src/snippets/qml/qml-extending-types/signals/basic.qml 0 +\o \snippet doc/src/snippets/qml/qml-extending-types/signals/no-parameters.qml 0 \endtable If the signal has parameters, they are accessible by parameter name in the signal handler. @@ -431,8 +431,8 @@ In the example below, \c buttonClicked is emitted with \c xPos and \c yPos param \table \row -\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/Button.qml 0 -\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/parameters.qml 0 +\o \snippet doc/src/snippets/qml/qml-extending-types/signals/Button.qml 0 +\o \snippet doc/src/snippets/qml/qml-extending-types/signals/parameters.qml 0 \endtable @@ -446,7 +446,7 @@ to be received by a method instead of a \l {Signal Handlers}{signal handler}. For example, the \c application.qml above could be rewritten as: -\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectslots.qml 0 +\snippet doc/src/snippets/qml/qml-extending-types/signals/connectslots.qml 0 The \c myMethod() method will be called whenever the \c buttonClicked signal is received. @@ -458,7 +458,7 @@ or \l {Integrating JavaScript}{integrating JavaScript code}, then you will find objects dynamically, and connects the \c buttonClicked signal of each object to the \c myMethod() function: -\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectdynamic.qml 0 +\snippet doc/src/snippets/qml/qml-extending-types/signals/connectdynamic.qml 0 In the same way, you could connect a signal to methods defined in a dynamically created object, or \l {Receiving QML Signals in JavaScript}{connect a signal to a JavaScript method}. diff --git a/doc/src/snippets/declarative/Button.qml b/doc/src/snippets/qml/Button.qml similarity index 100% rename from doc/src/snippets/declarative/Button.qml rename to doc/src/snippets/qml/Button.qml diff --git a/doc/src/snippets/declarative/SelfDestroyingRect.qml b/doc/src/snippets/qml/SelfDestroyingRect.qml similarity index 100% rename from doc/src/snippets/declarative/SelfDestroyingRect.qml rename to doc/src/snippets/qml/SelfDestroyingRect.qml diff --git a/doc/src/snippets/declarative/Sprite.qml b/doc/src/snippets/qml/Sprite.qml similarity index 100% rename from doc/src/snippets/declarative/Sprite.qml rename to doc/src/snippets/qml/Sprite.qml diff --git a/doc/src/snippets/declarative/anchoranimation.qml b/doc/src/snippets/qml/anchoranimation.qml similarity index 100% rename from doc/src/snippets/declarative/anchoranimation.qml rename to doc/src/snippets/qml/anchoranimation.qml diff --git a/doc/src/snippets/declarative/anchorchanges.qml b/doc/src/snippets/qml/anchorchanges.qml similarity index 100% rename from doc/src/snippets/declarative/anchorchanges.qml rename to doc/src/snippets/qml/anchorchanges.qml diff --git a/doc/src/snippets/declarative/animatedimage.qml b/doc/src/snippets/qml/animatedimage.qml similarity index 100% rename from doc/src/snippets/declarative/animatedimage.qml rename to doc/src/snippets/qml/animatedimage.qml diff --git a/doc/src/snippets/declarative/animation.qml b/doc/src/snippets/qml/animation.qml similarity index 100% rename from doc/src/snippets/declarative/animation.qml rename to doc/src/snippets/qml/animation.qml diff --git a/doc/src/snippets/declarative/application.qml b/doc/src/snippets/qml/application.qml similarity index 100% rename from doc/src/snippets/declarative/application.qml rename to doc/src/snippets/qml/application.qml diff --git a/doc/src/snippets/declarative/behavior.qml b/doc/src/snippets/qml/behavior.qml similarity index 100% rename from doc/src/snippets/declarative/behavior.qml rename to doc/src/snippets/qml/behavior.qml diff --git a/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml b/doc/src/snippets/qml/borderimage/borderimage-scaled.qml similarity index 100% rename from doc/src/snippets/declarative/borderimage/borderimage-scaled.qml rename to doc/src/snippets/qml/borderimage/borderimage-scaled.qml diff --git a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml b/doc/src/snippets/qml/borderimage/borderimage-tiled.qml similarity index 100% rename from doc/src/snippets/declarative/borderimage/borderimage-tiled.qml rename to doc/src/snippets/qml/borderimage/borderimage-tiled.qml diff --git a/doc/src/snippets/declarative/borderimage/normal-image.qml b/doc/src/snippets/qml/borderimage/normal-image.qml similarity index 100% rename from doc/src/snippets/declarative/borderimage/normal-image.qml rename to doc/src/snippets/qml/borderimage/normal-image.qml diff --git a/doc/src/snippets/declarative/codingconventions/dotproperties.qml b/doc/src/snippets/qml/codingconventions/dotproperties.qml similarity index 100% rename from doc/src/snippets/declarative/codingconventions/dotproperties.qml rename to doc/src/snippets/qml/codingconventions/dotproperties.qml diff --git a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml b/doc/src/snippets/qml/codingconventions/javascript-imports.qml similarity index 100% rename from doc/src/snippets/declarative/codingconventions/javascript-imports.qml rename to doc/src/snippets/qml/codingconventions/javascript-imports.qml diff --git a/doc/src/snippets/declarative/codingconventions/javascript.qml b/doc/src/snippets/qml/codingconventions/javascript.qml similarity index 100% rename from doc/src/snippets/declarative/codingconventions/javascript.qml rename to doc/src/snippets/qml/codingconventions/javascript.qml diff --git a/doc/src/snippets/declarative/codingconventions/lists.qml b/doc/src/snippets/qml/codingconventions/lists.qml similarity index 100% rename from doc/src/snippets/declarative/codingconventions/lists.qml rename to doc/src/snippets/qml/codingconventions/lists.qml diff --git a/doc/src/snippets/declarative/codingconventions/myscript.js b/doc/src/snippets/qml/codingconventions/myscript.js similarity index 100% rename from doc/src/snippets/declarative/codingconventions/myscript.js rename to doc/src/snippets/qml/codingconventions/myscript.js diff --git a/doc/src/snippets/declarative/codingconventions/photo.qml b/doc/src/snippets/qml/codingconventions/photo.qml similarity index 100% rename from doc/src/snippets/declarative/codingconventions/photo.qml rename to doc/src/snippets/qml/codingconventions/photo.qml diff --git a/doc/src/snippets/declarative/codingconventions/private.qml b/doc/src/snippets/qml/codingconventions/private.qml similarity index 100% rename from doc/src/snippets/declarative/codingconventions/private.qml rename to doc/src/snippets/qml/codingconventions/private.qml diff --git a/doc/src/snippets/declarative/coloranimation.qml b/doc/src/snippets/qml/coloranimation.qml similarity index 100% rename from doc/src/snippets/declarative/coloranimation.qml rename to doc/src/snippets/qml/coloranimation.qml diff --git a/doc/src/snippets/declarative/colors.qml b/doc/src/snippets/qml/colors.qml similarity index 100% rename from doc/src/snippets/declarative/colors.qml rename to doc/src/snippets/qml/colors.qml diff --git a/doc/src/snippets/declarative/column/column-transitions.qml b/doc/src/snippets/qml/column/column-transitions.qml similarity index 100% rename from doc/src/snippets/declarative/column/column-transitions.qml rename to doc/src/snippets/qml/column/column-transitions.qml diff --git a/doc/src/snippets/declarative/column/column.qml b/doc/src/snippets/qml/column/column.qml similarity index 100% rename from doc/src/snippets/declarative/column/column.qml rename to doc/src/snippets/qml/column/column.qml diff --git a/doc/src/snippets/declarative/column/vertical-positioner.qml b/doc/src/snippets/qml/column/vertical-positioner.qml similarity index 100% rename from doc/src/snippets/declarative/column/vertical-positioner.qml rename to doc/src/snippets/qml/column/vertical-positioner.qml diff --git a/doc/src/snippets/declarative/comments.qml b/doc/src/snippets/qml/comments.qml similarity index 100% rename from doc/src/snippets/declarative/comments.qml rename to doc/src/snippets/qml/comments.qml diff --git a/doc/src/snippets/declarative/component.qml b/doc/src/snippets/qml/component.qml similarity index 100% rename from doc/src/snippets/declarative/component.qml rename to doc/src/snippets/qml/component.qml diff --git a/doc/src/snippets/declarative/componentCreation.js b/doc/src/snippets/qml/componentCreation.js similarity index 100% rename from doc/src/snippets/declarative/componentCreation.js rename to doc/src/snippets/qml/componentCreation.js diff --git a/doc/src/snippets/declarative/createComponent-simple.qml b/doc/src/snippets/qml/createComponent-simple.qml similarity index 100% rename from doc/src/snippets/declarative/createComponent-simple.qml rename to doc/src/snippets/qml/createComponent-simple.qml diff --git a/doc/src/snippets/declarative/createComponent.qml b/doc/src/snippets/qml/createComponent.qml similarity index 100% rename from doc/src/snippets/declarative/createComponent.qml rename to doc/src/snippets/qml/createComponent.qml diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/qml/createQmlObject.qml similarity index 100% rename from doc/src/snippets/declarative/createQmlObject.qml rename to doc/src/snippets/qml/createQmlObject.qml diff --git a/doc/src/snippets/declarative/drag.qml b/doc/src/snippets/qml/drag.qml similarity index 100% rename from doc/src/snippets/declarative/drag.qml rename to doc/src/snippets/qml/drag.qml diff --git a/doc/src/snippets/declarative/dynamicObjects-destroy.qml b/doc/src/snippets/qml/dynamicObjects-destroy.qml similarity index 100% rename from doc/src/snippets/declarative/dynamicObjects-destroy.qml rename to doc/src/snippets/qml/dynamicObjects-destroy.qml diff --git a/doc/src/snippets/declarative/events.qml b/doc/src/snippets/qml/events.qml similarity index 100% rename from doc/src/snippets/declarative/events.qml rename to doc/src/snippets/qml/events.qml diff --git a/doc/src/snippets/declarative/flickable.qml b/doc/src/snippets/qml/flickable.qml similarity index 100% rename from doc/src/snippets/declarative/flickable.qml rename to doc/src/snippets/qml/flickable.qml diff --git a/doc/src/snippets/declarative/flickableScrollbar.qml b/doc/src/snippets/qml/flickableScrollbar.qml similarity index 100% rename from doc/src/snippets/declarative/flickableScrollbar.qml rename to doc/src/snippets/qml/flickableScrollbar.qml diff --git a/doc/src/snippets/declarative/flipable/flipable.qml b/doc/src/snippets/qml/flipable/flipable.qml similarity index 100% rename from doc/src/snippets/declarative/flipable/flipable.qml rename to doc/src/snippets/qml/flipable/flipable.qml diff --git a/doc/src/snippets/declarative/flow.qml b/doc/src/snippets/qml/flow.qml similarity index 100% rename from doc/src/snippets/declarative/flow.qml rename to doc/src/snippets/qml/flow.qml diff --git a/doc/src/snippets/declarative/focus/MyClickableWidget.qml b/doc/src/snippets/qml/focus/MyClickableWidget.qml similarity index 100% rename from doc/src/snippets/declarative/focus/MyClickableWidget.qml rename to doc/src/snippets/qml/focus/MyClickableWidget.qml diff --git a/doc/src/snippets/declarative/focus/MyWidget.qml b/doc/src/snippets/qml/focus/MyWidget.qml similarity index 100% rename from doc/src/snippets/declarative/focus/MyWidget.qml rename to doc/src/snippets/qml/focus/MyWidget.qml diff --git a/doc/src/snippets/declarative/focus/advancedFocus.qml b/doc/src/snippets/qml/focus/advancedFocus.qml similarity index 100% rename from doc/src/snippets/declarative/focus/advancedFocus.qml rename to doc/src/snippets/qml/focus/advancedFocus.qml diff --git a/doc/src/snippets/declarative/focus/basicwidget.qml b/doc/src/snippets/qml/focus/basicwidget.qml similarity index 100% rename from doc/src/snippets/declarative/focus/basicwidget.qml rename to doc/src/snippets/qml/focus/basicwidget.qml diff --git a/doc/src/snippets/declarative/focus/clickablewidget.qml b/doc/src/snippets/qml/focus/clickablewidget.qml similarity index 100% rename from doc/src/snippets/declarative/focus/clickablewidget.qml rename to doc/src/snippets/qml/focus/clickablewidget.qml diff --git a/doc/src/snippets/declarative/focus/myfocusscopewidget.qml b/doc/src/snippets/qml/focus/myfocusscopewidget.qml similarity index 100% rename from doc/src/snippets/declarative/focus/myfocusscopewidget.qml rename to doc/src/snippets/qml/focus/myfocusscopewidget.qml diff --git a/doc/src/snippets/declarative/focus/rectangle.qml b/doc/src/snippets/qml/focus/rectangle.qml similarity index 100% rename from doc/src/snippets/declarative/focus/rectangle.qml rename to doc/src/snippets/qml/focus/rectangle.qml diff --git a/doc/src/snippets/declarative/focus/widget.qml b/doc/src/snippets/qml/focus/widget.qml similarity index 100% rename from doc/src/snippets/declarative/focus/widget.qml rename to doc/src/snippets/qml/focus/widget.qml diff --git a/doc/src/snippets/declarative/folderlistmodel.qml b/doc/src/snippets/qml/folderlistmodel.qml similarity index 100% rename from doc/src/snippets/declarative/folderlistmodel.qml rename to doc/src/snippets/qml/folderlistmodel.qml diff --git a/doc/src/snippets/declarative/gradient.qml b/doc/src/snippets/qml/gradient.qml similarity index 100% rename from doc/src/snippets/declarative/gradient.qml rename to doc/src/snippets/qml/gradient.qml diff --git a/doc/src/snippets/declarative/grid-spacing.qml b/doc/src/snippets/qml/grid-spacing.qml similarity index 100% rename from doc/src/snippets/declarative/grid-spacing.qml rename to doc/src/snippets/qml/grid-spacing.qml diff --git a/doc/src/snippets/declarative/grid/grid-items.qml b/doc/src/snippets/qml/grid/grid-items.qml similarity index 100% rename from doc/src/snippets/declarative/grid/grid-items.qml rename to doc/src/snippets/qml/grid/grid-items.qml diff --git a/doc/src/snippets/declarative/grid/grid-no-spacing.qml b/doc/src/snippets/qml/grid/grid-no-spacing.qml similarity index 100% rename from doc/src/snippets/declarative/grid/grid-no-spacing.qml rename to doc/src/snippets/qml/grid/grid-no-spacing.qml diff --git a/doc/src/snippets/declarative/grid/grid-spacing.qml b/doc/src/snippets/qml/grid/grid-spacing.qml similarity index 100% rename from doc/src/snippets/declarative/grid/grid-spacing.qml rename to doc/src/snippets/qml/grid/grid-spacing.qml diff --git a/doc/src/snippets/declarative/grid/grid.qml b/doc/src/snippets/qml/grid/grid.qml similarity index 100% rename from doc/src/snippets/declarative/grid/grid.qml rename to doc/src/snippets/qml/grid/grid.qml diff --git a/doc/src/snippets/declarative/gridview/ContactModel.qml b/doc/src/snippets/qml/gridview/ContactModel.qml similarity index 100% rename from doc/src/snippets/declarative/gridview/ContactModel.qml rename to doc/src/snippets/qml/gridview/ContactModel.qml diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/qml/gridview/gridview.qml similarity index 100% rename from doc/src/snippets/declarative/gridview/gridview.qml rename to doc/src/snippets/qml/gridview/gridview.qml diff --git a/doc/src/snippets/declarative/image.qml b/doc/src/snippets/qml/image.qml similarity index 100% rename from doc/src/snippets/declarative/image.qml rename to doc/src/snippets/qml/image.qml diff --git a/doc/src/snippets/declarative/imports/chart.qml b/doc/src/snippets/qml/imports/chart.qml similarity index 100% rename from doc/src/snippets/declarative/imports/chart.qml rename to doc/src/snippets/qml/imports/chart.qml diff --git a/doc/src/snippets/declarative/imports/installed-module.qml b/doc/src/snippets/qml/imports/installed-module.qml similarity index 100% rename from doc/src/snippets/declarative/imports/installed-module.qml rename to doc/src/snippets/qml/imports/installed-module.qml diff --git a/doc/src/snippets/declarative/imports/merged-named-imports.qml b/doc/src/snippets/qml/imports/merged-named-imports.qml similarity index 100% rename from doc/src/snippets/declarative/imports/merged-named-imports.qml rename to doc/src/snippets/qml/imports/merged-named-imports.qml diff --git a/doc/src/snippets/declarative/imports/named-imports.qml b/doc/src/snippets/qml/imports/named-imports.qml similarity index 100% rename from doc/src/snippets/declarative/imports/named-imports.qml rename to doc/src/snippets/qml/imports/named-imports.qml diff --git a/doc/src/snippets/declarative/imports/network-imports.qml b/doc/src/snippets/qml/imports/network-imports.qml similarity index 100% rename from doc/src/snippets/declarative/imports/network-imports.qml rename to doc/src/snippets/qml/imports/network-imports.qml diff --git a/doc/src/snippets/declarative/imports/qtquick-1.0.qml b/doc/src/snippets/qml/imports/qtquick-1.0.qml similarity index 100% rename from doc/src/snippets/declarative/imports/qtquick-1.0.qml rename to doc/src/snippets/qml/imports/qtquick-1.0.qml diff --git a/doc/src/snippets/declarative/imports/timeexample.qml b/doc/src/snippets/qml/imports/timeexample.qml similarity index 100% rename from doc/src/snippets/declarative/imports/timeexample.qml rename to doc/src/snippets/qml/imports/timeexample.qml diff --git a/doc/src/snippets/declarative/integrating-javascript/connectjs.qml b/doc/src/snippets/qml/integrating-javascript/connectjs.qml similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/connectjs.qml rename to doc/src/snippets/qml/integrating-javascript/connectjs.qml diff --git a/doc/src/snippets/declarative/integrating-javascript/includejs/app.qml b/doc/src/snippets/qml/integrating-javascript/includejs/app.qml similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/includejs/app.qml rename to doc/src/snippets/qml/integrating-javascript/includejs/app.qml diff --git a/doc/src/snippets/declarative/integrating-javascript/includejs/factorial.js b/doc/src/snippets/qml/integrating-javascript/includejs/factorial.js similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/includejs/factorial.js rename to doc/src/snippets/qml/integrating-javascript/includejs/factorial.js diff --git a/doc/src/snippets/declarative/integrating-javascript/includejs/script.js b/doc/src/snippets/qml/integrating-javascript/includejs/script.js similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/includejs/script.js rename to doc/src/snippets/qml/integrating-javascript/includejs/script.js diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp b/doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp similarity index 92% rename from doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp rename to doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp index 8825cca4bb..e018a68292 100644 --- a/doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp +++ b/doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp @@ -39,8 +39,8 @@ ****************************************************************************/ #include "avatarExample.h" -#include -#include +#include +#include void registerTypes() { @@ -52,7 +52,7 @@ void registerTypes() void expectOne() { //![1] -QDeclarativeComponent component(&engine, "exampleOne.qml"); +QQmlComponent component(&engine, "exampleOne.qml"); QObject *object = component.create(); // The scarce resource will have been released automatically // by this point, after the binding expression was evaluated. @@ -63,7 +63,7 @@ delete object; void expectTwo() { //![2] -QDeclarativeComponent component(&engine, "exampleTwo.qml"); +QQmlComponent component(&engine, "exampleTwo.qml"); QObject *object = component.create(); // The scarce resource will not have been released automatically // after the binding expression was evaluated. @@ -77,7 +77,7 @@ delete object; void expectThree() { //![3] -QDeclarativeComponent component(&engine, "exampleThree.qml"); +QQmlComponent component(&engine, "exampleThree.qml"); QObject *object = component.create(); // The resource was preserved explicitly during evaluation of the // JavaScript expression. Thus, during property assignment, the @@ -92,7 +92,7 @@ delete object; void expectFour() { //![4] -QDeclarativeComponent component(&engine, "exampleFour.qml"); +QQmlComponent component(&engine, "exampleFour.qml"); QObject *object = component.create(); // The scarce resource was explicitly preserved by the client during // the importAvatar() function, and so the scarce resource @@ -111,7 +111,7 @@ delete object; void expectFive() { //![5] -QDeclarativeComponent component(&engine, "exampleFive.qml"); +QQmlComponent component(&engine, "exampleFive.qml"); QObject *object = component.create(); // We have the expected results: bool expectedResultOne = (object->property("avatarOne").isValid() == false); diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.h b/doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.h similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.h rename to doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.h diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFive.qml b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFive.qml similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFive.qml rename to doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFive.qml diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.js b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.js similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.js rename to doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.js diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.qml b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.qml similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.qml rename to doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.qml diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleOne.qml b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleOne.qml similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleOne.qml rename to doc/src/snippets/qml/integrating-javascript/scarceresources/exampleOne.qml diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.js b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.js similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.js rename to doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.js diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.qml b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.qml similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.qml rename to doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.qml diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleTwo.qml b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleTwo.qml similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleTwo.qml rename to doc/src/snippets/qml/integrating-javascript/scarceresources/exampleTwo.qml diff --git a/doc/src/snippets/declarative/integrating-javascript/script.js b/doc/src/snippets/qml/integrating-javascript/script.js similarity index 100% rename from doc/src/snippets/declarative/integrating-javascript/script.js rename to doc/src/snippets/qml/integrating-javascript/script.js diff --git a/doc/src/snippets/declarative/keynavigation.qml b/doc/src/snippets/qml/keynavigation.qml similarity index 100% rename from doc/src/snippets/declarative/keynavigation.qml rename to doc/src/snippets/qml/keynavigation.qml diff --git a/doc/src/snippets/declarative/keys/keys-handler.qml b/doc/src/snippets/qml/keys/keys-handler.qml similarity index 100% rename from doc/src/snippets/declarative/keys/keys-handler.qml rename to doc/src/snippets/qml/keys/keys-handler.qml diff --git a/doc/src/snippets/declarative/keys/keys-pressed.qml b/doc/src/snippets/qml/keys/keys-pressed.qml similarity index 100% rename from doc/src/snippets/declarative/keys/keys-pressed.qml rename to doc/src/snippets/qml/keys/keys-pressed.qml diff --git a/doc/src/snippets/declarative/layoutmirroring.qml b/doc/src/snippets/qml/layoutmirroring.qml similarity index 100% rename from doc/src/snippets/declarative/layoutmirroring.qml rename to doc/src/snippets/qml/layoutmirroring.qml diff --git a/doc/src/snippets/declarative/listmodel-modify.qml b/doc/src/snippets/qml/listmodel-modify.qml similarity index 100% rename from doc/src/snippets/declarative/listmodel-modify.qml rename to doc/src/snippets/qml/listmodel-modify.qml diff --git a/doc/src/snippets/declarative/listmodel-nested.qml b/doc/src/snippets/qml/listmodel-nested.qml similarity index 100% rename from doc/src/snippets/declarative/listmodel-nested.qml rename to doc/src/snippets/qml/listmodel-nested.qml diff --git a/doc/src/snippets/declarative/listmodel-simple.qml b/doc/src/snippets/qml/listmodel-simple.qml similarity index 100% rename from doc/src/snippets/declarative/listmodel-simple.qml rename to doc/src/snippets/qml/listmodel-simple.qml diff --git a/doc/src/snippets/declarative/listmodel.qml b/doc/src/snippets/qml/listmodel.qml similarity index 100% rename from doc/src/snippets/declarative/listmodel.qml rename to doc/src/snippets/qml/listmodel.qml diff --git a/doc/src/snippets/declarative/listview-decorations.qml b/doc/src/snippets/qml/listview-decorations.qml similarity index 100% rename from doc/src/snippets/declarative/listview-decorations.qml rename to doc/src/snippets/qml/listview-decorations.qml diff --git a/doc/src/snippets/declarative/listview-sections.qml b/doc/src/snippets/qml/listview-sections.qml similarity index 100% rename from doc/src/snippets/declarative/listview-sections.qml rename to doc/src/snippets/qml/listview-sections.qml diff --git a/doc/src/snippets/declarative/listview.qml b/doc/src/snippets/qml/listview.qml similarity index 100% rename from doc/src/snippets/declarative/listview.qml rename to doc/src/snippets/qml/listview.qml diff --git a/doc/src/snippets/declarative/listview/ContactModel.qml b/doc/src/snippets/qml/listview/ContactModel.qml similarity index 100% rename from doc/src/snippets/declarative/listview/ContactModel.qml rename to doc/src/snippets/qml/listview/ContactModel.qml diff --git a/doc/src/snippets/declarative/listview/listview-snippet.qml b/doc/src/snippets/qml/listview/listview-snippet.qml similarity index 100% rename from doc/src/snippets/declarative/listview/listview-snippet.qml rename to doc/src/snippets/qml/listview/listview-snippet.qml diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/qml/listview/listview.qml similarity index 100% rename from doc/src/snippets/declarative/listview/listview.qml rename to doc/src/snippets/qml/listview/listview.qml diff --git a/doc/src/snippets/declarative/loader/KeyReader.qml b/doc/src/snippets/qml/loader/KeyReader.qml similarity index 100% rename from doc/src/snippets/declarative/loader/KeyReader.qml rename to doc/src/snippets/qml/loader/KeyReader.qml diff --git a/doc/src/snippets/declarative/loader/MyItem.qml b/doc/src/snippets/qml/loader/MyItem.qml similarity index 100% rename from doc/src/snippets/declarative/loader/MyItem.qml rename to doc/src/snippets/qml/loader/MyItem.qml diff --git a/doc/src/snippets/declarative/loader/connections.qml b/doc/src/snippets/qml/loader/connections.qml similarity index 100% rename from doc/src/snippets/declarative/loader/connections.qml rename to doc/src/snippets/qml/loader/connections.qml diff --git a/doc/src/snippets/declarative/loader/focus.qml b/doc/src/snippets/qml/loader/focus.qml similarity index 100% rename from doc/src/snippets/declarative/loader/focus.qml rename to doc/src/snippets/qml/loader/focus.qml diff --git a/doc/src/snippets/declarative/loader/simple.qml b/doc/src/snippets/qml/loader/simple.qml similarity index 100% rename from doc/src/snippets/declarative/loader/simple.qml rename to doc/src/snippets/qml/loader/simple.qml diff --git a/doc/src/snippets/declarative/loader/sizeitem.qml b/doc/src/snippets/qml/loader/sizeitem.qml similarity index 100% rename from doc/src/snippets/declarative/loader/sizeitem.qml rename to doc/src/snippets/qml/loader/sizeitem.qml diff --git a/doc/src/snippets/declarative/loader/sizeloader.qml b/doc/src/snippets/qml/loader/sizeloader.qml similarity index 100% rename from doc/src/snippets/declarative/loader/sizeloader.qml rename to doc/src/snippets/qml/loader/sizeloader.qml diff --git a/doc/src/snippets/declarative/models/views-models-delegates.qml b/doc/src/snippets/qml/models/views-models-delegates.qml similarity index 100% rename from doc/src/snippets/declarative/models/views-models-delegates.qml rename to doc/src/snippets/qml/models/views-models-delegates.qml diff --git a/doc/src/snippets/declarative/models/visual-model-and-view.qml b/doc/src/snippets/qml/models/visual-model-and-view.qml similarity index 100% rename from doc/src/snippets/declarative/models/visual-model-and-view.qml rename to doc/src/snippets/qml/models/visual-model-and-view.qml diff --git a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml b/doc/src/snippets/qml/mousearea/mousearea-snippet.qml similarity index 100% rename from doc/src/snippets/declarative/mousearea/mousearea-snippet.qml rename to doc/src/snippets/qml/mousearea/mousearea-snippet.qml diff --git a/doc/src/snippets/declarative/mousearea/mousearea.qml b/doc/src/snippets/qml/mousearea/mousearea.qml similarity index 100% rename from doc/src/snippets/declarative/mousearea/mousearea.qml rename to doc/src/snippets/qml/mousearea/mousearea.qml diff --git a/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml b/doc/src/snippets/qml/mousearea/mouseareadragfilter.qml similarity index 100% rename from doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml rename to doc/src/snippets/qml/mousearea/mouseareadragfilter.qml diff --git a/doc/src/snippets/declarative/multipointtoucharea/multipointtoucharea.qml b/doc/src/snippets/qml/multipointtoucharea/multipointtoucharea.qml similarity index 100% rename from doc/src/snippets/declarative/multipointtoucharea/multipointtoucharea.qml rename to doc/src/snippets/qml/multipointtoucharea/multipointtoucharea.qml diff --git a/doc/src/snippets/declarative/numberanimation.qml b/doc/src/snippets/qml/numberanimation.qml similarity index 100% rename from doc/src/snippets/declarative/numberanimation.qml rename to doc/src/snippets/qml/numberanimation.qml diff --git a/doc/src/snippets/declarative/parallelanimation.qml b/doc/src/snippets/qml/parallelanimation.qml similarity index 100% rename from doc/src/snippets/declarative/parallelanimation.qml rename to doc/src/snippets/qml/parallelanimation.qml diff --git a/doc/src/snippets/declarative/parentanimation.qml b/doc/src/snippets/qml/parentanimation.qml similarity index 100% rename from doc/src/snippets/declarative/parentanimation.qml rename to doc/src/snippets/qml/parentanimation.qml diff --git a/doc/src/snippets/declarative/parentchange.qml b/doc/src/snippets/qml/parentchange.qml similarity index 100% rename from doc/src/snippets/declarative/parentchange.qml rename to doc/src/snippets/qml/parentchange.qml diff --git a/doc/src/snippets/declarative/path/arcdirection.qml b/doc/src/snippets/qml/path/arcdirection.qml similarity index 100% rename from doc/src/snippets/declarative/path/arcdirection.qml rename to doc/src/snippets/qml/path/arcdirection.qml diff --git a/doc/src/snippets/declarative/path/arcradius.qml b/doc/src/snippets/qml/path/arcradius.qml similarity index 100% rename from doc/src/snippets/declarative/path/arcradius.qml rename to doc/src/snippets/qml/path/arcradius.qml diff --git a/doc/src/snippets/declarative/path/basicarc.qml b/doc/src/snippets/qml/path/basicarc.qml similarity index 100% rename from doc/src/snippets/declarative/path/basicarc.qml rename to doc/src/snippets/qml/path/basicarc.qml diff --git a/doc/src/snippets/declarative/path/basiccurve.qml b/doc/src/snippets/qml/path/basiccurve.qml similarity index 100% rename from doc/src/snippets/declarative/path/basiccurve.qml rename to doc/src/snippets/qml/path/basiccurve.qml diff --git a/doc/src/snippets/declarative/path/largearc.qml b/doc/src/snippets/qml/path/largearc.qml similarity index 100% rename from doc/src/snippets/declarative/path/largearc.qml rename to doc/src/snippets/qml/path/largearc.qml diff --git a/doc/src/snippets/declarative/pathinterpolator.qml b/doc/src/snippets/qml/pathinterpolator.qml similarity index 100% rename from doc/src/snippets/declarative/pathinterpolator.qml rename to doc/src/snippets/qml/pathinterpolator.qml diff --git a/doc/src/snippets/declarative/pathview/ContactModel.qml b/doc/src/snippets/qml/pathview/ContactModel.qml similarity index 100% rename from doc/src/snippets/declarative/pathview/ContactModel.qml rename to doc/src/snippets/qml/pathview/ContactModel.qml diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/qml/pathview/pathattributes.qml similarity index 100% rename from doc/src/snippets/declarative/pathview/pathattributes.qml rename to doc/src/snippets/qml/pathview/pathattributes.qml diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/qml/pathview/pathview.qml similarity index 100% rename from doc/src/snippets/declarative/pathview/pathview.qml rename to doc/src/snippets/qml/pathview/pathview.qml diff --git a/doc/src/snippets/declarative/properties.qml b/doc/src/snippets/qml/properties.qml similarity index 100% rename from doc/src/snippets/declarative/properties.qml rename to doc/src/snippets/qml/properties.qml diff --git a/doc/src/snippets/declarative/propertyaction-sequential.qml b/doc/src/snippets/qml/propertyaction-sequential.qml similarity index 100% rename from doc/src/snippets/declarative/propertyaction-sequential.qml rename to doc/src/snippets/qml/propertyaction-sequential.qml diff --git a/doc/src/snippets/declarative/propertyaction.qml b/doc/src/snippets/qml/propertyaction.qml similarity index 100% rename from doc/src/snippets/declarative/propertyaction.qml rename to doc/src/snippets/qml/propertyaction.qml diff --git a/doc/src/snippets/declarative/propertyanimation.qml b/doc/src/snippets/qml/propertyanimation.qml similarity index 100% rename from doc/src/snippets/declarative/propertyanimation.qml rename to doc/src/snippets/qml/propertyanimation.qml diff --git a/doc/src/snippets/declarative/propertychanges.qml b/doc/src/snippets/qml/propertychanges.qml similarity index 100% rename from doc/src/snippets/declarative/propertychanges.qml rename to doc/src/snippets/qml/propertychanges.qml diff --git a/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml b/doc/src/snippets/qml/qml-data-models/dynamic-listmodel.qml similarity index 100% rename from doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml rename to doc/src/snippets/qml/qml-data-models/dynamic-listmodel.qml diff --git a/doc/src/snippets/declarative/qml-data-models/listelements.qml b/doc/src/snippets/qml/qml-data-models/listelements.qml similarity index 100% rename from doc/src/snippets/declarative/qml-data-models/listelements.qml rename to doc/src/snippets/qml/qml-data-models/listelements.qml diff --git a/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml b/doc/src/snippets/qml/qml-data-models/listmodel-listview.qml similarity index 100% rename from doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml rename to doc/src/snippets/qml/qml-data-models/listmodel-listview.qml diff --git a/doc/src/snippets/declarative/qml-documents/inline-component.qml b/doc/src/snippets/qml/qml-documents/inline-component.qml similarity index 100% rename from doc/src/snippets/declarative/qml-documents/inline-component.qml rename to doc/src/snippets/qml/qml-documents/inline-component.qml diff --git a/doc/src/snippets/declarative/qml-documents/inline-text-component.qml b/doc/src/snippets/qml/qml-documents/inline-text-component.qml similarity index 100% rename from doc/src/snippets/declarative/qml-documents/inline-text-component.qml rename to doc/src/snippets/qml/qml-documents/inline-text-component.qml diff --git a/doc/src/snippets/declarative/qml-documents/non-trivial.qml b/doc/src/snippets/qml/qml-documents/non-trivial.qml similarity index 100% rename from doc/src/snippets/declarative/qml-documents/non-trivial.qml rename to doc/src/snippets/qml/qml-documents/non-trivial.qml diff --git a/doc/src/snippets/declarative/qml-documents/qmldocuments.qml b/doc/src/snippets/qml/qml-documents/qmldocuments.qml similarity index 100% rename from doc/src/snippets/declarative/qml-documents/qmldocuments.qml rename to doc/src/snippets/qml/qml-documents/qmldocuments.qml diff --git a/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg b/doc/src/snippets/qml/qml-intro/images/qt-logo.svg similarity index 100% rename from doc/src/snippets/declarative/qml-intro/images/qt-logo.svg rename to doc/src/snippets/qml/qml-intro/images/qt-logo.svg diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml b/doc/src/snippets/qml/qtbinding/context-advanced/MyItem.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml rename to doc/src/snippets/qml/qtbinding/context-advanced/MyItem.qml diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h b/doc/src/snippets/qml/qtbinding/context-advanced/applicationdata.h similarity index 100% rename from doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h rename to doc/src/snippets/qml/qtbinding/context-advanced/applicationdata.h diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml b/doc/src/snippets/qml/qtbinding/context-advanced/connections.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml rename to doc/src/snippets/qml/qtbinding/context-advanced/connections.qml diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp b/doc/src/snippets/qml/qtbinding/context-advanced/main.cpp similarity index 97% rename from doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp rename to doc/src/snippets/qml/qtbinding/context-advanced/main.cpp index d7cfe6f3ef..b9676e4b66 100644 --- a/doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp +++ b/doc/src/snippets/qml/qtbinding/context-advanced/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ #include -#include +#include #include "applicationdata.h" @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - QDeclarativeView view; + QQuickView view; ApplicationData data; view.rootContext()->setContextProperty("applicationData", &data); diff --git a/doc/src/snippets/declarative/qtbinding/context/MyItem.qml b/doc/src/snippets/qml/qtbinding/context/MyItem.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/context/MyItem.qml rename to doc/src/snippets/qml/qtbinding/context/MyItem.qml diff --git a/doc/src/snippets/declarative/qtbinding/context/main.cpp b/doc/src/snippets/qml/qtbinding/context/main.cpp similarity index 97% rename from doc/src/snippets/declarative/qtbinding/context/main.cpp rename to doc/src/snippets/qml/qtbinding/context/main.cpp index e0d9a83e64..0849a845a6 100644 --- a/doc/src/snippets/declarative/qtbinding/context/main.cpp +++ b/doc/src/snippets/qml/qtbinding/context/main.cpp @@ -38,14 +38,14 @@ ** ****************************************************************************/ #include -#include +#include int main(int argc, char *argv[]) { QApplication app(argc, argv); //![0] -QDeclarativeView view; +QQuickView view; view.rootContext()->setContextProperty("currentDateTime", QDateTime::currentDateTime()); view.setSource(QUrl::fromLocalFile("MyItem.qml")); view.show(); diff --git a/doc/src/snippets/declarative/qtbinding/enums/imageviewer.h b/doc/src/snippets/qml/qtbinding/enums/imageviewer.h similarity index 95% rename from doc/src/snippets/declarative/qtbinding/enums/imageviewer.h rename to doc/src/snippets/qml/qtbinding/enums/imageviewer.h index de9f2ecaab..df9709953f 100644 --- a/doc/src/snippets/declarative/qtbinding/enums/imageviewer.h +++ b/doc/src/snippets/qml/qtbinding/enums/imageviewer.h @@ -38,10 +38,10 @@ ** ****************************************************************************/ #include -#include +#include //![start] -class ImageViewer : public QDeclarativeItem +class ImageViewer : public QQuickItem { Q_OBJECT Q_ENUMS(Status) @@ -56,7 +56,7 @@ class ImageViewer : public QDeclarativeItem Status status() const; //![start] - ImageViewer(QDeclarativeItem *parent = 0); + ImageViewer(QQuickItem *parent = 0); public slots: void emitSignals(); diff --git a/doc/src/snippets/declarative/qtbinding/enums/standalone.qml b/doc/src/snippets/qml/qtbinding/enums/standalone.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/enums/standalone.qml rename to doc/src/snippets/qml/qtbinding/enums/standalone.qml diff --git a/doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml b/doc/src/snippets/qml/qtbinding/functions-cpp/MyItem.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml rename to doc/src/snippets/qml/qtbinding/functions-cpp/MyItem.qml diff --git a/doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp b/doc/src/snippets/qml/qtbinding/functions-cpp/main.cpp similarity index 97% rename from doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp rename to doc/src/snippets/qml/qtbinding/functions-cpp/main.cpp index 5e6c474a8f..3d63e055a3 100644 --- a/doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp +++ b/doc/src/snippets/qml/qtbinding/functions-cpp/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ #include -#include +#include #include "myclass.h" @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - QDeclarativeView view; + QQuickView view; MyClass myClass; view.rootContext()->setContextProperty("myObject", &myClass); diff --git a/doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h b/doc/src/snippets/qml/qtbinding/functions-cpp/myclass.h similarity index 100% rename from doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h rename to doc/src/snippets/qml/qtbinding/functions-cpp/myclass.h diff --git a/doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml b/doc/src/snippets/qml/qtbinding/functions-qml/MyItem.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml rename to doc/src/snippets/qml/qtbinding/functions-qml/MyItem.qml diff --git a/doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp b/doc/src/snippets/qml/qtbinding/functions-qml/main.cpp similarity index 95% rename from doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp rename to doc/src/snippets/qml/qtbinding/functions-qml/main.cpp index ba72e9459a..5c6a0c507d 100644 --- a/doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp +++ b/doc/src/snippets/qml/qtbinding/functions-qml/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ #include -#include +#include int main(int argc, char *argv[]) { @@ -46,8 +46,8 @@ int main(int argc, char *argv[]) //![0] // main.cpp -QDeclarativeEngine engine; -QDeclarativeComponent component(&engine, "MyItem.qml"); +QQmlEngine engine; +QQmlComponent component(&engine, "MyItem.qml"); QObject *object = component.create(); QVariant returnedValue; diff --git a/doc/src/snippets/declarative/qtbinding/loading/MyItem.qml b/doc/src/snippets/qml/qtbinding/loading/MyItem.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/loading/MyItem.qml rename to doc/src/snippets/qml/qtbinding/loading/MyItem.qml diff --git a/doc/src/snippets/declarative/qtbinding/loading/main.cpp b/doc/src/snippets/qml/qtbinding/loading/main.cpp similarity index 85% rename from doc/src/snippets/declarative/qtbinding/loading/main.cpp rename to doc/src/snippets/qml/qtbinding/loading/main.cpp index 839b7352a5..98ed4173f9 100644 --- a/doc/src/snippets/declarative/qtbinding/loading/main.cpp +++ b/doc/src/snippets/qml/qtbinding/loading/main.cpp @@ -38,38 +38,38 @@ ** ****************************************************************************/ #include -#include +#include static void withComponent() { -//![QDeclarativeComponent-a] -// Using QDeclarativeComponent -QDeclarativeEngine engine; -QDeclarativeComponent component(&engine, +//![QQmlComponent-a] +// Using QQmlComponent +QQmlEngine engine; +QQmlComponent component(&engine, QUrl::fromLocalFile("MyItem.qml")); QObject *object = component.create(); -//![QDeclarativeComponent-a] +//![QQmlComponent-a] } int main(int argc, char *argv[]) { QApplication app(argc, argv); -//![QDeclarativeView] -// Using QDeclarativeView -QDeclarativeView view; +//![QQuickView] +// Using QQuickView +QQuickView view; view.setSource(QUrl::fromLocalFile("MyItem.qml")); view.show(); QObject *object = view.rootObject(); -//![QDeclarativeView] +//![QQuickView] //![properties] object->setProperty("width", 500); -QDeclarativeProperty(object, "width").write(500); +QQmlProperty(object, "width").write(500); //![properties] //![cast] -QDeclarativeItem *item = qobject_cast(object); +QQuickItem *item = qobject_cast(object); item->setWidth(500); //![cast] @@ -79,9 +79,9 @@ if (rect) rect->setProperty("color", "red"); //![findChild] -//![QDeclarativeComponent-b] +//![QQmlComponent-b] delete object; -//![QDeclarativeComponent-b] +//![QQmlComponent-b] withComponent(); diff --git a/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h b/doc/src/snippets/qml/qtbinding/newelements/imageviewer.h similarity index 97% rename from doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h rename to doc/src/snippets/qml/qtbinding/newelements/imageviewer.h index 7bbc243d83..3559951693 100644 --- a/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h +++ b/doc/src/snippets/qml/qtbinding/newelements/imageviewer.h @@ -39,9 +39,9 @@ ****************************************************************************/ //![0] #include -#include +#include -class ImageViewer : public QDeclarativeItem +class ImageViewer : public QQuickItem { Q_OBJECT Q_PROPERTY(QUrl image READ image WRITE setImage NOTIFY imageChanged) diff --git a/doc/src/snippets/declarative/qtbinding/newelements/main.cpp b/doc/src/snippets/qml/qtbinding/newelements/main.cpp similarity index 97% rename from doc/src/snippets/declarative/qtbinding/newelements/main.cpp rename to doc/src/snippets/qml/qtbinding/newelements/main.cpp index ead2fd1722..8ab7eb63f4 100644 --- a/doc/src/snippets/declarative/qtbinding/newelements/main.cpp +++ b/doc/src/snippets/qml/qtbinding/newelements/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ #include -#include +#include #include "imageviewer.h" @@ -53,7 +53,7 @@ int main(int argc, char *argv[]) qmlRegisterType("MyLibrary", 1, 0, "ImageViewer"); //![register] - QDeclarativeView view; + QQuickView view; view.setSource(QUrl::fromLocalFile("standalone.qml")); view.show(); diff --git a/doc/src/snippets/declarative/qtbinding/newelements/standalone.qml b/doc/src/snippets/qml/qtbinding/newelements/standalone.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/newelements/standalone.qml rename to doc/src/snippets/qml/qtbinding/newelements/standalone.qml diff --git a/doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml b/doc/src/snippets/qml/qtbinding/properties-cpp/MyItem.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml rename to doc/src/snippets/qml/qtbinding/properties-cpp/MyItem.qml diff --git a/doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h b/doc/src/snippets/qml/qtbinding/properties-cpp/applicationdata.h similarity index 100% rename from doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h rename to doc/src/snippets/qml/qtbinding/properties-cpp/applicationdata.h diff --git a/doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml b/doc/src/snippets/qml/qtbinding/properties-qml/MyItem.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml rename to doc/src/snippets/qml/qtbinding/properties-qml/MyItem.qml diff --git a/doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp b/doc/src/snippets/qml/qtbinding/properties-qml/main.cpp similarity index 89% rename from doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp rename to doc/src/snippets/qml/qtbinding/properties-qml/main.cpp index 91347ee70f..15cb517c7b 100644 --- a/doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp +++ b/doc/src/snippets/qml/qtbinding/properties-qml/main.cpp @@ -38,19 +38,19 @@ ** ****************************************************************************/ #include -#include +#include int main(int argc, char *argv[]) { QApplication app(argc, argv); //![0] -QDeclarativeEngine engine; -QDeclarativeComponent component(&engine, "MyItem.qml"); +QQmlEngine engine; +QQmlComponent component(&engine, "MyItem.qml"); QObject *object = component.create(); -qDebug() << "Property value:" << QDeclarativeProperty::read(object, "someNumber").toInt(); -QDeclarativeProperty::write(object, "someNumber", 5000); +qDebug() << "Property value:" << QQmlProperty::read(object, "someNumber").toInt(); +QQmlProperty::write(object, "someNumber", 5000); qDebug() << "Property value:" << object->property("someNumber").toInt(); object->setProperty("someNumber", 100); diff --git a/doc/src/snippets/declarative/qtbinding/resources/example.qrc b/doc/src/snippets/qml/qtbinding/resources/example.qrc similarity index 100% rename from doc/src/snippets/declarative/qtbinding/resources/example.qrc rename to doc/src/snippets/qml/qtbinding/resources/example.qrc diff --git a/doc/src/snippets/declarative/qtbinding/resources/main.cpp b/doc/src/snippets/qml/qtbinding/resources/main.cpp similarity index 96% rename from doc/src/snippets/declarative/qtbinding/resources/main.cpp rename to doc/src/snippets/qml/qtbinding/resources/main.cpp index 0ec1189eeb..2902064fc9 100644 --- a/doc/src/snippets/declarative/qtbinding/resources/main.cpp +++ b/doc/src/snippets/qml/qtbinding/resources/main.cpp @@ -39,15 +39,15 @@ ****************************************************************************/ #include -#include -#include +#include +#include //![0] int main(int argc, char *argv[]) { QApplication app(argc, argv); - QDeclarativeView view; + QQuickView view; view.setSource(QUrl("qrc:/main.qml")); view.show(); diff --git a/doc/src/snippets/declarative/qtbinding/resources/main.qml b/doc/src/snippets/qml/qtbinding/resources/main.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/resources/main.qml rename to doc/src/snippets/qml/qtbinding/resources/main.qml diff --git a/doc/src/snippets/declarative/qtbinding/resources/resources.pro b/doc/src/snippets/qml/qtbinding/resources/resources.pro similarity index 71% rename from doc/src/snippets/declarative/qtbinding/resources/resources.pro rename to doc/src/snippets/qml/qtbinding/resources/resources.pro index cc01ee126f..5aee288a6e 100644 --- a/doc/src/snippets/declarative/qtbinding/resources/resources.pro +++ b/doc/src/snippets/qml/qtbinding/resources/resources.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp RESOURCES += example.qrc diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml b/doc/src/snippets/qml/qtbinding/signals-cpp/MyItem.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml rename to doc/src/snippets/qml/qtbinding/signals-cpp/MyItem.qml diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h b/doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h similarity index 95% rename from doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h rename to doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h index a066447cfb..3423295234 100644 --- a/doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h +++ b/doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h @@ -38,16 +38,16 @@ ** ****************************************************************************/ #include -#include +#include //![start] -class ImageViewer : public QDeclarativeItem +class ImageViewer : public QQuickItem { Q_OBJECT Q_PROPERTY(QUrl image READ image WRITE setImage NOTIFY imageChanged) public: //![start] - ImageViewer(QDeclarativeItem *item = 0); + ImageViewer(QQuickItem *item = 0); void setImage(const QUrl &url) {} QUrl image() const { return QUrl(); } diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp b/doc/src/snippets/qml/qtbinding/signals-cpp/main.cpp similarity index 94% rename from doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp rename to doc/src/snippets/qml/qtbinding/signals-cpp/main.cpp index f3ea3f26df..402e811913 100644 --- a/doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp +++ b/doc/src/snippets/qml/qtbinding/signals-cpp/main.cpp @@ -38,13 +38,13 @@ ** ****************************************************************************/ #include -#include +#include #include "imageviewer.h" -ImageViewer::ImageViewer(QDeclarativeItem *item) - : QDeclarativeItem(item) +ImageViewer::ImageViewer(QQuickItem *item) + : QQuickItem(item) { QTimer::singleShot(0, this, SLOT(emitSignals())); } @@ -61,14 +61,14 @@ int main(int argc, char *argv[]) qmlRegisterType("MyLibrary", 1, 0, "ImageViewer"); - QDeclarativeView standalone; + QQuickView standalone; standalone.setSource(QUrl::fromLocalFile("standalone.qml")); standalone.show(); //![connections] ImageViewer viewer; -QDeclarativeView view; +QQuickView view; view.rootContext()->setContextProperty("imageViewer", &viewer); view.setSource(QUrl::fromLocalFile("MyItem.qml")); diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml b/doc/src/snippets/qml/qtbinding/signals-cpp/standalone.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml rename to doc/src/snippets/qml/qtbinding/signals-cpp/standalone.qml diff --git a/doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml b/doc/src/snippets/qml/qtbinding/signals-qml/MyItem.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml rename to doc/src/snippets/qml/qtbinding/signals-qml/MyItem.qml diff --git a/doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp b/doc/src/snippets/qml/qtbinding/signals-qml/main.cpp similarity index 96% rename from doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp rename to doc/src/snippets/qml/qtbinding/signals-qml/main.cpp index 084d5f0e4b..8528d9ce5e 100644 --- a/doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp +++ b/doc/src/snippets/qml/qtbinding/signals-qml/main.cpp @@ -38,13 +38,13 @@ ** ****************************************************************************/ #include -#include +#include //![0] int main(int argc, char *argv[]) { QApplication app(argc, argv); - QDeclarativeView view(QUrl::fromLocalFile("MyItem.qml")); + QQuickView view(QUrl::fromLocalFile("MyItem.qml")); QObject *item = view.rootObject(); MyClass myClass; diff --git a/doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h b/doc/src/snippets/qml/qtbinding/signals-qml/myclass.h similarity index 100% rename from doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h rename to doc/src/snippets/qml/qtbinding/signals-qml/myclass.h diff --git a/doc/src/snippets/declarative/qtbinding/variantlistmap/MyItem.qml b/doc/src/snippets/qml/qtbinding/variantlistmap/MyItem.qml similarity index 100% rename from doc/src/snippets/declarative/qtbinding/variantlistmap/MyItem.qml rename to doc/src/snippets/qml/qtbinding/variantlistmap/MyItem.qml diff --git a/doc/src/snippets/declarative/qtbinding/variantlistmap/main.cpp b/doc/src/snippets/qml/qtbinding/variantlistmap/main.cpp similarity index 96% rename from doc/src/snippets/declarative/qtbinding/variantlistmap/main.cpp rename to doc/src/snippets/qml/qtbinding/variantlistmap/main.cpp index 1cebecdff4..a10b9a8c12 100644 --- a/doc/src/snippets/declarative/qtbinding/variantlistmap/main.cpp +++ b/doc/src/snippets/qml/qtbinding/variantlistmap/main.cpp @@ -38,14 +38,14 @@ ** ****************************************************************************/ #include -#include +#include int main(int argc, char *argv[]) { QApplication app(argc, argv); //![0] // C++ -QDeclarativeView view(QUrl::fromLocalFile("MyItem.qml")); +QQuickView view(QUrl::fromLocalFile("MyItem.qml")); QVariantList list; list << 10 << Qt::green << "bottles"; diff --git a/doc/src/snippets/declarative/qtobject.qml b/doc/src/snippets/qml/qtobject.qml similarity index 100% rename from doc/src/snippets/declarative/qtobject.qml rename to doc/src/snippets/qml/qtobject.qml diff --git a/doc/src/snippets/declarative/rectangle/rect-border-width.qml b/doc/src/snippets/qml/rectangle/rect-border-width.qml similarity index 100% rename from doc/src/snippets/declarative/rectangle/rect-border-width.qml rename to doc/src/snippets/qml/rectangle/rect-border-width.qml diff --git a/doc/src/snippets/declarative/rectangle/rectangle-colors.qml b/doc/src/snippets/qml/rectangle/rectangle-colors.qml similarity index 100% rename from doc/src/snippets/declarative/rectangle/rectangle-colors.qml rename to doc/src/snippets/qml/rectangle/rectangle-colors.qml diff --git a/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml b/doc/src/snippets/qml/rectangle/rectangle-gradient.qml similarity index 100% rename from doc/src/snippets/declarative/rectangle/rectangle-gradient.qml rename to doc/src/snippets/qml/rectangle/rectangle-gradient.qml diff --git a/doc/src/snippets/declarative/rectangle/rectangle.qml b/doc/src/snippets/qml/rectangle/rectangle.qml similarity index 100% rename from doc/src/snippets/declarative/rectangle/rectangle.qml rename to doc/src/snippets/qml/rectangle/rectangle.qml diff --git a/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml b/doc/src/snippets/qml/repeaters/repeater-grid-index.qml similarity index 100% rename from doc/src/snippets/declarative/repeaters/repeater-grid-index.qml rename to doc/src/snippets/qml/repeaters/repeater-grid-index.qml diff --git a/doc/src/snippets/declarative/repeaters/repeater.qml b/doc/src/snippets/qml/repeaters/repeater.qml similarity index 100% rename from doc/src/snippets/declarative/repeaters/repeater.qml rename to doc/src/snippets/qml/repeaters/repeater.qml diff --git a/doc/src/snippets/declarative/reusablecomponents/Button.qml b/doc/src/snippets/qml/reusablecomponents/Button.qml similarity index 100% rename from doc/src/snippets/declarative/reusablecomponents/Button.qml rename to doc/src/snippets/qml/reusablecomponents/Button.qml diff --git a/doc/src/snippets/declarative/reusablecomponents/application.qml b/doc/src/snippets/qml/reusablecomponents/application.qml similarity index 100% rename from doc/src/snippets/declarative/reusablecomponents/application.qml rename to doc/src/snippets/qml/reusablecomponents/application.qml diff --git a/doc/src/snippets/declarative/reusablecomponents/component.qml b/doc/src/snippets/qml/reusablecomponents/component.qml similarity index 100% rename from doc/src/snippets/declarative/reusablecomponents/component.qml rename to doc/src/snippets/qml/reusablecomponents/component.qml diff --git a/doc/src/snippets/declarative/reusablecomponents/focusbutton.qml b/doc/src/snippets/qml/reusablecomponents/focusbutton.qml similarity index 100% rename from doc/src/snippets/declarative/reusablecomponents/focusbutton.qml rename to doc/src/snippets/qml/reusablecomponents/focusbutton.qml diff --git a/doc/src/snippets/declarative/reusablecomponents/qmldir b/doc/src/snippets/qml/reusablecomponents/qmldir similarity index 100% rename from doc/src/snippets/declarative/reusablecomponents/qmldir rename to doc/src/snippets/qml/reusablecomponents/qmldir diff --git a/doc/src/snippets/declarative/righttoleft.qml b/doc/src/snippets/qml/righttoleft.qml similarity index 100% rename from doc/src/snippets/declarative/righttoleft.qml rename to doc/src/snippets/qml/righttoleft.qml diff --git a/doc/src/snippets/declarative/righttoleft/Child.qml b/doc/src/snippets/qml/righttoleft/Child.qml similarity index 100% rename from doc/src/snippets/declarative/righttoleft/Child.qml rename to doc/src/snippets/qml/righttoleft/Child.qml diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/qml/rotation.qml similarity index 100% rename from doc/src/snippets/declarative/rotation.qml rename to doc/src/snippets/qml/rotation.qml diff --git a/doc/src/snippets/declarative/rotationanimation.qml b/doc/src/snippets/qml/rotationanimation.qml similarity index 100% rename from doc/src/snippets/declarative/rotationanimation.qml rename to doc/src/snippets/qml/rotationanimation.qml diff --git a/doc/src/snippets/declarative/row.qml b/doc/src/snippets/qml/row.qml similarity index 100% rename from doc/src/snippets/declarative/row.qml rename to doc/src/snippets/qml/row.qml diff --git a/doc/src/snippets/declarative/row/row.qml b/doc/src/snippets/qml/row/row.qml similarity index 100% rename from doc/src/snippets/declarative/row/row.qml rename to doc/src/snippets/qml/row/row.qml diff --git a/doc/src/snippets/declarative/script.js b/doc/src/snippets/qml/script.js similarity index 100% rename from doc/src/snippets/declarative/script.js rename to doc/src/snippets/qml/script.js diff --git a/doc/src/snippets/declarative/sequentialanimation.qml b/doc/src/snippets/qml/sequentialanimation.qml similarity index 100% rename from doc/src/snippets/declarative/sequentialanimation.qml rename to doc/src/snippets/qml/sequentialanimation.qml diff --git a/doc/src/snippets/declarative/smoothedanimation.qml b/doc/src/snippets/qml/smoothedanimation.qml similarity index 100% rename from doc/src/snippets/declarative/smoothedanimation.qml rename to doc/src/snippets/qml/smoothedanimation.qml diff --git a/doc/src/snippets/declarative/springanimation.qml b/doc/src/snippets/qml/springanimation.qml similarity index 100% rename from doc/src/snippets/declarative/springanimation.qml rename to doc/src/snippets/qml/springanimation.qml diff --git a/doc/src/snippets/declarative/state-when.qml b/doc/src/snippets/qml/state-when.qml similarity index 100% rename from doc/src/snippets/declarative/state-when.qml rename to doc/src/snippets/qml/state-when.qml diff --git a/doc/src/snippets/declarative/state.qml b/doc/src/snippets/qml/state.qml similarity index 100% rename from doc/src/snippets/declarative/state.qml rename to doc/src/snippets/qml/state.qml diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/qml/states.qml similarity index 100% rename from doc/src/snippets/declarative/states.qml rename to doc/src/snippets/qml/states.qml diff --git a/doc/src/snippets/declarative/states/statechangescript.qml b/doc/src/snippets/qml/states/statechangescript.qml similarity index 100% rename from doc/src/snippets/declarative/states/statechangescript.qml rename to doc/src/snippets/qml/states/statechangescript.qml diff --git a/doc/src/snippets/declarative/systempalette.qml b/doc/src/snippets/qml/systempalette.qml similarity index 100% rename from doc/src/snippets/declarative/systempalette.qml rename to doc/src/snippets/qml/systempalette.qml diff --git a/doc/src/snippets/declarative/text/onLinkActivated.qml b/doc/src/snippets/qml/text/onLinkActivated.qml similarity index 97% rename from doc/src/snippets/declarative/text/onLinkActivated.qml rename to doc/src/snippets/qml/text/onLinkActivated.qml index 71545ad3e2..03641d989e 100644 --- a/doc/src/snippets/declarative/text/onLinkActivated.qml +++ b/doc/src/snippets/qml/text/onLinkActivated.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/texthandling.qml b/doc/src/snippets/qml/texthandling.qml similarity index 100% rename from doc/src/snippets/declarative/texthandling.qml rename to doc/src/snippets/qml/texthandling.qml diff --git a/doc/src/snippets/declarative/transition-from-to-modified.qml b/doc/src/snippets/qml/transition-from-to-modified.qml similarity index 100% rename from doc/src/snippets/declarative/transition-from-to-modified.qml rename to doc/src/snippets/qml/transition-from-to-modified.qml diff --git a/doc/src/snippets/declarative/transition-from-to.qml b/doc/src/snippets/qml/transition-from-to.qml similarity index 100% rename from doc/src/snippets/declarative/transition-from-to.qml rename to doc/src/snippets/qml/transition-from-to.qml diff --git a/doc/src/snippets/declarative/transition-reversible.qml b/doc/src/snippets/qml/transition-reversible.qml similarity index 100% rename from doc/src/snippets/declarative/transition-reversible.qml rename to doc/src/snippets/qml/transition-reversible.qml diff --git a/doc/src/snippets/declarative/transition.qml b/doc/src/snippets/qml/transition.qml similarity index 100% rename from doc/src/snippets/declarative/transition.qml rename to doc/src/snippets/qml/transition.qml diff --git a/doc/src/snippets/declarative/transitions-list.qml b/doc/src/snippets/qml/transitions-list.qml similarity index 100% rename from doc/src/snippets/declarative/transitions-list.qml rename to doc/src/snippets/qml/transitions-list.qml diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-basic.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-basic.qml similarity index 100% rename from doc/src/snippets/declarative/viewtransitions/viewtransitions-basic.qml rename to doc/src/snippets/qml/viewtransitions/viewtransitions-basic.qml diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-delayedbyindex.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-delayedbyindex.qml similarity index 100% rename from doc/src/snippets/declarative/viewtransitions/viewtransitions-delayedbyindex.qml rename to doc/src/snippets/qml/viewtransitions/viewtransitions-delayedbyindex.qml diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-intermediatemove.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-intermediatemove.qml similarity index 100% rename from doc/src/snippets/declarative/viewtransitions/viewtransitions-intermediatemove.qml rename to doc/src/snippets/qml/viewtransitions/viewtransitions-intermediatemove.qml diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-interruptedgood.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-interruptedgood.qml similarity index 100% rename from doc/src/snippets/declarative/viewtransitions/viewtransitions-interruptedgood.qml rename to doc/src/snippets/qml/viewtransitions/viewtransitions-interruptedgood.qml diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-pathanim.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-pathanim.qml similarity index 100% rename from doc/src/snippets/declarative/viewtransitions/viewtransitions-pathanim.qml rename to doc/src/snippets/qml/viewtransitions/viewtransitions-pathanim.qml diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-scriptactionbad.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-scriptactionbad.qml similarity index 100% rename from doc/src/snippets/declarative/viewtransitions/viewtransitions-scriptactionbad.qml rename to doc/src/snippets/qml/viewtransitions/viewtransitions-scriptactionbad.qml diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-scriptactiongood.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-scriptactiongood.qml similarity index 100% rename from doc/src/snippets/declarative/viewtransitions/viewtransitions-scriptactiongood.qml rename to doc/src/snippets/qml/viewtransitions/viewtransitions-scriptactiongood.qml diff --git a/doc/src/snippets/declarative/visualdatagroup.qml b/doc/src/snippets/qml/visualdatagroup.qml similarity index 100% rename from doc/src/snippets/declarative/visualdatagroup.qml rename to doc/src/snippets/qml/visualdatagroup.qml diff --git a/doc/src/snippets/declarative/visualdatamodel.qml b/doc/src/snippets/qml/visualdatamodel.qml similarity index 100% rename from doc/src/snippets/declarative/visualdatamodel.qml rename to doc/src/snippets/qml/visualdatamodel.qml diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp b/doc/src/snippets/qml/visualdatamodel_rootindex/main.cpp similarity index 93% rename from doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp rename to doc/src/snippets/qml/visualdatamodel_rootindex/main.cpp index 206828e883..4468d06db4 100644 --- a/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp +++ b/doc/src/snippets/qml/visualdatamodel_rootindex/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -37,8 +37,8 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include -#include +#include +#include #include #include @@ -48,7 +48,7 @@ int main(int argc, char ** argv) { QApplication app(argc, argv); - QDeclarativeView view; + QQuickView view; QDirModel model; view.rootContext()->setContextProperty("dirModel", &model); diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml b/doc/src/snippets/qml/visualdatamodel_rootindex/view.qml similarity index 100% rename from doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml rename to doc/src/snippets/qml/visualdatamodel_rootindex/view.qml diff --git a/doc/src/snippets/declarative/workerscript.qml b/doc/src/snippets/qml/workerscript.qml similarity index 100% rename from doc/src/snippets/declarative/workerscript.qml rename to doc/src/snippets/qml/workerscript.qml diff --git a/doc/src/snippets/declarative/xmlrole.qml b/doc/src/snippets/qml/xmlrole.qml similarity index 100% rename from doc/src/snippets/declarative/xmlrole.qml rename to doc/src/snippets/qml/xmlrole.qml diff --git a/doc/src/snippets/declarative/xmlrole.xml b/doc/src/snippets/qml/xmlrole.xml similarity index 100% rename from doc/src/snippets/declarative/xmlrole.xml rename to doc/src/snippets/qml/xmlrole.xml diff --git a/doc/src/snippets/qtjavascript/evaluation/main.cpp b/doc/src/snippets/qtjavascript/evaluation/main.cpp index 8d1cbf0484..3d3e3bfda2 100644 --- a/doc/src/snippets/qtjavascript/evaluation/main.cpp +++ b/doc/src/snippets/qtjavascript/evaluation/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ -#include +#include int main(int argc, char *argv[]) { diff --git a/doc/src/snippets/qtjavascript/registeringobjects/main.cpp b/doc/src/snippets/qtjavascript/registeringobjects/main.cpp index 27d696da63..f34c1061fe 100644 --- a/doc/src/snippets/qtjavascript/registeringobjects/main.cpp +++ b/doc/src/snippets/qtjavascript/registeringobjects/main.cpp @@ -39,7 +39,7 @@ ****************************************************************************/ #include -#include +#include #include "myobject.h" int main(int argc, char *argv[]) diff --git a/doc/src/snippets/qtjavascript/registeringvalues/main.cpp b/doc/src/snippets/qtjavascript/registeringvalues/main.cpp index be2d293cf7..f168f4f554 100644 --- a/doc/src/snippets/qtjavascript/registeringvalues/main.cpp +++ b/doc/src/snippets/qtjavascript/registeringvalues/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ -#include +#include int main(int argc, char *argv[]) { diff --git a/doc/src/whatsnew.qdoc b/doc/src/whatsnew.qdoc index 88d5e91d76..bf77e0e6c0 100644 --- a/doc/src/whatsnew.qdoc +++ b/doc/src/whatsnew.qdoc @@ -67,8 +67,8 @@ Properties of the "var" type may hold JavaScript references. See \l{QML Basic T QML properties of type \c var and \c variant can now hold pixmaps. See \l{Scarce Resources in JavaScript} for more information -QDeclarativeExpression can now be directly (and more efficiently) constructed from a -QDeclarativeScriptString. +QQmlExpression can now be directly (and more efficiently) constructed from a +QQmlScriptString. Support for certain sequence types (QList, QList, QList, QList, QList and QStringList) has been improved. QObjects can define Q_PROPERTYs of these types which can be accessed transparently from JavaScript. See the section on diff --git a/examples/declarative/canvas/stockchart/stockchart.pro b/examples/declarative/canvas/stockchart/stockchart.pro deleted file mode 100644 index 4006b5dccf..0000000000 --- a/examples/declarative/canvas/stockchart/stockchart.pro +++ /dev/null @@ -1,20 +0,0 @@ -TEMPLATE = lib -CONFIG += qt plugin -QT += declarative network - -DESTDIR = com/nokia/StockChartExample -TARGET = qmlstockchartexampleplugin - -SOURCES += model.cpp plugin.cpp -HEADERS += model.h -qdeclarativesources.files += \ - com/nokia/StockChartExample/qmldir \ - stock.qml - -qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/plugins/com/nokia/StockChartExample - -sources.files += stockchart.pro model.h model.cpp plugin.cpp README -sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/plugins -target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/plugins/com/nokia/StockChartExample - -INSTALLS += qdeclarativesources sources target diff --git a/examples/declarative/painteditem/textballoons/textballoons.pro b/examples/declarative/painteditem/textballoons/textballoons.pro deleted file mode 100644 index 453a00336d..0000000000 --- a/examples/declarative/painteditem/textballoons/textballoons.pro +++ /dev/null @@ -1,23 +0,0 @@ -TEMPLATE = lib -CONFIG += qt plugin -QT += declarative quick - -TARGET = qmltextballoonplugin - -HEADERS += TextBalloonPlugin/plugin.h \ - textballoon.h - -SOURCES += textballoon.cpp - -DESTDIR = TextBalloonPlugin - -qdeclarativesources.files += \ - TextBalloonPlugin/qmldir - -qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/painteditem/textballoons/TextBalloonPlugin - -sources.files = textballoons.qml -sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/painteditem/textballoons -target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/painteditem/textballoons/TextBalloonPlugin - -INSTALLS = qdeclarativesources sources target diff --git a/examples/embedded/qmlcalculator/deployment.pri b/examples/embedded/qmlcalculator/deployment.pri index a3627b8fa2..4286bb6e24 100644 --- a/examples/embedded/qmlcalculator/deployment.pri +++ b/examples/embedded/qmlcalculator/deployment.pri @@ -1,4 +1,4 @@ -qmlcalculator_src = $$PWD/../../declarative/calculator +qmlcalculator_src = $$PWD/../../qml/calculator qmlcalculator_files.files = $$qmlcalculator_src/calculator.qml $$qmlcalculator_src/Core DEPLOYMENT += qmlcalculator_files diff --git a/examples/embedded/qmlcalculator/qmlcalculator.cpp b/examples/embedded/qmlcalculator/qmlcalculator.cpp index 4be7bc462d..17bf0f14f2 100644 --- a/examples/embedded/qmlcalculator/qmlcalculator.cpp +++ b/examples/embedded/qmlcalculator/qmlcalculator.cpp @@ -41,17 +41,17 @@ #include #include -#include -#include +#include +#include int main(int argc, char *argv[]) { QApplication application(argc, argv); const QString mainQmlApp = QLatin1String("calculator.qml"); - QDeclarativeView view; + QQuickView view; view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + view.setResizeMode(QQuickView::SizeRootObjectToView); QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); #if defined(QT_KEYPAD_NAVIGATION) diff --git a/examples/embedded/qmlcalculator/qmlcalculator.pro b/examples/embedded/qmlcalculator/qmlcalculator.pro index 25c16ca78a..4ebf2d5972 100644 --- a/examples/embedded/qmlcalculator/qmlcalculator.pro +++ b/examples/embedded/qmlcalculator/qmlcalculator.pro @@ -1,5 +1,5 @@ !wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") -QT += declarative +QT += qml SOURCES += $$PWD/qmlcalculator.cpp include($$PWD/deployment.pri) diff --git a/examples/embedded/qmlclocks/deployment.pri b/examples/embedded/qmlclocks/deployment.pri index 771a4dba76..75b39ac48f 100644 --- a/examples/embedded/qmlclocks/deployment.pri +++ b/examples/embedded/qmlclocks/deployment.pri @@ -1,4 +1,4 @@ -qmlclocks_src = $$PWD/../../../examples/declarative/toys/clocks +qmlclocks_src = $$PWD/../../../examples/qml/toys/clocks qmlclocks_files.files = $$qmlclocks_src/clocks.qml $$qmlclocks_src/content DEPLOYMENT += qmlclocks_files diff --git a/examples/embedded/qmlclocks/qmlclocks.cpp b/examples/embedded/qmlclocks/qmlclocks.cpp index ce42ec7b18..1f9a553944 100644 --- a/examples/embedded/qmlclocks/qmlclocks.cpp +++ b/examples/embedded/qmlclocks/qmlclocks.cpp @@ -41,17 +41,17 @@ #include #include -#include -#include +#include +#include int main(int argc, char *argv[]) { QApplication application(argc, argv); const QString mainQmlApp = QLatin1String("clocks.qml"); - QDeclarativeView view; + QQuickView view; view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + view.setResizeMode(QQuickView::SizeRootObjectToView); QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); #if defined(QT_KEYPAD_NAVIGATION) diff --git a/examples/embedded/qmlclocks/qmlclocks.pro b/examples/embedded/qmlclocks/qmlclocks.pro index 8e9dcdf87c..43a9e31972 100644 --- a/examples/embedded/qmlclocks/qmlclocks.pro +++ b/examples/embedded/qmlclocks/qmlclocks.pro @@ -1,5 +1,5 @@ !wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") -QT += declarative +QT += qml SOURCES += $$PWD/qmlclocks.cpp include($$PWD/deployment.pri) diff --git a/examples/embedded/qmldialcontrol/deployment.pri b/examples/embedded/qmldialcontrol/deployment.pri index d845120923..58c815e1e5 100644 --- a/examples/embedded/qmldialcontrol/deployment.pri +++ b/examples/embedded/qmldialcontrol/deployment.pri @@ -1,4 +1,4 @@ -qmldialcontrol_src = $$PWD/../../../examples/declarative/ui-components/dialcontrol +qmldialcontrol_src = $$PWD/../../../examples/qml/ui-components/dialcontrol qmldialcontrol_files.files = $$qmldialcontrol_src/dialcontrol.qml $$qmldialcontrol_src/content DEPLOYMENT += qmldialcontrol_files diff --git a/examples/embedded/qmldialcontrol/qmldialcontrol.cpp b/examples/embedded/qmldialcontrol/qmldialcontrol.cpp index e66f6f6c56..6f81e5f8a0 100644 --- a/examples/embedded/qmldialcontrol/qmldialcontrol.cpp +++ b/examples/embedded/qmldialcontrol/qmldialcontrol.cpp @@ -41,17 +41,17 @@ #include #include -#include -#include +#include +#include int main(int argc, char *argv[]) { QApplication application(argc, argv); const QString mainQmlApp = QLatin1String("dialcontrol.qml"); - QDeclarativeView view; + QQuickView view; view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + view.setResizeMode(QQuickView::SizeRootObjectToView); QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); #if defined(QT_KEYPAD_NAVIGATION) diff --git a/examples/embedded/qmldialcontrol/qmldialcontrol.pro b/examples/embedded/qmldialcontrol/qmldialcontrol.pro index 08f876b926..58ed7cabb8 100644 --- a/examples/embedded/qmldialcontrol/qmldialcontrol.pro +++ b/examples/embedded/qmldialcontrol/qmldialcontrol.pro @@ -1,5 +1,5 @@ !wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") -QT += declarative +QT += qml SOURCES += $$PWD/qmldialcontrol.cpp include($$PWD/deployment.pri) diff --git a/examples/embedded/qmleasing/deployment.pri b/examples/embedded/qmleasing/deployment.pri index 7a5d0401cb..427259b816 100644 --- a/examples/embedded/qmleasing/deployment.pri +++ b/examples/embedded/qmleasing/deployment.pri @@ -1,4 +1,4 @@ -qmleasing_src = $$PWD/../../../examples/declarative/animation/easing +qmleasing_src = $$PWD/../../../examples/qml/animation/easing qmleasing_files.files = $$qmleasing_src/easing.qml $$qmleasing_src/content DEPLOYMENT += qmleasing_files diff --git a/examples/embedded/qmleasing/qmleasing.cpp b/examples/embedded/qmleasing/qmleasing.cpp index 8220e03cff..d516825d9a 100644 --- a/examples/embedded/qmleasing/qmleasing.cpp +++ b/examples/embedded/qmleasing/qmleasing.cpp @@ -41,17 +41,17 @@ #include #include -#include -#include +#include +#include int main(int argc, char *argv[]) { QApplication application(argc, argv); const QString mainQmlApp = QLatin1String("easing.qml"); - QDeclarativeView view; + QQuickView view; view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + view.setResizeMode(QQuickView::SizeRootObjectToView); QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); #if defined(QT_KEYPAD_NAVIGATION) diff --git a/examples/embedded/qmleasing/qmleasing.pro b/examples/embedded/qmleasing/qmleasing.pro index c9f008d42e..6e0383502b 100644 --- a/examples/embedded/qmleasing/qmleasing.pro +++ b/examples/embedded/qmleasing/qmleasing.pro @@ -1,5 +1,5 @@ !wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") -QT += declarative +QT += qml SOURCES += $$PWD/qmleasing.cpp include($$PWD/deployment.pri) diff --git a/examples/embedded/qmlflickr/deployment.pri b/examples/embedded/qmlflickr/deployment.pri index 0d76ddc1db..7b9b62b459 100644 --- a/examples/embedded/qmlflickr/deployment.pri +++ b/examples/embedded/qmlflickr/deployment.pri @@ -1,4 +1,4 @@ -qmlflickr_src = $$PWD/../../declarative/flickr +qmlflickr_src = $$PWD/../../qml/flickr qmlflickr_files.files = $$qmlflickr_src/flickr.qml $$qmlflickr_src/common $$qmlflickr_src/mobile DEPLOYMENT += qmlflickr_files diff --git a/examples/embedded/qmlflickr/qmlflickr.cpp b/examples/embedded/qmlflickr/qmlflickr.cpp index 93b28f7cec..268542e61b 100644 --- a/examples/embedded/qmlflickr/qmlflickr.cpp +++ b/examples/embedded/qmlflickr/qmlflickr.cpp @@ -42,17 +42,17 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include -#include +#include // Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise // the system default. -class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory +class NetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory { public: ~NetworkAccessManagerFactory() { } @@ -92,10 +92,10 @@ int main(int argc, char *argv[]) NetworkAccessManagerFactory networkAccessManagerFactory; const QString mainQmlApp = QLatin1String("flickr.qml"); - QDeclarativeView view; + QQuickView view; view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory); view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + view.setResizeMode(QQuickView::SizeRootObjectToView); QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); view.setGeometry(QRect(100, 100, 360, 640)); view.show(); diff --git a/examples/embedded/qmlflickr/qmlflickr.pro b/examples/embedded/qmlflickr/qmlflickr.pro index 869d651b05..141c02d3fe 100644 --- a/examples/embedded/qmlflickr/qmlflickr.pro +++ b/examples/embedded/qmlflickr/qmlflickr.pro @@ -1,5 +1,5 @@ !wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") -QT += declarative network +QT += qml network SOURCES += $$PWD/qmlflickr.cpp include($$PWD/deployment.pri) diff --git a/examples/embedded/qmlphotoviewer/deployment.pri b/examples/embedded/qmlphotoviewer/deployment.pri index 504373914a..ea9a052b4b 100644 --- a/examples/embedded/qmlphotoviewer/deployment.pri +++ b/examples/embedded/qmlphotoviewer/deployment.pri @@ -1,4 +1,4 @@ -qmlphotoviewer_src = $$PWD/../../declarative/photoviewer +qmlphotoviewer_src = $$PWD/../../qml/photoviewer qmlphotoviewer_files.files = $$qmlphotoviewer_src/photoviewer.qml $$qmlphotoviewer_src/PhotoViewerCore DEPLOYMENT += qmlphotoviewer_files diff --git a/examples/embedded/qmlphotoviewer/qmlphotoviewer.cpp b/examples/embedded/qmlphotoviewer/qmlphotoviewer.cpp index 32c9d24eaa..18bf1ae094 100644 --- a/examples/embedded/qmlphotoviewer/qmlphotoviewer.cpp +++ b/examples/embedded/qmlphotoviewer/qmlphotoviewer.cpp @@ -42,16 +42,16 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include // Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise // the system default. -class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory +class NetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory { public: ~NetworkAccessManagerFactory() { } @@ -91,10 +91,10 @@ int main(int argc, char *argv[]) NetworkAccessManagerFactory networkAccessManagerFactory; const QString mainQmlApp = QLatin1String("photoviewer.qml"); - QDeclarativeView view; + QQuickView view; view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory); view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + view.setResizeMode(QQuickView::SizeRootObjectToView); QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); view.setGeometry(QRect(100, 100, 360, 640)); diff --git a/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro b/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro index 9941b2e226..1c0301118e 100644 --- a/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro +++ b/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro @@ -1,5 +1,5 @@ !wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") -QT += declarative network +QT += qml network SOURCES += $$PWD/qmlphotoviewer.cpp include($$PWD/deployment.pri) diff --git a/examples/embedded/qmltwitter/deployment.pri b/examples/embedded/qmltwitter/deployment.pri index a3c045ca54..2f3066bc72 100644 --- a/examples/embedded/qmltwitter/deployment.pri +++ b/examples/embedded/qmltwitter/deployment.pri @@ -1,4 +1,4 @@ -qmltwitter_src = $$PWD/../../declarative/twitter +qmltwitter_src = $$PWD/../../qml/twitter qmltwitter_files.files = $$qmltwitter_src/twitter.qml $$qmltwitter_src/TwitterCore DEPLOYMENT += qmltwitter_files diff --git a/examples/embedded/qmltwitter/qmltwitter.cpp b/examples/embedded/qmltwitter/qmltwitter.cpp index 19b187bc82..a3a5c40f34 100644 --- a/examples/embedded/qmltwitter/qmltwitter.cpp +++ b/examples/embedded/qmltwitter/qmltwitter.cpp @@ -42,16 +42,16 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include // Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise // the system default. -class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory +class NetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory { public: ~NetworkAccessManagerFactory() { } @@ -91,10 +91,10 @@ int main(int argc, char *argv[]) NetworkAccessManagerFactory networkAccessManagerFactory; const QString mainQmlApp = QLatin1String("twitter.qml"); - QDeclarativeView view; + QQuickView view; view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory); view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + view.setResizeMode(QQuickView::SizeRootObjectToView); QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); view.setGeometry(QRect(100, 100, 360, 640)); view.show(); diff --git a/examples/embedded/qmltwitter/qmltwitter.pro b/examples/embedded/qmltwitter/qmltwitter.pro index ce40cd7489..eca46f9f97 100644 --- a/examples/embedded/qmltwitter/qmltwitter.pro +++ b/examples/embedded/qmltwitter/qmltwitter.pro @@ -1,5 +1,5 @@ !wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") -QT += declarative network +QT += qml network SOURCES += $$PWD/qmltwitter.cpp include($$PWD/deployment.pri) diff --git a/examples/examples.pro b/examples/examples.pro index 2c9497dde0..3e5c4d08a5 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -1,3 +1,3 @@ TEMPLATE = subdirs -SUBDIRS += declarative tutorials +SUBDIRS += qml tutorials contains(QT_CONFIG, qmltest): SUBDIRS += qmltest diff --git a/examples/declarative/README b/examples/qml/README similarity index 100% rename from examples/declarative/README rename to examples/qml/README diff --git a/examples/declarative/accessibility/accessibility.qml b/examples/qml/accessibility/accessibility.qml similarity index 98% rename from examples/declarative/accessibility/accessibility.qml rename to examples/qml/accessibility/accessibility.qml index 6fdcd38ac6..e0152f065b 100644 --- a/examples/declarative/accessibility/accessibility.qml +++ b/examples/qml/accessibility/accessibility.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/accessibility/widgets/Button.qml b/examples/qml/accessibility/widgets/Button.qml similarity index 97% rename from examples/declarative/accessibility/widgets/Button.qml rename to examples/qml/accessibility/widgets/Button.qml index 4a076fa428..793f895c57 100644 --- a/examples/declarative/accessibility/widgets/Button.qml +++ b/examples/qml/accessibility/widgets/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/animation/animation.qml b/examples/qml/animation/animation.qml similarity index 100% rename from examples/declarative/animation/animation.qml rename to examples/qml/animation/animation.qml diff --git a/examples/declarative/animation/animation.qmlproject b/examples/qml/animation/animation.qmlproject similarity index 100% rename from examples/declarative/animation/animation.qmlproject rename to examples/qml/animation/animation.qmlproject diff --git a/examples/declarative/animation/basics/color-animation.qml b/examples/qml/animation/basics/color-animation.qml similarity index 100% rename from examples/declarative/animation/basics/color-animation.qml rename to examples/qml/animation/basics/color-animation.qml diff --git a/examples/declarative/animation/basics/images/face-smile.png b/examples/qml/animation/basics/images/face-smile.png similarity index 100% rename from examples/declarative/animation/basics/images/face-smile.png rename to examples/qml/animation/basics/images/face-smile.png diff --git a/examples/declarative/animation/basics/images/moon.png b/examples/qml/animation/basics/images/moon.png similarity index 100% rename from examples/declarative/animation/basics/images/moon.png rename to examples/qml/animation/basics/images/moon.png diff --git a/examples/declarative/animation/basics/images/shadow.png b/examples/qml/animation/basics/images/shadow.png similarity index 100% rename from examples/declarative/animation/basics/images/shadow.png rename to examples/qml/animation/basics/images/shadow.png diff --git a/examples/declarative/animation/basics/images/star.png b/examples/qml/animation/basics/images/star.png similarity index 100% rename from examples/declarative/animation/basics/images/star.png rename to examples/qml/animation/basics/images/star.png diff --git a/examples/declarative/animation/basics/images/sun.png b/examples/qml/animation/basics/images/sun.png similarity index 100% rename from examples/declarative/animation/basics/images/sun.png rename to examples/qml/animation/basics/images/sun.png diff --git a/examples/declarative/animation/basics/property-animation.qml b/examples/qml/animation/basics/property-animation.qml similarity index 100% rename from examples/declarative/animation/basics/property-animation.qml rename to examples/qml/animation/basics/property-animation.qml diff --git a/examples/declarative/animation/behaviors/SideRect.qml b/examples/qml/animation/behaviors/SideRect.qml similarity index 100% rename from examples/declarative/animation/behaviors/SideRect.qml rename to examples/qml/animation/behaviors/SideRect.qml diff --git a/examples/declarative/animation/behaviors/behavior-example.qml b/examples/qml/animation/behaviors/behavior-example.qml similarity index 100% rename from examples/declarative/animation/behaviors/behavior-example.qml rename to examples/qml/animation/behaviors/behavior-example.qml diff --git a/examples/declarative/animation/behaviors/wigglytext.qml b/examples/qml/animation/behaviors/wigglytext.qml similarity index 100% rename from examples/declarative/animation/behaviors/wigglytext.qml rename to examples/qml/animation/behaviors/wigglytext.qml diff --git a/examples/declarative/animation/easing/content/QuitButton.qml b/examples/qml/animation/easing/content/QuitButton.qml similarity index 100% rename from examples/declarative/animation/easing/content/QuitButton.qml rename to examples/qml/animation/easing/content/QuitButton.qml diff --git a/examples/declarative/animation/easing/content/quit.png b/examples/qml/animation/easing/content/quit.png similarity index 100% rename from examples/declarative/animation/easing/content/quit.png rename to examples/qml/animation/easing/content/quit.png diff --git a/examples/declarative/animation/easing/easing.qml b/examples/qml/animation/easing/easing.qml similarity index 100% rename from examples/declarative/animation/easing/easing.qml rename to examples/qml/animation/easing/easing.qml diff --git a/examples/declarative/animation/pathanimation/pathanimation.qml b/examples/qml/animation/pathanimation/pathanimation.qml similarity index 100% rename from examples/declarative/animation/pathanimation/pathanimation.qml rename to examples/qml/animation/pathanimation/pathanimation.qml diff --git a/examples/declarative/animation/pathinterpolator/pathinterpolator.qml b/examples/qml/animation/pathinterpolator/pathinterpolator.qml similarity index 100% rename from examples/declarative/animation/pathinterpolator/pathinterpolator.qml rename to examples/qml/animation/pathinterpolator/pathinterpolator.qml diff --git a/examples/declarative/animation/states/qt-logo.png b/examples/qml/animation/states/qt-logo.png similarity index 100% rename from examples/declarative/animation/states/qt-logo.png rename to examples/qml/animation/states/qt-logo.png diff --git a/examples/declarative/animation/states/states.qml b/examples/qml/animation/states/states.qml similarity index 100% rename from examples/declarative/animation/states/states.qml rename to examples/qml/animation/states/states.qml diff --git a/examples/declarative/animation/states/transitions.qml b/examples/qml/animation/states/transitions.qml similarity index 100% rename from examples/declarative/animation/states/transitions.qml rename to examples/qml/animation/states/transitions.qml diff --git a/examples/declarative/calculator/calculator.qml b/examples/qml/calculator/calculator.qml similarity index 99% rename from examples/declarative/calculator/calculator.qml rename to examples/qml/calculator/calculator.qml index e2d6679b89..913643a93b 100644 --- a/examples/declarative/calculator/calculator.qml +++ b/examples/qml/calculator/calculator.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/calculator/content/Button.qml b/examples/qml/calculator/content/Button.qml similarity index 97% rename from examples/declarative/calculator/content/Button.qml rename to examples/qml/calculator/content/Button.qml index 6b480eb9b8..feaa5e7df3 100644 --- a/examples/declarative/calculator/content/Button.qml +++ b/examples/qml/calculator/content/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/calculator/content/Display.qml b/examples/qml/calculator/content/Display.qml similarity index 97% rename from examples/declarative/calculator/content/Display.qml rename to examples/qml/calculator/content/Display.qml index 3333484971..3dceeab169 100644 --- a/examples/declarative/calculator/content/Display.qml +++ b/examples/qml/calculator/content/Display.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/calculator/content/calculator.js b/examples/qml/calculator/content/calculator.js similarity index 100% rename from examples/declarative/calculator/content/calculator.js rename to examples/qml/calculator/content/calculator.js diff --git a/examples/declarative/calculator/content/images/button-.png b/examples/qml/calculator/content/images/button-.png similarity index 100% rename from examples/declarative/calculator/content/images/button-.png rename to examples/qml/calculator/content/images/button-.png diff --git a/examples/declarative/calculator/content/images/button-blue.png b/examples/qml/calculator/content/images/button-blue.png similarity index 100% rename from examples/declarative/calculator/content/images/button-blue.png rename to examples/qml/calculator/content/images/button-blue.png diff --git a/examples/declarative/calculator/content/images/button-green.png b/examples/qml/calculator/content/images/button-green.png similarity index 100% rename from examples/declarative/calculator/content/images/button-green.png rename to examples/qml/calculator/content/images/button-green.png diff --git a/examples/declarative/calculator/content/images/button-purple.png b/examples/qml/calculator/content/images/button-purple.png similarity index 100% rename from examples/declarative/calculator/content/images/button-purple.png rename to examples/qml/calculator/content/images/button-purple.png diff --git a/examples/declarative/calculator/content/images/button-red.png b/examples/qml/calculator/content/images/button-red.png similarity index 100% rename from examples/declarative/calculator/content/images/button-red.png rename to examples/qml/calculator/content/images/button-red.png diff --git a/examples/declarative/calculator/content/images/display.png b/examples/qml/calculator/content/images/display.png similarity index 100% rename from examples/declarative/calculator/content/images/display.png rename to examples/qml/calculator/content/images/display.png diff --git a/examples/declarative/calculator/content/qmldir b/examples/qml/calculator/content/qmldir similarity index 100% rename from examples/declarative/calculator/content/qmldir rename to examples/qml/calculator/content/qmldir diff --git a/examples/declarative/canvas/bezierCurve/bezierCurve.qml b/examples/qml/canvas/bezierCurve/bezierCurve.qml similarity index 100% rename from examples/declarative/canvas/bezierCurve/bezierCurve.qml rename to examples/qml/canvas/bezierCurve/bezierCurve.qml diff --git a/examples/declarative/canvas/clip/clip.qml b/examples/qml/canvas/clip/clip.qml similarity index 100% rename from examples/declarative/canvas/clip/clip.qml rename to examples/qml/canvas/clip/clip.qml diff --git a/examples/declarative/canvas/contents/Button.qml b/examples/qml/canvas/contents/Button.qml similarity index 100% rename from examples/declarative/canvas/contents/Button.qml rename to examples/qml/canvas/contents/Button.qml diff --git a/examples/declarative/canvas/contents/ScrollBar.qml b/examples/qml/canvas/contents/ScrollBar.qml similarity index 100% rename from examples/declarative/canvas/contents/ScrollBar.qml rename to examples/qml/canvas/contents/ScrollBar.qml diff --git a/examples/declarative/canvas/contents/Slider.qml b/examples/qml/canvas/contents/Slider.qml similarity index 100% rename from examples/declarative/canvas/contents/Slider.qml rename to examples/qml/canvas/contents/Slider.qml diff --git a/examples/declarative/canvas/contents/Stocks.qml b/examples/qml/canvas/contents/Stocks.qml similarity index 100% rename from examples/declarative/canvas/contents/Stocks.qml rename to examples/qml/canvas/contents/Stocks.qml diff --git a/examples/declarative/canvas/contents/TitleBar.qml b/examples/qml/canvas/contents/TitleBar.qml similarity index 100% rename from examples/declarative/canvas/contents/TitleBar.qml rename to examples/qml/canvas/contents/TitleBar.qml diff --git a/examples/declarative/canvas/contents/ToolBar.qml b/examples/qml/canvas/contents/ToolBar.qml similarity index 100% rename from examples/declarative/canvas/contents/ToolBar.qml rename to examples/qml/canvas/contents/ToolBar.qml diff --git a/examples/declarative/canvas/contents/images/button-pressed.png b/examples/qml/canvas/contents/images/button-pressed.png similarity index 100% rename from examples/declarative/canvas/contents/images/button-pressed.png rename to examples/qml/canvas/contents/images/button-pressed.png diff --git a/examples/declarative/canvas/contents/images/button.png b/examples/qml/canvas/contents/images/button.png similarity index 100% rename from examples/declarative/canvas/contents/images/button.png rename to examples/qml/canvas/contents/images/button.png diff --git a/examples/declarative/canvas/contents/images/default.svg b/examples/qml/canvas/contents/images/default.svg similarity index 100% rename from examples/declarative/canvas/contents/images/default.svg rename to examples/qml/canvas/contents/images/default.svg diff --git a/examples/declarative/canvas/contents/images/gloss.png b/examples/qml/canvas/contents/images/gloss.png similarity index 100% rename from examples/declarative/canvas/contents/images/gloss.png rename to examples/qml/canvas/contents/images/gloss.png diff --git a/examples/declarative/canvas/contents/images/lineedit.png b/examples/qml/canvas/contents/images/lineedit.png similarity index 100% rename from examples/declarative/canvas/contents/images/lineedit.png rename to examples/qml/canvas/contents/images/lineedit.png diff --git a/examples/declarative/canvas/contents/images/lineedit.sci b/examples/qml/canvas/contents/images/lineedit.sci similarity index 100% rename from examples/declarative/canvas/contents/images/lineedit.sci rename to examples/qml/canvas/contents/images/lineedit.sci diff --git a/examples/declarative/canvas/contents/images/quit.png b/examples/qml/canvas/contents/images/quit.png similarity index 100% rename from examples/declarative/canvas/contents/images/quit.png rename to examples/qml/canvas/contents/images/quit.png diff --git a/examples/declarative/canvas/contents/images/stripes.png b/examples/qml/canvas/contents/images/stripes.png similarity index 100% rename from examples/declarative/canvas/contents/images/stripes.png rename to examples/qml/canvas/contents/images/stripes.png diff --git a/examples/declarative/canvas/contents/images/titlebar.png b/examples/qml/canvas/contents/images/titlebar.png similarity index 100% rename from examples/declarative/canvas/contents/images/titlebar.png rename to examples/qml/canvas/contents/images/titlebar.png diff --git a/examples/declarative/canvas/contents/images/titlebar.sci b/examples/qml/canvas/contents/images/titlebar.sci similarity index 100% rename from examples/declarative/canvas/contents/images/titlebar.sci rename to examples/qml/canvas/contents/images/titlebar.sci diff --git a/examples/declarative/canvas/contents/images/toolbutton.png b/examples/qml/canvas/contents/images/toolbutton.png similarity index 100% rename from examples/declarative/canvas/contents/images/toolbutton.png rename to examples/qml/canvas/contents/images/toolbutton.png diff --git a/examples/declarative/canvas/contents/images/toolbutton.sci b/examples/qml/canvas/contents/images/toolbutton.sci similarity index 100% rename from examples/declarative/canvas/contents/images/toolbutton.sci rename to examples/qml/canvas/contents/images/toolbutton.sci diff --git a/examples/declarative/canvas/contents/qt-logo.png b/examples/qml/canvas/contents/qt-logo.png similarity index 100% rename from examples/declarative/canvas/contents/qt-logo.png rename to examples/qml/canvas/contents/qt-logo.png diff --git a/examples/declarative/canvas/quadraticCurveTo/quadraticCurveTo.qml b/examples/qml/canvas/quadraticCurveTo/quadraticCurveTo.qml similarity index 100% rename from examples/declarative/canvas/quadraticCurveTo/quadraticCurveTo.qml rename to examples/qml/canvas/quadraticCurveTo/quadraticCurveTo.qml diff --git a/examples/declarative/canvas/roundedrect/roundedrect.qml b/examples/qml/canvas/roundedrect/roundedrect.qml similarity index 100% rename from examples/declarative/canvas/roundedrect/roundedrect.qml rename to examples/qml/canvas/roundedrect/roundedrect.qml diff --git a/examples/declarative/canvas/smile/smile.qml b/examples/qml/canvas/smile/smile.qml similarity index 100% rename from examples/declarative/canvas/smile/smile.qml rename to examples/qml/canvas/smile/smile.qml diff --git a/examples/declarative/canvas/squircle/squircle.png b/examples/qml/canvas/squircle/squircle.png similarity index 100% rename from examples/declarative/canvas/squircle/squircle.png rename to examples/qml/canvas/squircle/squircle.png diff --git a/examples/declarative/canvas/squircle/squircle.qml b/examples/qml/canvas/squircle/squircle.qml similarity index 100% rename from examples/declarative/canvas/squircle/squircle.qml rename to examples/qml/canvas/squircle/squircle.qml diff --git a/examples/declarative/canvas/stockchart/README b/examples/qml/canvas/stockchart/README similarity index 100% rename from examples/declarative/canvas/stockchart/README rename to examples/qml/canvas/stockchart/README diff --git a/examples/declarative/canvas/stockchart/com/nokia/StockChartExample/qmldir b/examples/qml/canvas/stockchart/com/nokia/StockChartExample/qmldir similarity index 100% rename from examples/declarative/canvas/stockchart/com/nokia/StockChartExample/qmldir rename to examples/qml/canvas/stockchart/com/nokia/StockChartExample/qmldir diff --git a/examples/declarative/canvas/stockchart/model.cpp b/examples/qml/canvas/stockchart/model.cpp similarity index 100% rename from examples/declarative/canvas/stockchart/model.cpp rename to examples/qml/canvas/stockchart/model.cpp diff --git a/examples/declarative/canvas/stockchart/model.h b/examples/qml/canvas/stockchart/model.h similarity index 100% rename from examples/declarative/canvas/stockchart/model.h rename to examples/qml/canvas/stockchart/model.h diff --git a/examples/declarative/canvas/stockchart/plugin.cpp b/examples/qml/canvas/stockchart/plugin.cpp similarity index 93% rename from examples/declarative/canvas/stockchart/plugin.cpp rename to examples/qml/canvas/stockchart/plugin.cpp index af64af4da8..3b354e2b31 100644 --- a/examples/declarative/canvas/stockchart/plugin.cpp +++ b/examples/qml/canvas/stockchart/plugin.cpp @@ -38,12 +38,12 @@ ** ****************************************************************************/ -#include -#include +#include +#include #include #include "model.h" -class QStockChartExampleQmlPlugin : public QDeclarativeExtensionPlugin +class QStockChartExampleQmlPlugin : public QQmlExtensionPlugin { Q_OBJECT public: diff --git a/examples/declarative/canvas/stockchart/stock.qml b/examples/qml/canvas/stockchart/stock.qml similarity index 100% rename from examples/declarative/canvas/stockchart/stock.qml rename to examples/qml/canvas/stockchart/stock.qml diff --git a/examples/qml/canvas/stockchart/stockchart.pro b/examples/qml/canvas/stockchart/stockchart.pro new file mode 100644 index 0000000000..0e3ca82c44 --- /dev/null +++ b/examples/qml/canvas/stockchart/stockchart.pro @@ -0,0 +1,20 @@ +TEMPLATE = lib +CONFIG += qt plugin +QT += qml network + +DESTDIR = com/nokia/StockChartExample +TARGET = qmlstockchartexampleplugin + +SOURCES += model.cpp plugin.cpp +HEADERS += model.h +qqmlsources.files += \ + com/nokia/StockChartExample/qmldir \ + stock.qml + +qqmlsources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/com/nokia/StockChartExample + +sources.files += stockchart.pro model.h model.cpp plugin.cpp README +sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins +target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/com/nokia/StockChartExample + +INSTALLS += qqmlsources sources target diff --git a/examples/declarative/canvas/tiger/tiger.js b/examples/qml/canvas/tiger/tiger.js similarity index 100% rename from examples/declarative/canvas/tiger/tiger.js rename to examples/qml/canvas/tiger/tiger.js diff --git a/examples/declarative/canvas/tiger/tiger.qml b/examples/qml/canvas/tiger/tiger.qml similarity index 100% rename from examples/declarative/canvas/tiger/tiger.qml rename to examples/qml/canvas/tiger/tiger.qml diff --git a/examples/declarative/canvas/twitterfriends/TwitterUser.qml b/examples/qml/canvas/twitterfriends/TwitterUser.qml similarity index 100% rename from examples/declarative/canvas/twitterfriends/TwitterUser.qml rename to examples/qml/canvas/twitterfriends/TwitterUser.qml diff --git a/examples/declarative/canvas/twitterfriends/cache.js b/examples/qml/canvas/twitterfriends/cache.js similarity index 100% rename from examples/declarative/canvas/twitterfriends/cache.js rename to examples/qml/canvas/twitterfriends/cache.js diff --git a/examples/declarative/canvas/twitterfriends/twitter.qml b/examples/qml/canvas/twitterfriends/twitter.qml similarity index 100% rename from examples/declarative/canvas/twitterfriends/twitter.qml rename to examples/qml/canvas/twitterfriends/twitter.qml diff --git a/examples/declarative/cppextensions/cppextensions.pro b/examples/qml/cppextensions/cppextensions.pro similarity index 100% rename from examples/declarative/cppextensions/cppextensions.pro rename to examples/qml/cppextensions/cppextensions.pro diff --git a/examples/declarative/cppextensions/cppextensions.qmlproject b/examples/qml/cppextensions/cppextensions.qmlproject similarity index 100% rename from examples/declarative/cppextensions/cppextensions.qmlproject rename to examples/qml/cppextensions/cppextensions.qmlproject diff --git a/examples/declarative/cppextensions/imageprovider/ImageProviderCore/qmldir b/examples/qml/cppextensions/imageprovider/ImageProviderCore/qmldir similarity index 100% rename from examples/declarative/cppextensions/imageprovider/ImageProviderCore/qmldir rename to examples/qml/cppextensions/imageprovider/ImageProviderCore/qmldir diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml b/examples/qml/cppextensions/imageprovider/imageprovider-example.qml similarity index 100% rename from examples/declarative/cppextensions/imageprovider/imageprovider-example.qml rename to examples/qml/cppextensions/imageprovider/imageprovider-example.qml diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.cpp b/examples/qml/cppextensions/imageprovider/imageprovider.cpp similarity index 89% rename from examples/declarative/cppextensions/imageprovider/imageprovider.cpp rename to examples/qml/cppextensions/imageprovider/imageprovider.cpp index 94f85753ed..506d5b0812 100644 --- a/examples/declarative/cppextensions/imageprovider/imageprovider.cpp +++ b/examples/qml/cppextensions/imageprovider/imageprovider.cpp @@ -39,19 +39,19 @@ ****************************************************************************/ -#include +#include -#include -#include +#include +#include #include #include //![0] -class ColorImageProvider : public QDeclarativeImageProvider +class ColorImageProvider : public QQmlImageProvider { public: ColorImageProvider() - : QDeclarativeImageProvider(QDeclarativeImageProvider::Pixmap) + : QQmlImageProvider(QQmlImageProvider::Pixmap) { } @@ -84,7 +84,7 @@ class ColorImageProvider : public QDeclarativeImageProvider //![1] -class ImageProviderExtensionPlugin : public QDeclarativeExtensionPlugin +class ImageProviderExtensionPlugin : public QQmlExtensionPlugin { Q_OBJECT public: @@ -93,7 +93,7 @@ class ImageProviderExtensionPlugin : public QDeclarativeExtensionPlugin Q_UNUSED(uri); } - void initializeEngine(QDeclarativeEngine *engine, const char *uri) + void initializeEngine(QQmlEngine *engine, const char *uri) { Q_UNUSED(uri); engine->addImageProvider("colors", new ColorImageProvider); diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.pro b/examples/qml/cppextensions/imageprovider/imageprovider.pro similarity index 60% rename from examples/declarative/cppextensions/imageprovider/imageprovider.pro rename to examples/qml/cppextensions/imageprovider/imageprovider.pro index cfa7923128..f75a6ebd89 100644 --- a/examples/declarative/cppextensions/imageprovider/imageprovider.pro +++ b/examples/qml/cppextensions/imageprovider/imageprovider.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative +QT += qml DESTDIR = ImageProviderCore TARGET = qmlimageproviderplugin @@ -8,13 +8,13 @@ TARGET = qmlimageproviderplugin SOURCES += imageprovider.cpp sources.files = $$SOURCES imageprovider.qml imageprovider.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/imageprovider +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/imageprovider -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/imageprovider/ImageProviderCore +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/imageprovider/ImageProviderCore ImageProviderCore_sources.files = \ ImageProviderCore/qmldir -ImageProviderCore_sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/imageprovider/ImageProviderCore +ImageProviderCore_sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/imageprovider/ImageProviderCore INSTALLS = sources ImageProviderCore_sources target diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.qmlproject b/examples/qml/cppextensions/imageprovider/imageprovider.qmlproject similarity index 100% rename from examples/declarative/cppextensions/imageprovider/imageprovider.qmlproject rename to examples/qml/cppextensions/imageprovider/imageprovider.qmlproject diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp b/examples/qml/cppextensions/networkaccessmanagerfactory/main.cpp similarity index 93% rename from examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp rename to examples/qml/cppextensions/networkaccessmanagerfactory/main.cpp index 2bad2aa285..6ebded0512 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp +++ b/examples/qml/cppextensions/networkaccessmanagerfactory/main.cpp @@ -42,13 +42,13 @@ #include #include -#include -#include +#include +#include #include /* - This example illustrates using a QDeclarativeNetworkAccessManagerFactory to + This example illustrates using a QQmlNetworkAccessManagerFactory to create a QNetworkAccessManager with a proxy. Usage: @@ -58,7 +58,7 @@ static QString proxyHost; static int proxyPort = 0; -class MyNetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory +class MyNetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory { public: virtual QNetworkAccessManager *create(QObject *parent); diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro b/examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro similarity index 67% rename from examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro rename to examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro index 479af364d0..6cbc24a7b8 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro +++ b/examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro @@ -1,4 +1,4 @@ -QT += declarative quick network +QT += qml quick network SOURCES += main.cpp RESOURCES += networkaccessmanagerfactory.qrc diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject b/examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject similarity index 100% rename from examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject rename to examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc b/examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc similarity index 100% rename from examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc rename to examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml b/examples/qml/cppextensions/networkaccessmanagerfactory/view.qml similarity index 100% rename from examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml rename to examples/qml/cppextensions/networkaccessmanagerfactory/view.qml diff --git a/examples/declarative/cppextensions/plugins/README b/examples/qml/cppextensions/plugins/README similarity index 100% rename from examples/declarative/cppextensions/plugins/README rename to examples/qml/cppextensions/plugins/README diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/Clock.qml similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/Clock.qml diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/center.png b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/center.png similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/center.png rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/center.png diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/clock.png b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/clock.png similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/clock.png rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/clock.png diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/hour.png b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/hour.png similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/hour.png rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/hour.png diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/minute.png b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/minute.png similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/minute.png rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/minute.png diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/qmldir b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/qmldir similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/qmldir rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/qmldir diff --git a/examples/declarative/cppextensions/plugins/plugin.cpp b/examples/qml/cppextensions/plugins/plugin.cpp similarity index 96% rename from examples/declarative/cppextensions/plugins/plugin.cpp rename to examples/qml/cppextensions/plugins/plugin.cpp index 6fbf962f4e..b53ef2ccb3 100644 --- a/examples/declarative/cppextensions/plugins/plugin.cpp +++ b/examples/qml/cppextensions/plugins/plugin.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ -#include -#include +#include +#include #include #include #include @@ -138,7 +138,7 @@ int TimeModel::instances=0; MinuteTimer *TimeModel::timer=0; //![plugin] -class QExampleQmlPlugin : public QDeclarativeExtensionPlugin +class QExampleQmlPlugin : public QQmlExtensionPlugin { Q_OBJECT public: diff --git a/examples/declarative/cppextensions/plugins/plugins.pro b/examples/qml/cppextensions/plugins/plugins.pro similarity index 52% rename from examples/declarative/cppextensions/plugins/plugins.pro rename to examples/qml/cppextensions/plugins/plugins.pro index bdcb62ca8a..e6c7fe64a0 100644 --- a/examples/declarative/cppextensions/plugins/plugins.pro +++ b/examples/qml/cppextensions/plugins/plugins.pro @@ -1,13 +1,13 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative +QT += qml DESTDIR = com/nokia/TimeExample TARGET = qmlqtimeexampleplugin SOURCES += plugin.cpp -qdeclarativesources.files += \ +qqmlsources.files += \ com/nokia/TimeExample/qmldir \ com/nokia/TimeExample/center.png \ com/nokia/TimeExample/clock.png \ @@ -15,11 +15,11 @@ qdeclarativesources.files += \ com/nokia/TimeExample/hour.png \ com/nokia/TimeExample/minute.png -qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/plugins/com/nokia/TimeExample +qqmlsources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/com/nokia/TimeExample sources.files += plugins.pro plugin.cpp plugins.qml README -sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/plugins -target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/plugins/com/nokia/TimeExample +sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins +target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/com/nokia/TimeExample -INSTALLS += qdeclarativesources sources target +INSTALLS += qqmlsources sources target diff --git a/examples/declarative/cppextensions/plugins/plugins.qml b/examples/qml/cppextensions/plugins/plugins.qml similarity index 100% rename from examples/declarative/cppextensions/plugins/plugins.qml rename to examples/qml/cppextensions/plugins/plugins.qml diff --git a/examples/declarative/cppextensions/plugins/plugins.qmlproject b/examples/qml/cppextensions/plugins/plugins.qmlproject similarity index 100% rename from examples/declarative/cppextensions/plugins/plugins.qmlproject rename to examples/qml/cppextensions/plugins/plugins.qmlproject diff --git a/examples/declarative/cppextensions/referenceexamples/adding/adding.pro b/examples/qml/cppextensions/referenceexamples/adding/adding.pro similarity index 50% rename from examples/declarative/cppextensions/referenceexamples/adding/adding.pro rename to examples/qml/cppextensions/referenceexamples/adding/adding.pro index 1a972926b7..706322e9ff 100644 --- a/examples/declarative/cppextensions/referenceexamples/adding/adding.pro +++ b/examples/qml/cppextensions/referenceexamples/adding/adding.pro @@ -1,11 +1,11 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp HEADERS += person.h RESOURCES += adding.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/adding +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/adding sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS adding.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/adding +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/adding INSTALLS += target sources diff --git a/examples/declarative/cppextensions/referenceexamples/adding/adding.qrc b/examples/qml/cppextensions/referenceexamples/adding/adding.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/adding/adding.qrc rename to examples/qml/cppextensions/referenceexamples/adding/adding.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/adding/example.qml b/examples/qml/cppextensions/referenceexamples/adding/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/adding/example.qml rename to examples/qml/cppextensions/referenceexamples/adding/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/adding/main.cpp b/examples/qml/cppextensions/referenceexamples/adding/main.cpp similarity index 93% rename from examples/declarative/cppextensions/referenceexamples/adding/main.cpp rename to examples/qml/cppextensions/referenceexamples/adding/main.cpp index 4c1918b6de..c3a0ab6812 100644 --- a/examples/declarative/cppextensions/referenceexamples/adding/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/adding/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include "person.h" @@ -50,8 +50,8 @@ int main(int argc, char ** argv) qmlRegisterType("People", 1,0, "Person"); //![0] - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); Person *person = qobject_cast(component.create()); if (person) { qWarning() << "The person's name is" << person->name(); diff --git a/examples/declarative/cppextensions/referenceexamples/adding/person.cpp b/examples/qml/cppextensions/referenceexamples/adding/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/adding/person.cpp rename to examples/qml/cppextensions/referenceexamples/adding/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/adding/person.h b/examples/qml/cppextensions/referenceexamples/adding/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/adding/person.h rename to examples/qml/cppextensions/referenceexamples/adding/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/attached/attached.pro b/examples/qml/cppextensions/referenceexamples/attached/attached.pro similarity index 57% rename from examples/declarative/cppextensions/referenceexamples/attached/attached.pro rename to examples/qml/cppextensions/referenceexamples/attached/attached.pro index 4cfd4e0aed..f4385e1a30 100644 --- a/examples/declarative/cppextensions/referenceexamples/attached/attached.pro +++ b/examples/qml/cppextensions/referenceexamples/attached/attached.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += attached.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/attached +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/attached sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS attached.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/attached +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/attached INSTALLS += target sources diff --git a/examples/declarative/cppextensions/referenceexamples/attached/attached.qrc b/examples/qml/cppextensions/referenceexamples/attached/attached.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/attached.qrc rename to examples/qml/cppextensions/referenceexamples/attached/attached.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp index feefef4fe1..6b784fdccd 100644 --- a/examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp @@ -69,9 +69,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty BirthdayParty::guests() +QQmlListProperty BirthdayParty::guests() { - return QDeclarativeListProperty(this, m_guests); + return QQmlListProperty(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h index c789c0bd51..1da6c34026 100644 --- a/examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h @@ -42,7 +42,7 @@ #include #include -#include +#include #include "person.h" class BirthdayPartyAttached : public QObject @@ -63,7 +63,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty guests READ guests) + Q_PROPERTY(QQmlListProperty guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -71,7 +71,7 @@ class BirthdayParty : public QObject Person *host() const; void setHost(Person *); - QDeclarativeListProperty guests(); + QQmlListProperty guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/declarative/cppextensions/referenceexamples/attached/example.qml b/examples/qml/cppextensions/referenceexamples/attached/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/example.qml rename to examples/qml/cppextensions/referenceexamples/attached/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/attached/main.cpp b/examples/qml/cppextensions/referenceexamples/attached/main.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/attached/main.cpp rename to examples/qml/cppextensions/referenceexamples/attached/main.cpp index 4c2c3003fe..ce067bbbf7 100644 --- a/examples/declarative/cppextensions/referenceexamples/attached/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/attached/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include "birthdayparty.h" #include "person.h" @@ -55,8 +55,8 @@ int main(int argc, char ** argv) qmlRegisterType("People", 1,0, "Boy"); qmlRegisterType("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast(component.create()); if (party && party->host()) { diff --git a/examples/declarative/cppextensions/referenceexamples/attached/person.cpp b/examples/qml/cppextensions/referenceexamples/attached/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/person.cpp rename to examples/qml/cppextensions/referenceexamples/attached/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/attached/person.h b/examples/qml/cppextensions/referenceexamples/attached/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/person.h rename to examples/qml/cppextensions/referenceexamples/attached/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/binding/binding.pro b/examples/qml/cppextensions/referenceexamples/binding/binding.pro similarity index 63% rename from examples/declarative/cppextensions/referenceexamples/binding/binding.pro rename to examples/qml/cppextensions/referenceexamples/binding/binding.pro index 2add33fa47..0379f93ea7 100644 --- a/examples/declarative/cppextensions/referenceexamples/binding/binding.pro +++ b/examples/qml/cppextensions/referenceexamples/binding/binding.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -9,7 +9,7 @@ HEADERS += person.h \ happybirthdaysong.h RESOURCES += binding.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/binding +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/binding sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS binding.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/binding +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/binding INSTALLS += target sources diff --git a/examples/declarative/cppextensions/referenceexamples/binding/binding.qrc b/examples/qml/cppextensions/referenceexamples/binding/binding.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/binding.qrc rename to examples/qml/cppextensions/referenceexamples/binding/binding.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp similarity index 96% rename from examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp index 4f5acdfb75..9a38c3b646 100644 --- a/examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp @@ -75,9 +75,9 @@ void BirthdayParty::setHost(Person *c) emit hostChanged(); } -QDeclarativeListProperty BirthdayParty::guests() +QQmlListProperty BirthdayParty::guests() { - return QDeclarativeListProperty(this, m_guests); + return QQmlListProperty(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h index 376d107f26..195e9cd9cf 100644 --- a/examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include "person.h" class BirthdayPartyAttached : public QObject @@ -69,7 +69,7 @@ class BirthdayParty : public QObject // ![0] Q_PROPERTY(Person *host READ host WRITE setHost NOTIFY hostChanged) // ![0] - Q_PROPERTY(QDeclarativeListProperty guests READ guests) + Q_PROPERTY(QQmlListProperty guests READ guests) Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement) Q_CLASSINFO("DefaultProperty", "guests") public: @@ -78,7 +78,7 @@ class BirthdayParty : public QObject Person *host() const; void setHost(Person *); - QDeclarativeListProperty guests(); + QQmlListProperty guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/declarative/cppextensions/referenceexamples/binding/example.qml b/examples/qml/cppextensions/referenceexamples/binding/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/example.qml rename to examples/qml/cppextensions/referenceexamples/binding/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.cpp b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp similarity index 97% rename from examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.cpp rename to examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp index df4dbec9c4..90220e15ae 100644 --- a/examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.cpp +++ b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp @@ -49,7 +49,7 @@ HappyBirthdaySong::HappyBirthdaySong(QObject *parent) timer->start(1000); } -void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p) +void HappyBirthdaySong::setTarget(const QQmlProperty &p) { m_target = p; } diff --git a/examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.h b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h similarity index 89% rename from examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.h rename to examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h index a9f3a94544..ace48b2af0 100644 --- a/examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.h +++ b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h @@ -40,20 +40,20 @@ #ifndef HAPPYBIRTHDAYSONG_H #define HAPPYBIRTHDAYSONG_H -#include -#include +#include +#include #include -class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource +class HappyBirthdaySong : public QObject, public QQmlPropertyValueSource { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) - Q_INTERFACES(QDeclarativePropertyValueSource) + Q_INTERFACES(QQmlPropertyValueSource) public: HappyBirthdaySong(QObject *parent = 0); - virtual void setTarget(const QDeclarativeProperty &); + virtual void setTarget(const QQmlProperty &); QString name() const; void setName(const QString &); @@ -66,7 +66,7 @@ private slots: private: int m_line; QStringList m_lyrics; - QDeclarativeProperty m_target; + QQmlProperty m_target; QString m_name; }; diff --git a/examples/declarative/cppextensions/referenceexamples/binding/main.cpp b/examples/qml/cppextensions/referenceexamples/binding/main.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/binding/main.cpp rename to examples/qml/cppextensions/referenceexamples/binding/main.cpp index 551d24b702..389cb7609b 100644 --- a/examples/declarative/cppextensions/referenceexamples/binding/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/binding/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include "birthdayparty.h" #include "happybirthdaysong.h" @@ -56,8 +56,8 @@ int main(int argc, char ** argv) qmlRegisterType("People", 1,0, "Boy"); qmlRegisterType("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast(component.create()); if (party && party->host()) { diff --git a/examples/declarative/cppextensions/referenceexamples/binding/person.cpp b/examples/qml/cppextensions/referenceexamples/binding/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/person.cpp rename to examples/qml/cppextensions/referenceexamples/binding/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/binding/person.h b/examples/qml/cppextensions/referenceexamples/binding/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/person.h rename to examples/qml/cppextensions/referenceexamples/binding/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp index 1859ca9461..d697ac22b6 100644 --- a/examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp @@ -54,9 +54,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty BirthdayParty::guests() +QQmlListProperty BirthdayParty::guests() { - return QDeclarativeListProperty(this, m_guests); + return QQmlListProperty(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h similarity index 94% rename from examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h index 4315d3727e..43611693d9 100644 --- a/examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h @@ -41,7 +41,7 @@ #define BIRTHDAYPARTY_H #include -#include +#include #include "person.h" class BirthdayParty : public QObject @@ -49,7 +49,7 @@ class BirthdayParty : public QObject Q_OBJECT // ![0] Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty guests READ guests) + Q_PROPERTY(QQmlListProperty guests READ guests) // ![0] public: BirthdayParty(QObject *parent = 0); @@ -57,7 +57,7 @@ class BirthdayParty : public QObject Person *host() const; void setHost(Person *); - QDeclarativeListProperty guests(); + QQmlListProperty guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro b/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro similarity index 57% rename from examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro rename to examples/qml/cppextensions/referenceexamples/coercion/coercion.pro index 742b85b683..60e8532bab 100644 --- a/examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro +++ b/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += coercion.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/coercion +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/coercion sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS coercion.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/coercion +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/coercion INSTALLS += target sources diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/coercion.qrc b/examples/qml/cppextensions/referenceexamples/coercion/coercion.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/coercion.qrc rename to examples/qml/cppextensions/referenceexamples/coercion/coercion.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/example.qml b/examples/qml/cppextensions/referenceexamples/coercion/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/example.qml rename to examples/qml/cppextensions/referenceexamples/coercion/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp b/examples/qml/cppextensions/referenceexamples/coercion/main.cpp similarity index 94% rename from examples/declarative/cppextensions/referenceexamples/coercion/main.cpp rename to examples/qml/cppextensions/referenceexamples/coercion/main.cpp index 95b309de4c..15e41ca597 100644 --- a/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/coercion/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include "birthdayparty.h" #include "person.h" @@ -58,8 +58,8 @@ int main(int argc, char ** argv) qmlRegisterType("People", 1,0, "Girl"); //![register boy girl] - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast(component.create()); if (party && party->host()) { diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/person.cpp b/examples/qml/cppextensions/referenceexamples/coercion/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/person.cpp rename to examples/qml/cppextensions/referenceexamples/coercion/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/person.h b/examples/qml/cppextensions/referenceexamples/coercion/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/person.h rename to examples/qml/cppextensions/referenceexamples/coercion/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/default/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/default/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp index 1859ca9461..d697ac22b6 100644 --- a/examples/declarative/cppextensions/referenceexamples/default/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp @@ -54,9 +54,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty BirthdayParty::guests() +QQmlListProperty BirthdayParty::guests() { - return QDeclarativeListProperty(this, m_guests); + return QQmlListProperty(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/declarative/cppextensions/referenceexamples/default/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h similarity index 94% rename from examples/declarative/cppextensions/referenceexamples/default/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/default/birthdayparty.h index cfca6689db..3ee635039d 100644 --- a/examples/declarative/cppextensions/referenceexamples/default/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h @@ -41,7 +41,7 @@ #define BIRTHDAYPARTY_H #include -#include +#include #include "person.h" // ![0] @@ -49,7 +49,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty guests READ guests) + Q_PROPERTY(QQmlListProperty guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -57,7 +57,7 @@ class BirthdayParty : public QObject Person *host() const; void setHost(Person *); - QDeclarativeListProperty guests(); + QQmlListProperty guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/declarative/cppextensions/referenceexamples/default/default.pro b/examples/qml/cppextensions/referenceexamples/default/default.pro similarity index 57% rename from examples/declarative/cppextensions/referenceexamples/default/default.pro rename to examples/qml/cppextensions/referenceexamples/default/default.pro index 6533cdd7d3..36ef39fc55 100644 --- a/examples/declarative/cppextensions/referenceexamples/default/default.pro +++ b/examples/qml/cppextensions/referenceexamples/default/default.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += default.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/default +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/default sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS default.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/default +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/default INSTALLS += target sources diff --git a/examples/declarative/cppextensions/referenceexamples/default/default.qrc b/examples/qml/cppextensions/referenceexamples/default/default.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/default.qrc rename to examples/qml/cppextensions/referenceexamples/default/default.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/default/example.qml b/examples/qml/cppextensions/referenceexamples/default/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/example.qml rename to examples/qml/cppextensions/referenceexamples/default/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/default/main.cpp b/examples/qml/cppextensions/referenceexamples/default/main.cpp similarity index 94% rename from examples/declarative/cppextensions/referenceexamples/default/main.cpp rename to examples/qml/cppextensions/referenceexamples/default/main.cpp index 3a03279129..175945fc5d 100644 --- a/examples/declarative/cppextensions/referenceexamples/default/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/default/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include "birthdayparty.h" #include "person.h" @@ -53,8 +53,8 @@ int main(int argc, char ** argv) qmlRegisterType("People", 1,0, "Boy"); qmlRegisterType("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast(component.create()); if (party && party->host()) { diff --git a/examples/declarative/cppextensions/referenceexamples/default/person.cpp b/examples/qml/cppextensions/referenceexamples/default/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/person.cpp rename to examples/qml/cppextensions/referenceexamples/default/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/default/person.h b/examples/qml/cppextensions/referenceexamples/default/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/person.h rename to examples/qml/cppextensions/referenceexamples/default/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/extended/example.qml b/examples/qml/cppextensions/referenceexamples/extended/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/extended/example.qml rename to examples/qml/cppextensions/referenceexamples/extended/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/extended/extended.pro b/examples/qml/cppextensions/referenceexamples/extended/extended.pro similarity index 50% rename from examples/declarative/cppextensions/referenceexamples/extended/extended.pro rename to examples/qml/cppextensions/referenceexamples/extended/extended.pro index 3d9f59c470..206ea19c61 100644 --- a/examples/declarative/cppextensions/referenceexamples/extended/extended.pro +++ b/examples/qml/cppextensions/referenceexamples/extended/extended.pro @@ -1,11 +1,11 @@ -QT += declarative widgets +QT += qml widgets SOURCES += main.cpp \ lineedit.cpp HEADERS += lineedit.h RESOURCES += extended.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/extended +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/extended sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extended.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/extended +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/extended INSTALLS += target sources diff --git a/examples/declarative/cppextensions/referenceexamples/extended/extended.qrc b/examples/qml/cppextensions/referenceexamples/extended/extended.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/extended/extended.qrc rename to examples/qml/cppextensions/referenceexamples/extended/extended.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/extended/lineedit.cpp b/examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp similarity index 99% rename from examples/declarative/cppextensions/referenceexamples/extended/lineedit.cpp rename to examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp index 8f7fd8aa93..a3b1d0d54e 100644 --- a/examples/declarative/cppextensions/referenceexamples/extended/lineedit.cpp +++ b/examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ #include "lineedit.h" -#include +#include LineEditExtension::LineEditExtension(QObject *object) : QObject(object), m_lineedit(static_cast(object)) diff --git a/examples/declarative/cppextensions/referenceexamples/extended/lineedit.h b/examples/qml/cppextensions/referenceexamples/extended/lineedit.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/extended/lineedit.h rename to examples/qml/cppextensions/referenceexamples/extended/lineedit.h diff --git a/examples/declarative/cppextensions/referenceexamples/extended/main.cpp b/examples/qml/cppextensions/referenceexamples/extended/main.cpp similarity index 93% rename from examples/declarative/cppextensions/referenceexamples/extended/main.cpp rename to examples/qml/cppextensions/referenceexamples/extended/main.cpp index 3c580396f2..de7c450169 100644 --- a/examples/declarative/cppextensions/referenceexamples/extended/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/extended/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include #include "lineedit.h" @@ -50,8 +50,8 @@ int main(int argc, char ** argv) qmlRegisterExtendedType("People", 1,0, "QLineEdit"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); QLineEdit *edit = qobject_cast(component.create()); if (edit) { diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp index 1859ca9461..d697ac22b6 100644 --- a/examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp @@ -54,9 +54,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty BirthdayParty::guests() +QQmlListProperty BirthdayParty::guests() { - return QDeclarativeListProperty(this, m_guests); + return QQmlListProperty(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h similarity index 94% rename from examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h index 491903adc5..5ca0e9b982 100644 --- a/examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h @@ -41,14 +41,14 @@ #define BIRTHDAYPARTY_H #include -#include +#include #include "person.h" class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty guests READ guests) + Q_PROPERTY(QQmlListProperty guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -56,7 +56,7 @@ class BirthdayParty : public QObject Person *host() const; void setHost(Person *); - QDeclarativeListProperty guests(); + QQmlListProperty guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/example.qml b/examples/qml/cppextensions/referenceexamples/grouped/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/example.qml rename to examples/qml/cppextensions/referenceexamples/grouped/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro b/examples/qml/cppextensions/referenceexamples/grouped/grouped.pro similarity index 57% rename from examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro rename to examples/qml/cppextensions/referenceexamples/grouped/grouped.pro index aab0c8469a..d32a98f79b 100644 --- a/examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro +++ b/examples/qml/cppextensions/referenceexamples/grouped/grouped.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += grouped.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/grouped +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/grouped sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS grouped.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/grouped +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/grouped INSTALLS += target sources diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/grouped.qrc b/examples/qml/cppextensions/referenceexamples/grouped/grouped.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/grouped.qrc rename to examples/qml/cppextensions/referenceexamples/grouped/grouped.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp b/examples/qml/cppextensions/referenceexamples/grouped/main.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/grouped/main.cpp rename to examples/qml/cppextensions/referenceexamples/grouped/main.cpp index de7d714c52..55be3b715b 100644 --- a/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/grouped/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include "birthdayparty.h" #include "person.h" @@ -54,8 +54,8 @@ int main(int argc, char ** argv) qmlRegisterType("People", 1,0, "Boy"); qmlRegisterType("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast(component.create()); if (party && party->host()) { diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/person.cpp b/examples/qml/cppextensions/referenceexamples/grouped/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/person.cpp rename to examples/qml/cppextensions/referenceexamples/grouped/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/person.h b/examples/qml/cppextensions/referenceexamples/grouped/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/person.h rename to examples/qml/cppextensions/referenceexamples/grouped/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/methods/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/methods/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp index 35444f505a..0935d708a7 100644 --- a/examples/declarative/cppextensions/referenceexamples/methods/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp @@ -55,9 +55,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty BirthdayParty::guests() +QQmlListProperty BirthdayParty::guests() { - return QDeclarativeListProperty(this, m_guests); + return QQmlListProperty(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/declarative/cppextensions/referenceexamples/methods/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h similarity index 94% rename from examples/declarative/cppextensions/referenceexamples/methods/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h index e49afdb78d..df8a859972 100644 --- a/examples/declarative/cppextensions/referenceexamples/methods/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h @@ -41,21 +41,21 @@ #define BIRTHDAYPARTY_H #include -#include +#include #include "person.h" class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty guests READ guests) + Q_PROPERTY(QQmlListProperty guests READ guests) public: BirthdayParty(QObject *parent = 0); Person *host() const; void setHost(Person *); - QDeclarativeListProperty guests(); + QQmlListProperty guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/declarative/cppextensions/referenceexamples/methods/example.qml b/examples/qml/cppextensions/referenceexamples/methods/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/example.qml rename to examples/qml/cppextensions/referenceexamples/methods/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/methods/main.cpp b/examples/qml/cppextensions/referenceexamples/methods/main.cpp similarity index 94% rename from examples/declarative/cppextensions/referenceexamples/methods/main.cpp rename to examples/qml/cppextensions/referenceexamples/methods/main.cpp index d037d88f20..1e502c3943 100644 --- a/examples/declarative/cppextensions/referenceexamples/methods/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/methods/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include "birthdayparty.h" #include "person.h" @@ -51,8 +51,8 @@ int main(int argc, char ** argv) qmlRegisterType("People", 1,0, "BirthdayParty"); qmlRegisterType("People", 1,0, "Person"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast(component.create()); if (party && party->host()) { diff --git a/examples/declarative/cppextensions/referenceexamples/methods/methods.pro b/examples/qml/cppextensions/referenceexamples/methods/methods.pro similarity index 57% rename from examples/declarative/cppextensions/referenceexamples/methods/methods.pro rename to examples/qml/cppextensions/referenceexamples/methods/methods.pro index ee28355188..f4c63bfa29 100644 --- a/examples/declarative/cppextensions/referenceexamples/methods/methods.pro +++ b/examples/qml/cppextensions/referenceexamples/methods/methods.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += methods.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/methods +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/methods sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS methods.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/methods +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/methods INSTALLS += target sources diff --git a/examples/declarative/cppextensions/referenceexamples/methods/methods.qrc b/examples/qml/cppextensions/referenceexamples/methods/methods.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/methods.qrc rename to examples/qml/cppextensions/referenceexamples/methods/methods.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/methods/person.cpp b/examples/qml/cppextensions/referenceexamples/methods/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/person.cpp rename to examples/qml/cppextensions/referenceexamples/methods/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/methods/person.h b/examples/qml/cppextensions/referenceexamples/methods/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/person.h rename to examples/qml/cppextensions/referenceexamples/methods/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp index 0038cd0a41..f7280560ab 100644 --- a/examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp @@ -55,9 +55,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty BirthdayParty::guests() +QQmlListProperty BirthdayParty::guests() { - return QDeclarativeListProperty(this, m_guests); + return QQmlListProperty(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h similarity index 94% rename from examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h index 2c3d128b6d..84eefa52ae 100644 --- a/examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h @@ -41,7 +41,7 @@ #define BIRTHDAYPARTY_H #include -#include +#include #include "person.h" // ![0] @@ -53,7 +53,7 @@ class BirthdayParty : public QObject Q_PROPERTY(Person *host READ host WRITE setHost) // ![1] // ![2] - Q_PROPERTY(QDeclarativeListProperty guests READ guests) + Q_PROPERTY(QQmlListProperty guests READ guests) // ![2] // ![3] public: @@ -62,7 +62,7 @@ class BirthdayParty : public QObject Person *host() const; void setHost(Person *); - QDeclarativeListProperty guests(); + QQmlListProperty guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/declarative/cppextensions/referenceexamples/properties/example.qml b/examples/qml/cppextensions/referenceexamples/properties/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/example.qml rename to examples/qml/cppextensions/referenceexamples/properties/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/properties/main.cpp b/examples/qml/cppextensions/referenceexamples/properties/main.cpp similarity index 94% rename from examples/declarative/cppextensions/referenceexamples/properties/main.cpp rename to examples/qml/cppextensions/referenceexamples/properties/main.cpp index 421ce9fbaa..cc0de89221 100644 --- a/examples/declarative/cppextensions/referenceexamples/properties/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/properties/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include "birthdayparty.h" #include "person.h" @@ -53,8 +53,8 @@ int main(int argc, char ** argv) qmlRegisterType("People", 1,0, "Person"); //![register list] - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast(component.create()); if (party && party->host()) { diff --git a/examples/declarative/cppextensions/referenceexamples/properties/person.cpp b/examples/qml/cppextensions/referenceexamples/properties/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/person.cpp rename to examples/qml/cppextensions/referenceexamples/properties/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/properties/person.h b/examples/qml/cppextensions/referenceexamples/properties/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/person.h rename to examples/qml/cppextensions/referenceexamples/properties/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/properties/properties.pro b/examples/qml/cppextensions/referenceexamples/properties/properties.pro similarity index 57% rename from examples/declarative/cppextensions/referenceexamples/properties/properties.pro rename to examples/qml/cppextensions/referenceexamples/properties/properties.pro index 936d0ea429..e079b1f79e 100644 --- a/examples/declarative/cppextensions/referenceexamples/properties/properties.pro +++ b/examples/qml/cppextensions/referenceexamples/properties/properties.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += properties.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/properties +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/properties sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS properties.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/properties +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/properties INSTALLS += target sources diff --git a/examples/declarative/cppextensions/referenceexamples/properties/properties.qrc b/examples/qml/cppextensions/referenceexamples/properties/properties.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/properties.qrc rename to examples/qml/cppextensions/referenceexamples/properties/properties.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/referenceexamples.pro b/examples/qml/cppextensions/referenceexamples/referenceexamples.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/referenceexamples.pro rename to examples/qml/cppextensions/referenceexamples/referenceexamples.pro diff --git a/examples/declarative/cppextensions/referenceexamples/referenceexamples.qmlproject b/examples/qml/cppextensions/referenceexamples/referenceexamples.qmlproject similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/referenceexamples.qmlproject rename to examples/qml/cppextensions/referenceexamples/referenceexamples.qmlproject diff --git a/examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp index d576c2a278..078c5f9a2d 100644 --- a/examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp @@ -70,9 +70,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty BirthdayParty::guests() +QQmlListProperty BirthdayParty::guests() { - return QDeclarativeListProperty(this, m_guests); + return QQmlListProperty(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h index 45ad4f0acf..3f1b020b5a 100644 --- a/examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h @@ -42,7 +42,7 @@ #include #include -#include +#include #include "person.h" class BirthdayPartyAttached : public QObject @@ -63,7 +63,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty guests READ guests) + Q_PROPERTY(QQmlListProperty guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -71,7 +71,7 @@ class BirthdayParty : public QObject Person *host() const; void setHost(Person *); - QDeclarativeListProperty guests(); + QQmlListProperty guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/declarative/cppextensions/referenceexamples/signal/example.qml b/examples/qml/cppextensions/referenceexamples/signal/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/example.qml rename to examples/qml/cppextensions/referenceexamples/signal/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/signal/main.cpp b/examples/qml/cppextensions/referenceexamples/signal/main.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/signal/main.cpp rename to examples/qml/cppextensions/referenceexamples/signal/main.cpp index 5800cf450f..21a26d9b67 100644 --- a/examples/declarative/cppextensions/referenceexamples/signal/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/signal/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include "birthdayparty.h" #include "person.h" @@ -55,8 +55,8 @@ int main(int argc, char ** argv) qmlRegisterType("People", 1,0, "Boy"); qmlRegisterType("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast(component.create()); if (party && party->host()) { diff --git a/examples/declarative/cppextensions/referenceexamples/signal/person.cpp b/examples/qml/cppextensions/referenceexamples/signal/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/person.cpp rename to examples/qml/cppextensions/referenceexamples/signal/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/signal/person.h b/examples/qml/cppextensions/referenceexamples/signal/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/person.h rename to examples/qml/cppextensions/referenceexamples/signal/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/signal/signal.pro b/examples/qml/cppextensions/referenceexamples/signal/signal.pro similarity index 57% rename from examples/declarative/cppextensions/referenceexamples/signal/signal.pro rename to examples/qml/cppextensions/referenceexamples/signal/signal.pro index 8ffdb50f90..d426e398a5 100644 --- a/examples/declarative/cppextensions/referenceexamples/signal/signal.pro +++ b/examples/qml/cppextensions/referenceexamples/signal/signal.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += signal.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/signal +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/signal sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS signal.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/signal +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/signal INSTALLS += target sources diff --git a/examples/declarative/cppextensions/referenceexamples/signal/signal.qrc b/examples/qml/cppextensions/referenceexamples/signal/signal.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/signal.qrc rename to examples/qml/cppextensions/referenceexamples/signal/signal.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp similarity index 96% rename from examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp index 09137c41a8..a69a58557e 100644 --- a/examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp @@ -70,9 +70,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty BirthdayParty::guests() +QQmlListProperty BirthdayParty::guests() { - return QDeclarativeListProperty(this, m_guests); + return QQmlListProperty(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h index 5d561da807..f3635e899b 100644 --- a/examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include "person.h" class BirthdayPartyAttached : public QObject @@ -64,7 +64,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty guests READ guests) + Q_PROPERTY(QQmlListProperty guests READ guests) // ![0] Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement) // ![0] @@ -75,7 +75,7 @@ class BirthdayParty : public QObject Person *host() const; void setHost(Person *); - QDeclarativeListProperty guests(); + QQmlListProperty guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/example.qml b/examples/qml/cppextensions/referenceexamples/valuesource/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/example.qml rename to examples/qml/cppextensions/referenceexamples/valuesource/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp similarity index 97% rename from examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp rename to examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp index 629c354543..d69154b57a 100644 --- a/examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp +++ b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp @@ -49,7 +49,7 @@ HappyBirthdaySong::HappyBirthdaySong(QObject *parent) timer->start(1000); } -void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p) +void HappyBirthdaySong::setTarget(const QQmlProperty &p) { m_target = p; } diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h similarity index 88% rename from examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h rename to examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h index 9721350435..19e47c28ac 100644 --- a/examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h +++ b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h @@ -40,24 +40,24 @@ #ifndef HAPPYBIRTHDAYSONG_H #define HAPPYBIRTHDAYSONG_H -#include -#include -#include +#include +#include +#include #include // ![0] -class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource +class HappyBirthdaySong : public QObject, public QQmlPropertyValueSource { Q_OBJECT - Q_INTERFACES(QDeclarativePropertyValueSource) + Q_INTERFACES(QQmlPropertyValueSource) // ![0] Q_PROPERTY(QString name READ name WRITE setName) // ![1] public: HappyBirthdaySong(QObject *parent = 0); - virtual void setTarget(const QDeclarativeProperty &); + virtual void setTarget(const QQmlProperty &); // ![1] QString name() const; @@ -69,7 +69,7 @@ private slots: private: int m_line; QStringList m_lyrics; - QDeclarativeProperty m_target; + QQmlProperty m_target; QString m_name; // ![2] }; diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/main.cpp similarity index 95% rename from examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp rename to examples/qml/cppextensions/referenceexamples/valuesource/main.cpp index 53d676dfbe..e119e719af 100644 --- a/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/valuesource/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include "birthdayparty.h" #include "happybirthdaysong.h" @@ -57,8 +57,8 @@ int main(int argc, char ** argv) qmlRegisterType("People", 1,0, "Boy"); qmlRegisterType("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast(component.create()); if (party && party->host()) { diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/person.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/person.cpp rename to examples/qml/cppextensions/referenceexamples/valuesource/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/person.h b/examples/qml/cppextensions/referenceexamples/valuesource/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/person.h rename to examples/qml/cppextensions/referenceexamples/valuesource/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro b/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro similarity index 62% rename from examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro rename to examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro index a978d8452a..afc1784d71 100644 --- a/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro +++ b/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -9,7 +9,7 @@ HEADERS += person.h \ happybirthdaysong.h RESOURCES += valuesource.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/valuesource +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/valuesource sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS valuesource.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/valuesource +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/valuesource INSTALLS += target sources diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.qrc b/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.qrc rename to examples/qml/cppextensions/referenceexamples/valuesource/valuesource.qrc diff --git a/examples/declarative/draganddrop/dragtarget.qmlproject b/examples/qml/draganddrop/dragtarget.qmlproject similarity index 100% rename from examples/declarative/draganddrop/dragtarget.qmlproject rename to examples/qml/draganddrop/dragtarget.qmlproject diff --git a/examples/declarative/draganddrop/tiles/DragTile.qml b/examples/qml/draganddrop/tiles/DragTile.qml similarity index 100% rename from examples/declarative/draganddrop/tiles/DragTile.qml rename to examples/qml/draganddrop/tiles/DragTile.qml diff --git a/examples/declarative/draganddrop/tiles/DropTile.qml b/examples/qml/draganddrop/tiles/DropTile.qml similarity index 100% rename from examples/declarative/draganddrop/tiles/DropTile.qml rename to examples/qml/draganddrop/tiles/DropTile.qml diff --git a/examples/declarative/draganddrop/tiles/tiles.qml b/examples/qml/draganddrop/tiles/tiles.qml similarity index 100% rename from examples/declarative/draganddrop/tiles/tiles.qml rename to examples/qml/draganddrop/tiles/tiles.qml diff --git a/examples/declarative/draganddrop/views/gridview.qml b/examples/qml/draganddrop/views/gridview.qml similarity index 100% rename from examples/declarative/draganddrop/views/gridview.qml rename to examples/qml/draganddrop/views/gridview.qml diff --git a/examples/declarative/flickr/content/Button.qml b/examples/qml/flickr/content/Button.qml similarity index 97% rename from examples/declarative/flickr/content/Button.qml rename to examples/qml/flickr/content/Button.qml index d6a8d3e001..57f846aec3 100644 --- a/examples/declarative/flickr/content/Button.qml +++ b/examples/qml/flickr/content/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/content/GridDelegate.qml b/examples/qml/flickr/content/GridDelegate.qml similarity index 98% rename from examples/declarative/flickr/content/GridDelegate.qml rename to examples/qml/flickr/content/GridDelegate.qml index 794d768c74..f8838bd609 100644 --- a/examples/declarative/flickr/content/GridDelegate.qml +++ b/examples/qml/flickr/content/GridDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/content/ImageDetails.qml b/examples/qml/flickr/content/ImageDetails.qml similarity index 99% rename from examples/declarative/flickr/content/ImageDetails.qml rename to examples/qml/flickr/content/ImageDetails.qml index 83f2537d65..42b5e845ea 100644 --- a/examples/declarative/flickr/content/ImageDetails.qml +++ b/examples/qml/flickr/content/ImageDetails.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/content/ListDelegate.qml b/examples/qml/flickr/content/ListDelegate.qml similarity index 97% rename from examples/declarative/flickr/content/ListDelegate.qml rename to examples/qml/flickr/content/ListDelegate.qml index 9c239151f1..00f837f862 100644 --- a/examples/declarative/flickr/content/ListDelegate.qml +++ b/examples/qml/flickr/content/ListDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/content/Progress.qml b/examples/qml/flickr/content/Progress.qml similarity index 97% rename from examples/declarative/flickr/content/Progress.qml rename to examples/qml/flickr/content/Progress.qml index 81f1e79ed6..ed2629b48a 100644 --- a/examples/declarative/flickr/content/Progress.qml +++ b/examples/qml/flickr/content/Progress.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/content/RssModel.qml b/examples/qml/flickr/content/RssModel.qml similarity index 97% rename from examples/declarative/flickr/content/RssModel.qml rename to examples/qml/flickr/content/RssModel.qml index f28a23d502..51cea498e6 100644 --- a/examples/declarative/flickr/content/RssModel.qml +++ b/examples/qml/flickr/content/RssModel.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/content/ScrollBar.qml b/examples/qml/flickr/content/ScrollBar.qml similarity index 97% rename from examples/declarative/flickr/content/ScrollBar.qml rename to examples/qml/flickr/content/ScrollBar.qml index 388e43dc2d..7c62ad088f 100644 --- a/examples/declarative/flickr/content/ScrollBar.qml +++ b/examples/qml/flickr/content/ScrollBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/content/Slider.qml b/examples/qml/flickr/content/Slider.qml similarity index 97% rename from examples/declarative/flickr/content/Slider.qml rename to examples/qml/flickr/content/Slider.qml index 0f9e8b20f2..c4e743641f 100644 --- a/examples/declarative/flickr/content/Slider.qml +++ b/examples/qml/flickr/content/Slider.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/content/TitleBar.qml b/examples/qml/flickr/content/TitleBar.qml similarity index 98% rename from examples/declarative/flickr/content/TitleBar.qml rename to examples/qml/flickr/content/TitleBar.qml index 3dab005a11..223939f81a 100644 --- a/examples/declarative/flickr/content/TitleBar.qml +++ b/examples/qml/flickr/content/TitleBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/content/ToolBar.qml b/examples/qml/flickr/content/ToolBar.qml similarity index 97% rename from examples/declarative/flickr/content/ToolBar.qml rename to examples/qml/flickr/content/ToolBar.qml index e82be63e7e..356993b41a 100644 --- a/examples/declarative/flickr/content/ToolBar.qml +++ b/examples/qml/flickr/content/ToolBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/content/UnifiedDelegate.qml b/examples/qml/flickr/content/UnifiedDelegate.qml similarity index 98% rename from examples/declarative/flickr/content/UnifiedDelegate.qml rename to examples/qml/flickr/content/UnifiedDelegate.qml index 00a777b0a1..0b068c0abe 100644 --- a/examples/declarative/flickr/content/UnifiedDelegate.qml +++ b/examples/qml/flickr/content/UnifiedDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/content/images/gloss.png b/examples/qml/flickr/content/images/gloss.png similarity index 100% rename from examples/declarative/flickr/content/images/gloss.png rename to examples/qml/flickr/content/images/gloss.png diff --git a/examples/declarative/flickr/content/images/lineedit.png b/examples/qml/flickr/content/images/lineedit.png similarity index 100% rename from examples/declarative/flickr/content/images/lineedit.png rename to examples/qml/flickr/content/images/lineedit.png diff --git a/examples/declarative/flickr/content/images/lineedit.sci b/examples/qml/flickr/content/images/lineedit.sci similarity index 100% rename from examples/declarative/flickr/content/images/lineedit.sci rename to examples/qml/flickr/content/images/lineedit.sci diff --git a/examples/declarative/flickr/content/images/noise.png b/examples/qml/flickr/content/images/noise.png similarity index 100% rename from examples/declarative/flickr/content/images/noise.png rename to examples/qml/flickr/content/images/noise.png diff --git a/examples/declarative/flickr/content/images/particle.png b/examples/qml/flickr/content/images/particle.png similarity index 100% rename from examples/declarative/flickr/content/images/particle.png rename to examples/qml/flickr/content/images/particle.png diff --git a/examples/declarative/flickr/content/images/quit.png b/examples/qml/flickr/content/images/quit.png similarity index 100% rename from examples/declarative/flickr/content/images/quit.png rename to examples/qml/flickr/content/images/quit.png diff --git a/examples/declarative/flickr/content/images/squareParticle.png b/examples/qml/flickr/content/images/squareParticle.png similarity index 100% rename from examples/declarative/flickr/content/images/squareParticle.png rename to examples/qml/flickr/content/images/squareParticle.png diff --git a/examples/declarative/flickr/content/images/stripes.png b/examples/qml/flickr/content/images/stripes.png similarity index 100% rename from examples/declarative/flickr/content/images/stripes.png rename to examples/qml/flickr/content/images/stripes.png diff --git a/examples/declarative/flickr/content/images/titlebar.png b/examples/qml/flickr/content/images/titlebar.png similarity index 100% rename from examples/declarative/flickr/content/images/titlebar.png rename to examples/qml/flickr/content/images/titlebar.png diff --git a/examples/declarative/flickr/content/images/titlebar.sci b/examples/qml/flickr/content/images/titlebar.sci similarity index 100% rename from examples/declarative/flickr/content/images/titlebar.sci rename to examples/qml/flickr/content/images/titlebar.sci diff --git a/examples/declarative/flickr/content/images/toolbutton.png b/examples/qml/flickr/content/images/toolbutton.png similarity index 100% rename from examples/declarative/flickr/content/images/toolbutton.png rename to examples/qml/flickr/content/images/toolbutton.png diff --git a/examples/declarative/flickr/content/images/toolbutton.sci b/examples/qml/flickr/content/images/toolbutton.sci similarity index 100% rename from examples/declarative/flickr/content/images/toolbutton.sci rename to examples/qml/flickr/content/images/toolbutton.sci diff --git a/examples/declarative/flickr/content/qmldir b/examples/qml/flickr/content/qmldir similarity index 100% rename from examples/declarative/flickr/content/qmldir rename to examples/qml/flickr/content/qmldir diff --git a/examples/declarative/flickr/flickr-90.qml b/examples/qml/flickr/flickr-90.qml similarity index 96% rename from examples/declarative/flickr/flickr-90.qml rename to examples/qml/flickr/flickr-90.qml index ae06957649..b95b1c9872 100644 --- a/examples/declarative/flickr/flickr-90.qml +++ b/examples/qml/flickr/flickr-90.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/flickr.qml b/examples/qml/flickr/flickr.qml similarity index 98% rename from examples/declarative/flickr/flickr.qml rename to examples/qml/flickr/flickr.qml index 74c41f185b..98ca5197ab 100644 --- a/examples/declarative/flickr/flickr.qml +++ b/examples/qml/flickr/flickr.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/flickr/flickr.qmlproject b/examples/qml/flickr/flickr.qmlproject similarity index 100% rename from examples/declarative/flickr/flickr.qmlproject rename to examples/qml/flickr/flickr.qmlproject diff --git a/examples/declarative/i18n/i18n.qml b/examples/qml/i18n/i18n.qml similarity index 100% rename from examples/declarative/i18n/i18n.qml rename to examples/qml/i18n/i18n.qml diff --git a/examples/declarative/i18n/i18n/base.ts b/examples/qml/i18n/i18n/base.ts similarity index 100% rename from examples/declarative/i18n/i18n/base.ts rename to examples/qml/i18n/i18n/base.ts diff --git a/examples/declarative/i18n/i18n/qml_en_AU.ts b/examples/qml/i18n/i18n/qml_en_AU.ts similarity index 100% rename from examples/declarative/i18n/i18n/qml_en_AU.ts rename to examples/qml/i18n/i18n/qml_en_AU.ts diff --git a/examples/declarative/i18n/i18n/qml_fr.ts b/examples/qml/i18n/i18n/qml_fr.ts similarity index 100% rename from examples/declarative/i18n/i18n/qml_fr.ts rename to examples/qml/i18n/i18n/qml_fr.ts diff --git a/examples/declarative/imageelements/borderimage.qml b/examples/qml/imageelements/borderimage.qml similarity index 100% rename from examples/declarative/imageelements/borderimage.qml rename to examples/qml/imageelements/borderimage.qml diff --git a/examples/declarative/imageelements/content/BearSheet.png b/examples/qml/imageelements/content/BearSheet.png similarity index 100% rename from examples/declarative/imageelements/content/BearSheet.png rename to examples/qml/imageelements/content/BearSheet.png diff --git a/examples/declarative/imageelements/content/ImageCell.qml b/examples/qml/imageelements/content/ImageCell.qml similarity index 100% rename from examples/declarative/imageelements/content/ImageCell.qml rename to examples/qml/imageelements/content/ImageCell.qml diff --git a/examples/declarative/imageelements/content/MyBorderImage.qml b/examples/qml/imageelements/content/MyBorderImage.qml similarity index 100% rename from examples/declarative/imageelements/content/MyBorderImage.qml rename to examples/qml/imageelements/content/MyBorderImage.qml diff --git a/examples/declarative/imageelements/content/ShadowRectangle.qml b/examples/qml/imageelements/content/ShadowRectangle.qml similarity index 100% rename from examples/declarative/imageelements/content/ShadowRectangle.qml rename to examples/qml/imageelements/content/ShadowRectangle.qml diff --git a/examples/declarative/imageelements/content/bw.png b/examples/qml/imageelements/content/bw.png similarity index 100% rename from examples/declarative/imageelements/content/bw.png rename to examples/qml/imageelements/content/bw.png diff --git a/examples/declarative/imageelements/content/colors-round.sci b/examples/qml/imageelements/content/colors-round.sci similarity index 100% rename from examples/declarative/imageelements/content/colors-round.sci rename to examples/qml/imageelements/content/colors-round.sci diff --git a/examples/declarative/imageelements/content/colors-stretch.sci b/examples/qml/imageelements/content/colors-stretch.sci similarity index 100% rename from examples/declarative/imageelements/content/colors-stretch.sci rename to examples/qml/imageelements/content/colors-stretch.sci diff --git a/examples/declarative/imageelements/content/colors.png b/examples/qml/imageelements/content/colors.png similarity index 100% rename from examples/declarative/imageelements/content/colors.png rename to examples/qml/imageelements/content/colors.png diff --git a/examples/declarative/imageelements/content/qt-logo.png b/examples/qml/imageelements/content/qt-logo.png similarity index 100% rename from examples/declarative/imageelements/content/qt-logo.png rename to examples/qml/imageelements/content/qt-logo.png diff --git a/examples/declarative/imageelements/content/shadow.png b/examples/qml/imageelements/content/shadow.png similarity index 100% rename from examples/declarative/imageelements/content/shadow.png rename to examples/qml/imageelements/content/shadow.png diff --git a/examples/declarative/imageelements/content/speaker.png b/examples/qml/imageelements/content/speaker.png similarity index 100% rename from examples/declarative/imageelements/content/speaker.png rename to examples/qml/imageelements/content/speaker.png diff --git a/examples/declarative/imageelements/image.qml b/examples/qml/imageelements/image.qml similarity index 100% rename from examples/declarative/imageelements/image.qml rename to examples/qml/imageelements/image.qml diff --git a/examples/declarative/imageelements/imageelements.qml b/examples/qml/imageelements/imageelements.qml similarity index 100% rename from examples/declarative/imageelements/imageelements.qml rename to examples/qml/imageelements/imageelements.qml diff --git a/examples/declarative/imageelements/imageelements.qmlproject b/examples/qml/imageelements/imageelements.qmlproject similarity index 100% rename from examples/declarative/imageelements/imageelements.qmlproject rename to examples/qml/imageelements/imageelements.qmlproject diff --git a/examples/declarative/imageelements/shadows.qml b/examples/qml/imageelements/shadows.qml similarity index 100% rename from examples/declarative/imageelements/shadows.qml rename to examples/qml/imageelements/shadows.qml diff --git a/examples/declarative/imageelements/simplesprite.qml b/examples/qml/imageelements/simplesprite.qml similarity index 100% rename from examples/declarative/imageelements/simplesprite.qml rename to examples/qml/imageelements/simplesprite.qml diff --git a/examples/declarative/imageelements/spriteimage.qml b/examples/qml/imageelements/spriteimage.qml similarity index 100% rename from examples/declarative/imageelements/spriteimage.qml rename to examples/qml/imageelements/spriteimage.qml diff --git a/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml b/examples/qml/keyinteraction/focus/Core/ContextMenu.qml similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/ContextMenu.qml rename to examples/qml/keyinteraction/focus/Core/ContextMenu.qml diff --git a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml b/examples/qml/keyinteraction/focus/Core/GridMenu.qml similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/GridMenu.qml rename to examples/qml/keyinteraction/focus/Core/GridMenu.qml diff --git a/examples/declarative/keyinteraction/focus/Core/ListMenu.qml b/examples/qml/keyinteraction/focus/Core/ListMenu.qml similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/ListMenu.qml rename to examples/qml/keyinteraction/focus/Core/ListMenu.qml diff --git a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml b/examples/qml/keyinteraction/focus/Core/ListViewDelegate.qml similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml rename to examples/qml/keyinteraction/focus/Core/ListViewDelegate.qml diff --git a/examples/declarative/keyinteraction/focus/Core/images/arrow.png b/examples/qml/keyinteraction/focus/Core/images/arrow.png similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/images/arrow.png rename to examples/qml/keyinteraction/focus/Core/images/arrow.png diff --git a/examples/declarative/keyinteraction/focus/Core/images/qt-logo.png b/examples/qml/keyinteraction/focus/Core/images/qt-logo.png similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/images/qt-logo.png rename to examples/qml/keyinteraction/focus/Core/images/qt-logo.png diff --git a/examples/declarative/keyinteraction/focus/focus.qml b/examples/qml/keyinteraction/focus/focus.qml similarity index 100% rename from examples/declarative/keyinteraction/focus/focus.qml rename to examples/qml/keyinteraction/focus/focus.qml diff --git a/examples/declarative/locale/locale.qml b/examples/qml/locale/locale.qml similarity index 100% rename from examples/declarative/locale/locale.qml rename to examples/qml/locale/locale.qml diff --git a/examples/declarative/minehunt/MinehuntCore/Explosion.qml b/examples/qml/minehunt/MinehuntCore/Explosion.qml similarity index 97% rename from examples/declarative/minehunt/MinehuntCore/Explosion.qml rename to examples/qml/minehunt/MinehuntCore/Explosion.qml index 0983b68db4..a1b4292bcf 100644 --- a/examples/declarative/minehunt/MinehuntCore/Explosion.qml +++ b/examples/qml/minehunt/MinehuntCore/Explosion.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/minehunt/MinehuntCore/Tile.qml b/examples/qml/minehunt/MinehuntCore/Tile.qml similarity index 98% rename from examples/declarative/minehunt/MinehuntCore/Tile.qml rename to examples/qml/minehunt/MinehuntCore/Tile.qml index 14c1f51f9e..1180b6f584 100644 --- a/examples/declarative/minehunt/MinehuntCore/Tile.qml +++ b/examples/qml/minehunt/MinehuntCore/Tile.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/minehunt/MinehuntCore/pics/back.png b/examples/qml/minehunt/MinehuntCore/pics/back.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/back.png rename to examples/qml/minehunt/MinehuntCore/pics/back.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/background.png b/examples/qml/minehunt/MinehuntCore/pics/background.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/background.png rename to examples/qml/minehunt/MinehuntCore/pics/background.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/bomb-color.png b/examples/qml/minehunt/MinehuntCore/pics/bomb-color.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/bomb-color.png rename to examples/qml/minehunt/MinehuntCore/pics/bomb-color.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/bomb.png b/examples/qml/minehunt/MinehuntCore/pics/bomb.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/bomb.png rename to examples/qml/minehunt/MinehuntCore/pics/bomb.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/face-sad.png b/examples/qml/minehunt/MinehuntCore/pics/face-sad.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/face-sad.png rename to examples/qml/minehunt/MinehuntCore/pics/face-sad.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/face-smile-big.png b/examples/qml/minehunt/MinehuntCore/pics/face-smile-big.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/face-smile-big.png rename to examples/qml/minehunt/MinehuntCore/pics/face-smile-big.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/face-smile.png b/examples/qml/minehunt/MinehuntCore/pics/face-smile.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/face-smile.png rename to examples/qml/minehunt/MinehuntCore/pics/face-smile.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/flag-color.png b/examples/qml/minehunt/MinehuntCore/pics/flag-color.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/flag-color.png rename to examples/qml/minehunt/MinehuntCore/pics/flag-color.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/flag.png b/examples/qml/minehunt/MinehuntCore/pics/flag.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/flag.png rename to examples/qml/minehunt/MinehuntCore/pics/flag.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/front.png b/examples/qml/minehunt/MinehuntCore/pics/front.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/front.png rename to examples/qml/minehunt/MinehuntCore/pics/front.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/quit.png b/examples/qml/minehunt/MinehuntCore/pics/quit.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/quit.png rename to examples/qml/minehunt/MinehuntCore/pics/quit.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/star.png b/examples/qml/minehunt/MinehuntCore/pics/star.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/star.png rename to examples/qml/minehunt/MinehuntCore/pics/star.png diff --git a/examples/declarative/minehunt/MinehuntCore/qmldir b/examples/qml/minehunt/MinehuntCore/qmldir similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/qmldir rename to examples/qml/minehunt/MinehuntCore/qmldir diff --git a/examples/declarative/minehunt/README b/examples/qml/minehunt/README similarity index 100% rename from examples/declarative/minehunt/README rename to examples/qml/minehunt/README diff --git a/examples/declarative/minehunt/main.cpp b/examples/qml/minehunt/main.cpp similarity index 96% rename from examples/declarative/minehunt/main.cpp rename to examples/qml/minehunt/main.cpp index 47c0436969..0aa11a1d7a 100644 --- a/examples/declarative/minehunt/main.cpp +++ b/examples/qml/minehunt/main.cpp @@ -41,8 +41,8 @@ #include #include -#include -#include +#include +#include #include "minehunt.h" diff --git a/examples/declarative/minehunt/minehunt.cpp b/examples/qml/minehunt/minehunt.cpp similarity index 94% rename from examples/declarative/minehunt/minehunt.cpp rename to examples/qml/minehunt/minehunt.cpp index facbec375a..cde30278b3 100644 --- a/examples/declarative/minehunt/minehunt.cpp +++ b/examples/qml/minehunt/minehunt.cpp @@ -45,25 +45,25 @@ #include "minehunt.h" -void tilesPropAppend(QDeclarativeListProperty* prop, TileData* value) +void tilesPropAppend(QQmlListProperty* prop, TileData* value) { Q_UNUSED(prop); Q_UNUSED(value); return; //Append not supported } -int tilesPropCount(QDeclarativeListProperty* prop) +int tilesPropCount(QQmlListProperty* prop) { return static_cast*>(prop->data)->count(); } -TileData* tilesPropAt(QDeclarativeListProperty* prop, int index) +TileData* tilesPropAt(QQmlListProperty* prop, int index) { return static_cast*>(prop->data)->at(index); } -QDeclarativeListProperty MinehuntGame::tiles(){ - return QDeclarativeListProperty(this, &_tiles, &tilesPropAppend, +QQmlListProperty MinehuntGame::tiles(){ + return QQmlListProperty(this, &_tiles, &tilesPropAppend, &tilesPropCount, &tilesPropAt, 0); } diff --git a/examples/declarative/minehunt/minehunt.h b/examples/qml/minehunt/minehunt.h similarity index 96% rename from examples/declarative/minehunt/minehunt.h rename to examples/qml/minehunt/minehunt.h index a0ae23fa8a..34bab71218 100644 --- a/examples/declarative/minehunt/minehunt.h +++ b/examples/qml/minehunt/minehunt.h @@ -40,7 +40,7 @@ ****************************************************************************/ -#include +#include class TileData : public QObject { @@ -85,8 +85,8 @@ class MinehuntGame : public QObject public: MinehuntGame(); - Q_PROPERTY(QDeclarativeListProperty tiles READ tiles CONSTANT) - QDeclarativeListProperty tiles(); + Q_PROPERTY(QQmlListProperty tiles READ tiles CONSTANT) + QQmlListProperty tiles(); Q_PROPERTY(bool isPlaying READ isPlaying NOTIFY isPlayingChanged) bool isPlaying() {return playing;} diff --git a/examples/declarative/minehunt/minehunt.pro b/examples/qml/minehunt/minehunt.pro similarity index 77% rename from examples/declarative/minehunt/minehunt.pro rename to examples/qml/minehunt/minehunt.pro index 81b6b80486..78e874d805 100644 --- a/examples/declarative/minehunt/minehunt.pro +++ b/examples/qml/minehunt/minehunt.pro @@ -1,4 +1,4 @@ -QT += declarative quick +QT += qml quick HEADERS += minehunt.h SOURCES += main.cpp minehunt.cpp diff --git a/examples/declarative/minehunt/minehunt.qml b/examples/qml/minehunt/minehunt.qml similarity index 98% rename from examples/declarative/minehunt/minehunt.qml rename to examples/qml/minehunt/minehunt.qml index 7c4948a3bb..42dc408fff 100644 --- a/examples/declarative/minehunt/minehunt.qml +++ b/examples/qml/minehunt/minehunt.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/minehunt/minehunt.qmlproject b/examples/qml/minehunt/minehunt.qmlproject similarity index 100% rename from examples/declarative/minehunt/minehunt.qmlproject rename to examples/qml/minehunt/minehunt.qmlproject diff --git a/examples/declarative/minehunt/minehunt.qrc b/examples/qml/minehunt/minehunt.qrc similarity index 100% rename from examples/declarative/minehunt/minehunt.qrc rename to examples/qml/minehunt/minehunt.qrc diff --git a/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro b/examples/qml/modelviews/abstractitemmodel/abstractitemmodel.pro similarity index 87% rename from examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro rename to examples/qml/modelviews/abstractitemmodel/abstractitemmodel.pro index eaf2b30c89..f786d9356f 100644 --- a/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro +++ b/examples/qml/modelviews/abstractitemmodel/abstractitemmodel.pro @@ -2,7 +2,7 @@ TEMPLATE = app TARGET = abstractitemmodel DEPENDPATH += . INCLUDEPATH += . -QT += declarative quick +QT += qml quick HEADERS = model.h SOURCES = main.cpp \ diff --git a/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.qrc b/examples/qml/modelviews/abstractitemmodel/abstractitemmodel.qrc similarity index 100% rename from examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.qrc rename to examples/qml/modelviews/abstractitemmodel/abstractitemmodel.qrc diff --git a/examples/declarative/modelviews/abstractitemmodel/main.cpp b/examples/qml/modelviews/abstractitemmodel/main.cpp similarity index 94% rename from examples/declarative/modelviews/abstractitemmodel/main.cpp rename to examples/qml/modelviews/abstractitemmodel/main.cpp index b6ca2df26e..f5930ce840 100644 --- a/examples/declarative/modelviews/abstractitemmodel/main.cpp +++ b/examples/qml/modelviews/abstractitemmodel/main.cpp @@ -40,9 +40,9 @@ #include "model.h" #include -#include -#include -#include +#include +#include +#include #include #include @@ -58,7 +58,7 @@ int main(int argc, char ** argv) QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", &model); //![0] diff --git a/examples/declarative/modelviews/abstractitemmodel/model.cpp b/examples/qml/modelviews/abstractitemmodel/model.cpp similarity index 100% rename from examples/declarative/modelviews/abstractitemmodel/model.cpp rename to examples/qml/modelviews/abstractitemmodel/model.cpp diff --git a/examples/declarative/modelviews/abstractitemmodel/model.h b/examples/qml/modelviews/abstractitemmodel/model.h similarity index 100% rename from examples/declarative/modelviews/abstractitemmodel/model.h rename to examples/qml/modelviews/abstractitemmodel/model.h diff --git a/examples/declarative/modelviews/abstractitemmodel/view.qml b/examples/qml/modelviews/abstractitemmodel/view.qml similarity index 100% rename from examples/declarative/modelviews/abstractitemmodel/view.qml rename to examples/qml/modelviews/abstractitemmodel/view.qml diff --git a/examples/declarative/modelviews/gridview/gridview-example.qml b/examples/qml/modelviews/gridview/gridview-example.qml similarity index 100% rename from examples/declarative/modelviews/gridview/gridview-example.qml rename to examples/qml/modelviews/gridview/gridview-example.qml diff --git a/examples/declarative/modelviews/gridview/pics/AddressBook_48.png b/examples/qml/modelviews/gridview/pics/AddressBook_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/AddressBook_48.png rename to examples/qml/modelviews/gridview/pics/AddressBook_48.png diff --git a/examples/declarative/modelviews/gridview/pics/AudioPlayer_48.png b/examples/qml/modelviews/gridview/pics/AudioPlayer_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/AudioPlayer_48.png rename to examples/qml/modelviews/gridview/pics/AudioPlayer_48.png diff --git a/examples/declarative/modelviews/gridview/pics/Camera_48.png b/examples/qml/modelviews/gridview/pics/Camera_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/Camera_48.png rename to examples/qml/modelviews/gridview/pics/Camera_48.png diff --git a/examples/declarative/modelviews/gridview/pics/DateBook_48.png b/examples/qml/modelviews/gridview/pics/DateBook_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/DateBook_48.png rename to examples/qml/modelviews/gridview/pics/DateBook_48.png diff --git a/examples/declarative/modelviews/gridview/pics/EMail_48.png b/examples/qml/modelviews/gridview/pics/EMail_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/EMail_48.png rename to examples/qml/modelviews/gridview/pics/EMail_48.png diff --git a/examples/declarative/modelviews/gridview/pics/TodoList_48.png b/examples/qml/modelviews/gridview/pics/TodoList_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/TodoList_48.png rename to examples/qml/modelviews/gridview/pics/TodoList_48.png diff --git a/examples/declarative/modelviews/gridview/pics/VideoPlayer_48.png b/examples/qml/modelviews/gridview/pics/VideoPlayer_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/VideoPlayer_48.png rename to examples/qml/modelviews/gridview/pics/VideoPlayer_48.png diff --git a/examples/declarative/modelviews/listview/content/PetsModel.qml b/examples/qml/modelviews/listview/content/PetsModel.qml similarity index 100% rename from examples/declarative/modelviews/listview/content/PetsModel.qml rename to examples/qml/modelviews/listview/content/PetsModel.qml diff --git a/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml b/examples/qml/modelviews/listview/content/PressAndHoldButton.qml similarity index 100% rename from examples/declarative/modelviews/listview/content/PressAndHoldButton.qml rename to examples/qml/modelviews/listview/content/PressAndHoldButton.qml diff --git a/examples/declarative/modelviews/listview/content/RecipesModel.qml b/examples/qml/modelviews/listview/content/RecipesModel.qml similarity index 100% rename from examples/declarative/modelviews/listview/content/RecipesModel.qml rename to examples/qml/modelviews/listview/content/RecipesModel.qml diff --git a/examples/declarative/modelviews/listview/content/TextButton.qml b/examples/qml/modelviews/listview/content/TextButton.qml similarity index 100% rename from examples/declarative/modelviews/listview/content/TextButton.qml rename to examples/qml/modelviews/listview/content/TextButton.qml diff --git a/examples/declarative/modelviews/listview/content/ToggleButton.qml b/examples/qml/modelviews/listview/content/ToggleButton.qml similarity index 97% rename from examples/declarative/modelviews/listview/content/ToggleButton.qml rename to examples/qml/modelviews/listview/content/ToggleButton.qml index 0754d9849b..52f4988f03 100644 --- a/examples/declarative/modelviews/listview/content/ToggleButton.qml +++ b/examples/qml/modelviews/listview/content/ToggleButton.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/listview/content/pics/arrow-down.png b/examples/qml/modelviews/listview/content/pics/arrow-down.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/arrow-down.png rename to examples/qml/modelviews/listview/content/pics/arrow-down.png diff --git a/examples/declarative/modelviews/listview/content/pics/arrow-up.png b/examples/qml/modelviews/listview/content/pics/arrow-up.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/arrow-up.png rename to examples/qml/modelviews/listview/content/pics/arrow-up.png diff --git a/examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg b/examples/qml/modelviews/listview/content/pics/fruit-salad.jpg similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg rename to examples/qml/modelviews/listview/content/pics/fruit-salad.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/hamburger.jpg b/examples/qml/modelviews/listview/content/pics/hamburger.jpg similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/hamburger.jpg rename to examples/qml/modelviews/listview/content/pics/hamburger.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/lemonade.jpg b/examples/qml/modelviews/listview/content/pics/lemonade.jpg similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/lemonade.jpg rename to examples/qml/modelviews/listview/content/pics/lemonade.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/list-delete.png b/examples/qml/modelviews/listview/content/pics/list-delete.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/list-delete.png rename to examples/qml/modelviews/listview/content/pics/list-delete.png diff --git a/examples/declarative/modelviews/listview/content/pics/minus-sign.png b/examples/qml/modelviews/listview/content/pics/minus-sign.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/minus-sign.png rename to examples/qml/modelviews/listview/content/pics/minus-sign.png diff --git a/examples/declarative/modelviews/listview/content/pics/moreDown.png b/examples/qml/modelviews/listview/content/pics/moreDown.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/moreDown.png rename to examples/qml/modelviews/listview/content/pics/moreDown.png diff --git a/examples/declarative/modelviews/listview/content/pics/moreUp.png b/examples/qml/modelviews/listview/content/pics/moreUp.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/moreUp.png rename to examples/qml/modelviews/listview/content/pics/moreUp.png diff --git a/examples/declarative/modelviews/listview/content/pics/pancakes.jpg b/examples/qml/modelviews/listview/content/pics/pancakes.jpg similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/pancakes.jpg rename to examples/qml/modelviews/listview/content/pics/pancakes.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/plus-sign.png b/examples/qml/modelviews/listview/content/pics/plus-sign.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/plus-sign.png rename to examples/qml/modelviews/listview/content/pics/plus-sign.png diff --git a/examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg b/examples/qml/modelviews/listview/content/pics/vegetable-soup.jpg similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg rename to examples/qml/modelviews/listview/content/pics/vegetable-soup.jpg diff --git a/examples/declarative/modelviews/listview/dynamiclist.qml b/examples/qml/modelviews/listview/dynamiclist.qml similarity index 100% rename from examples/declarative/modelviews/listview/dynamiclist.qml rename to examples/qml/modelviews/listview/dynamiclist.qml diff --git a/examples/declarative/modelviews/listview/expandingdelegates.qml b/examples/qml/modelviews/listview/expandingdelegates.qml similarity index 100% rename from examples/declarative/modelviews/listview/expandingdelegates.qml rename to examples/qml/modelviews/listview/expandingdelegates.qml diff --git a/examples/declarative/modelviews/listview/highlight.qml b/examples/qml/modelviews/listview/highlight.qml similarity index 100% rename from examples/declarative/modelviews/listview/highlight.qml rename to examples/qml/modelviews/listview/highlight.qml diff --git a/examples/declarative/modelviews/listview/highlightranges.qml b/examples/qml/modelviews/listview/highlightranges.qml similarity index 100% rename from examples/declarative/modelviews/listview/highlightranges.qml rename to examples/qml/modelviews/listview/highlightranges.qml diff --git a/examples/declarative/modelviews/listview/sections.qml b/examples/qml/modelviews/listview/sections.qml similarity index 100% rename from examples/declarative/modelviews/listview/sections.qml rename to examples/qml/modelviews/listview/sections.qml diff --git a/examples/declarative/modelviews/modelviews.pro b/examples/qml/modelviews/modelviews.pro similarity index 100% rename from examples/declarative/modelviews/modelviews.pro rename to examples/qml/modelviews/modelviews.pro diff --git a/examples/declarative/modelviews/modelviews.qml b/examples/qml/modelviews/modelviews.qml similarity index 100% rename from examples/declarative/modelviews/modelviews.qml rename to examples/qml/modelviews/modelviews.qml diff --git a/examples/declarative/modelviews/modelviews.qmlproject b/examples/qml/modelviews/modelviews.qmlproject similarity index 100% rename from examples/declarative/modelviews/modelviews.qmlproject rename to examples/qml/modelviews/modelviews.qmlproject diff --git a/examples/declarative/modelviews/objectlistmodel/dataobject.cpp b/examples/qml/modelviews/objectlistmodel/dataobject.cpp similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/dataobject.cpp rename to examples/qml/modelviews/objectlistmodel/dataobject.cpp diff --git a/examples/declarative/modelviews/objectlistmodel/dataobject.h b/examples/qml/modelviews/objectlistmodel/dataobject.h similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/dataobject.h rename to examples/qml/modelviews/objectlistmodel/dataobject.h diff --git a/examples/declarative/modelviews/objectlistmodel/main.cpp b/examples/qml/modelviews/objectlistmodel/main.cpp similarity index 95% rename from examples/declarative/modelviews/objectlistmodel/main.cpp rename to examples/qml/modelviews/objectlistmodel/main.cpp index c8542976c3..bb3895f7c0 100644 --- a/examples/declarative/modelviews/objectlistmodel/main.cpp +++ b/examples/qml/modelviews/objectlistmodel/main.cpp @@ -40,9 +40,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -66,7 +66,7 @@ int main(int argc, char ** argv) QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); //![0] diff --git a/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro b/examples/qml/modelviews/objectlistmodel/objectlistmodel.pro similarity index 81% rename from examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro rename to examples/qml/modelviews/objectlistmodel/objectlistmodel.pro index 74dc5b1016..7f323c3999 100644 --- a/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro +++ b/examples/qml/modelviews/objectlistmodel/objectlistmodel.pro @@ -1,4 +1,4 @@ -QT += declarative quick +QT += qml quick SOURCES += main.cpp \ dataobject.cpp diff --git a/examples/declarative/modelviews/objectlistmodel/objectlistmodel.qmlproject b/examples/qml/modelviews/objectlistmodel/objectlistmodel.qmlproject similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/objectlistmodel.qmlproject rename to examples/qml/modelviews/objectlistmodel/objectlistmodel.qmlproject diff --git a/examples/declarative/modelviews/objectlistmodel/objectlistmodel.qrc b/examples/qml/modelviews/objectlistmodel/objectlistmodel.qrc similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/objectlistmodel.qrc rename to examples/qml/modelviews/objectlistmodel/objectlistmodel.qrc diff --git a/examples/declarative/modelviews/objectlistmodel/view.qml b/examples/qml/modelviews/objectlistmodel/view.qml similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/view.qml rename to examples/qml/modelviews/objectlistmodel/view.qml diff --git a/examples/declarative/modelviews/package/Delegate.qml b/examples/qml/modelviews/package/Delegate.qml similarity index 100% rename from examples/declarative/modelviews/package/Delegate.qml rename to examples/qml/modelviews/package/Delegate.qml diff --git a/examples/declarative/modelviews/package/view.qml b/examples/qml/modelviews/package/view.qml similarity index 100% rename from examples/declarative/modelviews/package/view.qml rename to examples/qml/modelviews/package/view.qml diff --git a/examples/declarative/modelviews/parallax/content/ParallaxView.qml b/examples/qml/modelviews/parallax/content/ParallaxView.qml similarity index 100% rename from examples/declarative/modelviews/parallax/content/ParallaxView.qml rename to examples/qml/modelviews/parallax/content/ParallaxView.qml diff --git a/examples/declarative/modelviews/parallax/content/Smiley.qml b/examples/qml/modelviews/parallax/content/Smiley.qml similarity index 100% rename from examples/declarative/modelviews/parallax/content/Smiley.qml rename to examples/qml/modelviews/parallax/content/Smiley.qml diff --git a/examples/declarative/modelviews/parallax/content/pics/background.jpg b/examples/qml/modelviews/parallax/content/pics/background.jpg similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/background.jpg rename to examples/qml/modelviews/parallax/content/pics/background.jpg diff --git a/examples/declarative/modelviews/parallax/content/pics/face-smile.png b/examples/qml/modelviews/parallax/content/pics/face-smile.png similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/face-smile.png rename to examples/qml/modelviews/parallax/content/pics/face-smile.png diff --git a/examples/declarative/modelviews/parallax/content/pics/home-page.png b/examples/qml/modelviews/parallax/content/pics/home-page.png similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/home-page.png rename to examples/qml/modelviews/parallax/content/pics/home-page.png diff --git a/examples/declarative/modelviews/parallax/content/pics/home-page.svg b/examples/qml/modelviews/parallax/content/pics/home-page.svg similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/home-page.svg rename to examples/qml/modelviews/parallax/content/pics/home-page.svg diff --git a/examples/declarative/modelviews/parallax/content/pics/shadow.png b/examples/qml/modelviews/parallax/content/pics/shadow.png similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/shadow.png rename to examples/qml/modelviews/parallax/content/pics/shadow.png diff --git a/examples/declarative/modelviews/parallax/content/pics/yast-joystick.png b/examples/qml/modelviews/parallax/content/pics/yast-joystick.png similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/yast-joystick.png rename to examples/qml/modelviews/parallax/content/pics/yast-joystick.png diff --git a/examples/declarative/modelviews/parallax/content/pics/yast-wol.png b/examples/qml/modelviews/parallax/content/pics/yast-wol.png similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/yast-wol.png rename to examples/qml/modelviews/parallax/content/pics/yast-wol.png diff --git a/examples/declarative/modelviews/parallax/parallax.qml b/examples/qml/modelviews/parallax/parallax.qml similarity index 100% rename from examples/declarative/modelviews/parallax/parallax.qml rename to examples/qml/modelviews/parallax/parallax.qml diff --git a/examples/declarative/modelviews/pathview/pathview-example.qml b/examples/qml/modelviews/pathview/pathview-example.qml similarity index 100% rename from examples/declarative/modelviews/pathview/pathview-example.qml rename to examples/qml/modelviews/pathview/pathview-example.qml diff --git a/examples/declarative/modelviews/pathview/pics/AddressBook_48.png b/examples/qml/modelviews/pathview/pics/AddressBook_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/AddressBook_48.png rename to examples/qml/modelviews/pathview/pics/AddressBook_48.png diff --git a/examples/declarative/modelviews/pathview/pics/AudioPlayer_48.png b/examples/qml/modelviews/pathview/pics/AudioPlayer_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/AudioPlayer_48.png rename to examples/qml/modelviews/pathview/pics/AudioPlayer_48.png diff --git a/examples/declarative/modelviews/pathview/pics/Camera_48.png b/examples/qml/modelviews/pathview/pics/Camera_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/Camera_48.png rename to examples/qml/modelviews/pathview/pics/Camera_48.png diff --git a/examples/declarative/modelviews/pathview/pics/DateBook_48.png b/examples/qml/modelviews/pathview/pics/DateBook_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/DateBook_48.png rename to examples/qml/modelviews/pathview/pics/DateBook_48.png diff --git a/examples/declarative/modelviews/pathview/pics/EMail_48.png b/examples/qml/modelviews/pathview/pics/EMail_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/EMail_48.png rename to examples/qml/modelviews/pathview/pics/EMail_48.png diff --git a/examples/declarative/modelviews/pathview/pics/TodoList_48.png b/examples/qml/modelviews/pathview/pics/TodoList_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/TodoList_48.png rename to examples/qml/modelviews/pathview/pics/TodoList_48.png diff --git a/examples/declarative/modelviews/pathview/pics/VideoPlayer_48.png b/examples/qml/modelviews/pathview/pics/VideoPlayer_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/VideoPlayer_48.png rename to examples/qml/modelviews/pathview/pics/VideoPlayer_48.png diff --git a/examples/declarative/modelviews/stringlistmodel/main.cpp b/examples/qml/modelviews/stringlistmodel/main.cpp similarity index 94% rename from examples/declarative/modelviews/stringlistmodel/main.cpp rename to examples/qml/modelviews/stringlistmodel/main.cpp index 47d7fdaa8c..12859316a3 100644 --- a/examples/declarative/modelviews/stringlistmodel/main.cpp +++ b/examples/qml/modelviews/stringlistmodel/main.cpp @@ -41,9 +41,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -65,7 +65,7 @@ int main(int argc, char ** argv) dataList.append("Item 4"); QQuickView view; - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); //![0] diff --git a/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro b/examples/qml/modelviews/stringlistmodel/stringlistmodel.pro similarity index 69% rename from examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro rename to examples/qml/modelviews/stringlistmodel/stringlistmodel.pro index 540d8c71f0..19e62cd1b7 100644 --- a/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro +++ b/examples/qml/modelviews/stringlistmodel/stringlistmodel.pro @@ -1,4 +1,4 @@ -QT += declarative quick +QT += qml quick SOURCES += main.cpp RESOURCES += stringlistmodel.qrc diff --git a/examples/declarative/modelviews/stringlistmodel/stringlistmodel.qrc b/examples/qml/modelviews/stringlistmodel/stringlistmodel.qrc similarity index 100% rename from examples/declarative/modelviews/stringlistmodel/stringlistmodel.qrc rename to examples/qml/modelviews/stringlistmodel/stringlistmodel.qrc diff --git a/examples/declarative/modelviews/stringlistmodel/view.qml b/examples/qml/modelviews/stringlistmodel/view.qml similarity index 100% rename from examples/declarative/modelviews/stringlistmodel/view.qml rename to examples/qml/modelviews/stringlistmodel/view.qml diff --git a/examples/declarative/modelviews/visualdatamodel/dragselection.qml b/examples/qml/modelviews/visualdatamodel/dragselection.qml similarity index 100% rename from examples/declarative/modelviews/visualdatamodel/dragselection.qml rename to examples/qml/modelviews/visualdatamodel/dragselection.qml diff --git a/examples/declarative/modelviews/visualdatamodel/slideshow.qml b/examples/qml/modelviews/visualdatamodel/slideshow.qml similarity index 100% rename from examples/declarative/modelviews/visualdatamodel/slideshow.qml rename to examples/qml/modelviews/visualdatamodel/slideshow.qml diff --git a/examples/declarative/modelviews/visualdatamodel/sortedmodel.qml b/examples/qml/modelviews/visualdatamodel/sortedmodel.qml similarity index 100% rename from examples/declarative/modelviews/visualdatamodel/sortedmodel.qml rename to examples/qml/modelviews/visualdatamodel/sortedmodel.qml diff --git a/examples/declarative/modelviews/visualdatamodel/visualdatamodel.qmlproject b/examples/qml/modelviews/visualdatamodel/visualdatamodel.qmlproject similarity index 100% rename from examples/declarative/modelviews/visualdatamodel/visualdatamodel.qmlproject rename to examples/qml/modelviews/visualdatamodel/visualdatamodel.qmlproject diff --git a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml b/examples/qml/modelviews/visualitemmodel/visualitemmodel.qml similarity index 100% rename from examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml rename to examples/qml/modelviews/visualitemmodel/visualitemmodel.qml diff --git a/examples/declarative/openglunderqml/main.cpp b/examples/qml/openglunderqml/main.cpp similarity index 100% rename from examples/declarative/openglunderqml/main.cpp rename to examples/qml/openglunderqml/main.cpp diff --git a/examples/declarative/openglunderqml/main.qml b/examples/qml/openglunderqml/main.qml similarity index 100% rename from examples/declarative/openglunderqml/main.qml rename to examples/qml/openglunderqml/main.qml diff --git a/examples/declarative/openglunderqml/openglunderqml.pro b/examples/qml/openglunderqml/openglunderqml.pro similarity index 77% rename from examples/declarative/openglunderqml/openglunderqml.pro rename to examples/qml/openglunderqml/openglunderqml.pro index 117ad0c33e..64a58b3729 100644 --- a/examples/declarative/openglunderqml/openglunderqml.pro +++ b/examples/qml/openglunderqml/openglunderqml.pro @@ -1,4 +1,4 @@ -QT += declarative quick +QT += qml quick HEADERS += squircle.h SOURCES += squircle.cpp main.cpp diff --git a/examples/declarative/openglunderqml/squircle.cpp b/examples/qml/openglunderqml/squircle.cpp similarity index 100% rename from examples/declarative/openglunderqml/squircle.cpp rename to examples/qml/openglunderqml/squircle.cpp diff --git a/examples/declarative/openglunderqml/squircle.h b/examples/qml/openglunderqml/squircle.h similarity index 100% rename from examples/declarative/openglunderqml/squircle.h rename to examples/qml/openglunderqml/squircle.h diff --git a/examples/declarative/painteditem/painteditem.pro b/examples/qml/painteditem/painteditem.pro similarity index 100% rename from examples/declarative/painteditem/painteditem.pro rename to examples/qml/painteditem/painteditem.pro diff --git a/examples/declarative/painteditem/smile/main.cpp b/examples/qml/painteditem/smile/main.cpp similarity index 98% rename from examples/declarative/painteditem/smile/main.cpp rename to examples/qml/painteditem/smile/main.cpp index 1e6b42351d..1c7888b10b 100644 --- a/examples/declarative/painteditem/smile/main.cpp +++ b/examples/qml/painteditem/smile/main.cpp @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include class MyPaintItem : public QQuickPaintedItem diff --git a/examples/declarative/painteditem/smile/smile.pro b/examples/qml/painteditem/smile/smile.pro similarity index 81% rename from examples/declarative/painteditem/smile/smile.pro rename to examples/qml/painteditem/smile/smile.pro index 780d351fe6..b1af4ee0ad 100644 --- a/examples/declarative/painteditem/smile/smile.pro +++ b/examples/qml/painteditem/smile/smile.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = painteditem -QT += declarative quick +QT += qml quick macx: CONFIG -= app_bundle diff --git a/examples/declarative/painteditem/smile/smile.qml b/examples/qml/painteditem/smile/smile.qml similarity index 100% rename from examples/declarative/painteditem/smile/smile.qml rename to examples/qml/painteditem/smile/smile.qml diff --git a/examples/declarative/painteditem/textballoons/TextBalloonPlugin/plugin.h b/examples/qml/painteditem/textballoons/TextBalloonPlugin/plugin.h similarity index 95% rename from examples/declarative/painteditem/textballoons/TextBalloonPlugin/plugin.h rename to examples/qml/painteditem/textballoons/TextBalloonPlugin/plugin.h index 6be8611dfd..e6523e15a9 100644 --- a/examples/declarative/painteditem/textballoons/TextBalloonPlugin/plugin.h +++ b/examples/qml/painteditem/textballoons/TextBalloonPlugin/plugin.h @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#include +#include #include "../textballoon.h" -class TextBalloonPlugin : public QDeclarativeExtensionPlugin +class TextBalloonPlugin : public QQmlExtensionPlugin { Q_OBJECT public: diff --git a/examples/declarative/painteditem/textballoons/TextBalloonPlugin/qmldir b/examples/qml/painteditem/textballoons/TextBalloonPlugin/qmldir similarity index 100% rename from examples/declarative/painteditem/textballoons/TextBalloonPlugin/qmldir rename to examples/qml/painteditem/textballoons/TextBalloonPlugin/qmldir diff --git a/examples/declarative/painteditem/textballoons/textballoon.cpp b/examples/qml/painteditem/textballoons/textballoon.cpp similarity index 100% rename from examples/declarative/painteditem/textballoons/textballoon.cpp rename to examples/qml/painteditem/textballoons/textballoon.cpp diff --git a/examples/declarative/painteditem/textballoons/textballoon.h b/examples/qml/painteditem/textballoons/textballoon.h similarity index 100% rename from examples/declarative/painteditem/textballoons/textballoon.h rename to examples/qml/painteditem/textballoons/textballoon.h diff --git a/examples/qml/painteditem/textballoons/textballoons.pro b/examples/qml/painteditem/textballoons/textballoons.pro new file mode 100644 index 0000000000..9bc0f3c04a --- /dev/null +++ b/examples/qml/painteditem/textballoons/textballoons.pro @@ -0,0 +1,23 @@ +TEMPLATE = lib +CONFIG += qt plugin +QT += qml quick + +TARGET = qmltextballoonplugin + +HEADERS += TextBalloonPlugin/plugin.h \ + textballoon.h + +SOURCES += textballoon.cpp + +DESTDIR = TextBalloonPlugin + +qqmlsources.files += \ + TextBalloonPlugin/qmldir + +qqmlsources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/painteditem/textballoons/TextBalloonPlugin + +sources.files = textballoons.qml +sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/painteditem/textballoons +target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/painteditem/textballoons/TextBalloonPlugin + +INSTALLS = qqmlsources sources target diff --git a/examples/declarative/painteditem/textballoons/textballoons.qml b/examples/qml/painteditem/textballoons/textballoons.qml similarity index 100% rename from examples/declarative/painteditem/textballoons/textballoons.qml rename to examples/qml/painteditem/textballoons/textballoons.qml diff --git a/examples/declarative/particles/affectors/age.qml b/examples/qml/particles/affectors/age.qml similarity index 100% rename from examples/declarative/particles/affectors/age.qml rename to examples/qml/particles/affectors/age.qml diff --git a/examples/declarative/particles/affectors/attractor.qml b/examples/qml/particles/affectors/attractor.qml similarity index 100% rename from examples/declarative/particles/affectors/attractor.qml rename to examples/qml/particles/affectors/attractor.qml diff --git a/examples/declarative/particles/affectors/customaffector.qml b/examples/qml/particles/affectors/customaffector.qml similarity index 100% rename from examples/declarative/particles/affectors/customaffector.qml rename to examples/qml/particles/affectors/customaffector.qml diff --git a/examples/declarative/particles/affectors/friction.qml b/examples/qml/particles/affectors/friction.qml similarity index 100% rename from examples/declarative/particles/affectors/friction.qml rename to examples/qml/particles/affectors/friction.qml diff --git a/examples/declarative/particles/affectors/gravity.qml b/examples/qml/particles/affectors/gravity.qml similarity index 100% rename from examples/declarative/particles/affectors/gravity.qml rename to examples/qml/particles/affectors/gravity.qml diff --git a/examples/declarative/particles/affectors/groupgoal.qml b/examples/qml/particles/affectors/groupgoal.qml similarity index 100% rename from examples/declarative/particles/affectors/groupgoal.qml rename to examples/qml/particles/affectors/groupgoal.qml diff --git a/examples/declarative/particles/affectors/move.qml b/examples/qml/particles/affectors/move.qml similarity index 100% rename from examples/declarative/particles/affectors/move.qml rename to examples/qml/particles/affectors/move.qml diff --git a/examples/declarative/particles/affectors/spritegoal.qml b/examples/qml/particles/affectors/spritegoal.qml similarity index 100% rename from examples/declarative/particles/affectors/spritegoal.qml rename to examples/qml/particles/affectors/spritegoal.qml diff --git a/examples/declarative/particles/affectors/turbulence.qml b/examples/qml/particles/affectors/turbulence.qml similarity index 100% rename from examples/declarative/particles/affectors/turbulence.qml rename to examples/qml/particles/affectors/turbulence.qml diff --git a/examples/declarative/particles/affectors/wander.qml b/examples/qml/particles/affectors/wander.qml similarity index 100% rename from examples/declarative/particles/affectors/wander.qml rename to examples/qml/particles/affectors/wander.qml diff --git a/examples/declarative/particles/customparticle/blurparticles.qml b/examples/qml/particles/customparticle/blurparticles.qml similarity index 100% rename from examples/declarative/particles/customparticle/blurparticles.qml rename to examples/qml/particles/customparticle/blurparticles.qml diff --git a/examples/declarative/particles/customparticle/fragmentshader.qml b/examples/qml/particles/customparticle/fragmentshader.qml similarity index 100% rename from examples/declarative/particles/customparticle/fragmentshader.qml rename to examples/qml/particles/customparticle/fragmentshader.qml diff --git a/examples/declarative/particles/customparticle/imagecolors.qml b/examples/qml/particles/customparticle/imagecolors.qml similarity index 100% rename from examples/declarative/particles/customparticle/imagecolors.qml rename to examples/qml/particles/customparticle/imagecolors.qml diff --git a/examples/declarative/particles/emitters/burstandpulse.qml b/examples/qml/particles/emitters/burstandpulse.qml similarity index 100% rename from examples/declarative/particles/emitters/burstandpulse.qml rename to examples/qml/particles/emitters/burstandpulse.qml diff --git a/examples/declarative/particles/emitters/customemitter.qml b/examples/qml/particles/emitters/customemitter.qml similarity index 100% rename from examples/declarative/particles/emitters/customemitter.qml rename to examples/qml/particles/emitters/customemitter.qml diff --git a/examples/declarative/particles/emitters/emitmask.qml b/examples/qml/particles/emitters/emitmask.qml similarity index 100% rename from examples/declarative/particles/emitters/emitmask.qml rename to examples/qml/particles/emitters/emitmask.qml diff --git a/examples/declarative/particles/emitters/maximumemitted.qml b/examples/qml/particles/emitters/maximumemitted.qml similarity index 100% rename from examples/declarative/particles/emitters/maximumemitted.qml rename to examples/qml/particles/emitters/maximumemitted.qml diff --git a/examples/declarative/particles/emitters/shapeanddirection.qml b/examples/qml/particles/emitters/shapeanddirection.qml similarity index 100% rename from examples/declarative/particles/emitters/shapeanddirection.qml rename to examples/qml/particles/emitters/shapeanddirection.qml diff --git a/examples/declarative/particles/emitters/timedgroupchanges.qml b/examples/qml/particles/emitters/timedgroupchanges.qml similarity index 100% rename from examples/declarative/particles/emitters/timedgroupchanges.qml rename to examples/qml/particles/emitters/timedgroupchanges.qml diff --git a/examples/declarative/particles/emitters/trailemitter.qml b/examples/qml/particles/emitters/trailemitter.qml similarity index 100% rename from examples/declarative/particles/emitters/trailemitter.qml rename to examples/qml/particles/emitters/trailemitter.qml diff --git a/examples/declarative/particles/emitters/velocityfrommotion.qml b/examples/qml/particles/emitters/velocityfrommotion.qml similarity index 100% rename from examples/declarative/particles/emitters/velocityfrommotion.qml rename to examples/qml/particles/emitters/velocityfrommotion.qml diff --git a/examples/declarative/particles/exampleslauncher/content/Button.qml b/examples/qml/particles/exampleslauncher/content/Button.qml similarity index 100% rename from examples/declarative/particles/exampleslauncher/content/Button.qml rename to examples/qml/particles/exampleslauncher/content/Button.qml diff --git a/examples/declarative/particles/exampleslauncher/content/Shell.qml b/examples/qml/particles/exampleslauncher/content/Shell.qml similarity index 100% rename from examples/declarative/particles/exampleslauncher/content/Shell.qml rename to examples/qml/particles/exampleslauncher/content/Shell.qml diff --git a/examples/declarative/particles/exampleslauncher/content/launcher.js b/examples/qml/particles/exampleslauncher/content/launcher.js similarity index 100% rename from examples/declarative/particles/exampleslauncher/content/launcher.js rename to examples/qml/particles/exampleslauncher/content/launcher.js diff --git a/examples/declarative/particles/exampleslauncher/exampleslauncher.qml b/examples/qml/particles/exampleslauncher/exampleslauncher.qml similarity index 100% rename from examples/declarative/particles/exampleslauncher/exampleslauncher.qml rename to examples/qml/particles/exampleslauncher/exampleslauncher.qml diff --git a/examples/declarative/particles/imageparticle/allatonce.qml b/examples/qml/particles/imageparticle/allatonce.qml similarity index 100% rename from examples/declarative/particles/imageparticle/allatonce.qml rename to examples/qml/particles/imageparticle/allatonce.qml diff --git a/examples/declarative/particles/imageparticle/colored.qml b/examples/qml/particles/imageparticle/colored.qml similarity index 100% rename from examples/declarative/particles/imageparticle/colored.qml rename to examples/qml/particles/imageparticle/colored.qml diff --git a/examples/declarative/particles/imageparticle/colortable.qml b/examples/qml/particles/imageparticle/colortable.qml similarity index 100% rename from examples/declarative/particles/imageparticle/colortable.qml rename to examples/qml/particles/imageparticle/colortable.qml diff --git a/examples/declarative/particles/imageparticle/deformation.qml b/examples/qml/particles/imageparticle/deformation.qml similarity index 100% rename from examples/declarative/particles/imageparticle/deformation.qml rename to examples/qml/particles/imageparticle/deformation.qml diff --git a/examples/declarative/particles/imageparticle/rotation.qml b/examples/qml/particles/imageparticle/rotation.qml similarity index 100% rename from examples/declarative/particles/imageparticle/rotation.qml rename to examples/qml/particles/imageparticle/rotation.qml diff --git a/examples/declarative/particles/imageparticle/sharing.qml b/examples/qml/particles/imageparticle/sharing.qml similarity index 100% rename from examples/declarative/particles/imageparticle/sharing.qml rename to examples/qml/particles/imageparticle/sharing.qml diff --git a/examples/declarative/particles/imageparticle/sprites.qml b/examples/qml/particles/imageparticle/sprites.qml similarity index 100% rename from examples/declarative/particles/imageparticle/sprites.qml rename to examples/qml/particles/imageparticle/sprites.qml diff --git a/examples/declarative/particles/images/_explo.png b/examples/qml/particles/images/_explo.png similarity index 100% rename from examples/declarative/particles/images/_explo.png rename to examples/qml/particles/images/_explo.png diff --git a/examples/declarative/particles/images/backgroundLeaves.jpg b/examples/qml/particles/images/backgroundLeaves.jpg similarity index 100% rename from examples/declarative/particles/images/backgroundLeaves.jpg rename to examples/qml/particles/images/backgroundLeaves.jpg diff --git a/examples/declarative/particles/images/bear_tiles.png b/examples/qml/particles/images/bear_tiles.png similarity index 100% rename from examples/declarative/particles/images/bear_tiles.png rename to examples/qml/particles/images/bear_tiles.png diff --git a/examples/declarative/particles/images/candle.png b/examples/qml/particles/images/candle.png similarity index 100% rename from examples/declarative/particles/images/candle.png rename to examples/qml/particles/images/candle.png diff --git a/examples/declarative/particles/images/colortable.png b/examples/qml/particles/images/colortable.png similarity index 100% rename from examples/declarative/particles/images/colortable.png rename to examples/qml/particles/images/colortable.png diff --git a/examples/declarative/particles/images/finalfrontier.png b/examples/qml/particles/images/finalfrontier.png similarity index 100% rename from examples/declarative/particles/images/finalfrontier.png rename to examples/qml/particles/images/finalfrontier.png diff --git a/examples/declarative/particles/images/flower.png b/examples/qml/particles/images/flower.png similarity index 100% rename from examples/declarative/particles/images/flower.png rename to examples/qml/particles/images/flower.png diff --git a/examples/declarative/particles/images/launcherIcons/allatonce.png b/examples/qml/particles/images/launcherIcons/allatonce.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/allatonce.png rename to examples/qml/particles/images/launcherIcons/allatonce.png diff --git a/examples/declarative/particles/images/launcherIcons/attractor.png b/examples/qml/particles/images/launcherIcons/attractor.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/attractor.png rename to examples/qml/particles/images/launcherIcons/attractor.png diff --git a/examples/declarative/particles/images/launcherIcons/blurparticles.png b/examples/qml/particles/images/launcherIcons/blurparticles.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/blurparticles.png rename to examples/qml/particles/images/launcherIcons/blurparticles.png diff --git a/examples/declarative/particles/images/launcherIcons/close.png b/examples/qml/particles/images/launcherIcons/close.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/close.png rename to examples/qml/particles/images/launcherIcons/close.png diff --git a/examples/declarative/particles/images/launcherIcons/colortable.png b/examples/qml/particles/images/launcherIcons/colortable.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/colortable.png rename to examples/qml/particles/images/launcherIcons/colortable.png diff --git a/examples/declarative/particles/images/launcherIcons/customaffector.png b/examples/qml/particles/images/launcherIcons/customaffector.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/customaffector.png rename to examples/qml/particles/images/launcherIcons/customaffector.png diff --git a/examples/declarative/particles/images/launcherIcons/customemitter.png b/examples/qml/particles/images/launcherIcons/customemitter.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/customemitter.png rename to examples/qml/particles/images/launcherIcons/customemitter.png diff --git a/examples/declarative/particles/images/launcherIcons/deformation.png b/examples/qml/particles/images/launcherIcons/deformation.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/deformation.png rename to examples/qml/particles/images/launcherIcons/deformation.png diff --git a/examples/declarative/particles/images/launcherIcons/delegates.png b/examples/qml/particles/images/launcherIcons/delegates.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/delegates.png rename to examples/qml/particles/images/launcherIcons/delegates.png diff --git a/examples/declarative/particles/images/launcherIcons/dynamicemitters.png b/examples/qml/particles/images/launcherIcons/dynamicemitters.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/dynamicemitters.png rename to examples/qml/particles/images/launcherIcons/dynamicemitters.png diff --git a/examples/declarative/particles/images/launcherIcons/emitmask.png b/examples/qml/particles/images/launcherIcons/emitmask.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/emitmask.png rename to examples/qml/particles/images/launcherIcons/emitmask.png diff --git a/examples/declarative/particles/images/launcherIcons/flickr.png b/examples/qml/particles/images/launcherIcons/flickr.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/flickr.png rename to examples/qml/particles/images/launcherIcons/flickr.png diff --git a/examples/declarative/particles/images/launcherIcons/fragmentshader.png b/examples/qml/particles/images/launcherIcons/fragmentshader.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/fragmentshader.png rename to examples/qml/particles/images/launcherIcons/fragmentshader.png diff --git a/examples/declarative/particles/images/launcherIcons/gridsplosion.png b/examples/qml/particles/images/launcherIcons/gridsplosion.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/gridsplosion.png rename to examples/qml/particles/images/launcherIcons/gridsplosion.png diff --git a/examples/declarative/particles/images/launcherIcons/groupgoal.png b/examples/qml/particles/images/launcherIcons/groupgoal.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/groupgoal.png rename to examples/qml/particles/images/launcherIcons/groupgoal.png diff --git a/examples/declarative/particles/images/launcherIcons/imagecolors.png b/examples/qml/particles/images/launcherIcons/imagecolors.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/imagecolors.png rename to examples/qml/particles/images/launcherIcons/imagecolors.png diff --git a/examples/declarative/particles/images/launcherIcons/list.png b/examples/qml/particles/images/launcherIcons/list.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/list.png rename to examples/qml/particles/images/launcherIcons/list.png diff --git a/examples/declarative/particles/images/launcherIcons/maximumemitted.png b/examples/qml/particles/images/launcherIcons/maximumemitted.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/maximumemitted.png rename to examples/qml/particles/images/launcherIcons/maximumemitted.png diff --git a/examples/declarative/particles/images/launcherIcons/multiplepainters.png b/examples/qml/particles/images/launcherIcons/multiplepainters.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/multiplepainters.png rename to examples/qml/particles/images/launcherIcons/multiplepainters.png diff --git a/examples/declarative/particles/images/launcherIcons/package.png b/examples/qml/particles/images/launcherIcons/package.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/package.png rename to examples/qml/particles/images/launcherIcons/package.png diff --git a/examples/declarative/particles/images/launcherIcons/particleview.png b/examples/qml/particles/images/launcherIcons/particleview.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/particleview.png rename to examples/qml/particles/images/launcherIcons/particleview.png diff --git a/examples/declarative/particles/images/launcherIcons/plasmapatrol.png b/examples/qml/particles/images/launcherIcons/plasmapatrol.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/plasmapatrol.png rename to examples/qml/particles/images/launcherIcons/plasmapatrol.png diff --git a/examples/declarative/particles/images/launcherIcons/remove.png b/examples/qml/particles/images/launcherIcons/remove.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/remove.png rename to examples/qml/particles/images/launcherIcons/remove.png diff --git a/examples/declarative/particles/images/launcherIcons/rotation.png b/examples/qml/particles/images/launcherIcons/rotation.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/rotation.png rename to examples/qml/particles/images/launcherIcons/rotation.png diff --git a/examples/declarative/particles/images/launcherIcons/samegame.png b/examples/qml/particles/images/launcherIcons/samegame.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/samegame.png rename to examples/qml/particles/images/launcherIcons/samegame.png diff --git a/examples/declarative/particles/images/launcherIcons/shapeanddirection.png b/examples/qml/particles/images/launcherIcons/shapeanddirection.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/shapeanddirection.png rename to examples/qml/particles/images/launcherIcons/shapeanddirection.png diff --git a/examples/declarative/particles/images/launcherIcons/spaceexplorer.png b/examples/qml/particles/images/launcherIcons/spaceexplorer.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/spaceexplorer.png rename to examples/qml/particles/images/launcherIcons/spaceexplorer.png diff --git a/examples/declarative/particles/images/launcherIcons/spritegoal.png b/examples/qml/particles/images/launcherIcons/spritegoal.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/spritegoal.png rename to examples/qml/particles/images/launcherIcons/spritegoal.png diff --git a/examples/declarative/particles/images/launcherIcons/sprites.png b/examples/qml/particles/images/launcherIcons/sprites.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/sprites.png rename to examples/qml/particles/images/launcherIcons/sprites.png diff --git a/examples/declarative/particles/images/launcherIcons/spritevariedparticles.png b/examples/qml/particles/images/launcherIcons/spritevariedparticles.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/spritevariedparticles.png rename to examples/qml/particles/images/launcherIcons/spritevariedparticles.png diff --git a/examples/declarative/particles/images/launcherIcons/startstop.png b/examples/qml/particles/images/launcherIcons/startstop.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/startstop.png rename to examples/qml/particles/images/launcherIcons/startstop.png diff --git a/examples/declarative/particles/images/launcherIcons/timedgroupchanges.png b/examples/qml/particles/images/launcherIcons/timedgroupchanges.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/timedgroupchanges.png rename to examples/qml/particles/images/launcherIcons/timedgroupchanges.png diff --git a/examples/declarative/particles/images/launcherIcons/trailemitter.png b/examples/qml/particles/images/launcherIcons/trailemitter.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/trailemitter.png rename to examples/qml/particles/images/launcherIcons/trailemitter.png diff --git a/examples/declarative/particles/images/launcherIcons/trails.png b/examples/qml/particles/images/launcherIcons/trails.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/trails.png rename to examples/qml/particles/images/launcherIcons/trails.png diff --git a/examples/declarative/particles/images/launcherIcons/turbulence.png b/examples/qml/particles/images/launcherIcons/turbulence.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/turbulence.png rename to examples/qml/particles/images/launcherIcons/turbulence.png diff --git a/examples/declarative/particles/images/launcherIcons/velocityfrommotion.png b/examples/qml/particles/images/launcherIcons/velocityfrommotion.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/velocityfrommotion.png rename to examples/qml/particles/images/launcherIcons/velocityfrommotion.png diff --git a/examples/declarative/particles/images/launcherIcons/wander.png b/examples/qml/particles/images/launcherIcons/wander.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/wander.png rename to examples/qml/particles/images/launcherIcons/wander.png diff --git a/examples/declarative/particles/images/matchmask.png b/examples/qml/particles/images/matchmask.png similarity index 100% rename from examples/declarative/particles/images/matchmask.png rename to examples/qml/particles/images/matchmask.png diff --git a/examples/declarative/particles/images/meteor.png b/examples/qml/particles/images/meteor.png similarity index 100% rename from examples/declarative/particles/images/meteor.png rename to examples/qml/particles/images/meteor.png diff --git a/examples/declarative/particles/images/meteor_explo.png b/examples/qml/particles/images/meteor_explo.png similarity index 100% rename from examples/declarative/particles/images/meteor_explo.png rename to examples/qml/particles/images/meteor_explo.png diff --git a/examples/declarative/particles/images/meteors.png b/examples/qml/particles/images/meteors.png similarity index 100% rename from examples/declarative/particles/images/meteors.png rename to examples/qml/particles/images/meteors.png diff --git a/examples/declarative/particles/images/nullRock.png b/examples/qml/particles/images/nullRock.png similarity index 100% rename from examples/declarative/particles/images/nullRock.png rename to examples/qml/particles/images/nullRock.png diff --git a/examples/declarative/particles/images/particle.png b/examples/qml/particles/images/particle.png similarity index 100% rename from examples/declarative/particles/images/particle.png rename to examples/qml/particles/images/particle.png diff --git a/examples/declarative/particles/images/particle2.png b/examples/qml/particles/images/particle2.png similarity index 100% rename from examples/declarative/particles/images/particle2.png rename to examples/qml/particles/images/particle2.png diff --git a/examples/declarative/particles/images/particle3.png b/examples/qml/particles/images/particle3.png similarity index 100% rename from examples/declarative/particles/images/particle3.png rename to examples/qml/particles/images/particle3.png diff --git a/examples/declarative/particles/images/particle4.png b/examples/qml/particles/images/particle4.png similarity index 100% rename from examples/declarative/particles/images/particle4.png rename to examples/qml/particles/images/particle4.png diff --git a/examples/declarative/particles/images/particleA.png b/examples/qml/particles/images/particleA.png similarity index 100% rename from examples/declarative/particles/images/particleA.png rename to examples/qml/particles/images/particleA.png diff --git a/examples/declarative/particles/images/portal_bg.png b/examples/qml/particles/images/portal_bg.png similarity index 100% rename from examples/declarative/particles/images/portal_bg.png rename to examples/qml/particles/images/portal_bg.png diff --git a/examples/declarative/particles/images/realLeaf1.png b/examples/qml/particles/images/realLeaf1.png similarity index 100% rename from examples/declarative/particles/images/realLeaf1.png rename to examples/qml/particles/images/realLeaf1.png diff --git a/examples/declarative/particles/images/realLeaf2.png b/examples/qml/particles/images/realLeaf2.png similarity index 100% rename from examples/declarative/particles/images/realLeaf2.png rename to examples/qml/particles/images/realLeaf2.png diff --git a/examples/declarative/particles/images/realLeaf3.png b/examples/qml/particles/images/realLeaf3.png similarity index 100% rename from examples/declarative/particles/images/realLeaf3.png rename to examples/qml/particles/images/realLeaf3.png diff --git a/examples/declarative/particles/images/realLeaf4.png b/examples/qml/particles/images/realLeaf4.png similarity index 100% rename from examples/declarative/particles/images/realLeaf4.png rename to examples/qml/particles/images/realLeaf4.png diff --git a/examples/declarative/particles/images/rocket.png b/examples/qml/particles/images/rocket.png similarity index 100% rename from examples/declarative/particles/images/rocket.png rename to examples/qml/particles/images/rocket.png diff --git a/examples/declarative/particles/images/rocket2.png b/examples/qml/particles/images/rocket2.png similarity index 100% rename from examples/declarative/particles/images/rocket2.png rename to examples/qml/particles/images/rocket2.png diff --git a/examples/declarative/particles/images/sizeInOut.png b/examples/qml/particles/images/sizeInOut.png similarity index 100% rename from examples/declarative/particles/images/sizeInOut.png rename to examples/qml/particles/images/sizeInOut.png diff --git a/examples/declarative/particles/images/snowflake.png b/examples/qml/particles/images/snowflake.png similarity index 100% rename from examples/declarative/particles/images/snowflake.png rename to examples/qml/particles/images/snowflake.png diff --git a/examples/declarative/particles/images/sparkleSize.png b/examples/qml/particles/images/sparkleSize.png similarity index 100% rename from examples/declarative/particles/images/sparkleSize.png rename to examples/qml/particles/images/sparkleSize.png diff --git a/examples/declarative/particles/images/star.png b/examples/qml/particles/images/star.png similarity index 100% rename from examples/declarative/particles/images/star.png rename to examples/qml/particles/images/star.png diff --git a/examples/declarative/particles/images/starfish_0.png b/examples/qml/particles/images/starfish_0.png similarity index 100% rename from examples/declarative/particles/images/starfish_0.png rename to examples/qml/particles/images/starfish_0.png diff --git a/examples/declarative/particles/images/starfish_1.png b/examples/qml/particles/images/starfish_1.png similarity index 100% rename from examples/declarative/particles/images/starfish_1.png rename to examples/qml/particles/images/starfish_1.png diff --git a/examples/declarative/particles/images/starfish_2.png b/examples/qml/particles/images/starfish_2.png similarity index 100% rename from examples/declarative/particles/images/starfish_2.png rename to examples/qml/particles/images/starfish_2.png diff --git a/examples/declarative/particles/images/starfish_3.png b/examples/qml/particles/images/starfish_3.png similarity index 100% rename from examples/declarative/particles/images/starfish_3.png rename to examples/qml/particles/images/starfish_3.png diff --git a/examples/declarative/particles/images/starfish_4.png b/examples/qml/particles/images/starfish_4.png similarity index 100% rename from examples/declarative/particles/images/starfish_4.png rename to examples/qml/particles/images/starfish_4.png diff --git a/examples/declarative/particles/images/starfish_mask.png b/examples/qml/particles/images/starfish_mask.png similarity index 100% rename from examples/declarative/particles/images/starfish_mask.png rename to examples/qml/particles/images/starfish_mask.png diff --git a/examples/declarative/particles/itemparticle/content/Delegate.qml b/examples/qml/particles/itemparticle/content/Delegate.qml similarity index 100% rename from examples/declarative/particles/itemparticle/content/Delegate.qml rename to examples/qml/particles/itemparticle/content/Delegate.qml diff --git a/examples/declarative/particles/itemparticle/content/Delegate2.qml b/examples/qml/particles/itemparticle/content/Delegate2.qml similarity index 100% rename from examples/declarative/particles/itemparticle/content/Delegate2.qml rename to examples/qml/particles/itemparticle/content/Delegate2.qml diff --git a/examples/declarative/particles/itemparticle/content/ExpandingDelegate.qml b/examples/qml/particles/itemparticle/content/ExpandingDelegate.qml similarity index 100% rename from examples/declarative/particles/itemparticle/content/ExpandingDelegate.qml rename to examples/qml/particles/itemparticle/content/ExpandingDelegate.qml diff --git a/examples/declarative/particles/itemparticle/content/RssModel.qml b/examples/qml/particles/itemparticle/content/RssModel.qml similarity index 100% rename from examples/declarative/particles/itemparticle/content/RssModel.qml rename to examples/qml/particles/itemparticle/content/RssModel.qml diff --git a/examples/declarative/particles/itemparticle/content/bubble.png b/examples/qml/particles/itemparticle/content/bubble.png similarity index 100% rename from examples/declarative/particles/itemparticle/content/bubble.png rename to examples/qml/particles/itemparticle/content/bubble.png diff --git a/examples/declarative/particles/itemparticle/content/script.js b/examples/qml/particles/itemparticle/content/script.js similarity index 100% rename from examples/declarative/particles/itemparticle/content/script.js rename to examples/qml/particles/itemparticle/content/script.js diff --git a/examples/declarative/particles/itemparticle/delegates.qml b/examples/qml/particles/itemparticle/delegates.qml similarity index 100% rename from examples/declarative/particles/itemparticle/delegates.qml rename to examples/qml/particles/itemparticle/delegates.qml diff --git a/examples/declarative/particles/itemparticle/particleview.qml b/examples/qml/particles/itemparticle/particleview.qml similarity index 100% rename from examples/declarative/particles/itemparticle/particleview.qml rename to examples/qml/particles/itemparticle/particleview.qml diff --git a/examples/declarative/particles/plasmapatrol/PlasmaPatrol.qmlproject b/examples/qml/particles/plasmapatrol/PlasmaPatrol.qmlproject similarity index 100% rename from examples/declarative/particles/plasmapatrol/PlasmaPatrol.qmlproject rename to examples/qml/particles/plasmapatrol/PlasmaPatrol.qmlproject diff --git a/examples/declarative/particles/plasmapatrol/TODO b/examples/qml/particles/plasmapatrol/TODO similarity index 100% rename from examples/declarative/particles/plasmapatrol/TODO rename to examples/qml/particles/plasmapatrol/TODO diff --git a/examples/declarative/particles/plasmapatrol/content/BlasterHardpoint.qml b/examples/qml/particles/plasmapatrol/content/BlasterHardpoint.qml similarity index 98% rename from examples/declarative/particles/plasmapatrol/content/BlasterHardpoint.qml rename to examples/qml/particles/plasmapatrol/content/BlasterHardpoint.qml index 4ac30d0202..10c50d43c8 100644 --- a/examples/declarative/particles/plasmapatrol/content/BlasterHardpoint.qml +++ b/examples/qml/particles/plasmapatrol/content/BlasterHardpoint.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/Button.qml b/examples/qml/particles/plasmapatrol/content/Button.qml similarity index 97% rename from examples/declarative/particles/plasmapatrol/content/Button.qml rename to examples/qml/particles/plasmapatrol/content/Button.qml index 405b99304f..992be295fc 100644 --- a/examples/declarative/particles/plasmapatrol/content/Button.qml +++ b/examples/qml/particles/plasmapatrol/content/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml b/examples/qml/particles/plasmapatrol/content/CannonHardpoint.qml similarity index 97% rename from examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml rename to examples/qml/particles/plasmapatrol/content/CannonHardpoint.qml index c4aa412760..48eb9d171a 100644 --- a/examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml +++ b/examples/qml/particles/plasmapatrol/content/CannonHardpoint.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/ChoiceBox.qml b/examples/qml/particles/plasmapatrol/content/ChoiceBox.qml similarity index 97% rename from examples/declarative/particles/plasmapatrol/content/ChoiceBox.qml rename to examples/qml/particles/plasmapatrol/content/ChoiceBox.qml index a678bc9dd4..6e21101f2e 100644 --- a/examples/declarative/particles/plasmapatrol/content/ChoiceBox.qml +++ b/examples/qml/particles/plasmapatrol/content/ChoiceBox.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/Cruiser.qml b/examples/qml/particles/plasmapatrol/content/Cruiser.qml similarity index 98% rename from examples/declarative/particles/plasmapatrol/content/Cruiser.qml rename to examples/qml/particles/plasmapatrol/content/Cruiser.qml index c689879dce..c469eb46d2 100644 --- a/examples/declarative/particles/plasmapatrol/content/Cruiser.qml +++ b/examples/qml/particles/plasmapatrol/content/Cruiser.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/Frigate.qml b/examples/qml/particles/plasmapatrol/content/Frigate.qml similarity index 98% rename from examples/declarative/particles/plasmapatrol/content/Frigate.qml rename to examples/qml/particles/plasmapatrol/content/Frigate.qml index de099bed72..92c63b87d1 100644 --- a/examples/declarative/particles/plasmapatrol/content/Frigate.qml +++ b/examples/qml/particles/plasmapatrol/content/Frigate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/Hardpoint.qml b/examples/qml/particles/plasmapatrol/content/Hardpoint.qml similarity index 98% rename from examples/declarative/particles/plasmapatrol/content/Hardpoint.qml rename to examples/qml/particles/plasmapatrol/content/Hardpoint.qml index 5c7fb5521b..9e6057057d 100644 --- a/examples/declarative/particles/plasmapatrol/content/Hardpoint.qml +++ b/examples/qml/particles/plasmapatrol/content/Hardpoint.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/HelpScreens.qml b/examples/qml/particles/plasmapatrol/content/HelpScreens.qml similarity index 99% rename from examples/declarative/particles/plasmapatrol/content/HelpScreens.qml rename to examples/qml/particles/plasmapatrol/content/HelpScreens.qml index 9297f86f31..db70c6ee90 100644 --- a/examples/declarative/particles/plasmapatrol/content/HelpScreens.qml +++ b/examples/qml/particles/plasmapatrol/content/HelpScreens.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/LaserHardpoint.qml b/examples/qml/particles/plasmapatrol/content/LaserHardpoint.qml similarity index 98% rename from examples/declarative/particles/plasmapatrol/content/LaserHardpoint.qml rename to examples/qml/particles/plasmapatrol/content/LaserHardpoint.qml index 87ac3e9e62..a7baed604b 100644 --- a/examples/declarative/particles/plasmapatrol/content/LaserHardpoint.qml +++ b/examples/qml/particles/plasmapatrol/content/LaserHardpoint.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/PlasmaPatrolParticles.qml b/examples/qml/particles/plasmapatrol/content/PlasmaPatrolParticles.qml similarity index 98% rename from examples/declarative/particles/plasmapatrol/content/PlasmaPatrolParticles.qml rename to examples/qml/particles/plasmapatrol/content/PlasmaPatrolParticles.qml index 95d4bcd2b9..87809965b2 100644 --- a/examples/declarative/particles/plasmapatrol/content/PlasmaPatrolParticles.qml +++ b/examples/qml/particles/plasmapatrol/content/PlasmaPatrolParticles.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/SequentialLoader.qml b/examples/qml/particles/plasmapatrol/content/SequentialLoader.qml similarity index 96% rename from examples/declarative/particles/plasmapatrol/content/SequentialLoader.qml rename to examples/qml/particles/plasmapatrol/content/SequentialLoader.qml index eaef87fe57..3707759ce3 100644 --- a/examples/declarative/particles/plasmapatrol/content/SequentialLoader.qml +++ b/examples/qml/particles/plasmapatrol/content/SequentialLoader.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/Ship.qml b/examples/qml/particles/plasmapatrol/content/Ship.qml similarity index 98% rename from examples/declarative/particles/plasmapatrol/content/Ship.qml rename to examples/qml/particles/plasmapatrol/content/Ship.qml index a928cd2a2e..bd023b1dc2 100644 --- a/examples/declarative/particles/plasmapatrol/content/Ship.qml +++ b/examples/qml/particles/plasmapatrol/content/Ship.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/Sloop.qml b/examples/qml/particles/plasmapatrol/content/Sloop.qml similarity index 98% rename from examples/declarative/particles/plasmapatrol/content/Sloop.qml rename to examples/qml/particles/plasmapatrol/content/Sloop.qml index c6b1183162..3bc58a28b0 100644 --- a/examples/declarative/particles/plasmapatrol/content/Sloop.qml +++ b/examples/qml/particles/plasmapatrol/content/Sloop.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/plasmapatrol/content/pics/TitleText.png b/examples/qml/particles/plasmapatrol/content/pics/TitleText.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/TitleText.png rename to examples/qml/particles/plasmapatrol/content/pics/TitleText.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/blur-circle2.png b/examples/qml/particles/plasmapatrol/content/pics/blur-circle2.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/blur-circle2.png rename to examples/qml/particles/plasmapatrol/content/pics/blur-circle2.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/blur-circle3.png b/examples/qml/particles/plasmapatrol/content/pics/blur-circle3.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/blur-circle3.png rename to examples/qml/particles/plasmapatrol/content/pics/blur-circle3.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/finalfrontier.png b/examples/qml/particles/plasmapatrol/content/pics/finalfrontier.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/finalfrontier.png rename to examples/qml/particles/plasmapatrol/content/pics/finalfrontier.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/meteor.png b/examples/qml/particles/plasmapatrol/content/pics/meteor.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/meteor.png rename to examples/qml/particles/plasmapatrol/content/pics/meteor.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/meteor_explo.png b/examples/qml/particles/plasmapatrol/content/pics/meteor_explo.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/meteor_explo.png rename to examples/qml/particles/plasmapatrol/content/pics/meteor_explo.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/nullRock.png b/examples/qml/particles/plasmapatrol/content/pics/nullRock.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/nullRock.png rename to examples/qml/particles/plasmapatrol/content/pics/nullRock.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/particle.png b/examples/qml/particles/plasmapatrol/content/pics/particle.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/particle.png rename to examples/qml/particles/plasmapatrol/content/pics/particle.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/star.png b/examples/qml/particles/plasmapatrol/content/pics/star.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/star.png rename to examples/qml/particles/plasmapatrol/content/pics/star.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/star2.png b/examples/qml/particles/plasmapatrol/content/pics/star2.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/star2.png rename to examples/qml/particles/plasmapatrol/content/pics/star2.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/star3.png b/examples/qml/particles/plasmapatrol/content/pics/star3.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/star3.png rename to examples/qml/particles/plasmapatrol/content/pics/star3.png diff --git a/examples/declarative/particles/plasmapatrol/plasmapatrol.qml b/examples/qml/particles/plasmapatrol/plasmapatrol.qml similarity index 99% rename from examples/declarative/particles/plasmapatrol/plasmapatrol.qml rename to examples/qml/particles/plasmapatrol/plasmapatrol.qml index 45f81c7222..b14ac6385b 100644 --- a/examples/declarative/particles/plasmapatrol/plasmapatrol.qml +++ b/examples/qml/particles/plasmapatrol/plasmapatrol.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/particles/simple/dynamiccomparison.qml b/examples/qml/particles/simple/dynamiccomparison.qml similarity index 100% rename from examples/declarative/particles/simple/dynamiccomparison.qml rename to examples/qml/particles/simple/dynamiccomparison.qml diff --git a/examples/declarative/particles/simple/dynamicemitters.qml b/examples/qml/particles/simple/dynamicemitters.qml similarity index 100% rename from examples/declarative/particles/simple/dynamicemitters.qml rename to examples/qml/particles/simple/dynamicemitters.qml diff --git a/examples/declarative/particles/simple/multiplepainters.qml b/examples/qml/particles/simple/multiplepainters.qml similarity index 100% rename from examples/declarative/particles/simple/multiplepainters.qml rename to examples/qml/particles/simple/multiplepainters.qml diff --git a/examples/declarative/particles/simple/startstop.qml b/examples/qml/particles/simple/startstop.qml similarity index 100% rename from examples/declarative/particles/simple/startstop.qml rename to examples/qml/particles/simple/startstop.qml diff --git a/examples/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/examples/qml/photoviewer/PhotoViewerCore/AlbumDelegate.qml similarity index 98% rename from examples/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml rename to examples/qml/photoviewer/PhotoViewerCore/AlbumDelegate.qml index f183c4b2a0..164f47faa9 100644 --- a/examples/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml +++ b/examples/qml/photoviewer/PhotoViewerCore/AlbumDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml b/examples/qml/photoviewer/PhotoViewerCore/BusyIndicator.qml similarity index 96% rename from examples/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml rename to examples/qml/photoviewer/PhotoViewerCore/BusyIndicator.qml index 2b1a75f369..867c268399 100644 --- a/examples/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml +++ b/examples/qml/photoviewer/PhotoViewerCore/BusyIndicator.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/photoviewer/PhotoViewerCore/Button.qml b/examples/qml/photoviewer/PhotoViewerCore/Button.qml similarity index 97% rename from examples/declarative/photoviewer/PhotoViewerCore/Button.qml rename to examples/qml/photoviewer/PhotoViewerCore/Button.qml index fcce969fbd..8f4177c097 100644 --- a/examples/declarative/photoviewer/PhotoViewerCore/Button.qml +++ b/examples/qml/photoviewer/PhotoViewerCore/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/photoviewer/PhotoViewerCore/EditableButton.qml b/examples/qml/photoviewer/PhotoViewerCore/EditableButton.qml similarity index 97% rename from examples/declarative/photoviewer/PhotoViewerCore/EditableButton.qml rename to examples/qml/photoviewer/PhotoViewerCore/EditableButton.qml index 5d845938c7..435ad2644f 100644 --- a/examples/declarative/photoviewer/PhotoViewerCore/EditableButton.qml +++ b/examples/qml/photoviewer/PhotoViewerCore/EditableButton.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/examples/qml/photoviewer/PhotoViewerCore/PhotoDelegate.qml similarity index 99% rename from examples/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml rename to examples/qml/photoviewer/PhotoViewerCore/PhotoDelegate.qml index b972c938eb..5d4e5aee5d 100644 --- a/examples/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml +++ b/examples/qml/photoviewer/PhotoViewerCore/PhotoDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/photoviewer/PhotoViewerCore/ProgressBar.qml b/examples/qml/photoviewer/PhotoViewerCore/ProgressBar.qml similarity index 96% rename from examples/declarative/photoviewer/PhotoViewerCore/ProgressBar.qml rename to examples/qml/photoviewer/PhotoViewerCore/ProgressBar.qml index 43c936e342..58beef57f3 100644 --- a/examples/declarative/photoviewer/PhotoViewerCore/ProgressBar.qml +++ b/examples/qml/photoviewer/PhotoViewerCore/ProgressBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/photoviewer/PhotoViewerCore/RssModel.qml b/examples/qml/photoviewer/PhotoViewerCore/RssModel.qml similarity index 97% rename from examples/declarative/photoviewer/PhotoViewerCore/RssModel.qml rename to examples/qml/photoviewer/PhotoViewerCore/RssModel.qml index ab818924ac..1598977bb1 100644 --- a/examples/declarative/photoviewer/PhotoViewerCore/RssModel.qml +++ b/examples/qml/photoviewer/PhotoViewerCore/RssModel.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/photoviewer/PhotoViewerCore/Tag.qml b/examples/qml/photoviewer/PhotoViewerCore/Tag.qml similarity index 97% rename from examples/declarative/photoviewer/PhotoViewerCore/Tag.qml rename to examples/qml/photoviewer/PhotoViewerCore/Tag.qml index 2b546a3ac6..ed4a248a7b 100644 --- a/examples/declarative/photoviewer/PhotoViewerCore/Tag.qml +++ b/examples/qml/photoviewer/PhotoViewerCore/Tag.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/photoviewer/PhotoViewerCore/images/box-shadow.png b/examples/qml/photoviewer/PhotoViewerCore/images/box-shadow.png similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/images/box-shadow.png rename to examples/qml/photoviewer/PhotoViewerCore/images/box-shadow.png diff --git a/examples/declarative/photoviewer/PhotoViewerCore/images/busy.png b/examples/qml/photoviewer/PhotoViewerCore/images/busy.png similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/images/busy.png rename to examples/qml/photoviewer/PhotoViewerCore/images/busy.png diff --git a/examples/declarative/photoviewer/PhotoViewerCore/images/cardboard.png b/examples/qml/photoviewer/PhotoViewerCore/images/cardboard.png similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/images/cardboard.png rename to examples/qml/photoviewer/PhotoViewerCore/images/cardboard.png diff --git a/examples/declarative/photoviewer/PhotoViewerCore/qmldir b/examples/qml/photoviewer/PhotoViewerCore/qmldir similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/qmldir rename to examples/qml/photoviewer/PhotoViewerCore/qmldir diff --git a/examples/declarative/photoviewer/PhotoViewerCore/script/script.js b/examples/qml/photoviewer/PhotoViewerCore/script/script.js similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/script/script.js rename to examples/qml/photoviewer/PhotoViewerCore/script/script.js diff --git a/examples/declarative/photoviewer/i18n/base.ts b/examples/qml/photoviewer/i18n/base.ts similarity index 100% rename from examples/declarative/photoviewer/i18n/base.ts rename to examples/qml/photoviewer/i18n/base.ts diff --git a/examples/declarative/photoviewer/i18n/qml_fr.qm b/examples/qml/photoviewer/i18n/qml_fr.qm similarity index 100% rename from examples/declarative/photoviewer/i18n/qml_fr.qm rename to examples/qml/photoviewer/i18n/qml_fr.qm diff --git a/examples/declarative/photoviewer/i18n/qml_fr.ts b/examples/qml/photoviewer/i18n/qml_fr.ts similarity index 100% rename from examples/declarative/photoviewer/i18n/qml_fr.ts rename to examples/qml/photoviewer/i18n/qml_fr.ts diff --git a/examples/declarative/photoviewer/photoviewer.qml b/examples/qml/photoviewer/photoviewer.qml similarity index 98% rename from examples/declarative/photoviewer/photoviewer.qml rename to examples/qml/photoviewer/photoviewer.qml index 918438832b..208720b9e6 100644 --- a/examples/declarative/photoviewer/photoviewer.qml +++ b/examples/qml/photoviewer/photoviewer.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/photoviewer/photoviewer.qmlproject b/examples/qml/photoviewer/photoviewer.qmlproject similarity index 100% rename from examples/declarative/photoviewer/photoviewer.qmlproject rename to examples/qml/photoviewer/photoviewer.qmlproject diff --git a/examples/declarative/positioners/content/Button.qml b/examples/qml/positioners/content/Button.qml similarity index 100% rename from examples/declarative/positioners/content/Button.qml rename to examples/qml/positioners/content/Button.qml diff --git a/examples/declarative/positioners/content/add.png b/examples/qml/positioners/content/add.png similarity index 100% rename from examples/declarative/positioners/content/add.png rename to examples/qml/positioners/content/add.png diff --git a/examples/declarative/positioners/content/del.png b/examples/qml/positioners/content/del.png similarity index 100% rename from examples/declarative/positioners/content/del.png rename to examples/qml/positioners/content/del.png diff --git a/examples/declarative/positioners/positioners-attachedproperties.qml b/examples/qml/positioners/positioners-attachedproperties.qml similarity index 100% rename from examples/declarative/positioners/positioners-attachedproperties.qml rename to examples/qml/positioners/positioners-attachedproperties.qml diff --git a/examples/declarative/positioners/positioners.qml b/examples/qml/positioners/positioners.qml similarity index 100% rename from examples/declarative/positioners/positioners.qml rename to examples/qml/positioners/positioners.qml diff --git a/examples/declarative/declarative.pro b/examples/qml/qml.pro similarity index 90% rename from examples/declarative/declarative.pro rename to examples/qml/qml.pro index 883c0afe2d..23d33bd653 100644 --- a/examples/declarative/declarative.pro +++ b/examples/qml/qml.pro @@ -34,5 +34,5 @@ sources.files = \ xml -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml INSTALLS += sources diff --git a/examples/declarative/righttoleft/layoutdirection/layoutdirection.qml b/examples/qml/righttoleft/layoutdirection/layoutdirection.qml similarity index 100% rename from examples/declarative/righttoleft/layoutdirection/layoutdirection.qml rename to examples/qml/righttoleft/layoutdirection/layoutdirection.qml diff --git a/examples/declarative/righttoleft/layoutdirection/layoutdirection.qmlproject b/examples/qml/righttoleft/layoutdirection/layoutdirection.qmlproject similarity index 100% rename from examples/declarative/righttoleft/layoutdirection/layoutdirection.qmlproject rename to examples/qml/righttoleft/layoutdirection/layoutdirection.qmlproject diff --git a/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.qml b/examples/qml/righttoleft/layoutmirroring/layoutmirroring.qml similarity index 100% rename from examples/declarative/righttoleft/layoutmirroring/layoutmirroring.qml rename to examples/qml/righttoleft/layoutmirroring/layoutmirroring.qml diff --git a/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.qmlproject b/examples/qml/righttoleft/layoutmirroring/layoutmirroring.qmlproject similarity index 100% rename from examples/declarative/righttoleft/layoutmirroring/layoutmirroring.qmlproject rename to examples/qml/righttoleft/layoutmirroring/layoutmirroring.qmlproject diff --git a/examples/declarative/righttoleft/textalignment/textalignment.qml b/examples/qml/righttoleft/textalignment/textalignment.qml similarity index 100% rename from examples/declarative/righttoleft/textalignment/textalignment.qml rename to examples/qml/righttoleft/textalignment/textalignment.qml diff --git a/examples/declarative/righttoleft/textalignment/textalignment.qmlproject b/examples/qml/righttoleft/textalignment/textalignment.qmlproject similarity index 100% rename from examples/declarative/righttoleft/textalignment/textalignment.qmlproject rename to examples/qml/righttoleft/textalignment/textalignment.qmlproject diff --git a/examples/declarative/rssnews/content/BusyIndicator.qml b/examples/qml/rssnews/content/BusyIndicator.qml similarity index 96% rename from examples/declarative/rssnews/content/BusyIndicator.qml rename to examples/qml/rssnews/content/BusyIndicator.qml index b6264ead92..f1abd1119c 100644 --- a/examples/declarative/rssnews/content/BusyIndicator.qml +++ b/examples/qml/rssnews/content/BusyIndicator.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/rssnews/content/CategoryDelegate.qml b/examples/qml/rssnews/content/CategoryDelegate.qml similarity index 97% rename from examples/declarative/rssnews/content/CategoryDelegate.qml rename to examples/qml/rssnews/content/CategoryDelegate.qml index 1a56184489..fe64238adb 100644 --- a/examples/declarative/rssnews/content/CategoryDelegate.qml +++ b/examples/qml/rssnews/content/CategoryDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/rssnews/content/NewsDelegate.qml b/examples/qml/rssnews/content/NewsDelegate.qml similarity index 97% rename from examples/declarative/rssnews/content/NewsDelegate.qml rename to examples/qml/rssnews/content/NewsDelegate.qml index 84019a9179..59ab269d3b 100644 --- a/examples/declarative/rssnews/content/NewsDelegate.qml +++ b/examples/qml/rssnews/content/NewsDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/rssnews/content/RssFeeds.qml b/examples/qml/rssnews/content/RssFeeds.qml similarity index 97% rename from examples/declarative/rssnews/content/RssFeeds.qml rename to examples/qml/rssnews/content/RssFeeds.qml index 278f05752c..ed58ef3852 100644 --- a/examples/declarative/rssnews/content/RssFeeds.qml +++ b/examples/qml/rssnews/content/RssFeeds.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/rssnews/content/ScrollBar.qml b/examples/qml/rssnews/content/ScrollBar.qml similarity index 98% rename from examples/declarative/rssnews/content/ScrollBar.qml rename to examples/qml/rssnews/content/ScrollBar.qml index 4ca4132c6b..7b1a2ac3e5 100644 --- a/examples/declarative/rssnews/content/ScrollBar.qml +++ b/examples/qml/rssnews/content/ScrollBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/rssnews/content/images/busy.png b/examples/qml/rssnews/content/images/busy.png similarity index 100% rename from examples/declarative/rssnews/content/images/busy.png rename to examples/qml/rssnews/content/images/busy.png diff --git a/examples/declarative/rssnews/content/images/scrollbar.png b/examples/qml/rssnews/content/images/scrollbar.png similarity index 100% rename from examples/declarative/rssnews/content/images/scrollbar.png rename to examples/qml/rssnews/content/images/scrollbar.png diff --git a/examples/declarative/rssnews/rssnews.qml b/examples/qml/rssnews/rssnews.qml similarity index 98% rename from examples/declarative/rssnews/rssnews.qml rename to examples/qml/rssnews/rssnews.qml index 491cefda07..d26b94b6d3 100644 --- a/examples/declarative/rssnews/rssnews.qml +++ b/examples/qml/rssnews/rssnews.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/rssnews/rssnews.qmlproject b/examples/qml/rssnews/rssnews.qmlproject similarity index 100% rename from examples/declarative/rssnews/rssnews.qmlproject rename to examples/qml/rssnews/rssnews.qmlproject diff --git a/examples/declarative/samegame/content/BoomBlock.qml b/examples/qml/samegame/content/BoomBlock.qml similarity index 98% rename from examples/declarative/samegame/content/BoomBlock.qml rename to examples/qml/samegame/content/BoomBlock.qml index 47f86bd81b..a348368ae1 100644 --- a/examples/declarative/samegame/content/BoomBlock.qml +++ b/examples/qml/samegame/content/BoomBlock.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/samegame/content/Button.qml b/examples/qml/samegame/content/Button.qml similarity index 97% rename from examples/declarative/samegame/content/Button.qml rename to examples/qml/samegame/content/Button.qml index b305455c92..2d1a993226 100644 --- a/examples/declarative/samegame/content/Button.qml +++ b/examples/qml/samegame/content/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/samegame/content/Dialog.qml b/examples/qml/samegame/content/Dialog.qml similarity index 97% rename from examples/declarative/samegame/content/Dialog.qml rename to examples/qml/samegame/content/Dialog.qml index 80e5984bfe..c81580e6a5 100644 --- a/examples/declarative/samegame/content/Dialog.qml +++ b/examples/qml/samegame/content/Dialog.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/samegame/content/GameArea.qml b/examples/qml/samegame/content/GameArea.qml similarity index 97% rename from examples/declarative/samegame/content/GameArea.qml rename to examples/qml/samegame/content/GameArea.qml index a43d55117a..3422582b21 100644 --- a/examples/declarative/samegame/content/GameArea.qml +++ b/examples/qml/samegame/content/GameArea.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/samegame/content/NameInputDialog.qml b/examples/qml/samegame/content/NameInputDialog.qml similarity index 97% rename from examples/declarative/samegame/content/NameInputDialog.qml rename to examples/qml/samegame/content/NameInputDialog.qml index 602e69789a..7c3bfa274a 100644 --- a/examples/declarative/samegame/content/NameInputDialog.qml +++ b/examples/qml/samegame/content/NameInputDialog.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/samegame/content/pics/background.png b/examples/qml/samegame/content/pics/background.png similarity index 100% rename from examples/declarative/samegame/content/pics/background.png rename to examples/qml/samegame/content/pics/background.png diff --git a/examples/declarative/samegame/content/pics/blueStone.png b/examples/qml/samegame/content/pics/blueStone.png similarity index 100% rename from examples/declarative/samegame/content/pics/blueStone.png rename to examples/qml/samegame/content/pics/blueStone.png diff --git a/examples/declarative/samegame/content/pics/greenStone.png b/examples/qml/samegame/content/pics/greenStone.png similarity index 100% rename from examples/declarative/samegame/content/pics/greenStone.png rename to examples/qml/samegame/content/pics/greenStone.png diff --git a/examples/declarative/samegame/content/pics/particle.png b/examples/qml/samegame/content/pics/particle.png similarity index 100% rename from examples/declarative/samegame/content/pics/particle.png rename to examples/qml/samegame/content/pics/particle.png diff --git a/examples/declarative/samegame/content/pics/redStone.png b/examples/qml/samegame/content/pics/redStone.png similarity index 100% rename from examples/declarative/samegame/content/pics/redStone.png rename to examples/qml/samegame/content/pics/redStone.png diff --git a/examples/declarative/samegame/content/pics/yellowStone.png b/examples/qml/samegame/content/pics/yellowStone.png similarity index 100% rename from examples/declarative/samegame/content/pics/yellowStone.png rename to examples/qml/samegame/content/pics/yellowStone.png diff --git a/examples/declarative/samegame/content/samegame.js b/examples/qml/samegame/content/samegame.js similarity index 100% rename from examples/declarative/samegame/content/samegame.js rename to examples/qml/samegame/content/samegame.js diff --git a/examples/declarative/samegame/samegame.qml b/examples/qml/samegame/samegame.qml similarity index 97% rename from examples/declarative/samegame/samegame.qml rename to examples/qml/samegame/samegame.qml index 201f826a29..b98b6a0074 100644 --- a/examples/declarative/samegame/samegame.qml +++ b/examples/qml/samegame/samegame.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/samegame/samegame.qmlproject b/examples/qml/samegame/samegame.qmlproject similarity index 100% rename from examples/declarative/samegame/samegame.qmlproject rename to examples/qml/samegame/samegame.qmlproject diff --git a/examples/declarative/script/script.pro b/examples/qml/script/script.pro similarity index 100% rename from examples/declarative/script/script.pro rename to examples/qml/script/script.pro diff --git a/examples/declarative/script/shell/main.cpp b/examples/qml/script/shell/main.cpp similarity index 99% rename from examples/declarative/script/shell/main.cpp rename to examples/qml/script/shell/main.cpp index 9f0edf4a25..a4059122bf 100644 --- a/examples/declarative/script/shell/main.cpp +++ b/examples/qml/script/shell/main.cpp @@ -46,7 +46,7 @@ #include -#include +#include #include diff --git a/examples/declarative/script/shell/shell.pro b/examples/qml/script/shell/shell.pro similarity index 80% rename from examples/declarative/script/shell/shell.pro rename to examples/qml/script/shell/shell.pro index 00191ab3d0..5f6b23862b 100644 --- a/examples/declarative/script/shell/shell.pro +++ b/examples/qml/script/shell/shell.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml win32: CONFIG += console mac:CONFIG -= app_bundle diff --git a/examples/declarative/shadereffects/content/Slider.qml b/examples/qml/shadereffects/content/Slider.qml similarity index 100% rename from examples/declarative/shadereffects/content/Slider.qml rename to examples/qml/shadereffects/content/Slider.qml diff --git a/examples/declarative/shadereffects/content/face-smile.png b/examples/qml/shadereffects/content/face-smile.png similarity index 100% rename from examples/declarative/shadereffects/content/face-smile.png rename to examples/qml/shadereffects/content/face-smile.png diff --git a/examples/declarative/shadereffects/content/qt-logo.png b/examples/qml/shadereffects/content/qt-logo.png similarity index 100% rename from examples/declarative/shadereffects/content/qt-logo.png rename to examples/qml/shadereffects/content/qt-logo.png diff --git a/examples/declarative/shadereffects/shadereffects.qml b/examples/qml/shadereffects/shadereffects.qml similarity index 100% rename from examples/declarative/shadereffects/shadereffects.qml rename to examples/qml/shadereffects/shadereffects.qml diff --git a/examples/declarative/shared/Button.qml b/examples/qml/shared/Button.qml similarity index 100% rename from examples/declarative/shared/Button.qml rename to examples/qml/shared/Button.qml diff --git a/examples/declarative/shared/LauncherList.qml b/examples/qml/shared/LauncherList.qml similarity index 100% rename from examples/declarative/shared/LauncherList.qml rename to examples/qml/shared/LauncherList.qml diff --git a/examples/declarative/shared/README b/examples/qml/shared/README similarity index 100% rename from examples/declarative/shared/README rename to examples/qml/shared/README diff --git a/examples/declarative/shared/SimpleLauncherDelegate.qml b/examples/qml/shared/SimpleLauncherDelegate.qml similarity index 100% rename from examples/declarative/shared/SimpleLauncherDelegate.qml rename to examples/qml/shared/SimpleLauncherDelegate.qml diff --git a/examples/declarative/shared/back.png b/examples/qml/shared/back.png similarity index 100% rename from examples/declarative/shared/back.png rename to examples/qml/shared/back.png diff --git a/examples/declarative/snake/content/Button.qml b/examples/qml/snake/content/Button.qml similarity index 97% rename from examples/declarative/snake/content/Button.qml rename to examples/qml/snake/content/Button.qml index dfac45049a..4f294556b3 100644 --- a/examples/declarative/snake/content/Button.qml +++ b/examples/qml/snake/content/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/snake/content/Cookie.qml b/examples/qml/snake/content/Cookie.qml similarity index 97% rename from examples/declarative/snake/content/Cookie.qml rename to examples/qml/snake/content/Cookie.qml index cae53af525..35ffe400b8 100644 --- a/examples/declarative/snake/content/Cookie.qml +++ b/examples/qml/snake/content/Cookie.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/snake/content/HighScoreModel.qml b/examples/qml/snake/content/HighScoreModel.qml similarity index 98% rename from examples/declarative/snake/content/HighScoreModel.qml rename to examples/qml/snake/content/HighScoreModel.qml index af66b99ede..734a661f5b 100644 --- a/examples/declarative/snake/content/HighScoreModel.qml +++ b/examples/qml/snake/content/HighScoreModel.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/snake/content/Link.qml b/examples/qml/snake/content/Link.qml similarity index 98% rename from examples/declarative/snake/content/Link.qml rename to examples/qml/snake/content/Link.qml index 891adafe5e..aab005afd5 100644 --- a/examples/declarative/snake/content/Link.qml +++ b/examples/qml/snake/content/Link.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/snake/content/Skull.qml b/examples/qml/snake/content/Skull.qml similarity index 96% rename from examples/declarative/snake/content/Skull.qml rename to examples/qml/snake/content/Skull.qml index ce3d108e04..e3f77fdac6 100644 --- a/examples/declarative/snake/content/Skull.qml +++ b/examples/qml/snake/content/Skull.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/snake/content/pics/README b/examples/qml/snake/content/pics/README similarity index 100% rename from examples/declarative/snake/content/pics/README rename to examples/qml/snake/content/pics/README diff --git a/examples/declarative/snake/content/pics/background.png b/examples/qml/snake/content/pics/background.png similarity index 100% rename from examples/declarative/snake/content/pics/background.png rename to examples/qml/snake/content/pics/background.png diff --git a/examples/declarative/snake/content/pics/blueStar.png b/examples/qml/snake/content/pics/blueStar.png similarity index 100% rename from examples/declarative/snake/content/pics/blueStar.png rename to examples/qml/snake/content/pics/blueStar.png diff --git a/examples/declarative/snake/content/pics/blueStone.png b/examples/qml/snake/content/pics/blueStone.png similarity index 100% rename from examples/declarative/snake/content/pics/blueStone.png rename to examples/qml/snake/content/pics/blueStone.png diff --git a/examples/declarative/snake/content/pics/cookie.png b/examples/qml/snake/content/pics/cookie.png similarity index 100% rename from examples/declarative/snake/content/pics/cookie.png rename to examples/qml/snake/content/pics/cookie.png diff --git a/examples/declarative/snake/content/pics/eyes.svg b/examples/qml/snake/content/pics/eyes.svg similarity index 100% rename from examples/declarative/snake/content/pics/eyes.svg rename to examples/qml/snake/content/pics/eyes.svg diff --git a/examples/declarative/snake/content/pics/head.png b/examples/qml/snake/content/pics/head.png similarity index 100% rename from examples/declarative/snake/content/pics/head.png rename to examples/qml/snake/content/pics/head.png diff --git a/examples/declarative/snake/content/pics/pause.png b/examples/qml/snake/content/pics/pause.png similarity index 100% rename from examples/declarative/snake/content/pics/pause.png rename to examples/qml/snake/content/pics/pause.png diff --git a/examples/declarative/snake/content/pics/redStar.png b/examples/qml/snake/content/pics/redStar.png similarity index 100% rename from examples/declarative/snake/content/pics/redStar.png rename to examples/qml/snake/content/pics/redStar.png diff --git a/examples/declarative/snake/content/pics/redStone.png b/examples/qml/snake/content/pics/redStone.png similarity index 100% rename from examples/declarative/snake/content/pics/redStone.png rename to examples/qml/snake/content/pics/redStone.png diff --git a/examples/declarative/snake/content/pics/skull.png b/examples/qml/snake/content/pics/skull.png similarity index 100% rename from examples/declarative/snake/content/pics/skull.png rename to examples/qml/snake/content/pics/skull.png diff --git a/examples/declarative/snake/content/pics/snake.jpg b/examples/qml/snake/content/pics/snake.jpg similarity index 100% rename from examples/declarative/snake/content/pics/snake.jpg rename to examples/qml/snake/content/pics/snake.jpg diff --git a/examples/declarative/snake/content/pics/star.png b/examples/qml/snake/content/pics/star.png similarity index 100% rename from examples/declarative/snake/content/pics/star.png rename to examples/qml/snake/content/pics/star.png diff --git a/examples/declarative/snake/content/pics/stoneShadow.png b/examples/qml/snake/content/pics/stoneShadow.png similarity index 100% rename from examples/declarative/snake/content/pics/stoneShadow.png rename to examples/qml/snake/content/pics/stoneShadow.png diff --git a/examples/declarative/snake/content/pics/yellowStar.png b/examples/qml/snake/content/pics/yellowStar.png similarity index 100% rename from examples/declarative/snake/content/pics/yellowStar.png rename to examples/qml/snake/content/pics/yellowStar.png diff --git a/examples/declarative/snake/content/pics/yellowStone.png b/examples/qml/snake/content/pics/yellowStone.png similarity index 100% rename from examples/declarative/snake/content/pics/yellowStone.png rename to examples/qml/snake/content/pics/yellowStone.png diff --git a/examples/declarative/snake/content/snake.js b/examples/qml/snake/content/snake.js similarity index 100% rename from examples/declarative/snake/content/snake.js rename to examples/qml/snake/content/snake.js diff --git a/examples/declarative/snake/snake.qml b/examples/qml/snake/snake.qml similarity index 99% rename from examples/declarative/snake/snake.qml rename to examples/qml/snake/snake.qml index f25b626d02..d389077bde 100644 --- a/examples/declarative/snake/snake.qml +++ b/examples/qml/snake/snake.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/snake/snake.qmlproject b/examples/qml/snake/snake.qmlproject similarity index 100% rename from examples/declarative/snake/snake.qmlproject rename to examples/qml/snake/snake.qmlproject diff --git a/examples/declarative/sqllocalstorage/hello.qml b/examples/qml/sqllocalstorage/hello.qml similarity index 100% rename from examples/declarative/sqllocalstorage/hello.qml rename to examples/qml/sqllocalstorage/hello.qml diff --git a/examples/declarative/text/fonts/availableFonts.qml b/examples/qml/text/fonts/availableFonts.qml similarity index 100% rename from examples/declarative/text/fonts/availableFonts.qml rename to examples/qml/text/fonts/availableFonts.qml diff --git a/examples/declarative/text/fonts/banner.qml b/examples/qml/text/fonts/banner.qml similarity index 100% rename from examples/declarative/text/fonts/banner.qml rename to examples/qml/text/fonts/banner.qml diff --git a/examples/declarative/text/fonts/content/fonts/tarzeau_ocr_a.ttf b/examples/qml/text/fonts/content/fonts/tarzeau_ocr_a.ttf similarity index 100% rename from examples/declarative/text/fonts/content/fonts/tarzeau_ocr_a.ttf rename to examples/qml/text/fonts/content/fonts/tarzeau_ocr_a.ttf diff --git a/examples/declarative/text/fonts/fonts.qml b/examples/qml/text/fonts/fonts.qml similarity index 100% rename from examples/declarative/text/fonts/fonts.qml rename to examples/qml/text/fonts/fonts.qml diff --git a/examples/declarative/text/fonts/hello.qml b/examples/qml/text/fonts/hello.qml similarity index 100% rename from examples/declarative/text/fonts/hello.qml rename to examples/qml/text/fonts/hello.qml diff --git a/examples/declarative/text/imgtag/TextWithImage.qml b/examples/qml/text/imgtag/TextWithImage.qml similarity index 100% rename from examples/declarative/text/imgtag/TextWithImage.qml rename to examples/qml/text/imgtag/TextWithImage.qml diff --git a/examples/declarative/text/imgtag/images/face-sad.png b/examples/qml/text/imgtag/images/face-sad.png similarity index 100% rename from examples/declarative/text/imgtag/images/face-sad.png rename to examples/qml/text/imgtag/images/face-sad.png diff --git a/examples/declarative/text/imgtag/images/face-smile-big.png b/examples/qml/text/imgtag/images/face-smile-big.png similarity index 100% rename from examples/declarative/text/imgtag/images/face-smile-big.png rename to examples/qml/text/imgtag/images/face-smile-big.png diff --git a/examples/declarative/text/imgtag/images/face-smile.png b/examples/qml/text/imgtag/images/face-smile.png similarity index 100% rename from examples/declarative/text/imgtag/images/face-smile.png rename to examples/qml/text/imgtag/images/face-smile.png diff --git a/examples/declarative/text/imgtag/images/heart200.png b/examples/qml/text/imgtag/images/heart200.png similarity index 100% rename from examples/declarative/text/imgtag/images/heart200.png rename to examples/qml/text/imgtag/images/heart200.png diff --git a/examples/declarative/text/imgtag/images/qtlogo.png b/examples/qml/text/imgtag/images/qtlogo.png similarity index 100% rename from examples/declarative/text/imgtag/images/qtlogo.png rename to examples/qml/text/imgtag/images/qtlogo.png diff --git a/examples/declarative/text/imgtag/images/starfish_2.png b/examples/qml/text/imgtag/images/starfish_2.png similarity index 100% rename from examples/declarative/text/imgtag/images/starfish_2.png rename to examples/qml/text/imgtag/images/starfish_2.png diff --git a/examples/declarative/text/imgtag/imgtag.qml b/examples/qml/text/imgtag/imgtag.qml similarity index 100% rename from examples/declarative/text/imgtag/imgtag.qml rename to examples/qml/text/imgtag/imgtag.qml diff --git a/examples/declarative/text/styledtext-layout.qml b/examples/qml/text/styledtext-layout.qml similarity index 100% rename from examples/declarative/text/styledtext-layout.qml rename to examples/qml/text/styledtext-layout.qml diff --git a/examples/declarative/text/text.qml b/examples/qml/text/text.qml similarity index 100% rename from examples/declarative/text/text.qml rename to examples/qml/text/text.qml diff --git a/examples/declarative/text/text.qmlproject b/examples/qml/text/text.qmlproject similarity index 100% rename from examples/declarative/text/text.qmlproject rename to examples/qml/text/text.qmlproject diff --git a/examples/declarative/text/textselection/pics/endHandle.png b/examples/qml/text/textselection/pics/endHandle.png similarity index 100% rename from examples/declarative/text/textselection/pics/endHandle.png rename to examples/qml/text/textselection/pics/endHandle.png diff --git a/examples/declarative/text/textselection/pics/endHandle.sci b/examples/qml/text/textselection/pics/endHandle.sci similarity index 100% rename from examples/declarative/text/textselection/pics/endHandle.sci rename to examples/qml/text/textselection/pics/endHandle.sci diff --git a/examples/declarative/text/textselection/pics/startHandle.png b/examples/qml/text/textselection/pics/startHandle.png similarity index 100% rename from examples/declarative/text/textselection/pics/startHandle.png rename to examples/qml/text/textselection/pics/startHandle.png diff --git a/examples/declarative/text/textselection/pics/startHandle.sci b/examples/qml/text/textselection/pics/startHandle.sci similarity index 100% rename from examples/declarative/text/textselection/pics/startHandle.sci rename to examples/qml/text/textselection/pics/startHandle.sci diff --git a/examples/declarative/text/textselection/textselection.qml b/examples/qml/text/textselection/textselection.qml similarity index 100% rename from examples/declarative/text/textselection/textselection.qml rename to examples/qml/text/textselection/textselection.qml diff --git a/examples/declarative/threading/threadedlistmodel/dataloader.js b/examples/qml/threading/threadedlistmodel/dataloader.js similarity index 100% rename from examples/declarative/threading/threadedlistmodel/dataloader.js rename to examples/qml/threading/threadedlistmodel/dataloader.js diff --git a/examples/declarative/threading/threadedlistmodel/threadedlistmodel.qmlproject b/examples/qml/threading/threadedlistmodel/threadedlistmodel.qmlproject similarity index 100% rename from examples/declarative/threading/threadedlistmodel/threadedlistmodel.qmlproject rename to examples/qml/threading/threadedlistmodel/threadedlistmodel.qmlproject diff --git a/examples/declarative/threading/threadedlistmodel/timedisplay.qml b/examples/qml/threading/threadedlistmodel/timedisplay.qml similarity index 100% rename from examples/declarative/threading/threadedlistmodel/timedisplay.qml rename to examples/qml/threading/threadedlistmodel/timedisplay.qml diff --git a/examples/declarative/threading/workerscript/workerscript.js b/examples/qml/threading/workerscript/workerscript.js similarity index 100% rename from examples/declarative/threading/workerscript/workerscript.js rename to examples/qml/threading/workerscript/workerscript.js diff --git a/examples/declarative/threading/workerscript/workerscript.qml b/examples/qml/threading/workerscript/workerscript.qml similarity index 100% rename from examples/declarative/threading/workerscript/workerscript.qml rename to examples/qml/threading/workerscript/workerscript.qml diff --git a/examples/declarative/threading/workerscript/workerscript.qmlproject b/examples/qml/threading/workerscript/workerscript.qmlproject similarity index 100% rename from examples/declarative/threading/workerscript/workerscript.qmlproject rename to examples/qml/threading/workerscript/workerscript.qmlproject diff --git a/examples/declarative/touchinteraction/mousearea/mousearea-example.qml b/examples/qml/touchinteraction/mousearea/mousearea-example.qml similarity index 100% rename from examples/declarative/touchinteraction/mousearea/mousearea-example.qml rename to examples/qml/touchinteraction/mousearea/mousearea-example.qml diff --git a/examples/declarative/touchinteraction/multipointtouch/bearwhack.qml b/examples/qml/touchinteraction/multipointtouch/bearwhack.qml similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/bearwhack.qml rename to examples/qml/touchinteraction/multipointtouch/bearwhack.qml diff --git a/examples/declarative/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml b/examples/qml/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml rename to examples/qml/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml diff --git a/examples/declarative/touchinteraction/multipointtouch/content/Bear0.png b/examples/qml/touchinteraction/multipointtouch/content/Bear0.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/Bear0.png rename to examples/qml/touchinteraction/multipointtouch/content/Bear0.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/Bear1.png b/examples/qml/touchinteraction/multipointtouch/content/Bear1.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/Bear1.png rename to examples/qml/touchinteraction/multipointtouch/content/Bear1.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/Bear2.png b/examples/qml/touchinteraction/multipointtouch/content/Bear2.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/Bear2.png rename to examples/qml/touchinteraction/multipointtouch/content/Bear2.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/Bear3.png b/examples/qml/touchinteraction/multipointtouch/content/Bear3.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/Bear3.png rename to examples/qml/touchinteraction/multipointtouch/content/Bear3.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/BearB.png b/examples/qml/touchinteraction/multipointtouch/content/BearB.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/BearB.png rename to examples/qml/touchinteraction/multipointtouch/content/BearB.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml b/examples/qml/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml rename to examples/qml/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml diff --git a/examples/declarative/touchinteraction/multipointtouch/content/ParticleFlame.qml b/examples/qml/touchinteraction/multipointtouch/content/ParticleFlame.qml similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/ParticleFlame.qml rename to examples/qml/touchinteraction/multipointtouch/content/ParticleFlame.qml diff --git a/examples/declarative/touchinteraction/multipointtouch/content/blur-circle.png b/examples/qml/touchinteraction/multipointtouch/content/blur-circle.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/blur-circle.png rename to examples/qml/touchinteraction/multipointtouch/content/blur-circle.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/blur-circle3.png b/examples/qml/touchinteraction/multipointtouch/content/blur-circle3.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/blur-circle3.png rename to examples/qml/touchinteraction/multipointtouch/content/blur-circle3.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/heart-blur.png b/examples/qml/touchinteraction/multipointtouch/content/heart-blur.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/heart-blur.png rename to examples/qml/touchinteraction/multipointtouch/content/heart-blur.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/title.png b/examples/qml/touchinteraction/multipointtouch/content/title.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/title.png rename to examples/qml/touchinteraction/multipointtouch/content/title.png diff --git a/examples/declarative/touchinteraction/multipointtouch/multiflame.qml b/examples/qml/touchinteraction/multipointtouch/multiflame.qml similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/multiflame.qml rename to examples/qml/touchinteraction/multipointtouch/multiflame.qml diff --git a/examples/declarative/touchinteraction/pincharea/flickresize.qml b/examples/qml/touchinteraction/pincharea/flickresize.qml similarity index 100% rename from examples/declarative/touchinteraction/pincharea/flickresize.qml rename to examples/qml/touchinteraction/pincharea/flickresize.qml diff --git a/examples/declarative/touchinteraction/pincharea/qt-logo.jpg b/examples/qml/touchinteraction/pincharea/qt-logo.jpg similarity index 100% rename from examples/declarative/touchinteraction/pincharea/qt-logo.jpg rename to examples/qml/touchinteraction/pincharea/qt-logo.jpg diff --git a/examples/declarative/touchinteraction/touchinteraction.qml b/examples/qml/touchinteraction/touchinteraction.qml similarity index 100% rename from examples/declarative/touchinteraction/touchinteraction.qml rename to examples/qml/touchinteraction/touchinteraction.qml diff --git a/examples/declarative/touchinteraction/touchinteraction.qmlproject b/examples/qml/touchinteraction/touchinteraction.qmlproject similarity index 100% rename from examples/declarative/touchinteraction/touchinteraction.qmlproject rename to examples/qml/touchinteraction/touchinteraction.qmlproject diff --git a/examples/declarative/toys/clocks/clocks.qml b/examples/qml/toys/clocks/clocks.qml similarity index 100% rename from examples/declarative/toys/clocks/clocks.qml rename to examples/qml/toys/clocks/clocks.qml diff --git a/examples/declarative/toys/clocks/content/Clock.qml b/examples/qml/toys/clocks/content/Clock.qml similarity index 100% rename from examples/declarative/toys/clocks/content/Clock.qml rename to examples/qml/toys/clocks/content/Clock.qml diff --git a/examples/declarative/toys/clocks/content/QuitButton.qml b/examples/qml/toys/clocks/content/QuitButton.qml similarity index 100% rename from examples/declarative/toys/clocks/content/QuitButton.qml rename to examples/qml/toys/clocks/content/QuitButton.qml diff --git a/examples/declarative/toys/clocks/content/arrow.png b/examples/qml/toys/clocks/content/arrow.png similarity index 100% rename from examples/declarative/toys/clocks/content/arrow.png rename to examples/qml/toys/clocks/content/arrow.png diff --git a/examples/declarative/toys/clocks/content/background.png b/examples/qml/toys/clocks/content/background.png similarity index 100% rename from examples/declarative/toys/clocks/content/background.png rename to examples/qml/toys/clocks/content/background.png diff --git a/examples/declarative/toys/clocks/content/center.png b/examples/qml/toys/clocks/content/center.png similarity index 100% rename from examples/declarative/toys/clocks/content/center.png rename to examples/qml/toys/clocks/content/center.png diff --git a/examples/declarative/toys/clocks/content/clock-night.png b/examples/qml/toys/clocks/content/clock-night.png similarity index 100% rename from examples/declarative/toys/clocks/content/clock-night.png rename to examples/qml/toys/clocks/content/clock-night.png diff --git a/examples/declarative/toys/clocks/content/clock.png b/examples/qml/toys/clocks/content/clock.png similarity index 100% rename from examples/declarative/toys/clocks/content/clock.png rename to examples/qml/toys/clocks/content/clock.png diff --git a/examples/declarative/toys/clocks/content/hour.png b/examples/qml/toys/clocks/content/hour.png similarity index 100% rename from examples/declarative/toys/clocks/content/hour.png rename to examples/qml/toys/clocks/content/hour.png diff --git a/examples/declarative/toys/clocks/content/minute.png b/examples/qml/toys/clocks/content/minute.png similarity index 100% rename from examples/declarative/toys/clocks/content/minute.png rename to examples/qml/toys/clocks/content/minute.png diff --git a/examples/declarative/toys/clocks/content/quit.png b/examples/qml/toys/clocks/content/quit.png similarity index 100% rename from examples/declarative/toys/clocks/content/quit.png rename to examples/qml/toys/clocks/content/quit.png diff --git a/examples/declarative/toys/clocks/content/second.png b/examples/qml/toys/clocks/content/second.png similarity index 100% rename from examples/declarative/toys/clocks/content/second.png rename to examples/qml/toys/clocks/content/second.png diff --git a/examples/declarative/toys/corkboards/content/Day.qml b/examples/qml/toys/corkboards/content/Day.qml similarity index 100% rename from examples/declarative/toys/corkboards/content/Day.qml rename to examples/qml/toys/corkboards/content/Day.qml diff --git a/examples/declarative/toys/corkboards/content/cork.jpg b/examples/qml/toys/corkboards/content/cork.jpg similarity index 100% rename from examples/declarative/toys/corkboards/content/cork.jpg rename to examples/qml/toys/corkboards/content/cork.jpg diff --git a/examples/declarative/toys/corkboards/content/note-yellow.png b/examples/qml/toys/corkboards/content/note-yellow.png similarity index 100% rename from examples/declarative/toys/corkboards/content/note-yellow.png rename to examples/qml/toys/corkboards/content/note-yellow.png diff --git a/examples/declarative/toys/corkboards/content/tack.png b/examples/qml/toys/corkboards/content/tack.png similarity index 100% rename from examples/declarative/toys/corkboards/content/tack.png rename to examples/qml/toys/corkboards/content/tack.png diff --git a/examples/declarative/toys/corkboards/corkboards.qml b/examples/qml/toys/corkboards/corkboards.qml similarity index 100% rename from examples/declarative/toys/corkboards/corkboards.qml rename to examples/qml/toys/corkboards/corkboards.qml diff --git a/examples/declarative/toys/dynamicscene/content/Button.qml b/examples/qml/toys/dynamicscene/content/Button.qml similarity index 100% rename from examples/declarative/toys/dynamicscene/content/Button.qml rename to examples/qml/toys/dynamicscene/content/Button.qml diff --git a/examples/declarative/toys/dynamicscene/content/GenericSceneItem.qml b/examples/qml/toys/dynamicscene/content/GenericSceneItem.qml similarity index 100% rename from examples/declarative/toys/dynamicscene/content/GenericSceneItem.qml rename to examples/qml/toys/dynamicscene/content/GenericSceneItem.qml diff --git a/examples/declarative/toys/dynamicscene/content/PaletteItem.qml b/examples/qml/toys/dynamicscene/content/PaletteItem.qml similarity index 100% rename from examples/declarative/toys/dynamicscene/content/PaletteItem.qml rename to examples/qml/toys/dynamicscene/content/PaletteItem.qml diff --git a/examples/declarative/toys/dynamicscene/content/PerspectiveItem.qml b/examples/qml/toys/dynamicscene/content/PerspectiveItem.qml similarity index 100% rename from examples/declarative/toys/dynamicscene/content/PerspectiveItem.qml rename to examples/qml/toys/dynamicscene/content/PerspectiveItem.qml diff --git a/examples/declarative/toys/dynamicscene/content/Sun.qml b/examples/qml/toys/dynamicscene/content/Sun.qml similarity index 100% rename from examples/declarative/toys/dynamicscene/content/Sun.qml rename to examples/qml/toys/dynamicscene/content/Sun.qml diff --git a/examples/declarative/toys/dynamicscene/content/images/NOTE b/examples/qml/toys/dynamicscene/content/images/NOTE similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/NOTE rename to examples/qml/toys/dynamicscene/content/images/NOTE diff --git a/examples/declarative/toys/dynamicscene/content/images/face-smile.png b/examples/qml/toys/dynamicscene/content/images/face-smile.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/face-smile.png rename to examples/qml/toys/dynamicscene/content/images/face-smile.png diff --git a/examples/declarative/toys/dynamicscene/content/images/moon.png b/examples/qml/toys/dynamicscene/content/images/moon.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/moon.png rename to examples/qml/toys/dynamicscene/content/images/moon.png diff --git a/examples/declarative/toys/dynamicscene/content/images/rabbit_brown.png b/examples/qml/toys/dynamicscene/content/images/rabbit_brown.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/rabbit_brown.png rename to examples/qml/toys/dynamicscene/content/images/rabbit_brown.png diff --git a/examples/declarative/toys/dynamicscene/content/images/rabbit_bw.png b/examples/qml/toys/dynamicscene/content/images/rabbit_bw.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/rabbit_bw.png rename to examples/qml/toys/dynamicscene/content/images/rabbit_bw.png diff --git a/examples/declarative/toys/dynamicscene/content/images/star.png b/examples/qml/toys/dynamicscene/content/images/star.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/star.png rename to examples/qml/toys/dynamicscene/content/images/star.png diff --git a/examples/declarative/toys/dynamicscene/content/images/sun.png b/examples/qml/toys/dynamicscene/content/images/sun.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/sun.png rename to examples/qml/toys/dynamicscene/content/images/sun.png diff --git a/examples/declarative/toys/dynamicscene/content/images/tree_s.png b/examples/qml/toys/dynamicscene/content/images/tree_s.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/tree_s.png rename to examples/qml/toys/dynamicscene/content/images/tree_s.png diff --git a/examples/declarative/toys/dynamicscene/content/itemCreation.js b/examples/qml/toys/dynamicscene/content/itemCreation.js similarity index 100% rename from examples/declarative/toys/dynamicscene/content/itemCreation.js rename to examples/qml/toys/dynamicscene/content/itemCreation.js diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qml b/examples/qml/toys/dynamicscene/dynamicscene.qml similarity index 100% rename from examples/declarative/toys/dynamicscene/dynamicscene.qml rename to examples/qml/toys/dynamicscene/dynamicscene.qml diff --git a/examples/declarative/toys/tic-tac-toe/content/Button.qml b/examples/qml/toys/tic-tac-toe/content/Button.qml similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/Button.qml rename to examples/qml/toys/tic-tac-toe/content/Button.qml diff --git a/examples/declarative/toys/tic-tac-toe/content/TicTac.qml b/examples/qml/toys/tic-tac-toe/content/TicTac.qml similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/TicTac.qml rename to examples/qml/toys/tic-tac-toe/content/TicTac.qml diff --git a/examples/declarative/toys/tic-tac-toe/content/pics/board.png b/examples/qml/toys/tic-tac-toe/content/pics/board.png similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/pics/board.png rename to examples/qml/toys/tic-tac-toe/content/pics/board.png diff --git a/examples/declarative/toys/tic-tac-toe/content/pics/o.png b/examples/qml/toys/tic-tac-toe/content/pics/o.png similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/pics/o.png rename to examples/qml/toys/tic-tac-toe/content/pics/o.png diff --git a/examples/declarative/toys/tic-tac-toe/content/pics/x.png b/examples/qml/toys/tic-tac-toe/content/pics/x.png similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/pics/x.png rename to examples/qml/toys/tic-tac-toe/content/pics/x.png diff --git a/examples/declarative/toys/tic-tac-toe/content/tic-tac-toe.js b/examples/qml/toys/tic-tac-toe/content/tic-tac-toe.js similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/tic-tac-toe.js rename to examples/qml/toys/tic-tac-toe/content/tic-tac-toe.js diff --git a/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml b/examples/qml/toys/tic-tac-toe/tic-tac-toe.qml similarity index 100% rename from examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml rename to examples/qml/toys/tic-tac-toe/tic-tac-toe.qml diff --git a/examples/declarative/toys/tvtennis/tvtennis.qml b/examples/qml/toys/tvtennis/tvtennis.qml similarity index 100% rename from examples/declarative/toys/tvtennis/tvtennis.qml rename to examples/qml/toys/tvtennis/tvtennis.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview1/PetsModel.qml b/examples/qml/tutorials/dynamicview/dynamicview1/PetsModel.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview1/PetsModel.qml rename to examples/qml/tutorials/dynamicview/dynamicview1/PetsModel.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview1/dynamicview.qml b/examples/qml/tutorials/dynamicview/dynamicview1/dynamicview.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview1/dynamicview.qml rename to examples/qml/tutorials/dynamicview/dynamicview1/dynamicview.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview2/PetsModel.qml b/examples/qml/tutorials/dynamicview/dynamicview2/PetsModel.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview2/PetsModel.qml rename to examples/qml/tutorials/dynamicview/dynamicview2/PetsModel.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview2/dynamicview.qml b/examples/qml/tutorials/dynamicview/dynamicview2/dynamicview.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview2/dynamicview.qml rename to examples/qml/tutorials/dynamicview/dynamicview2/dynamicview.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview3/PetsModel.qml b/examples/qml/tutorials/dynamicview/dynamicview3/PetsModel.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview3/PetsModel.qml rename to examples/qml/tutorials/dynamicview/dynamicview3/PetsModel.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview3/dynamicview.qml b/examples/qml/tutorials/dynamicview/dynamicview3/dynamicview.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview3/dynamicview.qml rename to examples/qml/tutorials/dynamicview/dynamicview3/dynamicview.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview4/ListSelector.qml b/examples/qml/tutorials/dynamicview/dynamicview4/ListSelector.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview4/ListSelector.qml rename to examples/qml/tutorials/dynamicview/dynamicview4/ListSelector.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview4/PetsModel.qml b/examples/qml/tutorials/dynamicview/dynamicview4/PetsModel.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview4/PetsModel.qml rename to examples/qml/tutorials/dynamicview/dynamicview4/PetsModel.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview4/dynamicview.qml b/examples/qml/tutorials/dynamicview/dynamicview4/dynamicview.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview4/dynamicview.qml rename to examples/qml/tutorials/dynamicview/dynamicview4/dynamicview.qml diff --git a/examples/declarative/tutorials/extending/chapter1-basics/app.qml b/examples/qml/tutorials/extending/chapter1-basics/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter1-basics/app.qml rename to examples/qml/tutorials/extending/chapter1-basics/app.qml diff --git a/examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro b/examples/qml/tutorials/extending/chapter1-basics/chapter1-basics.pro similarity index 74% rename from examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro rename to examples/qml/tutorials/extending/chapter1-basics/chapter1-basics.pro index affc57ce1f..8ed66f8b66 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro +++ b/examples/qml/tutorials/extending/chapter1-basics/chapter1-basics.pro @@ -1,4 +1,4 @@ -QT += declarative quick +QT += qml quick HEADERS += piechart.h SOURCES += piechart.cpp \ diff --git a/examples/declarative/tutorials/extending/chapter1-basics/main.cpp b/examples/qml/tutorials/extending/chapter1-basics/main.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter1-basics/main.cpp rename to examples/qml/tutorials/extending/chapter1-basics/main.cpp diff --git a/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp b/examples/qml/tutorials/extending/chapter1-basics/piechart.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp rename to examples/qml/tutorials/extending/chapter1-basics/piechart.cpp diff --git a/examples/declarative/tutorials/extending/chapter1-basics/piechart.h b/examples/qml/tutorials/extending/chapter1-basics/piechart.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter1-basics/piechart.h rename to examples/qml/tutorials/extending/chapter1-basics/piechart.h diff --git a/examples/declarative/tutorials/extending/chapter2-methods/app.qml b/examples/qml/tutorials/extending/chapter2-methods/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter2-methods/app.qml rename to examples/qml/tutorials/extending/chapter2-methods/app.qml diff --git a/examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro b/examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.pro similarity index 74% rename from examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro rename to examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.pro index affc57ce1f..8ed66f8b66 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro +++ b/examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.pro @@ -1,4 +1,4 @@ -QT += declarative quick +QT += qml quick HEADERS += piechart.h SOURCES += piechart.cpp \ diff --git a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp b/examples/qml/tutorials/extending/chapter2-methods/main.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter2-methods/main.cpp rename to examples/qml/tutorials/extending/chapter2-methods/main.cpp diff --git a/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp b/examples/qml/tutorials/extending/chapter2-methods/piechart.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp rename to examples/qml/tutorials/extending/chapter2-methods/piechart.cpp diff --git a/examples/declarative/tutorials/extending/chapter2-methods/piechart.h b/examples/qml/tutorials/extending/chapter2-methods/piechart.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter2-methods/piechart.h rename to examples/qml/tutorials/extending/chapter2-methods/piechart.h diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml b/examples/qml/tutorials/extending/chapter3-bindings/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter3-bindings/app.qml rename to examples/qml/tutorials/extending/chapter3-bindings/app.qml diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro b/examples/qml/tutorials/extending/chapter3-bindings/chapter3-bindings.pro similarity index 74% rename from examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro rename to examples/qml/tutorials/extending/chapter3-bindings/chapter3-bindings.pro index affc57ce1f..8ed66f8b66 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro +++ b/examples/qml/tutorials/extending/chapter3-bindings/chapter3-bindings.pro @@ -1,4 +1,4 @@ -QT += declarative quick +QT += qml quick HEADERS += piechart.h SOURCES += piechart.cpp \ diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp b/examples/qml/tutorials/extending/chapter3-bindings/main.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter3-bindings/main.cpp rename to examples/qml/tutorials/extending/chapter3-bindings/main.cpp diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp b/examples/qml/tutorials/extending/chapter3-bindings/piechart.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp rename to examples/qml/tutorials/extending/chapter3-bindings/piechart.cpp diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h b/examples/qml/tutorials/extending/chapter3-bindings/piechart.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter3-bindings/piechart.h rename to examples/qml/tutorials/extending/chapter3-bindings/piechart.h diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml rename to examples/qml/tutorials/extending/chapter4-customPropertyTypes/app.qml diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro similarity index 83% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro rename to examples/qml/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro index 6724fa0375..23eb222ea3 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro +++ b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro @@ -1,4 +1,4 @@ -QT += declarative quick +QT += qml quick HEADERS += piechart.h \ pieslice.h diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/main.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp rename to examples/qml/tutorials/extending/chapter4-customPropertyTypes/main.cpp diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp rename to examples/qml/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/piechart.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h rename to examples/qml/tutorials/extending/chapter4-customPropertyTypes/piechart.h diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp rename to examples/qml/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/pieslice.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h rename to examples/qml/tutorials/extending/chapter4-customPropertyTypes/pieslice.h diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml b/examples/qml/tutorials/extending/chapter5-listproperties/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter5-listproperties/app.qml rename to examples/qml/tutorials/extending/chapter5-listproperties/app.qml diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro b/examples/qml/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro similarity index 83% rename from examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro rename to examples/qml/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro index 6724fa0375..23eb222ea3 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro +++ b/examples/qml/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro @@ -1,4 +1,4 @@ -QT += declarative quick +QT += qml quick HEADERS += piechart.h \ pieslice.h diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp b/examples/qml/tutorials/extending/chapter5-listproperties/main.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp rename to examples/qml/tutorials/extending/chapter5-listproperties/main.cpp diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp b/examples/qml/tutorials/extending/chapter5-listproperties/piechart.cpp similarity index 91% rename from examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp rename to examples/qml/tutorials/extending/chapter5-listproperties/piechart.cpp index bfcb607e60..9c2c6accf3 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp +++ b/examples/qml/tutorials/extending/chapter5-listproperties/piechart.cpp @@ -56,12 +56,12 @@ void PieChart::setName(const QString &name) } //![0] -QDeclarativeListProperty PieChart::slices() +QQmlListProperty PieChart::slices() { - return QDeclarativeListProperty(this, 0, &PieChart::append_slice); + return QQmlListProperty(this, 0, &PieChart::append_slice); } -void PieChart::append_slice(QDeclarativeListProperty *list, PieSlice *slice) +void PieChart::append_slice(QQmlListProperty *list, PieSlice *slice) { PieChart *chart = qobject_cast(list->object); if (chart) { diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h b/examples/qml/tutorials/extending/chapter5-listproperties/piechart.h similarity index 92% rename from examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h rename to examples/qml/tutorials/extending/chapter5-listproperties/piechart.h index 9beabda5f3..6c17bc1258 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h +++ b/examples/qml/tutorials/extending/chapter5-listproperties/piechart.h @@ -48,7 +48,7 @@ class PieSlice; class PieChart : public QQuickItem { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty slices READ slices) + Q_PROPERTY(QQmlListProperty slices READ slices) //![0] Q_PROPERTY(QString name READ name WRITE setName) @@ -61,10 +61,10 @@ class PieChart : public QQuickItem void setName(const QString &name); //![2] - QDeclarativeListProperty slices(); + QQmlListProperty slices(); private: - static void append_slice(QDeclarativeListProperty *list, PieSlice *slice); + static void append_slice(QQmlListProperty *list, PieSlice *slice); QString m_name; QList m_slices; diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp b/examples/qml/tutorials/extending/chapter5-listproperties/pieslice.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp rename to examples/qml/tutorials/extending/chapter5-listproperties/pieslice.cpp diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h b/examples/qml/tutorials/extending/chapter5-listproperties/pieslice.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h rename to examples/qml/tutorials/extending/chapter5-listproperties/pieslice.h diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/ChartsPlugin/qmldir b/examples/qml/tutorials/extending/chapter6-plugins/ChartsPlugin/qmldir similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/ChartsPlugin/qmldir rename to examples/qml/tutorials/extending/chapter6-plugins/ChartsPlugin/qmldir diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/app.qml b/examples/qml/tutorials/extending/chapter6-plugins/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/app.qml rename to examples/qml/tutorials/extending/chapter6-plugins/app.qml diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro b/examples/qml/tutorials/extending/chapter6-plugins/chapter6-plugins.pro similarity index 91% rename from examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro rename to examples/qml/tutorials/extending/chapter6-plugins/chapter6-plugins.pro index c243ec4572..75f88b2eaa 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro +++ b/examples/qml/tutorials/extending/chapter6-plugins/chapter6-plugins.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative quick +QT += qml quick DESTDIR = ChartsPlugin TARGET = chartsplugin diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp b/examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.cpp similarity index 98% rename from examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp rename to examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.cpp index 9c4027de8a..f95cf1003b 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp +++ b/examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.cpp @@ -41,7 +41,7 @@ //![0] #include "piechart.h" #include "pieslice.h" -#include +#include void ChartsPlugin::registerTypes(const char *uri) { diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h b/examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.h similarity index 95% rename from examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h rename to examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.h index bffcf000fd..2dc477f794 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h +++ b/examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.h @@ -41,9 +41,9 @@ #define CHARTSPLUGIN_H //![0] -#include +#include -class ChartsPlugin : public QDeclarativeExtensionPlugin +class ChartsPlugin : public QQmlExtensionPlugin { Q_OBJECT public: diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp b/examples/qml/tutorials/extending/chapter6-plugins/piechart.cpp similarity index 91% rename from examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp rename to examples/qml/tutorials/extending/chapter6-plugins/piechart.cpp index 2a8f40289e..b00f4139be 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp +++ b/examples/qml/tutorials/extending/chapter6-plugins/piechart.cpp @@ -55,12 +55,12 @@ void PieChart::setName(const QString &name) m_name = name; } -QDeclarativeListProperty PieChart::slices() +QQmlListProperty PieChart::slices() { - return QDeclarativeListProperty(this, 0, &PieChart::append_slice); + return QQmlListProperty(this, 0, &PieChart::append_slice); } -void PieChart::append_slice(QDeclarativeListProperty *list, PieSlice *slice) +void PieChart::append_slice(QQmlListProperty *list, PieSlice *slice) { PieChart *chart = qobject_cast(list->object); if (chart) { diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h b/examples/qml/tutorials/extending/chapter6-plugins/piechart.h similarity index 92% rename from examples/declarative/tutorials/extending/chapter6-plugins/piechart.h rename to examples/qml/tutorials/extending/chapter6-plugins/piechart.h index fe6b96afdc..2ee8108784 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h +++ b/examples/qml/tutorials/extending/chapter6-plugins/piechart.h @@ -47,7 +47,7 @@ class PieSlice; class PieChart : public QQuickItem { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty slices READ slices) + Q_PROPERTY(QQmlListProperty slices READ slices) Q_PROPERTY(QString name READ name WRITE setName) public: @@ -56,10 +56,10 @@ class PieChart : public QQuickItem QString name() const; void setName(const QString &name); - QDeclarativeListProperty slices(); + QQmlListProperty slices(); private: - static void append_slice(QDeclarativeListProperty *list, PieSlice *slice); + static void append_slice(QQmlListProperty *list, PieSlice *slice); QString m_name; QList m_slices; diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp b/examples/qml/tutorials/extending/chapter6-plugins/pieslice.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp rename to examples/qml/tutorials/extending/chapter6-plugins/pieslice.cpp diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h b/examples/qml/tutorials/extending/chapter6-plugins/pieslice.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h rename to examples/qml/tutorials/extending/chapter6-plugins/pieslice.h diff --git a/examples/declarative/tutorials/extending/extending.pro b/examples/qml/tutorials/extending/extending.pro similarity index 100% rename from examples/declarative/tutorials/extending/extending.pro rename to examples/qml/tutorials/extending/extending.pro diff --git a/examples/declarative/tutorials/helloworld/Cell.qml b/examples/qml/tutorials/helloworld/Cell.qml similarity index 100% rename from examples/declarative/tutorials/helloworld/Cell.qml rename to examples/qml/tutorials/helloworld/Cell.qml diff --git a/examples/declarative/tutorials/helloworld/tutorial1.qml b/examples/qml/tutorials/helloworld/tutorial1.qml similarity index 100% rename from examples/declarative/tutorials/helloworld/tutorial1.qml rename to examples/qml/tutorials/helloworld/tutorial1.qml diff --git a/examples/declarative/tutorials/helloworld/tutorial2.qml b/examples/qml/tutorials/helloworld/tutorial2.qml similarity index 100% rename from examples/declarative/tutorials/helloworld/tutorial2.qml rename to examples/qml/tutorials/helloworld/tutorial2.qml diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/qml/tutorials/helloworld/tutorial3.qml similarity index 100% rename from examples/declarative/tutorials/helloworld/tutorial3.qml rename to examples/qml/tutorials/helloworld/tutorial3.qml diff --git a/examples/declarative/tutorials/samegame/samegame1/Block.qml b/examples/qml/tutorials/samegame/samegame1/Block.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame1/Block.qml rename to examples/qml/tutorials/samegame/samegame1/Block.qml diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/qml/tutorials/samegame/samegame1/Button.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame1/Button.qml rename to examples/qml/tutorials/samegame/samegame1/Button.qml diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/qml/tutorials/samegame/samegame1/samegame.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame1/samegame.qml rename to examples/qml/tutorials/samegame/samegame1/samegame.qml diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame1.qmlproject b/examples/qml/tutorials/samegame/samegame1/samegame1.qmlproject similarity index 100% rename from examples/declarative/tutorials/samegame/samegame1/samegame1.qmlproject rename to examples/qml/tutorials/samegame/samegame1/samegame1.qmlproject diff --git a/examples/declarative/tutorials/samegame/samegame2/Block.qml b/examples/qml/tutorials/samegame/samegame2/Block.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame2/Block.qml rename to examples/qml/tutorials/samegame/samegame2/Block.qml diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/qml/tutorials/samegame/samegame2/Button.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame2/Button.qml rename to examples/qml/tutorials/samegame/samegame2/Button.qml diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.js b/examples/qml/tutorials/samegame/samegame2/samegame.js similarity index 100% rename from examples/declarative/tutorials/samegame/samegame2/samegame.js rename to examples/qml/tutorials/samegame/samegame2/samegame.js diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/qml/tutorials/samegame/samegame2/samegame.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame2/samegame.qml rename to examples/qml/tutorials/samegame/samegame2/samegame.qml diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame2.qmlproject b/examples/qml/tutorials/samegame/samegame2/samegame2.qmlproject similarity index 100% rename from examples/declarative/tutorials/samegame/samegame2/samegame2.qmlproject rename to examples/qml/tutorials/samegame/samegame2/samegame2.qmlproject diff --git a/examples/declarative/tutorials/samegame/samegame3/Block.qml b/examples/qml/tutorials/samegame/samegame3/Block.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/Block.qml rename to examples/qml/tutorials/samegame/samegame3/Block.qml diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/qml/tutorials/samegame/samegame3/Button.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/Button.qml rename to examples/qml/tutorials/samegame/samegame3/Button.qml diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/qml/tutorials/samegame/samegame3/Dialog.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/Dialog.qml rename to examples/qml/tutorials/samegame/samegame3/Dialog.qml diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.js b/examples/qml/tutorials/samegame/samegame3/samegame.js similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/samegame.js rename to examples/qml/tutorials/samegame/samegame3/samegame.js diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/qml/tutorials/samegame/samegame3/samegame.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/samegame.qml rename to examples/qml/tutorials/samegame/samegame3/samegame.qml diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame3.qmlproject b/examples/qml/tutorials/samegame/samegame3/samegame3.qmlproject similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/samegame3.qmlproject rename to examples/qml/tutorials/samegame/samegame3/samegame3.qmlproject diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/qml/tutorials/samegame/samegame4/content/BoomBlock.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml rename to examples/qml/tutorials/samegame/samegame4/content/BoomBlock.qml diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/qml/tutorials/samegame/samegame4/content/Button.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/content/Button.qml rename to examples/qml/tutorials/samegame/samegame4/content/Button.qml diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/qml/tutorials/samegame/samegame4/content/Dialog.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml rename to examples/qml/tutorials/samegame/samegame4/content/Dialog.qml diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/qml/tutorials/samegame/samegame4/content/samegame.js similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/content/samegame.js rename to examples/qml/tutorials/samegame/samegame4/content/samegame.js diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/README b/examples/qml/tutorials/samegame/samegame4/highscores/README similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/highscores/README rename to examples/qml/tutorials/samegame/samegame4/highscores/README diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/score_data.xml b/examples/qml/tutorials/samegame/samegame4/highscores/score_data.xml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/highscores/score_data.xml rename to examples/qml/tutorials/samegame/samegame4/highscores/score_data.xml diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/score_style.xsl b/examples/qml/tutorials/samegame/samegame4/highscores/score_style.xsl similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/highscores/score_style.xsl rename to examples/qml/tutorials/samegame/samegame4/highscores/score_style.xsl diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php b/examples/qml/tutorials/samegame/samegame4/highscores/scores.php similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/highscores/scores.php rename to examples/qml/tutorials/samegame/samegame4/highscores/scores.php diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/qml/tutorials/samegame/samegame4/samegame.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/samegame.qml rename to examples/qml/tutorials/samegame/samegame4/samegame.qml diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame4.qmlproject b/examples/qml/tutorials/samegame/samegame4/samegame4.qmlproject similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/samegame4.qmlproject rename to examples/qml/tutorials/samegame/samegame4/samegame4.qmlproject diff --git a/examples/declarative/tutorials/samegame/shared/pics/background.jpg b/examples/qml/tutorials/samegame/shared/pics/background.jpg similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/background.jpg rename to examples/qml/tutorials/samegame/shared/pics/background.jpg diff --git a/examples/declarative/tutorials/samegame/shared/pics/blueStar.png b/examples/qml/tutorials/samegame/shared/pics/blueStar.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/blueStar.png rename to examples/qml/tutorials/samegame/shared/pics/blueStar.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/blueStone.png b/examples/qml/tutorials/samegame/shared/pics/blueStone.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/blueStone.png rename to examples/qml/tutorials/samegame/shared/pics/blueStone.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/greenStar.png b/examples/qml/tutorials/samegame/shared/pics/greenStar.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/greenStar.png rename to examples/qml/tutorials/samegame/shared/pics/greenStar.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/greenStone.png b/examples/qml/tutorials/samegame/shared/pics/greenStone.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/greenStone.png rename to examples/qml/tutorials/samegame/shared/pics/greenStone.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/redStar.png b/examples/qml/tutorials/samegame/shared/pics/redStar.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/redStar.png rename to examples/qml/tutorials/samegame/shared/pics/redStar.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/redStone.png b/examples/qml/tutorials/samegame/shared/pics/redStone.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/redStone.png rename to examples/qml/tutorials/samegame/shared/pics/redStone.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/star.png b/examples/qml/tutorials/samegame/shared/pics/star.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/star.png rename to examples/qml/tutorials/samegame/shared/pics/star.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/yellowStone.png b/examples/qml/tutorials/samegame/shared/pics/yellowStone.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/yellowStone.png rename to examples/qml/tutorials/samegame/shared/pics/yellowStone.png diff --git a/examples/declarative/tutorials/tutorials.pro b/examples/qml/tutorials/tutorials.pro similarity index 100% rename from examples/declarative/tutorials/tutorials.pro rename to examples/qml/tutorials/tutorials.pro diff --git a/examples/declarative/tutorials/tutorials.qmlproject b/examples/qml/tutorials/tutorials.qmlproject similarity index 100% rename from examples/declarative/tutorials/tutorials.qmlproject rename to examples/qml/tutorials/tutorials.qmlproject diff --git a/examples/declarative/twitter/TwitterCore/Button.qml b/examples/qml/twitter/TwitterCore/Button.qml similarity index 97% rename from examples/declarative/twitter/TwitterCore/Button.qml rename to examples/qml/twitter/TwitterCore/Button.qml index 064fd4b277..353b993742 100644 --- a/examples/declarative/twitter/TwitterCore/Button.qml +++ b/examples/qml/twitter/TwitterCore/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/twitter/TwitterCore/FatDelegate.qml b/examples/qml/twitter/TwitterCore/FatDelegate.qml similarity index 98% rename from examples/declarative/twitter/TwitterCore/FatDelegate.qml rename to examples/qml/twitter/TwitterCore/FatDelegate.qml index 5fd0d1622b..4cb0dfc713 100644 --- a/examples/declarative/twitter/TwitterCore/FatDelegate.qml +++ b/examples/qml/twitter/TwitterCore/FatDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/twitter/TwitterCore/Input.qml b/examples/qml/twitter/TwitterCore/Input.qml similarity index 97% rename from examples/declarative/twitter/TwitterCore/Input.qml rename to examples/qml/twitter/TwitterCore/Input.qml index 2987b9e5d8..68b1c6186a 100644 --- a/examples/declarative/twitter/TwitterCore/Input.qml +++ b/examples/qml/twitter/TwitterCore/Input.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/twitter/TwitterCore/Loading.qml b/examples/qml/twitter/TwitterCore/Loading.qml similarity index 96% rename from examples/declarative/twitter/TwitterCore/Loading.qml rename to examples/qml/twitter/TwitterCore/Loading.qml index 8f7c868bee..566857b8b2 100644 --- a/examples/declarative/twitter/TwitterCore/Loading.qml +++ b/examples/qml/twitter/TwitterCore/Loading.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/twitter/TwitterCore/MultiTitleBar.qml b/examples/qml/twitter/TwitterCore/MultiTitleBar.qml similarity index 96% rename from examples/declarative/twitter/TwitterCore/MultiTitleBar.qml rename to examples/qml/twitter/TwitterCore/MultiTitleBar.qml index f52ce5be26..3920520b7a 100644 --- a/examples/declarative/twitter/TwitterCore/MultiTitleBar.qml +++ b/examples/qml/twitter/TwitterCore/MultiTitleBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/twitter/TwitterCore/RssModel.qml b/examples/qml/twitter/TwitterCore/RssModel.qml similarity index 97% rename from examples/declarative/twitter/TwitterCore/RssModel.qml rename to examples/qml/twitter/TwitterCore/RssModel.qml index c4050994e6..27f7495be2 100644 --- a/examples/declarative/twitter/TwitterCore/RssModel.qml +++ b/examples/qml/twitter/TwitterCore/RssModel.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/twitter/TwitterCore/SearchView.qml b/examples/qml/twitter/TwitterCore/SearchView.qml similarity index 98% rename from examples/declarative/twitter/TwitterCore/SearchView.qml rename to examples/qml/twitter/TwitterCore/SearchView.qml index 82a8559889..7732e6f68d 100644 --- a/examples/declarative/twitter/TwitterCore/SearchView.qml +++ b/examples/qml/twitter/TwitterCore/SearchView.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/twitter/TwitterCore/TitleBar.qml b/examples/qml/twitter/TwitterCore/TitleBar.qml similarity index 98% rename from examples/declarative/twitter/TwitterCore/TitleBar.qml rename to examples/qml/twitter/TwitterCore/TitleBar.qml index 3624048c4d..3e0818b0dd 100644 --- a/examples/declarative/twitter/TwitterCore/TitleBar.qml +++ b/examples/qml/twitter/TwitterCore/TitleBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/twitter/TwitterCore/ToolBar.qml b/examples/qml/twitter/TwitterCore/ToolBar.qml similarity index 97% rename from examples/declarative/twitter/TwitterCore/ToolBar.qml rename to examples/qml/twitter/TwitterCore/ToolBar.qml index 06d3324ee3..d4265f3e98 100644 --- a/examples/declarative/twitter/TwitterCore/ToolBar.qml +++ b/examples/qml/twitter/TwitterCore/ToolBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/twitter/TwitterCore/UserModel.qml b/examples/qml/twitter/TwitterCore/UserModel.qml similarity index 97% rename from examples/declarative/twitter/TwitterCore/UserModel.qml rename to examples/qml/twitter/TwitterCore/UserModel.qml index f88837c344..428089b539 100644 --- a/examples/declarative/twitter/TwitterCore/UserModel.qml +++ b/examples/qml/twitter/TwitterCore/UserModel.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/twitter/TwitterCore/images/gloss.png b/examples/qml/twitter/TwitterCore/images/gloss.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/gloss.png rename to examples/qml/twitter/TwitterCore/images/gloss.png diff --git a/examples/declarative/twitter/TwitterCore/images/lineedit.png b/examples/qml/twitter/TwitterCore/images/lineedit.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/lineedit.png rename to examples/qml/twitter/TwitterCore/images/lineedit.png diff --git a/examples/declarative/twitter/TwitterCore/images/lineedit.sci b/examples/qml/twitter/TwitterCore/images/lineedit.sci similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/lineedit.sci rename to examples/qml/twitter/TwitterCore/images/lineedit.sci diff --git a/examples/declarative/twitter/TwitterCore/images/loading.png b/examples/qml/twitter/TwitterCore/images/loading.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/loading.png rename to examples/qml/twitter/TwitterCore/images/loading.png diff --git a/examples/declarative/twitter/TwitterCore/images/quit.png b/examples/qml/twitter/TwitterCore/images/quit.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/quit.png rename to examples/qml/twitter/TwitterCore/images/quit.png diff --git a/examples/declarative/twitter/TwitterCore/images/stripes.png b/examples/qml/twitter/TwitterCore/images/stripes.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/stripes.png rename to examples/qml/twitter/TwitterCore/images/stripes.png diff --git a/examples/declarative/twitter/TwitterCore/images/titlebar.png b/examples/qml/twitter/TwitterCore/images/titlebar.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/titlebar.png rename to examples/qml/twitter/TwitterCore/images/titlebar.png diff --git a/examples/declarative/twitter/TwitterCore/images/titlebar.sci b/examples/qml/twitter/TwitterCore/images/titlebar.sci similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/titlebar.sci rename to examples/qml/twitter/TwitterCore/images/titlebar.sci diff --git a/examples/declarative/twitter/TwitterCore/images/toolbutton.png b/examples/qml/twitter/TwitterCore/images/toolbutton.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/toolbutton.png rename to examples/qml/twitter/TwitterCore/images/toolbutton.png diff --git a/examples/declarative/twitter/TwitterCore/images/toolbutton.sci b/examples/qml/twitter/TwitterCore/images/toolbutton.sci similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/toolbutton.sci rename to examples/qml/twitter/TwitterCore/images/toolbutton.sci diff --git a/examples/declarative/twitter/TwitterCore/qmldir b/examples/qml/twitter/TwitterCore/qmldir similarity index 100% rename from examples/declarative/twitter/TwitterCore/qmldir rename to examples/qml/twitter/TwitterCore/qmldir diff --git a/examples/declarative/twitter/twitter.qml b/examples/qml/twitter/twitter.qml similarity index 98% rename from examples/declarative/twitter/twitter.qml rename to examples/qml/twitter/twitter.qml index 26e4a7079b..aca0968cfb 100644 --- a/examples/declarative/twitter/twitter.qml +++ b/examples/qml/twitter/twitter.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/declarative/twitter/twitter.qmlproject b/examples/qml/twitter/twitter.qmlproject similarity index 100% rename from examples/declarative/twitter/twitter.qmlproject rename to examples/qml/twitter/twitter.qmlproject diff --git a/examples/declarative/ui-components/dialcontrol/content/Dial.qml b/examples/qml/ui-components/dialcontrol/content/Dial.qml similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/Dial.qml rename to examples/qml/ui-components/dialcontrol/content/Dial.qml diff --git a/examples/declarative/ui-components/dialcontrol/content/QuitButton.qml b/examples/qml/ui-components/dialcontrol/content/QuitButton.qml similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/QuitButton.qml rename to examples/qml/ui-components/dialcontrol/content/QuitButton.qml diff --git a/examples/declarative/ui-components/dialcontrol/content/background.png b/examples/qml/ui-components/dialcontrol/content/background.png similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/background.png rename to examples/qml/ui-components/dialcontrol/content/background.png diff --git a/examples/declarative/ui-components/dialcontrol/content/needle.png b/examples/qml/ui-components/dialcontrol/content/needle.png similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/needle.png rename to examples/qml/ui-components/dialcontrol/content/needle.png diff --git a/examples/declarative/ui-components/dialcontrol/content/needle_shadow.png b/examples/qml/ui-components/dialcontrol/content/needle_shadow.png similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/needle_shadow.png rename to examples/qml/ui-components/dialcontrol/content/needle_shadow.png diff --git a/examples/declarative/ui-components/dialcontrol/content/overlay.png b/examples/qml/ui-components/dialcontrol/content/overlay.png similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/overlay.png rename to examples/qml/ui-components/dialcontrol/content/overlay.png diff --git a/examples/declarative/ui-components/dialcontrol/content/quit.png b/examples/qml/ui-components/dialcontrol/content/quit.png similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/quit.png rename to examples/qml/ui-components/dialcontrol/content/quit.png diff --git a/examples/declarative/ui-components/dialcontrol/dialcontrol.qml b/examples/qml/ui-components/dialcontrol/dialcontrol.qml similarity index 100% rename from examples/declarative/ui-components/dialcontrol/dialcontrol.qml rename to examples/qml/ui-components/dialcontrol/dialcontrol.qml diff --git a/examples/declarative/ui-components/flipable/content/5_heart.png b/examples/qml/ui-components/flipable/content/5_heart.png similarity index 100% rename from examples/declarative/ui-components/flipable/content/5_heart.png rename to examples/qml/ui-components/flipable/content/5_heart.png diff --git a/examples/declarative/ui-components/flipable/content/9_club.png b/examples/qml/ui-components/flipable/content/9_club.png similarity index 100% rename from examples/declarative/ui-components/flipable/content/9_club.png rename to examples/qml/ui-components/flipable/content/9_club.png diff --git a/examples/declarative/ui-components/flipable/content/Card.qml b/examples/qml/ui-components/flipable/content/Card.qml similarity index 100% rename from examples/declarative/ui-components/flipable/content/Card.qml rename to examples/qml/ui-components/flipable/content/Card.qml diff --git a/examples/declarative/ui-components/flipable/content/back.png b/examples/qml/ui-components/flipable/content/back.png similarity index 100% rename from examples/declarative/ui-components/flipable/content/back.png rename to examples/qml/ui-components/flipable/content/back.png diff --git a/examples/declarative/ui-components/flipable/flipable.qml b/examples/qml/ui-components/flipable/flipable.qml similarity index 100% rename from examples/declarative/ui-components/flipable/flipable.qml rename to examples/qml/ui-components/flipable/flipable.qml diff --git a/examples/declarative/ui-components/progressbar/content/ProgressBar.qml b/examples/qml/ui-components/progressbar/content/ProgressBar.qml similarity index 100% rename from examples/declarative/ui-components/progressbar/content/ProgressBar.qml rename to examples/qml/ui-components/progressbar/content/ProgressBar.qml diff --git a/examples/declarative/ui-components/progressbar/content/background.png b/examples/qml/ui-components/progressbar/content/background.png similarity index 100% rename from examples/declarative/ui-components/progressbar/content/background.png rename to examples/qml/ui-components/progressbar/content/background.png diff --git a/examples/declarative/ui-components/progressbar/main.qml b/examples/qml/ui-components/progressbar/main.qml similarity index 100% rename from examples/declarative/ui-components/progressbar/main.qml rename to examples/qml/ui-components/progressbar/main.qml diff --git a/examples/declarative/ui-components/scrollbar/ScrollBar.qml b/examples/qml/ui-components/scrollbar/ScrollBar.qml similarity index 100% rename from examples/declarative/ui-components/scrollbar/ScrollBar.qml rename to examples/qml/ui-components/scrollbar/ScrollBar.qml diff --git a/examples/declarative/ui-components/scrollbar/main.qml b/examples/qml/ui-components/scrollbar/main.qml similarity index 100% rename from examples/declarative/ui-components/scrollbar/main.qml rename to examples/qml/ui-components/scrollbar/main.qml diff --git a/examples/declarative/ui-components/scrollbar/pics/niagara_falls.jpg b/examples/qml/ui-components/scrollbar/pics/niagara_falls.jpg similarity index 100% rename from examples/declarative/ui-components/scrollbar/pics/niagara_falls.jpg rename to examples/qml/ui-components/scrollbar/pics/niagara_falls.jpg diff --git a/examples/declarative/ui-components/scrollbar/scrollbar.qmlproject b/examples/qml/ui-components/scrollbar/scrollbar.qmlproject similarity index 100% rename from examples/declarative/ui-components/scrollbar/scrollbar.qmlproject rename to examples/qml/ui-components/scrollbar/scrollbar.qmlproject diff --git a/examples/declarative/ui-components/searchbox/SearchBox.qml b/examples/qml/ui-components/searchbox/SearchBox.qml similarity index 100% rename from examples/declarative/ui-components/searchbox/SearchBox.qml rename to examples/qml/ui-components/searchbox/SearchBox.qml diff --git a/examples/declarative/ui-components/searchbox/images/clear.png b/examples/qml/ui-components/searchbox/images/clear.png similarity index 100% rename from examples/declarative/ui-components/searchbox/images/clear.png rename to examples/qml/ui-components/searchbox/images/clear.png diff --git a/examples/declarative/ui-components/searchbox/images/lineedit-bg-focus.png b/examples/qml/ui-components/searchbox/images/lineedit-bg-focus.png similarity index 100% rename from examples/declarative/ui-components/searchbox/images/lineedit-bg-focus.png rename to examples/qml/ui-components/searchbox/images/lineedit-bg-focus.png diff --git a/examples/declarative/ui-components/searchbox/images/lineedit-bg.png b/examples/qml/ui-components/searchbox/images/lineedit-bg.png similarity index 100% rename from examples/declarative/ui-components/searchbox/images/lineedit-bg.png rename to examples/qml/ui-components/searchbox/images/lineedit-bg.png diff --git a/examples/declarative/ui-components/searchbox/main.qml b/examples/qml/ui-components/searchbox/main.qml similarity index 100% rename from examples/declarative/ui-components/searchbox/main.qml rename to examples/qml/ui-components/searchbox/main.qml diff --git a/examples/declarative/ui-components/searchbox/searchbox.qmlproject b/examples/qml/ui-components/searchbox/searchbox.qmlproject similarity index 100% rename from examples/declarative/ui-components/searchbox/searchbox.qmlproject rename to examples/qml/ui-components/searchbox/searchbox.qmlproject diff --git a/examples/declarative/ui-components/slideswitch/content/Switch.qml b/examples/qml/ui-components/slideswitch/content/Switch.qml similarity index 100% rename from examples/declarative/ui-components/slideswitch/content/Switch.qml rename to examples/qml/ui-components/slideswitch/content/Switch.qml diff --git a/examples/declarative/ui-components/slideswitch/content/background.png b/examples/qml/ui-components/slideswitch/content/background.png similarity index 100% rename from examples/declarative/ui-components/slideswitch/content/background.png rename to examples/qml/ui-components/slideswitch/content/background.png diff --git a/examples/declarative/ui-components/slideswitch/content/background.svg b/examples/qml/ui-components/slideswitch/content/background.svg similarity index 100% rename from examples/declarative/ui-components/slideswitch/content/background.svg rename to examples/qml/ui-components/slideswitch/content/background.svg diff --git a/examples/declarative/ui-components/slideswitch/content/knob.png b/examples/qml/ui-components/slideswitch/content/knob.png similarity index 100% rename from examples/declarative/ui-components/slideswitch/content/knob.png rename to examples/qml/ui-components/slideswitch/content/knob.png diff --git a/examples/declarative/ui-components/slideswitch/content/knob.svg b/examples/qml/ui-components/slideswitch/content/knob.svg similarity index 100% rename from examples/declarative/ui-components/slideswitch/content/knob.svg rename to examples/qml/ui-components/slideswitch/content/knob.svg diff --git a/examples/declarative/ui-components/slideswitch/slideswitch.qml b/examples/qml/ui-components/slideswitch/slideswitch.qml similarity index 100% rename from examples/declarative/ui-components/slideswitch/slideswitch.qml rename to examples/qml/ui-components/slideswitch/slideswitch.qml diff --git a/examples/declarative/ui-components/spinner/content/Spinner.qml b/examples/qml/ui-components/spinner/content/Spinner.qml similarity index 100% rename from examples/declarative/ui-components/spinner/content/Spinner.qml rename to examples/qml/ui-components/spinner/content/Spinner.qml diff --git a/examples/declarative/ui-components/spinner/content/spinner-bg.png b/examples/qml/ui-components/spinner/content/spinner-bg.png similarity index 100% rename from examples/declarative/ui-components/spinner/content/spinner-bg.png rename to examples/qml/ui-components/spinner/content/spinner-bg.png diff --git a/examples/declarative/ui-components/spinner/content/spinner-select.png b/examples/qml/ui-components/spinner/content/spinner-select.png similarity index 100% rename from examples/declarative/ui-components/spinner/content/spinner-select.png rename to examples/qml/ui-components/spinner/content/spinner-select.png diff --git a/examples/declarative/ui-components/spinner/main.qml b/examples/qml/ui-components/spinner/main.qml similarity index 100% rename from examples/declarative/ui-components/spinner/main.qml rename to examples/qml/ui-components/spinner/main.qml diff --git a/examples/declarative/ui-components/spinner/spinner.qmlproject b/examples/qml/ui-components/spinner/spinner.qmlproject similarity index 100% rename from examples/declarative/ui-components/spinner/spinner.qmlproject rename to examples/qml/ui-components/spinner/spinner.qmlproject diff --git a/examples/declarative/ui-components/tabwidget/TabWidget.qml b/examples/qml/ui-components/tabwidget/TabWidget.qml similarity index 100% rename from examples/declarative/ui-components/tabwidget/TabWidget.qml rename to examples/qml/ui-components/tabwidget/TabWidget.qml diff --git a/examples/declarative/ui-components/tabwidget/main.qml b/examples/qml/ui-components/tabwidget/main.qml similarity index 100% rename from examples/declarative/ui-components/tabwidget/main.qml rename to examples/qml/ui-components/tabwidget/main.qml diff --git a/examples/declarative/ui-components/tabwidget/tab.png b/examples/qml/ui-components/tabwidget/tab.png similarity index 100% rename from examples/declarative/ui-components/tabwidget/tab.png rename to examples/qml/ui-components/tabwidget/tab.png diff --git a/examples/declarative/ui-components/tabwidget/tabwidget.qmlproject b/examples/qml/ui-components/tabwidget/tabwidget.qmlproject similarity index 100% rename from examples/declarative/ui-components/tabwidget/tabwidget.qmlproject rename to examples/qml/ui-components/tabwidget/tabwidget.qmlproject diff --git a/examples/declarative/window/Window.qml b/examples/qml/window/Window.qml similarity index 100% rename from examples/declarative/window/Window.qml rename to examples/qml/window/Window.qml diff --git a/examples/declarative/window/screen/screenInfo.qml b/examples/qml/window/screen/screenInfo.qml similarity index 100% rename from examples/declarative/window/screen/screenInfo.qml rename to examples/qml/window/screen/screenInfo.qml diff --git a/examples/declarative/window/standalone.qml b/examples/qml/window/standalone.qml similarity index 100% rename from examples/declarative/window/standalone.qml rename to examples/qml/window/standalone.qml diff --git a/examples/declarative/window/window.cpp b/examples/qml/window/window.cpp similarity index 93% rename from examples/declarative/window/window.cpp rename to examples/qml/window/window.cpp index 4854256190..2112ab8f45 100644 --- a/examples/declarative/window/window.cpp +++ b/examples/qml/window/window.cpp @@ -39,16 +39,16 @@ ****************************************************************************/ #include -#include -#include +#include +#include #include #include int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.loadUrl(QUrl::fromLocalFile("Window.qml")); if ( component.isReady() ) component.create(); diff --git a/examples/declarative/window/window.pro b/examples/qml/window/window.pro similarity index 73% rename from examples/declarative/window/window.pro rename to examples/qml/window/window.pro index 74804bd776..c4518418f6 100644 --- a/examples/declarative/window/window.pro +++ b/examples/qml/window/window.pro @@ -1,5 +1,5 @@ TEMPLATE = app CONFIG += qt -QT += declarative +QT += qml SOURCES += window.cpp diff --git a/examples/declarative/xml/xmlhttprequest/data.xml b/examples/qml/xml/xmlhttprequest/data.xml similarity index 100% rename from examples/declarative/xml/xmlhttprequest/data.xml rename to examples/qml/xml/xmlhttprequest/data.xml diff --git a/examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml b/examples/qml/xml/xmlhttprequest/xmlhttprequest-example.qml similarity index 100% rename from examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml rename to examples/qml/xml/xmlhttprequest/xmlhttprequest-example.qml diff --git a/examples/tutorials/gettingStartedQml/core/Button.qml b/examples/tutorials/gettingStartedQml/core/Button.qml index 41be4134bd..9ea8c6dfff 100644 --- a/examples/tutorials/gettingStartedQml/core/Button.qml +++ b/examples/tutorials/gettingStartedQml/core/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/core/EditMenu.qml b/examples/tutorials/gettingStartedQml/core/EditMenu.qml index 7471669a37..dcac7bd29a 100644 --- a/examples/tutorials/gettingStartedQml/core/EditMenu.qml +++ b/examples/tutorials/gettingStartedQml/core/EditMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/core/FileDialog.qml b/examples/tutorials/gettingStartedQml/core/FileDialog.qml index 2d08e19bcf..0a4341b868 100644 --- a/examples/tutorials/gettingStartedQml/core/FileDialog.qml +++ b/examples/tutorials/gettingStartedQml/core/FileDialog.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/core/FileMenu.qml b/examples/tutorials/gettingStartedQml/core/FileMenu.qml index 67d747d8fb..a4be5eff15 100644 --- a/examples/tutorials/gettingStartedQml/core/FileMenu.qml +++ b/examples/tutorials/gettingStartedQml/core/FileMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/core/MenuBar.qml b/examples/tutorials/gettingStartedQml/core/MenuBar.qml index 68e25899e3..8d7be29fdd 100644 --- a/examples/tutorials/gettingStartedQml/core/MenuBar.qml +++ b/examples/tutorials/gettingStartedQml/core/MenuBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/core/TextArea.qml b/examples/tutorials/gettingStartedQml/core/TextArea.qml index 2ca145260c..99fb5ca60c 100644 --- a/examples/tutorials/gettingStartedQml/core/TextArea.qml +++ b/examples/tutorials/gettingStartedQml/core/TextArea.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp index 6bc3d4d006..c8538958ac 100644 --- a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp +++ b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -41,7 +41,7 @@ #include "dialogPlugin.h" #include "directory.h" #include "file.h" -#include +#include void DialogPlugin::registerTypes(const char *uri) { diff --git a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h index 03bdc1a6e4..1aed6abc8e 100644 --- a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h +++ b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -41,14 +41,14 @@ #ifndef DIALOGPLUGIN_H #define DIALOGPLUGIN_H -#include +#include -class DialogPlugin : public QDeclarativeExtensionPlugin +class DialogPlugin : public QQmlExtensionPlugin { Q_OBJECT public: - //registerTypes is inherited from QDeclarativeExtensionPlugin + //registerTypes is inherited from QQmlExtensionPlugin void registerTypes(const char *uri); }; diff --git a/examples/tutorials/gettingStartedQml/filedialog/directory.cpp b/examples/tutorials/gettingStartedQml/filedialog/directory.cpp index 3253327cb4..eadc11e52f 100644 --- a/examples/tutorials/gettingStartedQml/filedialog/directory.cpp +++ b/examples/tutorials/gettingStartedQml/filedialog/directory.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -72,7 +72,7 @@ int Directory::filesCount() const /* Function called to append data onto list property */ -void appendFiles(QDeclarativeListProperty * property, File * file) +void appendFiles(QQmlListProperty * property, File * file) { Q_UNUSED(property); Q_UNUSED(file); @@ -82,7 +82,7 @@ void appendFiles(QDeclarativeListProperty * property, File * file) /* Function called to retrieve file in the list using an index */ -File* fileAt(QDeclarativeListProperty * property, int index) +File* fileAt(QQmlListProperty * property, int index) { return static_cast< QList *>(property->data)->at(index); } @@ -90,7 +90,7 @@ File* fileAt(QDeclarativeListProperty * property, int index) /* Returns the number of files in the list */ -int filesSize(QDeclarativeListProperty * property) +int filesSize(QQmlListProperty * property) { return static_cast< QList *>(property->data)->size(); } @@ -98,18 +98,18 @@ int filesSize(QDeclarativeListProperty * property) /* Function called to empty the list property contents */ -void clearFilesPtr(QDeclarativeListProperty *property) +void clearFilesPtr(QQmlListProperty *property) { return static_cast< QList *>(property->data)->clear(); } /* -Returns the list of files as a QDeclarativeListProperty. +Returns the list of files as a QQmlListProperty. */ -QDeclarativeListProperty Directory::files() +QQmlListProperty Directory::files() { refresh(); - return QDeclarativeListProperty( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr ); + return QQmlListProperty( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr ); } /* diff --git a/examples/tutorials/gettingStartedQml/filedialog/directory.h b/examples/tutorials/gettingStartedQml/filedialog/directory.h index 04317707c3..30d6751bd2 100644 --- a/examples/tutorials/gettingStartedQml/filedialog/directory.h +++ b/examples/tutorials/gettingStartedQml/filedialog/directory.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include class Directory : public QObject { @@ -57,7 +57,7 @@ class Directory : public QObject { Q_PROPERTY(int filesCount READ filesCount) //list property containing file names as QString - Q_PROPERTY(QDeclarativeListProperty files READ files CONSTANT ) + Q_PROPERTY(QQmlListProperty files READ files CONSTANT ) //file name of the text file to read/write Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged) @@ -72,7 +72,7 @@ class Directory : public QObject { int filesCount() const; QString filename() const; QString fileContent() const; - QDeclarativeListProperty files(); + QQmlListProperty files(); //properties' write functions void setFilename(const QString &str); diff --git a/examples/tutorials/gettingStartedQml/filedialog/file.cpp b/examples/tutorials/gettingStartedQml/filedialog/file.cpp index 120486315b..e3b22027f5 100644 --- a/examples/tutorials/gettingStartedQml/filedialog/file.cpp +++ b/examples/tutorials/gettingStartedQml/filedialog/file.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/filedialog/file.h b/examples/tutorials/gettingStartedQml/filedialog/file.h index 6b8806ee32..d13638b414 100644 --- a/examples/tutorials/gettingStartedQml/filedialog/file.h +++ b/examples/tutorials/gettingStartedQml/filedialog/file.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/filedialog/filedialog.pro b/examples/tutorials/gettingStartedQml/filedialog/filedialog.pro index d85787d00c..85edb40257 100644 --- a/examples/tutorials/gettingStartedQml/filedialog/filedialog.pro +++ b/examples/tutorials/gettingStartedQml/filedialog/filedialog.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative +QT += qml DESTDIR += ../plugins OBJECTS_DIR = tmp diff --git a/examples/tutorials/gettingStartedQml/parts/part0/Button.qml b/examples/tutorials/gettingStartedQml/parts/part0/Button.qml index 3097a7615c..6cae3f3ab3 100644 --- a/examples/tutorials/gettingStartedQml/parts/part0/Button.qml +++ b/examples/tutorials/gettingStartedQml/parts/part0/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part1/Button.qml b/examples/tutorials/gettingStartedQml/parts/part1/Button.qml index 70f7508de3..118e6fc4d3 100644 --- a/examples/tutorials/gettingStartedQml/parts/part1/Button.qml +++ b/examples/tutorials/gettingStartedQml/parts/part1/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part1/EditMenu.qml b/examples/tutorials/gettingStartedQml/parts/part1/EditMenu.qml index 5d14fc4f69..231a20a3a2 100644 --- a/examples/tutorials/gettingStartedQml/parts/part1/EditMenu.qml +++ b/examples/tutorials/gettingStartedQml/parts/part1/EditMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part1/FileMenu.qml b/examples/tutorials/gettingStartedQml/parts/part1/FileMenu.qml index ddb6df438c..c36f6d4734 100644 --- a/examples/tutorials/gettingStartedQml/parts/part1/FileMenu.qml +++ b/examples/tutorials/gettingStartedQml/parts/part1/FileMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part1/SimpleButton.qml b/examples/tutorials/gettingStartedQml/parts/part1/SimpleButton.qml index e0f377cfe5..f43a56ea7a 100644 --- a/examples/tutorials/gettingStartedQml/parts/part1/SimpleButton.qml +++ b/examples/tutorials/gettingStartedQml/parts/part1/SimpleButton.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part2/Button.qml b/examples/tutorials/gettingStartedQml/parts/part2/Button.qml index 65660b0cc1..aa178f8bf9 100644 --- a/examples/tutorials/gettingStartedQml/parts/part2/Button.qml +++ b/examples/tutorials/gettingStartedQml/parts/part2/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part2/EditMenu.qml b/examples/tutorials/gettingStartedQml/parts/part2/EditMenu.qml index 2a4c0a2834..fb2db7ade3 100644 --- a/examples/tutorials/gettingStartedQml/parts/part2/EditMenu.qml +++ b/examples/tutorials/gettingStartedQml/parts/part2/EditMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part2/FileMenu.qml b/examples/tutorials/gettingStartedQml/parts/part2/FileMenu.qml index 3f60bc6c2a..b715298147 100644 --- a/examples/tutorials/gettingStartedQml/parts/part2/FileMenu.qml +++ b/examples/tutorials/gettingStartedQml/parts/part2/FileMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part2/MenuBar.qml b/examples/tutorials/gettingStartedQml/parts/part2/MenuBar.qml index 99151ff9b0..408b561022 100644 --- a/examples/tutorials/gettingStartedQml/parts/part2/MenuBar.qml +++ b/examples/tutorials/gettingStartedQml/parts/part2/MenuBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part3/Button.qml b/examples/tutorials/gettingStartedQml/parts/part3/Button.qml index 65660b0cc1..aa178f8bf9 100644 --- a/examples/tutorials/gettingStartedQml/parts/part3/Button.qml +++ b/examples/tutorials/gettingStartedQml/parts/part3/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part3/EditMenu.qml b/examples/tutorials/gettingStartedQml/parts/part3/EditMenu.qml index 2a4c0a2834..fb2db7ade3 100644 --- a/examples/tutorials/gettingStartedQml/parts/part3/EditMenu.qml +++ b/examples/tutorials/gettingStartedQml/parts/part3/EditMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part3/FileMenu.qml b/examples/tutorials/gettingStartedQml/parts/part3/FileMenu.qml index 3f60bc6c2a..b715298147 100644 --- a/examples/tutorials/gettingStartedQml/parts/part3/FileMenu.qml +++ b/examples/tutorials/gettingStartedQml/parts/part3/FileMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part3/MenuBar.qml b/examples/tutorials/gettingStartedQml/parts/part3/MenuBar.qml index 99151ff9b0..408b561022 100644 --- a/examples/tutorials/gettingStartedQml/parts/part3/MenuBar.qml +++ b/examples/tutorials/gettingStartedQml/parts/part3/MenuBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part3/TextArea.qml b/examples/tutorials/gettingStartedQml/parts/part3/TextArea.qml index faee31e97c..279ae045c3 100644 --- a/examples/tutorials/gettingStartedQml/parts/part3/TextArea.qml +++ b/examples/tutorials/gettingStartedQml/parts/part3/TextArea.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part3/TextEditor.qml b/examples/tutorials/gettingStartedQml/parts/part3/TextEditor.qml index c14437dcd0..54fa115aec 100644 --- a/examples/tutorials/gettingStartedQml/parts/part3/TextEditor.qml +++ b/examples/tutorials/gettingStartedQml/parts/part3/TextEditor.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part4/Button.qml b/examples/tutorials/gettingStartedQml/parts/part4/Button.qml index 5572989f5d..7fb4f1e536 100644 --- a/examples/tutorials/gettingStartedQml/parts/part4/Button.qml +++ b/examples/tutorials/gettingStartedQml/parts/part4/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part4/EditMenu.qml b/examples/tutorials/gettingStartedQml/parts/part4/EditMenu.qml index 07282733f7..cdfbd30a06 100644 --- a/examples/tutorials/gettingStartedQml/parts/part4/EditMenu.qml +++ b/examples/tutorials/gettingStartedQml/parts/part4/EditMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part4/FileMenu.qml b/examples/tutorials/gettingStartedQml/parts/part4/FileMenu.qml index 1aa98a9498..a1d95bf87a 100644 --- a/examples/tutorials/gettingStartedQml/parts/part4/FileMenu.qml +++ b/examples/tutorials/gettingStartedQml/parts/part4/FileMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part4/MenuBar.qml b/examples/tutorials/gettingStartedQml/parts/part4/MenuBar.qml index ba1697f6f8..024c60f87c 100644 --- a/examples/tutorials/gettingStartedQml/parts/part4/MenuBar.qml +++ b/examples/tutorials/gettingStartedQml/parts/part4/MenuBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part4/SimpleButton.qml b/examples/tutorials/gettingStartedQml/parts/part4/SimpleButton.qml index 11864d337e..0216131819 100644 --- a/examples/tutorials/gettingStartedQml/parts/part4/SimpleButton.qml +++ b/examples/tutorials/gettingStartedQml/parts/part4/SimpleButton.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part4/TextArea.qml b/examples/tutorials/gettingStartedQml/parts/part4/TextArea.qml index b3b1e07294..de664a15fd 100644 --- a/examples/tutorials/gettingStartedQml/parts/part4/TextArea.qml +++ b/examples/tutorials/gettingStartedQml/parts/part4/TextArea.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part4/TextEditor.qml b/examples/tutorials/gettingStartedQml/parts/part4/TextEditor.qml index 13735b35c9..43a6bc0eea 100644 --- a/examples/tutorials/gettingStartedQml/parts/part4/TextEditor.qml +++ b/examples/tutorials/gettingStartedQml/parts/part4/TextEditor.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part5/TextEditor.qml b/examples/tutorials/gettingStartedQml/parts/part5/TextEditor.qml index b517971c55..50501ddadc 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/TextEditor.qml +++ b/examples/tutorials/gettingStartedQml/parts/part5/TextEditor.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part5/core/Button.qml b/examples/tutorials/gettingStartedQml/parts/part5/core/Button.qml index 628af3a835..f6dd54ac9a 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/core/Button.qml +++ b/examples/tutorials/gettingStartedQml/parts/part5/core/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part5/core/EditMenu.qml b/examples/tutorials/gettingStartedQml/parts/part5/core/EditMenu.qml index a92e51eb94..fe4bbf4cb2 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/core/EditMenu.qml +++ b/examples/tutorials/gettingStartedQml/parts/part5/core/EditMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part5/core/FileDialog.qml b/examples/tutorials/gettingStartedQml/parts/part5/core/FileDialog.qml index eeea0d2304..af83ef5e63 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/core/FileDialog.qml +++ b/examples/tutorials/gettingStartedQml/parts/part5/core/FileDialog.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part5/core/FileMenu.qml b/examples/tutorials/gettingStartedQml/parts/part5/core/FileMenu.qml index 2a33a30d43..57555010b6 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/core/FileMenu.qml +++ b/examples/tutorials/gettingStartedQml/parts/part5/core/FileMenu.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part5/core/MenuBar.qml b/examples/tutorials/gettingStartedQml/parts/part5/core/MenuBar.qml index 81898ea86b..4a13f59dac 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/core/MenuBar.qml +++ b/examples/tutorials/gettingStartedQml/parts/part5/core/MenuBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part5/core/TextArea.qml b/examples/tutorials/gettingStartedQml/parts/part5/core/TextArea.qml index 0d77c30317..0882633c59 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/core/TextArea.qml +++ b/examples/tutorials/gettingStartedQml/parts/part5/core/TextArea.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.cpp b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.cpp index e4692b0a47..bd5c3f7428 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.cpp +++ b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -41,7 +41,7 @@ #include "dialogPlugin.h" #include "directory.h" #include "file.h" -#include +#include void DialogPlugin::registerTypes(const char *uri){ @@ -49,7 +49,7 @@ void DialogPlugin::registerTypes(const char *uri){ qmlRegisterType(uri, 1, 0, "Directory"); qmlRegisterType(uri,1,0,"File"); - //qRegisterMetaType > ("QDeclarativeListProperty"); + //qRegisterMetaType > ("QQmlListProperty"); } diff --git a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.h b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.h index b46d252616..8d5459a543 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.h +++ b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -41,14 +41,14 @@ #ifndef DIALOGPLUGIN_H #define DIALOGPLUGIN_H -#include +#include -class DialogPlugin : public QDeclarativeExtensionPlugin +class DialogPlugin : public QQmlExtensionPlugin { Q_OBJECT public: - //registerTypes is inherited from QDeclarativeExtensionPlugin + //registerTypes is inherited from QQmlExtensionPlugin void registerTypes(const char *uri); }; diff --git a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.cpp b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.cpp index b2984d3c2d..2247360017 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.cpp +++ b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -74,39 +74,39 @@ int Directory:: filesCount() const{ /* Function called to append data onto list property */ -void appendFiles(QDeclarativeListProperty * property, File * file){ +void appendFiles(QQmlListProperty * property, File * file){ //Do nothing. can't add to a directory using this method } /* Function called to retrieve file in the list using an index */ -File* fileAt(QDeclarativeListProperty * property, int index){ +File* fileAt(QQmlListProperty * property, int index){ return static_cast< QList *>(property->data)->at(index); } /* Returns the number of files in the list */ -int filesSize(QDeclarativeListProperty * property){ +int filesSize(QQmlListProperty * property){ return static_cast< QList *>(property->data)->size(); } /* Function called to empty the list property contents */ -void clearFilesPtr(QDeclarativeListProperty *property){ +void clearFilesPtr(QQmlListProperty *property){ return static_cast< QList *>(property->data)->clear(); } /* -Returns the list of files as a QDeclarativeListProperty. +Returns the list of files as a QQmlListProperty. */ -QDeclarativeListProperty Directory::files(){ +QQmlListProperty Directory::files(){ refresh(); -// return QDeclarativeListProperty(this,m_filePtrList); //not recommended in the docs - return QDeclarativeListProperty( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr ); +// return QQmlListProperty(this,m_filePtrList); //not recommended in the docs + return QQmlListProperty( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr ); } /* diff --git a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.h b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.h index 53872f257b..a47e9e112f 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.h +++ b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include class Directory : public QObject{ @@ -57,7 +57,7 @@ class Directory : public QObject{ Q_PROPERTY(int filesCount READ filesCount) //list property containing file names as QString - Q_PROPERTY(QDeclarativeListProperty files READ files CONSTANT ) + Q_PROPERTY(QQmlListProperty files READ files CONSTANT ) //file name of the text file to read/write Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged) @@ -72,7 +72,7 @@ class Directory : public QObject{ int filesCount() const; QString filename() const; QString fileContent() const; - QDeclarativeListProperty files(); + QQmlListProperty files(); //properties' write functions void setFilename(const QString &str); diff --git a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/file.cpp b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/file.cpp index c1b57297cf..2385ed3240 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/file.cpp +++ b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/file.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/file.h b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/file.h index d57595607c..251b45282d 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/file.h +++ b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/file.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/filedialog.pro b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/filedialog.pro index 6247747003..71abddc7e3 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/filedialog.pro +++ b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/filedialog.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative +QT += qml DESTDIR += ../plugins OBJECTS_DIR = tmp diff --git a/examples/tutorials/gettingStartedQml/texteditor.qml b/examples/tutorials/gettingStartedQml/texteditor.qml index 76d79b6b90..05358294f5 100644 --- a/examples/tutorials/gettingStartedQml/texteditor.qml +++ b/examples/tutorials/gettingStartedQml/texteditor.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/modules/qt_declarative.pri b/modules/qt_declarative.pri deleted file mode 100644 index 54727d462a..0000000000 --- a/modules/qt_declarative.pri +++ /dev/null @@ -1,17 +0,0 @@ -QT.declarative.VERSION = 5.0.0 -QT.declarative.MAJOR_VERSION = 5 -QT.declarative.MINOR_VERSION = 0 -QT.declarative.PATCH_VERSION = 0 - -QT.declarative.name = QtDeclarative -QT.declarative.bins = $$QT_MODULE_BIN_BASE -QT.declarative.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/QtDeclarative -QT.declarative.private_includes = $$QT_MODULE_INCLUDE_BASE/QtDeclarative/$$QT.declarative.VERSION -QT.declarative.sources = $$QT_MODULE_BASE/src/declarative -QT.declarative.libs = $$QT_MODULE_LIB_BASE -QT.declarative.plugins = $$QT_MODULE_PLUGIN_BASE -QT.declarative.imports = $$QT_MODULE_IMPORT_BASE -QT.declarative.depends = gui network xmlpatterns -QT.declarative.DEFINES = QT_DECLARATIVE_LIB - -QT_CONFIG += declarative diff --git a/modules/qt_qml.pri b/modules/qt_qml.pri new file mode 100644 index 0000000000..82e70e3e93 --- /dev/null +++ b/modules/qt_qml.pri @@ -0,0 +1,17 @@ +QT.qml.VERSION = 5.0.0 +QT.qml.MAJOR_VERSION = 5 +QT.qml.MINOR_VERSION = 0 +QT.qml.PATCH_VERSION = 0 + +QT.qml.name = QtQml +QT.qml.bins = $$QT_MODULE_BIN_BASE +QT.qml.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/QtQml +QT.qml.private_includes = $$QT_MODULE_INCLUDE_BASE/QtQml/$$QT.qml.VERSION +QT.qml.sources = $$QT_MODULE_BASE/src/qml +QT.qml.libs = $$QT_MODULE_LIB_BASE +QT.qml.plugins = $$QT_MODULE_PLUGIN_BASE +QT.qml.imports = $$QT_MODULE_IMPORT_BASE +QT.qml.depends = gui network xmlpatterns +QT.qml.DEFINES = QT_QML_LIB + +QT_CONFIG += qml diff --git a/modules/qt_qmltest.pri b/modules/qt_qmltest.pri index d00f621237..e3d747f700 100644 --- a/modules/qt_qmltest.pri +++ b/modules/qt_qmltest.pri @@ -11,7 +11,7 @@ QT.qmltest.sources = $$QT_MODULE_BASE/src/qmltest QT.qmltest.libs = $$QT_MODULE_LIB_BASE QT.qmltest.plugins = $$QT_MODULE_PLUGIN_BASE QT.qmltest.imports = $$QT_MODULE_IMPORT_BASE -QT.qmltest.depends = declarative testlib +QT.qmltest.depends = qml testlib QT.qmltest.DEFINES = QT_QMLTEST_LIB QT_CONFIG += qmltest diff --git a/modules/qt_quick.pri b/modules/qt_quick.pri index 0dc827b732..dc71b31194 100644 --- a/modules/qt_quick.pri +++ b/modules/qt_quick.pri @@ -11,7 +11,7 @@ QT.quick.sources = $$QT_MODULE_BASE/src/quick QT.quick.libs = $$QT_MODULE_LIB_BASE QT.quick.plugins = $$QT_MODULE_PLUGIN_BASE QT.quick.imports = $$QT_MODULE_IMPORT_BASE -QT.quick.depends = declarative +QT.quick.depends = qml QT.quick.DEFINES = QT_QUICK_LIB QT_CONFIG += quick diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri deleted file mode 100644 index 8e29e9fdf6..0000000000 --- a/src/declarative/debugger/debugger.pri +++ /dev/null @@ -1,32 +0,0 @@ -SOURCES += \ - $$PWD/qpacketprotocol.cpp \ - $$PWD/qdeclarativedebugservice.cpp \ - $$PWD/qdeclarativedebugclient.cpp \ - $$PWD/qdeclarativeenginedebug.cpp \ - $$PWD/qdeclarativeprofilerservice.cpp \ - $$PWD/qdeclarativedebughelper.cpp \ - $$PWD/qdeclarativedebugserver.cpp \ - $$PWD/qdeclarativeinspectorservice.cpp \ - $$PWD/qv8debugservice.cpp \ - $$PWD/qv8profilerservice.cpp \ - $$PWD/qdeclarativeenginedebugservice.cpp \ - $$PWD/qdebugmessageservice.cpp - -HEADERS += \ - $$PWD/qpacketprotocol_p.h \ - $$PWD/qdeclarativedebugservice_p.h \ - $$PWD/qdeclarativedebugservice_p_p.h \ - $$PWD/qdeclarativedebugclient_p.h \ - $$PWD/qdeclarativeenginedebug_p.h \ - $$PWD/qdeclarativeprofilerservice_p.h \ - $$PWD/qdeclarativedebughelper_p.h \ - $$PWD/qdeclarativedebugserver_p.h \ - $$PWD/qdeclarativedebugserverconnection_p.h \ - $$PWD/qdeclarativedebugstatesdelegate_p.h \ - $$PWD/qdeclarativeinspectorservice_p.h \ - $$PWD/qdeclarativeinspectorinterface_p.h \ - $$PWD/qv8debugservice_p.h \ - $$PWD/qv8profilerservice_p.h \ - $$PWD/qdeclarativeenginedebugservice_p.h \ - $$PWD/qdeclarativedebug.h \ - $$PWD/qdebugmessageservice_p.h diff --git a/src/declarative/debugger/qdeclarativeenginedebug.cpp b/src/declarative/debugger/qdeclarativeenginedebug.cpp deleted file mode 100644 index 462f99937e..0000000000 --- a/src/declarative/debugger/qdeclarativeenginedebug.cpp +++ /dev/null @@ -1,1072 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qdeclarativeenginedebug_p.h" - -#include "qdeclarativedebugclient_p.h" - -#include "qdeclarativeenginedebugservice_p.h" - -#include - -QT_BEGIN_NAMESPACE - -class QDeclarativeEngineDebugClient : public QDeclarativeDebugClient -{ -public: - QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, QDeclarativeEngineDebugPrivate *p); - -protected: - virtual void stateChanged(State state); - virtual void messageReceived(const QByteArray &); - -private: - QDeclarativeEngineDebugPrivate *priv; - friend class QDeclarativeEngineDebugPrivate; -}; - -class QDeclarativeEngineDebugPrivate : public QObjectPrivate -{ - Q_DECLARE_PUBLIC(QDeclarativeEngineDebug) -public: - QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *); - ~QDeclarativeEngineDebugPrivate(); - - void stateChanged(QDeclarativeEngineDebug::State status); - void message(const QByteArray &); - - QDeclarativeEngineDebugClient *client; - int nextId; - int getId(); - - void decode(QDataStream &, QDeclarativeDebugContextReference &); - void decode(QDataStream &, QDeclarativeDebugObjectReference &, bool simple); - - static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugEnginesQuery *); - static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugRootContextQuery *); - static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugObjectQuery *); - static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugExpressionQuery *); - static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugWatch *); - - QHash enginesQuery; - QHash rootContextQuery; - QHash objectQuery; - QHash expressionQuery; - - QHash watched; -}; - -QDeclarativeEngineDebugClient::QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, - QDeclarativeEngineDebugPrivate *p) - : QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p) -{ -} - -void QDeclarativeEngineDebugClient::stateChanged(State status) -{ - if (priv) - priv->stateChanged(static_cast(status)); -} - -void QDeclarativeEngineDebugClient::messageReceived(const QByteArray &data) -{ - if (priv) - priv->message(data); -} - -QDeclarativeEngineDebugPrivate::QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *c) - : client(new QDeclarativeEngineDebugClient(c, this)), nextId(0) -{ -} - -QDeclarativeEngineDebugPrivate::~QDeclarativeEngineDebugPrivate() -{ - if (client) - client->priv = 0; - delete client; - - QHash::iterator enginesIter = enginesQuery.begin(); - for (; enginesIter != enginesQuery.end(); ++enginesIter) { - enginesIter.value()->m_client = 0; - if (enginesIter.value()->state() == QDeclarativeDebugQuery::Waiting) - enginesIter.value()->setState(QDeclarativeDebugQuery::Error); - } - - QHash::iterator rootContextIter = rootContextQuery.begin(); - for (; rootContextIter != rootContextQuery.end(); ++rootContextIter) { - rootContextIter.value()->m_client = 0; - if (rootContextIter.value()->state() == QDeclarativeDebugQuery::Waiting) - rootContextIter.value()->setState(QDeclarativeDebugQuery::Error); - } - - QHash::iterator objectIter = objectQuery.begin(); - for (; objectIter != objectQuery.end(); ++objectIter) { - objectIter.value()->m_client = 0; - if (objectIter.value()->state() == QDeclarativeDebugQuery::Waiting) - objectIter.value()->setState(QDeclarativeDebugQuery::Error); - } - - QHash::iterator exprIter = expressionQuery.begin(); - for (; exprIter != expressionQuery.end(); ++exprIter) { - exprIter.value()->m_client = 0; - if (exprIter.value()->state() == QDeclarativeDebugQuery::Waiting) - exprIter.value()->setState(QDeclarativeDebugQuery::Error); - } - - QHash::iterator watchIter = watched.begin(); - for (; watchIter != watched.end(); ++watchIter) { - watchIter.value()->m_client = 0; - watchIter.value()->setState(QDeclarativeDebugWatch::Dead); - } -} - -int QDeclarativeEngineDebugPrivate::getId() -{ - return nextId++; -} - -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugEnginesQuery *q) -{ - if (c && q) { - QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); - p->enginesQuery.remove(q->m_queryId); - } -} - -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, - QDeclarativeDebugRootContextQuery *q) -{ - if (c && q) { - QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); - p->rootContextQuery.remove(q->m_queryId); - } -} - -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugObjectQuery *q) -{ - if (c && q) { - QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); - p->objectQuery.remove(q->m_queryId); - } -} - -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugExpressionQuery *q) -{ - if (c && q) { - QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); - p->expressionQuery.remove(q->m_queryId); - } -} - -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugWatch *w) -{ - if (c && w) { - QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); - p->watched.remove(w->m_queryId); - } -} - -void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugObjectReference &o, - bool simple) -{ - QDeclarativeEngineDebugService::QDeclarativeObjectData data; - ds >> data; - o.m_debugId = data.objectId; - o.m_class = data.objectType; - o.m_idString = data.idString; - o.m_name = data.objectName; - o.m_source.m_url = data.url; - o.m_source.m_lineNumber = data.lineNumber; - o.m_source.m_columnNumber = data.columnNumber; - o.m_contextDebugId = data.contextId; - - if (simple) - return; - - int childCount; - bool recur; - ds >> childCount >> recur; - - for (int ii = 0; ii < childCount; ++ii) { - o.m_children.append(QDeclarativeDebugObjectReference()); - decode(ds, o.m_children.last(), !recur); - } - - int propCount; - ds >> propCount; - - for (int ii = 0; ii < propCount; ++ii) { - QDeclarativeEngineDebugService::QDeclarativeObjectProperty data; - ds >> data; - QDeclarativeDebugPropertyReference prop; - prop.m_objectDebugId = o.m_debugId; - prop.m_name = data.name; - prop.m_binding = data.binding; - prop.m_hasNotifySignal = data.hasNotifySignal; - prop.m_valueTypeName = data.valueTypeName; - switch (data.type) { - case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Basic: - case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::List: - case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::SignalProperty: - { - prop.m_value = data.value; - break; - } - case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Object: - { - QDeclarativeDebugObjectReference obj; - obj.m_debugId = prop.m_value.toInt(); - prop.m_value = QVariant::fromValue(obj); - break; - } - case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Unknown: - break; - } - o.m_properties << prop; - } -} - -void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugContextReference &c) -{ - ds >> c.m_name >> c.m_debugId; - - int contextCount; - ds >> contextCount; - - for (int ii = 0; ii < contextCount; ++ii) { - c.m_contexts.append(QDeclarativeDebugContextReference()); - decode(ds, c.m_contexts.last()); - } - - int objectCount; - ds >> objectCount; - - for (int ii = 0; ii < objectCount; ++ii) { - QDeclarativeDebugObjectReference obj; - decode(ds, obj, true); - - obj.m_contextDebugId = c.m_debugId; - c.m_objects << obj; - } -} - -void QDeclarativeEngineDebugPrivate::stateChanged(QDeclarativeEngineDebug::State status) -{ - emit q_func()->stateChanged(status); -} - -void QDeclarativeEngineDebugPrivate::message(const QByteArray &data) -{ - QDataStream ds(data); - - QByteArray type; - ds >> type; - - //qDebug() << "QDeclarativeEngineDebugPrivate::message()" << type; - - if (type == "LIST_ENGINES_R") { - int queryId; - ds >> queryId; - - QDeclarativeDebugEnginesQuery *query = enginesQuery.value(queryId); - if (!query) - return; - enginesQuery.remove(queryId); - - int count; - ds >> count; - - for (int ii = 0; ii < count; ++ii) { - QDeclarativeDebugEngineReference ref; - ds >> ref.m_name; - ds >> ref.m_debugId; - query->m_engines << ref; - } - - query->m_client = 0; - query->setState(QDeclarativeDebugQuery::Completed); - } else if (type == "LIST_OBJECTS_R") { - int queryId; - ds >> queryId; - - QDeclarativeDebugRootContextQuery *query = rootContextQuery.value(queryId); - if (!query) - return; - rootContextQuery.remove(queryId); - - if (!ds.atEnd()) - decode(ds, query->m_context); - - query->m_client = 0; - query->setState(QDeclarativeDebugQuery::Completed); - } else if (type == "FETCH_OBJECT_R") { - int queryId; - ds >> queryId; - - QDeclarativeDebugObjectQuery *query = objectQuery.value(queryId); - if (!query) - return; - objectQuery.remove(queryId); - - if (!ds.atEnd()) - decode(ds, query->m_object, false); - - query->m_client = 0; - query->setState(QDeclarativeDebugQuery::Completed); - } else if (type == "EVAL_EXPRESSION_R") { - int queryId; - QVariant result; - ds >> queryId >> result; - - QDeclarativeDebugExpressionQuery *query = expressionQuery.value(queryId); - if (!query) - return; - expressionQuery.remove(queryId); - - query->m_result = result; - query->m_client = 0; - query->setState(QDeclarativeDebugQuery::Completed); - } else if (type == "WATCH_PROPERTY_R") { - int queryId; - bool ok; - ds >> queryId >> ok; - - QDeclarativeDebugWatch *watch = watched.value(queryId); - if (!watch) - return; - - watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive); - } else if (type == "WATCH_OBJECT_R") { - int queryId; - bool ok; - ds >> queryId >> ok; - - QDeclarativeDebugWatch *watch = watched.value(queryId); - if (!watch) - return; - - watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive); - } else if (type == "WATCH_EXPR_OBJECT_R") { - int queryId; - bool ok; - ds >> queryId >> ok; - - QDeclarativeDebugWatch *watch = watched.value(queryId); - if (!watch) - return; - - watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive); - } else if (type == "UPDATE_WATCH") { - int queryId; - int debugId; - QByteArray name; - QVariant value; - ds >> queryId >> debugId >> name >> value; - - QDeclarativeDebugWatch *watch = watched.value(queryId, 0); - if (!watch) - return; - emit watch->valueChanged(name, value); - } else if (type == "OBJECT_CREATED") { - emit q_func()->newObjects(); - } -} - -QDeclarativeEngineDebug::QDeclarativeEngineDebug(QDeclarativeDebugConnection *client, QObject *parent) - : QObject(*(new QDeclarativeEngineDebugPrivate(client)), parent) -{ -} - -QDeclarativeEngineDebug::~QDeclarativeEngineDebug() -{ -} - -QDeclarativeEngineDebug::State QDeclarativeEngineDebug::state() const -{ - Q_D(const QDeclarativeEngineDebug); - - return static_cast(d->client->state()); -} - -QDeclarativeDebugPropertyWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugPropertyReference &property, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugPropertyWatch *watch = new QDeclarativeDebugPropertyWatch(parent); - if (d->client->state() == QDeclarativeDebugClient::Enabled) { - int queryId = d->getId(); - watch->m_queryId = queryId; - watch->m_client = this; - watch->m_objectDebugId = property.objectDebugId(); - watch->m_name = property.name(); - d->watched.insert(queryId, watch); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("WATCH_PROPERTY") << queryId << property.objectDebugId() << property.name().toUtf8(); - d->client->sendMessage(message); - } else { - watch->m_state = QDeclarativeDebugWatch::Dead; - } - - return watch; -} - -QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugContextReference &, const QString &, QObject *) -{ - qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented"); - return 0; -} - -QDeclarativeDebugObjectExpressionWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugObjectReference &object, const QString &expr, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - QDeclarativeDebugObjectExpressionWatch *watch = new QDeclarativeDebugObjectExpressionWatch(parent); - if (d->client->state() == QDeclarativeDebugClient::Enabled) { - int queryId = d->getId(); - watch->m_queryId = queryId; - watch->m_client = this; - watch->m_objectDebugId = object.debugId(); - watch->m_expr = expr; - d->watched.insert(queryId, watch); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("WATCH_EXPR_OBJECT") << queryId << object.debugId() << expr; - d->client->sendMessage(message); - } else { - watch->m_state = QDeclarativeDebugWatch::Dead; - } - return watch; -} - -QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugObjectReference &object, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugWatch *watch = new QDeclarativeDebugWatch(parent); - if (d->client->state() == QDeclarativeDebugClient::Enabled) { - int queryId = d->getId(); - watch->m_queryId = queryId; - watch->m_client = this; - watch->m_objectDebugId = object.debugId(); - d->watched.insert(queryId, watch); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("WATCH_OBJECT") << queryId << object.debugId(); - d->client->sendMessage(message); - } else { - watch->m_state = QDeclarativeDebugWatch::Dead; - } - - return watch; -} - -QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugFileReference &, QObject *) -{ - qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented"); - return 0; -} - -void QDeclarativeEngineDebug::removeWatch(QDeclarativeDebugWatch *watch) -{ - Q_D(QDeclarativeEngineDebug); - - if (!watch || !watch->m_client) - return; - - watch->m_client = 0; - watch->setState(QDeclarativeDebugWatch::Inactive); - - d->watched.remove(watch->queryId()); - - if (d->client && d->client->state() == QDeclarativeDebugClient::Enabled) { - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("NO_WATCH") << watch->queryId(); - d->client->sendMessage(message); - } -} - -QDeclarativeDebugEnginesQuery *QDeclarativeEngineDebug::queryAvailableEngines(QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugEnginesQuery *query = new QDeclarativeDebugEnginesQuery(parent); - if (d->client->state() == QDeclarativeDebugClient::Enabled) { - query->m_client = this; - int queryId = d->getId(); - query->m_queryId = queryId; - d->enginesQuery.insert(queryId, query); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("LIST_ENGINES") << queryId; - d->client->sendMessage(message); - } else { - query->m_state = QDeclarativeDebugQuery::Error; - } - - return query; -} - -QDeclarativeDebugRootContextQuery *QDeclarativeEngineDebug::queryRootContexts(const QDeclarativeDebugEngineReference &engine, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugRootContextQuery *query = new QDeclarativeDebugRootContextQuery(parent); - if (d->client->state() == QDeclarativeDebugClient::Enabled && engine.debugId() != -1) { - query->m_client = this; - int queryId = d->getId(); - query->m_queryId = queryId; - d->rootContextQuery.insert(queryId, query); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("LIST_OBJECTS") << queryId << engine.debugId(); - d->client->sendMessage(message); - } else { - query->m_state = QDeclarativeDebugQuery::Error; - } - - return query; -} - -QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclarativeDebugObjectReference &object, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); - if (d->client->state() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { - query->m_client = this; - int queryId = d->getId(); - query->m_queryId = queryId; - d->objectQuery.insert(queryId, query); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() - << false << true; - d->client->sendMessage(message); - } else { - query->m_state = QDeclarativeDebugQuery::Error; - } - - return query; -} - -QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(const QDeclarativeDebugObjectReference &object, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); - if (d->client->state() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { - query->m_client = this; - int queryId = d->getId(); - query->m_queryId = queryId; - d->objectQuery.insert(queryId, query); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() - << true << true; - d->client->sendMessage(message); - } else { - query->m_state = QDeclarativeDebugQuery::Error; - } - - return query; -} - -QDeclarativeDebugExpressionQuery *QDeclarativeEngineDebug::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugExpressionQuery *query = new QDeclarativeDebugExpressionQuery(parent); - if (d->client->state() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { - query->m_client = this; - query->m_expr = expr; - int queryId = d->getId(); - query->m_queryId = queryId; - d->expressionQuery.insert(queryId, query); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("EVAL_EXPRESSION") << queryId << objectDebugId << expr; - d->client->sendMessage(message); - } else { - query->m_state = QDeclarativeDebugQuery::Error; - } - - return query; -} - -bool QDeclarativeEngineDebug::setBindingForObject(int objectDebugId, const QString &propertyName, - const QVariant &bindingExpression, - bool isLiteralValue, - QString source, int line) -{ - Q_D(QDeclarativeEngineDebug); - - if (d->client->state() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue << source << line; - d->client->sendMessage(message); - return true; - } else { - return false; - } -} - -bool QDeclarativeEngineDebug::resetBindingForObject(int objectDebugId, const QString &propertyName) -{ - Q_D(QDeclarativeEngineDebug); - - if (d->client->state() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName; - d->client->sendMessage(message); - return true; - } else { - return false; - } -} - -bool QDeclarativeEngineDebug::setMethodBody(int objectDebugId, const QString &methodName, - const QString &methodBody) -{ - Q_D(QDeclarativeEngineDebug); - - if (d->client->state() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("SET_METHOD_BODY") << objectDebugId << methodName << methodBody; - d->client->sendMessage(message); - return true; - } else { - return false; - } -} - -QDeclarativeDebugWatch::QDeclarativeDebugWatch(QObject *parent) - : QObject(parent), m_state(Waiting), m_queryId(-1), m_client(0), m_objectDebugId(-1) -{ -} - -QDeclarativeDebugWatch::~QDeclarativeDebugWatch() -{ - if (m_client && m_queryId != -1) - QDeclarativeEngineDebugPrivate::remove(m_client, this); -} - -int QDeclarativeDebugWatch::queryId() const -{ - return m_queryId; -} - -int QDeclarativeDebugWatch::objectDebugId() const -{ - return m_objectDebugId; -} - -QDeclarativeDebugWatch::State QDeclarativeDebugWatch::state() const -{ - return m_state; -} - -void QDeclarativeDebugWatch::setState(State s) -{ - if (m_state == s) - return; - m_state = s; - emit stateChanged(m_state); -} - -QDeclarativeDebugPropertyWatch::QDeclarativeDebugPropertyWatch(QObject *parent) - : QDeclarativeDebugWatch(parent) -{ -} - -QString QDeclarativeDebugPropertyWatch::name() const -{ - return m_name; -} - - -QDeclarativeDebugObjectExpressionWatch::QDeclarativeDebugObjectExpressionWatch(QObject *parent) - : QDeclarativeDebugWatch(parent) -{ -} - -QString QDeclarativeDebugObjectExpressionWatch::expression() const -{ - return m_expr; -} - - -QDeclarativeDebugQuery::QDeclarativeDebugQuery(QObject *parent) - : QObject(parent), m_state(Waiting) -{ -} - -QDeclarativeDebugQuery::State QDeclarativeDebugQuery::state() const -{ - return m_state; -} - -bool QDeclarativeDebugQuery::isWaiting() const -{ - return m_state == Waiting; -} - -void QDeclarativeDebugQuery::setState(State s) -{ - if (m_state == s) - return; - m_state = s; - emit stateChanged(m_state); -} - -QDeclarativeDebugEnginesQuery::QDeclarativeDebugEnginesQuery(QObject *parent) - : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) -{ -} - -QDeclarativeDebugEnginesQuery::~QDeclarativeDebugEnginesQuery() -{ - if (m_client && m_queryId != -1) - QDeclarativeEngineDebugPrivate::remove(m_client, this); -} - -QList QDeclarativeDebugEnginesQuery::engines() const -{ - return m_engines; -} - -QDeclarativeDebugRootContextQuery::QDeclarativeDebugRootContextQuery(QObject *parent) - : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) -{ -} - -QDeclarativeDebugRootContextQuery::~QDeclarativeDebugRootContextQuery() -{ - if (m_client && m_queryId != -1) - QDeclarativeEngineDebugPrivate::remove(m_client, this); -} - -QDeclarativeDebugContextReference QDeclarativeDebugRootContextQuery::rootContext() const -{ - return m_context; -} - -QDeclarativeDebugObjectQuery::QDeclarativeDebugObjectQuery(QObject *parent) - : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) -{ -} - -QDeclarativeDebugObjectQuery::~QDeclarativeDebugObjectQuery() -{ - if (m_client && m_queryId != -1) - QDeclarativeEngineDebugPrivate::remove(m_client, this); -} - -QDeclarativeDebugObjectReference QDeclarativeDebugObjectQuery::object() const -{ - return m_object; -} - -QDeclarativeDebugExpressionQuery::QDeclarativeDebugExpressionQuery(QObject *parent) - : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) -{ -} - -QDeclarativeDebugExpressionQuery::~QDeclarativeDebugExpressionQuery() -{ - if (m_client && m_queryId != -1) - QDeclarativeEngineDebugPrivate::remove(m_client, this); -} - -QVariant QDeclarativeDebugExpressionQuery::expression() const -{ - return m_expr; -} - -QVariant QDeclarativeDebugExpressionQuery::result() const -{ - return m_result; -} - -QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference() - : m_debugId(-1) -{ -} - -QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(int debugId) - : m_debugId(debugId) -{ -} - -QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(const QDeclarativeDebugEngineReference &o) - : m_debugId(o.m_debugId), m_name(o.m_name) -{ -} - -QDeclarativeDebugEngineReference & -QDeclarativeDebugEngineReference::operator=(const QDeclarativeDebugEngineReference &o) -{ - m_debugId = o.m_debugId; m_name = o.m_name; - return *this; -} - -int QDeclarativeDebugEngineReference::debugId() const -{ - return m_debugId; -} - -QString QDeclarativeDebugEngineReference::name() const -{ - return m_name; -} - -QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference() - : m_debugId(-1), m_contextDebugId(-1) -{ -} - -QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(int debugId) - : m_debugId(debugId), m_contextDebugId(-1) -{ -} - -QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(const QDeclarativeDebugObjectReference &o) - : m_debugId(o.m_debugId), m_class(o.m_class), m_idString(o.m_idString), - m_name(o.m_name), m_source(o.m_source), m_contextDebugId(o.m_contextDebugId), - m_properties(o.m_properties), m_children(o.m_children) -{ -} - -QDeclarativeDebugObjectReference & -QDeclarativeDebugObjectReference::operator=(const QDeclarativeDebugObjectReference &o) -{ - m_debugId = o.m_debugId; m_class = o.m_class; m_idString = o.m_idString; - m_name = o.m_name; m_source = o.m_source; m_contextDebugId = o.m_contextDebugId; - m_properties = o.m_properties; m_children = o.m_children; - return *this; -} - -int QDeclarativeDebugObjectReference::debugId() const -{ - return m_debugId; -} - -QString QDeclarativeDebugObjectReference::className() const -{ - return m_class; -} - -QString QDeclarativeDebugObjectReference::idString() const -{ - return m_idString; -} - -QString QDeclarativeDebugObjectReference::name() const -{ - return m_name; -} - -QDeclarativeDebugFileReference QDeclarativeDebugObjectReference::source() const -{ - return m_source; -} - -int QDeclarativeDebugObjectReference::contextDebugId() const -{ - return m_contextDebugId; -} - -QList QDeclarativeDebugObjectReference::properties() const -{ - return m_properties; -} - -QList QDeclarativeDebugObjectReference::children() const -{ - return m_children; -} - -QDeclarativeDebugContextReference::QDeclarativeDebugContextReference() - : m_debugId(-1) -{ -} - -QDeclarativeDebugContextReference::QDeclarativeDebugContextReference(const QDeclarativeDebugContextReference &o) - : m_debugId(o.m_debugId), m_name(o.m_name), m_objects(o.m_objects), m_contexts(o.m_contexts) -{ -} - -QDeclarativeDebugContextReference &QDeclarativeDebugContextReference::operator=(const QDeclarativeDebugContextReference &o) -{ - m_debugId = o.m_debugId; m_name = o.m_name; m_objects = o.m_objects; - m_contexts = o.m_contexts; - return *this; -} - -int QDeclarativeDebugContextReference::debugId() const -{ - return m_debugId; -} - -QString QDeclarativeDebugContextReference::name() const -{ - return m_name; -} - -QList QDeclarativeDebugContextReference::objects() const -{ - return m_objects; -} - -QList QDeclarativeDebugContextReference::contexts() const -{ - return m_contexts; -} - -QDeclarativeDebugFileReference::QDeclarativeDebugFileReference() - : m_lineNumber(-1), m_columnNumber(-1) -{ -} - -QDeclarativeDebugFileReference::QDeclarativeDebugFileReference(const QDeclarativeDebugFileReference &o) - : m_url(o.m_url), m_lineNumber(o.m_lineNumber), m_columnNumber(o.m_columnNumber) -{ -} - -QDeclarativeDebugFileReference &QDeclarativeDebugFileReference::operator=(const QDeclarativeDebugFileReference &o) -{ - m_url = o.m_url; m_lineNumber = o.m_lineNumber; m_columnNumber = o.m_columnNumber; - return *this; -} - -QUrl QDeclarativeDebugFileReference::url() const -{ - return m_url; -} - -void QDeclarativeDebugFileReference::setUrl(const QUrl &u) -{ - m_url = u; -} - -int QDeclarativeDebugFileReference::lineNumber() const -{ - return m_lineNumber; -} - -void QDeclarativeDebugFileReference::setLineNumber(int l) -{ - m_lineNumber = l; -} - -int QDeclarativeDebugFileReference::columnNumber() const -{ - return m_columnNumber; -} - -void QDeclarativeDebugFileReference::setColumnNumber(int c) -{ - m_columnNumber = c; -} - -QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference() - : m_objectDebugId(-1), m_hasNotifySignal(false) -{ -} - -QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference(const QDeclarativeDebugPropertyReference &o) - : m_objectDebugId(o.m_objectDebugId), m_name(o.m_name), m_value(o.m_value), - m_valueTypeName(o.m_valueTypeName), m_binding(o.m_binding), - m_hasNotifySignal(o.m_hasNotifySignal) -{ -} - -QDeclarativeDebugPropertyReference &QDeclarativeDebugPropertyReference::operator=(const QDeclarativeDebugPropertyReference &o) -{ - m_objectDebugId = o.m_objectDebugId; m_name = o.m_name; m_value = o.m_value; - m_valueTypeName = o.m_valueTypeName; m_binding = o.m_binding; - m_hasNotifySignal = o.m_hasNotifySignal; - return *this; -} - -int QDeclarativeDebugPropertyReference::objectDebugId() const -{ - return m_objectDebugId; -} - -QString QDeclarativeDebugPropertyReference::name() const -{ - return m_name; -} - -QString QDeclarativeDebugPropertyReference::valueTypeName() const -{ - return m_valueTypeName; -} - -QVariant QDeclarativeDebugPropertyReference::value() const -{ - return m_value; -} - -QString QDeclarativeDebugPropertyReference::binding() const -{ - return m_binding; -} - -bool QDeclarativeDebugPropertyReference::hasNotifySignal() const -{ - return m_hasNotifySignal; -} - -QT_END_NAMESPACE - diff --git a/src/declarative/debugger/qdeclarativeenginedebug_p.h b/src/declarative/debugger/qdeclarativeenginedebug_p.h deleted file mode 100644 index 5ca2987da3..0000000000 --- a/src/declarative/debugger/qdeclarativeenginedebug_p.h +++ /dev/null @@ -1,397 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVEENGINEDEBUG_H -#define QDECLARATIVEENGINEDEBUG_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. -// - -#include -#include -#include - -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - - -class QDeclarativeDebugConnection; -class QDeclarativeDebugWatch; -class QDeclarativeDebugPropertyWatch; -class QDeclarativeDebugObjectExpressionWatch; -class QDeclarativeDebugEnginesQuery; -class QDeclarativeDebugRootContextQuery; -class QDeclarativeDebugObjectQuery; -class QDeclarativeDebugExpressionQuery; -class QDeclarativeDebugPropertyReference; -class QDeclarativeDebugContextReference; -class QDeclarativeDebugObjectReference; -class QDeclarativeDebugFileReference; -class QDeclarativeDebugEngineReference; -class QDeclarativeEngineDebugPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEngineDebug : public QObject -{ - Q_OBJECT -public: - enum State { NotConnected, Unavailable, Enabled }; - - explicit QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0); - ~QDeclarativeEngineDebug(); - - State state() const; - - QDeclarativeDebugPropertyWatch *addWatch(const QDeclarativeDebugPropertyReference &, - QObject *parent = 0); - QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugContextReference &, const QString &, - QObject *parent = 0); - QDeclarativeDebugObjectExpressionWatch *addWatch(const QDeclarativeDebugObjectReference &, const QString &, - QObject *parent = 0); - QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugObjectReference &, - QObject *parent = 0); - QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugFileReference &, - QObject *parent = 0); - - void removeWatch(QDeclarativeDebugWatch *watch); - - QDeclarativeDebugEnginesQuery *queryAvailableEngines(QObject *parent = 0); - QDeclarativeDebugRootContextQuery *queryRootContexts(const QDeclarativeDebugEngineReference &, - QObject *parent = 0); - QDeclarativeDebugObjectQuery *queryObject(const QDeclarativeDebugObjectReference &, - QObject *parent = 0); - QDeclarativeDebugObjectQuery *queryObjectRecursive(const QDeclarativeDebugObjectReference &, - QObject *parent = 0); - QDeclarativeDebugExpressionQuery *queryExpressionResult(int objectDebugId, - const QString &expr, - QObject *parent = 0); - bool setBindingForObject(int objectDebugId, const QString &propertyName, - const QVariant &bindingExpression, bool isLiteralValue, - QString source = QString(), int line = -1); - bool resetBindingForObject(int objectDebugId, const QString &propertyName); - bool setMethodBody(int objectDebugId, const QString &methodName, const QString &methodBody); - -Q_SIGNALS: - void newObjects(); - void stateChanged(State state); - -private: - Q_DECLARE_PRIVATE(QDeclarativeEngineDebug) -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugWatch : public QObject -{ - Q_OBJECT -public: - enum State { Waiting, Active, Inactive, Dead }; - - QDeclarativeDebugWatch(QObject *); - ~QDeclarativeDebugWatch(); - - int queryId() const; - int objectDebugId() const; - State state() const; - -Q_SIGNALS: - void stateChanged(QDeclarativeDebugWatch::State); - //void objectChanged(int, const QDeclarativeDebugObjectReference &); - //void valueChanged(int, const QVariant &); - - // Server sends value as string if it is a user-type variant - void valueChanged(const QByteArray &name, const QVariant &value); - -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - void setState(State); - State m_state; - int m_queryId; - QDeclarativeEngineDebug *m_client; - int m_objectDebugId; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugPropertyWatch : public QDeclarativeDebugWatch -{ - Q_OBJECT -public: - QDeclarativeDebugPropertyWatch(QObject *parent); - - QString name() const; - -private: - friend class QDeclarativeEngineDebug; - QString m_name; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectExpressionWatch : public QDeclarativeDebugWatch -{ - Q_OBJECT -public: - QDeclarativeDebugObjectExpressionWatch(QObject *parent); - - QString expression() const; - -private: - friend class QDeclarativeEngineDebug; - QString m_expr; - int m_debugId; -}; - - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugQuery : public QObject -{ - Q_OBJECT -public: - enum State { Waiting, Error, Completed }; - - State state() const; - bool isWaiting() const; - -Q_SIGNALS: - void stateChanged(QDeclarativeDebugQuery::State); - -protected: - QDeclarativeDebugQuery(QObject *); - -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - void setState(State); - State m_state; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugFileReference -{ -public: - QDeclarativeDebugFileReference(); - QDeclarativeDebugFileReference(const QDeclarativeDebugFileReference &); - QDeclarativeDebugFileReference &operator=(const QDeclarativeDebugFileReference &); - - QUrl url() const; - void setUrl(const QUrl &); - int lineNumber() const; - void setLineNumber(int); - int columnNumber() const; - void setColumnNumber(int); - -private: - friend class QDeclarativeEngineDebugPrivate; - QUrl m_url; - int m_lineNumber; - int m_columnNumber; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugEngineReference -{ -public: - QDeclarativeDebugEngineReference(); - QDeclarativeDebugEngineReference(int); - QDeclarativeDebugEngineReference(const QDeclarativeDebugEngineReference &); - QDeclarativeDebugEngineReference &operator=(const QDeclarativeDebugEngineReference &); - - int debugId() const; - QString name() const; - -private: - friend class QDeclarativeEngineDebugPrivate; - int m_debugId; - QString m_name; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectReference -{ -public: - QDeclarativeDebugObjectReference(); - QDeclarativeDebugObjectReference(int); - QDeclarativeDebugObjectReference(const QDeclarativeDebugObjectReference &); - QDeclarativeDebugObjectReference &operator=(const QDeclarativeDebugObjectReference &); - - int debugId() const; - QString className() const; - QString idString() const; - QString name() const; - - QDeclarativeDebugFileReference source() const; - int contextDebugId() const; - - QList properties() const; - QList children() const; - -private: - friend class QDeclarativeEngineDebugPrivate; - int m_debugId; - QString m_class; - QString m_idString; - QString m_name; - QDeclarativeDebugFileReference m_source; - int m_contextDebugId; - QList m_properties; - QList m_children; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugContextReference -{ -public: - QDeclarativeDebugContextReference(); - QDeclarativeDebugContextReference(const QDeclarativeDebugContextReference &); - QDeclarativeDebugContextReference &operator=(const QDeclarativeDebugContextReference &); - - int debugId() const; - QString name() const; - - QList objects() const; - QList contexts() const; - -private: - friend class QDeclarativeEngineDebugPrivate; - int m_debugId; - QString m_name; - QList m_objects; - QList m_contexts; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugPropertyReference -{ -public: - QDeclarativeDebugPropertyReference(); - QDeclarativeDebugPropertyReference(const QDeclarativeDebugPropertyReference &); - QDeclarativeDebugPropertyReference &operator=(const QDeclarativeDebugPropertyReference &); - - int objectDebugId() const; - QString name() const; - QVariant value() const; - QString valueTypeName() const; - QString binding() const; - bool hasNotifySignal() const; - -private: - friend class QDeclarativeEngineDebugPrivate; - int m_objectDebugId; - QString m_name; - QVariant m_value; - QString m_valueTypeName; - QString m_binding; - bool m_hasNotifySignal; -}; - - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugEnginesQuery : public QDeclarativeDebugQuery -{ - Q_OBJECT -public: - virtual ~QDeclarativeDebugEnginesQuery(); - QList engines() const; -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - QDeclarativeDebugEnginesQuery(QObject *); - QDeclarativeEngineDebug *m_client; - int m_queryId; - QList m_engines; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugRootContextQuery : public QDeclarativeDebugQuery -{ - Q_OBJECT -public: - virtual ~QDeclarativeDebugRootContextQuery(); - QDeclarativeDebugContextReference rootContext() const; -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - QDeclarativeDebugRootContextQuery(QObject *); - QDeclarativeEngineDebug *m_client; - int m_queryId; - QDeclarativeDebugContextReference m_context; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectQuery : public QDeclarativeDebugQuery -{ - Q_OBJECT -public: - virtual ~QDeclarativeDebugObjectQuery(); - QDeclarativeDebugObjectReference object() const; -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - QDeclarativeDebugObjectQuery(QObject *); - QDeclarativeEngineDebug *m_client; - int m_queryId; - QDeclarativeDebugObjectReference m_object; - -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugExpressionQuery : public QDeclarativeDebugQuery -{ - Q_OBJECT -public: - virtual ~QDeclarativeDebugExpressionQuery(); - QVariant expression() const; - QVariant result() const; -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - QDeclarativeDebugExpressionQuery(QObject *); - QDeclarativeEngineDebug *m_client; - int m_queryId; - QVariant m_expr; - QVariant m_result; -}; - -QT_END_NAMESPACE - -Q_DECLARE_METATYPE(QDeclarativeDebugEngineReference) -Q_DECLARE_METATYPE(QDeclarativeDebugObjectReference) -Q_DECLARE_METATYPE(QDeclarativeDebugContextReference) -Q_DECLARE_METATYPE(QDeclarativeDebugPropertyReference) - -QT_END_HEADER - -#endif // QDECLARATIVEENGINEDEBUG_H diff --git a/src/declarative/qml/parser/parser.pri b/src/declarative/qml/parser/parser.pri deleted file mode 100644 index 3ae0a6d8eb..0000000000 --- a/src/declarative/qml/parser/parser.pri +++ /dev/null @@ -1,19 +0,0 @@ -HEADERS += \ - $$PWD/qdeclarativejsast_p.h \ - $$PWD/qdeclarativejsastfwd_p.h \ - $$PWD/qdeclarativejsastvisitor_p.h \ - $$PWD/qdeclarativejsengine_p.h \ - $$PWD/qdeclarativejsgrammar_p.h \ - $$PWD/qdeclarativejslexer_p.h \ - $$PWD/qdeclarativejsmemorypool_p.h \ - $$PWD/qdeclarativejsparser_p.h \ - $$PWD/qdeclarativejsglobal_p.h \ - $$PWD/qdeclarativejskeywords_p.h - -SOURCES += \ - $$PWD/qdeclarativejsast.cpp \ - $$PWD/qdeclarativejsastvisitor.cpp \ - $$PWD/qdeclarativejsengine_p.cpp \ - $$PWD/qdeclarativejsgrammar.cpp \ - $$PWD/qdeclarativejslexer.cpp \ - $$PWD/qdeclarativejsparser.cpp diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h deleted file mode 100644 index 2d199b79e6..0000000000 --- a/src/declarative/qml/qdeclarative.h +++ /dev/null @@ -1,451 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVE_H -#define QDECLARATIVE_H - -#include -#include -#include -#include - -#include -#include - -QT_BEGIN_HEADER - -#define QML_VERSION 0x020000 -#define QML_VERSION_STR "2.0" - -#define QML_DECLARE_TYPE(TYPE) \ - Q_DECLARE_METATYPE(TYPE *) \ - Q_DECLARE_METATYPE(QDeclarativeListProperty) - -#define QML_DECLARE_TYPE_HASMETATYPE(TYPE) \ - Q_DECLARE_METATYPE(QDeclarativeListProperty) - -#define QML_DECLARE_INTERFACE(INTERFACE) \ - QML_DECLARE_TYPE(INTERFACE) - -#define QML_DECLARE_INTERFACE_HASMETATYPE(INTERFACE) \ - QML_DECLARE_TYPE_HASMETATYPE(INTERFACE) - -enum { /* TYPEINFO flags */ - QML_HAS_ATTACHED_PROPERTIES = 0x01 -}; - -#define QML_DECLARE_TYPEINFO(TYPE, FLAGS) \ -QT_BEGIN_NAMESPACE \ -template <> \ -class QDeclarativeTypeInfo \ -{ \ -public: \ - enum { \ - hasAttachedProperties = (((FLAGS) & QML_HAS_ATTACHED_PROPERTIES) == QML_HAS_ATTACHED_PROPERTIES) \ - }; \ -}; \ -QT_END_NAMESPACE - -QT_BEGIN_NAMESPACE - - -class QDeclarativePropertyValueInterceptor; - -template -int qmlRegisterType() -{ - QByteArray name(T::staticMetaObject.className()); - - QByteArray pointerName(name + '*'); - QByteArray listName("QDeclarativeListProperty<" + name + ">"); - - QDeclarativePrivate::RegisterType type = { - 0, - - qRegisterMetaType(pointerName.constData()), - qRegisterMetaType >(listName.constData()), - 0, 0, - QString(), - - 0, 0, 0, 0, &T::staticMetaObject, - - QDeclarativePrivate::attachedPropertiesFunc(), - QDeclarativePrivate::attachedPropertiesMetaObject(), - - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - - 0, 0, - - 0, - 0 - }; - - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); -} - -int Q_DECLARATIVE_EXPORT qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message); - -template -int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason) -{ - QByteArray name(T::staticMetaObject.className()); - - QByteArray pointerName(name + '*'); - QByteArray listName("QDeclarativeListProperty<" + name + ">"); - - QDeclarativePrivate::RegisterType type = { - 0, - - qRegisterMetaType(pointerName.constData()), - qRegisterMetaType >(listName.constData()), - 0, 0, - reason, - - uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, - - QDeclarativePrivate::attachedPropertiesFunc(), - QDeclarativePrivate::attachedPropertiesMetaObject(), - - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - - 0, 0, - - 0, - 0 - }; - - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); -} - -template -int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) -{ - QByteArray name(T::staticMetaObject.className()); - - QByteArray pointerName(name + '*'); - QByteArray listName("QDeclarativeListProperty<" + name + ">"); - - QDeclarativePrivate::RegisterType type = { - 0, - - qRegisterMetaType(pointerName.constData()), - qRegisterMetaType >(listName.constData()), - sizeof(T), QDeclarativePrivate::createInto, - QString(), - - uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, - - QDeclarativePrivate::attachedPropertiesFunc(), - QDeclarativePrivate::attachedPropertiesMetaObject(), - - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - - 0, 0, - - 0, - 0 - }; - - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); -} - -template -int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) -{ - QByteArray name(T::staticMetaObject.className()); - - QByteArray pointerName(name + '*'); - QByteArray listName("QDeclarativeListProperty<" + name + ">"); - - QDeclarativePrivate::RegisterType type = { - 1, - - qRegisterMetaType(pointerName.constData()), - qRegisterMetaType >(listName.constData()), - sizeof(T), QDeclarativePrivate::createInto, - QString(), - - uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, - - QDeclarativePrivate::attachedPropertiesFunc(), - QDeclarativePrivate::attachedPropertiesMetaObject(), - - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - - 0, 0, - - 0, - metaObjectRevision - }; - - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); -} - -template -int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor) -{ - QByteArray name(T::staticMetaObject.className()); - - QByteArray pointerName(name + '*'); - QByteArray listName("QDeclarativeListProperty<" + name + ">"); - - QDeclarativePrivate::RegisterType type = { - 1, - - qRegisterMetaType(pointerName.constData()), - qRegisterMetaType >(listName.constData()), - sizeof(T), QDeclarativePrivate::createInto, - QString(), - - uri, versionMajor, versionMinor, 0, &T::staticMetaObject, - - QDeclarativePrivate::attachedPropertiesFunc(), - QDeclarativePrivate::attachedPropertiesMetaObject(), - - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - - 0, 0, - - 0, - metaObjectRevision - }; - - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); -} - - -template -int qmlRegisterExtendedType() -{ - QByteArray name(T::staticMetaObject.className()); - - QByteArray pointerName(name + '*'); - QByteArray listName("QDeclarativeListProperty<" + name + ">"); - - QDeclarativePrivate::RegisterType type = { - 0, - - qRegisterMetaType(pointerName.constData()), - qRegisterMetaType >(listName.constData()), - 0, 0, - QString(), - - 0, 0, 0, 0, &T::staticMetaObject, - - QDeclarativePrivate::attachedPropertiesFunc(), - QDeclarativePrivate::attachedPropertiesMetaObject(), - - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - - QDeclarativePrivate::createParent, &E::staticMetaObject, - - 0, - 0 - }; - - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); -} - -template -int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, - const char *qmlName) -{ - QByteArray name(T::staticMetaObject.className()); - - QByteArray pointerName(name + '*'); - QByteArray listName("QDeclarativeListProperty<" + name + ">"); - - QDeclarativeAttachedPropertiesFunc attached = QDeclarativePrivate::attachedPropertiesFunc(); - const QMetaObject * attachedMetaObject = QDeclarativePrivate::attachedPropertiesMetaObject(); - if (!attached) { - attached = QDeclarativePrivate::attachedPropertiesFunc(); - attachedMetaObject = QDeclarativePrivate::attachedPropertiesMetaObject(); - } - - QDeclarativePrivate::RegisterType type = { - 0, - - qRegisterMetaType(pointerName.constData()), - qRegisterMetaType >(listName.constData()), - sizeof(T), QDeclarativePrivate::createInto, - QString(), - - uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, - - attached, - attachedMetaObject, - - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - - QDeclarativePrivate::createParent, &E::staticMetaObject, - - 0, - 0 - }; - - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); -} - -template -int qmlRegisterInterface(const char *typeName) -{ - QByteArray name(typeName); - - QByteArray pointerName(name + '*'); - QByteArray listName("QDeclarativeListProperty<" + name + ">"); - - QDeclarativePrivate::RegisterInterface qmlInterface = { - 0, - - qRegisterMetaType(pointerName.constData()), - qRegisterMetaType >(listName.constData()), - - qobject_interface_iid() - }; - - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::InterfaceRegistration, &qmlInterface); -} - -template -int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor, - const char *qmlName, QDeclarativeCustomParser *parser) -{ - QByteArray name(T::staticMetaObject.className()); - - QByteArray pointerName(name + '*'); - QByteArray listName("QDeclarativeListProperty<" + name + ">"); - - QDeclarativePrivate::RegisterType type = { - 0, - - qRegisterMetaType(pointerName.constData()), - qRegisterMetaType >(listName.constData()), - sizeof(T), QDeclarativePrivate::createInto, - QString(), - - uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, - - QDeclarativePrivate::attachedPropertiesFunc(), - QDeclarativePrivate::attachedPropertiesMetaObject(), - - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - QDeclarativePrivate::StaticCastSelector::cast(), - - 0, 0, - - parser, - 0 - }; - - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); -} - -class QDeclarativeContext; -class QDeclarativeEngine; -class QJSValue; -class QJSEngine; -Q_DECLARATIVE_EXPORT void qmlExecuteDeferred(QObject *); -Q_DECLARATIVE_EXPORT QDeclarativeContext *qmlContext(const QObject *); -Q_DECLARATIVE_EXPORT QDeclarativeEngine *qmlEngine(const QObject *); -Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObjectById(int, const QObject *, bool create = true); -Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObject(int *, const QObject *, const QMetaObject *, bool create); - -template -QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true) -{ - static int idx = -1; - return qmlAttachedPropertiesObject(&idx, obj, &T::staticMetaObject, create); -} - -// For the use of QtQuick1 module -Q_DECLARATIVE_EXPORT void qmlRegisterBaseTypes(const char *uri, int versionMajor, int versionMinor); - -inline int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, - QJSValue (*callback)(QDeclarativeEngine *, QJSEngine *)) -{ - QDeclarativePrivate::RegisterModuleApi api = { - 0, - - uri, versionMajor, versionMinor, - - callback, 0 - }; - - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::ModuleApiRegistration, &api); -} - -inline int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, - QObject *(*callback)(QDeclarativeEngine *, QJSEngine *)) -{ - QDeclarativePrivate::RegisterModuleApi api = { - 0, - - uri, versionMajor, versionMinor, - - 0, callback - }; - - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::ModuleApiRegistration, &api); -} - -QT_END_NAMESPACE - -QML_DECLARE_TYPE(QObject) -Q_DECLARE_METATYPE(QVariant) - -QT_END_HEADER - -#endif // QDECLARATIVE_H diff --git a/src/declarative/qml/qdeclarativecompiler_p.h b/src/declarative/qml/qdeclarativecompiler_p.h deleted file mode 100644 index 637cd80569..0000000000 --- a/src/declarative/qml/qdeclarativecompiler_p.h +++ /dev/null @@ -1,466 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVECOMPILER_P_H -#define QDECLARATIVECOMPILER_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. -// - -#include "qdeclarative.h" -#include "qdeclarativeerror.h" -#include -#include "qdeclarativeinstruction_p.h" -#include "qdeclarativescript_p.h" -#include "qdeclarativeengine_p.h" -#include -#include "qdeclarativepropertycache_p.h" -#include "qdeclarativeintegercache_p.h" -#include "qdeclarativetypenamecache_p.h" -#include "qdeclarativetypeloader_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QDeclarativeEngine; -class QDeclarativeComponent; -class QDeclarativeContext; -class QDeclarativeContextData; - -class Q_AUTOTEST_EXPORT QDeclarativeCompiledData : public QDeclarativeRefCount, - public QDeclarativeCleanup -{ -public: - QDeclarativeCompiledData(QDeclarativeEngine *engine); - virtual ~QDeclarativeCompiledData(); - - QDeclarativeEngine *engine; - - QString name; - QUrl url; - QDeclarativeTypeNameCache *importCache; - - struct TypeReference - { - TypeReference() - : type(0), typePropertyCache(0), component(0) {} - - QString className; - QDeclarativeType *type; - QDeclarativePropertyCache *typePropertyCache; - QDeclarativeCompiledData *component; - - const QMetaObject *metaObject() const; - QDeclarativePropertyCache *propertyCache() const; - QDeclarativePropertyCache *createPropertyCache(QDeclarativeEngine *); - }; - QList types; - - struct V8Program { - V8Program(const QByteArray &p, QDeclarativeCompiledData *c) - : program(p), cdata(c) {} - - QByteArray program; - v8::Persistent bindings; - QDeclarativeCompiledData *cdata; - }; - - QList programs; - - const QMetaObject *root; - QAbstractDynamicMetaObject rootData; - QDeclarativePropertyCache *rootPropertyCache; - QList primitives; - QList datas; - QByteArray bytecode; - QList propertyCaches; - QList contextCaches; - QList scripts; - QList urls; - - struct Instruction { -#define QML_INSTR_DATA_TYPEDEF(I, FMT) typedef QDeclarativeInstructionData I; - FOR_EACH_QML_INSTR(QML_INSTR_DATA_TYPEDEF) -#undef QML_INSTR_DATA_TYPEDEF - private: - Instruction(); - }; - - void dumpInstructions(); - - template - int addInstruction(const QDeclarativeInstructionData &data) - { - QDeclarativeInstruction genericInstr; - QDeclarativeInstructionMeta::setData(genericInstr, data); - return addInstructionHelper(static_cast(Instr), genericInstr); - } - int nextInstructionIndex(); - QDeclarativeInstruction *instruction(int index); - QDeclarativeInstruction::Type instructionType(const QDeclarativeInstruction *instr); - - bool isInitialized() const { return hasEngine(); } - void initialize(QDeclarativeEngine *); - -protected: - virtual void destroy(); // From QDeclarativeRefCount - virtual void clear(); // From QDeclarativeCleanup - -private: - friend class QDeclarativeCompiler; - - int addInstructionHelper(QDeclarativeInstruction::Type type, QDeclarativeInstruction &instr); - void dump(QDeclarativeInstruction *, int idx = -1); - QDeclarativeCompiledData(const QDeclarativeCompiledData &other); - QDeclarativeCompiledData &operator=(const QDeclarativeCompiledData &other); - QByteArray packData; - int pack(const char *, size_t); - - int indexForString(const QString &); - int indexForByteArray(const QByteArray &); - int indexForUrl(const QUrl &); -}; - -namespace QDeclarativeCompilerTypes { - struct BindingContext - { - BindingContext() - : stack(0), owner(0), object(0) {} - BindingContext(QDeclarativeScript::Object *o) - : stack(0), owner(0), object(o) {} - BindingContext incr() const { - BindingContext rv(object); - rv.stack = stack + 1; - return rv; - } - bool isSubContext() const { return stack != 0; } - int stack; - int owner; - QDeclarativeScript::Object *object; - }; - - struct BindingReference - { - enum DataType { QtScript, V4, V8, - Tr, TrId }; - DataType dataType; - }; - - struct JSBindingReference : public QDeclarativePool::Class, - public BindingReference - { - JSBindingReference() : nextReference(0) {} - - QDeclarativeScript::Variant expression; - QDeclarativeScript::Property *property; - QDeclarativeScript::Value *value; - - int compiledIndex; - - QString rewrittenExpression; - BindingContext bindingContext; - - JSBindingReference *nextReference; - }; - - struct TrBindingReference : public QDeclarativePool::POD, - public BindingReference - { - QStringRef text; - QStringRef comment; - int n; - }; - - struct IdList : public QFieldList - { - QDeclarativeScript::Object *value(const QString &id) const { - for (QDeclarativeScript::Object *o = first(); o; o = next(o)) { - if (o->id == id) - return o; - } - return 0; - } - }; - - struct DepthStack { - DepthStack() : _depth(0), _maxDepth(0) {} - DepthStack(const DepthStack &o) : _depth(o._depth), _maxDepth(o._maxDepth) {} - DepthStack &operator=(const DepthStack &o) { _depth = o._depth; _maxDepth = o._maxDepth; return *this; } - - int depth() const { return _depth; } - int maxDepth() const { return _maxDepth; } - - void push() { ++_depth; _maxDepth = qMax(_depth, _maxDepth); } - void pop() { --_depth; Q_ASSERT(_depth >= 0); Q_ASSERT(_maxDepth > _depth); } - - void pushPop(int count) { _maxDepth = qMax(_depth + count, _maxDepth); } - private: - int _depth; - int _maxDepth; - }; - - // Contains all the incremental compiler state about a component. As - // a single QML file can have multiple components defined, there may be - // more than one of these for each compile - struct ComponentCompileState : public QDeclarativePool::Class - { - ComponentCompileState() - : parserStatusCount(0), totalBindingsCount(0), pushedProperties(0), nested(false), - v8BindingProgramLine(-1), root(0) {} - - IdList ids; - int parserStatusCount; - int totalBindingsCount; - int pushedProperties; - bool nested; - - QByteArray compiledBindingData; - QByteArray v8BindingProgram; - int v8BindingProgramLine; - - DepthStack objectDepth; - DepthStack listDepth; - - typedef QDeclarativeCompilerTypes::JSBindingReference B; - typedef QFieldList JSBindingReferenceList; - JSBindingReferenceList bindings; - typedef QDeclarativeScript::Object O; - typedef QFieldList AliasingObjectsList; - AliasingObjectsList aliasingObjects; - QDeclarativeScript::Object *root; - }; -}; - -class QMetaObjectBuilder; -class Q_AUTOTEST_EXPORT QDeclarativeCompiler -{ - Q_DECLARE_TR_FUNCTIONS(QDeclarativeCompiler) -public: - QDeclarativeCompiler(QDeclarativePool *); - - bool compile(QDeclarativeEngine *, QDeclarativeTypeData *, QDeclarativeCompiledData *); - - bool isError() const; - QList errors() const; - - static bool isAttachedPropertyName(const QString &); - static bool isSignalPropertyName(const QString &); - static bool isAttachedPropertyName(const QHashedStringRef &); - static bool isSignalPropertyName(const QHashedStringRef &); - - int evaluateEnum(const QByteArray& script) const; // for QDeclarativeCustomParser::evaluateEnum - const QMetaObject *resolveType(const QString& name) const; // for QDeclarativeCustomParser::resolveType - int rewriteBinding(const QDeclarativeScript::Variant& value, const QString& name); // for QDeclarativeCustomParser::rewriteBinding - QString rewriteSignalHandler(const QDeclarativeScript::Variant& value, const QString &name); // for QDeclarativeCustomParser::rewriteSignalHandler - -private: - typedef QDeclarativeCompiledData::Instruction Instruction; - - static void reset(QDeclarativeCompiledData *); - - void compileTree(QDeclarativeScript::Object *tree); - - - bool buildObject(QDeclarativeScript::Object *obj, const QDeclarativeCompilerTypes::BindingContext &); - bool buildComponent(QDeclarativeScript::Object *obj, const QDeclarativeCompilerTypes::BindingContext &); - bool buildSubObject(QDeclarativeScript::Object *obj, const QDeclarativeCompilerTypes::BindingContext &); - bool buildSignal(QDeclarativeScript::Property *prop, QDeclarativeScript::Object *obj, - const QDeclarativeCompilerTypes::BindingContext &); - bool buildProperty(QDeclarativeScript::Property *prop, QDeclarativeScript::Object *obj, - const QDeclarativeCompilerTypes::BindingContext &); - bool buildPropertyInNamespace(QDeclarativeImportedNamespace *ns, - QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - const QDeclarativeCompilerTypes::BindingContext &); - bool buildIdProperty(QDeclarativeScript::Property *prop, QDeclarativeScript::Object *obj); - bool buildAttachedProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - const QDeclarativeCompilerTypes::BindingContext &ctxt); - bool buildGroupedProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - const QDeclarativeCompilerTypes::BindingContext &ctxt); - bool buildValueTypeProperty(QObject *type, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Object *baseObj, - const QDeclarativeCompilerTypes::BindingContext &ctxt); - bool buildListProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - const QDeclarativeCompilerTypes::BindingContext &ctxt); - bool buildScriptStringProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - const QDeclarativeCompilerTypes::BindingContext &ctxt); - bool buildPropertyAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - const QDeclarativeCompilerTypes::BindingContext &ctxt); - bool buildPropertyObjectAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Value *value, - const QDeclarativeCompilerTypes::BindingContext &ctxt); - bool buildPropertyOnAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Object *baseObj, - QDeclarativeScript::Value *value, - const QDeclarativeCompilerTypes::BindingContext &ctxt); - bool buildPropertyLiteralAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Value *value, - const QDeclarativeCompilerTypes::BindingContext &ctxt); - bool doesPropertyExist(QDeclarativeScript::Property *prop, QDeclarativeScript::Object *obj); - bool testLiteralAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Value *value); - bool testQualifiedEnumAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Value *value, - bool *isAssignment); - enum DynamicMetaMode { IgnoreAliases, ResolveAliases, ForceCreation }; - bool mergeDynamicMetaProperties(QDeclarativeScript::Object *obj); - bool buildDynamicMeta(QDeclarativeScript::Object *obj, DynamicMetaMode mode); - bool checkDynamicMeta(QDeclarativeScript::Object *obj); - bool buildBinding(QDeclarativeScript::Value *, QDeclarativeScript::Property *prop, - const QDeclarativeCompilerTypes::BindingContext &ctxt); - bool buildLiteralBinding(QDeclarativeScript::Value *, QDeclarativeScript::Property *prop, - const QDeclarativeCompilerTypes::BindingContext &ctxt); - bool buildComponentFromRoot(QDeclarativeScript::Object *obj, const QDeclarativeCompilerTypes::BindingContext &); - bool compileAlias(QFastMetaBuilder &, - QByteArray &data, - QDeclarativeScript::Object *obj, - int propIndex, int aliasIndex, - QDeclarativeScript::Object::DynamicProperty &); - bool completeComponentBuild(); - bool checkValidId(QDeclarativeScript::Value *, const QString &); - - - void genObject(QDeclarativeScript::Object *obj); - void genObjectBody(QDeclarativeScript::Object *obj); - void genValueTypeProperty(QDeclarativeScript::Object *obj,QDeclarativeScript::Property *); - void genComponent(QDeclarativeScript::Object *obj); - void genValueProperty(QDeclarativeScript::Property *prop, QDeclarativeScript::Object *obj); - void genListProperty(QDeclarativeScript::Property *prop, QDeclarativeScript::Object *obj); - void genPropertyAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Property *valueTypeProperty = 0); - void genLiteralAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Value *value); - void genBindingAssignment(QDeclarativeScript::Value *binding, - QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Property *valueTypeProperty = 0); - int genContextCache(); - - QDeclarativePropertyData genValueTypeData(QDeclarativeScript::Property *prop, - QDeclarativeScript::Property *valueTypeProp); - - int componentTypeRef(); - int translationContextIndex(); - - static QDeclarativeType *toQmlType(QDeclarativeScript::Object *from); - bool canCoerce(int to, QDeclarativeScript::Object *from); - - QString elementName(QDeclarativeScript::Object *); - - QStringList deferredProperties(QDeclarativeScript::Object *); - - QDeclarativePropertyData *property(QDeclarativeScript::Object *, int); - QDeclarativePropertyData *property(QDeclarativeScript::Object *, const QHashedStringRef &, - bool *notInRevision = 0); - QDeclarativePropertyData *signal(QDeclarativeScript::Object *, const QHashedStringRef &, - bool *notInRevision = 0); - int indexOfProperty(QDeclarativeScript::Object *, const QHashedStringRef &, bool *notInRevision = 0); - int indexOfProperty(QDeclarativeScript::Object *, const QString &, bool *notInRevision = 0); - int indexOfSignal(QDeclarativeScript::Object *, const QString &, bool *notInRevision = 0); - - void addId(const QString &, QDeclarativeScript::Object *); - - void dumpStats(); - - void addBindingReference(QDeclarativeCompilerTypes::JSBindingReference *); - - QDeclarativeCompilerTypes::ComponentCompileState *compileState; - - QDeclarativePool *pool; - - QDeclarativeCompilerTypes::ComponentCompileState *componentState(QDeclarativeScript::Object *); - void saveComponentState(); - - QList exceptions; - QDeclarativeCompiledData *output; - QDeclarativeEngine *engine; - QDeclarativeEnginePrivate *enginePrivate; - QDeclarativeScript::Object *unitRoot; - QDeclarativeTypeData *unit; - int cachedComponentTypeRef; - int cachedTranslationContextIndex; - - // Compiler component statistics. Only collected if QML_COMPILER_STATS=1 - struct ComponentStat - { - ComponentStat() : ids(0), objects(0) {} - - int lineNumber; - - int ids; - QList scriptBindings; - QList optimizedBindings; - int objects; - }; - struct ComponentStats : public QDeclarativePool::Class - { - ComponentStat componentStat; - QList savedComponentStats; - }; - ComponentStats *componentStats; -}; - -QT_END_NAMESPACE - -#endif // QDECLARATIVECOMPILER_P_H diff --git a/src/declarative/qml/qdeclarativeextensioninterface.h b/src/declarative/qml/qdeclarativeextensioninterface.h deleted file mode 100644 index fcfaa7c402..0000000000 --- a/src/declarative/qml/qdeclarativeextensioninterface.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVEEXTENSIONINTERFACE_H -#define QDECLARATIVEEXTENSIONINTERFACE_H - -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - - -class QDeclarativeEngine; - -class Q_DECLARATIVE_EXPORT QDeclarativeTypesExtensionInterface -{ -public: - virtual ~QDeclarativeTypesExtensionInterface() {} - virtual void registerTypes(const char *uri) = 0; -}; - -class Q_DECLARATIVE_EXPORT QDeclarativeExtensionInterface : public QDeclarativeTypesExtensionInterface -{ -public: - virtual ~QDeclarativeExtensionInterface() {} - virtual void initializeEngine(QDeclarativeEngine *engine, const char *uri) = 0; -}; - -Q_DECLARE_INTERFACE(QDeclarativeTypesExtensionInterface, "org.qt-project.Qt.QDeclarativeTypesExtensionInterface/1.0") -Q_DECLARE_INTERFACE(QDeclarativeExtensionInterface, "org.qt-project.Qt.QDeclarativeExtensionInterface/1.0") - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QDECLARATIVEEXTENSIONINTERFACE_H diff --git a/src/declarative/qml/qdeclarativeinfo.h b/src/declarative/qml/qdeclarativeinfo.h deleted file mode 100644 index edd56df1a3..0000000000 --- a/src/declarative/qml/qdeclarativeinfo.h +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVEINFO_H -#define QDECLARATIVEINFO_H - -#include -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - - -class QDeclarativeInfoPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeInfo : public QDebug -{ -public: - QDeclarativeInfo(const QDeclarativeInfo &); - ~QDeclarativeInfo(); - - inline QDeclarativeInfo &operator<<(QChar t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(bool t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(char t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(signed short t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(unsigned short t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(signed int t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(unsigned int t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(signed long t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(unsigned long t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(qint64 t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(quint64 t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(float t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(double t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(const char* t) { QDebug::operator<<(t); return *this; } - inline QDeclarativeInfo &operator<<(const QString & t) { QDebug::operator<<(t.toLocal8Bit().constData()); return *this; } - inline QDeclarativeInfo &operator<<(const QStringRef & t) { return operator<<(t.toString()); } - inline QDeclarativeInfo &operator<<(const QLatin1String &t) { QDebug::operator<<(t.latin1()); return *this; } - inline QDeclarativeInfo &operator<<(const QByteArray & t) { QDebug::operator<<(t); return *this; } - 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; } -#ifndef QT_NO_DEBUG_STREAM - inline QDeclarativeInfo &operator<<(const QUrl &t) { static_cast(*this) << t; return *this; } -#endif - -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 &errors); - - QDeclarativeInfo(QDeclarativeInfoPrivate *); - QDeclarativeInfoPrivate *d; -}; - -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 &errors); - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QDECLARATIVEINFO_H diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri deleted file mode 100644 index 8b03028c34..0000000000 --- a/src/declarative/qml/qml.pri +++ /dev/null @@ -1,125 +0,0 @@ -SOURCES += \ - $$PWD/qdeclarativeapplication.cpp \ - $$PWD/qdeclarativeinstruction.cpp \ - $$PWD/qdeclarativelistmodel.cpp \ - $$PWD/qdeclarativelistmodelworkeragent.cpp \ - $$PWD/qdeclarativeopenmetaobject.cpp \ - $$PWD/qdeclarativevmemetaobject.cpp \ - $$PWD/qdeclarativeengine.cpp \ - $$PWD/qdeclarativeexpression.cpp \ - $$PWD/qdeclarativebinding.cpp \ - $$PWD/qdeclarativeproperty.cpp \ - $$PWD/qdeclarativecomponent.cpp \ - $$PWD/qdeclarativeincubator.cpp \ - $$PWD/qdeclarativecontext.cpp \ - $$PWD/qdeclarativecustomparser.cpp \ - $$PWD/qdeclarativepropertyvaluesource.cpp \ - $$PWD/qdeclarativepropertyvalueinterceptor.cpp \ - $$PWD/qdeclarativeproxymetaobject.cpp \ - $$PWD/qdeclarativevme.cpp \ - $$PWD/qdeclarativecompiler.cpp \ - $$PWD/qdeclarativecompileddata.cpp \ - $$PWD/qdeclarativeboundsignal.cpp \ - $$PWD/qdeclarativemetatype.cpp \ - $$PWD/qdeclarativestringconverters.cpp \ - $$PWD/qdeclarativeparserstatus.cpp \ - $$PWD/qdeclarativetypeloader.cpp \ - $$PWD/qdeclarativeinfo.cpp \ - $$PWD/qdeclarativeerror.cpp \ - $$PWD/qdeclarativescript.cpp \ - $$PWD/qdeclarativerewrite.cpp \ - $$PWD/qdeclarativevaluetype.cpp \ - $$PWD/qdeclarativeaccessors.cpp \ - $$PWD/qdeclarativexmlhttprequest.cpp \ - $$PWD/qdeclarativewatcher.cpp \ - $$PWD/qdeclarativecleanup.cpp \ - $$PWD/qdeclarativepropertycache.cpp \ - $$PWD/qdeclarativenotifier.cpp \ - $$PWD/qdeclarativeintegercache.cpp \ - $$PWD/qdeclarativetypenotavailable.cpp \ - $$PWD/qdeclarativetypenamecache.cpp \ - $$PWD/qdeclarativescriptstring.cpp \ - $$PWD/qdeclarativeworkerscript.cpp \ - $$PWD/qdeclarativeimageprovider.cpp \ - $$PWD/qdeclarativenetworkaccessmanagerfactory.cpp \ - $$PWD/qdeclarativedirparser.cpp \ - $$PWD/qdeclarativeextensionplugin.cpp \ - $$PWD/qdeclarativeimport.cpp \ - $$PWD/qdeclarativelist.cpp \ - $$PWD/qdeclarativelocale.cpp \ - $$PWD/qlistmodelinterface.cpp - -HEADERS += \ - $$PWD/qdeclarativeglobal_p.h \ - $$PWD/qdeclarativeinstruction_p.h \ - $$PWD/qdeclarativelistmodel_p.h\ - $$PWD/qdeclarativelistmodel_p_p.h\ - $$PWD/qdeclarativelistmodelworkeragent_p.h \ - $$PWD/qdeclarativeopenmetaobject_p.h \ - $$PWD/qdeclarativevmemetaobject_p.h \ - $$PWD/qdeclarative.h \ - $$PWD/qdeclarativeapplication_p.h \ - $$PWD/qdeclarativebinding_p.h \ - $$PWD/qdeclarativebinding_p_p.h \ - $$PWD/qdeclarativeproperty.h \ - $$PWD/qdeclarativecomponent.h \ - $$PWD/qdeclarativecomponent_p.h \ - $$PWD/qdeclarativeincubator.h \ - $$PWD/qdeclarativeincubator_p.h \ - $$PWD/qdeclarativecustomparser_p.h \ - $$PWD/qdeclarativecustomparser_p_p.h \ - $$PWD/qdeclarativepropertyvaluesource.h \ - $$PWD/qdeclarativepropertyvalueinterceptor_p.h \ - $$PWD/qdeclarativeboundsignal_p.h \ - $$PWD/qdeclarativeparserstatus.h \ - $$PWD/qdeclarativeproxymetaobject_p.h \ - $$PWD/qdeclarativevme_p.h \ - $$PWD/qdeclarativecompiler_p.h \ - $$PWD/qdeclarativeengine_p.h \ - $$PWD/qdeclarativeexpression_p.h \ - $$PWD/qdeclarativeprivate.h \ - $$PWD/qdeclarativemetatype_p.h \ - $$PWD/qdeclarativeengine.h \ - $$PWD/qdeclarativecontext.h \ - $$PWD/qdeclarativeexpression.h \ - $$PWD/qdeclarativestringconverters_p.h \ - $$PWD/qdeclarativeinfo.h \ - $$PWD/qdeclarativeproperty_p.h \ - $$PWD/qdeclarativecontext_p.h \ - $$PWD/qdeclarativetypeloader_p.h \ - $$PWD/qdeclarativelist.h \ - $$PWD/qdeclarativelist_p.h \ - $$PWD/qdeclarativedata_p.h \ - $$PWD/qdeclarativeerror.h \ - $$PWD/qdeclarativescript_p.h \ - $$PWD/qdeclarativerewrite_p.h \ - $$PWD/qdeclarativevaluetype_p.h \ - $$PWD/qdeclarativeaccessors_p.h \ - $$PWD/qdeclarativexmlhttprequest_p.h \ - $$PWD/qdeclarativewatcher_p.h \ - $$PWD/qdeclarativecleanup_p.h \ - $$PWD/qdeclarativepropertycache_p.h \ - $$PWD/qdeclarativenotifier_p.h \ - $$PWD/qdeclarativeintegercache_p.h \ - $$PWD/qdeclarativetypenotavailable_p.h \ - $$PWD/qdeclarativetypenamecache_p.h \ - $$PWD/qdeclarativescriptstring.h \ - $$PWD/qdeclarativeworkerscript_p.h \ - $$PWD/qdeclarativeguard_p.h \ - $$PWD/qdeclarativeimageprovider.h \ - $$PWD/qdeclarativenetworkaccessmanagerfactory.h \ - $$PWD/qdeclarativedirparser_p.h \ - $$PWD/qdeclarativeextensioninterface.h \ - $$PWD/qdeclarativeimport_p.h \ - $$PWD/qdeclarativeextensionplugin.h \ - $$PWD/qdeclarativenullablevalue_p_p.h \ - $$PWD/qdeclarativescriptstring_p.h \ - $$PWD/qdeclarativelocale_p.h \ - $$PWD/qlistmodelinterface_p.h \ - $$PWD/qdeclarativecomponentattached_p.h - -include(parser/parser.pri) -include(rewriter/rewriter.pri) -include(ftw/ftw.pri) -include(v4/v4.pri) -include(v8/v8.pri) diff --git a/src/declarative/qml/v4/qv4irbuilder_p.h b/src/declarative/qml/v4/qv4irbuilder_p.h deleted file mode 100644 index c0c7ff874c..0000000000 --- a/src/declarative/qml/v4/qv4irbuilder_p.h +++ /dev/null @@ -1,240 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QV4IRBUILDER_P_H -#define QV4IRBUILDER_P_H - -#include - -#include "qv4ir_p.h" - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QV4IRBuilder : public QDeclarativeJS::AST::Visitor -{ -public: - QV4IRBuilder(const QV4Compiler::Expression *, QDeclarativeEnginePrivate *); - - bool operator()(QDeclarativeJS::IR::Function *, QDeclarativeJS::AST::Node *); - -protected: - struct ExprResult { - enum Format { - ex, // expression - cx // condition - }; - - QDeclarativeJS::IR::Expr *code; - QDeclarativeJS::IR::BasicBlock *iftrue; - QDeclarativeJS::IR::BasicBlock *iffalse; - Format hint; // requested format - Format format; // instruction format - - ExprResult(QDeclarativeJS::IR::Expr *expr = 0) - : code(expr), iftrue(0), iffalse(0), hint(ex), format(ex) {} - - ExprResult(QDeclarativeJS::IR::BasicBlock *iftrue, QDeclarativeJS::IR::BasicBlock *iffalse) - : code(0), iftrue(iftrue), iffalse(iffalse), hint(cx), format(ex) {} - - inline QDeclarativeJS::IR::Type type() const { return code ? code->type : QDeclarativeJS::IR::InvalidType; } - - inline QDeclarativeJS::IR::Expr *get() const { return code; } - inline operator QDeclarativeJS::IR::Expr *() const { return get(); } - inline QDeclarativeJS::IR::Expr *operator->() const { return get(); } - inline bool isValid() const { return code ? code->type != QDeclarativeJS::IR::InvalidType : false; } - inline bool is(QDeclarativeJS::IR::Type t) const { return type() == t; } - inline bool isNot(QDeclarativeJS::IR::Type t) const { return type() != t; } - - bool isPrimitive() const { - switch (type()) { - case QDeclarativeJS::IR::UndefinedType: // ### TODO - case QDeclarativeJS::IR::NullType: // ### TODO - case QDeclarativeJS::IR::UrlType: // ### TODO - return false; - - case QDeclarativeJS::IR::StringType: - case QDeclarativeJS::IR::BoolType: - case QDeclarativeJS::IR::IntType: - case QDeclarativeJS::IR::RealType: - case QDeclarativeJS::IR::RealNaNType: - return true; - - default: - return false; - } // switch - } - }; - - inline void accept(QDeclarativeJS::AST::Node *ast) { QDeclarativeJS::AST::Node::accept(ast, this); } - - ExprResult expression(QDeclarativeJS::AST::ExpressionNode *ast); - ExprResult statement(QDeclarativeJS::AST::Statement *ast); - void sourceElement(QDeclarativeJS::AST::SourceElement *ast); - void condition(QDeclarativeJS::AST::ExpressionNode *ast, QDeclarativeJS::IR::BasicBlock *iftrue, QDeclarativeJS::IR::BasicBlock *iffalse); - void binop(QDeclarativeJS::AST::BinaryExpression *ast, ExprResult left, ExprResult right); - - void implicitCvt(ExprResult &expr, QDeclarativeJS::IR::Type type); - - virtual bool preVisit(QDeclarativeJS::AST::Node *ast); - - // QML - virtual bool visit(QDeclarativeJS::AST::UiProgram *ast); - virtual bool visit(QDeclarativeJS::AST::UiImportList *ast); - virtual bool visit(QDeclarativeJS::AST::UiImport *ast); - virtual bool visit(QDeclarativeJS::AST::UiPublicMember *ast); - virtual bool visit(QDeclarativeJS::AST::UiSourceElement *ast); - virtual bool visit(QDeclarativeJS::AST::UiObjectDefinition *ast); - virtual bool visit(QDeclarativeJS::AST::UiObjectInitializer *ast); - virtual bool visit(QDeclarativeJS::AST::UiObjectBinding *ast); - virtual bool visit(QDeclarativeJS::AST::UiScriptBinding *ast); - virtual bool visit(QDeclarativeJS::AST::UiArrayBinding *ast); - virtual bool visit(QDeclarativeJS::AST::UiObjectMemberList *ast); - virtual bool visit(QDeclarativeJS::AST::UiArrayMemberList *ast); - virtual bool visit(QDeclarativeJS::AST::UiQualifiedId *ast); - - // JS - virtual bool visit(QDeclarativeJS::AST::Program *ast); - virtual bool visit(QDeclarativeJS::AST::SourceElements *ast); - virtual bool visit(QDeclarativeJS::AST::FunctionSourceElement *ast); - virtual bool visit(QDeclarativeJS::AST::StatementSourceElement *ast); - - // object literals - virtual bool visit(QDeclarativeJS::AST::PropertyNameAndValueList *ast); - virtual bool visit(QDeclarativeJS::AST::IdentifierPropertyName *ast); - virtual bool visit(QDeclarativeJS::AST::StringLiteralPropertyName *ast); - virtual bool visit(QDeclarativeJS::AST::NumericLiteralPropertyName *ast); - - // array literals - virtual bool visit(QDeclarativeJS::AST::ElementList *ast); - virtual bool visit(QDeclarativeJS::AST::Elision *ast); - - // function calls - virtual bool visit(QDeclarativeJS::AST::ArgumentList *ast); - - // expressions - virtual bool visit(QDeclarativeJS::AST::ObjectLiteral *ast); - virtual bool visit(QDeclarativeJS::AST::ArrayLiteral *ast); - virtual bool visit(QDeclarativeJS::AST::ThisExpression *ast); - virtual bool visit(QDeclarativeJS::AST::IdentifierExpression *ast); - virtual bool visit(QDeclarativeJS::AST::NullExpression *ast); - virtual bool visit(QDeclarativeJS::AST::TrueLiteral *ast); - virtual bool visit(QDeclarativeJS::AST::FalseLiteral *ast); - virtual bool visit(QDeclarativeJS::AST::StringLiteral *ast); - virtual bool visit(QDeclarativeJS::AST::NumericLiteral *ast); - virtual bool visit(QDeclarativeJS::AST::RegExpLiteral *ast); - virtual bool visit(QDeclarativeJS::AST::NestedExpression *ast); - virtual bool visit(QDeclarativeJS::AST::ArrayMemberExpression *ast); - virtual bool visit(QDeclarativeJS::AST::FieldMemberExpression *ast); - virtual bool visit(QDeclarativeJS::AST::NewMemberExpression *ast); - virtual bool visit(QDeclarativeJS::AST::NewExpression *ast); - virtual bool visit(QDeclarativeJS::AST::CallExpression *ast); - virtual bool visit(QDeclarativeJS::AST::PostIncrementExpression *ast); - virtual bool visit(QDeclarativeJS::AST::PostDecrementExpression *ast); - virtual bool visit(QDeclarativeJS::AST::DeleteExpression *ast); - virtual bool visit(QDeclarativeJS::AST::VoidExpression *ast); - virtual bool visit(QDeclarativeJS::AST::TypeOfExpression *ast); - virtual bool visit(QDeclarativeJS::AST::PreIncrementExpression *ast); - virtual bool visit(QDeclarativeJS::AST::PreDecrementExpression *ast); - virtual bool visit(QDeclarativeJS::AST::UnaryPlusExpression *ast); - virtual bool visit(QDeclarativeJS::AST::UnaryMinusExpression *ast); - virtual bool visit(QDeclarativeJS::AST::TildeExpression *ast); - virtual bool visit(QDeclarativeJS::AST::NotExpression *ast); - virtual bool visit(QDeclarativeJS::AST::BinaryExpression *ast); - virtual bool visit(QDeclarativeJS::AST::ConditionalExpression *ast); - virtual bool visit(QDeclarativeJS::AST::Expression *ast); - - // statements - virtual bool visit(QDeclarativeJS::AST::Block *ast); - virtual bool visit(QDeclarativeJS::AST::StatementList *ast); - virtual bool visit(QDeclarativeJS::AST::VariableStatement *ast); - virtual bool visit(QDeclarativeJS::AST::VariableDeclarationList *ast); - virtual bool visit(QDeclarativeJS::AST::VariableDeclaration *ast); - virtual bool visit(QDeclarativeJS::AST::EmptyStatement *ast); - virtual bool visit(QDeclarativeJS::AST::ExpressionStatement *ast); - virtual bool visit(QDeclarativeJS::AST::IfStatement *ast); - virtual bool visit(QDeclarativeJS::AST::DoWhileStatement *ast); - virtual bool visit(QDeclarativeJS::AST::WhileStatement *ast); - virtual bool visit(QDeclarativeJS::AST::ForStatement *ast); - virtual bool visit(QDeclarativeJS::AST::LocalForStatement *ast); - virtual bool visit(QDeclarativeJS::AST::ForEachStatement *ast); - virtual bool visit(QDeclarativeJS::AST::LocalForEachStatement *ast); - virtual bool visit(QDeclarativeJS::AST::ContinueStatement *ast); - virtual bool visit(QDeclarativeJS::AST::BreakStatement *ast); - virtual bool visit(QDeclarativeJS::AST::ReturnStatement *ast); - virtual bool visit(QDeclarativeJS::AST::WithStatement *ast); - virtual bool visit(QDeclarativeJS::AST::SwitchStatement *ast); - virtual bool visit(QDeclarativeJS::AST::CaseBlock *ast); - virtual bool visit(QDeclarativeJS::AST::CaseClauses *ast); - virtual bool visit(QDeclarativeJS::AST::CaseClause *ast); - virtual bool visit(QDeclarativeJS::AST::DefaultClause *ast); - virtual bool visit(QDeclarativeJS::AST::LabelledStatement *ast); - virtual bool visit(QDeclarativeJS::AST::ThrowStatement *ast); - virtual bool visit(QDeclarativeJS::AST::TryStatement *ast); - virtual bool visit(QDeclarativeJS::AST::Catch *ast); - virtual bool visit(QDeclarativeJS::AST::Finally *ast); - virtual bool visit(QDeclarativeJS::AST::FunctionDeclaration *ast); - virtual bool visit(QDeclarativeJS::AST::FunctionExpression *ast); - virtual bool visit(QDeclarativeJS::AST::FormalParameterList *ast); - virtual bool visit(QDeclarativeJS::AST::FunctionBody *ast); - virtual bool visit(QDeclarativeJS::AST::DebuggerStatement *ast); - -private: - bool buildName(QList &name, QDeclarativeJS::AST::Node *node, - QList *nodes); - void discard(); - - const QV4Compiler::Expression *m_expression; - QDeclarativeEnginePrivate *m_engine; - - QDeclarativeJS::IR::Function *_function; - QDeclarativeJS::IR::BasicBlock *_block; - bool _discard; - - ExprResult _expr; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QV4IRBUILDER_P_H diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri deleted file mode 100644 index 01d4247ff8..0000000000 --- a/src/declarative/util/util.pri +++ /dev/null @@ -1,5 +0,0 @@ -SOURCES += \ - $$PWD/qdeclarativepropertymap.cpp - -HEADERS += \ - $$PWD/qdeclarativepropertymap.h diff --git a/src/imports/folderlistmodel/folderlistmodel.pro b/src/imports/folderlistmodel/folderlistmodel.pro index 26efc654b8..b4cfcea495 100644 --- a/src/imports/folderlistmodel/folderlistmodel.pro +++ b/src/imports/folderlistmodel/folderlistmodel.pro @@ -2,12 +2,12 @@ TARGET = qmlfolderlistmodelplugin TARGETPATH = Qt/labs/folderlistmodel include(../qimportbase.pri) -QT += widgets declarative +QT += widgets qml -SOURCES += qdeclarativefolderlistmodel.cpp plugin.cpp -HEADERS += qdeclarativefolderlistmodel.h +SOURCES += qquickfolderlistmodel.cpp plugin.cpp +HEADERS += qquickfolderlistmodel.h -DESTDIR = $$QT.declarative.imports/$$TARGETPATH +DESTDIR = $$QT.qml.imports/$$TARGETPATH target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH qmldir.files += $$PWD/qmldir diff --git a/src/imports/folderlistmodel/plugin.cpp b/src/imports/folderlistmodel/plugin.cpp index 48d7b5b7cb..78fc230fdc 100644 --- a/src/imports/folderlistmodel/plugin.cpp +++ b/src/imports/folderlistmodel/plugin.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#include -#include +#include +#include -#include "qdeclarativefolderlistmodel.h" +#include "qquickfolderlistmodel.h" QT_BEGIN_NAMESPACE //![class decl] -class QmlFolderListModelPlugin : public QDeclarativeExtensionPlugin +class QmlFolderListModelPlugin : public QQmlExtensionPlugin { Q_OBJECT public: @@ -55,7 +55,7 @@ class QmlFolderListModelPlugin : public QDeclarativeExtensionPlugin { Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.folderlistmodel")); #ifndef QT_NO_DIRMODEL - qmlRegisterType(uri,1,0,"FolderListModel"); + qmlRegisterType(uri,1,0,"FolderListModel"); #endif } }; diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp similarity index 83% rename from src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp rename to src/imports/folderlistmodel/qquickfolderlistmodel.cpp index 870479afad..5621622cca 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp @@ -40,39 +40,39 @@ ****************************************************************************/ //![code] -#include "qdeclarativefolderlistmodel.h" +#include "qquickfolderlistmodel.h" #include #include -#include +#include #ifndef QT_NO_DIRMODEL QT_BEGIN_NAMESPACE -class QDeclarativeFolderListModelPrivate +class QQuickFolderListModelPrivate { public: - QDeclarativeFolderListModelPrivate() - : sortField(QDeclarativeFolderListModel::Name), sortReversed(false), count(0), showDirs(true), showDots(false), showOnlyReadable(false), insideRefresh(false) { + QQuickFolderListModelPrivate() + : sortField(QQuickFolderListModel::Name), sortReversed(false), count(0), showDirs(true), showDots(false), showOnlyReadable(false), insideRefresh(false) { nameFilters << QLatin1String("*"); } void updateSorting() { QDir::SortFlags flags = 0; switch(sortField) { - case QDeclarativeFolderListModel::Unsorted: + case QQuickFolderListModel::Unsorted: flags |= QDir::Unsorted; break; - case QDeclarativeFolderListModel::Name: + case QQuickFolderListModel::Name: flags |= QDir::Name; break; - case QDeclarativeFolderListModel::Time: + case QQuickFolderListModel::Time: flags |= QDir::Time; break; - case QDeclarativeFolderListModel::Size: + case QQuickFolderListModel::Size: flags |= QDir::Size; break; - case QDeclarativeFolderListModel::Type: + case QQuickFolderListModel::Type: flags |= QDir::Type; break; } @@ -87,7 +87,7 @@ class QDeclarativeFolderListModelPrivate QUrl folder; QStringList nameFilters; QModelIndex folderIndex; - QDeclarativeFolderListModel::SortField sortField; + QQuickFolderListModel::SortField sortField; bool sortReversed; int count; bool showDirs; @@ -97,7 +97,7 @@ class QDeclarativeFolderListModelPrivate }; /*! - \qmlclass FolderListModel QDeclarativeFolderListModel + \qmlclass FolderListModel QQuickFolderListModel \ingroup qml-working-with-data \brief The FolderListModel provides a model of the contents of a file system folder. @@ -144,7 +144,7 @@ class QDeclarativeFolderListModelPrivate The following example shows a FolderListModel being used to provide a list of QML files in a \l ListView: - \snippet doc/src/snippets/declarative/folderlistmodel.qml 0 + \snippet doc/src/snippets/qml/folderlistmodel.qml 0 \section1 Path Separators @@ -156,7 +156,7 @@ class QDeclarativeFolderListModelPrivate \sa {QML Data Models} */ -QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent) +QQuickFolderListModel::QQuickFolderListModel(QObject *parent) : QAbstractListModel(parent) { QHash roles; @@ -164,7 +164,7 @@ QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent) roles[FilePathRole] = "filePath"; setRoleNames(roles); - d = new QDeclarativeFolderListModelPrivate; + d = new QQuickFolderListModelPrivate; d->model.setFilter(QDir::AllDirs | QDir::Files | QDir::Drives | QDir::NoDotAndDotDot); connect(&d->model, SIGNAL(rowsInserted(const QModelIndex&,int,int)) , this, SLOT(inserted(const QModelIndex&,int,int))); @@ -176,12 +176,12 @@ QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent) connect(&d->model, SIGNAL(layoutChanged()), this, SLOT(refresh())); } -QDeclarativeFolderListModel::~QDeclarativeFolderListModel() +QQuickFolderListModel::~QQuickFolderListModel() { delete d; } -QVariant QDeclarativeFolderListModel::data(const QModelIndex &index, int role) const +QVariant QQuickFolderListModel::data(const QModelIndex &index, int role) const { QVariant rv; QModelIndex modelIndex = d->model.index(index.row(), 0, d->folderIndex); @@ -200,7 +200,7 @@ QVariant QDeclarativeFolderListModel::data(const QModelIndex &index, int role) c Returns the number of items in the current folder that match the filter criteria. */ -int QDeclarativeFolderListModel::rowCount(const QModelIndex &parent) const +int QQuickFolderListModel::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent); return d->count; @@ -217,12 +217,12 @@ int QDeclarativeFolderListModel::rowCount(const QModelIndex &parent) const By default, the value is an invalid URL. */ -QUrl QDeclarativeFolderListModel::folder() const +QUrl QQuickFolderListModel::folder() const { return d->folder; } -void QDeclarativeFolderListModel::setFolder(const QUrl &folder) +void QQuickFolderListModel::setFolder(const QUrl &folder) { if (folder == d->folder) return; @@ -235,7 +235,7 @@ void QDeclarativeFolderListModel::setFolder(const QUrl &folder) } } -void QDeclarativeFolderListModel::resetFiltering() +void QQuickFolderListModel::resetFiltering() { // ensure that we reset the filtering rules, because the QDirModel::index() // function isn't quite as const as it claims to be. @@ -264,7 +264,7 @@ void QDeclarativeFolderListModel::resetFiltering() Returns the URL of the parent of of the current \l folder. */ -QUrl QDeclarativeFolderListModel::parentFolder() const +QUrl QQuickFolderListModel::parentFolder() const { QString localFile = d->folder.toLocalFile(); if (!localFile.isEmpty()) { @@ -301,22 +301,22 @@ QUrl QDeclarativeFolderListModel::parentFolder() const \note Directories are not excluded by filters. */ -QStringList QDeclarativeFolderListModel::nameFilters() const +QStringList QQuickFolderListModel::nameFilters() const { return d->nameFilters; } -void QDeclarativeFolderListModel::setNameFilters(const QStringList &filters) +void QQuickFolderListModel::setNameFilters(const QStringList &filters) { d->nameFilters = filters; d->model.setNameFilters(d->nameFilters); } -void QDeclarativeFolderListModel::classBegin() +void QQuickFolderListModel::classBegin() { } -void QDeclarativeFolderListModel::componentComplete() +void QQuickFolderListModel::componentComplete() { if (!d->folder.isValid() || d->folder.toLocalFile().isEmpty() || !QDir().exists(d->folder.toLocalFile())) setFolder(QUrl(QLatin1String("file://")+QDir::currentPath())); @@ -340,12 +340,12 @@ void QDeclarativeFolderListModel::componentComplete() \sa sortReversed */ -QDeclarativeFolderListModel::SortField QDeclarativeFolderListModel::sortField() const +QQuickFolderListModel::SortField QQuickFolderListModel::sortField() const { return d->sortField; } -void QDeclarativeFolderListModel::setSortField(SortField field) +void QQuickFolderListModel::setSortField(SortField field) { if (field != d->sortField) { d->sortField = field; @@ -360,12 +360,12 @@ void QDeclarativeFolderListModel::setSortField(SortField field) \sa sortField */ -bool QDeclarativeFolderListModel::sortReversed() const +bool QQuickFolderListModel::sortReversed() const { return d->sortReversed; } -void QDeclarativeFolderListModel::setSortReversed(bool rev) +void QQuickFolderListModel::setSortReversed(bool rev) { if (rev != d->sortReversed) { d->sortReversed = rev; @@ -379,7 +379,7 @@ void QDeclarativeFolderListModel::setSortReversed(bool rev) Returns true if the entry \a index is a folder; otherwise returns false. */ -bool QDeclarativeFolderListModel::isFolder(int index) const +bool QQuickFolderListModel::isFolder(int index) const { if (index != -1) { QModelIndex idx = d->model.index(index, 0, d->folderIndex); @@ -389,7 +389,7 @@ bool QDeclarativeFolderListModel::isFolder(int index) const return false; } -void QDeclarativeFolderListModel::refresh() +void QQuickFolderListModel::refresh() { if (d->insideRefresh) return; @@ -413,7 +413,7 @@ void QDeclarativeFolderListModel::refresh() d->insideRefresh = false; // finished refreshing. } -void QDeclarativeFolderListModel::inserted(const QModelIndex &index, int start, int end) +void QQuickFolderListModel::inserted(const QModelIndex &index, int start, int end) { if (index == d->folderIndex) { emit beginInsertRows(QModelIndex(), start, end); @@ -422,7 +422,7 @@ void QDeclarativeFolderListModel::inserted(const QModelIndex &index, int start, } } -void QDeclarativeFolderListModel::removed(const QModelIndex &index, int start, int end) +void QQuickFolderListModel::removed(const QModelIndex &index, int start, int end) { if (index == d->folderIndex) { emit beginRemoveRows(QModelIndex(), start, end); @@ -431,7 +431,7 @@ void QDeclarativeFolderListModel::removed(const QModelIndex &index, int start, i } } -void QDeclarativeFolderListModel::handleDataChanged(const QModelIndex &start, const QModelIndex &end) +void QQuickFolderListModel::handleDataChanged(const QModelIndex &start, const QModelIndex &end) { if (start.parent() == d->folderIndex) emit dataChanged(index(start.row(),0), index(end.row(),0)); @@ -449,12 +449,12 @@ void QDeclarativeFolderListModel::handleDataChanged(const QModelIndex &start, co \sa showDotAndDotDot */ -bool QDeclarativeFolderListModel::showDirs() const +bool QQuickFolderListModel::showDirs() const { return d->model.filter() & QDir::AllDirs; } -void QDeclarativeFolderListModel::setShowDirs(bool on) +void QQuickFolderListModel::setShowDirs(bool on) { if (!(d->model.filter() & QDir::AllDirs) == !on) return; @@ -477,12 +477,12 @@ void QDeclarativeFolderListModel::setShowDirs(bool on) \sa showDirs */ -bool QDeclarativeFolderListModel::showDotAndDotDot() const +bool QQuickFolderListModel::showDotAndDotDot() const { return !(d->model.filter() & QDir::NoDotAndDotDot); } -void QDeclarativeFolderListModel::setShowDotAndDotDot(bool on) +void QQuickFolderListModel::setShowDotAndDotDot(bool on) { if (!(d->model.filter() & QDir::NoDotAndDotDot) == on) return; @@ -505,12 +505,12 @@ void QDeclarativeFolderListModel::setShowDotAndDotDot(bool on) \sa showDirs */ -bool QDeclarativeFolderListModel::showOnlyReadable() const +bool QQuickFolderListModel::showOnlyReadable() const { return d->model.filter() & QDir::Readable; } -void QDeclarativeFolderListModel::setShowOnlyReadable(bool on) +void QQuickFolderListModel::setShowOnlyReadable(bool on) { if (!(d->model.filter() & QDir::Readable) == !on) return; diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h b/src/imports/folderlistmodel/qquickfolderlistmodel.h similarity index 87% rename from src/imports/folderlistmodel/qdeclarativefolderlistmodel.h rename to src/imports/folderlistmodel/qquickfolderlistmodel.h index 5f9cb0e81a..10af7c8075 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h +++ b/src/imports/folderlistmodel/qquickfolderlistmodel.h @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEFOLDERLISTMODEL_H -#define QDECLARATIVEFOLDERLISTMODEL_H +#ifndef QQUICKFOLDERLISTMODEL_H +#define QQUICKFOLDERLISTMODEL_H -#include +#include #include #include #include @@ -54,16 +54,16 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeContext; +class QQmlContext; class QModelIndex; -class QDeclarativeFolderListModelPrivate; +class QQuickFolderListModelPrivate; //![class begin] -class QDeclarativeFolderListModel : public QAbstractListModel, public QDeclarativeParserStatus +class QQuickFolderListModel : public QAbstractListModel, public QQmlParserStatus { Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) //![class begin] //![class props] @@ -80,8 +80,8 @@ class QDeclarativeFolderListModel : public QAbstractListModel, public QDeclarati //![abslistmodel] public: - QDeclarativeFolderListModel(QObject *parent = 0); - ~QDeclarativeFolderListModel(); + QQuickFolderListModel(QObject *parent = 0); + ~QQuickFolderListModel(); enum Roles { FileNameRole = Qt::UserRole+1, FilePathRole = Qt::UserRole+2 }; @@ -141,19 +141,19 @@ private Q_SLOTS: void handleDataChanged(const QModelIndex &start, const QModelIndex &end); private: - Q_DISABLE_COPY(QDeclarativeFolderListModel) - QDeclarativeFolderListModelPrivate *d; + Q_DISABLE_COPY(QQuickFolderListModel) + QQuickFolderListModelPrivate *d; }; //![class end] QT_END_NAMESPACE //![qml decl] -QML_DECLARE_TYPE(QDeclarativeFolderListModel) +QML_DECLARE_TYPE(QQuickFolderListModel) //![qml decl] QT_END_HEADER #endif // QT_NO_DIRMODEL -#endif // QDECLARATIVEFOLDERLISTMODEL_H +#endif // QQUICKFOLDERLISTMODEL_H diff --git a/src/imports/localstorage/localstorage.pro b/src/imports/localstorage/localstorage.pro index 51a69aac4f..c54bc564d9 100644 --- a/src/imports/localstorage/localstorage.pro +++ b/src/imports/localstorage/localstorage.pro @@ -2,11 +2,11 @@ TARGET = qmllocalstorageplugin TARGETPATH = QtQuick/LocalStorage include(../qimportbase.pri) -QT += sql declarative declarative-private v8-private core-private +QT += sql qml qml-private v8-private core-private SOURCES += plugin.cpp -DESTDIR = $$QT.declarative.imports/$$TARGETPATH +DESTDIR = $$QT.qml.imports/$$TARGETPATH target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH qmldir.files += $$PWD/qmldir diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index dd747d0d09..77e68877d4 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -39,9 +39,9 @@ ** ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -83,18 +83,18 @@ return; \ } -class QDeclarativeSqlDatabaseData : public QV8Engine::Deletable +class QQmlSqlDatabaseData : public QV8Engine::Deletable { public: - QDeclarativeSqlDatabaseData(QV8Engine *engine); - ~QDeclarativeSqlDatabaseData(); + QQmlSqlDatabaseData(QV8Engine *engine); + ~QQmlSqlDatabaseData(); v8::Persistent constructor; v8::Persistent queryConstructor; v8::Persistent rowsConstructor; }; -V8_DEFINE_EXTENSION(QDeclarativeSqlDatabaseData, databaseData) +V8_DEFINE_EXTENSION(QQmlSqlDatabaseData, databaseData) class QV8SqlDatabaseResource : public QV8ObjectResource { @@ -167,7 +167,7 @@ static void qmlsqldatabase_rows_setForwardOnly(v8::Local /* property r->query.setForwardOnly(value->BooleanValue()); } -QDeclarativeSqlDatabaseData::~QDeclarativeSqlDatabaseData() +QQmlSqlDatabaseData::~QQmlSqlDatabaseData() { qPersistentDispose(constructor); qPersistentDispose(queryConstructor); @@ -239,14 +239,14 @@ static v8::Handle qmlsqldatabase_executeSql(const v8::Arguments& args QV8Engine *engine = r->engine; if (!r->inTransaction) - V8THROW_SQL(SQLEXCEPTION_DATABASE_ERR,QDeclarativeEngine::tr("executeSql called outside transaction()")); + V8THROW_SQL(SQLEXCEPTION_DATABASE_ERR,QQmlEngine::tr("executeSql called outside transaction()")); QSqlDatabase db = r->database; QString sql = engine->toString(args[0]); if (r->readonly && !sql.startsWith(QLatin1String("SELECT"),Qt::CaseInsensitive)) { - V8THROW_SQL(SQLEXCEPTION_SYNTAX_ERR, QDeclarativeEngine::tr("Read-only Transaction")); + V8THROW_SQL(SQLEXCEPTION_SYNTAX_ERR, QQmlEngine::tr("Read-only Transaction")); } QSqlQuery query(db); @@ -316,7 +316,7 @@ static v8::Handle qmlsqldatabase_changeVersion(const v8::Arguments& a v8::Handle callback = args[2]; if (from_version != r->version) - V8THROW_SQL(SQLEXCEPTION_VERSION_ERR, QDeclarativeEngine::tr("Version mismatch: expected %1, found %2").arg(from_version).arg(r->version)); + V8THROW_SQL(SQLEXCEPTION_VERSION_ERR, QQmlEngine::tr("Version mismatch: expected %1, found %2").arg(from_version).arg(r->version)); v8::Local instance = databaseData(engine)->queryConstructor->NewInstance(); QV8SqlDatabaseResource *r2 = new QV8SqlDatabaseResource(engine); @@ -341,7 +341,7 @@ static v8::Handle qmlsqldatabase_changeVersion(const v8::Arguments& a return v8::Handle(); } else if (!db.commit()) { db.rollback(); - V8THROW_SQL(SQLEXCEPTION_UNKNOWN_ERR,QDeclarativeEngine::tr("SQL transaction failed")); + V8THROW_SQL(SQLEXCEPTION_UNKNOWN_ERR,QQmlEngine::tr("SQL transaction failed")); } else { ok = true; } @@ -369,7 +369,7 @@ static v8::Handle qmlsqldatabase_transaction_shared(const v8::Argumen QV8Engine *engine = r->engine; if (args.Length() == 0 || !args[0]->IsFunction()) - V8THROW_SQL(SQLEXCEPTION_UNKNOWN_ERR,QDeclarativeEngine::tr("transaction: missing callback")); + V8THROW_SQL(SQLEXCEPTION_UNKNOWN_ERR,QQmlEngine::tr("transaction: missing callback")); QSqlDatabase db = r->database; v8::Handle callback = v8::Handle::Cast(args[0]); @@ -410,7 +410,7 @@ static v8::Handle qmlsqldatabase_read_transaction(const v8::Arguments return qmlsqldatabase_transaction_shared(args, true); } -QDeclarativeSqlDatabaseData::QDeclarativeSqlDatabaseData(QV8Engine *engine) +QQmlSqlDatabaseData::QQmlSqlDatabaseData(QV8Engine *engine) { { v8::Local ft = v8::FunctionTemplate::New(); @@ -460,7 +460,7 @@ through the data. These databases are user-specific and QML-specific, but accessible to all QML applications. They are stored in the \c Databases subdirectory -of QDeclarativeEngine::offlineStoragePath(), currently as SQLite databases. +of QQmlEngine::offlineStoragePath(), currently as SQLite databases. Database connections are automatically closed during Javascript garbage collection. @@ -549,7 +549,7 @@ class QQuickLocalStorage : public QObject ~QQuickLocalStorage() { } - Q_INVOKABLE void openDatabaseSync(QDeclarativeV8Function* args); + Q_INVOKABLE void openDatabaseSync(QQmlV8Function* args); }; /*! @@ -563,7 +563,7 @@ class QQuickLocalStorage : public QObject * \c callback is an optional parameter, which is invoked if the database has not yet been created. * \return the database object */ -void QQuickLocalStorage::openDatabaseSync(QDeclarativeV8Function *args) +void QQuickLocalStorage::openDatabaseSync(QQmlV8Function *args) { #ifndef QT_NO_SETTINGS QV8Engine *engine = args->engine(); @@ -592,7 +592,7 @@ void QQuickLocalStorage::openDatabaseSync(QDeclarativeV8Function *args) database = QSqlDatabase::database(dbid); version = ini.value(QLatin1String("Version")).toString(); if (version != dbversion && !dbversion.isEmpty() && !version.isEmpty()) - V8THROW_SQL_VOID(SQLEXCEPTION_VERSION_ERR, QDeclarativeEngine::tr("SQL: database version mismatch")); + V8THROW_SQL_VOID(SQLEXCEPTION_VERSION_ERR, QQmlEngine::tr("SQL: database version mismatch")); } else { created = !QFile::exists(basename+QLatin1String(".sqlite")); database = QSqlDatabase::addDatabase(QLatin1String("QSQLITE"), dbid); @@ -607,7 +607,7 @@ void QQuickLocalStorage::openDatabaseSync(QDeclarativeV8Function *args) } else { if (!dbversion.isEmpty() && ini.value(QLatin1String("Version")) != dbversion) { // Incompatible - V8THROW_SQL_VOID(SQLEXCEPTION_VERSION_ERR,QDeclarativeEngine::tr("SQL: database version mismatch")); + V8THROW_SQL_VOID(SQLEXCEPTION_VERSION_ERR,QQmlEngine::tr("SQL: database version mismatch")); } version = ini.value(QLatin1String("Version")).toString(); } @@ -639,7 +639,7 @@ void QQuickLocalStorage::openDatabaseSync(QDeclarativeV8Function *args) #endif // QT_NO_SETTINGS } -static QObject *module_api_factory(QDeclarativeEngine *engine, QJSEngine *scriptEngine) +static QObject *module_api_factory(QQmlEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(engine) Q_UNUSED(scriptEngine) @@ -648,11 +648,11 @@ static QObject *module_api_factory(QDeclarativeEngine *engine, QJSEngine *script return api; } -class QDeclarativeLocalStoragePlugin : public QDeclarativeExtensionPlugin +class QQmlLocalStoragePlugin : public QQmlExtensionPlugin { Q_OBJECT public: - QDeclarativeLocalStoragePlugin() + QQmlLocalStoragePlugin() { } @@ -665,4 +665,4 @@ class QDeclarativeLocalStoragePlugin : public QDeclarativeExtensionPlugin #include "plugin.moc" -Q_EXPORT_PLUGIN2(plugin, QDeclarativeLocalStoragePlugin); +Q_EXPORT_PLUGIN2(plugin, QQmlLocalStoragePlugin); diff --git a/src/imports/qimportbase.pri b/src/imports/qimportbase.pri index 110d145e94..ab54e4b1b9 100644 --- a/src/imports/qimportbase.pri +++ b/src/imports/qimportbase.pri @@ -14,7 +14,7 @@ isEmpty(TARGET) { QMLDIRFILE = $${_PRO_FILE_PWD_}/qmldir copy2build.input = QMLDIRFILE -copy2build.output = $$QT.declarative.imports/$$TARGETPATH/qmldir +copy2build.output = $$QT.qml.imports/$$TARGETPATH/qmldir !contains(TEMPLATE_PREFIX, vc):copy2build.variable_out = PRE_TARGETDEPS copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} copy2build.name = COPY ${QMAKE_FILE_IN} diff --git a/src/imports/qtquick2/plugin.cpp b/src/imports/qtquick2/plugin.cpp index 808d5196b2..2cb70a4fd3 100644 --- a/src/imports/qtquick2/plugin.cpp +++ b/src/imports/qtquick2/plugin.cpp @@ -39,23 +39,23 @@ ** ****************************************************************************/ -#include +#include #include QT_BEGIN_NAMESPACE //![class decl] -class QtQuick2Plugin : public QDeclarativeExtensionPlugin +class QtQuick2Plugin : public QQmlExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface/1.0") + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") public: virtual void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick")); Q_UNUSED(uri); - QDeclarativeQtQuick2Module::defineModule(); + QQmlQtQuick2Module::defineModule(); } }; //![class decl] diff --git a/src/imports/qtquick2/qtquick2.pro b/src/imports/qtquick2/qtquick2.pro index 3f76abd87f..3a95c5fd21 100644 --- a/src/imports/qtquick2/qtquick2.pro +++ b/src/imports/qtquick2/qtquick2.pro @@ -5,12 +5,12 @@ include(../qimportbase.pri) SOURCES += \ plugin.cpp -QT += quick-private declarative-private +QT += quick-private qml-private OTHER_FILES += \ qmldir -DESTDIR = $$QT.declarative.imports/$$TARGETPATH +DESTDIR = $$QT.qml.imports/$$TARGETPATH target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH qmldir.files += $$PWD/qmldir diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp index 672de10639..8ab745a7d2 100644 --- a/src/imports/testlib/main.cpp +++ b/src/imports/testlib/main.cpp @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include "QtQuickTest/private/quicktestresult_p.h" #include "QtQuickTest/private/quicktestevent_p.h" #include "private/qtestoptions_p.h" #include "QtQuick/qquickitem.h" -#include +#include QML_DECLARE_TYPE(QuickTestResult) QML_DECLARE_TYPE(QuickTestEvent) @@ -81,15 +81,15 @@ class QuickTestUtil : public QObject void wrapperChanged(); public Q_SLOTS: - QDeclarativeV8Handle typeName(const QVariant& v) const + QQmlV8Handle typeName(const QVariant& v) const { QString name(v.typeName()); //qDebug() << "type:" << name << " string value:" << v.toString() << " value:" << v; if (v.canConvert()) { - QDeclarativeType *type = 0; + QQmlType *type = 0; const QMetaObject *mo = v.value()->metaObject(); while (!type && mo) { - type = QDeclarativeMetaType::qmlType(mo); + type = QQmlMetaType::qmlType(mo); mo = mo->superClass(); } if (type) { @@ -97,22 +97,22 @@ public Q_SLOTS: } } - return QDeclarativeV8Handle::fromHandle(v8::String::New(name.toUtf8())); + return QQmlV8Handle::fromHandle(v8::String::New(name.toUtf8())); } bool compare(const QVariant& act, const QVariant& exp) const { return act == exp; } - QDeclarativeV8Handle callerFile(int frameIndex = 0) const + QQmlV8Handle callerFile(int frameIndex = 0) const { v8::Local stacks = v8::StackTrace::CurrentStackTrace(10, v8::StackTrace::kDetailed); int count = stacks->GetFrameCount(); if (count >= frameIndex + 1) { v8::Local frame = stacks->GetFrame(frameIndex + 1); - return QDeclarativeV8Handle::fromHandle(frame->GetScriptNameOrSourceURL()); + return QQmlV8Handle::fromHandle(frame->GetScriptNameOrSourceURL()); } - return QDeclarativeV8Handle(); + return QQmlV8Handle(); } int callerLine(int frameIndex = 0) const { @@ -132,7 +132,7 @@ QML_DECLARE_TYPE(QuickTestUtil) QT_BEGIN_NAMESPACE -class QTestQmlModule : public QDeclarativeExtensionPlugin +class QTestQmlModule : public QQmlExtensionPlugin { Q_OBJECT public: @@ -144,7 +144,7 @@ class QTestQmlModule : public QDeclarativeExtensionPlugin qmlRegisterType(uri,1,0,"TestUtil"); } - void initializeEngine(QDeclarativeEngine *, const char *) + void initializeEngine(QQmlEngine *, const char *) { } }; diff --git a/src/imports/testlib/signalspy.h b/src/imports/testlib/signalspy.h index 6b5166d8e0..6542203ce4 100644 --- a/src/imports/testlib/signalspy.h +++ b/src/imports/testlib/signalspy.h @@ -44,20 +44,20 @@ // This is a dummy header for defining the interface of "SignalSpy.qml" to qdoc. -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class SignalSpy : public QDeclarativeItem +class SignalSpy : public QQuickItem { Q_OBJECT Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged) Q_PROPERTY(QString signalName READ signalName WRITE signalName NOTIFY signalNameChanged) Q_PROPERTY(int count READ count countChanged) public: - SignalSpy(QDeclarativeItem *parent) : QDeclarativeItem(parent) {} + SignalSpy(QQuickItem *parent) : QQuickItem(parent) {} ~SignalSpy() QObject *target() const; diff --git a/src/imports/testlib/testcase.h b/src/imports/testlib/testcase.h index 1793cca0f2..e7758ec9df 100644 --- a/src/imports/testlib/testcase.h +++ b/src/imports/testlib/testcase.h @@ -44,13 +44,13 @@ // This is a dummy header for defining the interface of "TestCase.qml" to qdoc. -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class TestCase : public QDeclarativeItem +class TestCase : public QQuickItem { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) @@ -60,7 +60,7 @@ class TestCase : public QDeclarativeItem Q_PROPERTY(bool running READ running NOTIFY runningChanged) Q_PROPERTY(bool windowShown READ windowShown NOTIFY windowShownChanged) public: - TestCase(QDeclarativeItem *parent) : QDeclarativeItem(parent) {} + TestCase(QQuickItem *parent) : QQuickItem(parent) {} ~TestCase() QString name() const; diff --git a/src/imports/testlib/testlib.pro b/src/imports/testlib/testlib.pro index 3b8a5bf75e..a4cb03466e 100644 --- a/src/imports/testlib/testlib.pro +++ b/src/imports/testlib/testlib.pro @@ -4,12 +4,12 @@ include(../qimportbase.pri) CONFIG += qt plugin -QT += declarative quick qmltest qmltest-private v8-private declarative-private core-private testlib +QT += qml quick qmltest qmltest-private v8-private qml-private core-private testlib SOURCES += main.cpp HEADERS += -DESTDIR = $$QT.declarative.imports/$$TARGETPATH +DESTDIR = $$QT.qml.imports/$$TARGETPATH target.path += $$[QT_INSTALL_IMPORTS]/QtTest OTHER_IMPORT_FILES = \ @@ -23,7 +23,7 @@ otherImportFiles.files += $$OTHER_IMPORT_FILES otherImportFiles.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH copy2build.input = OTHER_IMPORT_FILES -copy2build.output = $$QT.declarative.imports/$$TARGETPATH/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} +copy2build.output = $$QT.qml.imports/$$TARGETPATH/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} INSTALLS += target otherImportFiles diff --git a/src/imports/xmllistmodel/plugin.cpp b/src/imports/xmllistmodel/plugin.cpp index 9085a60885..54a6d5e212 100644 --- a/src/imports/xmllistmodel/plugin.cpp +++ b/src/imports/xmllistmodel/plugin.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,22 +39,22 @@ ** ****************************************************************************/ -#include -#include +#include +#include -#include "qdeclarativexmllistmodel_p.h" +#include "qqmlxmllistmodel_p.h" QT_BEGIN_NAMESPACE -class QmlXmlListModelPlugin : public QDeclarativeExtensionPlugin +class QmlXmlListModelPlugin : public QQmlExtensionPlugin { Q_OBJECT public: virtual void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.XmlListModel")); - qmlRegisterType(uri,2,0,"XmlListModel"); - qmlRegisterType(uri,2,0,"XmlRole"); + qmlRegisterType(uri,2,0,"XmlListModel"); + qmlRegisterType(uri,2,0,"XmlRole"); } }; diff --git a/src/imports/xmllistmodel/qdeclarativexmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp similarity index 75% rename from src/imports/xmllistmodel/qdeclarativexmllistmodel.cpp rename to src/imports/xmllistmodel/qqmlxmllistmodel.cpp index db7fec2c97..1377859b5e 100644 --- a/src/imports/xmllistmodel/qdeclarativexmllistmodel.cpp +++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#include "qdeclarativexmllistmodel_p.h" +#include "qqmlxmllistmodel_p.h" -#include -#include +#include +#include #include #include @@ -59,22 +59,22 @@ #include -Q_DECLARE_METATYPE(QDeclarativeXmlQueryResult) +Q_DECLARE_METATYPE(QQuickXmlQueryResult) QT_BEGIN_NAMESPACE -typedef QPair QDeclarativeXmlListRange; +typedef QPair QQuickXmlListRange; #define XMLLISTMODEL_CLEAR_ID 0 /*! - \qmlclass XmlRole QDeclarativeXmlListModelRole + \qmlclass XmlRole QQuickXmlListModelRole \inqmlmodule QtQuick 2 \ingroup qml-working-with-data \brief The XmlRole element allows you to specify a role for an XmlListModel. - \sa {QtDeclarative} + \sa {QtQml} */ /*! @@ -111,12 +111,12 @@ typedef QPair QDeclarativeXmlListRange; For example, if there is an XML document like this: - \quotefile doc/src/snippets/declarative/xmlrole.xml + \quotefile doc/src/snippets/qml/xmlrole.xml Here are some valid XPath expressions for XmlRole queries on this document: - \snippet doc/src/snippets/declarative/xmlrole.qml 0 + \snippet doc/src/snippets/qml/xmlrole.qml 0 \dots 4 - \snippet doc/src/snippets/declarative/xmlrole.qml 1 + \snippet doc/src/snippets/qml/xmlrole.qml 1 See the \l{http://www.w3.org/TR/xpath20/}{W3C XPath 2.0 specification} for more information. */ @@ -145,37 +145,37 @@ struct XmlQueryJob }; -class QDeclarativeXmlQueryEngine; -class QDeclarativeXmlQueryThreadObject : public QObject +class QQuickXmlQueryEngine; +class QQuickXmlQueryThreadObject : public QObject { Q_OBJECT public: - QDeclarativeXmlQueryThreadObject(QDeclarativeXmlQueryEngine *); + QQuickXmlQueryThreadObject(QQuickXmlQueryEngine *); void processJobs(); virtual bool event(QEvent *e); private: - QDeclarativeXmlQueryEngine *m_queryEngine; + QQuickXmlQueryEngine *m_queryEngine; }; -class QDeclarativeXmlQueryEngine : public QThread +class QQuickXmlQueryEngine : public QThread { Q_OBJECT public: - QDeclarativeXmlQueryEngine(QDeclarativeEngine *eng); - ~QDeclarativeXmlQueryEngine(); + QQuickXmlQueryEngine(QQmlEngine *eng); + ~QQuickXmlQueryEngine(); - int doQuery(QString query, QString namespaces, QByteArray data, QList* roleObjects, QStringList keyRoleResultsCache); + int doQuery(QString query, QString namespaces, QByteArray data, QList* roleObjects, QStringList keyRoleResultsCache); void abort(int id); void processJobs(); - static QDeclarativeXmlQueryEngine *instance(QDeclarativeEngine *engine); + static QQuickXmlQueryEngine *instance(QQmlEngine *engine); signals: - void queryCompleted(const QDeclarativeXmlQueryResult &); + void queryCompleted(const QQuickXmlQueryResult &); void error(void*, const QString&); protected: @@ -183,38 +183,38 @@ class QDeclarativeXmlQueryEngine : public QThread private: void processQuery(XmlQueryJob *job); - void doQueryJob(XmlQueryJob *job, QDeclarativeXmlQueryResult *currentResult); - void doSubQueryJob(XmlQueryJob *job, QDeclarativeXmlQueryResult *currentResult); + void doQueryJob(XmlQueryJob *job, QQuickXmlQueryResult *currentResult); + void doSubQueryJob(XmlQueryJob *job, QQuickXmlQueryResult *currentResult); void getValuesOfKeyRoles(const XmlQueryJob& currentJob, QStringList *values, QXmlQuery *query) const; - void addIndexToRangeList(QList *ranges, int index) const; + void addIndexToRangeList(QList *ranges, int index) const; QMutex m_mutex; - QDeclarativeXmlQueryThreadObject *m_threadObject; + QQuickXmlQueryThreadObject *m_threadObject; QList m_jobs; QSet m_cancelledJobs; QAtomicInt m_queryIds; - QDeclarativeEngine *m_engine; + QQmlEngine *m_engine; QObject *m_eventLoopQuitHack; - static QHash queryEngines; + static QHash queryEngines; static QMutex queryEnginesMutex; }; -QHash QDeclarativeXmlQueryEngine::queryEngines; -QMutex QDeclarativeXmlQueryEngine::queryEnginesMutex; +QHash QQuickXmlQueryEngine::queryEngines; +QMutex QQuickXmlQueryEngine::queryEnginesMutex; -QDeclarativeXmlQueryThreadObject::QDeclarativeXmlQueryThreadObject(QDeclarativeXmlQueryEngine *e) +QQuickXmlQueryThreadObject::QQuickXmlQueryThreadObject(QQuickXmlQueryEngine *e) : m_queryEngine(e) { } -void QDeclarativeXmlQueryThreadObject::processJobs() +void QQuickXmlQueryThreadObject::processJobs() { QCoreApplication::postEvent(this, new QEvent(QEvent::User)); } -bool QDeclarativeXmlQueryThreadObject::event(QEvent *e) +bool QQuickXmlQueryThreadObject::event(QEvent *e) { if (e->type() == QEvent::User) { m_queryEngine->processJobs(); @@ -226,10 +226,10 @@ bool QDeclarativeXmlQueryThreadObject::event(QEvent *e) -QDeclarativeXmlQueryEngine::QDeclarativeXmlQueryEngine(QDeclarativeEngine *eng) +QQuickXmlQueryEngine::QQuickXmlQueryEngine(QQmlEngine *eng) : QThread(eng), m_threadObject(0), m_queryIds(XMLLISTMODEL_CLEAR_ID + 1), m_engine(eng), m_eventLoopQuitHack(0) { - qRegisterMetaType("QDeclarativeXmlQueryResult"); + qRegisterMetaType("QQuickXmlQueryResult"); m_eventLoopQuitHack = new QObject; m_eventLoopQuitHack->moveToThread(this); @@ -237,7 +237,7 @@ QDeclarativeXmlQueryEngine::QDeclarativeXmlQueryEngine(QDeclarativeEngine *eng) start(QThread::IdlePriority); } -QDeclarativeXmlQueryEngine::~QDeclarativeXmlQueryEngine() +QQuickXmlQueryEngine::~QQuickXmlQueryEngine() { queryEnginesMutex.lock(); queryEngines.remove(m_engine); @@ -247,7 +247,7 @@ QDeclarativeXmlQueryEngine::~QDeclarativeXmlQueryEngine() wait(); } -int QDeclarativeXmlQueryEngine::doQuery(QString query, QString namespaces, QByteArray data, QList* roleObjects, QStringList keyRoleResultsCache) { +int QQuickXmlQueryEngine::doQuery(QString query, QString namespaces, QByteArray data, QList* roleObjects, QStringList keyRoleResultsCache) { { QMutexLocker m1(&m_mutex); m_queryIds.ref(); @@ -283,17 +283,17 @@ int QDeclarativeXmlQueryEngine::doQuery(QString query, QString namespaces, QByte return job.queryId; } -void QDeclarativeXmlQueryEngine::abort(int id) +void QQuickXmlQueryEngine::abort(int id) { QMutexLocker ml(&m_mutex); if (id != -1) m_cancelledJobs.insert(id); } -void QDeclarativeXmlQueryEngine::run() +void QQuickXmlQueryEngine::run() { m_mutex.lock(); - m_threadObject = new QDeclarativeXmlQueryThreadObject(this); + m_threadObject = new QQuickXmlQueryThreadObject(this); m_mutex.unlock(); processJobs(); @@ -303,7 +303,7 @@ void QDeclarativeXmlQueryEngine::run() m_threadObject = 0; } -void QDeclarativeXmlQueryEngine::processJobs() +void QQuickXmlQueryEngine::processJobs() { QMutexLocker locker(&m_mutex); @@ -324,12 +324,12 @@ void QDeclarativeXmlQueryEngine::processJobs() } } -QDeclarativeXmlQueryEngine *QDeclarativeXmlQueryEngine::instance(QDeclarativeEngine *engine) +QQuickXmlQueryEngine *QQuickXmlQueryEngine::instance(QQmlEngine *engine) { queryEnginesMutex.lock(); - QDeclarativeXmlQueryEngine *queryEng = queryEngines.value(engine); + QQuickXmlQueryEngine *queryEng = queryEngines.value(engine); if (!queryEng) { - queryEng = new QDeclarativeXmlQueryEngine(engine); + queryEng = new QQuickXmlQueryEngine(engine); queryEngines.insert(engine, queryEng); } queryEnginesMutex.unlock(); @@ -337,9 +337,9 @@ QDeclarativeXmlQueryEngine *QDeclarativeXmlQueryEngine::instance(QDeclarativeEng return queryEng; } -void QDeclarativeXmlQueryEngine::processQuery(XmlQueryJob *job) +void QQuickXmlQueryEngine::processQuery(XmlQueryJob *job) { - QDeclarativeXmlQueryResult result; + QQuickXmlQueryResult result; result.queryId = job->queryId; doQueryJob(job, &result); doSubQueryJob(job, &result); @@ -354,7 +354,7 @@ void QDeclarativeXmlQueryEngine::processQuery(XmlQueryJob *job) } } -void QDeclarativeXmlQueryEngine::doQueryJob(XmlQueryJob *currentJob, QDeclarativeXmlQueryResult *currentResult) +void QQuickXmlQueryEngine::doQueryJob(XmlQueryJob *currentJob, QQuickXmlQueryResult *currentResult) { Q_ASSERT(currentJob->queryId != -1); @@ -393,7 +393,7 @@ void QDeclarativeXmlQueryEngine::doQueryJob(XmlQueryJob *currentJob, QDeclarativ currentResult->size = (count > 0 ? count : 0); } -void QDeclarativeXmlQueryEngine::getValuesOfKeyRoles(const XmlQueryJob& currentJob, QStringList *values, QXmlQuery *query) const +void QQuickXmlQueryEngine::getValuesOfKeyRoles(const XmlQueryJob& currentJob, QStringList *values, QXmlQuery *query) const { const QStringList &keysQueries = currentJob.keyRoleQueries; QString keysQuery; @@ -414,7 +414,7 @@ void QDeclarativeXmlQueryEngine::getValuesOfKeyRoles(const XmlQueryJob& currentJ } } -void QDeclarativeXmlQueryEngine::addIndexToRangeList(QList *ranges, int index) const { +void QQuickXmlQueryEngine::addIndexToRangeList(QList *ranges, int index) const { if (ranges->isEmpty()) ranges->append(qMakePair(index, 1)); else if (ranges->last().first + ranges->last().second == index) @@ -423,7 +423,7 @@ void QDeclarativeXmlQueryEngine::addIndexToRangeList(QListappend(qMakePair(index, 1)); } -void QDeclarativeXmlQueryEngine::doSubQueryJob(XmlQueryJob *currentJob, QDeclarativeXmlQueryResult *currentResult) +void QQuickXmlQueryEngine::doSubQueryJob(XmlQueryJob *currentJob, QQuickXmlQueryResult *currentResult) { Q_ASSERT(currentJob->queryId != -1); @@ -489,7 +489,7 @@ void QDeclarativeXmlQueryEngine::doSubQueryJob(XmlQueryJob *currentJob, QDeclara /*for (int j = 0; j < m_size; ++j) { QList resultList; for (int i = 0; i < m_roleObjects->size(); ++i) { - QDeclarativeXmlListModelRole *role = m_roleObjects->at(i); + QQuickXmlListModelRole *role = m_roleObjects->at(i); subquery.setQuery(m_prefix.arg(j+1) + role->query()); if (role->isStringList()) { QStringList data; @@ -514,27 +514,27 @@ void QDeclarativeXmlQueryEngine::doSubQueryJob(XmlQueryJob *currentJob, QDeclara }*/ } -class QDeclarativeXmlListModelPrivate : public QObjectPrivate +class QQuickXmlListModelPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeXmlListModel) + Q_DECLARE_PUBLIC(QQuickXmlListModel) public: - QDeclarativeXmlListModelPrivate() + QQuickXmlListModelPrivate() : isComponentComplete(true), size(-1), highestRole(Qt::UserRole) - , reply(0), status(QDeclarativeXmlListModel::Null), progress(0.0) + , reply(0), status(QQuickXmlListModel::Null), progress(0.0) , queryId(-1), roleObjects(), redirectCount(0) {} void notifyQueryStarted(bool remoteSource) { - Q_Q(QDeclarativeXmlListModel); + Q_Q(QQuickXmlListModel); progress = remoteSource ? 0.0 : 1.0; - status = QDeclarativeXmlListModel::Loading; + status = QQuickXmlListModel::Loading; errorString.clear(); emit q->progressChanged(progress); emit q->statusChanged(status); } void deleteReply() { - Q_Q(QDeclarativeXmlListModel); + Q_Q(QQuickXmlListModel); if (reply) { QObject::disconnect(reply, 0, q, 0); reply->deleteLater(); @@ -553,23 +553,23 @@ class QDeclarativeXmlListModelPrivate : public QObjectPrivate int highestRole; QNetworkReply *reply; - QDeclarativeXmlListModel::Status status; + QQuickXmlListModel::Status status; QString errorString; qreal progress; int queryId; QStringList keyRoleResultsCache; - QList roleObjects; + QList roleObjects; - static void append_role(QDeclarativeListProperty *list, QDeclarativeXmlListModelRole *role); - static void clear_role(QDeclarativeListProperty *list); + static void append_role(QQmlListProperty *list, QQuickXmlListModelRole *role); + static void clear_role(QQmlListProperty *list); QList > data; int redirectCount; }; -void QDeclarativeXmlListModelPrivate::append_role(QDeclarativeListProperty *list, QDeclarativeXmlListModelRole *role) +void QQuickXmlListModelPrivate::append_role(QQmlListProperty *list, QQuickXmlListModelRole *role) { - QDeclarativeXmlListModel *_this = qobject_cast(list->object); + QQuickXmlListModel *_this = qobject_cast(list->object); if (_this && role) { int i = _this->d_func()->roleObjects.count(); _this->d_func()->roleObjects.append(role); @@ -585,16 +585,16 @@ void QDeclarativeXmlListModelPrivate::append_role(QDeclarativeListProperty *list) +void QQuickXmlListModelPrivate::clear_role(QQmlListProperty *list) { - QDeclarativeXmlListModel *_this = static_cast(list->object); + QQuickXmlListModel *_this = static_cast(list->object); _this->d_func()->roles.clear(); _this->d_func()->roleNames.clear(); _this->d_func()->roleObjects.clear(); } /*! - \qmlclass XmlListModel QDeclarativeXmlListModel + \qmlclass XmlListModel QQuickXmlListModel \inqmlmodule QtQuick 2 \ingroup qml-working-with-data \brief The XmlListModel element is used to specify a read-only model using XPath expressions. @@ -690,12 +690,12 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty QDeclarativeXmlListModel::roleObjects() +QQmlListProperty QQuickXmlListModel::roleObjects() { - Q_D(QDeclarativeXmlListModel); - QDeclarativeListProperty list(this, d->roleObjects); - list.append = &QDeclarativeXmlListModelPrivate::append_role; - list.clear = &QDeclarativeXmlListModelPrivate::clear_role; + Q_D(QQuickXmlListModel); + QQmlListProperty list(this, d->roleObjects); + list.append = &QQuickXmlListModelPrivate::append_role; + list.clear = &QQuickXmlListModelPrivate::clear_role; return list; } -QHash QDeclarativeXmlListModel::data(int index, const QList &roles) const +QHash QQuickXmlListModel::data(int index, const QList &roles) const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); QHash rv; for (int i = 0; i < roles.size(); ++i) { int role = roles.at(i); @@ -725,9 +725,9 @@ QHash QDeclarativeXmlListModel::data(int index, const QList & return rv; } -QVariant QDeclarativeXmlListModel::data(int index, int role) const +QVariant QQuickXmlListModel::data(int index, int role) const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); int roleIndex = d->roles.indexOf(role); return (roleIndex == -1) ? QVariant() : d->data.value(roleIndex).value(index); } @@ -736,21 +736,21 @@ QVariant QDeclarativeXmlListModel::data(int index, int role) const \qmlproperty int QtQuick2::XmlListModel::count The number of data entries in the model. */ -int QDeclarativeXmlListModel::count() const +int QQuickXmlListModel::count() const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); return d->size; } -QList QDeclarativeXmlListModel::roles() const +QList QQuickXmlListModel::roles() const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); return d->roles; } -QString QDeclarativeXmlListModel::toString(int role) const +QString QQuickXmlListModel::toString(int role) const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); int index = d->roles.indexOf(role); if (index == -1) return QString(); @@ -763,15 +763,15 @@ QString QDeclarativeXmlListModel::toString(int role) const If both \c source and \l xml are set, \l xml is used. */ -QUrl QDeclarativeXmlListModel::source() const +QUrl QQuickXmlListModel::source() const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); return d->src; } -void QDeclarativeXmlListModel::setSource(const QUrl &src) +void QQuickXmlListModel::setSource(const QUrl &src) { - Q_D(QDeclarativeXmlListModel); + Q_D(QQuickXmlListModel); if (d->src != src) { d->src = src; if (d->xml.isEmpty()) // src is only used if d->xml is not set @@ -788,15 +788,15 @@ void QDeclarativeXmlListModel::setSource(const QUrl &src) If both \l source and \c xml are set, \c xml is used. */ -QString QDeclarativeXmlListModel::xml() const +QString QQuickXmlListModel::xml() const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); return d->xml; } -void QDeclarativeXmlListModel::setXml(const QString &xml) +void QQuickXmlListModel::setXml(const QString &xml) { - Q_D(QDeclarativeXmlListModel); + Q_D(QQuickXmlListModel); if (d->xml != xml) { d->xml = xml; reload(); @@ -809,17 +809,17 @@ void QDeclarativeXmlListModel::setXml(const QString &xml) An absolute XPath query representing the base query for creating model items from this model's XmlRole objects. The query should start with '/' or '//'. */ -QString QDeclarativeXmlListModel::query() const +QString QQuickXmlListModel::query() const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); return d->query; } -void QDeclarativeXmlListModel::setQuery(const QString &query) +void QQuickXmlListModel::setQuery(const QString &query) { - Q_D(QDeclarativeXmlListModel); + Q_D(QQuickXmlListModel); if (!query.startsWith(QLatin1Char('/'))) { - qmlInfo(this) << QCoreApplication::translate("QDeclarativeXmlRoleList", "An XmlListModel query must start with '/' or \"//\""); + qmlInfo(this) << QCoreApplication::translate("QQuickXmlRoleList", "An XmlListModel query must start with '/' or \"//\""); return; } @@ -848,15 +848,15 @@ void QDeclarativeXmlListModel::setQuery(const QString &query) } \endqml */ -QString QDeclarativeXmlListModel::namespaceDeclarations() const +QString QQuickXmlListModel::namespaceDeclarations() const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); return d->namespaces; } -void QDeclarativeXmlListModel::setNamespaceDeclarations(const QString &declarations) +void QQuickXmlListModel::setNamespaceDeclarations(const QString &declarations) { - Q_D(QDeclarativeXmlListModel); + Q_D(QQuickXmlListModel); if (d->namespaces != declarations) { d->namespaces = declarations; reload(); @@ -886,22 +886,22 @@ void QDeclarativeXmlListModel::setNamespaceDeclarations(const QString &declarati var title = model.get(0).title; \endjs */ -QDeclarativeV8Handle QDeclarativeXmlListModel::get(int index) const +QQmlV8Handle QQuickXmlListModel::get(int index) const { // Must be called with a context and handle scope - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); if (index < 0 || index >= count()) - return QDeclarativeV8Handle::fromHandle(v8::Undefined()); + return QQmlV8Handle::fromHandle(v8::Undefined()); - QDeclarativeEngine *engine = qmlContext(this)->engine(); - QV8Engine *v8engine = QDeclarativeEnginePrivate::getV8Engine(engine); + QQmlEngine *engine = qmlContext(this)->engine(); + QV8Engine *v8engine = QQmlEnginePrivate::getV8Engine(engine); v8::Local rv = v8::Object::New(); for (int ii = 0; ii < d->roleObjects.count(); ++ii) rv->Set(v8engine->toString(d->roleObjects[ii]->name()), v8engine->fromVariant(d->data.value(ii).value(index))); - return QDeclarativeV8Handle::fromHandle(rv); + return QQmlV8Handle::fromHandle(rv); } /*! @@ -919,9 +919,9 @@ QDeclarativeV8Handle QDeclarativeXmlListModel::get(int index) const \sa progress */ -QDeclarativeXmlListModel::Status QDeclarativeXmlListModel::status() const +QQuickXmlListModel::Status QQuickXmlListModel::status() const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); return d->status; } @@ -940,9 +940,9 @@ QDeclarativeXmlListModel::Status QDeclarativeXmlListModel::status() const \sa status, source */ -qreal QDeclarativeXmlListModel::progress() const +qreal QQuickXmlListModel::progress() const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); return d->progress; } @@ -952,27 +952,27 @@ qreal QDeclarativeXmlListModel::progress() const Returns a string description of the last error that occurred if \l status is XmlListModel::Error. */ -QString QDeclarativeXmlListModel::errorString() const +QString QQuickXmlListModel::errorString() const { - Q_D(const QDeclarativeXmlListModel); + Q_D(const QQuickXmlListModel); return d->errorString; } -void QDeclarativeXmlListModel::classBegin() +void QQuickXmlListModel::classBegin() { - Q_D(QDeclarativeXmlListModel); + Q_D(QQuickXmlListModel); d->isComponentComplete = false; - QDeclarativeXmlQueryEngine *queryEngine = QDeclarativeXmlQueryEngine::instance(qmlEngine(this)); - connect(queryEngine, SIGNAL(queryCompleted(QDeclarativeXmlQueryResult)), - SLOT(queryCompleted(QDeclarativeXmlQueryResult))); + QQuickXmlQueryEngine *queryEngine = QQuickXmlQueryEngine::instance(qmlEngine(this)); + connect(queryEngine, SIGNAL(queryCompleted(QQuickXmlQueryResult)), + SLOT(queryCompleted(QQuickXmlQueryResult))); connect(queryEngine, SIGNAL(error(void*,QString)), SLOT(queryError(void*,QString))); } -void QDeclarativeXmlListModel::componentComplete() +void QQuickXmlListModel::componentComplete() { - Q_D(QDeclarativeXmlListModel); + Q_D(QQuickXmlListModel); d->isComponentComplete = true; reload(); } @@ -990,14 +990,14 @@ void QDeclarativeXmlListModel::componentComplete() \sa {Using key XML roles}, XmlRole::isKey */ -void QDeclarativeXmlListModel::reload() +void QQuickXmlListModel::reload() { - Q_D(QDeclarativeXmlListModel); + Q_D(QQuickXmlListModel); if (!d->isComponentComplete) return; - QDeclarativeXmlQueryEngine::instance(qmlEngine(this))->abort(d->queryId); + QQuickXmlQueryEngine::instance(qmlEngine(this))->abort(d->queryId); d->queryId = -1; if (d->size < 0) @@ -1009,7 +1009,7 @@ void QDeclarativeXmlListModel::reload() } if (!d->xml.isEmpty()) { - d->queryId = QDeclarativeXmlQueryEngine::instance(qmlEngine(this))->doQuery(d->query, d->namespaces, d->xml.toUtf8(), &d->roleObjects, d->keyRoleResultsCache); + d->queryId = QQuickXmlQueryEngine::instance(qmlEngine(this))->doQuery(d->query, d->namespaces, d->xml.toUtf8(), &d->roleObjects, d->keyRoleResultsCache); d->notifyQueryStarted(false); } else if (d->src.isEmpty()) { @@ -1030,9 +1030,9 @@ void QDeclarativeXmlListModel::reload() #define XMLLISTMODEL_MAX_REDIRECT 16 -void QDeclarativeXmlListModel::requestFinished() +void QQuickXmlListModel::requestFinished() { - Q_D(QDeclarativeXmlListModel); + Q_D(QQuickXmlListModel); d->redirectCount++; if (d->redirectCount < XMLLISTMODEL_MAX_REDIRECT) { @@ -1067,7 +1067,7 @@ void QDeclarativeXmlListModel::requestFinished() d->queryId = XMLLISTMODEL_CLEAR_ID; QTimer::singleShot(0, this, SLOT(dataCleared())); } else { - d->queryId = QDeclarativeXmlQueryEngine::instance(qmlEngine(this))->doQuery(d->query, d->namespaces, data, &d->roleObjects, d->keyRoleResultsCache); + d->queryId = QQuickXmlQueryEngine::instance(qmlEngine(this))->doQuery(d->query, d->namespaces, data, &d->roleObjects, d->keyRoleResultsCache); } d->deleteReply(); @@ -1076,19 +1076,19 @@ void QDeclarativeXmlListModel::requestFinished() } } -void QDeclarativeXmlListModel::requestProgress(qint64 received, qint64 total) +void QQuickXmlListModel::requestProgress(qint64 received, qint64 total) { - Q_D(QDeclarativeXmlListModel); + Q_D(QQuickXmlListModel); if (d->status == Loading && total > 0) { d->progress = qreal(received)/total; emit progressChanged(d->progress); } } -void QDeclarativeXmlListModel::dataCleared() +void QQuickXmlListModel::dataCleared() { - Q_D(QDeclarativeXmlListModel); - QDeclarativeXmlQueryResult r; + Q_D(QQuickXmlListModel); + QQuickXmlQueryResult r; r.queryId = XMLLISTMODEL_CLEAR_ID; r.size = 0; r.removed << qMakePair(0, count()); @@ -1096,12 +1096,12 @@ void QDeclarativeXmlListModel::dataCleared() queryCompleted(r); } -void QDeclarativeXmlListModel::queryError(void* object, const QString& error) +void QQuickXmlListModel::queryError(void* object, const QString& error) { // Be extra careful, object may no longer exist, it's just an ID. - Q_D(QDeclarativeXmlListModel); + Q_D(QQuickXmlListModel); for (int i=0; iroleObjects.count(); i++) { - if (d->roleObjects.at(i) == static_cast(object)) { + if (d->roleObjects.at(i) == static_cast(object)) { qmlInfo(d->roleObjects.at(i)) << QObject::tr("invalid query: \"%1\"").arg(error); return; } @@ -1109,9 +1109,9 @@ void QDeclarativeXmlListModel::queryError(void* object, const QString& error) qmlInfo(this) << QObject::tr("invalid query: \"%1\"").arg(error); } -void QDeclarativeXmlListModel::queryCompleted(const QDeclarativeXmlQueryResult &result) +void QQuickXmlListModel::queryCompleted(const QQuickXmlQueryResult &result) { - Q_D(QDeclarativeXmlListModel); + Q_D(QQuickXmlListModel); if (result.queryId != d->queryId) return; @@ -1157,4 +1157,4 @@ void QDeclarativeXmlListModel::queryCompleted(const QDeclarativeXmlQueryResult & QT_END_NAMESPACE -#include +#include diff --git a/src/imports/xmllistmodel/qdeclarativexmllistmodel_p.h b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h similarity index 80% rename from src/imports/xmllistmodel/qdeclarativexmllistmodel_p.h rename to src/imports/xmllistmodel/qqmlxmllistmodel_p.h index f34591d0a3..5bc4c7b494 100644 --- a/src/imports/xmllistmodel/qdeclarativexmllistmodel_p.h +++ b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEXMLLISTMODEL_H -#define QDECLARATIVEXMLLISTMODEL_H +#ifndef QQUICKXMLLISTMODEL_H +#define QQUICKXMLLISTMODEL_H -#include -#include +#include +#include #include #include @@ -56,11 +56,11 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeContext; -class QDeclarativeXmlListModelRole; -class QDeclarativeXmlListModelPrivate; +class QQmlContext; +class QQuickXmlListModelRole; +class QQuickXmlListModelPrivate; -struct QDeclarativeXmlQueryResult { +struct QQuickXmlQueryResult { int queryId; int size; QList > data; @@ -69,10 +69,10 @@ struct QDeclarativeXmlQueryResult { QStringList keyRoleResultsCache; }; -class QDeclarativeXmlListModel : public QListModelInterface, public QDeclarativeParserStatus +class QQuickXmlListModel : public QListModelInterface, public QQmlParserStatus { Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) Q_ENUMS(Status) Q_PROPERTY(Status status READ status NOTIFY statusChanged) @@ -81,13 +81,13 @@ class QDeclarativeXmlListModel : public QListModelInterface, public QDeclarative Q_PROPERTY(QString xml READ xml WRITE setXml NOTIFY xmlChanged) Q_PROPERTY(QString query READ query WRITE setQuery NOTIFY queryChanged) Q_PROPERTY(QString namespaceDeclarations READ namespaceDeclarations WRITE setNamespaceDeclarations NOTIFY namespaceDeclarationsChanged) - Q_PROPERTY(QDeclarativeListProperty roles READ roleObjects) + Q_PROPERTY(QQmlListProperty roles READ roleObjects) Q_PROPERTY(int count READ count NOTIFY countChanged) Q_CLASSINFO("DefaultProperty", "roles") public: - QDeclarativeXmlListModel(QObject *parent = 0); - ~QDeclarativeXmlListModel(); + QQuickXmlListModel(QObject *parent = 0); + ~QQuickXmlListModel(); virtual QHash data(int index, const QList &roles = (QList())) const; virtual QVariant data(int index, int role) const; @@ -95,7 +95,7 @@ class QDeclarativeXmlListModel : public QListModelInterface, public QDeclarative virtual QList roles() const; virtual QString toString(int role) const; - QDeclarativeListProperty roleObjects(); + QQmlListProperty roleObjects(); QUrl source() const; void setSource(const QUrl&); @@ -109,7 +109,7 @@ class QDeclarativeXmlListModel : public QListModelInterface, public QDeclarative QString namespaceDeclarations() const; void setNamespaceDeclarations(const QString&); - Q_INVOKABLE QDeclarativeV8Handle get(int index) const; + Q_INVOKABLE QQmlV8Handle get(int index) const; enum Status { Null, Ready, Loading, Error }; Status status() const; @@ -121,7 +121,7 @@ class QDeclarativeXmlListModel : public QListModelInterface, public QDeclarative virtual void componentComplete(); Q_SIGNALS: - void statusChanged(QDeclarativeXmlListModel::Status); + void statusChanged(QQuickXmlListModel::Status); void progressChanged(qreal progress); void countChanged(); void sourceChanged(); @@ -140,23 +140,23 @@ private Q_SLOTS: void requestFinished(); void requestProgress(qint64,qint64); void dataCleared(); - void queryCompleted(const QDeclarativeXmlQueryResult &); + void queryCompleted(const QQuickXmlQueryResult &); void queryError(void* object, const QString& error); private: - Q_DECLARE_PRIVATE(QDeclarativeXmlListModel) - Q_DISABLE_COPY(QDeclarativeXmlListModel) + Q_DECLARE_PRIVATE(QQuickXmlListModel) + Q_DISABLE_COPY(QQuickXmlListModel) }; -class QDeclarativeXmlListModelRole : public QObject +class QQuickXmlListModelRole : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) Q_PROPERTY(QString query READ query WRITE setQuery NOTIFY queryChanged) Q_PROPERTY(bool isKey READ isKey WRITE setIsKey NOTIFY isKeyChanged) public: - QDeclarativeXmlListModelRole() : m_isKey(false) {} - ~QDeclarativeXmlListModelRole() {} + QQuickXmlListModelRole() : m_isKey(false) {} + ~QQuickXmlListModelRole() {} QString name() const { return m_name; } void setName(const QString &name) { @@ -204,9 +204,9 @@ class QDeclarativeXmlListModelRole : public QObject QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeXmlListModel) -QML_DECLARE_TYPE(QDeclarativeXmlListModelRole) +QML_DECLARE_TYPE(QQuickXmlListModel) +QML_DECLARE_TYPE(QQuickXmlListModelRole) QT_END_HEADER -#endif // QDECLARATIVEXMLLISTMODEL_H +#endif // QQUICKXMLLISTMODEL_H diff --git a/src/imports/xmllistmodel/xmllistmodel.pro b/src/imports/xmllistmodel/xmllistmodel.pro index d8121e8db8..8c056e8448 100644 --- a/src/imports/xmllistmodel/xmllistmodel.pro +++ b/src/imports/xmllistmodel/xmllistmodel.pro @@ -2,12 +2,12 @@ TARGET = qmlxmllistmodelplugin TARGETPATH = QtQuick/XmlListModel include(../qimportbase.pri) -QT += network declarative xmlpatterns declarative-private v8-private core-private +QT += network qml xmlpatterns qml-private v8-private core-private -SOURCES += qdeclarativexmllistmodel.cpp plugin.cpp -HEADERS += qdeclarativexmllistmodel_p.h +SOURCES += qqmlxmllistmodel.cpp plugin.cpp +HEADERS += qqmlxmllistmodel_p.h -DESTDIR = $$QT.declarative.imports/$$TARGETPATH +DESTDIR = $$QT.qml.imports/$$TARGETPATH target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH qmldir.files += $$PWD/qmldir diff --git a/src/plugins/accessible/quick/main.cpp b/src/plugins/accessible/quick/main.cpp index 08a5fe546b..783d4674da 100644 --- a/src/plugins/accessible/quick/main.cpp +++ b/src/plugins/accessible/quick/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -40,7 +40,7 @@ ****************************************************************************/ -#include "qdeclarativeaccessible.h" +#include "qqmlaccessible.h" #include "qaccessiblequickview.h" #include "qaccessiblequickitem.h" diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.cpp b/src/plugins/accessible/quick/qaccessiblequickitem.cpp index 806a0f50c8..78e7ca86ef 100644 --- a/src/plugins/accessible/quick/qaccessiblequickitem.cpp +++ b/src/plugins/accessible/quick/qaccessiblequickitem.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE QAccessibleQuickItem::QAccessibleQuickItem(QQuickItem *item) - : QDeclarativeAccessible(item) + : QQmlAccessible(item) { } diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.h b/src/plugins/accessible/quick/qaccessiblequickitem.h index a283f853fd..5c19666f32 100644 --- a/src/plugins/accessible/quick/qaccessiblequickitem.h +++ b/src/plugins/accessible/quick/qaccessiblequickitem.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,13 +44,13 @@ #include #include -#include "qdeclarativeaccessible.h" +#include "qqmlaccessible.h" QT_BEGIN_NAMESPACE #ifndef QT_NO_ACCESSIBILITY -class QAccessibleQuickItem : public QDeclarativeAccessible +class QAccessibleQuickItem : public QQmlAccessible { public: QAccessibleQuickItem(QQuickItem *item); diff --git a/src/plugins/accessible/quick/qaccessiblequickview.cpp b/src/plugins/accessible/quick/qaccessiblequickview.cpp index 05f0b8eed9..042d8dcf06 100644 --- a/src/plugins/accessible/quick/qaccessiblequickview.cpp +++ b/src/plugins/accessible/quick/qaccessiblequickview.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,7 +45,7 @@ #include #include "qaccessiblequickitem.h" -#include "qdeclarativeaccessible.h" +#include "qqmlaccessible.h" #ifndef QT_NO_ACCESSIBILITY diff --git a/src/plugins/accessible/quick/qaccessiblequickview.h b/src/plugins/accessible/quick/qaccessiblequickview.h index 66c8a52168..3ad87df937 100644 --- a/src/plugins/accessible/quick/qaccessiblequickview.h +++ b/src/plugins/accessible/quick/qaccessiblequickview.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/accessible/quick/quick.pro b/src/plugins/accessible/quick/quick.pro index 97a1d50098..ae6ec032da 100644 --- a/src/plugins/accessible/quick/quick.pro +++ b/src/plugins/accessible/quick/quick.pro @@ -4,7 +4,7 @@ TARGET = qtaccessiblequick load(qt_plugin) include ($$PWD/../shared/qaccessiblebase.pri) -QT += core-private gui-private v8-private declarative-private quick-private +QT += core-private gui-private v8-private qml-private quick-private DESTDIR = $$QT.gui.plugins/accessible QTDIR_build:REQUIRES += "contains(QT_CONFIG, accessibility)" diff --git a/src/plugins/accessible/shared/qaccessiblebase.pri b/src/plugins/accessible/shared/qaccessiblebase.pri index 8c82705443..56a8a1c9ef 100644 --- a/src/plugins/accessible/shared/qaccessiblebase.pri +++ b/src/plugins/accessible/shared/qaccessiblebase.pri @@ -3,5 +3,5 @@ INSTALLS += target INCLUDEPATH += $$PWD DEPENDPATH += $$PWD -SOURCES += $$PWD/qdeclarativeaccessible.cpp -HEADERS += $$PWD/qdeclarativeaccessible.h +SOURCES += $$PWD/qqmlaccessible.cpp +HEADERS += $$PWD/qqmlaccessible.h diff --git a/src/plugins/accessible/shared/qdeclarativeaccessible.cpp b/src/plugins/accessible/shared/qqmlaccessible.cpp similarity index 89% rename from src/plugins/accessible/shared/qdeclarativeaccessible.cpp rename to src/plugins/accessible/shared/qqmlaccessible.cpp index a063dd043d..1818ebebfe 100644 --- a/src/plugins/accessible/shared/qdeclarativeaccessible.cpp +++ b/src/plugins/accessible/shared/qqmlaccessible.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -40,7 +40,7 @@ ****************************************************************************/ #include -#include "qdeclarativeaccessible.h" +#include "qqmlaccessible.h" #ifndef QT_NO_ACCESSIBILITY @@ -54,16 +54,16 @@ QString Q_GUI_EXPORT qTextAtOffsetFromString(int offset, QAccessible2::BoundaryT QString Q_GUI_EXPORT qTextAfterOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType, int *startOffset, int *endOffset, const QString& text); -QDeclarativeAccessible::QDeclarativeAccessible(QObject *object) +QQmlAccessible::QQmlAccessible(QObject *object) :QAccessibleObject(object) { } -QDeclarativeAccessible::~QDeclarativeAccessible() +QQmlAccessible::~QQmlAccessible() { } -QAccessibleInterface *QDeclarativeAccessible::childAt(int x, int y) const +QAccessibleInterface *QQmlAccessible::childAt(int x, int y) const { // Note that this function will disregard stacking order. // (QAccessibleQuickView::childAt() does this correctly and more efficient) @@ -85,7 +85,7 @@ QAccessibleInterface *QDeclarativeAccessible::childAt(int x, int y) const return 0; } -QAccessible::State QDeclarativeAccessible::state() const +QAccessible::State QQmlAccessible::state() const { QAccessible::State state; @@ -122,7 +122,7 @@ QAccessible::State QDeclarativeAccessible::state() const return state; } -QStringList QDeclarativeAccessible::actionNames() const +QStringList QQmlAccessible::actionNames() const { QStringList actions; switch (role()) { @@ -139,7 +139,7 @@ QStringList QDeclarativeAccessible::actionNames() const return actions; } -void QDeclarativeAccessible::doAction(const QString &actionName) +void QQmlAccessible::doAction(const QString &actionName) { if (role() == QAccessible::PushButton && actionName == QAccessibleActionInterface::pressAction()) { QMetaObject::invokeMethod(object(), "accessibleAction"); @@ -150,7 +150,7 @@ void QDeclarativeAccessible::doAction(const QString &actionName) } } -QStringList QDeclarativeAccessible::keyBindingsForAction(const QString &actionName) const +QStringList QQmlAccessible::keyBindingsForAction(const QString &actionName) const { Q_UNUSED(actionName) return QStringList(); diff --git a/src/plugins/accessible/shared/qdeclarativeaccessible.h b/src/plugins/accessible/shared/qqmlaccessible.h similarity index 86% rename from src/plugins/accessible/shared/qdeclarativeaccessible.h rename to src/plugins/accessible/shared/qqmlaccessible.h index 924e454fc9..570a3c8c40 100644 --- a/src/plugins/accessible/shared/qdeclarativeaccessible.h +++ b/src/plugins/accessible/shared/qqmlaccessible.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,14 +39,14 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEACCESSIBLE_H -#define QDECLARATIVEACCESSIBLE_H +#ifndef QQMLACCESSIBLE_H +#define QQMLACCESSIBLE_H #include #include //#include //#include -#include +#include //#include @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE * Item interface classes: QAccessibleDeclarativeItem for QtQuick1 QAccessibleQuickItem for for QtQuick2 - Common base class: QDeclarativeAccessible + Common base class: QQmlAccessible * View interface classes. @@ -70,10 +70,10 @@ QT_BEGIN_NAMESPACE QAccessbileQuickView is the root for the SceneGraph implementation */ -class QDeclarativeAccessible: public QAccessibleObject, public QAccessibleActionInterface +class QQmlAccessible: public QAccessibleObject, public QAccessibleActionInterface { public: - ~QDeclarativeAccessible(); + ~QQmlAccessible(); virtual QRect viewRect() const = 0; QAccessibleInterface *childAt(int, int) const; @@ -86,11 +86,11 @@ class QDeclarativeAccessible: public QAccessibleObject, public QAccessibleAction protected: virtual bool clipsChildren() const = 0; // For subclasses, use instantiateObject factory method outside the class. - QDeclarativeAccessible(QObject *object); + QQmlAccessible(QObject *object); }; #endif // QT_NO_ACCESSIBILITY QT_END_NAMESPACE -#endif // QDECLARATIVEACCESSIBLE_H +#endif // QQMLACCESSIBLE_H diff --git a/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro b/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro index c1ca2a5ef9..6f973bcc18 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro +++ b/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro @@ -1,10 +1,10 @@ TARGET = qmldbg_ost -QT += declarative network +QT += qml network load(qt_plugin) QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/qmltooling -QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)" +QTDIR_build:REQUIRES += "contains(QT_CONFIG, qml)" SOURCES += \ qmlostplugin.cpp \ diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp index d4d9629334..9bd68e7401 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp +++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,7 +42,7 @@ #include "qmlostplugin.h" #include "qostdevice.h" -#include +#include #include QT_BEGIN_NAMESPACE @@ -55,7 +55,7 @@ class QmlOstPluginPrivate { QOstDevice *ost; QPacketProtocol *protocol; - QDeclarativeDebugServer *debugServer; + QQmlDebugServer *debugServer; }; QmlOstPluginPrivate::QmlOstPluginPrivate() : @@ -75,7 +75,7 @@ QmlOstPlugin::~QmlOstPlugin() delete d_ptr; } -void QmlOstPlugin::setServer(QDeclarativeDebugServer *server) +void QmlOstPlugin::setServer(QQmlDebugServer *server) { Q_D(QmlOstPlugin); d->debugServer = server; @@ -127,12 +127,12 @@ void QmlOstPlugin::setPort(int port, bool block) if (!ok) { if (d->ost->errorString().length()) qDebug("Error from QOstDevice: %s", qPrintable(d->ost->errorString())); - qWarning("QDeclarativeDebugServer: Unable to listen on OST"); // This message is part of the signalling - do not change the format! + qWarning("QQmlDebugServer: Unable to listen on OST"); // This message is part of the signalling - do not change the format! return; } d->protocol = new QPacketProtocol(d->ost, this); QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); - qWarning("QDeclarativeDebugServer: Waiting for connection via OST"); // This message is part of the signalling - do not change the format! + qWarning("QQmlDebugServer: Waiting for connection via OST"); // This message is part of the signalling - do not change the format! } void QmlOstPlugin::readyRead() diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h index 1bbba93b94..41c3a07f25 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h +++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,26 +43,26 @@ #define QMLOSTPLUGIN_H #include -#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeDebugServer; +class QQmlDebugServer; class QmlOstPluginPrivate; -class QmlOstPlugin : public QObject, public QDeclarativeDebugServerConnection +class QmlOstPlugin : public QObject, public QQmlDebugServerConnection { Q_OBJECT Q_DECLARE_PRIVATE(QmlOstPlugin) Q_DISABLE_COPY(QmlOstPlugin) - Q_INTERFACES(QDeclarativeDebugServerConnection) + Q_INTERFACES(QQmlDebugServerConnection) public: QmlOstPlugin(); ~QmlOstPlugin(); - void setServer(QDeclarativeDebugServer *server); + void setServer(QQmlDebugServer *server); void setPort(int port, bool bock); bool isConnected() const; diff --git a/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp b/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp index 289418cd83..2c557ac3cc 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp +++ b/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_ost/qostdevice.h b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h index 609a71897b..4b645f9c8e 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qostdevice.h +++ b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h b/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h index 246e162aee..b9bf53fbd2 100644 --- a/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h +++ b/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp index e0662da590..bb4048ee92 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp +++ b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h index 82096c6abd..1b1f10c8bb 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h +++ b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro b/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro index b9c6584afc..014f964652 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro @@ -1,11 +1,11 @@ load(qt_module) TARGET = qmldbg_qtquick2 -QT += declarative-private quick-private core-private gui-private opengl-private v8-private +QT += qml-private quick-private core-private gui-private opengl-private v8-private load(qt_plugin) -DESTDIR = $$QT.declarative.plugins/qmltooling +DESTDIR = $$QT.qml.plugins/qmltooling INCLUDEPATH *= $$PWD $$PWD/../shared @@ -24,7 +24,7 @@ HEADERS += \ qquickviewinspector.h \ ../shared/abstracttool.h \ ../shared/abstractviewinspector.h \ - ../shared/qdeclarativeinspectorprotocol.h \ + ../shared/qqmlinspectorprotocol.h \ ../shared/qmlinspectorconstants.h target.path += $$[QT_INSTALL_PLUGINS]/qmltooling diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp index b146c6e846..200c66ee35 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -41,7 +41,7 @@ #include "qquickviewinspector.h" -#include "qdeclarativeinspectorprotocol.h" +#include "qqmlinspectorprotocol.h" #include "highlight.h" #include "selectiontool.h" @@ -206,7 +206,7 @@ void QQuickViewInspector::setWindowFlags(Qt::WindowFlags flags) w->setVisible(true); } -QDeclarativeEngine *QQuickViewInspector::declarativeEngine() const +QQmlEngine *QQuickViewInspector::declarativeEngine() const { return m_view->engine(); } diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h index 07c38b1d5e..fbc3c17b87 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -71,7 +71,7 @@ class QQuickViewInspector : public AbstractViewInspector void changeTool(InspectorProtocol::Tool tool); Qt::WindowFlags windowFlags() const; void setWindowFlags(Qt::WindowFlags flags); - QDeclarativeEngine *declarativeEngine() const; + QQmlEngine *declarativeEngine() const; QQuickView *view() const { return m_view; } QQuickItem *overlay() const { return m_overlay; } diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp index 206d0b2eb9..ea52788896 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,7 +43,7 @@ #include "qquickviewinspector.h" #include -#include +#include #include namespace QmlJSDebugger { diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h index d0f814c03c..d78aac6ead 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEINSPECTORPLUGIN_H -#define QDECLARATIVEINSPECTORPLUGIN_H +#ifndef QTQUICK2PLUGINPLUGIN_H +#define QTQUICK2PLUGINPLUGIN_H #include -#include +#include namespace QmlJSDebugger { @@ -51,17 +51,17 @@ class AbstractViewInspector; namespace QtQuick2 { -class QtQuick2Plugin : public QObject, public QDeclarativeInspectorInterface +class QtQuick2Plugin : public QObject, public QQmlInspectorInterface { Q_OBJECT Q_DISABLE_COPY(QtQuick2Plugin) - Q_INTERFACES(QDeclarativeInspectorInterface) + Q_INTERFACES(QQmlInspectorInterface) public: QtQuick2Plugin(); ~QtQuick2Plugin(); - // QDeclarativeInspectorInterface + // QQmlInspectorInterface bool canHandleView(QObject *view); void activate(QObject *view); void deactivate(); @@ -74,4 +74,4 @@ class QtQuick2Plugin : public QObject, public QDeclarativeInspectorInterface } // namespace QtQuick2 } // namespace QmlJSDebugger -#endif // QDECLARATIVEINSPECTORPLUGIN_H +#endif // QTQUICK2PLUGINPLUGIN_H diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp index efa079dcf1..5ad102a92d 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp +++ b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h index 7767317abe..c2aa26a1a7 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h +++ b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro index 8ab507c055..cb663dbc0c 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro +++ b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro @@ -1,12 +1,12 @@ load(qt_module) TARGET = qmldbg_tcp -QT += declarative-private network +QT += qml-private network load(qt_plugin) -DESTDIR = $$QT.declarative.plugins/qmltooling -QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)" +DESTDIR = $$QT.qml.plugins/qmltooling +QTDIR_build:REQUIRES += "contains(QT_CONFIG, qml)" SOURCES += \ qtcpserverconnection.cpp diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp index 529d2094bf..63a3297f37 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,7 +45,7 @@ #include #include -#include +#include #include QT_BEGIN_NAMESPACE @@ -60,7 +60,7 @@ class QTcpServerConnectionPrivate { QPacketProtocol *protocol; QTcpServer *tcpServer; - QDeclarativeDebugServer *debugServer; + QQmlDebugServer *debugServer; }; QTcpServerConnectionPrivate::QTcpServerConnectionPrivate() : @@ -84,7 +84,7 @@ QTcpServerConnection::~QTcpServerConnection() delete d_ptr; } -void QTcpServerConnection::setServer(QDeclarativeDebugServer *server) +void QTcpServerConnection::setServer(QQmlDebugServer *server) { Q_D(QTcpServerConnection); d->debugServer = server; @@ -147,9 +147,9 @@ void QTcpServerConnection::listen() 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); + qWarning("QQmlDebugServer: Waiting for connection on port %d...", d->port); else - qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); + qWarning("QQmlDebugServer: Unable to listen on port %d", d->port); } @@ -170,7 +170,7 @@ void QTcpServerConnection::newConnection() Q_D(QTcpServerConnection); if (d->socket && d->socket->peerPort()) { - qWarning("QDeclarativeDebugServer: Another client is already connected"); + qWarning("QQmlDebugServer: Another client is already connected"); QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); delete faultyConnection; return; @@ -190,7 +190,7 @@ void QTcpServerConnection::newConnection() void QTcpServerConnection::invalidPacket() { - qWarning("QDeclarativeDebugServer: Received a corrupted packet! Giving up ..."); + qWarning("QQmlDebugServer: Received a corrupted packet! Giving up ..."); } Q_EXPORT_PLUGIN2(tcpserver, QTcpServerConnection) diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h index f090c9709f..74c6b95e56 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,25 +43,25 @@ #define QTCPSERVERCONNECTION_H #include -#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeDebugServer; +class QQmlDebugServer; class QTcpServerConnectionPrivate; -class QTcpServerConnection : public QObject, public QDeclarativeDebugServerConnection +class QTcpServerConnection : public QObject, public QQmlDebugServerConnection { Q_OBJECT Q_DECLARE_PRIVATE(QTcpServerConnection) Q_DISABLE_COPY(QTcpServerConnection) - Q_INTERFACES(QDeclarativeDebugServerConnection) + Q_INTERFACES(QQmlDebugServerConnection) public: QTcpServerConnection(); ~QTcpServerConnection(); - void setServer(QDeclarativeDebugServer *server); + void setServer(QQmlDebugServer *server); void setPort(int port, bool bock); bool isConnected() const; diff --git a/src/plugins/qmltooling/shared/abstracttool.cpp b/src/plugins/qmltooling/shared/abstracttool.cpp index 0565537cca..69e468bd92 100644 --- a/src/plugins/qmltooling/shared/abstracttool.cpp +++ b/src/plugins/qmltooling/shared/abstracttool.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/shared/abstracttool.h b/src/plugins/qmltooling/shared/abstracttool.h index e21e3be1f8..35817064e2 100644 --- a/src/plugins/qmltooling/shared/abstracttool.h +++ b/src/plugins/qmltooling/shared/abstracttool.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/shared/abstractviewinspector.cpp b/src/plugins/qmltooling/shared/abstractviewinspector.cpp index cfa0f441cd..33e47d270d 100644 --- a/src/plugins/qmltooling/shared/abstractviewinspector.cpp +++ b/src/plugins/qmltooling/shared/abstractviewinspector.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,12 +42,12 @@ #include "abstractviewinspector.h" #include "abstracttool.h" -#include "qdeclarativeinspectorprotocol.h" +#include "qqmlinspectorprotocol.h" -#include -#include +#include +#include #include -#include +#include #include @@ -61,7 +61,7 @@ AbstractViewInspector::AbstractViewInspector(QObject *parent) : m_designModeBehavior(false), m_animationPaused(false), m_slowDownFactor(1.0), - m_debugService(QDeclarativeInspectorService::instance()) + m_debugService(QQmlInspectorService::instance()) { } @@ -78,8 +78,8 @@ void AbstractViewInspector::createQmlObject(const QString &qml, QObject *parent, imports += QLatin1Char('\n'); } - QDeclarativeContext *parentContext = declarativeEngine()->contextForObject(parent); - QDeclarativeComponent component(declarativeEngine()); + QQmlContext *parentContext = declarativeEngine()->contextForObject(parent); + QQmlComponent component(declarativeEngine()); QByteArray constructedQml = QString(imports + qml).toLatin1(); component.setData(constructedQml, QUrl::fromLocalFile(filename)); @@ -316,7 +316,7 @@ void AbstractViewInspector::handleMessage(const QByteArray &message) for (int i = 0; i < itemCount; ++i) { int debugId = -1; ds >> debugId; - if (QObject *obj = QDeclarativeDebugService::objectForId(debugId)) + if (QObject *obj = QQmlDebugService::objectForId(debugId)) selectedObjects << obj; } @@ -363,22 +363,22 @@ void AbstractViewInspector::handleMessage(const QByteArray &message) QString filename; QStringList imports; ds >> qml >> parentId >> imports >> filename; - createQmlObject(qml, QDeclarativeDebugService::objectForId(parentId), + createQmlObject(qml, QQmlDebugService::objectForId(parentId), imports, filename); break; } case InspectorProtocol::DestroyObject: { int debugId; ds >> debugId; - if (QObject *obj = QDeclarativeDebugService::objectForId(debugId)) + if (QObject *obj = QQmlDebugService::objectForId(debugId)) obj->deleteLater(); break; } case InspectorProtocol::MoveObject: { int debugId, newParent; ds >> debugId >> newParent; - reparentQmlObject(QDeclarativeDebugService::objectForId(debugId), - QDeclarativeDebugService::objectForId(newParent)); + reparentQmlObject(QQmlDebugService::objectForId(debugId), + QQmlDebugService::objectForId(newParent)); break; } case InspectorProtocol::ObjectIdList: { @@ -424,7 +424,7 @@ void AbstractViewInspector::sendCurrentObjects(const QList &objects) << objects.length(); foreach (QObject *object, objects) { - int id = QDeclarativeDebugService::idForObject(object); + int id = QQmlDebugService::idForObject(object); ds << id; } @@ -497,7 +497,7 @@ void AbstractViewInspector::sendColorChanged(const QColor &color) QString AbstractViewInspector::idStringForObject(QObject *obj) const { - const int id = QDeclarativeDebugService::idForObject(obj); + const int id = QQmlDebugService::idForObject(obj); return m_stringIdForObjectId.value(id); } diff --git a/src/plugins/qmltooling/shared/abstractviewinspector.h b/src/plugins/qmltooling/shared/abstractviewinspector.h index 741013239f..0dacc92233 100644 --- a/src/plugins/qmltooling/shared/abstractviewinspector.h +++ b/src/plugins/qmltooling/shared/abstractviewinspector.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -47,12 +47,12 @@ #include #include -#include "qdeclarativeinspectorprotocol.h" +#include "qqmlinspectorprotocol.h" #include "qmlinspectorconstants.h" QT_BEGIN_NAMESPACE -class QDeclarativeEngine; -class QDeclarativeInspectorService; +class QQmlEngine; +class QQmlInspectorService; class QKeyEvent; class QMouseEvent; class QWheelEvent; @@ -63,7 +63,7 @@ namespace QmlJSDebugger { class AbstractTool; /* - * The common code between QQuickView and QDeclarativeView inspectors lives here, + * The common code between QQuickView and QQuickView inspectors lives here, */ class AbstractViewInspector : public QObject { @@ -100,7 +100,7 @@ class AbstractViewInspector : public QObject virtual void changeTool(InspectorProtocol::Tool tool) = 0; virtual Qt::WindowFlags windowFlags() const = 0; virtual void setWindowFlags(Qt::WindowFlags flags) = 0; - virtual QDeclarativeEngine *declarativeEngine() const = 0; + virtual QQmlEngine *declarativeEngine() const = 0; signals: void designModeBehaviorChanged(bool inDesignMode); @@ -159,7 +159,7 @@ private slots: qreal m_slowDownFactor; QHash m_stringIdForObjectId; - QDeclarativeInspectorService *m_debugService; + QQmlInspectorService *m_debugService; }; } // namespace QmlJSDebugger diff --git a/src/plugins/qmltooling/shared/qmlinspectorconstants.h b/src/plugins/qmltooling/shared/qmlinspectorconstants.h index 1b25486bb6..e5a0ee5450 100644 --- a/src/plugins/qmltooling/shared/qmlinspectorconstants.h +++ b/src/plugins/qmltooling/shared/qmlinspectorconstants.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,7 +42,7 @@ #ifndef QMLINSPECTORCONSTANTS_H #define QMLINSPECTORCONSTANTS_H -#include +#include namespace QmlJSDebugger { namespace Constants { diff --git a/src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h b/src/plugins/qmltooling/shared/qqmlinspectorprotocol.h similarity index 95% rename from src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h rename to src/plugins/qmltooling/shared/qqmlinspectorprotocol.h index 4c833b99dc..63772aa8e4 100644 --- a/src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h +++ b/src/plugins/qmltooling/shared/qqmlinspectorprotocol.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEINSPECTORPROTOCOL_H -#define QDECLARATIVEINSPECTORPROTOCOL_H +#ifndef QQMLINSPECTORPROTOCOL_H +#define QQMLINSPECTORPROTOCOL_H #include #include @@ -134,4 +134,4 @@ inline QDebug operator<< (QDebug dbg, InspectorProtocol::Tool tool) } // namespace QmlJSDebugger -#endif // QDECLARATIVEINSPECTORPROTOCOL_H +#endif // QQMLINSPECTORPROTOCOL_H diff --git a/src/declarative/animations/animations.pri b/src/qml/animations/animations.pri similarity index 100% rename from src/declarative/animations/animations.pri rename to src/qml/animations/animations.pri diff --git a/src/declarative/animations/qabstractanimationjob.cpp b/src/qml/animations/qabstractanimationjob.cpp similarity index 88% rename from src/declarative/animations/qabstractanimationjob.cpp rename to src/qml/animations/qabstractanimationjob.cpp index 4d149ce99a..2bfc66fea0 100644 --- a/src/declarative/animations/qabstractanimationjob.cpp +++ b/src/qml/animations/qabstractanimationjob.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -50,10 +50,10 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_THREAD -Q_GLOBAL_STATIC(QThreadStorage, animationTimer) +Q_GLOBAL_STATIC(QThreadStorage, animationTimer) #endif -QDeclarativeAnimationTimer::QDeclarativeAnimationTimer() : +QQmlAnimationTimer::QQmlAnimationTimer() : QAbstractAnimationTimer(), lastTick(0), lastDelta(0), currentAnimationIdx(0), insideTick(false), startAnimationPending(false), stopTimerPending(false), @@ -61,12 +61,12 @@ QDeclarativeAnimationTimer::QDeclarativeAnimationTimer() : { } -QDeclarativeAnimationTimer *QDeclarativeAnimationTimer::instance(bool create) +QQmlAnimationTimer *QQmlAnimationTimer::instance(bool create) { - QDeclarativeAnimationTimer *inst; + QQmlAnimationTimer *inst; #ifndef QT_NO_THREAD if (create && !animationTimer()->hasLocalData()) { - inst = new QDeclarativeAnimationTimer; + inst = new QQmlAnimationTimer; animationTimer()->setLocalData(inst); } else { inst = animationTimer() ? animationTimer()->localData() : 0; @@ -78,20 +78,20 @@ QDeclarativeAnimationTimer *QDeclarativeAnimationTimer::instance(bool create) return inst; } -QDeclarativeAnimationTimer *QDeclarativeAnimationTimer::instance() +QQmlAnimationTimer *QQmlAnimationTimer::instance() { return instance(true); } -void QDeclarativeAnimationTimer::ensureTimerUpdate() +void QQmlAnimationTimer::ensureTimerUpdate() { - QDeclarativeAnimationTimer *inst = QDeclarativeAnimationTimer::instance(false); + QQmlAnimationTimer *inst = QQmlAnimationTimer::instance(false); QUnifiedTimer *instU = QUnifiedTimer::instance(false); if (instU && inst && inst->isPaused) instU->updateAnimationTimers(-1); } -void QDeclarativeAnimationTimer::updateAnimationsTime(qint64 delta) +void QQmlAnimationTimer::updateAnimationsTime(qint64 delta) { //setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations if (insideTick) @@ -116,14 +116,14 @@ void QDeclarativeAnimationTimer::updateAnimationsTime(qint64 delta) } } -void QDeclarativeAnimationTimer::updateAnimationTimer() +void QQmlAnimationTimer::updateAnimationTimer() { - QDeclarativeAnimationTimer *inst = QDeclarativeAnimationTimer::instance(false); + QQmlAnimationTimer *inst = QQmlAnimationTimer::instance(false); if (inst) inst->restartAnimationTimer(); } -void QDeclarativeAnimationTimer::restartAnimationTimer() +void QQmlAnimationTimer::restartAnimationTimer() { if (runningLeafAnimations == 0 && !runningPauseAnimations.isEmpty()) QUnifiedTimer::pauseAnimationTimer(this, closestPauseAnimationTimeToFinish()); @@ -133,7 +133,7 @@ void QDeclarativeAnimationTimer::restartAnimationTimer() QUnifiedTimer::startAnimationTimer(this); } -void QDeclarativeAnimationTimer::startAnimations() +void QQmlAnimationTimer::startAnimations() { startAnimationPending = false; //force timer to update, which prevents large deltas for our newly added animations @@ -147,7 +147,7 @@ void QDeclarativeAnimationTimer::startAnimations() restartAnimationTimer(); } -void QDeclarativeAnimationTimer::stopTimer() +void QQmlAnimationTimer::stopTimer() { stopTimerPending = false; if (animations.isEmpty()) { @@ -159,9 +159,9 @@ void QDeclarativeAnimationTimer::stopTimer() } } -void QDeclarativeAnimationTimer::registerAnimation(QAbstractAnimationJob *animation, bool isTopLevel) +void QQmlAnimationTimer::registerAnimation(QAbstractAnimationJob *animation, bool isTopLevel) { - QDeclarativeAnimationTimer *inst = instance(true); //we create the instance if needed + QQmlAnimationTimer *inst = instance(true); //we create the instance if needed inst->registerRunningAnimation(animation); if (isTopLevel) { Q_ASSERT(!animation->m_hasRegisteredTimer); @@ -174,9 +174,9 @@ void QDeclarativeAnimationTimer::registerAnimation(QAbstractAnimationJob *animat } } -void QDeclarativeAnimationTimer::unregisterAnimation(QAbstractAnimationJob *animation) +void QQmlAnimationTimer::unregisterAnimation(QAbstractAnimationJob *animation) { - QDeclarativeAnimationTimer *inst = QDeclarativeAnimationTimer::instance(false); + QQmlAnimationTimer *inst = QQmlAnimationTimer::instance(false); if (inst) { //at this point the unified timer should have been created //but it might also have been already destroyed in case the application is shutting down @@ -204,7 +204,7 @@ void QDeclarativeAnimationTimer::unregisterAnimation(QAbstractAnimationJob *anim animation->m_hasRegisteredTimer = false; } -void QDeclarativeAnimationTimer::registerRunningAnimation(QAbstractAnimationJob *animation) +void QQmlAnimationTimer::registerRunningAnimation(QAbstractAnimationJob *animation) { if (animation->m_isGroup) return; @@ -215,7 +215,7 @@ void QDeclarativeAnimationTimer::registerRunningAnimation(QAbstractAnimationJob runningLeafAnimations++; } -void QDeclarativeAnimationTimer::unregisterRunningAnimation(QAbstractAnimationJob *animation) +void QQmlAnimationTimer::unregisterRunningAnimation(QAbstractAnimationJob *animation) { if (animation->m_isGroup) return; @@ -227,7 +227,7 @@ void QDeclarativeAnimationTimer::unregisterRunningAnimation(QAbstractAnimationJo Q_ASSERT(runningLeafAnimations >= 0); } -int QDeclarativeAnimationTimer::closestPauseAnimationTimeToFinish() +int QQmlAnimationTimer::closestPauseAnimationTimeToFinish() { int closestTimeToFinish = INT_MAX; for (int i = 0; i < runningPauseAnimations.size(); ++i) { @@ -276,7 +276,7 @@ QAbstractAnimationJob::~QAbstractAnimationJob() m_state = Stopped; stateChanged(oldState, m_state); if (oldState == Running) - QDeclarativeAnimationTimer::unregisterAnimation(this); + QQmlAnimationTimer::unregisterAnimation(this); } if (m_group) @@ -311,11 +311,11 @@ void QAbstractAnimationJob::setState(QAbstractAnimationJob::State newState) bool isTopLevel = !m_group || m_group->isStopped(); if (oldState == Running) { if (newState == Paused && m_hasRegisteredTimer) - QDeclarativeAnimationTimer::ensureTimerUpdate(); + QQmlAnimationTimer::ensureTimerUpdate(); //the animation, is not running any more - QDeclarativeAnimationTimer::unregisterAnimation(this); + QQmlAnimationTimer::unregisterAnimation(this); } else if (newState == Running) { - QDeclarativeAnimationTimer::registerAnimation(this, isTopLevel); + QQmlAnimationTimer::registerAnimation(this, isTopLevel); } //starting an animation qualifies as a top level loop change @@ -341,7 +341,7 @@ void QAbstractAnimationJob::setState(QAbstractAnimationJob::State newState) if (oldState == Stopped) { if (isTopLevel) { // currentTime needs to be updated if pauseTimer is active - QDeclarativeAnimationTimer::ensureTimerUpdate(); + QQmlAnimationTimer::ensureTimerUpdate(); setCurrentTime(m_totalCurrentTime); } } @@ -378,14 +378,14 @@ void QAbstractAnimationJob::setDirection(Direction direction) // the commands order below is important: first we need to setCurrentTime with the old direction, // then update the direction on this and all children and finally restart the pauseTimer if needed if (m_hasRegisteredTimer) - QDeclarativeAnimationTimer::ensureTimerUpdate(); + QQmlAnimationTimer::ensureTimerUpdate(); m_direction = direction; updateDirection(direction); if (m_hasRegisteredTimer) // needed to update the timer interval in case of a pause animation - QDeclarativeAnimationTimer::updateAnimationTimer(); + QQmlAnimationTimer::updateAnimationTimer(); } void QAbstractAnimationJob::setLoopCount(int loopCount) diff --git a/src/declarative/animations/qabstractanimationjob_p.h b/src/qml/animations/qabstractanimationjob_p.h similarity index 94% rename from src/declarative/animations/qabstractanimationjob_p.h rename to src/qml/animations/qabstractanimationjob_p.h index 675082f0b7..f00090cb30 100644 --- a/src/declarative/animations/qabstractanimationjob_p.h +++ b/src/qml/animations/qabstractanimationjob_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,6 +42,7 @@ #ifndef QABSTRACTANIMATIONJOB_P_H #define QABSTRACTANIMATIONJOB_P_H +#include #include #include #include "private/qpodvector_p.h" @@ -50,11 +51,11 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Declarative) +QT_MODULE(Qml) class QAnimationGroupJob; class QAnimationJobChangeListener; -class Q_DECLARATIVE_EXPORT QAbstractAnimationJob +class Q_QML_EXPORT QAbstractAnimationJob { Q_DISABLE_COPY(QAbstractAnimationJob) public: @@ -154,7 +155,7 @@ class Q_DECLARATIVE_EXPORT QAbstractAnimationJob QAbstractAnimationJob *m_nextSibling; QAbstractAnimationJob *m_previousSibling; - friend class QDeclarativeAnimationTimer; + friend class QQmlAnimationTimer; friend class QAnimationGroupJob; }; @@ -166,15 +167,15 @@ class Q_AUTOTEST_EXPORT QAnimationJobChangeListener virtual void animationCurrentLoopChanged(QAbstractAnimationJob *) {} }; -class Q_DECLARATIVE_EXPORT QDeclarativeAnimationTimer : public QAbstractAnimationTimer +class Q_QML_EXPORT QQmlAnimationTimer : public QAbstractAnimationTimer { Q_OBJECT private: - QDeclarativeAnimationTimer(); + QQmlAnimationTimer(); public: - static QDeclarativeAnimationTimer *instance(); - static QDeclarativeAnimationTimer *instance(bool create); + static QQmlAnimationTimer *instance(); + static QQmlAnimationTimer *instance(bool create); static void registerAnimation(QAbstractAnimationJob *animation, bool isTopLevel); static void unregisterAnimation(QAbstractAnimationJob *animation); diff --git a/src/declarative/animations/qanimationgroupjob.cpp b/src/qml/animations/qanimationgroupjob.cpp similarity index 98% rename from src/declarative/animations/qanimationgroupjob.cpp rename to src/qml/animations/qanimationgroupjob.cpp index 7e26f9778d..83b2192313 100644 --- a/src/declarative/animations/qanimationgroupjob.cpp +++ b/src/qml/animations/qanimationgroupjob.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/animations/qanimationgroupjob_p.h b/src/qml/animations/qanimationgroupjob_p.h similarity index 94% rename from src/declarative/animations/qanimationgroupjob_p.h rename to src/qml/animations/qanimationgroupjob_p.h index d1917a5249..303dc898d9 100644 --- a/src/declarative/animations/qanimationgroupjob_p.h +++ b/src/qml/animations/qanimationgroupjob_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -48,9 +48,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Declarative) +QT_MODULE(Qml) -class Q_DECLARATIVE_EXPORT QAnimationGroupJob : public QAbstractAnimationJob +class Q_QML_EXPORT QAnimationGroupJob : public QAbstractAnimationJob { Q_DISABLE_COPY(QAnimationGroupJob) public: diff --git a/src/declarative/animations/qanimationjobutil_p.h b/src/qml/animations/qanimationjobutil_p.h similarity index 96% rename from src/declarative/animations/qanimationjobutil_p.h rename to src/qml/animations/qanimationjobutil_p.h index b8a627e2da..c891b8725d 100644 --- a/src/declarative/animations/qanimationjobutil_p.h +++ b/src/qml/animations/qanimationjobutil_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/animations/qparallelanimationgroupjob.cpp b/src/qml/animations/qparallelanimationgroupjob.cpp similarity index 99% rename from src/declarative/animations/qparallelanimationgroupjob.cpp rename to src/qml/animations/qparallelanimationgroupjob.cpp index 5a417dccf4..0472c959f4 100644 --- a/src/declarative/animations/qparallelanimationgroupjob.cpp +++ b/src/qml/animations/qparallelanimationgroupjob.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/animations/qparallelanimationgroupjob_p.h b/src/qml/animations/qparallelanimationgroupjob_p.h similarity index 93% rename from src/declarative/animations/qparallelanimationgroupjob_p.h rename to src/qml/animations/qparallelanimationgroupjob_p.h index 42a96b50d5..d77a8c84f9 100644 --- a/src/declarative/animations/qparallelanimationgroupjob_p.h +++ b/src/qml/animations/qparallelanimationgroupjob_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -48,9 +48,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Declarative) +QT_MODULE(Qml) -class Q_DECLARATIVE_EXPORT QParallelAnimationGroupJob : public QAnimationGroupJob +class Q_QML_EXPORT QParallelAnimationGroupJob : public QAnimationGroupJob { Q_DISABLE_COPY(QParallelAnimationGroupJob) public: diff --git a/src/declarative/animations/qpauseanimationjob.cpp b/src/qml/animations/qpauseanimationjob.cpp similarity index 96% rename from src/declarative/animations/qpauseanimationjob.cpp rename to src/qml/animations/qpauseanimationjob.cpp index c362f5ab58..40bcef7e89 100644 --- a/src/declarative/animations/qpauseanimationjob.cpp +++ b/src/qml/animations/qpauseanimationjob.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/animations/qpauseanimationjob_p.h b/src/qml/animations/qpauseanimationjob_p.h similarity index 92% rename from src/declarative/animations/qpauseanimationjob_p.h rename to src/qml/animations/qpauseanimationjob_p.h index d4af832577..82462be101 100644 --- a/src/declarative/animations/qpauseanimationjob_p.h +++ b/src/qml/animations/qpauseanimationjob_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -48,9 +48,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Declarative) +QT_MODULE(Qml) -class Q_DECLARATIVE_EXPORT QPauseAnimationJob : public QAbstractAnimationJob +class Q_QML_EXPORT QPauseAnimationJob : public QAbstractAnimationJob { Q_DISABLE_COPY(QPauseAnimationJob) public: diff --git a/src/declarative/animations/qsequentialanimationgroupjob.cpp b/src/qml/animations/qsequentialanimationgroupjob.cpp similarity index 99% rename from src/declarative/animations/qsequentialanimationgroupjob.cpp rename to src/qml/animations/qsequentialanimationgroupjob.cpp index f999ca34d7..12cce39fbc 100644 --- a/src/declarative/animations/qsequentialanimationgroupjob.cpp +++ b/src/qml/animations/qsequentialanimationgroupjob.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/animations/qsequentialanimationgroupjob_p.h b/src/qml/animations/qsequentialanimationgroupjob_p.h similarity index 95% rename from src/declarative/animations/qsequentialanimationgroupjob_p.h rename to src/qml/animations/qsequentialanimationgroupjob_p.h index 4c1fb2d55a..b406d04f6f 100644 --- a/src/declarative/animations/qsequentialanimationgroupjob_p.h +++ b/src/qml/animations/qsequentialanimationgroupjob_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -48,10 +48,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Declarative) +QT_MODULE(Qml) class QPauseAnimationJob; -class Q_DECLARATIVE_EXPORT QSequentialAnimationGroupJob : public QAnimationGroupJob +class Q_QML_EXPORT QSequentialAnimationGroupJob : public QAnimationGroupJob { Q_DISABLE_COPY(QSequentialAnimationGroupJob) public: diff --git a/src/qml/debugger/debugger.pri b/src/qml/debugger/debugger.pri new file mode 100644 index 0000000000..10ca9706c4 --- /dev/null +++ b/src/qml/debugger/debugger.pri @@ -0,0 +1,32 @@ +SOURCES += \ + $$PWD/qpacketprotocol.cpp \ + $$PWD/qqmldebugservice.cpp \ + $$PWD/qqmldebugclient.cpp \ + $$PWD/qqmlenginedebug.cpp \ + $$PWD/qqmlprofilerservice.cpp \ + $$PWD/qqmldebughelper.cpp \ + $$PWD/qqmldebugserver.cpp \ + $$PWD/qqmlinspectorservice.cpp \ + $$PWD/qv8debugservice.cpp \ + $$PWD/qv8profilerservice.cpp \ + $$PWD/qqmlenginedebugservice.cpp \ + $$PWD/qdebugmessageservice.cpp + +HEADERS += \ + $$PWD/qpacketprotocol_p.h \ + $$PWD/qqmldebugservice_p.h \ + $$PWD/qqmldebugservice_p_p.h \ + $$PWD/qqmldebugclient_p.h \ + $$PWD/qqmlenginedebug_p.h \ + $$PWD/qqmlprofilerservice_p.h \ + $$PWD/qqmldebughelper_p.h \ + $$PWD/qqmldebugserver_p.h \ + $$PWD/qqmldebugserverconnection_p.h \ + $$PWD/qqmldebugstatesdelegate_p.h \ + $$PWD/qqmlinspectorservice_p.h \ + $$PWD/qqmlinspectorinterface_p.h \ + $$PWD/qv8debugservice_p.h \ + $$PWD/qv8profilerservice_p.h \ + $$PWD/qqmlenginedebugservice_p.h \ + $$PWD/qqmldebug.h \ + $$PWD/qdebugmessageservice_p.h diff --git a/src/declarative/debugger/qdebugmessageservice.cpp b/src/qml/debugger/qdebugmessageservice.cpp similarity index 88% rename from src/declarative/debugger/qdebugmessageservice.cpp rename to src/qml/debugger/qdebugmessageservice.cpp index 3f18a0fe4b..2c52809e56 100644 --- a/src/declarative/debugger/qdebugmessageservice.cpp +++ b/src/qml/debugger/qdebugmessageservice.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -40,11 +40,11 @@ ****************************************************************************/ #include "qdebugmessageservice_p.h" -#include "qdeclarativedebugservice_p_p.h" +#include "qqmldebugservice_p_p.h" QT_BEGIN_NAMESPACE -Q_GLOBAL_STATIC(QDebugMessageService, declarativeDebugMessageService) +Q_GLOBAL_STATIC(QDebugMessageService, qmlDebugMessageService) void DebugMessageHandler(QtMsgType type, const QMessageLogContext &ctxt, const char *buf) @@ -52,21 +52,21 @@ void DebugMessageHandler(QtMsgType type, const QMessageLogContext &ctxt, QDebugMessageService::instance()->sendDebugMessage(type, ctxt, buf); } -class QDebugMessageServicePrivate : public QDeclarativeDebugServicePrivate +class QDebugMessageServicePrivate : public QQmlDebugServicePrivate { public: QDebugMessageServicePrivate() : oldMsgHandler(0) - , prevState(QDeclarativeDebugService::NotConnected) + , prevState(QQmlDebugService::NotConnected) { } QMessageHandler oldMsgHandler; - QDeclarativeDebugService::State prevState; + QQmlDebugService::State prevState; }; QDebugMessageService::QDebugMessageService(QObject *parent) : - QDeclarativeDebugService(*(new QDebugMessageServicePrivate()), + QQmlDebugService(*(new QDebugMessageServicePrivate()), QLatin1String("DebugMessages"), 2, parent) { Q_D(QDebugMessageService); @@ -80,7 +80,7 @@ QDebugMessageService::QDebugMessageService(QObject *parent) : QDebugMessageService *QDebugMessageService::instance() { - return declarativeDebugMessageService(); + return qmlDebugMessageService(); } void QDebugMessageService::sendDebugMessage(QtMsgType type, diff --git a/src/declarative/debugger/qdebugmessageservice_p.h b/src/qml/debugger/qdebugmessageservice_p.h similarity index 92% rename from src/declarative/debugger/qdebugmessageservice_p.h rename to src/qml/debugger/qdebugmessageservice_p.h index b907341541..88b918e217 100644 --- a/src/declarative/debugger/qdebugmessageservice_p.h +++ b/src/qml/debugger/qdebugmessageservice_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -53,7 +53,7 @@ // We mean it. // -#include "qdeclarativedebugservice_p.h" +#include "qqmldebugservice_p.h" #include @@ -61,11 +61,11 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Declarative) +QT_MODULE(Qml) class QDebugMessageServicePrivate; -class QDebugMessageService : public QDeclarativeDebugService +class QDebugMessageService : public QQmlDebugService { Q_OBJECT public: diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/qml/debugger/qpacketprotocol.cpp similarity index 99% rename from src/declarative/debugger/qpacketprotocol.cpp rename to src/qml/debugger/qpacketprotocol.cpp index fa5d676e0a..978054a238 100644 --- a/src/declarative/debugger/qpacketprotocol.cpp +++ b/src/qml/debugger/qpacketprotocol.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/debugger/qpacketprotocol_p.h b/src/qml/debugger/qpacketprotocol_p.h similarity index 91% rename from src/declarative/debugger/qpacketprotocol_p.h rename to src/qml/debugger/qpacketprotocol_p.h index eda7bfbac9..c6123d2836 100644 --- a/src/declarative/debugger/qpacketprotocol_p.h +++ b/src/qml/debugger/qpacketprotocol_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -56,7 +56,7 @@ #include #include -#include +#include QT_BEGIN_HEADER @@ -69,7 +69,7 @@ class QPacket; class QPacketAutoSend; class QPacketProtocolPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QPacketProtocol : public QObject +class Q_QML_PRIVATE_EXPORT QPacketProtocol : public QObject { Q_OBJECT public: @@ -101,7 +101,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QPacketProtocol : public QObject }; -class Q_DECLARATIVE_PRIVATE_EXPORT QPacket : public QDataStream +class Q_QML_PRIVATE_EXPORT QPacket : public QDataStream { public: QPacket(); @@ -119,7 +119,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QPacket : public QDataStream QBuffer *buf; }; -class Q_DECLARATIVE_PRIVATE_EXPORT QPacketAutoSend : public QPacket +class Q_QML_PRIVATE_EXPORT QPacketAutoSend : public QPacket { public: virtual ~QPacketAutoSend(); diff --git a/src/declarative/debugger/qdeclarativedebug.h b/src/qml/debugger/qqmldebug.h similarity index 80% rename from src/declarative/debugger/qdeclarativedebug.h rename to src/qml/debugger/qqmldebug.h index e23e4ff41a..8036032150 100644 --- a/src/declarative/debugger/qdeclarativedebug.h +++ b/src/qml/debugger/qqmldebug.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,28 +39,28 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEDEBUG_H -#define QDECLARATIVEDEBUG_H +#ifndef QQMLDEBUG_H +#define QQMLDEBUG_H -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -struct Q_DECLARATIVE_EXPORT QDeclarativeDebuggingEnabler +struct Q_QML_EXPORT QQmlDebuggingEnabler { - QDeclarativeDebuggingEnabler(); + QQmlDebuggingEnabler(); }; -// Execute code in constructor before first QDeclarativeEngine is instantiated +// Execute code in constructor before first QQmlEngine is instantiated #if defined(QT_DECLARATIVE_DEBUG) -static QDeclarativeDebuggingEnabler qmlEnableDebuggingHelper; +static QQmlDebuggingEnabler qmlEnableDebuggingHelper; #endif QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEDEBUG_H +#endif // QQMLDEBUG_H diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/qml/debugger/qqmldebugclient.cpp similarity index 69% rename from src/declarative/debugger/qdeclarativedebugclient.cpp rename to src/qml/debugger/qqmldebugclient.cpp index df250f3ef6..12276b48fa 100644 --- a/src/declarative/debugger/qdeclarativedebugclient.cpp +++ b/src/qml/debugger/qqmldebugclient.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativedebugclient_p.h" +#include "qqmldebugclient_p.h" #include "qpacketprotocol_p.h" @@ -52,31 +52,31 @@ QT_BEGIN_NAMESPACE const int protocolVersion = 1; -const QString serverId = QLatin1String("QDeclarativeDebugServer"); -const QString clientId = QLatin1String("QDeclarativeDebugClient"); +const QString serverId = QLatin1String("QQmlDebugServer"); +const QString clientId = QLatin1String("QQmlDebugClient"); -class QDeclarativeDebugClientPrivate : public QObjectPrivate +class QQmlDebugClientPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeDebugClient) + Q_DECLARE_PUBLIC(QQmlDebugClient) public: - QDeclarativeDebugClientPrivate(); + QQmlDebugClientPrivate(); QString name; - QDeclarativeDebugConnection *connection; + QQmlDebugConnection *connection; }; -class QDeclarativeDebugConnectionPrivate : public QObject +class QQmlDebugConnectionPrivate : public QObject { Q_OBJECT public: - QDeclarativeDebugConnectionPrivate(QDeclarativeDebugConnection *c); - QDeclarativeDebugConnection *q; + QQmlDebugConnectionPrivate(QQmlDebugConnection *c); + QQmlDebugConnection *q; QPacketProtocol *protocol; QIODevice *device; bool gotHello; QHash serverPlugins; - QHash plugins; + QHash plugins; void advertisePlugins(); void connectDeviceSignals(); @@ -87,7 +87,7 @@ public Q_SLOTS: void deviceAboutToClose(); }; -QDeclarativeDebugConnectionPrivate::QDeclarativeDebugConnectionPrivate(QDeclarativeDebugConnection *c) +QQmlDebugConnectionPrivate::QQmlDebugConnectionPrivate(QQmlDebugConnection *c) : QObject(c), q(c), protocol(0), device(0), gotHello(false) { protocol = new QPacketProtocol(q, this); @@ -95,7 +95,7 @@ QDeclarativeDebugConnectionPrivate::QDeclarativeDebugConnectionPrivate(QDeclarat QObject::connect(protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); } -void QDeclarativeDebugConnectionPrivate::advertisePlugins() +void QQmlDebugConnectionPrivate::advertisePlugins() { if (!q->isConnected()) return; @@ -106,7 +106,7 @@ void QDeclarativeDebugConnectionPrivate::advertisePlugins() q->flush(); } -void QDeclarativeDebugConnectionPrivate::connected() +void QQmlDebugConnectionPrivate::connected() { QPacket pack; pack << serverId << 0 << protocolVersion << plugins.keys(); @@ -114,7 +114,7 @@ void QDeclarativeDebugConnectionPrivate::connected() q->flush(); } -void QDeclarativeDebugConnectionPrivate::readyRead() +void QQmlDebugConnectionPrivate::readyRead() { if (!gotHello) { QPacket pack = protocol->read(); @@ -151,17 +151,17 @@ void QDeclarativeDebugConnectionPrivate::readyRead() } if (!validHello) { - qWarning("QDeclarativeDebugConnection: Invalid hello message"); + qWarning("QQmlDebugConnection: Invalid hello message"); QObject::disconnect(protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); return; } gotHello = true; - QHash::Iterator iter = plugins.begin(); + QHash::Iterator iter = plugins.begin(); for (; iter != plugins.end(); ++iter) { - QDeclarativeDebugClient::State newState = QDeclarativeDebugClient::Unavailable; + QQmlDebugClient::State newState = QQmlDebugClient::Unavailable; if (serverPlugins.contains(iter.key())) - newState = QDeclarativeDebugClient::Enabled; + newState = QQmlDebugClient::Enabled; iter.value()->stateChanged(newState); } } @@ -195,12 +195,12 @@ void QDeclarativeDebugConnectionPrivate::readyRead() serverPlugins.insert(pluginNames.at(i), pluginVersion); } - QHash::Iterator iter = plugins.begin(); + QHash::Iterator iter = plugins.begin(); for (; iter != plugins.end(); ++iter) { const QString pluginName = iter.key(); - QDeclarativeDebugClient::State newSate = QDeclarativeDebugClient::Unavailable; + QQmlDebugClient::State newSate = QQmlDebugClient::Unavailable; if (serverPlugins.contains(pluginName)) - newSate = QDeclarativeDebugClient::Enabled; + newSate = QQmlDebugClient::Enabled; if (oldServerPlugins.contains(pluginName) != serverPlugins.contains(pluginName)) { @@ -208,16 +208,16 @@ void QDeclarativeDebugConnectionPrivate::readyRead() } } } else { - qWarning() << "QDeclarativeDebugConnection: Unknown control message id" << op; + qWarning() << "QQmlDebugConnection: Unknown control message id" << op; } } else { QByteArray message; pack >> message; - QHash::Iterator iter = + QHash::Iterator iter = plugins.find(name); if (iter == plugins.end()) { - qWarning() << "QDeclarativeDebugConnection: Message received for missing plugin" << name; + qWarning() << "QQmlDebugConnection: Message received for missing plugin" << name; } else { (*iter)->messageReceived(message); } @@ -225,67 +225,67 @@ void QDeclarativeDebugConnectionPrivate::readyRead() } } -void QDeclarativeDebugConnectionPrivate::deviceAboutToClose() +void QQmlDebugConnectionPrivate::deviceAboutToClose() { // This is nasty syntax but we want to emit our own aboutToClose signal (by calling QIODevice::close()) // without calling the underlying device close fn as that would cause an infinite loop q->QIODevice::close(); } -QDeclarativeDebugConnection::QDeclarativeDebugConnection(QObject *parent) - : QIODevice(parent), d(new QDeclarativeDebugConnectionPrivate(this)) +QQmlDebugConnection::QQmlDebugConnection(QObject *parent) + : QIODevice(parent), d(new QQmlDebugConnectionPrivate(this)) { } -QDeclarativeDebugConnection::~QDeclarativeDebugConnection() +QQmlDebugConnection::~QQmlDebugConnection() { - QHash::iterator iter = d->plugins.begin(); + QHash::iterator iter = d->plugins.begin(); for (; iter != d->plugins.end(); ++iter) { iter.value()->d_func()->connection = 0; - iter.value()->stateChanged(QDeclarativeDebugClient::NotConnected); + iter.value()->stateChanged(QQmlDebugClient::NotConnected); } } -bool QDeclarativeDebugConnection::isConnected() const +bool QQmlDebugConnection::isConnected() const { return state() == QAbstractSocket::ConnectedState; } -qint64 QDeclarativeDebugConnection::readData(char *data, qint64 maxSize) +qint64 QQmlDebugConnection::readData(char *data, qint64 maxSize) { return d->device->read(data, maxSize); } -qint64 QDeclarativeDebugConnection::writeData(const char *data, qint64 maxSize) +qint64 QQmlDebugConnection::writeData(const char *data, qint64 maxSize) { return d->device->write(data, maxSize); } -qint64 QDeclarativeDebugConnection::bytesAvailable() const +qint64 QQmlDebugConnection::bytesAvailable() const { return d->device->bytesAvailable(); } -bool QDeclarativeDebugConnection::isSequential() const +bool QQmlDebugConnection::isSequential() const { return true; } -void QDeclarativeDebugConnection::close() +void QQmlDebugConnection::close() { if (isOpen()) { QIODevice::close(); d->device->close(); emit stateChanged(QAbstractSocket::UnconnectedState); - QHash::iterator iter = d->plugins.begin(); + QHash::iterator iter = d->plugins.begin(); for (; iter != d->plugins.end(); ++iter) { - iter.value()->stateChanged(QDeclarativeDebugClient::NotConnected); + iter.value()->stateChanged(QQmlDebugClient::NotConnected); } } } -bool QDeclarativeDebugConnection::waitForConnected(int msecs) +bool QQmlDebugConnection::waitForConnected(int msecs) { QAbstractSocket *socket = qobject_cast(d->device); if (socket) @@ -293,7 +293,7 @@ bool QDeclarativeDebugConnection::waitForConnected(int msecs) return false; } -QAbstractSocket::SocketState QDeclarativeDebugConnection::state() const +QAbstractSocket::SocketState QQmlDebugConnection::state() const { QAbstractSocket *socket = qobject_cast(d->device); if (socket) @@ -302,7 +302,7 @@ QAbstractSocket::SocketState QDeclarativeDebugConnection::state() const return QAbstractSocket::UnconnectedState; } -void QDeclarativeDebugConnection::flush() +void QQmlDebugConnection::flush() { QAbstractSocket *socket = qobject_cast(d->device); if (socket) { @@ -311,7 +311,7 @@ void QDeclarativeDebugConnection::flush() } } -void QDeclarativeDebugConnection::connectToHost(const QString &hostName, quint16 port) +void QQmlDebugConnection::connectToHost(const QString &hostName, quint16 port) { QTcpSocket *socket = new QTcpSocket(d); socket->setProxy(QNetworkProxy::NoProxy); @@ -325,7 +325,7 @@ void QDeclarativeDebugConnection::connectToHost(const QString &hostName, quint16 QIODevice::open(ReadWrite | Unbuffered); } -void QDeclarativeDebugConnectionPrivate::connectDeviceSignals() +void QQmlDebugConnectionPrivate::connectDeviceSignals() { connect(device, SIGNAL(bytesWritten(qint64)), q, SIGNAL(bytesWritten(qint64))); connect(device, SIGNAL(readyRead()), q, SIGNAL(readyRead())); @@ -334,16 +334,16 @@ void QDeclarativeDebugConnectionPrivate::connectDeviceSignals() // -QDeclarativeDebugClientPrivate::QDeclarativeDebugClientPrivate() +QQmlDebugClientPrivate::QQmlDebugClientPrivate() : connection(0) { } -QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name, - QDeclarativeDebugConnection *parent) - : QObject(*(new QDeclarativeDebugClientPrivate), parent) +QQmlDebugClient::QQmlDebugClient(const QString &name, + QQmlDebugConnection *parent) + : QObject(*(new QQmlDebugClientPrivate), parent) { - Q_D(QDeclarativeDebugClient); + Q_D(QQmlDebugClient); d->name = name; d->connection = parent; @@ -351,7 +351,7 @@ QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name, return; if (d->connection->d->plugins.contains(name)) { - qWarning() << "QDeclarativeDebugClient: Conflicting plugin name" << name; + qWarning() << "QQmlDebugClient: Conflicting plugin name" << name; d->connection = 0; } else { d->connection->d->plugins.insert(name, this); @@ -359,32 +359,32 @@ QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name, } } -QDeclarativeDebugClient::~QDeclarativeDebugClient() +QQmlDebugClient::~QQmlDebugClient() { - Q_D(QDeclarativeDebugClient); + Q_D(QQmlDebugClient); if (d->connection && d->connection->d) { d->connection->d->plugins.remove(d->name); d->connection->d->advertisePlugins(); } } -QString QDeclarativeDebugClient::name() const +QString QQmlDebugClient::name() const { - Q_D(const QDeclarativeDebugClient); + Q_D(const QQmlDebugClient); return d->name; } -float QDeclarativeDebugClient::serviceVersion() const +float QQmlDebugClient::serviceVersion() const { - Q_D(const QDeclarativeDebugClient); + Q_D(const QQmlDebugClient); if (d->connection->d->serverPlugins.contains(d->name)) return d->connection->d->serverPlugins.value(d->name); return -1; } -QDeclarativeDebugClient::State QDeclarativeDebugClient::state() const +QQmlDebugClient::State QQmlDebugClient::state() const { - Q_D(const QDeclarativeDebugClient); + Q_D(const QQmlDebugClient); if (!d->connection || !d->connection->isConnected() || !d->connection->d->gotHello) @@ -396,9 +396,9 @@ QDeclarativeDebugClient::State QDeclarativeDebugClient::state() const return Unavailable; } -void QDeclarativeDebugClient::sendMessage(const QByteArray &message) +void QQmlDebugClient::sendMessage(const QByteArray &message) { - Q_D(QDeclarativeDebugClient); + Q_D(QQmlDebugClient); if (state() != Enabled) return; @@ -408,14 +408,14 @@ void QDeclarativeDebugClient::sendMessage(const QByteArray &message) d->connection->flush(); } -void QDeclarativeDebugClient::stateChanged(State) +void QQmlDebugClient::stateChanged(State) { } -void QDeclarativeDebugClient::messageReceived(const QByteArray &) +void QQmlDebugClient::messageReceived(const QByteArray &) { } QT_END_NAMESPACE -#include +#include diff --git a/src/declarative/debugger/qdeclarativedebugclient_p.h b/src/qml/debugger/qqmldebugclient_p.h similarity index 74% rename from src/declarative/debugger/qdeclarativedebugclient_p.h rename to src/qml/debugger/qqmldebugclient_p.h index 93c5be9e44..064e15cf49 100644 --- a/src/declarative/debugger/qdeclarativedebugclient_p.h +++ b/src/qml/debugger/qqmldebugclient_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEDEBUGCLIENT_H -#define QDECLARATIVEDEBUGCLIENT_H +#ifndef QQMLDEBUGCLIENT_H +#define QQMLDEBUGCLIENT_H // // W A R N I N G @@ -55,21 +55,21 @@ #include -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeDebugConnectionPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugConnection : public QIODevice +class QQmlDebugConnectionPrivate; +class Q_QML_PRIVATE_EXPORT QQmlDebugConnection : public QIODevice { Q_OBJECT - Q_DISABLE_COPY(QDeclarativeDebugConnection) + Q_DISABLE_COPY(QQmlDebugConnection) public: - QDeclarativeDebugConnection(QObject * = 0); - ~QDeclarativeDebugConnection(); + QQmlDebugConnection(QObject * = 0); + ~QQmlDebugConnection(); void connectToHost(const QString &hostName, quint16 port); @@ -91,23 +91,23 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugConnection : public QIODevic qint64 writeData(const char *data, qint64 maxSize); private: - QDeclarativeDebugConnectionPrivate *d; - friend class QDeclarativeDebugClient; - friend class QDeclarativeDebugClientPrivate; + QQmlDebugConnectionPrivate *d; + friend class QQmlDebugClient; + friend class QQmlDebugClientPrivate; }; -class QDeclarativeDebugClientPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugClient : public QObject +class QQmlDebugClientPrivate; +class Q_QML_PRIVATE_EXPORT QQmlDebugClient : public QObject { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeDebugClient) - Q_DISABLE_COPY(QDeclarativeDebugClient) + Q_DECLARE_PRIVATE(QQmlDebugClient) + Q_DISABLE_COPY(QQmlDebugClient) public: enum State { NotConnected, Unavailable, Enabled }; - QDeclarativeDebugClient(const QString &, QDeclarativeDebugConnection *parent); - ~QDeclarativeDebugClient(); + QQmlDebugClient(const QString &, QQmlDebugConnection *parent); + ~QQmlDebugClient(); QString name() const; float serviceVersion() const; @@ -120,12 +120,12 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugClient : public QObject virtual void messageReceived(const QByteArray &); private: - friend class QDeclarativeDebugConnection; - friend class QDeclarativeDebugConnectionPrivate; + friend class QQmlDebugConnection; + friend class QQmlDebugConnectionPrivate; }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEDEBUGCLIENT_H +#endif // QQMLDEBUGCLIENT_H diff --git a/src/declarative/debugger/qdeclarativedebughelper.cpp b/src/qml/debugger/qqmldebughelper.cpp similarity index 75% rename from src/declarative/debugger/qdeclarativedebughelper.cpp rename to src/qml/debugger/qqmldebughelper.cpp index 45d488fe1b..7158b3609d 100644 --- a/src/declarative/debugger/qdeclarativedebughelper.cpp +++ b/src/qml/debugger/qqmldebughelper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,31 +39,31 @@ ** ****************************************************************************/ -#include "qdeclarativedebughelper_p.h" +#include "qqmldebughelper_p.h" #include -#include +#include -#include +#include #include -#include +#include QT_BEGIN_NAMESPACE -void QDeclarativeDebugHelper::setAnimationSlowDownFactor(qreal factor) +void QQmlDebugHelper::setAnimationSlowDownFactor(qreal factor) { QUnifiedTimer *timer = QUnifiedTimer::instance(); timer->setSlowModeEnabled(factor != 1.0); timer->setSlowdownFactor(factor); } -void QDeclarativeDebugHelper::enableDebugging() { - qWarning("QDeclarativeDebugHelper::enableDebugging() is deprecated! Add CONFIG += declarative_debug to your .pro file instead."); -#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL - if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { +void QQmlDebugHelper::enableDebugging() { + qWarning("QQmlDebugHelper::enableDebugging() is deprecated! Add CONFIG += declarative_debug to your .pro file instead."); +#ifndef QQML_NO_DEBUG_PROTOCOL + if (!QQmlEnginePrivate::qml_debugging_enabled) { qWarning("Qml debugging is enabled. Only use this in a safe environment!"); } - QDeclarativeEnginePrivate::qml_debugging_enabled = true; + QQmlEnginePrivate::qml_debugging_enabled = true; #endif } diff --git a/src/declarative/debugger/qdeclarativedebughelper_p.h b/src/qml/debugger/qqmldebughelper_p.h similarity index 86% rename from src/declarative/debugger/qdeclarativedebughelper_p.h rename to src/qml/debugger/qqmldebughelper_p.h index d24bc8c19f..5d2bcc2be0 100644 --- a/src/declarative/debugger/qdeclarativedebughelper_p.h +++ b/src/qml/debugger/qqmldebughelper_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,12 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEDEBUGHELPER_P_H -#define QDECLARATIVEDEBUGHELPER_P_H +#ifndef QQMLDEBUGHELPER_P_H +#define QQMLDEBUGHELPER_P_H -#include - -#include +#include // // W A R N I N G @@ -61,15 +59,15 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeEngine; +class QQmlEngine; -#ifndef QT_BUILD_DECLARATIVE_LIB +#ifndef QT_BUILD_QML_LIB #warning Use of this header file is deprecated! Add CONFIG += declarative_debug to your .pro file instead. #endif // Helper methods to access private API through a stable interface // This is used in the qmljsdebugger library of QtCreator. -class Q_DECLARATIVE_EXPORT QDeclarativeDebugHelper +class Q_QML_EXPORT QQmlDebugHelper { public: static void setAnimationSlowDownFactor(qreal factor); @@ -83,4 +81,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEDEBUGHELPER_P_H +#endif // QQMLDEBUGHELPER_P_H diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/qml/debugger/qqmldebugserver.cpp similarity index 65% rename from src/declarative/debugger/qdeclarativedebugserver.cpp rename to src/qml/debugger/qqmldebugserver.cpp index 482847c7a7..8d5c597a78 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/qml/debugger/qqmldebugserver.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,11 @@ ** ****************************************************************************/ -#include "qdeclarativedebugserver_p.h" -#include "qdeclarativedebugservice_p.h" -#include "qdeclarativedebugservice_p_p.h" -#include +#include "qqmldebugserver_p.h" +#include "qqmldebugservice_p.h" +#include "qqmldebugservice_p_p.h" +#include +#include #include #include @@ -55,25 +56,25 @@ QT_BEGIN_NAMESPACE /* - QDeclarativeDebug Protocol (Version 1): + QQmlDebug Protocol (Version 1): handshake: 1. Client sends - "QDeclarativeDebugServer" 0 version pluginNames + "QQmlDebugServer" 0 version pluginNames version: an int representing the highest protocol version the client knows pluginNames: plugins available on client side 2. Server sends - "QDeclarativeDebugClient" 0 version pluginNames pluginVersions + "QQmlDebugClient" 0 version pluginNames pluginVersions version: an int representing the highest protocol version the client & server know pluginNames: plugins available on server side. plugins both in the client and server message are enabled. client plugin advertisement 1. Client sends - "QDeclarativeDebugServer" 1 pluginNames + "QQmlDebugServer" 1 pluginNames server plugin advertisement 1. Server sends - "QDeclarativeDebugClient" 1 pluginNames pluginVersions + "QQmlDebugClient" 1 pluginNames pluginVersions plugin communication: - Everything send with a header different to "QDeclarativeDebugServer" is sent to the appropriate plugin. + Everything send with a header different to "QQmlDebugServer" is sent to the appropriate plugin. */ const int protocolVersion = 1; @@ -81,19 +82,19 @@ const int protocolVersion = 1; // print detailed information about loading of plugins DEFINE_BOOL_CONFIG_OPTION(qmlDebugVerbose, QML_DEBUGGER_VERBOSE) -class QDeclarativeDebugServerThread; +class QQmlDebugServerThread; -class QDeclarativeDebugServerPrivate : public QObjectPrivate +class QQmlDebugServerPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeDebugServer) + Q_DECLARE_PUBLIC(QQmlDebugServer) public: - QDeclarativeDebugServerPrivate(); + QQmlDebugServerPrivate(); void advertisePlugins(); - QDeclarativeDebugServerConnection *loadConnectionPlugin(const QString &pluginName); + QQmlDebugServerConnection *loadConnectionPlugin(const QString &pluginName); - QDeclarativeDebugServerConnection *connection; - QHash plugins; + QQmlDebugServerConnection *connection; + QHash plugins; mutable QReadWriteLock pluginsLock; QStringList clientPlugins; bool gotHello; @@ -101,7 +102,7 @@ class QDeclarativeDebugServerPrivate : public QObjectPrivate QMutex messageArrivedMutex; QWaitCondition messageArrivedCondition; QStringList waitingForMessageNames; - QDeclarativeDebugServerThread *thread; + QQmlDebugServerThread *thread; QPluginLoader loader; private: @@ -109,7 +110,7 @@ class QDeclarativeDebugServerPrivate : public QObjectPrivate void _q_sendMessages(const QList &messages); }; -class QDeclarativeDebugServerThread : public QThread +class QQmlDebugServerThread : public QThread { public: void setPluginName(const QString &pluginName) { @@ -129,7 +130,7 @@ class QDeclarativeDebugServerThread : public QThread bool m_block; }; -QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() : +QQmlDebugServerPrivate::QQmlDebugServerPrivate() : connection(0), gotHello(false), thread(0) @@ -138,9 +139,9 @@ QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() : qRegisterMetaType >("QList"); } -void QDeclarativeDebugServerPrivate::advertisePlugins() +void QQmlDebugServerPrivate::advertisePlugins() { - Q_Q(QDeclarativeDebugServer); + Q_Q(QQmlDebugServer); if (!gotHello) return; @@ -150,17 +151,17 @@ void QDeclarativeDebugServerPrivate::advertisePlugins() QDataStream out(&message, QIODevice::WriteOnly); QStringList pluginNames; QList pluginVersions; - foreach (QDeclarativeDebugService *service, plugins.values()) { + foreach (QQmlDebugService *service, plugins.values()) { pluginNames << service->name(); pluginVersions << service->version(); } - out << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << pluginNames << pluginVersions; + out << QString(QLatin1String("QQmlDebugClient")) << 1 << pluginNames << pluginVersions; } QMetaObject::invokeMethod(q, "_q_sendMessages", Qt::QueuedConnection, Q_ARG(QList, QList() << message)); } -QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectionPlugin( +QQmlDebugServerConnection *QQmlDebugServerPrivate::loadConnectionPlugin( const QString &pluginName) { #ifndef QT_NO_LIBRARY @@ -179,26 +180,26 @@ QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectio foreach (const QString &pluginPath, pluginCandidates) { if (qmlDebugVerbose()) - qDebug() << "QDeclarativeDebugServer: Trying to load plugin " << pluginPath << "..."; + qDebug() << "QQmlDebugServer: Trying to load plugin " << pluginPath << "..."; loader.setFileName(pluginPath); if (!loader.load()) { if (qmlDebugVerbose()) - qDebug() << "QDeclarativeDebugServer: Error while loading: " << loader.errorString(); + qDebug() << "QQmlDebugServer: Error while loading: " << loader.errorString(); continue; } if (QObject *instance = loader.instance()) - connection = qobject_cast(instance); + connection = qobject_cast(instance); if (connection) { if (qmlDebugVerbose()) - qDebug() << "QDeclarativeDebugServer: Plugin successfully loaded."; + qDebug() << "QQmlDebugServer: Plugin successfully loaded."; return connection; } if (qmlDebugVerbose()) - qDebug() << "QDeclarativeDebugServer: Plugin does not implement interface QDeclarativeDebugServerConnection."; + qDebug() << "QQmlDebugServer: Plugin does not implement interface QQmlDebugServerConnection."; loader.unload(); } @@ -206,17 +207,17 @@ QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectio return 0; } -void QDeclarativeDebugServerThread::run() +void QQmlDebugServerThread::run() { - QDeclarativeDebugServer *server = QDeclarativeDebugServer::instance(); - QDeclarativeDebugServerConnection *connection + QQmlDebugServer *server = QQmlDebugServer::instance(); + QQmlDebugServerConnection *connection = server->d_func()->loadConnectionPlugin(m_pluginName); if (connection) { - connection->setServer(QDeclarativeDebugServer::instance()); + connection->setServer(QQmlDebugServer::instance()); connection->setPort(m_port, m_block); } else { QCoreApplicationPrivate *appD = static_cast(QObjectPrivate::get(qApp)); - qWarning() << QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + qWarning() << QString::fromAscii("QQmlDebugServer: Ignoring \"-qmljsdebugger=%1\". " "Remote debugger plugin has not been found.").arg(appD->qmljsDebugArgumentsString()); } @@ -227,24 +228,24 @@ void QDeclarativeDebugServerThread::run() eventLoop.processEvents(QEventLoop::AllEvents); } -bool QDeclarativeDebugServer::hasDebuggingClient() const +bool QQmlDebugServer::hasDebuggingClient() const { - Q_D(const QDeclarativeDebugServer); + Q_D(const QQmlDebugServer); return d->connection && d->connection->isConnected() && d->gotHello; } -static QDeclarativeDebugServer *qDeclarativeDebugServer = 0; +static QQmlDebugServer *qQmlDebugServer = 0; static void cleanup() { - delete qDeclarativeDebugServer; - qDeclarativeDebugServer = 0; + delete qQmlDebugServer; + qQmlDebugServer = 0; } -QDeclarativeDebugServer *QDeclarativeDebugServer::instance() +QQmlDebugServer *QQmlDebugServer::instance() { static bool commandLineTested = false; @@ -252,7 +253,7 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() commandLineTested = true; QCoreApplicationPrivate *appD = static_cast(QObjectPrivate::get(qApp)); -#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL +#ifndef QQML_NO_DEBUG_PROTOCOL // ### remove port definition when protocol is changed int port = 0; bool block = false; @@ -260,9 +261,9 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() // format: qmljsdebugger=port:3768[,block] OR qmljsdebugger=ost[,block] if (!appD->qmljsDebugArgumentsString().isEmpty()) { - if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { + if (!QQmlEnginePrivate::qml_debugging_enabled) { qWarning() << QString::fromLatin1( - "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "QQmlDebugServer: Ignoring \"-qmljsdebugger=%1\". " "Debugging has not been enabled.").arg( appD->qmljsDebugArgumentsString()); return 0; @@ -281,16 +282,16 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() block = appD->qmljsDebugArgumentsString().contains(QLatin1String("block")); if (ok) { - qDeclarativeDebugServer = new QDeclarativeDebugServer(); - QDeclarativeDebugServerThread *thread = new QDeclarativeDebugServerThread; - qDeclarativeDebugServer->d_func()->thread = thread; - qDeclarativeDebugServer->moveToThread(thread); + qQmlDebugServer = new QQmlDebugServer(); + QQmlDebugServerThread *thread = new QQmlDebugServerThread; + qQmlDebugServer->d_func()->thread = thread; + qQmlDebugServer->moveToThread(thread); thread->setPluginName(pluginName); thread->setPort(port, block); thread->start(); if (block) { - QDeclarativeDebugServerPrivate *d = qDeclarativeDebugServer->d_func(); + QQmlDebugServerPrivate *d = qQmlDebugServer->d_func(); d->messageArrivedMutex.lock(); d->messageArrivedCondition.wait(&d->messageArrivedMutex); d->messageArrivedMutex.unlock(); @@ -298,7 +299,7 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() } else { qWarning() << QString::fromLatin1( - "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "QQmlDebugServer: Ignoring \"-qmljsdebugger=%1\". " "Format is -qmljsdebugger=port:[,block]").arg( appD->qmljsDebugArgumentsString()); } @@ -306,33 +307,33 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() #else if (!appD->qmljsDebugArgumentsString().isEmpty()) { qWarning() << QString::fromLatin1( - "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " - "QtDeclarative is not configured for debugging.").arg( + "QQmlDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "QtQml is not configured for debugging.").arg( appD->qmljsDebugArgumentsString()); } #endif } - return qDeclarativeDebugServer; + return qQmlDebugServer; } -QDeclarativeDebugServer::QDeclarativeDebugServer() - : QObject(*(new QDeclarativeDebugServerPrivate)) +QQmlDebugServer::QQmlDebugServer() + : QObject(*(new QQmlDebugServerPrivate)) { qAddPostRoutine(cleanup); } -QDeclarativeDebugServer::~QDeclarativeDebugServer() +QQmlDebugServer::~QQmlDebugServer() { - Q_D(QDeclarativeDebugServer); + Q_D(QQmlDebugServer); QReadLocker(&d->pluginsLock); { - foreach (QDeclarativeDebugService *service, d->plugins.values()) { - service->stateAboutToBeChanged(QDeclarativeDebugService::NotConnected); + foreach (QQmlDebugService *service, d->plugins.values()) { + service->stateAboutToBeChanged(QQmlDebugService::NotConnected); service->d_func()->server = 0; - service->d_func()->state = QDeclarativeDebugService::NotConnected; - service->stateChanged(QDeclarativeDebugService::NotConnected); + service->d_func()->state = QQmlDebugService::NotConnected; + service->stateChanged(QQmlDebugService::NotConnected); } } @@ -344,16 +345,16 @@ QDeclarativeDebugServer::~QDeclarativeDebugServer() delete d->connection; } -void QDeclarativeDebugServer::receiveMessage(const QByteArray &message) +void QQmlDebugServer::receiveMessage(const QByteArray &message) { - Q_D(QDeclarativeDebugServer); + Q_D(QQmlDebugServer); QDataStream in(message); QString name; in >> name; - if (name == QLatin1String("QDeclarativeDebugServer")) { + if (name == QLatin1String("QQmlDebugServer")) { int op = -1; in >> op; if (op == 0) { @@ -367,28 +368,28 @@ void QDeclarativeDebugServer::receiveMessage(const QByteArray &message) QDataStream out(&helloAnswer, QIODevice::WriteOnly); QStringList pluginNames; QList pluginVersions; - foreach (QDeclarativeDebugService *service, d->plugins.values()) { + foreach (QQmlDebugService *service, d->plugins.values()) { pluginNames << service->name(); pluginVersions << service->version(); } - out << QString(QLatin1String("QDeclarativeDebugClient")) << 0 << protocolVersion << pluginNames << pluginVersions; + out << QString(QLatin1String("QQmlDebugClient")) << 0 << protocolVersion << pluginNames << pluginVersions; } d->connection->send(QList() << helloAnswer); d->gotHello = true; QReadLocker(&d->pluginsLock); - QHash::ConstIterator iter = d->plugins.constBegin(); + QHash::ConstIterator iter = d->plugins.constBegin(); for (; iter != d->plugins.constEnd(); ++iter) { - QDeclarativeDebugService::State newState = QDeclarativeDebugService::Unavailable; + QQmlDebugService::State newState = QQmlDebugService::Unavailable; if (d->clientPlugins.contains(iter.key())) - newState = QDeclarativeDebugService::Enabled; + newState = QQmlDebugService::Enabled; iter.value()->d_func()->state = newState; iter.value()->stateChanged(newState); } - qWarning("QDeclarativeDebugServer: Connection established"); + qWarning("QQmlDebugServer: Connection established"); d->messageArrivedCondition.wakeAll(); } else if (op == 1) { @@ -398,12 +399,12 @@ void QDeclarativeDebugServer::receiveMessage(const QByteArray &message) in >> d->clientPlugins; QReadLocker(&d->pluginsLock); - QHash::ConstIterator iter = d->plugins.constBegin(); + QHash::ConstIterator iter = d->plugins.constBegin(); for (; iter != d->plugins.constEnd(); ++iter) { const QString pluginName = iter.key(); - QDeclarativeDebugService::State newState = QDeclarativeDebugService::Unavailable; + QQmlDebugService::State newState = QQmlDebugService::Unavailable; if (d->clientPlugins.contains(pluginName)) - newState = QDeclarativeDebugService::Enabled; + newState = QQmlDebugService::Enabled; if (oldClientPlugins.contains(pluginName) != d->clientPlugins.contains(pluginName)) { @@ -413,7 +414,7 @@ void QDeclarativeDebugServer::receiveMessage(const QByteArray &message) } } else { - qWarning("QDeclarativeDebugServer: Invalid control message %d", op); + qWarning("QQmlDebugServer: Invalid control message %d", op); d->connection->disconnect(); return; } @@ -424,9 +425,9 @@ void QDeclarativeDebugServer::receiveMessage(const QByteArray &message) in >> message; QReadLocker(&d->pluginsLock); - QHash::Iterator iter = d->plugins.find(name); + QHash::Iterator iter = d->plugins.find(name); if (iter == d->plugins.end()) { - qWarning() << "QDeclarativeDebugServer: Message received for missing plugin" << name; + qWarning() << "QQmlDebugServer: Message received for missing plugin" << name; } else { (*iter)->messageReceived(message); @@ -434,35 +435,35 @@ void QDeclarativeDebugServer::receiveMessage(const QByteArray &message) d->messageArrivedCondition.wakeAll(); } } else { - qWarning("QDeclarativeDebugServer: Invalid hello message"); + qWarning("QQmlDebugServer: Invalid hello message"); } } } -void QDeclarativeDebugServerPrivate::_q_sendMessages(const QList &messages) +void QQmlDebugServerPrivate::_q_sendMessages(const QList &messages) { if (connection) connection->send(messages); } -QList QDeclarativeDebugServer::services() const +QList QQmlDebugServer::services() const { - const Q_D(QDeclarativeDebugServer); + const Q_D(QQmlDebugServer); QReadLocker(&d->pluginsLock); return d->plugins.values(); } -QStringList QDeclarativeDebugServer::serviceNames() const +QStringList QQmlDebugServer::serviceNames() const { - const Q_D(QDeclarativeDebugServer); + const Q_D(QQmlDebugServer); QReadLocker(&d->pluginsLock); return d->plugins.keys(); } -bool QDeclarativeDebugServer::addService(QDeclarativeDebugService *service) +bool QQmlDebugServer::addService(QQmlDebugService *service) { - Q_D(QDeclarativeDebugServer); + Q_D(QQmlDebugServer); { QWriteLocker(&d->pluginsLock); if (!service || d->plugins.contains(service->name())) @@ -472,17 +473,17 @@ bool QDeclarativeDebugServer::addService(QDeclarativeDebugService *service) { QReadLocker(&d->pluginsLock); d->advertisePlugins(); - QDeclarativeDebugService::State newState = QDeclarativeDebugService::Unavailable; + QQmlDebugService::State newState = QQmlDebugService::Unavailable; if (d->clientPlugins.contains(service->name())) - newState = QDeclarativeDebugService::Enabled; + newState = QQmlDebugService::Enabled; service->d_func()->state = newState; } return true; } -bool QDeclarativeDebugServer::removeService(QDeclarativeDebugService *service) +bool QQmlDebugServer::removeService(QQmlDebugService *service) { - Q_D(QDeclarativeDebugServer); + Q_D(QQmlDebugServer); { QWriteLocker(&d->pluginsLock); if (!service || !d->plugins.contains(service->name())) @@ -491,7 +492,7 @@ bool QDeclarativeDebugServer::removeService(QDeclarativeDebugService *service) } { QReadLocker(&d->pluginsLock); - QDeclarativeDebugService::State newState = QDeclarativeDebugService::NotConnected; + QQmlDebugService::State newState = QQmlDebugService::NotConnected; service->stateAboutToBeChanged(newState); d->advertisePlugins(); service->d_func()->server = 0; @@ -502,7 +503,7 @@ bool QDeclarativeDebugServer::removeService(QDeclarativeDebugService *service) return true; } -void QDeclarativeDebugServer::sendMessages(QDeclarativeDebugService *service, +void QQmlDebugServer::sendMessages(QQmlDebugService *service, const QList &messages) { QList prefixedMessages; @@ -516,9 +517,9 @@ void QDeclarativeDebugServer::sendMessages(QDeclarativeDebugService *service, QMetaObject::invokeMethod(this, "_q_sendMessages", Qt::QueuedConnection, Q_ARG(QList, prefixedMessages)); } -bool QDeclarativeDebugServer::waitForMessage(QDeclarativeDebugService *service) +bool QQmlDebugServer::waitForMessage(QQmlDebugService *service) { - Q_D(QDeclarativeDebugServer); + Q_D(QQmlDebugServer); QReadLocker(&d->pluginsLock); if (!service @@ -536,4 +537,4 @@ bool QDeclarativeDebugServer::waitForMessage(QDeclarativeDebugService *service) QT_END_NAMESPACE -#include "moc_qdeclarativedebugserver_p.cpp" +#include "moc_qqmldebugserver_p.cpp" diff --git a/src/declarative/debugger/qdeclarativedebugserver_p.h b/src/qml/debugger/qqmldebugserver_p.h similarity index 65% rename from src/declarative/debugger/qdeclarativedebugserver_p.h rename to src/qml/debugger/qqmldebugserver_p.h index 8f7f748761..9c6b5435c8 100644 --- a/src/declarative/debugger/qdeclarativedebugserver_p.h +++ b/src/qml/debugger/qqmldebugserver_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEDEBUGSERVER_H -#define QDECLARATIVEDEBUGSERVER_H +#ifndef QQMLDEBUGSERVER_H +#define QQMLDEBUGSERVER_H -#include -#include +#include +#include // // W A R N I N G @@ -61,40 +61,40 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeDebugService; +class QQmlDebugService; -class QDeclarativeDebugServerPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugServer : public QObject +class QQmlDebugServerPrivate; +class Q_QML_EXPORT QQmlDebugServer : public QObject { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeDebugServer) - Q_DISABLE_COPY(QDeclarativeDebugServer) + Q_DECLARE_PRIVATE(QQmlDebugServer) + Q_DISABLE_COPY(QQmlDebugServer) public: - ~QDeclarativeDebugServer(); + ~QQmlDebugServer(); - static QDeclarativeDebugServer *instance(); + static QQmlDebugServer *instance(); - void setConnection(QDeclarativeDebugServerConnection *connection); + void setConnection(QQmlDebugServerConnection *connection); bool hasDebuggingClient() const; - QList services() const; + QList services() const; QStringList serviceNames() const; - bool addService(QDeclarativeDebugService *service); - bool removeService(QDeclarativeDebugService *service); + bool addService(QQmlDebugService *service); + bool removeService(QQmlDebugService *service); void receiveMessage(const QByteArray &message); - bool waitForMessage(QDeclarativeDebugService *service); - void sendMessages(QDeclarativeDebugService *service, const QList &messages); + bool waitForMessage(QQmlDebugService *service); + void sendMessages(QQmlDebugService *service, const QList &messages); private: - friend class QDeclarativeDebugService; - friend class QDeclarativeDebugServicePrivate; - friend class QDeclarativeDebugServerThread; - QDeclarativeDebugServer(); + friend class QQmlDebugService; + friend class QQmlDebugServicePrivate; + friend class QQmlDebugServerThread; + QQmlDebugServer(); Q_PRIVATE_SLOT(d_func(), void _q_sendMessages(QList)) }; @@ -102,4 +102,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEDEBUGSERVICE_H +#endif // QQMLDEBUGSERVICE_H diff --git a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h b/src/qml/debugger/qqmldebugserverconnection_p.h similarity index 78% rename from src/declarative/debugger/qdeclarativedebugserverconnection_p.h rename to src/qml/debugger/qqmldebugserverconnection_p.h index aa1c8aa0f1..c9092f1911 100644 --- a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h +++ b/src/qml/debugger/qqmldebugserverconnection_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEDEBUGSERVERCONNECTION_H -#define QDECLARATIVEDEBUGSERVERCONNECTION_H +#ifndef QQMLDEBUGSERVERCONNECTION_H +#define QQMLDEBUGSERVERCONNECTION_H -#include +#include +#include // // W A R N I N G @@ -60,14 +61,14 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeDebugServer; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugServerConnection +class QQmlDebugServer; +class Q_QML_EXPORT QQmlDebugServerConnection { public: - QDeclarativeDebugServerConnection() {} - virtual ~QDeclarativeDebugServerConnection() {} + QQmlDebugServerConnection() {} + virtual ~QQmlDebugServerConnection() {} - virtual void setServer(QDeclarativeDebugServer *server) = 0; + virtual void setServer(QQmlDebugServer *server) = 0; virtual void setPort(int port, bool bock) = 0; virtual bool isConnected() const = 0; virtual void send(const QList &messages) = 0; @@ -75,10 +76,10 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDebugServerConnection virtual bool waitForMessage() = 0; }; -Q_DECLARE_INTERFACE(QDeclarativeDebugServerConnection, "com.trolltech.Qt.QDeclarativeDebugServerConnection/1.0") +Q_DECLARE_INTERFACE(QQmlDebugServerConnection, "com.trolltech.Qt.QQmlDebugServerConnection/1.0") QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEDEBUGSERVERCONNECTION_H +#endif // QQMLDEBUGSERVERCONNECTION_H diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/qml/debugger/qqmldebugservice.cpp similarity index 68% rename from src/declarative/debugger/qdeclarativedebugservice.cpp rename to src/qml/debugger/qqmldebugservice.cpp index 96344d7717..9eb9489566 100644 --- a/src/declarative/debugger/qdeclarativedebugservice.cpp +++ b/src/qml/debugger/qqmldebugservice.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,55 +39,55 @@ ** ****************************************************************************/ -#include "qdeclarativedebugservice_p.h" -#include "qdeclarativedebugservice_p_p.h" -#include "qdeclarativedebugserver_p.h" +#include "qqmldebugservice_p.h" +#include "qqmldebugservice_p_p.h" +#include "qqmldebugserver_p.h" #include #include QT_BEGIN_NAMESPACE -QDeclarativeDebugServicePrivate::QDeclarativeDebugServicePrivate() +QQmlDebugServicePrivate::QQmlDebugServicePrivate() : server(0) { } -QDeclarativeDebugService::QDeclarativeDebugService(const QString &name, float version, QObject *parent) - : QObject(*(new QDeclarativeDebugServicePrivate), parent) +QQmlDebugService::QQmlDebugService(const QString &name, float version, QObject *parent) + : QObject(*(new QQmlDebugServicePrivate), parent) { - Q_D(QDeclarativeDebugService); + Q_D(QQmlDebugService); d->name = name; d->version = version; - d->server = QDeclarativeDebugServer::instance(); - d->state = QDeclarativeDebugService::NotConnected; + d->server = QQmlDebugServer::instance(); + d->state = QQmlDebugService::NotConnected; } -QDeclarativeDebugService::QDeclarativeDebugService(QDeclarativeDebugServicePrivate &dd, +QQmlDebugService::QQmlDebugService(QQmlDebugServicePrivate &dd, const QString &name, float version, QObject *parent) : QObject(dd, parent) { - Q_D(QDeclarativeDebugService); + Q_D(QQmlDebugService); d->name = name; d->version = version; - d->server = QDeclarativeDebugServer::instance(); - d->state = QDeclarativeDebugService::NotConnected; + d->server = QQmlDebugServer::instance(); + d->state = QQmlDebugService::NotConnected; } /** Registers the service. This should be called in the constructor of the inherited class. From then on the service might get asynchronous calls to messageReceived(). */ -QDeclarativeDebugService::State QDeclarativeDebugService::registerService() +QQmlDebugService::State QQmlDebugService::registerService() { - Q_D(QDeclarativeDebugService); + Q_D(QQmlDebugService); if (!d->server) return NotConnected; if (d->server->serviceNames().contains(d->name)) { - qWarning() << "QDeclarativeDebugService: Conflicting plugin name" << d->name; + qWarning() << "QQmlDebugService: Conflicting plugin name" << d->name; d->server = 0; } else { d->server->addService(this); @@ -95,29 +95,29 @@ QDeclarativeDebugService::State QDeclarativeDebugService::registerService() return state(); } -QDeclarativeDebugService::~QDeclarativeDebugService() +QQmlDebugService::~QQmlDebugService() { - Q_D(const QDeclarativeDebugService); + Q_D(const QQmlDebugService); if (d->server) { d->server->removeService(this); } } -QString QDeclarativeDebugService::name() const +QString QQmlDebugService::name() const { - Q_D(const QDeclarativeDebugService); + Q_D(const QQmlDebugService); return d->name; } -float QDeclarativeDebugService::version() const +float QQmlDebugService::version() const { - Q_D(const QDeclarativeDebugService); + Q_D(const QQmlDebugService); return d->version; } -QDeclarativeDebugService::State QDeclarativeDebugService::state() const +QQmlDebugService::State QQmlDebugService::state() const { - Q_D(const QDeclarativeDebugService); + Q_D(const QQmlDebugService); return d->state; } @@ -147,7 +147,7 @@ Q_GLOBAL_STATIC(ObjectReferenceHash, objectReferenceHash); Returns a unique id for \a object. Calling this method multiple times for the same object will return the same id. */ -int QDeclarativeDebugService::idForObject(QObject *object) +int QQmlDebugService::idForObject(QObject *object) { if (!object) return -1; @@ -180,7 +180,7 @@ int QDeclarativeDebugService::idForObject(QObject *object) assigned an id, through idForObject(), then 0 is returned. If the object has been destroyed, 0 is returned. */ -QObject *QDeclarativeDebugService::objectForId(int id) +QObject *QQmlDebugService::objectForId(int id) { ObjectReferenceHash *hash = objectReferenceHash(); @@ -202,18 +202,18 @@ QObject *QDeclarativeDebugService::objectForId(int id) } } -bool QDeclarativeDebugService::isDebuggingEnabled() +bool QQmlDebugService::isDebuggingEnabled() { - return QDeclarativeDebugServer::instance() != 0; + return QQmlDebugServer::instance() != 0; } -bool QDeclarativeDebugService::hasDebuggingClient() +bool QQmlDebugService::hasDebuggingClient() { - return QDeclarativeDebugServer::instance() != 0 - && QDeclarativeDebugServer::instance()->hasDebuggingClient(); + return QQmlDebugServer::instance() != 0 + && QQmlDebugServer::instance()->hasDebuggingClient(); } -QString QDeclarativeDebugService::objectToString(QObject *obj) +QString QQmlDebugService::objectToString(QObject *obj) { if(!obj) return QLatin1String("NULL"); @@ -228,14 +228,14 @@ QString QDeclarativeDebugService::objectToString(QObject *obj) return rv; } -void QDeclarativeDebugService::sendMessage(const QByteArray &message) +void QQmlDebugService::sendMessage(const QByteArray &message) { sendMessages(QList() << message); } -void QDeclarativeDebugService::sendMessages(const QList &messages) +void QQmlDebugService::sendMessages(const QList &messages) { - Q_D(QDeclarativeDebugService); + Q_D(QQmlDebugService); if (state() != Enabled) return; @@ -243,9 +243,9 @@ void QDeclarativeDebugService::sendMessages(const QList &messages) d->server->sendMessages(this, messages); } -bool QDeclarativeDebugService::waitForMessage() +bool QQmlDebugService::waitForMessage() { - Q_D(QDeclarativeDebugService); + Q_D(QQmlDebugService); if (state() != Enabled) return false; @@ -253,15 +253,15 @@ bool QDeclarativeDebugService::waitForMessage() return d->server->waitForMessage(this); } -void QDeclarativeDebugService::stateAboutToBeChanged(State) +void QQmlDebugService::stateAboutToBeChanged(State) { } -void QDeclarativeDebugService::stateChanged(State) +void QQmlDebugService::stateChanged(State) { } -void QDeclarativeDebugService::messageReceived(const QByteArray &) +void QQmlDebugService::messageReceived(const QByteArray &) { } diff --git a/src/declarative/debugger/qdeclarativedebugservice_p.h b/src/qml/debugger/qqmldebugservice_p.h similarity index 77% rename from src/declarative/debugger/qdeclarativedebugservice_p.h rename to src/qml/debugger/qqmldebugservice_p.h index 203e27ad09..f19b64f42b 100644 --- a/src/declarative/debugger/qdeclarativedebugservice_p.h +++ b/src/qml/debugger/qqmldebugservice_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,12 +39,12 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEDEBUGSERVICE_H -#define QDECLARATIVEDEBUGSERVICE_H +#ifndef QQMLDEBUGSERVICE_H +#define QQMLDEBUGSERVICE_H #include -#include +#include // // W A R N I N G @@ -62,16 +62,16 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeDebugServicePrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugService : public QObject +class QQmlDebugServicePrivate; +class Q_QML_PRIVATE_EXPORT QQmlDebugService : public QObject { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeDebugService) - Q_DISABLE_COPY(QDeclarativeDebugService) + Q_DECLARE_PRIVATE(QQmlDebugService) + Q_DISABLE_COPY(QQmlDebugService) public: - explicit QDeclarativeDebugService(const QString &, float version, QObject *parent = 0); - ~QDeclarativeDebugService(); + explicit QQmlDebugService(const QString &, float version, QObject *parent = 0); + ~QQmlDebugService(); QString name() const; float version() const; @@ -92,7 +92,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugService : public QObject static bool hasDebuggingClient(); protected: - QDeclarativeDebugService(QDeclarativeDebugServicePrivate &dd, const QString &name, float version, QObject *parent = 0); + QQmlDebugService(QQmlDebugServicePrivate &dd, const QString &name, float version, QObject *parent = 0); State registerService(); @@ -101,13 +101,13 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugService : public QObject virtual void messageReceived(const QByteArray &); private: - friend class QDeclarativeDebugServer; - friend class QDeclarativeDebugServerPrivate; + friend class QQmlDebugServer; + friend class QQmlDebugServerPrivate; }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEDEBUGSERVICE_H +#endif // QQMLDEBUGSERVICE_H diff --git a/src/declarative/debugger/qdeclarativedebugservice_p_p.h b/src/qml/debugger/qqmldebugservice_p_p.h similarity index 82% rename from src/declarative/debugger/qdeclarativedebugservice_p_p.h rename to src/qml/debugger/qqmldebugservice_p_p.h index 6638ccbec7..c066e41fe6 100644 --- a/src/declarative/debugger/qdeclarativedebugservice_p_p.h +++ b/src/qml/debugger/qqmldebugservice_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEDEBUGSERVICE_P_H -#define QDECLARATIVEDEBUGSERVICE_P_H +#ifndef QQMLDEBUGSERVICE_P_H +#define QQMLDEBUGSERVICE_P_H // // W A R N I N G @@ -61,22 +61,22 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeDebugServer; +class QQmlDebugServer; -class QDeclarativeDebugServicePrivate : public QObjectPrivate +class QQmlDebugServicePrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeDebugService) + Q_DECLARE_PUBLIC(QQmlDebugService) public: - QDeclarativeDebugServicePrivate(); + QQmlDebugServicePrivate(); QString name; float version; - QDeclarativeDebugServer *server; - QDeclarativeDebugService::State state; + QQmlDebugServer *server; + QQmlDebugService::State state; }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEDEBUGSERVICE_P_H +#endif // QQMLDEBUGSERVICE_P_H diff --git a/src/declarative/debugger/qdeclarativedebugstatesdelegate_p.h b/src/qml/debugger/qqmldebugstatesdelegate_p.h similarity index 79% rename from src/declarative/debugger/qdeclarativedebugstatesdelegate_p.h rename to src/qml/debugger/qqmldebugstatesdelegate_p.h index 868357723d..6e3cc978f2 100644 --- a/src/declarative/debugger/qdeclarativedebugstatesdelegate_p.h +++ b/src/qml/debugger/qqmldebugstatesdelegate_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEDEBUGSTATESDELEGATE_P_H -#define QDECLARATIVEDEBUGSTATESDELEGATE_P_H +#ifndef QQMLDEBUGSTATESDELEGATE_P_H +#define QQMLDEBUGSTATESDELEGATE_P_H // // W A R N I N G @@ -53,30 +53,30 @@ // We mean it. // -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeContext; -class QDeclarativeProperty; +class QQmlContext; +class QQmlProperty; class QObject; class QString; class QVariant; -class QDeclarativeDebugStatesDelegate +class QQmlDebugStatesDelegate { protected: - QDeclarativeDebugStatesDelegate() {} + QQmlDebugStatesDelegate() {} public: - virtual ~QDeclarativeDebugStatesDelegate() {} + virtual ~QQmlDebugStatesDelegate() {} - virtual void buildStatesList(QDeclarativeContext *ctxt, bool cleanList) = 0; - virtual void updateBinding(QDeclarativeContext *context, - const QDeclarativeProperty &property, + virtual void buildStatesList(QQmlContext *ctxt, bool cleanList) = 0; + virtual void updateBinding(QQmlContext *context, + const QQmlProperty &property, const QVariant &expression, bool isLiteralValue, const QString &fileName, int line, int column, bool *inBaseState) = 0; @@ -88,11 +88,11 @@ class QDeclarativeDebugStatesDelegate const QString &propertyName) = 0; private: - Q_DISABLE_COPY(QDeclarativeDebugStatesDelegate) + Q_DISABLE_COPY(QQmlDebugStatesDelegate) }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEDEBUGSTATESDELEGATE_P_H +#endif // QQMLDEBUGSTATESDELEGATE_P_H diff --git a/src/qml/debugger/qqmlenginedebug.cpp b/src/qml/debugger/qqmlenginedebug.cpp new file mode 100644 index 0000000000..597e7aeb04 --- /dev/null +++ b/src/qml/debugger/qqmlenginedebug.cpp @@ -0,0 +1,1072 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qqmlenginedebug_p.h" + +#include "qqmldebugclient_p.h" + +#include "qqmlenginedebugservice_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class QQmlEngineDebugClient : public QQmlDebugClient +{ +public: + QQmlEngineDebugClient(QQmlDebugConnection *client, QQmlEngineDebugPrivate *p); + +protected: + virtual void stateChanged(State state); + virtual void messageReceived(const QByteArray &); + +private: + QQmlEngineDebugPrivate *priv; + friend class QQmlEngineDebugPrivate; +}; + +class QQmlEngineDebugPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQmlEngineDebug) +public: + QQmlEngineDebugPrivate(QQmlDebugConnection *); + ~QQmlEngineDebugPrivate(); + + void stateChanged(QQmlEngineDebug::State status); + void message(const QByteArray &); + + QQmlEngineDebugClient *client; + int nextId; + int getId(); + + void decode(QDataStream &, QQmlDebugContextReference &); + void decode(QDataStream &, QQmlDebugObjectReference &, bool simple); + + static void remove(QQmlEngineDebug *, QQmlDebugEnginesQuery *); + static void remove(QQmlEngineDebug *, QQmlDebugRootContextQuery *); + static void remove(QQmlEngineDebug *, QQmlDebugObjectQuery *); + static void remove(QQmlEngineDebug *, QQmlDebugExpressionQuery *); + static void remove(QQmlEngineDebug *, QQmlDebugWatch *); + + QHash enginesQuery; + QHash rootContextQuery; + QHash objectQuery; + QHash expressionQuery; + + QHash watched; +}; + +QQmlEngineDebugClient::QQmlEngineDebugClient(QQmlDebugConnection *client, + QQmlEngineDebugPrivate *p) + : QQmlDebugClient(QLatin1String("QQmlEngine"), client), priv(p) +{ +} + +void QQmlEngineDebugClient::stateChanged(State status) +{ + if (priv) + priv->stateChanged(static_cast(status)); +} + +void QQmlEngineDebugClient::messageReceived(const QByteArray &data) +{ + if (priv) + priv->message(data); +} + +QQmlEngineDebugPrivate::QQmlEngineDebugPrivate(QQmlDebugConnection *c) + : client(new QQmlEngineDebugClient(c, this)), nextId(0) +{ +} + +QQmlEngineDebugPrivate::~QQmlEngineDebugPrivate() +{ + if (client) + client->priv = 0; + delete client; + + QHash::iterator enginesIter = enginesQuery.begin(); + for (; enginesIter != enginesQuery.end(); ++enginesIter) { + enginesIter.value()->m_client = 0; + if (enginesIter.value()->state() == QQmlDebugQuery::Waiting) + enginesIter.value()->setState(QQmlDebugQuery::Error); + } + + QHash::iterator rootContextIter = rootContextQuery.begin(); + for (; rootContextIter != rootContextQuery.end(); ++rootContextIter) { + rootContextIter.value()->m_client = 0; + if (rootContextIter.value()->state() == QQmlDebugQuery::Waiting) + rootContextIter.value()->setState(QQmlDebugQuery::Error); + } + + QHash::iterator objectIter = objectQuery.begin(); + for (; objectIter != objectQuery.end(); ++objectIter) { + objectIter.value()->m_client = 0; + if (objectIter.value()->state() == QQmlDebugQuery::Waiting) + objectIter.value()->setState(QQmlDebugQuery::Error); + } + + QHash::iterator exprIter = expressionQuery.begin(); + for (; exprIter != expressionQuery.end(); ++exprIter) { + exprIter.value()->m_client = 0; + if (exprIter.value()->state() == QQmlDebugQuery::Waiting) + exprIter.value()->setState(QQmlDebugQuery::Error); + } + + QHash::iterator watchIter = watched.begin(); + for (; watchIter != watched.end(); ++watchIter) { + watchIter.value()->m_client = 0; + watchIter.value()->setState(QQmlDebugWatch::Dead); + } +} + +int QQmlEngineDebugPrivate::getId() +{ + return nextId++; +} + +void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugEnginesQuery *q) +{ + if (c && q) { + QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c); + p->enginesQuery.remove(q->m_queryId); + } +} + +void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, + QQmlDebugRootContextQuery *q) +{ + if (c && q) { + QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c); + p->rootContextQuery.remove(q->m_queryId); + } +} + +void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugObjectQuery *q) +{ + if (c && q) { + QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c); + p->objectQuery.remove(q->m_queryId); + } +} + +void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugExpressionQuery *q) +{ + if (c && q) { + QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c); + p->expressionQuery.remove(q->m_queryId); + } +} + +void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugWatch *w) +{ + if (c && w) { + QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c); + p->watched.remove(w->m_queryId); + } +} + +void QQmlEngineDebugPrivate::decode(QDataStream &ds, QQmlDebugObjectReference &o, + bool simple) +{ + QQmlEngineDebugService::QQmlObjectData data; + ds >> data; + o.m_debugId = data.objectId; + o.m_class = data.objectType; + o.m_idString = data.idString; + o.m_name = data.objectName; + o.m_source.m_url = data.url; + o.m_source.m_lineNumber = data.lineNumber; + o.m_source.m_columnNumber = data.columnNumber; + o.m_contextDebugId = data.contextId; + + if (simple) + return; + + int childCount; + bool recur; + ds >> childCount >> recur; + + for (int ii = 0; ii < childCount; ++ii) { + o.m_children.append(QQmlDebugObjectReference()); + decode(ds, o.m_children.last(), !recur); + } + + int propCount; + ds >> propCount; + + for (int ii = 0; ii < propCount; ++ii) { + QQmlEngineDebugService::QQmlObjectProperty data; + ds >> data; + QQmlDebugPropertyReference prop; + prop.m_objectDebugId = o.m_debugId; + prop.m_name = data.name; + prop.m_binding = data.binding; + prop.m_hasNotifySignal = data.hasNotifySignal; + prop.m_valueTypeName = data.valueTypeName; + switch (data.type) { + case QQmlEngineDebugService::QQmlObjectProperty::Basic: + case QQmlEngineDebugService::QQmlObjectProperty::List: + case QQmlEngineDebugService::QQmlObjectProperty::SignalProperty: + { + prop.m_value = data.value; + break; + } + case QQmlEngineDebugService::QQmlObjectProperty::Object: + { + QQmlDebugObjectReference obj; + obj.m_debugId = prop.m_value.toInt(); + prop.m_value = QVariant::fromValue(obj); + break; + } + case QQmlEngineDebugService::QQmlObjectProperty::Unknown: + break; + } + o.m_properties << prop; + } +} + +void QQmlEngineDebugPrivate::decode(QDataStream &ds, QQmlDebugContextReference &c) +{ + ds >> c.m_name >> c.m_debugId; + + int contextCount; + ds >> contextCount; + + for (int ii = 0; ii < contextCount; ++ii) { + c.m_contexts.append(QQmlDebugContextReference()); + decode(ds, c.m_contexts.last()); + } + + int objectCount; + ds >> objectCount; + + for (int ii = 0; ii < objectCount; ++ii) { + QQmlDebugObjectReference obj; + decode(ds, obj, true); + + obj.m_contextDebugId = c.m_debugId; + c.m_objects << obj; + } +} + +void QQmlEngineDebugPrivate::stateChanged(QQmlEngineDebug::State status) +{ + emit q_func()->stateChanged(status); +} + +void QQmlEngineDebugPrivate::message(const QByteArray &data) +{ + QDataStream ds(data); + + QByteArray type; + ds >> type; + + //qDebug() << "QQmlEngineDebugPrivate::message()" << type; + + if (type == "LIST_ENGINES_R") { + int queryId; + ds >> queryId; + + QQmlDebugEnginesQuery *query = enginesQuery.value(queryId); + if (!query) + return; + enginesQuery.remove(queryId); + + int count; + ds >> count; + + for (int ii = 0; ii < count; ++ii) { + QQmlDebugEngineReference ref; + ds >> ref.m_name; + ds >> ref.m_debugId; + query->m_engines << ref; + } + + query->m_client = 0; + query->setState(QQmlDebugQuery::Completed); + } else if (type == "LIST_OBJECTS_R") { + int queryId; + ds >> queryId; + + QQmlDebugRootContextQuery *query = rootContextQuery.value(queryId); + if (!query) + return; + rootContextQuery.remove(queryId); + + if (!ds.atEnd()) + decode(ds, query->m_context); + + query->m_client = 0; + query->setState(QQmlDebugQuery::Completed); + } else if (type == "FETCH_OBJECT_R") { + int queryId; + ds >> queryId; + + QQmlDebugObjectQuery *query = objectQuery.value(queryId); + if (!query) + return; + objectQuery.remove(queryId); + + if (!ds.atEnd()) + decode(ds, query->m_object, false); + + query->m_client = 0; + query->setState(QQmlDebugQuery::Completed); + } else if (type == "EVAL_EXPRESSION_R") { + int queryId; + QVariant result; + ds >> queryId >> result; + + QQmlDebugExpressionQuery *query = expressionQuery.value(queryId); + if (!query) + return; + expressionQuery.remove(queryId); + + query->m_result = result; + query->m_client = 0; + query->setState(QQmlDebugQuery::Completed); + } else if (type == "WATCH_PROPERTY_R") { + int queryId; + bool ok; + ds >> queryId >> ok; + + QQmlDebugWatch *watch = watched.value(queryId); + if (!watch) + return; + + watch->setState(ok ? QQmlDebugWatch::Active : QQmlDebugWatch::Inactive); + } else if (type == "WATCH_OBJECT_R") { + int queryId; + bool ok; + ds >> queryId >> ok; + + QQmlDebugWatch *watch = watched.value(queryId); + if (!watch) + return; + + watch->setState(ok ? QQmlDebugWatch::Active : QQmlDebugWatch::Inactive); + } else if (type == "WATCH_EXPR_OBJECT_R") { + int queryId; + bool ok; + ds >> queryId >> ok; + + QQmlDebugWatch *watch = watched.value(queryId); + if (!watch) + return; + + watch->setState(ok ? QQmlDebugWatch::Active : QQmlDebugWatch::Inactive); + } else if (type == "UPDATE_WATCH") { + int queryId; + int debugId; + QByteArray name; + QVariant value; + ds >> queryId >> debugId >> name >> value; + + QQmlDebugWatch *watch = watched.value(queryId, 0); + if (!watch) + return; + emit watch->valueChanged(name, value); + } else if (type == "OBJECT_CREATED") { + emit q_func()->newObjects(); + } +} + +QQmlEngineDebug::QQmlEngineDebug(QQmlDebugConnection *client, QObject *parent) + : QObject(*(new QQmlEngineDebugPrivate(client)), parent) +{ +} + +QQmlEngineDebug::~QQmlEngineDebug() +{ +} + +QQmlEngineDebug::State QQmlEngineDebug::state() const +{ + Q_D(const QQmlEngineDebug); + + return static_cast(d->client->state()); +} + +QQmlDebugPropertyWatch *QQmlEngineDebug::addWatch(const QQmlDebugPropertyReference &property, QObject *parent) +{ + Q_D(QQmlEngineDebug); + + QQmlDebugPropertyWatch *watch = new QQmlDebugPropertyWatch(parent); + if (d->client->state() == QQmlDebugClient::Enabled) { + int queryId = d->getId(); + watch->m_queryId = queryId; + watch->m_client = this; + watch->m_objectDebugId = property.objectDebugId(); + watch->m_name = property.name(); + d->watched.insert(queryId, watch); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("WATCH_PROPERTY") << queryId << property.objectDebugId() << property.name().toUtf8(); + d->client->sendMessage(message); + } else { + watch->m_state = QQmlDebugWatch::Dead; + } + + return watch; +} + +QQmlDebugWatch *QQmlEngineDebug::addWatch(const QQmlDebugContextReference &, const QString &, QObject *) +{ + qWarning("QQmlEngineDebug::addWatch(): Not implemented"); + return 0; +} + +QQmlDebugObjectExpressionWatch *QQmlEngineDebug::addWatch(const QQmlDebugObjectReference &object, const QString &expr, QObject *parent) +{ + Q_D(QQmlEngineDebug); + QQmlDebugObjectExpressionWatch *watch = new QQmlDebugObjectExpressionWatch(parent); + if (d->client->state() == QQmlDebugClient::Enabled) { + int queryId = d->getId(); + watch->m_queryId = queryId; + watch->m_client = this; + watch->m_objectDebugId = object.debugId(); + watch->m_expr = expr; + d->watched.insert(queryId, watch); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("WATCH_EXPR_OBJECT") << queryId << object.debugId() << expr; + d->client->sendMessage(message); + } else { + watch->m_state = QQmlDebugWatch::Dead; + } + return watch; +} + +QQmlDebugWatch *QQmlEngineDebug::addWatch(const QQmlDebugObjectReference &object, QObject *parent) +{ + Q_D(QQmlEngineDebug); + + QQmlDebugWatch *watch = new QQmlDebugWatch(parent); + if (d->client->state() == QQmlDebugClient::Enabled) { + int queryId = d->getId(); + watch->m_queryId = queryId; + watch->m_client = this; + watch->m_objectDebugId = object.debugId(); + d->watched.insert(queryId, watch); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("WATCH_OBJECT") << queryId << object.debugId(); + d->client->sendMessage(message); + } else { + watch->m_state = QQmlDebugWatch::Dead; + } + + return watch; +} + +QQmlDebugWatch *QQmlEngineDebug::addWatch(const QQmlDebugFileReference &, QObject *) +{ + qWarning("QQmlEngineDebug::addWatch(): Not implemented"); + return 0; +} + +void QQmlEngineDebug::removeWatch(QQmlDebugWatch *watch) +{ + Q_D(QQmlEngineDebug); + + if (!watch || !watch->m_client) + return; + + watch->m_client = 0; + watch->setState(QQmlDebugWatch::Inactive); + + d->watched.remove(watch->queryId()); + + if (d->client && d->client->state() == QQmlDebugClient::Enabled) { + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("NO_WATCH") << watch->queryId(); + d->client->sendMessage(message); + } +} + +QQmlDebugEnginesQuery *QQmlEngineDebug::queryAvailableEngines(QObject *parent) +{ + Q_D(QQmlEngineDebug); + + QQmlDebugEnginesQuery *query = new QQmlDebugEnginesQuery(parent); + if (d->client->state() == QQmlDebugClient::Enabled) { + query->m_client = this; + int queryId = d->getId(); + query->m_queryId = queryId; + d->enginesQuery.insert(queryId, query); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("LIST_ENGINES") << queryId; + d->client->sendMessage(message); + } else { + query->m_state = QQmlDebugQuery::Error; + } + + return query; +} + +QQmlDebugRootContextQuery *QQmlEngineDebug::queryRootContexts(const QQmlDebugEngineReference &engine, QObject *parent) +{ + Q_D(QQmlEngineDebug); + + QQmlDebugRootContextQuery *query = new QQmlDebugRootContextQuery(parent); + if (d->client->state() == QQmlDebugClient::Enabled && engine.debugId() != -1) { + query->m_client = this; + int queryId = d->getId(); + query->m_queryId = queryId; + d->rootContextQuery.insert(queryId, query); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("LIST_OBJECTS") << queryId << engine.debugId(); + d->client->sendMessage(message); + } else { + query->m_state = QQmlDebugQuery::Error; + } + + return query; +} + +QQmlDebugObjectQuery *QQmlEngineDebug::queryObject(const QQmlDebugObjectReference &object, QObject *parent) +{ + Q_D(QQmlEngineDebug); + + QQmlDebugObjectQuery *query = new QQmlDebugObjectQuery(parent); + if (d->client->state() == QQmlDebugClient::Enabled && object.debugId() != -1) { + query->m_client = this; + int queryId = d->getId(); + query->m_queryId = queryId; + d->objectQuery.insert(queryId, query); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() + << false << true; + d->client->sendMessage(message); + } else { + query->m_state = QQmlDebugQuery::Error; + } + + return query; +} + +QQmlDebugObjectQuery *QQmlEngineDebug::queryObjectRecursive(const QQmlDebugObjectReference &object, QObject *parent) +{ + Q_D(QQmlEngineDebug); + + QQmlDebugObjectQuery *query = new QQmlDebugObjectQuery(parent); + if (d->client->state() == QQmlDebugClient::Enabled && object.debugId() != -1) { + query->m_client = this; + int queryId = d->getId(); + query->m_queryId = queryId; + d->objectQuery.insert(queryId, query); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() + << true << true; + d->client->sendMessage(message); + } else { + query->m_state = QQmlDebugQuery::Error; + } + + return query; +} + +QQmlDebugExpressionQuery *QQmlEngineDebug::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent) +{ + Q_D(QQmlEngineDebug); + + QQmlDebugExpressionQuery *query = new QQmlDebugExpressionQuery(parent); + if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) { + query->m_client = this; + query->m_expr = expr; + int queryId = d->getId(); + query->m_queryId = queryId; + d->expressionQuery.insert(queryId, query); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("EVAL_EXPRESSION") << queryId << objectDebugId << expr; + d->client->sendMessage(message); + } else { + query->m_state = QQmlDebugQuery::Error; + } + + return query; +} + +bool QQmlEngineDebug::setBindingForObject(int objectDebugId, const QString &propertyName, + const QVariant &bindingExpression, + bool isLiteralValue, + QString source, int line) +{ + Q_D(QQmlEngineDebug); + + if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) { + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue << source << line; + d->client->sendMessage(message); + return true; + } else { + return false; + } +} + +bool QQmlEngineDebug::resetBindingForObject(int objectDebugId, const QString &propertyName) +{ + Q_D(QQmlEngineDebug); + + if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) { + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName; + d->client->sendMessage(message); + return true; + } else { + return false; + } +} + +bool QQmlEngineDebug::setMethodBody(int objectDebugId, const QString &methodName, + const QString &methodBody) +{ + Q_D(QQmlEngineDebug); + + if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) { + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("SET_METHOD_BODY") << objectDebugId << methodName << methodBody; + d->client->sendMessage(message); + return true; + } else { + return false; + } +} + +QQmlDebugWatch::QQmlDebugWatch(QObject *parent) + : QObject(parent), m_state(Waiting), m_queryId(-1), m_client(0), m_objectDebugId(-1) +{ +} + +QQmlDebugWatch::~QQmlDebugWatch() +{ + if (m_client && m_queryId != -1) + QQmlEngineDebugPrivate::remove(m_client, this); +} + +int QQmlDebugWatch::queryId() const +{ + return m_queryId; +} + +int QQmlDebugWatch::objectDebugId() const +{ + return m_objectDebugId; +} + +QQmlDebugWatch::State QQmlDebugWatch::state() const +{ + return m_state; +} + +void QQmlDebugWatch::setState(State s) +{ + if (m_state == s) + return; + m_state = s; + emit stateChanged(m_state); +} + +QQmlDebugPropertyWatch::QQmlDebugPropertyWatch(QObject *parent) + : QQmlDebugWatch(parent) +{ +} + +QString QQmlDebugPropertyWatch::name() const +{ + return m_name; +} + + +QQmlDebugObjectExpressionWatch::QQmlDebugObjectExpressionWatch(QObject *parent) + : QQmlDebugWatch(parent) +{ +} + +QString QQmlDebugObjectExpressionWatch::expression() const +{ + return m_expr; +} + + +QQmlDebugQuery::QQmlDebugQuery(QObject *parent) + : QObject(parent), m_state(Waiting) +{ +} + +QQmlDebugQuery::State QQmlDebugQuery::state() const +{ + return m_state; +} + +bool QQmlDebugQuery::isWaiting() const +{ + return m_state == Waiting; +} + +void QQmlDebugQuery::setState(State s) +{ + if (m_state == s) + return; + m_state = s; + emit stateChanged(m_state); +} + +QQmlDebugEnginesQuery::QQmlDebugEnginesQuery(QObject *parent) + : QQmlDebugQuery(parent), m_client(0), m_queryId(-1) +{ +} + +QQmlDebugEnginesQuery::~QQmlDebugEnginesQuery() +{ + if (m_client && m_queryId != -1) + QQmlEngineDebugPrivate::remove(m_client, this); +} + +QList QQmlDebugEnginesQuery::engines() const +{ + return m_engines; +} + +QQmlDebugRootContextQuery::QQmlDebugRootContextQuery(QObject *parent) + : QQmlDebugQuery(parent), m_client(0), m_queryId(-1) +{ +} + +QQmlDebugRootContextQuery::~QQmlDebugRootContextQuery() +{ + if (m_client && m_queryId != -1) + QQmlEngineDebugPrivate::remove(m_client, this); +} + +QQmlDebugContextReference QQmlDebugRootContextQuery::rootContext() const +{ + return m_context; +} + +QQmlDebugObjectQuery::QQmlDebugObjectQuery(QObject *parent) + : QQmlDebugQuery(parent), m_client(0), m_queryId(-1) +{ +} + +QQmlDebugObjectQuery::~QQmlDebugObjectQuery() +{ + if (m_client && m_queryId != -1) + QQmlEngineDebugPrivate::remove(m_client, this); +} + +QQmlDebugObjectReference QQmlDebugObjectQuery::object() const +{ + return m_object; +} + +QQmlDebugExpressionQuery::QQmlDebugExpressionQuery(QObject *parent) + : QQmlDebugQuery(parent), m_client(0), m_queryId(-1) +{ +} + +QQmlDebugExpressionQuery::~QQmlDebugExpressionQuery() +{ + if (m_client && m_queryId != -1) + QQmlEngineDebugPrivate::remove(m_client, this); +} + +QVariant QQmlDebugExpressionQuery::expression() const +{ + return m_expr; +} + +QVariant QQmlDebugExpressionQuery::result() const +{ + return m_result; +} + +QQmlDebugEngineReference::QQmlDebugEngineReference() + : m_debugId(-1) +{ +} + +QQmlDebugEngineReference::QQmlDebugEngineReference(int debugId) + : m_debugId(debugId) +{ +} + +QQmlDebugEngineReference::QQmlDebugEngineReference(const QQmlDebugEngineReference &o) + : m_debugId(o.m_debugId), m_name(o.m_name) +{ +} + +QQmlDebugEngineReference & +QQmlDebugEngineReference::operator=(const QQmlDebugEngineReference &o) +{ + m_debugId = o.m_debugId; m_name = o.m_name; + return *this; +} + +int QQmlDebugEngineReference::debugId() const +{ + return m_debugId; +} + +QString QQmlDebugEngineReference::name() const +{ + return m_name; +} + +QQmlDebugObjectReference::QQmlDebugObjectReference() + : m_debugId(-1), m_contextDebugId(-1) +{ +} + +QQmlDebugObjectReference::QQmlDebugObjectReference(int debugId) + : m_debugId(debugId), m_contextDebugId(-1) +{ +} + +QQmlDebugObjectReference::QQmlDebugObjectReference(const QQmlDebugObjectReference &o) + : m_debugId(o.m_debugId), m_class(o.m_class), m_idString(o.m_idString), + m_name(o.m_name), m_source(o.m_source), m_contextDebugId(o.m_contextDebugId), + m_properties(o.m_properties), m_children(o.m_children) +{ +} + +QQmlDebugObjectReference & +QQmlDebugObjectReference::operator=(const QQmlDebugObjectReference &o) +{ + m_debugId = o.m_debugId; m_class = o.m_class; m_idString = o.m_idString; + m_name = o.m_name; m_source = o.m_source; m_contextDebugId = o.m_contextDebugId; + m_properties = o.m_properties; m_children = o.m_children; + return *this; +} + +int QQmlDebugObjectReference::debugId() const +{ + return m_debugId; +} + +QString QQmlDebugObjectReference::className() const +{ + return m_class; +} + +QString QQmlDebugObjectReference::idString() const +{ + return m_idString; +} + +QString QQmlDebugObjectReference::name() const +{ + return m_name; +} + +QQmlDebugFileReference QQmlDebugObjectReference::source() const +{ + return m_source; +} + +int QQmlDebugObjectReference::contextDebugId() const +{ + return m_contextDebugId; +} + +QList QQmlDebugObjectReference::properties() const +{ + return m_properties; +} + +QList QQmlDebugObjectReference::children() const +{ + return m_children; +} + +QQmlDebugContextReference::QQmlDebugContextReference() + : m_debugId(-1) +{ +} + +QQmlDebugContextReference::QQmlDebugContextReference(const QQmlDebugContextReference &o) + : m_debugId(o.m_debugId), m_name(o.m_name), m_objects(o.m_objects), m_contexts(o.m_contexts) +{ +} + +QQmlDebugContextReference &QQmlDebugContextReference::operator=(const QQmlDebugContextReference &o) +{ + m_debugId = o.m_debugId; m_name = o.m_name; m_objects = o.m_objects; + m_contexts = o.m_contexts; + return *this; +} + +int QQmlDebugContextReference::debugId() const +{ + return m_debugId; +} + +QString QQmlDebugContextReference::name() const +{ + return m_name; +} + +QList QQmlDebugContextReference::objects() const +{ + return m_objects; +} + +QList QQmlDebugContextReference::contexts() const +{ + return m_contexts; +} + +QQmlDebugFileReference::QQmlDebugFileReference() + : m_lineNumber(-1), m_columnNumber(-1) +{ +} + +QQmlDebugFileReference::QQmlDebugFileReference(const QQmlDebugFileReference &o) + : m_url(o.m_url), m_lineNumber(o.m_lineNumber), m_columnNumber(o.m_columnNumber) +{ +} + +QQmlDebugFileReference &QQmlDebugFileReference::operator=(const QQmlDebugFileReference &o) +{ + m_url = o.m_url; m_lineNumber = o.m_lineNumber; m_columnNumber = o.m_columnNumber; + return *this; +} + +QUrl QQmlDebugFileReference::url() const +{ + return m_url; +} + +void QQmlDebugFileReference::setUrl(const QUrl &u) +{ + m_url = u; +} + +int QQmlDebugFileReference::lineNumber() const +{ + return m_lineNumber; +} + +void QQmlDebugFileReference::setLineNumber(int l) +{ + m_lineNumber = l; +} + +int QQmlDebugFileReference::columnNumber() const +{ + return m_columnNumber; +} + +void QQmlDebugFileReference::setColumnNumber(int c) +{ + m_columnNumber = c; +} + +QQmlDebugPropertyReference::QQmlDebugPropertyReference() + : m_objectDebugId(-1), m_hasNotifySignal(false) +{ +} + +QQmlDebugPropertyReference::QQmlDebugPropertyReference(const QQmlDebugPropertyReference &o) + : m_objectDebugId(o.m_objectDebugId), m_name(o.m_name), m_value(o.m_value), + m_valueTypeName(o.m_valueTypeName), m_binding(o.m_binding), + m_hasNotifySignal(o.m_hasNotifySignal) +{ +} + +QQmlDebugPropertyReference &QQmlDebugPropertyReference::operator=(const QQmlDebugPropertyReference &o) +{ + m_objectDebugId = o.m_objectDebugId; m_name = o.m_name; m_value = o.m_value; + m_valueTypeName = o.m_valueTypeName; m_binding = o.m_binding; + m_hasNotifySignal = o.m_hasNotifySignal; + return *this; +} + +int QQmlDebugPropertyReference::objectDebugId() const +{ + return m_objectDebugId; +} + +QString QQmlDebugPropertyReference::name() const +{ + return m_name; +} + +QString QQmlDebugPropertyReference::valueTypeName() const +{ + return m_valueTypeName; +} + +QVariant QQmlDebugPropertyReference::value() const +{ + return m_value; +} + +QString QQmlDebugPropertyReference::binding() const +{ + return m_binding; +} + +bool QQmlDebugPropertyReference::hasNotifySignal() const +{ + return m_hasNotifySignal; +} + +QT_END_NAMESPACE + diff --git a/src/qml/debugger/qqmlenginedebug_p.h b/src/qml/debugger/qqmlenginedebug_p.h new file mode 100644 index 0000000000..0562d8755b --- /dev/null +++ b/src/qml/debugger/qqmlenginedebug_p.h @@ -0,0 +1,397 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QQMLENGINEDEBUG_H +#define QQMLENGINEDEBUG_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. +// + +#include +#include +#include + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + + +class QQmlDebugConnection; +class QQmlDebugWatch; +class QQmlDebugPropertyWatch; +class QQmlDebugObjectExpressionWatch; +class QQmlDebugEnginesQuery; +class QQmlDebugRootContextQuery; +class QQmlDebugObjectQuery; +class QQmlDebugExpressionQuery; +class QQmlDebugPropertyReference; +class QQmlDebugContextReference; +class QQmlDebugObjectReference; +class QQmlDebugFileReference; +class QQmlDebugEngineReference; +class QQmlEngineDebugPrivate; +class Q_QML_PRIVATE_EXPORT QQmlEngineDebug : public QObject +{ + Q_OBJECT +public: + enum State { NotConnected, Unavailable, Enabled }; + + explicit QQmlEngineDebug(QQmlDebugConnection *, QObject * = 0); + ~QQmlEngineDebug(); + + State state() const; + + QQmlDebugPropertyWatch *addWatch(const QQmlDebugPropertyReference &, + QObject *parent = 0); + QQmlDebugWatch *addWatch(const QQmlDebugContextReference &, const QString &, + QObject *parent = 0); + QQmlDebugObjectExpressionWatch *addWatch(const QQmlDebugObjectReference &, const QString &, + QObject *parent = 0); + QQmlDebugWatch *addWatch(const QQmlDebugObjectReference &, + QObject *parent = 0); + QQmlDebugWatch *addWatch(const QQmlDebugFileReference &, + QObject *parent = 0); + + void removeWatch(QQmlDebugWatch *watch); + + QQmlDebugEnginesQuery *queryAvailableEngines(QObject *parent = 0); + QQmlDebugRootContextQuery *queryRootContexts(const QQmlDebugEngineReference &, + QObject *parent = 0); + QQmlDebugObjectQuery *queryObject(const QQmlDebugObjectReference &, + QObject *parent = 0); + QQmlDebugObjectQuery *queryObjectRecursive(const QQmlDebugObjectReference &, + QObject *parent = 0); + QQmlDebugExpressionQuery *queryExpressionResult(int objectDebugId, + const QString &expr, + QObject *parent = 0); + bool setBindingForObject(int objectDebugId, const QString &propertyName, + const QVariant &bindingExpression, bool isLiteralValue, + QString source = QString(), int line = -1); + bool resetBindingForObject(int objectDebugId, const QString &propertyName); + bool setMethodBody(int objectDebugId, const QString &methodName, const QString &methodBody); + +Q_SIGNALS: + void newObjects(); + void stateChanged(State state); + +private: + Q_DECLARE_PRIVATE(QQmlEngineDebug) +}; + +class Q_QML_PRIVATE_EXPORT QQmlDebugWatch : public QObject +{ + Q_OBJECT +public: + enum State { Waiting, Active, Inactive, Dead }; + + QQmlDebugWatch(QObject *); + ~QQmlDebugWatch(); + + int queryId() const; + int objectDebugId() const; + State state() const; + +Q_SIGNALS: + void stateChanged(QQmlDebugWatch::State); + //void objectChanged(int, const QQmlDebugObjectReference &); + //void valueChanged(int, const QVariant &); + + // Server sends value as string if it is a user-type variant + void valueChanged(const QByteArray &name, const QVariant &value); + +private: + friend class QQmlEngineDebug; + friend class QQmlEngineDebugPrivate; + void setState(State); + State m_state; + int m_queryId; + QQmlEngineDebug *m_client; + int m_objectDebugId; +}; + +class Q_QML_PRIVATE_EXPORT QQmlDebugPropertyWatch : public QQmlDebugWatch +{ + Q_OBJECT +public: + QQmlDebugPropertyWatch(QObject *parent); + + QString name() const; + +private: + friend class QQmlEngineDebug; + QString m_name; +}; + +class Q_QML_PRIVATE_EXPORT QQmlDebugObjectExpressionWatch : public QQmlDebugWatch +{ + Q_OBJECT +public: + QQmlDebugObjectExpressionWatch(QObject *parent); + + QString expression() const; + +private: + friend class QQmlEngineDebug; + QString m_expr; + int m_debugId; +}; + + +class Q_QML_PRIVATE_EXPORT QQmlDebugQuery : public QObject +{ + Q_OBJECT +public: + enum State { Waiting, Error, Completed }; + + State state() const; + bool isWaiting() const; + +Q_SIGNALS: + void stateChanged(QQmlDebugQuery::State); + +protected: + QQmlDebugQuery(QObject *); + +private: + friend class QQmlEngineDebug; + friend class QQmlEngineDebugPrivate; + void setState(State); + State m_state; +}; + +class Q_QML_PRIVATE_EXPORT QQmlDebugFileReference +{ +public: + QQmlDebugFileReference(); + QQmlDebugFileReference(const QQmlDebugFileReference &); + QQmlDebugFileReference &operator=(const QQmlDebugFileReference &); + + QUrl url() const; + void setUrl(const QUrl &); + int lineNumber() const; + void setLineNumber(int); + int columnNumber() const; + void setColumnNumber(int); + +private: + friend class QQmlEngineDebugPrivate; + QUrl m_url; + int m_lineNumber; + int m_columnNumber; +}; + +class Q_QML_PRIVATE_EXPORT QQmlDebugEngineReference +{ +public: + QQmlDebugEngineReference(); + QQmlDebugEngineReference(int); + QQmlDebugEngineReference(const QQmlDebugEngineReference &); + QQmlDebugEngineReference &operator=(const QQmlDebugEngineReference &); + + int debugId() const; + QString name() const; + +private: + friend class QQmlEngineDebugPrivate; + int m_debugId; + QString m_name; +}; + +class Q_QML_PRIVATE_EXPORT QQmlDebugObjectReference +{ +public: + QQmlDebugObjectReference(); + QQmlDebugObjectReference(int); + QQmlDebugObjectReference(const QQmlDebugObjectReference &); + QQmlDebugObjectReference &operator=(const QQmlDebugObjectReference &); + + int debugId() const; + QString className() const; + QString idString() const; + QString name() const; + + QQmlDebugFileReference source() const; + int contextDebugId() const; + + QList properties() const; + QList children() const; + +private: + friend class QQmlEngineDebugPrivate; + int m_debugId; + QString m_class; + QString m_idString; + QString m_name; + QQmlDebugFileReference m_source; + int m_contextDebugId; + QList m_properties; + QList m_children; +}; + +class Q_QML_PRIVATE_EXPORT QQmlDebugContextReference +{ +public: + QQmlDebugContextReference(); + QQmlDebugContextReference(const QQmlDebugContextReference &); + QQmlDebugContextReference &operator=(const QQmlDebugContextReference &); + + int debugId() const; + QString name() const; + + QList objects() const; + QList contexts() const; + +private: + friend class QQmlEngineDebugPrivate; + int m_debugId; + QString m_name; + QList m_objects; + QList m_contexts; +}; + +class Q_QML_PRIVATE_EXPORT QQmlDebugPropertyReference +{ +public: + QQmlDebugPropertyReference(); + QQmlDebugPropertyReference(const QQmlDebugPropertyReference &); + QQmlDebugPropertyReference &operator=(const QQmlDebugPropertyReference &); + + int objectDebugId() const; + QString name() const; + QVariant value() const; + QString valueTypeName() const; + QString binding() const; + bool hasNotifySignal() const; + +private: + friend class QQmlEngineDebugPrivate; + int m_objectDebugId; + QString m_name; + QVariant m_value; + QString m_valueTypeName; + QString m_binding; + bool m_hasNotifySignal; +}; + + +class Q_QML_PRIVATE_EXPORT QQmlDebugEnginesQuery : public QQmlDebugQuery +{ + Q_OBJECT +public: + virtual ~QQmlDebugEnginesQuery(); + QList engines() const; +private: + friend class QQmlEngineDebug; + friend class QQmlEngineDebugPrivate; + QQmlDebugEnginesQuery(QObject *); + QQmlEngineDebug *m_client; + int m_queryId; + QList m_engines; +}; + +class Q_QML_PRIVATE_EXPORT QQmlDebugRootContextQuery : public QQmlDebugQuery +{ + Q_OBJECT +public: + virtual ~QQmlDebugRootContextQuery(); + QQmlDebugContextReference rootContext() const; +private: + friend class QQmlEngineDebug; + friend class QQmlEngineDebugPrivate; + QQmlDebugRootContextQuery(QObject *); + QQmlEngineDebug *m_client; + int m_queryId; + QQmlDebugContextReference m_context; +}; + +class Q_QML_PRIVATE_EXPORT QQmlDebugObjectQuery : public QQmlDebugQuery +{ + Q_OBJECT +public: + virtual ~QQmlDebugObjectQuery(); + QQmlDebugObjectReference object() const; +private: + friend class QQmlEngineDebug; + friend class QQmlEngineDebugPrivate; + QQmlDebugObjectQuery(QObject *); + QQmlEngineDebug *m_client; + int m_queryId; + QQmlDebugObjectReference m_object; + +}; + +class Q_QML_PRIVATE_EXPORT QQmlDebugExpressionQuery : public QQmlDebugQuery +{ + Q_OBJECT +public: + virtual ~QQmlDebugExpressionQuery(); + QVariant expression() const; + QVariant result() const; +private: + friend class QQmlEngineDebug; + friend class QQmlEngineDebugPrivate; + QQmlDebugExpressionQuery(QObject *); + QQmlEngineDebug *m_client; + int m_queryId; + QVariant m_expr; + QVariant m_result; +}; + +QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QQmlDebugEngineReference) +Q_DECLARE_METATYPE(QQmlDebugObjectReference) +Q_DECLARE_METATYPE(QQmlDebugContextReference) +Q_DECLARE_METATYPE(QQmlDebugPropertyReference) + +QT_END_HEADER + +#endif // QQMLENGINEDEBUG_H diff --git a/src/declarative/debugger/qdeclarativeenginedebugservice.cpp b/src/qml/debugger/qqmlenginedebugservice.cpp similarity index 67% rename from src/declarative/debugger/qdeclarativeenginedebugservice.cpp rename to src/qml/debugger/qqmlenginedebugservice.cpp index 4943959c33..be2e826bdf 100644 --- a/src/declarative/debugger/qdeclarativeenginedebugservice.cpp +++ b/src/qml/debugger/qqmlenginedebugservice.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,36 +39,36 @@ ** ****************************************************************************/ -#include "qdeclarativeenginedebugservice_p.h" - -#include "qdeclarativedebugstatesdelegate_p.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "qqmlenginedebugservice_p.h" + +#include "qqmldebugstatesdelegate_p.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include QT_BEGIN_NAMESPACE -Q_GLOBAL_STATIC(QDeclarativeEngineDebugService, qmlEngineDebugService); +Q_GLOBAL_STATIC(QQmlEngineDebugService, qmlEngineDebugService); -QDeclarativeEngineDebugService *QDeclarativeEngineDebugService::instance() +QQmlEngineDebugService *QQmlEngineDebugService::instance() { return qmlEngineDebugService(); } -QDeclarativeEngineDebugService::QDeclarativeEngineDebugService(QObject *parent) - : QDeclarativeDebugService(QLatin1String("QDeclarativeEngine"), 1, parent), - m_watch(new QDeclarativeWatcher(this)), +QQmlEngineDebugService::QQmlEngineDebugService(QObject *parent) + : QQmlDebugService(QLatin1String("QQmlEngine"), 1, parent), + m_watch(new QQmlWatcher(this)), m_statesDelegate(0) { QObject::connect(m_watch, SIGNAL(propertyChanged(int,int,QMetaProperty,QVariant)), @@ -77,13 +77,13 @@ QDeclarativeEngineDebugService::QDeclarativeEngineDebugService(QObject *parent) registerService(); } -QDeclarativeEngineDebugService::~QDeclarativeEngineDebugService() +QQmlEngineDebugService::~QQmlEngineDebugService() { delete m_statesDelegate; } QDataStream &operator<<(QDataStream &ds, - const QDeclarativeEngineDebugService::QDeclarativeObjectData &data) + const QQmlEngineDebugService::QQmlObjectData &data) { ds << data.url << data.lineNumber << data.columnNumber << data.idString << data.objectName << data.objectType << data.objectId << data.contextId; @@ -91,7 +91,7 @@ QDataStream &operator<<(QDataStream &ds, } QDataStream &operator>>(QDataStream &ds, - QDeclarativeEngineDebugService::QDeclarativeObjectData &data) + QQmlEngineDebugService::QQmlObjectData &data) { ds >> data.url >> data.lineNumber >> data.columnNumber >> data.idString >> data.objectName >> data.objectType >> data.objectId >> data.contextId; @@ -99,7 +99,7 @@ QDataStream &operator>>(QDataStream &ds, } QDataStream &operator<<(QDataStream &ds, - const QDeclarativeEngineDebugService::QDeclarativeObjectProperty &data) + const QQmlEngineDebugService::QQmlObjectProperty &data) { ds << (int)data.type << data.name << data.value << data.valueTypeName << data.binding << data.hasNotifySignal; @@ -107,12 +107,12 @@ QDataStream &operator<<(QDataStream &ds, } QDataStream &operator>>(QDataStream &ds, - QDeclarativeEngineDebugService::QDeclarativeObjectProperty &data) + QQmlEngineDebugService::QQmlObjectProperty &data) { int type; ds >> type >> data.name >> data.value >> data.valueTypeName >> data.binding >> data.hasNotifySignal; - data.type = (QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Type)type; + data.type = (QQmlEngineDebugService::QQmlObjectProperty::Type)type; return ds; } @@ -131,7 +131,7 @@ static bool hasValidSignal(QObject *object, const QString &propertyName) QString signalName = propertyName.mid(2); signalName[0] = signalName.at(0).toLower(); - int sigIdx = QDeclarativePropertyPrivate::findSignalByName(object->metaObject(), signalName.toLatin1()).methodIndex(); + int sigIdx = QQmlPropertyPrivate::findSignalByName(object->metaObject(), signalName.toLatin1()).methodIndex(); if (sigIdx == -1) return false; @@ -139,32 +139,32 @@ static bool hasValidSignal(QObject *object, const QString &propertyName) return true; } -QDeclarativeEngineDebugService::QDeclarativeObjectProperty -QDeclarativeEngineDebugService::propertyData(QObject *obj, int propIdx) +QQmlEngineDebugService::QQmlObjectProperty +QQmlEngineDebugService::propertyData(QObject *obj, int propIdx) { - QDeclarativeObjectProperty rv; + QQmlObjectProperty rv; QMetaProperty prop = obj->metaObject()->property(propIdx); - rv.type = QDeclarativeObjectProperty::Unknown; + rv.type = QQmlObjectProperty::Unknown; rv.valueTypeName = QString::fromUtf8(prop.typeName()); rv.name = QString::fromUtf8(prop.name()); rv.hasNotifySignal = prop.hasNotifySignal(); - QDeclarativeAbstractBinding *binding = - QDeclarativePropertyPrivate::binding(QDeclarativeProperty(obj, rv.name)); + QQmlAbstractBinding *binding = + QQmlPropertyPrivate::binding(QQmlProperty(obj, rv.name)); if (binding) rv.binding = binding->expression(); - if (QDeclarativeValueTypeFactory::isValueType(prop.userType())) { - rv.type = QDeclarativeObjectProperty::Basic; - } else if (QDeclarativeMetaType::isQObject(prop.userType())) { - rv.type = QDeclarativeObjectProperty::Object; - } else if (QDeclarativeMetaType::isList(prop.userType())) { - rv.type = QDeclarativeObjectProperty::List; + if (QQmlValueTypeFactory::isValueType(prop.userType())) { + rv.type = QQmlObjectProperty::Basic; + } else if (QQmlMetaType::isQObject(prop.userType())) { + rv.type = QQmlObjectProperty::Object; + } else if (QQmlMetaType::isList(prop.userType())) { + rv.type = QQmlObjectProperty::List; } QVariant value; - if (rv.type != QDeclarativeObjectProperty::Unknown && prop.userType() != 0) { + if (rv.type != QQmlObjectProperty::Unknown && prop.userType() != 0) { value = prop.read(obj); } rv.value = valueContents(value); @@ -172,7 +172,7 @@ QDeclarativeEngineDebugService::propertyData(QObject *obj, int propIdx) return rv; } -QVariant QDeclarativeEngineDebugService::valueContents(const QVariant &value) const +QVariant QQmlEngineDebugService::valueContents(const QVariant &value) const { int userType = value.userType(); @@ -198,11 +198,11 @@ QVariant QDeclarativeEngineDebugService::valueContents(const QVariant &value) co return contents; } - if (QDeclarativeValueTypeFactory::isValueType(userType)) + if (QQmlValueTypeFactory::isValueType(userType)) return value; - if (QDeclarativeMetaType::isQObject(userType)) { - QObject *o = QDeclarativeMetaType::toQObject(value); + if (QQmlMetaType::isQObject(userType)) { + QObject *o = QQmlMetaType::toQObject(value); if (o) { QString name = o->objectName(); if (name.isEmpty()) @@ -214,7 +214,7 @@ QVariant QDeclarativeEngineDebugService::valueContents(const QVariant &value) co return QLatin1String(""); } -void QDeclarativeEngineDebugService::buildObjectDump(QDataStream &message, +void QQmlEngineDebugService::buildObjectDump(QDataStream &message, QObject *object, bool recur, bool dumpProperties) { message << objectData(object); @@ -223,26 +223,26 @@ void QDeclarativeEngineDebugService::buildObjectDump(QDataStream &message, int childrenCount = children.count(); for (int ii = 0; ii < children.count(); ++ii) { - if (qobject_cast(children[ii]) || QDeclarativeBoundSignal::cast(children[ii])) + if (qobject_cast(children[ii]) || QQmlBoundSignal::cast(children[ii])) --childrenCount; } message << childrenCount << recur; - QList fakeProperties; + QList fakeProperties; for (int ii = 0; ii < children.count(); ++ii) { QObject *child = children.at(ii); - if (qobject_cast(child)) + if (qobject_cast(child)) continue; - QDeclarativeBoundSignal *signal = QDeclarativeBoundSignal::cast(child); + QQmlBoundSignal *signal = QQmlBoundSignal::cast(child); if (signal) { if (!dumpProperties) continue; - QDeclarativeObjectProperty prop; - prop.type = QDeclarativeObjectProperty::SignalProperty; + QQmlObjectProperty prop; + prop.type = QQmlObjectProperty::SignalProperty; prop.hasNotifySignal = false; - QDeclarativeExpression *expr = signal->expression(); + QQmlExpression *expr = signal->expression(); if (expr) { prop.value = expr->expression(); QObject *scope = expr->scopeObject(); @@ -285,7 +285,7 @@ void QDeclarativeEngineDebugService::buildObjectDump(QDataStream &message, message << fakeProperties[ii]; } -void QDeclarativeEngineDebugService::prepareDeferredObjects(QObject *obj) +void QQmlEngineDebugService::prepareDeferredObjects(QObject *obj) { qmlExecuteDeferred(obj); @@ -297,18 +297,18 @@ void QDeclarativeEngineDebugService::prepareDeferredObjects(QObject *obj) } -void QDeclarativeEngineDebugService::buildObjectList(QDataStream &message, QDeclarativeContext *ctxt) +void QQmlEngineDebugService::buildObjectList(QDataStream &message, QQmlContext *ctxt) { - QDeclarativeContextData *p = QDeclarativeContextData::get(ctxt); + QQmlContextData *p = QQmlContextData::get(ctxt); QString ctxtName = ctxt->objectName(); - int ctxtId = QDeclarativeDebugService::idForObject(ctxt); + int ctxtId = QQmlDebugService::idForObject(ctxt); message << ctxtName << ctxtId; int count = 0; - QDeclarativeContextData *child = p->childContexts; + QQmlContextData *child = p->childContexts; while (child) { ++count; child = child->nextChild; @@ -318,12 +318,12 @@ void QDeclarativeEngineDebugService::buildObjectList(QDataStream &message, QDecl child = p->childContexts; while (child) { - buildObjectList(message, child->asQDeclarativeContext()); + buildObjectList(message, child->asQQmlContext()); child = child->nextChild; } // Clean deleted objects - QDeclarativeContextPrivate *ctxtPriv = QDeclarativeContextPrivate::get(ctxt); + QQmlContextPrivate *ctxtPriv = QQmlContextPrivate::get(ctxt); for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { if (!ctxtPriv->instances.at(ii)) { ctxtPriv->instances.removeAt(ii); @@ -337,17 +337,17 @@ void QDeclarativeEngineDebugService::buildObjectList(QDataStream &message, QDecl } } -void QDeclarativeEngineDebugService::buildStatesList(QDeclarativeContext *ctxt, bool cleanList) +void QQmlEngineDebugService::buildStatesList(QQmlContext *ctxt, bool cleanList) { if (m_statesDelegate) m_statesDelegate->buildStatesList(ctxt, cleanList); } -QDeclarativeEngineDebugService::QDeclarativeObjectData -QDeclarativeEngineDebugService::objectData(QObject *object) +QQmlEngineDebugService::QQmlObjectData +QQmlEngineDebugService::objectData(QObject *object) { - QDeclarativeData *ddata = QDeclarativeData::get(object); - QDeclarativeObjectData rv; + QQmlData *ddata = QQmlData::get(object); + QQmlObjectData rv; if (ddata && ddata->outerContext) { rv.url = ddata->outerContext->url; rv.lineNumber = ddata->lineNumber; @@ -357,18 +357,18 @@ QDeclarativeEngineDebugService::objectData(QObject *object) rv.columnNumber = -1; } - QDeclarativeContext *context = qmlContext(object); + QQmlContext *context = qmlContext(object); if (context) { - QDeclarativeContextData *cdata = QDeclarativeContextData::get(context); + QQmlContextData *cdata = QQmlContextData::get(context); if (cdata) rv.idString = cdata->findObjectId(object); } rv.objectName = object->objectName(); - rv.objectId = QDeclarativeDebugService::idForObject(object); - rv.contextId = QDeclarativeDebugService::idForObject(qmlContext(object)); + rv.objectId = QQmlDebugService::idForObject(object); + rv.contextId = QQmlDebugService::idForObject(qmlContext(object)); - QDeclarativeType *type = QDeclarativeMetaType::qmlType(object->metaObject()); + QQmlType *type = QQmlMetaType::qmlType(object->metaObject()); if (type) { QString typeName = type->qmlTypeName(); int lastSlash = typeName.lastIndexOf(QLatin1Char('/')); @@ -383,12 +383,12 @@ QDeclarativeEngineDebugService::objectData(QObject *object) return rv; } -void QDeclarativeEngineDebugService::messageReceived(const QByteArray &message) +void QQmlEngineDebugService::messageReceived(const QByteArray &message) { QMetaObject::invokeMethod(this, "processMessage", Qt::QueuedConnection, Q_ARG(QByteArray, message)); } -void QDeclarativeEngineDebugService::processMessage(const QByteArray &message) +void QQmlEngineDebugService::processMessage(const QByteArray &message) { QDataStream ds(message); @@ -405,10 +405,10 @@ void QDeclarativeEngineDebugService::processMessage(const QByteArray &message) rs << queryId << m_engines.count(); for (int ii = 0; ii < m_engines.count(); ++ii) { - QDeclarativeEngine *engine = m_engines.at(ii); + QQmlEngine *engine = m_engines.at(ii); QString engineName = engine->objectName(); - int engineId = QDeclarativeDebugService::idForObject(engine); + int engineId = QQmlDebugService::idForObject(engine); rs << engineName << engineId; } @@ -419,8 +419,8 @@ void QDeclarativeEngineDebugService::processMessage(const QByteArray &message) int engineId = -1; ds >> queryId >> engineId; - QDeclarativeEngine *engine = - qobject_cast(QDeclarativeDebugService::objectForId(engineId)); + QQmlEngine *engine = + qobject_cast(QQmlDebugService::objectForId(engineId)); QByteArray reply; QDataStream rs(&reply, QIODevice::WriteOnly); @@ -440,7 +440,7 @@ void QDeclarativeEngineDebugService::processMessage(const QByteArray &message) ds >> queryId >> objectId >> recurse >> dumpProperties; - QObject *object = QDeclarativeDebugService::objectForId(objectId); + QObject *object = QQmlDebugService::objectForId(objectId); QByteArray reply; QDataStream rs(&reply, QIODevice::WriteOnly); @@ -502,11 +502,11 @@ void QDeclarativeEngineDebugService::processMessage(const QByteArray &message) ds >> queryId >> objectId >> expr; - QObject *object = QDeclarativeDebugService::objectForId(objectId); - QDeclarativeContext *context = qmlContext(object); + QObject *object = QQmlDebugService::objectForId(objectId); + QQmlContext *context = qmlContext(object); QVariant result; if (object && context) { - QDeclarativeExpression exprObj(context, object, expr); + QQmlExpression exprObj(context, object, expr); bool undefined = false; QVariant value = exprObj.evaluate(&undefined); if (undefined) @@ -548,7 +548,7 @@ void QDeclarativeEngineDebugService::processMessage(const QByteArray &message) } } -void QDeclarativeEngineDebugService::setBinding(int objectId, +void QQmlEngineDebugService::setBinding(int objectId, const QString &propertyName, const QVariant &expression, bool isLiteralValue, @@ -557,10 +557,10 @@ void QDeclarativeEngineDebugService::setBinding(int objectId, int column) { QObject *object = objectForId(objectId); - QDeclarativeContext *context = qmlContext(object); + QQmlContext *context = qmlContext(object); if (object && context) { - QDeclarativeProperty property(object, propertyName, context); + QQmlProperty property(object, propertyName, context); if (property.isValid()) { bool inBaseState = true; @@ -573,20 +573,20 @@ void QDeclarativeEngineDebugService::setBinding(int objectId, if (isLiteralValue) { property.write(expression); } else if (hasValidSignal(object, propertyName)) { - QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString()); - QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression); - declarativeExpression->setSourceLocation(filename, line, column); + QQmlExpression *qmlExpression = new QQmlExpression(context, object, expression.toString()); + QQmlPropertyPrivate::setSignalExpression(property, qmlExpression); + qmlExpression->setSourceLocation(filename, line, column); } else if (property.isProperty()) { - QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context); + QQmlBinding *binding = new QQmlBinding(expression.toString(), object, context); binding->setTarget(property); binding->setSourceLocation(filename, line, column); binding->setNotifyOnValueChanged(true); - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding); + QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::setBinding(property, binding); if (oldBinding) oldBinding->destroy(); binding->update(); } else { - qWarning() << "QDeclarativeEngineDebugService::setBinding: unable to set property" << propertyName << "on object" << object; + qWarning() << "QQmlEngineDebugService::setBinding: unable to set property" << propertyName << "on object" << object; } } @@ -596,37 +596,37 @@ void QDeclarativeEngineDebugService::setBinding(int objectId, if (m_statesDelegate) ok = m_statesDelegate->setBindingForInvalidProperty(object, propertyName, expression, isLiteralValue); if (!ok) - qWarning() << "QDeclarativeEngineDebugService::setBinding: unable to set property" << propertyName << "on object" << object; + qWarning() << "QQmlEngineDebugService::setBinding: unable to set property" << propertyName << "on object" << object; } } } -void QDeclarativeEngineDebugService::resetBinding(int objectId, const QString &propertyName) +void QQmlEngineDebugService::resetBinding(int objectId, const QString &propertyName) { QObject *object = objectForId(objectId); - QDeclarativeContext *context = qmlContext(object); + QQmlContext *context = qmlContext(object); if (object && context) { if (object->property(propertyName.toLatin1()).isValid()) { - QDeclarativeProperty property(object, propertyName); - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(property); + QQmlProperty property(object, propertyName); + QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(property); if (oldBinding) { - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, 0); + QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::setBinding(property, 0); if (oldBinding) oldBinding->destroy(); } if (property.isResettable()) { // Note: this will reset the property in any case, without regard to states - // Right now almost no QDeclarativeItem has reset methods for its properties (with the - // notable exception of QDeclarativeAnchors), so this is not a big issue + // Right now almost no QQuickItem has reset methods for its properties (with the + // notable exception of QQuickAnchors), so this is not a big issue // later on, setBinding does take states into account property.reset(); } else { // overwrite with default value - if (QDeclarativeType *objType = QDeclarativeMetaType::qmlType(object->metaObject())) { + if (QQmlType *objType = QQmlMetaType::qmlType(object->metaObject())) { if (QObject *emptyObject = objType->create()) { if (emptyObject->property(propertyName.toLatin1()).isValid()) { - QVariant defaultValue = QDeclarativeProperty(emptyObject, propertyName).read(); + QVariant defaultValue = QQmlProperty(emptyObject, propertyName).read(); if (defaultValue.isValid()) { setBinding(objectId, propertyName, defaultValue, true); } @@ -636,8 +636,8 @@ void QDeclarativeEngineDebugService::resetBinding(int objectId, const QString &p } } } else if (hasValidSignal(object, propertyName)) { - QDeclarativeProperty property(object, propertyName, context); - QDeclarativePropertyPrivate::setSignalExpression(property, 0); + QQmlProperty property(object, propertyName, context); + QQmlPropertyPrivate::setSignalExpression(property, 0); } else { if (m_statesDelegate) m_statesDelegate->resetBindingForInvalidProperty(object, propertyName); @@ -645,19 +645,19 @@ void QDeclarativeEngineDebugService::resetBinding(int objectId, const QString &p } } -void QDeclarativeEngineDebugService::setMethodBody(int objectId, const QString &method, const QString &body) +void QQmlEngineDebugService::setMethodBody(int objectId, const QString &method, const QString &body) { QObject *object = objectForId(objectId); - QDeclarativeContext *context = qmlContext(object); + QQmlContext *context = qmlContext(object); if (!object || !context || !context->engine()) return; - QDeclarativeContextData *contextData = QDeclarativeContextData::get(context); + QQmlContextData *contextData = QQmlContextData::get(context); if (!contextData) return; - QDeclarativePropertyData dummy; - QDeclarativePropertyData *prop = - QDeclarativePropertyCache::property(context->engine(), object, method, dummy); + QQmlPropertyData dummy; + QQmlPropertyData *prop = + QQmlPropertyCache::property(context->engine(), object, method, dummy); if (!prop || !prop->isVMEFunction()) return; @@ -676,15 +676,15 @@ void QDeclarativeEngineDebugService::setMethodBody(int objectId, const QString & jsfunction += body; jsfunction += QLatin1String("\n})"); - QDeclarativeVMEMetaObject *vmeMetaObject = - static_cast(QObjectPrivate::get(object)->metaObject); + QQmlVMEMetaObject *vmeMetaObject = + static_cast(QObjectPrivate::get(object)->metaObject); Q_ASSERT(vmeMetaObject); // the fact we found the property above should guarentee this int lineNumber = vmeMetaObject->vmeMethodLineNumber(prop->coreIndex); - vmeMetaObject->setVmeMethod(prop->coreIndex, QDeclarativeExpressionPrivate::evalFunction(contextData, object, jsfunction, contextData->url.toString(), lineNumber)); + vmeMetaObject->setVmeMethod(prop->coreIndex, QQmlExpressionPrivate::evalFunction(contextData, object, jsfunction, contextData->url.toString(), lineNumber)); } -void QDeclarativeEngineDebugService::propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value) +void QQmlEngineDebugService::propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value) { QByteArray reply; QDataStream rs(&reply, QIODevice::WriteOnly); @@ -694,7 +694,7 @@ void QDeclarativeEngineDebugService::propertyChanged(int id, int objectId, const sendMessage(reply); } -void QDeclarativeEngineDebugService::addEngine(QDeclarativeEngine *engine) +void QQmlEngineDebugService::addEngine(QQmlEngine *engine) { Q_ASSERT(engine); Q_ASSERT(!m_engines.contains(engine)); @@ -702,7 +702,7 @@ void QDeclarativeEngineDebugService::addEngine(QDeclarativeEngine *engine) m_engines.append(engine); } -void QDeclarativeEngineDebugService::remEngine(QDeclarativeEngine *engine) +void QQmlEngineDebugService::remEngine(QQmlEngine *engine) { Q_ASSERT(engine); Q_ASSERT(m_engines.contains(engine)); @@ -710,13 +710,13 @@ void QDeclarativeEngineDebugService::remEngine(QDeclarativeEngine *engine) m_engines.removeAll(engine); } -void QDeclarativeEngineDebugService::objectCreated(QDeclarativeEngine *engine, QObject *object) +void QQmlEngineDebugService::objectCreated(QQmlEngine *engine, QObject *object) { Q_ASSERT(engine); Q_ASSERT(m_engines.contains(engine)); - int engineId = QDeclarativeDebugService::idForObject(engine); - int objectId = QDeclarativeDebugService::idForObject(object); + int engineId = QQmlDebugService::idForObject(engine); + int objectId = QQmlDebugService::idForObject(object); QByteArray reply; QDataStream rs(&reply, QIODevice::WriteOnly); @@ -725,7 +725,7 @@ void QDeclarativeEngineDebugService::objectCreated(QDeclarativeEngine *engine, Q sendMessage(reply); } -void QDeclarativeEngineDebugService::setStatesDelegate(QDeclarativeDebugStatesDelegate *delegate) +void QQmlEngineDebugService::setStatesDelegate(QQmlDebugStatesDelegate *delegate) { m_statesDelegate = delegate; } diff --git a/src/declarative/debugger/qdeclarativeenginedebugservice_p.h b/src/qml/debugger/qqmlenginedebugservice_p.h similarity index 64% rename from src/declarative/debugger/qdeclarativeenginedebugservice_p.h rename to src/qml/debugger/qqmlenginedebugservice_p.h index d252654492..1a92801fcc 100644 --- a/src/declarative/debugger/qdeclarativeenginedebugservice_p.h +++ b/src/qml/debugger/qqmlenginedebugservice_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEENGINEDEBUGSERVICE_P_H -#define QDECLARATIVEENGINEDEBUGSERVICE_P_H +#ifndef QQMLENGINEDEBUGSERVICE_P_H +#define QQMLENGINEDEBUGSERVICE_P_H // // W A R N I N G @@ -53,27 +53,27 @@ // We mean it. // -#include +#include #include #include QT_BEGIN_NAMESPACE -class QDeclarativeEngine; -class QDeclarativeContext; -class QDeclarativeWatcher; +class QQmlEngine; +class QQmlContext; +class QQmlWatcher; class QDataStream; -class QDeclarativeDebugStatesDelegate; +class QQmlDebugStatesDelegate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEngineDebugService : public QDeclarativeDebugService +class Q_QML_PRIVATE_EXPORT QQmlEngineDebugService : public QQmlDebugService { Q_OBJECT public: - QDeclarativeEngineDebugService(QObject * = 0); - ~QDeclarativeEngineDebugService(); + QQmlEngineDebugService(QObject * = 0); + ~QQmlEngineDebugService(); - struct QDeclarativeObjectData { + struct QQmlObjectData { QUrl url; int lineNumber; int columnNumber; @@ -84,7 +84,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEngineDebugService : public QDecl int contextId; }; - struct QDeclarativeObjectProperty { + struct QQmlObjectProperty { enum Type { Unknown, Basic, Object, List, SignalProperty }; Type type; QString name; @@ -94,13 +94,13 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEngineDebugService : public QDecl bool hasNotifySignal; }; - void addEngine(QDeclarativeEngine *); - void remEngine(QDeclarativeEngine *); - void objectCreated(QDeclarativeEngine *, QObject *); + void addEngine(QQmlEngine *); + void remEngine(QQmlEngine *); + void objectCreated(QQmlEngine *, QObject *); - void setStatesDelegate(QDeclarativeDebugStatesDelegate *); + void setStatesDelegate(QQmlDebugStatesDelegate *); - static QDeclarativeEngineDebugService *instance(); + static QQmlEngineDebugService *instance(); protected: virtual void messageReceived(const QByteArray &); @@ -111,26 +111,26 @@ private Q_SLOTS: private: void prepareDeferredObjects(QObject *); - void buildObjectList(QDataStream &, QDeclarativeContext *); + void buildObjectList(QDataStream &, QQmlContext *); void buildObjectDump(QDataStream &, QObject *, bool, bool); - void buildStatesList(QDeclarativeContext *, bool); - QDeclarativeObjectData objectData(QObject *); - QDeclarativeObjectProperty propertyData(QObject *, int); + void buildStatesList(QQmlContext *, bool); + QQmlObjectData objectData(QObject *); + QQmlObjectProperty propertyData(QObject *, int); QVariant valueContents(const QVariant &defaultValue) const; void setBinding(int objectId, const QString &propertyName, const QVariant &expression, bool isLiteralValue, QString filename = QString(), int line = -1, int column = 0); void resetBinding(int objectId, const QString &propertyName); void setMethodBody(int objectId, const QString &method, const QString &body); - QList m_engines; - QDeclarativeWatcher *m_watch; - QDeclarativeDebugStatesDelegate *m_statesDelegate; + QList m_engines; + QQmlWatcher *m_watch; + QQmlDebugStatesDelegate *m_statesDelegate; }; -Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugService::QDeclarativeObjectData &); -Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugService::QDeclarativeObjectData &); -Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugService::QDeclarativeObjectProperty &); -Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugService::QDeclarativeObjectProperty &); +Q_QML_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QQmlEngineDebugService::QQmlObjectData &); +Q_QML_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QQmlEngineDebugService::QQmlObjectData &); +Q_QML_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QQmlEngineDebugService::QQmlObjectProperty &); +Q_QML_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QQmlEngineDebugService::QQmlObjectProperty &); QT_END_NAMESPACE -#endif // QDECLARATIVEENGINEDEBUGSERVICE_P_H +#endif // QQMLENGINEDEBUGSERVICE_P_H diff --git a/src/declarative/debugger/qdeclarativeinspectorinterface_p.h b/src/qml/debugger/qqmlinspectorinterface_p.h similarity index 81% rename from src/declarative/debugger/qdeclarativeinspectorinterface_p.h rename to src/qml/debugger/qqmlinspectorinterface_p.h index e109fc015e..7f52dffa2e 100644 --- a/src/declarative/debugger/qdeclarativeinspectorinterface_p.h +++ b/src/qml/debugger/qqmlinspectorinterface_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEINSPECTORINTERFACE_H -#define QDECLARATIVEINSPECTORINTERFACE_H +#ifndef QQMLINSPECTORINTERFACE_H +#define QQMLINSPECTORINTERFACE_H // // W A R N I N G @@ -53,18 +53,18 @@ // We mean it. // -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class Q_DECLARATIVE_EXPORT QDeclarativeInspectorInterface +class Q_QML_EXPORT QQmlInspectorInterface { public: - QDeclarativeInspectorInterface() {} - virtual ~QDeclarativeInspectorInterface() {} + QQmlInspectorInterface() {} + virtual ~QQmlInspectorInterface() {} virtual bool canHandleView(QObject *view) = 0; @@ -74,10 +74,10 @@ class Q_DECLARATIVE_EXPORT QDeclarativeInspectorInterface virtual void clientMessage(const QByteArray &message) = 0; }; -Q_DECLARE_INTERFACE(QDeclarativeInspectorInterface, "com.trolltech.Qt.QDeclarativeInspectorInterface/1.0") +Q_DECLARE_INTERFACE(QQmlInspectorInterface, "com.trolltech.Qt.QQmlInspectorInterface/1.0") QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEINSPECTORINTERFACE_H +#endif // QQMLINSPECTORINTERFACE_H diff --git a/src/declarative/debugger/qdeclarativeinspectorservice.cpp b/src/qml/debugger/qqmlinspectorservice.cpp similarity index 68% rename from src/declarative/debugger/qdeclarativeinspectorservice.cpp rename to src/qml/debugger/qqmlinspectorservice.cpp index 94b04985ba..508d12eefa 100644 --- a/src/declarative/debugger/qdeclarativeinspectorservice.cpp +++ b/src/qml/debugger/qqmlinspectorservice.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,11 @@ ** ****************************************************************************/ -#include "qdeclarativeinspectorservice_p.h" -#include "qdeclarativeinspectorinterface_p.h" -#include "qdeclarativedebugserver_p.h" +#include "qqmlinspectorservice_p.h" +#include "qqmlinspectorinterface_p.h" +#include "qqmldebugserver_p.h" + +#include #include #include @@ -53,46 +55,46 @@ DEFINE_BOOL_CONFIG_OPTION(qmlDebugVerbose, QML_DEBUGGER_VERBOSE) QT_BEGIN_NAMESPACE -Q_GLOBAL_STATIC(QDeclarativeInspectorService, serviceInstance) +Q_GLOBAL_STATIC(QQmlInspectorService, serviceInstance) -QDeclarativeInspectorService::QDeclarativeInspectorService() - : QDeclarativeDebugService(QLatin1String("QDeclarativeObserverMode"), 1) +QQmlInspectorService::QQmlInspectorService() + : QQmlDebugService(QLatin1String("QQmlObserverMode"), 1) , m_currentInspectorPlugin(0) { registerService(); } -QDeclarativeInspectorService *QDeclarativeInspectorService::instance() +QQmlInspectorService *QQmlInspectorService::instance() { return serviceInstance(); } -void QDeclarativeInspectorService::addView(QObject *view) +void QQmlInspectorService::addView(QObject *view) { m_views.append(view); updateState(); } -void QDeclarativeInspectorService::removeView(QObject *view) +void QQmlInspectorService::removeView(QObject *view) { m_views.removeAll(view); updateState(); } -void QDeclarativeInspectorService::sendMessage(const QByteArray &message) +void QQmlInspectorService::sendMessage(const QByteArray &message) { if (state() != Enabled) return; - QDeclarativeDebugService::sendMessage(message); + QQmlDebugService::sendMessage(message); } -void QDeclarativeInspectorService::stateChanged(State /*state*/) +void QQmlInspectorService::stateChanged(State /*state*/) { QMetaObject::invokeMethod(this, "updateState", Qt::QueuedConnection); } -void QDeclarativeInspectorService::updateState() +void QQmlInspectorService::updateState() { if (m_views.isEmpty()) { if (m_currentInspectorPlugin) { @@ -107,12 +109,12 @@ void QDeclarativeInspectorService::updateState() loadInspectorPlugins(); if (m_inspectorPlugins.isEmpty()) { - qWarning() << "QDeclarativeInspector: No plugins found."; - QDeclarativeDebugServer::instance()->removeService(this); + qWarning() << "QQmlInspector: No plugins found."; + QQmlDebugServer::instance()->removeService(this); return; } - foreach (QDeclarativeInspectorInterface *inspector, m_inspectorPlugins) { + foreach (QQmlInspectorInterface *inspector, m_inspectorPlugins) { if (inspector->canHandleView(m_views.first())) { m_currentInspectorPlugin = inspector; break; @@ -120,7 +122,7 @@ void QDeclarativeInspectorService::updateState() } if (!m_currentInspectorPlugin) { - qWarning() << "QDeclarativeInspector: No plugin available for view '" << m_views.first()->metaObject()->className() << "'."; + qWarning() << "QQmlInspector: No plugin available for view '" << m_views.first()->metaObject()->className() << "'."; return; } m_currentInspectorPlugin->activate(m_views.first()); @@ -132,18 +134,18 @@ void QDeclarativeInspectorService::updateState() } } -void QDeclarativeInspectorService::messageReceived(const QByteArray &message) +void QQmlInspectorService::messageReceived(const QByteArray &message) { QMetaObject::invokeMethod(this, "processMessage", Qt::QueuedConnection, Q_ARG(QByteArray, message)); } -void QDeclarativeInspectorService::processMessage(const QByteArray &message) +void QQmlInspectorService::processMessage(const QByteArray &message) { if (m_currentInspectorPlugin) m_currentInspectorPlugin->clientMessage(message); } -void QDeclarativeInspectorService::loadInspectorPlugins() +void QQmlInspectorService::loadInspectorPlugins() { QStringList pluginCandidates; const QStringList paths = QCoreApplication::libraryPaths(); @@ -156,25 +158,25 @@ void QDeclarativeInspectorService::loadInspectorPlugins() foreach (const QString &pluginPath, pluginCandidates) { if (qmlDebugVerbose()) - qDebug() << "QDeclarativeInspector: Trying to load plugin " << pluginPath << "..."; + qDebug() << "QQmlInspector: Trying to load plugin " << pluginPath << "..."; QPluginLoader loader(pluginPath); if (!loader.load()) { if (qmlDebugVerbose()) - qDebug() << "QDeclarativeInspector: Error while loading: " << loader.errorString(); + qDebug() << "QQmlInspector: Error while loading: " << loader.errorString(); continue; } - QDeclarativeInspectorInterface *inspector = - qobject_cast(loader.instance()); + QQmlInspectorInterface *inspector = + qobject_cast(loader.instance()); if (inspector) { if (qmlDebugVerbose()) - qDebug() << "QDeclarativeInspector: Plugin successfully loaded."; + qDebug() << "QQmlInspector: Plugin successfully loaded."; m_inspectorPlugins << inspector; } else { if (qmlDebugVerbose()) - qDebug() << "QDeclarativeInspector: Plugin does not implement interface QDeclarativeInspectorInterface."; + qDebug() << "QQmlInspector: Plugin does not implement interface QQmlInspectorInterface."; loader.unload(); } diff --git a/src/declarative/debugger/qdeclarativeinspectorservice_p.h b/src/qml/debugger/qqmlinspectorservice_p.h similarity index 79% rename from src/declarative/debugger/qdeclarativeinspectorservice_p.h rename to src/qml/debugger/qqmlinspectorservice_p.h index 7ed530adc0..557dc38aa8 100644 --- a/src/declarative/debugger/qdeclarativeinspectorservice_p.h +++ b/src/qml/debugger/qqmlinspectorservice_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEINSPECTORSERVICE_H -#define QDECLARATIVEINSPECTORSERVICE_H +#ifndef QQMLINSPECTORSERVICE_H +#define QQMLINSPECTORSERVICE_H // // W A R N I N G @@ -53,9 +53,9 @@ // We mean it. // -#include "qdeclarativedebugservice_p.h" -#include +#include "qqmldebugservice_p.h" +#include #include QT_BEGIN_HEADER @@ -63,15 +63,15 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeInspectorInterface; +class QQmlInspectorInterface; -class Q_DECLARATIVE_EXPORT QDeclarativeInspectorService : public QDeclarativeDebugService +class Q_QML_EXPORT QQmlInspectorService : public QQmlDebugService { Q_OBJECT public: - QDeclarativeInspectorService(); - static QDeclarativeInspectorService *instance(); + QQmlInspectorService(); + static QQmlInspectorService *instance(); void addView(QObject *); void removeView(QObject *); @@ -90,12 +90,12 @@ private slots: void loadInspectorPlugins(); QList m_views; - QDeclarativeInspectorInterface *m_currentInspectorPlugin; - QList m_inspectorPlugins; + QQmlInspectorInterface *m_currentInspectorPlugin; + QList m_inspectorPlugins; }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEINSPECTORSERVICE_H +#endif // QQMLINSPECTORSERVICE_H diff --git a/src/declarative/debugger/qdeclarativeprofilerservice.cpp b/src/qml/debugger/qqmlprofilerservice.cpp similarity index 51% rename from src/declarative/debugger/qdeclarativeprofilerservice.cpp rename to src/qml/debugger/qqmlprofilerservice.cpp index 17ee3e5836..d6a0307836 100644 --- a/src/declarative/debugger/qdeclarativeprofilerservice.cpp +++ b/src/qml/debugger/qqmlprofilerservice.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativeprofilerservice_p.h" +#include "qqmlprofilerservice_p.h" #include #include @@ -52,45 +52,45 @@ QT_BEGIN_NAMESPACE -Q_GLOBAL_STATIC(QDeclarativeProfilerService, profilerInstance) +Q_GLOBAL_STATIC(QQmlProfilerService, profilerInstance) -QDeclarativeBindingProfiler::QDeclarativeBindingProfiler(const QString &url, int line, int column) +QQmlBindingProfiler::QQmlBindingProfiler(const QString &url, int line, int column) { - QDeclarativeProfilerService::startRange(QDeclarativeProfilerService::Binding); - QDeclarativeProfilerService::rangeLocation(QDeclarativeProfilerService::Binding, url, line, column); + QQmlProfilerService::startRange(QQmlProfilerService::Binding); + QQmlProfilerService::rangeLocation(QQmlProfilerService::Binding, url, line, column); } -QDeclarativeBindingProfiler::~QDeclarativeBindingProfiler() +QQmlBindingProfiler::~QQmlBindingProfiler() { - QDeclarativeProfilerService::endRange(QDeclarativeProfilerService::Binding); + QQmlProfilerService::endRange(QQmlProfilerService::Binding); } -void QDeclarativeBindingProfiler::addDetail(const QString &details) +void QQmlBindingProfiler::addDetail(const QString &details) { - QDeclarativeProfilerService::rangeData(QDeclarativeProfilerService::Binding, details); + QQmlProfilerService::rangeData(QQmlProfilerService::Binding, details); } // convert to a QByteArray that can be sent to the debug client // use of QDataStream can skew results -// (see tst_qdeclarativedebugtrace::trace() benchmark) -QByteArray QDeclarativeProfilerData::toByteArray() const +// (see tst_qqmldebugtrace::trace() benchmark) +QByteArray QQmlProfilerData::toByteArray() const { QByteArray data; //### using QDataStream is relatively expensive QDataStream ds(&data, QIODevice::WriteOnly); ds << time << messageType << detailType; - if (messageType == (int)QDeclarativeProfilerService::RangeData) + if (messageType == (int)QQmlProfilerService::RangeData) ds << detailData; - if (messageType == (int)QDeclarativeProfilerService::RangeLocation) + if (messageType == (int)QQmlProfilerService::RangeLocation) ds << detailData << line << column; - if (messageType == (int)QDeclarativeProfilerService::Event && - detailType == (int)QDeclarativeProfilerService::AnimationFrame) + if (messageType == (int)QQmlProfilerService::Event && + detailType == (int)QQmlProfilerService::AnimationFrame) ds << framerate << animationcount; return data; } -QDeclarativeProfilerService::QDeclarativeProfilerService() - : QDeclarativeDebugService(QLatin1String("CanvasFrameRate"), 1), +QQmlProfilerService::QQmlProfilerService() + : QQmlDebugService(QLatin1String("CanvasFrameRate"), 1), m_enabled(false), m_messageReceived(false) { m_timer.start(); @@ -104,77 +104,77 @@ QDeclarativeProfilerService::QDeclarativeProfilerService() } } -QDeclarativeProfilerService::~QDeclarativeProfilerService() +QQmlProfilerService::~QQmlProfilerService() { } -void QDeclarativeProfilerService::initialize() +void QQmlProfilerService::initialize() { // just make sure that the service is properly registered profilerInstance(); } -bool QDeclarativeProfilerService::startProfiling() +bool QQmlProfilerService::startProfiling() { return profilerInstance()->startProfilingImpl(); } -bool QDeclarativeProfilerService::stopProfiling() +bool QQmlProfilerService::stopProfiling() { return profilerInstance()->stopProfilingImpl(); } -void QDeclarativeProfilerService::sendStartedProfilingMessage() +void QQmlProfilerService::sendStartedProfilingMessage() { profilerInstance()->sendStartedProfilingMessageImpl(); } -void QDeclarativeProfilerService::addEvent(EventType t) +void QQmlProfilerService::addEvent(EventType t) { profilerInstance()->addEventImpl(t); } -void QDeclarativeProfilerService::startRange(RangeType t) +void QQmlProfilerService::startRange(RangeType t) { profilerInstance()->startRangeImpl(t); } -void QDeclarativeProfilerService::rangeData(RangeType t, const QString &data) +void QQmlProfilerService::rangeData(RangeType t, const QString &data) { profilerInstance()->rangeDataImpl(t, data); } -void QDeclarativeProfilerService::rangeData(RangeType t, const QUrl &data) +void QQmlProfilerService::rangeData(RangeType t, const QUrl &data) { profilerInstance()->rangeDataImpl(t, data); } -void QDeclarativeProfilerService::rangeLocation(RangeType t, const QString &fileName, int line, int column) +void QQmlProfilerService::rangeLocation(RangeType t, const QString &fileName, int line, int column) { profilerInstance()->rangeLocationImpl(t, fileName, line, column); } -void QDeclarativeProfilerService::rangeLocation(RangeType t, const QUrl &fileName, int line, int column) +void QQmlProfilerService::rangeLocation(RangeType t, const QUrl &fileName, int line, int column) { profilerInstance()->rangeLocationImpl(t, fileName, line, column); } -void QDeclarativeProfilerService::endRange(RangeType t) +void QQmlProfilerService::endRange(RangeType t) { profilerInstance()->endRangeImpl(t); } -void QDeclarativeProfilerService::animationFrame(qint64 delta) +void QQmlProfilerService::animationFrame(qint64 delta) { profilerInstance()->animationFrameImpl(delta); } -void QDeclarativeProfilerService::sendProfilingData() +void QQmlProfilerService::sendProfilingData() { profilerInstance()->sendMessages(); } -bool QDeclarativeProfilerService::startProfilingImpl() +bool QQmlProfilerService::startProfilingImpl() { bool success = false; if (!profilingEnabled()) { @@ -185,7 +185,7 @@ bool QDeclarativeProfilerService::startProfilingImpl() return success; } -bool QDeclarativeProfilerService::stopProfilingImpl() +bool QQmlProfilerService::stopProfilingImpl() { bool success = false; if (profilingEnabled()) { @@ -196,81 +196,81 @@ bool QDeclarativeProfilerService::stopProfilingImpl() return success; } -void QDeclarativeProfilerService::sendStartedProfilingMessageImpl() +void QQmlProfilerService::sendStartedProfilingMessageImpl() { - if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled) + if (!QQmlDebugService::isDebuggingEnabled() || !m_enabled) return; - QDeclarativeProfilerData ed = {m_timer.nsecsElapsed(), (int)Event, (int)StartTrace, QString(), -1, -1, 0, 0}; - QDeclarativeDebugService::sendMessage(ed.toByteArray()); + QQmlProfilerData ed = {m_timer.nsecsElapsed(), (int)Event, (int)StartTrace, QString(), -1, -1, 0, 0}; + QQmlDebugService::sendMessage(ed.toByteArray()); } -void QDeclarativeProfilerService::addEventImpl(EventType event) +void QQmlProfilerService::addEventImpl(EventType event) { - if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled) + if (!QQmlDebugService::isDebuggingEnabled() || !m_enabled) return; - QDeclarativeProfilerData ed = {m_timer.nsecsElapsed(), (int)Event, (int)event, QString(), -1, -1, 0, 0}; + QQmlProfilerData ed = {m_timer.nsecsElapsed(), (int)Event, (int)event, QString(), -1, -1, 0, 0}; processMessage(ed); } -void QDeclarativeProfilerService::startRangeImpl(RangeType range) +void QQmlProfilerService::startRangeImpl(RangeType range) { - if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled) + if (!QQmlDebugService::isDebuggingEnabled() || !m_enabled) return; - QDeclarativeProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeStart, (int)range, QString(), -1, -1, 0, 0}; + QQmlProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeStart, (int)range, QString(), -1, -1, 0, 0}; processMessage(rd); } -void QDeclarativeProfilerService::rangeDataImpl(RangeType range, const QString &rData) +void QQmlProfilerService::rangeDataImpl(RangeType range, const QString &rData) { - if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled) + if (!QQmlDebugService::isDebuggingEnabled() || !m_enabled) return; - QDeclarativeProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeData, (int)range, rData, -1, -1, 0, 0}; + QQmlProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeData, (int)range, rData, -1, -1, 0, 0}; processMessage(rd); } -void QDeclarativeProfilerService::rangeDataImpl(RangeType range, const QUrl &rData) +void QQmlProfilerService::rangeDataImpl(RangeType range, const QUrl &rData) { - if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled) + if (!QQmlDebugService::isDebuggingEnabled() || !m_enabled) return; - QDeclarativeProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeData, (int)range, rData.toString(QUrl::FormattingOption(0x100)), -1, -1, 0, 0}; + QQmlProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeData, (int)range, rData.toString(QUrl::FormattingOption(0x100)), -1, -1, 0, 0}; processMessage(rd); } -void QDeclarativeProfilerService::rangeLocationImpl(RangeType range, const QString &fileName, int line, int column) +void QQmlProfilerService::rangeLocationImpl(RangeType range, const QString &fileName, int line, int column) { - if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled) + if (!QQmlDebugService::isDebuggingEnabled() || !m_enabled) return; - QDeclarativeProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeLocation, (int)range, fileName, line, column, 0, 0}; + QQmlProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeLocation, (int)range, fileName, line, column, 0, 0}; processMessage(rd); } -void QDeclarativeProfilerService::rangeLocationImpl(RangeType range, const QUrl &fileName, int line, int column) +void QQmlProfilerService::rangeLocationImpl(RangeType range, const QUrl &fileName, int line, int column) { - if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled) + if (!QQmlDebugService::isDebuggingEnabled() || !m_enabled) return; - QDeclarativeProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeLocation, (int)range, fileName.toString(QUrl::FormattingOption(0x100)), line, column, 0, 0}; + QQmlProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeLocation, (int)range, fileName.toString(QUrl::FormattingOption(0x100)), line, column, 0, 0}; processMessage(rd); } -void QDeclarativeProfilerService::endRangeImpl(RangeType range) +void QQmlProfilerService::endRangeImpl(RangeType range) { - if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled) + if (!QQmlDebugService::isDebuggingEnabled() || !m_enabled) return; - QDeclarativeProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeEnd, (int)range, QString(), -1, -1, 0, 0}; + QQmlProfilerData rd = {m_timer.nsecsElapsed(), (int)RangeEnd, (int)range, QString(), -1, -1, 0, 0}; processMessage(rd); } -void QDeclarativeProfilerService::animationFrameImpl(qint64 delta) +void QQmlProfilerService::animationFrameImpl(qint64 delta) { - Q_ASSERT(QDeclarativeDebugService::isDebuggingEnabled()); + Q_ASSERT(QQmlDebugService::isDebuggingEnabled()); if (!m_enabled) return; @@ -279,7 +279,7 @@ void QDeclarativeProfilerService::animationFrameImpl(qint64 delta) if (animCount > 0 && delta > 0) { // trim fps to integer int fps = 1000 / delta; - QDeclarativeProfilerData ed = {m_timer.nsecsElapsed(), (int)Event, (int)AnimationFrame, QString(), -1, -1, fps, animCount}; + QQmlProfilerData ed = {m_timer.nsecsElapsed(), (int)Event, (int)AnimationFrame, QString(), -1, -1, fps, animCount}; processMessage(ed); } } @@ -288,18 +288,18 @@ void QDeclarativeProfilerService::animationFrameImpl(qint64 delta) Either send the message directly, or queue up a list of messages to send later (via sendMessages) */ -void QDeclarativeProfilerService::processMessage(const QDeclarativeProfilerData &message) +void QQmlProfilerService::processMessage(const QQmlProfilerData &message) { QMutexLocker locker(&m_mutex); m_data.append(message); } -bool QDeclarativeProfilerService::profilingEnabled() +bool QQmlProfilerService::profilingEnabled() { return m_enabled; } -void QDeclarativeProfilerService::setProfilingEnabled(bool enable) +void QQmlProfilerService::setProfilingEnabled(bool enable) { m_enabled = enable; } @@ -307,7 +307,7 @@ void QDeclarativeProfilerService::setProfilingEnabled(bool enable) /* Send the messages queued up by processMessage */ -void QDeclarativeProfilerService::sendMessages() +void QQmlProfilerService::sendMessages() { QMutexLocker locker(&m_mutex); QList messages; @@ -321,10 +321,10 @@ void QDeclarativeProfilerService::sendMessages() ds << (qint64)-1 << (int)Complete; messages << data; - QDeclarativeDebugService::sendMessages(messages); + QQmlDebugService::sendMessages(messages); } -void QDeclarativeProfilerService::stateAboutToBeChanged(QDeclarativeDebugService::State newState) +void QQmlProfilerService::stateAboutToBeChanged(QQmlDebugService::State newState) { if (state() == newState) return; @@ -336,7 +336,7 @@ void QDeclarativeProfilerService::stateAboutToBeChanged(QDeclarativeDebugService } } -void QDeclarativeProfilerService::messageReceived(const QByteArray &message) +void QQmlProfilerService::messageReceived(const QByteArray &message) { QByteArray rwData = message; QDataStream stream(&rwData, QIODevice::ReadOnly); diff --git a/src/declarative/debugger/qdeclarativeprofilerservice_p.h b/src/qml/debugger/qqmlprofilerservice_p.h similarity index 84% rename from src/declarative/debugger/qdeclarativeprofilerservice_p.h rename to src/qml/debugger/qqmlprofilerservice_p.h index d29690b6d6..a74ce10c74 100644 --- a/src/declarative/debugger/qdeclarativeprofilerservice_p.h +++ b/src/qml/debugger/qqmlprofilerservice_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPROFILERSERVICE_P_H -#define QDECLARATIVEPROFILERSERVICE_P_H +#ifndef QQMLPROFILERSERVICE_P_H +#define QQMLPROFILERSERVICE_P_H // // W A R N I N G @@ -53,7 +53,7 @@ // We mean it. // -#include +#include #include #include #include @@ -62,7 +62,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -struct Q_AUTOTEST_EXPORT QDeclarativeProfilerData +struct Q_AUTOTEST_EXPORT QQmlProfilerData { qint64 time; int messageType; @@ -78,20 +78,20 @@ struct Q_AUTOTEST_EXPORT QDeclarativeProfilerData QByteArray toByteArray() const; }; -Q_DECLARE_TYPEINFO(QDeclarativeProfilerData, Q_MOVABLE_TYPE); +Q_DECLARE_TYPEINFO(QQmlProfilerData, Q_MOVABLE_TYPE); class QUrl; -class QDeclarativeEngine; +class QQmlEngine; // RAII -class Q_AUTOTEST_EXPORT QDeclarativeBindingProfiler { +class Q_AUTOTEST_EXPORT QQmlBindingProfiler { public: - QDeclarativeBindingProfiler(const QString &url, int line, int column); - ~QDeclarativeBindingProfiler(); + QQmlBindingProfiler(const QString &url, int line, int column); + ~QQmlBindingProfiler(); void addDetail(const QString &details); }; -class Q_DECLARATIVE_EXPORT QDeclarativeProfilerService : public QDeclarativeDebugService +class Q_QML_EXPORT QQmlProfilerService : public QQmlDebugService { public: enum Message { @@ -142,8 +142,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativeProfilerService : public QDeclarativeDebu static void sendProfilingData(); - QDeclarativeProfilerService(); - ~QDeclarativeProfilerService(); + QQmlProfilerService(); + ~QQmlProfilerService(); protected: virtual void stateAboutToBeChanged(State state); @@ -165,13 +165,13 @@ class Q_DECLARATIVE_EXPORT QDeclarativeProfilerService : public QDeclarativeDebu bool profilingEnabled(); void setProfilingEnabled(bool enable); void sendMessages(); - void processMessage(const QDeclarativeProfilerData &); + void processMessage(const QQmlProfilerData &); private: QElapsedTimer m_timer; bool m_enabled; bool m_messageReceived; - QVector m_data; + QVector m_data; QMutex m_mutex; }; @@ -179,5 +179,5 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEPROFILERSERVICE_P_H +#endif // QQMLPROFILERSERVICE_P_H diff --git a/src/declarative/debugger/qv8debugservice.cpp b/src/qml/debugger/qv8debugservice.cpp similarity index 95% rename from src/declarative/debugger/qv8debugservice.cpp rename to src/qml/debugger/qv8debugservice.cpp index 389c465420..ee60bff742 100644 --- a/src/declarative/debugger/qv8debugservice.cpp +++ b/src/qml/debugger/qv8debugservice.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qv8debugservice_p.h" -#include "qdeclarativedebugservice_p_p.h" +#include "qqmldebugservice_p_p.h" #include #include @@ -97,7 +97,7 @@ void DebugMessageHandler(const v8::Debug::Message& message) v8ServiceInstancePtr->debugMessageHandler(QJSConverter::toString(message.GetJSON()), event); } -class QV8DebugServicePrivate : public QDeclarativeDebugServicePrivate +class QV8DebugServicePrivate : public QQmlDebugServicePrivate { public: QV8DebugServicePrivate() @@ -119,7 +119,7 @@ class QV8DebugServicePrivate : public QDeclarativeDebugServicePrivate }; QV8DebugService::QV8DebugService(QObject *parent) - : QDeclarativeDebugService(*(new QV8DebugServicePrivate()), + : QQmlDebugService(*(new QV8DebugServicePrivate()), QLatin1String("V8Debugger"), 2, parent) { Q_D(QV8DebugService); @@ -169,7 +169,7 @@ void QV8DebugService::debugMessageHandler(const QString &message, const v8::Debu void QV8DebugService::signalEmitted(const QString &signal) { - //This function is only called by QDeclarativeBoundSignal + //This function is only called by QQmlBoundSignal //only if there is a slot connected to the signal. Hence, there //is no need for additional check. Q_D(QV8DebugService); @@ -205,7 +205,7 @@ void QV8DebugService::scheduledDebugBreak(bool schedule) } // executed in the debugger thread -void QV8DebugService::stateChanged(QDeclarativeDebugService::State newState) +void QV8DebugService::stateChanged(QQmlDebugService::State newState) { Q_D(QV8DebugService); if (newState == Enabled) { diff --git a/src/declarative/debugger/qv8debugservice_p.h b/src/qml/debugger/qv8debugservice_p.h similarity index 94% rename from src/declarative/debugger/qv8debugservice_p.h rename to src/qml/debugger/qv8debugservice_p.h index 3f1d1ca177..8ff4adc778 100644 --- a/src/declarative/debugger/qv8debugservice_p.h +++ b/src/qml/debugger/qv8debugservice_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -53,7 +53,7 @@ // We mean it. // -#include "qdeclarativedebugservice_p.h" +#include "qqmldebugservice_p.h" #include QT_BEGIN_HEADER @@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE class QV8Engine; class QV8DebugServicePrivate; -class QV8DebugService : public QDeclarativeDebugService +class QV8DebugService : public QQmlDebugService { Q_OBJECT public: diff --git a/src/declarative/debugger/qv8profilerservice.cpp b/src/qml/debugger/qv8profilerservice.cpp similarity index 93% rename from src/declarative/debugger/qv8profilerservice.cpp rename to src/qml/debugger/qv8profilerservice.cpp index 5ae2d01cc2..eba8b0feef 100644 --- a/src/declarative/debugger/qv8profilerservice.cpp +++ b/src/qml/debugger/qv8profilerservice.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qv8profilerservice_p.h" -#include "qdeclarativedebugservice_p_p.h" +#include "qqmldebugservice_p_p.h" #include "private/qjsconverter_impl_p.h" #include @@ -52,9 +52,9 @@ Q_GLOBAL_STATIC(QV8ProfilerService, v8ProfilerInstance) class DebugServiceOutputStream : public v8::OutputStream { - QDeclarativeDebugService &_service; + QQmlDebugService &_service; public: - DebugServiceOutputStream(QDeclarativeDebugService &service) + DebugServiceOutputStream(QQmlDebugService &service) : v8::OutputStream(), _service(service) {} void EndOfStream() {} @@ -79,7 +79,7 @@ QByteArray QV8ProfilerData::toByteArray() const return data; } -class QV8ProfilerServicePrivate : public QDeclarativeDebugServicePrivate +class QV8ProfilerServicePrivate : public QQmlDebugServicePrivate { Q_DECLARE_PUBLIC(QV8ProfilerService) @@ -101,7 +101,7 @@ class QV8ProfilerServicePrivate : public QDeclarativeDebugServicePrivate }; QV8ProfilerService::QV8ProfilerService(QObject *parent) - : QDeclarativeDebugService(*(new QV8ProfilerServicePrivate()), QLatin1String("V8Profiler"), 1, parent) + : QQmlDebugService(*(new QV8ProfilerServicePrivate()), QLatin1String("V8Profiler"), 1, parent) { Q_D(QV8ProfilerService); @@ -127,7 +127,7 @@ void QV8ProfilerService::initialize() v8ProfilerInstance(); } -void QV8ProfilerService::stateAboutToBeChanged(QDeclarativeDebugService::State newState) +void QV8ProfilerService::stateAboutToBeChanged(QQmlDebugService::State newState) { Q_D(QV8ProfilerService); @@ -171,7 +171,7 @@ void QV8ProfilerService::messageReceived(const QByteArray &message) } } - QDeclarativeDebugService::messageReceived(message); + QQmlDebugService::messageReceived(message); } void QV8ProfilerService::startProfiling(const QString &title) diff --git a/src/declarative/debugger/qv8profilerservice_p.h b/src/qml/debugger/qv8profilerservice_p.h similarity index 93% rename from src/declarative/debugger/qv8profilerservice_p.h rename to src/qml/debugger/qv8profilerservice_p.h index 706907ae23..d408d9ed0e 100644 --- a/src/declarative/debugger/qv8profilerservice_p.h +++ b/src/qml/debugger/qv8profilerservice_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -53,7 +53,7 @@ // We mean it. // -#include +#include QT_BEGIN_HEADER @@ -73,10 +73,10 @@ struct Q_AUTOTEST_EXPORT QV8ProfilerData QByteArray toByteArray() const; }; -class QDeclarativeEngine; +class QQmlEngine; class QV8ProfilerServicePrivate; -class Q_AUTOTEST_EXPORT QV8ProfilerService : public QDeclarativeDebugService +class Q_AUTOTEST_EXPORT QV8ProfilerService : public QQmlDebugService { Q_OBJECT public: diff --git a/src/declarative/declarative.pro b/src/qml/qml.pro similarity index 66% rename from src/declarative/declarative.pro rename to src/qml/qml.pro index 1da58ce5d9..0bbfc9ff74 100644 --- a/src/declarative/declarative.pro +++ b/src/qml/qml.pro @@ -1,28 +1,31 @@ load(qt_module) -TARGET = QtDeclarative +TARGET = QtQml QPRO_PWD = $$PWD CONFIG += module -MODULE_PRI += ../../modules/qt_declarative.pri +MODULE_PRI += ../../modules/qt_qml.pri QT = core-private gui gui-private network v8-private -DEFINES += QT_BUILD_DECLARATIVE_LIB QT_NO_URL_CAST_FROM_STRING QT_NO_INTEGER_EVENT_COORDINATES +DEFINES += QT_BUILD_QML_LIB QT_NO_URL_CAST_FROM_STRING QT_NO_INTEGER_EVENT_COORDINATES + win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000 win32-msvc*:DEFINES *= _CRT_SECURE_NO_WARNINGS solaris-cc*:QMAKE_CXXFLAGS_RELEASE -= -O2 unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui -exists("qdeclarative_enable_gcov") { +exists("qqml_enable_gcov") { QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage -fno-elide-constructors LIBS += -lgcov } load(qt_module_config) -HEADERS += qtdeclarativeversion.h +HEADERS += qtqmlversion.h \ + qtqmlglobal.h \ + qtqmlglobal_p.h #INCLUDEPATH -= $$QMAKE_INCDIR_QT/$$TARGET #DESTDIR=. @@ -31,4 +34,4 @@ HEADERS += qtdeclarativeversion.h include(util/util.pri) include(qml/qml.pri) include(debugger/debugger.pri) -include(animations/animations.pri) \ No newline at end of file +include(animations/animations.pri) diff --git a/src/declarative/qml/ftw/ftw.pri b/src/qml/qml/ftw/ftw.pri similarity index 73% rename from src/declarative/qml/ftw/ftw.pri rename to src/qml/qml/ftw/ftw.pri index 26343422c5..f2fec4e2dd 100644 --- a/src/declarative/qml/ftw/ftw.pri +++ b/src/qml/qml/ftw/ftw.pri @@ -3,27 +3,27 @@ HEADERS += \ $$PWD/qintrusivelist_p.h \ $$PWD/qpodvector_p.h \ $$PWD/qhashedstring_p.h \ - $$PWD/qdeclarativerefcount_p.h \ - $$PWD/qdeclarativepool_p.h \ + $$PWD/qqmlrefcount_p.h \ + $$PWD/qqmlpool_p.h \ $$PWD/qfieldlist_p.h \ $$PWD/qfastmetabuilder_p.h \ $$PWD/qhashfield_p.h \ - $$PWD/qdeclarativethread_p.h \ + $$PWD/qqmlthread_p.h \ $$PWD/qfinitestack_p.h \ $$PWD/qrecursionwatcher_p.h \ $$PWD/qdeletewatcher_p.h \ $$PWD/qrecyclepool_p.h \ $$PWD/qflagpointer_p.h \ - $$PWD/qdeclarativetrace_p.h \ + $$PWD/qqmltrace_p.h \ $$PWD/qpointervaluepair_p.h \ $$PWD/qlazilyallocated_p.h \ SOURCES += \ $$PWD/qintrusivelist.cpp \ $$PWD/qhashedstring.cpp \ - $$PWD/qdeclarativepool.cpp \ + $$PWD/qqmlpool.cpp \ $$PWD/qfastmetabuilder.cpp \ - $$PWD/qdeclarativethread.cpp \ - $$PWD/qdeclarativetrace.cpp \ + $$PWD/qqmlthread.cpp \ + $$PWD/qqmltrace.cpp \ contains(QT_CONFIG, clock-gettime):include($$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri) diff --git a/src/declarative/qml/ftw/qbitfield_p.h b/src/qml/qml/ftw/qbitfield_p.h similarity index 98% rename from src/declarative/qml/ftw/qbitfield_p.h rename to src/qml/qml/ftw/qbitfield_p.h index addd21c96d..75f80dd896 100644 --- a/src/declarative/qml/ftw/qbitfield_p.h +++ b/src/qml/qml/ftw/qbitfield_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qdeletewatcher_p.h b/src/qml/qml/ftw/qdeletewatcher_p.h similarity index 97% rename from src/declarative/qml/ftw/qdeletewatcher_p.h rename to src/qml/qml/ftw/qdeletewatcher_p.h index 020907aa65..9f7b100429 100644 --- a/src/declarative/qml/ftw/qdeletewatcher_p.h +++ b/src/qml/qml/ftw/qdeletewatcher_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qfastmetabuilder.cpp b/src/qml/qml/ftw/qfastmetabuilder.cpp similarity index 99% rename from src/declarative/qml/ftw/qfastmetabuilder.cpp rename to src/qml/qml/ftw/qfastmetabuilder.cpp index 0395ab3309..9663c1e944 100644 --- a/src/declarative/qml/ftw/qfastmetabuilder.cpp +++ b/src/qml/qml/ftw/qfastmetabuilder.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qfastmetabuilder_p.h b/src/qml/qml/ftw/qfastmetabuilder_p.h similarity index 98% rename from src/declarative/qml/ftw/qfastmetabuilder_p.h rename to src/qml/qml/ftw/qfastmetabuilder_p.h index e8b7394fe4..c1f6a3de5c 100644 --- a/src/declarative/qml/ftw/qfastmetabuilder_p.h +++ b/src/qml/qml/ftw/qfastmetabuilder_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qfieldlist_p.h b/src/qml/qml/ftw/qfieldlist_p.h similarity index 99% rename from src/declarative/qml/ftw/qfieldlist_p.h rename to src/qml/qml/ftw/qfieldlist_p.h index 4253779e78..da5074b3cd 100644 --- a/src/declarative/qml/ftw/qfieldlist_p.h +++ b/src/qml/qml/ftw/qfieldlist_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qfinitestack_p.h b/src/qml/qml/ftw/qfinitestack_p.h similarity index 98% rename from src/declarative/qml/ftw/qfinitestack_p.h rename to src/qml/qml/ftw/qfinitestack_p.h index 8161b042c2..c5a9fbaedb 100644 --- a/src/declarative/qml/ftw/qfinitestack_p.h +++ b/src/qml/qml/ftw/qfinitestack_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qflagpointer_p.h b/src/qml/qml/ftw/qflagpointer_p.h similarity index 99% rename from src/declarative/qml/ftw/qflagpointer_p.h rename to src/qml/qml/ftw/qflagpointer_p.h index ac462cbe30..a4b20d9e2a 100644 --- a/src/declarative/qml/ftw/qflagpointer_p.h +++ b/src/qml/qml/ftw/qflagpointer_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qhashedstring.cpp b/src/qml/qml/ftw/qhashedstring.cpp similarity index 99% rename from src/declarative/qml/ftw/qhashedstring.cpp rename to src/qml/qml/ftw/qhashedstring.cpp index f3b5a9ebc9..1f09d50ed3 100644 --- a/src/declarative/qml/ftw/qhashedstring.cpp +++ b/src/qml/qml/ftw/qhashedstring.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qhashedstring_p.h b/src/qml/qml/ftw/qhashedstring_p.h similarity index 99% rename from src/declarative/qml/ftw/qhashedstring_p.h rename to src/qml/qml/ftw/qhashedstring_p.h index b778dd4df2..f575285ff6 100644 --- a/src/declarative/qml/ftw/qhashedstring_p.h +++ b/src/qml/qml/ftw/qhashedstring_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qhashfield_p.h b/src/qml/qml/ftw/qhashfield_p.h similarity index 98% rename from src/declarative/qml/ftw/qhashfield_p.h rename to src/qml/qml/ftw/qhashfield_p.h index a11e8d9486..46df9a176c 100644 --- a/src/declarative/qml/ftw/qhashfield_p.h +++ b/src/qml/qml/ftw/qhashfield_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qintrusivelist.cpp b/src/qml/qml/ftw/qintrusivelist.cpp similarity index 98% rename from src/declarative/qml/ftw/qintrusivelist.cpp rename to src/qml/qml/ftw/qintrusivelist.cpp index 1893eef8cd..5a1624f1f4 100644 --- a/src/declarative/qml/ftw/qintrusivelist.cpp +++ b/src/qml/qml/ftw/qintrusivelist.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qintrusivelist_p.h b/src/qml/qml/ftw/qintrusivelist_p.h similarity index 99% rename from src/declarative/qml/ftw/qintrusivelist_p.h rename to src/qml/qml/ftw/qintrusivelist_p.h index fb7524c6ab..489b02d656 100644 --- a/src/declarative/qml/ftw/qintrusivelist_p.h +++ b/src/qml/qml/ftw/qintrusivelist_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qlazilyallocated_p.h b/src/qml/qml/ftw/qlazilyallocated_p.h similarity index 98% rename from src/declarative/qml/ftw/qlazilyallocated_p.h rename to src/qml/qml/ftw/qlazilyallocated_p.h index d5a9dcc3ec..960d84d5e7 100644 --- a/src/declarative/qml/ftw/qlazilyallocated_p.h +++ b/src/qml/qml/ftw/qlazilyallocated_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qpodvector_p.h b/src/qml/qml/ftw/qpodvector_p.h similarity index 98% rename from src/declarative/qml/ftw/qpodvector_p.h rename to src/qml/qml/ftw/qpodvector_p.h index 66f970f100..c96692667a 100644 --- a/src/declarative/qml/ftw/qpodvector_p.h +++ b/src/qml/qml/ftw/qpodvector_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qpointervaluepair_p.h b/src/qml/qml/ftw/qpointervaluepair_p.h similarity index 98% rename from src/declarative/qml/ftw/qpointervaluepair_p.h rename to src/qml/qml/ftw/qpointervaluepair_p.h index fd1a77004e..7b0caf49bc 100644 --- a/src/declarative/qml/ftw/qpointervaluepair_p.h +++ b/src/qml/qml/ftw/qpointervaluepair_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qdeclarativepool.cpp b/src/qml/qml/ftw/qqmlpool.cpp similarity index 88% rename from src/declarative/qml/ftw/qdeclarativepool.cpp rename to src/qml/qml/ftw/qqmlpool.cpp index d816e5bb95..6fd11d4b1e 100644 --- a/src/declarative/qml/ftw/qdeclarativepool.cpp +++ b/src/qml/qml/ftw/qqmlpool.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,16 +39,16 @@ ** ****************************************************************************/ -#include "qdeclarativepool_p.h" +#include "qqmlpool_p.h" // #define POOL_DEBUG QT_BEGIN_NAMESPACE -void QDeclarativePool::newpage() +void QQmlPool::newpage() { #ifdef POOL_DEBUG - qWarning("QDeclarativePool: Allocating page"); + qWarning("QQmlPool: Allocating page"); #endif Page *page = (Page *)malloc(sizeof(Page)); @@ -57,7 +57,7 @@ void QDeclarativePool::newpage() _page = page; } -void QDeclarativePool::clear() +void QQmlPool::clear() { #ifdef POOL_DEBUG int count = 0; @@ -74,7 +74,7 @@ void QDeclarativePool::clear() } #ifdef POOL_DEBUG - qWarning("QDeclarativePool: Destroyed %d objects", count); + qWarning("QQmlPool: Destroyed %d objects", count); #endif Page *p = _page; diff --git a/src/declarative/qml/ftw/qdeclarativepool_p.h b/src/qml/qml/ftw/qqmlpool_p.h similarity index 80% rename from src/declarative/qml/ftw/qdeclarativepool_p.h rename to src/qml/qml/ftw/qqmlpool_p.h index d04c0e9eef..e4fa03ce34 100644 --- a/src/declarative/qml/ftw/qdeclarativepool_p.h +++ b/src/qml/qml/ftw/qqmlpool_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPOOL_P_H -#define QDECLARATIVEPOOL_P_H +#ifndef QQMLPOOL_P_H +#define QQMLPOOL_P_H // // W A R N I N G @@ -53,27 +53,27 @@ // We mean it. // -#include +#include #include #include QT_BEGIN_NAMESPACE // Exported for QtQuick1 -class Q_DECLARATIVE_EXPORT QDeclarativePool +class Q_QML_EXPORT QQmlPool { public: // The class has a destructor that needs to be called class Class { public: - inline QDeclarativePool *pool() const; + inline QQmlPool *pool() const; private: void *operator new(size_t); void *operator new(size_t, void *m) { return m; } - friend class QDeclarativePool; + friend class QQmlPool; - QDeclarativePool *_pool; + QQmlPool *_pool; Class *_next; void (*_destroy)(Class *); }; @@ -82,18 +82,18 @@ class Q_DECLARATIVE_EXPORT QDeclarativePool // be called class POD { public: - inline QDeclarativePool *pool() const; + inline QQmlPool *pool() const; private: void *operator new(size_t); void *operator new(size_t, void *m) { return m; } - friend class QDeclarativePool; + friend class QQmlPool; - QDeclarativePool *_pool; + QQmlPool *_pool; }; - inline QDeclarativePool(); - inline ~QDeclarativePool(); + inline QQmlPool(); + inline ~QQmlPool(); void clear(); @@ -133,7 +133,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativePool return m_data[index]; }; private: - friend class QDeclarativePool; + friend class QQmlPool; List(T *d, int l) : m_length(l), m_data(d) {} int m_length; T *m_data; @@ -175,18 +175,18 @@ class Q_DECLARATIVE_EXPORT QDeclarativePool Class *_classList; }; -QDeclarativePool::QDeclarativePool() +QQmlPool::QQmlPool() : _page(0), _classList(0) { } -QDeclarativePool::~QDeclarativePool() +QQmlPool::~QQmlPool() { clear(); } template -T *QDeclarativePool::New() +T *QQmlPool::New() { T *rv = new (allocate(sizeof(T))) T; initialize(rv); @@ -195,45 +195,45 @@ T *QDeclarativePool::New() } template -T *QDeclarativePool::NewRaw() +T *QQmlPool::NewRaw() { return (T*)allocate(sizeof(T)); } template -T *QDeclarativePool::NewRawArray(int length) +T *QQmlPool::NewRawArray(int length) { return (T*)allocate(length * sizeof(T)); } template -QDeclarativePool::List QDeclarativePool::NewRawList(int length) +QQmlPool::List QQmlPool::NewRawList(int length) { return List(NewRawArray(length), length); } -QString *QDeclarativePool::NewString(const QString &s) +QString *QQmlPool::NewString(const QString &s) { QString *rv = New(); *rv = s; return rv; } -QByteArray *QDeclarativePool::NewByteArray(const QByteArray &s) +QByteArray *QQmlPool::NewByteArray(const QByteArray &s) { QByteArray *rv = New(); *rv = s; return rv; } -QUrl *QDeclarativePool::NewUrl(const QUrl &s) +QUrl *QQmlPool::NewUrl(const QUrl &s) { QUrl *rv = New(); *rv = s; return rv; } -void *QDeclarativePool::allocate(int size) +void *QQmlPool::allocate(int size) { if (!_page || (_page->header.free + size) > (_page->memory + Page::pageSize)) newpage(); @@ -244,12 +244,12 @@ void *QDeclarativePool::allocate(int size) } template -void QDeclarativePool::initialize(QDeclarativePool::POD *) +void QQmlPool::initialize(QQmlPool::POD *) { } template -void QDeclarativePool::initialize(QDeclarativePool::Class *c) +void QQmlPool::initialize(QQmlPool::Class *c) { c->_next = _classList; c->_destroy = &destroy; @@ -257,22 +257,22 @@ void QDeclarativePool::initialize(QDeclarativePool::Class *c) } template -void QDeclarativePool::destroy(Class *c) +void QQmlPool::destroy(Class *c) { static_cast(c)->~T(); } -QDeclarativePool *QDeclarativePool::Class::pool() const +QQmlPool *QQmlPool::Class::pool() const { return _pool; } -QDeclarativePool *QDeclarativePool::POD::pool() const +QQmlPool *QQmlPool::POD::pool() const { return _pool; } QT_END_NAMESPACE -#endif // QDECLARATIVEPOOL_P_H +#endif // QQMLPOOL_P_H diff --git a/src/declarative/qml/ftw/qdeclarativerefcount_p.h b/src/qml/qml/ftw/qqmlrefcount_p.h similarity index 70% rename from src/declarative/qml/ftw/qdeclarativerefcount_p.h rename to src/qml/qml/ftw/qqmlrefcount_p.h index 05aede4534..497f4ecc0f 100644 --- a/src/declarative/qml/ftw/qdeclarativerefcount_p.h +++ b/src/qml/qml/ftw/qqmlrefcount_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEREFCOUNT_P_H -#define QDECLARATIVEREFCOUNT_P_H +#ifndef QQMLREFCOUNT_P_H +#define QQMLREFCOUNT_P_H // // W A R N I N G @@ -61,11 +61,11 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeRefCount +class QQmlRefCount { public: - inline QDeclarativeRefCount(); - inline virtual ~QDeclarativeRefCount(); + inline QQmlRefCount(); + inline virtual ~QQmlRefCount(); inline void addref(); inline void release(); @@ -77,16 +77,16 @@ class QDeclarativeRefCount }; template -class QDeclarativeRefPointer +class QQmlRefPointer { public: - inline QDeclarativeRefPointer(); - inline QDeclarativeRefPointer(T *); - inline QDeclarativeRefPointer(const QDeclarativeRefPointer &); - inline ~QDeclarativeRefPointer(); + inline QQmlRefPointer(); + inline QQmlRefPointer(T *); + inline QQmlRefPointer(const QQmlRefPointer &); + inline ~QQmlRefPointer(); - inline QDeclarativeRefPointer &operator=(const QDeclarativeRefPointer &o); - inline QDeclarativeRefPointer &operator=(T *); + inline QQmlRefPointer &operator=(const QQmlRefPointer &o); + inline QQmlRefPointer &operator=(T *); inline bool isNull() const { return !o; } @@ -95,68 +95,68 @@ class QDeclarativeRefPointer inline operator T*() const { return o; } inline T* data() const { return o; } - inline QDeclarativeRefPointer &take(T *); + inline QQmlRefPointer &take(T *); private: T *o; }; -QDeclarativeRefCount::QDeclarativeRefCount() +QQmlRefCount::QQmlRefCount() : refCount(1) { } -QDeclarativeRefCount::~QDeclarativeRefCount() +QQmlRefCount::~QQmlRefCount() { Q_ASSERT(refCount.load() == 0); } -void QDeclarativeRefCount::addref() +void QQmlRefCount::addref() { Q_ASSERT(refCount.load() > 0); refCount.ref(); } -void QDeclarativeRefCount::release() +void QQmlRefCount::release() { Q_ASSERT(refCount.load() > 0); if (!refCount.deref()) destroy(); } -void QDeclarativeRefCount::destroy() +void QQmlRefCount::destroy() { delete this; } template -QDeclarativeRefPointer::QDeclarativeRefPointer() +QQmlRefPointer::QQmlRefPointer() : o(0) { } template -QDeclarativeRefPointer::QDeclarativeRefPointer(T *o) +QQmlRefPointer::QQmlRefPointer(T *o) : o(o) { if (o) o->addref(); } template -QDeclarativeRefPointer::QDeclarativeRefPointer(const QDeclarativeRefPointer &other) +QQmlRefPointer::QQmlRefPointer(const QQmlRefPointer &other) : o(other.o) { if (o) o->addref(); } template -QDeclarativeRefPointer::~QDeclarativeRefPointer() +QQmlRefPointer::~QQmlRefPointer() { if (o) o->release(); } template -QDeclarativeRefPointer &QDeclarativeRefPointer::operator=(const QDeclarativeRefPointer &other) +QQmlRefPointer &QQmlRefPointer::operator=(const QQmlRefPointer &other) { if (other.o) other.o->addref(); if (o) o->release(); @@ -165,7 +165,7 @@ QDeclarativeRefPointer &QDeclarativeRefPointer::operator=(const QDeclarati } template -QDeclarativeRefPointer &QDeclarativeRefPointer::operator=(T *other) +QQmlRefPointer &QQmlRefPointer::operator=(T *other) { if (other) other->addref(); if (o) o->release(); @@ -178,7 +178,7 @@ Takes ownership of \a other. take() does *not* add a reference, as it assumes o of the callers reference of other. */ template -QDeclarativeRefPointer &QDeclarativeRefPointer::take(T *other) +QQmlRefPointer &QQmlRefPointer::take(T *other) { if (o) o->release(); o = other; @@ -189,4 +189,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEREFCOUNT_P_H +#endif // QQMLREFCOUNT_P_H diff --git a/src/declarative/qml/ftw/qdeclarativethread.cpp b/src/qml/qml/ftw/qqmlthread.cpp similarity index 77% rename from src/declarative/qml/ftw/qdeclarativethread.cpp rename to src/qml/qml/ftw/qqmlthread.cpp index be51a09f8d..423012b934 100644 --- a/src/declarative/qml/ftw/qdeclarativethread.cpp +++ b/src/qml/qml/ftw/qqmlthread.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativethread_p.h" +#include "qqmlthread_p.h" #include @@ -51,11 +51,11 @@ QT_BEGIN_NAMESPACE -class QDeclarativeThreadPrivate : public QThread +class QQmlThreadPrivate : public QThread { public: - QDeclarativeThreadPrivate(QDeclarativeThread *); - QDeclarativeThread *q; + QQmlThreadPrivate(QQmlThread *); + QQmlThread *q; virtual void run(); @@ -70,11 +70,11 @@ class QDeclarativeThreadPrivate : public QThread quint32 m_shutdown:1; // Set by main thread to request a shutdown quint32 m_mainThreadWaiting:1; // Set by main thread if it is waiting for the message queue to empty - typedef QFieldList MessageList; + typedef QFieldList MessageList; MessageList threadList; MessageList mainList; - QDeclarativeThread::Message *mainSync; + QQmlThread::Message *mainSync; void triggerMainEvent(); void triggerThreadEvent(); @@ -87,9 +87,9 @@ class QDeclarativeThreadPrivate : public QThread private: struct MainObject : public QObject { - MainObject(QDeclarativeThreadPrivate *p); + MainObject(QQmlThreadPrivate *p); virtual bool event(QEvent *e); - QDeclarativeThreadPrivate *p; + QQmlThreadPrivate *p; }; MainObject m_mainObject; @@ -97,46 +97,46 @@ class QDeclarativeThreadPrivate : public QThread QWaitCondition _wait; }; -QDeclarativeThreadPrivate::MainObject::MainObject(QDeclarativeThreadPrivate *p) +QQmlThreadPrivate::MainObject::MainObject(QQmlThreadPrivate *p) : p(p) { } // Trigger mainEvent in main thread. Must be called from thread. -void QDeclarativeThreadPrivate::triggerMainEvent() +void QQmlThreadPrivate::triggerMainEvent() { Q_ASSERT(q->isThisThread()); QCoreApplication::postEvent(&m_mainObject, new QEvent(QEvent::User)); } // Trigger even in thread. Must be called from main thread. -void QDeclarativeThreadPrivate::triggerThreadEvent() +void QQmlThreadPrivate::triggerThreadEvent() { Q_ASSERT(!q->isThisThread()); QCoreApplication::postEvent(this, new QEvent(QEvent::User)); } -bool QDeclarativeThreadPrivate::MainObject::event(QEvent *e) +bool QQmlThreadPrivate::MainObject::event(QEvent *e) { if (e->type() == QEvent::User) p->mainEvent(); return QObject::event(e); } -QDeclarativeThreadPrivate::QDeclarativeThreadPrivate(QDeclarativeThread *q) +QQmlThreadPrivate::QQmlThreadPrivate(QQmlThread *q) : q(q), m_threadProcessing(false), m_mainProcessing(false), m_shutdown(false), m_mainThreadWaiting(false), mainSync(0), m_mainObject(this) { } -bool QDeclarativeThreadPrivate::event(QEvent *e) +bool QQmlThreadPrivate::event(QEvent *e) { if (e->type() == QEvent::User) threadEvent(); return QThread::event(e); } -void QDeclarativeThreadPrivate::run() +void QQmlThreadPrivate::run() { lock(); @@ -148,7 +148,7 @@ void QDeclarativeThreadPrivate::run() exec(); } -void QDeclarativeThreadPrivate::mainEvent() +void QQmlThreadPrivate::mainEvent() { lock(); @@ -156,7 +156,7 @@ void QDeclarativeThreadPrivate::mainEvent() while (!mainList.isEmpty() || mainSync) { bool isSync = mainSync != 0; - QDeclarativeThread::Message *message = isSync?mainSync:mainList.takeFirst(); + QQmlThread::Message *message = isSync?mainSync:mainList.takeFirst(); unlock(); message->call(q); @@ -175,7 +175,7 @@ void QDeclarativeThreadPrivate::mainEvent() unlock(); } -void QDeclarativeThreadPrivate::threadEvent() +void QQmlThreadPrivate::threadEvent() { lock(); @@ -188,7 +188,7 @@ void QDeclarativeThreadPrivate::threadEvent() m_threadProcessing = true; while (!threadList.isEmpty()) { - QDeclarativeThread::Message *message = threadList.first(); + QQmlThread::Message *message = threadList.first(); unlock(); @@ -207,8 +207,8 @@ void QDeclarativeThreadPrivate::threadEvent() } } -QDeclarativeThread::QDeclarativeThread() -: d(new QDeclarativeThreadPrivate(this)) +QQmlThread::QQmlThread() +: d(new QQmlThreadPrivate(this)) { d->lock(); d->start(); @@ -218,12 +218,12 @@ QDeclarativeThread::QDeclarativeThread() } -QDeclarativeThread::~QDeclarativeThread() +QQmlThread::~QQmlThread() { delete d; } -void QDeclarativeThread::shutdown() +void QQmlThread::shutdown() { d->lock(); Q_ASSERT(!d->m_shutdown); @@ -235,52 +235,52 @@ void QDeclarativeThread::shutdown() d->QThread::wait(); } -void QDeclarativeThread::lock() +void QQmlThread::lock() { d->lock(); } -void QDeclarativeThread::unlock() +void QQmlThread::unlock() { d->unlock(); } -void QDeclarativeThread::wakeOne() +void QQmlThread::wakeOne() { d->wakeOne(); } -void QDeclarativeThread::wakeAll() +void QQmlThread::wakeAll() { d->wakeAll(); } -void QDeclarativeThread::wait() +void QQmlThread::wait() { d->wait(); } -bool QDeclarativeThread::isThisThread() const +bool QQmlThread::isThisThread() const { return QThread::currentThread() == d; } -QThread *QDeclarativeThread::thread() const +QThread *QQmlThread::thread() const { return const_cast(static_cast(d)); } // Called when the thread starts. Do startup stuff in here. -void QDeclarativeThread::startupThread() +void QQmlThread::startupThread() { } // Called when the thread shuts down. Do cleanup in here. -void QDeclarativeThread::shutdownThread() +void QQmlThread::shutdownThread() { } -void QDeclarativeThread::internalCallMethodInThread(Message *message) +void QQmlThread::internalCallMethodInThread(Message *message) { Q_ASSERT(!isThisThread()); d->lock(); @@ -295,7 +295,7 @@ void QDeclarativeThread::internalCallMethodInThread(Message *message) do { if (d->mainSync) { - QDeclarativeThread::Message *message = d->mainSync; + QQmlThread::Message *message = d->mainSync; unlock(); message->call(this); delete message; @@ -311,7 +311,7 @@ void QDeclarativeThread::internalCallMethodInThread(Message *message) d->unlock(); } -void QDeclarativeThread::internalCallMethodInMain(Message *message) +void QQmlThread::internalCallMethodInMain(Message *message) { Q_ASSERT(isThisThread()); @@ -334,7 +334,7 @@ void QDeclarativeThread::internalCallMethodInMain(Message *message) d->unlock(); } -void QDeclarativeThread::internalPostMethodToThread(Message *message) +void QQmlThread::internalPostMethodToThread(Message *message) { Q_ASSERT(!isThisThread()); d->lock(); @@ -345,7 +345,7 @@ void QDeclarativeThread::internalPostMethodToThread(Message *message) d->unlock(); } -void QDeclarativeThread::internalPostMethodToMain(Message *message) +void QQmlThread::internalPostMethodToMain(Message *message) { Q_ASSERT(isThisThread()); d->lock(); diff --git a/src/declarative/qml/ftw/qdeclarativethread_p.h b/src/qml/qml/ftw/qqmlthread_p.h similarity index 80% rename from src/declarative/qml/ftw/qdeclarativethread_p.h rename to src/qml/qml/ftw/qqmlthread_p.h index ce9eb1d88f..8a0ec6ceaa 100644 --- a/src/declarative/qml/ftw/qdeclarativethread_p.h +++ b/src/qml/qml/ftw/qqmlthread_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVETHREAD_P_H -#define QDECLARATIVETHREAD_P_H +#ifndef QQMLTHREAD_P_H +#define QQMLTHREAD_P_H // // W A R N I N G @@ -62,12 +62,12 @@ QT_BEGIN_NAMESPACE class QThread; -class QDeclarativeThreadPrivate; -class QDeclarativeThread +class QQmlThreadPrivate; +class QQmlThread { public: - QDeclarativeThread(); - virtual ~QDeclarativeThread(); + QQmlThread(); + virtual ~QQmlThread(); void shutdown(); void lock(); @@ -118,28 +118,28 @@ class QDeclarativeThread virtual void shutdownThread(); private: - friend class QDeclarativeThreadPrivate; + friend class QQmlThreadPrivate; struct Message { Message() : next(0) {} virtual ~Message() {} Message *next; - virtual void call(QDeclarativeThread *) = 0; + virtual void call(QQmlThread *) = 0; }; void internalCallMethodInThread(Message *); void internalCallMethodInMain(Message *); void internalPostMethodToThread(Message *); void internalPostMethodToMain(Message *); - QDeclarativeThreadPrivate *d; + QQmlThreadPrivate *d; }; template -void QDeclarativeThread::callMethodInThread(void (O::*Member)()) +void QQmlThread::callMethodInThread(void (O::*Member)()) { struct I : public Message { void (O::*Member)(); I(void (O::*Member)()) : Member(Member) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(); } @@ -148,13 +148,13 @@ void QDeclarativeThread::callMethodInThread(void (O::*Member)()) } template -void QDeclarativeThread::callMethodInThread(void (O::*Member)(V), const T &arg) +void QQmlThread::callMethodInThread(void (O::*Member)(V), const T &arg) { struct I : public Message { void (O::*Member)(V); T arg; I(void (O::*Member)(V), const T &arg) : Member(Member), arg(arg) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(arg); } @@ -163,14 +163,14 @@ void QDeclarativeThread::callMethodInThread(void (O::*Member)(V), const T &arg) } template -void QDeclarativeThread::callMethodInThread(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) +void QQmlThread::callMethodInThread(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) { struct I : public Message { void (O::*Member)(V, V2); T arg; T2 arg2; I(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) : Member(Member), arg(arg), arg2(arg2) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(arg, arg2); } @@ -179,12 +179,12 @@ void QDeclarativeThread::callMethodInThread(void (O::*Member)(V, V2), const T &a } template -void QDeclarativeThread::callMethodInMain(void (O::*Member)()) +void QQmlThread::callMethodInMain(void (O::*Member)()) { struct I : public Message { void (O::*Member)(); I(void (O::*Member)()) : Member(Member) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(); } @@ -193,13 +193,13 @@ void QDeclarativeThread::callMethodInMain(void (O::*Member)()) } template -void QDeclarativeThread::callMethodInMain(void (O::*Member)(V), const T &arg) +void QQmlThread::callMethodInMain(void (O::*Member)(V), const T &arg) { struct I : public Message { void (O::*Member)(V); T arg; I(void (O::*Member)(V), const T &arg) : Member(Member), arg(arg) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(arg); } @@ -208,14 +208,14 @@ void QDeclarativeThread::callMethodInMain(void (O::*Member)(V), const T &arg) } template -void QDeclarativeThread::callMethodInMain(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) +void QQmlThread::callMethodInMain(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) { struct I : public Message { void (O::*Member)(V, V2); T arg; T2 arg2; I(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) : Member(Member), arg(arg), arg2(arg2) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(arg, arg2); } @@ -224,12 +224,12 @@ void QDeclarativeThread::callMethodInMain(void (O::*Member)(V, V2), const T &arg } template -void QDeclarativeThread::postMethodToThread(void (O::*Member)()) +void QQmlThread::postMethodToThread(void (O::*Member)()) { struct I : public Message { void (O::*Member)(); I(void (O::*Member)()) : Member(Member) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(); } @@ -238,13 +238,13 @@ void QDeclarativeThread::postMethodToThread(void (O::*Member)()) } template -void QDeclarativeThread::postMethodToThread(void (O::*Member)(V), const T &arg) +void QQmlThread::postMethodToThread(void (O::*Member)(V), const T &arg) { struct I : public Message { void (O::*Member)(V); T arg; I(void (O::*Member)(V), const T &arg) : Member(Member), arg(arg) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(arg); } @@ -253,14 +253,14 @@ void QDeclarativeThread::postMethodToThread(void (O::*Member)(V), const T &arg) } template -void QDeclarativeThread::postMethodToThread(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) +void QQmlThread::postMethodToThread(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) { struct I : public Message { void (O::*Member)(V, V2); T arg; T2 arg2; I(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) : Member(Member), arg(arg), arg2(arg2) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(arg, arg2); } @@ -269,12 +269,12 @@ void QDeclarativeThread::postMethodToThread(void (O::*Member)(V, V2), const T &a } template -void QDeclarativeThread::postMethodToMain(void (O::*Member)()) +void QQmlThread::postMethodToMain(void (O::*Member)()) { struct I : public Message { void (O::*Member)(); I(void (O::*Member)()) : Member(Member) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(); } @@ -283,13 +283,13 @@ void QDeclarativeThread::postMethodToMain(void (O::*Member)()) } template -void QDeclarativeThread::postMethodToMain(void (O::*Member)(V), const T &arg) +void QQmlThread::postMethodToMain(void (O::*Member)(V), const T &arg) { struct I : public Message { void (O::*Member)(V); T arg; I(void (O::*Member)(V), const T &arg) : Member(Member), arg(arg) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(arg); } @@ -298,14 +298,14 @@ void QDeclarativeThread::postMethodToMain(void (O::*Member)(V), const T &arg) } template -void QDeclarativeThread::postMethodToMain(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) +void QQmlThread::postMethodToMain(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) { struct I : public Message { void (O::*Member)(V, V2); T arg; T2 arg2; I(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) : Member(Member), arg(arg), arg2(arg2) {} - virtual void call(QDeclarativeThread *thread) { + virtual void call(QQmlThread *thread) { O *me = static_cast(thread); (me->*Member)(arg, arg2); } @@ -315,4 +315,4 @@ void QDeclarativeThread::postMethodToMain(void (O::*Member)(V, V2), const T &arg QT_END_NAMESPACE -#endif // QDECLARATIVETHREAD_P_H +#endif // QQMLTHREAD_P_H diff --git a/src/declarative/qml/ftw/qdeclarativetrace.cpp b/src/qml/qml/ftw/qqmltrace.cpp similarity index 69% rename from src/declarative/qml/ftw/qdeclarativetrace.cpp rename to src/qml/qml/ftw/qqmltrace.cpp index 7c814e37c1..e044dc654f 100644 --- a/src/declarative/qml/ftw/qdeclarativetrace.cpp +++ b/src/qml/qml/ftw/qqmltrace.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativetrace_p.h" +#include "qqmltrace_p.h" #ifdef QML_ENABLE_TRACE #include @@ -49,11 +49,11 @@ QT_BEGIN_NAMESPACE #ifdef QML_ENABLE_TRACE -QDeclarativeTrace::Pool QDeclarativeTrace::logPool; -QDeclarativeTrace::Entry *QDeclarativeTrace::first = 0; -QDeclarativeTrace::Entry *QDeclarativeTrace::last = 0; +QQmlTrace::Pool QQmlTrace::logPool; +QQmlTrace::Entry *QQmlTrace::first = 0; +QQmlTrace::Entry *QQmlTrace::last = 0; -static qint64 toNsecs(QDeclarativeTrace::TimeType time) +static qint64 toNsecs(QQmlTrace::TimeType time) { #ifdef Q_OS_MAC static mach_timebase_info_data_t info = {0,0}; @@ -66,13 +66,13 @@ static qint64 toNsecs(QDeclarativeTrace::TimeType time) #endif } -QDeclarativeTrace::Pool::Pool() +QQmlTrace::Pool::Pool() { first = New(); last = first; } -QDeclarativeTrace::Pool::~Pool() +QQmlTrace::Pool::~Pool() { char buffer[128]; sprintf(buffer, "qml.%d.log", ::getpid()); @@ -84,7 +84,7 @@ QDeclarativeTrace::Pool::~Pool() fprintf (stderr, "QML Log: Writing log to %s\n", buffer); } - QDeclarativeTrace::Entry *cur = QDeclarativeTrace::first; + QQmlTrace::Entry *cur = QQmlTrace::first; QByteArray indent; int depth = -1; @@ -93,8 +93,8 @@ QDeclarativeTrace::Pool::~Pool() while (cur) { switch (cur->type) { - case QDeclarativeTrace::Entry::RangeStart: { - RangeStart *rs = static_cast(cur); + case QQmlTrace::Entry::RangeStart: { + RangeStart *rs = static_cast(cur); qint64 nsecs = toNsecs(rs->time); @@ -108,38 +108,38 @@ QDeclarativeTrace::Pool::~Pool() fprintf(out, "%s%s @%lld (%lld ns)\n", indent.constData(), rs->description, nsecs, toNsecs(rs->end->time) - nsecs - firstTime); } break; - case QDeclarativeTrace::Entry::RangeEnd: + case QQmlTrace::Entry::RangeEnd: depth--; indent = QByteArray(depth * 4, ' '); break; - case QDeclarativeTrace::Entry::Detail: + case QQmlTrace::Entry::Detail: fprintf(out, "%s %s\n", indent.constData(), - static_cast(cur)->description); + static_cast(cur)->description); break; - case QDeclarativeTrace::Entry::IntDetail: + case QQmlTrace::Entry::IntDetail: fprintf(out, "%s %s: %d\n", indent.constData(), - static_cast(cur)->description, - static_cast(cur)->value); + static_cast(cur)->description, + static_cast(cur)->value); break; - case QDeclarativeTrace::Entry::StringDetail: { - QByteArray vLatin1 = static_cast(cur)->value->toLatin1(); + case QQmlTrace::Entry::StringDetail: { + QByteArray vLatin1 = static_cast(cur)->value->toLatin1(); fprintf(out, "%s %s: %s\n", indent.constData(), - static_cast(cur)->description, + static_cast(cur)->description, vLatin1.constData()); } break; - case QDeclarativeTrace::Entry::UrlDetail: { - QByteArray vLatin1 = static_cast(cur)->value->toString().toLatin1(); + case QQmlTrace::Entry::UrlDetail: { + QByteArray vLatin1 = static_cast(cur)->value->toString().toLatin1(); fprintf(out, "%s %s: %s\n", indent.constData(), - static_cast(cur)->description, + static_cast(cur)->description, vLatin1.constData()); } break; - case QDeclarativeTrace::Entry::Event: { - Event *ev = static_cast(cur); + case QQmlTrace::Entry::Event: { + Event *ev = static_cast(cur); qint64 nsecs = toNsecs(ev->time) - firstTime; fprintf(out, "%s + %s @%lld +%lld ns\n", indent.constData(), ev->description, nsecs, nsecs - (toNsecs(ev->start->time) - firstTime)); } break; - case QDeclarativeTrace::Entry::Null: + case QQmlTrace::Entry::Null: default: break; } diff --git a/src/declarative/qml/ftw/qdeclarativetrace_p.h b/src/qml/qml/ftw/qqmltrace_p.h similarity index 73% rename from src/declarative/qml/ftw/qdeclarativetrace_p.h rename to src/qml/qml/ftw/qqmltrace_p.h index 89ed26e925..965baff3a3 100644 --- a/src/declarative/qml/ftw/qdeclarativetrace_p.h +++ b/src/qml/qml/ftw/qqmltrace_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVETRACE_P_H -#define QDECLARATIVETRACE_P_H +#ifndef QQMLTRACE_P_H +#define QQMLTRACE_P_H // // W A R N I N G @@ -54,7 +54,7 @@ // #include -#include +#include // #define QML_ENABLE_TRACE @@ -65,11 +65,11 @@ QT_BEGIN_NAMESPACE class QUrl; -class QDeclarativeTrace +class QQmlTrace { public: - inline QDeclarativeTrace(const char *desc); - inline ~QDeclarativeTrace(); + inline QQmlTrace(const char *desc); + inline ~QQmlTrace(); inline void addDetail(const char *); inline void addDetail(const char *, int); @@ -86,7 +86,7 @@ class QDeclarativeTrace typedef timespec TimeType; #endif - struct Entry : public QDeclarativePool::POD { + struct Entry : public QQmlPool::POD { enum Type { Null, RangeStart, RangeEnd, Detail, IntDetail, StringDetail, UrlDetail, Event }; inline Entry(); inline Entry(Type); @@ -101,7 +101,7 @@ class QDeclarativeTrace inline RangeStart(); const char *description; TimeType time; - QDeclarativeTrace::RangeEnd *end; + QQmlTrace::RangeEnd *end; }; struct Detail : public Entry { inline Detail(); @@ -124,10 +124,10 @@ class QDeclarativeTrace inline Event(); const char *description; TimeType time; - QDeclarativeTrace::RangeStart *start; + QQmlTrace::RangeStart *start; }; - struct Pool : public QDeclarativePool { + struct Pool : public QQmlPool { Pool(); ~Pool(); }; @@ -152,67 +152,67 @@ class QDeclarativeTrace }; #ifdef QML_ENABLE_TRACE -QDeclarativeTrace::Entry::Entry() +QQmlTrace::Entry::Entry() : type(Null), next(0) { } -QDeclarativeTrace::Entry::Entry(Type type) +QQmlTrace::Entry::Entry(Type type) : type(type), next(0) { - QDeclarativeTrace::last->next = this; - QDeclarativeTrace::last = this; + QQmlTrace::last->next = this; + QQmlTrace::last = this; } -QDeclarativeTrace::RangeEnd::RangeEnd() -: QDeclarativeTrace::Entry(QDeclarativeTrace::Entry::RangeEnd), +QQmlTrace::RangeEnd::RangeEnd() +: QQmlTrace::Entry(QQmlTrace::Entry::RangeEnd), time(gettime()) { } -QDeclarativeTrace::RangeStart::RangeStart() -: QDeclarativeTrace::Entry(QDeclarativeTrace::Entry::RangeStart), +QQmlTrace::RangeStart::RangeStart() +: QQmlTrace::Entry(QQmlTrace::Entry::RangeStart), description(0), time(gettime()) { } -QDeclarativeTrace::Detail::Detail() -: QDeclarativeTrace::Entry(QDeclarativeTrace::Entry::Detail), +QQmlTrace::Detail::Detail() +: QQmlTrace::Entry(QQmlTrace::Entry::Detail), description(0) { } -QDeclarativeTrace::Detail::Detail(Type type) -: QDeclarativeTrace::Entry(type), description(0) +QQmlTrace::Detail::Detail(Type type) +: QQmlTrace::Entry(type), description(0) { } -QDeclarativeTrace::IntDetail::IntDetail() -: QDeclarativeTrace::Detail(QDeclarativeTrace::Entry::IntDetail), +QQmlTrace::IntDetail::IntDetail() +: QQmlTrace::Detail(QQmlTrace::Entry::IntDetail), value(0) { } -QDeclarativeTrace::StringDetail::StringDetail() -: QDeclarativeTrace::Detail(QDeclarativeTrace::Entry::StringDetail), +QQmlTrace::StringDetail::StringDetail() +: QQmlTrace::Detail(QQmlTrace::Entry::StringDetail), value(0) { } -QDeclarativeTrace::UrlDetail::UrlDetail() -: QDeclarativeTrace::Detail(QDeclarativeTrace::Entry::UrlDetail), +QQmlTrace::UrlDetail::UrlDetail() +: QQmlTrace::Detail(QQmlTrace::Entry::UrlDetail), value(0) { } -QDeclarativeTrace::Event::Event() -: QDeclarativeTrace::Entry(QDeclarativeTrace::Entry::Event), +QQmlTrace::Event::Event() +: QQmlTrace::Entry(QQmlTrace::Entry::Event), description(0), time(gettime()), start(0) { } #endif -QDeclarativeTrace::QDeclarativeTrace(const char *desc) +QQmlTrace::QQmlTrace(const char *desc) { #ifdef QML_ENABLE_TRACE RangeStart *e = logPool.New(); @@ -224,7 +224,7 @@ QDeclarativeTrace::QDeclarativeTrace(const char *desc) #endif } -QDeclarativeTrace::~QDeclarativeTrace() +QQmlTrace::~QQmlTrace() { #ifdef QML_ENABLE_TRACE RangeEnd *e = logPool.New(); @@ -232,7 +232,7 @@ QDeclarativeTrace::~QDeclarativeTrace() #endif } -void QDeclarativeTrace::addDetail(const char *desc) +void QQmlTrace::addDetail(const char *desc) { #ifdef QML_ENABLE_TRACE Detail *e = logPool.New(); @@ -242,7 +242,7 @@ void QDeclarativeTrace::addDetail(const char *desc) #endif } -void QDeclarativeTrace::addDetail(const char *desc, int v) +void QQmlTrace::addDetail(const char *desc, int v) { #ifdef QML_ENABLE_TRACE IntDetail *e = logPool.New(); @@ -254,7 +254,7 @@ void QDeclarativeTrace::addDetail(const char *desc, int v) #endif } -void QDeclarativeTrace::addDetail(const char *desc, const QString &v) +void QQmlTrace::addDetail(const char *desc, const QString &v) { #ifdef QML_ENABLE_TRACE StringDetail *e = logPool.New(); @@ -266,7 +266,7 @@ void QDeclarativeTrace::addDetail(const char *desc, const QString &v) #endif } -void QDeclarativeTrace::addDetail(const char *desc, const QUrl &v) +void QQmlTrace::addDetail(const char *desc, const QUrl &v) { #ifdef QML_ENABLE_TRACE UrlDetail *e = logPool.New(); @@ -278,7 +278,7 @@ void QDeclarativeTrace::addDetail(const char *desc, const QUrl &v) #endif } -void QDeclarativeTrace::event(const char *desc) +void QQmlTrace::event(const char *desc) { #ifdef QML_ENABLE_TRACE Event *e = logPool.New(); @@ -291,4 +291,4 @@ void QDeclarativeTrace::event(const char *desc) QT_END_NAMESPACE -#endif // QDECLARATIVETRACE_P_H +#endif // QQMLTRACE_P_H diff --git a/src/declarative/qml/ftw/qrecursionwatcher_p.h b/src/qml/qml/ftw/qrecursionwatcher_p.h similarity index 97% rename from src/declarative/qml/ftw/qrecursionwatcher_p.h rename to src/qml/qml/ftw/qrecursionwatcher_p.h index e68ec424aa..16886edf12 100644 --- a/src/declarative/qml/ftw/qrecursionwatcher_p.h +++ b/src/qml/qml/ftw/qrecursionwatcher_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/ftw/qrecyclepool_p.h b/src/qml/qml/ftw/qrecyclepool_p.h similarity index 98% rename from src/declarative/qml/ftw/qrecyclepool_p.h rename to src/qml/qml/ftw/qrecyclepool_p.h index ed0bbbdd27..8d0f060ab3 100644 --- a/src/declarative/qml/ftw/qrecyclepool_p.h +++ b/src/qml/qml/ftw/qrecyclepool_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/qml/qml/parser/parser.pri b/src/qml/qml/parser/parser.pri new file mode 100644 index 0000000000..6be85ba85a --- /dev/null +++ b/src/qml/qml/parser/parser.pri @@ -0,0 +1,19 @@ +HEADERS += \ + $$PWD/qqmljsast_p.h \ + $$PWD/qqmljsastfwd_p.h \ + $$PWD/qqmljsastvisitor_p.h \ + $$PWD/qqmljsengine_p.h \ + $$PWD/qqmljsgrammar_p.h \ + $$PWD/qqmljslexer_p.h \ + $$PWD/qqmljsmemorypool_p.h \ + $$PWD/qqmljsparser_p.h \ + $$PWD/qqmljsglobal_p.h \ + $$PWD/qqmljskeywords_p.h + +SOURCES += \ + $$PWD/qqmljsast.cpp \ + $$PWD/qqmljsastvisitor.cpp \ + $$PWD/qqmljsengine_p.cpp \ + $$PWD/qqmljsgrammar.cpp \ + $$PWD/qqmljslexer.cpp \ + $$PWD/qqmljsparser.cpp diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/qml/qml/parser/qqmljs.g similarity index 98% rename from src/declarative/qml/parser/qdeclarativejs.g rename to src/qml/qml/parser/qqmljs.g index b87f9f8a65..746fcb24df 100644 --- a/src/declarative/qml/parser/qdeclarativejs.g +++ b/src/qml/qml/parser/qqmljs.g @@ -3,7 +3,7 @@ -- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -- Contact: http://www.qt-project.org/ -- --- This file is part of the QtDeclarative module of the Qt Toolkit. +-- This file is part of the QtQml module of the Qt Toolkit. -- -- $QT_BEGIN_LICENSE:LGPL-ONLY$ -- GNU Lesser General Public License Usage @@ -21,8 +21,8 @@ -- ---------------------------------------------------------------------------- -%parser QDeclarativeJSGrammar -%decl qdeclarativejsparser_p.h +%parser QQmlJSGrammar +%decl qqmljsparser_p.h %impl qdeclarativejsparser.cpp %expect 2 %expect-rr 2 @@ -88,7 +88,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -129,10 +129,10 @@ #include -#include "qdeclarativejsengine_p.h" -#include "qdeclarativejslexer_p.h" -#include "qdeclarativejsast_p.h" -#include "qdeclarativejsmemorypool_p.h" +#include "qqmljsengine_p.h" +#include "qqmljslexer_p.h" +#include "qqmljsast_p.h" +#include "qqmljsmemorypool_p.h" ./ @@ -141,7 +141,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -197,17 +197,17 @@ #ifndef QDECLARATIVEJSPARSER_P_H #define QDECLARATIVEJSPARSER_P_H -#include "qdeclarativejsglobal_p.h" -#include "qdeclarativejsgrammar_p.h" -#include "qdeclarativejsast_p.h" -#include "qdeclarativejsengine_p.h" +#include "qqmljsglobal_p.h" +#include "qqmljsgrammar_p.h" +#include "qqmljsast_p.h" +#include "qqmljsengine_p.h" #include #include QT_QML_BEGIN_NAMESPACE -namespace QDeclarativeJS { +namespace QQmlJS { class Engine; @@ -371,7 +371,7 @@ protected: QList diagnostic_messages; }; -} // end of namespace QDeclarativeJS +} // end of namespace QQmlJS :/ @@ -379,7 +379,7 @@ protected: /. -#include "qdeclarativejsparser_p.h" +#include "qqmljsparser_p.h" #include // @@ -387,7 +387,7 @@ protected: // Changes will be lost. // -using namespace QDeclarativeJS; +using namespace QQmlJS; QT_QML_BEGIN_NAMESPACE @@ -2899,7 +2899,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; yylloc.startColumn += yylloc.length; yylloc.length = 0; - //const QString msg = qApp->translate("QDeclarativeParser", "Missing `;'"); + //const QString msg = qApp->translate("QQmlParser", "Missing `;'"); //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg)); first_token = &token_buffer[0]; @@ -2929,9 +2929,9 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; QString msg; int token = token_buffer[0].token; if (token < 0 || token >= TERMINAL_COUNT) - msg = qApp->translate("QDeclarativeParser", "Syntax error"); + msg = qApp->translate("QQmlParser", "Syntax error"); else - msg = qApp->translate("QDeclarativeParser", "Unexpected token `%1'").arg(QLatin1String(spell[token])); + msg = qApp->translate("QQmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); action = errorState; @@ -2959,7 +2959,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) { int a = t_action(errorState, *tk); if (a > 0 && t_action(a, yytoken)) { - const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[*tk])); + const QString msg = qApp->translate("QQmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); yytoken = *tk; @@ -2983,7 +2983,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; int a = t_action(errorState, tk); if (a > 0 && t_action(a, yytoken)) { - const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[tk])); + const QString msg = qApp->translate("QQmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); yytoken = tk; @@ -2996,7 +2996,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; } } - const QString msg = qApp->translate("QDeclarativeParser", "Syntax error"); + const QString msg = qApp->translate("QQmlParser", "Syntax error"); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); } diff --git a/src/declarative/qml/parser/qdeclarativejsast.cpp b/src/qml/qml/parser/qqmljsast.cpp similarity index 98% rename from src/declarative/qml/parser/qdeclarativejsast.cpp rename to src/qml/qml/parser/qqmljsast.cpp index 8654c4392f..d0b984fc9e 100644 --- a/src/declarative/qml/parser/qdeclarativejsast.cpp +++ b/src/qml/qml/parser/qqmljsast.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,13 +39,13 @@ ** ****************************************************************************/ -#include "qdeclarativejsast_p.h" +#include "qqmljsast_p.h" -#include "qdeclarativejsastvisitor_p.h" +#include "qqmljsastvisitor_p.h" QT_QML_BEGIN_NAMESPACE -namespace QDeclarativeJS { namespace AST { +namespace QQmlJS { namespace AST { void Node::accept(Visitor *visitor) { @@ -924,7 +924,7 @@ void UiSourceElement::accept0(Visitor *visitor) visitor->endVisit(this); } -} } // namespace QDeclarativeJS::AST +} } // namespace QQmlJS::AST QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qdeclarativejsast_p.h b/src/qml/qml/parser/qqmljsast_p.h similarity index 92% rename from src/declarative/qml/parser/qdeclarativejsast_p.h rename to src/qml/qml/parser/qqmljsast_p.h index 04bf3ce122..f85eb4ca5f 100644 --- a/src/declarative/qml/parser/qdeclarativejsast_p.h +++ b/src/qml/qml/parser/qqmljsast_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEJSAST_P_H -#define QDECLARATIVEJSAST_P_H +#ifndef QQMLJSAST_P_H +#define QQMLJSAST_P_H // // W A R N I N G @@ -53,15 +53,15 @@ // We mean it. // -#include "qdeclarativejsastvisitor_p.h" -#include "qdeclarativejsglobal_p.h" -#include "qdeclarativejsmemorypool_p.h" +#include "qqmljsastvisitor_p.h" +#include "qqmljsglobal_p.h" +#include "qqmljsmemorypool_p.h" #include QT_QML_BEGIN_NAMESPACE -#define QDECLARATIVEJS_DECLARE_AST_NODE(name) \ +#define QQMLJS_DECLARE_AST_NODE(name) \ enum { K = Kind_##name }; namespace QSOperator // ### rename @@ -107,7 +107,7 @@ enum Op { } // namespace QSOperator -namespace QDeclarativeJS { +namespace QQmlJS { namespace AST { @@ -265,7 +265,7 @@ class QML_PARSER_EXPORT Statement: public Node class QML_PARSER_EXPORT NestedExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(NestedExpression) + QQMLJS_DECLARE_AST_NODE(NestedExpression) NestedExpression(ExpressionNode *expression) : expression(expression) @@ -288,7 +288,7 @@ class QML_PARSER_EXPORT NestedExpression: public ExpressionNode class QML_PARSER_EXPORT ThisExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ThisExpression) + QQMLJS_DECLARE_AST_NODE(ThisExpression) ThisExpression() { kind = K; } @@ -307,7 +307,7 @@ class QML_PARSER_EXPORT ThisExpression: public ExpressionNode class QML_PARSER_EXPORT IdentifierExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(IdentifierExpression) + QQMLJS_DECLARE_AST_NODE(IdentifierExpression) IdentifierExpression(const QStringRef &n): name (n) { kind = K; } @@ -328,7 +328,7 @@ class QML_PARSER_EXPORT IdentifierExpression: public ExpressionNode class QML_PARSER_EXPORT NullExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(NullExpression) + QQMLJS_DECLARE_AST_NODE(NullExpression) NullExpression() { kind = K; } @@ -347,7 +347,7 @@ class QML_PARSER_EXPORT NullExpression: public ExpressionNode class QML_PARSER_EXPORT TrueLiteral: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(TrueLiteral) + QQMLJS_DECLARE_AST_NODE(TrueLiteral) TrueLiteral() { kind = K; } @@ -366,7 +366,7 @@ class QML_PARSER_EXPORT TrueLiteral: public ExpressionNode class QML_PARSER_EXPORT FalseLiteral: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(FalseLiteral) + QQMLJS_DECLARE_AST_NODE(FalseLiteral) FalseLiteral() { kind = K; } @@ -385,7 +385,7 @@ class QML_PARSER_EXPORT FalseLiteral: public ExpressionNode class QML_PARSER_EXPORT NumericLiteral: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(NumericLiteral) + QQMLJS_DECLARE_AST_NODE(NumericLiteral) NumericLiteral(double v): value(v) { kind = K; } @@ -406,7 +406,7 @@ class QML_PARSER_EXPORT NumericLiteral: public ExpressionNode class QML_PARSER_EXPORT StringLiteral: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(StringLiteral) + QQMLJS_DECLARE_AST_NODE(StringLiteral) StringLiteral(const QStringRef &v): value (v) { kind = K; } @@ -427,7 +427,7 @@ class QML_PARSER_EXPORT StringLiteral: public ExpressionNode class QML_PARSER_EXPORT RegExpLiteral: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(RegExpLiteral) + QQMLJS_DECLARE_AST_NODE(RegExpLiteral) RegExpLiteral(const QStringRef &p, int f): pattern (p), flags (f) { kind = K; } @@ -449,7 +449,7 @@ class QML_PARSER_EXPORT RegExpLiteral: public ExpressionNode class QML_PARSER_EXPORT ArrayLiteral: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ArrayLiteral) + QQMLJS_DECLARE_AST_NODE(ArrayLiteral) ArrayLiteral(Elision *e): elements (0), elision (e) @@ -482,7 +482,7 @@ class QML_PARSER_EXPORT ArrayLiteral: public ExpressionNode class QML_PARSER_EXPORT ObjectLiteral: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ObjectLiteral) + QQMLJS_DECLARE_AST_NODE(ObjectLiteral) ObjectLiteral(): properties (0) { kind = K; } @@ -507,7 +507,7 @@ class QML_PARSER_EXPORT ObjectLiteral: public ExpressionNode class QML_PARSER_EXPORT Elision: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(Elision) + QQMLJS_DECLARE_AST_NODE(Elision) Elision(): next (this) { kind = K; } @@ -542,7 +542,7 @@ class QML_PARSER_EXPORT Elision: public Node class QML_PARSER_EXPORT ElementList: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ElementList) + QQMLJS_DECLARE_AST_NODE(ElementList) ElementList(Elision *e, ExpressionNode *expr): elision (e), expression (expr), next (this) @@ -589,7 +589,7 @@ class QML_PARSER_EXPORT ElementList: public Node class QML_PARSER_EXPORT PropertyName: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(PropertyName) + QQMLJS_DECLARE_AST_NODE(PropertyName) PropertyName() { kind = K; } @@ -606,7 +606,7 @@ class QML_PARSER_EXPORT PropertyName: public Node class QML_PARSER_EXPORT PropertyNameAndValueList: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(PropertyNameAndValueList) + QQMLJS_DECLARE_AST_NODE(PropertyNameAndValueList) PropertyNameAndValueList(PropertyName *n, ExpressionNode *v): name (n), value (v), next (this) @@ -650,7 +650,7 @@ class QML_PARSER_EXPORT PropertyNameAndValueList: public Node class QML_PARSER_EXPORT IdentifierPropertyName: public PropertyName { public: - QDECLARATIVEJS_DECLARE_AST_NODE(IdentifierPropertyName) + QQMLJS_DECLARE_AST_NODE(IdentifierPropertyName) IdentifierPropertyName(const QStringRef &n): id (n) { kind = K; } @@ -664,7 +664,7 @@ class QML_PARSER_EXPORT IdentifierPropertyName: public PropertyName class QML_PARSER_EXPORT StringLiteralPropertyName: public PropertyName { public: - QDECLARATIVEJS_DECLARE_AST_NODE(StringLiteralPropertyName) + QQMLJS_DECLARE_AST_NODE(StringLiteralPropertyName) StringLiteralPropertyName(const QStringRef &n): id (n) { kind = K; } @@ -678,7 +678,7 @@ class QML_PARSER_EXPORT StringLiteralPropertyName: public PropertyName class QML_PARSER_EXPORT NumericLiteralPropertyName: public PropertyName { public: - QDECLARATIVEJS_DECLARE_AST_NODE(NumericLiteralPropertyName) + QQMLJS_DECLARE_AST_NODE(NumericLiteralPropertyName) NumericLiteralPropertyName(double n): id (n) { kind = K; } @@ -692,7 +692,7 @@ class QML_PARSER_EXPORT NumericLiteralPropertyName: public PropertyName class QML_PARSER_EXPORT ArrayMemberExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ArrayMemberExpression) + QQMLJS_DECLARE_AST_NODE(ArrayMemberExpression) ArrayMemberExpression(ExpressionNode *b, ExpressionNode *e): base (b), expression (e) @@ -716,7 +716,7 @@ class QML_PARSER_EXPORT ArrayMemberExpression: public ExpressionNode class QML_PARSER_EXPORT FieldMemberExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(FieldMemberExpression) + QQMLJS_DECLARE_AST_NODE(FieldMemberExpression) FieldMemberExpression(ExpressionNode *b, const QStringRef &n): base (b), name (n) @@ -740,7 +740,7 @@ class QML_PARSER_EXPORT FieldMemberExpression: public ExpressionNode class QML_PARSER_EXPORT NewMemberExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(NewMemberExpression) + QQMLJS_DECLARE_AST_NODE(NewMemberExpression) NewMemberExpression(ExpressionNode *b, ArgumentList *a): base (b), arguments (a) @@ -765,7 +765,7 @@ class QML_PARSER_EXPORT NewMemberExpression: public ExpressionNode class QML_PARSER_EXPORT NewExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(NewExpression) + QQMLJS_DECLARE_AST_NODE(NewExpression) NewExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -786,7 +786,7 @@ class QML_PARSER_EXPORT NewExpression: public ExpressionNode class QML_PARSER_EXPORT CallExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(CallExpression) + QQMLJS_DECLARE_AST_NODE(CallExpression) CallExpression(ExpressionNode *b, ArgumentList *a): base (b), arguments (a) @@ -810,7 +810,7 @@ class QML_PARSER_EXPORT CallExpression: public ExpressionNode class QML_PARSER_EXPORT ArgumentList: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ArgumentList) + QQMLJS_DECLARE_AST_NODE(ArgumentList) ArgumentList(ExpressionNode *e): expression (e), next (this) @@ -852,7 +852,7 @@ class QML_PARSER_EXPORT ArgumentList: public Node class QML_PARSER_EXPORT PostIncrementExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(PostIncrementExpression) + QQMLJS_DECLARE_AST_NODE(PostIncrementExpression) PostIncrementExpression(ExpressionNode *b): base (b) { kind = K; } @@ -873,7 +873,7 @@ class QML_PARSER_EXPORT PostIncrementExpression: public ExpressionNode class QML_PARSER_EXPORT PostDecrementExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(PostDecrementExpression) + QQMLJS_DECLARE_AST_NODE(PostDecrementExpression) PostDecrementExpression(ExpressionNode *b): base (b) { kind = K; } @@ -894,7 +894,7 @@ class QML_PARSER_EXPORT PostDecrementExpression: public ExpressionNode class QML_PARSER_EXPORT DeleteExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(DeleteExpression) + QQMLJS_DECLARE_AST_NODE(DeleteExpression) DeleteExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -915,7 +915,7 @@ class QML_PARSER_EXPORT DeleteExpression: public ExpressionNode class QML_PARSER_EXPORT VoidExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(VoidExpression) + QQMLJS_DECLARE_AST_NODE(VoidExpression) VoidExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -936,7 +936,7 @@ class QML_PARSER_EXPORT VoidExpression: public ExpressionNode class QML_PARSER_EXPORT TypeOfExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(TypeOfExpression) + QQMLJS_DECLARE_AST_NODE(TypeOfExpression) TypeOfExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -957,7 +957,7 @@ class QML_PARSER_EXPORT TypeOfExpression: public ExpressionNode class QML_PARSER_EXPORT PreIncrementExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(PreIncrementExpression) + QQMLJS_DECLARE_AST_NODE(PreIncrementExpression) PreIncrementExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -978,7 +978,7 @@ class QML_PARSER_EXPORT PreIncrementExpression: public ExpressionNode class QML_PARSER_EXPORT PreDecrementExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(PreDecrementExpression) + QQMLJS_DECLARE_AST_NODE(PreDecrementExpression) PreDecrementExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -999,7 +999,7 @@ class QML_PARSER_EXPORT PreDecrementExpression: public ExpressionNode class QML_PARSER_EXPORT UnaryPlusExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UnaryPlusExpression) + QQMLJS_DECLARE_AST_NODE(UnaryPlusExpression) UnaryPlusExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1020,7 +1020,7 @@ class QML_PARSER_EXPORT UnaryPlusExpression: public ExpressionNode class QML_PARSER_EXPORT UnaryMinusExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UnaryMinusExpression) + QQMLJS_DECLARE_AST_NODE(UnaryMinusExpression) UnaryMinusExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1041,7 +1041,7 @@ class QML_PARSER_EXPORT UnaryMinusExpression: public ExpressionNode class QML_PARSER_EXPORT TildeExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(TildeExpression) + QQMLJS_DECLARE_AST_NODE(TildeExpression) TildeExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1062,7 +1062,7 @@ class QML_PARSER_EXPORT TildeExpression: public ExpressionNode class QML_PARSER_EXPORT NotExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(NotExpression) + QQMLJS_DECLARE_AST_NODE(NotExpression) NotExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1083,7 +1083,7 @@ class QML_PARSER_EXPORT NotExpression: public ExpressionNode class QML_PARSER_EXPORT BinaryExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(BinaryExpression) + QQMLJS_DECLARE_AST_NODE(BinaryExpression) BinaryExpression(ExpressionNode *l, int o, ExpressionNode *r): left (l), op (o), right (r) @@ -1109,7 +1109,7 @@ class QML_PARSER_EXPORT BinaryExpression: public ExpressionNode class QML_PARSER_EXPORT ConditionalExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ConditionalExpression) + QQMLJS_DECLARE_AST_NODE(ConditionalExpression) ConditionalExpression(ExpressionNode *e, ExpressionNode *t, ExpressionNode *f): expression (e), ok (t), ko (f) @@ -1134,7 +1134,7 @@ class QML_PARSER_EXPORT ConditionalExpression: public ExpressionNode class QML_PARSER_EXPORT Expression: public ExpressionNode // ### rename { public: - QDECLARATIVEJS_DECLARE_AST_NODE(Expression) + QQMLJS_DECLARE_AST_NODE(Expression) Expression(ExpressionNode *l, ExpressionNode *r): left (l), right (r) { kind = K; } @@ -1156,7 +1156,7 @@ class QML_PARSER_EXPORT Expression: public ExpressionNode // ### rename class QML_PARSER_EXPORT Block: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(Block) + QQMLJS_DECLARE_AST_NODE(Block) Block(StatementList *slist): statements (slist) { kind = K; } @@ -1178,7 +1178,7 @@ class QML_PARSER_EXPORT Block: public Statement class QML_PARSER_EXPORT StatementList: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(StatementList) + QQMLJS_DECLARE_AST_NODE(StatementList) StatementList(Statement *stmt): statement (stmt), next (this) @@ -1215,7 +1215,7 @@ class QML_PARSER_EXPORT StatementList: public Node class QML_PARSER_EXPORT VariableStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(VariableStatement) + QQMLJS_DECLARE_AST_NODE(VariableStatement) VariableStatement(VariableDeclarationList *vlist): declarations (vlist) @@ -1238,7 +1238,7 @@ class QML_PARSER_EXPORT VariableStatement: public Statement class QML_PARSER_EXPORT VariableDeclaration: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(VariableDeclaration) + QQMLJS_DECLARE_AST_NODE(VariableDeclaration) VariableDeclaration(const QStringRef &n, ExpressionNode *e): name (n), expression (e), readOnly(false) @@ -1262,7 +1262,7 @@ class QML_PARSER_EXPORT VariableDeclaration: public Node class QML_PARSER_EXPORT VariableDeclarationList: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(VariableDeclarationList) + QQMLJS_DECLARE_AST_NODE(VariableDeclarationList) VariableDeclarationList(VariableDeclaration *decl): declaration (decl), next (this) @@ -1309,7 +1309,7 @@ class QML_PARSER_EXPORT VariableDeclarationList: public Node class QML_PARSER_EXPORT EmptyStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(EmptyStatement) + QQMLJS_DECLARE_AST_NODE(EmptyStatement) EmptyStatement() { kind = K; } @@ -1328,7 +1328,7 @@ class QML_PARSER_EXPORT EmptyStatement: public Statement class QML_PARSER_EXPORT ExpressionStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ExpressionStatement) + QQMLJS_DECLARE_AST_NODE(ExpressionStatement) ExpressionStatement(ExpressionNode *e): expression (e) { kind = K; } @@ -1349,7 +1349,7 @@ class QML_PARSER_EXPORT ExpressionStatement: public Statement class QML_PARSER_EXPORT IfStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(IfStatement) + QQMLJS_DECLARE_AST_NODE(IfStatement) IfStatement(ExpressionNode *e, Statement *t, Statement *f = 0): expression (e), ok (t), ko (f) @@ -1381,7 +1381,7 @@ class QML_PARSER_EXPORT IfStatement: public Statement class QML_PARSER_EXPORT DoWhileStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(DoWhileStatement) + QQMLJS_DECLARE_AST_NODE(DoWhileStatement) DoWhileStatement(Statement *stmt, ExpressionNode *e): statement (stmt), expression (e) @@ -1408,7 +1408,7 @@ class QML_PARSER_EXPORT DoWhileStatement: public Statement class QML_PARSER_EXPORT WhileStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(WhileStatement) + QQMLJS_DECLARE_AST_NODE(WhileStatement) WhileStatement(ExpressionNode *e, Statement *stmt): expression (e), statement (stmt) @@ -1433,7 +1433,7 @@ class QML_PARSER_EXPORT WhileStatement: public Statement class QML_PARSER_EXPORT ForStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ForStatement) + QQMLJS_DECLARE_AST_NODE(ForStatement) ForStatement(ExpressionNode *i, ExpressionNode *c, ExpressionNode *e, Statement *stmt): initialiser (i), condition (c), expression (e), statement (stmt) @@ -1462,7 +1462,7 @@ class QML_PARSER_EXPORT ForStatement: public Statement class QML_PARSER_EXPORT LocalForStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(LocalForStatement) + QQMLJS_DECLARE_AST_NODE(LocalForStatement) LocalForStatement(VariableDeclarationList *vlist, ExpressionNode *c, ExpressionNode *e, Statement *stmt): declarations (vlist), condition (c), expression (e), statement (stmt) @@ -1492,7 +1492,7 @@ class QML_PARSER_EXPORT LocalForStatement: public Statement class QML_PARSER_EXPORT ForEachStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ForEachStatement) + QQMLJS_DECLARE_AST_NODE(ForEachStatement) ForEachStatement(ExpressionNode *i, ExpressionNode *e, Statement *stmt): initialiser (i), expression (e), statement (stmt) @@ -1519,7 +1519,7 @@ class QML_PARSER_EXPORT ForEachStatement: public Statement class QML_PARSER_EXPORT LocalForEachStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(LocalForEachStatement) + QQMLJS_DECLARE_AST_NODE(LocalForEachStatement) LocalForEachStatement(VariableDeclaration *v, ExpressionNode *e, Statement *stmt): declaration (v), expression (e), statement (stmt) @@ -1547,7 +1547,7 @@ class QML_PARSER_EXPORT LocalForEachStatement: public Statement class QML_PARSER_EXPORT ContinueStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ContinueStatement) + QQMLJS_DECLARE_AST_NODE(ContinueStatement) ContinueStatement(const QStringRef &l = QStringRef()): label (l) { kind = K; } @@ -1570,7 +1570,7 @@ class QML_PARSER_EXPORT ContinueStatement: public Statement class QML_PARSER_EXPORT BreakStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(BreakStatement) + QQMLJS_DECLARE_AST_NODE(BreakStatement) BreakStatement(const QStringRef &l): label (l) { kind = K; } @@ -1593,7 +1593,7 @@ class QML_PARSER_EXPORT BreakStatement: public Statement class QML_PARSER_EXPORT ReturnStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ReturnStatement) + QQMLJS_DECLARE_AST_NODE(ReturnStatement) ReturnStatement(ExpressionNode *e): expression (e) { kind = K; } @@ -1615,7 +1615,7 @@ class QML_PARSER_EXPORT ReturnStatement: public Statement class QML_PARSER_EXPORT WithStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(WithStatement) + QQMLJS_DECLARE_AST_NODE(WithStatement) WithStatement(ExpressionNode *e, Statement *stmt): expression (e), statement (stmt) @@ -1640,7 +1640,7 @@ class QML_PARSER_EXPORT WithStatement: public Statement class QML_PARSER_EXPORT CaseBlock: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(CaseBlock) + QQMLJS_DECLARE_AST_NODE(CaseBlock) CaseBlock(CaseClauses *c, DefaultClause *d = 0, CaseClauses *r = 0): clauses (c), defaultClause (d), moreClauses (r) @@ -1665,7 +1665,7 @@ class QML_PARSER_EXPORT CaseBlock: public Node class QML_PARSER_EXPORT SwitchStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(SwitchStatement) + QQMLJS_DECLARE_AST_NODE(SwitchStatement) SwitchStatement(ExpressionNode *e, CaseBlock *b): expression (e), block (b) @@ -1690,7 +1690,7 @@ class QML_PARSER_EXPORT SwitchStatement: public Statement class QML_PARSER_EXPORT CaseClause: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(CaseClause) + QQMLJS_DECLARE_AST_NODE(CaseClause) CaseClause(ExpressionNode *e, StatementList *slist): expression (e), statements (slist) @@ -1714,7 +1714,7 @@ class QML_PARSER_EXPORT CaseClause: public Node class QML_PARSER_EXPORT CaseClauses: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(CaseClauses) + QQMLJS_DECLARE_AST_NODE(CaseClauses) CaseClauses(CaseClause *c): clause (c), next (this) @@ -1751,7 +1751,7 @@ class QML_PARSER_EXPORT CaseClauses: public Node class QML_PARSER_EXPORT DefaultClause: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(DefaultClause) + QQMLJS_DECLARE_AST_NODE(DefaultClause) DefaultClause(StatementList *slist): statements (slist) @@ -1774,7 +1774,7 @@ class QML_PARSER_EXPORT DefaultClause: public Node class QML_PARSER_EXPORT LabelledStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(LabelledStatement) + QQMLJS_DECLARE_AST_NODE(LabelledStatement) LabelledStatement(const QStringRef &l, Statement *stmt): label (l), statement (stmt) @@ -1798,7 +1798,7 @@ class QML_PARSER_EXPORT LabelledStatement: public Statement class QML_PARSER_EXPORT ThrowStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(ThrowStatement) + QQMLJS_DECLARE_AST_NODE(ThrowStatement) ThrowStatement(ExpressionNode *e): expression (e) { kind = K; } @@ -1820,7 +1820,7 @@ class QML_PARSER_EXPORT ThrowStatement: public Statement class QML_PARSER_EXPORT Catch: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(Catch) + QQMLJS_DECLARE_AST_NODE(Catch) Catch(const QStringRef &n, Block *stmt): name (n), statement (stmt) @@ -1846,7 +1846,7 @@ class QML_PARSER_EXPORT Catch: public Node class QML_PARSER_EXPORT Finally: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(Finally) + QQMLJS_DECLARE_AST_NODE(Finally) Finally(Block *stmt): statement (stmt) @@ -1868,7 +1868,7 @@ class QML_PARSER_EXPORT Finally: public Node class QML_PARSER_EXPORT TryStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(TryStatement) + QQMLJS_DECLARE_AST_NODE(TryStatement) TryStatement(Statement *stmt, Catch *c, Finally *f): statement (stmt), catchExpression (c), finallyExpression (f) @@ -1907,7 +1907,7 @@ class QML_PARSER_EXPORT TryStatement: public Statement class QML_PARSER_EXPORT FunctionExpression: public ExpressionNode { public: - QDECLARATIVEJS_DECLARE_AST_NODE(FunctionExpression) + QQMLJS_DECLARE_AST_NODE(FunctionExpression) FunctionExpression(const QStringRef &n, FormalParameterList *f, FunctionBody *b): name (n), formals (f), body (b) @@ -1936,7 +1936,7 @@ class QML_PARSER_EXPORT FunctionExpression: public ExpressionNode class QML_PARSER_EXPORT FunctionDeclaration: public FunctionExpression { public: - QDECLARATIVEJS_DECLARE_AST_NODE(FunctionDeclaration) + QQMLJS_DECLARE_AST_NODE(FunctionDeclaration) FunctionDeclaration(const QStringRef &n, FormalParameterList *f, FunctionBody *b): FunctionExpression(n, f, b) @@ -1948,7 +1948,7 @@ class QML_PARSER_EXPORT FunctionDeclaration: public FunctionExpression class QML_PARSER_EXPORT FormalParameterList: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(FormalParameterList) + QQMLJS_DECLARE_AST_NODE(FormalParameterList) FormalParameterList(const QStringRef &n): name (n), next (this) @@ -1987,7 +1987,7 @@ class QML_PARSER_EXPORT FormalParameterList: public Node class QML_PARSER_EXPORT SourceElement: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(SourceElement) + QQMLJS_DECLARE_AST_NODE(SourceElement) inline SourceElement() { kind = K; } @@ -1996,7 +1996,7 @@ class QML_PARSER_EXPORT SourceElement: public Node class QML_PARSER_EXPORT SourceElements: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(SourceElements) + QQMLJS_DECLARE_AST_NODE(SourceElements) SourceElements(SourceElement *elt): element (elt), next (this) @@ -2033,7 +2033,7 @@ class QML_PARSER_EXPORT SourceElements: public Node class QML_PARSER_EXPORT FunctionBody: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(FunctionBody) + QQMLJS_DECLARE_AST_NODE(FunctionBody) FunctionBody(SourceElements *elts): elements (elts) @@ -2054,7 +2054,7 @@ class QML_PARSER_EXPORT FunctionBody: public Node class QML_PARSER_EXPORT Program: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(Program) + QQMLJS_DECLARE_AST_NODE(Program) Program(SourceElements *elts): elements (elts) @@ -2075,7 +2075,7 @@ class QML_PARSER_EXPORT Program: public Node class QML_PARSER_EXPORT FunctionSourceElement: public SourceElement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(FunctionSourceElement) + QQMLJS_DECLARE_AST_NODE(FunctionSourceElement) FunctionSourceElement(FunctionDeclaration *f): declaration (f) @@ -2096,7 +2096,7 @@ class QML_PARSER_EXPORT FunctionSourceElement: public SourceElement class QML_PARSER_EXPORT StatementSourceElement: public SourceElement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(StatementSourceElement) + QQMLJS_DECLARE_AST_NODE(StatementSourceElement) StatementSourceElement(Statement *stmt): statement (stmt) @@ -2117,7 +2117,7 @@ class QML_PARSER_EXPORT StatementSourceElement: public SourceElement class QML_PARSER_EXPORT DebuggerStatement: public Statement { public: - QDECLARATIVEJS_DECLARE_AST_NODE(DebuggerStatement) + QQMLJS_DECLARE_AST_NODE(DebuggerStatement) DebuggerStatement() { kind = K; } @@ -2138,7 +2138,7 @@ class QML_PARSER_EXPORT DebuggerStatement: public Statement class QML_PARSER_EXPORT UiQualifiedId: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiQualifiedId) + QQMLJS_DECLARE_AST_NODE(UiQualifiedId) UiQualifiedId(const QStringRef &name) : next(this), name(name) @@ -2176,7 +2176,7 @@ class QML_PARSER_EXPORT UiQualifiedId: public Node class QML_PARSER_EXPORT UiImport: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiImport) + QQMLJS_DECLARE_AST_NODE(UiImport) UiImport(const QStringRef &fileName) : fileName(fileName), importUri(0) @@ -2209,7 +2209,7 @@ class QML_PARSER_EXPORT UiImport: public Node class QML_PARSER_EXPORT UiImportList: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiImportList) + QQMLJS_DECLARE_AST_NODE(UiImportList) UiImportList(UiImport *import) : import(import), @@ -2256,7 +2256,7 @@ class QML_PARSER_EXPORT UiObjectMember: public Node class QML_PARSER_EXPORT UiObjectMemberList: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectMemberList) + QQMLJS_DECLARE_AST_NODE(UiObjectMemberList) UiObjectMemberList(UiObjectMember *member) : next(this), member(member) @@ -2293,7 +2293,7 @@ class QML_PARSER_EXPORT UiObjectMemberList: public Node class QML_PARSER_EXPORT UiProgram: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiProgram) + QQMLJS_DECLARE_AST_NODE(UiProgram) UiProgram(UiImportList *imports, UiObjectMemberList *members) : imports(imports), members(members) @@ -2327,7 +2327,7 @@ class QML_PARSER_EXPORT UiProgram: public Node class QML_PARSER_EXPORT UiArrayMemberList: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiArrayMemberList) + QQMLJS_DECLARE_AST_NODE(UiArrayMemberList) UiArrayMemberList(UiObjectMember *member) : next(this), member(member) @@ -2365,7 +2365,7 @@ class QML_PARSER_EXPORT UiArrayMemberList: public Node class QML_PARSER_EXPORT UiObjectInitializer: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectInitializer) + QQMLJS_DECLARE_AST_NODE(UiObjectInitializer) UiObjectInitializer(UiObjectMemberList *members) : members(members) @@ -2388,7 +2388,7 @@ class QML_PARSER_EXPORT UiObjectInitializer: public Node class QML_PARSER_EXPORT UiParameterList: public Node { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiParameterList) + QQMLJS_DECLARE_AST_NODE(UiParameterList) UiParameterList(const QStringRef &t, const QStringRef &n): type (t), name (n), next (this) @@ -2429,7 +2429,7 @@ class QML_PARSER_EXPORT UiParameterList: public Node class QML_PARSER_EXPORT UiPublicMember: public UiObjectMember { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiPublicMember) + QQMLJS_DECLARE_AST_NODE(UiPublicMember) UiPublicMember(const QStringRef &memberType, const QStringRef &name) @@ -2487,7 +2487,7 @@ class QML_PARSER_EXPORT UiPublicMember: public UiObjectMember class QML_PARSER_EXPORT UiObjectDefinition: public UiObjectMember { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectDefinition) + QQMLJS_DECLARE_AST_NODE(UiObjectDefinition) UiObjectDefinition(UiQualifiedId *qualifiedTypeNameId, UiObjectInitializer *initializer) @@ -2510,7 +2510,7 @@ class QML_PARSER_EXPORT UiObjectDefinition: public UiObjectMember class QML_PARSER_EXPORT UiSourceElement: public UiObjectMember { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiSourceElement) + QQMLJS_DECLARE_AST_NODE(UiSourceElement) UiSourceElement(Node *sourceElement) : sourceElement(sourceElement) @@ -2546,7 +2546,7 @@ class QML_PARSER_EXPORT UiSourceElement: public UiObjectMember class QML_PARSER_EXPORT UiObjectBinding: public UiObjectMember { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectBinding) + QQMLJS_DECLARE_AST_NODE(UiObjectBinding) UiObjectBinding(UiQualifiedId *qualifiedId, UiQualifiedId *qualifiedTypeNameId, @@ -2582,7 +2582,7 @@ class QML_PARSER_EXPORT UiObjectBinding: public UiObjectMember class QML_PARSER_EXPORT UiScriptBinding: public UiObjectMember { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiScriptBinding) + QQMLJS_DECLARE_AST_NODE(UiScriptBinding) UiScriptBinding(UiQualifiedId *qualifiedId, Statement *statement) @@ -2607,7 +2607,7 @@ class QML_PARSER_EXPORT UiScriptBinding: public UiObjectMember class QML_PARSER_EXPORT UiArrayBinding: public UiObjectMember { public: - QDECLARATIVEJS_DECLARE_AST_NODE(UiArrayBinding) + QQMLJS_DECLARE_AST_NODE(UiArrayBinding) UiArrayBinding(UiQualifiedId *qualifiedId, UiArrayMemberList *members) diff --git a/src/declarative/qml/parser/qdeclarativejsastfwd_p.h b/src/qml/qml/parser/qqmljsastfwd_p.h similarity index 95% rename from src/declarative/qml/parser/qdeclarativejsastfwd_p.h rename to src/qml/qml/parser/qqmljsastfwd_p.h index 9c7d0a51e6..dec1cbc599 100644 --- a/src/declarative/qml/parser/qdeclarativejsastfwd_p.h +++ b/src/qml/qml/parser/qqmljsastfwd_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEJSAST_FWD_P_H -#define QDECLARATIVEJSAST_FWD_P_H +#ifndef QQMLJSAST_FWD_P_H +#define QQMLJSAST_FWD_P_H -#include "qdeclarativejsglobal_p.h" +#include "qqmljsglobal_p.h" #include @@ -59,7 +59,7 @@ QT_QML_BEGIN_NAMESPACE -namespace QDeclarativeJS { namespace AST { +namespace QQmlJS { namespace AST { class SourceLocation { diff --git a/src/declarative/qml/parser/qdeclarativejsastvisitor.cpp b/src/qml/qml/parser/qqmljsastvisitor.cpp similarity index 90% rename from src/declarative/qml/parser/qdeclarativejsastvisitor.cpp rename to src/qml/qml/parser/qqmljsastvisitor.cpp index 671abd76db..2d854dc735 100644 --- a/src/declarative/qml/parser/qdeclarativejsastvisitor.cpp +++ b/src/qml/qml/parser/qqmljsastvisitor.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#include "qdeclarativejsastvisitor_p.h" +#include "qqmljsastvisitor_p.h" QT_QML_BEGIN_NAMESPACE -namespace QDeclarativeJS { namespace AST { +namespace QQmlJS { namespace AST { Visitor::Visitor() { @@ -53,6 +53,6 @@ Visitor::~Visitor() { } -} } // namespace QDeclarativeJS::AST +} } // namespace QQmlJS::AST QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qdeclarativejsastvisitor_p.h b/src/qml/qml/parser/qqmljsastvisitor_p.h similarity index 97% rename from src/declarative/qml/parser/qdeclarativejsastvisitor_p.h rename to src/qml/qml/parser/qqmljsastvisitor_p.h index 639cb33d49..991580309d 100644 --- a/src/declarative/qml/parser/qdeclarativejsastvisitor_p.h +++ b/src/qml/qml/parser/qqmljsastvisitor_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEJSASTVISITOR_P_H -#define QDECLARATIVEJSASTVISITOR_P_H +#ifndef QQMLJSASTVISITOR_P_H +#define QQMLJSASTVISITOR_P_H // // W A R N I N G @@ -53,12 +53,12 @@ // We mean it. // -#include "qdeclarativejsastfwd_p.h" -#include "qdeclarativejsglobal_p.h" +#include "qqmljsastfwd_p.h" +#include "qqmljsglobal_p.h" QT_QML_BEGIN_NAMESPACE -namespace QDeclarativeJS { namespace AST { +namespace QQmlJS { namespace AST { class QML_PARSER_EXPORT Visitor { @@ -98,7 +98,7 @@ class QML_PARSER_EXPORT Visitor virtual void endVisit(UiArrayMemberList *) {} virtual void endVisit(UiQualifiedId *) {} - // QDeclarativeJS + // QQmlJS virtual bool visit(ThisExpression *) { return true; } virtual void endVisit(ThisExpression *) {} @@ -326,4 +326,4 @@ class QML_PARSER_EXPORT Visitor QT_QML_END_NAMESPACE -#endif // QDECLARATIVEJSASTVISITOR_P_H +#endif // QQMLJSASTVISITOR_P_H diff --git a/src/declarative/qml/parser/qdeclarativejsengine_p.cpp b/src/qml/qml/parser/qqmljsengine_p.cpp similarity index 91% rename from src/declarative/qml/parser/qdeclarativejsengine_p.cpp rename to src/qml/qml/parser/qqmljsengine_p.cpp index 534849cd53..459ba8d7dc 100644 --- a/src/declarative/qml/parser/qdeclarativejsengine_p.cpp +++ b/src/qml/qml/parser/qqmljsengine_p.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#include "qdeclarativejsengine_p.h" -#include "qdeclarativejsglobal_p.h" +#include "qqmljsengine_p.h" +#include "qqmljsglobal_p.h" #include #include @@ -48,7 +48,7 @@ QT_QML_BEGIN_NAMESPACE -namespace QDeclarativeJS { +namespace QQmlJS { static int toDigit(char c) { @@ -132,9 +132,9 @@ void Engine::setCode(const QString &code) { _code = code; } void Engine::addComment(int pos, int len, int line, int col) -{ if (len > 0) _comments.append(QDeclarativeJS::AST::SourceLocation(pos, len, line, col)); } +{ if (len > 0) _comments.append(QQmlJS::AST::SourceLocation(pos, len, line, col)); } -QList Engine::comments() const +QList Engine::comments() const { return _comments; } Lexer *Engine::lexer() const @@ -156,6 +156,6 @@ QStringRef Engine::newStringRef(const QString &text) QStringRef Engine::newStringRef(const QChar *chars, int size) { return newStringRef(QString(chars, size)); } -} // end of namespace QDeclarativeJS +} // end of namespace QQmlJS QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qdeclarativejsengine_p.h b/src/qml/qml/parser/qqmljsengine_p.h similarity index 90% rename from src/declarative/qml/parser/qdeclarativejsengine_p.h rename to src/qml/qml/parser/qqmljsengine_p.h index db8a462d3f..3cb78de4eb 100644 --- a/src/declarative/qml/parser/qdeclarativejsengine_p.h +++ b/src/qml/qml/parser/qqmljsengine_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEJSENGINE_P_H -#define QDECLARATIVEJSENGINE_P_H +#ifndef QQMLJSENGINE_P_H +#define QQMLJSENGINE_P_H // // W A R N I N G @@ -53,16 +53,16 @@ // We mean it. // -#include "qdeclarativejsglobal_p.h" -#include "qdeclarativejsastfwd_p.h" -#include "qdeclarativejsmemorypool_p.h" +#include "qqmljsglobal_p.h" +#include "qqmljsastfwd_p.h" +#include "qqmljsmemorypool_p.h" #include #include QT_QML_BEGIN_NAMESPACE -namespace QDeclarativeJS { +namespace QQmlJS { class Lexer; class MemoryPool; @@ -119,8 +119,8 @@ class QML_PARSER_EXPORT Engine double integerFromString(const char *buf, int size, int radix); -} // end of namespace QDeclarativeJS +} // end of namespace QQmlJS QT_QML_END_NAMESPACE -#endif // QDECLARATIVEJSENGINE_P_H +#endif // QQMLJSENGINE_P_H diff --git a/src/declarative/qml/parser/qdeclarativejsglobal_p.h b/src/qml/qml/parser/qqmljsglobal_p.h similarity index 91% rename from src/declarative/qml/parser/qdeclarativejsglobal_p.h rename to src/qml/qml/parser/qqmljsglobal_p.h index 993f4ae3dc..81c90310ad 100644 --- a/src/declarative/qml/parser/qdeclarativejsglobal_p.h +++ b/src/qml/qml/parser/qqmljsglobal_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -38,8 +38,8 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#ifndef QDECLARATIVEJSGLOBAL_P_H -#define QDECLARATIVEJSGLOBAL_P_H +#ifndef QQMLJSGLOBAL_P_H +#define QQMLJSGLOBAL_P_H #include @@ -53,7 +53,7 @@ # define QML_PARSER_EXPORT # else # define QML_PARSER_EXPORT Q_DECL_IMPORT -# endif // QDECLARATIVEJS_BUILD_DIR +# endif // QQMLJS_BUILD_DIR #else // !QT_CREATOR # define QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE @@ -66,4 +66,4 @@ # endif #endif // QT_CREATOR -#endif // QDECLARATIVEJSGLOBAL_P_H +#endif // QQMLJSGLOBAL_P_H diff --git a/src/declarative/qml/parser/qdeclarativejsgrammar.cpp b/src/qml/qml/parser/qqmljsgrammar.cpp similarity index 98% rename from src/declarative/qml/parser/qdeclarativejsgrammar.cpp rename to src/qml/qml/parser/qqmljsgrammar.cpp index 1e509e5651..f69f809ee3 100644 --- a/src/declarative/qml/parser/qdeclarativejsgrammar.cpp +++ b/src/qml/qml/parser/qqmljsgrammar.cpp @@ -40,11 +40,11 @@ ****************************************************************************/ // This file was generated by qlalr - DO NOT EDIT! -#include "qdeclarativejsgrammar_p.h" +#include "qqmljsgrammar_p.h" QT_BEGIN_NAMESPACE -const char *const QDeclarativeJSGrammar::spell [] = { +const char *const QQmlJSGrammar::spell [] = { "end of file", "&", "&&", "&=", "break", "case", "catch", ":", ",", "continue", "default", "delete", "/", "/=", "do", ".", "else", "=", "==", "===", "finally", "for", "function", ">=", ">", ">>", ">>=", ">>>", ">>>=", "identifier", @@ -57,7 +57,7 @@ const char *const QDeclarativeJSGrammar::spell [] = { "import", "as", "on", 0, 0, 0, 0, 0, 0, 0, 0, 0}; -const short QDeclarativeJSGrammar::lhs [] = { +const short QQmlJSGrammar::lhs [] = { 102, 102, 102, 102, 102, 102, 103, 109, 109, 112, 112, 114, 113, 113, 113, 113, 113, 113, 113, 113, 116, 111, 110, 119, 119, 120, 120, 121, 121, 118, @@ -94,7 +94,7 @@ const short QDeclarativeJSGrammar::lhs [] = { 145, 205, 205, 202, 202, 203, 203, 206, 108, 108, 207, 207, 106, 106, 204, 204, 139, 139, 208}; -const short QDeclarativeJSGrammar::rhs [] = { +const short QQmlJSGrammar::rhs [] = { 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 3, 3, 5, 5, 4, 4, 2, 0, 1, 1, 2, 1, 3, 2, 3, 2, @@ -131,7 +131,7 @@ const short QDeclarativeJSGrammar::rhs [] = { 8, 1, 3, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 0, 1, 0, 1, 2}; -const short QDeclarativeJSGrammar::action_default [] = { +const short QQmlJSGrammar::action_default [] = { 0, 0, 22, 0, 0, 0, 22, 0, 175, 242, 206, 214, 210, 154, 226, 202, 3, 139, 73, 155, 218, 222, 143, 172, 153, 158, 138, 192, 179, 0, @@ -198,7 +198,7 @@ const short QDeclarativeJSGrammar::action_default [] = { 0, 14, 0, 19, 20, 0, 15, 16, 0, 17, 18, 11, 23, 7, 349}; -const short QDeclarativeJSGrammar::goto_default [] = { +const short QQmlJSGrammar::goto_default [] = { 7, 625, 207, 196, 205, 508, 496, 624, 643, 495, 623, 621, 626, 22, 622, 18, 507, 549, 539, 546, 541, 526, 191, 195, 197, 201, 233, 208, 230, 530, @@ -211,7 +211,7 @@ const short QDeclarativeJSGrammar::goto_default [] = { 324, 464, 323, 419, 423, 426, 422, 421, 441, 442, 185, 199, 181, 184, 198, 206, 0}; -const short QDeclarativeJSGrammar::action_index [] = { +const short QQmlJSGrammar::action_index [] = { 404, 1275, 2411, 2411, 2509, 1000, 68, 92, 90, -102, 88, 62, 60, 256, -102, 298, 86, -102, -102, 638, 83, 134, 172, 219, -102, -102, -102, 454, 194, 1275, @@ -344,7 +344,7 @@ const short QDeclarativeJSGrammar::action_index [] = { -107, -107, -107, -107, -107, -4, -107, -107, -107, -107, -107, -107, -107, -107, -107}; -const short QDeclarativeJSGrammar::action_info [] = { +const short QQmlJSGrammar::action_info [] = { 416, 257, 533, -132, 403, -113, 346, -102, 575, 348, 572, -121, 531, -103, -121, 545, 345, 430, 342, 348, 340, 343, 440, 401, 391, 545, 563, 389, 538, 446, @@ -677,7 +677,7 @@ const short QDeclarativeJSGrammar::action_info [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -const short QDeclarativeJSGrammar::action_check [] = { +const short QQmlJSGrammar::action_check [] = { 36, 36, 24, 7, 55, 7, 7, 7, 60, 36, 8, 7, 37, 7, 7, 33, 55, 55, 60, 36, 36, 33, 33, 55, 8, 33, 7, 7, 34, 36, diff --git a/src/declarative/qml/parser/qdeclarativejsgrammar_p.h b/src/qml/qml/parser/qqmljsgrammar_p.h similarity index 97% rename from src/declarative/qml/parser/qdeclarativejsgrammar_p.h rename to src/qml/qml/parser/qqmljsgrammar_p.h index 5503ff763f..455391a862 100644 --- a/src/declarative/qml/parser/qdeclarativejsgrammar_p.h +++ b/src/qml/qml/parser/qqmljsgrammar_p.h @@ -51,14 +51,14 @@ // // This file was generated by qlalr - DO NOT EDIT! -#ifndef QDECLARATIVEJSGRAMMAR_P_H -#define QDECLARATIVEJSGRAMMAR_P_H +#ifndef QQMLJSGRAMMAR_P_H +#define QQMLJSGRAMMAR_P_H #include QT_BEGIN_NAMESPACE -class QDeclarativeJSGrammar +class QQmlJSGrammar { public: enum VariousConstants { @@ -207,5 +207,5 @@ class QDeclarativeJSGrammar QT_END_NAMESPACE -#endif // QDECLARATIVEJSGRAMMAR_P_H +#endif // QQMLJSGRAMMAR_P_H diff --git a/src/declarative/qml/parser/qdeclarativejskeywords_p.h b/src/qml/qml/parser/qqmljskeywords_p.h similarity index 99% rename from src/declarative/qml/parser/qdeclarativejskeywords_p.h rename to src/qml/qml/parser/qqmljskeywords_p.h index fac5b7b5f6..bbcc4855a3 100644 --- a/src/declarative/qml/parser/qdeclarativejskeywords_p.h +++ b/src/qml/qml/parser/qqmljskeywords_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEJSKEYWORDS_P_H -#define QDECLARATIVEJSKEYWORDS_P_H +#ifndef QQMLJSKEYWORDS_P_H +#define QQMLJSKEYWORDS_P_H // // W A R N I N G @@ -857,4 +857,4 @@ int Lexer::classify(const QChar *s, int n, bool qmlMode) { } // switch } -#endif // QDECLARATIVEJSKEYWORDS_P_H +#endif // QQMLJSKEYWORDS_P_H diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/qml/qml/parser/qqmljslexer.cpp similarity index 96% rename from src/declarative/qml/parser/qdeclarativejslexer.cpp rename to src/qml/qml/parser/qqmljslexer.cpp index e292490499..c34fc81163 100644 --- a/src/declarative/qml/parser/qdeclarativejslexer.cpp +++ b/src/qml/qml/parser/qqmljslexer.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include "qdeclarativejslexer_p.h" -#include "qdeclarativejsengine_p.h" -#include "qdeclarativejsmemorypool_p.h" +#include "qqmljslexer_p.h" +#include "qqmljsengine_p.h" +#include "qqmljsmemorypool_p.h" #include #include @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok); QT_END_NAMESPACE -using namespace QDeclarativeJS; +using namespace QQmlJS; static int regExpFlagFromChar(const QChar &ch) { @@ -464,7 +464,7 @@ int Lexer::scanToken() if (end - begin != chars.size() - 1) { _errorCode = IllegalExponentIndicator; - _errorMessage = QCoreApplication::translate("QDeclarativeParser", "Illegal syntax for exponential number"); + _errorMessage = QCoreApplication::translate("QQmlParser", "Illegal syntax for exponential number"); return T_ERROR; } @@ -668,7 +668,7 @@ int Lexer::scanToken() } _errorCode = UnclosedStringLiteral; - _errorMessage = QCoreApplication::translate("QDeclarativeParser", "Unclosed string at end of line"); + _errorMessage = QCoreApplication::translate("QQmlParser", "Unclosed string at end of line"); return T_ERROR; } @@ -683,7 +683,7 @@ int Lexer::scanToken() _validTokenText = true; if (! ok) { _errorCode = IllegalUnicodeEscapeSequence; - _errorMessage = QCoreApplication::translate("QDeclarativeParser", "Illegal unicode escape sequence"); + _errorMessage = QCoreApplication::translate("QQmlParser", "Illegal unicode escape sequence"); return T_ERROR; } } @@ -706,7 +706,7 @@ int Lexer::scanToken() _tokenText += decodeUnicodeEscapeCharacter(&ok); if (! ok) { _errorCode = IllegalUnicodeEscapeSequence; - _errorMessage = QCoreApplication::translate("QDeclarativeParser", "Illegal unicode escape sequence"); + _errorMessage = QCoreApplication::translate("QQmlParser", "Illegal unicode escape sequence"); return T_ERROR; } } else { @@ -828,7 +828,7 @@ int Lexer::scanToken() if (end - begin != chars.size() - 1) { _errorCode = IllegalExponentIndicator; - _errorMessage = QCoreApplication::translate("QDeclarativeParser", "Illegal syntax for exponential number"); + _errorMessage = QCoreApplication::translate("QQmlParser", "Illegal syntax for exponential number"); return T_ERROR; } @@ -854,7 +854,7 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix) switch (_char.unicode()) { case 0: // eof case '\n': case '\r': // line terminator - _errorMessage = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression literal"); + _errorMessage = QCoreApplication::translate("QQmlParser", "Unterminated regular expression literal"); return false; case '/': @@ -865,7 +865,7 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix) while (isIdentLetter(_char)) { int flag = regExpFlagFromChar(_char); if (flag == 0) { - _errorMessage = QCoreApplication::translate("QDeclarativeParser", "Invalid regular expression flag '%0'") + _errorMessage = QCoreApplication::translate("QQmlParser", "Invalid regular expression flag '%0'") .arg(QChar(_char)); return false; } @@ -882,7 +882,7 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix) scanChar(); if (_char.isNull() || isLineTerminator()) { - _errorMessage = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression backslash sequence"); + _errorMessage = QCoreApplication::translate("QQmlParser", "Unterminated regular expression backslash sequence"); return false; } @@ -904,7 +904,7 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix) scanChar(); if (_char.isNull() || isLineTerminator()) { - _errorMessage = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression backslash sequence"); + _errorMessage = QCoreApplication::translate("QQmlParser", "Unterminated regular expression backslash sequence"); return false; } @@ -917,7 +917,7 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix) } if (_char != QLatin1Char(']')) { - _errorMessage = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression class"); + _errorMessage = QCoreApplication::translate("QQmlParser", "Unterminated regular expression class"); return false; } @@ -1163,4 +1163,4 @@ bool Lexer::scanDirectives(Directives *directives) return true; } -#include "qdeclarativejskeywords_p.h" +#include "qqmljskeywords_p.h" diff --git a/src/declarative/qml/parser/qdeclarativejslexer_p.h b/src/qml/qml/parser/qqmljslexer_p.h similarity index 94% rename from src/declarative/qml/parser/qdeclarativejslexer_p.h rename to src/qml/qml/parser/qqmljslexer_p.h index 806603e022..6b51852f5f 100644 --- a/src/declarative/qml/parser/qdeclarativejslexer_p.h +++ b/src/qml/qml/parser/qqmljslexer_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEJSLEXER_P_H -#define QDECLARATIVEJSLEXER_P_H +#ifndef QQMLJSLEXER_P_H +#define QQMLJSLEXER_P_H // // W A R N I N G @@ -53,13 +53,13 @@ // We mean it. // -#include "qdeclarativejsglobal_p.h" -#include "qdeclarativejsgrammar_p.h" +#include "qqmljsglobal_p.h" +#include "qqmljsgrammar_p.h" #include QT_QML_BEGIN_NAMESPACE -namespace QDeclarativeJS { +namespace QQmlJS { class Engine; @@ -85,7 +85,7 @@ class QML_PARSER_EXPORT Directives { } }; -class QML_PARSER_EXPORT Lexer: public QDeclarativeJSGrammar +class QML_PARSER_EXPORT Lexer: public QQmlJSGrammar { public: enum { @@ -241,7 +241,7 @@ class QML_PARSER_EXPORT Lexer: public QDeclarativeJSGrammar bool _qmlMode; }; -} // end of namespace QDeclarativeJS +} // end of namespace QQmlJS QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h b/src/qml/qml/parser/qqmljsmemorypool_p.h similarity index 94% rename from src/declarative/qml/parser/qdeclarativejsmemorypool_p.h rename to src/qml/qml/parser/qqmljsmemorypool_p.h index 22baff2254..fd52fd25e4 100644 --- a/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h +++ b/src/qml/qml/parser/qqmljsmemorypool_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEJSMEMORYPOOL_P_H -#define QDECLARATIVEJSMEMORYPOOL_P_H +#ifndef QQMLJSMEMORYPOOL_P_H +#define QQMLJSMEMORYPOOL_P_H // // W A R N I N G @@ -53,7 +53,7 @@ // We mean it. // -#include "qdeclarativejsglobal_p.h" +#include "qqmljsglobal_p.h" #include #include @@ -63,7 +63,7 @@ QT_QML_BEGIN_NAMESPACE -namespace QDeclarativeJS { +namespace QQmlJS { class QML_PARSER_EXPORT MemoryPool : public QSharedData { @@ -166,7 +166,7 @@ class QML_PARSER_EXPORT Managed void operator delete(void *, MemoryPool *) {} }; -} // namespace QDeclarativeJS +} // namespace QQmlJS QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qdeclarativejsparser.cpp b/src/qml/qml/parser/qqmljsparser.cpp similarity index 98% rename from src/declarative/qml/parser/qdeclarativejsparser.cpp rename to src/qml/qml/parser/qqmljsparser.cpp index 384544afe4..bc89b2ac84 100644 --- a/src/declarative/qml/parser/qdeclarativejsparser.cpp +++ b/src/qml/qml/parser/qqmljsparser.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,14 +44,14 @@ #include -#include "qdeclarativejsengine_p.h" -#include "qdeclarativejslexer_p.h" -#include "qdeclarativejsast_p.h" -#include "qdeclarativejsmemorypool_p.h" +#include "qqmljsengine_p.h" +#include "qqmljslexer_p.h" +#include "qqmljsast_p.h" +#include "qqmljsmemorypool_p.h" -#include "qdeclarativejsparser_p.h" +#include "qqmljsparser_p.h" #include // @@ -59,7 +59,7 @@ // Changes will be lost. // -using namespace QDeclarativeJS; +using namespace QQmlJS; QT_QML_BEGIN_NAMESPACE @@ -1703,7 +1703,7 @@ case 346: { yylloc.startColumn += yylloc.length; yylloc.length = 0; - //const QString msg = qApp->translate("QDeclarativeParser", "Missing `;'"); + //const QString msg = qApp->translate("QQmlParser", "Missing `;'"); //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg)); first_token = &token_buffer[0]; @@ -1733,9 +1733,9 @@ case 346: { QString msg; int token = token_buffer[0].token; if (token < 0 || token >= TERMINAL_COUNT) - msg = qApp->translate("QDeclarativeParser", "Syntax error"); + msg = qApp->translate("QQmlParser", "Syntax error"); else - msg = qApp->translate("QDeclarativeParser", "Unexpected token `%1'").arg(QLatin1String(spell[token])); + msg = qApp->translate("QQmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); action = errorState; @@ -1763,7 +1763,7 @@ case 346: { for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) { int a = t_action(errorState, *tk); if (a > 0 && t_action(a, yytoken)) { - const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[*tk])); + const QString msg = qApp->translate("QQmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); yytoken = *tk; @@ -1787,7 +1787,7 @@ case 346: { int a = t_action(errorState, tk); if (a > 0 && t_action(a, yytoken)) { - const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[tk])); + const QString msg = qApp->translate("QQmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); yytoken = tk; @@ -1800,7 +1800,7 @@ case 346: { } } - const QString msg = qApp->translate("QDeclarativeParser", "Syntax error"); + const QString msg = qApp->translate("QQmlParser", "Syntax error"); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); } diff --git a/src/declarative/qml/parser/qdeclarativejsparser_p.h b/src/qml/qml/parser/qqmljsparser_p.h similarity index 93% rename from src/declarative/qml/parser/qdeclarativejsparser_p.h rename to src/qml/qml/parser/qqmljsparser_p.h index 1e6da5944b..ad532c32c7 100644 --- a/src/declarative/qml/parser/qdeclarativejsparser_p.h +++ b/src/qml/qml/parser/qqmljsparser_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -56,24 +56,24 @@ // Changes will be lost. // -#ifndef QDECLARATIVEJSPARSER_P_H -#define QDECLARATIVEJSPARSER_P_H +#ifndef QQMLJSPARSER_P_H +#define QQMLJSPARSER_P_H -#include "qdeclarativejsglobal_p.h" -#include "qdeclarativejsgrammar_p.h" -#include "qdeclarativejsast_p.h" -#include "qdeclarativejsengine_p.h" +#include "qqmljsglobal_p.h" +#include "qqmljsgrammar_p.h" +#include "qqmljsast_p.h" +#include "qqmljsengine_p.h" #include #include QT_QML_BEGIN_NAMESPACE -namespace QDeclarativeJS { +namespace QQmlJS { class Engine; -class QML_PARSER_EXPORT Parser: protected QDeclarativeJSGrammar +class QML_PARSER_EXPORT Parser: protected QQmlJSGrammar { public: union Value { @@ -233,7 +233,7 @@ class QML_PARSER_EXPORT Parser: protected QDeclarativeJSGrammar QList diagnostic_messages; }; -} // end of namespace QDeclarativeJS +} // end of namespace QQmlJS @@ -245,4 +245,4 @@ QT_QML_END_NAMESPACE -#endif // QDECLARATIVEJSPARSER_P_H +#endif // QQMLJSPARSER_P_H diff --git a/src/declarative/qml/qlistmodelinterface.cpp b/src/qml/qml/qlistmodelinterface.cpp similarity index 96% rename from src/declarative/qml/qlistmodelinterface.cpp rename to src/qml/qml/qlistmodelinterface.cpp index 32d8ee60b7..3ea0d3f155 100644 --- a/src/declarative/qml/qlistmodelinterface.cpp +++ b/src/qml/qml/qlistmodelinterface.cpp @@ -46,11 +46,11 @@ QT_BEGIN_NAMESPACE /*! \internal \class QListModelInterface - \brief The QListModelInterface class can be subclassed to provide C++ models to QDeclarativeGraphics Views + \brief The QListModelInterface class can be subclassed to provide C++ models to QQuickGraphics Views This class is comprised primarily of pure virtual functions which you must implement in a subclass. You can then use the subclass - as a model for a QDeclarativeGraphics view, such as a QDeclarativeListView. + as a model for a QQuickGraphics view, such as a QQuickListView. */ /*! \fn QListModelInterface::QListModelInterface(QObject *parent) diff --git a/src/declarative/qml/qlistmodelinterface_p.h b/src/qml/qml/qlistmodelinterface_p.h similarity index 93% rename from src/declarative/qml/qlistmodelinterface_p.h rename to src/qml/qml/qlistmodelinterface_p.h index d653699dff..c644ce88e6 100644 --- a/src/declarative/qml/qlistmodelinterface_p.h +++ b/src/qml/qml/qlistmodelinterface_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,14 +45,14 @@ #include #include -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class Q_DECLARATIVE_PRIVATE_EXPORT QListModelInterface : public QObject +class Q_QML_PRIVATE_EXPORT QListModelInterface : public QObject { Q_OBJECT public: diff --git a/src/qml/qml/qml.pri b/src/qml/qml/qml.pri new file mode 100644 index 0000000000..0ce7c7ed5c --- /dev/null +++ b/src/qml/qml/qml.pri @@ -0,0 +1,125 @@ +SOURCES += \ + $$PWD/qquickapplication.cpp \ + $$PWD/qqmlinstruction.cpp \ + $$PWD/qquicklistmodel.cpp \ + $$PWD/qquicklistmodelworkeragent.cpp \ + $$PWD/qqmlopenmetaobject.cpp \ + $$PWD/qqmlvmemetaobject.cpp \ + $$PWD/qqmlengine.cpp \ + $$PWD/qqmlexpression.cpp \ + $$PWD/qqmlbinding.cpp \ + $$PWD/qqmlproperty.cpp \ + $$PWD/qqmlcomponent.cpp \ + $$PWD/qqmlincubator.cpp \ + $$PWD/qqmlcontext.cpp \ + $$PWD/qqmlcustomparser.cpp \ + $$PWD/qqmlpropertyvaluesource.cpp \ + $$PWD/qqmlpropertyvalueinterceptor.cpp \ + $$PWD/qqmlproxymetaobject.cpp \ + $$PWD/qqmlvme.cpp \ + $$PWD/qqmlcompiler.cpp \ + $$PWD/qqmlcompileddata.cpp \ + $$PWD/qqmlboundsignal.cpp \ + $$PWD/qqmlmetatype.cpp \ + $$PWD/qqmlstringconverters.cpp \ + $$PWD/qqmlparserstatus.cpp \ + $$PWD/qqmltypeloader.cpp \ + $$PWD/qqmlinfo.cpp \ + $$PWD/qqmlerror.cpp \ + $$PWD/qqmlscript.cpp \ + $$PWD/qqmlrewrite.cpp \ + $$PWD/qqmlvaluetype.cpp \ + $$PWD/qqmlaccessors.cpp \ + $$PWD/qqmlxmlhttprequest.cpp \ + $$PWD/qqmlwatcher.cpp \ + $$PWD/qqmlcleanup.cpp \ + $$PWD/qqmlpropertycache.cpp \ + $$PWD/qqmlnotifier.cpp \ + $$PWD/qqmlintegercache.cpp \ + $$PWD/qqmltypenotavailable.cpp \ + $$PWD/qqmltypenamecache.cpp \ + $$PWD/qqmlscriptstring.cpp \ + $$PWD/qquickworkerscript.cpp \ + $$PWD/qqmlimageprovider.cpp \ + $$PWD/qqmlnetworkaccessmanagerfactory.cpp \ + $$PWD/qqmldirparser.cpp \ + $$PWD/qqmlextensionplugin.cpp \ + $$PWD/qqmlimport.cpp \ + $$PWD/qqmllist.cpp \ + $$PWD/qqmllocale.cpp \ + $$PWD/qlistmodelinterface.cpp + +HEADERS += \ + $$PWD/qqmlglobal_p.h \ + $$PWD/qqmlinstruction_p.h \ + $$PWD/qquicklistmodel_p.h\ + $$PWD/qquicklistmodel_p_p.h\ + $$PWD/qquicklistmodelworkeragent_p.h \ + $$PWD/qqmlopenmetaobject_p.h \ + $$PWD/qqmlvmemetaobject_p.h \ + $$PWD/qqml.h \ + $$PWD/qquickapplication_p.h \ + $$PWD/qqmlbinding_p.h \ + $$PWD/qqmlbinding_p_p.h \ + $$PWD/qqmlproperty.h \ + $$PWD/qqmlcomponent.h \ + $$PWD/qqmlcomponent_p.h \ + $$PWD/qqmlincubator.h \ + $$PWD/qqmlincubator_p.h \ + $$PWD/qqmlcustomparser_p.h \ + $$PWD/qqmlcustomparser_p_p.h \ + $$PWD/qqmlpropertyvaluesource.h \ + $$PWD/qqmlpropertyvalueinterceptor_p.h \ + $$PWD/qqmlboundsignal_p.h \ + $$PWD/qqmlparserstatus.h \ + $$PWD/qqmlproxymetaobject_p.h \ + $$PWD/qqmlvme_p.h \ + $$PWD/qqmlcompiler_p.h \ + $$PWD/qqmlengine_p.h \ + $$PWD/qqmlexpression_p.h \ + $$PWD/qqmlprivate.h \ + $$PWD/qqmlmetatype_p.h \ + $$PWD/qqmlengine.h \ + $$PWD/qqmlcontext.h \ + $$PWD/qqmlexpression.h \ + $$PWD/qqmlstringconverters_p.h \ + $$PWD/qqmlinfo.h \ + $$PWD/qqmlproperty_p.h \ + $$PWD/qqmlcontext_p.h \ + $$PWD/qqmltypeloader_p.h \ + $$PWD/qqmllist.h \ + $$PWD/qqmllist_p.h \ + $$PWD/qqmldata_p.h \ + $$PWD/qqmlerror.h \ + $$PWD/qqmlscript_p.h \ + $$PWD/qqmlrewrite_p.h \ + $$PWD/qqmlvaluetype_p.h \ + $$PWD/qqmlaccessors_p.h \ + $$PWD/qqmlxmlhttprequest_p.h \ + $$PWD/qqmlwatcher_p.h \ + $$PWD/qqmlcleanup_p.h \ + $$PWD/qqmlpropertycache_p.h \ + $$PWD/qqmlnotifier_p.h \ + $$PWD/qqmlintegercache_p.h \ + $$PWD/qqmltypenotavailable_p.h \ + $$PWD/qqmltypenamecache_p.h \ + $$PWD/qqmlscriptstring.h \ + $$PWD/qquickworkerscript_p.h \ + $$PWD/qqmlguard_p.h \ + $$PWD/qqmlimageprovider.h \ + $$PWD/qqmlnetworkaccessmanagerfactory.h \ + $$PWD/qqmldirparser_p.h \ + $$PWD/qqmlextensioninterface.h \ + $$PWD/qqmlimport_p.h \ + $$PWD/qqmlextensionplugin.h \ + $$PWD/qqmlnullablevalue_p_p.h \ + $$PWD/qqmlscriptstring_p.h \ + $$PWD/qqmllocale_p.h \ + $$PWD/qlistmodelinterface_p.h \ + $$PWD/qqmlcomponentattached_p.h + +include(parser/parser.pri) +include(rewriter/rewriter.pri) +include(ftw/ftw.pri) +include(v4/v4.pri) +include(v8/v8.pri) diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h new file mode 100644 index 0000000000..32da2c616e --- /dev/null +++ b/src/qml/qml/qqml.h @@ -0,0 +1,451 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QQML_H +#define QQML_H + +#include +#include +#include +#include + +#include +#include + +QT_BEGIN_HEADER + +#define QML_VERSION 0x020000 +#define QML_VERSION_STR "2.0" + +#define QML_DECLARE_TYPE(TYPE) \ + Q_DECLARE_METATYPE(TYPE *) \ + Q_DECLARE_METATYPE(QQmlListProperty) + +#define QML_DECLARE_TYPE_HASMETATYPE(TYPE) \ + Q_DECLARE_METATYPE(QQmlListProperty) + +#define QML_DECLARE_INTERFACE(INTERFACE) \ + QML_DECLARE_TYPE(INTERFACE) + +#define QML_DECLARE_INTERFACE_HASMETATYPE(INTERFACE) \ + QML_DECLARE_TYPE_HASMETATYPE(INTERFACE) + +enum { /* TYPEINFO flags */ + QML_HAS_ATTACHED_PROPERTIES = 0x01 +}; + +#define QML_DECLARE_TYPEINFO(TYPE, FLAGS) \ +QT_BEGIN_NAMESPACE \ +template <> \ +class QQmlTypeInfo \ +{ \ +public: \ + enum { \ + hasAttachedProperties = (((FLAGS) & QML_HAS_ATTACHED_PROPERTIES) == QML_HAS_ATTACHED_PROPERTIES) \ + }; \ +}; \ +QT_END_NAMESPACE + +QT_BEGIN_NAMESPACE + + +class QQmlPropertyValueInterceptor; + +template +int qmlRegisterType() +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QQmlListProperty<" + name + ">"); + + QQmlPrivate::RegisterType type = { + 0, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + 0, 0, + QString(), + + 0, 0, 0, 0, &T::staticMetaObject, + + QQmlPrivate::attachedPropertiesFunc(), + QQmlPrivate::attachedPropertiesMetaObject(), + + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + + 0, 0, + + 0, + 0 + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type); +} + +int Q_QML_EXPORT qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message); + +template +int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason) +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QQmlListProperty<" + name + ">"); + + QQmlPrivate::RegisterType type = { + 0, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + 0, 0, + reason, + + uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, + + QQmlPrivate::attachedPropertiesFunc(), + QQmlPrivate::attachedPropertiesMetaObject(), + + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + + 0, 0, + + 0, + 0 + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type); +} + +template +int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QQmlListProperty<" + name + ">"); + + QQmlPrivate::RegisterType type = { + 0, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + sizeof(T), QQmlPrivate::createInto, + QString(), + + uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, + + QQmlPrivate::attachedPropertiesFunc(), + QQmlPrivate::attachedPropertiesMetaObject(), + + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + + 0, 0, + + 0, + 0 + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type); +} + +template +int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QQmlListProperty<" + name + ">"); + + QQmlPrivate::RegisterType type = { + 1, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + sizeof(T), QQmlPrivate::createInto, + QString(), + + uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, + + QQmlPrivate::attachedPropertiesFunc(), + QQmlPrivate::attachedPropertiesMetaObject(), + + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + + 0, 0, + + 0, + metaObjectRevision + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type); +} + +template +int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor) +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QQmlListProperty<" + name + ">"); + + QQmlPrivate::RegisterType type = { + 1, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + sizeof(T), QQmlPrivate::createInto, + QString(), + + uri, versionMajor, versionMinor, 0, &T::staticMetaObject, + + QQmlPrivate::attachedPropertiesFunc(), + QQmlPrivate::attachedPropertiesMetaObject(), + + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + + 0, 0, + + 0, + metaObjectRevision + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type); +} + + +template +int qmlRegisterExtendedType() +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QQmlListProperty<" + name + ">"); + + QQmlPrivate::RegisterType type = { + 0, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + 0, 0, + QString(), + + 0, 0, 0, 0, &T::staticMetaObject, + + QQmlPrivate::attachedPropertiesFunc(), + QQmlPrivate::attachedPropertiesMetaObject(), + + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + + QQmlPrivate::createParent, &E::staticMetaObject, + + 0, + 0 + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type); +} + +template +int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, + const char *qmlName) +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QQmlListProperty<" + name + ">"); + + QQmlAttachedPropertiesFunc attached = QQmlPrivate::attachedPropertiesFunc(); + const QMetaObject * attachedMetaObject = QQmlPrivate::attachedPropertiesMetaObject(); + if (!attached) { + attached = QQmlPrivate::attachedPropertiesFunc(); + attachedMetaObject = QQmlPrivate::attachedPropertiesMetaObject(); + } + + QQmlPrivate::RegisterType type = { + 0, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + sizeof(T), QQmlPrivate::createInto, + QString(), + + uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, + + attached, + attachedMetaObject, + + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + + QQmlPrivate::createParent, &E::staticMetaObject, + + 0, + 0 + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type); +} + +template +int qmlRegisterInterface(const char *typeName) +{ + QByteArray name(typeName); + + QByteArray pointerName(name + '*'); + QByteArray listName("QQmlListProperty<" + name + ">"); + + QQmlPrivate::RegisterInterface qmlInterface = { + 0, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + + qobject_interface_iid() + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::InterfaceRegistration, &qmlInterface); +} + +template +int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor, + const char *qmlName, QQmlCustomParser *parser) +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QQmlListProperty<" + name + ">"); + + QQmlPrivate::RegisterType type = { + 0, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + sizeof(T), QQmlPrivate::createInto, + QString(), + + uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, + + QQmlPrivate::attachedPropertiesFunc(), + QQmlPrivate::attachedPropertiesMetaObject(), + + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), + + 0, 0, + + parser, + 0 + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type); +} + +class QQmlContext; +class QQmlEngine; +class QJSValue; +class QJSEngine; +Q_QML_EXPORT void qmlExecuteDeferred(QObject *); +Q_QML_EXPORT QQmlContext *qmlContext(const QObject *); +Q_QML_EXPORT QQmlEngine *qmlEngine(const QObject *); +Q_QML_EXPORT QObject *qmlAttachedPropertiesObjectById(int, const QObject *, bool create = true); +Q_QML_EXPORT QObject *qmlAttachedPropertiesObject(int *, const QObject *, const QMetaObject *, bool create); + +template +QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true) +{ + static int idx = -1; + return qmlAttachedPropertiesObject(&idx, obj, &T::staticMetaObject, create); +} + +// For the use of QtQuick1 module +Q_QML_EXPORT void qmlRegisterBaseTypes(const char *uri, int versionMajor, int versionMinor); + +inline int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, + QJSValue (*callback)(QQmlEngine *, QJSEngine *)) +{ + QQmlPrivate::RegisterModuleApi api = { + 0, + + uri, versionMajor, versionMinor, + + callback, 0 + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::ModuleApiRegistration, &api); +} + +inline int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, + QObject *(*callback)(QQmlEngine *, QJSEngine *)) +{ + QQmlPrivate::RegisterModuleApi api = { + 0, + + uri, versionMajor, versionMinor, + + 0, callback + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::ModuleApiRegistration, &api); +} + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QObject) +Q_DECLARE_METATYPE(QVariant) + +QT_END_HEADER + +#endif // QQML_H diff --git a/src/declarative/qml/qdeclarativeaccessors.cpp b/src/qml/qml/qqmlaccessors.cpp similarity index 74% rename from src/declarative/qml/qdeclarativeaccessors.cpp rename to src/qml/qml/qqmlaccessors.cpp index 5659c2d550..ceb4f44789 100644 --- a/src/declarative/qml/qdeclarativeaccessors.cpp +++ b/src/qml/qml/qqmlaccessors.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#include "qdeclarativeaccessors_p.h" +#include "qqmlaccessors_p.h" -#include "qdeclarativedata_p.h" -#include "qdeclarativenotifier_p.h" +#include "qqmldata_p.h" +#include "qqmlnotifier_p.h" QT_BEGIN_NAMESPACE @@ -50,26 +50,26 @@ struct AccessorProperties { AccessorProperties(); QReadWriteLock lock; - QHash properties; + QHash properties; }; Q_GLOBAL_STATIC(AccessorProperties, accessorProperties) QML_PRIVATE_ACCESSOR(QObject, QString, objectName, objectName) -static void QObject_objectNameNotifier(QObject *object, intptr_t, QDeclarativeNotifier **notifier) +static void QObject_objectNameNotifier(QObject *object, intptr_t, QQmlNotifier **notifier) { - *notifier = QDeclarativeData::get(object, true)->objectNameNotifier(); + *notifier = QQmlData::get(object, true)->objectNameNotifier(); } -static QDeclarativeAccessors QObject_objectName = { QObject_objectNameRead, +static QQmlAccessors QObject_objectName = { QObject_objectNameRead, QObject_objectNameNotifier }; QML_DECLARE_PROPERTIES(QObject) { { QML_PROPERTY_NAME(objectName), 0, &QObject_objectName } }; -static void buildNameMask(QDeclarativeAccessorProperties::Properties &properties) +static void buildNameMask(QQmlAccessorProperties::Properties &properties) { quint32 mask = 0; @@ -86,21 +86,21 @@ static void buildNameMask(QDeclarativeAccessorProperties::Properties &properties AccessorProperties::AccessorProperties() { // Pre-seed QObject::objectName accessor - typedef QDeclarativeAccessorProperties::Properties P; + typedef QQmlAccessorProperties::Properties P; properties.insert(&QObject::staticMetaObject, - P(qdeclarative_accessor_properties_QObject, - sizeof(qdeclarative_accessor_properties_QObject) / - sizeof(QDeclarativeAccessorProperties::Property))); + P(qqml_accessor_properties_QObject, + sizeof(qqml_accessor_properties_QObject) / + sizeof(QQmlAccessorProperties::Property))); } -QDeclarativeAccessorProperties::Properties::Properties(Property *properties, int count) +QQmlAccessorProperties::Properties::Properties(Property *properties, int count) : count(count), properties(properties) { buildNameMask(*this); } -QDeclarativeAccessorProperties::Properties -QDeclarativeAccessorProperties::properties(const QMetaObject *mo) +QQmlAccessorProperties::Properties +QQmlAccessorProperties::properties(const QMetaObject *mo) { AccessorProperties *This = accessorProperties(); @@ -108,7 +108,7 @@ QDeclarativeAccessorProperties::properties(const QMetaObject *mo) return This->properties.value(mo); } -void QDeclarativeAccessorProperties::registerProperties(const QMetaObject *mo, int count, +void QQmlAccessorProperties::registerProperties(const QMetaObject *mo, int count, Property *props) { Q_ASSERT(count > 0); diff --git a/src/declarative/qml/qdeclarativeaccessors_p.h b/src/qml/qml/qqmlaccessors_p.h similarity index 76% rename from src/declarative/qml/qdeclarativeaccessors_p.h rename to src/qml/qml/qqmlaccessors_p.h index c52dc537ef..a603bede9f 100644 --- a/src/declarative/qml/qdeclarativeaccessors_p.h +++ b/src/qml/qml/qqmlaccessors_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEACCESSORS_P_H -#define QDECLARATIVEACCESSORS_P_H +#ifndef QQMLACCESSORS_P_H +#define QQMLACCESSORS_P_H +#include #include #include #include @@ -51,7 +52,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE class QObject; -class QDeclarativeNotifier; +class QQmlNotifier; // QML "accessor properties" allow V4 and V8 to bypass Qt's meta system to read and, more // importantly, subscribe to properties directly. Any property that is primarily read @@ -60,7 +61,7 @@ class QDeclarativeNotifier; // To define accessor properties, use the QML_DECLARE_PROPERTIES() and QML_DEFINE_PROPERTIES() // macros. The QML_DECLARE_PROPERTIES() macro is used to specify the properties, and the // QML_DEFINE_PROPERTIES() macro to register the properties with the -// QDeclarativeAccessorProperties singleton. +// QQmlAccessorProperties singleton. // // A class with accessor properties must also add the Q_CLASSINFO("qt_HasQmlAccessors", "true") // tag to its declaration. This is essential for QML to maintain internal consistency, @@ -74,17 +75,17 @@ class QDeclarativeNotifier; // if registration has already occurred. #define QML_DECLARE_PROPERTIES(type) \ - static volatile bool qdeclarative_accessor_properties_isregistered_ ## type = false; \ - static QDeclarativeAccessorProperties::Property qdeclarative_accessor_properties_ ## type[] = + static volatile bool qqml_accessor_properties_isregistered_ ## type = false; \ + static QQmlAccessorProperties::Property qqml_accessor_properties_ ## type[] = #define QML_DEFINE_PROPERTIES(type) \ do { \ - if (!qdeclarative_accessor_properties_isregistered_ ## type) { \ - int count = sizeof(qdeclarative_accessor_properties_ ## type) / \ - sizeof(QDeclarativeAccessorProperties::Property); \ - QDeclarativeAccessorProperties::registerProperties(&type::staticMetaObject, count, \ - qdeclarative_accessor_properties_ ## type);\ - qdeclarative_accessor_properties_isregistered_ ## type = true; \ + if (!qqml_accessor_properties_isregistered_ ## type) { \ + int count = sizeof(qqml_accessor_properties_ ## type) / \ + sizeof(QQmlAccessorProperties::Property); \ + QQmlAccessorProperties::registerProperties(&type::staticMetaObject, count, \ + qqml_accessor_properties_ ## type);\ + qqml_accessor_properties_isregistered_ ## type = true; \ } \ } while (false); @@ -97,19 +98,19 @@ class QDeclarativeNotifier; #define QML_PROPERTY_NAME(name) #name, sizeof #name - 1 -class QDeclarativeAccessors +class QQmlAccessors { public: void (*read)(QObject *object, intptr_t property, void *output); - void (*notifier)(QObject *object, intptr_t property, QDeclarativeNotifier **notifier); + void (*notifier)(QObject *object, intptr_t property, QQmlNotifier **notifier); }; -namespace QDeclarativeAccessorProperties { +namespace QQmlAccessorProperties { struct Property { const char *name; unsigned int nameLength; intptr_t data; - QDeclarativeAccessors *accessors; + QQmlAccessors *accessors; }; struct Properties { @@ -128,11 +129,11 @@ namespace QDeclarativeAccessorProperties { }; Properties properties(const QMetaObject *); - void Q_DECLARATIVE_EXPORT registerProperties(const QMetaObject *, int, Property *); + void Q_QML_EXPORT registerProperties(const QMetaObject *, int, Property *); }; -QDeclarativeAccessorProperties::Property * -QDeclarativeAccessorProperties::Properties::property(const char *name) +QQmlAccessorProperties::Property * +QQmlAccessorProperties::Properties::property(const char *name) { if (count == 0) return 0; @@ -153,7 +154,7 @@ QDeclarativeAccessorProperties::Properties::property(const char *name) return 0; } -QDeclarativeAccessorProperties::Properties::Properties() +QQmlAccessorProperties::Properties::Properties() : count(0), properties(0), nameMask(0) { } @@ -162,4 +163,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEACCESSORS_P_H +#endif // QQMLACCESSORS_P_H diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/qml/qml/qqmlbinding.cpp similarity index 57% rename from src/declarative/qml/qdeclarativebinding.cpp rename to src/qml/qml/qqmlbinding.cpp index 39032e0ca6..a19644fb3e 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,28 +39,28 @@ ** ****************************************************************************/ -#include "qdeclarativebinding_p.h" -#include "qdeclarativebinding_p_p.h" +#include "qqmlbinding_p.h" +#include "qqmlbinding_p_p.h" -#include "qdeclarative.h" -#include "qdeclarativecontext.h" -#include "qdeclarativeinfo.h" -#include "qdeclarativecompiler_p.h" -#include "qdeclarativedata_p.h" -#include -#include +#include "qqml.h" +#include "qqmlcontext.h" +#include "qqmlinfo.h" +#include "qqmlcompiler_p.h" +#include "qqmldata_p.h" +#include +#include #include #include QT_BEGIN_NAMESPACE -QDeclarativeAbstractBinding::QDeclarativeAbstractBinding() +QQmlAbstractBinding::QQmlAbstractBinding() : m_prevBinding(0), m_nextBinding(0) { } -QDeclarativeAbstractBinding::~QDeclarativeAbstractBinding() +QQmlAbstractBinding::~QQmlAbstractBinding() { Q_ASSERT(m_prevBinding == 0); Q_ASSERT(*m_mePtr == 0); @@ -73,7 +73,7 @@ Bindings are free to implement their own memory management, so the delete operat necessarily safe. The default implementation clears the binding, removes it from the object and calls delete. */ -void QDeclarativeAbstractBinding::destroy() +void QQmlAbstractBinding::destroy() { removeFromObject(); clear(); @@ -89,7 +89,7 @@ being bound. However, it does not enable the binding itself or call update() on it. */ -void QDeclarativeAbstractBinding::addToObject() +void QQmlAbstractBinding::addToObject() { Q_ASSERT(!m_prevBinding); @@ -98,7 +98,7 @@ void QDeclarativeAbstractBinding::addToObject() int index = propertyIndex(); - QDeclarativeData *data = QDeclarativeData::get(obj, true); + QQmlData *data = QQmlData::get(obj, true); if (index & 0xFF000000) { // Value type @@ -106,17 +106,17 @@ void QDeclarativeAbstractBinding::addToObject() int coreIndex = index & 0xFFFFFF; // Find the value type proxy (if there is one) - QDeclarativeValueTypeProxyBinding *proxy = 0; + QQmlValueTypeProxyBinding *proxy = 0; if (data->hasBindingBit(coreIndex)) { - QDeclarativeAbstractBinding *b = data->bindings; + QQmlAbstractBinding *b = data->bindings; while (b && b->propertyIndex() != coreIndex) b = b->m_nextBinding; - Q_ASSERT(b && b->bindingType() == QDeclarativeAbstractBinding::ValueTypeProxy); - proxy = static_cast(b); + Q_ASSERT(b && b->bindingType() == QQmlAbstractBinding::ValueTypeProxy); + proxy = static_cast(b); } if (!proxy) { - proxy = new QDeclarativeValueTypeProxyBinding(obj, coreIndex); + proxy = new QQmlValueTypeProxyBinding(obj, coreIndex); Q_ASSERT(proxy->propertyIndex() == coreIndex); Q_ASSERT(proxy->object() == obj); @@ -142,7 +142,7 @@ void QDeclarativeAbstractBinding::addToObject() /*! Remove the binding from the object. */ -void QDeclarativeAbstractBinding::removeFromObject() +void QQmlAbstractBinding::removeFromObject() { if (m_prevBinding) { int index = propertyIndex(); @@ -157,25 +157,25 @@ void QDeclarativeAbstractBinding::removeFromObject() // doing nothing until it is removed by a write, a binding change or it is reused // to hold more sub-bindings. } else if (QObject *obj = object()) { - QDeclarativeData *data = QDeclarativeData::get(obj, false); + QQmlData *data = QQmlData::get(obj, false); if (data) data->clearBindingBit(index); } } } -static void bindingDummyDeleter(QDeclarativeAbstractBinding *) +static void bindingDummyDeleter(QQmlAbstractBinding *) { } -QDeclarativeAbstractBinding::Pointer QDeclarativeAbstractBinding::weakPointer() +QQmlAbstractBinding::Pointer QQmlAbstractBinding::weakPointer() { if (m_mePtr.value().isNull()) - m_mePtr.value() = QSharedPointer(this, bindingDummyDeleter); + m_mePtr.value() = QSharedPointer(this, bindingDummyDeleter); return m_mePtr.value().toWeakRef(); } -void QDeclarativeAbstractBinding::clear() +void QQmlAbstractBinding::clear() { if (!m_mePtr.isNull()) { **m_mePtr = 0; @@ -183,55 +183,55 @@ void QDeclarativeAbstractBinding::clear() } } -void QDeclarativeAbstractBinding::retargetBinding(QObject *, int) +void QQmlAbstractBinding::retargetBinding(QObject *, int) { - qFatal("QDeclarativeAbstractBinding::retargetBinding() called on illegal binding."); + qFatal("QQmlAbstractBinding::retargetBinding() called on illegal binding."); } -QString QDeclarativeAbstractBinding::expression() const +QString QQmlAbstractBinding::expression() const { return QLatin1String(""); } -void QDeclarativeAbstractBinding::setEnabled(bool enabled, QDeclarativePropertyPrivate::WriteFlags flags) +void QQmlAbstractBinding::setEnabled(bool enabled, QQmlPropertyPrivate::WriteFlags flags) { if (enabled) update(flags); } -QDeclarativeBinding::Identifier QDeclarativeBinding::Invalid = -1; +QQmlBinding::Identifier QQmlBinding::Invalid = -1; -void QDeclarativeBindingPrivate::refresh() +void QQmlBindingPrivate::refresh() { - Q_Q(QDeclarativeBinding); + Q_Q(QQmlBinding); q->update(); } -QDeclarativeBindingPrivate::QDeclarativeBindingPrivate() +QQmlBindingPrivate::QQmlBindingPrivate() : updating(false), enabled(false), target(), targetProperty(0) { } -QDeclarativeBindingPrivate::~QDeclarativeBindingPrivate() +QQmlBindingPrivate::~QQmlBindingPrivate() { } -QDeclarativeBinding * -QDeclarativeBinding::createBinding(Identifier id, QObject *obj, QDeclarativeContext *ctxt, +QQmlBinding * +QQmlBinding::createBinding(Identifier id, QObject *obj, QQmlContext *ctxt, const QString &url, int lineNumber, QObject *parent) { if (id < 0) return 0; - QDeclarativeContextData *ctxtdata = QDeclarativeContextData::get(ctxt); + QQmlContextData *ctxtdata = QQmlContextData::get(ctxt); - QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(ctxt->engine()); - QDeclarativeCompiledData *cdata = 0; - QDeclarativeTypeData *typeData = 0; + QQmlEnginePrivate *engine = QQmlEnginePrivate::get(ctxt->engine()); + QQmlCompiledData *cdata = 0; + QQmlTypeData *typeData = 0; if (engine && ctxtdata && !ctxtdata->url.isEmpty()) { typeData = engine->typeLoader.get(ctxtdata->url); cdata = typeData->compiledData(); } - QDeclarativeBinding *rv = cdata ? new QDeclarativeBinding(cdata->primitives.at(id), true, obj, ctxtdata, url, lineNumber, 0, parent) : 0; + QQmlBinding *rv = cdata ? new QQmlBinding(cdata->primitives.at(id), true, obj, ctxtdata, url, lineNumber, 0, parent) : 0; if (cdata) cdata->release(); if (typeData) @@ -239,27 +239,27 @@ QDeclarativeBinding::createBinding(Identifier id, QObject *obj, QDeclarativeCont return rv; } -QDeclarativeBinding::QDeclarativeBinding(const QString &str, QObject *obj, QDeclarativeContext *ctxt, +QQmlBinding::QQmlBinding(const QString &str, QObject *obj, QQmlContext *ctxt, QObject *parent) -: QDeclarativeExpression(QDeclarativeContextData::get(ctxt), obj, str, *new QDeclarativeBindingPrivate) +: QQmlExpression(QQmlContextData::get(ctxt), obj, str, *new QQmlBindingPrivate) { setParent(parent); setNotifyOnValueChanged(true); } -QDeclarativeBinding::QDeclarativeBinding(const QString &str, QObject *obj, QDeclarativeContextData *ctxt, +QQmlBinding::QQmlBinding(const QString &str, QObject *obj, QQmlContextData *ctxt, QObject *parent) -: QDeclarativeExpression(ctxt, obj, str, *new QDeclarativeBindingPrivate) +: QQmlExpression(ctxt, obj, str, *new QQmlBindingPrivate) { setParent(parent); setNotifyOnValueChanged(true); } -QDeclarativeBinding::QDeclarativeBinding(const QString &str, bool isRewritten, QObject *obj, - QDeclarativeContextData *ctxt, +QQmlBinding::QQmlBinding(const QString &str, bool isRewritten, QObject *obj, + QQmlContextData *ctxt, const QString &url, int lineNumber, int columnNumber, QObject *parent) -: QDeclarativeExpression(ctxt, obj, str, isRewritten, url, lineNumber, columnNumber, *new QDeclarativeBindingPrivate) +: QQmlExpression(ctxt, obj, str, isRewritten, url, lineNumber, columnNumber, *new QQmlBindingPrivate) { setParent(parent); setNotifyOnValueChanged(true); @@ -271,85 +271,85 @@ QDeclarativeBinding::QDeclarativeBinding(const QString &str, bool isRewritten, Q To avoid exposing v8 in the public API, functionPtr must be a pointer to a v8::Handle. For example: v8::Handle function; - new QDeclarativeBinding(&function, scope, ctxt); + new QQmlBinding(&function, scope, ctxt); */ -QDeclarativeBinding::QDeclarativeBinding(void *functionPtr, QObject *obj, QDeclarativeContextData *ctxt, +QQmlBinding::QQmlBinding(void *functionPtr, QObject *obj, QQmlContextData *ctxt, QObject *parent) -: QDeclarativeExpression(ctxt, obj, functionPtr, *new QDeclarativeBindingPrivate) +: QQmlExpression(ctxt, obj, functionPtr, *new QQmlBindingPrivate) { setParent(parent); setNotifyOnValueChanged(true); } -QDeclarativeBinding::~QDeclarativeBinding() +QQmlBinding::~QQmlBinding() { } -void QDeclarativeBinding::setTarget(const QDeclarativeProperty &prop) +void QQmlBinding::setTarget(const QQmlProperty &prop) { - Q_D(QDeclarativeBinding); + Q_D(QQmlBinding); d->property = prop; d->target = d->property.object(); - d->targetProperty = QDeclarativePropertyPrivate::get(d->property)->core.encodedIndex(); + d->targetProperty = QQmlPropertyPrivate::get(d->property)->core.encodedIndex(); update(); } -void QDeclarativeBinding::setTarget(QObject *object, - const QDeclarativePropertyData &core, - QDeclarativeContextData *ctxt) +void QQmlBinding::setTarget(QObject *object, + const QQmlPropertyData &core, + QQmlContextData *ctxt) { - Q_D(QDeclarativeBinding); - d->property = QDeclarativePropertyPrivate::restore(object, core, ctxt); + Q_D(QQmlBinding); + d->property = QQmlPropertyPrivate::restore(object, core, ctxt); d->target = d->property.object(); - d->targetProperty = QDeclarativePropertyPrivate::get(d->property)->core.encodedIndex(); + d->targetProperty = QQmlPropertyPrivate::get(d->property)->core.encodedIndex(); update(); } -QDeclarativeProperty QDeclarativeBinding::property() const +QQmlProperty QQmlBinding::property() const { - Q_D(const QDeclarativeBinding); + Q_D(const QQmlBinding); return d->property; } -void QDeclarativeBinding::setEvaluateFlags(EvaluateFlags flags) +void QQmlBinding::setEvaluateFlags(EvaluateFlags flags) { - Q_D(QDeclarativeBinding); + Q_D(QQmlBinding); d->setRequiresThisObject(flags & RequiresThisObject); } -QDeclarativeBinding::EvaluateFlags QDeclarativeBinding::evaluateFlags() const +QQmlBinding::EvaluateFlags QQmlBinding::evaluateFlags() const { - Q_D(const QDeclarativeBinding); + Q_D(const QQmlBinding); return d->requiresThisObject()?RequiresThisObject:None; } -void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags) +void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags) { - Q_D(QDeclarativeBinding); + Q_D(QQmlBinding); if (!d->enabled || !d->context() || !d->context()->isValid()) return; - QDeclarativeTrace trace("General Binding Update"); + QQmlTrace trace("General Binding Update"); trace.addDetail("URL", d->url); trace.addDetail("Line", d->line); trace.addDetail("Column", d->columnNumber); if (!d->updating) { - QDeclarativeBindingProfiler prof(d->url, d->line, d->column); + QQmlBindingProfiler prof(d->url, d->line, d->column); prof.addDetail(expression()); d->updating = true; - QDeclarativeAbstractExpression::DeleteWatcher watcher(d); + QQmlAbstractExpression::DeleteWatcher watcher(d); - if (d->property.propertyType() == qMetaTypeId()) { + if (d->property.propertyType() == qMetaTypeId()) { int idx = d->property.index(); Q_ASSERT(idx != -1); - QDeclarativeBinding *t = this; + QQmlBinding *t = this; int status = -1; void *a[] = { &t, 0, &status, &flags }; QMetaObject::metacall(d->property.object(), @@ -357,7 +357,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags) idx, a); } else { - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(d->context()->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(d->context()->engine); ep->referenceScarceResources(); bool isUndefined = false; @@ -370,7 +370,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags) bool needsErrorData = false; if (!watcher.wasDeleted() && !d->hasError()) - needsErrorData = !QDeclarativePropertyPrivate::writeBinding(d->property, d->context(), + needsErrorData = !QQmlPropertyPrivate::writeBinding(d->property, d->context(), d, result, isUndefined, flags); @@ -400,24 +400,24 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags) if (!watcher.wasDeleted()) d->updating = false; } else { - QDeclarativeBindingPrivate::printBindingLoopError(d->property); + QQmlBindingPrivate::printBindingLoopError(d->property); } } -void QDeclarativeBindingPrivate::printBindingLoopError(QDeclarativeProperty &prop) +void QQmlBindingPrivate::printBindingLoopError(QQmlProperty &prop) { - qmlInfo(prop.object()) << QDeclarativeBinding::tr("Binding loop detected for property \"%1\"").arg(prop.name()); + qmlInfo(prop.object()) << QQmlBinding::tr("Binding loop detected for property \"%1\"").arg(prop.name()); } -void QDeclarativeBindingPrivate::expressionChanged() +void QQmlBindingPrivate::expressionChanged() { - Q_Q(QDeclarativeBinding); + Q_Q(QQmlBinding); q->update(); } -void QDeclarativeBinding::setEnabled(bool e, QDeclarativePropertyPrivate::WriteFlags flags) +void QQmlBinding::setEnabled(bool e, QQmlPropertyPrivate::WriteFlags flags) { - Q_D(QDeclarativeBinding); + Q_D(QQmlBinding); d->enabled = e; setNotifyOnValueChanged(e); @@ -425,63 +425,63 @@ void QDeclarativeBinding::setEnabled(bool e, QDeclarativePropertyPrivate::WriteF update(flags); } -bool QDeclarativeBinding::enabled() const +bool QQmlBinding::enabled() const { - Q_D(const QDeclarativeBinding); + Q_D(const QQmlBinding); return d->enabled; } -QString QDeclarativeBinding::expression() const +QString QQmlBinding::expression() const { - return QDeclarativeExpression::expression(); + return QQmlExpression::expression(); } -int QDeclarativeBinding::propertyIndex() const +int QQmlBinding::propertyIndex() const { - Q_D(const QDeclarativeBinding); + Q_D(const QQmlBinding); return d->targetProperty; } -QObject *QDeclarativeBinding::object() const +QObject *QQmlBinding::object() const { - Q_D(const QDeclarativeBinding); + Q_D(const QQmlBinding); return d->target; } -void QDeclarativeBinding::retargetBinding(QObject *t, int i) +void QQmlBinding::retargetBinding(QObject *t, int i) { - Q_D(QDeclarativeBinding); + Q_D(QQmlBinding); d->target = t; d->targetProperty = i; } -QDeclarativeValueTypeProxyBinding::QDeclarativeValueTypeProxyBinding(QObject *o, int index) +QQmlValueTypeProxyBinding::QQmlValueTypeProxyBinding(QObject *o, int index) : m_object(o), m_index(index), m_bindings(0) { } -QDeclarativeValueTypeProxyBinding::~QDeclarativeValueTypeProxyBinding() +QQmlValueTypeProxyBinding::~QQmlValueTypeProxyBinding() { while (m_bindings) { - QDeclarativeAbstractBinding *binding = m_bindings; + QQmlAbstractBinding *binding = m_bindings; binding->setEnabled(false, 0); binding->destroy(); } } -void QDeclarativeValueTypeProxyBinding::setEnabled(bool e, QDeclarativePropertyPrivate::WriteFlags flags) +void QQmlValueTypeProxyBinding::setEnabled(bool e, QQmlPropertyPrivate::WriteFlags flags) { if (e) { - QDeclarativeAbstractBinding *bindings = m_bindings; + QQmlAbstractBinding *bindings = m_bindings; recursiveEnable(bindings, flags); } else { - QDeclarativeAbstractBinding *bindings = m_bindings; + QQmlAbstractBinding *bindings = m_bindings; recursiveDisable(bindings); } } -void QDeclarativeValueTypeProxyBinding::recursiveEnable(QDeclarativeAbstractBinding *b, QDeclarativePropertyPrivate::WriteFlags flags) +void QQmlValueTypeProxyBinding::recursiveEnable(QQmlAbstractBinding *b, QQmlPropertyPrivate::WriteFlags flags) { if (!b) return; @@ -492,7 +492,7 @@ void QDeclarativeValueTypeProxyBinding::recursiveEnable(QDeclarativeAbstractBind b->setEnabled(true, flags); } -void QDeclarativeValueTypeProxyBinding::recursiveDisable(QDeclarativeAbstractBinding *b) +void QQmlValueTypeProxyBinding::recursiveDisable(QQmlAbstractBinding *b) { if (!b) return; @@ -503,13 +503,13 @@ void QDeclarativeValueTypeProxyBinding::recursiveDisable(QDeclarativeAbstractBin b->setEnabled(false, 0); } -void QDeclarativeValueTypeProxyBinding::update(QDeclarativePropertyPrivate::WriteFlags) +void QQmlValueTypeProxyBinding::update(QQmlPropertyPrivate::WriteFlags) { } -QDeclarativeAbstractBinding *QDeclarativeValueTypeProxyBinding::binding(int propertyIndex) +QQmlAbstractBinding *QQmlValueTypeProxyBinding::binding(int propertyIndex) { - QDeclarativeAbstractBinding *binding = m_bindings; + QQmlAbstractBinding *binding = m_bindings; while (binding && binding->propertyIndex() != propertyIndex) binding = binding->m_nextBinding; @@ -520,12 +520,12 @@ QDeclarativeAbstractBinding *QDeclarativeValueTypeProxyBinding::binding(int prop /*! Removes a collection of bindings, corresponding to the set bits in \a mask. */ -void QDeclarativeValueTypeProxyBinding::removeBindings(quint32 mask) +void QQmlValueTypeProxyBinding::removeBindings(quint32 mask) { - QDeclarativeAbstractBinding *binding = m_bindings; + QQmlAbstractBinding *binding = m_bindings; while (binding) { if (mask & (1 << (binding->propertyIndex() >> 24))) { - QDeclarativeAbstractBinding *remove = binding; + QQmlAbstractBinding *remove = binding; binding = remove->m_nextBinding; *remove->m_prevBinding = remove->m_nextBinding; if (remove->m_nextBinding) remove->m_nextBinding->m_prevBinding = remove->m_prevBinding; @@ -538,12 +538,12 @@ void QDeclarativeValueTypeProxyBinding::removeBindings(quint32 mask) } } -int QDeclarativeValueTypeProxyBinding::propertyIndex() const +int QQmlValueTypeProxyBinding::propertyIndex() const { return m_index; } -QObject *QDeclarativeValueTypeProxyBinding::object() const +QObject *QQmlValueTypeProxyBinding::object() const { return m_object; } diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/qml/qml/qqmlbinding_p.h similarity index 53% rename from src/declarative/qml/qdeclarativebinding_p.h rename to src/qml/qml/qqmlbinding_p.h index 61cf7dd550..33823d7e7e 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/qml/qml/qqmlbinding_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEBINDING_P_H -#define QDECLARATIVEBINDING_P_H +#ifndef QQMLBINDING_P_H +#define QQMLBINDING_P_H // // W A R N I N G @@ -53,11 +53,11 @@ // We mean it. // -#include "qdeclarative.h" -#include "qdeclarativepropertyvaluesource.h" -#include "qdeclarativeexpression.h" -#include "qdeclarativeproperty.h" -#include "qdeclarativeproperty_p.h" +#include "qqml.h" +#include "qqmlpropertyvaluesource.h" +#include "qqmlexpression.h" +#include "qqmlproperty.h" +#include "qqmlproperty_p.h" #include #include @@ -66,12 +66,12 @@ QT_BEGIN_NAMESPACE -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeAbstractBinding +class Q_QML_PRIVATE_EXPORT QQmlAbstractBinding { public: - typedef QWeakPointer Pointer; + typedef QWeakPointer Pointer; - QDeclarativeAbstractBinding(); + QQmlAbstractBinding(); virtual void destroy(); @@ -88,101 +88,101 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeAbstractBinding // binding is not enabled or added to the object. virtual QObject *object() const = 0; - void setEnabled(bool e) { setEnabled(e, QDeclarativePropertyPrivate::DontRemoveBinding); } - virtual void setEnabled(bool, QDeclarativePropertyPrivate::WriteFlags) = 0; + void setEnabled(bool e) { setEnabled(e, QQmlPropertyPrivate::DontRemoveBinding); } + virtual void setEnabled(bool, QQmlPropertyPrivate::WriteFlags) = 0; - void update() { update(QDeclarativePropertyPrivate::DontRemoveBinding); } - virtual void update(QDeclarativePropertyPrivate::WriteFlags) = 0; + void update() { update(QQmlPropertyPrivate::DontRemoveBinding); } + virtual void update(QQmlPropertyPrivate::WriteFlags) = 0; void addToObject(); void removeFromObject(); - static inline Pointer getPointer(QDeclarativeAbstractBinding *p); + static inline Pointer getPointer(QQmlAbstractBinding *p); protected: - virtual ~QDeclarativeAbstractBinding(); + virtual ~QQmlAbstractBinding(); void clear(); - // Called by QDeclarativePropertyPrivate to "move" a binding to a different property. - // This is only used for alias properties, and only used by QDeclarativeBinding not + // Called by QQmlPropertyPrivate to "move" a binding to a different property. + // This is only used for alias properties, and only used by QQmlBinding not // V8 or V4 bindings. The default implementation qFatal()'s to ensure that the // method is never called for V4 or V8 bindings. virtual void retargetBinding(QObject *, int); private: Pointer weakPointer(); - friend class QDeclarativeData; - friend class QDeclarativeComponentPrivate; - friend class QDeclarativeValueTypeProxyBinding; - friend class QDeclarativePropertyPrivate; - friend class QDeclarativeVME; - friend class QtSharedPointer::ExternalRefCount; + friend class QQmlData; + friend class QQmlComponentPrivate; + friend class QQmlValueTypeProxyBinding; + friend class QQmlPropertyPrivate; + friend class QQmlVME; + friend class QtSharedPointer::ExternalRefCount; - typedef QSharedPointer SharedPointer; + typedef QSharedPointer SharedPointer; // To save memory, we also store the rarely used weakPointer() instance in here - QPointerValuePair m_mePtr; + QPointerValuePair m_mePtr; - QDeclarativeAbstractBinding **m_prevBinding; - QDeclarativeAbstractBinding *m_nextBinding; + QQmlAbstractBinding **m_prevBinding; + QQmlAbstractBinding *m_nextBinding; }; -class QDeclarativeValueTypeProxyBinding : public QDeclarativeAbstractBinding +class QQmlValueTypeProxyBinding : public QQmlAbstractBinding { public: - QDeclarativeValueTypeProxyBinding(QObject *o, int coreIndex); + QQmlValueTypeProxyBinding(QObject *o, int coreIndex); virtual Type bindingType() const { return ValueTypeProxy; } - virtual void setEnabled(bool, QDeclarativePropertyPrivate::WriteFlags); - virtual void update(QDeclarativePropertyPrivate::WriteFlags); + virtual void setEnabled(bool, QQmlPropertyPrivate::WriteFlags); + virtual void update(QQmlPropertyPrivate::WriteFlags); virtual int propertyIndex() const; virtual QObject *object() const; - QDeclarativeAbstractBinding *binding(int propertyIndex); + QQmlAbstractBinding *binding(int propertyIndex); void removeBindings(quint32 mask); protected: - ~QDeclarativeValueTypeProxyBinding(); + ~QQmlValueTypeProxyBinding(); private: - void recursiveEnable(QDeclarativeAbstractBinding *, QDeclarativePropertyPrivate::WriteFlags); - void recursiveDisable(QDeclarativeAbstractBinding *); + void recursiveEnable(QQmlAbstractBinding *, QQmlPropertyPrivate::WriteFlags); + void recursiveDisable(QQmlAbstractBinding *); - friend class QDeclarativeAbstractBinding; + friend class QQmlAbstractBinding; QObject *m_object; int m_index; - QDeclarativeAbstractBinding *m_bindings; + QQmlAbstractBinding *m_bindings; }; -class QDeclarativeContext; -class QDeclarativeBindingPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBinding : public QDeclarativeExpression, - public QDeclarativeAbstractBinding +class QQmlContext; +class QQmlBindingPrivate; +class Q_QML_PRIVATE_EXPORT QQmlBinding : public QQmlExpression, + public QQmlAbstractBinding { Q_OBJECT public: enum EvaluateFlag { None = 0x00, RequiresThisObject = 0x01 }; Q_DECLARE_FLAGS(EvaluateFlags, EvaluateFlag) - QDeclarativeBinding(const QString &, QObject *, QDeclarativeContext *, QObject *parent=0); - QDeclarativeBinding(const QString &, QObject *, QDeclarativeContextData *, QObject *parent=0); - QDeclarativeBinding(const QString &, bool isRewritten, QObject *, QDeclarativeContextData *, + QQmlBinding(const QString &, QObject *, QQmlContext *, QObject *parent=0); + QQmlBinding(const QString &, QObject *, QQmlContextData *, QObject *parent=0); + QQmlBinding(const QString &, bool isRewritten, QObject *, QQmlContextData *, const QString &url, int lineNumber, int columnNumber = 0, QObject *parent=0); - QDeclarativeBinding(void *, QObject *, QDeclarativeContextData *, QObject *parent=0); + QQmlBinding(void *, QObject *, QQmlContextData *, QObject *parent=0); - void setTarget(const QDeclarativeProperty &); - void setTarget(QObject *, const QDeclarativePropertyData &, QDeclarativeContextData *); - QDeclarativeProperty property() const; + void setTarget(const QQmlProperty &); + void setTarget(QObject *, const QQmlPropertyData &, QQmlContextData *); + QQmlProperty property() const; void setEvaluateFlags(EvaluateFlags flags); EvaluateFlags evaluateFlags() const; bool enabled() const; - // Inherited from QDeclarativeAbstractBinding - virtual void setEnabled(bool, QDeclarativePropertyPrivate::WriteFlags flags); - virtual void update(QDeclarativePropertyPrivate::WriteFlags flags); + // Inherited from QQmlAbstractBinding + virtual void setEnabled(bool, QQmlPropertyPrivate::WriteFlags flags); + virtual void update(QQmlPropertyPrivate::WriteFlags flags); virtual QString expression() const; virtual int propertyIndex() const; virtual QObject *object() const; @@ -190,30 +190,30 @@ Q_OBJECT typedef int Identifier; static Identifier Invalid; - static QDeclarativeBinding *createBinding(Identifier, QObject *, QDeclarativeContext *, + static QQmlBinding *createBinding(Identifier, QObject *, QQmlContext *, const QString &, int, QObject *parent=0); public Q_SLOTS: - void update() { update(QDeclarativePropertyPrivate::DontRemoveBinding); } + void update() { update(QQmlPropertyPrivate::DontRemoveBinding); } protected: - ~QDeclarativeBinding(); + ~QQmlBinding(); private: - Q_DECLARE_PRIVATE(QDeclarativeBinding) + Q_DECLARE_PRIVATE(QQmlBinding) }; -Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeBinding::EvaluateFlags) +Q_DECLARE_OPERATORS_FOR_FLAGS(QQmlBinding::EvaluateFlags) -QDeclarativeAbstractBinding::Pointer -QDeclarativeAbstractBinding::getPointer(QDeclarativeAbstractBinding *p) +QQmlAbstractBinding::Pointer +QQmlAbstractBinding::getPointer(QQmlAbstractBinding *p) { return p ? p->weakPointer() : Pointer(); } QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeBinding*) +Q_DECLARE_METATYPE(QQmlBinding*) -#endif // QDECLARATIVEBINDING_P_H +#endif // QQMLBINDING_P_H diff --git a/src/declarative/qml/qdeclarativebinding_p_p.h b/src/qml/qml/qqmlbinding_p_p.h similarity index 78% rename from src/declarative/qml/qdeclarativebinding_p_p.h rename to src/qml/qml/qqmlbinding_p_p.h index 030bd32ef3..b53c903916 100644 --- a/src/declarative/qml/qdeclarativebinding_p_p.h +++ b/src/qml/qml/qqmlbinding_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEBINDING_P_P_H -#define QDECLARATIVEBINDING_P_P_H +#ifndef QQMLBINDING_P_P_H +#define QQMLBINDING_P_P_H // // W A R N I N G @@ -53,23 +53,23 @@ // We mean it. // -#include "qdeclarativebinding_p.h" +#include "qqmlbinding_p.h" -#include "qdeclarativeproperty.h" -#include "qdeclarativeexpression_p.h" +#include "qqmlproperty.h" +#include "qqmlexpression_p.h" QT_BEGIN_NAMESPACE -class QDeclarativeBindingPrivate : public QDeclarativeExpressionPrivate +class QQmlBindingPrivate : public QQmlExpressionPrivate { - Q_DECLARE_PUBLIC(QDeclarativeBinding) + Q_DECLARE_PUBLIC(QQmlBinding) public: - QDeclarativeBindingPrivate(); - ~QDeclarativeBindingPrivate(); + QQmlBindingPrivate(); + ~QQmlBindingPrivate(); virtual void expressionChanged(); - static void printBindingLoopError(QDeclarativeProperty &prop); + static void printBindingLoopError(QQmlProperty &prop); protected: virtual void refresh(); @@ -78,7 +78,7 @@ class QDeclarativeBindingPrivate : public QDeclarativeExpressionPrivate bool updating:1; bool enabled:1; int columnNumber; - QDeclarativeProperty property; + QQmlProperty property; QObject *target; int targetProperty; @@ -86,4 +86,4 @@ class QDeclarativeBindingPrivate : public QDeclarativeExpressionPrivate QT_END_NAMESPACE -#endif // QDECLARATIVEBINDING_P_P_H +#endif // QQMLBINDING_P_P_H diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp similarity index 66% rename from src/declarative/qml/qdeclarativeboundsignal.cpp rename to src/qml/qml/qqmlboundsignal.cpp index 5d1c28b095..6f552450ef 100644 --- a/src/declarative/qml/qdeclarativeboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,17 +39,17 @@ ** ****************************************************************************/ -#include "qdeclarativeboundsignal_p.h" +#include "qqmlboundsignal_p.h" #include -#include "qdeclarativeengine_p.h" -#include "qdeclarativeexpression_p.h" -#include "qdeclarativecontext_p.h" -#include "qdeclarativemetatype_p.h" -#include "qdeclarative.h" -#include "qdeclarativecontext.h" -#include "qdeclarativeglobal_p.h" -#include +#include "qqmlengine_p.h" +#include "qqmlexpression_p.h" +#include "qqmlcontext_p.h" +#include "qqmlmetatype_p.h" +#include "qqml.h" +#include "qqmlcontext.h" +#include "qqmlglobal_p.h" +#include #include #include @@ -57,12 +57,12 @@ QT_BEGIN_NAMESPACE -class QDeclarativeBoundSignalParameters : public QObject +class QQmlBoundSignalParameters : public QObject { Q_OBJECT public: - QDeclarativeBoundSignalParameters(const QMetaMethod &, QObject * = 0); - ~QDeclarativeBoundSignalParameters(); + QQmlBoundSignalParameters(const QMetaMethod &, QObject * = 0); + ~QQmlBoundSignalParameters(); void setValues(void **); void clearValues(); @@ -71,13 +71,13 @@ Q_OBJECT friend class MetaObject; int metaCall(QMetaObject::Call, int _id, void **); struct MetaObject : public QAbstractDynamicMetaObject { - MetaObject(QDeclarativeBoundSignalParameters *b) + MetaObject(QQmlBoundSignalParameters *b) : parent(b) {} int metaCall(QMetaObject::Call c, int id, void **a) { return parent->metaCall(c, id, a); } - QDeclarativeBoundSignalParameters *parent; + QQmlBoundSignalParameters *parent; }; int *types; @@ -87,16 +87,16 @@ Q_OBJECT static int evaluateIdx = -1; -QDeclarativeAbstractBoundSignal::QDeclarativeAbstractBoundSignal(QObject *parent) +QQmlAbstractBoundSignal::QQmlAbstractBoundSignal(QObject *parent) : QObject(parent) { } -QDeclarativeAbstractBoundSignal::~QDeclarativeAbstractBoundSignal() +QQmlAbstractBoundSignal::~QQmlAbstractBoundSignal() { } -QDeclarativeBoundSignal::QDeclarativeBoundSignal(QObject *scope, const QMetaMethod &signal, +QQmlBoundSignal::QQmlBoundSignal(QObject *scope, const QMetaMethod &signal, QObject *parent) : m_expression(0), m_signal(signal), m_paramsValid(false), m_isEvaluating(false), m_params(0) { @@ -105,11 +105,11 @@ QDeclarativeBoundSignal::QDeclarativeBoundSignal(QObject *scope, const QMetaMeth // is that they both do the work to figure it out. Boo hoo. if (evaluateIdx == -1) evaluateIdx = metaObject()->methodCount(); - QDeclarative_setParent_noEvent(this, parent); - QDeclarativePropertyPrivate::connect(scope, m_signal.methodIndex(), this, evaluateIdx); + QQml_setParent_noEvent(this, parent); + QQmlPropertyPrivate::connect(scope, m_signal.methodIndex(), this, evaluateIdx); } -QDeclarativeBoundSignal::QDeclarativeBoundSignal(QDeclarativeContext *ctxt, const QString &val, +QQmlBoundSignal::QQmlBoundSignal(QQmlContext *ctxt, const QString &val, QObject *scope, const QMetaMethod &signal, QObject *parent) : m_expression(0), m_signal(signal), m_paramsValid(false), m_isEvaluating(false), m_params(0) @@ -119,19 +119,19 @@ QDeclarativeBoundSignal::QDeclarativeBoundSignal(QDeclarativeContext *ctxt, cons // is that they both do the work to figure it out. Boo hoo. if (evaluateIdx == -1) evaluateIdx = metaObject()->methodCount(); - QDeclarative_setParent_noEvent(this, parent); - QDeclarativePropertyPrivate::connect(scope, m_signal.methodIndex(), this, evaluateIdx); + QQml_setParent_noEvent(this, parent); + QQmlPropertyPrivate::connect(scope, m_signal.methodIndex(), this, evaluateIdx); - m_expression = new QDeclarativeExpression(ctxt, scope, val); + m_expression = new QQmlExpression(ctxt, scope, val); } -QDeclarativeBoundSignal::~QDeclarativeBoundSignal() +QQmlBoundSignal::~QQmlBoundSignal() { delete m_expression; m_expression = 0; } -int QDeclarativeBoundSignal::index() const +int QQmlBoundSignal::index() const { return m_signal.methodIndex(); } @@ -139,7 +139,7 @@ int QDeclarativeBoundSignal::index() const /*! Returns the signal expression. */ -QDeclarativeExpression *QDeclarativeBoundSignal::expression() const +QQmlExpression *QQmlBoundSignal::expression() const { return m_expression; } @@ -148,57 +148,57 @@ QDeclarativeExpression *QDeclarativeBoundSignal::expression() const Sets the signal expression to \a e. Returns the current signal expression, or null if there is no signal expression. - The QDeclarativeBoundSignal instance takes ownership of \a e. The caller is - assumes ownership of the returned QDeclarativeExpression. + The QQmlBoundSignal instance takes ownership of \a e. The caller is + assumes ownership of the returned QQmlExpression. */ -QDeclarativeExpression *QDeclarativeBoundSignal::setExpression(QDeclarativeExpression *e) +QQmlExpression *QQmlBoundSignal::setExpression(QQmlExpression *e) { - QDeclarativeExpression *rv = m_expression; + QQmlExpression *rv = m_expression; m_expression = e; if (m_expression) m_expression->setNotifyOnValueChanged(false); return rv; } -QDeclarativeBoundSignal *QDeclarativeBoundSignal::cast(QObject *o) +QQmlBoundSignal *QQmlBoundSignal::cast(QObject *o) { - QDeclarativeAbstractBoundSignal *s = qobject_cast(o); - return static_cast(s); + QQmlAbstractBoundSignal *s = qobject_cast(o); + return static_cast(s); } -int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a) +int QQmlBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a) { if (c == QMetaObject::InvokeMetaMethod && id == evaluateIdx) { if (!m_expression) return -1; - if (QDeclarativeDebugService::isDebuggingEnabled()) { - QDeclarativeProfilerService::startRange(QDeclarativeProfilerService::HandlingSignal); - QDeclarativeProfilerService::rangeData(QDeclarativeProfilerService::HandlingSignal, QLatin1String(m_signal.signature()) % QLatin1String(": ") % m_expression->expression()); - QDeclarativeProfilerService::rangeLocation(QDeclarativeProfilerService::HandlingSignal, m_expression->sourceFile(), m_expression->lineNumber(), m_expression->columnNumber()); + if (QQmlDebugService::isDebuggingEnabled()) { + QQmlProfilerService::startRange(QQmlProfilerService::HandlingSignal); + QQmlProfilerService::rangeData(QQmlProfilerService::HandlingSignal, QLatin1String(m_signal.signature()) % QLatin1String(": ") % m_expression->expression()); + QQmlProfilerService::rangeLocation(QQmlProfilerService::HandlingSignal, m_expression->sourceFile(), m_expression->lineNumber(), m_expression->columnNumber()); QV8DebugService::instance()->signalEmitted(QString::fromAscii(m_signal.signature())); } m_isEvaluating = true; if (!m_paramsValid) { if (!m_signal.parameterTypes().isEmpty()) - m_params = new QDeclarativeBoundSignalParameters(m_signal, this); + m_params = new QQmlBoundSignalParameters(m_signal, this); m_paramsValid = true; } if (m_params) m_params->setValues(a); if (m_expression && m_expression->engine()) { - QDeclarativeExpressionPrivate::get(m_expression)->value(m_params); + QQmlExpressionPrivate::get(m_expression)->value(m_params); if (m_expression && m_expression->hasError()) - QDeclarativeEnginePrivate::warning(m_expression->engine(), m_expression->error()); + QQmlEnginePrivate::warning(m_expression->engine(), m_expression->error()); } if (m_params) m_params->clearValues(); m_isEvaluating = false; - QDeclarativeProfilerService::endRange(QDeclarativeProfilerService::HandlingSignal); + QQmlProfilerService::endRange(QQmlProfilerService::HandlingSignal); return -1; } else { return QObject::qt_metacall(c, id, a); } } -QDeclarativeBoundSignalParameters::QDeclarativeBoundSignalParameters(const QMetaMethod &method, +QQmlBoundSignalParameters::QQmlBoundSignalParameters(const QMetaMethod &method, QObject *parent) : QObject(parent), types(0), values(0) { @@ -206,8 +206,8 @@ QDeclarativeBoundSignalParameters::QDeclarativeBoundSignalParameters(const QMeta // ### Optimize! QMetaObjectBuilder mob; - mob.setSuperClass(&QDeclarativeBoundSignalParameters::staticMetaObject); - mob.setClassName("QDeclarativeBoundSignalParameters"); + mob.setSuperClass(&QQmlBoundSignalParameters::staticMetaObject); + mob.setClassName("QQmlBoundSignalParameters"); QList paramTypes = method.parameterTypes(); QList paramNames = method.parameterNames(); @@ -222,7 +222,7 @@ QDeclarativeBoundSignalParameters::QDeclarativeBoundSignalParameters(const QMeta } QVariant::Type t = (QVariant::Type)QMetaType::type(type.constData()); - if (QDeclarativeMetaType::isQObject(t)) { + if (QQmlMetaType::isQObject(t)) { types[ii] = QMetaType::QObjectStar; QMetaPropertyBuilder prop = mob.addProperty(name, "QObject*"); prop.setWritable(false); @@ -263,23 +263,23 @@ QDeclarativeBoundSignalParameters::QDeclarativeBoundSignalParameters(const QMeta d_ptr->metaObject = mo; } -QDeclarativeBoundSignalParameters::~QDeclarativeBoundSignalParameters() +QQmlBoundSignalParameters::~QQmlBoundSignalParameters() { delete [] types; free(myMetaObject); } -void QDeclarativeBoundSignalParameters::setValues(void **v) +void QQmlBoundSignalParameters::setValues(void **v) { values = v; } -void QDeclarativeBoundSignalParameters::clearValues() +void QQmlBoundSignalParameters::clearValues() { values = 0; } -int QDeclarativeBoundSignalParameters::metaCall(QMetaObject::Call c, int id, void **a) +int QQmlBoundSignalParameters::metaCall(QMetaObject::Call c, int id, void **a) { if (!values) return -1; @@ -297,4 +297,4 @@ int QDeclarativeBoundSignalParameters::metaCall(QMetaObject::Call c, int id, voi QT_END_NAMESPACE -#include +#include diff --git a/src/declarative/qml/qdeclarativeboundsignal_p.h b/src/qml/qml/qqmlboundsignal_p.h similarity index 69% rename from src/declarative/qml/qdeclarativeboundsignal_p.h rename to src/qml/qml/qqmlboundsignal_p.h index b747d9d7a5..11386159cb 100644 --- a/src/declarative/qml/qdeclarativeboundsignal_p.h +++ b/src/qml/qml/qqmlboundsignal_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEBOUNDSIGNAL_P_H -#define QDECLARATIVEBOUNDSIGNAL_P_H +#ifndef QQMLBOUNDSIGNAL_P_H +#define QQMLBOUNDSIGNAL_P_H // // W A R N I N G @@ -53,7 +53,7 @@ // We mean it. // -#include "qdeclarativeexpression.h" +#include "qqmlexpression.h" #include @@ -61,43 +61,43 @@ QT_BEGIN_NAMESPACE -class Q_DECLARATIVE_EXPORT QDeclarativeAbstractBoundSignal : public QObject +class Q_QML_EXPORT QQmlAbstractBoundSignal : public QObject { Q_OBJECT public: - QDeclarativeAbstractBoundSignal(QObject *parent = 0); - virtual ~QDeclarativeAbstractBoundSignal() = 0; + QQmlAbstractBoundSignal(QObject *parent = 0); + virtual ~QQmlAbstractBoundSignal() = 0; }; -class QDeclarativeBoundSignalParameters; -class Q_DECLARATIVE_EXPORT QDeclarativeBoundSignal : public QDeclarativeAbstractBoundSignal +class QQmlBoundSignalParameters; +class Q_QML_EXPORT QQmlBoundSignal : public QQmlAbstractBoundSignal { public: - QDeclarativeBoundSignal(QObject *scope, const QMetaMethod &signal, QObject *parent); - QDeclarativeBoundSignal(QDeclarativeContext *ctxt, const QString &val, QObject *scope, + QQmlBoundSignal(QObject *scope, const QMetaMethod &signal, QObject *parent); + QQmlBoundSignal(QQmlContext *ctxt, const QString &val, QObject *scope, const QMetaMethod &signal, QObject *parent); - virtual ~QDeclarativeBoundSignal(); + virtual ~QQmlBoundSignal(); int index() const; - QDeclarativeExpression *expression() const; - QDeclarativeExpression *setExpression(QDeclarativeExpression *); + QQmlExpression *expression() const; + QQmlExpression *setExpression(QQmlExpression *); bool isEvaluating() const { return m_isEvaluating; } - static QDeclarativeBoundSignal *cast(QObject *); + static QQmlBoundSignal *cast(QObject *); protected: virtual int qt_metacall(QMetaObject::Call c, int id, void **a); private: - QDeclarativeExpression *m_expression; + QQmlExpression *m_expression; QMetaMethod m_signal; bool m_paramsValid : 1; bool m_isEvaluating : 1; - QDeclarativeBoundSignalParameters *m_params; + QQmlBoundSignalParameters *m_params; }; QT_END_NAMESPACE -#endif // QDECLARATIVEBOUNDSIGNAL_P_H +#endif // QQMLBOUNDSIGNAL_P_H diff --git a/src/declarative/qml/qdeclarativecleanup.cpp b/src/qml/qml/qqmlcleanup.cpp similarity index 65% rename from src/declarative/qml/qdeclarativecleanup.cpp rename to src/qml/qml/qqmlcleanup.cpp index aa7a1e3254..21ea02ee17 100644 --- a/src/declarative/qml/qdeclarativecleanup.cpp +++ b/src/qml/qml/qqmlcleanup.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,35 +39,35 @@ ** ****************************************************************************/ -#include "qdeclarativecleanup_p.h" +#include "qqmlcleanup_p.h" -#include "qdeclarativeengine_p.h" +#include "qqmlengine_p.h" QT_BEGIN_NAMESPACE /*! \internal -\class QDeclarativeCleanup -\brief The QDeclarativeCleanup provides a callback when a QDeclarativeEngine is deleted. +\class QQmlCleanup +\brief The QQmlCleanup provides a callback when a QQmlEngine is deleted. -Any object that needs cleanup to occur before the QDeclarativeEngine's V8 engine is -destroyed should inherit from QDeclarativeCleanup. The clear() virtual method will be -called by QDeclarativeEngine just before it destroys the context. +Any object that needs cleanup to occur before the QQmlEngine's V8 engine is +destroyed should inherit from QQmlCleanup. The clear() virtual method will be +called by QQmlEngine just before it destroys the context. */ /* -Create a QDeclarativeCleanup that is not associated with any engine. +Create a QQmlCleanup that is not associated with any engine. */ -QDeclarativeCleanup::QDeclarativeCleanup() +QQmlCleanup::QQmlCleanup() : prev(0), next(0), engine(0) { } /*! -Create a QDeclarativeCleanup for \a engine +Create a QQmlCleanup for \a engine */ -QDeclarativeCleanup::QDeclarativeCleanup(QDeclarativeEngine *engine) +QQmlCleanup::QQmlCleanup(QQmlEngine *engine) : prev(0), next(0), engine(0) { if (!engine) @@ -80,14 +80,14 @@ QDeclarativeCleanup::QDeclarativeCleanup(QDeclarativeEngine *engine) Adds this object to \a engine's cleanup list. hasEngine() must be false before calling this method. */ -void QDeclarativeCleanup::addToEngine(QDeclarativeEngine *engine) +void QQmlCleanup::addToEngine(QQmlEngine *engine) { Q_ASSERT(engine); - Q_ASSERT(QDeclarativeEnginePrivate::isEngineThread(engine)); + Q_ASSERT(QQmlEnginePrivate::isEngineThread(engine)); this->engine = engine; - QDeclarativeEnginePrivate *p = QDeclarativeEnginePrivate::get(engine); + QQmlEnginePrivate *p = QQmlEnginePrivate::get(engine); if (p->cleanup) next = p->cleanup; p->cleanup = this; @@ -96,18 +96,18 @@ void QDeclarativeCleanup::addToEngine(QDeclarativeEngine *engine) } /*! -\fn bool QDeclarativeCleanup::hasEngine() const +\fn bool QQmlCleanup::hasEngine() const -Returns true if this QDeclarativeCleanup is associated with an engine, otherwise false. +Returns true if this QQmlCleanup is associated with an engine, otherwise false. */ /*! \internal */ -QDeclarativeCleanup::~QDeclarativeCleanup() +QQmlCleanup::~QQmlCleanup() { Q_ASSERT(!prev || engine); - Q_ASSERT(!prev || QDeclarativeEnginePrivate::isEngineThread(engine)); + Q_ASSERT(!prev || QQmlEnginePrivate::isEngineThread(engine)); if (prev) *prev = next; if (next) next->prev = prev; diff --git a/src/declarative/qml/qdeclarativecleanup_p.h b/src/qml/qml/qqmlcleanup_p.h similarity index 78% rename from src/declarative/qml/qdeclarativecleanup_p.h rename to src/qml/qml/qqmlcleanup_p.h index bf84269698..2b7747d630 100644 --- a/src/declarative/qml/qdeclarativecleanup_p.h +++ b/src/qml/qml/qqmlcleanup_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVECLEANUP_P_H -#define QDECLARATIVECLEANUP_P_H +#ifndef QQMLCLEANUP_P_H +#define QQMLCLEANUP_P_H -#include +#include // // W A R N I N G @@ -57,31 +57,31 @@ QT_BEGIN_NAMESPACE -class QDeclarativeEngine; +class QQmlEngine; // Exported for QtQuick1 -class Q_DECLARATIVE_EXPORT QDeclarativeCleanup +class Q_QML_EXPORT QQmlCleanup { public: - QDeclarativeCleanup(); - QDeclarativeCleanup(QDeclarativeEngine *); - virtual ~QDeclarativeCleanup(); + QQmlCleanup(); + QQmlCleanup(QQmlEngine *); + virtual ~QQmlCleanup(); bool hasEngine() const { return prev != 0; } - void addToEngine(QDeclarativeEngine *); + void addToEngine(QQmlEngine *); protected: virtual void clear() = 0; private: - friend class QDeclarativeEnginePrivate; - QDeclarativeCleanup **prev; - QDeclarativeCleanup *next; + friend class QQmlEnginePrivate; + QQmlCleanup **prev; + QQmlCleanup *next; // Only used for asserts - QDeclarativeEngine *engine; + QQmlEngine *engine; }; QT_END_NAMESPACE -#endif // QDECLARATIVECLEANUP_P_H +#endif // QQMLCLEANUP_P_H diff --git a/src/declarative/qml/qdeclarativecompileddata.cpp b/src/qml/qml/qqmlcompileddata.cpp similarity index 68% rename from src/declarative/qml/qdeclarativecompileddata.cpp rename to src/qml/qml/qqmlcompileddata.cpp index 6ace1d3042..6a68784219 100644 --- a/src/declarative/qml/qdeclarativecompileddata.cpp +++ b/src/qml/qml/qqmlcompileddata.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,14 +39,14 @@ ** ****************************************************************************/ -#include "qdeclarativecompiler_p.h" -#include "qdeclarativeengine.h" -#include "qdeclarativecomponent.h" -#include "qdeclarativecomponent_p.h" -#include "qdeclarativecontext.h" -#include "qdeclarativecontext_p.h" +#include "qqmlcompiler_p.h" +#include "qqmlengine.h" +#include "qqmlcomponent.h" +#include "qqmlcomponent_p.h" +#include "qqmlcontext.h" +#include "qqmlcontext_p.h" #ifdef QML_THREADED_VME_INTERPRETER -#include "qdeclarativevme_p.h" +#include "qqmlvme_p.h" #endif #include @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE -int QDeclarativeCompiledData::pack(const char *data, size_t size) +int QQmlCompiledData::pack(const char *data, size_t size) { const char *p = packData.constData(); unsigned int ps = packData.size(); @@ -70,7 +70,7 @@ int QDeclarativeCompiledData::pack(const char *data, size_t size) return rv; } -int QDeclarativeCompiledData::indexForString(const QString &data) +int QQmlCompiledData::indexForString(const QString &data) { int idx = primitives.indexOf(data); if (idx == -1) { @@ -80,7 +80,7 @@ int QDeclarativeCompiledData::indexForString(const QString &data) return idx; } -int QDeclarativeCompiledData::indexForByteArray(const QByteArray &data) +int QQmlCompiledData::indexForByteArray(const QByteArray &data) { int idx = datas.indexOf(data); if (idx == -1) { @@ -90,7 +90,7 @@ int QDeclarativeCompiledData::indexForByteArray(const QByteArray &data) return idx; } -int QDeclarativeCompiledData::indexForUrl(const QUrl &data) +int QQmlCompiledData::indexForUrl(const QUrl &data) { int idx = urls.indexOf(data); if (idx == -1) { @@ -100,7 +100,7 @@ int QDeclarativeCompiledData::indexForUrl(const QUrl &data) return idx; } -QDeclarativeCompiledData::QDeclarativeCompiledData(QDeclarativeEngine *engine) +QQmlCompiledData::QQmlCompiledData(QQmlEngine *engine) : engine(engine), importCache(0), root(0), rootPropertyCache(0) { Q_ASSERT(engine); @@ -108,15 +108,15 @@ QDeclarativeCompiledData::QDeclarativeCompiledData(QDeclarativeEngine *engine) bytecode.reserve(1024); } -void QDeclarativeCompiledData::destroy() +void QQmlCompiledData::destroy() { if (engine && hasEngine()) - QDeclarativeEnginePrivate::deleteInEngineThread(engine, this); + QQmlEnginePrivate::deleteInEngineThread(engine, this); else delete this; } -QDeclarativeCompiledData::~QDeclarativeCompiledData() +QQmlCompiledData::~QQmlCompiledData() { clear(); @@ -143,13 +143,13 @@ QDeclarativeCompiledData::~QDeclarativeCompiledData() rootPropertyCache->release(); } -void QDeclarativeCompiledData::clear() +void QQmlCompiledData::clear() { for (int ii = 0; ii < programs.count(); ++ii) qPersistentDispose(programs[ii].bindings); } -const QMetaObject *QDeclarativeCompiledData::TypeReference::metaObject() const +const QMetaObject *QQmlCompiledData::TypeReference::metaObject() const { if (type) { return type->metaObject(); @@ -162,7 +162,7 @@ const QMetaObject *QDeclarativeCompiledData::TypeReference::metaObject() const /*! Returns the property cache, if one alread exists. The cache is not referenced. */ -QDeclarativePropertyCache *QDeclarativeCompiledData::TypeReference::propertyCache() const +QQmlPropertyCache *QQmlCompiledData::TypeReference::propertyCache() const { if (type) return typePropertyCache; @@ -173,12 +173,12 @@ QDeclarativePropertyCache *QDeclarativeCompiledData::TypeReference::propertyCach /*! Returns the property cache, creating one if it doesn't already exist. The cache is not referenced. */ -QDeclarativePropertyCache *QDeclarativeCompiledData::TypeReference::createPropertyCache(QDeclarativeEngine *engine) +QQmlPropertyCache *QQmlCompiledData::TypeReference::createPropertyCache(QQmlEngine *engine) { if (typePropertyCache) { return typePropertyCache; } else if (type) { - typePropertyCache = QDeclarativeEnginePrivate::get(engine)->cache(type->metaObject()); + typePropertyCache = QQmlEnginePrivate::get(engine)->cache(type->metaObject()); typePropertyCache->addref(); return typePropertyCache; } else { @@ -187,7 +187,7 @@ QDeclarativePropertyCache *QDeclarativeCompiledData::TypeReference::createProper } -void QDeclarativeCompiledData::dumpInstructions() +void QQmlCompiledData::dumpInstructions() { if (!name.isEmpty()) qWarning() << name; @@ -199,63 +199,63 @@ void QDeclarativeCompiledData::dumpInstructions() int instructionCount = 0; while (instructionStream < endInstructionStream) { - QDeclarativeInstruction *instr = (QDeclarativeInstruction *)instructionStream; + QQmlInstruction *instr = (QQmlInstruction *)instructionStream; dump(instr, instructionCount); - instructionStream += QDeclarativeInstruction::size(instructionType(instr)); + instructionStream += QQmlInstruction::size(instructionType(instr)); instructionCount++; } qWarning().nospace() << "-------------------------------------------------------------------------------"; } -int QDeclarativeCompiledData::addInstructionHelper(QDeclarativeInstruction::Type type, QDeclarativeInstruction &instr) +int QQmlCompiledData::addInstructionHelper(QQmlInstruction::Type type, QQmlInstruction &instr) { #ifdef QML_THREADED_VME_INTERPRETER - instr.common.code = QDeclarativeVME::instructionJumpTable()[static_cast(type)]; + instr.common.code = QQmlVME::instructionJumpTable()[static_cast(type)]; #else instr.common.instructionType = type; #endif int ptrOffset = bytecode.size(); - int size = QDeclarativeInstruction::size(type); + int size = QQmlInstruction::size(type); if (bytecode.capacity() <= bytecode.size() + size) bytecode.reserve(bytecode.size() + size + 512); bytecode.append(reinterpret_cast(&instr), size); return ptrOffset; } -int QDeclarativeCompiledData::nextInstructionIndex() +int QQmlCompiledData::nextInstructionIndex() { return bytecode.size(); } -QDeclarativeInstruction *QDeclarativeCompiledData::instruction(int index) +QQmlInstruction *QQmlCompiledData::instruction(int index) { - return (QDeclarativeInstruction *)(bytecode.constData() + index); + return (QQmlInstruction *)(bytecode.constData() + index); } -QDeclarativeInstruction::Type QDeclarativeCompiledData::instructionType(const QDeclarativeInstruction *instr) +QQmlInstruction::Type QQmlCompiledData::instructionType(const QQmlInstruction *instr) { #ifdef QML_THREADED_VME_INTERPRETER - void **jumpTable = QDeclarativeVME::instructionJumpTable(); + void **jumpTable = QQmlVME::instructionJumpTable(); void *code = instr->common.code; # define QML_CHECK_INSTR_CODE(I, FMT) \ - if (jumpTable[static_cast(QDeclarativeInstruction::I)] == code) \ - return QDeclarativeInstruction::I; + if (jumpTable[static_cast(QQmlInstruction::I)] == code) \ + return QQmlInstruction::I; FOR_EACH_QML_INSTR(QML_CHECK_INSTR_CODE) Q_ASSERT_X(false, Q_FUNC_INFO, "Invalid instruction address"); - return static_cast(0); + return static_cast(0); # undef QML_CHECK_INSTR_CODE #else - return static_cast(instr->common.instructionType); + return static_cast(instr->common.instructionType); #endif } -void QDeclarativeCompiledData::initialize(QDeclarativeEngine *engine) +void QQmlCompiledData::initialize(QQmlEngine *engine) { Q_ASSERT(!hasEngine()); - QDeclarativeCleanup::addToEngine(engine); + QQmlCleanup::addToEngine(engine); } QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/qml/qml/qqmlcompiler.cpp similarity index 85% rename from src/declarative/qml/qdeclarativecompiler.cpp rename to src/qml/qml/qqmlcompiler.cpp index c4efc85461..65247e1e80 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,28 +39,28 @@ ** ****************************************************************************/ -#include "qdeclarativecompiler_p.h" +#include "qqmlcompiler_p.h" -#include "qdeclarativepropertyvaluesource.h" -#include "qdeclarativecomponent.h" +#include "qqmlpropertyvaluesource.h" +#include "qqmlcomponent.h" #include #include -#include "qdeclarativestringconverters_p.h" -#include "qdeclarativeengine_p.h" -#include "qdeclarativeengine.h" -#include "qdeclarativecontext.h" -#include "qdeclarativemetatype_p.h" -#include "qdeclarativecustomparser_p_p.h" -#include "qdeclarativecontext_p.h" -#include "qdeclarativecomponent_p.h" -#include -#include "qdeclarativevmemetaobject_p.h" -#include "qdeclarativeexpression_p.h" -#include "qdeclarativeproperty_p.h" -#include "qdeclarativerewrite_p.h" -#include "qdeclarativescriptstring.h" -#include "qdeclarativeglobal_p.h" -#include "qdeclarativebinding_p.h" +#include "qqmlstringconverters_p.h" +#include "qqmlengine_p.h" +#include "qqmlengine.h" +#include "qqmlcontext.h" +#include "qqmlmetatype_p.h" +#include "qqmlcustomparser_p_p.h" +#include "qqmlcontext_p.h" +#include "qqmlcomponent_p.h" +#include +#include "qqmlvmemetaobject_p.h" +#include "qqmlexpression_p.h" +#include "qqmlproperty_p.h" +#include "qqmlrewrite_p.h" +#include "qqmlscriptstring.h" +#include "qqmlglobal_p.h" +#include "qqmlbinding_p.h" #include #include @@ -83,9 +83,9 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(compilerDump, QML_COMPILER_DUMP); DEFINE_BOOL_CONFIG_OPTION(compilerStatDump, QML_COMPILER_STATS); -using namespace QDeclarativeJS; -using namespace QDeclarativeScript; -using namespace QDeclarativeCompilerTypes; +using namespace QQmlJS; +using namespace QQmlScript; +using namespace QQmlCompilerTypes; static QString id_string(QLatin1String("id")); static QString on_string(QLatin1String("on")); @@ -96,9 +96,9 @@ static QString qsTr_string(QLatin1String("qsTr")); static QString qsTrId_string(QLatin1String("qsTrId")); /*! - Instantiate a new QDeclarativeCompiler. + Instantiate a new QQmlCompiler. */ -QDeclarativeCompiler::QDeclarativeCompiler(QDeclarativePool *pool) +QQmlCompiler::QQmlCompiler(QQmlPool *pool) : pool(pool), output(0), engine(0), unitRoot(0), unit(0), cachedComponentTypeRef(-1), cachedTranslationContextIndex(-1), componentStats(0) { @@ -111,7 +111,7 @@ QDeclarativeCompiler::QDeclarativeCompiler(QDeclarativePool *pool) \sa errors() */ -bool QDeclarativeCompiler::isError() const +bool QQmlCompiler::isError() const { return !exceptions.isEmpty(); } @@ -120,7 +120,7 @@ bool QDeclarativeCompiler::isError() const Return the list of errors from the last call to compile(), or an empty list if there were no errors. */ -QList QDeclarativeCompiler::errors() const +QList QQmlCompiler::errors() const { return exceptions; } @@ -130,12 +130,12 @@ QList QDeclarativeCompiler::errors() const Attached property names are those that start with a capital letter. */ -bool QDeclarativeCompiler::isAttachedPropertyName(const QString &name) +bool QQmlCompiler::isAttachedPropertyName(const QString &name) { return isAttachedPropertyName(QHashedStringRef(&name)); } -bool QDeclarativeCompiler::isAttachedPropertyName(const QHashedStringRef &name) +bool QQmlCompiler::isAttachedPropertyName(const QHashedStringRef &name) { return !name.isEmpty() && name.at(0).isUpper(); } @@ -151,12 +151,12 @@ bool QDeclarativeCompiler::isAttachedPropertyName(const QHashedStringRef &name) character codes in property names, for simplicity and performance reasons QML only supports letters, numbers and underscores. */ -bool QDeclarativeCompiler::isSignalPropertyName(const QString &name) +bool QQmlCompiler::isSignalPropertyName(const QString &name) { return isSignalPropertyName(QStringRef(&name)); } -bool QDeclarativeCompiler::isSignalPropertyName(const QHashedStringRef &name) +bool QQmlCompiler::isSignalPropertyName(const QHashedStringRef &name) { if (name.length() < 3) return false; if (!name.startsWith(on_string)) return false; @@ -173,7 +173,7 @@ bool QDeclarativeCompiler::isSignalPropertyName(const QHashedStringRef &name) /*! \macro COMPILE_EXCEPTION \internal - Inserts an error into the QDeclarativeCompiler error list, and returns false + Inserts an error into the QQmlCompiler error list, and returns false (failure). \a token is used to source the error line and column, and \a desc is the @@ -187,7 +187,7 @@ bool QDeclarativeCompiler::isSignalPropertyName(const QHashedStringRef &name) */ #define COMPILE_EXCEPTION_LOCATION(line, column, desc) \ { \ - QDeclarativeError error; \ + QQmlError error; \ error.setUrl(output->url); \ error.setLine(line); \ error.setColumn(column); \ @@ -216,10 +216,10 @@ bool QDeclarativeCompiler::isSignalPropertyName(const QHashedStringRef &name) This test corresponds to action taken by genLiteralAssignment(). Any change made here, must have a corresponding action in genLiteralAssigment(). */ -bool QDeclarativeCompiler::testLiteralAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Value *v) +bool QQmlCompiler::testLiteralAssignment(QQmlScript::Property *prop, + QQmlScript::Value *v) { - const QDeclarativeScript::Variant &value = v->value; + const QQmlScript::Variant &value = v->value; if (!prop->core.isWritable() && !prop->isReadOnlyDeclaration) COMPILE_EXCEPTION(v, tr("Invalid property assignment: \"%1\" is a read-only property").arg(prop->name().toString())); @@ -236,7 +236,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(QDeclarativeScript::Property *p if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: unknown enumeration")); - v->value = QDeclarativeScript::Variant((double)enumValue); + v->value = QQmlScript::Variant((double)enumValue); return true; } @@ -291,7 +291,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(QDeclarativeScript::Property *p case QVariant::Color: { bool ok; - QDeclarativeStringConverters::colorFromString(value.asString(), &ok); + QQmlStringConverters::colorFromString(value.asString(), &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: color expected")); } break; @@ -299,21 +299,21 @@ bool QDeclarativeCompiler::testLiteralAssignment(QDeclarativeScript::Property *p case QVariant::Date: { bool ok; - QDeclarativeStringConverters::dateFromString(value.asString(), &ok); + QQmlStringConverters::dateFromString(value.asString(), &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: date expected")); } break; case QVariant::Time: { bool ok; - QDeclarativeStringConverters::timeFromString(value.asString(), &ok); + QQmlStringConverters::timeFromString(value.asString(), &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: time expected")); } break; case QVariant::DateTime: { bool ok; - QDeclarativeStringConverters::dateTimeFromString(value.asString(), &ok); + QQmlStringConverters::dateTimeFromString(value.asString(), &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: datetime expected")); } break; @@ -322,7 +322,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(QDeclarativeScript::Property *p case QVariant::PointF: { bool ok; - QDeclarativeStringConverters::pointFFromString(value.asString(), &ok); + QQmlStringConverters::pointFFromString(value.asString(), &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: point expected")); } break; @@ -330,7 +330,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(QDeclarativeScript::Property *p case QVariant::SizeF: { bool ok; - QDeclarativeStringConverters::sizeFFromString(value.asString(), &ok); + QQmlStringConverters::sizeFFromString(value.asString(), &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: size expected")); } break; @@ -338,7 +338,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(QDeclarativeScript::Property *p case QVariant::RectF: { bool ok; - QDeclarativeStringConverters::rectFFromString(value.asString(), &ok); + QQmlStringConverters::rectFFromString(value.asString(), &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: rect expected")); } break; @@ -350,14 +350,14 @@ bool QDeclarativeCompiler::testLiteralAssignment(QDeclarativeScript::Property *p case QVariant::Vector3D: { bool ok; - QDeclarativeStringConverters::vector3DFromString(value.asString(), &ok); + QQmlStringConverters::vector3DFromString(value.asString(), &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: 3D vector expected")); } break; case QVariant::Vector4D: { bool ok; - QDeclarativeStringConverters::vector4DFromString(value.asString(), &ok); + QQmlStringConverters::vector4DFromString(value.asString(), &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: 4D vector expected")); } break; @@ -398,7 +398,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(QDeclarativeScript::Property *p } // otherwise, check for existence of string converter to custom type - QDeclarativeMetaType::StringConverter converter = QDeclarativeMetaType::customStringConverter(type); + QQmlMetaType::StringConverter converter = QQmlMetaType::customStringConverter(type); if (!converter) COMPILE_EXCEPTION(v, tr("Invalid property assignment: unsupported type \"%1\"").arg(QString::fromLatin1(QVariant::typeToName((QVariant::Type)type)))); } @@ -421,8 +421,8 @@ static QUrl urlFromUserString(const QString &data) Any literal assignment that is approved in testLiteralAssignment() must have a corresponding action in this method. */ -void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Value *v) +void QQmlCompiler::genLiteralAssignment(QQmlScript::Property *prop, + QQmlScript::Value *v) { if (prop->core.isEnum()) { Q_ASSERT(v->value.isNumber()); @@ -563,7 +563,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr case QVariant::Color: { Instruction::StoreColor instr; - QColor c = QDeclarativeStringConverters::colorFromString(v->value.asString()); + QColor c = QQmlStringConverters::colorFromString(v->value.asString()); instr.propertyIndex = prop->index; instr.value = c.rgba(); output->addInstruction(instr); @@ -573,7 +573,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr case QVariant::Date: { Instruction::StoreDate instr; - QDate d = QDeclarativeStringConverters::dateFromString(v->value.asString()); + QDate d = QQmlStringConverters::dateFromString(v->value.asString()); instr.propertyIndex = prop->index; instr.value = d.toJulianDay(); output->addInstruction(instr); @@ -582,7 +582,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr case QVariant::Time: { Instruction::StoreTime instr; - QTime time = QDeclarativeStringConverters::timeFromString(v->value.asString()); + QTime time = QQmlStringConverters::timeFromString(v->value.asString()); instr.propertyIndex = prop->index; Q_ASSERT(sizeof(instr.time) == sizeof(QTime)); ::memcpy(&instr.time, &time, sizeof(QTime)); @@ -592,7 +592,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr case QVariant::DateTime: { Instruction::StoreDateTime instr; - QDateTime dateTime = QDeclarativeStringConverters::dateTimeFromString(v->value.asString()); + QDateTime dateTime = QQmlStringConverters::dateTimeFromString(v->value.asString()); QTime time = dateTime.time(); instr.propertyIndex = prop->index; instr.date = dateTime.date().toJulianDay(); @@ -606,7 +606,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr { Instruction::StorePoint instr; bool ok; - QPoint point = QDeclarativeStringConverters::pointFFromString(v->value.asString(), &ok).toPoint(); + QPoint point = QQmlStringConverters::pointFFromString(v->value.asString(), &ok).toPoint(); instr.propertyIndex = prop->index; instr.point.xp = point.x(); instr.point.yp = point.y(); @@ -617,7 +617,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr { Instruction::StorePointF instr; bool ok; - QPointF point = QDeclarativeStringConverters::pointFFromString(v->value.asString(), &ok); + QPointF point = QQmlStringConverters::pointFFromString(v->value.asString(), &ok); instr.propertyIndex = prop->index; instr.point.xp = point.x(); instr.point.yp = point.y(); @@ -628,7 +628,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr { Instruction::StoreSize instr; bool ok; - QSize size = QDeclarativeStringConverters::sizeFFromString(v->value.asString(), &ok).toSize(); + QSize size = QQmlStringConverters::sizeFFromString(v->value.asString(), &ok).toSize(); instr.propertyIndex = prop->index; instr.size.wd = size.width(); instr.size.ht = size.height(); @@ -639,7 +639,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr { Instruction::StoreSizeF instr; bool ok; - QSizeF size = QDeclarativeStringConverters::sizeFFromString(v->value.asString(), &ok); + QSizeF size = QQmlStringConverters::sizeFFromString(v->value.asString(), &ok); instr.propertyIndex = prop->index; instr.size.wd = size.width(); instr.size.ht = size.height(); @@ -650,7 +650,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr { Instruction::StoreRect instr; bool ok; - QRect rect = QDeclarativeStringConverters::rectFFromString(v->value.asString(), &ok).toRect(); + QRect rect = QQmlStringConverters::rectFFromString(v->value.asString(), &ok).toRect(); instr.propertyIndex = prop->index; instr.rect.x1 = rect.left(); instr.rect.y1 = rect.top(); @@ -663,7 +663,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr { Instruction::StoreRectF instr; bool ok; - QRectF rect = QDeclarativeStringConverters::rectFFromString(v->value.asString(), &ok); + QRectF rect = QQmlStringConverters::rectFFromString(v->value.asString(), &ok); instr.propertyIndex = prop->index; instr.rect.xp = rect.left(); instr.rect.yp = rect.top(); @@ -685,7 +685,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr { Instruction::StoreVector3D instr; bool ok; - QVector3D vector = QDeclarativeStringConverters::vector3DFromString(v->value.asString(), &ok); + QVector3D vector = QQmlStringConverters::vector3DFromString(v->value.asString(), &ok); instr.propertyIndex = prop->index; instr.vector.xp = vector.x(); instr.vector.yp = vector.y(); @@ -697,7 +697,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr { Instruction::StoreVector4D instr; bool ok; - QVector4D vector = QDeclarativeStringConverters::vector4DFromString(v->value.asString(), &ok); + QVector4D vector = QQmlStringConverters::vector4DFromString(v->value.asString(), &ok); instr.propertyIndex = prop->index; instr.vector.xp = vector.x(); instr.vector.yp = vector.y(); @@ -756,9 +756,9 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr } /*! - Resets data by clearing the lists that the QDeclarativeCompiler modifies. + Resets data by clearing the lists that the QQmlCompiler modifies. */ -void QDeclarativeCompiler::reset(QDeclarativeCompiledData *data) +void QQmlCompiler::reset(QQmlCompiledData *data) { data->types.clear(); data->primitives.clear(); @@ -767,8 +767,8 @@ void QDeclarativeCompiler::reset(QDeclarativeCompiledData *data) } /*! - Compile \a unit, and store the output in \a out. \a engine is the QDeclarativeEngine - with which the QDeclarativeCompiledData will be associated. + Compile \a unit, and store the output in \a out. \a engine is the QQmlEngine + with which the QQmlCompiledData will be associated. Returns true on success, false on failure. On failure, the compile errors are available from errors(). @@ -777,33 +777,33 @@ void QDeclarativeCompiler::reset(QDeclarativeCompiledData *data) (eg. QML_COMPILER_DUMP=1) the compiled instructions will be dumped to stderr on a successful compiler. */ -bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine, - QDeclarativeTypeData *unit, - QDeclarativeCompiledData *out) +bool QQmlCompiler::compile(QQmlEngine *engine, + QQmlTypeData *unit, + QQmlCompiledData *out) { exceptions.clear(); Q_ASSERT(out); reset(out); - QDeclarativeScript::Object *root = unit->parser().tree(); + QQmlScript::Object *root = unit->parser().tree(); Q_ASSERT(root); this->engine = engine; - this->enginePrivate = QDeclarativeEnginePrivate::get(engine); + this->enginePrivate = QQmlEnginePrivate::get(engine); this->unit = unit; this->unitRoot = root; this->output = out; // Compile types - const QList &resolvedTypes = unit->resolvedTypes(); - QList referencedTypes = unit->parser().referencedTypes(); + const QList &resolvedTypes = unit->resolvedTypes(); + QList referencedTypes = unit->parser().referencedTypes(); for (int ii = 0; ii < resolvedTypes.count(); ++ii) { - QDeclarativeCompiledData::TypeReference ref; + QQmlCompiledData::TypeReference ref; - const QDeclarativeTypeData::TypeReference &tref = resolvedTypes.at(ii); - QDeclarativeScript::TypeReference *parserRef = referencedTypes.at(ii); + const QQmlTypeData::TypeReference &tref = resolvedTypes.at(ii); + QQmlScript::TypeReference *parserRef = referencedTypes.at(ii); if (tref.type) { ref.type = tref.type; @@ -815,7 +815,7 @@ bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine, } if (ref.type->containsRevisionedAttributes()) { - QDeclarativeError cacheError; + QQmlError cacheError; ref.typePropertyCache = enginePrivate->cache(ref.type, resolvedTypes.at(ii).minorVersion, cacheError); if (!ref.typePropertyCache) @@ -854,7 +854,7 @@ bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine, return !isError(); } -void QDeclarativeCompiler::compileTree(QDeclarativeScript::Object *tree) +void QQmlCompiler::compileTree(QQmlScript::Object *tree) { compileState = pool->New(); @@ -865,13 +865,13 @@ void QDeclarativeCompiler::compileTree(QDeclarativeScript::Object *tree) // We generate the importCache before we build the tree so that // it can be used in the binding compiler. Given we "expect" the // QML compilation to succeed, this isn't a waste. - output->importCache = new QDeclarativeTypeNameCache(); + output->importCache = new QQmlTypeNameCache(); foreach (const QString &ns, unit->namespaces()) { output->importCache->add(ns); } int scriptIndex = 0; - foreach (const QDeclarativeTypeData::ScriptReference &script, unit->resolvedScripts()) { + foreach (const QQmlTypeData::ScriptReference &script, unit->resolvedScripts()) { QString qualifier = script.qualifier; QString enclosingNamespace; @@ -901,11 +901,11 @@ void QDeclarativeCompiler::compileTree(QDeclarativeScript::Object *tree) init.compiledBinding = output->indexForByteArray(compileState->compiledBindingData); output->addInstruction(init); - foreach (const QDeclarativeTypeData::ScriptReference &script, unit->resolvedScripts()) { + foreach (const QQmlTypeData::ScriptReference &script, unit->resolvedScripts()) { Instruction::StoreImportedScript import; import.value = output->scripts.count(); - QDeclarativeScriptData *scriptData = script.script->scriptData(); + QQmlScriptData *scriptData = script.script->scriptData(); scriptData->addref(); output->scripts << scriptData; output->addInstruction(import); @@ -915,7 +915,7 @@ void QDeclarativeCompiler::compileTree(QDeclarativeScript::Object *tree) Instruction::InitV8Bindings bindings; int index = output->programs.count(); - typedef QDeclarativeCompiledData::V8Program V8Program; + typedef QQmlCompiledData::V8Program V8Program; output->programs.append(V8Program(compileState->v8BindingProgram, output)); bindings.programIndex = index; @@ -952,28 +952,28 @@ static bool QStringList_contains(const QStringList &list, const QHashedStringRef return false; } -bool QDeclarativeCompiler::buildObject(QDeclarativeScript::Object *obj, const BindingContext &ctxt) +bool QQmlCompiler::buildObject(QQmlScript::Object *obj, const BindingContext &ctxt) { if (componentStats) componentStats->componentStat.objects++; Q_ASSERT (obj->type != -1); - const QDeclarativeCompiledData::TypeReference &tr = output->types.at(obj->type); + const QQmlCompiledData::TypeReference &tr = output->types.at(obj->type); obj->metatype = tr.metaObject(); if (tr.type) obj->typeName = tr.type->qmlTypeName(); // This object is a "Component" element - if (tr.type && obj->metatype == &QDeclarativeComponent::staticMetaObject) { + if (tr.type && obj->metatype == &QQmlComponent::staticMetaObject) { COMPILE_CHECK(buildComponent(obj, ctxt)); return true; } if (tr.component) { - typedef QDeclarativeInstruction I; + typedef QQmlInstruction I; const I *init = ((const I *)tr.component->bytecode.constData()); - Q_ASSERT(init && tr.component->instructionType(init) == QDeclarativeInstruction::Init); + Q_ASSERT(init && tr.component->instructionType(init) == QQmlInstruction::Init); // Adjust stack depths to include nested components compileState->objectDepth.pushPop(init->init.objectStackSize); @@ -992,8 +992,8 @@ bool QDeclarativeCompiler::buildObject(QDeclarativeScript::Object *obj, const Bi COMPILE_CHECK(mergeDynamicMetaProperties(obj)); COMPILE_CHECK(buildDynamicMeta(obj, IgnoreAliases)); - // Find the native type and check for the QDeclarativeParserStatus interface - QDeclarativeType *type = toQmlType(obj); + // Find the native type and check for the QQmlParserStatus interface + QQmlType *type = toQmlType(obj); Q_ASSERT(type); obj->parserStatusCast = type->parserStatusCast(); if (obj->parserStatusCast != -1) @@ -1004,7 +1004,7 @@ bool QDeclarativeCompiler::buildObject(QDeclarativeScript::Object *obj, const Bi // compiled by the type. bool isCustomParser = output->types.at(obj->type).type && output->types.at(obj->type).type->customParser() != 0; - QList customProps; + QList customProps; // Fetch the list of deferred properties QStringList deferredList = deferredProperties(obj); @@ -1094,7 +1094,7 @@ bool QDeclarativeCompiler::buildObject(QDeclarativeScript::Object *obj, const Bi } } - QDeclarativeCustomParser *cp = 0; + QQmlCustomParser *cp = 0; if (isCustomParser) cp = output->types.at(obj->type).type->customParser(); @@ -1109,16 +1109,16 @@ bool QDeclarativeCompiler::buildObject(QDeclarativeScript::Object *obj, const Bi bool canDefer = false; if (isCustomParser) { if (doesPropertyExist(prop, obj) && - (!(cp->flags() & QDeclarativeCustomParser::AcceptsAttachedProperties) || + (!(cp->flags() & QQmlCustomParser::AcceptsAttachedProperties) || !isAttachedPropertyName(prop->name()))) { int ids = compileState->ids.count(); COMPILE_CHECK(buildProperty(prop, obj, objCtxt)); canDefer = ids == compileState->ids.count(); } else if (isSignalPropertyName(prop->name()) && - (cp->flags() & QDeclarativeCustomParser::AcceptsSignalHandlers)) { + (cp->flags() & QQmlCustomParser::AcceptsSignalHandlers)) { COMPILE_CHECK(buildSignal(prop,obj,objCtxt)); } else { - customProps << QDeclarativeCustomParserNodePrivate::fromProperty(prop); + customProps << QQmlCustomParserNodePrivate::fromProperty(prop); } } else { if (isSignalPropertyName(prop->name())) { @@ -1146,7 +1146,7 @@ bool QDeclarativeCompiler::buildObject(QDeclarativeScript::Object *obj, const Bi COMPILE_CHECK(buildProperty(prop, obj, objCtxt)); canDefer = ids == compileState->ids.count(); } else { - customProps << QDeclarativeCustomParserNodePrivate::fromProperty(prop); + customProps << QQmlCustomParserNodePrivate::fromProperty(prop); } } else { int ids = compileState->ids.count(); @@ -1166,7 +1166,7 @@ bool QDeclarativeCompiler::buildObject(QDeclarativeScript::Object *obj, const Bi obj->custom = cp->compile(customProps); cp->compiler = 0; cp->object = 0; - foreach (QDeclarativeError err, cp->errors()) { + foreach (QQmlError err, cp->errors()) { err.setUrl(output->url); exceptions << err; } @@ -1177,10 +1177,10 @@ bool QDeclarativeCompiler::buildObject(QDeclarativeScript::Object *obj, const Bi return true; } -void QDeclarativeCompiler::genObject(QDeclarativeScript::Object *obj) +void QQmlCompiler::genObject(QQmlScript::Object *obj) { - QDeclarativeCompiledData::TypeReference &tr = output->types[obj->type]; - if (tr.type && obj->metatype == &QDeclarativeComponent::staticMetaObject) { + QQmlCompiledData::TypeReference &tr = output->types[obj->type]; + if (tr.type && obj->metatype == &QQmlComponent::staticMetaObject) { genComponent(obj); return; } @@ -1237,18 +1237,18 @@ void QDeclarativeCompiler::genObject(QDeclarativeScript::Object *obj) meta.aliasData = output->indexForByteArray(obj->synthdata); meta.propertyCache = output->propertyCaches.count(); - QDeclarativePropertyCache *propertyCache = obj->synthCache; + QQmlPropertyCache *propertyCache = obj->synthCache; Q_ASSERT(propertyCache); propertyCache->addref(); // Add flag for alias properties if (!obj->synthdata.isEmpty()) { - const QDeclarativeVMEMetaData *vmeMetaData = - reinterpret_cast(obj->synthdata.constData()); + const QQmlVMEMetaData *vmeMetaData = + reinterpret_cast(obj->synthdata.constData()); for (int ii = 0; ii < vmeMetaData->aliasCount; ++ii) { int index = obj->metaObject()->propertyOffset() + vmeMetaData->propertyCount + ii; - QDeclarativePropertyData *data = propertyCache->property(index); - data->setFlags(data->getFlags() | QDeclarativePropertyData::IsAlias); + QQmlPropertyData *data = propertyCache->property(index); + data->setFlags(data->getFlags() | QQmlPropertyData::IsAlias); } } @@ -1282,7 +1282,7 @@ void QDeclarativeCompiler::genObject(QDeclarativeScript::Object *obj) genObjectBody(obj); } -void QDeclarativeCompiler::genObjectBody(QDeclarativeScript::Object *obj) +void QQmlCompiler::genObjectBody(QQmlScript::Object *obj) { for (Property *prop = obj->scriptStringProperties.first(); prop; prop = Object::PropertyList::next(prop)) { Q_ASSERT(prop->scriptStringScope != -1); @@ -1335,7 +1335,7 @@ void QDeclarativeCompiler::genObjectBody(QDeclarativeScript::Object *obj) for (Property *prop = obj->signalProperties.first(); prop; prop = Object::PropertyList::next(prop)) { - QDeclarativeScript::Value *v = prop->values.first(); + QQmlScript::Value *v = prop->values.first(); if (v->type == Value::SignalObject) { @@ -1411,7 +1411,7 @@ void QDeclarativeCompiler::genObjectBody(QDeclarativeScript::Object *obj) } } -void QDeclarativeCompiler::genValueTypeProperty(QDeclarativeScript::Object *obj,QDeclarativeScript::Property *prop) +void QQmlCompiler::genValueTypeProperty(QQmlScript::Object *obj,QQmlScript::Property *prop) { Instruction::FetchValueType fetch; fetch.property = prop->index; @@ -1442,9 +1442,9 @@ void QDeclarativeCompiler::genValueTypeProperty(QDeclarativeScript::Object *obj, output->addInstruction(pop); } -void QDeclarativeCompiler::genComponent(QDeclarativeScript::Object *obj) +void QQmlCompiler::genComponent(QQmlScript::Object *obj) { - QDeclarativeScript::Object *root = obj->defaultProperty->values.first()->object; + QQmlScript::Object *root = obj->defaultProperty->values.first()->object; Q_ASSERT(root); Instruction::CreateComponent create; @@ -1474,7 +1474,7 @@ void QDeclarativeCompiler::genComponent(QDeclarativeScript::Object *obj) Instruction::InitV8Bindings bindings; int index = output->programs.count(); - typedef QDeclarativeCompiledData::V8Program V8Program; + typedef QQmlCompiledData::V8Program V8Program; output->programs.append(V8Program(compileState->v8BindingProgram, output)); bindings.programIndex = index; @@ -1508,7 +1508,7 @@ void QDeclarativeCompiler::genComponent(QDeclarativeScript::Object *obj) } } -bool QDeclarativeCompiler::buildComponent(QDeclarativeScript::Object *obj, +bool QQmlCompiler::buildComponent(QQmlScript::Object *obj, const BindingContext &ctxt) { // The special "Component" element can only have the id property and a @@ -1552,7 +1552,7 @@ bool QDeclarativeCompiler::buildComponent(QDeclarativeScript::Object *obj, if (!obj->dynamicSlots.isEmpty()) COMPILE_EXCEPTION(obj, tr("Component objects cannot declare new functions.")); - QDeclarativeScript::Object *root = 0; + QQmlScript::Object *root = 0; if (obj->defaultProperty && !obj->defaultProperty->values.isEmpty()) root = obj->defaultProperty->values.first()->object; @@ -1567,7 +1567,7 @@ bool QDeclarativeCompiler::buildComponent(QDeclarativeScript::Object *obj, return true; } -bool QDeclarativeCompiler::buildComponentFromRoot(QDeclarativeScript::Object *obj, +bool QQmlCompiler::buildComponentFromRoot(QQmlScript::Object *obj, const BindingContext &ctxt) { ComponentCompileState *oldComponentCompileState = compileState; @@ -1603,7 +1603,7 @@ bool QDeclarativeCompiler::buildComponentFromRoot(QDeclarativeScript::Object *ob // Build a sub-object. A sub-object is one that was not created directly by // QML - such as a grouped property object, or an attached object. Sub-object's // can't have an id, involve a custom parser, have attached properties etc. -bool QDeclarativeCompiler::buildSubObject(QDeclarativeScript::Object *obj, const BindingContext &ctxt) +bool QQmlCompiler::buildSubObject(QQmlScript::Object *obj, const BindingContext &ctxt) { Q_ASSERT(obj->metatype); Q_ASSERT(!obj->defaultProperty); @@ -1621,17 +1621,17 @@ bool QDeclarativeCompiler::buildSubObject(QDeclarativeScript::Object *obj, const return true; } -int QDeclarativeCompiler::componentTypeRef() +int QQmlCompiler::componentTypeRef() { if (cachedComponentTypeRef == -1) { - QDeclarativeType *t = QDeclarativeMetaType::qmlType(Component_import_string,1,0); + QQmlType *t = QQmlMetaType::qmlType(Component_import_string,1,0); for (int ii = output->types.count() - 1; ii >= 0; --ii) { if (output->types.at(ii).type == t) { cachedComponentTypeRef = ii; return ii; } } - QDeclarativeCompiledData::TypeReference ref; + QQmlCompiledData::TypeReference ref; ref.className = Component_string; ref.type = t; output->types << ref; @@ -1640,7 +1640,7 @@ int QDeclarativeCompiler::componentTypeRef() return cachedComponentTypeRef; } -int QDeclarativeCompiler::translationContextIndex() +int QQmlCompiler::translationContextIndex() { if (cachedTranslationContextIndex == -1) { // This code must match that in the qsTr() implementation @@ -1654,7 +1654,7 @@ int QDeclarativeCompiler::translationContextIndex() return cachedTranslationContextIndex; } -bool QDeclarativeCompiler::buildSignal(QDeclarativeScript::Property *prop, QDeclarativeScript::Object *obj, +bool QQmlCompiler::buildSignal(QQmlScript::Property *prop, QQmlScript::Object *obj, const BindingContext &ctxt) { Q_ASSERT(obj->metaObject()); @@ -1675,14 +1675,14 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeScript::Property *prop, QDecl bool notInRevision = false; - QDeclarativePropertyData *sig = signal(obj, QStringRef(&name), ¬InRevision); + QQmlPropertyData *sig = signal(obj, QStringRef(&name), ¬InRevision); if (sig == 0) { if (notInRevision && 0 == property(obj, propName, 0)) { Q_ASSERT(obj->type != -1); - const QList &resolvedTypes = unit->resolvedTypes(); - const QDeclarativeTypeData::TypeReference &type = resolvedTypes.at(obj->type); + const QList &resolvedTypes = unit->resolvedTypes(); + const QQmlTypeData::TypeReference &type = resolvedTypes.at(obj->type); if (type.type) { COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available in %3 %4.%5.").arg(elementName(obj)).arg(prop->name().toString()).arg(type.type->module()).arg(type.majorVersion).arg(type.minorVersion)); } else { @@ -1728,8 +1728,8 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeScript::Property *prop, QDecl /*! Returns true if (value) property \a prop exists on obj, false otherwise. */ -bool QDeclarativeCompiler::doesPropertyExist(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj) +bool QQmlCompiler::doesPropertyExist(QQmlScript::Property *prop, + QQmlScript::Object *obj) { if (prop->name().isEmpty()) return false; @@ -1739,8 +1739,8 @@ bool QDeclarativeCompiler::doesPropertyExist(QDeclarativeScript::Property *prop, return property(obj, prop->name()) != 0; } -bool QDeclarativeCompiler::buildProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, +bool QQmlCompiler::buildProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj, const BindingContext &ctxt) { if (prop->isEmpty()) @@ -1759,8 +1759,8 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeScript::Property *prop, COMPILE_EXCEPTION(prop, tr("Attached properties cannot be used here")); } - QDeclarativeType *type = 0; - QDeclarativeImportedNamespace *typeNamespace = 0; + QQmlType *type = 0; + QQmlImportedNamespace *typeNamespace = 0; unit->imports().resolveType(prop->name().toString(), &type, 0, 0, 0, &typeNamespace); if (typeNamespace) { @@ -1780,12 +1780,12 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeScript::Property *prop, } else { // Setup regular property data bool notInRevision = false; - QDeclarativePropertyData *d = + QQmlPropertyData *d = prop->name().isEmpty()?0:property(obj, prop->name(), ¬InRevision); if (d == 0 && notInRevision) { - const QList &resolvedTypes = unit->resolvedTypes(); - const QDeclarativeTypeData::TypeReference &type = resolvedTypes.at(obj->type); + const QList &resolvedTypes = unit->resolvedTypes(); + const QQmlTypeData::TypeReference &type = resolvedTypes.at(obj->type); if (type.type) { COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available in %3 %4.%5.").arg(elementName(obj)).arg(prop->name().toString()).arg(type.type->module()).arg(type.majorVersion).arg(type.minorVersion)); } else { @@ -1795,8 +1795,8 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeScript::Property *prop, prop->index = d->coreIndex; prop->core = *d; } else if (prop->isDefault) { - QMetaProperty p = QDeclarativeMetaType::defaultProperty(metaObject); - QDeclarativePropertyData defaultPropertyData; + QMetaProperty p = QQmlMetaType::defaultProperty(metaObject); + QQmlPropertyData defaultPropertyData; defaultPropertyData.load(p, engine); if (p.name()) prop->setName(QLatin1String(p.name())); @@ -1815,7 +1815,7 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeScript::Property *prop, prop->parent->type != -1 && output->types.at(prop->parent->type).component) { - QDeclarativePropertyCache *cache = output->types.at(prop->parent->type).component->rootPropertyCache; + QQmlPropertyCache *cache = output->types.at(prop->parent->type).component->rootPropertyCache; if (cache && cache->property(prop->index) && cache->property(prop->index)->isAlias()) prop->isAlias = true; } @@ -1854,7 +1854,7 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeScript::Property *prop, COMPILE_CHECK(buildListProperty(prop, obj, ctxt)); - } else if (prop->type == qMetaTypeId()) { + } else if (prop->type == qMetaTypeId()) { COMPILE_CHECK(buildScriptStringProperty(prop, obj, ctxt)); @@ -1867,9 +1867,9 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeScript::Property *prop, return true; } -bool QDeclarativeCompiler::buildPropertyInNamespace(QDeclarativeImportedNamespace *ns, - QDeclarativeScript::Property *nsProp, - QDeclarativeScript::Object *obj, +bool QQmlCompiler::buildPropertyInNamespace(QQmlImportedNamespace *ns, + QQmlScript::Property *nsProp, + QQmlScript::Object *obj, const BindingContext &ctxt) { if (!nsProp->value) @@ -1882,7 +1882,7 @@ bool QDeclarativeCompiler::buildPropertyInNamespace(QDeclarativeImportedNamespac // Setup attached property data - QDeclarativeType *type = 0; + QQmlType *type = 0; unit->imports().resolveType(ns, prop->name().toString(), &type, 0, 0, 0); if (!type || !type->attachedPropertiesType()) @@ -1901,8 +1901,8 @@ bool QDeclarativeCompiler::buildPropertyInNamespace(QDeclarativeImportedNamespac return true; } -void QDeclarativeCompiler::genValueProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj) +void QQmlCompiler::genValueProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj) { if (prop->core.isQList()) { genListProperty(prop, obj); @@ -1911,14 +1911,14 @@ void QDeclarativeCompiler::genValueProperty(QDeclarativeScript::Property *prop, } } -void QDeclarativeCompiler::genListProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj) +void QQmlCompiler::genListProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj) { int listType = enginePrivate->listType(prop->type); Instruction::FetchQList fetch; fetch.property = prop->index; - bool listTypeIsInterface = QDeclarativeMetaType::isInterface(listType); + bool listTypeIsInterface = QQmlMetaType::isInterface(listType); fetch.type = listType; output->addInstruction(fetch); @@ -1948,9 +1948,9 @@ void QDeclarativeCompiler::genListProperty(QDeclarativeScript::Property *prop, output->addInstruction(pop); } -void QDeclarativeCompiler::genPropertyAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Property *valueTypeProperty) +void QQmlCompiler::genPropertyAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Property *valueTypeProperty) { for (Value *v = prop->values.first(); v; v = Property::ValueList::next(v)) { @@ -1962,7 +1962,7 @@ void QDeclarativeCompiler::genPropertyAssignment(QDeclarativeScript::Property *p genObject(v->object); - if (QDeclarativeMetaType::isInterface(prop->type)) { + if (QQmlMetaType::isInterface(prop->type)) { Instruction::StoreInterface store; store.line = v->object->location.start.line; @@ -2020,7 +2020,7 @@ void QDeclarativeCompiler::genPropertyAssignment(QDeclarativeScript::Property *p store.property = prop->core; store.owner = 0; } - QDeclarativeType *valueType = toQmlType(v->object); + QQmlType *valueType = toQmlType(v->object); store.castValue = valueType->propertyValueSourceCast(); output->addInstruction(store); @@ -2035,7 +2035,7 @@ void QDeclarativeCompiler::genPropertyAssignment(QDeclarativeScript::Property *p store.property = prop->core; store.owner = 0; } - QDeclarativeType *valueType = toQmlType(v->object); + QQmlType *valueType = toQmlType(v->object); store.castValue = valueType->propertyValueInterceptorCast(); output->addInstruction(store); } @@ -2043,15 +2043,15 @@ void QDeclarativeCompiler::genPropertyAssignment(QDeclarativeScript::Property *p } } -bool QDeclarativeCompiler::buildIdProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj) +bool QQmlCompiler::buildIdProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj) { if (prop->value || prop->values.isMany() || prop->values.first()->object) COMPILE_EXCEPTION(prop, tr("Invalid use of id property")); - QDeclarativeScript::Value *idValue = prop->values.first(); + QQmlScript::Value *idValue = prop->values.first(); QString val = idValue->primitive(); COMPILE_CHECK(checkValidId(idValue, val)); @@ -2067,7 +2067,7 @@ bool QDeclarativeCompiler::buildIdProperty(QDeclarativeScript::Property *prop, return true; } -void QDeclarativeCompiler::addId(const QString &id, QDeclarativeScript::Object *obj) +void QQmlCompiler::addId(const QString &id, QQmlScript::Object *obj) { Q_UNUSED(id); Q_ASSERT(!compileState->ids.value(id)); @@ -2076,7 +2076,7 @@ void QDeclarativeCompiler::addId(const QString &id, QDeclarativeScript::Object * compileState->ids.append(obj); } -void QDeclarativeCompiler::addBindingReference(JSBindingReference *ref) +void QQmlCompiler::addBindingReference(JSBindingReference *ref) { Q_ASSERT(ref->value && !ref->value->bindingReference); ref->value->bindingReference = ref; @@ -2084,7 +2084,7 @@ void QDeclarativeCompiler::addBindingReference(JSBindingReference *ref) compileState->bindings.prepend(ref); } -void QDeclarativeCompiler::saveComponentState() +void QQmlCompiler::saveComponentState() { Q_ASSERT(compileState->root); Q_ASSERT(compileState->root->componentCompileState == 0); @@ -2095,8 +2095,8 @@ void QDeclarativeCompiler::saveComponentState() componentStats->savedComponentStats.append(componentStats->componentStat); } -QDeclarativeCompilerTypes::ComponentCompileState * -QDeclarativeCompiler::componentState(QDeclarativeScript::Object *obj) +QQmlCompilerTypes::ComponentCompileState * +QQmlCompiler::componentState(QQmlScript::Object *obj) { Q_ASSERT(obj->componentCompileState); return obj->componentCompileState; @@ -2107,8 +2107,8 @@ QDeclarativeCompiler::componentState(QDeclarativeScript::Object *obj) // GridView.row: 10 // } // GridView is an attached property object. -bool QDeclarativeCompiler::buildAttachedProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, +bool QQmlCompiler::buildAttachedProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj, const BindingContext &ctxt) { Q_ASSERT(prop->value); @@ -2132,14 +2132,14 @@ bool QDeclarativeCompiler::buildAttachedProperty(QDeclarativeScript::Property *p // font.family: "Helvetica" // } // font is a nested property. pointSize and family are not. -bool QDeclarativeCompiler::buildGroupedProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, +bool QQmlCompiler::buildGroupedProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj, const BindingContext &ctxt) { Q_ASSERT(prop->type != 0); Q_ASSERT(prop->index != -1); - if (QDeclarativeValueTypeFactory::isValueType(prop->type)) { + if (QQmlValueTypeFactory::isValueType(prop->type)) { if (prop->type >= 0 && enginePrivate->valueTypes[prop->type]) { if (!prop->values.isEmpty()) { @@ -2189,9 +2189,9 @@ bool QDeclarativeCompiler::buildGroupedProperty(QDeclarativeScript::Property *pr return true; } -bool QDeclarativeCompiler::buildValueTypeProperty(QObject *type, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Object *baseObj, +bool QQmlCompiler::buildValueTypeProperty(QObject *type, + QQmlScript::Object *obj, + QQmlScript::Object *baseObj, const BindingContext &ctxt) { compileState->objectDepth.push(); @@ -2202,7 +2202,7 @@ bool QDeclarativeCompiler::buildValueTypeProperty(QObject *type, for (Property *prop = obj->properties.first(); prop; prop = obj->properties.next(prop)) { - QDeclarativePropertyData *d = property(obj, prop->name()); + QQmlPropertyData *d = property(obj, prop->name()); if (d == 0) COMPILE_EXCEPTION(prop, tr("Cannot assign to non-existent property \"%1\"").arg(prop->name().toString())); @@ -2217,7 +2217,7 @@ bool QDeclarativeCompiler::buildValueTypeProperty(QObject *type, if (prop->values.isMany()) { COMPILE_EXCEPTION(prop, tr("Single property assignment expected")); } else if (!prop->values.isEmpty()) { - QDeclarativeScript::Value *value = prop->values.first(); + QQmlScript::Value *value = prop->values.first(); if (value->object) { COMPILE_EXCEPTION(prop, tr("Unexpected object assignment")); @@ -2263,10 +2263,10 @@ bool QDeclarativeCompiler::buildValueTypeProperty(QObject *type, } // Build assignments to QML lists. QML lists are properties of type -// QDeclarativeListProperty. List properties can accept a list of +// QQmlListProperty. List properties can accept a list of // objects, or a single binding. -bool QDeclarativeCompiler::buildListProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, +bool QQmlCompiler::buildListProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj, const BindingContext &ctxt) { Q_ASSERT(prop->core.isQList()); @@ -2278,7 +2278,7 @@ bool QDeclarativeCompiler::buildListProperty(QDeclarativeScript::Property *prop, obj->addValueProperty(prop); int listType = enginePrivate->listType(t); - bool listTypeIsInterface = QDeclarativeMetaType::isInterface(listType); + bool listTypeIsInterface = QQmlMetaType::isInterface(listType); bool assignedBinding = false; for (Value *v = prop->values.first(); v; v = Property::ValueList::next(v)) { @@ -2311,9 +2311,9 @@ bool QDeclarativeCompiler::buildListProperty(QDeclarativeScript::Property *prop, return true; } -// Compiles an assignment to a QDeclarativeScriptString property -bool QDeclarativeCompiler::buildScriptStringProperty(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, +// Compiles an assignment to a QQmlScriptString property +bool QQmlCompiler::buildScriptStringProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj, const BindingContext &ctxt) { if (prop->values.isMany()) @@ -2329,8 +2329,8 @@ bool QDeclarativeCompiler::buildScriptStringProperty(QDeclarativeScript::Propert } // Compile regular property assignments of the form "property: " -bool QDeclarativeCompiler::buildPropertyAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, +bool QQmlCompiler::buildPropertyAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, const BindingContext &ctxt) { obj->addValueProperty(prop); @@ -2359,9 +2359,9 @@ bool QDeclarativeCompiler::buildPropertyAssignment(QDeclarativeScript::Property } // Compile assigning a single object instance to a regular property -bool QDeclarativeCompiler::buildPropertyObjectAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Value *v, +bool QQmlCompiler::buildPropertyObjectAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Value *v, const BindingContext &ctxt) { Q_ASSERT(prop->index != -1); @@ -2370,7 +2370,7 @@ bool QDeclarativeCompiler::buildPropertyObjectAssignment(QDeclarativeScript::Pro if (!prop->core.isWritable() && !prop->isReadOnlyDeclaration) COMPILE_EXCEPTION(v, tr("Invalid property assignment: \"%1\" is a read-only property").arg(prop->name().toString())); - if (QDeclarativeMetaType::isInterface(prop->type)) { + if (QQmlMetaType::isInterface(prop->type)) { // Assigning an object to an interface ptr property COMPILE_CHECK(buildObject(v->object, ctxt)); @@ -2402,7 +2402,7 @@ bool QDeclarativeCompiler::buildPropertyObjectAssignment(QDeclarativeScript::Pro if (propertyMetaObject) { const QMetaObject *c = v->object->metatype; while(c) { - isAssignable |= (QDeclarativePropertyPrivate::equal(c, propertyMetaObject)); + isAssignable |= (QQmlPropertyPrivate::equal(c, propertyMetaObject)); c = c->superClass(); } } @@ -2412,15 +2412,15 @@ bool QDeclarativeCompiler::buildPropertyObjectAssignment(QDeclarativeScript::Pro COMPILE_CHECK(buildObject(v->object, ctxt)); v->type = Value::CreatedObject; - } else if (propertyMetaObject == &QDeclarativeComponent::staticMetaObject) { + } else if (propertyMetaObject == &QQmlComponent::staticMetaObject) { // Automatic "Component" insertion - QDeclarativeScript::Object *root = v->object; - QDeclarativeScript::Object *component = pool->New(); + QQmlScript::Object *root = v->object; + QQmlScript::Object *component = pool->New(); component->type = componentTypeRef(); component->typeName = QStringLiteral("Qt/Component"); - component->metatype = &QDeclarativeComponent::staticMetaObject; + component->metatype = &QQmlComponent::staticMetaObject; component->location = root->location; - QDeclarativeScript::Value *componentValue = pool->New(); + QQmlScript::Value *componentValue = pool->New(); componentValue->object = root; component->getDefaultProperty()->addValue(componentValue); v->object = component; @@ -2439,10 +2439,10 @@ bool QDeclarativeCompiler::buildPropertyObjectAssignment(QDeclarativeScript::Pro // Item { // NumberAnimation on x { } // } -bool QDeclarativeCompiler::buildPropertyOnAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Object *baseObj, - QDeclarativeScript::Value *v, +bool QQmlCompiler::buildPropertyOnAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Object *baseObj, + QQmlScript::Value *v, const BindingContext &ctxt) { Q_ASSERT(prop->index != -1); @@ -2461,11 +2461,11 @@ bool QDeclarativeCompiler::buildPropertyOnAssignment(QDeclarativeScript::Propert v->object->metatype = output->types.at(v->object->type).metaObject(); Q_ASSERT(v->object->metaObject()); - // Will be true if the assigned type inherits QDeclarativePropertyValueSource + // Will be true if the assigned type inherits QQmlPropertyValueSource bool isPropertyValue = false; - // Will be true if the assigned type inherits QDeclarativePropertyValueInterceptor + // Will be true if the assigned type inherits QQmlPropertyValueInterceptor bool isPropertyInterceptor = false; - if (QDeclarativeType *valueType = toQmlType(v->object)) { + if (QQmlType *valueType = toQmlType(v->object)) { isPropertyValue = valueType->propertyValueSourceCast() != -1; isPropertyInterceptor = valueType->propertyValueInterceptorCast() != -1; } @@ -2485,9 +2485,9 @@ bool QDeclarativeCompiler::buildPropertyOnAssignment(QDeclarativeScript::Propert } // Compile assigning a literal or binding to a regular property -bool QDeclarativeCompiler::buildPropertyLiteralAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Value *v, +bool QQmlCompiler::buildPropertyLiteralAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Value *v, const BindingContext &ctxt) { Q_ASSERT(prop->index != -1); @@ -2520,9 +2520,9 @@ bool QDeclarativeCompiler::buildPropertyLiteralAssignment(QDeclarativeScript::Pr return true; } -bool QDeclarativeCompiler::testQualifiedEnumAssignment(QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Value *v, +bool QQmlCompiler::testQualifiedEnumAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Value *v, bool *isAssignment) { *isAssignment = false; @@ -2543,13 +2543,13 @@ bool QDeclarativeCompiler::testQualifiedEnumAssignment(QDeclarativeScript::Prope return true; QString typeName = parts.at(0); - QDeclarativeType *type = 0; + QQmlType *type = 0; unit->imports().resolveType(typeName, &type, 0, 0, 0, 0); //handle enums on value types (where obj->typeName is empty) QString objTypeName = obj->typeName; if (objTypeName.isEmpty()) { - QDeclarativeType *objType = toQmlType(obj); + QQmlType *objType = toQmlType(obj); if (objType) objTypeName = objType->qmlTypeName(); } @@ -2584,7 +2584,7 @@ bool QDeclarativeCompiler::testQualifiedEnumAssignment(QDeclarativeScript::Prope return true; v->type = Value::Literal; - v->value = QDeclarativeScript::Variant((double)value); + v->value = QQmlScript::Variant((double)value); *isAssignment = true; return true; @@ -2597,12 +2597,12 @@ struct StaticQtMetaObject : public QObject }; // Similar logic to above, but not knowing target property. -int QDeclarativeCompiler::evaluateEnum(const QByteArray& script) const +int QQmlCompiler::evaluateEnum(const QByteArray& script) const { int dot = script.indexOf('.'); if (dot > 0) { const QByteArray &scope = script.left(dot); - QDeclarativeType *type = 0; + QQmlType *type = 0; unit->imports().resolveType(QString::fromUtf8(script.left(dot)), &type, 0, 0, 0, 0); if (!type && scope != "Qt") return -1; @@ -2619,9 +2619,9 @@ int QDeclarativeCompiler::evaluateEnum(const QByteArray& script) const return -1; } -const QMetaObject *QDeclarativeCompiler::resolveType(const QString& name) const +const QMetaObject *QQmlCompiler::resolveType(const QString& name) const { - QDeclarativeType *qmltype = 0; + QQmlType *qmltype = 0; if (!unit->imports().resolveType(name, &qmltype, 0, 0, 0, 0)) return 0; if (!qmltype) @@ -2631,9 +2631,9 @@ const QMetaObject *QDeclarativeCompiler::resolveType(const QString& name) const // similar to logic of completeComponentBuild, but also sticks data // into primitives at the end -int QDeclarativeCompiler::rewriteBinding(const QDeclarativeScript::Variant& value, const QString& name) +int QQmlCompiler::rewriteBinding(const QQmlScript::Variant& value, const QString& name) { - QDeclarativeRewrite::RewriteBinding rewriteBinding; + QQmlRewrite::RewriteBinding rewriteBinding; rewriteBinding.setName(QLatin1Char('$') + name.mid(name.lastIndexOf(QLatin1Char('.')) + 1)); QString rewrite = rewriteBinding(value.asAST(), value.asScript(), 0); @@ -2641,14 +2641,14 @@ int QDeclarativeCompiler::rewriteBinding(const QDeclarativeScript::Variant& valu return output->indexForString(rewrite); } -QString QDeclarativeCompiler::rewriteSignalHandler(const QDeclarativeScript::Variant& value, const QString &name) +QString QQmlCompiler::rewriteSignalHandler(const QQmlScript::Variant& value, const QString &name) { - QDeclarativeRewrite::RewriteSignalHandler rewriteSignalHandler; + QQmlRewrite::RewriteSignalHandler rewriteSignalHandler; return rewriteSignalHandler(value.asAST(), value.asScript(), name); } // Ensures that the dynamic meta specification on obj is valid -bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeScript::Object *obj) +bool QQmlCompiler::checkDynamicMeta(QQmlScript::Object *obj) { bool seenDefaultProperty = false; @@ -2660,7 +2660,7 @@ bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeScript::Object *obj) // Check properties for (Object::DynamicProperty *p = obj->dynamicProperties.first(); p; p = obj->dynamicProperties.next(p)) { - const QDeclarativeScript::Object::DynamicProperty &prop = *p; + const QQmlScript::Object::DynamicProperty &prop = *p; if (prop.isDefaultProperty) { if (seenDefaultProperty) @@ -2693,7 +2693,7 @@ bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeScript::Object *obj) } for (Object::DynamicSignal *s = obj->dynamicSignals.first(); s; s = obj->dynamicSignals.next(s)) { - const QDeclarativeScript::Object::DynamicSignal &currSig = *s; + const QQmlScript::Object::DynamicSignal &currSig = *s; if (methodNames.testAndSet(currSig.name.hash())) { for (Object::DynamicSignal *s2 = obj->dynamicSignals.first(); s2 != s; @@ -2710,7 +2710,7 @@ bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeScript::Object *obj) } for (Object::DynamicSlot *s = obj->dynamicSlots.first(); s; s = obj->dynamicSlots.next(s)) { - const QDeclarativeScript::Object::DynamicSlot &currSlot = *s; + const QQmlScript::Object::DynamicSlot &currSlot = *s; if (methodNames.testAndSet(currSlot.name.hash())) { for (Object::DynamicSignal *s2 = obj->dynamicSignals.first(); s2; @@ -2734,7 +2734,7 @@ bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeScript::Object *obj) return true; } -bool QDeclarativeCompiler::mergeDynamicMetaProperties(QDeclarativeScript::Object *obj) +bool QQmlCompiler::mergeDynamicMetaProperties(QQmlScript::Object *obj) { for (Object::DynamicProperty *p = obj->dynamicProperties.first(); p; p = obj->dynamicProperties.next(p)) { @@ -2764,7 +2764,7 @@ bool QDeclarativeCompiler::mergeDynamicMetaProperties(QDeclarativeScript::Object Q_GLOBAL_STATIC(QAtomicInt, classIndexCounter) -bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, DynamicMetaMode mode) +bool QQmlCompiler::buildDynamicMeta(QQmlScript::Object *obj, DynamicMetaMode mode) { Q_ASSERT(obj); Q_ASSERT(obj->metatype); @@ -2796,7 +2796,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn if (!resolveAlias) { // No point doing this for both the alias and non alias cases - QDeclarativePropertyData *d = property(obj, p->name); + QQmlPropertyData *d = property(obj, p->name); if (d && d->isFinal()) COMPILE_EXCEPTION(p, tr("Cannot override FINAL property")); } @@ -2806,9 +2806,9 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn QByteArray dynamicData; if (buildData) { - typedef QDeclarativeVMEMetaData VMD; + typedef QQmlVMEMetaData VMD; - dynamicData = QByteArray(sizeof(QDeclarativeVMEMetaData) + + dynamicData = QByteArray(sizeof(QQmlVMEMetaData) + (obj->dynamicProperties.count() - aliasCount) * sizeof(VMD::PropertyData) + obj->dynamicSlots.count() * sizeof(VMD::MethodData) + aliasCount * sizeof(VMD::AliasData), 0); @@ -2859,7 +2859,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn // Reserve dynamic properties if (obj->dynamicProperties.count()) { - typedef QDeclarativeVMEMetaData VMD; + typedef QQmlVMEMetaData VMD; int effectivePropertyIndex = 0; for (Object::DynamicProperty *p = obj->dynamicProperties.first(); p; p = obj->dynamicProperties.next(p)) { @@ -2887,17 +2887,17 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn // XXX don't double resolve this in the case of an alias run QByteArray customTypeName; - QDeclarativeType *qmltype = 0; + QQmlType *qmltype = 0; QString url; if (!unit->imports().resolveType(p->customType.toString(), &qmltype, &url, 0, 0, 0)) COMPILE_EXCEPTION(p, tr("Invalid property type")); if (!qmltype) { - QDeclarativeTypeData *tdata = enginePrivate->typeLoader.get(QUrl(url)); + QQmlTypeData *tdata = enginePrivate->typeLoader.get(QUrl(url)); Q_ASSERT(tdata); Q_ASSERT(tdata->isComplete()); - QDeclarativeCompiledData *data = tdata->compiledData(); + QQmlCompiledData *data = tdata->compiledData(); customTypeName = data->root->className(); data->release(); tdata->release(); @@ -2910,8 +2910,8 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn propertyType = QMetaType::QObjectStar; } else { readonly = true; - customTypeName = QByteArray("QDeclarativeListProperty<") + customTypeName + QByteArray(">"); - propertyType = qMetaTypeId >(); + customTypeName = QByteArray("QQmlListProperty<") + customTypeName + QByteArray(">"); + propertyType = qMetaTypeId >(); } p->resolvedCustomTypeName = pool->NewByteArray(customTypeName); @@ -2926,7 +2926,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn readonly = true; if (buildData) { - VMD *vmd = (QDeclarativeVMEMetaData *)dynamicData.data(); + VMD *vmd = (QQmlVMEMetaData *)dynamicData.data(); vmd->propertyCount++; (vmd->propertyData() + effectivePropertyIndex)->propertyType = propertyType; } @@ -2947,7 +2947,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn } if (varPropCount) { - VMD *vmd = (QDeclarativeVMEMetaData *)dynamicData.data(); + VMD *vmd = (QQmlVMEMetaData *)dynamicData.data(); if (buildData) vmd->varPropertyCount = varPropCount; firstPropertyVarIndex = effectivePropertyIndex; @@ -2979,7 +2979,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn if (p->type == Object::DynamicProperty::Alias) { if (resolveAlias) { Q_ASSERT(buildData); - ((QDeclarativeVMEMetaData *)dynamicData.data())->aliasCount++; + ((QQmlVMEMetaData *)dynamicData.data())->aliasCount++; COMPILE_CHECK(compileAlias(builder, dynamicData, obj, effectivePropertyIndex, aliasIndex, *p)); } @@ -3016,7 +3016,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn if (namesSize) s->parameterNamesRef = builder.newString(namesSize); if (buildData) - ((QDeclarativeVMEMetaData *)dynamicData.data())->signalCount++; + ((QQmlVMEMetaData *)dynamicData.data())->signalCount++; builder.setSignal(signalIndex + obj->dynamicProperties.count(), s->signatureRef, s->parameterNamesRef); ++signalIndex; @@ -3029,7 +3029,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn if (typeRefs[0].isEmpty()) typeRefs[0] = builder.newString(strlen(builtinTypes[0].cppType)); - typedef QDeclarativeVMEMetaData VMD; + typedef QQmlVMEMetaData VMD; int methodIndex = 0; for (Object::DynamicSlot *s = obj->dynamicSlots.first(); s; s = obj->dynamicSlots.next(s)) { @@ -3061,7 +3061,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn utf8.length(), s->location.start.line }; - VMD *vmd = (QDeclarativeVMEMetaData *)dynamicData.data(); + VMD *vmd = (QQmlVMEMetaData *)dynamicData.data(); vmd->methodCount++; VMD::MethodData &md = *(vmd->methodData() + methodIndex); @@ -3159,19 +3159,19 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn } if (obj->type != -1) { - QDeclarativePropertyCache *superCache = output->types[obj->type].createPropertyCache(engine); - QDeclarativePropertyCache *cache = + QQmlPropertyCache *superCache = output->types[obj->type].createPropertyCache(engine); + QQmlPropertyCache *cache = superCache->copyAndAppend(engine, &obj->extObject, - QDeclarativePropertyData::NoFlags, - QDeclarativePropertyData::IsVMEFunction, - QDeclarativePropertyData::IsVMESignal); + QQmlPropertyData::NoFlags, + QQmlPropertyData::IsVMEFunction, + QQmlPropertyData::IsVMESignal); // now we modify the flags appropriately for var properties. int propertyOffset = obj->extObject.propertyOffset(); - QDeclarativePropertyData *currPropData = 0; + QQmlPropertyData *currPropData = 0; for (int pvi = firstPropertyVarIndex; pvi < totalPropCount; ++pvi) { currPropData = cache->property(pvi + propertyOffset); - currPropData->setFlags(currPropData->getFlags() | QDeclarativePropertyData::IsVMEProperty); + currPropData->setFlags(currPropData->getFlags() | QQmlPropertyData::IsVMEProperty); } obj->synthCache = cache; @@ -3180,7 +3180,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeScript::Object *obj, Dyn return true; } -bool QDeclarativeCompiler::checkValidId(QDeclarativeScript::Value *v, const QString &val) +bool QQmlCompiler::checkValidId(QQmlScript::Value *v, const QString &val) { if (val.isEmpty()) COMPILE_EXCEPTION(v, tr( "Invalid empty ID")); @@ -3205,16 +3205,16 @@ bool QDeclarativeCompiler::checkValidId(QDeclarativeScript::Value *v, const QStr return true; } -#include +#include -static QStringList astNodeToStringList(QDeclarativeJS::AST::Node *node) +static QStringList astNodeToStringList(QQmlJS::AST::Node *node) { - if (node->kind == QDeclarativeJS::AST::Node::Kind_IdentifierExpression) { + if (node->kind == QQmlJS::AST::Node::Kind_IdentifierExpression) { QString name = - static_cast(node)->name.toString(); + static_cast(node)->name.toString(); return QStringList() << name; - } else if (node->kind == QDeclarativeJS::AST::Node::Kind_FieldMemberExpression) { - QDeclarativeJS::AST::FieldMemberExpression *expr = static_cast(node); + } else if (node->kind == QQmlJS::AST::Node::Kind_FieldMemberExpression) { + QQmlJS::AST::FieldMemberExpression *expr = static_cast(node); QStringList rv = astNodeToStringList(expr->base); if (rv.isEmpty()) @@ -3225,9 +3225,9 @@ static QStringList astNodeToStringList(QDeclarativeJS::AST::Node *node) return QStringList(); } -bool QDeclarativeCompiler::compileAlias(QFastMetaBuilder &builder, +bool QQmlCompiler::compileAlias(QFastMetaBuilder &builder, QByteArray &data, - QDeclarativeScript::Object *obj, + QQmlScript::Object *obj, int propIndex, int aliasIndex, Object::DynamicProperty &prop) { @@ -3239,7 +3239,7 @@ bool QDeclarativeCompiler::compileAlias(QFastMetaBuilder &builder, !prop.defaultValue->values.first()->value.isScript()) COMPILE_EXCEPTION(prop.defaultValue, tr("Invalid alias location")); - QDeclarativeJS::AST::Node *node = prop.defaultValue->values.first()->value.asAST(); + QQmlJS::AST::Node *node = prop.defaultValue->values.first()->value.asAST(); if (!node) COMPILE_EXCEPTION(obj, tr("No property alias location")); // ### Can this happen? @@ -3248,7 +3248,7 @@ bool QDeclarativeCompiler::compileAlias(QFastMetaBuilder &builder, if (alias.count() < 1 || alias.count() > 3) COMPILE_EXCEPTION(prop.defaultValue, tr("Invalid alias reference. An alias reference must be specified as , . or ..")); - QDeclarativeScript::Object *idObject = compileState->ids.value(alias.at(0)); + QQmlScript::Object *idObject = compileState->ids.value(alias.at(0)); if (!idObject) COMPILE_EXCEPTION(prop.defaultValue, tr("Invalid alias reference. Unable to find id \"%1\"").arg(alias.at(0))); @@ -3280,7 +3280,7 @@ bool QDeclarativeCompiler::compileAlias(QFastMetaBuilder &builder, type = aliasProperty.type(); if (alias.count() == 3) { - QDeclarativeValueType *valueType = enginePrivate->valueTypes[aliasProperty.type()]; + QQmlValueType *valueType = enginePrivate->valueTypes[aliasProperty.type()]; if (!valueType) COMPILE_EXCEPTION(prop.defaultValue, tr("Invalid alias location")); @@ -3307,7 +3307,7 @@ bool QDeclarativeCompiler::compileAlias(QFastMetaBuilder &builder, } else { Q_ASSERT(idObject->type != -1); // How else did it get an id? - const QDeclarativeCompiledData::TypeReference &ref = output->types.at(idObject->type); + const QQmlCompiledData::TypeReference &ref = output->types.at(idObject->type); if (ref.type) typeName = ref.type->typeName(); else @@ -3319,10 +3319,10 @@ bool QDeclarativeCompiler::compileAlias(QFastMetaBuilder &builder, if (typeName.endsWith('*')) flags |= QML_ALIAS_FLAG_PTR; - QDeclarativeVMEMetaData::AliasData aliasData = { idObject->idIndex, propIdx, flags }; + QQmlVMEMetaData::AliasData aliasData = { idObject->idIndex, propIdx, flags }; - typedef QDeclarativeVMEMetaData VMD; - VMD *vmd = (QDeclarativeVMEMetaData *)data.data(); + typedef QQmlVMEMetaData VMD; + VMD *vmd = (QQmlVMEMetaData *)data.data(); *(vmd->aliasData() + aliasIndex) = aliasData; prop.nameRef = builder.newString(prop.name.utf8length()); @@ -3342,8 +3342,8 @@ bool QDeclarativeCompiler::compileAlias(QFastMetaBuilder &builder, return true; } -bool QDeclarativeCompiler::buildBinding(QDeclarativeScript::Value *value, - QDeclarativeScript::Property *prop, +bool QQmlCompiler::buildBinding(QQmlScript::Value *value, + QQmlScript::Property *prop, const BindingContext &ctxt) { Q_ASSERT(prop->index != -1); @@ -3363,9 +3363,9 @@ bool QDeclarativeCompiler::buildBinding(QDeclarativeScript::Value *value, return true; } -bool QDeclarativeCompiler::buildLiteralBinding(QDeclarativeScript::Value *v, - QDeclarativeScript::Property *prop, - const QDeclarativeCompilerTypes::BindingContext &) +bool QQmlCompiler::buildLiteralBinding(QQmlScript::Value *v, + QQmlScript::Property *prop, + const QQmlCompilerTypes::BindingContext &) { Q_ASSERT(v->value.isScript()); @@ -3436,10 +3436,10 @@ bool QDeclarativeCompiler::buildLiteralBinding(QDeclarativeScript::Value *v, return false; } -void QDeclarativeCompiler::genBindingAssignment(QDeclarativeScript::Value *binding, - QDeclarativeScript::Property *prop, - QDeclarativeScript::Object *obj, - QDeclarativeScript::Property *valueTypeProperty) +void QQmlCompiler::genBindingAssignment(QQmlScript::Value *binding, + QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Property *valueTypeProperty) { Q_UNUSED(obj); Q_ASSERT(binding->bindingReference); @@ -3509,7 +3509,7 @@ void QDeclarativeCompiler::genBindingAssignment(QDeclarativeScript::Value *bindi } else if (ref.dataType == BindingReference::QtScript) { const JSBindingReference &js = static_cast(ref); - QDeclarativeInstruction store; + QQmlInstruction store; store.assignBinding.value = output->indexForString(js.rewrittenExpression); store.assignBinding.context = js.bindingContext.stack; store.assignBinding.owner = js.bindingContext.owner; @@ -3530,20 +3530,20 @@ void QDeclarativeCompiler::genBindingAssignment(QDeclarativeScript::Value *bindi store.assignBinding.property = prop->core; } output->addInstructionHelper( - !prop->isAlias ? QDeclarativeInstruction::StoreBinding - : QDeclarativeInstruction::StoreBindingOnAlias + !prop->isAlias ? QQmlInstruction::StoreBinding + : QQmlInstruction::StoreBindingOnAlias , store); } else { Q_ASSERT(!"Unhandled BindingReference::DataType type"); } } -int QDeclarativeCompiler::genContextCache() +int QQmlCompiler::genContextCache() { if (compileState->ids.count() == 0) return -1; - QDeclarativeIntegerCache *cache = new QDeclarativeIntegerCache(); + QQmlIntegerCache *cache = new QQmlIntegerCache(); cache->reserve(compileState->ids.count()); for (Object *o = compileState->ids.first(); o; o = compileState->ids.next(o)) cache->add(o->id, o->idIndex); @@ -3552,17 +3552,17 @@ int QDeclarativeCompiler::genContextCache() return output->contextCaches.count() - 1; } -QDeclarativePropertyData -QDeclarativeCompiler::genValueTypeData(QDeclarativeScript::Property *valueTypeProp, - QDeclarativeScript::Property *prop) +QQmlPropertyData +QQmlCompiler::genValueTypeData(QQmlScript::Property *valueTypeProp, + QQmlScript::Property *prop) { - typedef QDeclarativePropertyPrivate QDPP; + typedef QQmlPropertyPrivate QDPP; return QDPP::saveValueType(prop->parent->metaObject(), prop->index, enginePrivate->valueTypes[prop->type]->metaObject(), valueTypeProp->index, engine); } -bool QDeclarativeCompiler::completeComponentBuild() +bool QQmlCompiler::completeComponentBuild() { if (componentStats) componentStats->componentStat.ids = compileState->ids.count(); @@ -3604,13 +3604,13 @@ bool QDeclarativeCompiler::completeComponentBuild() // Pre-rewrite the expression QString expression = binding.expression.asScript(); - QDeclarativeRewrite::RewriteBinding rewriteBinding; + QQmlRewrite::RewriteBinding rewriteBinding; rewriteBinding.setName(QLatin1Char('$')+binding.property->name().toString()); bool isSharable = false; binding.rewrittenExpression = rewriteBinding(binding.expression.asAST(), expression, &isSharable); if (isSharable && !binding.property->isValueTypeSubProperty && !binding.property->isAlias /* See above re alias */ && - binding.property->type != qMetaTypeId()) { + binding.property->type != qMetaTypeId()) { binding.dataType = BindingReference::V8; sharedBindings.append(b); } else { @@ -3638,7 +3638,7 @@ bool QDeclarativeCompiler::completeComponentBuild() for (int ii = 0; ii < sharedBindings.count(); ++ii) { JSBindingReference *reference = sharedBindings.at(ii); - QDeclarativeScript::Value *value = reference->value; + QQmlScript::Value *value = reference->value; const QString &expression = reference->rewrittenExpression; if (ii != 0) functionArray.append(",", 1); @@ -3670,7 +3670,7 @@ bool QDeclarativeCompiler::completeComponentBuild() return true; } -void QDeclarativeCompiler::dumpStats() +void QQmlCompiler::dumpStats() { Q_ASSERT(componentStats); qWarning().nospace() << "QML Document: " << output->url.toString(); @@ -3724,13 +3724,13 @@ void QDeclarativeCompiler::dumpStats() Returns true if from can be assigned to a (QObject) property of type to. */ -bool QDeclarativeCompiler::canCoerce(int to, QDeclarativeScript::Object *from) +bool QQmlCompiler::canCoerce(int to, QQmlScript::Object *from) { const QMetaObject *toMo = enginePrivate->rawMetaObjectForType(to); const QMetaObject *fromMo = from->metaObject(); while (fromMo) { - if (QDeclarativePropertyPrivate::equal(fromMo, toMo)) + if (QQmlPropertyPrivate::equal(fromMo, toMo)) return true; fromMo = fromMo->superClass(); } @@ -3740,7 +3740,7 @@ bool QDeclarativeCompiler::canCoerce(int to, QDeclarativeScript::Object *from) /*! Returns the element name, as written in the QML file, for o. */ -QString QDeclarativeCompiler::elementName(QDeclarativeScript::Object *o) +QString QQmlCompiler::elementName(QQmlScript::Object *o) { Q_ASSERT(o); if (o->type != -1) { @@ -3750,19 +3750,19 @@ QString QDeclarativeCompiler::elementName(QDeclarativeScript::Object *o) } } -QDeclarativeType *QDeclarativeCompiler::toQmlType(QDeclarativeScript::Object *from) +QQmlType *QQmlCompiler::toQmlType(QQmlScript::Object *from) { // ### Optimize const QMetaObject *mo = from->metatype; - QDeclarativeType *type = 0; + QQmlType *type = 0; while (!type && mo) { - type = QDeclarativeMetaType::qmlType(mo); + type = QQmlMetaType::qmlType(mo); mo = mo->superClass(); } return type; } -QStringList QDeclarativeCompiler::deferredProperties(QDeclarativeScript::Object *obj) +QStringList QQmlCompiler::deferredProperties(QQmlScript::Object *obj) { const QMetaObject *mo = obj->metatype; @@ -3775,36 +3775,36 @@ QStringList QDeclarativeCompiler::deferredProperties(QDeclarativeScript::Object return rv; } -QDeclarativePropertyData * -QDeclarativeCompiler::property(QDeclarativeScript::Object *object, int index) +QQmlPropertyData * +QQmlCompiler::property(QQmlScript::Object *object, int index) { - QDeclarativePropertyCache *cache = 0; + QQmlPropertyCache *cache = 0; if (object->synthCache) cache = object->synthCache; else if (object->type != -1) cache = output->types[object->type].createPropertyCache(engine); else - cache = QDeclarativeEnginePrivate::get(engine)->cache(object->metaObject()); + cache = QQmlEnginePrivate::get(engine)->cache(object->metaObject()); return cache->property(index); } -QDeclarativePropertyData * -QDeclarativeCompiler::property(QDeclarativeScript::Object *object, const QHashedStringRef &name, bool *notInRevision) +QQmlPropertyData * +QQmlCompiler::property(QQmlScript::Object *object, const QHashedStringRef &name, bool *notInRevision) { if (notInRevision) *notInRevision = false; - QDeclarativePropertyCache *cache = 0; + QQmlPropertyCache *cache = 0; if (object->synthCache) cache = object->synthCache; else if (object->type != -1) cache = output->types[object->type].createPropertyCache(engine); else - cache = QDeclarativeEnginePrivate::get(engine)->cache(object->metaObject()); + cache = QQmlEnginePrivate::get(engine)->cache(object->metaObject()); - QDeclarativePropertyData *d = cache->property(name); + QQmlPropertyData *d = cache->property(name); // Find the first property while (d && d->isFunction()) @@ -3818,23 +3818,23 @@ QDeclarativeCompiler::property(QDeclarativeScript::Object *object, const QHashed } } -// This code must match the semantics of QDeclarativePropertyPrivate::findSignalByName -QDeclarativePropertyData * -QDeclarativeCompiler::signal(QDeclarativeScript::Object *object, const QHashedStringRef &name, bool *notInRevision) +// This code must match the semantics of QQmlPropertyPrivate::findSignalByName +QQmlPropertyData * +QQmlCompiler::signal(QQmlScript::Object *object, const QHashedStringRef &name, bool *notInRevision) { if (notInRevision) *notInRevision = false; - QDeclarativePropertyCache *cache = 0; + QQmlPropertyCache *cache = 0; if (object->synthCache) cache = object->synthCache; else if (object->type != -1) cache = output->types[object->type].createPropertyCache(engine); else - cache = QDeclarativeEnginePrivate::get(engine)->cache(object->metaObject()); + cache = QQmlEnginePrivate::get(engine)->cache(object->metaObject()); - QDeclarativePropertyData *d = cache->property(name); + QQmlPropertyData *d = cache->property(name); if (notInRevision) *notInRevision = false; while (d && !(d->isFunction())) @@ -3858,24 +3858,24 @@ QDeclarativeCompiler::signal(QDeclarativeScript::Object *object, const QHashedSt return 0; } -// This code must match the semantics of QDeclarativePropertyPrivate::findSignalByName -int QDeclarativeCompiler::indexOfSignal(QDeclarativeScript::Object *object, const QString &name, +// This code must match the semantics of QQmlPropertyPrivate::findSignalByName +int QQmlCompiler::indexOfSignal(QQmlScript::Object *object, const QString &name, bool *notInRevision) { - QDeclarativePropertyData *d = signal(object, QStringRef(&name), notInRevision); + QQmlPropertyData *d = signal(object, QStringRef(&name), notInRevision); return d?d->coreIndex:-1; } -int QDeclarativeCompiler::indexOfProperty(QDeclarativeScript::Object *object, const QString &name, +int QQmlCompiler::indexOfProperty(QQmlScript::Object *object, const QString &name, bool *notInRevision) { return indexOfProperty(object, QStringRef(&name), notInRevision); } -int QDeclarativeCompiler::indexOfProperty(QDeclarativeScript::Object *object, const QHashedStringRef &name, +int QQmlCompiler::indexOfProperty(QQmlScript::Object *object, const QHashedStringRef &name, bool *notInRevision) { - QDeclarativePropertyData *d = property(object, name, notInRevision); + QQmlPropertyData *d = property(object, name, notInRevision); return d?d->coreIndex:-1; } diff --git a/src/qml/qml/qqmlcompiler_p.h b/src/qml/qml/qqmlcompiler_p.h new file mode 100644 index 0000000000..9b13b7e63b --- /dev/null +++ b/src/qml/qml/qqmlcompiler_p.h @@ -0,0 +1,466 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QQMLCOMPILER_P_H +#define QQMLCOMPILER_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. +// + +#include "qqml.h" +#include "qqmlerror.h" +#include +#include "qqmlinstruction_p.h" +#include "qqmlscript_p.h" +#include "qqmlengine_p.h" +#include +#include "qqmlpropertycache_p.h" +#include "qqmlintegercache_p.h" +#include "qqmltypenamecache_p.h" +#include "qqmltypeloader_p.h" + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQmlEngine; +class QQmlComponent; +class QQmlContext; +class QQmlContextData; + +class Q_AUTOTEST_EXPORT QQmlCompiledData : public QQmlRefCount, + public QQmlCleanup +{ +public: + QQmlCompiledData(QQmlEngine *engine); + virtual ~QQmlCompiledData(); + + QQmlEngine *engine; + + QString name; + QUrl url; + QQmlTypeNameCache *importCache; + + struct TypeReference + { + TypeReference() + : type(0), typePropertyCache(0), component(0) {} + + QString className; + QQmlType *type; + QQmlPropertyCache *typePropertyCache; + QQmlCompiledData *component; + + const QMetaObject *metaObject() const; + QQmlPropertyCache *propertyCache() const; + QQmlPropertyCache *createPropertyCache(QQmlEngine *); + }; + QList types; + + struct V8Program { + V8Program(const QByteArray &p, QQmlCompiledData *c) + : program(p), cdata(c) {} + + QByteArray program; + v8::Persistent bindings; + QQmlCompiledData *cdata; + }; + + QList programs; + + const QMetaObject *root; + QAbstractDynamicMetaObject rootData; + QQmlPropertyCache *rootPropertyCache; + QList primitives; + QList datas; + QByteArray bytecode; + QList propertyCaches; + QList contextCaches; + QList scripts; + QList urls; + + struct Instruction { +#define QML_INSTR_DATA_TYPEDEF(I, FMT) typedef QQmlInstructionData I; + FOR_EACH_QML_INSTR(QML_INSTR_DATA_TYPEDEF) +#undef QML_INSTR_DATA_TYPEDEF + private: + Instruction(); + }; + + void dumpInstructions(); + + template + int addInstruction(const QQmlInstructionData &data) + { + QQmlInstruction genericInstr; + QQmlInstructionMeta::setData(genericInstr, data); + return addInstructionHelper(static_cast(Instr), genericInstr); + } + int nextInstructionIndex(); + QQmlInstruction *instruction(int index); + QQmlInstruction::Type instructionType(const QQmlInstruction *instr); + + bool isInitialized() const { return hasEngine(); } + void initialize(QQmlEngine *); + +protected: + virtual void destroy(); // From QQmlRefCount + virtual void clear(); // From QQmlCleanup + +private: + friend class QQmlCompiler; + + int addInstructionHelper(QQmlInstruction::Type type, QQmlInstruction &instr); + void dump(QQmlInstruction *, int idx = -1); + QQmlCompiledData(const QQmlCompiledData &other); + QQmlCompiledData &operator=(const QQmlCompiledData &other); + QByteArray packData; + int pack(const char *, size_t); + + int indexForString(const QString &); + int indexForByteArray(const QByteArray &); + int indexForUrl(const QUrl &); +}; + +namespace QQmlCompilerTypes { + struct BindingContext + { + BindingContext() + : stack(0), owner(0), object(0) {} + BindingContext(QQmlScript::Object *o) + : stack(0), owner(0), object(o) {} + BindingContext incr() const { + BindingContext rv(object); + rv.stack = stack + 1; + return rv; + } + bool isSubContext() const { return stack != 0; } + int stack; + int owner; + QQmlScript::Object *object; + }; + + struct BindingReference + { + enum DataType { QtScript, V4, V8, + Tr, TrId }; + DataType dataType; + }; + + struct JSBindingReference : public QQmlPool::Class, + public BindingReference + { + JSBindingReference() : nextReference(0) {} + + QQmlScript::Variant expression; + QQmlScript::Property *property; + QQmlScript::Value *value; + + int compiledIndex; + + QString rewrittenExpression; + BindingContext bindingContext; + + JSBindingReference *nextReference; + }; + + struct TrBindingReference : public QQmlPool::POD, + public BindingReference + { + QStringRef text; + QStringRef comment; + int n; + }; + + struct IdList : public QFieldList + { + QQmlScript::Object *value(const QString &id) const { + for (QQmlScript::Object *o = first(); o; o = next(o)) { + if (o->id == id) + return o; + } + return 0; + } + }; + + struct DepthStack { + DepthStack() : _depth(0), _maxDepth(0) {} + DepthStack(const DepthStack &o) : _depth(o._depth), _maxDepth(o._maxDepth) {} + DepthStack &operator=(const DepthStack &o) { _depth = o._depth; _maxDepth = o._maxDepth; return *this; } + + int depth() const { return _depth; } + int maxDepth() const { return _maxDepth; } + + void push() { ++_depth; _maxDepth = qMax(_depth, _maxDepth); } + void pop() { --_depth; Q_ASSERT(_depth >= 0); Q_ASSERT(_maxDepth > _depth); } + + void pushPop(int count) { _maxDepth = qMax(_depth + count, _maxDepth); } + private: + int _depth; + int _maxDepth; + }; + + // Contains all the incremental compiler state about a component. As + // a single QML file can have multiple components defined, there may be + // more than one of these for each compile + struct ComponentCompileState : public QQmlPool::Class + { + ComponentCompileState() + : parserStatusCount(0), totalBindingsCount(0), pushedProperties(0), nested(false), + v8BindingProgramLine(-1), root(0) {} + + IdList ids; + int parserStatusCount; + int totalBindingsCount; + int pushedProperties; + bool nested; + + QByteArray compiledBindingData; + QByteArray v8BindingProgram; + int v8BindingProgramLine; + + DepthStack objectDepth; + DepthStack listDepth; + + typedef QQmlCompilerTypes::JSBindingReference B; + typedef QFieldList JSBindingReferenceList; + JSBindingReferenceList bindings; + typedef QQmlScript::Object O; + typedef QFieldList AliasingObjectsList; + AliasingObjectsList aliasingObjects; + QQmlScript::Object *root; + }; +}; + +class QMetaObjectBuilder; +class Q_AUTOTEST_EXPORT QQmlCompiler +{ + Q_DECLARE_TR_FUNCTIONS(QQmlCompiler) +public: + QQmlCompiler(QQmlPool *); + + bool compile(QQmlEngine *, QQmlTypeData *, QQmlCompiledData *); + + bool isError() const; + QList errors() const; + + static bool isAttachedPropertyName(const QString &); + static bool isSignalPropertyName(const QString &); + static bool isAttachedPropertyName(const QHashedStringRef &); + static bool isSignalPropertyName(const QHashedStringRef &); + + int evaluateEnum(const QByteArray& script) const; // for QQmlCustomParser::evaluateEnum + const QMetaObject *resolveType(const QString& name) const; // for QQmlCustomParser::resolveType + int rewriteBinding(const QQmlScript::Variant& value, const QString& name); // for QQmlCustomParser::rewriteBinding + QString rewriteSignalHandler(const QQmlScript::Variant& value, const QString &name); // for QQmlCustomParser::rewriteSignalHandler + +private: + typedef QQmlCompiledData::Instruction Instruction; + + static void reset(QQmlCompiledData *); + + void compileTree(QQmlScript::Object *tree); + + + bool buildObject(QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &); + bool buildComponent(QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &); + bool buildSubObject(QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &); + bool buildSignal(QQmlScript::Property *prop, QQmlScript::Object *obj, + const QQmlCompilerTypes::BindingContext &); + bool buildProperty(QQmlScript::Property *prop, QQmlScript::Object *obj, + const QQmlCompilerTypes::BindingContext &); + bool buildPropertyInNamespace(QQmlImportedNamespace *ns, + QQmlScript::Property *prop, + QQmlScript::Object *obj, + const QQmlCompilerTypes::BindingContext &); + bool buildIdProperty(QQmlScript::Property *prop, QQmlScript::Object *obj); + bool buildAttachedProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj, + const QQmlCompilerTypes::BindingContext &ctxt); + bool buildGroupedProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj, + const QQmlCompilerTypes::BindingContext &ctxt); + bool buildValueTypeProperty(QObject *type, + QQmlScript::Object *obj, + QQmlScript::Object *baseObj, + const QQmlCompilerTypes::BindingContext &ctxt); + bool buildListProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj, + const QQmlCompilerTypes::BindingContext &ctxt); + bool buildScriptStringProperty(QQmlScript::Property *prop, + QQmlScript::Object *obj, + const QQmlCompilerTypes::BindingContext &ctxt); + bool buildPropertyAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, + const QQmlCompilerTypes::BindingContext &ctxt); + bool buildPropertyObjectAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Value *value, + const QQmlCompilerTypes::BindingContext &ctxt); + bool buildPropertyOnAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Object *baseObj, + QQmlScript::Value *value, + const QQmlCompilerTypes::BindingContext &ctxt); + bool buildPropertyLiteralAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Value *value, + const QQmlCompilerTypes::BindingContext &ctxt); + bool doesPropertyExist(QQmlScript::Property *prop, QQmlScript::Object *obj); + bool testLiteralAssignment(QQmlScript::Property *prop, + QQmlScript::Value *value); + bool testQualifiedEnumAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Value *value, + bool *isAssignment); + enum DynamicMetaMode { IgnoreAliases, ResolveAliases, ForceCreation }; + bool mergeDynamicMetaProperties(QQmlScript::Object *obj); + bool buildDynamicMeta(QQmlScript::Object *obj, DynamicMetaMode mode); + bool checkDynamicMeta(QQmlScript::Object *obj); + bool buildBinding(QQmlScript::Value *, QQmlScript::Property *prop, + const QQmlCompilerTypes::BindingContext &ctxt); + bool buildLiteralBinding(QQmlScript::Value *, QQmlScript::Property *prop, + const QQmlCompilerTypes::BindingContext &ctxt); + bool buildComponentFromRoot(QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &); + bool compileAlias(QFastMetaBuilder &, + QByteArray &data, + QQmlScript::Object *obj, + int propIndex, int aliasIndex, + QQmlScript::Object::DynamicProperty &); + bool completeComponentBuild(); + bool checkValidId(QQmlScript::Value *, const QString &); + + + void genObject(QQmlScript::Object *obj); + void genObjectBody(QQmlScript::Object *obj); + void genValueTypeProperty(QQmlScript::Object *obj,QQmlScript::Property *); + void genComponent(QQmlScript::Object *obj); + void genValueProperty(QQmlScript::Property *prop, QQmlScript::Object *obj); + void genListProperty(QQmlScript::Property *prop, QQmlScript::Object *obj); + void genPropertyAssignment(QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Property *valueTypeProperty = 0); + void genLiteralAssignment(QQmlScript::Property *prop, + QQmlScript::Value *value); + void genBindingAssignment(QQmlScript::Value *binding, + QQmlScript::Property *prop, + QQmlScript::Object *obj, + QQmlScript::Property *valueTypeProperty = 0); + int genContextCache(); + + QQmlPropertyData genValueTypeData(QQmlScript::Property *prop, + QQmlScript::Property *valueTypeProp); + + int componentTypeRef(); + int translationContextIndex(); + + static QQmlType *toQmlType(QQmlScript::Object *from); + bool canCoerce(int to, QQmlScript::Object *from); + + QString elementName(QQmlScript::Object *); + + QStringList deferredProperties(QQmlScript::Object *); + + QQmlPropertyData *property(QQmlScript::Object *, int); + QQmlPropertyData *property(QQmlScript::Object *, const QHashedStringRef &, + bool *notInRevision = 0); + QQmlPropertyData *signal(QQmlScript::Object *, const QHashedStringRef &, + bool *notInRevision = 0); + int indexOfProperty(QQmlScript::Object *, const QHashedStringRef &, bool *notInRevision = 0); + int indexOfProperty(QQmlScript::Object *, const QString &, bool *notInRevision = 0); + int indexOfSignal(QQmlScript::Object *, const QString &, bool *notInRevision = 0); + + void addId(const QString &, QQmlScript::Object *); + + void dumpStats(); + + void addBindingReference(QQmlCompilerTypes::JSBindingReference *); + + QQmlCompilerTypes::ComponentCompileState *compileState; + + QQmlPool *pool; + + QQmlCompilerTypes::ComponentCompileState *componentState(QQmlScript::Object *); + void saveComponentState(); + + QList exceptions; + QQmlCompiledData *output; + QQmlEngine *engine; + QQmlEnginePrivate *enginePrivate; + QQmlScript::Object *unitRoot; + QQmlTypeData *unit; + int cachedComponentTypeRef; + int cachedTranslationContextIndex; + + // Compiler component statistics. Only collected if QML_COMPILER_STATS=1 + struct ComponentStat + { + ComponentStat() : ids(0), objects(0) {} + + int lineNumber; + + int ids; + QList scriptBindings; + QList optimizedBindings; + int objects; + }; + struct ComponentStats : public QQmlPool::Class + { + ComponentStat componentStat; + QList savedComponentStats; + }; + ComponentStats *componentStats; +}; + +QT_END_NAMESPACE + +#endif // QQMLCOMPILER_P_H diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/qml/qml/qqmlcomponent.cpp similarity index 70% rename from src/declarative/qml/qdeclarativecomponent.cpp rename to src/qml/qml/qqmlcomponent.cpp index c168c8f4eb..e168f063c0 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,24 +39,23 @@ ** ****************************************************************************/ -#include "qdeclarativecomponent.h" -#include "qdeclarativecomponent_p.h" -#include "qdeclarativecomponentattached_p.h" - -#include "qdeclarativecompiler_p.h" -#include "qdeclarativecontext_p.h" -#include "qdeclarativeengine_p.h" -#include "qdeclarativevme_p.h" -#include "qdeclarative.h" -#include "qdeclarativeengine.h" -#include "qdeclarativebinding_p.h" -#include "qdeclarativebinding_p_p.h" -#include "qdeclarativeglobal_p.h" -#include "qdeclarativescript_p.h" -#include -#include -#include "qdeclarativeincubator.h" -#include "qdeclarativeincubator_p.h" +#include "qqmlcomponent.h" +#include "qqmlcomponent_p.h" +#include "qqmlcomponentattached_p.h" + +#include "qqmlcompiler_p.h" +#include "qqmlcontext_p.h" +#include "qqmlengine_p.h" +#include "qqmlvme_p.h" +#include "qqml.h" +#include "qqmlengine.h" +#include "qqmlbinding_p.h" +#include "qqmlbinding_p_p.h" +#include "qqmlscript_p.h" +#include +#include +#include "qqmlincubator.h" +#include "qqmlincubator_p.h" #include #include @@ -64,21 +63,21 @@ #include #include #include -#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeComponentExtension : public QV8Engine::Deletable +class QQmlComponentExtension : public QV8Engine::Deletable { public: - QDeclarativeComponentExtension(QV8Engine *); - virtual ~QDeclarativeComponentExtension(); + QQmlComponentExtension(QV8Engine *); + virtual ~QQmlComponentExtension(); v8::Persistent incubationConstructor; v8::Persistent initialProperties; v8::Persistent forceCompletion; }; -V8_DEFINE_EXTENSION(QDeclarativeComponentExtension, componentExtension); +V8_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension); /* Try to do what's necessary for a reasonable display of the type @@ -91,7 +90,7 @@ static inline QString buildTypeNameForDebug(const QMetaObject *metaObject) static const QString qmlMarker(QLatin1String("_QML")); static const QChar underscore(QLatin1Char('_')); static const QChar asterisk(QLatin1Char('*')); - QDeclarativeType *type = QDeclarativeMetaType::qmlType(metaObject); + QQmlType *type = QQmlMetaType::qmlType(metaObject); QString typeName = type ? type->qmlTypeName() : QString::fromUtf8(metaObject->className()); if (!type) { //### optimize further? @@ -99,7 +98,7 @@ static inline QString buildTypeNameForDebug(const QMetaObject *metaObject) if (marker != -1 && marker < typeName.count() - 1) { if (typeName[marker + 1] == underscore) { const QString className = typeName.left(marker) + asterisk; - type = QDeclarativeMetaType::qmlType(QMetaType::type(className.toUtf8())); + type = QQmlMetaType::qmlType(QMetaType::type(className.toUtf8())); if (type) typeName = type->qmlTypeName(); } @@ -109,15 +108,15 @@ static inline QString buildTypeNameForDebug(const QMetaObject *metaObject) } /*! - \class QDeclarativeComponent + \class QQmlComponent \since 4.7 - \brief The QDeclarativeComponent class encapsulates a QML component definition. + \brief The QQmlComponent class encapsulates a QML component definition. \mainclass Components are reusable, encapsulated QML elements with well-defined interfaces. They are often defined in \l {qdeclarativedocuments.html}{Component Files}. - A QDeclarativeComponent instance can be created from a QML file. + A QQmlComponent instance can be created from a QML file. For example, if there is a \c main.qml file like this: \qml @@ -134,36 +133,36 @@ static inline QString buildTypeNameForDebug(const QMetaObject *metaObject) value: \code - QDeclarativeEngine *engine = new QDeclarativeEngine; - QDeclarativeComponent component(engine, QUrl::fromLocalFile("main.qml")); + QQmlEngine *engine = new QQmlEngine; + QQmlComponent component(engine, QUrl::fromLocalFile("main.qml")); QObject *myObject = component.create(); - QDeclarativeItem *item = qobject_cast(myObject); + QQuickItem *item = qobject_cast(myObject); int width = item->width(); // width = 200 \endcode \section2 Network Components - If the URL passed to QDeclarativeComponent is a network resource, or if the QML document references a - network resource, the QDeclarativeComponent has to fetch the network data before it is able to create - objects. In this case, the QDeclarativeComponent will have a \l {QDeclarativeComponent::Loading}{Loading} - \l {QDeclarativeComponent::status()}{status}. An application will have to wait until the component - is \l {QDeclarativeComponent::Ready}{Ready} before calling \l {QDeclarativeComponent::create()}. + If the URL passed to QQmlComponent is a network resource, or if the QML document references a + network resource, the QQmlComponent has to fetch the network data before it is able to create + objects. In this case, the QQmlComponent will have a \l {QQmlComponent::Loading}{Loading} + \l {QQmlComponent::status()}{status}. An application will have to wait until the component + is \l {QQmlComponent::Ready}{Ready} before calling \l {QQmlComponent::create()}. The following example shows how to load a QML file from a network resource. After creating - the QDeclarativeComponent, it tests whether the component is loading. If it is, it connects to the - QDeclarativeComponent::statusChanged() signal and otherwise calls the \c {continueLoading()} method - directly. Note that QDeclarativeComponent::isLoading() may be false for a network component if the + the QQmlComponent, it tests whether the component is loading. If it is, it connects to the + QQmlComponent::statusChanged() signal and otherwise calls the \c {continueLoading()} method + directly. Note that QQmlComponent::isLoading() may be false for a network component if the component has been cached and is ready immediately. \code MyApplication::MyApplication() { // ... - component = new QDeclarativeComponent(engine, QUrl("http://www.example.com/main.qml")); + component = new QQmlComponent(engine, QUrl("http://www.example.com/main.qml")); if (component->isLoading()) - QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), + QObject::connect(component, SIGNAL(statusChanged(QQmlComponent::Status)), this, SLOT(continueLoading())); else continueLoading(); @@ -183,7 +182,7 @@ static inline QString buildTypeNameForDebug(const QMetaObject *metaObject) */ /*! - \qmlclass Component QDeclarativeComponent + \qmlclass Component QQmlComponent \ingroup qml-utility-elements \since 4.7 \brief The Component element encapsulates a QML component definition. @@ -199,7 +198,7 @@ static inline QString buildTypeNameForDebug(const QMetaObject *metaObject) For example, here is a component that is used by multiple \l Loader objects. It contains a single item, a \l Rectangle: - \snippet doc/src/snippets/declarative/component.qml 0 + \snippet doc/src/snippets/qml/component.qml 0 Notice that while a \l Rectangle by itself would be automatically rendered and displayed, this is not the case for the above rectangle @@ -266,23 +265,23 @@ static inline QString buildTypeNameForDebug(const QMetaObject *metaObject) } \endqml - \sa QtDeclarative + \sa QtQml */ /*! - \enum QDeclarativeComponent::Status + \enum QQmlComponent::Status - Specifies the loading status of the QDeclarativeComponent. + Specifies the loading status of the QQmlComponent. - \value Null This QDeclarativeComponent has no data. Call loadUrl() or setData() to add QML content. - \value Ready This QDeclarativeComponent is ready and create() may be called. - \value Loading This QDeclarativeComponent is loading network data. - \value Error An error has occurred. Call errors() to retrieve a list of \{QDeclarativeError}{errors}. + \value Null This QQmlComponent has no data. Call loadUrl() or setData() to add QML content. + \value Ready This QQmlComponent is ready and create() may be called. + \value Loading This QQmlComponent is loading network data. + \value Error An error has occurred. Call errors() to retrieve a list of \{QQmlError}{errors}. */ -void QDeclarativeComponentPrivate::typeDataReady(QDeclarativeTypeData *) +void QQmlComponentPrivate::typeDataReady(QQmlTypeData *) { - Q_Q(QDeclarativeComponent); + Q_Q(QQmlComponent); Q_ASSERT(typeData); @@ -292,19 +291,19 @@ void QDeclarativeComponentPrivate::typeDataReady(QDeclarativeTypeData *) emit q->statusChanged(q->status()); } -void QDeclarativeComponentPrivate::typeDataProgress(QDeclarativeTypeData *, qreal p) +void QQmlComponentPrivate::typeDataProgress(QQmlTypeData *, qreal p) { - Q_Q(QDeclarativeComponent); + Q_Q(QQmlComponent); progress = p; emit q->progressChanged(p); } -void QDeclarativeComponentPrivate::fromTypeData(QDeclarativeTypeData *data) +void QQmlComponentPrivate::fromTypeData(QQmlTypeData *data) { url = data->finalUrl(); - QDeclarativeCompiledData *c = data->compiledData(); + QQmlCompiledData *c = data->compiledData(); if (!c) { Q_ASSERT(data->isError()); @@ -316,7 +315,7 @@ void QDeclarativeComponentPrivate::fromTypeData(QDeclarativeTypeData *data) data->release(); } -void QDeclarativeComponentPrivate::clear() +void QQmlComponentPrivate::clear() { if (typeData) { typeData->unregisterCallback(this); @@ -333,20 +332,20 @@ void QDeclarativeComponentPrivate::clear() /*! \internal */ -QDeclarativeComponent::QDeclarativeComponent(QObject *parent) - : QObject(*(new QDeclarativeComponentPrivate), parent) +QQmlComponent::QQmlComponent(QObject *parent) + : QObject(*(new QQmlComponentPrivate), parent) { } /*! - Destruct the QDeclarativeComponent. + Destruct the QQmlComponent. */ -QDeclarativeComponent::~QDeclarativeComponent() +QQmlComponent::~QQmlComponent() { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); if (d->state.completePending) { - qWarning("QDeclarativeComponent: Component destroyed while completion pending"); + qWarning("QQmlComponent: Component destroyed while completion pending"); d->completeCreate(); } @@ -371,12 +370,12 @@ QDeclarativeComponent::~QDeclarativeComponent() */ /*! - \property QDeclarativeComponent::status - The component's current \l{QDeclarativeComponent::Status} {status}. + \property QQmlComponent::status + The component's current \l{QQmlComponent::Status} {status}. */ -QDeclarativeComponent::Status QDeclarativeComponent::status() const +QQmlComponent::Status QQmlComponent::status() const { - Q_D(const QDeclarativeComponent); + Q_D(const QQmlComponent); if (d->typeData) return Loading; @@ -389,33 +388,33 @@ QDeclarativeComponent::Status QDeclarativeComponent::status() const } /*! - Returns true if status() == QDeclarativeComponent::Null. + Returns true if status() == QQmlComponent::Null. */ -bool QDeclarativeComponent::isNull() const +bool QQmlComponent::isNull() const { return status() == Null; } /*! - Returns true if status() == QDeclarativeComponent::Ready. + Returns true if status() == QQmlComponent::Ready. */ -bool QDeclarativeComponent::isReady() const +bool QQmlComponent::isReady() const { return status() == Ready; } /*! - Returns true if status() == QDeclarativeComponent::Error. + Returns true if status() == QQmlComponent::Error. */ -bool QDeclarativeComponent::isError() const +bool QQmlComponent::isError() const { return status() == Error; } /*! - Returns true if status() == QDeclarativeComponent::Loading. + Returns true if status() == QQmlComponent::Loading. */ -bool QDeclarativeComponent::isLoading() const +bool QQmlComponent::isLoading() const { return status() == Loading; } @@ -427,43 +426,43 @@ bool QDeclarativeComponent::isLoading() const */ /*! - \property QDeclarativeComponent::progress + \property QQmlComponent::progress The progress of loading the component, from 0.0 (nothing loaded) to 1.0 (finished). */ -qreal QDeclarativeComponent::progress() const +qreal QQmlComponent::progress() const { - Q_D(const QDeclarativeComponent); + Q_D(const QQmlComponent); return d->progress; } /*! - \fn void QDeclarativeComponent::progressChanged(qreal progress) + \fn void QQmlComponent::progressChanged(qreal progress) Emitted whenever the component's loading progress changes. \a progress will be the current progress between 0.0 (nothing loaded) and 1.0 (finished). */ /*! - \fn void QDeclarativeComponent::statusChanged(QDeclarativeComponent::Status status) + \fn void QQmlComponent::statusChanged(QQmlComponent::Status status) Emitted whenever the component's status changes. \a status will be the new status. */ /*! - Create a QDeclarativeComponent with no data and give it the specified + Create a QQmlComponent with no data and give it the specified \a engine and \a parent. Set the data with setData(). */ -QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, QObject *parent) - : QObject(*(new QDeclarativeComponentPrivate), parent) +QQmlComponent::QQmlComponent(QQmlEngine *engine, QObject *parent) + : QObject(*(new QQmlComponentPrivate), parent) { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); d->engine = engine; } /*! - Create a QDeclarativeComponent from the given \a url and give it the + Create a QQmlComponent from the given \a url and give it the specified \a parent and \a engine. Ensure that the URL provided is full and correct, in particular, use @@ -471,25 +470,25 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, QObject \sa loadUrl() */ -QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const QUrl &url, QObject *parent) -: QObject(*(new QDeclarativeComponentPrivate), parent) +QQmlComponent::QQmlComponent(QQmlEngine *engine, const QUrl &url, QObject *parent) +: QObject(*(new QQmlComponentPrivate), parent) { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); d->engine = engine; loadUrl(url); } /*! - Create a QDeclarativeComponent from the given \a fileName and give it the specified + Create a QQmlComponent from the given \a fileName and give it the specified \a parent and \a engine. \sa loadUrl() */ -QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const QString &fileName, +QQmlComponent::QQmlComponent(QQmlEngine *engine, const QString &fileName, QObject *parent) -: QObject(*(new QDeclarativeComponentPrivate), parent) +: QObject(*(new QQmlComponentPrivate), parent) { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); d->engine = engine; loadUrl(d->engine->baseUrl().resolved(QUrl::fromLocalFile(fileName))); } @@ -497,10 +496,10 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const Q /*! \internal */ -QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, QDeclarativeCompiledData *cc, int start, QObject *parent) - : QObject(*(new QDeclarativeComponentPrivate), parent) +QQmlComponent::QQmlComponent(QQmlEngine *engine, QQmlCompiledData *cc, int start, QObject *parent) + : QObject(*(new QQmlComponentPrivate), parent) { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); d->engine = engine; d->cc = cc; cc->addref(); @@ -510,19 +509,19 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, QDeclar } /*! - Sets the QDeclarativeComponent to use the given QML \a data. If \a url + Sets the QQmlComponent to use the given QML \a data. If \a url is provided, it is used to set the component name and to provide a base path for items resolved by this component. */ -void QDeclarativeComponent::setData(const QByteArray &data, const QUrl &url) +void QQmlComponent::setData(const QByteArray &data, const QUrl &url) { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); d->clear(); d->url = url; - QDeclarativeTypeData *typeData = QDeclarativeEnginePrivate::get(d->engine)->typeLoader.get(data, url); + QQmlTypeData *typeData = QQmlEnginePrivate::get(d->engine)->typeLoader.get(data, url); if (typeData->isCompleteOrError()) { d->fromTypeData(typeData); @@ -537,27 +536,27 @@ void QDeclarativeComponent::setData(const QByteArray &data, const QUrl &url) } /*! -Returns the QDeclarativeContext the component was created in. This is only +Returns the QQmlContext the component was created in. This is only valid for components created directly from QML. */ -QDeclarativeContext *QDeclarativeComponent::creationContext() const +QQmlContext *QQmlComponent::creationContext() const { - Q_D(const QDeclarativeComponent); + Q_D(const QQmlComponent); if(d->creationContext) - return d->creationContext->asQDeclarativeContext(); + return d->creationContext->asQQmlContext(); return qmlContext(this); } /*! - Load the QDeclarativeComponent from the provided \a url. + Load the QQmlComponent from the provided \a url. Ensure that the URL provided is full and correct, in particular, use \l QUrl::fromLocalFile() when loading a file from the local filesystem. */ -void QDeclarativeComponent::loadUrl(const QUrl &url) +void QQmlComponent::loadUrl(const QUrl &url) { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); d->clear(); @@ -568,13 +567,13 @@ void QDeclarativeComponent::loadUrl(const QUrl &url) d->url = url; if (url.isEmpty()) { - QDeclarativeError error; + QQmlError error; error.setDescription(tr("Invalid empty URL")); d->state.errors << error; return; } - QDeclarativeTypeData *data = QDeclarativeEnginePrivate::get(d->engine)->typeLoader.get(d->url); + QQmlTypeData *data = QQmlEnginePrivate::get(d->engine)->typeLoader.get(d->url); if (data->isCompleteOrError()) { d->fromTypeData(data); @@ -593,13 +592,13 @@ void QDeclarativeComponent::loadUrl(const QUrl &url) Return the list of errors that occurred during the last compile or create operation. An empty list is returned if isError() is not set. */ -QList QDeclarativeComponent::errors() const +QList QQmlComponent::errors() const { - Q_D(const QDeclarativeComponent); + Q_D(const QQmlComponent); if (isError()) return d->state.errors; else - return QList(); + return QList(); } /*! @@ -617,13 +616,13 @@ QList QDeclarativeComponent::errors() const \internal errorString is only meant as a way to get the errors in script */ -QString QDeclarativeComponent::errorString() const +QString QQmlComponent::errorString() const { - Q_D(const QDeclarativeComponent); + Q_D(const QQmlComponent); QString ret; if(!isError()) return ret; - foreach(const QDeclarativeError &e, d->state.errors) { + foreach(const QQmlError &e, d->state.errors) { ret += e.url().toString() + QLatin1Char(':') + QString::number(e.line()) + QLatin1Char(' ') + e.description() + QLatin1Char('\n'); @@ -637,20 +636,20 @@ QString QDeclarativeComponent::errorString() const */ /*! - \property QDeclarativeComponent::url + \property QQmlComponent::url The component URL. This is the URL passed to either the constructor, or the loadUrl() or setData() methods. */ -QUrl QDeclarativeComponent::url() const +QUrl QQmlComponent::url() const { - Q_D(const QDeclarativeComponent); + Q_D(const QQmlComponent); return d->url; } /*! \internal */ -QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, QObject *parent) +QQmlComponent::QQmlComponent(QQmlComponentPrivate &dd, QObject *parent) : QObject(dd, parent) { } @@ -661,11 +660,11 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q instance. If \a context is 0 (the default), it will create the instance in the - engine' s \l {QDeclarativeEngine::rootContext()}{root context}. + engine' s \l {QQmlEngine::rootContext()}{root context}. */ -QObject *QDeclarativeComponent::create(QDeclarativeContext *context) +QObject *QQmlComponent::create(QQmlContext *context) { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); if (!context) context = d->engine->rootContext(); @@ -677,67 +676,67 @@ QObject *QDeclarativeComponent::create(QDeclarativeContext *context) /*! This method provides more advanced control over component instance creation. - In general, programmers should use QDeclarativeComponent::create() to create a + In general, programmers should use QQmlComponent::create() to create a component. Create an object instance from this component. Returns 0 if creation failed. \a publicContext specifies the context within which to create the object instance. - When QDeclarativeComponent constructs an instance, it occurs in three steps: + When QQmlComponent constructs an instance, it occurs in three steps: \list 1 \i The object hierarchy is created, and constant values are assigned. \i Property bindings are evaluated for the the first time. - \i If applicable, QDeclarativeParserStatus::componentComplete() is called on objects. + \i If applicable, QQmlParserStatus::componentComplete() is called on objects. \endlist - QDeclarativeComponent::beginCreate() differs from QDeclarativeComponent::create() in that it - only performs step 1. QDeclarativeComponent::completeCreate() must be called to + QQmlComponent::beginCreate() differs from QQmlComponent::create() in that it + only performs step 1. QQmlComponent::completeCreate() must be called to complete steps 2 and 3. This breaking point is sometimes useful when using attached properties to communicate information to an instantiated component, as it allows their initial values to be configured before property bindings take effect. */ -QObject *QDeclarativeComponent::beginCreate(QDeclarativeContext *publicContext) +QObject *QQmlComponent::beginCreate(QQmlContext *publicContext) { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); Q_ASSERT(publicContext); - QDeclarativeContextData *context = QDeclarativeContextData::get(publicContext); + QQmlContextData *context = QQmlContextData::get(publicContext); return d->beginCreate(context); } QObject * -QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context) +QQmlComponentPrivate::beginCreate(QQmlContextData *context) { - Q_Q(QDeclarativeComponent); + Q_Q(QQmlComponent); if (!context) { - qWarning("QDeclarativeComponent: Cannot create a component in a null context"); + qWarning("QQmlComponent: Cannot create a component in a null context"); return 0; } if (!context->isValid()) { - qWarning("QDeclarativeComponent: Cannot create a component in an invalid context"); + qWarning("QQmlComponent: Cannot create a component in an invalid context"); return 0; } if (context->engine != engine) { - qWarning("QDeclarativeComponent: Must create component in context from the same QDeclarativeEngine"); + qWarning("QQmlComponent: Must create component in context from the same QQmlEngine"); return 0; } if (state.completePending) { - qWarning("QDeclarativeComponent: Cannot create new component instance before completing the previous"); + qWarning("QQmlComponent: Cannot create new component instance before completing the previous"); return 0; } if (!q->isReady()) { - qWarning("QDeclarativeComponent: Component is not ready"); + qWarning("QQmlComponent: Component is not ready"); return 0; } - QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine); + QQmlEnginePrivate *enginePriv = QQmlEnginePrivate::get(engine); bool isRoot = enginePriv->inProgressCreations == 0; enginePriv->inProgressCreations++; @@ -745,7 +744,7 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context) state.completePending = true; if (isRoot) - QDeclarativeProfilerService::startRange(QDeclarativeProfilerService::Creating); + QQmlProfilerService::startRange(QQmlProfilerService::Creating); enginePriv->referenceScarceResources(); state.vme.init(context, cc, start, creationContext); @@ -753,21 +752,21 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context) enginePriv->dereferenceScarceResources(); if (rv) { - QDeclarativeData *ddata = QDeclarativeData::get(rv); + QQmlData *ddata = QQmlData::get(rv); Q_ASSERT(ddata); ddata->indestructible = true; } if (enginePriv->isDebugging && rv) { if (!context->isInternal) - context->asQDeclarativeContextPrivate()->instances.append(rv); - QDeclarativeEngineDebugService::instance()->objectCreated(engine, rv); + context->asQQmlContextPrivate()->instances.append(rv); + QQmlEngineDebugService::instance()->objectCreated(engine, rv); if (isRoot) { - QDeclarativeProfilerService::rangeData(QDeclarativeProfilerService::Creating, + QQmlProfilerService::rangeData(QQmlProfilerService::Creating, buildTypeNameForDebug(rv->metaObject())); - QDeclarativeData *data = QDeclarativeData::get(rv); + QQmlData *data = QQmlData::get(rv); Q_ASSERT(data); - QDeclarativeProfilerService::rangeLocation(QDeclarativeProfilerService::Creating, + QQmlProfilerService::rangeLocation(QQmlProfilerService::Creating, cc->url, data->lineNumber, data->columnNumber); } } @@ -775,7 +774,7 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context) return rv; } -void QDeclarativeComponentPrivate::beginDeferred(QDeclarativeEnginePrivate *enginePriv, +void QQmlComponentPrivate::beginDeferred(QQmlEnginePrivate *enginePriv, QObject *object, ConstructionState *state) { enginePriv->inProgressCreations++; @@ -786,7 +785,7 @@ void QDeclarativeComponentPrivate::beginDeferred(QDeclarativeEnginePrivate *engi state->vme.execute(&state->errors); } -void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePriv, ConstructionState *state) +void QQmlComponentPrivate::complete(QQmlEnginePrivate *enginePriv, ConstructionState *state) { if (state->completePending) { state->vme.complete(); @@ -806,34 +805,34 @@ void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePri /*! This method provides more advanced control over component instance creation. - In general, programmers should use QDeclarativeComponent::create() to create a + In general, programmers should use QQmlComponent::create() to create a component. - Complete a component creation begin with QDeclarativeComponent::beginCreate(). + Complete a component creation begin with QQmlComponent::beginCreate(). */ -void QDeclarativeComponent::completeCreate() +void QQmlComponent::completeCreate() { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); d->completeCreate(); } -void QDeclarativeComponentPrivate::completeCreate() +void QQmlComponentPrivate::completeCreate() { if (state.completePending) { - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); complete(ep, &state); - QDeclarativeProfilerService::endRange(QDeclarativeProfilerService::Creating); + QQmlProfilerService::endRange(QQmlProfilerService::Creating); } } -QDeclarativeComponentAttached::QDeclarativeComponentAttached(QObject *parent) +QQmlComponentAttached::QQmlComponentAttached(QObject *parent) : QObject(parent), prev(0), next(0) { } -QDeclarativeComponentAttached::~QDeclarativeComponentAttached() +QQmlComponentAttached::~QQmlComponentAttached() { if (prev) *prev = next; if (next) next->prev = prev; @@ -844,19 +843,19 @@ QDeclarativeComponentAttached::~QDeclarativeComponentAttached() /*! \internal */ -QDeclarativeComponentAttached *QDeclarativeComponent::qmlAttachedProperties(QObject *obj) +QQmlComponentAttached *QQmlComponent::qmlAttachedProperties(QObject *obj) { - QDeclarativeComponentAttached *a = new QDeclarativeComponentAttached(obj); + QQmlComponentAttached *a = new QQmlComponentAttached(obj); - QDeclarativeEngine *engine = qmlEngine(obj); + QQmlEngine *engine = qmlEngine(obj); if (!engine) return a; - if (QDeclarativeEnginePrivate::get(engine)->activeVME) { // XXX should only be allowed during begin - QDeclarativeEnginePrivate *p = QDeclarativeEnginePrivate::get(engine); + if (QQmlEnginePrivate::get(engine)->activeVME) { // XXX should only be allowed during begin + QQmlEnginePrivate *p = QQmlEnginePrivate::get(engine); a->add(&p->activeVME->componentAttached); } else { - QDeclarativeData *d = QDeclarativeData::get(obj); + QQmlData *d = QQmlData::get(obj); Q_ASSERT(d); Q_ASSERT(d->context); a->add(&d->context->componentAttached); @@ -865,37 +864,37 @@ QDeclarativeComponentAttached *QDeclarativeComponent::qmlAttachedProperties(QObj return a; } -void QDeclarativeComponent::create(QDeclarativeIncubator &i, QDeclarativeContext *context, - QDeclarativeContext *forContext) +void QQmlComponent::create(QQmlIncubator &i, QQmlContext *context, + QQmlContext *forContext) { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); if (!context) context = d->engine->rootContext(); - QDeclarativeContextData *contextData = QDeclarativeContextData::get(context); - QDeclarativeContextData *forContextData = contextData; - if (forContext) forContextData = QDeclarativeContextData::get(forContext); + QQmlContextData *contextData = QQmlContextData::get(context); + QQmlContextData *forContextData = contextData; + if (forContext) forContextData = QQmlContextData::get(forContext); if (!contextData->isValid()) { - qWarning("QDeclarativeComponent: Cannot create a component in an invalid context"); + qWarning("QQmlComponent: Cannot create a component in an invalid context"); return; } if (contextData->engine != d->engine) { - qWarning("QDeclarativeComponent: Must create component in context from the same QDeclarativeEngine"); + qWarning("QQmlComponent: Must create component in context from the same QQmlEngine"); return; } if (!isReady()) { - qWarning("QDeclarativeComponent: Component is not ready"); + qWarning("QQmlComponent: Component is not ready"); return; } i.clear(); - QDeclarativeIncubatorPrivate *p = i.d; + QQmlIncubatorPrivate *p = i.d; - QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(d->engine); + QQmlEnginePrivate *enginePriv = QQmlEnginePrivate::get(d->engine); p->component = d->cc; p->component->addref(); p->vme.init(contextData, d->cc, d->start, d->creationContext); @@ -904,7 +903,7 @@ void QDeclarativeComponent::create(QDeclarativeIncubator &i, QDeclarativeContext } class QV8IncubatorResource : public QV8ObjectResource, - public QDeclarativeIncubator + public QQmlIncubator { V8_RESOURCE_TYPE(IncubatorType) public: @@ -926,7 +925,7 @@ V8_RESOURCE_TYPE(IncubatorType) void dispose(); v8::Persistent me; - QDeclarativeGuard parent; + QQmlGuard parent; v8::Persistent valuemap; v8::Persistent qmlGlobal; protected: @@ -934,25 +933,25 @@ V8_RESOURCE_TYPE(IncubatorType) virtual void setInitialState(QObject *); }; -static void QDeclarativeComponent_setQmlParent(QObject *me, QObject *parent) +static void QQmlComponent_setQmlParent(QObject *me, QObject *parent) { if (parent) { me->setParent(parent); - typedef QDeclarativePrivate::AutoParentFunction APF; - QList functions = QDeclarativeMetaType::parentFunctions(); + typedef QQmlPrivate::AutoParentFunction APF; + QList functions = QQmlMetaType::parentFunctions(); bool needParent = false; for (int ii = 0; ii < functions.count(); ++ii) { - QDeclarativePrivate::AutoParentResult res = functions.at(ii)(me, parent); - if (res == QDeclarativePrivate::Parented) { + QQmlPrivate::AutoParentResult res = functions.at(ii)(me, parent); + if (res == QQmlPrivate::Parented) { needParent = false; break; - } else if (res == QDeclarativePrivate::IncompatibleParent) { + } else if (res == QQmlPrivate::IncompatibleParent) { needParent = true; } } if (needParent) - qWarning("QDeclarativeComponent: Created graphical object was not " + qWarning("QQmlComponent: Created graphical object was not " "placed in the graphics scene."); } } @@ -995,9 +994,9 @@ static void QDeclarativeComponent_setQmlParent(QObject *me, QObject *parent) Dynamically created instances can be deleted with the \c destroy() method. See \l {Dynamic Object Management in QML} for more information. */ -void QDeclarativeComponent::createObject(QDeclarativeV8Function *args) +void QQmlComponent::createObject(QQmlV8Function *args) { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); Q_ASSERT(d->engine); Q_ASSERT(args); @@ -1019,7 +1018,7 @@ void QDeclarativeComponent::createObject(QDeclarativeV8Function *args) QV8Engine *v8engine = args->engine(); - QDeclarativeContext *ctxt = creationContext(); + QQmlContext *ctxt = creationContext(); if (!ctxt) ctxt = d->engine->rootContext(); QObject *rv = beginCreate(ctxt); @@ -1029,14 +1028,14 @@ void QDeclarativeComponent::createObject(QDeclarativeV8Function *args) return; } - QDeclarativeComponent_setQmlParent(rv, parent); + QQmlComponent_setQmlParent(rv, parent); v8::Handle ov = v8engine->newQObject(rv); Q_ASSERT(ov->IsObject()); v8::Handle object = v8::Handle::Cast(ov); if (!valuemap.IsEmpty()) { - QDeclarativeComponentExtension *e = componentExtension(v8engine); + QQmlComponentExtension *e = componentExtension(v8engine); // Try catch isn't needed as the function itself is loaded with try/catch v8::Handle function = e->initialProperties->Run(args->qmlGlobal()); v8::Handle args[] = { object, valuemap }; @@ -1045,8 +1044,8 @@ void QDeclarativeComponent::createObject(QDeclarativeV8Function *args) d->completeCreate(); - Q_ASSERT(QDeclarativeData::get(rv)); - QDeclarativeData::get(rv)->setImplicitDestructible(); + Q_ASSERT(QQmlData::get(rv)); + QQmlData::get(rv)->setImplicitDestructible(); if (!rv) args->returnValue(v8::Null()); @@ -1105,16 +1104,16 @@ void QDeclarativeComponent::createObject(QDeclarativeV8Function *args) \endjs */ -void QDeclarativeComponent::incubateObject(QDeclarativeV8Function *args) +void QQmlComponent::incubateObject(QQmlV8Function *args) { - Q_D(QDeclarativeComponent); + Q_D(QQmlComponent); Q_ASSERT(d->engine); Q_UNUSED(d); Q_ASSERT(args); QObject *parent = 0; v8::Local valuemap; - QDeclarativeIncubator::IncubationMode mode = QDeclarativeIncubator::Asynchronous; + QQmlIncubator::IncubationMode mode = QQmlIncubator::Asynchronous; if (args->Length() >= 1) parent = args->engine()->toQObject((*args)[0]); @@ -1134,12 +1133,12 @@ void QDeclarativeComponent::incubateObject(QDeclarativeV8Function *args) if (args->Length() >= 3) { quint32 v = (*args)[2]->Uint32Value(); if (v == 0) - mode = QDeclarativeIncubator::Asynchronous; + mode = QQmlIncubator::Asynchronous; else if (v == 1) - mode = QDeclarativeIncubator::AsynchronousIfNested; + mode = QQmlIncubator::AsynchronousIfNested; } - QDeclarativeComponentExtension *e = componentExtension(args->engine()); + QQmlComponentExtension *e = componentExtension(args->engine()); QV8IncubatorResource *r = new QV8IncubatorResource(args->engine(), mode); v8::Local o = e->incubationConstructor->NewInstance(); @@ -1154,7 +1153,7 @@ void QDeclarativeComponent::incubateObject(QDeclarativeV8Function *args) create(*r, creationContext()); - if (r->status() == QDeclarativeIncubator::Null) { + if (r->status() == QQmlIncubator::Null) { r->dispose(); args->returnValue(v8::Null()); } else { @@ -1163,9 +1162,9 @@ void QDeclarativeComponent::incubateObject(QDeclarativeV8Function *args) } // XXX used by QSGLoader -void QDeclarativeComponentPrivate::initializeObjectWithInitialProperties(v8::Handle qmlGlobal, v8::Handle valuemap, QObject *toCreate) +void QQmlComponentPrivate::initializeObjectWithInitialProperties(v8::Handle qmlGlobal, v8::Handle valuemap, QObject *toCreate) { - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); QV8Engine *v8engine = ep->v8engine(); v8::HandleScope handle_scope; @@ -1175,20 +1174,20 @@ void QDeclarativeComponentPrivate::initializeObjectWithInitialProperties(v8::Han v8::Handle object = v8::Handle::Cast(ov); if (!valuemap.IsEmpty()) { - QDeclarativeComponentExtension *e = componentExtension(v8engine); + QQmlComponentExtension *e = componentExtension(v8engine); // Try catch isn't needed as the function itself is loaded with try/catch v8::Handle function = e->initialProperties->Run(qmlGlobal); v8::Handle args[] = { object, valuemap }; v8::Handle::Cast(function)->Call(v8engine->global(), 2, args); } - QDeclarativeData *ddata = QDeclarativeData::get(toCreate); + QQmlData *ddata = QQmlData::get(toCreate); Q_ASSERT(ddata); ddata->setImplicitDestructible(); } -QDeclarativeComponentExtension::QDeclarativeComponentExtension(QV8Engine *engine) +QQmlComponentExtension::QQmlComponentExtension(QV8Engine *engine) { v8::HandleScope handle_scope; v8::Context::Scope scope(engine->context()); @@ -1276,7 +1275,7 @@ void QV8IncubatorResource::StatusChangedSetter(v8::Local, v8::Local< info.This()->SetInternalField(0, value); } -QDeclarativeComponentExtension::~QDeclarativeComponentExtension() +QQmlComponentExtension::~QQmlComponentExtension() { qPersistentDispose(incubationConstructor); qPersistentDispose(initialProperties); @@ -1284,16 +1283,16 @@ QDeclarativeComponentExtension::~QDeclarativeComponentExtension() } QV8IncubatorResource::QV8IncubatorResource(QV8Engine *engine, IncubationMode m) -: QV8ObjectResource(engine), QDeclarativeIncubator(m) +: QV8ObjectResource(engine), QQmlIncubator(m) { } void QV8IncubatorResource::setInitialState(QObject *o) { - QDeclarativeComponent_setQmlParent(o, parent); + QQmlComponent_setQmlParent(o, parent); if (!valuemap.IsEmpty()) { - QDeclarativeComponentExtension *e = componentExtension(engine); + QQmlComponentExtension *e = componentExtension(engine); v8::HandleScope handle_scope; v8::Context::Scope scope(engine->context()); @@ -1318,8 +1317,8 @@ void QV8IncubatorResource::dispose() void QV8IncubatorResource::statusChanged(Status s) { if (s == Ready) { - Q_ASSERT(QDeclarativeData::get(object())); - QDeclarativeData::get(object())->setImplicitDestructible(); + Q_ASSERT(QQmlData::get(object())); + QQmlData::get(object())->setImplicitDestructible(); } if (!me.IsEmpty()) { // Will be false in synchronous mode @@ -1335,9 +1334,9 @@ void QV8IncubatorResource::statusChanged(Status s) v8::TryCatch tc; f->Call(me, 1, args); if (tc.HasCaught()) { - QDeclarativeError error; - QDeclarativeExpressionPrivate::exceptionToError(tc.Message(), error); - QDeclarativeEnginePrivate::warning(QDeclarativeEnginePrivate::get(engine->engine()), + QQmlError error; + QQmlExpressionPrivate::exceptionToError(tc.Message(), error); + QQmlEnginePrivate::warning(QQmlEnginePrivate::get(engine->engine()), error); } } diff --git a/src/declarative/qml/qdeclarativecomponent.h b/src/qml/qml/qqmlcomponent.h similarity index 55% rename from src/declarative/qml/qdeclarativecomponent.h rename to src/qml/qml/qqmlcomponent.h index 2bd292081c..1265fb1c7d 100644 --- a/src/declarative/qml/qdeclarativecomponent.h +++ b/src/qml/qml/qqmlcomponent.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVECOMPONENT_H -#define QDECLARATIVECOMPONENT_H +#ifndef QQMLCOMPONENT_H +#define QQMLCOMPONENT_H -#include -#include +#include +#include #include #include -#include +#include QT_BEGIN_HEADER @@ -55,29 +55,29 @@ QT_BEGIN_NAMESPACE class QByteArray; -class QDeclarativeEngine; -class QDeclarativeComponent; -class QDeclarativeIncubator; -class QDeclarativeV8Function; -class QDeclarativeCompiledData; -class QDeclarativeComponentPrivate; -class QDeclarativeComponentAttached; - -class Q_DECLARATIVE_EXPORT QDeclarativeComponent : public QObject +class QQmlEngine; +class QQmlComponent; +class QQmlIncubator; +class QQmlV8Function; +class QQmlCompiledData; +class QQmlComponentPrivate; +class QQmlComponentAttached; + +class Q_QML_EXPORT QQmlComponent : public QObject { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeComponent) + Q_DECLARE_PRIVATE(QQmlComponent) Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged) Q_PROPERTY(Status status READ status NOTIFY statusChanged) Q_PROPERTY(QUrl url READ url CONSTANT) public: - QDeclarativeComponent(QObject *parent = 0); - QDeclarativeComponent(QDeclarativeEngine *, QObject *parent=0); - QDeclarativeComponent(QDeclarativeEngine *, const QString &fileName, QObject *parent = 0); - QDeclarativeComponent(QDeclarativeEngine *, const QUrl &url, QObject *parent = 0); - virtual ~QDeclarativeComponent(); + QQmlComponent(QObject *parent = 0); + QQmlComponent(QQmlEngine *, QObject *parent=0); + QQmlComponent(QQmlEngine *, const QString &fileName, QObject *parent = 0); + QQmlComponent(QQmlEngine *, const QUrl &url, QObject *parent = 0); + virtual ~QQmlComponent(); Q_ENUMS(Status) enum Status { Null, Ready, Loading, Error }; @@ -88,51 +88,51 @@ class Q_DECLARATIVE_EXPORT QDeclarativeComponent : public QObject bool isError() const; bool isLoading() const; - QList errors() const; + QList errors() const; Q_INVOKABLE QString errorString() const; qreal progress() const; QUrl url() const; - virtual QObject *create(QDeclarativeContext *context = 0); - virtual QObject *beginCreate(QDeclarativeContext *); + virtual QObject *create(QQmlContext *context = 0); + virtual QObject *beginCreate(QQmlContext *); virtual void completeCreate(); - void create(QDeclarativeIncubator &, QDeclarativeContext *context = 0, - QDeclarativeContext *forContext = 0); + void create(QQmlIncubator &, QQmlContext *context = 0, + QQmlContext *forContext = 0); - QDeclarativeContext *creationContext() const; + QQmlContext *creationContext() const; - static QDeclarativeComponentAttached *qmlAttachedProperties(QObject *); + static QQmlComponentAttached *qmlAttachedProperties(QObject *); public Q_SLOTS: void loadUrl(const QUrl &url); void setData(const QByteArray &, const QUrl &baseUrl); Q_SIGNALS: - void statusChanged(QDeclarativeComponent::Status); + void statusChanged(QQmlComponent::Status); void progressChanged(qreal); protected: - QDeclarativeComponent(QDeclarativeComponentPrivate &dd, QObject* parent); - Q_INVOKABLE void createObject(QDeclarativeV8Function *); - Q_INVOKABLE void incubateObject(QDeclarativeV8Function *); + QQmlComponent(QQmlComponentPrivate &dd, QObject* parent); + Q_INVOKABLE void createObject(QQmlV8Function *); + Q_INVOKABLE void incubateObject(QQmlV8Function *); private: - QDeclarativeComponent(QDeclarativeEngine *, QDeclarativeCompiledData *, int, QObject *parent); + QQmlComponent(QQmlEngine *, QQmlCompiledData *, int, QObject *parent); - Q_DISABLE_COPY(QDeclarativeComponent) - friend class QDeclarativeVME; - friend class QDeclarativeTypeData; + Q_DISABLE_COPY(QQmlComponent) + friend class QQmlVME; + friend class QQmlTypeData; }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeComponent::Status) -QML_DECLARE_TYPE(QDeclarativeComponent) -QML_DECLARE_TYPEINFO(QDeclarativeComponent, QML_HAS_ATTACHED_PROPERTIES) +Q_DECLARE_METATYPE(QQmlComponent::Status) +QML_DECLARE_TYPE(QQmlComponent) +QML_DECLARE_TYPEINFO(QQmlComponent, QML_HAS_ATTACHED_PROPERTIES) QT_END_HEADER -#endif // QDECLARATIVECOMPONENT_H +#endif // QQMLCOMPONENT_H diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/qml/qml/qqmlcomponent_p.h similarity index 62% rename from src/declarative/qml/qdeclarativecomponent_p.h rename to src/qml/qml/qqmlcomponent_p.h index 2a237366d8..731fb6a8a7 100644 --- a/src/declarative/qml/qdeclarativecomponent_p.h +++ b/src/qml/qml/qqmlcomponent_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVECOMPONENT_P_H -#define QDECLARATIVECOMPONENT_P_H +#ifndef QQMLCOMPONENT_P_H +#define QQMLCOMPONENT_P_H // // W A R N I N G @@ -53,15 +53,15 @@ // We mean it. // -#include "qdeclarativecomponent.h" +#include "qqmlcomponent.h" #include -#include "qdeclarativeengine_p.h" -#include "qdeclarativetypeloader_p.h" +#include "qqmlengine_p.h" +#include "qqmltypeloader_p.h" #include -#include "qdeclarativevme_p.h" -#include "qdeclarativeerror.h" -#include "qdeclarative.h" +#include "qqmlvme_p.h" +#include "qqmlerror.h" +#include "qqml.h" #include #include @@ -73,57 +73,57 @@ QT_BEGIN_NAMESPACE class QV8Engine; -class QDeclarativeComponent; -class QDeclarativeEngine; -class QDeclarativeCompiledData; +class QQmlComponent; +class QQmlEngine; +class QQmlCompiledData; -class QDeclarativeComponentAttached; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeComponentPrivate : public QObjectPrivate, public QDeclarativeTypeData::TypeDataCallback +class QQmlComponentAttached; +class Q_QML_PRIVATE_EXPORT QQmlComponentPrivate : public QObjectPrivate, public QQmlTypeData::TypeDataCallback { - Q_DECLARE_PUBLIC(QDeclarativeComponent) + Q_DECLARE_PUBLIC(QQmlComponent) public: - QDeclarativeComponentPrivate() : typeData(0), progress(0.), start(-1), cc(0), engine(0), creationContext(0) {} + QQmlComponentPrivate() : typeData(0), progress(0.), start(-1), cc(0), engine(0), creationContext(0) {} - QObject *beginCreate(QDeclarativeContextData *); + QObject *beginCreate(QQmlContextData *); void completeCreate(); void initializeObjectWithInitialProperties(v8::Handle qmlGlobal, v8::Handle valuemap, QObject *toCreate); - QDeclarativeTypeData *typeData; - virtual void typeDataReady(QDeclarativeTypeData *); - virtual void typeDataProgress(QDeclarativeTypeData *, qreal); + QQmlTypeData *typeData; + virtual void typeDataReady(QQmlTypeData *); + virtual void typeDataProgress(QQmlTypeData *, qreal); - void fromTypeData(QDeclarativeTypeData *data); + void fromTypeData(QQmlTypeData *data); QUrl url; qreal progress; int start; - QDeclarativeCompiledData *cc; + QQmlCompiledData *cc; struct ConstructionState { ConstructionState() : completePending(false) {} - QDeclarativeVME vme; - QList errors; + QQmlVME vme; + QList errors; bool completePending; }; ConstructionState state; - static void beginDeferred(QDeclarativeEnginePrivate *enginePriv, QObject *object, + static void beginDeferred(QQmlEnginePrivate *enginePriv, QObject *object, ConstructionState *state); - static void complete(QDeclarativeEnginePrivate *enginePriv, ConstructionState *state); + static void complete(QQmlEnginePrivate *enginePriv, ConstructionState *state); - QDeclarativeEngine *engine; - QDeclarativeGuardedContextData creationContext; + QQmlEngine *engine; + QQmlGuardedContextData creationContext; void clear(); - static QDeclarativeComponentPrivate *get(QDeclarativeComponent *c) { - return static_cast(QObjectPrivate::get(c)); + static QQmlComponentPrivate *get(QQmlComponent *c) { + return static_cast(QObjectPrivate::get(c)); } }; QT_END_NAMESPACE -#endif // QDECLARATIVECOMPONENT_P_H +#endif // QQMLCOMPONENT_P_H diff --git a/src/declarative/qml/qdeclarativecomponentattached_p.h b/src/qml/qml/qqmlcomponentattached_p.h similarity index 76% rename from src/declarative/qml/qdeclarativecomponentattached_p.h rename to src/qml/qml/qqmlcomponentattached_p.h index cd21ea1dcb..09d111c227 100644 --- a/src/declarative/qml/qdeclarativecomponentattached_p.h +++ b/src/qml/qml/qqmlcomponentattached_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVECOMPONENTATTACHED_P_H -#define QDECLARATIVECOMPONENTATTACHED_P_H +#ifndef QQMLCOMPONENTATTACHED_P_H +#define QQMLCOMPONENTATTACHED_P_H -#include +#include #include QT_BEGIN_HEADER @@ -50,14 +50,14 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class Q_AUTOTEST_EXPORT QDeclarativeComponentAttached : public QObject +class Q_AUTOTEST_EXPORT QQmlComponentAttached : public QObject { Q_OBJECT public: - QDeclarativeComponentAttached(QObject *parent = 0); - ~QDeclarativeComponentAttached(); + QQmlComponentAttached(QObject *parent = 0); + ~QQmlComponentAttached(); - void add(QDeclarativeComponentAttached **a) { + void add(QQmlComponentAttached **a) { prev = a; next = *a; *a = this; if (next) next->prev = &next; } @@ -66,20 +66,20 @@ class Q_AUTOTEST_EXPORT QDeclarativeComponentAttached : public QObject *prev = next; next = 0; prev = 0; } - QDeclarativeComponentAttached **prev; - QDeclarativeComponentAttached *next; + QQmlComponentAttached **prev; + QQmlComponentAttached *next; Q_SIGNALS: void completed(); void destruction(); private: - friend class QDeclarativeVME; - friend class QDeclarativeContextData; + friend class QQmlVME; + friend class QQmlContextData; }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVECOMPONENTATTACHED_P_H +#endif // QQMLCOMPONENTATTACHED_P_H diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/qml/qml/qqmlcontext.cpp similarity index 66% rename from src/declarative/qml/qdeclarativecontext.cpp rename to src/qml/qml/qqmlcontext.cpp index 102992947e..38acc0b0c3 100644 --- a/src/declarative/qml/qdeclarativecontext.cpp +++ b/src/qml/qml/qqmlcontext.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#include "qdeclarativecontext.h" -#include "qdeclarativecontext_p.h" -#include "qdeclarativecomponentattached_p.h" +#include "qqmlcontext.h" +#include "qqmlcontext_p.h" +#include "qqmlcomponentattached_p.h" -#include "qdeclarativecomponent_p.h" -#include "qdeclarativeexpression_p.h" -#include "qdeclarativeengine_p.h" -#include "qdeclarativeengine.h" -#include "qdeclarativeinfo.h" +#include "qqmlcomponent_p.h" +#include "qqmlexpression_p.h" +#include "qqmlengine_p.h" +#include "qqmlengine.h" +#include "qqmlinfo.h" #include #include @@ -57,46 +57,46 @@ QT_BEGIN_NAMESPACE -QDeclarativeContextPrivate::QDeclarativeContextPrivate() +QQmlContextPrivate::QQmlContextPrivate() : data(0), notifyIndex(-1) { } /*! - \class QDeclarativeContext + \class QQmlContext \since 4.7 - \brief The QDeclarativeContext class defines a context within a QML engine. + \brief The QQmlContext class defines a context within a QML engine. \mainclass Contexts allow data to be exposed to the QML components instantiated by the QML engine. - Each QDeclarativeContext contains a set of properties, distinct from its QObject + Each QQmlContext contains a set of properties, distinct from its QObject properties, that allow data to be explicitly bound to a context by name. The context properties are defined and updated by calling - QDeclarativeContext::setContextProperty(). The following example shows a Qt model + QQmlContext::setContextProperty(). The following example shows a Qt model being bound to a context and then accessed from a QML file. \code - QDeclarativeEngine engine; + QQmlEngine engine; QStringListModel modelData; - QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext()); + QQmlContext *context = new QQmlContext(engine.rootContext()); context->setContextProperty("myModel", &modelData); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nListView { model: myModel }", QUrl()); QObject *window = component.create(context); \endcode - Note it is the responsibility of the creator to delete any QDeclarativeContext it + Note it is the responsibility of the creator to delete any QQmlContext it constructs. If the \c context object in the example is no longer needed when the \c window component instance is destroyed, the \c context must be destroyed explicitly. The simplest way to ensure this is to set \c window as the parent of \c context. To simplify binding and maintaining larger data sets, a context object can be set - on a QDeclarativeContext. All the properties of the context object are available + on a QQmlContext. All the properties of the context object are available by name in the context, as though they were all individually added through calls - to QDeclarativeContext::setContextProperty(). Changes to the property's values are + to QQmlContext::setContextProperty(). Changes to the property's values are detected through the property's notify signal. Setting a context object is both faster and easier than manually adding and maintaing context property values. @@ -111,22 +111,22 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate() }; MyDataSet myDataSet; - QDeclarativeEngine engine; - QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext()); + QQmlEngine engine; + QQmlContext *context = new QQmlContext(engine.rootContext()); context->setContextObject(&myDataSet); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nListView { model: myModel }", QUrl()); component.create(context); \endcode - All properties added explicitly by QDeclarativeContext::setContextProperty() take + All properties added explicitly by QQmlContext::setContextProperty() take precedence over the context object's properties. \section2 The Context Hierarchy Contexts form a hierarchy. The root of this hierarchy is the QML engine's - \l {QDeclarativeEngine::rootContext()}{root context}. Child contexts inherit + \l {QQmlEngine::rootContext()}{root context}. Child contexts inherit the context properties of their parents; if a child context sets a context property that already exists in its parent, the new context property overrides that of the parent. @@ -136,9 +136,9 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate() new value. \code - QDeclarativeEngine engine; - QDeclarativeContext *context1 = new QDeclarativeContext(engine.rootContext()); - QDeclarativeContext *context2 = new QDeclarativeContext(context1); + QQmlEngine engine; + QQmlContext *context1 = new QQmlContext(engine.rootContext()); + QQmlContext *context2 = new QQmlContext(context1); context1->setContextProperty("a", 12); context1->setContextProperty("b", 12); @@ -159,61 +159,61 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate() */ /*! \internal */ -QDeclarativeContext::QDeclarativeContext(QDeclarativeEngine *e, bool) -: QObject(*(new QDeclarativeContextPrivate)) +QQmlContext::QQmlContext(QQmlEngine *e, bool) +: QObject(*(new QQmlContextPrivate)) { - Q_D(QDeclarativeContext); - d->data = new QDeclarativeContextData(this); + Q_D(QQmlContext); + d->data = new QQmlContextData(this); d->data->engine = e; } /*! - Create a new QDeclarativeContext as a child of \a engine's root context, and the + Create a new QQmlContext as a child of \a engine's root context, and the QObject \a parent. */ -QDeclarativeContext::QDeclarativeContext(QDeclarativeEngine *engine, QObject *parent) -: QObject(*(new QDeclarativeContextPrivate), parent) +QQmlContext::QQmlContext(QQmlEngine *engine, QObject *parent) +: QObject(*(new QQmlContextPrivate), parent) { - Q_D(QDeclarativeContext); - d->data = new QDeclarativeContextData(this); + Q_D(QQmlContext); + d->data = new QQmlContextData(this); - d->data->setParent(engine?QDeclarativeContextData::get(engine->rootContext()):0); + d->data->setParent(engine?QQmlContextData::get(engine->rootContext()):0); } /*! - Create a new QDeclarativeContext with the given \a parentContext, and the + Create a new QQmlContext with the given \a parentContext, and the QObject \a parent. */ -QDeclarativeContext::QDeclarativeContext(QDeclarativeContext *parentContext, QObject *parent) -: QObject(*(new QDeclarativeContextPrivate), parent) +QQmlContext::QQmlContext(QQmlContext *parentContext, QObject *parent) +: QObject(*(new QQmlContextPrivate), parent) { - Q_D(QDeclarativeContext); - d->data = new QDeclarativeContextData(this); + Q_D(QQmlContext); + d->data = new QQmlContextData(this); - d->data->setParent(parentContext?QDeclarativeContextData::get(parentContext):0); + d->data->setParent(parentContext?QQmlContextData::get(parentContext):0); } /*! \internal */ -QDeclarativeContext::QDeclarativeContext(QDeclarativeContextData *data) -: QObject(*(new QDeclarativeContextPrivate), 0) +QQmlContext::QQmlContext(QQmlContextData *data) +: QObject(*(new QQmlContextPrivate), 0) { - Q_D(QDeclarativeContext); + Q_D(QQmlContext); d->data = data; } /*! - Destroys the QDeclarativeContext. + Destroys the QQmlContext. Any expressions, or sub-contexts dependent on this context will be - invalidated, but not destroyed (unless they are parented to the QDeclarativeContext + invalidated, but not destroyed (unless they are parented to the QQmlContext object). */ -QDeclarativeContext::~QDeclarativeContext() +QQmlContext::~QQmlContext() { - Q_D(QDeclarativeContext); + Q_D(QQmlContext); if (!d->data->isInternal) d->data->destroy(); @@ -225,57 +225,57 @@ QDeclarativeContext::~QDeclarativeContext() To be valid, a context must have a engine, and it's contextObject(), if any, must not have been deleted. */ -bool QDeclarativeContext::isValid() const +bool QQmlContext::isValid() const { - Q_D(const QDeclarativeContext); + Q_D(const QQmlContext); return d->data && d->data->isValid(); } /*! - Return the context's QDeclarativeEngine, or 0 if the context has no QDeclarativeEngine or the - QDeclarativeEngine was destroyed. + Return the context's QQmlEngine, or 0 if the context has no QQmlEngine or the + QQmlEngine was destroyed. */ -QDeclarativeEngine *QDeclarativeContext::engine() const +QQmlEngine *QQmlContext::engine() const { - Q_D(const QDeclarativeContext); + Q_D(const QQmlContext); return d->data->engine; } /*! - Return the context's parent QDeclarativeContext, or 0 if this context has no + Return the context's parent QQmlContext, or 0 if this context has no parent or if the parent has been destroyed. */ -QDeclarativeContext *QDeclarativeContext::parentContext() const +QQmlContext *QQmlContext::parentContext() const { - Q_D(const QDeclarativeContext); - return d->data->parent?d->data->parent->asQDeclarativeContext():0; + Q_D(const QQmlContext); + return d->data->parent?d->data->parent->asQQmlContext():0; } /*! Return the context object, or 0 if there is no context object. */ -QObject *QDeclarativeContext::contextObject() const +QObject *QQmlContext::contextObject() const { - Q_D(const QDeclarativeContext); + Q_D(const QQmlContext); return d->data->contextObject; } /*! Set the context \a object. */ -void QDeclarativeContext::setContextObject(QObject *object) +void QQmlContext::setContextObject(QObject *object) { - Q_D(QDeclarativeContext); + Q_D(QQmlContext); - QDeclarativeContextData *data = d->data; + QQmlContextData *data = d->data; if (data->isInternal) { - qWarning("QDeclarativeContext: Cannot set context object for internal context."); + qWarning("QQmlContext: Cannot set context object for internal context."); return; } if (!isValid()) { - qWarning("QDeclarativeContext: Cannot set context object on invalid context."); + qWarning("QQmlContext: Cannot set context object on invalid context."); return; } @@ -285,34 +285,34 @@ void QDeclarativeContext::setContextObject(QObject *object) /*! Set a the \a value of the \a name property on this context. */ -void QDeclarativeContext::setContextProperty(const QString &name, const QVariant &value) +void QQmlContext::setContextProperty(const QString &name, const QVariant &value) { - Q_D(QDeclarativeContext); + Q_D(QQmlContext); if (d->notifyIndex == -1) d->notifyIndex = this->metaObject()->methodCount(); - QDeclarativeContextData *data = d->data; + QQmlContextData *data = d->data; if (data->isInternal) { - qWarning("QDeclarativeContext: Cannot set property on internal context."); + qWarning("QQmlContext: Cannot set property on internal context."); return; } if (!isValid()) { - qWarning("QDeclarativeContext: Cannot set property on invalid context."); + qWarning("QQmlContext: Cannot set property on invalid context."); return; } if (data->engine) { bool ok; - QObject *o = QDeclarativeEnginePrivate::get(data->engine)->toQObject(value, &ok); + QObject *o = QQmlEnginePrivate::get(data->engine)->toQObject(value, &ok); if (ok) { setContextProperty(name, o); return; } } - if (!data->propertyNames) data->propertyNames = new QDeclarativeIntegerCache(); + if (!data->propertyNames) data->propertyNames = new QQmlIntegerCache(); int idx = data->propertyNames->value(name); if (idx == -1) { @@ -329,27 +329,27 @@ void QDeclarativeContext::setContextProperty(const QString &name, const QVariant /*! Set the \a value of the \a name property on this context. - QDeclarativeContext does \bold not take ownership of \a value. + QQmlContext does \bold not take ownership of \a value. */ -void QDeclarativeContext::setContextProperty(const QString &name, QObject *value) +void QQmlContext::setContextProperty(const QString &name, QObject *value) { - Q_D(QDeclarativeContext); + Q_D(QQmlContext); if (d->notifyIndex == -1) d->notifyIndex = this->metaObject()->methodCount(); - QDeclarativeContextData *data = d->data; + QQmlContextData *data = d->data; if (data->isInternal) { - qWarning("QDeclarativeContext: Cannot set property on internal context."); + qWarning("QQmlContext: Cannot set property on internal context."); return; } if (!isValid()) { - qWarning("QDeclarativeContext: Cannot set property on invalid context."); + qWarning("QQmlContext: Cannot set property on invalid context."); return; } - if (!data->propertyNames) data->propertyNames = new QDeclarativeIntegerCache(); + if (!data->propertyNames) data->propertyNames = new QQmlIntegerCache(); int idx = data->propertyNames->value(name); if (idx == -1) { @@ -367,13 +367,13 @@ void QDeclarativeContext::setContextProperty(const QString &name, QObject *value Returns the value of the \a name property for this context as a QVariant. */ -QVariant QDeclarativeContext::contextProperty(const QString &name) const +QVariant QQmlContext::contextProperty(const QString &name) const { - Q_D(const QDeclarativeContext); + Q_D(const QQmlContext); QVariant value; int idx = -1; - QDeclarativeContextData *data = d->data; + QQmlContextData *data = d->data; if (data->propertyNames) idx = data->propertyNames->value(name); @@ -382,9 +382,9 @@ QVariant QDeclarativeContext::contextProperty(const QString &name) const QByteArray utf8Name = name.toUtf8(); if (data->contextObject) { QObject *obj = data->contextObject; - QDeclarativePropertyData local; - QDeclarativePropertyData *property = - QDeclarativePropertyCache::property(data->engine, obj, name, local); + QQmlPropertyData local; + QQmlPropertyData *property = + QQmlPropertyCache::property(data->engine, obj, name, local); if (property) value = obj->metaObject()->property(property->coreIndex).read(obj); } @@ -407,9 +407,9 @@ the case of QML created contexts. If the object has multiple names, the first is returned. */ -QString QDeclarativeContext::nameForObject(QObject *object) const +QString QQmlContext::nameForObject(QObject *object) const { - Q_D(const QDeclarativeContext); + Q_D(const QQmlContext); return d->data->findObjectId(object); } @@ -418,17 +418,17 @@ QString QDeclarativeContext::nameForObject(QObject *object) const Resolves the URL \a src relative to the URL of the containing component. - \sa QDeclarativeEngine::baseUrl(), setBaseUrl() + \sa QQmlEngine::baseUrl(), setBaseUrl() */ -QUrl QDeclarativeContext::resolvedUrl(const QUrl &src) +QUrl QQmlContext::resolvedUrl(const QUrl &src) { - Q_D(QDeclarativeContext); + Q_D(QQmlContext); return d->data->resolvedUrl(src); } -QUrl QDeclarativeContextData::resolvedUrl(const QUrl &src) +QUrl QQmlContextData::resolvedUrl(const QUrl &src) { - QDeclarativeContextData *ctxt = this; + QQmlContextData *ctxt = this; if (src.isRelative() && !src.isEmpty()) { if (ctxt) { @@ -459,9 +459,9 @@ QUrl QDeclarativeContextData::resolvedUrl(const QUrl &src) \sa resolvedUrl() */ -void QDeclarativeContext::setBaseUrl(const QUrl &baseUrl) +void QQmlContext::setBaseUrl(const QUrl &baseUrl) { - Q_D(QDeclarativeContext); + Q_D(QQmlContext); d->data->url = baseUrl; d->data->urlString = baseUrl.toString(); @@ -471,10 +471,10 @@ void QDeclarativeContext::setBaseUrl(const QUrl &baseUrl) Returns the base url of the component, or the containing component if none is set. */ -QUrl QDeclarativeContext::baseUrl() const +QUrl QQmlContext::baseUrl() const { - Q_D(const QDeclarativeContext); - const QDeclarativeContextData* data = d->data; + Q_D(const QQmlContext); + const QQmlContextData* data = d->data; while (data && data->url.isEmpty()) data = data->parent; @@ -484,10 +484,10 @@ QUrl QDeclarativeContext::baseUrl() const return QUrl(); } -int QDeclarativeContextPrivate::context_count(QDeclarativeListProperty *prop) +int QQmlContextPrivate::context_count(QQmlListProperty *prop) { - QDeclarativeContext *context = static_cast(prop->object); - QDeclarativeContextPrivate *d = QDeclarativeContextPrivate::get(context); + QQmlContext *context = static_cast(prop->object); + QQmlContextPrivate *d = QQmlContextPrivate::get(context); int contextProperty = (int)(quintptr)prop->data; if (d->propertyValues.at(contextProperty).userType() != qMetaTypeId >()) { @@ -497,10 +497,10 @@ int QDeclarativeContextPrivate::context_count(QDeclarativeListProperty } } -QObject *QDeclarativeContextPrivate::context_at(QDeclarativeListProperty *prop, int index) +QObject *QQmlContextPrivate::context_at(QQmlListProperty *prop, int index) { - QDeclarativeContext *context = static_cast(prop->object); - QDeclarativeContextPrivate *d = QDeclarativeContextPrivate::get(context); + QQmlContext *context = static_cast(prop->object); + QQmlContextPrivate *d = QQmlContextPrivate::get(context); int contextProperty = (int)(quintptr)prop->data; if (d->propertyValues.at(contextProperty).userType() != qMetaTypeId >()) { @@ -511,7 +511,7 @@ QObject *QDeclarativeContextPrivate::context_at(QDeclarativeListPropertynext; if (componentAttached) componentAttached->prev = &componentAttached; @@ -561,11 +561,11 @@ void QDeclarativeContextData::invalidate() parent = 0; } -void QDeclarativeContextData::clearContext() +void QQmlContextData::clearContext() { if (engine) { while (componentAttached) { - QDeclarativeComponentAttached *a = componentAttached; + QQmlComponentAttached *a = componentAttached; componentAttached = a->next; if (componentAttached) componentAttached->prev = &componentAttached; @@ -576,9 +576,9 @@ void QDeclarativeContextData::clearContext() } } - QDeclarativeAbstractExpression *expression = expressions; + QQmlAbstractExpression *expression = expressions; while (expression) { - QDeclarativeAbstractExpression *nextExpression = expression->m_nextExpression; + QQmlAbstractExpression *nextExpression = expression->m_nextExpression; expression->m_prevExpression = 0; expression->m_nextExpression = 0; @@ -590,7 +590,7 @@ void QDeclarativeContextData::clearContext() expressions = 0; } -void QDeclarativeContextData::destroy() +void QQmlContextData::destroy() { if (linkedContext) linkedContext->destroy(); @@ -600,7 +600,7 @@ void QDeclarativeContextData::destroy() clearContext(); while (contextObjects) { - QDeclarativeData *co = contextObjects; + QQmlData *co = contextObjects; contextObjects = contextObjects->nextContextObject; co->context = 0; @@ -609,9 +609,9 @@ void QDeclarativeContextData::destroy() co->prevContextObject = 0; } - QDeclarativeGuardedContextData *contextGuard = contextGuards; + QQmlGuardedContextData *contextGuard = contextGuards; while (contextGuard) { - QDeclarativeGuardedContextData *next = contextGuard->m_next; + QQmlGuardedContextData *next = contextGuard->m_next; contextGuard->m_next = 0; contextGuard->m_prev = 0; contextGuard->m_contextData = 0; @@ -643,7 +643,7 @@ void QDeclarativeContextData::destroy() delete this; } -void QDeclarativeContextData::setParent(QDeclarativeContextData *p, bool parentTakesOwnership) +void QQmlContextData::setParent(QQmlContextData *p, bool parentTakesOwnership) { if (p) { parent = p; @@ -656,9 +656,9 @@ void QDeclarativeContextData::setParent(QDeclarativeContextData *p, bool parentT } } -void QDeclarativeContextData::refreshExpressionsRecursive(QDeclarativeAbstractExpression *expression) +void QQmlContextData::refreshExpressionsRecursive(QQmlAbstractExpression *expression) { - QDeclarativeAbstractExpression::DeleteWatcher w(expression); + QQmlAbstractExpression::DeleteWatcher w(expression); if (expression->m_nextExpression) refreshExpressionsRecursive(expression->m_nextExpression); @@ -667,16 +667,16 @@ void QDeclarativeContextData::refreshExpressionsRecursive(QDeclarativeAbstractEx expression->refresh(); } -static inline bool expressions_to_run(QDeclarativeContextData *ctxt, bool isGlobalRefresh) +static inline bool expressions_to_run(QQmlContextData *ctxt, bool isGlobalRefresh) { return ctxt->expressions && (!isGlobalRefresh || ctxt->unresolvedNames); } -void QDeclarativeContextData::refreshExpressionsRecursive(bool isGlobal) +void QQmlContextData::refreshExpressionsRecursive(bool isGlobal) { // For efficiency, we try and minimize the number of guards we have to create if (expressions_to_run(this, isGlobal) && (nextChild || childContexts)) { - QDeclarativeGuardedContextData guard(this); + QQmlGuardedContextData guard(this); if (childContexts) childContexts->refreshExpressionsRecursive(isGlobal); @@ -697,7 +697,7 @@ void QDeclarativeContextData::refreshExpressionsRecursive(bool isGlobal) } else if (nextChild && childContexts) { - QDeclarativeGuardedContextData guard(this); + QQmlGuardedContextData guard(this); childContexts->refreshExpressionsRecursive(isGlobal); @@ -718,13 +718,13 @@ void QDeclarativeContextData::refreshExpressionsRecursive(bool isGlobal) // Refreshes all expressions that could possibly depend on this context. Refreshing flushes all // context-tree dependent caches in the expressions, and should occur every time the context tree // *structure* (not values) changes. -void QDeclarativeContextData::refreshExpressions() +void QQmlContextData::refreshExpressions() { bool isGlobal = (parent == 0); // For efficiency, we try and minimize the number of guards we have to create if (expressions_to_run(this, isGlobal) && childContexts) { - QDeclarativeGuardedContextData guard(this); + QQmlGuardedContextData guard(this); childContexts->refreshExpressionsRecursive(isGlobal); @@ -742,9 +742,9 @@ void QDeclarativeContextData::refreshExpressions() } } -void QDeclarativeContextData::addObject(QObject *o) +void QQmlContextData::addObject(QObject *o) { - QDeclarativeData *data = QDeclarativeData::get(o, true); + QQmlData *data = QQmlData::get(o, true); Q_ASSERT(data->context == 0); @@ -758,13 +758,13 @@ void QDeclarativeContextData::addObject(QObject *o) contextObjects = data; } -void QDeclarativeContextData::setIdProperty(int idx, QObject *obj) +void QQmlContextData::setIdProperty(int idx, QObject *obj) { idValues[idx] = obj; idValues[idx].context = this; } -void QDeclarativeContextData::setIdPropertyData(QDeclarativeIntegerCache *data) +void QQmlContextData::setIdPropertyData(QQmlIntegerCache *data) { Q_ASSERT(!propertyNames); propertyNames = data; @@ -774,7 +774,7 @@ void QDeclarativeContextData::setIdPropertyData(QDeclarativeIntegerCache *data) idValues = new ContextGuard[idValueCount]; } -QString QDeclarativeContextData::findObjectId(const QObject *obj) const +QString QQmlContextData::findObjectId(const QObject *obj) const { if (!propertyNames) return QString(); @@ -785,7 +785,7 @@ QString QDeclarativeContextData::findObjectId(const QObject *obj) const } if (publicContext) { - QDeclarativeContextPrivate *p = QDeclarativeContextPrivate::get(publicContext); + QQmlContextPrivate *p = QQmlContextPrivate::get(publicContext); for (int ii = 0; ii < p->propertyValues.count(); ++ii) if (p->propertyValues.at(ii) == QVariant::fromValue((QObject *)obj)) return propertyNames->findId(ii); @@ -796,16 +796,16 @@ QString QDeclarativeContextData::findObjectId(const QObject *obj) const return QString(); } -QDeclarativeContext *QDeclarativeContextData::asQDeclarativeContext() +QQmlContext *QQmlContextData::asQQmlContext() { if (!publicContext) - publicContext = new QDeclarativeContext(this); + publicContext = new QQmlContext(this); return publicContext; } -QDeclarativeContextPrivate *QDeclarativeContextData::asQDeclarativeContextPrivate() +QQmlContextPrivate *QQmlContextData::asQQmlContextPrivate() { - return QDeclarativeContextPrivate::get(asQDeclarativeContext()); + return QQmlContextPrivate::get(asQQmlContext()); } QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativecontext.h b/src/qml/qml/qqmlcontext.h similarity index 64% rename from src/declarative/qml/qdeclarativecontext.h rename to src/qml/qml/qqmlcontext.h index b1a8362a3b..f6d8aa1d3a 100644 --- a/src/declarative/qml/qdeclarativecontext.h +++ b/src/qml/qml/qqmlcontext.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,12 +39,12 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVECONTEXT_H -#define QDECLARATIVECONTEXT_H +#ifndef QQMLCONTEXT_H +#define QQMLCONTEXT_H #include #include -#include +#include #include #include @@ -54,26 +54,26 @@ QT_BEGIN_NAMESPACE class QString; -class QDeclarativeEngine; -class QDeclarativeRefCount; -class QDeclarativeContextPrivate; -class QDeclarativeCompositeTypeData; -class QDeclarativeContextData; +class QQmlEngine; +class QQmlRefCount; +class QQmlContextPrivate; +class QQmlCompositeTypeData; +class QQmlContextData; -class Q_DECLARATIVE_EXPORT QDeclarativeContext : public QObject +class Q_QML_EXPORT QQmlContext : public QObject { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeContext) + Q_DECLARE_PRIVATE(QQmlContext) public: - QDeclarativeContext(QDeclarativeEngine *parent, QObject *objParent=0); - QDeclarativeContext(QDeclarativeContext *parent, QObject *objParent=0); - virtual ~QDeclarativeContext(); + QQmlContext(QQmlEngine *parent, QObject *objParent=0); + QQmlContext(QQmlContext *parent, QObject *objParent=0); + virtual ~QQmlContext(); bool isValid() const; - QDeclarativeEngine *engine() const; - QDeclarativeContext *parentContext() const; + QQmlEngine *engine() const; + QQmlContext *parentContext() const; QObject *contextObject() const; void setContextObject(QObject *); @@ -90,19 +90,19 @@ class Q_DECLARATIVE_EXPORT QDeclarativeContext : public QObject QUrl baseUrl() const; private: - friend class QDeclarativeVME; - friend class QDeclarativeEngine; - friend class QDeclarativeEnginePrivate; - friend class QDeclarativeExpression; - friend class QDeclarativeExpressionPrivate; - friend class QDeclarativeComponent; - friend class QDeclarativeComponentPrivate; - friend class QDeclarativeScriptPrivate; - friend class QDeclarativeBoundSignalProxy; - friend class QDeclarativeContextData; - QDeclarativeContext(QDeclarativeContextData *); - QDeclarativeContext(QDeclarativeEngine *, bool); - Q_DISABLE_COPY(QDeclarativeContext) + friend class QQmlVME; + friend class QQmlEngine; + friend class QQmlEnginePrivate; + friend class QQmlExpression; + friend class QQmlExpressionPrivate; + friend class QQmlComponent; + friend class QQmlComponentPrivate; + friend class QQmlScriptPrivate; + friend class QQmlBoundSignalProxy; + friend class QQmlContextData; + QQmlContext(QQmlContextData *); + QQmlContext(QQmlEngine *, bool); + Q_DISABLE_COPY(QQmlContext) }; QT_END_NAMESPACE @@ -110,4 +110,4 @@ Q_DECLARE_METATYPE(QList) QT_END_HEADER -#endif // QDECLARATIVECONTEXT_H +#endif // QQMLCONTEXT_H diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/qml/qml/qqmlcontext_p.h similarity index 53% rename from src/declarative/qml/qdeclarativecontext_p.h rename to src/qml/qml/qqmlcontext_p.h index c53fc9cc21..d10543bde5 100644 --- a/src/declarative/qml/qdeclarativecontext_p.h +++ b/src/qml/qml/qqmlcontext_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVECONTEXT_P_H -#define QDECLARATIVECONTEXT_P_H +#ifndef QQMLCONTEXT_P_H +#define QQMLCONTEXT_P_H // // W A R N I N G @@ -53,22 +53,22 @@ // We mean it. // -#include "qdeclarativecontext.h" +#include "qqmlcontext.h" -#include "qdeclarativedata_p.h" -#include "qdeclarativeintegercache_p.h" -#include "qdeclarativetypenamecache_p.h" -#include "qdeclarativenotifier_p.h" -#include "qdeclarativelist.h" -#include "qdeclarativescript_p.h" +#include "qqmldata_p.h" +#include "qqmlintegercache_p.h" +#include "qqmltypenamecache_p.h" +#include "qqmlnotifier_p.h" +#include "qqmllist.h" +#include "qqmlscript_p.h" #include -#include +#include #include #include #include -#include +#include #include @@ -76,48 +76,48 @@ QT_BEGIN_NAMESPACE class QV8Bindings; -class QDeclarativeContext; -class QDeclarativeExpression; -class QDeclarativeEngine; -class QDeclarativeExpression; -class QDeclarativeExpressionPrivate; -class QDeclarativeAbstractExpression; +class QQmlContext; +class QQmlExpression; +class QQmlEngine; +class QQmlExpression; +class QQmlExpressionPrivate; +class QQmlAbstractExpression; class QV4Bindings; -class QDeclarativeContextData; +class QQmlContextData; -class QDeclarativeContextPrivate : public QObjectPrivate +class QQmlContextPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeContext) + Q_DECLARE_PUBLIC(QQmlContext) public: - QDeclarativeContextPrivate(); + QQmlContextPrivate(); - QDeclarativeContextData *data; + QQmlContextData *data; QList propertyValues; int notifyIndex; - static QDeclarativeContextPrivate *get(QDeclarativeContext *context) { - return static_cast(QObjectPrivate::get(context)); + static QQmlContextPrivate *get(QQmlContext *context) { + return static_cast(QObjectPrivate::get(context)); } - static QDeclarativeContext *get(QDeclarativeContextPrivate *context) { - return static_cast(context->q_func()); + static QQmlContext *get(QQmlContextPrivate *context) { + return static_cast(context->q_func()); } // Only used for debugging QList > instances; - static int context_count(QDeclarativeListProperty *); - static QObject *context_at(QDeclarativeListProperty *, int); + static int context_count(QQmlListProperty *); + static QObject *context_at(QQmlListProperty *, int); }; -class QDeclarativeVME; -class QDeclarativeComponentAttached; -class QDeclarativeGuardedContextData; -class Q_DECLARATIVE_EXPORT QDeclarativeContextData +class QQmlVME; +class QQmlComponentAttached; +class QQmlGuardedContextData; +class Q_QML_EXPORT QQmlContextData { public: - QDeclarativeContextData(); - QDeclarativeContextData(QDeclarativeContext *); + QQmlContextData(); + QQmlContextData(QQmlContext *); void clearContext(); void destroy(); void invalidate(); @@ -127,33 +127,33 @@ class Q_DECLARATIVE_EXPORT QDeclarativeContextData } // My parent context and engine - QDeclarativeContextData *parent; - QDeclarativeEngine *engine; + QQmlContextData *parent; + QQmlEngine *engine; - void setParent(QDeclarativeContextData *, bool parentTakesOwnership = false); + void setParent(QQmlContextData *, bool parentTakesOwnership = false); void refreshExpressions(); void addObject(QObject *); QUrl resolvedUrl(const QUrl &); - // My containing QDeclarativeContext. If isInternal is true this owns publicContext. + // My containing QQmlContext. If isInternal is true this owns publicContext. // If internal is false publicContext owns this. - QDeclarativeContext *asQDeclarativeContext(); - QDeclarativeContextPrivate *asQDeclarativeContextPrivate(); + QQmlContext *asQQmlContext(); + QQmlContextPrivate *asQQmlContextPrivate(); quint32 isInternal:1; quint32 ownedByParent:1; // unrelated to isInternal; parent context deletes children if true. quint32 isJSContext:1; quint32 isPragmaLibraryContext:1; quint32 unresolvedNames:1; // True if expressions in this context failed to resolve a toplevel name quint32 dummy:28; - QDeclarativeContext *publicContext; + QQmlContext *publicContext; // VME data that is constructing this context if any void *activeVMEData; // Property name cache - QDeclarativeIntegerCache *propertyNames; + QQmlIntegerCache *propertyNames; // Context object QObject *contextObject; @@ -166,26 +166,26 @@ class Q_DECLARATIVE_EXPORT QDeclarativeContextData QString urlString; // List of imports that apply to this context - QDeclarativeTypeNameCache *imports; + QQmlTypeNameCache *imports; // My children - QDeclarativeContextData *childContexts; + QQmlContextData *childContexts; // My peers in parent's childContexts list - QDeclarativeContextData *nextChild; - QDeclarativeContextData **prevChild; + QQmlContextData *nextChild; + QQmlContextData **prevChild; // Expressions that use this context - QDeclarativeAbstractExpression *expressions; + QQmlAbstractExpression *expressions; // Doubly-linked list of objects that are owned by this context - QDeclarativeData *contextObjects; + QQmlData *contextObjects; // Doubly-linked list of context guards (XXX merge with contextObjects) - QDeclarativeGuardedContextData *contextGuards; + QQmlGuardedContextData *contextGuards; // id guards - struct ContextGuard : public QDeclarativeGuard + struct ContextGuard : public QQmlGuard { inline ContextGuard(); inline ContextGuard &operator=(QObject *obj); @@ -193,20 +193,20 @@ class Q_DECLARATIVE_EXPORT QDeclarativeContextData inline bool wasSet() const; - QFlagPointer context; - QDeclarativeNotifier bindings; + QFlagPointer context; + QQmlNotifier bindings; }; ContextGuard *idValues; int idValueCount; void setIdProperty(int, QObject *); - void setIdPropertyData(QDeclarativeIntegerCache *); + void setIdPropertyData(QQmlIntegerCache *); // Linked contexts. this owns linkedContext. - QDeclarativeContextData *linkedContext; + QQmlContextData *linkedContext; // Linked list of uses of the Component attached property in this // context - QDeclarativeComponentAttached *componentAttached; + QQmlComponentAttached *componentAttached; // Optimized binding objects. Needed for deferred properties. QV4Bindings *v4bindings; @@ -215,61 +215,61 @@ class Q_DECLARATIVE_EXPORT QDeclarativeContextData // Return the outermost id for obj, if any. QString findObjectId(const QObject *obj) const; - static QDeclarativeContextData *get(QDeclarativeContext *context) { - return QDeclarativeContextPrivate::get(context)->data; + static QQmlContextData *get(QQmlContext *context) { + return QQmlContextPrivate::get(context)->data; } private: void refreshExpressionsRecursive(bool isGlobal); - void refreshExpressionsRecursive(QDeclarativeAbstractExpression *); - ~QDeclarativeContextData() {} + void refreshExpressionsRecursive(QQmlAbstractExpression *); + ~QQmlContextData() {} }; -class QDeclarativeGuardedContextData +class QQmlGuardedContextData { public: - inline QDeclarativeGuardedContextData(); - inline QDeclarativeGuardedContextData(QDeclarativeContextData *); - inline ~QDeclarativeGuardedContextData(); + inline QQmlGuardedContextData(); + inline QQmlGuardedContextData(QQmlContextData *); + inline ~QQmlGuardedContextData(); - inline QDeclarativeContextData *contextData(); - inline void setContextData(QDeclarativeContextData *); + inline QQmlContextData *contextData(); + inline void setContextData(QQmlContextData *); inline bool isNull() const { return !m_contextData; } - inline operator QDeclarativeContextData*() const { return m_contextData; } - inline QDeclarativeContextData* operator->() const { return m_contextData; } - inline QDeclarativeGuardedContextData &operator=(QDeclarativeContextData *d); + inline operator QQmlContextData*() const { return m_contextData; } + inline QQmlContextData* operator->() const { return m_contextData; } + inline QQmlGuardedContextData &operator=(QQmlContextData *d); private: - QDeclarativeGuardedContextData &operator=(const QDeclarativeGuardedContextData &); - QDeclarativeGuardedContextData(const QDeclarativeGuardedContextData &); - friend class QDeclarativeContextData; + QQmlGuardedContextData &operator=(const QQmlGuardedContextData &); + QQmlGuardedContextData(const QQmlGuardedContextData &); + friend class QQmlContextData; inline void clear(); - QDeclarativeContextData *m_contextData; - QDeclarativeGuardedContextData *m_next; - QDeclarativeGuardedContextData **m_prev; + QQmlContextData *m_contextData; + QQmlGuardedContextData *m_next; + QQmlGuardedContextData **m_prev; }; -QDeclarativeGuardedContextData::QDeclarativeGuardedContextData() +QQmlGuardedContextData::QQmlGuardedContextData() : m_contextData(0), m_next(0), m_prev(0) { } -QDeclarativeGuardedContextData::QDeclarativeGuardedContextData(QDeclarativeContextData *data) +QQmlGuardedContextData::QQmlGuardedContextData(QQmlContextData *data) : m_contextData(0), m_next(0), m_prev(0) { setContextData(data); } -QDeclarativeGuardedContextData::~QDeclarativeGuardedContextData() +QQmlGuardedContextData::~QQmlGuardedContextData() { clear(); } -void QDeclarativeGuardedContextData::setContextData(QDeclarativeContextData *contextData) +void QQmlGuardedContextData::setContextData(QQmlContextData *contextData) { clear(); @@ -282,12 +282,12 @@ void QDeclarativeGuardedContextData::setContextData(QDeclarativeContextData *con } } -QDeclarativeContextData *QDeclarativeGuardedContextData::contextData() +QQmlContextData *QQmlGuardedContextData::contextData() { return m_contextData; } -void QDeclarativeGuardedContextData::clear() +void QQmlGuardedContextData::clear() { if (m_prev) { *m_prev = m_next; @@ -298,37 +298,37 @@ void QDeclarativeGuardedContextData::clear() } } -QDeclarativeGuardedContextData & -QDeclarativeGuardedContextData::operator=(QDeclarativeContextData *d) +QQmlGuardedContextData & +QQmlGuardedContextData::operator=(QQmlContextData *d) { setContextData(d); return *this; } -QDeclarativeContextData::ContextGuard::ContextGuard() +QQmlContextData::ContextGuard::ContextGuard() : context(0) { } -QDeclarativeContextData::ContextGuard &QDeclarativeContextData::ContextGuard::operator=(QObject *obj) +QQmlContextData::ContextGuard &QQmlContextData::ContextGuard::operator=(QObject *obj) { - QDeclarativeGuard::operator=(obj); + QQmlGuard::operator=(obj); context.setFlag(); bindings.notify(); // For alias connections return *this; } -void QDeclarativeContextData::ContextGuard::objectDestroyed(QObject *) +void QQmlContextData::ContextGuard::objectDestroyed(QObject *) { if (context->contextObject && !QObjectPrivate::get(context->contextObject)->wasDeleted) bindings.notify(); } -bool QDeclarativeContextData::ContextGuard::wasSet() const +bool QQmlContextData::ContextGuard::wasSet() const { return context.flag(); } QT_END_NAMESPACE -#endif // QDECLARATIVECONTEXT_P_H +#endif // QQMLCONTEXT_P_H diff --git a/src/declarative/qml/qdeclarativecustomparser.cpp b/src/qml/qml/qqmlcustomparser.cpp similarity index 63% rename from src/declarative/qml/qdeclarativecustomparser.cpp rename to src/qml/qml/qqmlcustomparser.cpp index a746700aa6..f888b61e7d 100644 --- a/src/declarative/qml/qdeclarativecustomparser.cpp +++ b/src/qml/qml/qqmlcustomparser.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,23 +39,23 @@ ** ****************************************************************************/ -#include "qdeclarativecustomparser_p.h" -#include "qdeclarativecustomparser_p_p.h" +#include "qqmlcustomparser_p.h" +#include "qqmlcustomparser_p_p.h" -#include "qdeclarativecompiler_p.h" +#include "qqmlcompiler_p.h" #include QT_BEGIN_NAMESPACE -using namespace QDeclarativeScript; +using namespace QQmlScript; /*! - \class QDeclarativeCustomParser - \brief The QDeclarativeCustomParser class allows you to add new arbitrary types to QML. + \class QQmlCustomParser + \brief The QQmlCustomParser class allows you to add new arbitrary types to QML. \internal - By subclassing QDeclarativeCustomParser, you can add a parser for + By subclassing QQmlCustomParser, you can add a parser for building a particular type. The subclass must implement compile() and setCustomData(), and register @@ -67,7 +67,7 @@ using namespace QDeclarativeScript; */ /* - \fn QByteArray QDeclarativeCustomParser::compile(const QList & properties) + \fn QByteArray QQmlCustomParser::compile(const QList & properties) The custom parser processes \a properties, and returns a QByteArray containing data meaningful only to the @@ -82,7 +82,7 @@ using namespace QDeclarativeScript; */ /* - \fn void QDeclarativeCustomParser::setCustomData(QObject *object, const QByteArray &data) + \fn void QQmlCustomParser::setCustomData(QObject *object, const QByteArray &data) This function sets \a object to have the properties defined by \a data, which is a block of data previously returned by a call @@ -93,10 +93,10 @@ using namespace QDeclarativeScript; The \a object will be an instance of the TypeClass specified by QML_REGISTER_CUSTOM_TYPE. */ -QDeclarativeCustomParserNode -QDeclarativeCustomParserNodePrivate::fromObject(QDeclarativeScript::Object *root) +QQmlCustomParserNode +QQmlCustomParserNodePrivate::fromObject(QQmlScript::Object *root) { - QDeclarativeCustomParserNode rootNode; + QQmlCustomParserNode rootNode; rootNode.d->name = root->typeName; rootNode.d->location = root->location.start; @@ -110,25 +110,25 @@ QDeclarativeCustomParserNodePrivate::fromObject(QDeclarativeScript::Object *root return rootNode; } -QDeclarativeCustomParserProperty -QDeclarativeCustomParserNodePrivate::fromProperty(QDeclarativeScript::Property *p) +QQmlCustomParserProperty +QQmlCustomParserNodePrivate::fromProperty(QQmlScript::Property *p) { - QDeclarativeCustomParserProperty prop; + QQmlCustomParserProperty prop; prop.d->name = p->name().toString(); prop.d->isList = p->values.isMany(); prop.d->location = p->location.start; if (p->value) { - QDeclarativeCustomParserNode node = fromObject(p->value); - QList props = node.properties(); + QQmlCustomParserNode node = fromObject(p->value); + QList props = node.properties(); for (int ii = 0; ii < props.count(); ++ii) prop.d->values << QVariant::fromValue(props.at(ii)); } else { - for (QDeclarativeScript::Value *v = p->values.first(); v; v = p->values.next(v)) { - v->type = QDeclarativeScript::Value::Literal; + for (QQmlScript::Value *v = p->values.first(); v; v = p->values.next(v)) { + v->type = QQmlScript::Value::Literal; if(v->object) { - QDeclarativeCustomParserNode node = fromObject(v->object); + QQmlCustomParserNode node = fromObject(v->object); prop.d->values << QVariant::fromValue(node); } else { prop.d->values << QVariant::fromValue(v->value); @@ -140,18 +140,18 @@ QDeclarativeCustomParserNodePrivate::fromProperty(QDeclarativeScript::Property * return prop; } -QDeclarativeCustomParserNode::QDeclarativeCustomParserNode() -: d(new QDeclarativeCustomParserNodePrivate) +QQmlCustomParserNode::QQmlCustomParserNode() +: d(new QQmlCustomParserNodePrivate) { } -QDeclarativeCustomParserNode::QDeclarativeCustomParserNode(const QDeclarativeCustomParserNode &other) -: d(new QDeclarativeCustomParserNodePrivate) +QQmlCustomParserNode::QQmlCustomParserNode(const QQmlCustomParserNode &other) +: d(new QQmlCustomParserNodePrivate) { *this = other; } -QDeclarativeCustomParserNode &QDeclarativeCustomParserNode::operator=(const QDeclarativeCustomParserNode &other) +QQmlCustomParserNode &QQmlCustomParserNode::operator=(const QQmlCustomParserNode &other) { d->name = other.d->name; d->properties = other.d->properties; @@ -159,38 +159,38 @@ QDeclarativeCustomParserNode &QDeclarativeCustomParserNode::operator=(const QDec return *this; } -QDeclarativeCustomParserNode::~QDeclarativeCustomParserNode() +QQmlCustomParserNode::~QQmlCustomParserNode() { delete d; d = 0; } -QString QDeclarativeCustomParserNode::name() const +QString QQmlCustomParserNode::name() const { return d->name; } -QList QDeclarativeCustomParserNode::properties() const +QList QQmlCustomParserNode::properties() const { return d->properties; } -QDeclarativeScript::Location QDeclarativeCustomParserNode::location() const +QQmlScript::Location QQmlCustomParserNode::location() const { return d->location; } -QDeclarativeCustomParserProperty::QDeclarativeCustomParserProperty() -: d(new QDeclarativeCustomParserPropertyPrivate) +QQmlCustomParserProperty::QQmlCustomParserProperty() +: d(new QQmlCustomParserPropertyPrivate) { } -QDeclarativeCustomParserProperty::QDeclarativeCustomParserProperty(const QDeclarativeCustomParserProperty &other) -: d(new QDeclarativeCustomParserPropertyPrivate) +QQmlCustomParserProperty::QQmlCustomParserProperty(const QQmlCustomParserProperty &other) +: d(new QQmlCustomParserPropertyPrivate) { *this = other; } -QDeclarativeCustomParserProperty &QDeclarativeCustomParserProperty::operator=(const QDeclarativeCustomParserProperty &other) +QQmlCustomParserProperty &QQmlCustomParserProperty::operator=(const QQmlCustomParserProperty &other) { d->name = other.d->name; d->isList = other.d->isList; @@ -199,32 +199,32 @@ QDeclarativeCustomParserProperty &QDeclarativeCustomParserProperty::operator=(co return *this; } -QDeclarativeCustomParserProperty::~QDeclarativeCustomParserProperty() +QQmlCustomParserProperty::~QQmlCustomParserProperty() { delete d; d = 0; } -QString QDeclarativeCustomParserProperty::name() const +QString QQmlCustomParserProperty::name() const { return d->name; } -bool QDeclarativeCustomParserProperty::isList() const +bool QQmlCustomParserProperty::isList() const { return d->isList; } -QDeclarativeScript::Location QDeclarativeCustomParserProperty::location() const +QQmlScript::Location QQmlCustomParserProperty::location() const { return d->location; } -QList QDeclarativeCustomParserProperty::assignedValues() const +QList QQmlCustomParserProperty::assignedValues() const { return d->values; } -void QDeclarativeCustomParser::clearErrors() +void QQmlCustomParser::clearErrors() { exceptions.clear(); } @@ -236,10 +236,10 @@ void QDeclarativeCustomParser::clearErrors() An error is generated referring to the position of the element in the source file. */ -void QDeclarativeCustomParser::error(const QString& description) +void QQmlCustomParser::error(const QString& description) { Q_ASSERT(object); - QDeclarativeError error; + QQmlError error; QString exceptionDescription; error.setLine(object->location.start.line); error.setColumn(object->location.start.column); @@ -252,9 +252,9 @@ void QDeclarativeCustomParser::error(const QString& description) An error is generated referring to the position of \a node in the source file. */ -void QDeclarativeCustomParser::error(const QDeclarativeCustomParserProperty& prop, const QString& description) +void QQmlCustomParser::error(const QQmlCustomParserProperty& prop, const QString& description) { - QDeclarativeError error; + QQmlError error; QString exceptionDescription; error.setLine(prop.location().line); error.setColumn(prop.location().column); @@ -267,9 +267,9 @@ void QDeclarativeCustomParser::error(const QDeclarativeCustomParserProperty& pro An error is generated referring to the position of \a node in the source file. */ -void QDeclarativeCustomParser::error(const QDeclarativeCustomParserNode& node, const QString& description) +void QQmlCustomParser::error(const QQmlCustomParserNode& node, const QString& description) { - QDeclarativeError error; + QQmlError error; QString exceptionDescription; error.setLine(node.location().line); error.setColumn(node.location().column); @@ -283,7 +283,7 @@ void QDeclarativeCustomParser::error(const QDeclarativeCustomParserNode& node, c Otherwise, returns -1. */ -int QDeclarativeCustomParser::evaluateEnum(const QByteArray& script) const +int QQmlCustomParser::evaluateEnum(const QByteArray& script) const { return compiler->evaluateEnum(script); } @@ -292,7 +292,7 @@ int QDeclarativeCustomParser::evaluateEnum(const QByteArray& script) const Resolves \a name to a type, or 0 if it is not a type. This can be used to type-check object nodes. */ -const QMetaObject *QDeclarativeCustomParser::resolveType(const QString& name) const +const QMetaObject *QQmlCustomParser::resolveType(const QString& name) const { return compiler->resolveType(name); } @@ -302,7 +302,7 @@ const QMetaObject *QDeclarativeCustomParser::resolveType(const QString& name) co used to construct the binding later. \a name is used as the name of the rewritten function. */ -QDeclarativeBinding::Identifier QDeclarativeCustomParser::rewriteBinding(const QDeclarativeScript::Variant &value, const QString& name) +QQmlBinding::Identifier QQmlCustomParser::rewriteBinding(const QQmlScript::Variant &value, const QString& name) { return compiler->rewriteBinding(value, name); } @@ -311,7 +311,7 @@ QDeclarativeBinding::Identifier QDeclarativeCustomParser::rewriteBinding(const Q Returns a rewritten \a handler. \a name is used as the name of the rewritten function. */ -QString QDeclarativeCustomParser::rewriteSignalHandler(const QDeclarativeScript::Variant &value, const QString &name) +QString QQmlCustomParser::rewriteSignalHandler(const QQmlScript::Variant &value, const QString &name) { return compiler->rewriteSignalHandler(value , name); } diff --git a/src/declarative/qml/qdeclarativecustomparser_p.h b/src/qml/qml/qqmlcustomparser_p.h similarity index 52% rename from src/declarative/qml/qdeclarativecustomparser_p.h rename to src/qml/qml/qqmlcustomparser_p.h index 92d1ca7af2..ecc4bae4c3 100644 --- a/src/declarative/qml/qdeclarativecustomparser_p.h +++ b/src/qml/qml/qqmlcustomparser_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVECUSTOMPARSER_H -#define QDECLARATIVECUSTOMPARSER_H +#ifndef QQMLCUSTOMPARSER_H +#define QQMLCUSTOMPARSER_H // // W A R N I N G @@ -53,10 +53,10 @@ // We mean it. // -#include "qdeclarativemetatype_p.h" -#include "qdeclarativeerror.h" -#include "qdeclarativescript_p.h" -#include "qdeclarativebinding_p.h" +#include "qqmlmetatype_p.h" +#include "qqmlerror.h" +#include "qqmlscript_p.h" +#include "qqmlbinding_p.h" #include #include @@ -66,51 +66,51 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeCompiler; +class QQmlCompiler; -class QDeclarativeCustomParserPropertyPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeCustomParserProperty +class QQmlCustomParserPropertyPrivate; +class Q_QML_EXPORT QQmlCustomParserProperty { public: - QDeclarativeCustomParserProperty(); - QDeclarativeCustomParserProperty(const QDeclarativeCustomParserProperty &); - QDeclarativeCustomParserProperty &operator=(const QDeclarativeCustomParserProperty &); - ~QDeclarativeCustomParserProperty(); + QQmlCustomParserProperty(); + QQmlCustomParserProperty(const QQmlCustomParserProperty &); + QQmlCustomParserProperty &operator=(const QQmlCustomParserProperty &); + ~QQmlCustomParserProperty(); QString name() const; - QDeclarativeScript::Location location() const; + QQmlScript::Location location() const; bool isList() const; - // Will be one of QDeclarativeScript::Variant, QDeclarativeCustomParserProperty or - // QDeclarativeCustomParserNode + // Will be one of QQmlScript::Variant, QQmlCustomParserProperty or + // QQmlCustomParserNode QList assignedValues() const; private: - friend class QDeclarativeCustomParserNodePrivate; - friend class QDeclarativeCustomParserPropertyPrivate; - QDeclarativeCustomParserPropertyPrivate *d; + friend class QQmlCustomParserNodePrivate; + friend class QQmlCustomParserPropertyPrivate; + QQmlCustomParserPropertyPrivate *d; }; -class QDeclarativeCustomParserNodePrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeCustomParserNode +class QQmlCustomParserNodePrivate; +class Q_QML_EXPORT QQmlCustomParserNode { public: - QDeclarativeCustomParserNode(); - QDeclarativeCustomParserNode(const QDeclarativeCustomParserNode &); - QDeclarativeCustomParserNode &operator=(const QDeclarativeCustomParserNode &); - ~QDeclarativeCustomParserNode(); + QQmlCustomParserNode(); + QQmlCustomParserNode(const QQmlCustomParserNode &); + QQmlCustomParserNode &operator=(const QQmlCustomParserNode &); + ~QQmlCustomParserNode(); QString name() const; - QDeclarativeScript::Location location() const; + QQmlScript::Location location() const; - QList properties() const; + QList properties() const; private: - friend class QDeclarativeCustomParserNodePrivate; - QDeclarativeCustomParserNodePrivate *d; + friend class QQmlCustomParserNodePrivate; + QQmlCustomParserNodePrivate *d; }; -class Q_DECLARATIVE_EXPORT QDeclarativeCustomParser +class Q_QML_EXPORT QQmlCustomParser { public: enum Flag { @@ -120,38 +120,38 @@ class Q_DECLARATIVE_EXPORT QDeclarativeCustomParser }; Q_DECLARE_FLAGS(Flags, Flag) - QDeclarativeCustomParser() : compiler(0), object(0), m_flags(NoFlag) {} - QDeclarativeCustomParser(Flags f) : compiler(0), object(0), m_flags(f) {} - virtual ~QDeclarativeCustomParser() {} + QQmlCustomParser() : compiler(0), object(0), m_flags(NoFlag) {} + QQmlCustomParser(Flags f) : compiler(0), object(0), m_flags(f) {} + virtual ~QQmlCustomParser() {} void clearErrors(); Flags flags() const { return m_flags; } - virtual QByteArray compile(const QList &)=0; + virtual QByteArray compile(const QList &)=0; virtual void setCustomData(QObject *, const QByteArray &)=0; - QList errors() const { return exceptions; } + QList errors() const { return exceptions; } protected: void error(const QString& description); - void error(const QDeclarativeCustomParserProperty&, const QString& description); - void error(const QDeclarativeCustomParserNode&, const QString& description); + void error(const QQmlCustomParserProperty&, const QString& description); + void error(const QQmlCustomParserNode&, const QString& description); int evaluateEnum(const QByteArray&) const; const QMetaObject *resolveType(const QString&) const; - QDeclarativeBinding::Identifier rewriteBinding(const QDeclarativeScript::Variant&, const QString&); - QString rewriteSignalHandler(const QDeclarativeScript::Variant&, const QString&); + QQmlBinding::Identifier rewriteBinding(const QQmlScript::Variant&, const QString&); + QString rewriteSignalHandler(const QQmlScript::Variant&, const QString&); private: - QList exceptions; - QDeclarativeCompiler *compiler; - QDeclarativeScript::Object *object; + QList exceptions; + QQmlCompiler *compiler; + QQmlScript::Object *object; Flags m_flags; - friend class QDeclarativeCompiler; + friend class QQmlCompiler; }; -Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeCustomParser::Flags); +Q_DECLARE_OPERATORS_FOR_FLAGS(QQmlCustomParser::Flags); #if 0 #define QML_REGISTER_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN, NAME, TYPE, CUSTOMTYPE) \ @@ -160,8 +160,8 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeCustomParser::Flags); QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeCustomParserProperty) -Q_DECLARE_METATYPE(QDeclarativeCustomParserNode) +Q_DECLARE_METATYPE(QQmlCustomParserProperty) +Q_DECLARE_METATYPE(QQmlCustomParserNode) QT_END_HEADER diff --git a/src/declarative/qml/qdeclarativecustomparser_p_p.h b/src/qml/qml/qqmlcustomparser_p_p.h similarity index 74% rename from src/declarative/qml/qdeclarativecustomparser_p_p.h rename to src/qml/qml/qqmlcustomparser_p_p.h index e7228f07f0..c861f9e944 100644 --- a/src/declarative/qml/qdeclarativecustomparser_p_p.h +++ b/src/qml/qml/qqmlcustomparser_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVECUSTOMPARSER_P_H -#define QDECLARATIVECUSTOMPARSER_P_H +#ifndef QQMLCUSTOMPARSER_P_H +#define QQMLCUSTOMPARSER_P_H // // W A R N I N G @@ -53,37 +53,37 @@ // We mean it. // -#include "qdeclarativecustomparser_p.h" +#include "qqmlcustomparser_p.h" -#include "qdeclarativescript_p.h" +#include "qqmlscript_p.h" #include QT_BEGIN_NAMESPACE -class QDeclarativeCustomParserNodePrivate +class QQmlCustomParserNodePrivate { public: QString name; - QList properties; - QDeclarativeScript::Location location; + QList properties; + QQmlScript::Location location; - static QDeclarativeCustomParserNode fromObject(QDeclarativeScript::Object *); - static QDeclarativeCustomParserProperty fromProperty(QDeclarativeScript::Property *); + static QQmlCustomParserNode fromObject(QQmlScript::Object *); + static QQmlCustomParserProperty fromProperty(QQmlScript::Property *); }; -class QDeclarativeCustomParserPropertyPrivate +class QQmlCustomParserPropertyPrivate { public: - QDeclarativeCustomParserPropertyPrivate() + QQmlCustomParserPropertyPrivate() : isList(false) {} QString name; bool isList; - QDeclarativeScript::Location location; + QQmlScript::Location location; QList values; }; QT_END_NAMESPACE -#endif // QDECLARATIVECUSTOMPARSER_P_H +#endif // QQMLCUSTOMPARSER_P_H diff --git a/src/declarative/qml/qdeclarativedata_p.h b/src/qml/qml/qqmldata_p.h similarity index 75% rename from src/declarative/qml/qdeclarativedata_p.h rename to src/qml/qml/qqmldata_p.h index 0f75d620b8..e4ba44583d 100644 --- a/src/declarative/qml/qdeclarativedata_p.h +++ b/src/qml/qml/qqmldata_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEDATA_P_H -#define QDECLARATIVEDATA_P_H +#ifndef QQMLDATA_P_H +#define QQMLDATA_P_H // // W A R N I N G @@ -53,30 +53,30 @@ // We mean it. // +#include #include - #include QT_BEGIN_NAMESPACE template class QHash; -class QDeclarativeGuardImpl; -class QDeclarativeCompiledData; -class QDeclarativeAbstractBinding; -class QDeclarativeContext; -class QDeclarativePropertyCache; -class QDeclarativeContextData; -class QDeclarativeNotifier; -class QDeclarativeDataExtended; -class QDeclarativeNotifierEndpoint; +class QQmlGuardImpl; +class QQmlCompiledData; +class QQmlAbstractBinding; +class QQmlContext; +class QQmlPropertyCache; +class QQmlContextData; +class QQmlNotifier; +class QQmlDataExtended; +class QQmlNotifierEndpoint; // This class is structured in such a way, that simply zero'ing it is the // default state for elemental object allocations. This is crucial in the -// workings of the QDeclarativeInstruction::CreateSimpleObject instruction. +// workings of the QQmlInstruction::CreateSimpleObject instruction. // Don't change anything here without first considering that case! -class Q_DECLARATIVE_EXPORT QDeclarativeData : public QAbstractDeclarativeData +class Q_QML_EXPORT QQmlData : public QAbstractDeclarativeData { public: - QDeclarativeData() + QQmlData() : ownMemory(true), ownContext(false), indestructible(true), explicitIndestructibleSet(false), hasTaintedV8Object(false), notifyList(0), context(0), outerContext(0), bindings(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0), bindingBits(0), @@ -118,27 +118,27 @@ class Q_DECLARATIVE_EXPORT QDeclarativeData : public QAbstractDeclarativeData quint16 maximumTodoIndex; quint16 notifiesSize; - QDeclarativeNotifierEndpoint *todo; - QDeclarativeNotifierEndpoint**notifies; + QQmlNotifierEndpoint *todo; + QQmlNotifierEndpoint**notifies; void layout(); private: - void layout(QDeclarativeNotifierEndpoint*); + void layout(QQmlNotifierEndpoint*); }; NotifyList *notifyList; - inline QDeclarativeNotifierEndpoint *notify(int index); - void addNotify(int index, QDeclarativeNotifierEndpoint *); + inline QQmlNotifierEndpoint *notify(int index); + void addNotify(int index, QQmlNotifierEndpoint *); // The context that created the C++ object - QDeclarativeContextData *context; + QQmlContextData *context; // The outermost context in which this object lives - QDeclarativeContextData *outerContext; + QQmlContextData *outerContext; - QDeclarativeAbstractBinding *bindings; + QQmlAbstractBinding *bindings; - // Linked list for QDeclarativeContext::contextObjects - QDeclarativeData *nextContextObject; - QDeclarativeData**prevContextObject; + // Linked list for QQmlContext::contextObjects + QQmlData *nextContextObject; + QQmlData**prevContextObject; int bindingBitsSize; quint32 *bindingBits; @@ -149,41 +149,41 @@ class Q_DECLARATIVE_EXPORT QDeclarativeData : public QAbstractDeclarativeData ushort lineNumber; ushort columnNumber; - QDeclarativeCompiledData *deferredComponent; // Can't this be found from the context? + QQmlCompiledData *deferredComponent; // Can't this be found from the context? unsigned int deferredIdx; quint32 v8objectid; v8::Persistent v8object; - QDeclarativePropertyCache *propertyCache; + QQmlPropertyCache *propertyCache; - QDeclarativeGuardImpl *guards; + QQmlGuardImpl *guards; - static QDeclarativeData *get(const QObject *object, bool create = false) { + static QQmlData *get(const QObject *object, bool create = false) { QObjectPrivate *priv = QObjectPrivate::get(const_cast(object)); if (priv->wasDeleted) { Q_ASSERT(!create); return 0; } else if (priv->declarativeData) { - return static_cast(priv->declarativeData); + return static_cast(priv->declarativeData); } else if (create) { - priv->declarativeData = new QDeclarativeData; - return static_cast(priv->declarativeData); + priv->declarativeData = new QQmlData; + return static_cast(priv->declarativeData); } else { return 0; } } bool hasExtendedData() const { return extendedData != 0; } - QDeclarativeNotifier *objectNameNotifier() const; + QQmlNotifier *objectNameNotifier() const; QHash *attachedProperties() const; private: // For objectNameNotifier and attachedProperties - mutable QDeclarativeDataExtended *extendedData; + mutable QQmlDataExtended *extendedData; }; -QDeclarativeNotifierEndpoint *QDeclarativeData::notify(int index) +QQmlNotifierEndpoint *QQmlData::notify(int index) { Q_ASSERT(index <= 0xFFFF); @@ -204,4 +204,4 @@ QDeclarativeNotifierEndpoint *QDeclarativeData::notify(int index) QT_END_NAMESPACE -#endif // QDECLARATIVEDATA_P_H +#endif // QQMLDATA_P_H diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/qml/qml/qqmldirparser.cpp similarity index 84% rename from src/declarative/qml/qdeclarativedirparser.cpp rename to src/qml/qml/qqmldirparser.cpp index f7d5be3601..7b99214f04 100644 --- a/src/declarative/qml/qdeclarativedirparser.cpp +++ b/src/qml/qml/qqmldirparser.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include "qdeclarativedirparser_p.h" -#include "qdeclarativeerror.h" -#include "qdeclarativeglobal_p.h" +#include "qqmldirparser_p.h" +#include "qqmlerror.h" +#include "qqmlglobal_p.h" #include #include @@ -49,52 +49,52 @@ QT_BEGIN_NAMESPACE -QDeclarativeDirParser::QDeclarativeDirParser() +QQmlDirParser::QQmlDirParser() : _isParsed(false) { } -QDeclarativeDirParser::~QDeclarativeDirParser() +QQmlDirParser::~QQmlDirParser() { } -QUrl QDeclarativeDirParser::url() const +QUrl QQmlDirParser::url() const { return _url; } -void QDeclarativeDirParser::setUrl(const QUrl &url) +void QQmlDirParser::setUrl(const QUrl &url) { _url = url; } -QString QDeclarativeDirParser::fileSource() const +QString QQmlDirParser::fileSource() const { return _filePathSouce; } -void QDeclarativeDirParser::setFileSource(const QString &filePath) +void QQmlDirParser::setFileSource(const QString &filePath) { _filePathSouce = filePath; } -QString QDeclarativeDirParser::source() const +QString QQmlDirParser::source() const { return _source; } -void QDeclarativeDirParser::setSource(const QString &source) +void QQmlDirParser::setSource(const QString &source) { _isParsed = false; _source = source; } -bool QDeclarativeDirParser::isParsed() const +bool QQmlDirParser::isParsed() const { return _isParsed; } -bool QDeclarativeDirParser::parse() +bool QQmlDirParser::parse() { if (_isParsed) return true; @@ -107,15 +107,15 @@ bool QDeclarativeDirParser::parse() if (_source.isEmpty() && !_filePathSouce.isEmpty()) { QFile file(_filePathSouce); - if (!QDeclarative_isFileCaseCorrect(_filePathSouce)) { - QDeclarativeError error; + if (!QQml_isFileCaseCorrect(_filePathSouce)) { + QQmlError error; error.setDescription(QString::fromUtf8("cannot load module \"$$URI$$\": File name case mismatch for \"%1\"").arg(_filePathSouce)); _errors.prepend(error); return false; } else if (file.open(QFile::ReadOnly)) { _source = QString::fromUtf8(file.readAll()); } else { - QDeclarativeError error; + QQmlError error; error.setDescription(QString::fromUtf8("module \"$$URI$$\" definition \"%1\" not readable").arg(_filePathSouce)); _errors.prepend(error); return false; @@ -243,9 +243,9 @@ bool QDeclarativeDirParser::parse() return hasError(); } -void QDeclarativeDirParser::reportError(int line, int column, const QString &description) +void QQmlDirParser::reportError(int line, int column, const QString &description) { - QDeclarativeError error; + QQmlError error; error.setUrl(_url); error.setLine(line); error.setColumn(column); @@ -253,7 +253,7 @@ void QDeclarativeDirParser::reportError(int line, int column, const QString &des _errors.append(error); } -bool QDeclarativeDirParser::hasError() const +bool QQmlDirParser::hasError() const { if (! _errors.isEmpty()) return true; @@ -261,11 +261,11 @@ bool QDeclarativeDirParser::hasError() const return false; } -QList QDeclarativeDirParser::errors(const QString &uri) const +QList QQmlDirParser::errors(const QString &uri) const { - QList errors = _errors; + QList errors = _errors; for (int i = 0; i < errors.size(); ++i) { - QDeclarativeError &e = errors[i]; + QQmlError &e = errors[i]; QString description = e.description(); description.replace(QLatin1String("$$URI$$"), uri); e.setDescription(description); @@ -273,23 +273,23 @@ QList QDeclarativeDirParser::errors(const QString &uri) const return errors; } -QList QDeclarativeDirParser::plugins() const +QList QQmlDirParser::plugins() const { return _plugins; } -QList QDeclarativeDirParser::components() const +QList QQmlDirParser::components() const { return _components; } -QList QDeclarativeDirParser::scripts() const +QList QQmlDirParser::scripts() const { return _scripts; } #ifdef QT_CREATOR -QList QDeclarativeDirParser::typeInfos() const +QList QQmlDirParser::typeInfos() const { return _typeInfos; } diff --git a/src/declarative/qml/qdeclarativedirparser_p.h b/src/qml/qml/qqmldirparser_p.h similarity index 87% rename from src/declarative/qml/qdeclarativedirparser_p.h rename to src/qml/qml/qqmldirparser_p.h index 40b4b57a12..8c681309ac 100644 --- a/src/declarative/qml/qdeclarativedirparser_p.h +++ b/src/qml/qml/qqmldirparser_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEDIRPARSER_P_H -#define QDECLARATIVEDIRPARSER_P_H +#ifndef QQMLDIRPARSER_P_H +#define QQMLDIRPARSER_P_H // // W A R N I N G @@ -58,14 +58,14 @@ QT_BEGIN_NAMESPACE -class QDeclarativeError; -class QDeclarativeDirParser +class QQmlError; +class QQmlDirParser { - Q_DISABLE_COPY(QDeclarativeDirParser) + Q_DISABLE_COPY(QQmlDirParser) public: - QDeclarativeDirParser(); - ~QDeclarativeDirParser(); + QQmlDirParser(); + ~QQmlDirParser(); QUrl url() const; void setUrl(const QUrl &url); @@ -80,7 +80,7 @@ class QDeclarativeDirParser bool parse(); bool hasError() const; - QList errors(const QString &uri) const; + QList errors(const QString &uri) const; struct Plugin { @@ -144,7 +144,7 @@ class QDeclarativeDirParser void reportError(int line, int column, const QString &message); private: - QList _errors; + QList _errors; QUrl _url; QString _source; QString _filePathSouce; @@ -157,10 +157,10 @@ class QDeclarativeDirParser unsigned _isParsed: 1; }; -typedef QList QDeclarativeDirComponents; -typedef QList QDeclarativeDirScripts; +typedef QList QQmlDirComponents; +typedef QList QQmlDirScripts; QT_END_NAMESPACE -#endif // QDECLARATIVEDIRPARSER_P_H +#endif // QQMLDIRPARSER_P_H diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/qml/qml/qqmlengine.cpp similarity index 65% rename from src/declarative/qml/qdeclarativeengine.cpp rename to src/qml/qml/qqmlengine.cpp index 2031bc424a..8cfe635543 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,38 +39,38 @@ ** ****************************************************************************/ -#include "qdeclarativeengine_p.h" -#include "qdeclarativeengine.h" -#include "qdeclarativecomponentattached_p.h" - -#include "qdeclarativecontext_p.h" -#include "qdeclarativecompiler_p.h" -#include "qdeclarative.h" -#include "qdeclarativecontext.h" -#include "qdeclarativeexpression.h" -#include "qdeclarativecomponent.h" -#include "qdeclarativebinding_p_p.h" -#include "qdeclarativevme_p.h" -#include -#include "qdeclarativestringconverters_p.h" -#include "qdeclarativexmlhttprequest_p.h" -#include "qdeclarativescriptstring.h" -#include "qdeclarativeglobal_p.h" -#include "qdeclarativelistmodel_p.h" -#include "qdeclarativeworkerscript_p.h" -#include "qdeclarativecomponent_p.h" -#include "qdeclarativenetworkaccessmanagerfactory.h" -#include "qdeclarativeimageprovider.h" -#include "qdeclarativedirparser_p.h" -#include "qdeclarativeextensioninterface.h" -#include "qdeclarativelist_p.h" -#include "qdeclarativetypenamecache_p.h" -#include "qdeclarativenotifier_p.h" -#include -#include +#include "qqmlengine_p.h" +#include "qqmlengine.h" +#include "qqmlcomponentattached_p.h" + +#include "qqmlcontext_p.h" +#include "qqmlcompiler_p.h" +#include "qqml.h" +#include "qqmlcontext.h" +#include "qqmlexpression.h" +#include "qqmlcomponent.h" +#include "qqmlbinding_p_p.h" +#include "qqmlvme_p.h" +#include +#include "qqmlstringconverters_p.h" +#include "qqmlxmlhttprequest_p.h" +#include "qqmlscriptstring.h" +#include "qqmlglobal_p.h" +#include "qquicklistmodel_p.h" +#include "qquickworkerscript_p.h" +#include "qqmlcomponent_p.h" +#include "qqmlnetworkaccessmanagerfactory.h" +#include "qqmlimageprovider.h" +#include "qqmldirparser_p.h" +#include "qqmlextensioninterface.h" +#include "qqmllist_p.h" +#include "qqmltypenamecache_p.h" +#include "qqmlnotifier_p.h" +#include +#include #include #include -#include "qdeclarativeincubator.h" +#include "qqmlincubator.h" #include #include @@ -87,7 +87,7 @@ #include -#include +#include #ifdef Q_OS_WIN // for %APPDATA% #include @@ -97,14 +97,14 @@ #define CSIDL_APPDATA 0x001a // \Application Data #endif -Q_DECLARE_METATYPE(QDeclarativeProperty) +Q_DECLARE_METATYPE(QQmlProperty) QT_BEGIN_NAMESPACE void qmlRegisterBaseTypes(const char *uri, int versionMajor, int versionMinor) { - QDeclarativeEnginePrivate::registerBaseTypes(uri, versionMajor, versionMinor); - QDeclarativeValueTypeFactory::registerBaseTypes(uri, versionMajor, versionMinor); + QQmlEnginePrivate::registerBaseTypes(uri, versionMajor, versionMinor); + QQmlValueTypeFactory::registerBaseTypes(uri, versionMajor, versionMinor); } /*! @@ -119,7 +119,7 @@ void qmlRegisterBaseTypes(const char *uri, int versionMajor, int versionMinor) It can be useful to create a QtObject if you need an extremely lightweight element to enclose a set of custom properties: - \snippet doc/src/snippets/declarative/qtobject.qml 0 + \snippet doc/src/snippets/qml/qtobject.qml 0 It can also be useful for C++ integration, as it is just a plain QObject. See the QObject documentation for further details. @@ -152,37 +152,37 @@ void qmlRegisterBaseTypes(const char *uri, int versionMajor, int versionMinor) \code // main.cpp - QDeclarativeView view; + QQuickView view; view.setSource(QUrl::fromLocalFile("MyRect.qml")); view.show(); - QDeclarativeItem *item = view.rootObject()->findChild("myRect"); + QQuickItem *item = view.rootObject()->findChild("myRect"); if (item) item->setProperty("color", QColor(Qt::yellow)); \endcode */ -bool QDeclarativeEnginePrivate::qml_debugging_enabled = false; +bool QQmlEnginePrivate::qml_debugging_enabled = false; -void QDeclarativeEnginePrivate::registerBaseTypes(const char *uri, int versionMajor, int versionMinor) +void QQmlEnginePrivate::registerBaseTypes(const char *uri, int versionMajor, int versionMinor) { - qmlRegisterType(uri,versionMajor,versionMinor,"Component"); + qmlRegisterType(uri,versionMajor,versionMinor,"Component"); qmlRegisterType(uri,versionMajor,versionMinor,"QtObject"); - qmlRegisterType(uri, versionMajor, versionMinor,"ListElement"); - qmlRegisterCustomType(uri, versionMajor, versionMinor,"ListModel", new QDeclarativeListModelParser); - qmlRegisterType(uri,versionMajor,versionMinor,"WorkerScript"); + qmlRegisterType(uri, versionMajor, versionMinor,"ListElement"); + qmlRegisterCustomType(uri, versionMajor, versionMinor,"ListModel", new QQuickListModelParser); + qmlRegisterType(uri,versionMajor,versionMinor,"WorkerScript"); } -void QDeclarativeEnginePrivate::defineModule() +void QQmlEnginePrivate::defineModule() { registerBaseTypes("QtQuick", 2, 0); - qmlRegisterType(); - qmlRegisterUncreatableType("QtQuick",2,0,"Application", QDeclarativeApplication::tr("Application is an abstract class")); - qmlRegisterUncreatableType("QtQuick",2,0,"Locale",QDeclarativeEngine::tr("Locale cannot be instantiated. Use Qt.locale()")); + qmlRegisterType(); + qmlRegisterUncreatableType("QtQuick",2,0,"Application", QQuickApplication::tr("Application is an abstract class")); + qmlRegisterUncreatableType("QtQuick",2,0,"Locale",QQmlEngine::tr("Locale cannot be instantiated. Use Qt.locale()")); } /*! -\qmlclass Qt QDeclarativeEnginePrivate +\qmlclass Qt QQmlEnginePrivate \ingroup qml-utility-elements \brief The QML global Qt object provides useful enums and functions from Qt. @@ -303,7 +303,7 @@ of their use. The following example uses the \c application object to indicate whether the application is currently active: - \snippet doc/src/snippets/declarative/application.qml document + \snippet doc/src/snippets/qml/application.qml document \qmlproperty object Qt::inputMethod \since QtQuick 2.0 @@ -342,7 +342,7 @@ the same object as is returned from the Qt.include() call. // Qt.include() is implemented in qv8include.cpp -QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e) +QQmlEnginePrivate::QQmlEnginePrivate(QQmlEngine *e) : propertyCapture(0), rootContext(0), isDebugging(false), outputWarningsToStdErr(true), sharedContext(0), sharedScope(0), cleanup(0), erroredBindings(0), inProgressCreations(0), @@ -353,12 +353,12 @@ QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e) { } -QDeclarativeEnginePrivate::~QDeclarativeEnginePrivate() +QQmlEnginePrivate::~QQmlEnginePrivate() { Q_ASSERT(inProgressCreations == 0); while (cleanup) { - QDeclarativeCleanup *c = cleanup; + QQmlCleanup *c = cleanup; cleanup = c->next; if (cleanup) cleanup->prev = &cleanup; c->next = 0; @@ -374,23 +374,23 @@ QDeclarativeEnginePrivate::~QDeclarativeEnginePrivate() delete rootContext; rootContext = 0; - for(QHash::ConstIterator iter = m_compositeTypes.constBegin(); iter != m_compositeTypes.constEnd(); ++iter) + for(QHash::ConstIterator iter = m_compositeTypes.constBegin(); iter != m_compositeTypes.constEnd(); ++iter) (*iter)->release(); - for(QHash::Iterator iter = propertyCache.begin(); iter != propertyCache.end(); ++iter) + for(QHash::Iterator iter = propertyCache.begin(); iter != propertyCache.end(); ++iter) (*iter)->release(); - for(QHash, QDeclarativePropertyCache *>::Iterator iter = typePropertyCache.begin(); iter != typePropertyCache.end(); ++iter) + for(QHash, QQmlPropertyCache *>::Iterator iter = typePropertyCache.begin(); iter != typePropertyCache.end(); ++iter) (*iter)->release(); - for(QHash::Iterator iter = moduleApiInstances.begin(); iter != moduleApiInstances.end(); ++iter) { + for(QHash::Iterator iter = moduleApiInstances.begin(); iter != moduleApiInstances.end(); ++iter) { delete (*iter)->qobjectApi; delete *iter; } } -void QDeclarativePrivate::qdeclarativeelement_destructor(QObject *o) +void QQmlPrivate::qdeclarativeelement_destructor(QObject *o) { QObjectPrivate *p = QObjectPrivate::get(o); if (p->declarativeData) { - QDeclarativeData *d = static_cast(p->declarativeData); + QQmlData *d = static_cast(p->declarativeData); if (d->ownContext && d->context) { d->context->destroy(); d->context = 0; @@ -398,62 +398,62 @@ void QDeclarativePrivate::qdeclarativeelement_destructor(QObject *o) } } -void QDeclarativeData::destroyed(QAbstractDeclarativeData *d, QObject *o) +void QQmlData::destroyed(QAbstractDeclarativeData *d, QObject *o) { - static_cast(d)->destroyed(o); + static_cast(d)->destroyed(o); } -void QDeclarativeData::parentChanged(QAbstractDeclarativeData *d, QObject *o, QObject *p) +void QQmlData::parentChanged(QAbstractDeclarativeData *d, QObject *o, QObject *p) { - static_cast(d)->parentChanged(o, p); + static_cast(d)->parentChanged(o, p); } -void QDeclarativeData::objectNameChanged(QAbstractDeclarativeData *d, QObject *o) +void QQmlData::objectNameChanged(QAbstractDeclarativeData *d, QObject *o) { - static_cast(d)->objectNameChanged(o); + static_cast(d)->objectNameChanged(o); } -void QDeclarativeData::signalEmitted(QAbstractDeclarativeData *, QObject *object, int index, void **) +void QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *object, int index, void **) { - QDeclarativeData *ddata = QDeclarativeData::get(object, false); + QQmlData *ddata = QQmlData::get(object, false); if (!ddata) return; // Probably being deleted - QDeclarativeNotifierEndpoint *ep = ddata->notify(index); - if (ep) QDeclarativeNotifier::emitNotify(ep); + QQmlNotifierEndpoint *ep = ddata->notify(index); + if (ep) QQmlNotifier::emitNotify(ep); } -void QDeclarativeEnginePrivate::init() +void QQmlEnginePrivate::init() { - Q_Q(QDeclarativeEngine); + Q_Q(QQmlEngine); static bool firstTime = true; if (firstTime) { - qmlRegisterType("QML", 1, 0, "Component"); + qmlRegisterType("QML", 1, 0, "Component"); firstTime = false; } qRegisterMetaType("QVariant"); - qRegisterMetaType("QDeclarativeScriptString"); + qRegisterMetaType("QQmlScriptString"); qRegisterMetaType("QJSValue"); - qRegisterMetaType("QDeclarativeComponent::Status"); + qRegisterMetaType("QQmlComponent::Status"); qRegisterMetaType >("QList"); qRegisterMetaType >("QList"); - qRegisterMetaType("QDeclarativeV8Handle"); + qRegisterMetaType("QQmlV8Handle"); - QDeclarativeData::init(); + QQmlData::init(); v8engine()->setEngine(q); - rootContext = new QDeclarativeContext(q,true); + rootContext = new QQmlContext(q,true); if (QCoreApplication::instance()->thread() == q->thread() && - QDeclarativeEngineDebugService::isDebuggingEnabled()) { + QQmlEngineDebugService::isDebuggingEnabled()) { isDebugging = true; - QDeclarativeEngineDebugService::instance()->addEngine(q); + QQmlEngineDebugService::instance()->addEngine(q); QV8DebugService::initialize(v8engine()); QV8ProfilerService::initialize(); - QDeclarativeProfilerService::initialize(); + QQmlProfilerService::initialize(); QDebugMessageService::instance(); } @@ -463,76 +463,76 @@ void QDeclarativeEnginePrivate::init() QDir::separator() + QLatin1String("OfflineStorage"); } -QDeclarativeWorkerScriptEngine *QDeclarativeEnginePrivate::getWorkerScriptEngine() +QQuickWorkerScriptEngine *QQmlEnginePrivate::getWorkerScriptEngine() { - Q_Q(QDeclarativeEngine); + Q_Q(QQmlEngine); if (!workerScriptEngine) - workerScriptEngine = new QDeclarativeWorkerScriptEngine(q); + workerScriptEngine = new QQuickWorkerScriptEngine(q); return workerScriptEngine; } /*! - \class QDeclarativeEngine + \class QQmlEngine \since 4.7 - \brief The QDeclarativeEngine class provides an environment for instantiating QML components. + \brief The QQmlEngine class provides an environment for instantiating QML components. \mainclass - Each QML component is instantiated in a QDeclarativeContext. - QDeclarativeContext's are essential for passing data to QML + Each QML component is instantiated in a QQmlContext. + QQmlContext's are essential for passing data to QML components. In QML, contexts are arranged hierarchically and this - hierarchy is managed by the QDeclarativeEngine. + hierarchy is managed by the QQmlEngine. Prior to creating any QML components, an application must have - created a QDeclarativeEngine to gain access to a QML context. The + created a QQmlEngine to gain access to a QML context. The following example shows how to create a simple Text item. \code - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nText { text: \"Hello world!\" }", QUrl()); - QDeclarativeItem *item = qobject_cast(component.create()); + QQuickItem *item = qobject_cast(component.create()); //add item to view, etc ... \endcode In this case, the Text item will be created in the engine's - \l {QDeclarativeEngine::rootContext()}{root context}. + \l {QQmlEngine::rootContext()}{root context}. - \sa QDeclarativeComponent QDeclarativeContext + \sa QQmlComponent QQmlContext */ /*! - Create a new QDeclarativeEngine with the given \a parent. + Create a new QQmlEngine with the given \a parent. */ -QDeclarativeEngine::QDeclarativeEngine(QObject *parent) -: QJSEngine(*new QDeclarativeEnginePrivate(this), parent) +QQmlEngine::QQmlEngine(QObject *parent) +: QJSEngine(*new QQmlEnginePrivate(this), parent) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); d->init(); } /*! - Destroys the QDeclarativeEngine. + Destroys the QQmlEngine. - Any QDeclarativeContext's created on this engine will be + Any QQmlContext's created on this engine will be invalidated, but not destroyed (unless they are parented to the - QDeclarativeEngine object). + QQmlEngine object). */ -QDeclarativeEngine::~QDeclarativeEngine() +QQmlEngine::~QQmlEngine() { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); if (d->isDebugging) { - QDeclarativeEngineDebugService::instance()->remEngine(this); + QQmlEngineDebugService::instance()->remEngine(this); } // if we are the parent of any of the qobject module api instances, // we need to remove them from our internal list, in order to prevent // a segfault in engine private dtor. - QList keys = d->moduleApiInstances.keys(); + QList keys = d->moduleApiInstances.keys(); QObject *currQObjectApi = 0; - QDeclarativeMetaType::ModuleApiInstance *currInstance = 0; - foreach (const QDeclarativeMetaType::ModuleApi &key, keys) { + QQmlMetaType::ModuleApiInstance *currInstance = 0; + foreach (const QQmlMetaType::ModuleApi &key, keys) { currInstance = d->moduleApiInstances.value(key); currQObjectApi = currInstance->qobjectApi; if (this->children().contains(currQObjectApi)) { @@ -549,31 +549,31 @@ QDeclarativeEngine::~QDeclarativeEngine() d->incubationController->d = 0; } -/*! \fn void QDeclarativeEngine::quit() +/*! \fn void QQmlEngine::quit() This signal is emitted when the QML loaded by the engine would like to quit. */ -/*! \fn void QDeclarativeEngine::warnings(const QList &warnings) +/*! \fn void QQmlEngine::warnings(const QList &warnings) This signal is emitted when \a warnings messages are generated by QML. */ /*! Clears the engine's internal component cache. - Normally the QDeclarativeEngine caches components loaded from qml + Normally the QQmlEngine caches components loaded from qml files. This method clears this cache and forces the component to be reloaded. */ -void QDeclarativeEngine::clearComponentCache() +void QQmlEngine::clearComponentCache() { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); d->typeLoader.clearCache(); } /*! Returns the engine's root context. - The root context is automatically created by the QDeclarativeEngine. + The root context is automatically created by the QQmlEngine. Data that should be available to all QML component instances instantiated by the engine should be put in the root context. @@ -581,9 +581,9 @@ void QDeclarativeEngine::clearComponentCache() component instances should be added to sub-contexts parented to the root context. */ -QDeclarativeContext *QDeclarativeEngine::rootContext() const +QQmlContext *QQmlEngine::rootContext() const { - Q_D(const QDeclarativeEngine); + Q_D(const QQmlEngine); return d->rootContext; } @@ -597,35 +597,35 @@ QDeclarativeContext *QDeclarativeEngine::rootContext() const The factory must be set before executing the engine. */ -void QDeclarativeEngine::setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory *factory) +void QQmlEngine::setNetworkAccessManagerFactory(QQmlNetworkAccessManagerFactory *factory) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); QMutexLocker locker(&d->mutex); d->networkAccessManagerFactory = factory; } /*! - Returns the current QDeclarativeNetworkAccessManagerFactory. + Returns the current QQmlNetworkAccessManagerFactory. \sa setNetworkAccessManagerFactory() */ -QDeclarativeNetworkAccessManagerFactory *QDeclarativeEngine::networkAccessManagerFactory() const +QQmlNetworkAccessManagerFactory *QQmlEngine::networkAccessManagerFactory() const { - Q_D(const QDeclarativeEngine); + Q_D(const QQmlEngine); return d->networkAccessManagerFactory; } -void QDeclarativeEnginePrivate::registerFinalizeCallback(QObject *obj, int index) +void QQmlEnginePrivate::registerFinalizeCallback(QObject *obj, int index) { if (activeVME) { - activeVME->finalizeCallbacks.append(qMakePair(QDeclarativeGuard(obj), index)); + activeVME->finalizeCallbacks.append(qMakePair(QQmlGuard(obj), index)); } else { void *args[] = { 0 }; QMetaObject::metacall(obj, QMetaObject::InvokeMetaMethod, index, args); } } -QNetworkAccessManager *QDeclarativeEnginePrivate::createNetworkAccessManager(QObject *parent) const +QNetworkAccessManager *QQmlEnginePrivate::createNetworkAccessManager(QObject *parent) const { QMutexLocker locker(&mutex); QNetworkAccessManager *nam; @@ -638,11 +638,11 @@ QNetworkAccessManager *QDeclarativeEnginePrivate::createNetworkAccessManager(QOb return nam; } -QNetworkAccessManager *QDeclarativeEnginePrivate::getNetworkAccessManager() const +QNetworkAccessManager *QQmlEnginePrivate::getNetworkAccessManager() const { - Q_Q(const QDeclarativeEngine); + Q_Q(const QQmlEngine); if (!networkAccessManager) - networkAccessManager = createNetworkAccessManager(const_cast(q)); + networkAccessManager = createNetworkAccessManager(const_cast(q)); return networkAccessManager; } @@ -650,28 +650,28 @@ QNetworkAccessManager *QDeclarativeEnginePrivate::getNetworkAccessManager() cons Returns a common QNetworkAccessManager which can be used by any QML element instantiated by this engine. - If a QDeclarativeNetworkAccessManagerFactory has been set and a + If a QQmlNetworkAccessManagerFactory has been set and a QNetworkAccessManager has not yet been created, the - QDeclarativeNetworkAccessManagerFactory will be used to create the + QQmlNetworkAccessManagerFactory will be used to create the QNetworkAccessManager; otherwise the returned QNetworkAccessManager will have no proxy or cache set. \sa setNetworkAccessManagerFactory() */ -QNetworkAccessManager *QDeclarativeEngine::networkAccessManager() const +QNetworkAccessManager *QQmlEngine::networkAccessManager() const { - Q_D(const QDeclarativeEngine); + Q_D(const QQmlEngine); return d->getNetworkAccessManager(); } /*! Sets the \a provider to use for images requested via the \e - image: url scheme, with host \a providerId. The QDeclarativeEngine + image: url scheme, with host \a providerId. The QQmlEngine takes ownership of \a provider. Image providers enable support for pixmap and threaded image - requests. See the QDeclarativeImageProvider documentation for details on + requests. See the QQmlImageProvider documentation for details on implementing and using image providers. All required image providers should be added to the engine before any @@ -679,51 +679,51 @@ QNetworkAccessManager *QDeclarativeEngine::networkAccessManager() const \sa removeImageProvider() */ -void QDeclarativeEngine::addImageProvider(const QString &providerId, QDeclarativeImageProvider *provider) +void QQmlEngine::addImageProvider(const QString &providerId, QQmlImageProvider *provider) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); QMutexLocker locker(&d->mutex); - d->imageProviders.insert(providerId.toLower(), QSharedPointer(provider)); + d->imageProviders.insert(providerId.toLower(), QSharedPointer(provider)); } /*! - Returns the QDeclarativeImageProvider set for \a providerId. + Returns the QQmlImageProvider set for \a providerId. Returns the provider if it was found; otherwise returns 0. */ -QDeclarativeImageProvider *QDeclarativeEngine::imageProvider(const QString &providerId) const +QQmlImageProvider *QQmlEngine::imageProvider(const QString &providerId) const { - Q_D(const QDeclarativeEngine); + Q_D(const QQmlEngine); QMutexLocker locker(&d->mutex); return d->imageProviders.value(providerId).data(); } /*! - Removes the QDeclarativeImageProvider for \a providerId. + Removes the QQmlImageProvider for \a providerId. \sa addImageProvider() */ -void QDeclarativeEngine::removeImageProvider(const QString &providerId) +void QQmlEngine::removeImageProvider(const QString &providerId) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); QMutexLocker locker(&d->mutex); d->imageProviders.take(providerId); } -QDeclarativeImageProvider::ImageType QDeclarativeEnginePrivate::getImageProviderType(const QUrl &url) +QQmlImageProvider::ImageType QQmlEnginePrivate::getImageProviderType(const QUrl &url) { QMutexLocker locker(&mutex); - QSharedPointer provider = imageProviders.value(url.host()); + QSharedPointer provider = imageProviders.value(url.host()); locker.unlock(); if (provider) return provider->imageType(); - return QDeclarativeImageProvider::Invalid; + return QQmlImageProvider::Invalid; } -QDeclarativeTextureFactory *QDeclarativeEnginePrivate::getTextureFromProvider(const QUrl &url, QSize *size, const QSize& req_size) +QQuickTextureFactory *QQmlEnginePrivate::getTextureFromProvider(const QUrl &url, QSize *size, const QSize& req_size) { QMutexLocker locker(&mutex); - QSharedPointer provider = imageProviders.value(url.host()); + QSharedPointer provider = imageProviders.value(url.host()); locker.unlock(); if (provider) { QString imageId = url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1); @@ -732,11 +732,11 @@ QDeclarativeTextureFactory *QDeclarativeEnginePrivate::getTextureFromProvider(co return 0; } -QImage QDeclarativeEnginePrivate::getImageFromProvider(const QUrl &url, QSize *size, const QSize& req_size) +QImage QQmlEnginePrivate::getImageFromProvider(const QUrl &url, QSize *size, const QSize& req_size) { QMutexLocker locker(&mutex); QImage image; - QSharedPointer provider = imageProviders.value(url.host()); + QSharedPointer provider = imageProviders.value(url.host()); locker.unlock(); if (provider) { QString imageId = url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1); @@ -745,11 +745,11 @@ QImage QDeclarativeEnginePrivate::getImageFromProvider(const QUrl &url, QSize *s return image; } -QPixmap QDeclarativeEnginePrivate::getPixmapFromProvider(const QUrl &url, QSize *size, const QSize& req_size) +QPixmap QQmlEnginePrivate::getPixmapFromProvider(const QUrl &url, QSize *size, const QSize& req_size) { QMutexLocker locker(&mutex); QPixmap pixmap; - QSharedPointer provider = imageProviders.value(url.host()); + QSharedPointer provider = imageProviders.value(url.host()); locker.unlock(); if (provider) { QString imageId = url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1); @@ -761,16 +761,16 @@ QPixmap QDeclarativeEnginePrivate::getPixmapFromProvider(const QUrl &url, QSize /*! Return the base URL for this engine. The base URL is only used to resolve components when a relative URL is passed to the - QDeclarativeComponent constructor. + QQmlComponent constructor. If a base URL has not been explicitly set, this method returns the application's current working directory. \sa setBaseUrl() */ -QUrl QDeclarativeEngine::baseUrl() const +QUrl QQmlEngine::baseUrl() const { - Q_D(const QDeclarativeEngine); + Q_D(const QQmlEngine); if (d->baseUrl.isEmpty()) { return QUrl::fromLocalFile(QDir::currentPath() + QDir::separator()); } else { @@ -783,9 +783,9 @@ QUrl QDeclarativeEngine::baseUrl() const \sa baseUrl() */ -void QDeclarativeEngine::setBaseUrl(const QUrl &url) +void QQmlEngine::setBaseUrl(const QUrl &url) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); d->baseUrl = url; } @@ -795,9 +795,9 @@ void QDeclarativeEngine::setBaseUrl(const QUrl &url) The default value is true. */ -bool QDeclarativeEngine::outputWarningsToStandardError() const +bool QQmlEngine::outputWarningsToStandardError() const { - Q_D(const QDeclarativeEngine); + Q_D(const QQmlEngine); return d->outputWarningsToStdErr; } @@ -811,70 +811,70 @@ bool QDeclarativeEngine::outputWarningsToStandardError() const The default value is true. */ -void QDeclarativeEngine::setOutputWarningsToStandardError(bool enabled) +void QQmlEngine::setOutputWarningsToStandardError(bool enabled) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); d->outputWarningsToStdErr = enabled; } /*! Attempt to free unused memory. */ -void QDeclarativeEngine::collectGarbage() +void QQmlEngine::collectGarbage() { QV8Engine::gc(); } /*! - Returns the QDeclarativeContext for the \a object, or 0 if no + Returns the QQmlContext for the \a object, or 0 if no context has been set. - When the QDeclarativeEngine instantiates a QObject, the context is + When the QQmlEngine instantiates a QObject, the context is set automatically. */ -QDeclarativeContext *QDeclarativeEngine::contextForObject(const QObject *object) +QQmlContext *QQmlEngine::contextForObject(const QObject *object) { if(!object) return 0; QObjectPrivate *priv = QObjectPrivate::get(const_cast(object)); - QDeclarativeData *data = - static_cast(priv->declarativeData); + QQmlData *data = + static_cast(priv->declarativeData); if (!data) return 0; else if (data->outerContext) - return data->outerContext->asQDeclarativeContext(); + return data->outerContext->asQQmlContext(); else return 0; } /*! - Sets the QDeclarativeContext for the \a object to \a context. + Sets the QQmlContext for the \a object to \a context. If the \a object already has a context, a warning is output, but the context is not changed. - When the QDeclarativeEngine instantiates a QObject, the context is + When the QQmlEngine instantiates a QObject, the context is set automatically. */ -void QDeclarativeEngine::setContextForObject(QObject *object, QDeclarativeContext *context) +void QQmlEngine::setContextForObject(QObject *object, QQmlContext *context) { if (!object || !context) return; - QDeclarativeData *data = QDeclarativeData::get(object, true); + QQmlData *data = QQmlData::get(object, true); if (data->context) { - qWarning("QDeclarativeEngine::setContextForObject(): Object already has a QDeclarativeContext"); + qWarning("QQmlEngine::setContextForObject(): Object already has a QQmlContext"); return; } - QDeclarativeContextData *contextData = QDeclarativeContextData::get(context); + QQmlContextData *contextData = QQmlContextData::get(context); contextData->addObject(object); } /*! - \enum QDeclarativeEngine::ObjectOwnership + \enum QQmlEngine::ObjectOwnership Ownership controls whether or not QML automatically destroys the QObject when the object is garbage collected by the JavaScript @@ -896,8 +896,8 @@ void QDeclarativeEngine::setContextForObject(QObject *object, QDeclarativeContex explicitly. QML uses a heuristic to set the default object ownership. By default, an object that is created by QML has JavaScriptOwnership. The exception to this are the root objects - created by calling QDeclarativeComponent::create() or - QDeclarativeComponent::beginCreate() which have CppOwnership by + created by calling QQmlComponent::create() or + QQmlComponent::beginCreate() which have CppOwnership by default. The ownership of these root-level objects is considered to have been transferred to the C++ caller. @@ -912,12 +912,12 @@ void QDeclarativeEngine::setContextForObject(QObject *object, QDeclarativeContex /*! Sets the \a ownership of \a object. */ -void QDeclarativeEngine::setObjectOwnership(QObject *object, ObjectOwnership ownership) +void QQmlEngine::setObjectOwnership(QObject *object, ObjectOwnership ownership) { if (!object) return; - QDeclarativeData *ddata = QDeclarativeData::get(object, true); + QQmlData *ddata = QQmlData::get(object, true); if (!ddata) return; @@ -928,28 +928,28 @@ void QDeclarativeEngine::setObjectOwnership(QObject *object, ObjectOwnership own /*! Returns the ownership of \a object. */ -QDeclarativeEngine::ObjectOwnership QDeclarativeEngine::objectOwnership(QObject *object) +QQmlEngine::ObjectOwnership QQmlEngine::objectOwnership(QObject *object) { if (!object) return CppOwnership; - QDeclarativeData *ddata = QDeclarativeData::get(object, false); + QQmlData *ddata = QQmlData::get(object, false); if (!ddata) return CppOwnership; else return ddata->indestructible?CppOwnership:JavaScriptOwnership; } -bool QDeclarativeEngine::event(QEvent *e) +bool QQmlEngine::event(QEvent *e) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); if (e->type() == QEvent::User) d->doDeleteInEngineThread(); return QJSEngine::event(e); } -void QDeclarativeEnginePrivate::doDeleteInEngineThread() +void QQmlEnginePrivate::doDeleteInEngineThread() { QFieldList list; mutex.lock(); @@ -962,38 +962,38 @@ void QDeclarativeEnginePrivate::doDeleteInEngineThread() Q_AUTOTEST_EXPORT void qmlExecuteDeferred(QObject *object) { - QDeclarativeData *data = QDeclarativeData::get(object); + QQmlData *data = QQmlData::get(object); if (data && data->deferredComponent) { - if (QDeclarativeDebugService::isDebuggingEnabled()) { - QDeclarativeProfilerService::startRange(QDeclarativeProfilerService::Creating); - QDeclarativeType *type = QDeclarativeMetaType::qmlType(object->metaObject()); + if (QQmlDebugService::isDebuggingEnabled()) { + QQmlProfilerService::startRange(QQmlProfilerService::Creating); + QQmlType *type = QQmlMetaType::qmlType(object->metaObject()); QString typeName = type ? type->qmlTypeName() : QString::fromUtf8(object->metaObject()->className()); - QDeclarativeProfilerService::rangeData(QDeclarativeProfilerService::Creating, typeName); + QQmlProfilerService::rangeData(QQmlProfilerService::Creating, typeName); if (data->outerContext) - QDeclarativeProfilerService::rangeLocation(QDeclarativeProfilerService::Creating, data->outerContext->url, data->lineNumber, data->columnNumber); + QQmlProfilerService::rangeLocation(QQmlProfilerService::Creating, data->outerContext->url, data->lineNumber, data->columnNumber); } - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(data->context->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(data->context->engine); - QDeclarativeComponentPrivate::ConstructionState state; - QDeclarativeComponentPrivate::beginDeferred(ep, object, &state); + QQmlComponentPrivate::ConstructionState state; + QQmlComponentPrivate::beginDeferred(ep, object, &state); data->deferredComponent->release(); data->deferredComponent = 0; - QDeclarativeComponentPrivate::complete(ep, &state); - QDeclarativeProfilerService::endRange(QDeclarativeProfilerService::Creating); + QQmlComponentPrivate::complete(ep, &state); + QQmlProfilerService::endRange(QQmlProfilerService::Creating); } } -QDeclarativeContext *qmlContext(const QObject *obj) +QQmlContext *qmlContext(const QObject *obj) { - return QDeclarativeEngine::contextForObject(obj); + return QQmlEngine::contextForObject(obj); } -QDeclarativeEngine *qmlEngine(const QObject *obj) +QQmlEngine *qmlEngine(const QObject *obj) { - QDeclarativeData *data = QDeclarativeData::get(obj, false); + QQmlData *data = QQmlData::get(obj, false); if (!data || !data->context) return 0; return data->context->engine; @@ -1001,7 +1001,7 @@ QDeclarativeEngine *qmlEngine(const QObject *obj) QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool create) { - QDeclarativeData *data = QDeclarativeData::get(object); + QQmlData *data = QQmlData::get(object); if (!data) return 0; // Attached properties are only on objects created by QML @@ -1009,7 +1009,7 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre if (rv || !create) return rv; - QDeclarativeAttachedPropertiesFunc pf = QDeclarativeMetaType::attachedPropertiesFuncById(id); + QQmlAttachedPropertiesFunc pf = QQmlMetaType::attachedPropertiesFuncById(id); if (!pf) return 0; @@ -1025,7 +1025,7 @@ QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object, const QMetaObject *attachedMetaObject, bool create) { if (*idCache == -1) - *idCache = QDeclarativeMetaType::attachedPropertiesFuncId(attachedMetaObject); + *idCache = QQmlMetaType::attachedPropertiesFuncId(attachedMetaObject); if (*idCache == -1 || !object) return 0; @@ -1033,35 +1033,35 @@ QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object, return qmlAttachedPropertiesObjectById(*idCache, object, create); } -QDeclarativeDebuggingEnabler::QDeclarativeDebuggingEnabler() +QQmlDebuggingEnabler::QQmlDebuggingEnabler() { -#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL - if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { +#ifndef QQML_NO_DEBUG_PROTOCOL + if (!QQmlEnginePrivate::qml_debugging_enabled) { qWarning("Qml debugging is enabled. Only use this in a safe environment!"); } - QDeclarativeEnginePrivate::qml_debugging_enabled = true; + QQmlEnginePrivate::qml_debugging_enabled = true; #endif } -class QDeclarativeDataExtended { +class QQmlDataExtended { public: - QDeclarativeDataExtended(); - ~QDeclarativeDataExtended(); + QQmlDataExtended(); + ~QQmlDataExtended(); QHash attachedProperties; - QDeclarativeNotifier objectNameNotifier; + QQmlNotifier objectNameNotifier; }; -QDeclarativeDataExtended::QDeclarativeDataExtended() +QQmlDataExtended::QQmlDataExtended() { } -QDeclarativeDataExtended::~QDeclarativeDataExtended() +QQmlDataExtended::~QQmlDataExtended() { } -void QDeclarativeData::NotifyList::layout(QDeclarativeNotifierEndpoint *endpoint) +void QQmlData::NotifyList::layout(QQmlNotifierEndpoint *endpoint) { if (endpoint->next) layout(endpoint->next); @@ -1075,16 +1075,16 @@ void QDeclarativeData::NotifyList::layout(QDeclarativeNotifierEndpoint *endpoint notifies[index] = endpoint; } -void QDeclarativeData::NotifyList::layout() +void QQmlData::NotifyList::layout() { Q_ASSERT(maximumTodoIndex >= notifiesSize); if (todo) { - QDeclarativeNotifierEndpoint **old = notifies; - const int reallocSize = (maximumTodoIndex + 1) * sizeof(QDeclarativeNotifierEndpoint*); - notifies = (QDeclarativeNotifierEndpoint**)realloc(notifies, reallocSize); + QQmlNotifierEndpoint **old = notifies; + const int reallocSize = (maximumTodoIndex + 1) * sizeof(QQmlNotifierEndpoint*); + notifies = (QQmlNotifierEndpoint**)realloc(notifies, reallocSize); const int memsetSize = (maximumTodoIndex - notifiesSize + 1) * - sizeof(QDeclarativeNotifierEndpoint*); + sizeof(QQmlNotifierEndpoint*); memset(notifies + notifiesSize, 0, memsetSize); if (notifies != old) { @@ -1102,7 +1102,7 @@ void QDeclarativeData::NotifyList::layout() todo = 0; } -void QDeclarativeData::addNotify(int index, QDeclarativeNotifierEndpoint *endpoint) +void QQmlData::addNotify(int index, QQmlNotifierEndpoint *endpoint) { if (!notifyList) { notifyList = (NotifyList *)malloc(sizeof(NotifyList)); @@ -1135,19 +1135,19 @@ void QDeclarativeData::addNotify(int index, QDeclarativeNotifierEndpoint *endpoi } } -QDeclarativeNotifier *QDeclarativeData::objectNameNotifier() const +QQmlNotifier *QQmlData::objectNameNotifier() const { - if (!extendedData) extendedData = new QDeclarativeDataExtended; + if (!extendedData) extendedData = new QQmlDataExtended; return &extendedData->objectNameNotifier; } -QHash *QDeclarativeData::attachedProperties() const +QHash *QQmlData::attachedProperties() const { - if (!extendedData) extendedData = new QDeclarativeDataExtended; + if (!extendedData) extendedData = new QQmlDataExtended; return &extendedData->attachedProperties; } -void QDeclarativeData::destroyed(QObject *object) +void QQmlData::destroyed(QObject *object) { if (deferredComponent) deferredComponent->release(); @@ -1157,9 +1157,9 @@ void QDeclarativeData::destroyed(QObject *object) if (prevContextObject) *prevContextObject = nextContextObject; - QDeclarativeAbstractBinding *binding = bindings; + QQmlAbstractBinding *binding = bindings; while (binding) { - QDeclarativeAbstractBinding *next = binding->m_nextBinding; + QQmlAbstractBinding *next = binding->m_nextBinding; binding->m_prevBinding = 0; binding->m_nextBinding = 0; binding->destroy(); @@ -1176,7 +1176,7 @@ void QDeclarativeData::destroyed(QObject *object) context->destroy(); while (guards) { - QDeclarativeGuard *guard = static_cast *>(guards); + QQmlGuard *guard = static_cast *>(guards); *guard = (QObject *)0; guard->objectDestroyed(object); } @@ -1185,7 +1185,7 @@ void QDeclarativeData::destroyed(QObject *object) while (notifyList->todo) notifyList->todo->disconnect(); for (int ii = 0; ii < notifyList->notifiesSize; ++ii) { - while (QDeclarativeNotifierEndpoint *ep = notifyList->notifies[ii]) + while (QQmlNotifierEndpoint *ep = notifyList->notifies[ii]) ep->disconnect(); } free(notifyList->notifies); @@ -1201,18 +1201,18 @@ void QDeclarativeData::destroyed(QObject *object) delete this; } -void QDeclarativeData::parentChanged(QObject *object, QObject *parent) +void QQmlData::parentChanged(QObject *object, QObject *parent) { Q_UNUSED(object); Q_UNUSED(parent); } -void QDeclarativeData::objectNameChanged(QObject *) +void QQmlData::objectNameChanged(QObject *) { if (extendedData) objectNameNotifier()->notify(); } -bool QDeclarativeData::hasBindingBit(int bit) const +bool QQmlData::hasBindingBit(int bit) const { if (bindingBitsSize > bit) return bindingBits[bit / 32] & (1 << (bit % 32)); @@ -1220,13 +1220,13 @@ bool QDeclarativeData::hasBindingBit(int bit) const return false; } -void QDeclarativeData::clearBindingBit(int bit) +void QQmlData::clearBindingBit(int bit) { if (bindingBitsSize > bit) bindingBits[bit / 32] &= ~(1 << (bit % 32)); } -void QDeclarativeData::setBindingBit(QObject *obj, int bit) +void QQmlData::setBindingBit(QObject *obj, int bit) { if (bindingBitsSize <= bit) { int props = obj->metaObject()->propertyCount(); @@ -1248,7 +1248,7 @@ void QDeclarativeData::setBindingBit(QObject *obj, int bit) bindingBits[bit / 32] |= (1 << (bit % 32)); } -QString QDeclarativeEnginePrivate::urlToLocalFileOrQrc(const QUrl& url) +QString QQmlEnginePrivate::urlToLocalFileOrQrc(const QUrl& url) { if (url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0) { if (url.authority().isEmpty()) @@ -1275,7 +1275,7 @@ static QString toLocalFile(const QString &url) return file; } -QString QDeclarativeEnginePrivate::urlToLocalFileOrQrc(const QString& url) +QString QQmlEnginePrivate::urlToLocalFileOrQrc(const QString& url) { if (url.startsWith(QLatin1String("qrc:"), Qt::CaseInsensitive)) { if (url.length() > 4) @@ -1286,59 +1286,59 @@ QString QDeclarativeEnginePrivate::urlToLocalFileOrQrc(const QString& url) return toLocalFile(url); } -void QDeclarativeEnginePrivate::sendQuit() +void QQmlEnginePrivate::sendQuit() { - Q_Q(QDeclarativeEngine); + Q_Q(QQmlEngine); emit q->quit(); if (q->receivers(SIGNAL(quit())) == 0) { - qWarning("Signal QDeclarativeEngine::quit() emitted, but no receivers connected to handle it."); + qWarning("Signal QQmlEngine::quit() emitted, but no receivers connected to handle it."); } } -static void dumpwarning(const QDeclarativeError &error) +static void dumpwarning(const QQmlError &error) { qWarning().nospace() << qPrintable(error.toString()); } -static void dumpwarning(const QList &errors) +static void dumpwarning(const QList &errors) { for (int ii = 0; ii < errors.count(); ++ii) dumpwarning(errors.at(ii)); } -void QDeclarativeEnginePrivate::warning(const QDeclarativeError &error) +void QQmlEnginePrivate::warning(const QQmlError &error) { - Q_Q(QDeclarativeEngine); - q->warnings(QList() << error); + Q_Q(QQmlEngine); + q->warnings(QList() << error); if (outputWarningsToStdErr) dumpwarning(error); } -void QDeclarativeEnginePrivate::warning(const QList &errors) +void QQmlEnginePrivate::warning(const QList &errors) { - Q_Q(QDeclarativeEngine); + Q_Q(QQmlEngine); q->warnings(errors); if (outputWarningsToStdErr) dumpwarning(errors); } -void QDeclarativeEnginePrivate::warning(QDeclarativeEngine *engine, const QDeclarativeError &error) +void QQmlEnginePrivate::warning(QQmlEngine *engine, const QQmlError &error) { if (engine) - QDeclarativeEnginePrivate::get(engine)->warning(error); + QQmlEnginePrivate::get(engine)->warning(error); else dumpwarning(error); } -void QDeclarativeEnginePrivate::warning(QDeclarativeEngine *engine, const QList &error) +void QQmlEnginePrivate::warning(QQmlEngine *engine, const QList &error) { if (engine) - QDeclarativeEnginePrivate::get(engine)->warning(error); + QQmlEnginePrivate::get(engine)->warning(error); else dumpwarning(error); } -void QDeclarativeEnginePrivate::warning(QDeclarativeEnginePrivate *engine, const QDeclarativeError &error) +void QQmlEnginePrivate::warning(QQmlEnginePrivate *engine, const QQmlError &error) { if (engine) engine->warning(error); @@ -1346,7 +1346,7 @@ void QDeclarativeEnginePrivate::warning(QDeclarativeEnginePrivate *engine, const dumpwarning(error); } -void QDeclarativeEnginePrivate::warning(QDeclarativeEnginePrivate *engine, const QList &error) +void QQmlEnginePrivate::warning(QQmlEnginePrivate *engine, const QList &error) { if (engine) engine->warning(error); @@ -1359,7 +1359,7 @@ void QDeclarativeEnginePrivate::warning(QDeclarativeEnginePrivate *engine, const so that scarce resources are not freed prematurely (eg, if there is a nested javascript expression). */ -void QDeclarativeEnginePrivate::referenceScarceResources() +void QQmlEnginePrivate::referenceScarceResources() { scarceResourcesRefCount += 1; } @@ -1368,7 +1368,7 @@ void QDeclarativeEnginePrivate::referenceScarceResources() This function should be called after evaluation of the js expression is complete, and so the scarce resources may be freed safely. */ -void QDeclarativeEnginePrivate::dereferenceScarceResources() +void QQmlEnginePrivate::dereferenceScarceResources() { Q_ASSERT(scarceResourcesRefCount > 0); scarceResourcesRefCount -= 1; @@ -1397,9 +1397,9 @@ void QDeclarativeEnginePrivate::dereferenceScarceResources() \sa setImportPathList(), {QML Modules} */ -void QDeclarativeEngine::addImportPath(const QString& path) +void QQmlEngine::addImportPath(const QString& path) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); d->importDatabase.addImportPath(path); } @@ -1408,7 +1408,7 @@ void QDeclarativeEngine::addImportPath(const QString& path) installed modules in a URL-based directory structure. For example, if \c /opt/MyApp/lib/imports is in the path, then QML that - imports \c com.mycompany.Feature will cause the QDeclarativeEngine to look + imports \c com.mycompany.Feature will cause the QQmlEngine to look in \c /opt/MyApp/lib/imports/com/mycompany/Feature/ for the components provided by that module. A \c qmldir file is required for defining the type version mapping and possibly declarative extensions plugins. @@ -1419,9 +1419,9 @@ void QDeclarativeEngine::addImportPath(const QString& path) \sa addImportPath() setImportPathList() */ -QStringList QDeclarativeEngine::importPathList() const +QStringList QQmlEngine::importPathList() const { - Q_D(const QDeclarativeEngine); + Q_D(const QQmlEngine); return d->importDatabase.importPathList(); } @@ -1435,9 +1435,9 @@ QStringList QDeclarativeEngine::importPathList() const \sa importPathList() addImportPath() */ -void QDeclarativeEngine::setImportPathList(const QStringList &paths) +void QQmlEngine::setImportPathList(const QStringList &paths) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); d->importDatabase.setImportPathList(paths); } @@ -1453,9 +1453,9 @@ void QDeclarativeEngine::setImportPathList(const QStringList &paths) \sa setPluginPathList() */ -void QDeclarativeEngine::addPluginPath(const QString& path) +void QQmlEngine::addPluginPath(const QString& path) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); d->importDatabase.addPluginPath(path); } @@ -1469,9 +1469,9 @@ void QDeclarativeEngine::addPluginPath(const QString& path) \sa addPluginPath() setPluginPathList() */ -QStringList QDeclarativeEngine::pluginPathList() const +QStringList QQmlEngine::pluginPathList() const { - Q_D(const QDeclarativeEngine); + Q_D(const QQmlEngine); return d->importDatabase.pluginPathList(); } @@ -1485,9 +1485,9 @@ QStringList QDeclarativeEngine::pluginPathList() const \sa pluginPathList() addPluginPath() */ -void QDeclarativeEngine::setPluginPathList(const QStringList &paths) +void QQmlEngine::setPluginPathList(const QStringList &paths) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); d->importDatabase.setPluginPathList(paths); } @@ -1497,11 +1497,11 @@ void QDeclarativeEngine::setPluginPathList(const QStringList &paths) On failure and if non-null, the \a errors list will have any errors which occurred prepended to it. - The plugin has to be a Qt plugin which implements the QDeclarativeExtensionPlugin interface. + The plugin has to be a Qt plugin which implements the QQmlExtensionPlugin interface. */ -bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &uri, QList *errors) +bool QQmlEngine::importPlugin(const QString &filePath, const QString &uri, QList *errors) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); return d->importDatabase.importPlugin(filePath, uri, errors); } @@ -1511,12 +1511,12 @@ bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &ur 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. + The plugin has to be a Qt plugin which implements the QQmlExtensionPlugin interface. */ -bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &uri, QString *errorString) +bool QQmlEngine::importPlugin(const QString &filePath, const QString &uri, QString *errorString) { - Q_D(QDeclarativeEngine); - QList errors; + Q_D(QQmlEngine); + QList errors; bool retn = d->importDatabase.importPlugin(filePath, uri, &errors); if (!errors.isEmpty()) { QString builtError; @@ -1531,13 +1531,13 @@ bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &ur } /*! - \property QDeclarativeEngine::offlineStoragePath + \property QQmlEngine::offlineStoragePath \brief the directory for storing offline user data Returns the directory where SQL and other offline storage is placed. - QDeclarativeWebView and the SQL databases created with openDatabase() + QQuickWebView and the SQL databases created with openDatabase() are stored here. The default is QML/OfflineStorage in the platform-standard @@ -1547,15 +1547,15 @@ bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &ur callers wanting to \e create new files at this location should create it first - see QDir::mkpath(). */ -void QDeclarativeEngine::setOfflineStoragePath(const QString& dir) +void QQmlEngine::setOfflineStoragePath(const QString& dir) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); d->offlineStoragePath = dir; } -QString QDeclarativeEngine::offlineStoragePath() const +QString QQmlEngine::offlineStoragePath() const { - Q_D(const QDeclarativeEngine); + Q_D(const QQmlEngine); return d->offlineStoragePath; } @@ -1574,33 +1574,33 @@ static void *voidptr_constructor(const void *v) } } -QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(const QMetaObject *mo) +QQmlPropertyCache *QQmlEnginePrivate::createCache(const QMetaObject *mo) { - Q_Q(QDeclarativeEngine); + Q_Q(QQmlEngine); if (!mo->superClass()) { - QDeclarativePropertyCache *rv = new QDeclarativePropertyCache(q, mo); + QQmlPropertyCache *rv = new QQmlPropertyCache(q, mo); propertyCache.insert(mo, rv); return rv; } else { - QDeclarativePropertyCache *super = cache(mo->superClass()); - QDeclarativePropertyCache *rv = super->copyAndAppend(q, mo); + QQmlPropertyCache *super = cache(mo->superClass()); + QQmlPropertyCache *rv = super->copyAndAppend(q, mo); propertyCache.insert(mo, rv); return rv; } } -QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(QDeclarativeType *type, int minorVersion, - QDeclarativeError &error) +QQmlPropertyCache *QQmlEnginePrivate::createCache(QQmlType *type, int minorVersion, + QQmlError &error) { - QList types; + QList types; int maxMinorVersion = 0; const QMetaObject *metaObject = type->metaObject(); while (metaObject) { - QDeclarativeType *t = QDeclarativeMetaType::qmlType(metaObject, type->module(), + QQmlType *t = QQmlMetaType::qmlType(metaObject, type->module(), type->majorVersion(), minorVersion); if (t) { maxMinorVersion = qMax(maxMinorVersion, t->minorVersion()); @@ -1612,18 +1612,18 @@ QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(QDeclarativeTy metaObject = metaObject->superClass(); } - if (QDeclarativePropertyCache *c = typePropertyCache.value(qMakePair(type, maxMinorVersion))) { + if (QQmlPropertyCache *c = typePropertyCache.value(qMakePair(type, maxMinorVersion))) { c->addref(); typePropertyCache.insert(qMakePair(type, minorVersion), c); return c; } - QDeclarativePropertyCache *raw = cache(type->metaObject()); + QQmlPropertyCache *raw = cache(type->metaObject()); bool hasCopied = false; for (int ii = 0; ii < types.count(); ++ii) { - QDeclarativeType *currentType = types.at(ii); + QQmlType *currentType = types.at(ii); if (!currentType) continue; @@ -1657,16 +1657,16 @@ QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(QDeclarativeTy QString overloadName; #if 0 - for (QDeclarativePropertyCache::StringCache::ConstIterator iter = raw->stringCache.begin(); + for (QQmlPropertyCache::StringCache::ConstIterator iter = raw->stringCache.begin(); !overloadError && iter != raw->stringCache.end(); ++iter) { - QDeclarativePropertyData *d = *iter; + QQmlPropertyData *d = *iter; if (raw->isAllowedInRevision(d)) continue; // Not excluded - no problems // check that a regular "name" overload isn't happening - QDeclarativePropertyData *current = d; + QQmlPropertyData *current = d; while (!overloadError && current) { current = d->overrideData(current); if (current && raw->isAllowedInRevision(current)) @@ -1693,14 +1693,14 @@ QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(QDeclarativeTy return raw; } -QDeclarativeMetaType::ModuleApiInstance * -QDeclarativeEnginePrivate::moduleApiInstance(const QDeclarativeMetaType::ModuleApi &module) +QQmlMetaType::ModuleApiInstance * +QQmlEnginePrivate::moduleApiInstance(const QQmlMetaType::ModuleApi &module) { Locker locker(this); - QDeclarativeMetaType::ModuleApiInstance *a = moduleApiInstances.value(module); + QQmlMetaType::ModuleApiInstance *a = moduleApiInstances.value(module); if (!a) { - a = new QDeclarativeMetaType::ModuleApiInstance; + a = new QQmlMetaType::ModuleApiInstance; a->scriptCallback = module.script; a->qobjectCallback = module.qobject; moduleApiInstances.insert(module, a); @@ -1709,13 +1709,13 @@ QDeclarativeEnginePrivate::moduleApiInstance(const QDeclarativeMetaType::ModuleA return a; } -bool QDeclarativeEnginePrivate::isQObject(int t) +bool QQmlEnginePrivate::isQObject(int t) { Locker locker(this); - return m_compositeTypes.contains(t) || QDeclarativeMetaType::isQObject(t); + return m_compositeTypes.contains(t) || QQmlMetaType::isQObject(t); } -QObject *QDeclarativeEnginePrivate::toQObject(const QVariant &v, bool *ok) const +QObject *QQmlEnginePrivate::toQObject(const QVariant &v, bool *ok) const { Locker locker(this); int t = v.userType(); @@ -1723,67 +1723,67 @@ QObject *QDeclarativeEnginePrivate::toQObject(const QVariant &v, bool *ok) const if (ok) *ok = true; return *(QObject **)(v.constData()); } else { - return QDeclarativeMetaType::toQObject(v, ok); + return QQmlMetaType::toQObject(v, ok); } } -QDeclarativeMetaType::TypeCategory QDeclarativeEnginePrivate::typeCategory(int t) const +QQmlMetaType::TypeCategory QQmlEnginePrivate::typeCategory(int t) const { Locker locker(this); if (m_compositeTypes.contains(t)) - return QDeclarativeMetaType::Object; + return QQmlMetaType::Object; else if (m_qmlLists.contains(t)) - return QDeclarativeMetaType::List; + return QQmlMetaType::List; else - return QDeclarativeMetaType::typeCategory(t); + return QQmlMetaType::typeCategory(t); } -bool QDeclarativeEnginePrivate::isList(int t) const +bool QQmlEnginePrivate::isList(int t) const { Locker locker(this); - return m_qmlLists.contains(t) || QDeclarativeMetaType::isList(t); + return m_qmlLists.contains(t) || QQmlMetaType::isList(t); } -int QDeclarativeEnginePrivate::listType(int t) const +int QQmlEnginePrivate::listType(int t) const { Locker locker(this); QHash::ConstIterator iter = m_qmlLists.find(t); if (iter != m_qmlLists.end()) return *iter; else - return QDeclarativeMetaType::listType(t); + return QQmlMetaType::listType(t); } -const QMetaObject *QDeclarativeEnginePrivate::rawMetaObjectForType(int t) const +const QMetaObject *QQmlEnginePrivate::rawMetaObjectForType(int t) const { Locker locker(this); - QHash::ConstIterator iter = m_compositeTypes.find(t); + QHash::ConstIterator iter = m_compositeTypes.find(t); if (iter != m_compositeTypes.end()) { return (*iter)->root; } else { - QDeclarativeType *type = QDeclarativeMetaType::qmlType(t); + QQmlType *type = QQmlMetaType::qmlType(t); return type?type->baseMetaObject():0; } } -const QMetaObject *QDeclarativeEnginePrivate::metaObjectForType(int t) const +const QMetaObject *QQmlEnginePrivate::metaObjectForType(int t) const { Locker locker(this); - QHash::ConstIterator iter = m_compositeTypes.find(t); + QHash::ConstIterator iter = m_compositeTypes.find(t); if (iter != m_compositeTypes.end()) { return (*iter)->root; } else { - QDeclarativeType *type = QDeclarativeMetaType::qmlType(t); + QQmlType *type = QQmlMetaType::qmlType(t); return type?type->metaObject():0; } } -void QDeclarativeEnginePrivate::registerCompositeType(QDeclarativeCompiledData *data) +void QQmlEnginePrivate::registerCompositeType(QQmlCompiledData *data) { QByteArray name = data->root->className(); QByteArray ptr = name + '*'; - QByteArray lst = "QDeclarativeListProperty<" + name + '>'; + QByteArray lst = "QQmlListProperty<" + name + '>'; int ptr_type = QMetaType::registerType(ptr.constData(), voidptr_destructor, voidptr_constructor); @@ -1797,7 +1797,7 @@ void QDeclarativeEnginePrivate::registerCompositeType(QDeclarativeCompiledData * m_compositeTypes.insert(ptr_type, data); } -bool QDeclarative_isFileCaseCorrect(const QString &fileName) +bool QQml_isFileCaseCorrect(const QString &fileName) { #if defined(Q_OS_MAC) || defined(Q_OS_WIN) QFileInfo info(fileName); @@ -1836,19 +1836,19 @@ bool QDeclarative_isFileCaseCorrect(const QString &fileName) } /*! - \fn QDeclarativeEngine *qmlEngine(const QObject *object) - \relates QDeclarativeEngine + \fn QQmlEngine *qmlEngine(const QObject *object) + \relates QQmlEngine - Returns the QDeclarativeEngine associated with \a object, if any. This is equivalent to - QDeclarativeEngine::contextForObject(object)->engine(), but more efficient. + Returns the QQmlEngine associated with \a object, if any. This is equivalent to + QQmlEngine::contextForObject(object)->engine(), but more efficient. */ /*! - \fn QDeclarativeContext *qmlContext(const QObject *object) - \relates QDeclarativeEngine + \fn QQmlContext *qmlContext(const QObject *object) + \relates QQmlEngine - Returns the QDeclarativeContext associated with \a object, if any. This is equivalent to - QDeclarativeEngine::contextForObject(object). + Returns the QQmlContext associated with \a object, if any. This is equivalent to + QQmlEngine::contextForObject(object). */ QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/qml/qml/qqmlengine.h similarity index 67% rename from src/declarative/qml/qdeclarativeengine.h rename to src/qml/qml/qqmlengine.h index eb310d4b9a..04ac61c05b 100644 --- a/src/declarative/qml/qdeclarativeengine.h +++ b/src/qml/qml/qqmlengine.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,42 +39,42 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEENGINE_H -#define QDECLARATIVEENGINE_H +#ifndef QQMLENGINE_H +#define QQMLENGINE_H #include #include #include -#include -#include -#include +#include +#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeComponent; -class QDeclarativeEnginePrivate; -class QDeclarativeImportsPrivate; -class QDeclarativeExpression; -class QDeclarativeContext; -class QDeclarativeType; +class QQmlComponent; +class QQmlEnginePrivate; +class QQmlImportsPrivate; +class QQmlExpression; +class QQmlContext; +class QQmlType; class QUrl; class QScriptContext; -class QDeclarativeImageProvider; +class QQmlImageProvider; class QNetworkAccessManager; -class QDeclarativeNetworkAccessManagerFactory; -class QDeclarativeIncubationController; -class Q_DECLARATIVE_EXPORT QDeclarativeEngine : public QJSEngine +class QQmlNetworkAccessManagerFactory; +class QQmlIncubationController; +class Q_QML_EXPORT QQmlEngine : public QJSEngine { Q_PROPERTY(QString offlineStoragePath READ offlineStoragePath WRITE setOfflineStoragePath) Q_OBJECT public: - QDeclarativeEngine(QObject *p = 0); - virtual ~QDeclarativeEngine(); + QQmlEngine(QObject *p = 0); + virtual ~QQmlEngine(); - QDeclarativeContext *rootContext() const; + QQmlContext *rootContext() const; void clearComponentCache(); @@ -87,19 +87,19 @@ class Q_DECLARATIVE_EXPORT QDeclarativeEngine : public QJSEngine void addPluginPath(const QString& dir); bool importPlugin(const QString &filePath, const QString &uri, QString *errorString); // XXX: Qt 5: Remove this function - bool importPlugin(const QString &filePath, const QString &uri, QList *errors); + bool importPlugin(const QString &filePath, const QString &uri, QList *errors); - void setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory *); - QDeclarativeNetworkAccessManagerFactory *networkAccessManagerFactory() const; + void setNetworkAccessManagerFactory(QQmlNetworkAccessManagerFactory *); + QQmlNetworkAccessManagerFactory *networkAccessManagerFactory() const; QNetworkAccessManager *networkAccessManager() const; - void addImageProvider(const QString &id, QDeclarativeImageProvider *); - QDeclarativeImageProvider *imageProvider(const QString &id) const; + void addImageProvider(const QString &id, QQmlImageProvider *); + QQmlImageProvider *imageProvider(const QString &id) const; void removeImageProvider(const QString &id); - void setIncubationController(QDeclarativeIncubationController *); - QDeclarativeIncubationController *incubationController() const; + void setIncubationController(QQmlIncubationController *); + QQmlIncubationController *incubationController() const; void setOfflineStoragePath(const QString& dir); QString offlineStoragePath() const; @@ -112,8 +112,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativeEngine : public QJSEngine void collectGarbage(); - static QDeclarativeContext *contextForObject(const QObject *); - static void setContextForObject(QObject *, QDeclarativeContext *); + static QQmlContext *contextForObject(const QObject *); + static void setContextForObject(QObject *, QQmlContext *); enum ObjectOwnership { CppOwnership, JavaScriptOwnership }; static void setObjectOwnership(QObject *, ObjectOwnership); @@ -124,15 +124,15 @@ class Q_DECLARATIVE_EXPORT QDeclarativeEngine : public QJSEngine Q_SIGNALS: void quit(); - void warnings(const QList &warnings); + void warnings(const QList &warnings); private: - Q_DISABLE_COPY(QDeclarativeEngine) - Q_DECLARE_PRIVATE(QDeclarativeEngine) + Q_DISABLE_COPY(QQmlEngine) + Q_DECLARE_PRIVATE(QQmlEngine) }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEENGINE_H +#endif // QQMLENGINE_H diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/qml/qml/qqmlengine_p.h similarity index 54% rename from src/declarative/qml/qdeclarativeengine_p.h rename to src/qml/qml/qqmlengine_p.h index afc7a18161..db834489ba 100644 --- a/src/declarative/qml/qdeclarativeengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEENGINE_P_H -#define QDECLARATIVEENGINE_P_H +#ifndef QQMLENGINE_P_H +#define QQMLENGINE_P_H // // W A R N I N G @@ -53,21 +53,21 @@ // We mean it. // -#include "qdeclarativeengine.h" +#include "qqmlengine.h" -#include "qdeclarativetypeloader_p.h" -#include "qdeclarativeimport_p.h" +#include "qqmltypeloader_p.h" +#include "qqmlimport_p.h" #include -#include "qdeclarative.h" -#include "qdeclarativevaluetype_p.h" -#include "qdeclarativecontext.h" -#include "qdeclarativecontext_p.h" -#include "qdeclarativeexpression.h" -#include "qdeclarativeimageprovider.h" -#include "qdeclarativeproperty_p.h" -#include "qdeclarativepropertycache_p.h" -#include "qdeclarativemetatype_p.h" -#include "qdeclarativedirparser_p.h" +#include "qqml.h" +#include "qqmlvaluetype_p.h" +#include "qqmlcontext.h" +#include "qqmlcontext_p.h" +#include "qqmlexpression.h" +#include "qqmlimageprovider.h" +#include "qqmlproperty_p.h" +#include "qqmlpropertycache_p.h" +#include "qqmlmetatype_p.h" +#include "qqmldirparser_p.h" #include #include @@ -85,97 +85,97 @@ QT_BEGIN_NAMESPACE -class QDeclarativeContext; -class QDeclarativeEngine; -class QDeclarativeContextPrivate; -class QDeclarativeExpression; -class QDeclarativeImportDatabase; +class QQmlContext; +class QQmlEngine; +class QQmlContextPrivate; +class QQmlExpression; +class QQmlImportDatabase; class QNetworkReply; class QNetworkAccessManager; -class QDeclarativeNetworkAccessManagerFactory; -class QDeclarativeAbstractBinding; -class QDeclarativeTypeNameCache; -class QDeclarativeComponentAttached; -class QDeclarativeCleanup; -class QDeclarativeDelayedError; -class QDeclarativeWorkerScriptEngine; -class QDeclarativeVME; +class QQmlNetworkAccessManagerFactory; +class QQmlAbstractBinding; +class QQmlTypeNameCache; +class QQmlComponentAttached; +class QQmlCleanup; +class QQmlDelayedError; +class QQuickWorkerScriptEngine; +class QQmlVME; class QDir; -class QDeclarativeIncubator; +class QQmlIncubator; -// This needs to be declared here so that the pool for it can live in QDeclarativeEnginePrivate. -// The inline method definitions are in qdeclarativeexpression_p.h -class QDeclarativeJavaScriptExpressionGuard : public QDeclarativeNotifierEndpoint +// This needs to be declared here so that the pool for it can live in QQmlEnginePrivate. +// The inline method definitions are in qqmlexpression_p.h +class QQmlJavaScriptExpressionGuard : public QQmlNotifierEndpoint { public: - inline QDeclarativeJavaScriptExpressionGuard(QDeclarativeJavaScriptExpression *); + inline QQmlJavaScriptExpressionGuard(QQmlJavaScriptExpression *); - static inline void endpointCallback(QDeclarativeNotifierEndpoint *); - static inline QDeclarativeJavaScriptExpressionGuard *New(QDeclarativeJavaScriptExpression *e, - QDeclarativeEngine *engine); + static inline void endpointCallback(QQmlNotifierEndpoint *); + static inline QQmlJavaScriptExpressionGuard *New(QQmlJavaScriptExpression *e, + QQmlEngine *engine); inline void Delete(); - QDeclarativeJavaScriptExpression *expression; - QDeclarativeJavaScriptExpressionGuard *next; + QQmlJavaScriptExpression *expression; + QQmlJavaScriptExpressionGuard *next; }; -class Q_DECLARATIVE_EXPORT QDeclarativeEnginePrivate : public QJSEnginePrivate +class Q_QML_EXPORT QQmlEnginePrivate : public QJSEnginePrivate { - Q_DECLARE_PUBLIC(QDeclarativeEngine) + Q_DECLARE_PUBLIC(QQmlEngine) public: - QDeclarativeEnginePrivate(QDeclarativeEngine *); - ~QDeclarativeEnginePrivate(); + QQmlEnginePrivate(QQmlEngine *); + ~QQmlEnginePrivate(); void init(); class PropertyCapture { public: inline virtual ~PropertyCapture() {} - virtual void captureProperty(QDeclarativeNotifier *) = 0; + virtual void captureProperty(QQmlNotifier *) = 0; virtual void captureProperty(QObject *, int, int) = 0; }; PropertyCapture *propertyCapture; - inline void captureProperty(QDeclarativeNotifier *); + inline void captureProperty(QQmlNotifier *); inline void captureProperty(QObject *, int, int); - QRecyclePool jsExpressionGuardPool; + QRecyclePool jsExpressionGuardPool; - QDeclarativeContext *rootContext; + QQmlContext *rootContext; bool isDebugging; bool outputWarningsToStdErr; - QDeclarativeContextData *sharedContext; + QQmlContextData *sharedContext; QObject *sharedScope; // Registered cleanup handlers - QDeclarativeCleanup *cleanup; + QQmlCleanup *cleanup; // Bindings that have had errors during startup - QDeclarativeDelayedError *erroredBindings; + QQmlDelayedError *erroredBindings; int inProgressCreations; QV8Engine *v8engine() const { return q_func()->handle(); } - QDeclarativeWorkerScriptEngine *getWorkerScriptEngine(); - QDeclarativeWorkerScriptEngine *workerScriptEngine; + QQuickWorkerScriptEngine *getWorkerScriptEngine(); + QQuickWorkerScriptEngine *workerScriptEngine; QUrl baseUrl; - typedef QPair,int> FinalizeCallback; + typedef QPair,int> FinalizeCallback; void registerFinalizeCallback(QObject *obj, int index); - QDeclarativeVME *activeVME; + QQmlVME *activeVME; QNetworkAccessManager *createNetworkAccessManager(QObject *parent) const; QNetworkAccessManager *getNetworkAccessManager() const; mutable QNetworkAccessManager *networkAccessManager; - mutable QDeclarativeNetworkAccessManagerFactory *networkAccessManagerFactory; + mutable QQmlNetworkAccessManagerFactory *networkAccessManagerFactory; - QHash > imageProviders; - QDeclarativeImageProvider::ImageType getImageProviderType(const QUrl &url); - QDeclarativeTextureFactory *getTextureFromProvider(const QUrl &url, QSize *size, const QSize& req_size); + QHash > imageProviders; + QQmlImageProvider::ImageType getImageProviderType(const QUrl &url); + QQuickTextureFactory *getTextureFromProvider(const QUrl &url, QSize *size, const QSize& req_size); QImage getImageFromProvider(const QUrl &url, QSize *size, const QSize& req_size); QPixmap getPixmapFromProvider(const QUrl &url, QSize *size, const QSize& req_size); @@ -196,8 +196,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativeEnginePrivate : public QJSEnginePrivate void referenceScarceResources(); void dereferenceScarceResources(); - QDeclarativeTypeLoader typeLoader; - QDeclarativeImportDatabase importDatabase; + QQmlTypeLoader typeLoader; + QQmlImportDatabase importDatabase; QString offlineStoragePath; @@ -206,10 +206,10 @@ class Q_DECLARATIVE_EXPORT QDeclarativeEnginePrivate : public QJSEnginePrivate return uniqueId++; } - QDeclarativeValueTypeFactory valueTypes; + QQmlValueTypeFactory valueTypes; // Unfortunate workaround to avoid a circular dependency between - // qdeclarativeengine_p.h and qdeclarativeincubator_p.h + // qqmlengine_p.h and qqmlincubator_p.h struct Incubator { QIntrusiveListNode next; // Unfortunate workaround for MSVC @@ -217,49 +217,49 @@ class Q_DECLARATIVE_EXPORT QDeclarativeEnginePrivate : public QJSEnginePrivate }; QIntrusiveList incubatorList; unsigned int incubatorCount; - QDeclarativeIncubationController *incubationController; - void incubate(QDeclarativeIncubator &, QDeclarativeContextData *); + QQmlIncubationController *incubationController; + void incubate(QQmlIncubator &, QQmlContextData *); // These methods may be called from any thread inline bool isEngineThread() const; - inline static bool isEngineThread(const QDeclarativeEngine *); + inline static bool isEngineThread(const QQmlEngine *); template inline void deleteInEngineThread(T *); template - inline static void deleteInEngineThread(QDeclarativeEngine *, T *); + inline static void deleteInEngineThread(QQmlEngine *, T *); // These methods may be called from the loader thread - QDeclarativeMetaType::ModuleApiInstance *moduleApiInstance(const QDeclarativeMetaType::ModuleApi &module); + QQmlMetaType::ModuleApiInstance *moduleApiInstance(const QQmlMetaType::ModuleApi &module); // These methods may be called from the loader thread - inline QDeclarativePropertyCache *cache(QObject *obj); - inline QDeclarativePropertyCache *cache(const QMetaObject *); - inline QDeclarativePropertyCache *cache(QDeclarativeType *, int, QDeclarativeError &error); + inline QQmlPropertyCache *cache(QObject *obj); + inline QQmlPropertyCache *cache(const QMetaObject *); + inline QQmlPropertyCache *cache(QQmlType *, int, QQmlError &error); // These methods may be called from the loader thread bool isQObject(int); QObject *toQObject(const QVariant &, bool *ok = 0) const; - QDeclarativeMetaType::TypeCategory typeCategory(int) const; + QQmlMetaType::TypeCategory typeCategory(int) const; bool isList(int) const; int listType(int) const; const QMetaObject *rawMetaObjectForType(int) const; const QMetaObject *metaObjectForType(int) const; - void registerCompositeType(QDeclarativeCompiledData *); + void registerCompositeType(QQmlCompiledData *); void sendQuit(); - void warning(const QDeclarativeError &); - void warning(const QList &); - static void warning(QDeclarativeEngine *, const QDeclarativeError &); - static void warning(QDeclarativeEngine *, const QList &); - static void warning(QDeclarativeEnginePrivate *, const QDeclarativeError &); - static void warning(QDeclarativeEnginePrivate *, const QList &); - - inline static QV8Engine *getV8Engine(QDeclarativeEngine *e); - inline static QDeclarativeEnginePrivate *get(QDeclarativeEngine *e); - inline static const QDeclarativeEnginePrivate *get(const QDeclarativeEngine *e); - inline static QDeclarativeEnginePrivate *get(QDeclarativeContext *c); - inline static QDeclarativeEnginePrivate *get(QDeclarativeContextData *c); - inline static QDeclarativeEngine *get(QDeclarativeEnginePrivate *p); + void warning(const QQmlError &); + void warning(const QList &); + static void warning(QQmlEngine *, const QQmlError &); + static void warning(QQmlEngine *, const QList &); + static void warning(QQmlEnginePrivate *, const QQmlError &); + static void warning(QQmlEnginePrivate *, const QList &); + + inline static QV8Engine *getV8Engine(QQmlEngine *e); + inline static QQmlEnginePrivate *get(QQmlEngine *e); + inline static const QQmlEnginePrivate *get(const QQmlEngine *e); + inline static QQmlEnginePrivate *get(QQmlContext *c); + inline static QQmlEnginePrivate *get(QQmlContextData *c); + inline static QQmlEngine *get(QQmlEnginePrivate *p); static QString urlToLocalFileOrQrc(const QUrl& url); static QString urlToLocalFileOrQrc(const QString& url); @@ -272,66 +272,66 @@ class Q_DECLARATIVE_EXPORT QDeclarativeEnginePrivate : public QJSEnginePrivate mutable QMutex mutex; private: - // Locker locks the QDeclarativeEnginePrivate data structures for read and write, if necessary. + // Locker locks the QQmlEnginePrivate data structures for read and write, if necessary. // Currently, locking is only necessary if the threaded loader is running concurrently. If it is // either idle, or is running with the main thread blocked, no locking is necessary. This way // we only pay for locking when we have to. // Consequently, this class should only be used to protect simple accesses or modifications of the - // QDeclarativeEnginePrivate structures or operations that can be guarenteed not to start activity + // QQmlEnginePrivate structures or operations that can be guarenteed not to start activity // on the loader thread. - // The Locker API is identical to QMutexLocker. Locker reuses the QDeclarativeEnginePrivate::mutex + // The Locker API is identical to QMutexLocker. Locker reuses the QQmlEnginePrivate::mutex // QMutex instance and multiple Lockers are recursive in the same thread. class Locker { public: - inline Locker(const QDeclarativeEngine *); - inline Locker(const QDeclarativeEnginePrivate *); + inline Locker(const QQmlEngine *); + inline Locker(const QQmlEnginePrivate *); inline ~Locker(); inline void unlock(); inline void relock(); private: - const QDeclarativeEnginePrivate *m_ep; + const QQmlEnginePrivate *m_ep; quint32 m_locked:1; }; // Must be called locked - QDeclarativePropertyCache *createCache(const QMetaObject *); - QDeclarativePropertyCache *createCache(QDeclarativeType *, int, QDeclarativeError &error); + QQmlPropertyCache *createCache(const QMetaObject *); + QQmlPropertyCache *createCache(QQmlType *, int, QQmlError &error); - // These members must be protected by a QDeclarativeEnginePrivate::Locker as they are required by + // These members must be protected by a QQmlEnginePrivate::Locker as they are required by // the threaded loader. Only access them through their respective accessor methods. - QHash moduleApiInstances; - QHash propertyCache; - QHash, QDeclarativePropertyCache *> typePropertyCache; + QHash moduleApiInstances; + QHash propertyCache; + QHash, QQmlPropertyCache *> typePropertyCache; QHash m_qmlLists; - QHash m_compositeTypes; + QHash m_compositeTypes; - // These members is protected by the full QDeclarativeEnginePrivate::mutex mutex + // These members is protected by the full QQmlEnginePrivate::mutex mutex struct Deletable { Deletable():next(0) {} virtual ~Deletable() {} Deletable *next; }; QFieldList toDeleteInEngineThread; void doDeleteInEngineThread(); }; -QDeclarativeEnginePrivate::Locker::Locker(const QDeclarativeEngine *e) -: m_ep(QDeclarativeEnginePrivate::get(e)) +QQmlEnginePrivate::Locker::Locker(const QQmlEngine *e) +: m_ep(QQmlEnginePrivate::get(e)) { relock(); } -QDeclarativeEnginePrivate::Locker::Locker(const QDeclarativeEnginePrivate *e) +QQmlEnginePrivate::Locker::Locker(const QQmlEnginePrivate *e) : m_ep(e), m_locked(false) { relock(); } -QDeclarativeEnginePrivate::Locker::~Locker() +QQmlEnginePrivate::Locker::~Locker() { unlock(); } -void QDeclarativeEnginePrivate::Locker::unlock() +void QQmlEnginePrivate::Locker::unlock() { if (m_locked) { m_ep->mutex.unlock(); @@ -339,7 +339,7 @@ void QDeclarativeEnginePrivate::Locker::unlock() } } -void QDeclarativeEnginePrivate::Locker::relock() +void QQmlEnginePrivate::Locker::relock() { Q_ASSERT(!m_locked); if (m_ep->typeLoader.isConcurrent()) { @@ -349,21 +349,21 @@ void QDeclarativeEnginePrivate::Locker::relock() } /*! -Returns true if the calling thread is the QDeclarativeEngine thread. +Returns true if the calling thread is the QQmlEngine thread. */ -bool QDeclarativeEnginePrivate::isEngineThread() const +bool QQmlEnginePrivate::isEngineThread() const { - Q_Q(const QDeclarativeEngine); + Q_Q(const QQmlEngine); return QThread::currentThread() == q->thread(); } /*! -Returns true if the calling thread is the QDeclarativeEngine \a engine thread. +Returns true if the calling thread is the QQmlEngine \a engine thread. */ -bool QDeclarativeEnginePrivate::isEngineThread(const QDeclarativeEngine *engine) +bool QQmlEnginePrivate::isEngineThread(const QQmlEngine *engine) { Q_ASSERT(engine); - return QDeclarativeEnginePrivate::get(engine)->isEngineThread(); + return QQmlEnginePrivate::get(engine)->isEngineThread(); } /*! @@ -377,9 +377,9 @@ practice to check if any V8 handles actually need to be freed and delete the instance directly if not. */ template -void QDeclarativeEnginePrivate::deleteInEngineThread(T *value) +void QQmlEnginePrivate::deleteInEngineThread(T *value) { - Q_Q(QDeclarativeEngine); + Q_Q(QQmlEngine); Q_ASSERT(value); if (isEngineThread()) { @@ -405,14 +405,14 @@ Delete \a value in the \a engine thread. If the calling thread is the engine thread, \a value will be deleted immediately. */ template -void QDeclarativeEnginePrivate::deleteInEngineThread(QDeclarativeEngine *engine, T *value) +void QQmlEnginePrivate::deleteInEngineThread(QQmlEngine *engine, T *value) { Q_ASSERT(engine); - QDeclarativeEnginePrivate::get(engine)->deleteInEngineThread(value); + QQmlEnginePrivate::get(engine)->deleteInEngineThread(value); } /*! -Returns a QDeclarativePropertyCache for \a obj if one is available. +Returns a QQmlPropertyCache for \a obj if one is available. If \a obj is null, being deleted or contains a dynamic meta object 0 is returned. @@ -420,49 +420,49 @@ is returned. The returned cache is not referenced, so if it is to be stored, call addref(). XXX thread There is a potential future race condition in this and all the cache() -functions. As the QDeclarativePropertyCache is returned unreferenced, when called +functions. As the QQmlPropertyCache is returned unreferenced, when called from the loader thread, it is possible that the cache will have been dereferenced and deleted before the loader thread has a chance to use or reference it. This can't currently happen as the cache holds a reference to the -QDeclarativePropertyCache until the QDeclarativeEngine is destroyed. +QQmlPropertyCache until the QQmlEngine is destroyed. */ -QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(QObject *obj) +QQmlPropertyCache *QQmlEnginePrivate::cache(QObject *obj) { if (!obj || QObjectPrivate::get(obj)->metaObject || QObjectPrivate::get(obj)->wasDeleted) return 0; Locker locker(this); const QMetaObject *mo = obj->metaObject(); - QDeclarativePropertyCache *rv = propertyCache.value(mo); + QQmlPropertyCache *rv = propertyCache.value(mo); if (!rv) rv = createCache(mo); return rv; } /*! -Returns a QDeclarativePropertyCache for \a metaObject. +Returns a QQmlPropertyCache for \a metaObject. As the cache is persisted for the life of the engine, \a metaObject must be a static "compile time" meta-object, or a meta-object that is otherwise known to -exist for the lifetime of the QDeclarativeEngine. +exist for the lifetime of the QQmlEngine. The returned cache is not referenced, so if it is to be stored, call addref(). */ -QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(const QMetaObject *metaObject) +QQmlPropertyCache *QQmlEnginePrivate::cache(const QMetaObject *metaObject) { Q_ASSERT(metaObject); Locker locker(this); - QDeclarativePropertyCache *rv = propertyCache.value(metaObject); + QQmlPropertyCache *rv = propertyCache.value(metaObject); if (!rv) rv = createCache(metaObject); return rv; } /*! -Returns a QDeclarativePropertyCache for \a type with \a minorVersion. +Returns a QQmlPropertyCache for \a type with \a minorVersion. The returned cache is not referenced, so if it is to be stored, call addref(). */ -QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(QDeclarativeType *type, int minorVersion, QDeclarativeError &error) +QQmlPropertyCache *QQmlEnginePrivate::cache(QQmlType *type, int minorVersion, QQmlError &error) { Q_ASSERT(type); @@ -470,48 +470,48 @@ QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(QDeclarativeType *ty return cache(type->metaObject()); Locker locker(this); - QDeclarativePropertyCache *rv = typePropertyCache.value(qMakePair(type, minorVersion)); + QQmlPropertyCache *rv = typePropertyCache.value(qMakePair(type, minorVersion)); if (!rv) rv = createCache(type, minorVersion, error); return rv; } -QV8Engine *QDeclarativeEnginePrivate::getV8Engine(QDeclarativeEngine *e) +QV8Engine *QQmlEnginePrivate::getV8Engine(QQmlEngine *e) { return e->d_func()->v8engine(); } -QDeclarativeEnginePrivate *QDeclarativeEnginePrivate::get(QDeclarativeEngine *e) +QQmlEnginePrivate *QQmlEnginePrivate::get(QQmlEngine *e) { return e->d_func(); } -const QDeclarativeEnginePrivate *QDeclarativeEnginePrivate::get(const QDeclarativeEngine *e) +const QQmlEnginePrivate *QQmlEnginePrivate::get(const QQmlEngine *e) { return e->d_func(); } -QDeclarativeEnginePrivate *QDeclarativeEnginePrivate::get(QDeclarativeContext *c) +QQmlEnginePrivate *QQmlEnginePrivate::get(QQmlContext *c) { - return (c && c->engine()) ? QDeclarativeEnginePrivate::get(c->engine()) : 0; + return (c && c->engine()) ? QQmlEnginePrivate::get(c->engine()) : 0; } -QDeclarativeEnginePrivate *QDeclarativeEnginePrivate::get(QDeclarativeContextData *c) +QQmlEnginePrivate *QQmlEnginePrivate::get(QQmlContextData *c) { - return (c && c->engine) ? QDeclarativeEnginePrivate::get(c->engine) : 0; + return (c && c->engine) ? QQmlEnginePrivate::get(c->engine) : 0; } -QDeclarativeEngine *QDeclarativeEnginePrivate::get(QDeclarativeEnginePrivate *p) +QQmlEngine *QQmlEnginePrivate::get(QQmlEnginePrivate *p) { return p->q_func(); } -void QDeclarativeEnginePrivate::captureProperty(QDeclarativeNotifier *n) +void QQmlEnginePrivate::captureProperty(QQmlNotifier *n) { if (propertyCapture) propertyCapture->captureProperty(n); } -void QDeclarativeEnginePrivate::captureProperty(QObject *o, int c, int n) +void QQmlEnginePrivate::captureProperty(QObject *o, int c, int n) { if (propertyCapture) propertyCapture->captureProperty(o, c, n); @@ -519,4 +519,4 @@ void QDeclarativeEnginePrivate::captureProperty(QObject *o, int c, int n) QT_END_NAMESPACE -#endif // QDECLARATIVEENGINE_P_H +#endif // QQMLENGINE_P_H diff --git a/src/declarative/qml/qdeclarativeerror.cpp b/src/qml/qml/qqmlerror.cpp similarity index 79% rename from src/declarative/qml/qdeclarativeerror.cpp rename to src/qml/qml/qqmlerror.cpp index 4f4d3cf7aa..79424913f8 100644 --- a/src/declarative/qml/qdeclarativeerror.cpp +++ b/src/qml/qml/qqmlerror.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativeerror.h" +#include "qqmlerror.h" #include #include @@ -48,11 +48,11 @@ QT_BEGIN_NAMESPACE /*! - \class QDeclarativeError + \class QQmlError \since 4.7 - \brief The QDeclarativeError class encapsulates a QML error. + \brief The QQmlError class encapsulates a QML error. - QDeclarativeError includes a textual description of the error, as well + QQmlError 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: @@ -69,12 +69,12 @@ QT_BEGIN_NAMESPACE ^ \endcode - \sa QDeclarativeView::errors(), QDeclarativeComponent::errors() + \sa QQuickView::errors(), QQmlComponent::errors() */ -class QDeclarativeErrorPrivate +class QQmlErrorPrivate { public: - QDeclarativeErrorPrivate(); + QQmlErrorPrivate(); QUrl url; QString description; @@ -82,7 +82,7 @@ class QDeclarativeErrorPrivate int column; }; -QDeclarativeErrorPrivate::QDeclarativeErrorPrivate() +QQmlErrorPrivate::QQmlErrorPrivate() : line(-1), column(-1) { } @@ -90,7 +90,7 @@ QDeclarativeErrorPrivate::QDeclarativeErrorPrivate() /*! Creates an empty error object. */ -QDeclarativeError::QDeclarativeError() +QQmlError::QQmlError() : d(0) { } @@ -98,7 +98,7 @@ QDeclarativeError::QDeclarativeError() /*! Creates a copy of \a other. */ -QDeclarativeError::QDeclarativeError(const QDeclarativeError &other) +QQmlError::QQmlError(const QQmlError &other) : d(0) { *this = other; @@ -107,13 +107,13 @@ QDeclarativeError::QDeclarativeError(const QDeclarativeError &other) /*! Assigns \a other to this error object. */ -QDeclarativeError &QDeclarativeError::operator=(const QDeclarativeError &other) +QQmlError &QQmlError::operator=(const QQmlError &other) { if (!other.d) { delete d; d = 0; } else { - if (!d) d = new QDeclarativeErrorPrivate; + if (!d) d = new QQmlErrorPrivate; d->url = other.d->url; d->description = other.d->description; d->line = other.d->line; @@ -125,7 +125,7 @@ QDeclarativeError &QDeclarativeError::operator=(const QDeclarativeError &other) /*! \internal */ -QDeclarativeError::~QDeclarativeError() +QQmlError::~QQmlError() { delete d; d = 0; } @@ -133,7 +133,7 @@ QDeclarativeError::~QDeclarativeError() /*! Returns true if this error is valid, otherwise false. */ -bool QDeclarativeError::isValid() const +bool QQmlError::isValid() const { return d != 0; } @@ -141,7 +141,7 @@ bool QDeclarativeError::isValid() const /*! Returns the url for the file that caused this error. */ -QUrl QDeclarativeError::url() const +QUrl QQmlError::url() const { if (d) return d->url; else return QUrl(); @@ -150,16 +150,16 @@ QUrl QDeclarativeError::url() const /*! Sets the \a url for the file that caused this error. */ -void QDeclarativeError::setUrl(const QUrl &url) +void QQmlError::setUrl(const QUrl &url) { - if (!d) d = new QDeclarativeErrorPrivate; + if (!d) d = new QQmlErrorPrivate; d->url = url; } /*! Returns the error description. */ -QString QDeclarativeError::description() const +QString QQmlError::description() const { if (d) return d->description; else return QString(); @@ -168,16 +168,16 @@ QString QDeclarativeError::description() const /*! Sets the error \a description. */ -void QDeclarativeError::setDescription(const QString &description) +void QQmlError::setDescription(const QString &description) { - if (!d) d = new QDeclarativeErrorPrivate; + if (!d) d = new QQmlErrorPrivate; d->description = description; } /*! Returns the error line number. */ -int QDeclarativeError::line() const +int QQmlError::line() const { if (d) return d->line; else return -1; @@ -186,16 +186,16 @@ int QDeclarativeError::line() const /*! Sets the error \a line number. */ -void QDeclarativeError::setLine(int line) +void QQmlError::setLine(int line) { - if (!d) d = new QDeclarativeErrorPrivate; + if (!d) d = new QQmlErrorPrivate; d->line = line; } /*! Returns the error column number. */ -int QDeclarativeError::column() const +int QQmlError::column() const { if (d) return d->column; else return -1; @@ -204,16 +204,16 @@ int QDeclarativeError::column() const /*! Sets the error \a column number. */ -void QDeclarativeError::setColumn(int column) +void QQmlError::setColumn(int column) { - if (!d) d = new QDeclarativeErrorPrivate; + if (!d) d = new QQmlErrorPrivate; d->column = column; } /*! Returns the error as a human readable string. */ -QString QDeclarativeError::toString() const +QString QQmlError::toString() const { QString rv; if (url().isEmpty()) { @@ -232,13 +232,13 @@ QString QDeclarativeError::toString() const } /*! - \relates QDeclarativeError - \fn QDebug operator<<(QDebug debug, const QDeclarativeError &error) + \relates QQmlError + \fn QDebug operator<<(QDebug debug, const QQmlError &error) Outputs a human readable version of \a error to \a debug. */ -QDebug operator<<(QDebug debug, const QDeclarativeError &error) +QDebug operator<<(QDebug debug, const QQmlError &error) { debug << qPrintable(error.toString()); diff --git a/src/declarative/qml/qdeclarativeerror.h b/src/qml/qml/qqmlerror.h similarity index 80% rename from src/declarative/qml/qdeclarativeerror.h rename to src/qml/qml/qqmlerror.h index be22768a32..3c148549d0 100644 --- a/src/declarative/qml/qdeclarativeerror.h +++ b/src/qml/qml/qqmlerror.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEERROR_H -#define QDECLARATIVEERROR_H +#ifndef QQMLERROR_H +#define QQMLERROR_H + +#include #include #include @@ -51,14 +53,14 @@ QT_BEGIN_NAMESPACE class QDebug; -class QDeclarativeErrorPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeError +class QQmlErrorPrivate; +class Q_QML_EXPORT QQmlError { public: - QDeclarativeError(); - QDeclarativeError(const QDeclarativeError &); - QDeclarativeError &operator=(const QDeclarativeError &); - ~QDeclarativeError(); + QQmlError(); + QQmlError(const QQmlError &); + QQmlError &operator=(const QQmlError &); + ~QQmlError(); bool isValid() const; @@ -73,13 +75,13 @@ class Q_DECLARATIVE_EXPORT QDeclarativeError QString toString() const; private: - QDeclarativeErrorPrivate *d; + QQmlErrorPrivate *d; }; -QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, const QDeclarativeError &error); +QDebug Q_QML_EXPORT operator<<(QDebug debug, const QQmlError &error); QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEERROR_H +#endif // QQMLERROR_H diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/qml/qml/qqmlexpression.cpp similarity index 66% rename from src/declarative/qml/qdeclarativeexpression.cpp rename to src/qml/qml/qqmlexpression.cpp index 1a4c486931..3fbb80c280 100644 --- a/src/declarative/qml/qdeclarativeexpression.cpp +++ b/src/qml/qml/qqmlexpression.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,20 +39,20 @@ ** ****************************************************************************/ -#include "qdeclarativeexpression.h" -#include "qdeclarativeexpression_p.h" +#include "qqmlexpression.h" +#include "qqmlexpression_p.h" -#include "qdeclarativeengine_p.h" -#include "qdeclarativecontext_p.h" -#include "qdeclarativerewrite_p.h" -#include "qdeclarativescriptstring_p.h" -#include "qdeclarativecompiler_p.h" +#include "qqmlengine_p.h" +#include "qqmlcontext_p.h" +#include "qqmlrewrite_p.h" +#include "qqmlscriptstring_p.h" +#include "qqmlcompiler_p.h" #include QT_BEGIN_NAMESPACE -bool QDeclarativeDelayedError::addError(QDeclarativeEnginePrivate *e) +bool QQmlDelayedError::addError(QQmlEnginePrivate *e) { if (!e) return false; @@ -68,29 +68,29 @@ bool QDeclarativeDelayedError::addError(QDeclarativeEnginePrivate *e) return true; } -QDeclarativeJavaScriptExpression::QDeclarativeJavaScriptExpression(VTable *v) +QQmlJavaScriptExpression::QQmlJavaScriptExpression(VTable *v) : m_vtable(v) { } -QDeclarativeJavaScriptExpression::~QDeclarativeJavaScriptExpression() +QQmlJavaScriptExpression::~QQmlJavaScriptExpression() { clearGuards(); } -static QDeclarativeJavaScriptExpression::VTable QDeclarativeExpressionPrivate_jsvtable = { - QDeclarativeExpressionPrivate::expressionIdentifier, - QDeclarativeExpressionPrivate::expressionChanged +static QQmlJavaScriptExpression::VTable QDeclarativeExpressionPrivate_jsvtable = { + QQmlExpressionPrivate::expressionIdentifier, + QQmlExpressionPrivate::expressionChanged }; -QDeclarativeExpressionPrivate::QDeclarativeExpressionPrivate() -: QDeclarativeJavaScriptExpression(&QDeclarativeExpressionPrivate_jsvtable), +QQmlExpressionPrivate::QQmlExpressionPrivate() +: QQmlJavaScriptExpression(&QDeclarativeExpressionPrivate_jsvtable), expressionFunctionValid(true), expressionFunctionRewritten(false), extractExpressionFromFunction(false), line(-1), dataRef(0) { } -QDeclarativeExpressionPrivate::~QDeclarativeExpressionPrivate() +QQmlExpressionPrivate::~QQmlExpressionPrivate() { qPersistentDispose(v8qmlscope); qPersistentDispose(v8function); @@ -98,21 +98,21 @@ QDeclarativeExpressionPrivate::~QDeclarativeExpressionPrivate() dataRef = 0; } -void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, const QString &expr, +void QQmlExpressionPrivate::init(QQmlContextData *ctxt, const QString &expr, QObject *me) { expression = expr; - QDeclarativeAbstractExpression::setContext(ctxt); + QQmlAbstractExpression::setContext(ctxt); setScopeObject(me); expressionFunctionValid = false; expressionFunctionRewritten = false; } -void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, v8::Handle func, +void QQmlExpressionPrivate::init(QQmlContextData *ctxt, v8::Handle func, QObject *me) { - QDeclarativeAbstractExpression::setContext(ctxt); + QQmlAbstractExpression::setContext(ctxt); setScopeObject(me); v8function = qPersistentNew(func); @@ -122,7 +122,7 @@ void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, v8::Hand extractExpressionFromFunction = true; } -void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, const QString &expr, +void QQmlExpressionPrivate::init(QQmlContextData *ctxt, const QString &expr, bool isRewritten, QObject *me, const QString &srcUrl, int lineNumber, int columnNumber) { @@ -135,11 +135,11 @@ void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, const QS expressionFunctionValid = false; expressionFunctionRewritten = isRewritten; - QDeclarativeAbstractExpression::setContext(ctxt); + QQmlAbstractExpression::setContext(ctxt); setScopeObject(me); } -void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, const QByteArray &expr, +void QQmlExpressionPrivate::init(QQmlContextData *ctxt, const QByteArray &expr, bool isRewritten, QObject *me, const QString &srcUrl, int lineNumber, int columnNumber) { @@ -162,19 +162,19 @@ void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, const QB expressionFunctionRewritten = isRewritten; } - QDeclarativeAbstractExpression::setContext(ctxt); + QQmlAbstractExpression::setContext(ctxt); setScopeObject(me); } // Callee owns the persistent handle v8::Persistent -QDeclarativeExpressionPrivate::evalFunction(QDeclarativeContextData *ctxt, QObject *scope, +QQmlExpressionPrivate::evalFunction(QQmlContextData *ctxt, QObject *scope, const char *code, int codeLength, const QString &filename, int line, v8::Persistent *qmlscope) { - QDeclarativeEngine *engine = ctxt->engine; - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + QQmlEngine *engine = ctxt->engine; + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); v8::HandleScope handle_scope; v8::Context::Scope ctxtscope(ep->v8engine()->context()); @@ -183,25 +183,25 @@ QDeclarativeExpressionPrivate::evalFunction(QDeclarativeContextData *ctxt, QObje v8::Local scopeobject = ep->v8engine()->qmlScope(ctxt, scope); v8::Local script = ep->v8engine()->qmlModeCompile(code, codeLength, filename, line); if (tc.HasCaught()) { - QDeclarativeError error; + QQmlError error; error.setDescription(QLatin1String("Exception occurred during function compilation")); error.setLine(line); error.setUrl(QUrl::fromLocalFile(filename)); v8::Local message = tc.Message(); if (!message.IsEmpty()) - QDeclarativeExpressionPrivate::exceptionToError(message, error); + QQmlExpressionPrivate::exceptionToError(message, error); ep->warning(error); return v8::Persistent(); } v8::Local result = script->Run(scopeobject); if (tc.HasCaught()) { - QDeclarativeError error; + QQmlError error; error.setDescription(QLatin1String("Exception occurred during function evaluation")); error.setLine(line); error.setUrl(QUrl::fromLocalFile(filename)); v8::Local message = tc.Message(); if (!message.IsEmpty()) - QDeclarativeExpressionPrivate::exceptionToError(message, error); + QQmlExpressionPrivate::exceptionToError(message, error); ep->warning(error); return v8::Persistent(); } @@ -211,12 +211,12 @@ QDeclarativeExpressionPrivate::evalFunction(QDeclarativeContextData *ctxt, QObje // Callee owns the persistent handle v8::Persistent -QDeclarativeExpressionPrivate::evalFunction(QDeclarativeContextData *ctxt, QObject *scope, +QQmlExpressionPrivate::evalFunction(QQmlContextData *ctxt, QObject *scope, const QString &code, const QString &filename, int line, v8::Persistent *qmlscope) { - QDeclarativeEngine *engine = ctxt->engine; - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + QQmlEngine *engine = ctxt->engine; + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); v8::HandleScope handle_scope; v8::Context::Scope ctxtscope(ep->v8engine()->context()); @@ -225,25 +225,25 @@ QDeclarativeExpressionPrivate::evalFunction(QDeclarativeContextData *ctxt, QObje v8::Local scopeobject = ep->v8engine()->qmlScope(ctxt, scope); v8::Local script = ep->v8engine()->qmlModeCompile(code, filename, line); if (tc.HasCaught()) { - QDeclarativeError error; + QQmlError error; error.setDescription(QLatin1String("Exception occurred during function compilation")); error.setLine(line); error.setUrl(QUrl::fromLocalFile(filename)); v8::Local message = tc.Message(); if (!message.IsEmpty()) - QDeclarativeExpressionPrivate::exceptionToError(message, error); + QQmlExpressionPrivate::exceptionToError(message, error); ep->warning(error); return v8::Persistent(); } v8::Local result = script->Run(scopeobject); if (tc.HasCaught()) { - QDeclarativeError error; + QQmlError error; error.setDescription(QLatin1String("Exception occurred during function evaluation")); error.setLine(line); error.setUrl(QUrl::fromLocalFile(filename)); v8::Local message = tc.Message(); if (!message.IsEmpty()) - QDeclarativeExpressionPrivate::exceptionToError(message, error); + QQmlExpressionPrivate::exceptionToError(message, error); ep->warning(error); return v8::Persistent(); } @@ -251,18 +251,18 @@ QDeclarativeExpressionPrivate::evalFunction(QDeclarativeContextData *ctxt, QObje return qPersistentNew(v8::Local::Cast(result)); } -QDeclarativeExpression * -QDeclarativeExpressionPrivate::create(QDeclarativeContextData *ctxt, QObject *object, +QQmlExpression * +QQmlExpressionPrivate::create(QQmlContextData *ctxt, QObject *object, const QString &expr, bool isRewritten, const QString &url, int lineNumber, int columnNumber) { - return new QDeclarativeExpression(ctxt, object, expr, isRewritten, url, lineNumber, columnNumber, *new QDeclarativeExpressionPrivate); + return new QQmlExpression(ctxt, object, expr, isRewritten, url, lineNumber, columnNumber, *new QQmlExpressionPrivate); } /*! - \class QDeclarativeExpression + \class QQmlExpression \since 4.7 - \brief The QDeclarativeExpression class evaluates JavaScript in a QML context. + \brief The QQmlExpression class evaluates JavaScript in a QML context. For example, given a file \c main.qml like this: @@ -278,51 +278,51 @@ QDeclarativeExpressionPrivate::create(QDeclarativeContextData *ctxt, QObject *ob above QML: \code - QDeclarativeEngine *engine = new QDeclarativeEngine; - QDeclarativeComponent component(engine, QUrl::fromLocalFile("main.qml")); + QQmlEngine *engine = new QQmlEngine; + QQmlComponent component(engine, QUrl::fromLocalFile("main.qml")); QObject *myObject = component.create(); - QDeclarativeExpression *expr = new QDeclarativeExpression(engine->rootContext(), myObject, "width * 2"); + QQmlExpression *expr = new QQmlExpression(engine->rootContext(), myObject, "width * 2"); int result = expr->evaluate().toInt(); // result = 400 \endcode */ /*! - Create an invalid QDeclarativeExpression. + Create an invalid QQmlExpression. - As the expression will not have an associated QDeclarativeContext, this will be a + As the expression will not have an associated QQmlContext, this will be a null expression object and its value will always be an invalid QVariant. */ -QDeclarativeExpression::QDeclarativeExpression() -: QObject(*new QDeclarativeExpressionPrivate, 0) +QQmlExpression::QQmlExpression() +: QObject(*new QQmlExpressionPrivate, 0) { } /*! \internal */ -QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, +QQmlExpression::QQmlExpression(QQmlContextData *ctxt, QObject *object, const QString &expr, bool isRewritten, const QString &url, int lineNumber, int columnNumber, - QDeclarativeExpressionPrivate &dd) + QQmlExpressionPrivate &dd) : QObject(dd, 0) { - Q_D(QDeclarativeExpression); + Q_D(QQmlExpression); d->init(ctxt, expr, isRewritten, object, url, lineNumber, columnNumber); } /*! \internal */ -QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, +QQmlExpression::QQmlExpression(QQmlContextData *ctxt, QObject *object, const QByteArray &expr, bool isRewritten, const QString &url, int lineNumber, int columnNumber, - QDeclarativeExpressionPrivate &dd) + QQmlExpressionPrivate &dd) : QObject(dd, 0) { - Q_D(QDeclarativeExpression); + Q_D(QQmlExpression); d->init(ctxt, expr, isRewritten, object, url, lineNumber, columnNumber); } /*! - Create a QDeclarativeExpression object that is a child of \a parent. + Create a QQmlExpression object that is a child of \a parent. The \script provides the expression to be evaluated, the context to evaluate it in, and the scope object to evaluate it with. @@ -330,26 +330,26 @@ QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, This constructor is functionally equivalent to the following, but in most cases is more efficient. \code - QDeclarativeExpression expression(script.context(), script.scopeObject(), script.script(), parent); + QQmlExpression expression(script.context(), script.scopeObject(), script.script(), parent); \endcode - \sa QDeclarativeScriptString + \sa QQmlScriptString */ -QDeclarativeExpression::QDeclarativeExpression(const QDeclarativeScriptString &script, QObject *parent) -: QObject(*new QDeclarativeExpressionPrivate, parent) +QQmlExpression::QQmlExpression(const QQmlScriptString &script, QObject *parent) +: QObject(*new QQmlExpressionPrivate, parent) { - Q_D(QDeclarativeExpression); + Q_D(QQmlExpression); bool defaultConstruction = false; int id = script.d.data()->bindingId; if (id < 0) { defaultConstruction = true; } else { - QDeclarativeContextData *ctxtdata = QDeclarativeContextData::get(script.context()); + QQmlContextData *ctxtdata = QQmlContextData::get(script.context()); - QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(script.context()->engine()); - QDeclarativeCompiledData *cdata = 0; - QDeclarativeTypeData *typeData = 0; + QQmlEnginePrivate *engine = QQmlEnginePrivate::get(script.context()->engine()); + QQmlCompiledData *cdata = 0; + QQmlTypeData *typeData = 0; if (engine && ctxtdata && !ctxtdata->url.isEmpty()) { typeData = engine->typeLoader.get(ctxtdata->url); cdata = typeData->compiledData(); @@ -368,43 +368,43 @@ QDeclarativeExpression::QDeclarativeExpression(const QDeclarativeScriptString &s } if (defaultConstruction) - d->init(QDeclarativeContextData::get(script.context()), script.script(), script.scopeObject()); + d->init(QQmlContextData::get(script.context()), script.script(), script.scopeObject()); } /*! - Create a QDeclarativeExpression object that is a child of \a parent. + Create a QQmlExpression object that is a child of \a parent. - The \a expression JavaScript will be executed in the \a ctxt QDeclarativeContext. + The \a expression JavaScript will be executed in the \a ctxt QQmlContext. If specified, the \a scope object's properties will also be in scope during the expression's execution. */ -QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContext *ctxt, +QQmlExpression::QQmlExpression(QQmlContext *ctxt, QObject *scope, const QString &expression, QObject *parent) -: QObject(*new QDeclarativeExpressionPrivate, parent) +: QObject(*new QQmlExpressionPrivate, parent) { - Q_D(QDeclarativeExpression); - d->init(QDeclarativeContextData::get(ctxt), expression, scope); + Q_D(QQmlExpression); + d->init(QQmlContextData::get(ctxt), expression, scope); } /*! \internal */ -QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, QObject *scope, +QQmlExpression::QQmlExpression(QQmlContextData *ctxt, QObject *scope, const QString &expression) -: QObject(*new QDeclarativeExpressionPrivate, 0) +: QObject(*new QQmlExpressionPrivate, 0) { - Q_D(QDeclarativeExpression); + Q_D(QQmlExpression); d->init(ctxt, expression, scope); } /*! \internal */ -QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, QObject *scope, - const QString &expression, QDeclarativeExpressionPrivate &dd) +QQmlExpression::QQmlExpression(QQmlContextData *ctxt, QObject *scope, + const QString &expression, QQmlExpressionPrivate &dd) : QObject(dd, 0) { - Q_D(QDeclarativeExpression); + Q_D(QQmlExpression); d->init(ctxt, expression, scope); } @@ -414,54 +414,54 @@ QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, QO To avoid exposing v8 in the public API, functionPtr must be a pointer to a v8::Handle. For example: v8::Handle function; - new QDeclarativeExpression(ctxt, scope, &function, ...); + new QQmlExpression(ctxt, scope, &function, ...); */ -QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, QObject *scope, void *functionPtr, - QDeclarativeExpressionPrivate &dd) +QQmlExpression::QQmlExpression(QQmlContextData *ctxt, QObject *scope, void *functionPtr, + QQmlExpressionPrivate &dd) : QObject(dd, 0) { v8::Handle function = *(v8::Handle *)functionPtr; - Q_D(QDeclarativeExpression); + Q_D(QQmlExpression); d->init(ctxt, function, scope); } /*! - Destroy the QDeclarativeExpression instance. + Destroy the QQmlExpression instance. */ -QDeclarativeExpression::~QDeclarativeExpression() +QQmlExpression::~QQmlExpression() { } /*! - Returns the QDeclarativeEngine this expression is associated with, or 0 if there - is no association or the QDeclarativeEngine has been destroyed. + Returns the QQmlEngine this expression is associated with, or 0 if there + is no association or the QQmlEngine has been destroyed. */ -QDeclarativeEngine *QDeclarativeExpression::engine() const +QQmlEngine *QQmlExpression::engine() const { - Q_D(const QDeclarativeExpression); + Q_D(const QQmlExpression); return d->context()?d->context()->engine:0; } /*! - Returns the QDeclarativeContext this expression is associated with, or 0 if there - is no association or the QDeclarativeContext has been destroyed. + Returns the QQmlContext this expression is associated with, or 0 if there + is no association or the QQmlContext has been destroyed. */ -QDeclarativeContext *QDeclarativeExpression::context() const +QQmlContext *QQmlExpression::context() const { - Q_D(const QDeclarativeExpression); - QDeclarativeContextData *data = d->context(); - return data?data->asQDeclarativeContext():0; + Q_D(const QQmlExpression); + QQmlContextData *data = d->context(); + return data?data->asQQmlContext():0; } /*! Returns the expression string. */ -QString QDeclarativeExpression::expression() const +QString QQmlExpression::expression() const { - Q_D(const QDeclarativeExpression); + Q_D(const QQmlExpression); if (d->extractExpressionFromFunction && context()->engine()) { - QV8Engine *v8engine = QDeclarativeEnginePrivate::getV8Engine(context()->engine()); + QV8Engine *v8engine = QQmlEnginePrivate::getV8Engine(context()->engine()); v8::HandleScope handle_scope; v8::Context::Scope scope(v8engine->context()); @@ -476,9 +476,9 @@ QString QDeclarativeExpression::expression() const /*! Set the expression to \a expression. */ -void QDeclarativeExpression::setExpression(const QString &expression) +void QQmlExpression::setExpression(const QString &expression) { - Q_D(QDeclarativeExpression); + Q_D(QQmlExpression); d->resetNotifyOnValueChanged(); d->expression = expression; @@ -489,8 +489,8 @@ void QDeclarativeExpression::setExpression(const QString &expression) qPersistentDispose(d->v8qmlscope); } -void QDeclarativeExpressionPrivate::exceptionToError(v8::Handle message, - QDeclarativeError &error) +void QQmlExpressionPrivate::exceptionToError(v8::Handle message, + QQmlError &error) { Q_ASSERT(!message.IsEmpty()); @@ -514,19 +514,19 @@ void QDeclarativeExpressionPrivate::exceptionToError(v8::Handle mes error.setDescription(qDescription); } -void QDeclarativeJavaScriptExpression::setNotifyOnValueChanged(bool v) +void QQmlJavaScriptExpression::setNotifyOnValueChanged(bool v) { activeGuards.setFlagValue(v); if (!v) clearGuards(); } -void QDeclarativeJavaScriptExpression::resetNotifyOnValueChanged() +void QQmlJavaScriptExpression::resetNotifyOnValueChanged() { clearGuards(); } v8::Local -QDeclarativeJavaScriptExpression::evaluate(QDeclarativeContextData *context, +QQmlJavaScriptExpression::evaluate(QQmlContextData *context, v8::Handle function, bool *isUndefined) { Q_ASSERT(context && context->engine); @@ -536,19 +536,19 @@ QDeclarativeJavaScriptExpression::evaluate(QDeclarativeContextData *context, return v8::Local(); } - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context->engine); Q_ASSERT(notifyOnValueChanged() || activeGuards.isEmpty()); GuardCapture capture(context->engine, this); - QDeclarativeEnginePrivate::PropertyCapture *lastPropertyCapture = ep->propertyCapture; + QQmlEnginePrivate::PropertyCapture *lastPropertyCapture = ep->propertyCapture; ep->propertyCapture = notifyOnValueChanged()?&capture:0; if (notifyOnValueChanged()) capture.guards.copyAndClearPrepend(activeGuards); - QDeclarativeContextData *lastSharedContext = 0; + QQmlContextData *lastSharedContext = 0; QObject *lastSharedScope = 0; bool sharedContext = useSharedContext(); @@ -583,12 +583,12 @@ QDeclarativeJavaScriptExpression::evaluate(QDeclarativeContextData *context, v8::Context::Scope scope(ep->v8engine()->context()); v8::Local message = try_catch.Message(); if (!message.IsEmpty()) { - QDeclarativeExpressionPrivate::exceptionToError(message, delayedError()->error); + QQmlExpressionPrivate::exceptionToError(message, delayedError()->error); } else { - if (hasDelayedError()) delayedError()->error = QDeclarativeError(); + if (hasDelayedError()) delayedError()->error = QQmlError(); } } else { - if (hasDelayedError()) delayedError()->error = QDeclarativeError(); + if (hasDelayedError()) delayedError()->error = QQmlError(); } } @@ -612,7 +612,7 @@ QDeclarativeJavaScriptExpression::evaluate(QDeclarativeContextData *context, return result; } -void QDeclarativeJavaScriptExpression::GuardCapture::captureProperty(QDeclarativeNotifier *n) +void QQmlJavaScriptExpression::GuardCapture::captureProperty(QQmlNotifier *n) { if (expression) { @@ -634,13 +634,13 @@ void QDeclarativeJavaScriptExpression::GuardCapture::captureProperty(QDeclarativ } } -void QDeclarativeJavaScriptExpression::GuardCapture::captureProperty(QObject *o, int c, int n) +void QQmlJavaScriptExpression::GuardCapture::captureProperty(QObject *o, int c, int n) { if (expression) { if (n == -1) { if (!errorString) { errorString = new QStringList; - QString preamble = QLatin1String("QDeclarativeExpression: Expression ") + + QString preamble = QLatin1String("QQmlExpression: Expression ") + expression->m_vtable->expressionIdentifier(expression) + QLatin1String(" depends on non-NOTIFYable properties:"); errorString->append(preamble); @@ -675,38 +675,38 @@ void QDeclarativeJavaScriptExpression::GuardCapture::captureProperty(QObject *o, } } -void QDeclarativeJavaScriptExpression::clearError() +void QQmlJavaScriptExpression::clearError() { if (m_vtable.hasValue()) { - m_vtable.value().error = QDeclarativeError(); + m_vtable.value().error = QQmlError(); m_vtable.value().removeError(); } } -QDeclarativeError QDeclarativeJavaScriptExpression::error() const +QQmlError QQmlJavaScriptExpression::error() const { if (m_vtable.hasValue()) return m_vtable.constValue()->error; - else return QDeclarativeError(); + else return QQmlError(); } -QDeclarativeDelayedError *QDeclarativeJavaScriptExpression::delayedError() +QQmlDelayedError *QQmlJavaScriptExpression::delayedError() { return &m_vtable.value(); } -void QDeclarativeJavaScriptExpression::clearGuards() +void QQmlJavaScriptExpression::clearGuards() { while (Guard *g = activeGuards.takeFirst()) g->Delete(); } // Must be called with a valid handle scope -v8::Local QDeclarativeExpressionPrivate::v8value(QObject *secondaryScope, bool *isUndefined) +v8::Local QQmlExpressionPrivate::v8value(QObject *secondaryScope, bool *isUndefined) { if (!expressionFunctionValid) { bool ok = true; - QDeclarativeRewrite::RewriteBinding rewriteBinding; + QQmlRewrite::RewriteBinding rewriteBinding; rewriteBinding.setName(name); QString code; if (expressionFunctionRewritten) @@ -722,7 +722,7 @@ v8::Local QDeclarativeExpressionPrivate::v8value(QObject *secondarySc if (secondaryScope) { v8::Local result; - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context()->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context()->engine); QObject *restoreSecondaryScope = 0; restoreSecondaryScope = ep->v8engine()->contextWrapper()->setSecondaryScope(v8qmlscope, secondaryScope); result = evaluate(context(), v8function, isUndefined); @@ -733,16 +733,16 @@ v8::Local QDeclarativeExpressionPrivate::v8value(QObject *secondarySc } } -QVariant QDeclarativeExpressionPrivate::value(QObject *secondaryScope, bool *isUndefined) +QVariant QQmlExpressionPrivate::value(QObject *secondaryScope, bool *isUndefined) { - Q_Q(QDeclarativeExpression); + Q_Q(QQmlExpression); if (!context() || !context()->isValid()) { - qWarning("QDeclarativeExpression: Attempted to evaluate an expression in an invalid context"); + qWarning("QQmlExpression: Attempted to evaluate an expression in an invalid context"); return QVariant(); } - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(q->engine()); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(q->engine()); QVariant rv; ep->referenceScarceResources(); // "hold" scarce resources in memory during evaluation. @@ -768,9 +768,9 @@ QVariant QDeclarativeExpressionPrivate::value(QObject *secondaryScope, bool *isU \sa hasError(), error() */ -QVariant QDeclarativeExpression::evaluate(bool *valueIsUndefined) +QVariant QQmlExpression::evaluate(bool *valueIsUndefined) { - Q_D(QDeclarativeExpression); + Q_D(QQmlExpression); return d->value(0, valueIsUndefined); } @@ -778,9 +778,9 @@ QVariant QDeclarativeExpression::evaluate(bool *valueIsUndefined) Returns true if the valueChanged() signal is emitted when the expression's evaluated value changes. */ -bool QDeclarativeExpression::notifyOnValueChanged() const +bool QQmlExpression::notifyOnValueChanged() const { - Q_D(const QDeclarativeExpression); + Q_D(const QQmlExpression); return d->notifyOnValueChanged(); } @@ -788,21 +788,21 @@ bool QDeclarativeExpression::notifyOnValueChanged() const Sets whether the valueChanged() signal is emitted when the expression's evaluated value changes. - If \a notifyOnChange is true, the QDeclarativeExpression will + If \a notifyOnChange is true, the QQmlExpression will monitor properties involved in the expression's evaluation, and emit - QDeclarativeExpression::valueChanged() if they have changed. This + QQmlExpression::valueChanged() if they have changed. This allows an application to ensure that any value associated with the result of the expression remains up to date. - If \a notifyOnChange is false (default), the QDeclarativeExpression + If \a notifyOnChange is false (default), the QQmlExpression will not montitor properties involved in the expression's - evaluation, and QDeclarativeExpression::valueChanged() will never be + evaluation, and QQmlExpression::valueChanged() will never be emitted. This is more efficient if an application wants a "one off" evaluation of the expression. */ -void QDeclarativeExpression::setNotifyOnValueChanged(bool notifyOnChange) +void QQmlExpression::setNotifyOnValueChanged(bool notifyOnChange) { - Q_D(QDeclarativeExpression); + Q_D(QQmlExpression); d->setNotifyOnValueChanged(notifyOnChange); } @@ -810,9 +810,9 @@ void QDeclarativeExpression::setNotifyOnValueChanged(bool notifyOnChange) Returns the source file URL for this expression. The source location must have been previously set by calling setSourceLocation(). */ -QString QDeclarativeExpression::sourceFile() const +QString QQmlExpression::sourceFile() const { - Q_D(const QDeclarativeExpression); + Q_D(const QQmlExpression); return d->url; } @@ -820,9 +820,9 @@ QString QDeclarativeExpression::sourceFile() const Returns the source file line number for this expression. The source location must have been previously set by calling setSourceLocation(). */ -int QDeclarativeExpression::lineNumber() const +int QQmlExpression::lineNumber() const { - Q_D(const QDeclarativeExpression); + Q_D(const QQmlExpression); return d->line; } @@ -830,9 +830,9 @@ int QDeclarativeExpression::lineNumber() const Returns the source file column number for this expression. The source location must have been previously set by calling setSourceLocation(). */ -int QDeclarativeExpression::columnNumber() const +int QQmlExpression::columnNumber() const { - Q_D(const QDeclarativeExpression); + Q_D(const QQmlExpression); return d->column; } @@ -840,9 +840,9 @@ int QDeclarativeExpression::columnNumber() const Set the location of this expression to \a line of \a url. This information is used by the script engine. */ -void QDeclarativeExpression::setSourceLocation(const QString &url, int line, int column) +void QQmlExpression::setSourceLocation(const QString &url, int line, int column) { - Q_D(QDeclarativeExpression); + Q_D(QQmlExpression); d->url = url; d->line = line; d->column = column; @@ -851,12 +851,12 @@ void QDeclarativeExpression::setSourceLocation(const QString &url, int line, int /*! Returns the expression's scope object, if provided, otherwise 0. - In addition to data provided by the expression's QDeclarativeContext, the scope + In addition to data provided by the expression's QQmlContext, the scope object's properties are also in scope during the expression's evaluation. */ -QObject *QDeclarativeExpression::scopeObject() const +QObject *QQmlExpression::scopeObject() const { - Q_D(const QDeclarativeExpression); + Q_D(const QQmlExpression); return d->scopeObject(); } @@ -866,9 +866,9 @@ QObject *QDeclarativeExpression::scopeObject() const \sa error(), clearError() */ -bool QDeclarativeExpression::hasError() const +bool QQmlExpression::hasError() const { - Q_D(const QDeclarativeExpression); + Q_D(const QQmlExpression); return d->hasError(); } @@ -878,57 +878,57 @@ bool QDeclarativeExpression::hasError() const \sa hasError(), error() */ -void QDeclarativeExpression::clearError() +void QQmlExpression::clearError() { - Q_D(QDeclarativeExpression); + Q_D(QQmlExpression); d->clearError(); } /*! Return any error from the last call to evaluate(). If there was no error, - this returns an invalid QDeclarativeError instance. + this returns an invalid QQmlError instance. \sa hasError(), clearError() */ -QDeclarativeError QDeclarativeExpression::error() const +QQmlError QQmlExpression::error() const { - Q_D(const QDeclarativeExpression); + Q_D(const QQmlExpression); return d->error(); } /*! - \fn void QDeclarativeExpression::valueChanged() + \fn void QQmlExpression::valueChanged() Emitted each time the expression value changes from the last time it was evaluated. The expression must have been evaluated at least once (by - calling QDeclarativeExpression::evaluate()) before this signal will be emitted. + calling QQmlExpression::evaluate()) before this signal will be emitted. */ -void QDeclarativeExpressionPrivate::expressionChanged(QDeclarativeJavaScriptExpression *e) +void QQmlExpressionPrivate::expressionChanged(QQmlJavaScriptExpression *e) { - QDeclarativeExpressionPrivate *This = static_cast(e); + QQmlExpressionPrivate *This = static_cast(e); This->expressionChanged(); } -void QDeclarativeExpressionPrivate::expressionChanged() +void QQmlExpressionPrivate::expressionChanged() { - Q_Q(QDeclarativeExpression); + Q_Q(QQmlExpression); emit q->valueChanged(); } -QString QDeclarativeExpressionPrivate::expressionIdentifier(QDeclarativeJavaScriptExpression *e) +QString QQmlExpressionPrivate::expressionIdentifier(QQmlJavaScriptExpression *e) { - QDeclarativeExpressionPrivate *This = static_cast(e); + QQmlExpressionPrivate *This = static_cast(e); return QLatin1String("\"") + This->expression + QLatin1String("\""); } -QDeclarativeAbstractExpression::QDeclarativeAbstractExpression() +QQmlAbstractExpression::QQmlAbstractExpression() : m_prevExpression(0), m_nextExpression(0) { } -QDeclarativeAbstractExpression::~QDeclarativeAbstractExpression() +QQmlAbstractExpression::~QQmlAbstractExpression() { if (m_prevExpression) { *m_prevExpression = m_nextExpression; @@ -940,13 +940,13 @@ QDeclarativeAbstractExpression::~QDeclarativeAbstractExpression() m_context.asT2()->_s = 0; } -QDeclarativeContextData *QDeclarativeAbstractExpression::context() const +QQmlContextData *QQmlAbstractExpression::context() const { if (m_context.isT1()) return m_context.asT1(); else return m_context.asT2()->_c; } -void QDeclarativeAbstractExpression::setContext(QDeclarativeContextData *context) +void QQmlAbstractExpression::setContext(QQmlContextData *context) { if (m_prevExpression) { *m_prevExpression = m_nextExpression; @@ -968,15 +968,15 @@ void QDeclarativeAbstractExpression::setContext(QDeclarativeContextData *context } } -void QDeclarativeAbstractExpression::refresh() +void QQmlAbstractExpression::refresh() { } -bool QDeclarativeAbstractExpression::isValid() const +bool QQmlAbstractExpression::isValid() const { return context() != 0; } QT_END_NAMESPACE -#include +#include diff --git a/src/declarative/qml/qdeclarativeexpression.h b/src/qml/qml/qqmlexpression.h similarity index 56% rename from src/declarative/qml/qdeclarativeexpression.h rename to src/qml/qml/qqmlexpression.h index c9ab40854d..4044546fbf 100644 --- a/src/declarative/qml/qdeclarativeexpression.h +++ b/src/qml/qml/qqmlexpression.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEEXPRESSION_H -#define QDECLARATIVEEXPRESSION_H +#ifndef QQMLEXPRESSION_H +#define QQMLEXPRESSION_H -#include -#include +#include +#include #include #include @@ -54,22 +54,22 @@ QT_BEGIN_NAMESPACE class QString; -class QDeclarativeRefCount; -class QDeclarativeEngine; -class QDeclarativeContext; -class QDeclarativeExpressionPrivate; -class QDeclarativeContextData; -class Q_DECLARATIVE_EXPORT QDeclarativeExpression : public QObject +class QQmlRefCount; +class QQmlEngine; +class QQmlContext; +class QQmlExpressionPrivate; +class QQmlContextData; +class Q_QML_EXPORT QQmlExpression : public QObject { Q_OBJECT public: - QDeclarativeExpression(); - QDeclarativeExpression(QDeclarativeContext *, QObject *, const QString &, QObject * = 0); - explicit QDeclarativeExpression(const QDeclarativeScriptString &, QObject * = 0); - virtual ~QDeclarativeExpression(); + QQmlExpression(); + QQmlExpression(QQmlContext *, QObject *, const QString &, QObject * = 0); + explicit QQmlExpression(const QQmlScriptString &, QObject * = 0); + virtual ~QQmlExpression(); - QDeclarativeEngine *engine() const; - QDeclarativeContext *context() const; + QQmlEngine *engine() const; + QQmlContext *context() const; QString expression() const; void setExpression(const QString &); @@ -86,7 +86,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeExpression : public QObject bool hasError() const; void clearError(); - QDeclarativeError error() const; + QQmlError error() const; QVariant evaluate(bool *valueIsUndefined = 0); @@ -94,28 +94,28 @@ class Q_DECLARATIVE_EXPORT QDeclarativeExpression : public QObject void valueChanged(); protected: - QDeclarativeExpression(QDeclarativeContextData *, QObject *, const QString &, - QDeclarativeExpressionPrivate &dd); - QDeclarativeExpression(QDeclarativeContextData *, QObject *, void *, - QDeclarativeExpressionPrivate &dd); - QDeclarativeExpression(QDeclarativeContextData *, QObject *, const QString &, bool, - const QString &, int, int, QDeclarativeExpressionPrivate &dd); - QDeclarativeExpression(QDeclarativeContextData *, QObject *, const QByteArray &, bool, - const QString &, int, int, QDeclarativeExpressionPrivate &dd); + QQmlExpression(QQmlContextData *, QObject *, const QString &, + QQmlExpressionPrivate &dd); + QQmlExpression(QQmlContextData *, QObject *, void *, + QQmlExpressionPrivate &dd); + QQmlExpression(QQmlContextData *, QObject *, const QString &, bool, + const QString &, int, int, QQmlExpressionPrivate &dd); + QQmlExpression(QQmlContextData *, QObject *, const QByteArray &, bool, + const QString &, int, int, QQmlExpressionPrivate &dd); private: - QDeclarativeExpression(QDeclarativeContextData *, QObject *, const QString &); + QQmlExpression(QQmlContextData *, QObject *, const QString &); - Q_DISABLE_COPY(QDeclarativeExpression) - Q_DECLARE_PRIVATE(QDeclarativeExpression) - friend class QDeclarativeDebugger; - friend class QDeclarativeContext; - friend class QDeclarativeVME; + Q_DISABLE_COPY(QQmlExpression) + Q_DECLARE_PRIVATE(QQmlExpression) + friend class QQmlDebugger; + friend class QQmlContext; + friend class QQmlVME; }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEEXPRESSION_H +#endif // QQMLEXPRESSION_H diff --git a/src/declarative/qml/qdeclarativeexpression_p.h b/src/qml/qml/qqmlexpression_p.h similarity index 54% rename from src/declarative/qml/qdeclarativeexpression_p.h rename to src/qml/qml/qqmlexpression_p.h index 541a06dba5..deca29ab60 100644 --- a/src/declarative/qml/qdeclarativeexpression_p.h +++ b/src/qml/qml/qqmlexpression_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEEXPRESSION_P_H -#define QDECLARATIVEEXPRESSION_P_H +#ifndef QQMLEXPRESSION_P_H +#define QQMLEXPRESSION_P_H // // W A R N I N G @@ -53,62 +53,62 @@ // We mean it. // -#include "qdeclarativeexpression.h" +#include "qqmlexpression.h" #include #include #include #include -#include +#include #include -#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeAbstractExpression +class QQmlAbstractExpression { public: - QDeclarativeAbstractExpression(); - virtual ~QDeclarativeAbstractExpression(); + QQmlAbstractExpression(); + virtual ~QQmlAbstractExpression(); bool isValid() const; - QDeclarativeContextData *context() const; - void setContext(QDeclarativeContextData *); + QQmlContextData *context() const; + void setContext(QQmlContextData *); virtual void refresh(); class DeleteWatcher { public: - inline DeleteWatcher(QDeclarativeAbstractExpression *); + inline DeleteWatcher(QQmlAbstractExpression *); inline ~DeleteWatcher(); inline bool wasDeleted() const; private: - friend class QDeclarativeAbstractExpression; - QDeclarativeContextData *_c; - QDeclarativeAbstractExpression **_w; - QDeclarativeAbstractExpression *_s; + friend class QQmlAbstractExpression; + QQmlContextData *_c; + QQmlAbstractExpression **_w; + QQmlAbstractExpression *_s; }; private: - friend class QDeclarativeContext; - friend class QDeclarativeContextData; - friend class QDeclarativeContextPrivate; + friend class QQmlContext; + friend class QQmlContextData; + friend class QQmlContextPrivate; - QBiPointer m_context; - QDeclarativeAbstractExpression **m_prevExpression; - QDeclarativeAbstractExpression *m_nextExpression; + QBiPointer m_context; + QQmlAbstractExpression **m_prevExpression; + QQmlAbstractExpression *m_nextExpression; }; -class QDeclarativeDelayedError +class QQmlDelayedError { public: - inline QDeclarativeDelayedError() : nextError(0), prevError(0) {} - inline ~QDeclarativeDelayedError() { removeError(); } + inline QQmlDelayedError() : nextError(0), prevError(0) {} + inline ~QQmlDelayedError() { removeError(); } - QDeclarativeError error; + QQmlError error; - bool addError(QDeclarativeEnginePrivate *); + bool addError(QQmlEnginePrivate *); inline void removeError() { if (!prevError) return; @@ -119,11 +119,11 @@ class QDeclarativeDelayedError } private: - QDeclarativeDelayedError *nextError; - QDeclarativeDelayedError **prevError; + QQmlDelayedError *nextError; + QQmlDelayedError **prevError; }; -class QDeclarativeJavaScriptExpression +class QQmlJavaScriptExpression { public: // Although this looks crazy, we implement our own "vtable" here, rather than relying on @@ -132,13 +132,13 @@ class QDeclarativeJavaScriptExpression // If we use C++ virtuals, we can't do this and it consts us an extra sizeof(void *) in // memory for every expression. struct VTable { - QString (*expressionIdentifier)(QDeclarativeJavaScriptExpression *); - void (*expressionChanged)(QDeclarativeJavaScriptExpression *); + QString (*expressionIdentifier)(QQmlJavaScriptExpression *); + void (*expressionChanged)(QQmlJavaScriptExpression *); }; - QDeclarativeJavaScriptExpression(VTable *vtable); + QQmlJavaScriptExpression(VTable *vtable); - v8::Local evaluate(QDeclarativeContextData *, v8::Handle, + v8::Local evaluate(QQmlContextData *, v8::Handle, bool *isUndefined); inline bool requiresThisObject() const; @@ -155,31 +155,31 @@ class QDeclarativeJavaScriptExpression class DeleteWatcher { public: - inline DeleteWatcher(QDeclarativeJavaScriptExpression *); + inline DeleteWatcher(QQmlJavaScriptExpression *); inline ~DeleteWatcher(); inline bool wasDeleted() const; private: - friend class QDeclarativeJavaScriptExpression; + friend class QQmlJavaScriptExpression; QObject *_c; - QDeclarativeJavaScriptExpression **_w; - QDeclarativeJavaScriptExpression *_s; + QQmlJavaScriptExpression **_w; + QQmlJavaScriptExpression *_s; }; inline bool hasError() const; inline bool hasDelayedError() const; - QDeclarativeError error() const; + QQmlError error() const; void clearError(); - QDeclarativeDelayedError *delayedError(); + QQmlDelayedError *delayedError(); protected: - ~QDeclarativeJavaScriptExpression(); + ~QQmlJavaScriptExpression(); private: - typedef QDeclarativeJavaScriptExpressionGuard Guard; - friend class QDeclarativeJavaScriptExpressionGuard; + typedef QQmlJavaScriptExpressionGuard Guard; + friend class QQmlJavaScriptExpressionGuard; - struct GuardCapture : public QDeclarativeEnginePrivate::PropertyCapture { - GuardCapture(QDeclarativeEngine *engine, QDeclarativeJavaScriptExpression *e) + struct GuardCapture : public QQmlEnginePrivate::PropertyCapture { + GuardCapture(QQmlEngine *engine, QQmlJavaScriptExpression *e) : engine(engine), expression(e), errorString(0) { } ~GuardCapture() { @@ -187,16 +187,16 @@ class QDeclarativeJavaScriptExpression Q_ASSERT(errorString == 0); } - virtual void captureProperty(QDeclarativeNotifier *); + virtual void captureProperty(QQmlNotifier *); virtual void captureProperty(QObject *, int, int); - QDeclarativeEngine *engine; - QDeclarativeJavaScriptExpression *expression; + QQmlEngine *engine; + QQmlJavaScriptExpression *expression; QFieldList guards; QStringList *errorString; }; - QPointerValuePair m_vtable; + QPointerValuePair m_vtable; // We store some flag bits in the following flag pointers. // m_scopeObject:flag1 - requiresThisObject @@ -208,49 +208,49 @@ class QDeclarativeJavaScriptExpression void clearGuards(); }; -class QDeclarativeExpression; +class QQmlExpression; class QString; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeExpressionPrivate : public QObjectPrivate, public QDeclarativeJavaScriptExpression, public QDeclarativeAbstractExpression +class Q_QML_PRIVATE_EXPORT QQmlExpressionPrivate : public QObjectPrivate, public QQmlJavaScriptExpression, public QQmlAbstractExpression { - Q_DECLARE_PUBLIC(QDeclarativeExpression) + Q_DECLARE_PUBLIC(QQmlExpression) public: - QDeclarativeExpressionPrivate(); - ~QDeclarativeExpressionPrivate(); + QQmlExpressionPrivate(); + ~QQmlExpressionPrivate(); - void init(QDeclarativeContextData *, const QString &, QObject *); - void init(QDeclarativeContextData *, v8::Handle, QObject *); - void init(QDeclarativeContextData *, const QString &, bool, QObject *, const QString &, int, int); - void init(QDeclarativeContextData *, const QByteArray &, bool, QObject *, const QString &, int, int); + void init(QQmlContextData *, const QString &, QObject *); + void init(QQmlContextData *, v8::Handle, QObject *); + void init(QQmlContextData *, const QString &, bool, QObject *, const QString &, int, int); + void init(QQmlContextData *, const QByteArray &, bool, QObject *, const QString &, int, int); QVariant value(QObject *secondaryScope = 0, bool *isUndefined = 0); v8::Local v8value(QObject *secondaryScope = 0, bool *isUndefined = 0); - static inline QDeclarativeExpressionPrivate *get(QDeclarativeExpression *expr); - static inline QDeclarativeExpression *get(QDeclarativeExpressionPrivate *expr); + static inline QQmlExpressionPrivate *get(QQmlExpression *expr); + static inline QQmlExpression *get(QQmlExpressionPrivate *expr); void _q_notify(); - static void exceptionToError(v8::Handle, QDeclarativeError &); - static v8::Persistent evalFunction(QDeclarativeContextData *ctxt, QObject *scope, + static void exceptionToError(v8::Handle, QQmlError &); + static v8::Persistent evalFunction(QQmlContextData *ctxt, QObject *scope, const QString &code, const QString &filename, int line, v8::Persistent *qmlscope = 0); - static v8::Persistent evalFunction(QDeclarativeContextData *ctxt, QObject *scope, + static v8::Persistent evalFunction(QQmlContextData *ctxt, QObject *scope, const char *code, int codeLength, const QString &filename, int line, v8::Persistent *qmlscope = 0); - static QDeclarativeExpression *create(QDeclarativeContextData *, QObject *, const QString &, bool, + static QQmlExpression *create(QQmlContextData *, QObject *, const QString &, bool, const QString &, int, int); bool expressionFunctionValid:1; bool expressionFunctionRewritten:1; bool extractExpressionFromFunction:1; - // "Inherited" from QDeclarativeJavaScriptExpression - static QString expressionIdentifier(QDeclarativeJavaScriptExpression *); - static void expressionChanged(QDeclarativeJavaScriptExpression *); + // "Inherited" from QQmlJavaScriptExpression + static QString expressionIdentifier(QQmlJavaScriptExpression *); + static void expressionChanged(QQmlJavaScriptExpression *); virtual void expressionChanged(); QString expression; @@ -264,10 +264,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeExpressionPrivate : public QObjec int column; QString name; //function name, hint for the debugger - QDeclarativeRefCount *dataRef; + QQmlRefCount *dataRef; }; -QDeclarativeAbstractExpression::DeleteWatcher::DeleteWatcher(QDeclarativeAbstractExpression *e) +QQmlAbstractExpression::DeleteWatcher::DeleteWatcher(QQmlAbstractExpression *e) : _c(0), _w(0), _s(e) { if (e->m_context.isT1()) { @@ -280,19 +280,19 @@ QDeclarativeAbstractExpression::DeleteWatcher::DeleteWatcher(QDeclarativeAbstrac } } -QDeclarativeAbstractExpression::DeleteWatcher::~DeleteWatcher() +QQmlAbstractExpression::DeleteWatcher::~DeleteWatcher() { Q_ASSERT(*_w == 0 || (*_w == _s && _s->m_context.isT2())); if (*_w && _s->m_context.asT2() == this) _s->m_context = _c; } -bool QDeclarativeAbstractExpression::DeleteWatcher::wasDeleted() const +bool QQmlAbstractExpression::DeleteWatcher::wasDeleted() const { return *_w == 0; } -QDeclarativeJavaScriptExpression::DeleteWatcher::DeleteWatcher(QDeclarativeJavaScriptExpression *e) +QQmlJavaScriptExpression::DeleteWatcher::DeleteWatcher(QQmlJavaScriptExpression *e) : _c(0), _w(0), _s(e) { if (e->m_scopeObject.isT1()) { @@ -305,102 +305,102 @@ QDeclarativeJavaScriptExpression::DeleteWatcher::DeleteWatcher(QDeclarativeJavaS } } -QDeclarativeJavaScriptExpression::DeleteWatcher::~DeleteWatcher() +QQmlJavaScriptExpression::DeleteWatcher::~DeleteWatcher() { Q_ASSERT(*_w == 0 || (*_w == _s && _s->m_scopeObject.isT2())); if (*_w && _s->m_scopeObject.asT2() == this) _s->m_scopeObject = _c; } -bool QDeclarativeJavaScriptExpression::DeleteWatcher::wasDeleted() const +bool QQmlJavaScriptExpression::DeleteWatcher::wasDeleted() const { return *_w == 0; } -bool QDeclarativeJavaScriptExpression::requiresThisObject() const +bool QQmlJavaScriptExpression::requiresThisObject() const { return m_scopeObject.flag(); } -void QDeclarativeJavaScriptExpression::setRequiresThisObject(bool v) +void QQmlJavaScriptExpression::setRequiresThisObject(bool v) { m_scopeObject.setFlagValue(v); } -bool QDeclarativeJavaScriptExpression::useSharedContext() const +bool QQmlJavaScriptExpression::useSharedContext() const { return activeGuards.flag2(); } -void QDeclarativeJavaScriptExpression::setUseSharedContext(bool v) +void QQmlJavaScriptExpression::setUseSharedContext(bool v) { activeGuards.setFlag2Value(v); } -bool QDeclarativeJavaScriptExpression::notifyOnValueChanged() const +bool QQmlJavaScriptExpression::notifyOnValueChanged() const { return activeGuards.flag(); } -QObject *QDeclarativeJavaScriptExpression::scopeObject() const +QObject *QQmlJavaScriptExpression::scopeObject() const { if (m_scopeObject.isT1()) return m_scopeObject.asT1(); else return m_scopeObject.asT2()->_c; } -void QDeclarativeJavaScriptExpression::setScopeObject(QObject *v) +void QQmlJavaScriptExpression::setScopeObject(QObject *v) { if (m_scopeObject.isT1()) m_scopeObject = v; else m_scopeObject.asT2()->_c = v; } -bool QDeclarativeJavaScriptExpression::hasError() const +bool QQmlJavaScriptExpression::hasError() const { return m_vtable.hasValue() && m_vtable.constValue()->error.isValid(); } -bool QDeclarativeJavaScriptExpression::hasDelayedError() const +bool QQmlJavaScriptExpression::hasDelayedError() const { return m_vtable.hasValue(); } -QDeclarativeExpressionPrivate *QDeclarativeExpressionPrivate::get(QDeclarativeExpression *expr) +QQmlExpressionPrivate *QQmlExpressionPrivate::get(QQmlExpression *expr) { - return static_cast(QObjectPrivate::get(expr)); + return static_cast(QObjectPrivate::get(expr)); } -QDeclarativeExpression *QDeclarativeExpressionPrivate::get(QDeclarativeExpressionPrivate *expr) +QQmlExpression *QQmlExpressionPrivate::get(QQmlExpressionPrivate *expr) { return expr->q_func(); } -QDeclarativeJavaScriptExpressionGuard::QDeclarativeJavaScriptExpressionGuard(QDeclarativeJavaScriptExpression *e) +QQmlJavaScriptExpressionGuard::QQmlJavaScriptExpressionGuard(QQmlJavaScriptExpression *e) : expression(e), next(0) { callback = &endpointCallback; } -void QDeclarativeJavaScriptExpressionGuard::endpointCallback(QDeclarativeNotifierEndpoint *e) +void QQmlJavaScriptExpressionGuard::endpointCallback(QQmlNotifierEndpoint *e) { - QDeclarativeJavaScriptExpression *expression = - static_cast(e)->expression; + QQmlJavaScriptExpression *expression = + static_cast(e)->expression; expression->m_vtable->expressionChanged(expression); } -QDeclarativeJavaScriptExpressionGuard * -QDeclarativeJavaScriptExpressionGuard::New(QDeclarativeJavaScriptExpression *e, - QDeclarativeEngine *engine) +QQmlJavaScriptExpressionGuard * +QQmlJavaScriptExpressionGuard::New(QQmlJavaScriptExpression *e, + QQmlEngine *engine) { Q_ASSERT(e); - return QDeclarativeEnginePrivate::get(engine)->jsExpressionGuardPool.New(e); + return QQmlEnginePrivate::get(engine)->jsExpressionGuardPool.New(e); } -void QDeclarativeJavaScriptExpressionGuard::Delete() +void QQmlJavaScriptExpressionGuard::Delete() { - QRecyclePool::Delete(this); + QRecyclePool::Delete(this); } QT_END_NAMESPACE -#endif // QDECLARATIVEEXPRESSION_P_H +#endif // QQMLEXPRESSION_P_H diff --git a/src/declarative/qml/qdeclarativepropertyvaluesource.h b/src/qml/qml/qqmlextensioninterface.h similarity index 69% rename from src/declarative/qml/qdeclarativepropertyvaluesource.h rename to src/qml/qml/qqmlextensioninterface.h index 4189cae345..63ef1adc08 100644 --- a/src/declarative/qml/qdeclarativepropertyvaluesource.h +++ b/src/qml/qml/qqmlextensioninterface.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPROPERTYVALUESOURCE_H -#define QDECLARATIVEPROPERTYVALUESOURCE_H +#ifndef QQMLEXTENSIONINTERFACE_H +#define QQMLEXTENSIONINTERFACE_H +#include #include QT_BEGIN_HEADER @@ -49,18 +50,27 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeProperty; -class Q_DECLARATIVE_EXPORT QDeclarativePropertyValueSource +class QQmlEngine; + +class Q_QML_EXPORT QQmlTypesExtensionInterface +{ +public: + virtual ~QQmlTypesExtensionInterface() {} + virtual void registerTypes(const char *uri) = 0; +}; + +class Q_QML_EXPORT QQmlExtensionInterface : public QQmlTypesExtensionInterface { public: - QDeclarativePropertyValueSource(); - virtual ~QDeclarativePropertyValueSource(); - virtual void setTarget(const QDeclarativeProperty &) = 0; + virtual ~QQmlExtensionInterface() {} + virtual void initializeEngine(QQmlEngine *engine, const char *uri) = 0; }; -Q_DECLARE_INTERFACE(QDeclarativePropertyValueSource, "com.trolltech.qml.QDeclarativePropertyValueSource") + +Q_DECLARE_INTERFACE(QQmlTypesExtensionInterface, "org.qt-project.Qt.QQmlTypesExtensionInterface/1.0") +Q_DECLARE_INTERFACE(QQmlExtensionInterface, "org.qt-project.Qt.QQmlExtensionInterface/1.0") QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEPROPERTYVALUESOURCE_H +#endif // QQMLEXTENSIONINTERFACE_H diff --git a/src/declarative/qml/qdeclarativeextensionplugin.cpp b/src/qml/qml/qqmlextensionplugin.cpp similarity index 85% rename from src/declarative/qml/qdeclarativeextensionplugin.cpp rename to src/qml/qml/qqmlextensionplugin.cpp index f69fa30e0d..c3d8f0b34f 100644 --- a/src/declarative/qml/qdeclarativeextensionplugin.cpp +++ b/src/qml/qml/qqmlextensionplugin.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,25 +39,25 @@ ** ****************************************************************************/ -#include "qdeclarativeextensionplugin.h" +#include "qqmlextensionplugin.h" QT_BEGIN_NAMESPACE /*! \since 4.7 - \class QDeclarativeExtensionPlugin - \brief The QDeclarativeExtensionPlugin class provides an abstract base for custom QML extension plugins. + \class QQmlExtensionPlugin + \brief The QQmlExtensionPlugin class provides an abstract base for custom QML extension plugins. \ingroup plugins - QDeclarativeExtensionPlugin is a plugin interface that makes it possible to + QQmlExtensionPlugin is a plugin interface that makes it possible to create QML extensions that can be loaded dynamically into QML applications. These extensions allow custom QML types to be made available to the QML engine. To write a QML extension plugin: \list - \o Subclass QDeclarativeExtensionPlugin, implement registerTypes() method + \o Subclass QQmlExtensionPlugin, implement registerTypes() method to register types using qmlRegisterType(), and export the class using the Q_EXPORT_PLUGIN2() macro \o Write an appropriate project file for the plugin \o Create a \l{Writing a qmldir file}{qmldir file} to describe the plugin @@ -121,11 +121,11 @@ QT_BEGIN_NAMESPACE The \l {Tutorial: Writing QML extensions with C++} also contains a chapter on creating QML plugins. - \sa QDeclarativeEngine::importPlugin(), {How to Create Qt Plugins} + \sa QQmlEngine::importPlugin(), {How to Create Qt Plugins} */ /*! - \fn void QDeclarativeExtensionPlugin::registerTypes(const char *uri) + \fn void QQmlExtensionPlugin::registerTypes(const char *uri) Registers the QML types in the given \a uri. Subclasses should implement this to call qmlRegisterType() for all types which are provided by the extension @@ -142,7 +142,7 @@ QT_BEGIN_NAMESPACE Q_EXPORT_PLUGIN2() macro, so there is no need for calling it explicitly. */ -QDeclarativeExtensionPlugin::QDeclarativeExtensionPlugin(QObject *parent) +QQmlExtensionPlugin::QQmlExtensionPlugin(QObject *parent) : QObject(parent) { } @@ -150,19 +150,19 @@ QDeclarativeExtensionPlugin::QDeclarativeExtensionPlugin(QObject *parent) /*! \internal */ -QDeclarativeExtensionPlugin::~QDeclarativeExtensionPlugin() +QQmlExtensionPlugin::~QQmlExtensionPlugin() { } /*! - \fn void QDeclarativeExtensionPlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri) + \fn void QQmlExtensionPlugin::initializeEngine(QQmlEngine *engine, const char *uri) 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) +void QQmlExtensionPlugin::initializeEngine(QQmlEngine *engine, const char *uri) { Q_UNUSED(engine); Q_UNUSED(uri); diff --git a/src/declarative/qml/qdeclarativeextensionplugin.h b/src/qml/qml/qqmlextensionplugin.h similarity index 72% rename from src/declarative/qml/qdeclarativeextensionplugin.h rename to src/qml/qml/qqmlextensionplugin.h index 477e58d83c..91a9e95869 100644 --- a/src/declarative/qml/qdeclarativeextensionplugin.h +++ b/src/qml/qml/qqmlextensionplugin.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,39 +39,39 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEEXTENSIONPLUGIN_H -#define QDECLARATIVEEXTENSIONPLUGIN_H +#ifndef QQMLEXTENSIONPLUGIN_H +#define QQMLEXTENSIONPLUGIN_H #include -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeEngine; +class QQmlEngine; -class Q_DECLARATIVE_EXPORT QDeclarativeExtensionPlugin : public QObject, - public QDeclarativeExtensionInterface +class Q_QML_EXPORT QQmlExtensionPlugin : public QObject, + public QQmlExtensionInterface { Q_OBJECT - Q_INTERFACES(QDeclarativeExtensionInterface) - Q_INTERFACES(QDeclarativeTypesExtensionInterface) + Q_INTERFACES(QQmlExtensionInterface) + Q_INTERFACES(QQmlTypesExtensionInterface) public: - explicit QDeclarativeExtensionPlugin(QObject *parent = 0); - ~QDeclarativeExtensionPlugin(); + explicit QQmlExtensionPlugin(QObject *parent = 0); + ~QQmlExtensionPlugin(); virtual void registerTypes(const char *uri) = 0; - virtual void initializeEngine(QDeclarativeEngine *engine, const char *uri); + virtual void initializeEngine(QQmlEngine *engine, const char *uri); private: - Q_DISABLE_COPY(QDeclarativeExtensionPlugin) + Q_DISABLE_COPY(QQmlExtensionPlugin) }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEEXTENSIONPLUGIN_H +#endif // QQMLEXTENSIONPLUGIN_H diff --git a/src/declarative/qml/qdeclarativeglobal_p.h b/src/qml/qml/qqmlglobal_p.h similarity index 89% rename from src/declarative/qml/qdeclarativeglobal_p.h rename to src/qml/qml/qqmlglobal_p.h index 3534a75bc9..c41b823e60 100644 --- a/src/declarative/qml/qdeclarativeglobal_p.h +++ b/src/qml/qml/qqmlglobal_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEGLOBAL_H -#define QDECLARATIVEGLOBAL_H +#ifndef QQMLGLOBAL_H +#define QQMLGLOBAL_H #include #include @@ -89,9 +89,7 @@ QT_BEGIN_NAMESPACE QMetaObject::connect(sender, signalIdx, receiver, methodIdx, Qt::DirectConnection); \ } -#define Q_DECLARATIVE_PRIVATE_EXPORT Q_DECLARATIVE_EXPORT - -struct QDeclarativeGraphics_DerivedObject : public QObject +struct QQmlGraphics_DerivedObject : public QObject { void setParent_noEvent(QObject *parent) { bool sce = d_ptr->sendChildEvents; @@ -112,20 +110,20 @@ struct QDeclarativeGraphics_DerivedObject : public QObject should never have a false negative (say the case is incorrect when it is correct). */ -bool QDeclarative_isFileCaseCorrect(const QString &fileName); +bool QQml_isFileCaseCorrect(const QString &fileName); /*! Makes the \a object a child of \a parent. Note that when using this method, neither \a parent nor the object's previous parent (if it had one) will receive ChildRemoved or ChildAdded events. */ -inline void QDeclarative_setParent_noEvent(QObject *object, QObject *parent) +inline void QQml_setParent_noEvent(QObject *object, QObject *parent) { - static_cast(object)->setParent_noEvent(parent); + static_cast(object)->setParent_noEvent(parent); } QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEGLOBAL_H +#endif // QQMLGLOBAL_H diff --git a/src/declarative/qml/qdeclarativeguard_p.h b/src/qml/qml/qqmlguard_p.h similarity index 68% rename from src/declarative/qml/qdeclarativeguard_p.h rename to src/qml/qml/qqmlguard_p.h index fdd5c016a5..b4e7408fae 100644 --- a/src/declarative/qml/qdeclarativeguard_p.h +++ b/src/qml/qml/qqmlguard_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEGUARD_P_H -#define QDECLARATIVEGUARD_P_H +#ifndef QQMLGUARD_P_H +#define QQMLGUARD_P_H // // W A R N I N G @@ -55,21 +55,21 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeGuardImpl +class QQmlGuardImpl { public: - inline QDeclarativeGuardImpl(); - inline QDeclarativeGuardImpl(QObject *); - inline QDeclarativeGuardImpl(const QDeclarativeGuardImpl &); - inline ~QDeclarativeGuardImpl(); + inline QQmlGuardImpl(); + inline QQmlGuardImpl(QObject *); + inline QQmlGuardImpl(const QQmlGuardImpl &); + inline ~QQmlGuardImpl(); QObject *o; - QDeclarativeGuardImpl *next; - QDeclarativeGuardImpl **prev; + QQmlGuardImpl *next; + QQmlGuardImpl **prev; inline void addGuard(); inline void remGuard(); @@ -77,17 +77,17 @@ class QDeclarativeGuardImpl class QObject; template -class QDeclarativeGuard : private QDeclarativeGuardImpl +class QQmlGuard : private QQmlGuardImpl { - friend class QDeclarativeData; + friend class QQmlData; public: - inline QDeclarativeGuard(); - inline QDeclarativeGuard(T *); - inline QDeclarativeGuard(const QDeclarativeGuard &); - inline virtual ~QDeclarativeGuard(); + inline QQmlGuard(); + inline QQmlGuard(T *); + inline QQmlGuard(const QQmlGuard &); + inline virtual ~QQmlGuard(); - inline QDeclarativeGuard &operator=(const QDeclarativeGuard &o); - inline QDeclarativeGuard &operator=(T *); + inline QQmlGuard &operator=(const QQmlGuard &o); + inline QQmlGuard &operator=(T *); inline T *object() const; inline void setObject(T *g); @@ -110,48 +110,48 @@ class QDeclarativeGuard : private QDeclarativeGuardImpl QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeGuard) +Q_DECLARE_METATYPE(QQmlGuard) QT_BEGIN_NAMESPACE -QDeclarativeGuardImpl::QDeclarativeGuardImpl() +QQmlGuardImpl::QQmlGuardImpl() : o(0), next(0), prev(0) { } -QDeclarativeGuardImpl::QDeclarativeGuardImpl(QObject *g) +QQmlGuardImpl::QQmlGuardImpl(QObject *g) : o(g), next(0), prev(0) { if (o) addGuard(); } -QDeclarativeGuardImpl::QDeclarativeGuardImpl(const QDeclarativeGuardImpl &g) +QQmlGuardImpl::QQmlGuardImpl(const QQmlGuardImpl &g) : o(g.o), next(0), prev(0) { if (o) addGuard(); } -QDeclarativeGuardImpl::~QDeclarativeGuardImpl() +QQmlGuardImpl::~QQmlGuardImpl() { if (prev) remGuard(); o = 0; } -void QDeclarativeGuardImpl::addGuard() +void QQmlGuardImpl::addGuard() { Q_ASSERT(!prev); if (QObjectPrivate::get(o)->wasDeleted) return; - QDeclarativeData *data = QDeclarativeData::get(o, true); + QQmlData *data = QQmlData::get(o, true); next = data->guards; if (next) next->prev = &next; data->guards = this; prev = &data->guards; } -void QDeclarativeGuardImpl::remGuard() +void QQmlGuardImpl::remGuard() { Q_ASSERT(prev); @@ -162,49 +162,49 @@ void QDeclarativeGuardImpl::remGuard() } template -QDeclarativeGuard::QDeclarativeGuard() +QQmlGuard::QQmlGuard() { } template -QDeclarativeGuard::QDeclarativeGuard(T *g) -: QDeclarativeGuardImpl(g) +QQmlGuard::QQmlGuard(T *g) +: QQmlGuardImpl(g) { } template -QDeclarativeGuard::QDeclarativeGuard(const QDeclarativeGuard &g) -: QDeclarativeGuardImpl(g) +QQmlGuard::QQmlGuard(const QQmlGuard &g) +: QQmlGuardImpl(g) { } template -QDeclarativeGuard::~QDeclarativeGuard() +QQmlGuard::~QQmlGuard() { } template -QDeclarativeGuard &QDeclarativeGuard::operator=(const QDeclarativeGuard &g) +QQmlGuard &QQmlGuard::operator=(const QQmlGuard &g) { setObject(g.object()); return *this; } template -QDeclarativeGuard &QDeclarativeGuard::operator=(T *g) +QQmlGuard &QQmlGuard::operator=(T *g) { setObject(g); return *this; } template -T *QDeclarativeGuard::object() const +T *QQmlGuard::object() const { return static_cast(o); }; template -void QDeclarativeGuard::setObject(T *g) +void QQmlGuard::setObject(T *g) { if (g != o) { if (prev) remGuard(); @@ -215,4 +215,4 @@ void QDeclarativeGuard::setObject(T *g) QT_END_NAMESPACE -#endif // QDECLARATIVEGUARD_P_H +#endif // QQMLGUARD_P_H diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/qml/qml/qqmlimageprovider.cpp similarity index 85% rename from src/declarative/qml/qdeclarativeimageprovider.cpp rename to src/qml/qml/qqmlimageprovider.cpp index f2749fff30..863093033a 100644 --- a/src/declarative/qml/qdeclarativeimageprovider.cpp +++ b/src/qml/qml/qqmlimageprovider.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,20 +39,20 @@ ** ****************************************************************************/ -#include "qdeclarativeimageprovider.h" +#include "qqmlimageprovider.h" QT_BEGIN_NAMESPACE -class QDeclarativeImageProviderPrivate +class QQmlImageProviderPrivate { public: - QDeclarativeImageProvider::ImageType type; + QQmlImageProvider::ImageType type; }; /*! - \class QDeclarativeTextureFactory + \class QQuickTextureFactory \since 5.0 - \brief The QDeclarativeTextureFactory class provides an interface for loading custom textures from QML. + \brief The QQuickTextureFactory class provides an interface for loading custom textures from QML. The purpose of the texture factory is to provide a placeholder for a image data that can be converted into an OpenGL texture. @@ -61,18 +61,18 @@ class QDeclarativeImageProviderPrivate available in the thread that is responsible for loading the image data. */ -QDeclarativeTextureFactory::QDeclarativeTextureFactory() +QQuickTextureFactory::QQuickTextureFactory() { } -QDeclarativeTextureFactory::~QDeclarativeTextureFactory() +QQuickTextureFactory::~QQuickTextureFactory() { } /*! - \fn QSGTexture *QDeclarativeTextureFactory::createTexture() const + \fn QSGTexture *QQuickTextureFactory::createTexture() const This function is called on the scene graph rendering thread to create a QSGTexture instance from the factory. @@ -84,7 +84,7 @@ QDeclarativeTextureFactory::~QDeclarativeTextureFactory() */ /*! - \fn QSize QDeclarativeTextureFactory::textureSize() const + \fn QSize QQuickTextureFactory::textureSize() const Returns the size of the texture. This function will be called from arbitrary threads and should not rely on an OpenGL context bound. @@ -92,16 +92,16 @@ QDeclarativeTextureFactory::~QDeclarativeTextureFactory() /*! - \class QDeclarativeImageProvider + \class QQmlImageProvider \since 4.7 - \brief The QDeclarativeImageProvider class provides an interface for supporting pixmaps and threaded image requests in QML. + \brief The QQmlImageProvider class provides an interface for supporting pixmaps and threaded image requests in QML. - QDeclarativeImageProvider is used to provide advanced image loading features + QQmlImageProvider is used to provide advanced image loading features in QML applications. It allows images in QML to be: \list \o Loaded using QPixmaps rather than actual image files - \o Loaded asynchronously in a separate thread, if imageType() is \l{QDeclarativeImageProvider::ImageType}{ImageType::Image} + \o Loaded asynchronously in a separate thread, if imageType() is \l{QQmlImageProvider::ImageType}{ImageType::Image} \endlist To specify that an image should be loaded by an image provider, use the @@ -115,7 +115,7 @@ QDeclarativeTextureFactory::~QDeclarativeTextureFactory() This specifies that the image should be loaded by the image provider named "myimageprovider", and the image to be loaded is named "image.png". The QML engine invokes the appropriate image provider according to the providers that have - been registered through QDeclarativeEngine::addImageProvider(). + been registered through QQmlEngine::addImageProvider(). Note that the identifiers are case-insensitive, but the rest of the URL will be passed on with preserved case. For example, the below snippet would still specify that the image is loaded by the @@ -157,7 +157,7 @@ QDeclarativeTextureFactory::~QDeclarativeTextureFactory() { ... - QDeclarativeEngine engine; + QQmlEngine engine; engine->addImageProvider(QLatin1String("colors"), new ColorPixmapProvider); ... @@ -170,7 +170,7 @@ QDeclarativeTextureFactory::~QDeclarativeTextureFactory() A complete example is available in Qt's \l {declarative/cppextensions/imageprovider}{examples/declarative/cppextensions/imageprovider} - directory. Note the example registers the provider via a \l{QDeclarativeExtensionPlugin}{plugin} + directory. Note the example registers the provider via a \l{QQmlExtensionPlugin}{plugin} instead of registering it in the application \c main() function as shown above. @@ -193,7 +193,7 @@ QDeclarativeTextureFactory::~QDeclarativeTextureFactory() \section2 Image caching - Images returned by a QDeclarativeImageProvider are automatically cached, + Images returned by a QQmlImageProvider are automatically cached, similar to any image loaded by the QML engine. When an image with a "image://" prefix is loaded from cache, requestImage() and requestPixmap() will not be called for the relevant image provider. If an image should always @@ -201,11 +201,11 @@ QDeclarativeTextureFactory::~QDeclarativeTextureFactory() \c cache property to \c false for the relevant \l Image, \l BorderImage or \l AnimatedImage object. - \sa QDeclarativeEngine::addImageProvider() + \sa QQmlEngine::addImageProvider() */ /*! - \enum QDeclarativeImageProvider::ImageType + \enum QQmlImageProvider::ImageType Defines the type of image supported by this image provider. @@ -220,18 +220,18 @@ QDeclarativeTextureFactory::~QDeclarativeTextureFactory() /*! Creates an image provider that will provide images of the given \a type. */ -QDeclarativeImageProvider::QDeclarativeImageProvider(ImageType type) - : d(new QDeclarativeImageProviderPrivate) +QQmlImageProvider::QQmlImageProvider(ImageType type) + : d(new QQmlImageProviderPrivate) { d->type = type; } /*! - Destroys the QDeclarativeImageProvider + Destroys the QQmlImageProvider \note The destructor of your derived class need to be thread safe. */ -QDeclarativeImageProvider::~QDeclarativeImageProvider() +QQmlImageProvider::~QQmlImageProvider() { delete d; } @@ -239,7 +239,7 @@ QDeclarativeImageProvider::~QDeclarativeImageProvider() /*! Returns the image type supported by this provider. */ -QDeclarativeImageProvider::ImageType QDeclarativeImageProvider::imageType() const +QQmlImageProvider::ImageType QQmlImageProvider::imageType() const { return d->type; } @@ -263,7 +263,7 @@ QDeclarativeImageProvider::ImageType QDeclarativeImageProvider::imageType() cons \note this method may be called by multiple threads, so ensure the implementation of this method is reentrant. */ -QImage QDeclarativeImageProvider::requestImage(const QString &id, QSize *size, const QSize& requestedSize) +QImage QQmlImageProvider::requestImage(const QString &id, QSize *size, const QSize& requestedSize) { Q_UNUSED(id); Q_UNUSED(size); @@ -289,7 +289,7 @@ QImage QDeclarativeImageProvider::requestImage(const QString &id, QSize *size, c is used to set the \l {Item::}{width} and \l {Item::}{height} of the relevant \l Image if these values have not been set explicitly. */ -QPixmap QDeclarativeImageProvider::requestPixmap(const QString &id, QSize *size, const QSize& requestedSize) +QPixmap QQmlImageProvider::requestPixmap(const QString &id, QSize *size, const QSize& requestedSize) { Q_UNUSED(id); Q_UNUSED(size); @@ -320,7 +320,7 @@ QPixmap QDeclarativeImageProvider::requestPixmap(const QString &id, QSize *size, implementation of this method is reentrant. */ -QDeclarativeTextureFactory *QDeclarativeImageProvider::requestTexture(const QString &id, QSize *size, const QSize &requestedSize) +QQuickTextureFactory *QQmlImageProvider::requestTexture(const QString &id, QSize *size, const QSize &requestedSize) { Q_UNUSED(id); Q_UNUSED(size); diff --git a/src/declarative/qml/qdeclarativeimageprovider.h b/src/qml/qml/qqmlimageprovider.h similarity index 77% rename from src/declarative/qml/qdeclarativeimageprovider.h rename to src/qml/qml/qqmlimageprovider.h index 55a5ca2d23..d59cfc42ca 100644 --- a/src/declarative/qml/qdeclarativeimageprovider.h +++ b/src/qml/qml/qqmlimageprovider.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEIMAGEPROVIDER_H -#define QDECLARATIVEIMAGEPROVIDER_H +#ifndef QQMLIMAGEPROVIDER_H +#define QQMLIMAGEPROVIDER_H +#include #include #include @@ -50,22 +51,22 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeImageProviderPrivate; +class QQmlImageProviderPrivate; class QSGTexture; class QQuickCanvas; -class Q_DECLARATIVE_EXPORT QDeclarativeTextureFactory : public QObject +class Q_QML_EXPORT QQuickTextureFactory : public QObject { public: - QDeclarativeTextureFactory(); - ~QDeclarativeTextureFactory(); + QQuickTextureFactory(); + ~QQuickTextureFactory(); virtual QSGTexture *createTexture(QQuickCanvas *canvas) const = 0; virtual QSize textureSize() const = 0; virtual int textureByteCount() const = 0; }; -class Q_DECLARATIVE_EXPORT QDeclarativeImageProvider +class Q_QML_EXPORT QQmlImageProvider { public: enum ImageType { @@ -75,21 +76,21 @@ class Q_DECLARATIVE_EXPORT QDeclarativeImageProvider Invalid }; - QDeclarativeImageProvider(ImageType type); - virtual ~QDeclarativeImageProvider(); + QQmlImageProvider(ImageType type); + virtual ~QQmlImageProvider(); ImageType imageType() const; virtual QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize); virtual QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize); - virtual QDeclarativeTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize); + virtual QQuickTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize); private: - QDeclarativeImageProviderPrivate *d; + QQmlImageProviderPrivate *d; }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEIMAGEPROVIDER +#endif // QQMLIMAGEPROVIDER diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/qml/qml/qqmlimport.cpp similarity index 67% rename from src/declarative/qml/qdeclarativeimport.cpp rename to src/qml/qml/qqmlimport.cpp index a8d9035079..6e74536fa3 100644 --- a/src/declarative/qml/qdeclarativeimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,17 +39,17 @@ ** ****************************************************************************/ -#include "qdeclarativeimport_p.h" +#include "qqmlimport_p.h" #include #include #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include QT_BEGIN_NAMESPACE @@ -84,7 +84,7 @@ QString resolveLocalUrl(const QString &url, const QString &relative) typedef QMap StringStringMap; Q_GLOBAL_STATIC(StringStringMap, qmlEnginePluginsWithRegisteredTypes); // stores the uri -class QDeclarativeImportedNamespace +class QQmlImportedNamespace { public: struct Data { @@ -93,62 +93,62 @@ class QDeclarativeImportedNamespace int majversion; int minversion; bool isLibrary; - QDeclarativeDirComponents qmlDirComponents; - QDeclarativeDirScripts qmlDirScripts; + QQmlDirComponents qmlDirComponents; + QQmlDirScripts qmlDirScripts; }; QList imports; - bool find_helper(QDeclarativeTypeLoader *typeLoader, const Data &data, const QString& type, int *vmajor, int *vminor, - QDeclarativeType** type_return, QString* url_return, + bool find_helper(QQmlTypeLoader *typeLoader, const Data &data, const QString& type, int *vmajor, int *vminor, + QQmlType** type_return, QString* url_return, QString *base = 0, bool *typeRecursionDetected = 0); - bool find(QDeclarativeTypeLoader *typeLoader, const QString& type, int *vmajor, int *vminor, QDeclarativeType** type_return, - QString* url_return, QString *base = 0, QList *errors = 0); + bool find(QQmlTypeLoader *typeLoader, const QString& type, int *vmajor, int *vminor, QQmlType** type_return, + QString* url_return, QString *base = 0, QList *errors = 0); }; -class QDeclarativeImportsPrivate { +class QQmlImportsPrivate { public: - QDeclarativeImportsPrivate(QDeclarativeTypeLoader *loader); - ~QDeclarativeImportsPrivate(); + QQmlImportsPrivate(QQmlTypeLoader *loader); + ~QQmlImportsPrivate(); bool importExtension(const QString &absoluteFilePath, const QString &uri, - QDeclarativeImportDatabase *database, QDeclarativeDirComponents* components, - QDeclarativeDirScripts *scripts, - QList *errors); + QQmlImportDatabase *database, QQmlDirComponents* components, + QQmlDirScripts *scripts, + QList *errors); - QString resolvedUri(const QString &dir_arg, QDeclarativeImportDatabase *database); - bool add(const QDeclarativeDirComponents &qmldircomponentsnetwork, + QString resolvedUri(const QString &dir_arg, QQmlImportDatabase *database); + bool add(const QQmlDirComponents &qmldircomponentsnetwork, const QString& uri_arg, const QString& prefix, - int vmaj, int vmin, QDeclarativeScript::Import::Type importType, - QDeclarativeImportDatabase *database, QList *errors); + int vmaj, int vmin, QQmlScript::Import::Type importType, + QQmlImportDatabase *database, QList *errors); bool find(const QString& type, int *vmajor, int *vminor, - QDeclarativeType** type_return, QString* url_return, QList *errors); + QQmlType** type_return, QString* url_return, QList *errors); - QDeclarativeImportedNamespace *findNamespace(const QString& type); + QQmlImportedNamespace *findNamespace(const QString& type); QUrl baseUrl; QString base; int ref; QSet qmlDirFilesForWhichPluginsHaveBeenLoaded; - QDeclarativeImportedNamespace unqualifiedset; - QHash set; - QDeclarativeTypeLoader *typeLoader; + QQmlImportedNamespace unqualifiedset; + QHash set; + QQmlTypeLoader *typeLoader; }; /*! -\class QDeclarativeImports -\brief The QDeclarativeImports class encapsulates one QML document's import statements. +\class QQmlImports +\brief The QQmlImports class encapsulates one QML document's import statements. \internal */ -QDeclarativeImports::QDeclarativeImports(const QDeclarativeImports ©) +QQmlImports::QQmlImports(const QQmlImports ©) : d(copy.d) { ++d->ref; } -QDeclarativeImports & -QDeclarativeImports::operator =(const QDeclarativeImports ©) +QQmlImports & +QQmlImports::operator =(const QQmlImports ©) { ++copy.d->ref; if (--d->ref == 0) @@ -157,12 +157,12 @@ QDeclarativeImports::operator =(const QDeclarativeImports ©) return *this; } -QDeclarativeImports::QDeclarativeImports(QDeclarativeTypeLoader *typeLoader) - : d(new QDeclarativeImportsPrivate(typeLoader)) +QQmlImports::QQmlImports(QQmlTypeLoader *typeLoader) + : d(new QQmlImportsPrivate(typeLoader)) { } -QDeclarativeImports::~QDeclarativeImports() +QQmlImports::~QQmlImports() { if (--d->ref == 0) delete d; @@ -171,7 +171,7 @@ QDeclarativeImports::~QDeclarativeImports() /*! Sets the base URL to be used for all relative file imports added. */ -void QDeclarativeImports::setBaseUrl(const QUrl& url, const QString &urlString) +void QQmlImports::setBaseUrl(const QUrl& url, const QString &urlString) { d->baseUrl = url; @@ -186,55 +186,55 @@ void QDeclarativeImports::setBaseUrl(const QUrl& url, const QString &urlString) /*! Returns the base URL to be used for all relative file imports added. */ -QUrl QDeclarativeImports::baseUrl() const +QUrl QQmlImports::baseUrl() const { return d->baseUrl; } -void QDeclarativeImports::populateCache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *engine) const +void QQmlImports::populateCache(QQmlTypeNameCache *cache, QQmlEngine *engine) const { - const QDeclarativeImportedNamespace &set = d->unqualifiedset; + const QQmlImportedNamespace &set = d->unqualifiedset; for (int ii = set.imports.count() - 1; ii >= 0; --ii) { - const QDeclarativeImportedNamespace::Data &data = set.imports.at(ii); - QDeclarativeTypeModule *module = QDeclarativeMetaType::typeModule(data.uri, data.majversion); + const QQmlImportedNamespace::Data &data = set.imports.at(ii); + QQmlTypeModule *module = QQmlMetaType::typeModule(data.uri, data.majversion); if (module) - cache->m_anonymousImports.append(QDeclarativeTypeModuleVersion(module, data.minversion)); + cache->m_anonymousImports.append(QQmlTypeModuleVersion(module, data.minversion)); } - for (QHash::ConstIterator iter = d->set.begin(); + for (QHash::ConstIterator iter = d->set.begin(); iter != d->set.end(); ++iter) { - const QDeclarativeImportedNamespace &set = *iter.value(); + const QQmlImportedNamespace &set = *iter.value(); for (int ii = set.imports.count() - 1; ii >= 0; --ii) { - const QDeclarativeImportedNamespace::Data &data = set.imports.at(ii); - QDeclarativeTypeModule *module = QDeclarativeMetaType::typeModule(data.uri, data.majversion); + const QQmlImportedNamespace::Data &data = set.imports.at(ii); + QQmlTypeModule *module = QQmlMetaType::typeModule(data.uri, data.majversion); if (module) { - QDeclarativeTypeNameCache::Import &import = cache->m_namedImports[iter.key()]; - import.modules.append(QDeclarativeTypeModuleVersion(module, data.minversion)); + QQmlTypeNameCache::Import &import = cache->m_namedImports[iter.key()]; + import.modules.append(QQmlTypeModuleVersion(module, data.minversion)); } - QDeclarativeMetaType::ModuleApi moduleApi = QDeclarativeMetaType::moduleApi(data.uri, data.majversion, data.minversion); + QQmlMetaType::ModuleApi moduleApi = QQmlMetaType::moduleApi(data.uri, data.majversion, data.minversion); if (moduleApi.script || moduleApi.qobject) { - QDeclarativeTypeNameCache::Import &import = cache->m_namedImports[iter.key()]; - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + QQmlTypeNameCache::Import &import = cache->m_namedImports[iter.key()]; + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); import.moduleApi = ep->moduleApiInstance(moduleApi); } } } } -QList QDeclarativeImports::resolvedScripts() const +QList QQmlImports::resolvedScripts() const { - QList scripts; + QList scripts; - const QDeclarativeImportedNamespace &set = d->unqualifiedset; + const QQmlImportedNamespace &set = d->unqualifiedset; for (int ii = set.imports.count() - 1; ii >= 0; --ii) { - const QDeclarativeImportedNamespace::Data &data = set.imports.at(ii); + const QQmlImportedNamespace::Data &data = set.imports.at(ii); - foreach (const QDeclarativeDirParser::Script &script, data.qmlDirScripts) { + foreach (const QQmlDirParser::Script &script, data.qmlDirScripts) { ScriptReference ref; ref.nameSpace = script.nameSpace; ref.location = QUrl(data.url).resolved(QUrl(script.fileName)); @@ -242,15 +242,15 @@ QList QDeclarativeImports::resolvedScripts } } - for (QHash::ConstIterator iter = d->set.constBegin(); + for (QHash::ConstIterator iter = d->set.constBegin(); iter != d->set.constEnd(); ++iter) { - const QDeclarativeImportedNamespace &set = *iter.value(); + const QQmlImportedNamespace &set = *iter.value(); for (int ii = set.imports.count() - 1; ii >= 0; --ii) { - const QDeclarativeImportedNamespace::Data &data = set.imports.at(ii); + const QQmlImportedNamespace::Data &data = set.imports.at(ii); - foreach (const QDeclarativeDirParser::Script &script, data.qmlDirScripts) { + foreach (const QQmlDirParser::Script &script, data.qmlDirScripts) { ScriptReference ref; ref.nameSpace = script.nameSpace; ref.qualifier = iter.key(); @@ -268,8 +268,8 @@ QList QDeclarativeImports::resolvedScripts The given (namespace qualified) \a type is resolved to either \list - \o a QDeclarativeImportedNamespace stored at \a ns_return, - \o a QDeclarativeType stored at \a type_return, or + \o a QQmlImportedNamespace stored at \a ns_return, + \o a QQmlType stored at \a type_return, or \o a component located at \a url_return. \endlist @@ -277,11 +277,11 @@ QList QDeclarativeImports::resolvedScripts \sa addImport() */ -bool QDeclarativeImports::resolveType(const QString& type, - QDeclarativeType** type_return, QString* url_return, int *vmaj, int *vmin, - QDeclarativeImportedNamespace** ns_return, QList *errors) const +bool QQmlImports::resolveType(const QString& type, + QQmlType** type_return, QString* url_return, int *vmaj, int *vmin, + QQmlImportedNamespace** ns_return, QList *errors) const { - QDeclarativeImportedNamespace* ns = d->findNamespace(type); + QQmlImportedNamespace* ns = d->findNamespace(type); if (ns) { if (ns_return) *ns_return = ns; @@ -291,13 +291,13 @@ bool QDeclarativeImports::resolveType(const QString& type, if (d->find(type,vmaj,vmin,type_return,url_return, errors)) { if (qmlImportTrace()) { if (type_return && *type_return && url_return && !url_return->isEmpty()) - qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: " + qDebug().nospace() << "QQmlImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: " << type << " => " << (*type_return)->typeName() << " " << *url_return; if (type_return && *type_return) - qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: " + qDebug().nospace() << "QQmlImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: " << type << " => " << (*type_return)->typeName(); if (url_return && !url_return->isEmpty()) - qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: " + qDebug().nospace() << "QQmlImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: " << type << " => " << *url_return; } return true; @@ -311,20 +311,20 @@ bool QDeclarativeImports::resolveType(const QString& type, Searching \e only in the namespace \a ns (previously returned in a call to resolveType(), \a type is found and returned to either - a QDeclarativeType stored at \a type_return, or + a QQmlType stored at \a type_return, or a component located at \a url_return. If either return pointer is 0, the corresponding search is not done. */ -bool QDeclarativeImports::resolveType(QDeclarativeImportedNamespace* ns, const QString& type, - QDeclarativeType** type_return, QString* url_return, +bool QQmlImports::resolveType(QQmlImportedNamespace* ns, const QString& type, + QQmlType** type_return, QString* url_return, int *vmaj, int *vmin) const { return ns->find(d->typeLoader,type,vmaj,vmin,type_return,url_return); } -bool QDeclarativeImportedNamespace::find_helper(QDeclarativeTypeLoader *typeLoader, const Data &data, const QString& type, int *vmajor, int *vminor, - QDeclarativeType** type_return, QString* url_return, +bool QQmlImportedNamespace::find_helper(QQmlTypeLoader *typeLoader, const Data &data, const QString& type, int *vmajor, int *vminor, + QQmlType** type_return, QString* url_return, QString *base, bool *typeRecursionDetected) { int vmaj = data.majversion; @@ -332,7 +332,7 @@ bool QDeclarativeImportedNamespace::find_helper(QDeclarativeTypeLoader *typeLoad if (vmaj >= 0 && vmin >= 0) { QString qt = data.uri + QLatin1Char('/') + type; - QDeclarativeType *t = QDeclarativeMetaType::qmlType(qt,vmaj,vmin); + QQmlType *t = QQmlMetaType::qmlType(qt,vmaj,vmin); if (t) { if (vmajor) *vmajor = vmaj; if (vminor) *vminor = vmin; @@ -342,10 +342,10 @@ bool QDeclarativeImportedNamespace::find_helper(QDeclarativeTypeLoader *typeLoad } } - const QDeclarativeDirComponents &qmldircomponents = data.qmlDirComponents; + const QQmlDirComponents &qmldircomponents = data.qmlDirComponents; bool typeWasDeclaredInQmldir = false; if (!qmldircomponents.isEmpty()) { - foreach (const QDeclarativeDirParser::Component &c, qmldircomponents) { + foreach (const QQmlDirParser::Component &c, qmldircomponents) { if (c.typeName == type) { typeWasDeclaredInQmldir = true; // importing version -1 means import ALL versions @@ -372,7 +372,7 @@ bool QDeclarativeImportedNamespace::find_helper(QDeclarativeTypeLoader *typeLoad if (!typeWasDeclaredInQmldir && !data.isLibrary) { // XXX search non-files too! (eg. zip files, see QT-524) QString url(data.url + type + QLatin1String(".qml")); - QString file = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url); + QString file = QQmlEnginePrivate::urlToLocalFileOrQrc(url); if (!typeLoader->absoluteFilePath(file).isEmpty()) { if (base && *base == url) { // no recursion if (typeRecursionDetected) @@ -387,27 +387,27 @@ bool QDeclarativeImportedNamespace::find_helper(QDeclarativeTypeLoader *typeLoad return false; } -QDeclarativeImportsPrivate::QDeclarativeImportsPrivate(QDeclarativeTypeLoader *loader) +QQmlImportsPrivate::QQmlImportsPrivate(QQmlTypeLoader *loader) : ref(1), typeLoader(loader) { } -QDeclarativeImportsPrivate::~QDeclarativeImportsPrivate() +QQmlImportsPrivate::~QQmlImportsPrivate() { - foreach (QDeclarativeImportedNamespace* s, set.values()) + foreach (QQmlImportedNamespace* s, set.values()) delete s; } -bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath, const QString &uri, - QDeclarativeImportDatabase *database, - QDeclarativeDirComponents* components, - QDeclarativeDirScripts* scripts, - QList *errors) +bool QQmlImportsPrivate::importExtension(const QString &absoluteFilePath, const QString &uri, + QQmlImportDatabase *database, + QQmlDirComponents* components, + QQmlDirScripts* scripts, + QList *errors) { - const QDeclarativeDirParser *qmldirParser = typeLoader->qmlDirParser(absoluteFilePath); + const QQmlDirParser *qmldirParser = typeLoader->qmlDirParser(absoluteFilePath); if (qmldirParser->hasError()) { if (errors) { - const QList qmldirErrors = qmldirParser->errors(uri); + const QList qmldirErrors = qmldirParser->errors(uri); for (int i = 0; i < qmldirErrors.size(); ++i) errors->prepend(qmldirErrors.at(i)); } @@ -415,7 +415,7 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath } if (qmlImportTrace()) - qDebug().nospace() << "QDeclarativeImports(" << qPrintable(base) << "::importExtension: " + qDebug().nospace() << "QQmlImports(" << qPrintable(base) << "::importExtension: " << "loaded " << absoluteFilePath; if (! qmlDirFilesForWhichPluginsHaveBeenLoaded.contains(absoluteFilePath)) { @@ -425,7 +425,7 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath int slash = absoluteFilePath.lastIndexOf(QLatin1Char('/')); if (slash > 0) qmldirPath.truncate(slash); - foreach (const QDeclarativeDirParser::Plugin &plugin, qmldirParser->plugins()) { + foreach (const QQmlDirParser::Plugin &plugin, qmldirParser->plugins()) { QString resolvedFilePath = database->resolvePlugin(typeLoader, qmldirPath, plugin.path, plugin.name); if (!resolvedFilePath.isEmpty()) { @@ -434,9 +434,9 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath // XXX TODO: should we leave the import plugin error alone? // Here, we pop it off the top and coalesce it into this error's message. // The reason is that the lower level may add url and line/column numbering information. - QDeclarativeError poppedError = errors->takeFirst(); - QDeclarativeError error; - error.setDescription(QDeclarativeImportDatabase::tr("plugin cannot be loaded for module \"%1\": %2").arg(uri).arg(poppedError.description())); + QQmlError poppedError = errors->takeFirst(); + QQmlError error; + error.setDescription(QQmlImportDatabase::tr("plugin cannot be loaded for module \"%1\": %2").arg(uri).arg(poppedError.description())); error.setUrl(QUrl::fromLocalFile(absoluteFilePath)); errors->prepend(error); } @@ -444,8 +444,8 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath } } else { if (errors) { - QDeclarativeError error; - error.setDescription(QDeclarativeImportDatabase::tr("module \"%1\" plugin \"%2\" not found").arg(uri).arg(plugin.name)); + QQmlError error; + error.setDescription(QQmlImportDatabase::tr("module \"%1\" plugin \"%2\" not found").arg(uri).arg(plugin.name)); error.setUrl(QUrl::fromLocalFile(absoluteFilePath)); errors->prepend(error); } @@ -462,7 +462,7 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath return true; } -QString QDeclarativeImportsPrivate::resolvedUri(const QString &dir_arg, QDeclarativeImportDatabase *database) +QString QQmlImportsPrivate::resolvedUri(const QString &dir_arg, QQmlImportDatabase *database) { QString dir = dir_arg; if (dir.endsWith(QLatin1Char('/')) || dir.endsWith(QLatin1Char('\\'))) @@ -493,28 +493,28 @@ QString QDeclarativeImportsPrivate::resolvedUri(const QString &dir_arg, QDeclara return stableRelativePath; } -bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomponentsnetwork, +bool QQmlImportsPrivate::add(const QQmlDirComponents &qmldircomponentsnetwork, const QString& uri_arg, const QString& prefix, int vmaj, int vmin, - QDeclarativeScript::Import::Type importType, - QDeclarativeImportDatabase *database, QList *errors) + QQmlScript::Import::Type importType, + QQmlImportDatabase *database, QList *errors) { static QLatin1String Slash_qmldir("/qmldir"); static QLatin1Char Slash('/'); - QDeclarativeDirComponents qmldircomponents = qmldircomponentsnetwork; - QDeclarativeDirScripts qmldirscripts; + QQmlDirComponents qmldircomponents = qmldircomponentsnetwork; + QQmlDirScripts qmldirscripts; QString uri = uri_arg; - QDeclarativeImportedNamespace *s; + QQmlImportedNamespace *s; if (prefix.isEmpty()) { s = &unqualifiedset; } else { s = set.value(prefix); if (!s) - set.insert(prefix,(s=new QDeclarativeImportedNamespace)); + set.insert(prefix,(s=new QQmlImportedNamespace)); } QString url = uri; bool versionFound = false; - if (importType == QDeclarativeScript::Import::Library) { + if (importType == QQmlScript::Import::Library) { Q_ASSERT(vmaj >= 0 && vmin >= 0); // Versions are always specified for libraries @@ -592,30 +592,30 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp } } - if (QDeclarativeMetaType::isModule(uri, vmaj, vmin)) + if (QQmlMetaType::isModule(uri, vmaj, vmin)) versionFound = true; if (!versionFound && qmldircomponents.isEmpty() && qmldirscripts.isEmpty()) { if (errors) { - QDeclarativeError error; // we don't set the url or line or column as these will be set by the loader. - if (QDeclarativeMetaType::isAnyModule(uri)) - error.setDescription(QDeclarativeImportDatabase::tr("module \"%1\" version %2.%3 is not installed").arg(uri_arg).arg(vmaj).arg(vmin)); + QQmlError error; // we don't set the url or line or column as these will be set by the loader. + if (QQmlMetaType::isAnyModule(uri)) + error.setDescription(QQmlImportDatabase::tr("module \"%1\" version %2.%3 is not installed").arg(uri_arg).arg(vmaj).arg(vmin)); else - error.setDescription(QDeclarativeImportDatabase::tr("module \"%1\" is not installed").arg(uri_arg)); + error.setDescription(QQmlImportDatabase::tr("module \"%1\" is not installed").arg(uri_arg)); errors->prepend(error); } return false; } } else { - if (importType == QDeclarativeScript::Import::File && qmldircomponents.isEmpty()) { + if (importType == QQmlScript::Import::File && qmldircomponents.isEmpty()) { QString importUrl = resolveLocalUrl(base, uri + Slash_qmldir); - QString localFileOrQrc = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(importUrl); + QString localFileOrQrc = QQmlEnginePrivate::urlToLocalFileOrQrc(importUrl); if (!localFileOrQrc.isEmpty()) { - QString dir = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(resolveLocalUrl(base, uri)); + QString dir = QQmlEnginePrivate::urlToLocalFileOrQrc(resolveLocalUrl(base, uri)); if (!typeLoader->directoryExists(dir)) { if (errors) { - QDeclarativeError error; // we don't set the line or column as these will be set by the loader. - error.setDescription(QDeclarativeImportDatabase::tr("\"%1\": no such directory").arg(uri_arg)); + QQmlError error; // we don't set the line or column as these will be set by the loader. + error.setDescription(QQmlImportDatabase::tr("\"%1\": no such directory").arg(uri_arg)); error.setUrl(QUrl(importUrl)); errors->prepend(error); } @@ -631,14 +631,14 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp } else { if (prefix.isEmpty()) { // directory must at least exist for valid import - QString localFileOrQrc = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(resolveLocalUrl(base, uri)); + QString localFileOrQrc = QQmlEnginePrivate::urlToLocalFileOrQrc(resolveLocalUrl(base, uri)); if (!typeLoader->directoryExists(localFileOrQrc)) { if (errors) { - QDeclarativeError error; // we don't set the line or column as these will be set by the loader. + QQmlError error; // we don't set the line or column as these will be set by the loader. if (localFileOrQrc.isEmpty()) - error.setDescription(QDeclarativeImportDatabase::tr("import \"%1\" has no qmldir and no namespace").arg(uri)); + error.setDescription(QQmlImportDatabase::tr("import \"%1\" has no qmldir and no namespace").arg(uri)); else - error.setDescription(QDeclarativeImportDatabase::tr("\"%1\": no such directory").arg(uri)); + error.setDescription(QQmlImportDatabase::tr("\"%1\": no such directory").arg(uri)); error.setUrl(QUrl(importUrl)); errors->prepend(error); } @@ -655,8 +655,8 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp int lowest_min = INT_MAX; int highest_min = INT_MIN; - QList::const_iterator cend = qmldircomponents.constEnd(); - for (QList::const_iterator cit = qmldircomponents.constBegin(); cit != cend; ++cit) { + QList::const_iterator cend = qmldircomponents.constEnd(); + for (QList::const_iterator cit = qmldircomponents.constBegin(); cit != cend; ++cit) { if (cit->majorVersion == vmaj) { lowest_min = qMin(lowest_min, cit->minorVersion); highest_min = qMax(highest_min, cit->minorVersion); @@ -665,8 +665,8 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp if (lowest_min > vmin || highest_min < vmin) { if (errors) { - QDeclarativeError error; // we don't set the url or line or column information, as these will be set by the loader. - error.setDescription(QDeclarativeImportDatabase::tr("module \"%1\" version %2.%3 is not installed").arg(uri_arg).arg(vmaj).arg(vmin)); + QQmlError error; // we don't set the url or line or column information, as these will be set by the loader. + error.setDescription(QQmlImportDatabase::tr("module \"%1\" version %2.%3 is not installed").arg(uri_arg).arg(vmaj).arg(vmin)); errors->prepend(error); } return false; @@ -676,28 +676,28 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp if (!url.endsWith(Slash)) url += Slash; - QMap scripts; + QMap scripts; if (!qmldirscripts.isEmpty()) { // Verify that we haven't imported these scripts already - QList::const_iterator end = s->imports.constEnd(); - for (QList::const_iterator it = s->imports.constBegin(); it != end; ++it) { + QList::const_iterator end = s->imports.constEnd(); + for (QList::const_iterator it = s->imports.constBegin(); it != end; ++it) { if (it->uri == uri) { - QDeclarativeError error; - error.setDescription(QDeclarativeImportDatabase::tr("\"%1\" is ambiguous. Found in %2 and in %3").arg(uri).arg(url).arg(it->url)); + QQmlError error; + error.setDescription(QQmlImportDatabase::tr("\"%1\" is ambiguous. Found in %2 and in %3").arg(uri).arg(url).arg(it->url)); errors->prepend(error); return false; } } - QList::const_iterator send = qmldirscripts.constEnd(); - for (QList::const_iterator sit = qmldirscripts.constBegin(); sit != send; ++sit) { + QList::const_iterator send = qmldirscripts.constEnd(); + for (QList::const_iterator sit = qmldirscripts.constBegin(); sit != send; ++sit) { // Only include scripts that match our requested version if (((vmaj == -1) || (sit->majorVersion == vmaj)) && ((vmin == -1) || (sit->minorVersion <= vmin))) { // Load the highest version that matches - QMap::iterator it = scripts.find(sit->nameSpace); + QMap::iterator it = scripts.find(sit->nameSpace); if (it == scripts.end() || (it->minorVersion < sit->minorVersion)) { scripts.insert(sit->nameSpace, *sit); } @@ -705,12 +705,12 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp } } - QDeclarativeImportedNamespace::Data data; + QQmlImportedNamespace::Data data; data.uri = uri; data.url = url; data.majversion = vmaj; data.minversion = vmin; - data.isLibrary = importType == QDeclarativeScript::Import::Library; + data.isLibrary = importType == QQmlScript::Import::Library; data.qmlDirComponents = qmldircomponents; data.qmlDirScripts = scripts.values(); @@ -719,18 +719,18 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp return true; } -bool QDeclarativeImportsPrivate::find(const QString& type, int *vmajor, int *vminor, QDeclarativeType** type_return, - QString* url_return, QList *errors) +bool QQmlImportsPrivate::find(const QString& type, int *vmajor, int *vminor, QQmlType** type_return, + QString* url_return, QList *errors) { - QDeclarativeImportedNamespace *s = 0; + QQmlImportedNamespace *s = 0; int slash = type.indexOf(QLatin1Char('/')); if (slash >= 0) { QString namespaceName = type.left(slash); s = set.value(namespaceName); if (!s) { if (errors) { - QDeclarativeError error; - error.setDescription(QDeclarativeImportDatabase::tr("- %1 is not a namespace").arg(namespaceName)); + QQmlError error; + error.setDescription(QQmlImportDatabase::tr("- %1 is not a namespace").arg(namespaceName)); errors->prepend(error); } return false; @@ -738,8 +738,8 @@ bool QDeclarativeImportsPrivate::find(const QString& type, int *vmajor, int *vmi int nslash = type.indexOf(QLatin1Char('/'),slash+1); if (nslash > 0) { if (errors) { - QDeclarativeError error; - error.setDescription(QDeclarativeImportDatabase::tr("- nested namespaces not allowed")); + QQmlError error; + error.setDescription(QQmlImportDatabase::tr("- nested namespaces not allowed")); errors->prepend(error); } return false; @@ -761,13 +761,13 @@ bool QDeclarativeImportsPrivate::find(const QString& type, int *vmajor, int *vmi return false; } -QDeclarativeImportedNamespace *QDeclarativeImportsPrivate::findNamespace(const QString& type) +QQmlImportedNamespace *QQmlImportsPrivate::findNamespace(const QString& type) { return set.value(type); } -bool QDeclarativeImportedNamespace::find(QDeclarativeTypeLoader *typeLoader, const QString& type, int *vmajor, int *vminor, QDeclarativeType** type_return, - QString* url_return, QString *base, QList *errors) +bool QQmlImportedNamespace::find(QQmlTypeLoader *typeLoader, const QString& type, int *vmajor, int *vminor, QQmlType** type_return, + QString* url_return, QString *base, QList *errors) { bool typeRecursionDetected = false; for (int i=0; iprepend(error); } return false; } /*! -\class QDeclarativeImportDatabase -\brief The QDeclarativeImportDatabase class manages the QML imports for a QDeclarativeEngine. +\class QQmlImportDatabase +\brief The QQmlImportDatabase class manages the QML imports for a QQmlEngine. \internal */ -QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e) +QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e) : engine(e) { filePluginPath << QLatin1String("."); @@ -858,7 +858,7 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e) addImportPath(QCoreApplication::applicationDirPath()); } -QDeclarativeImportDatabase::~QDeclarativeImportDatabase() +QQmlImportDatabase::~QQmlImportDatabase() { } @@ -876,16 +876,16 @@ QDeclarativeImportDatabase::~QDeclarativeImportDatabase() The base URL must already have been set with Import::setBaseUrl(). */ -bool QDeclarativeImports::addImport(QDeclarativeImportDatabase *importDb, +bool QQmlImports::addImport(QQmlImportDatabase *importDb, const QString& uri, const QString& prefix, int vmaj, int vmin, - QDeclarativeScript::Import::Type importType, - const QDeclarativeDirComponents &qmldircomponentsnetwork, - QList *errors) + QQmlScript::Import::Type importType, + const QQmlDirComponents &qmldircomponentsnetwork, + QList *errors) { if (qmlImportTrace()) - qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::addImport: " + qDebug().nospace() << "QQmlImports(" << qPrintable(baseUrl().toString()) << ")" << "::addImport: " << uri << " " << vmaj << '.' << vmin << " " - << (importType==QDeclarativeScript::Import::Library? "Library" : "File") + << (importType==QQmlScript::Import::Library? "Library" : "File") << " as " << prefix; return d->add(qmldircomponentsnetwork, uri, prefix, vmaj, vmin, importType, importDb, errors); @@ -899,7 +899,7 @@ bool QDeclarativeImports::addImport(QDeclarativeImportDatabase *importDb, \a qmldirPath is the location of the qmldir file. */ -QString QDeclarativeImportDatabase::resolvePlugin(QDeclarativeTypeLoader *typeLoader, +QString QQmlImportDatabase::resolvePlugin(QQmlTypeLoader *typeLoader, const QString &qmldirPath, const QString &qmldirPluginPath, const QString &baseName, const QStringList &suffixes, const QString &prefix) @@ -944,7 +944,7 @@ QString QDeclarativeImportDatabase::resolvePlugin(QDeclarativeTypeLoader *typeLo } if (qmlImportTrace()) - qDebug() << "QDeclarativeImportDatabase::resolvePlugin: Could not resolve plugin" << baseName + qDebug() << "QQmlImportDatabase::resolvePlugin: Could not resolve plugin" << baseName << "in" << qmldirPath; return QString(); @@ -966,7 +966,7 @@ QString QDeclarativeImportDatabase::resolvePlugin(QDeclarativeTypeLoader *typeLo Version number on unix are ignored. */ -QString QDeclarativeImportDatabase::resolvePlugin(QDeclarativeTypeLoader *typeLoader, +QString QQmlImportDatabase::resolvePlugin(QQmlTypeLoader *typeLoader, const QString &qmldirPath, const QString &qmldirPluginPath, const QString &baseName) { @@ -1024,7 +1024,7 @@ QString QDeclarativeImportDatabase::resolvePlugin(QDeclarativeTypeLoader *typeLo /*! \internal */ -QStringList QDeclarativeImportDatabase::pluginPathList() const +QStringList QQmlImportDatabase::pluginPathList() const { return filePluginPath; } @@ -1032,7 +1032,7 @@ QStringList QDeclarativeImportDatabase::pluginPathList() const /*! \internal */ -void QDeclarativeImportDatabase::setPluginPathList(const QStringList &paths) +void QQmlImportDatabase::setPluginPathList(const QStringList &paths) { filePluginPath = paths; } @@ -1040,10 +1040,10 @@ void QDeclarativeImportDatabase::setPluginPathList(const QStringList &paths) /*! \internal */ -void QDeclarativeImportDatabase::addPluginPath(const QString& path) +void QQmlImportDatabase::addPluginPath(const QString& path) { if (qmlImportTrace()) - qDebug().nospace() << "QDeclarativeImportDatabase::addPluginPath: " << path; + qDebug().nospace() << "QQmlImportDatabase::addPluginPath: " << path; QUrl url = QUrl(path); if (url.isRelative() || url.scheme() == QLatin1String("file") @@ -1058,10 +1058,10 @@ void QDeclarativeImportDatabase::addPluginPath(const QString& path) /*! \internal */ -void QDeclarativeImportDatabase::addImportPath(const QString& path) +void QQmlImportDatabase::addImportPath(const QString& path) { if (qmlImportTrace()) - qDebug().nospace() << "QDeclarativeImportDatabase::addImportPath: " << path; + qDebug().nospace() << "QQmlImportDatabase::addImportPath: " << path; if (path.isEmpty()) return; @@ -1086,7 +1086,7 @@ void QDeclarativeImportDatabase::addImportPath(const QString& path) /*! \internal */ -QStringList QDeclarativeImportDatabase::importPathList() const +QStringList QQmlImportDatabase::importPathList() const { return fileImportPath; } @@ -1094,7 +1094,7 @@ QStringList QDeclarativeImportDatabase::importPathList() const /*! \internal */ -void QDeclarativeImportDatabase::setImportPathList(const QStringList &paths) +void QQmlImportDatabase::setImportPathList(const QStringList &paths) { fileImportPath = paths; } @@ -1102,10 +1102,10 @@ void QDeclarativeImportDatabase::setImportPathList(const QStringList &paths) /*! \internal */ -bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QString &uri, QList *errors) +bool QQmlImportDatabase::importPlugin(const QString &filePath, const QString &uri, QList *errors) { if (qmlImportTrace()) - qDebug().nospace() << "QDeclarativeImportDatabase::importPlugin: " << uri << " from " << filePath; + qDebug().nospace() << "QQmlImportDatabase::importPlugin: " << uri << " from " << filePath; #ifndef QT_NO_LIBRARY QFileInfo fileInfo(filePath); @@ -1116,14 +1116,14 @@ bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QSt if (typesRegistered) { Q_ASSERT_X(qmlEnginePluginsWithRegisteredTypes()->value(absoluteFilePath) == uri, - "QDeclarativeImportDatabase::importExtension", + "QQmlImportDatabase::importExtension", "Internal error: Plugin imported previously with different uri"); } if (!engineInitialized || !typesRegistered) { - if (!QDeclarative_isFileCaseCorrect(absoluteFilePath)) { + if (!QQml_isFileCaseCorrect(absoluteFilePath)) { if (errors) { - QDeclarativeError error; + QQmlError error; error.setDescription(tr("File name case mismatch for \"%1\"").arg(absoluteFilePath)); errors->prepend(error); } @@ -1133,7 +1133,7 @@ bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QSt if (!loader.load()) { if (errors) { - QDeclarativeError error; + QQmlError error; error.setDescription(loader.errorString()); errors->prepend(error); } @@ -1141,7 +1141,7 @@ bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QSt } QObject *instance = loader.instance(); - if (QDeclarativeTypesExtensionInterface *iface = qobject_cast(instance)) { + if (QQmlTypesExtensionInterface *iface = qobject_cast(instance)) { const QByteArray bytes = uri.toUtf8(); const char *moduleId = bytes.constData(); @@ -1157,16 +1157,16 @@ bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QSt // XXX protect against double initialization initializedPlugins.insert(absoluteFilePath); - QDeclarativeExtensionInterface *eiface = - qobject_cast(instance); + QQmlExtensionInterface *eiface = + qobject_cast(instance); if (eiface) { - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); ep->typeLoader.initializeEngine(eiface, moduleId); } } } else { if (errors) { - QDeclarativeError error; + QQmlError error; error.setDescription(loader.errorString()); errors->prepend(error); } diff --git a/src/declarative/qml/qdeclarativeimport_p.h b/src/qml/qml/qqmlimport_p.h similarity index 65% rename from src/declarative/qml/qdeclarativeimport_p.h rename to src/qml/qml/qqmlimport_p.h index 6dae0f38b9..ff19510525 100644 --- a/src/declarative/qml/qdeclarativeimport_p.h +++ b/src/qml/qml/qqmlimport_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,16 +39,16 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEIMPORT_P_H -#define QDECLARATIVEIMPORT_P_H +#ifndef QQMLIMPORT_P_H +#define QQMLIMPORT_P_H #include #include #include #include -#include -#include -#include +#include +#include +#include // // W A R N I N G @@ -63,43 +63,43 @@ QT_BEGIN_NAMESPACE -class QDeclarativeTypeNameCache; -class QDeclarativeEngine; +class QQmlTypeNameCache; +class QQmlEngine; class QDir; -class QDeclarativeImportedNamespace; -class QDeclarativeImportsPrivate; -class QDeclarativeImportDatabase; -class QDeclarativeTypeLoader; +class QQmlImportedNamespace; +class QQmlImportsPrivate; +class QQmlImportDatabase; +class QQmlTypeLoader; // Exported for QtQuick1 -class Q_DECLARATIVE_EXPORT QDeclarativeImports +class Q_QML_EXPORT QQmlImports { public: - QDeclarativeImports(QDeclarativeTypeLoader *); - QDeclarativeImports(const QDeclarativeImports &); - ~QDeclarativeImports(); - QDeclarativeImports &operator=(const QDeclarativeImports &); + QQmlImports(QQmlTypeLoader *); + QQmlImports(const QQmlImports &); + ~QQmlImports(); + QQmlImports &operator=(const QQmlImports &); void setBaseUrl(const QUrl &url, const QString &urlString = QString()); QUrl baseUrl() const; bool resolveType(const QString& type, - QDeclarativeType** type_return, QString* url_return, + QQmlType** type_return, QString* url_return, int *version_major, int *version_minor, - QDeclarativeImportedNamespace** ns_return, - QList *errors = 0) const; - bool resolveType(QDeclarativeImportedNamespace*, + QQmlImportedNamespace** ns_return, + QList *errors = 0) const; + bool resolveType(QQmlImportedNamespace*, const QString& type, - QDeclarativeType** type_return, QString* url_return, + QQmlType** type_return, QString* url_return, int *version_major, int *version_minor) const; - bool addImport(QDeclarativeImportDatabase *, + bool addImport(QQmlImportDatabase *, const QString& uri, const QString& prefix, int vmaj, int vmin, - QDeclarativeScript::Import::Type importType, - const QDeclarativeDirComponents &qmldircomponentsnetwork, - QList *errors); + QQmlScript::Import::Type importType, + const QQmlDirComponents &qmldircomponentsnetwork, + QList *errors); - void populateCache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *) const; + void populateCache(QQmlTypeNameCache *cache, QQmlEngine *) const; struct ScriptReference { @@ -111,18 +111,18 @@ class Q_DECLARATIVE_EXPORT QDeclarativeImports QList resolvedScripts() const; private: - friend class QDeclarativeImportDatabase; - QDeclarativeImportsPrivate *d; + friend class QQmlImportDatabase; + QQmlImportsPrivate *d; }; -class QDeclarativeImportDatabase +class QQmlImportDatabase { - Q_DECLARE_TR_FUNCTIONS(QDeclarativeImportDatabase) + Q_DECLARE_TR_FUNCTIONS(QQmlImportDatabase) public: - QDeclarativeImportDatabase(QDeclarativeEngine *); - ~QDeclarativeImportDatabase(); + QQmlImportDatabase(QQmlEngine *); + ~QQmlImportDatabase(); - bool importPlugin(const QString &filePath, const QString &uri, QList *errors); + bool importPlugin(const QString &filePath, const QString &uri, QList *errors); QStringList importPathList() const; void setImportPathList(const QStringList &paths); @@ -133,12 +133,12 @@ class QDeclarativeImportDatabase void addPluginPath(const QString& path); private: - friend class QDeclarativeImportsPrivate; - QString resolvePlugin(QDeclarativeTypeLoader *typeLoader, + friend class QQmlImportsPrivate; + QString resolvePlugin(QQmlTypeLoader *typeLoader, const QString &qmldirPath, const QString &qmldirPluginPath, const QString &baseName, const QStringList &suffixes, const QString &prefix = QString()); - QString resolvePlugin(QDeclarativeTypeLoader *typeLoader, + QString resolvePlugin(QQmlTypeLoader *typeLoader, const QString &qmldirPath, const QString &qmldirPluginPath, const QString &baseName); @@ -148,10 +148,10 @@ class QDeclarativeImportDatabase QStringList fileImportPath; QSet initializedPlugins; - QDeclarativeEngine *engine; + QQmlEngine *engine; }; QT_END_NAMESPACE -#endif // QDECLARATIVEIMPORT_P_H +#endif // QQMLIMPORT_P_H diff --git a/src/declarative/qml/qdeclarativeincubator.cpp b/src/qml/qml/qqmlincubator.cpp similarity index 64% rename from src/declarative/qml/qdeclarativeincubator.cpp rename to src/qml/qml/qqmlincubator.cpp index 38f172f795..ee622ba048 100644 --- a/src/declarative/qml/qdeclarativeincubator.cpp +++ b/src/qml/qml/qqmlincubator.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,58 +39,58 @@ ** ****************************************************************************/ -#include "qdeclarativeincubator.h" -#include "qdeclarativecomponent.h" -#include "qdeclarativeincubator_p.h" +#include "qqmlincubator.h" +#include "qqmlcomponent.h" +#include "qqmlincubator_p.h" -#include "qdeclarativecompiler_p.h" -#include "qdeclarativeexpression_p.h" +#include "qqmlcompiler_p.h" +#include "qqmlexpression_p.h" // XXX TODO // - check that the Component.onCompleted behavior is the same as 4.8 in the synchronous and // async if nested cases -void QDeclarativeEnginePrivate::incubate(QDeclarativeIncubator &i, QDeclarativeContextData *forContext) +void QQmlEnginePrivate::incubate(QQmlIncubator &i, QQmlContextData *forContext) { - QDeclarativeIncubatorPrivate *p = i.d; + QQmlIncubatorPrivate *p = i.d; - QDeclarativeIncubator::IncubationMode mode = i.incubationMode(); + QQmlIncubator::IncubationMode mode = i.incubationMode(); if (!incubationController) - mode = QDeclarativeIncubator::Synchronous; + mode = QQmlIncubator::Synchronous; - if (mode == QDeclarativeIncubator::AsynchronousIfNested) { - mode = QDeclarativeIncubator::Synchronous; + if (mode == QQmlIncubator::AsynchronousIfNested) { + mode = QQmlIncubator::Synchronous; // Need to find the first constructing context and see if it is asynchronous - QDeclarativeIncubatorPrivate *parentIncubator = 0; - QDeclarativeContextData *cctxt = forContext; + QQmlIncubatorPrivate *parentIncubator = 0; + QQmlContextData *cctxt = forContext; while (cctxt) { if (cctxt->activeVMEData) { - parentIncubator = (QDeclarativeIncubatorPrivate *)cctxt->activeVMEData; + parentIncubator = (QQmlIncubatorPrivate *)cctxt->activeVMEData; break; } cctxt = cctxt->parent; } if (parentIncubator && parentIncubator->isAsynchronous) { - mode = QDeclarativeIncubator::Asynchronous; + mode = QQmlIncubator::Asynchronous; p->waitingOnMe = parentIncubator; parentIncubator->waitingFor.insert(p); } } - p->isAsynchronous = (mode != QDeclarativeIncubator::Synchronous); + p->isAsynchronous = (mode != QQmlIncubator::Synchronous); inProgressCreations++; - if (mode == QDeclarativeIncubator::Synchronous) { - typedef QDeclarativeIncubatorPrivate IP; + if (mode == QQmlIncubator::Synchronous) { + typedef QQmlIncubatorPrivate IP; QRecursionWatcher watcher(p); - p->changeStatus(QDeclarativeIncubator::Loading); + p->changeStatus(QQmlIncubator::Loading); if (!watcher.hasRecursed()) { - QDeclarativeVME::Interrupt i; + QQmlVME::Interrupt i; p->incubate(i); } } else { @@ -98,7 +98,7 @@ void QDeclarativeEnginePrivate::incubate(QDeclarativeIncubator &i, QDeclarativeC incubatorCount++; p->vmeGuard.guard(&p->vme); - p->changeStatus(QDeclarativeIncubator::Loading); + p->changeStatus(QQmlIncubator::Loading); if (incubationController) incubationController->incubatingObjectCountChanged(incubatorCount); @@ -111,9 +111,9 @@ and it does not take ownership of it. \sa incubationController() */ -void QDeclarativeEngine::setIncubationController(QDeclarativeIncubationController *controller) +void QQmlEngine::setIncubationController(QQmlIncubationController *controller) { - Q_D(QDeclarativeEngine); + Q_D(QQmlEngine); if (d->incubationController) d->incubationController->d = 0; d->incubationController = controller; @@ -125,33 +125,33 @@ Returns the currently set incubation controller, or 0 if no controller has been \sa setIncubationController() */ -QDeclarativeIncubationController *QDeclarativeEngine::incubationController() const +QQmlIncubationController *QQmlEngine::incubationController() const { - Q_D(const QDeclarativeEngine); + Q_D(const QQmlEngine); return d->incubationController; } -QDeclarativeIncubatorPrivate::QDeclarativeIncubatorPrivate(QDeclarativeIncubator *q, - QDeclarativeIncubator::IncubationMode m) -: q(q), status(QDeclarativeIncubator::Null), mode(m), isAsynchronous(false), progress(Execute), +QQmlIncubatorPrivate::QQmlIncubatorPrivate(QQmlIncubator *q, + QQmlIncubator::IncubationMode m) +: q(q), status(QQmlIncubator::Null), mode(m), isAsynchronous(false), progress(Execute), result(0), component(0), vme(this), waitingOnMe(0) { } -QDeclarativeIncubatorPrivate::~QDeclarativeIncubatorPrivate() +QQmlIncubatorPrivate::~QQmlIncubatorPrivate() { } -void QDeclarativeIncubatorPrivate::clear() +void QQmlIncubatorPrivate::clear() { if (next.isInList()) { next.remove(); Q_ASSERT(component); - QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(component->engine); + QQmlEnginePrivate *enginePriv = QQmlEnginePrivate::get(component->engine); component->release(); component = 0; enginePriv->incubatorCount--; - QDeclarativeIncubationController *controller = enginePriv->incubationController; + QQmlIncubationController *controller = enginePriv->incubationController; if (controller) controller->incubatingObjectCountChanged(enginePriv->incubatorCount); } else if (component) { @@ -171,18 +171,18 @@ void QDeclarativeIncubatorPrivate::clear() } /*! -\class QDeclarativeIncubationController -\brief QDeclarativeIncubationController instances drive the progress of QDeclarativeIncubators +\class QQmlIncubationController +\brief QQmlIncubationController instances drive the progress of QQmlIncubators In order to behave asynchronously and not introduce stutters or freezes in an application, -the process of creating objects a QDeclarativeIncubators must be driven only during the -application's idle time. QDeclarativeIncubationController allows the application to control +the process of creating objects a QQmlIncubators must be driven only during the +application's idle time. QQmlIncubationController allows the application to control exactly when, how often and for how long this processing occurs. -A QDeclarativeIncubationController derived instance should be created and set on a -QDeclarativeEngine by calling the QDeclarativeEngine::setIncubationController() method. -Processing is then controlled by calling the QDeclarativeIncubationController::incubateFor() -or QDeclarativeIncubationController::incubateWhile() methods as dictated by the application's +A QQmlIncubationController derived instance should be created and set on a +QQmlEngine by calling the QQmlEngine::setIncubationController() method. +Processing is then controlled by calling the QQmlIncubationController::incubateFor() +or QQmlIncubationController::incubateWhile() methods as dictated by the application's requirements. For example, this is an example of a incubation controller that will incubate for a maximum @@ -190,7 +190,7 @@ of 5 milliseconds out of every 16 milliseconds. \code class PeriodicIncubationController : public QObject, - public QDeclarativeIncubationController + public QQmlIncubationController { public: PeriodicIncubationController() { @@ -212,31 +212,31 @@ than a static amount like 5 milliseconds - while not disturbing the application. /*! Create a new incubation controller. */ -QDeclarativeIncubationController::QDeclarativeIncubationController() +QQmlIncubationController::QQmlIncubationController() : d(0) { } /*! \internal */ -QDeclarativeIncubationController::~QDeclarativeIncubationController() +QQmlIncubationController::~QQmlIncubationController() { - if (d) QDeclarativeEnginePrivate::get(d)->setIncubationController(0); + if (d) QQmlEnginePrivate::get(d)->setIncubationController(0); d = 0; } /*! -Return the QDeclarativeEngine this incubation controller is set on, or 0 if it +Return the QQmlEngine this incubation controller is set on, or 0 if it has not been set on any engine. */ -QDeclarativeEngine *QDeclarativeIncubationController::engine() const +QQmlEngine *QQmlIncubationController::engine() const { - return QDeclarativeEnginePrivate::get(d); + return QQmlEnginePrivate::get(d); } /*! Return the number of objects currently incubating. */ -int QDeclarativeIncubationController::incubatingObjectCount() const +int QQmlIncubationController::incubatingObjectCount() const { if (d) return d->incubatorCount; @@ -250,35 +250,35 @@ new number of incubating objects. The default implementation does nothing. */ -void QDeclarativeIncubationController::incubatingObjectCountChanged(int incubatingObjectCount) +void QQmlIncubationController::incubatingObjectCountChanged(int incubatingObjectCount) { Q_UNUSED(incubatingObjectCount); } -void QDeclarativeIncubatorPrivate::incubate(QDeclarativeVME::Interrupt &i) +void QQmlIncubatorPrivate::incubate(QQmlVME::Interrupt &i) { if (!component) return; - typedef QDeclarativeIncubatorPrivate IP; + typedef QQmlIncubatorPrivate IP; QRecursionWatcher watcher(this); - QDeclarativeEngine *engine = component->engine; - QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine); + QQmlEngine *engine = component->engine; + QQmlEnginePrivate *enginePriv = QQmlEnginePrivate::get(engine); bool guardOk = vmeGuard.isOK(); vmeGuard.clear(); if (!guardOk) { - QDeclarativeError error; + QQmlError error; error.setUrl(component->url); - error.setDescription(QDeclarativeComponent::tr("Object destroyed during incubation")); + error.setDescription(QQmlComponent::tr("Object destroyed during incubation")); errors << error; - progress = QDeclarativeIncubatorPrivate::Completed; + progress = QQmlIncubatorPrivate::Completed; goto finishIncubate; } - if (progress == QDeclarativeIncubatorPrivate::Execute) { + if (progress == QQmlIncubatorPrivate::Execute) { enginePriv->referenceScarceResources(); QObject *tresult = vme.execute(&errors, i); enginePriv->dereferenceScarceResources(); @@ -291,7 +291,7 @@ void QDeclarativeIncubatorPrivate::incubate(QDeclarativeVME::Interrupt &i) goto finishIncubate; if (result) { - QDeclarativeData *ddata = QDeclarativeData::get(result); + QQmlData *ddata = QQmlData::get(result); Q_ASSERT(ddata); ddata->indestructible = true; @@ -302,9 +302,9 @@ void QDeclarativeIncubatorPrivate::incubate(QDeclarativeVME::Interrupt &i) return; if (errors.isEmpty()) - progress = QDeclarativeIncubatorPrivate::Completing; + progress = QQmlIncubatorPrivate::Completing; else - progress = QDeclarativeIncubatorPrivate::Completed; + progress = QQmlIncubatorPrivate::Completed; changeStatus(calculateStatus()); @@ -315,25 +315,25 @@ void QDeclarativeIncubatorPrivate::incubate(QDeclarativeVME::Interrupt &i) goto finishIncubate; } - if (progress == QDeclarativeIncubatorPrivate::Completing) { + if (progress == QQmlIncubatorPrivate::Completing) { do { if (watcher.hasRecursed()) return; - QDeclarativeContextData *ctxt = vme.complete(i); + QQmlContextData *ctxt = vme.complete(i); if (ctxt) { rootContext = ctxt; - progress = QDeclarativeIncubatorPrivate::Completed; + progress = QQmlIncubatorPrivate::Completed; goto finishIncubate; } } while (!i.shouldInterrupt()); } finishIncubate: - if (progress == QDeclarativeIncubatorPrivate::Completed && waitingFor.isEmpty()) { - typedef QDeclarativeIncubatorPrivate IP; + if (progress == QQmlIncubatorPrivate::Completed && waitingFor.isEmpty()) { + typedef QQmlIncubatorPrivate IP; - QDeclarativeIncubatorPrivate *isWaiting = waitingOnMe; + QQmlIncubatorPrivate *isWaiting = waitingOnMe; clear(); if (isWaiting) { @@ -361,15 +361,15 @@ void QDeclarativeIncubatorPrivate::incubate(QDeclarativeVME::Interrupt &i) /*! Incubate objects for \a msecs, or until there are no more objects to incubate. */ -void QDeclarativeIncubationController::incubateFor(int msecs) +void QQmlIncubationController::incubateFor(int msecs) { if (!d || d->incubatorCount == 0) return; - QDeclarativeVME::Interrupt i(msecs * 1000000); + QQmlVME::Interrupt i(msecs * 1000000); i.reset(); do { - QDeclarativeIncubatorPrivate *p = (QDeclarativeIncubatorPrivate*)d->incubatorList.first(); + QQmlIncubatorPrivate *p = (QQmlIncubatorPrivate*)d->incubatorList.first(); p->incubate(i); } while (d && d->incubatorCount != 0 && !i.shouldInterrupt()); } @@ -381,34 +381,34 @@ more objects to incubate. Generally this method is used in conjunction with a thread or a UNIX signal that sets the bool pointed to by \a flag to false when it wants incubation to be interrupted. */ -void QDeclarativeIncubationController::incubateWhile(bool *flag) +void QQmlIncubationController::incubateWhile(bool *flag) { if (!d || d->incubatorCount == 0) return; - QDeclarativeVME::Interrupt i(flag); + QQmlVME::Interrupt i(flag); do { - QDeclarativeIncubatorPrivate *p = (QDeclarativeIncubatorPrivate*)d->incubatorList.first(); + QQmlIncubatorPrivate *p = (QQmlIncubatorPrivate*)d->incubatorList.first(); p->incubate(i); } while (d && d->incubatorCount != 0 && !i.shouldInterrupt()); } /*! -\class QDeclarativeIncubator -\brief The QDeclarativeIncubator class allows QML objects to be created asynchronously. +\class QQmlIncubator +\brief The QQmlIncubator class allows QML objects to be created asynchronously. Creating QML objects - like delegates in a view, or a new page in an application - can take a noticable amount of time, especially on resource constrained mobile devices. When an -application uses QDeclarativeComponent::create() directly, the QML object instance is created +application uses QQmlComponent::create() directly, the QML object instance is created synchronously which, depending on the complexity of the object, can cause noticable pauses or stutters in the application. -The use of QDeclarativeIncubator gives more control over the creation of a QML object, +The use of QQmlIncubator gives more control over the creation of a QML object, including allowing it to be created asynchronously using application idle time. The following -example shows a simple use of QDeclarativeIncubator. +example shows a simple use of QQmlIncubator. \code -QDeclarativeIncubator incubator; +QQmlIncubator incubator; component->create(incubator); while (incubator.isReady()) { @@ -418,23 +418,23 @@ while (incubator.isReady()) { QObject *object = incubator.object(); \endcode -Asynchronous incubators are controlled by a QDeclarativeIncubationController that is -set on the QDeclarativeEngine, which lets the engine know when the application is idle and +Asynchronous incubators are controlled by a QQmlIncubationController that is +set on the QQmlEngine, which lets the engine know when the application is idle and incubating objects should be processed. If an incubation controller is not set on the -QDeclarativeEngine, QDeclarativeIncubator creates objects synchronously regardless of the +QQmlEngine, QQmlIncubator creates objects synchronously regardless of the specified IncubationMode. -QDeclarativeIncubator supports three incubation modes: +QQmlIncubator supports three incubation modes: \list \i Synchronous The creation occurs synchronously. That is, once the -QDeclarativeComponent::create() call returns, the incubator will already be in either the +QQmlComponent::create() call returns, the incubator will already be in either the Error or Ready state. A synchronous incubator has no real advantage compared to using -the synchronous creation methods on QDeclarativeComponent directly, but it may simplify an +the synchronous creation methods on QQmlComponent directly, but it may simplify an application's implementation to use the same API for both synchronous and asynchronous creations. \i Asynchronous (default) The creation occurs asynchronously, assuming a -QDeclarativeIncubatorController is set on the QDeclarativeEngine. +QQmlIncubatorController is set on the QQmlEngine. The incubator will remain in the Loading state until either the creation is complete or an error occurs. The statusChanged() callback can be used to be notified of status changes. @@ -442,7 +442,7 @@ occurs. The statusChanged() callback can be used to be notified of status chang Applications should use the Asynchronous incubation mode to create objects that are not needed immediately. For example, the ListView element uses Asynchronous incubation to create objects that are slightly off screen while the list is being scrolled. If, during asynchronous creation, -the object is needed immediately the QDeclarativeIncubator::forceCompletion() method can be called +the object is needed immediately the QQmlIncubator::forceCompletion() method can be called to complete the creation process synchronously. \i AsynchronousIfNested The creation will occur asynchronously if part of a nested asynchronous @@ -478,13 +478,13 @@ or stutters into the application, should use the AsynchronousIfNested incubation /*! Create a new incubator with the specified \a mode */ -QDeclarativeIncubator::QDeclarativeIncubator(IncubationMode mode) -: d(new QDeclarativeIncubatorPrivate(this, mode)) +QQmlIncubator::QQmlIncubator(IncubationMode mode) +: d(new QQmlIncubatorPrivate(this, mode)) { } /*! \internal */ -QDeclarativeIncubator::~QDeclarativeIncubator() +QQmlIncubator::~QQmlIncubator() { clear(); @@ -492,11 +492,11 @@ QDeclarativeIncubator::~QDeclarativeIncubator() } /*! -\enum QDeclarativeIncubator::IncubationMode +\enum QQmlIncubator::IncubationMode Specifies the mode the incubator operates in. Regardless of the incubation mode, a -QDeclarativeIncubator will behave synchronously if the QDeclarativeEngine does not have -a QDeclarativeIncubationController set. +QQmlIncubator will behave synchronously if the QQmlEngine does not have +a QQmlIncubationController set. \value Asynchronous The object will be created asynchronously. \value AsynchronousIfNested If the object is being created in a context that is already part @@ -507,11 +507,11 @@ incubation have completed. Otherwise, the incubation will execute synchronously */ /*! -\enum QDeclarativeIncubator::Status +\enum QQmlIncubator::Status -Specifies the status of the QDeclarativeIncubator. +Specifies the status of the QQmlIncubator. -\value Null Incubation is not in progress. Call QDeclarativeComponent::create() to begin incubating. +\value Null Incubation is not in progress. Call QQmlComponent::create() to begin incubating. \value Ready The object is fully created and can be accessed by calling object(). \value Loading The object is in the process of being created. \value Error An error occurred. The errors can be access by calling errors(). @@ -521,9 +521,9 @@ Specifies the status of the QDeclarativeIncubator. Clears the incubator. Any in-progress incubation is aborted. If the incubator is in the Ready state, the created object is \b not deleted. */ -void QDeclarativeIncubator::clear() +void QQmlIncubator::clear() { - typedef QDeclarativeIncubatorPrivate IP; + typedef QQmlIncubatorPrivate IP; QRecursionWatcher watcher(d); Status s = status(); @@ -531,10 +531,10 @@ void QDeclarativeIncubator::clear() if (s == Null) return; - QDeclarativeEnginePrivate *enginePriv = 0; + QQmlEnginePrivate *enginePriv = 0; if (s == Loading) { Q_ASSERT(d->component); - enginePriv = QDeclarativeEnginePrivate::get(d->component->engine); + enginePriv = QQmlEnginePrivate::get(d->component->engine); if (d->result) d->result->deleteLater(); d->result = 0; } @@ -550,7 +550,7 @@ void QDeclarativeIncubator::clear() Q_ASSERT(!d->nextWaitingFor.isInList()); d->errors.clear(); - d->progress = QDeclarativeIncubatorPrivate::Execute; + d->progress = QQmlIncubatorPrivate::Execute; d->result = 0; if (s == Loading) { @@ -572,12 +572,12 @@ void QDeclarativeIncubator::clear() Force any in-progress incubation to finish synchronously. Once this call returns, the incubator will not be in the Loading state. */ -void QDeclarativeIncubator::forceCompletion() +void QQmlIncubator::forceCompletion() { - QDeclarativeVME::Interrupt i; + QQmlVME::Interrupt i; while (Loading == status()) { while (Loading == status() && !d->waitingFor.isEmpty()) - static_cast(d->waitingFor.first())->incubate(i); + static_cast(d->waitingFor.first())->incubate(i); if (Loading == status()) d->incubate(i); } @@ -586,7 +586,7 @@ void QDeclarativeIncubator::forceCompletion() /*! Returns true if the incubator's status() is Null. */ -bool QDeclarativeIncubator::isNull() const +bool QQmlIncubator::isNull() const { return status() == Null; } @@ -594,7 +594,7 @@ bool QDeclarativeIncubator::isNull() const /*! Returns true if the incubator's status() is Ready. */ -bool QDeclarativeIncubator::isReady() const +bool QQmlIncubator::isReady() const { return status() == Ready; } @@ -602,7 +602,7 @@ bool QDeclarativeIncubator::isReady() const /*! Returns true if the incubator's status() is Error. */ -bool QDeclarativeIncubator::isError() const +bool QQmlIncubator::isError() const { return status() == Error; } @@ -610,7 +610,7 @@ bool QDeclarativeIncubator::isError() const /*! Returns true if the incubator's status() is Loading. */ -bool QDeclarativeIncubator::isLoading() const +bool QQmlIncubator::isLoading() const { return status() == Loading; } @@ -618,15 +618,15 @@ bool QDeclarativeIncubator::isLoading() const /*! Return the list of errors encountered while incubating the object. */ -QList QDeclarativeIncubator::errors() const +QList QQmlIncubator::errors() const { return d->errors; } /*! -Return the incubation mode passed to the QDeclarativeIncubator constructor. +Return the incubation mode passed to the QQmlIncubator constructor. */ -QDeclarativeIncubator::IncubationMode QDeclarativeIncubator::incubationMode() const +QQmlIncubator::IncubationMode QQmlIncubator::incubationMode() const { return d->mode; } @@ -634,7 +634,7 @@ QDeclarativeIncubator::IncubationMode QDeclarativeIncubator::incubationMode() co /*! Return the current status of the incubator. */ -QDeclarativeIncubator::Status QDeclarativeIncubator::status() const +QQmlIncubator::Status QQmlIncubator::status() const { return d->status; } @@ -642,7 +642,7 @@ QDeclarativeIncubator::Status QDeclarativeIncubator::status() const /*! Return the incubated object if the status is Ready, otherwise 0. */ -QObject *QDeclarativeIncubator::object() const +QObject *QQmlIncubator::object() const { if (status() != Ready) return 0; else return d->result; @@ -653,26 +653,26 @@ Called when the status of the incubator changes. \a status is the new status. The default implementation does nothing. */ -void QDeclarativeIncubator::statusChanged(Status status) +void QQmlIncubator::statusChanged(Status status) { Q_UNUSED(status); } /*! Called after the object is first created, but before property bindings are -evaluated and, if applicable, QDeclarativeParserStatus::componentComplete() is -called. This is equivalent to the point between QDeclarativeComponent::beginCreate() -and QDeclarativeComponent::endCreate(), and can be used to assign initial values +evaluated and, if applicable, QQmlParserStatus::componentComplete() is +called. This is equivalent to the point between QQmlComponent::beginCreate() +and QQmlComponent::endCreate(), and can be used to assign initial values to the object's properties. The default implementation does nothing. */ -void QDeclarativeIncubator::setInitialState(QObject *object) +void QQmlIncubator::setInitialState(QObject *object) { Q_UNUSED(object); } -void QDeclarativeIncubatorPrivate::changeStatus(QDeclarativeIncubator::Status s) +void QQmlIncubatorPrivate::changeStatus(QQmlIncubator::Status s) { if (s == status) return; @@ -681,16 +681,16 @@ void QDeclarativeIncubatorPrivate::changeStatus(QDeclarativeIncubator::Status s) q->statusChanged(status); } -QDeclarativeIncubator::Status QDeclarativeIncubatorPrivate::calculateStatus() const +QQmlIncubator::Status QQmlIncubatorPrivate::calculateStatus() const { if (!errors.isEmpty()) - return QDeclarativeIncubator::Error; - else if (result && progress == QDeclarativeIncubatorPrivate::Completed && + return QQmlIncubator::Error; + else if (result && progress == QQmlIncubatorPrivate::Completed && waitingFor.isEmpty()) - return QDeclarativeIncubator::Ready; + return QQmlIncubator::Ready; else if (component) - return QDeclarativeIncubator::Loading; + return QQmlIncubator::Loading; else - return QDeclarativeIncubator::Null; + return QQmlIncubator::Null; } diff --git a/src/declarative/qml/qdeclarativeincubator.h b/src/qml/qml/qqmlincubator.h similarity index 68% rename from src/declarative/qml/qdeclarativeincubator.h rename to src/qml/qml/qqmlincubator.h index cabd7e2b28..5d8ae7d6c3 100644 --- a/src/declarative/qml/qdeclarativeincubator.h +++ b/src/qml/qml/qqmlincubator.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,22 +39,22 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEINCUBATOR_H -#define QDECLARATIVEINCUBATOR_H +#ifndef QQMLINCUBATOR_H +#define QQMLINCUBATOR_H -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeEngine; +class QQmlEngine; -class QDeclarativeIncubatorPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeIncubator +class QQmlIncubatorPrivate; +class Q_QML_EXPORT QQmlIncubator { - Q_DISABLE_COPY(QDeclarativeIncubator) + Q_DISABLE_COPY(QQmlIncubator) public: enum IncubationMode { Asynchronous, @@ -68,8 +68,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativeIncubator Error }; - QDeclarativeIncubator(IncubationMode = Asynchronous); - virtual ~QDeclarativeIncubator(); + QQmlIncubator(IncubationMode = Asynchronous); + virtual ~QQmlIncubator(); void clear(); void forceCompletion(); @@ -79,7 +79,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeIncubator bool isError() const; bool isLoading() const; - QList errors() const; + QList errors() const; IncubationMode incubationMode() const; @@ -92,21 +92,21 @@ class Q_DECLARATIVE_EXPORT QDeclarativeIncubator virtual void setInitialState(QObject *); private: - friend class QDeclarativeComponent; - friend class QDeclarativeEnginePrivate; - friend class QDeclarativeIncubatorPrivate; - QDeclarativeIncubatorPrivate *d; + friend class QQmlComponent; + friend class QQmlEnginePrivate; + friend class QQmlIncubatorPrivate; + QQmlIncubatorPrivate *d; }; -class QDeclarativeEnginePrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeIncubationController +class QQmlEnginePrivate; +class Q_QML_EXPORT QQmlIncubationController { - Q_DISABLE_COPY(QDeclarativeIncubationController) + Q_DISABLE_COPY(QQmlIncubationController) public: - QDeclarativeIncubationController(); - virtual ~QDeclarativeIncubationController(); + QQmlIncubationController(); + virtual ~QQmlIncubationController(); - QDeclarativeEngine *engine() const; + QQmlEngine *engine() const; int incubatingObjectCount() const; void incubateFor(int msecs); @@ -116,14 +116,14 @@ class Q_DECLARATIVE_EXPORT QDeclarativeIncubationController virtual void incubatingObjectCountChanged(int); private: - friend class QDeclarativeEngine; - friend class QDeclarativeEnginePrivate; - friend class QDeclarativeIncubatorPrivate; - QDeclarativeEnginePrivate *d; + friend class QQmlEngine; + friend class QQmlEnginePrivate; + friend class QQmlIncubatorPrivate; + QQmlEnginePrivate *d; }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEINCUBATOR_H +#endif // QQMLINCUBATOR_H diff --git a/src/declarative/qml/qdeclarativeincubator_p.h b/src/qml/qml/qqmlincubator_p.h similarity index 65% rename from src/declarative/qml/qdeclarativeincubator_p.h rename to src/qml/qml/qqmlincubator_p.h index 39ef710a41..0dec34a8d5 100644 --- a/src/declarative/qml/qdeclarativeincubator_p.h +++ b/src/qml/qml/qqmlincubator_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,14 +39,14 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEINCUBATOR_P_H -#define QDECLARATIVEINCUBATOR_P_H +#ifndef QQMLINCUBATOR_P_H +#define QQMLINCUBATOR_P_H #include -#include +#include #include -#include -#include +#include +#include // // W A R N I N G @@ -61,46 +61,46 @@ QT_BEGIN_NAMESPACE -class QDeclarativeCompiledData; -class QDeclarativeIncubator; -class QDeclarativeIncubatorPrivate : public QDeclarativeEnginePrivate::Incubator +class QQmlCompiledData; +class QQmlIncubator; +class QQmlIncubatorPrivate : public QQmlEnginePrivate::Incubator { public: - QDeclarativeIncubatorPrivate(QDeclarativeIncubator *q, QDeclarativeIncubator::IncubationMode m); - ~QDeclarativeIncubatorPrivate(); + QQmlIncubatorPrivate(QQmlIncubator *q, QQmlIncubator::IncubationMode m); + ~QQmlIncubatorPrivate(); - QDeclarativeIncubator *q; + QQmlIncubator *q; - QDeclarativeIncubator::Status calculateStatus() const; - void changeStatus(QDeclarativeIncubator::Status); - QDeclarativeIncubator::Status status; + QQmlIncubator::Status calculateStatus() const; + void changeStatus(QQmlIncubator::Status); + QQmlIncubator::Status status; - QDeclarativeIncubator::IncubationMode mode; + QQmlIncubator::IncubationMode mode; bool isAsynchronous; - QList errors; + QList errors; enum Progress { Execute, Completing, Completed }; Progress progress; - QDeclarativeGuard result; - QDeclarativeGuardedContextData rootContext; - QDeclarativeCompiledData *component; - QDeclarativeVME vme; - QDeclarativeVMEGuard vmeGuard; + QQmlGuard result; + QQmlGuardedContextData rootContext; + QQmlCompiledData *component; + QQmlVME vme; + QQmlVMEGuard vmeGuard; - QDeclarativeIncubatorPrivate *waitingOnMe; - typedef QDeclarativeEnginePrivate::Incubator QIPBase; + QQmlIncubatorPrivate *waitingOnMe; + typedef QQmlEnginePrivate::Incubator QIPBase; QIntrusiveList waitingFor; QRecursionNode recursion; void clear(); - void incubate(QDeclarativeVME::Interrupt &i); + void incubate(QQmlVME::Interrupt &i); }; QT_END_NAMESPACE -#endif // QDECLARATIVEINCUBATOR_P_H +#endif // QQMLINCUBATOR_P_H diff --git a/src/declarative/qml/qdeclarativeinfo.cpp b/src/qml/qml/qqmlinfo.cpp similarity index 74% rename from src/declarative/qml/qdeclarativeinfo.cpp rename to src/qml/qml/qqmlinfo.cpp index 42afbb26f7..53145737d8 100644 --- a/src/declarative/qml/qdeclarativeinfo.cpp +++ b/src/qml/qml/qqmlinfo.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,21 +39,21 @@ ** ****************************************************************************/ -#include "qdeclarativeinfo.h" +#include "qqmlinfo.h" -#include "qdeclarativedata_p.h" -#include "qdeclarativecontext.h" -#include "qdeclarativecontext_p.h" -#include "qdeclarativemetatype_p.h" -#include "qdeclarativeengine_p.h" +#include "qqmldata_p.h" +#include "qqmlcontext.h" +#include "qqmlcontext_p.h" +#include "qqmlmetatype_p.h" +#include "qqmlengine_p.h" #include QT_BEGIN_NAMESPACE /*! - \fn QDeclarativeInfo qmlInfo(const QObject *object) - \relates QDeclarativeEngine + \fn QQmlInfo qmlInfo(const QObject *object) + \relates QQmlEngine Prints warning messages that include the file and line number for the specified QML \a object. @@ -80,45 +80,45 @@ QT_BEGIN_NAMESPACE \endcode */ -class QDeclarativeInfoPrivate +class QQmlInfoPrivate { public: - QDeclarativeInfoPrivate() : ref (1), object(0) {} + QQmlInfoPrivate() : ref (1), object(0) {} int ref; const QObject *object; QString buffer; - QList errors; + QList errors; }; -QDeclarativeInfo::QDeclarativeInfo(QDeclarativeInfoPrivate *p) +QQmlInfo::QQmlInfo(QQmlInfoPrivate *p) : QDebug(&p->buffer), d(p) { nospace(); } -QDeclarativeInfo::QDeclarativeInfo(const QDeclarativeInfo &other) +QQmlInfo::QQmlInfo(const QQmlInfo &other) : QDebug(other), d(other.d) { d->ref++; } -QDeclarativeInfo::~QDeclarativeInfo() +QQmlInfo::~QQmlInfo() { if (0 == --d->ref) { - QList errors = d->errors; + QList errors = d->errors; - QDeclarativeEngine *engine = 0; + QQmlEngine *engine = 0; if (!d->buffer.isEmpty()) { - QDeclarativeError error; + QQmlError error; QObject *object = const_cast(d->object); if (object) { engine = qmlEngine(d->object); QString typeName; - QDeclarativeType *type = QDeclarativeMetaType::qmlType(object->metaObject()); + QQmlType *type = QQmlMetaType::qmlType(object->metaObject()); if (type) { typeName = type->qmlTypeName(); int lastSlash = typeName.lastIndexOf(QLatin1Char('/')); @@ -134,7 +134,7 @@ QDeclarativeInfo::~QDeclarativeInfo() if (marker != -1) { typeName = typeName.left(marker); typeName += QLatin1Char('*'); - type = QDeclarativeMetaType::qmlType(QMetaType::type(typeName.toLatin1())); + type = QQmlMetaType::qmlType(QMetaType::type(typeName.toLatin1())); if (type) { typeName = type->qmlTypeName(); int lastSlash = typeName.lastIndexOf(QLatin1Char('/')); @@ -146,7 +146,7 @@ QDeclarativeInfo::~QDeclarativeInfo() d->buffer.prepend(QLatin1String("QML ") + typeName + QLatin1String(": ")); - QDeclarativeData *ddata = QDeclarativeData::get(object, false); + QQmlData *ddata = QQmlData::get(object, false); if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) { error.setUrl(ddata->outerContext->url); error.setLine(ddata->lineNumber); @@ -159,33 +159,33 @@ QDeclarativeInfo::~QDeclarativeInfo() errors.prepend(error); } - QDeclarativeEnginePrivate::warning(engine, errors); + QQmlEnginePrivate::warning(engine, errors); delete d; } } -QDeclarativeInfo qmlInfo(const QObject *me) +QQmlInfo qmlInfo(const QObject *me) { - QDeclarativeInfoPrivate *d = new QDeclarativeInfoPrivate; + QQmlInfoPrivate *d = new QQmlInfoPrivate; d->object = me; - return QDeclarativeInfo(d); + return QQmlInfo(d); } -QDeclarativeInfo qmlInfo(const QObject *me, const QDeclarativeError &error) +QQmlInfo qmlInfo(const QObject *me, const QQmlError &error) { - QDeclarativeInfoPrivate *d = new QDeclarativeInfoPrivate; + QQmlInfoPrivate *d = new QQmlInfoPrivate; d->object = me; d->errors << error; - return QDeclarativeInfo(d); + return QQmlInfo(d); } -QDeclarativeInfo qmlInfo(const QObject *me, const QList &errors) +QQmlInfo qmlInfo(const QObject *me, const QList &errors) { - QDeclarativeInfoPrivate *d = new QDeclarativeInfoPrivate; + QQmlInfoPrivate *d = new QQmlInfoPrivate; d->object = me; d->errors = errors; - return QDeclarativeInfo(d); + return QQmlInfo(d); } diff --git a/src/qml/qml/qqmlinfo.h b/src/qml/qml/qqmlinfo.h new file mode 100644 index 0000000000..92d6d72e8b --- /dev/null +++ b/src/qml/qml/qqmlinfo.h @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QQMLINFO_H +#define QQMLINFO_H + +#include +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + + +class QQmlInfoPrivate; +class Q_QML_EXPORT QQmlInfo : public QDebug +{ +public: + QQmlInfo(const QQmlInfo &); + ~QQmlInfo(); + + inline QQmlInfo &operator<<(QChar t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(bool t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(char t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(signed short t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(unsigned short t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(signed int t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(unsigned int t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(signed long t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(unsigned long t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(qint64 t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(quint64 t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(float t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(double t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(const char* t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(const QString & t) { QDebug::operator<<(t.toLocal8Bit().constData()); return *this; } + inline QQmlInfo &operator<<(const QStringRef & t) { return operator<<(t.toString()); } + inline QQmlInfo &operator<<(const QLatin1String &t) { QDebug::operator<<(t.latin1()); return *this; } + inline QQmlInfo &operator<<(const QByteArray & t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(const void * t) { QDebug::operator<<(t); return *this; } + inline QQmlInfo &operator<<(QTextStreamFunction f) { QDebug::operator<<(f); return *this; } + inline QQmlInfo &operator<<(QTextStreamManipulator m) { QDebug::operator<<(m); return *this; } +#ifndef QT_NO_DEBUG_STREAM + inline QQmlInfo &operator<<(const QUrl &t) { static_cast(*this) << t; return *this; } +#endif + +private: + friend Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me); + friend Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QQmlError &error); + friend Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QList &errors); + + QQmlInfo(QQmlInfoPrivate *); + QQmlInfoPrivate *d; +}; + +Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me); +Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QQmlError &error); +Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QList &errors); + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QQMLINFO_H diff --git a/src/declarative/qml/qdeclarativeinstruction.cpp b/src/qml/qml/qqmlinstruction.cpp similarity index 78% rename from src/declarative/qml/qdeclarativeinstruction.cpp rename to src/qml/qml/qqmlinstruction.cpp index 799357cf04..72f04c9d61 100644 --- a/src/declarative/qml/qdeclarativeinstruction.cpp +++ b/src/qml/qml/qqmlinstruction.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,223 +39,223 @@ ** ****************************************************************************/ -#include "qdeclarativeinstruction_p.h" +#include "qqmlinstruction_p.h" -#include "qdeclarativecompiler_p.h" +#include "qqmlcompiler_p.h" #include QT_BEGIN_NAMESPACE -void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx) +void QQmlCompiledData::dump(QQmlInstruction *instr, int idx) { #ifdef QT_NO_DEBUG_STREAM Q_UNUSED(instr) Q_UNUSED(idx) #else switch (instructionType(instr)) { - case QDeclarativeInstruction::Init: + case QQmlInstruction::Init: qWarning().nospace() << idx << "\t\t" << "INIT\t\t\t" << instr->init.bindingsSize << "\t" << instr->init.parserStatusSize << "\t" << instr->init.contextCache << "\t" << instr->init.compiledBinding; break; - case QDeclarativeInstruction::DeferInit: + case QQmlInstruction::DeferInit: qWarning().nospace() << idx << "\t\t" << "DEFER_INIT\t\t" << instr->deferInit.bindingsSize << "\t" << instr->deferInit.parserStatusSize; break; - case QDeclarativeInstruction::Done: + case QQmlInstruction::Done: qWarning().nospace() << idx << "\t\t" << "DONE"; break; - case QDeclarativeInstruction::CreateCppObject: + case QQmlInstruction::CreateCppObject: qWarning().nospace() << idx << "\t\t" << "CREATECPP\t\t\t" << instr->create.type << "\t\t\t" << types.at(instr->create.type).className; break; - case QDeclarativeInstruction::CreateQMLObject: + case QQmlInstruction::CreateQMLObject: qWarning().nospace() << idx << "\t\t" << "CREATEQML\t\t\t" << instr->createQml.type << "\t" << instr->createQml.bindingBits << "\t\t" << types.at(instr->createQml.type).className; break; - case QDeclarativeInstruction::CompleteQMLObject: + case QQmlInstruction::CompleteQMLObject: qWarning().nospace() << idx << "\t\t" << "COMPLETEQML"; break; - case QDeclarativeInstruction::CreateSimpleObject: + case QQmlInstruction::CreateSimpleObject: qWarning().nospace() << idx << "\t\t" << "CREATE_SIMPLE\t\t" << instr->createSimple.typeSize; break; - case QDeclarativeInstruction::SetId: + case QQmlInstruction::SetId: qWarning().nospace() << idx << "\t\t" << "SETID\t\t\t" << instr->setId.value << "\t\t\t" << primitives.at(instr->setId.value); break; - case QDeclarativeInstruction::SetDefault: + case QQmlInstruction::SetDefault: qWarning().nospace() << idx << "\t\t" << "SET_DEFAULT"; break; - case QDeclarativeInstruction::CreateComponent: + case QQmlInstruction::CreateComponent: qWarning().nospace() << idx << "\t\t" << "CREATE_COMPONENT\t" << instr->createComponent.count; break; - case QDeclarativeInstruction::StoreMetaObject: + case QQmlInstruction::StoreMetaObject: qWarning().nospace() << idx << "\t\t" << "STORE_META\t\t" << instr->storeMeta.data; break; - case QDeclarativeInstruction::StoreFloat: + case QQmlInstruction::StoreFloat: qWarning().nospace() << idx << "\t\t" << "STORE_FLOAT\t\t" << instr->storeFloat.propertyIndex << "\t" << instr->storeFloat.value; break; - case QDeclarativeInstruction::StoreDouble: + case QQmlInstruction::StoreDouble: qWarning().nospace() << idx << "\t\t" << "STORE_DOUBLE\t\t" << instr->storeDouble.propertyIndex << "\t" << instr->storeDouble.value; break; - case QDeclarativeInstruction::StoreDoubleQList: + case QQmlInstruction::StoreDoubleQList: qWarning().nospace() << idx << "\t\t" << "STORE_DOUBLE_QLIST\t\t" << instr->storeDouble.propertyIndex << "\t" << instr->storeDouble.value; break; - case QDeclarativeInstruction::StoreInteger: + case QQmlInstruction::StoreInteger: qWarning().nospace() << idx << "\t\t" << "STORE_INTEGER\t\t" << instr->storeInteger.propertyIndex << "\t" << instr->storeInteger.value; break; - case QDeclarativeInstruction::StoreIntegerQList: + case QQmlInstruction::StoreIntegerQList: qWarning().nospace() << idx << "\t\t" << "STORE_INTEGER_QLIST\t\t" << instr->storeInteger.propertyIndex << "\t" << instr->storeInteger.value; break; - case QDeclarativeInstruction::StoreBool: + case QQmlInstruction::StoreBool: qWarning().nospace() << idx << "\t\t" << "STORE_BOOL\t\t" << instr->storeBool.propertyIndex << "\t" << instr->storeBool.value; break; - case QDeclarativeInstruction::StoreBoolQList: + case QQmlInstruction::StoreBoolQList: qWarning().nospace() << idx << "\t\t" << "STORE_BOOL_QLIST\t\t" << instr->storeBool.propertyIndex << "\t" << instr->storeBool.value; break; - case QDeclarativeInstruction::StoreString: + case QQmlInstruction::StoreString: qWarning().nospace() << idx << "\t\t" << "STORE_STRING\t\t" << instr->storeString.propertyIndex << "\t" << instr->storeString.value << "\t\t" << primitives.at(instr->storeString.value); break; - case QDeclarativeInstruction::StoreStringList: + case QQmlInstruction::StoreStringList: qWarning().nospace() << idx << "\t\t" << "STORE_STRINGLIST\t\t" << instr->storeString.propertyIndex << "\t" << instr->storeString.value << "\t\t" << primitives.at(instr->storeString.value); break; - case QDeclarativeInstruction::StoreStringQList: + case QQmlInstruction::StoreStringQList: qWarning().nospace() << idx << "\t\t" << "STORE_STRING_QLIST\t\t" << instr->storeString.propertyIndex << "\t" << instr->storeString.value << "\t\t" << primitives.at(instr->storeString.value); break; - case QDeclarativeInstruction::StoreTrString: + case QQmlInstruction::StoreTrString: qWarning().nospace() << idx << "\t\t" << "STORE_TR_STRING\t" << instr->storeTrString.propertyIndex << "\t" << instr->storeTrString.context << "\t" << instr->storeTrString.text << "\t" << instr->storeTrString.comment << "\t" << instr->storeTrString.n; break; - case QDeclarativeInstruction::StoreTrIdString: + case QQmlInstruction::StoreTrIdString: qWarning().nospace() << idx << "\t\t" << "STORE_TRID_STRING\t" << instr->storeTrIdString.propertyIndex << "\t" << instr->storeTrIdString.text << "\t" << instr->storeTrIdString.n; break; - case QDeclarativeInstruction::StoreByteArray: + case QQmlInstruction::StoreByteArray: qWarning().nospace() << idx << "\t\t" << "STORE_BYTEARRAY" << instr->storeByteArray.propertyIndex << "\t" << instr->storeByteArray.value << "\t\t" << datas.at(instr->storeByteArray.value); break; - case QDeclarativeInstruction::StoreUrl: + case QQmlInstruction::StoreUrl: qWarning().nospace() << idx << "\t\t" << "STORE_URL\t\t" << instr->storeUrl.propertyIndex << "\t" << instr->storeUrl.value << "\t\t" << urls.at(instr->storeUrl.value); break; - case QDeclarativeInstruction::StoreUrlQList: + case QQmlInstruction::StoreUrlQList: qWarning().nospace() << idx << "\t\t" << "STORE_URL_QLIST\t\t" << instr->storeUrl.propertyIndex << "\t" << instr->storeUrl.value << "\t\t" << urls.at(instr->storeUrl.value); break; - case QDeclarativeInstruction::StoreColor: + case QQmlInstruction::StoreColor: qWarning().nospace() << idx << "\t\t" << "STORE_COLOR\t\t" << instr->storeColor.propertyIndex << "\t\t\t" << QString::number(instr->storeColor.value, 16); break; - case QDeclarativeInstruction::StoreDate: + case QQmlInstruction::StoreDate: qWarning().nospace() << idx << "\t\t" << "STORE_DATE\t\t" << instr->storeDate.propertyIndex << "\t" << instr->storeDate.value; break; - case QDeclarativeInstruction::StoreTime: + case QQmlInstruction::StoreTime: qWarning().nospace() << idx << "\t\t" << "STORE_TIME\t\t" << instr->storeTime.propertyIndex; break; - case QDeclarativeInstruction::StoreDateTime: + case QQmlInstruction::StoreDateTime: qWarning().nospace() << idx << "\t\t" << "STORE_DATETIME\t\t" << instr->storeDateTime.propertyIndex; break; - case QDeclarativeInstruction::StorePoint: + case QQmlInstruction::StorePoint: qWarning().nospace() << idx << "\t\t" << "STORE_POINT\t\t" << instr->storePoint.propertyIndex << "\t" << instr->storePoint.point.xp << "\t" << instr->storePoint.point.yp; break; - case QDeclarativeInstruction::StorePointF: + case QQmlInstruction::StorePointF: qWarning().nospace() << idx << "\t\t" << "STORE_POINTF\t\t" << instr->storePointF.propertyIndex << "\t" << instr->storePointF.point.xp << "\t" << instr->storePointF.point.yp; break; - case QDeclarativeInstruction::StoreSize: + case QQmlInstruction::StoreSize: qWarning().nospace() << idx << "\t\t" << "STORE_SIZE\t\t" << instr->storeSize.propertyIndex << "\t" << instr->storeSize.size.wd << "\t" << instr->storeSize.size.ht; break; - case QDeclarativeInstruction::StoreSizeF: + case QQmlInstruction::StoreSizeF: qWarning().nospace() << idx << "\t\t" << "STORE_SIZEF\t\t" << instr->storeSizeF.propertyIndex << "\t" << instr->storeSizeF.size.wd << "\t" << instr->storeSizeF.size.ht; break; - case QDeclarativeInstruction::StoreRect: + case QQmlInstruction::StoreRect: qWarning().nospace() << idx << "\t\t" << "STORE_RECT\t\t" << instr->storeRect.propertyIndex << "\t" << instr->storeRect.rect.x1 << "\t" << instr->storeRect.rect.y1 << "\t" << instr->storeRect.rect.x2 << "\t" << instr->storeRect.rect.y2; break; - case QDeclarativeInstruction::StoreRectF: + case QQmlInstruction::StoreRectF: qWarning().nospace() << idx << "\t\t" << "STORE_RECTF\t\t" << instr->storeRectF.propertyIndex << "\t" << instr->storeRectF.rect.xp << "\t" << instr->storeRectF.rect.yp << "\t" << instr->storeRectF.rect.w << "\t" << instr->storeRectF.rect.h; break; - case QDeclarativeInstruction::StoreVector3D: + case QQmlInstruction::StoreVector3D: qWarning().nospace() << idx << "\t\t" << "STORE_VECTOR3D\t\t" << instr->storeVector3D.propertyIndex << "\t" << instr->storeVector3D.vector.xp << "\t" << instr->storeVector3D.vector.yp << "\t" << instr->storeVector3D.vector.zp; break; - case QDeclarativeInstruction::StoreVector4D: + case QQmlInstruction::StoreVector4D: qWarning().nospace() << idx << "\t\t" << "STORE_VECTOR4D\t\t" << instr->storeVector4D.propertyIndex << "\t" << instr->storeVector4D.vector.xp << "\t" << instr->storeVector4D.vector.yp << "\t" << instr->storeVector4D.vector.zp << "\t" << instr->storeVector4D.vector.wp; break; - case QDeclarativeInstruction::StoreVariant: + case QQmlInstruction::StoreVariant: qWarning().nospace() << idx << "\t\t" << "STORE_VARIANT\t\t" << instr->storeString.propertyIndex << "\t" << instr->storeString.value << "\t\t" << primitives.at(instr->storeString.value); break; - case QDeclarativeInstruction::StoreVariantInteger: + case QQmlInstruction::StoreVariantInteger: qWarning().nospace() << idx << "\t\t" << "STORE_VARIANT_INTEGER\t\t" << instr->storeInteger.propertyIndex << "\t" << instr->storeInteger.value; break; - case QDeclarativeInstruction::StoreVariantDouble: + case QQmlInstruction::StoreVariantDouble: qWarning().nospace() << idx << "\t\t" << "STORE_VARIANT_DOUBLE\t\t" << instr->storeDouble.propertyIndex << "\t" << instr->storeDouble.value; break; - case QDeclarativeInstruction::StoreVariantBool: + case QQmlInstruction::StoreVariantBool: qWarning().nospace() << idx << "\t\t" << "STORE_VARIANT_BOOL\t\t" << instr->storeBool.propertyIndex << "\t" << instr->storeBool.value; break; - case QDeclarativeInstruction::StoreObject: + case QQmlInstruction::StoreObject: qWarning().nospace() << idx << "\t\t" << "STORE_OBJECT\t\t" << instr->storeObject.propertyIndex; break; - case QDeclarativeInstruction::StoreVariantObject: + case QQmlInstruction::StoreVariantObject: qWarning().nospace() << idx << "\t\t" << "STORE_VARIANT_OBJECT\t" << instr->storeObject.propertyIndex; break; - case QDeclarativeInstruction::StoreInterface: + case QQmlInstruction::StoreInterface: qWarning().nospace() << idx << "\t\t" << "STORE_INTERFACE\t\t" << instr->storeObject.propertyIndex; break; - case QDeclarativeInstruction::StoreSignal: + case QQmlInstruction::StoreSignal: qWarning().nospace() << idx << "\t\t" << "STORE_SIGNAL\t\t" << instr->storeSignal.signalIndex << "\t" << instr->storeSignal.value << "\t\t" << primitives.at(instr->storeSignal.value); break; - case QDeclarativeInstruction::StoreImportedScript: + case QQmlInstruction::StoreImportedScript: qWarning().nospace() << idx << "\t\t" << "STORE_IMPORTED_SCRIPT\t" << instr->storeScript.value; break; - case QDeclarativeInstruction::StoreScriptString: + case QQmlInstruction::StoreScriptString: qWarning().nospace() << idx << "\t\t" << "STORE_SCRIPT_STRING\t" << instr->storeScriptString.propertyIndex << "\t" << instr->storeScriptString.value << "\t" << instr->storeScriptString.scope << "\t" << instr->storeScriptString.bindingId; break; - case QDeclarativeInstruction::AssignSignalObject: + case QQmlInstruction::AssignSignalObject: qWarning().nospace() << idx << "\t\t" << "ASSIGN_SIGNAL_OBJECT\t" << instr->assignSignalObject.signal << "\t\t\t" << primitives.at(instr->assignSignalObject.signal); break; - case QDeclarativeInstruction::AssignCustomType: + case QQmlInstruction::AssignCustomType: qWarning().nospace() << idx << "\t\t" << "ASSIGN_CUSTOMTYPE\t" << instr->assignCustomType.propertyIndex << "\t" << instr->assignCustomType.primitive << "\t" << instr->assignCustomType.type; break; - case QDeclarativeInstruction::InitV8Bindings: + case QQmlInstruction::InitV8Bindings: qWarning().nospace() << idx << "\t\t" << "INIT_V8_BINDING\t" << instr->initV8Bindings.programIndex << "\t" << instr->initV8Bindings.line; break; - case QDeclarativeInstruction::StoreBinding: + case QQmlInstruction::StoreBinding: qWarning().nospace() << idx << "\t\t" << "STORE_BINDING\t" << instr->assignBinding.property.coreIndex << "\t" << instr->assignBinding.value << "\t" << instr->assignBinding.context; break; - case QDeclarativeInstruction::StoreBindingOnAlias: + case QQmlInstruction::StoreBindingOnAlias: qWarning().nospace() << idx << "\t\t" << "STORE_BINDING_ALIAS\t" << instr->assignBinding.property.coreIndex << "\t" << instr->assignBinding.value << "\t" << instr->assignBinding.context; break; - case QDeclarativeInstruction::StoreV4Binding: + case QQmlInstruction::StoreV4Binding: qWarning().nospace() << idx << "\t\t" << "STORE_COMPILED_BINDING\t" << instr->assignV4Binding.property << "\t" << instr->assignV4Binding.value << "\t" << instr->assignV4Binding.context; break; - case QDeclarativeInstruction::StoreV8Binding: + case QQmlInstruction::StoreV8Binding: qWarning().nospace() << idx << "\t\t" << "STORE_V8_BINDING\t" << instr->assignBinding.property.coreIndex << "\t" << instr->assignBinding.value << "\t" << instr->assignBinding.context; break; - case QDeclarativeInstruction::StoreValueSource: + case QQmlInstruction::StoreValueSource: qWarning().nospace() << idx << "\t\t" << "STORE_VALUE_SOURCE\t" << instr->assignValueSource.property.coreIndex << "\t" << instr->assignValueSource.castValue; break; - case QDeclarativeInstruction::StoreValueInterceptor: + case QQmlInstruction::StoreValueInterceptor: qWarning().nospace() << idx << "\t\t" << "STORE_VALUE_INTERCEPTOR\t" << instr->assignValueInterceptor.property.coreIndex << "\t" << instr->assignValueInterceptor.castValue; break; - case QDeclarativeInstruction::BeginObject: + case QQmlInstruction::BeginObject: qWarning().nospace() << idx << "\t\t" << "BEGIN\t\t\t" << instr->begin.castValue; break; - case QDeclarativeInstruction::StoreObjectQList: + case QQmlInstruction::StoreObjectQList: qWarning().nospace() << idx << "\t\t" << "STORE_OBJECT_QLIST"; break; - case QDeclarativeInstruction::AssignObjectList: + case QQmlInstruction::AssignObjectList: qWarning().nospace() << idx << "\t\t" << "ASSIGN_OBJECT_LIST"; break; - case QDeclarativeInstruction::FetchAttached: + case QQmlInstruction::FetchAttached: qWarning().nospace() << idx << "\t\t" << "FETCH_ATTACHED\t\t" << instr->fetchAttached.id; break; - case QDeclarativeInstruction::FetchQList: + case QQmlInstruction::FetchQList: qWarning().nospace() << idx << "\t\t" << "FETCH_QLIST\t\t" << instr->fetch.property; break; - case QDeclarativeInstruction::FetchObject: + case QQmlInstruction::FetchObject: qWarning().nospace() << idx << "\t\t" << "FETCH\t\t\t" << instr->fetch.property; break; - case QDeclarativeInstruction::FetchValueType: + case QQmlInstruction::FetchValueType: qWarning().nospace() << idx << "\t\t" << "FETCH_VALUE\t\t" << instr->fetchValue.property << "\t" << instr->fetchValue.type << "\t" << instr->fetchValue.bindingSkipList; break; - case QDeclarativeInstruction::PopFetchedObject: + case QQmlInstruction::PopFetchedObject: qWarning().nospace() << idx << "\t\t" << "POP"; break; - case QDeclarativeInstruction::PopQList: + case QQmlInstruction::PopQList: qWarning().nospace() << idx << "\t\t" << "POP_QLIST"; break; - case QDeclarativeInstruction::PopValueType: + case QQmlInstruction::PopValueType: qWarning().nospace() << idx << "\t\t" << "POP_VALUE\t\t" << instr->fetchValue.property << "\t" << instr->fetchValue.type; break; - case QDeclarativeInstruction::Defer: + case QQmlInstruction::Defer: qWarning().nospace() << idx << "\t\t" << "DEFER" << "\t\t\t" << instr->defer.deferCount; break; default: @@ -265,9 +265,9 @@ void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx) #endif // QT_NO_DEBUG_STREAM } -int QDeclarativeInstruction::size(Type type) +int QQmlInstruction::size(Type type) { -#define QML_RETURN_INSTR_SIZE(I, FMT) case I: return QDeclarativeInstructionMeta<(int)I>::Size; +#define QML_RETURN_INSTR_SIZE(I, FMT) case I: return QQmlInstructionMeta<(int)I>::Size; switch (type) { FOR_EACH_QML_INSTR(QML_RETURN_INSTR_SIZE) default: return 0; diff --git a/src/declarative/qml/qdeclarativeinstruction_p.h b/src/qml/qml/qqmlinstruction_p.h similarity index 92% rename from src/declarative/qml/qdeclarativeinstruction_p.h rename to src/qml/qml/qqmlinstruction_p.h index dee712d0dc..b7533aca68 100644 --- a/src/declarative/qml/qdeclarativeinstruction_p.h +++ b/src/qml/qml/qqmlinstruction_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEINSTRUCTION_P_H -#define QDECLARATIVEINSTRUCTION_P_H +#ifndef QQMLINSTRUCTION_P_H +#define QQMLINSTRUCTION_P_H // // W A R N I N G @@ -54,7 +54,7 @@ // #include -#include +#include QT_BEGIN_NAMESPACE @@ -138,7 +138,7 @@ QT_BEGIN_NAMESPACE #endif #ifdef Q_ALIGNOF -# define QML_INSTR_ALIGN_MASK (Q_ALIGNOF(QDeclarativeInstruction) - 1) +# define QML_INSTR_ALIGN_MASK (Q_ALIGNOF(QQmlInstruction) - 1) #else # define QML_INSTR_ALIGN_MASK (sizeof(void *) - 1) #endif @@ -150,10 +150,10 @@ QT_BEGIN_NAMESPACE #endif #define QML_INSTR_ENUM(I, FMT) I, -#define QML_INSTR_SIZE(I, FMT) ((sizeof(QDeclarativeInstruction::instr_##FMT) + QML_INSTR_ALIGN_MASK) & ~QML_INSTR_ALIGN_MASK) +#define QML_INSTR_SIZE(I, FMT) ((sizeof(QQmlInstruction::instr_##FMT) + QML_INSTR_ALIGN_MASK) & ~QML_INSTR_ALIGN_MASK) -class QDeclarativeCompiledData; -union QDeclarativeInstruction +class QQmlCompiledData; +union QQmlInstruction { enum Type { FOR_EACH_QML_INSTR(QML_INSTR_ENUM) @@ -219,13 +219,13 @@ union QDeclarativeInstruction }; struct instr_assignValueSource { QML_INSTR_HEADER - QDeclarativePropertyRawData property; + QQmlPropertyRawData property; int owner; int castValue; }; struct instr_assignValueInterceptor { QML_INSTR_HEADER - QDeclarativePropertyRawData property; + QQmlPropertyRawData property; int owner; int castValue; }; @@ -246,7 +246,7 @@ union QDeclarativeInstruction }; struct instr_assignBinding { QML_INSTR_HEADER - QDeclarativePropertyRawData property; + QQmlPropertyRawData property; int value; short context; short owner; @@ -535,24 +535,24 @@ union QDeclarativeInstruction }; template -struct QDeclarativeInstructionMeta { +struct QQmlInstructionMeta { }; #define QML_INSTR_META_TEMPLATE(I, FMT) \ - template<> struct QDeclarativeInstructionMeta<(int)QDeclarativeInstruction::I> { \ + template<> struct QQmlInstructionMeta<(int)QQmlInstruction::I> { \ enum { Size = QML_INSTR_SIZE(I, FMT) }; \ - typedef QDeclarativeInstruction::instr_##FMT DataType; \ - static const DataType &data(const QDeclarativeInstruction &instr) { return instr.FMT; } \ - static void setData(QDeclarativeInstruction &instr, const DataType &v) { instr.FMT = v; } \ + typedef QQmlInstruction::instr_##FMT DataType; \ + static const DataType &data(const QQmlInstruction &instr) { return instr.FMT; } \ + static void setData(QQmlInstruction &instr, const DataType &v) { instr.FMT = v; } \ }; FOR_EACH_QML_INSTR(QML_INSTR_META_TEMPLATE); #undef QML_INSTR_META_TEMPLATE template -class QDeclarativeInstructionData : public QDeclarativeInstructionMeta::DataType +class QQmlInstructionData : public QQmlInstructionMeta::DataType { }; QT_END_NAMESPACE -#endif // QDECLARATIVEINSTRUCTION_P_H +#endif // QQMLINSTRUCTION_P_H diff --git a/src/declarative/qml/qdeclarativeintegercache.cpp b/src/qml/qml/qqmlintegercache.cpp similarity index 82% rename from src/declarative/qml/qdeclarativeintegercache.cpp rename to src/qml/qml/qqmlintegercache.cpp index 61f6f3c8e1..88ea3af2de 100644 --- a/src/declarative/qml/qdeclarativeintegercache.cpp +++ b/src/qml/qml/qqmlintegercache.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,19 +39,19 @@ ** ****************************************************************************/ -#include "qdeclarativeintegercache_p.h" +#include "qqmlintegercache_p.h" QT_BEGIN_NAMESPACE -QDeclarativeIntegerCache::QDeclarativeIntegerCache() +QQmlIntegerCache::QQmlIntegerCache() { } -QDeclarativeIntegerCache::~QDeclarativeIntegerCache() +QQmlIntegerCache::~QQmlIntegerCache() { } -QString QDeclarativeIntegerCache::findId(int value) const +QString QQmlIntegerCache::findId(int value) const { for (StringCache::ConstIterator iter = stringCache.begin(); iter != stringCache.end(); ++iter) { @@ -61,19 +61,19 @@ QString QDeclarativeIntegerCache::findId(int value) const return QString(); } -void QDeclarativeIntegerCache::reserve(int size) +void QQmlIntegerCache::reserve(int size) { stringCache.reserve(size); } -void QDeclarativeIntegerCache::add(const QString &id, int value) +void QQmlIntegerCache::add(const QString &id, int value) { Q_ASSERT(!stringCache.contains(id)); stringCache.insert(id, value); } -int QDeclarativeIntegerCache::value(const QString &id) +int QQmlIntegerCache::value(const QString &id) { int *rv = stringCache.value(id); return rv?*rv:-1; diff --git a/src/declarative/qml/qdeclarativeintegercache_p.h b/src/qml/qml/qqmlintegercache_p.h similarity index 82% rename from src/declarative/qml/qdeclarativeintegercache_p.h rename to src/qml/qml/qqmlintegercache_p.h index a40100722e..317a86b45a 100644 --- a/src/declarative/qml/qdeclarativeintegercache_p.h +++ b/src/qml/qml/qqmlintegercache_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEINTEGERCACHE_P_H -#define QDECLARATIVEINTEGERCACHE_P_H +#ifndef QQMLINTEGERCACHE_P_H +#define QQMLINTEGERCACHE_P_H // // W A R N I N G @@ -53,18 +53,18 @@ // We mean it. // -#include +#include #include QT_BEGIN_NAMESPACE -class QDeclarativeType; -class QDeclarativeEngine; -class QDeclarativeIntegerCache : public QDeclarativeRefCount +class QQmlType; +class QQmlEngine; +class QQmlIntegerCache : public QQmlRefCount { public: - QDeclarativeIntegerCache(); - virtual ~QDeclarativeIntegerCache(); + QQmlIntegerCache(); + virtual ~QQmlIntegerCache(); inline int count() const; void add(const QString &, int); @@ -80,18 +80,18 @@ class QDeclarativeIntegerCache : public QDeclarativeRefCount StringCache stringCache; }; -int QDeclarativeIntegerCache::value(const QHashedV8String &name) +int QQmlIntegerCache::value(const QHashedV8String &name) { int *result = stringCache.value(name); return result?*result:-1; } -int QDeclarativeIntegerCache::count() const +int QQmlIntegerCache::count() const { return stringCache.count(); } QT_END_NAMESPACE -#endif // QDECLARATIVEINTEGERCACHE_P_H +#endif // QQMLINTEGERCACHE_P_H diff --git a/src/declarative/qml/qdeclarativelist.cpp b/src/qml/qml/qqmllist.cpp similarity index 60% rename from src/declarative/qml/qdeclarativelist.cpp rename to src/qml/qml/qqmllist.cpp index 128bd0b86f..00fd805ee0 100644 --- a/src/declarative/qml/qdeclarativelist.cpp +++ b/src/qml/qml/qqmllist.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,45 +39,45 @@ ** ****************************************************************************/ -#include "qdeclarativelist.h" -#include "qdeclarativelist_p.h" -#include "qdeclarativeengine_p.h" -#include "qdeclarativeproperty_p.h" +#include "qqmllist.h" +#include "qqmllist_p.h" +#include "qqmlengine_p.h" +#include "qqmlproperty_p.h" QT_BEGIN_NAMESPACE -QDeclarativeListReferencePrivate::QDeclarativeListReferencePrivate() +QQmlListReferencePrivate::QQmlListReferencePrivate() : propertyType(-1), refCount(1) { } -QDeclarativeListReference QDeclarativeListReferencePrivate::init(const QDeclarativeListProperty &prop, int propType, QDeclarativeEngine *engine) +QQmlListReference QQmlListReferencePrivate::init(const QQmlListProperty &prop, int propType, QQmlEngine *engine) { - QDeclarativeListReference rv; + QQmlListReference rv; if (!prop.object) return rv; - QDeclarativeEnginePrivate *p = engine?QDeclarativeEnginePrivate::get(engine):0; + QQmlEnginePrivate *p = engine?QQmlEnginePrivate::get(engine):0; - int listType = p?p->listType(propType):QDeclarativeMetaType::listType(propType); + int listType = p?p->listType(propType):QQmlMetaType::listType(propType); if (listType == -1) return rv; - rv.d = new QDeclarativeListReferencePrivate; + rv.d = new QQmlListReferencePrivate; rv.d->object = prop.object; - rv.d->elementType = p?p->rawMetaObjectForType(listType):QDeclarativeMetaType::qmlType(listType)->baseMetaObject(); + rv.d->elementType = p?p->rawMetaObjectForType(listType):QQmlMetaType::qmlType(listType)->baseMetaObject(); rv.d->property = prop; rv.d->propertyType = propType; return rv; } -void QDeclarativeListReferencePrivate::addref() +void QQmlListReferencePrivate::addref() { Q_ASSERT(refCount > 0); ++refCount; } -void QDeclarativeListReferencePrivate::release() +void QQmlListReferencePrivate::release() { Q_ASSERT(refCount > 0); --refCount; @@ -86,20 +86,20 @@ void QDeclarativeListReferencePrivate::release() } /*! -\class QDeclarativeListReference +\class QQmlListReference \since 4.7 -\module QtDeclarative -\brief The QDeclarativeListReference class allows the manipulation of QDeclarativeListProperty properties. +\module QtQml +\brief The QQmlListReference class allows the manipulation of QQmlListProperty properties. -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: +QQmlListReference allows C++ programs to read from, and assign values to a QML list property in a +simple and type safe way. A QQmlListReference can be created by passing an object and property +name or through a QQmlProperty instance. These two are equivalant: \code -QDeclarativeListReference ref1(object, "children"); +QQmlListReference ref1(object, "children"); -QDeclarativeProperty ref2(object, "children"); -QDeclarativeListReference ref2 = qvariant_cast(ref2.read()); +QQmlProperty ref2(object, "children"); +QQmlListReference ref2 = qvariant_cast(ref2.read()); \endcode Not all QML list properties support all operations. A set of methods, canAppend(), canAt(), canClear() and @@ -116,39 +116,39 @@ that it does not request an out of range element using the count() method before /*! Constructs an invalid instance. */ -QDeclarativeListReference::QDeclarativeListReference() +QQmlListReference::QQmlListReference() : d(0) { } /*! -Constructs a QDeclarativeListReference for \a object's \a property. If \a property is not a list -property, an invalid QDeclarativeListReference is created. If \a object is destroyed after +Constructs a QQmlListReference for \a object's \a property. If \a property is not a list +property, an invalid QQmlListReference is created. If \a object is destroyed after the reference is constructed, it will automatically become invalid. That is, it is safe to hold -QDeclarativeListReference instances even after \a object is deleted. +QQmlListReference instances even after \a object is deleted. Passing \a engine is required to access some QML created list properties. If in doubt, and an engine is available, pass it. */ -QDeclarativeListReference::QDeclarativeListReference(QObject *object, const char *property, QDeclarativeEngine *engine) +QQmlListReference::QQmlListReference(QObject *object, const char *property, QQmlEngine *engine) : d(0) { if (!object || !property) return; - QDeclarativePropertyData local; - QDeclarativePropertyData *data = - QDeclarativePropertyCache::property(engine, object, QLatin1String(property), local); + QQmlPropertyData local; + QQmlPropertyData *data = + QQmlPropertyCache::property(engine, object, QLatin1String(property), local); if (!data || !data->isQList()) return; - QDeclarativeEnginePrivate *p = engine?QDeclarativeEnginePrivate::get(engine):0; + QQmlEnginePrivate *p = engine?QQmlEnginePrivate::get(engine):0; - int listType = p?p->listType(data->propType):QDeclarativeMetaType::listType(data->propType); + int listType = p?p->listType(data->propType):QQmlMetaType::listType(data->propType); if (listType == -1) return; - d = new QDeclarativeListReferencePrivate; + d = new QQmlListReferencePrivate; d->object = object; - d->elementType = p?p->rawMetaObjectForType(listType):QDeclarativeMetaType::qmlType(listType)->baseMetaObject(); + d->elementType = p?p->rawMetaObjectForType(listType):QQmlMetaType::qmlType(listType)->baseMetaObject(); d->propertyType = data->propType; void *args[] = { &d->property, 0 }; @@ -156,14 +156,14 @@ QDeclarativeListReference::QDeclarativeListReference(QObject *object, const char } /*! \internal */ -QDeclarativeListReference::QDeclarativeListReference(const QDeclarativeListReference &o) +QQmlListReference::QQmlListReference(const QQmlListReference &o) : d(o.d) { if (d) d->addref(); } /*! \internal */ -QDeclarativeListReference &QDeclarativeListReference::operator=(const QDeclarativeListReference &o) +QQmlListReference &QQmlListReference::operator=(const QQmlListReference &o) { if (o.d) o.d->addref(); if (d) d->release(); @@ -172,7 +172,7 @@ QDeclarativeListReference &QDeclarativeListReference::operator=(const QDeclarati } /*! \internal */ -QDeclarativeListReference::~QDeclarativeListReference() +QQmlListReference::~QQmlListReference() { if (d) d->release(); } @@ -180,7 +180,7 @@ QDeclarativeListReference::~QDeclarativeListReference() /*! Returns true if the instance refers to a valid list property, otherwise false. */ -bool QDeclarativeListReference::isValid() const +bool QQmlListReference::isValid() const { return d && d->object; } @@ -188,7 +188,7 @@ bool QDeclarativeListReference::isValid() const /*! Returns the list property's object. Returns 0 if the reference is invalid. */ -QObject *QDeclarativeListReference::object() const +QObject *QQmlListReference::object() const { if (isValid()) return d->object; else return 0; @@ -201,7 +201,7 @@ is invalid. The QMetaObject can be used ahead of time to determine whether a given instance can be added to a list. */ -const QMetaObject *QDeclarativeListReference::listElementType() const +const QMetaObject *QQmlListReference::listElementType() const { if (isValid()) return d->elementType; else return 0; @@ -213,7 +213,7 @@ reference is invalid. \sa append() */ -bool QDeclarativeListReference::canAppend() const +bool QQmlListReference::canAppend() const { return (isValid() && d->property.append); } @@ -224,7 +224,7 @@ reference is invalid. \sa at() */ -bool QDeclarativeListReference::canAt() const +bool QQmlListReference::canAt() const { return (isValid() && d->property.at); } @@ -235,7 +235,7 @@ reference is invalid. \sa clear() */ -bool QDeclarativeListReference::canClear() const +bool QQmlListReference::canClear() const { return (isValid() && d->property.clear); } @@ -246,7 +246,7 @@ Returns false if the reference is invalid. \sa count() */ -bool QDeclarativeListReference::canCount() const +bool QQmlListReference::canCount() const { return (isValid() && d->property.count); } @@ -256,11 +256,11 @@ Appends \a object to the list. Returns true if the operation succeeded, otherwi \sa canAppend() */ -bool QDeclarativeListReference::append(QObject *object) const +bool QQmlListReference::append(QObject *object) const { if (!canAppend()) return false; - if (object && !QDeclarativePropertyPrivate::canConvert(object->metaObject(), d->elementType)) + if (object && !QQmlPropertyPrivate::canConvert(object->metaObject(), d->elementType)) return false; d->property.append(&d->property, object); @@ -273,7 +273,7 @@ Returns the list element at \a index, or 0 if the operation failed. \sa canAt() */ -QObject *QDeclarativeListReference::at(int index) const +QObject *QQmlListReference::at(int index) const { if (!canAt()) return 0; @@ -285,7 +285,7 @@ Clears the list. Returns true if the operation succeeded, otherwise false. \sa canClear() */ -bool QDeclarativeListReference::clear() const +bool QQmlListReference::clear() const { if (!canClear()) return false; @@ -297,7 +297,7 @@ bool QDeclarativeListReference::clear() const /*! Returns the number of objects in the list, or 0 if the operation failed. */ -int QDeclarativeListReference::count() const +int QQmlListReference::count() const { if (!canCount()) return 0; @@ -305,9 +305,9 @@ int QDeclarativeListReference::count() const } /*! -\class QDeclarativeListProperty +\class QQmlListProperty \since 4.7 -\brief The QDeclarativeListProperty class allows applications to expose list-like +\brief The QQmlListProperty class allows applications to expose list-like properties to QML. QML has many list properties, where more than one object value can be assigned. @@ -323,38 +323,38 @@ FruitBasket { } \endcode -The QDeclarativeListProperty encapsulates a group of function pointers that represet the +The QQmlListProperty encapsulates a group of function pointers that represet the set of actions QML can perform on the list - adding items, retrieving items and clearing the list. In the future, additional operations may be supported. All list properties must implement the append operation, but the rest are optional. To provide a list property, a C++ class must implement the operation callbacks, -and then return an appropriate QDeclarativeListProperty value from the property getter. +and then return an appropriate QQmlListProperty value from the property getter. List properties should have no setter. In the example above, the Q_PROPERTY() declarative will look like this: \code -Q_PROPERTY(QDeclarativeListProperty fruit READ fruit); +Q_PROPERTY(QQmlListProperty fruit READ fruit); \endcode 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. +\note QQmlListProperty can only be used for lists of QObject-derived object pointers. \sa {Object and List Property Types} */ /*! -\fn QDeclarativeListProperty::QDeclarativeListProperty() +\fn QQmlListProperty::QQmlListProperty() \internal */ /*! -\fn QDeclarativeListProperty::QDeclarativeListProperty(QObject *object, QList &list) +\fn QQmlListProperty::QQmlListProperty(QObject *object, QList &list) -Convenience constructor for making a QDeclarativeListProperty value from an existing +Convenience constructor for making a QQmlListProperty value from an existing QList \a list. The \a list reference must remain valid for as long as \a object exists. \a object must be provided. @@ -364,11 +364,11 @@ can very useful while prototyping. */ /*! -\fn QDeclarativeListProperty::QDeclarativeListProperty(QObject *object, void *data, AppendFunction append, +\fn QQmlListProperty::QQmlListProperty(QObject *object, void *data, AppendFunction append, CountFunction count = 0, AtFunction at = 0, ClearFunction clear = 0) -Construct a QDeclarativeListProperty from a set of operation functions. An opaque \a data handle +Construct a QQmlListProperty from a set of operation functions. An opaque \a data handle may be passed which can be accessed from within the operation functions. The list property remains valid while \a object exists. @@ -377,39 +377,39 @@ The \a append operation is compulsory and must be provided, while the \a count, */ /*! -\typedef QDeclarativeListProperty::AppendFunction +\typedef QQmlListProperty::AppendFunction -Synonym for \c {void (*)(QDeclarativeListProperty *property, T *value)}. +Synonym for \c {void (*)(QQmlListProperty *property, T *value)}. Append the \a value to the list \a property. */ /*! -\typedef QDeclarativeListProperty::CountFunction +\typedef QQmlListProperty::CountFunction -Synonym for \c {int (*)(QDeclarativeListProperty *property)}. +Synonym for \c {int (*)(QQmlListProperty *property)}. Return the number of elements in the list \a property. */ /*! -\fn bool QDeclarativeListProperty::operator==(const QDeclarativeListProperty &other) const +\fn bool QQmlListProperty::operator==(const QQmlListProperty &other) const -Returns true if this QDeclarativeListProperty is equal to \a other, otherwise false. +Returns true if this QQmlListProperty is equal to \a other, otherwise false. */ /*! -\typedef QDeclarativeListProperty::AtFunction +\typedef QQmlListProperty::AtFunction -Synonym for \c {T *(*)(QDeclarativeListProperty *property, int index)}. +Synonym for \c {T *(*)(QQmlListProperty *property, int index)}. Return the element at position \a index in the list \a property. */ /*! -\typedef QDeclarativeListProperty::ClearFunction +\typedef QQmlListProperty::ClearFunction -Synonym for \c {void (*)(QDeclarativeListProperty *property)}. +Synonym for \c {void (*)(QQmlListProperty *property)}. Clear the list \a property. */ diff --git a/src/declarative/qml/qdeclarativelist.h b/src/qml/qml/qqmllist.h similarity index 66% rename from src/declarative/qml/qdeclarativelist.h rename to src/qml/qml/qqmllist.h index d1cebd240a..3f23cedbc2 100644 --- a/src/declarative/qml/qdeclarativelist.h +++ b/src/qml/qml/qqmllist.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVELIST_H -#define QDECLARATIVELIST_H +#ifndef QQMLLIST_H +#define QQMLLIST_H -#include +#include #include #include @@ -54,26 +54,26 @@ QT_BEGIN_NAMESPACE class QObject; struct QMetaObject; -#ifndef QDECLARATIVELISTPROPERTY -#define QDECLARATIVELISTPROPERTY +#ifndef QQMLLISTPROPERTY +#define QQMLLISTPROPERTY template -class QDeclarativeListProperty { +class QQmlListProperty { public: - typedef void (*AppendFunction)(QDeclarativeListProperty *, T*); - typedef int (*CountFunction)(QDeclarativeListProperty *); - typedef T *(*AtFunction)(QDeclarativeListProperty *, int); - typedef void (*ClearFunction)(QDeclarativeListProperty *); + typedef void (*AppendFunction)(QQmlListProperty *, T*); + typedef int (*CountFunction)(QQmlListProperty *); + typedef T *(*AtFunction)(QQmlListProperty *, int); + typedef void (*ClearFunction)(QQmlListProperty *); - QDeclarativeListProperty() + QQmlListProperty() : object(0), data(0), append(0), count(0), at(0), clear(0), dummy1(0), dummy2(0) {} - QDeclarativeListProperty(QObject *o, QList &list) + QQmlListProperty(QObject *o, QList &list) : object(o), data(&list), append(qlist_append), count(qlist_count), at(qlist_at), clear(qlist_clear), dummy1(0), dummy2(0) {} - QDeclarativeListProperty(QObject *o, void *d, AppendFunction a, CountFunction c = 0, AtFunction t = 0, + QQmlListProperty(QObject *o, void *d, AppendFunction a, CountFunction c = 0, AtFunction t = 0, ClearFunction r = 0) : object(o), data(d), append(a), count(c), at(t), clear(r), dummy1(0), dummy2(0) {} - bool operator==(const QDeclarativeListProperty &o) const { + bool operator==(const QQmlListProperty &o) const { return object == o.object && data == o.data && append == o.append && @@ -96,31 +96,31 @@ class QDeclarativeListProperty { void *dummy2; private: - static void qlist_append(QDeclarativeListProperty *p, T *v) { + static void qlist_append(QQmlListProperty *p, T *v) { reinterpret_cast *>(p->data)->append(v); } - static int qlist_count(QDeclarativeListProperty *p) { + static int qlist_count(QQmlListProperty *p) { return reinterpret_cast *>(p->data)->count(); } - static T *qlist_at(QDeclarativeListProperty *p, int idx) { + static T *qlist_at(QQmlListProperty *p, int idx) { return reinterpret_cast *>(p->data)->at(idx); } - static void qlist_clear(QDeclarativeListProperty *p) { + static void qlist_clear(QQmlListProperty *p) { return reinterpret_cast *>(p->data)->clear(); } }; #endif -class QDeclarativeEngine; -class QDeclarativeListReferencePrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeListReference +class QQmlEngine; +class QQmlListReferencePrivate; +class Q_QML_EXPORT QQmlListReference { public: - QDeclarativeListReference(); - QDeclarativeListReference(QObject *, const char *property, QDeclarativeEngine * = 0); - QDeclarativeListReference(const QDeclarativeListReference &); - QDeclarativeListReference &operator=(const QDeclarativeListReference &); - ~QDeclarativeListReference(); + QQmlListReference(); + QQmlListReference(QObject *, const char *property, QQmlEngine * = 0); + QQmlListReference(const QQmlListReference &); + QQmlListReference &operator=(const QQmlListReference &); + ~QQmlListReference(); bool isValid() const; @@ -138,14 +138,14 @@ class Q_DECLARATIVE_EXPORT QDeclarativeListReference int count() const; private: - friend class QDeclarativeListReferencePrivate; - QDeclarativeListReferencePrivate* d; + friend class QQmlListReferencePrivate; + QQmlListReferencePrivate* d; }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeListReference) +Q_DECLARE_METATYPE(QQmlListReference) QT_END_HEADER -#endif // QDECLARATIVELIST_H +#endif // QQMLLIST_H diff --git a/src/declarative/qml/qdeclarativelist_p.h b/src/qml/qml/qqmllist_p.h similarity index 77% rename from src/declarative/qml/qdeclarativelist_p.h rename to src/qml/qml/qqmllist_p.h index 60d4d28558..0fe0ed3d44 100644 --- a/src/declarative/qml/qdeclarativelist_p.h +++ b/src/qml/qml/qqmllist_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVELIST_P_H -#define QDECLARATIVELIST_P_H +#ifndef QQMLLIST_P_H +#define QQMLLIST_P_H // // W A R N I N G @@ -53,28 +53,28 @@ // We mean it. // -#include "qdeclarativelist.h" -#include "qdeclarativeguard_p.h" +#include "qqmllist.h" +#include "qqmlguard_p.h" QT_BEGIN_NAMESPACE -class QDeclarativeListReferencePrivate +class QQmlListReferencePrivate { public: - QDeclarativeListReferencePrivate(); + QQmlListReferencePrivate(); - static QDeclarativeListReference init(const QDeclarativeListProperty &, int, QDeclarativeEngine *); + static QQmlListReference init(const QQmlListProperty &, int, QQmlEngine *); - QDeclarativeGuard object; + QQmlGuard object; const QMetaObject *elementType; - QDeclarativeListProperty property; + QQmlListProperty property; int propertyType; void addref(); void release(); int refCount; - static inline QDeclarativeListReferencePrivate *get(QDeclarativeListReference *ref) { + static inline QQmlListReferencePrivate *get(QQmlListReference *ref) { return ref->d; } }; @@ -82,4 +82,4 @@ class QDeclarativeListReferencePrivate QT_END_NAMESPACE -#endif // QDECLARATIVELIST_P_H +#endif // QQMLLIST_P_H diff --git a/src/declarative/qml/qdeclarativelocale.cpp b/src/qml/qml/qqmllocale.cpp similarity index 96% rename from src/declarative/qml/qdeclarativelocale.cpp rename to src/qml/qml/qqmllocale.cpp index 39d0f6c378..4dc30f27ea 100644 --- a/src/declarative/qml/qdeclarativelocale.cpp +++ b/src/qml/qml/qqmllocale.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include "qdeclarativelocale_p.h" -#include "qdeclarativeengine_p.h" -#include +#include "qqmllocale_p.h" +#include "qqmlengine_p.h" +#include #include #include #include @@ -142,7 +142,7 @@ static void registerFunction(QV8Engine *engine, const char *script, v8::Invocati registerFunc->Call(v8::Local::Cast(registerFunc), 1, &args); } -void QDeclarativeDateExtension::registerExtension(QV8Engine *engine) +void QQmlDateExtension::registerExtension(QV8Engine *engine) { registerFunction(engine, dateToLocaleStringFunction, toLocaleString); registerFunction(engine, dateToLocaleTimeStringFunction, toLocaleTimeString); @@ -152,7 +152,7 @@ void QDeclarativeDateExtension::registerExtension(QV8Engine *engine) registerFunction(engine, dateFromLocaleDateStringFunction, fromLocaleDateString); } -v8::Handle QDeclarativeDateExtension::toLocaleString(const v8::Arguments& args) +v8::Handle QQmlDateExtension::toLocaleString(const v8::Arguments& args) { if (args.Length() > 2) return v8::Undefined(); @@ -193,7 +193,7 @@ v8::Handle QDeclarativeDateExtension::toLocaleString(const v8::Argume return r->engine->toString(formattedDt); } -v8::Handle QDeclarativeDateExtension::toLocaleTimeString(const v8::Arguments& args) +v8::Handle QQmlDateExtension::toLocaleTimeString(const v8::Arguments& args) { if (args.Length() > 2) return v8::Undefined(); @@ -235,7 +235,7 @@ v8::Handle QDeclarativeDateExtension::toLocaleTimeString(const v8::Ar return r->engine->toString(formattedTime); } -v8::Handle QDeclarativeDateExtension::toLocaleDateString(const v8::Arguments& args) +v8::Handle QQmlDateExtension::toLocaleDateString(const v8::Arguments& args) { if (args.Length() > 2) return v8::Undefined(); @@ -277,7 +277,7 @@ v8::Handle QDeclarativeDateExtension::toLocaleDateString(const v8::Ar return r->engine->toString(formattedDate); } -v8::Handle QDeclarativeDateExtension::fromLocaleString(const v8::Arguments& args) +v8::Handle QQmlDateExtension::fromLocaleString(const v8::Arguments& args) { if (args.Length() == 1 && args[0]->IsString()) { QLocale locale; @@ -312,7 +312,7 @@ v8::Handle QDeclarativeDateExtension::fromLocaleString(const v8::Argu return QJSConverter::toDateTime(dt); } -v8::Handle QDeclarativeDateExtension::fromLocaleTimeString(const v8::Arguments& args) +v8::Handle QQmlDateExtension::fromLocaleTimeString(const v8::Arguments& args) { if (args.Length() == 1 && args[0]->IsString()) { QLocale locale; @@ -352,7 +352,7 @@ v8::Handle QDeclarativeDateExtension::fromLocaleTimeString(const v8:: return QJSConverter::toDateTime(dt); } -v8::Handle QDeclarativeDateExtension::fromLocaleDateString(const v8::Arguments& args) +v8::Handle QQmlDateExtension::fromLocaleDateString(const v8::Arguments& args) { if (args.Length() == 1 && args[0]->IsString()) { QLocale locale; @@ -416,14 +416,14 @@ static const char *numberFromLocaleStringFunction = "})"; -void QDeclarativeNumberExtension::registerExtension(QV8Engine *engine) +void QQmlNumberExtension::registerExtension(QV8Engine *engine) { registerFunction(engine, numberToLocaleStringFunction, toLocaleString); registerFunction(engine, numberToLocaleCurrencyStringFunction, toLocaleCurrencyString); registerFunction(engine, numberFromLocaleStringFunction, fromLocaleString); } -v8::Handle QDeclarativeNumberExtension::toLocaleString(const v8::Arguments& args) +v8::Handle QQmlNumberExtension::toLocaleString(const v8::Arguments& args) { if (args.Length() > 3) V8THROW_ERROR("Locale: Number.toLocaleString(): Invalid arguments"); @@ -459,7 +459,7 @@ v8::Handle QDeclarativeNumberExtension::toLocaleString(const v8::Argu return r->engine->toString(r->locale.toString(number, (char)format, prec)); } -v8::Handle QDeclarativeNumberExtension::toLocaleCurrencyString(const v8::Arguments& args) +v8::Handle QQmlNumberExtension::toLocaleCurrencyString(const v8::Arguments& args) { if (args.Length() > 2) V8THROW_ERROR("Locale: Number.toLocaleCurrencyString(): Invalid arguments"); @@ -487,7 +487,7 @@ v8::Handle QDeclarativeNumberExtension::toLocaleCurrencyString(const return r->engine->toString(r->locale.toCurrencyString(number, symbol)); } -v8::Handle QDeclarativeNumberExtension::fromLocaleString(const v8::Arguments& args) +v8::Handle QQmlNumberExtension::fromLocaleString(const v8::Arguments& args) { if (args.Length() < 1 || args.Length() > 2) V8THROW_ERROR("Locale: Number.fromLocaleString(): Invalid arguments"); @@ -743,7 +743,7 @@ QV8LocaleDataDeletable::~QV8LocaleDataDeletable() V8_DEFINE_EXTENSION(QV8LocaleDataDeletable, localeV8Data); /*! - \qmlclass Locale QDeclarativeLocale + \qmlclass Locale QQmlLocale \inqmlmodule QtQuick 2 \brief The Locale object provides locale specific properties and formatted data. @@ -812,15 +812,15 @@ V8_DEFINE_EXTENSION(QV8LocaleDataDeletable, localeV8Data); \sa {QtQuick2::Date}{Date} {QtQuick2::Number}{Number} */ -QDeclarativeLocale::QDeclarativeLocale() +QQmlLocale::QQmlLocale() { } -QDeclarativeLocale::~QDeclarativeLocale() +QQmlLocale::~QQmlLocale() { } -v8::Handle QDeclarativeLocale::locale(QV8Engine *v8engine, const QString &locale) +v8::Handle QQmlLocale::locale(QV8Engine *v8engine, const QString &locale) { QV8LocaleDataDeletable *d = localeV8Data(v8engine); v8::Local v8Value = d->constructor->NewInstance(); @@ -845,12 +845,12 @@ static const char *localeCompareFunction = " })" "})"; -void QDeclarativeLocale::registerStringLocaleCompare(QV8Engine *engine) +void QQmlLocale::registerStringLocaleCompare(QV8Engine *engine) { registerFunction(engine, localeCompareFunction, localeCompare); } -v8::Handle QDeclarativeLocale::localeCompare(const v8::Arguments &args) +v8::Handle QQmlLocale::localeCompare(const v8::Arguments &args) { if (args.Length() != 1 || (!args[0]->IsString() && !args[0]->IsStringObject())) return v8::Undefined(); diff --git a/src/declarative/qml/qdeclarativelocale_p.h b/src/qml/qml/qqmllocale_p.h similarity index 92% rename from src/declarative/qml/qdeclarativelocale_p.h rename to src/qml/qml/qqmllocale_p.h index 98370fbf8a..2763ce4fc3 100644 --- a/src/declarative/qml/qdeclarativelocale_p.h +++ b/src/qml/qml/qqmllocale_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVELOCALE_H -#define QDECLARATIVELOCALE_H +#ifndef QQMLLOCALE_H +#define QQMLLOCALE_H -#include +#include #include #include @@ -54,7 +54,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeDateExtension +class QQmlDateExtension { public: static void registerExtension(QV8Engine *engine); @@ -69,7 +69,7 @@ class QDeclarativeDateExtension }; -class QDeclarativeNumberExtension +class QQmlNumberExtension { public: static void registerExtension(QV8Engine *engine); @@ -81,7 +81,7 @@ class QDeclarativeNumberExtension }; -class Q_AUTOTEST_EXPORT QDeclarativeLocale +class Q_AUTOTEST_EXPORT QQmlLocale { Q_GADGET Q_ENUMS(MeasurementSystem) @@ -90,7 +90,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeLocale Q_ENUMS(DayOfWeek) public: - ~QDeclarativeLocale(); + ~QQmlLocale(); enum MeasurementSystem { MetricSystem = QLocale::MetricSystem, @@ -122,7 +122,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeLocale static void registerStringLocaleCompare(QV8Engine *engine); private: - QDeclarativeLocale(); + QQmlLocale(); static v8::Handle localeCompare(const v8::Arguments &args); }; diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/qml/qml/qqmlmetatype.cpp similarity index 69% rename from src/declarative/qml/qdeclarativemetatype.cpp rename to src/qml/qml/qqmlmetatype.cpp index ac9d23184f..2061530dc5 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,12 +39,12 @@ ** ****************************************************************************/ -#include -#include "qdeclarativemetatype_p.h" +#include +#include "qqmlmetatype_p.h" -#include -#include -#include +#include +#include +#include #include #include @@ -66,18 +66,18 @@ QT_BEGIN_NAMESPACE -struct QDeclarativeMetaTypeData +struct QQmlMetaTypeData { - QDeclarativeMetaTypeData(); - ~QDeclarativeMetaTypeData(); - QList types; - typedef QHash Ids; + QQmlMetaTypeData(); + ~QQmlMetaTypeData(); + QList types; + typedef QHash Ids; Ids idToType; - typedef QHash Names; + typedef QHash Names; Names nameToType; - typedef QHash MetaObjects; + typedef QHash MetaObjects; MetaObjects metaObjectToType; - typedef QHash StringConverters; + typedef QHash StringConverters; StringConverters stringConverters; struct VersionedUri { @@ -91,12 +91,12 @@ struct QDeclarativeMetaTypeData QString uri; int majorVersion; }; - typedef QHash TypeModules; + typedef QHash TypeModules; TypeModules uriToModule; struct ModuleApiList { ModuleApiList() : sorted(true) {} - QList moduleApis; + QList moduleApis; bool sorted; }; typedef QHash ModuleApis; @@ -107,49 +107,49 @@ struct QDeclarativeMetaTypeData QBitArray interfaces; QBitArray lists; - QList parentFunctions; + QList parentFunctions; }; -class QDeclarativeTypeModulePrivate +class QQmlTypeModulePrivate { public: - QDeclarativeTypeModulePrivate() + QQmlTypeModulePrivate() : minMinorVersion(INT_MAX), maxMinorVersion(0) {} - QDeclarativeMetaTypeData::VersionedUri uri; + QQmlMetaTypeData::VersionedUri uri; int minMinorVersion; int maxMinorVersion; - void add(QDeclarativeType *); + void add(QQmlType *); - QStringHash > typeHash; - QList types; + QStringHash > typeHash; + QList types; }; -Q_GLOBAL_STATIC(QDeclarativeMetaTypeData, metaTypeData) +Q_GLOBAL_STATIC(QQmlMetaTypeData, metaTypeData) Q_GLOBAL_STATIC(QReadWriteLock, metaTypeDataLock) -static uint qHash(const QDeclarativeMetaTypeData::VersionedUri &v) +static uint qHash(const QQmlMetaTypeData::VersionedUri &v) { return qHash(v.uri) ^ qHash(v.majorVersion); } -QDeclarativeMetaTypeData::QDeclarativeMetaTypeData() +QQmlMetaTypeData::QQmlMetaTypeData() : moduleApiCount(0) { } -QDeclarativeMetaTypeData::~QDeclarativeMetaTypeData() +QQmlMetaTypeData::~QQmlMetaTypeData() { for (int i = 0; i < types.count(); ++i) delete types.at(i); } -class QDeclarativeTypePrivate +class QQmlTypePrivate { public: - QDeclarativeTypePrivate(); + QQmlTypePrivate(); void init() const; void initEnums() const; @@ -164,14 +164,14 @@ class QDeclarativeTypePrivate int m_typeId; int m_listId; int m_revision; mutable bool m_containsRevisionedAttributes; - mutable QDeclarativeType *m_superType; + mutable QQmlType *m_superType; int m_allocationSize; void (*m_newFunc)(void *); QString m_noCreationReason; const QMetaObject *m_baseMetaObject; - QDeclarativeAttachedPropertiesFunc m_attachedPropertiesFunc; + QQmlAttachedPropertiesFunc m_attachedPropertiesFunc; const QMetaObject *m_attachedPropertiesType; int m_attachedPropertiesId; int m_parserStatusCast; @@ -180,19 +180,19 @@ class QDeclarativeTypePrivate QObject *(*m_extFunc)(QObject *); const QMetaObject *m_extMetaObject; int m_index; - QDeclarativeCustomParser *m_customParser; + QQmlCustomParser *m_customParser; mutable volatile bool m_isSetup:1; mutable volatile bool m_isEnumSetup:1; mutable bool m_haveSuperType:1; - mutable QList m_metaObjects; + mutable QList m_metaObjects; mutable QStringHash m_enums; static QHash m_attachedPropertyIds; }; -QHash QDeclarativeTypePrivate::m_attachedPropertyIds; +QHash QQmlTypePrivate::m_attachedPropertyIds; -QDeclarativeTypePrivate::QDeclarativeTypePrivate() +QQmlTypePrivate::QQmlTypePrivate() : m_isInterface(false), m_iid(0), m_typeId(0), m_listId(0), m_revision(0), m_containsRevisionedAttributes(false), m_superType(0), m_allocationSize(0), m_newFunc(0), m_baseMetaObject(0), m_attachedPropertiesFunc(0), m_attachedPropertiesType(0), m_parserStatusCast(-1), m_propertyValueSourceCast(-1), @@ -202,8 +202,8 @@ QDeclarativeTypePrivate::QDeclarativeTypePrivate() } -QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::RegisterInterface &interface) -: d(new QDeclarativeTypePrivate) +QQmlType::QQmlType(int index, const QQmlPrivate::RegisterInterface &interface) +: d(new QQmlTypePrivate) { d->m_isInterface = true; d->m_iid = interface.iid; @@ -216,8 +216,8 @@ QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::Registe d->m_version_min = 0; } -QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::RegisterType &type) -: d(new QDeclarativeTypePrivate) +QQmlType::QQmlType(int index, const QQmlPrivate::RegisterType &type) +: d(new QQmlTypePrivate) { QString name = QString::fromUtf8(type.uri); if (type.uri) name += QLatin1Char('/'); @@ -256,46 +256,46 @@ QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::Registe d->m_extMetaObject = type.extensionMetaObject; } -QDeclarativeType::~QDeclarativeType() +QQmlType::~QQmlType() { delete d->m_customParser; delete d; } -QString QDeclarativeType::module() const +QString QQmlType::module() const { return d->m_module; } -int QDeclarativeType::majorVersion() const +int QQmlType::majorVersion() const { return d->m_version_maj; } -int QDeclarativeType::minorVersion() const +int QQmlType::minorVersion() const { return d->m_version_min; } -bool QDeclarativeType::availableInVersion(int vmajor, int vminor) const +bool QQmlType::availableInVersion(int vmajor, int vminor) const { Q_ASSERT(vmajor >= 0 && vminor >= 0); return vmajor == d->m_version_maj && vminor >= d->m_version_min; } -bool QDeclarativeType::availableInVersion(const QString &module, int vmajor, int vminor) const +bool QQmlType::availableInVersion(const QString &module, int vmajor, int vminor) const { Q_ASSERT(vmajor >= 0 && vminor >= 0); return module == d->m_module && vmajor == d->m_version_maj && vminor >= d->m_version_min; } // returns the nearest _registered_ super class -QDeclarativeType *QDeclarativeType::superType() const +QQmlType *QQmlType::superType() const { if (!d->m_haveSuperType) { const QMetaObject *mo = d->m_baseMetaObject->superClass(); while (mo && !d->m_superType) { - d->m_superType = QDeclarativeMetaType::qmlType(mo, d->m_module, d->m_version_maj, d->m_version_min); + d->m_superType = QQmlMetaType::qmlType(mo, d->m_module, d->m_version_maj, d->m_version_min); mo = mo->superClass(); } d->m_haveSuperType = true; @@ -395,7 +395,7 @@ static bool isPropertyRevisioned(const QMetaObject *mo, int index) return false; } -void QDeclarativeTypePrivate::init() const +void QQmlTypePrivate::init() const { if (m_isSetup) return; @@ -412,13 +412,13 @@ void QDeclarativeTypePrivate::init() const builder.setFlags(QMetaObjectBuilder::DynamicMetaObject); QMetaObject *mmo = builder.toMetaObject(); mmo->d.superdata = mo; - QDeclarativeProxyMetaObject::ProxyData data = { mmo, m_extFunc, 0, 0 }; + QQmlProxyMetaObject::ProxyData data = { mmo, m_extFunc, 0, 0 }; m_metaObjects << data; } mo = mo->d.superdata; while(mo) { - QDeclarativeType *t = metaTypeData()->metaObjectToType.value(mo); + QQmlType *t = metaTypeData()->metaObjectToType.value(mo); if (t) { if (t->d->m_extFunc) { QMetaObjectBuilder builder; @@ -428,7 +428,7 @@ void QDeclarativeTypePrivate::init() const mmo->d.superdata = m_baseMetaObject; if (!m_metaObjects.isEmpty()) m_metaObjects.last().metaObject->d.superdata = mmo; - QDeclarativeProxyMetaObject::ProxyData data = { mmo, t->d->m_extFunc, 0, 0 }; + QQmlProxyMetaObject::ProxyData data = { mmo, t->d->m_extFunc, 0, 0 }; m_metaObjects << data; } } @@ -465,7 +465,7 @@ void QDeclarativeTypePrivate::init() const lock.unlock(); } -void QDeclarativeTypePrivate::initEnums() const +void QQmlTypePrivate::initEnums() const { if (m_isEnumSetup) return; @@ -486,7 +486,7 @@ void QDeclarativeTypePrivate::initEnums() const m_isEnumSetup = true; } -QByteArray QDeclarativeType::typeName() const +QByteArray QQmlType::typeName() const { if (d->m_baseMetaObject) return d->m_baseMetaObject->className(); @@ -494,7 +494,7 @@ QByteArray QDeclarativeType::typeName() const return QByteArray(); } -const QString &QDeclarativeType::elementName() const +const QString &QQmlType::elementName() const { if (d->m_elementName.isEmpty()) { QString n = qmlTypeName(); @@ -504,12 +504,12 @@ const QString &QDeclarativeType::elementName() const return d->m_elementName; } -const QString &QDeclarativeType::qmlTypeName() const +const QString &QQmlType::qmlTypeName() const { return d->m_name; } -QObject *QDeclarativeType::create() const +QObject *QQmlType::create() const { d->init(); @@ -517,12 +517,12 @@ QObject *QDeclarativeType::create() const d->m_newFunc(rv); if (rv && !d->m_metaObjects.isEmpty()) - (void *)new QDeclarativeProxyMetaObject(rv, &d->m_metaObjects); + (void *)new QQmlProxyMetaObject(rv, &d->m_metaObjects); return rv; } -void QDeclarativeType::create(QObject **out, void **memory, size_t additionalMemory) const +void QQmlType::create(QObject **out, void **memory, size_t additionalMemory) const { d->init(); @@ -530,60 +530,60 @@ void QDeclarativeType::create(QObject **out, void **memory, size_t additionalMem d->m_newFunc(rv); if (rv && !d->m_metaObjects.isEmpty()) - (void *)new QDeclarativeProxyMetaObject(rv, &d->m_metaObjects); + (void *)new QQmlProxyMetaObject(rv, &d->m_metaObjects); *out = rv; *memory = ((char *)rv) + d->m_allocationSize; } -QDeclarativeCustomParser *QDeclarativeType::customParser() const +QQmlCustomParser *QQmlType::customParser() const { return d->m_customParser; } -QDeclarativeType::CreateFunc QDeclarativeType::createFunction() const +QQmlType::CreateFunc QQmlType::createFunction() const { return d->m_newFunc; } -QString QDeclarativeType::noCreationReason() const +QString QQmlType::noCreationReason() const { return d->m_noCreationReason; } -int QDeclarativeType::createSize() const +int QQmlType::createSize() const { return d->m_allocationSize; } -bool QDeclarativeType::isCreatable() const +bool QQmlType::isCreatable() const { return d->m_newFunc != 0; } -bool QDeclarativeType::isExtendedType() const +bool QQmlType::isExtendedType() const { d->init(); return !d->m_metaObjects.isEmpty(); } -bool QDeclarativeType::isInterface() const +bool QQmlType::isInterface() const { return d->m_isInterface; } -int QDeclarativeType::typeId() const +int QQmlType::typeId() const { return d->m_typeId; } -int QDeclarativeType::qListTypeId() const +int QQmlType::qListTypeId() const { return d->m_listId; } -const QMetaObject *QDeclarativeType::metaObject() const +const QMetaObject *QQmlType::metaObject() const { d->init(); @@ -594,29 +594,29 @@ const QMetaObject *QDeclarativeType::metaObject() const } -const QMetaObject *QDeclarativeType::baseMetaObject() const +const QMetaObject *QQmlType::baseMetaObject() const { return d->m_baseMetaObject; } -bool QDeclarativeType::containsRevisionedAttributes() const +bool QQmlType::containsRevisionedAttributes() const { d->init(); return d->m_containsRevisionedAttributes; } -int QDeclarativeType::metaObjectRevision() const +int QQmlType::metaObjectRevision() const { return d->m_revision; } -QDeclarativeAttachedPropertiesFunc QDeclarativeType::attachedPropertiesFunction() const +QQmlAttachedPropertiesFunc QQmlType::attachedPropertiesFunction() const { return d->m_attachedPropertiesFunc; } -const QMetaObject *QDeclarativeType::attachedPropertiesType() const +const QMetaObject *QQmlType::attachedPropertiesType() const { return d->m_attachedPropertiesType; } @@ -626,37 +626,37 @@ This is the id passed to qmlAttachedPropertiesById(). This is different from th for the case that a single class is registered under two or more names (eg. Item in Qt 4.7 and QtQuick 1.0). */ -int QDeclarativeType::attachedPropertiesId() const +int QQmlType::attachedPropertiesId() const { return d->m_attachedPropertiesId; } -int QDeclarativeType::parserStatusCast() const +int QQmlType::parserStatusCast() const { return d->m_parserStatusCast; } -int QDeclarativeType::propertyValueSourceCast() const +int QQmlType::propertyValueSourceCast() const { return d->m_propertyValueSourceCast; } -int QDeclarativeType::propertyValueInterceptorCast() const +int QQmlType::propertyValueInterceptorCast() const { return d->m_propertyValueInterceptorCast; } -const char *QDeclarativeType::interfaceIId() const +const char *QQmlType::interfaceIId() const { return d->m_iid; } -int QDeclarativeType::index() const +int QQmlType::index() const { return d->m_index; } -int QDeclarativeType::enumValue(const QHashedStringRef &name) const +int QQmlType::enumValue(const QHashedStringRef &name) const { d->initEnums(); @@ -664,7 +664,7 @@ int QDeclarativeType::enumValue(const QHashedStringRef &name) const return rv?*rv:-1; } -int QDeclarativeType::enumValue(const QHashedV8String &name) const +int QQmlType::enumValue(const QHashedV8String &name) const { d->initEnums(); @@ -672,44 +672,44 @@ int QDeclarativeType::enumValue(const QHashedV8String &name) const return rv?*rv:-1; } -QDeclarativeTypeModule::QDeclarativeTypeModule() -: d(new QDeclarativeTypeModulePrivate) +QQmlTypeModule::QQmlTypeModule() +: d(new QQmlTypeModulePrivate) { } -QDeclarativeTypeModule::~QDeclarativeTypeModule() +QQmlTypeModule::~QQmlTypeModule() { delete d; d = 0; } -QString QDeclarativeTypeModule::module() const +QString QQmlTypeModule::module() const { return d->uri.uri; } -int QDeclarativeTypeModule::majorVersion() const +int QQmlTypeModule::majorVersion() const { return d->uri.majorVersion; } -int QDeclarativeTypeModule::minimumMinorVersion() const +int QQmlTypeModule::minimumMinorVersion() const { return d->minMinorVersion; } -int QDeclarativeTypeModule::maximumMinorVersion() const +int QQmlTypeModule::maximumMinorVersion() const { return d->maxMinorVersion; } -void QDeclarativeTypeModulePrivate::add(QDeclarativeType *type) +void QQmlTypeModulePrivate::add(QQmlType *type) { types << type; minMinorVersion = qMin(minMinorVersion, type->minorVersion()); maxMinorVersion = qMax(maxMinorVersion, type->minorVersion()); - QList &list = typeHash[type->elementName()]; + QList &list = typeHash[type->elementName()]; for (int ii = 0; ii < list.count(); ++ii) { if (list.at(ii)->minorVersion() < type->minorVersion()) { list.insert(ii, type); @@ -719,18 +719,18 @@ void QDeclarativeTypeModulePrivate::add(QDeclarativeType *type) list.append(type); } -QList QDeclarativeTypeModule::types() +QList QQmlTypeModule::types() { - QList rv; + QList rv; QReadLocker lock(metaTypeDataLock()); rv = d->types; return rv; } -QList QDeclarativeTypeModule::type(const QString &name) +QList QQmlTypeModule::type(const QString &name) { QReadLocker lock(metaTypeDataLock()); - QList rv; + QList rv; for (int ii = 0; ii < d->types.count(); ++ii) { if (d->types.at(ii)->elementName() == name) rv << d->types.at(ii); @@ -738,11 +738,11 @@ QList QDeclarativeTypeModule::type(const QString &name) return rv; } -QDeclarativeType *QDeclarativeTypeModule::type(const QHashedStringRef &name, int minor) +QQmlType *QQmlTypeModule::type(const QHashedStringRef &name, int minor) { QReadLocker lock(metaTypeDataLock()); - QList *types = d->typeHash.value(name); + QList *types = d->typeHash.value(name); if (!types) return 0; for (int ii = 0; ii < types->count(); ++ii) @@ -752,11 +752,11 @@ QDeclarativeType *QDeclarativeTypeModule::type(const QHashedStringRef &name, int return 0; } -QDeclarativeType *QDeclarativeTypeModule::type(const QHashedV8String &name, int minor) +QQmlType *QQmlTypeModule::type(const QHashedV8String &name, int minor) { QReadLocker lock(metaTypeDataLock()); - QList *types = d->typeHash.value(name); + QList *types = d->typeHash.value(name); if (!types) return 0; for (int ii = 0; ii < types->count(); ++ii) @@ -767,74 +767,74 @@ QDeclarativeType *QDeclarativeTypeModule::type(const QHashedV8String &name, int } -QDeclarativeTypeModuleVersion::QDeclarativeTypeModuleVersion() +QQmlTypeModuleVersion::QQmlTypeModuleVersion() : m_module(0), m_minor(0) { } -QDeclarativeTypeModuleVersion::QDeclarativeTypeModuleVersion(QDeclarativeTypeModule *module, int minor) +QQmlTypeModuleVersion::QQmlTypeModuleVersion(QQmlTypeModule *module, int minor) : m_module(module), m_minor(minor) { Q_ASSERT(m_module); Q_ASSERT(m_minor >= 0); } -QDeclarativeTypeModuleVersion::QDeclarativeTypeModuleVersion(const QDeclarativeTypeModuleVersion &o) +QQmlTypeModuleVersion::QQmlTypeModuleVersion(const QQmlTypeModuleVersion &o) : m_module(o.m_module), m_minor(o.m_minor) { } -QDeclarativeTypeModuleVersion &QDeclarativeTypeModuleVersion::operator=(const QDeclarativeTypeModuleVersion &o) +QQmlTypeModuleVersion &QQmlTypeModuleVersion::operator=(const QQmlTypeModuleVersion &o) { m_module = o.m_module; m_minor = o.m_minor; return *this; } -QDeclarativeTypeModule *QDeclarativeTypeModuleVersion::module() const +QQmlTypeModule *QQmlTypeModuleVersion::module() const { return m_module; } -int QDeclarativeTypeModuleVersion::minorVersion() const +int QQmlTypeModuleVersion::minorVersion() const { return m_minor; } -QDeclarativeType *QDeclarativeTypeModuleVersion::type(const QHashedStringRef &name) const +QQmlType *QQmlTypeModuleVersion::type(const QHashedStringRef &name) const { if (m_module) return m_module->type(name, m_minor); else return 0; } -QDeclarativeType *QDeclarativeTypeModuleVersion::type(const QHashedV8String &name) const +QQmlType *QQmlTypeModuleVersion::type(const QHashedV8String &name) const { if (m_module) return m_module->type(name, m_minor); else return 0; } -int registerAutoParentFunction(QDeclarativePrivate::RegisterAutoParent &autoparent) +int registerAutoParentFunction(QQmlPrivate::RegisterAutoParent &autoparent) { QWriteLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); data->parentFunctions.append(autoparent.function); return data->parentFunctions.count() - 1; } -int registerInterface(const QDeclarativePrivate::RegisterInterface &interface) +int registerInterface(const QQmlPrivate::RegisterInterface &interface) { if (interface.version > 0) qFatal("qmlRegisterType(): Cannot mix incompatible QML versions."); QWriteLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); int index = data->types.count(); - QDeclarativeType *type = new QDeclarativeType(index, interface); + QQmlType *type = new QQmlType(index, interface); data->types.append(type); data->idToType.insert(type->typeId(), type); @@ -853,7 +853,7 @@ int registerInterface(const QDeclarativePrivate::RegisterInterface &interface) return index; } -int registerType(const QDeclarativePrivate::RegisterType &type) +int registerType(const QQmlPrivate::RegisterType &type) { if (type.elementName) { for (int ii = 0; type.elementName[ii]; ++ii) { @@ -865,10 +865,10 @@ int registerType(const QDeclarativePrivate::RegisterType &type) } QWriteLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); int index = data->types.count(); - QDeclarativeType *dtype = new QDeclarativeType(index, type); + QQmlType *dtype = new QQmlType(index, type); data->types.append(dtype); data->idToType.insert(dtype->typeId(), dtype); @@ -889,10 +889,10 @@ int registerType(const QDeclarativePrivate::RegisterType &type) if (type.uri) { QString mod = QString::fromUtf8(type.uri); - QDeclarativeMetaTypeData::VersionedUri versionedUri(mod, type.versionMajor); - QDeclarativeTypeModule *module = data->uriToModule.value(versionedUri); + QQmlMetaTypeData::VersionedUri versionedUri(mod, type.versionMajor); + QQmlTypeModule *module = data->uriToModule.value(versionedUri); if (!module) { - module = new QDeclarativeTypeModule; + module = new QQmlTypeModule; module->d->uri = versionedUri; data->uriToModule.insert(versionedUri, module); } @@ -902,13 +902,13 @@ int registerType(const QDeclarativePrivate::RegisterType &type) return index; } -int registerModuleApi(const QDeclarativePrivate::RegisterModuleApi &api) +int registerModuleApi(const QQmlPrivate::RegisterModuleApi &api) { QWriteLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); QString uri = QString::fromUtf8(api.uri); - QDeclarativeMetaType::ModuleApi import; + QQmlMetaType::ModuleApi import; import.major = api.versionMajor; import.minor = api.versionMinor; import.script = api.scriptApi; @@ -916,9 +916,9 @@ int registerModuleApi(const QDeclarativePrivate::RegisterModuleApi &api) int index = data->moduleApiCount++; - QDeclarativeMetaTypeData::ModuleApis::Iterator iter = data->moduleApis.find(uri); + QQmlMetaTypeData::ModuleApis::Iterator iter = data->moduleApis.find(uri); if (iter == data->moduleApis.end()) { - QDeclarativeMetaTypeData::ModuleApiList apis; + QQmlMetaTypeData::ModuleApiList apis; apis.moduleApis << import; data->moduleApis.insert(uri, apis); } else { @@ -934,7 +934,7 @@ int registerModuleApi(const QDeclarativePrivate::RegisterModuleApi &api) This method is "over generalized" to allow us to (potentially) register more types of things in the future without adding exported symbols. */ -int QDeclarativePrivate::qmlregister(RegistrationType type, void *data) +int QQmlPrivate::qmlregister(RegistrationType type, void *data) { if (type == TypeRegistration) { return registerType(*reinterpret_cast(data)); @@ -951,12 +951,12 @@ int QDeclarativePrivate::qmlregister(RegistrationType type, void *data) /* Returns true if a module \a uri of any version is installed. */ -bool QDeclarativeMetaType::isAnyModule(const QString &uri) +bool QQmlMetaType::isAnyModule(const QString &uri) { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); - for (QDeclarativeMetaTypeData::TypeModules::ConstIterator iter = data->uriToModule.begin(); + for (QQmlMetaTypeData::TypeModules::ConstIterator iter = data->uriToModule.begin(); iter != data->uriToModule.end(); ++iter) { if ((*iter)->module() == uri) return true; @@ -972,21 +972,21 @@ bool QDeclarativeMetaType::isAnyModule(const QString &uri) 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. */ -bool QDeclarativeMetaType::isModule(const QString &module, int versionMajor, int versionMinor) +bool QQmlMetaType::isModule(const QString &module, int versionMajor, int versionMinor) { Q_ASSERT(versionMajor >= 0 && versionMinor >= 0); QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); // first, check Types - QDeclarativeTypeModule *tm = - data->uriToModule.value(QDeclarativeMetaTypeData::VersionedUri(module, versionMajor)); + QQmlTypeModule *tm = + data->uriToModule.value(QQmlMetaTypeData::VersionedUri(module, versionMajor)); if (tm && tm->minimumMinorVersion() <= versionMinor && tm->maximumMinorVersion() >= versionMinor) return true; // then, check ModuleApis - foreach (const QDeclarativeMetaType::ModuleApi &mApi, data->moduleApis.value(module).moduleApis) { + foreach (const QQmlMetaType::ModuleApi &mApi, data->moduleApis.value(module).moduleApis) { if (mApi.major == versionMajor && mApi.minor == versionMinor) // XXX is this correct? return true; } @@ -994,32 +994,32 @@ bool QDeclarativeMetaType::isModule(const QString &module, int versionMajor, int return false; } -QDeclarativeTypeModule *QDeclarativeMetaType::typeModule(const QString &uri, int majorVersion) +QQmlTypeModule *QQmlMetaType::typeModule(const QString &uri, int majorVersion) { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); - return data->uriToModule.value(QDeclarativeMetaTypeData::VersionedUri(uri, majorVersion)); + QQmlMetaTypeData *data = metaTypeData(); + return data->uriToModule.value(QQmlMetaTypeData::VersionedUri(uri, majorVersion)); } -QList QDeclarativeMetaType::parentFunctions() +QList QQmlMetaType::parentFunctions() { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); return data->parentFunctions; } -static bool operator<(const QDeclarativeMetaType::ModuleApi &lhs, const QDeclarativeMetaType::ModuleApi &rhs) +static bool operator<(const QQmlMetaType::ModuleApi &lhs, const QQmlMetaType::ModuleApi &rhs) { return lhs.major < rhs.major || (lhs.major == rhs.major && lhs.minor < rhs.minor); } -QDeclarativeMetaType::ModuleApi -QDeclarativeMetaType::moduleApi(const QString &uri, int versionMajor, int versionMinor) +QQmlMetaType::ModuleApi +QQmlMetaType::moduleApi(const QString &uri, int versionMajor, int versionMinor) { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); - QDeclarativeMetaTypeData::ModuleApis::Iterator iter = data->moduleApis.find(uri); + QQmlMetaTypeData::ModuleApis::Iterator iter = data->moduleApis.find(uri); if (iter == data->moduleApis.end()) return ModuleApi(); @@ -1037,13 +1037,13 @@ QDeclarativeMetaType::moduleApi(const QString &uri, int versionMajor, int versio return ModuleApi(); } -QHash > QDeclarativeMetaType::moduleApis() +QHash > QQmlMetaType::moduleApis() { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); QHash > moduleApis; - QHashIterator it(data->moduleApis); + QHashIterator it(data->moduleApis); while (it.hasNext()) { it.next(); moduleApis[it.key()] = it.value().moduleApis; @@ -1052,7 +1052,7 @@ QHash > QDeclarativeMetaType::mo return moduleApis; } -QObject *QDeclarativeMetaType::toQObject(const QVariant &v, bool *ok) +QObject *QQmlMetaType::toQObject(const QVariant &v, bool *ok) { if (!isQObject(v.userType())) { if (ok) *ok = false; @@ -1064,52 +1064,52 @@ QObject *QDeclarativeMetaType::toQObject(const QVariant &v, bool *ok) return *(QObject **)v.constData(); } -bool QDeclarativeMetaType::isQObject(int userType) +bool QQmlMetaType::isQObject(int userType) { if (userType == QMetaType::QObjectStar) return true; QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); return userType >= 0 && userType < data->objects.size() && data->objects.testBit(userType); } /* Returns the item type for a list of type \a id. */ -int QDeclarativeMetaType::listType(int id) +int QQmlMetaType::listType(int id) { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); - QDeclarativeType *type = data->idToType.value(id); + QQmlMetaTypeData *data = metaTypeData(); + QQmlType *type = data->idToType.value(id); if (type && type->qListTypeId() == id) return type->typeId(); else return 0; } -int QDeclarativeMetaType::attachedPropertiesFuncId(const QMetaObject *mo) +int QQmlMetaType::attachedPropertiesFuncId(const QMetaObject *mo) { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); - QDeclarativeType *type = data->metaObjectToType.value(mo); + QQmlType *type = data->metaObjectToType.value(mo); if (type && type->attachedPropertiesFunction()) return type->attachedPropertiesId(); else return -1; } -QDeclarativeAttachedPropertiesFunc QDeclarativeMetaType::attachedPropertiesFuncById(int id) +QQmlAttachedPropertiesFunc QQmlMetaType::attachedPropertiesFuncById(int id) { if (id < 0) return 0; QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); return data->types.at(id)->attachedPropertiesFunction(); } -QMetaProperty QDeclarativeMetaType::defaultProperty(const QMetaObject *metaObject) +QMetaProperty QQmlMetaType::defaultProperty(const QMetaObject *metaObject) { int idx = metaObject->indexOfClassInfo("DefaultProperty"); if (-1 == idx) @@ -1126,7 +1126,7 @@ QMetaProperty QDeclarativeMetaType::defaultProperty(const QMetaObject *metaObjec return metaObject->property(idx); } -QMetaProperty QDeclarativeMetaType::defaultProperty(QObject *obj) +QMetaProperty QQmlMetaType::defaultProperty(QObject *obj) { if (!obj) return QMetaProperty(); @@ -1135,7 +1135,7 @@ QMetaProperty QDeclarativeMetaType::defaultProperty(QObject *obj) return defaultProperty(metaObject); } -QMetaMethod QDeclarativeMetaType::defaultMethod(const QMetaObject *metaObject) +QMetaMethod QQmlMetaType::defaultMethod(const QMetaObject *metaObject) { int idx = metaObject->indexOfClassInfo("DefaultMethod"); if (-1 == idx) @@ -1152,7 +1152,7 @@ QMetaMethod QDeclarativeMetaType::defaultMethod(const QMetaObject *metaObject) return metaObject->method(idx); } -QMetaMethod QDeclarativeMetaType::defaultMethod(QObject *obj) +QMetaMethod QQmlMetaType::defaultMethod(QObject *obj) { if (!obj) return QMetaMethod(); @@ -1161,7 +1161,7 @@ QMetaMethod QDeclarativeMetaType::defaultMethod(QObject *obj) return defaultMethod(metaObject); } -QDeclarativeMetaType::TypeCategory QDeclarativeMetaType::typeCategory(int userType) +QQmlMetaType::TypeCategory QQmlMetaType::typeCategory(int userType) { if (userType < 0) return Unknown; @@ -1169,7 +1169,7 @@ QDeclarativeMetaType::TypeCategory QDeclarativeMetaType::typeCategory(int userTy return Object; QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); if (userType < data->objects.size() && data->objects.testBit(userType)) return Object; else if (userType < data->lists.size() && data->lists.testBit(userType)) @@ -1178,18 +1178,18 @@ QDeclarativeMetaType::TypeCategory QDeclarativeMetaType::typeCategory(int userTy return Unknown; } -bool QDeclarativeMetaType::isInterface(int userType) +bool QQmlMetaType::isInterface(int userType) { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); return userType >= 0 && userType < data->interfaces.size() && data->interfaces.testBit(userType); } -const char *QDeclarativeMetaType::interfaceIId(int userType) +const char *QQmlMetaType::interfaceIId(int userType) { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); - QDeclarativeType *type = data->idToType.value(userType); + QQmlMetaTypeData *data = metaTypeData(); + QQmlType *type = data->idToType.value(userType); lock.unlock(); if (type && type->isInterface() && type->typeId() == userType) return type->interfaceIId(); @@ -1197,10 +1197,10 @@ const char *QDeclarativeMetaType::interfaceIId(int userType) return 0; } -bool QDeclarativeMetaType::isList(int userType) +bool QQmlMetaType::isList(int userType) { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); return userType >= 0 && userType < data->lists.size() && data->lists.testBit(userType); } @@ -1219,11 +1219,11 @@ bool QDeclarativeMetaType::isList(int userType) QVariant (*StringConverter)(const QString &); \endcode */ -void QDeclarativeMetaType::registerCustomStringConverter(int type, StringConverter converter) +void QQmlMetaType::registerCustomStringConverter(int type, StringConverter converter) { QWriteLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); if (data->stringConverters.contains(type)) return; data->stringConverters.insert(type, converter); @@ -1233,11 +1233,11 @@ void QDeclarativeMetaType::registerCustomStringConverter(int type, StringConvert Return the custom string converter for \a type, previously installed through registerCustomStringConverter() */ -QDeclarativeMetaType::StringConverter QDeclarativeMetaType::customStringConverter(int type) +QQmlMetaType::StringConverter QQmlMetaType::customStringConverter(int type) { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); return data->stringConverters.value(type); } @@ -1245,15 +1245,15 @@ QDeclarativeMetaType::StringConverter QDeclarativeMetaType::customStringConverte Returns the type (if any) of URI-qualified named \a name in version specified by \a version_major and \a version_minor. */ -QDeclarativeType *QDeclarativeMetaType::qmlType(const QString &name, int version_major, int version_minor) +QQmlType *QQmlMetaType::qmlType(const QString &name, int version_major, int version_minor) { Q_ASSERT(version_major >= 0 && version_minor >= 0); QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); - QDeclarativeMetaTypeData::Names::ConstIterator it = data->nameToType.find(name); + QQmlMetaTypeData::Names::ConstIterator it = data->nameToType.find(name); while (it != data->nameToType.end()) { - // XXX version_major<0 just a kludge for QDeclarativePropertyPrivate::initProperty + // XXX version_major<0 just a kludge for QQmlPropertyPrivate::initProperty if (it.key() == name && (version_major<0 || (*it)->availableInVersion(version_major,version_minor))) return (*it); ++it; @@ -1266,10 +1266,10 @@ QDeclarativeType *QDeclarativeMetaType::qmlType(const QString &name, int version Returns the type (if any) that corresponds to the \a metaObject. Returns null if no type is registered. */ -QDeclarativeType *QDeclarativeMetaType::qmlType(const QMetaObject *metaObject) +QQmlType *QQmlMetaType::qmlType(const QMetaObject *metaObject) { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); return data->metaObjectToType.value(metaObject); } @@ -1279,15 +1279,15 @@ QDeclarativeType *QDeclarativeMetaType::qmlType(const QMetaObject *metaObject) by \a version_major and \a version_minor in module specified by \a uri. Returns null if no type is registered. */ -QDeclarativeType *QDeclarativeMetaType::qmlType(const QMetaObject *metaObject, const QString &module, int version_major, int version_minor) +QQmlType *QQmlMetaType::qmlType(const QMetaObject *metaObject, const QString &module, int version_major, int version_minor) { Q_ASSERT(version_major >= 0 && version_minor >= 0); QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); - QDeclarativeMetaTypeData::MetaObjects::const_iterator it = data->metaObjectToType.find(metaObject); + QQmlMetaTypeData::MetaObjects::const_iterator it = data->metaObjectToType.find(metaObject); while (it != data->metaObjectToType.end() && it.key() == metaObject) { - QDeclarativeType *t = *it; + QQmlType *t = *it; if (version_major < 0 || t->availableInVersion(module, version_major,version_minor)) return t; ++it; @@ -1300,12 +1300,12 @@ QDeclarativeType *QDeclarativeMetaType::qmlType(const QMetaObject *metaObject, c Returns the type (if any) that corresponds to the QVariant::Type \a userType. Returns null if no type is registered. */ -QDeclarativeType *QDeclarativeMetaType::qmlType(int userType) +QQmlType *QQmlMetaType::qmlType(int userType) { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); - QDeclarativeType *type = data->idToType.value(userType); + QQmlType *type = data->idToType.value(userType); if (type && type->typeId() == userType) return type; else @@ -1315,10 +1315,10 @@ QDeclarativeType *QDeclarativeMetaType::qmlType(int userType) /*! Returns the list of registered QML type names. */ -QList QDeclarativeMetaType::qmlTypeNames() +QList QQmlMetaType::qmlTypeNames() { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); return data->nameToType.keys(); } @@ -1326,15 +1326,15 @@ QList QDeclarativeMetaType::qmlTypeNames() /*! Returns the list of registered QML types. */ -QList QDeclarativeMetaType::qmlTypes() +QList QQmlMetaType::qmlTypes() { QReadLocker lock(metaTypeDataLock()); - QDeclarativeMetaTypeData *data = metaTypeData(); + QQmlMetaTypeData *data = metaTypeData(); return data->nameToType.values(); } -int QDeclarativeMetaType::QQuickAnchorLineMetaTypeId() +int QQmlMetaType::QQuickAnchorLineMetaTypeId() { static int id = 0; if (!id) { @@ -1343,14 +1343,14 @@ int QDeclarativeMetaType::QQuickAnchorLineMetaTypeId() return id; } -QDeclarativeMetaType::CompareFunction QDeclarativeMetaType::anchorLineCompareFunction = 0; +QQmlMetaType::CompareFunction QQmlMetaType::anchorLineCompareFunction = 0; -void QDeclarativeMetaType::setQQuickAnchorLineCompareFunction(CompareFunction fun) +void QQmlMetaType::setQQuickAnchorLineCompareFunction(CompareFunction fun) { anchorLineCompareFunction = fun; } -bool QDeclarativeMetaType::QQuickAnchorLineCompare(const void *p1, const void *p2) +bool QQmlMetaType::QQuickAnchorLineCompare(const void *p1, const void *p2) { Q_ASSERT(anchorLineCompareFunction != 0); return anchorLineCompareFunction(p1, p2); diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/qml/qml/qqmlmetatype_p.h similarity index 64% rename from src/declarative/qml/qdeclarativemetatype_p.h rename to src/qml/qml/qqmlmetatype_p.h index b2a6aa40f6..ad6a2aa055 100644 --- a/src/declarative/qml/qdeclarativemetatype_p.h +++ b/src/qml/qml/qqmlmetatype_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEMETATYPE_P_H -#define QDECLARATIVEMETATYPE_P_H +#ifndef QQMLMETATYPE_P_H +#define QQMLMETATYPE_P_H // // W A R N I N G @@ -53,31 +53,31 @@ // We mean it. // -#include "qdeclarative.h" +#include "qqml.h" +#include #include #include #include -#include -#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeType; -class QDeclarativeCustomParser; -class QDeclarativeTypePrivate; -class QDeclarativeTypeModule; +class QQmlType; +class QQmlCustomParser; +class QQmlTypePrivate; +class QQmlTypeModule; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMetaType +class Q_QML_PRIVATE_EXPORT QQmlMetaType { public: static QList qmlTypeNames(); - static QList qmlTypes(); + static QList qmlTypes(); - static QDeclarativeType *qmlType(const QString &, int, int); - static QDeclarativeType *qmlType(const QMetaObject *); - static QDeclarativeType *qmlType(const QMetaObject *metaObject, const QString &module, int version_major, int version_minor); - static QDeclarativeType *qmlType(int); + static QQmlType *qmlType(const QString &, int, int); + static QQmlType *qmlType(const QMetaObject *); + static QQmlType *qmlType(const QMetaObject *metaObject, const QString &module, int version_major, int version_minor); + static QQmlType *qmlType(int); static QMetaProperty defaultProperty(const QMetaObject *); static QMetaProperty defaultProperty(QObject *); @@ -89,7 +89,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMetaType static int listType(int); static int attachedPropertiesFuncId(const QMetaObject *); - static QDeclarativeAttachedPropertiesFunc attachedPropertiesFuncById(int); + static QQmlAttachedPropertiesFunc attachedPropertiesFuncById(int); enum TypeCategory { Unknown, Object, List }; static TypeCategory typeCategory(int); @@ -104,9 +104,9 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMetaType static bool isAnyModule(const QString &uri); static bool isModule(const QString &module, int versionMajor, int versionMinor); - static QDeclarativeTypeModule *typeModule(const QString &uri, int majorVersion); + static QQmlTypeModule *typeModule(const QString &uri, int majorVersion); - static QList parentFunctions(); + static QList parentFunctions(); static int QQuickAnchorLineMetaTypeId(); typedef bool (*CompareFunction)(const void *, const void *); @@ -117,8 +117,8 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMetaType ModuleApiInstance() : scriptCallback(0), qobjectCallback(0), qobjectApi(0) {} - QJSValue (*scriptCallback)(QDeclarativeEngine *, QJSEngine *); - QObject *(*qobjectCallback)(QDeclarativeEngine *, QJSEngine *); + QJSValue (*scriptCallback)(QQmlEngine *, QJSEngine *); + QObject *(*qobjectCallback)(QQmlEngine *, QJSEngine *); QJSValue scriptApi; QObject *qobjectApi; }; @@ -127,8 +127,8 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMetaType inline bool operator==(const ModuleApi &) const; int major; int minor; - QJSValue (*script)(QDeclarativeEngine *, QJSEngine *); - QObject *(*qobject)(QDeclarativeEngine *, QJSEngine *); + QJSValue (*script)(QQmlEngine *, QJSEngine *); + QObject *(*qobject)(QQmlEngine *, QJSEngine *); }; static ModuleApi moduleApi(const QString &, int, int); static QHash > moduleApis(); @@ -139,7 +139,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMetaType class QHashedStringRef; class QHashedV8String; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeType +class Q_QML_PRIVATE_EXPORT QQmlType { public: QByteArray typeName() const; @@ -160,7 +160,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeType CreateFunc createFunction() const; int createSize() const; - QDeclarativeCustomParser *customParser() const; + QQmlCustomParser *customParser() const; bool isCreatable() const; bool isExtendedType() const; @@ -175,7 +175,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeType int metaObjectRevision() const; bool containsRevisionedAttributes() const; - QDeclarativeAttachedPropertiesFunc attachedPropertiesFunction() const; + QQmlAttachedPropertiesFunc attachedPropertiesFunction() const; const QMetaObject *attachedPropertiesType() const; int attachedPropertiesId() const; @@ -190,20 +190,20 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeType int enumValue(const QHashedStringRef &) const; int enumValue(const QHashedV8String &) const; private: - QDeclarativeType *superType() const; - friend class QDeclarativeTypePrivate; - friend struct QDeclarativeMetaTypeData; - friend int registerType(const QDeclarativePrivate::RegisterType &); - friend int registerInterface(const QDeclarativePrivate::RegisterInterface &); - QDeclarativeType(int, const QDeclarativePrivate::RegisterInterface &); - QDeclarativeType(int, const QDeclarativePrivate::RegisterType &); - ~QDeclarativeType(); - - QDeclarativeTypePrivate *d; + QQmlType *superType() const; + friend class QQmlTypePrivate; + friend struct QQmlMetaTypeData; + friend int registerType(const QQmlPrivate::RegisterType &); + friend int registerInterface(const QQmlPrivate::RegisterInterface &); + QQmlType(int, const QQmlPrivate::RegisterInterface &); + QQmlType(int, const QQmlPrivate::RegisterType &); + ~QQmlType(); + + QQmlTypePrivate *d; }; -class QDeclarativeTypeModulePrivate; -class QDeclarativeTypeModule +class QQmlTypeModulePrivate; +class QQmlTypeModule { public: QString module() const; @@ -212,39 +212,39 @@ class QDeclarativeTypeModule int minimumMinorVersion() const; int maximumMinorVersion() const; - QList types(); - QList type(const QString &); + QList types(); + QList type(const QString &); - QDeclarativeType *type(const QHashedStringRef &, int); - QDeclarativeType *type(const QHashedV8String &, int); + QQmlType *type(const QHashedStringRef &, int); + QQmlType *type(const QHashedV8String &, int); private: - friend int registerType(const QDeclarativePrivate::RegisterType &); - QDeclarativeTypeModule(); - ~QDeclarativeTypeModule(); - QDeclarativeTypeModulePrivate *d; + friend int registerType(const QQmlPrivate::RegisterType &); + QQmlTypeModule(); + ~QQmlTypeModule(); + QQmlTypeModulePrivate *d; }; -class QDeclarativeTypeModuleVersion +class QQmlTypeModuleVersion { public: - QDeclarativeTypeModuleVersion(); - QDeclarativeTypeModuleVersion(QDeclarativeTypeModule *, int); - QDeclarativeTypeModuleVersion(const QDeclarativeTypeModuleVersion &); - QDeclarativeTypeModuleVersion &operator=(const QDeclarativeTypeModuleVersion &); + QQmlTypeModuleVersion(); + QQmlTypeModuleVersion(QQmlTypeModule *, int); + QQmlTypeModuleVersion(const QQmlTypeModuleVersion &); + QQmlTypeModuleVersion &operator=(const QQmlTypeModuleVersion &); - QDeclarativeTypeModule *module() const; + QQmlTypeModule *module() const; int minorVersion() const; - QDeclarativeType *type(const QHashedStringRef &) const; - QDeclarativeType *type(const QHashedV8String &) const; + QQmlType *type(const QHashedStringRef &) const; + QQmlType *type(const QHashedV8String &) const; private: - QDeclarativeTypeModule *m_module; + QQmlTypeModule *m_module; int m_minor; }; -QDeclarativeMetaType::ModuleApi::ModuleApi() +QQmlMetaType::ModuleApi::ModuleApi() { major = 0; minor = 0; @@ -252,17 +252,17 @@ QDeclarativeMetaType::ModuleApi::ModuleApi() qobject = 0; } -bool QDeclarativeMetaType::ModuleApi::operator==(const ModuleApi &other) const +bool QQmlMetaType::ModuleApi::operator==(const ModuleApi &other) const { return major == other.major && minor == other.minor && script == other.script && qobject == other.qobject; } -inline uint qHash(const QDeclarativeMetaType::ModuleApi &import) +inline uint qHash(const QQmlMetaType::ModuleApi &import) { return import.major ^ import.minor ^ quintptr(import.script) ^ quintptr(import.qobject); } QT_END_NAMESPACE -#endif // QDECLARATIVEMETATYPE_P_H +#endif // QQMLMETATYPE_P_H diff --git a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp b/src/qml/qml/qqmlnetworkaccessmanagerfactory.cpp similarity index 85% rename from src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp rename to src/qml/qml/qqmlnetworkaccessmanagerfactory.cpp index ee8c8c5f71..cc33f387d9 100644 --- a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp +++ b/src/qml/qml/qqmlnetworkaccessmanagerfactory.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,23 +39,23 @@ ** ****************************************************************************/ -#include "qdeclarativenetworkaccessmanagerfactory.h" +#include "qqmlnetworkaccessmanagerfactory.h" QT_BEGIN_NAMESPACE /*! - \class QDeclarativeNetworkAccessManagerFactory + \class QQmlNetworkAccessManagerFactory \since 4.7 - \brief The QDeclarativeNetworkAccessManagerFactory class creates QNetworkAccessManager instances for a QML engine. + \brief The QQmlNetworkAccessManagerFactory class creates QNetworkAccessManager instances for a QML engine. A QML engine uses QNetworkAccessManager for all network access. By implementing a factory, it is possible to provide the QML engine with custom QNetworkAccessManager instances with specialized caching, proxy and cookies support. - To implement a factory, subclass QDeclarativeNetworkAccessManagerFactory and + To implement a factory, subclass QQmlNetworkAccessManagerFactory and implement the virtual create() method, then assign it to the relevant QML - engine using QDeclarativeEngine::setNetworkAccessManagerFactory(). + engine using QQmlEngine::setNetworkAccessManagerFactory(). Note the QML engine may create QNetworkAccessManager instances from multiple threads. Because of this, the implementation of the create() @@ -85,12 +85,12 @@ QT_BEGIN_NAMESPACE /*! Destroys the factory. The default implementation does nothing. */ -QDeclarativeNetworkAccessManagerFactory::~QDeclarativeNetworkAccessManagerFactory() +QQmlNetworkAccessManagerFactory::~QQmlNetworkAccessManagerFactory() { } /*! - \fn QNetworkAccessManager *QDeclarativeNetworkAccessManagerFactory::create(QObject *parent) + \fn QNetworkAccessManager *QQmlNetworkAccessManagerFactory::create(QObject *parent) Creates and returns a network access manager with the specified \a parent. This method must return a new QNetworkAccessManager instance each time diff --git a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h b/src/qml/qml/qqmlnetworkaccessmanagerfactory.h similarity index 84% rename from src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h rename to src/qml/qml/qqmlnetworkaccessmanagerfactory.h index 34ffe3fb51..ac3583cf4c 100644 --- a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h +++ b/src/qml/qml/qqmlnetworkaccessmanagerfactory.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVENETWORKACCESSMANAGERFACTORY_H -#define QDECLARATIVENETWORKACCESSMANAGERFACTORY_H +#ifndef QQMLNETWORKACCESSMANAGERFACTORY_H +#define QQMLNETWORKACCESSMANAGERFACTORY_H +#include #include QT_BEGIN_HEADER @@ -50,10 +51,10 @@ QT_BEGIN_NAMESPACE class QNetworkAccessManager; -class Q_DECLARATIVE_EXPORT QDeclarativeNetworkAccessManagerFactory +class Q_QML_EXPORT QQmlNetworkAccessManagerFactory { public: - virtual ~QDeclarativeNetworkAccessManagerFactory(); + virtual ~QQmlNetworkAccessManagerFactory(); virtual QNetworkAccessManager *create(QObject *parent) = 0; }; @@ -62,4 +63,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVENETWORKACCESSMANAGERFACTORY_H +#endif // QQMLNETWORKACCESSMANAGERFACTORY_H diff --git a/src/declarative/qml/qdeclarativenotifier.cpp b/src/qml/qml/qqmlnotifier.cpp similarity index 82% rename from src/declarative/qml/qdeclarativenotifier.cpp rename to src/qml/qml/qqmlnotifier.cpp index 100a42d029..270eee52b4 100644 --- a/src/declarative/qml/qdeclarativenotifier.cpp +++ b/src/qml/qml/qqmlnotifier.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,14 +39,14 @@ ** ****************************************************************************/ -#include "qdeclarativenotifier_p.h" -#include "qdeclarativeproperty_p.h" +#include "qqmlnotifier_p.h" +#include "qqmlproperty_p.h" QT_BEGIN_NAMESPACE -void QDeclarativeNotifier::emitNotify(QDeclarativeNotifierEndpoint *endpoint) +void QQmlNotifier::emitNotify(QQmlNotifierEndpoint *endpoint) { - QDeclarativeNotifierEndpoint **oldDisconnected = endpoint->disconnected; + QQmlNotifierEndpoint **oldDisconnected = endpoint->disconnected; endpoint->disconnected = &endpoint; endpoint->notifying = 1; @@ -67,18 +67,18 @@ void QDeclarativeNotifier::emitNotify(QDeclarativeNotifierEndpoint *endpoint) else if (endpoint) endpoint->notifying = 0; } -void QDeclarativeNotifierEndpoint::connect(QObject *source, int sourceSignal) +void QQmlNotifierEndpoint::connect(QObject *source, int sourceSignal) { disconnect(); this->source = source; this->sourceSignal = sourceSignal; - QDeclarativePropertyPrivate::flushSignal(source, sourceSignal); - QDeclarativeData *ddata = QDeclarativeData::get(source, true); + QQmlPropertyPrivate::flushSignal(source, sourceSignal); + QQmlData *ddata = QQmlData::get(source, true); ddata->addNotify(sourceSignal, this); } -void QDeclarativeNotifierEndpoint::copyAndClear(QDeclarativeNotifierEndpoint &other) +void QQmlNotifierEndpoint::copyAndClear(QQmlNotifierEndpoint &other) { if (&other == this) return; diff --git a/src/declarative/qml/qdeclarativenotifier_p.h b/src/qml/qml/qqmlnotifier_p.h similarity index 64% rename from src/declarative/qml/qdeclarativenotifier_p.h rename to src/qml/qml/qqmlnotifier_p.h index 1e37de8bb6..ab0711341d 100644 --- a/src/declarative/qml/qdeclarativenotifier_p.h +++ b/src/qml/qml/qqmlnotifier_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,77 +39,77 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVENOTIFIER_P_H -#define QDECLARATIVENOTIFIER_P_H +#ifndef QQMLNOTIFIER_P_H +#define QQMLNOTIFIER_P_H -#include "qdeclarativedata_p.h" -#include "qdeclarativeguard_p.h" +#include "qqmldata_p.h" +#include "qqmlguard_p.h" QT_BEGIN_NAMESPACE -class QDeclarativeNotifierEndpoint; -class Q_DECLARATIVE_EXPORT QDeclarativeNotifier +class QQmlNotifierEndpoint; +class Q_QML_EXPORT QQmlNotifier { public: - inline QDeclarativeNotifier(); - inline ~QDeclarativeNotifier(); + inline QQmlNotifier(); + inline ~QQmlNotifier(); inline void notify(); private: - friend class QDeclarativeData; - friend class QDeclarativeNotifierEndpoint; + friend class QQmlData; + friend class QQmlNotifierEndpoint; - static void emitNotify(QDeclarativeNotifierEndpoint *); - QDeclarativeNotifierEndpoint *endpoints; + static void emitNotify(QQmlNotifierEndpoint *); + QQmlNotifierEndpoint *endpoints; }; -class QDeclarativeNotifierEndpoint +class QQmlNotifierEndpoint { public: - inline QDeclarativeNotifierEndpoint(); - inline ~QDeclarativeNotifierEndpoint(); + inline QQmlNotifierEndpoint(); + inline ~QQmlNotifierEndpoint(); - typedef void (*Callback)(QDeclarativeNotifierEndpoint *); + typedef void (*Callback)(QQmlNotifierEndpoint *); Callback callback; inline bool isConnected(); inline bool isConnected(QObject *source, int sourceSignal); - inline bool isConnected(QDeclarativeNotifier *); + inline bool isConnected(QQmlNotifier *); void connect(QObject *source, int sourceSignal); - inline void connect(QDeclarativeNotifier *); + inline void connect(QQmlNotifier *); inline void disconnect(); inline bool isNotifying() const; inline void cancelNotify(); - void copyAndClear(QDeclarativeNotifierEndpoint &other); + void copyAndClear(QQmlNotifierEndpoint &other); private: - friend class QDeclarativeData; - friend class QDeclarativeNotifier; + friend class QQmlData; + friend class QQmlNotifier; union { - QDeclarativeNotifier *notifier; + QQmlNotifier *notifier; QObject *source; }; unsigned int notifying : 1; signed int sourceSignal : 31; - QDeclarativeNotifierEndpoint **disconnected; - QDeclarativeNotifierEndpoint *next; - QDeclarativeNotifierEndpoint **prev; + QQmlNotifierEndpoint **disconnected; + QQmlNotifierEndpoint *next; + QQmlNotifierEndpoint **prev; }; -QDeclarativeNotifier::QDeclarativeNotifier() +QQmlNotifier::QQmlNotifier() : endpoints(0) { } -QDeclarativeNotifier::~QDeclarativeNotifier() +QQmlNotifier::~QQmlNotifier() { - QDeclarativeNotifierEndpoint *endpoint = endpoints; + QQmlNotifierEndpoint *endpoint = endpoints; while (endpoint) { - QDeclarativeNotifierEndpoint *n = endpoint; + QQmlNotifierEndpoint *n = endpoint; endpoint = n->next; n->next = 0; @@ -122,37 +122,37 @@ QDeclarativeNotifier::~QDeclarativeNotifier() endpoints = 0; } -void QDeclarativeNotifier::notify() +void QQmlNotifier::notify() { if (endpoints) emitNotify(endpoints); } -QDeclarativeNotifierEndpoint::QDeclarativeNotifierEndpoint() +QQmlNotifierEndpoint::QQmlNotifierEndpoint() : callback(0), notifier(0), notifying(0), sourceSignal(-1), disconnected(0), next(0), prev(0) { } -QDeclarativeNotifierEndpoint::~QDeclarativeNotifierEndpoint() +QQmlNotifierEndpoint::~QQmlNotifierEndpoint() { disconnect(); } -bool QDeclarativeNotifierEndpoint::isConnected() +bool QQmlNotifierEndpoint::isConnected() { return prev != 0; } -bool QDeclarativeNotifierEndpoint::isConnected(QObject *source, int sourceSignal) +bool QQmlNotifierEndpoint::isConnected(QObject *source, int sourceSignal) { return this->sourceSignal != -1 && this->source == source && this->sourceSignal == sourceSignal; } -bool QDeclarativeNotifierEndpoint::isConnected(QDeclarativeNotifier *notifier) +bool QQmlNotifierEndpoint::isConnected(QQmlNotifier *notifier) { return sourceSignal == -1 && this->notifier == notifier; } -void QDeclarativeNotifierEndpoint::connect(QDeclarativeNotifier *notifier) +void QQmlNotifierEndpoint::connect(QQmlNotifier *notifier) { disconnect(); @@ -163,7 +163,7 @@ void QDeclarativeNotifierEndpoint::connect(QDeclarativeNotifier *notifier) this->notifier = notifier; } -void QDeclarativeNotifierEndpoint::disconnect() +void QQmlNotifierEndpoint::disconnect() { if (next) next->prev = prev; if (prev) *prev = next; @@ -177,13 +177,13 @@ void QDeclarativeNotifierEndpoint::disconnect() } /*! -Returns true if a notify is in progress. This means that the signal or QDeclarativeNotifier +Returns true if a notify is in progress. This means that the signal or QQmlNotifier that this endpoing is connected to has been triggered, but this endpoint's callback has not yet been called. An in progress notify can be cancelled by calling cancelNotify. */ -bool QDeclarativeNotifierEndpoint::isNotifying() const +bool QQmlNotifierEndpoint::isNotifying() const { return notifying == 1; } @@ -191,7 +191,7 @@ bool QDeclarativeNotifierEndpoint::isNotifying() const /*! Cancel any notifies that are in progress. */ -void QDeclarativeNotifierEndpoint::cancelNotify() +void QQmlNotifierEndpoint::cancelNotify() { notifying = 0; if (disconnected) { @@ -202,5 +202,5 @@ void QDeclarativeNotifierEndpoint::cancelNotify() QT_END_NAMESPACE -#endif // QDECLARATIVENOTIFIER_P_H +#endif // QQMLNOTIFIER_P_H diff --git a/src/declarative/qml/qdeclarativenullablevalue_p_p.h b/src/qml/qml/qqmlnullablevalue_p_p.h similarity index 82% rename from src/declarative/qml/qdeclarativenullablevalue_p_p.h rename to src/qml/qml/qqmlnullablevalue_p_p.h index 9c5aa368a1..b19e2722cf 100644 --- a/src/declarative/qml/qdeclarativenullablevalue_p_p.h +++ b/src/qml/qml/qqmlnullablevalue_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVENULLABLEVALUE_P_H -#define QDECLARATIVENULLABLEVALUE_P_H +#ifndef QQMLNULLABLEVALUE_P_H +#define QQMLNULLABLEVALUE_P_H // // W A R N I N G @@ -56,17 +56,17 @@ QT_BEGIN_NAMESPACE template -struct QDeclarativeNullableValue +struct QQmlNullableValue { - QDeclarativeNullableValue() + QQmlNullableValue() : isNull(true), value(T()) {} - QDeclarativeNullableValue(const QDeclarativeNullableValue &o) + QQmlNullableValue(const QQmlNullableValue &o) : isNull(o.isNull), value(o.value) {} - QDeclarativeNullableValue(const T &t) + QQmlNullableValue(const T &t) : isNull(false), value(t) {} - QDeclarativeNullableValue &operator=(const T &t) + QQmlNullableValue &operator=(const T &t) { isNull = false; value = t; return *this; } - QDeclarativeNullableValue &operator=(const QDeclarativeNullableValue &o) + QQmlNullableValue &operator=(const QQmlNullableValue &o) { isNull = o.isNull; value = o.value; return *this; } operator T() const { return value; } @@ -78,4 +78,4 @@ struct QDeclarativeNullableValue QT_END_NAMESPACE -#endif // QDECLARATIVENULLABLEVALUE_P_H +#endif // QQMLNULLABLEVALUE_P_H diff --git a/src/declarative/qml/qdeclarativeopenmetaobject.cpp b/src/qml/qml/qqmlopenmetaobject.cpp similarity index 70% rename from src/declarative/qml/qdeclarativeopenmetaobject.cpp rename to src/qml/qml/qqmlopenmetaobject.cpp index ca11d03135..221cb3a314 100644 --- a/src/declarative/qml/qdeclarativeopenmetaobject.cpp +++ b/src/qml/qml/qqmlopenmetaobject.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,19 +39,19 @@ ** ****************************************************************************/ -#include "qdeclarativeopenmetaobject_p.h" -#include -#include +#include "qqmlopenmetaobject_p.h" +#include +#include #include #include QT_BEGIN_NAMESPACE -class QDeclarativeOpenMetaObjectTypePrivate +class QQmlOpenMetaObjectTypePrivate { public: - QDeclarativeOpenMetaObjectTypePrivate() : mem(0), cache(0), engine(0) {} + QQmlOpenMetaObjectTypePrivate() : mem(0), cache(0), engine(0) {} void init(const QMetaObject *metaObj); @@ -60,19 +60,19 @@ class QDeclarativeOpenMetaObjectTypePrivate QHash names; QMetaObjectBuilder mob; QMetaObject *mem; - QDeclarativePropertyCache *cache; - QDeclarativeEngine *engine; - QSet referers; + QQmlPropertyCache *cache; + QQmlEngine *engine; + QSet referers; }; -QDeclarativeOpenMetaObjectType::QDeclarativeOpenMetaObjectType(const QMetaObject *base, QDeclarativeEngine *engine) - : QDeclarativeCleanup(engine), d(new QDeclarativeOpenMetaObjectTypePrivate) +QQmlOpenMetaObjectType::QQmlOpenMetaObjectType(const QMetaObject *base, QQmlEngine *engine) + : QQmlCleanup(engine), d(new QQmlOpenMetaObjectTypePrivate) { d->engine = engine; d->init(base); } -QDeclarativeOpenMetaObjectType::~QDeclarativeOpenMetaObjectType() +QQmlOpenMetaObjectType::~QQmlOpenMetaObjectType() { if (d->mem) free(d->mem); @@ -81,22 +81,22 @@ QDeclarativeOpenMetaObjectType::~QDeclarativeOpenMetaObjectType() delete d; } -void QDeclarativeOpenMetaObjectType::clear() +void QQmlOpenMetaObjectType::clear() { d->engine = 0; } -int QDeclarativeOpenMetaObjectType::propertyOffset() const +int QQmlOpenMetaObjectType::propertyOffset() const { return d->propertyOffset; } -int QDeclarativeOpenMetaObjectType::signalOffset() const +int QQmlOpenMetaObjectType::signalOffset() const { return d->signalOffset; } -int QDeclarativeOpenMetaObjectType::createProperty(const QByteArray &name) +int QQmlOpenMetaObjectType::createProperty(const QByteArray &name) { int id = d->mob.propertyCount(); d->mob.addSignal("__" + QByteArray::number(id) + "()"); @@ -105,9 +105,9 @@ int QDeclarativeOpenMetaObjectType::createProperty(const QByteArray &name) free(d->mem); d->mem = d->mob.toMetaObject(); d->names.insert(name, id); - QSet::iterator it = d->referers.begin(); + QSet::iterator it = d->referers.begin(); while (it != d->referers.end()) { - QDeclarativeOpenMetaObject *omo = *it; + QQmlOpenMetaObject *omo = *it; *static_cast(omo) = *d->mem; if (d->cache) d->cache->update(d->engine, omo); @@ -117,13 +117,13 @@ int QDeclarativeOpenMetaObjectType::createProperty(const QByteArray &name) return d->propertyOffset + id; } -void QDeclarativeOpenMetaObjectType::propertyCreated(int id, QMetaPropertyBuilder &builder) +void QQmlOpenMetaObjectType::propertyCreated(int id, QMetaPropertyBuilder &builder) { if (d->referers.count()) (*d->referers.begin())->propertyCreated(id, builder); } -void QDeclarativeOpenMetaObjectTypePrivate::init(const QMetaObject *metaObj) +void QQmlOpenMetaObjectTypePrivate::init(const QMetaObject *metaObj) { if (!mem) { mob.setSuperClass(metaObj); @@ -139,10 +139,10 @@ void QDeclarativeOpenMetaObjectTypePrivate::init(const QMetaObject *metaObj) //---------------------------------------------------------------------------- -class QDeclarativeOpenMetaObjectPrivate +class QQmlOpenMetaObjectPrivate { public: - QDeclarativeOpenMetaObjectPrivate(QDeclarativeOpenMetaObject *_q) + QQmlOpenMetaObjectPrivate(QQmlOpenMetaObject *_q) : q(_q), parent(0), type(0), cacheProperties(false) {} inline QVariant &getData(int idx) { @@ -171,21 +171,21 @@ class QDeclarativeOpenMetaObjectPrivate } bool autoCreate; - QDeclarativeOpenMetaObject *q; + QQmlOpenMetaObject *q; QAbstractDynamicMetaObject *parent; QList > data; QObject *object; - QDeclarativeOpenMetaObjectType *type; + QQmlOpenMetaObjectType *type; bool cacheProperties; }; -QDeclarativeOpenMetaObject::QDeclarativeOpenMetaObject(QObject *obj, bool automatic) -: d(new QDeclarativeOpenMetaObjectPrivate(this)) +QQmlOpenMetaObject::QQmlOpenMetaObject(QObject *obj, bool automatic) +: d(new QQmlOpenMetaObjectPrivate(this)) { d->autoCreate = automatic; d->object = obj; - d->type = new QDeclarativeOpenMetaObjectType(obj->metaObject(), 0); + d->type = new QQmlOpenMetaObjectType(obj->metaObject(), 0); d->type->d->referers.insert(this); QObjectPrivate *op = QObjectPrivate::get(obj); @@ -194,8 +194,8 @@ QDeclarativeOpenMetaObject::QDeclarativeOpenMetaObject(QObject *obj, bool automa op->metaObject = this; } -QDeclarativeOpenMetaObject::QDeclarativeOpenMetaObject(QObject *obj, QDeclarativeOpenMetaObjectType *type, bool automatic) -: d(new QDeclarativeOpenMetaObjectPrivate(this)) +QQmlOpenMetaObject::QQmlOpenMetaObject(QObject *obj, QQmlOpenMetaObjectType *type, bool automatic) +: d(new QQmlOpenMetaObjectPrivate(this)) { d->autoCreate = automatic; d->object = obj; @@ -210,7 +210,7 @@ QDeclarativeOpenMetaObject::QDeclarativeOpenMetaObject(QObject *obj, QDeclarativ op->metaObject = this; } -QDeclarativeOpenMetaObject::~QDeclarativeOpenMetaObject() +QQmlOpenMetaObject::~QQmlOpenMetaObject() { if (d->parent) delete d->parent; @@ -219,12 +219,12 @@ QDeclarativeOpenMetaObject::~QDeclarativeOpenMetaObject() delete d; } -QDeclarativeOpenMetaObjectType *QDeclarativeOpenMetaObject::type() const +QQmlOpenMetaObjectType *QQmlOpenMetaObject::type() const { return d->type; } -int QDeclarativeOpenMetaObject::metaCall(QMetaObject::Call c, int id, void **a) +int QQmlOpenMetaObject::metaCall(QMetaObject::Call c, int id, void **a) { if (( c == QMetaObject::ReadProperty || c == QMetaObject::WriteProperty) && id >= d->type->d->propertyOffset) { @@ -249,23 +249,23 @@ int QDeclarativeOpenMetaObject::metaCall(QMetaObject::Call c, int id, void **a) } } -QAbstractDynamicMetaObject *QDeclarativeOpenMetaObject::parent() const +QAbstractDynamicMetaObject *QQmlOpenMetaObject::parent() const { return d->parent; } -QVariant QDeclarativeOpenMetaObject::value(int id) const +QVariant QQmlOpenMetaObject::value(int id) const { return d->getData(id); } -void QDeclarativeOpenMetaObject::setValue(int id, const QVariant &value) +void QQmlOpenMetaObject::setValue(int id, const QVariant &value) { d->writeData(id, value); activate(d->object, id + d->type->d->signalOffset, 0); } -QVariant QDeclarativeOpenMetaObject::value(const QByteArray &name) const +QVariant QQmlOpenMetaObject::value(const QByteArray &name) const { QHash::ConstIterator iter = d->type->d->names.find(name); if (iter == d->type->d->names.end()) @@ -274,7 +274,7 @@ QVariant QDeclarativeOpenMetaObject::value(const QByteArray &name) const return d->getData(*iter); } -QVariant &QDeclarativeOpenMetaObject::operator[](const QByteArray &name) +QVariant &QQmlOpenMetaObject::operator[](const QByteArray &name) { QHash::ConstIterator iter = d->type->d->names.find(name); Q_ASSERT(iter != d->type->d->names.end()); @@ -282,12 +282,12 @@ QVariant &QDeclarativeOpenMetaObject::operator[](const QByteArray &name) return d->getData(*iter); } -QVariant &QDeclarativeOpenMetaObject::operator[](int id) +QVariant &QQmlOpenMetaObject::operator[](int id) { return d->getData(id); } -bool QDeclarativeOpenMetaObject::setValue(const QByteArray &name, const QVariant &val) +bool QQmlOpenMetaObject::setValue(const QByteArray &name, const QVariant &val) { QHash::ConstIterator iter = d->type->d->names.find(name); @@ -312,22 +312,22 @@ bool QDeclarativeOpenMetaObject::setValue(const QByteArray &name, const QVariant } // returns true if this value has been initialized by a call to either value() or setValue() -bool QDeclarativeOpenMetaObject::hasValue(int id) const +bool QQmlOpenMetaObject::hasValue(int id) const { return d->hasData(id); } -void QDeclarativeOpenMetaObject::setCached(bool c) +void QQmlOpenMetaObject::setCached(bool c) { if (c == d->cacheProperties || !d->type->d->engine) return; d->cacheProperties = c; - QDeclarativeData *qmldata = QDeclarativeData::get(d->object, true); + QQmlData *qmldata = QQmlData::get(d->object, true); if (d->cacheProperties) { if (!d->type->d->cache) - d->type->d->cache = new QDeclarativePropertyCache(d->type->d->engine, this); + d->type->d->cache = new QQmlPropertyCache(d->type->d->engine, this); qmldata->propertyCache = d->type->d->cache; d->type->d->cache->addref(); } else { @@ -338,7 +338,7 @@ void QDeclarativeOpenMetaObject::setCached(bool c) } -int QDeclarativeOpenMetaObject::createProperty(const char *name, const char *) +int QQmlOpenMetaObject::createProperty(const char *name, const char *) { if (d->autoCreate) return d->type->createProperty(name); @@ -346,40 +346,40 @@ int QDeclarativeOpenMetaObject::createProperty(const char *name, const char *) return -1; } -void QDeclarativeOpenMetaObject::propertyRead(int) +void QQmlOpenMetaObject::propertyRead(int) { } -void QDeclarativeOpenMetaObject::propertyWrite(int) +void QQmlOpenMetaObject::propertyWrite(int) { } -void QDeclarativeOpenMetaObject::propertyWritten(int) +void QQmlOpenMetaObject::propertyWritten(int) { } -void QDeclarativeOpenMetaObject::propertyCreated(int, QMetaPropertyBuilder &) +void QQmlOpenMetaObject::propertyCreated(int, QMetaPropertyBuilder &) { } -QVariant QDeclarativeOpenMetaObject::initialValue(int) +QVariant QQmlOpenMetaObject::initialValue(int) { return QVariant(); } -int QDeclarativeOpenMetaObject::count() const +int QQmlOpenMetaObject::count() const { return d->type->d->names.count(); } -QByteArray QDeclarativeOpenMetaObject::name(int idx) const +QByteArray QQmlOpenMetaObject::name(int idx) const { Q_ASSERT(idx >= 0 && idx < d->type->d->names.count()); return d->type->d->mob.property(idx).name(); } -QObject *QDeclarativeOpenMetaObject::object() const +QObject *QQmlOpenMetaObject::object() const { return d->object; } diff --git a/src/declarative/qml/qdeclarativeopenmetaobject_p.h b/src/qml/qml/qqmlopenmetaobject_p.h similarity index 70% rename from src/declarative/qml/qdeclarativeopenmetaobject_p.h rename to src/qml/qml/qqmlopenmetaobject_p.h index b6b17c0984..188192edc1 100644 --- a/src/declarative/qml/qdeclarativeopenmetaobject_p.h +++ b/src/qml/qml/qqmlopenmetaobject_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEOPENMETAOBJECT_H -#define QDECLARATIVEOPENMETAOBJECT_H +#ifndef QQMLOPENMETAOBJECT_H +#define QQMLOPENMETAOBJECT_H #include #include -#include -#include -#include +#include +#include +#include #include QT_BEGIN_HEADER @@ -55,14 +55,14 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeEngine; +class QQmlEngine; class QMetaPropertyBuilder; -class QDeclarativeOpenMetaObjectTypePrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeOpenMetaObjectType : public QDeclarativeRefCount, public QDeclarativeCleanup +class QQmlOpenMetaObjectTypePrivate; +class Q_QML_PRIVATE_EXPORT QQmlOpenMetaObjectType : public QQmlRefCount, public QQmlCleanup { public: - QDeclarativeOpenMetaObjectType(const QMetaObject *base, QDeclarativeEngine *engine); - ~QDeclarativeOpenMetaObjectType(); + QQmlOpenMetaObjectType(const QMetaObject *base, QQmlEngine *engine); + ~QQmlOpenMetaObjectType(); int createProperty(const QByteArray &name); @@ -74,18 +74,18 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeOpenMetaObjectType : public QDecl virtual void clear(); private: - QDeclarativeOpenMetaObjectTypePrivate *d; - friend class QDeclarativeOpenMetaObject; - friend class QDeclarativeOpenMetaObjectPrivate; + QQmlOpenMetaObjectTypePrivate *d; + friend class QQmlOpenMetaObject; + friend class QQmlOpenMetaObjectPrivate; }; -class QDeclarativeOpenMetaObjectPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeOpenMetaObject : public QAbstractDynamicMetaObject +class QQmlOpenMetaObjectPrivate; +class Q_QML_PRIVATE_EXPORT QQmlOpenMetaObject : public QAbstractDynamicMetaObject { public: - QDeclarativeOpenMetaObject(QObject *, bool = true); - QDeclarativeOpenMetaObject(QObject *, QDeclarativeOpenMetaObjectType *, bool = true); - ~QDeclarativeOpenMetaObject(); + QQmlOpenMetaObject(QObject *, bool = true); + QQmlOpenMetaObject(QObject *, QQmlOpenMetaObjectType *, bool = true); + ~QQmlOpenMetaObject(); QVariant value(const QByteArray &) const; bool setValue(const QByteArray &, const QVariant &); @@ -105,7 +105,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeOpenMetaObject : public QAbstract // longer automatically called for new properties. void setCached(bool); - QDeclarativeOpenMetaObjectType *type() const; + QQmlOpenMetaObjectType *type() const; protected: virtual int metaCall(QMetaObject::Call _c, int _id, void **_a); @@ -119,12 +119,12 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeOpenMetaObject : public QAbstract QAbstractDynamicMetaObject *parent() const; private: - QDeclarativeOpenMetaObjectPrivate *d; - friend class QDeclarativeOpenMetaObjectType; + QQmlOpenMetaObjectPrivate *d; + friend class QQmlOpenMetaObjectType; }; QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEOPENMETAOBJECT_H +#endif // QQMLOPENMETAOBJECT_H diff --git a/src/declarative/qml/qdeclarativeparserstatus.cpp b/src/qml/qml/qqmlparserstatus.cpp similarity index 75% rename from src/declarative/qml/qdeclarativeparserstatus.cpp rename to src/qml/qml/qqmlparserstatus.cpp index 39538b51dd..d4e415a069 100644 --- a/src/declarative/qml/qdeclarativeparserstatus.cpp +++ b/src/qml/qml/qqmlparserstatus.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,17 +39,17 @@ ** ****************************************************************************/ -#include "qdeclarativeparserstatus.h" +#include "qqmlparserstatus.h" QT_BEGIN_NAMESPACE /*! - \class QDeclarativeParserStatus + \class QQmlParserStatus \since 4.7 - \brief The QDeclarativeParserStatus class provides updates on the QML parser state. + \brief The QQmlParserStatus 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. + QQmlParserStatus provides a mechanism for classes instantiated by + a QQmlEngine 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 @@ -59,14 +59,14 @@ QT_BEGIN_NAMESPACE 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. + To use QQmlParserStatus, you must inherit both a QObject-derived class + and QQmlParserStatus, and use the Q_INTERFACES() macro. \code - class MyObject : public QObject, public QDeclarativeParserStatus + class MyObject : public QObject, public QQmlParserStatus { Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) public: MyObject(QObject *parent = 0); @@ -78,26 +78,26 @@ QT_BEGIN_NAMESPACE */ /*! \internal */ -QDeclarativeParserStatus::QDeclarativeParserStatus() +QQmlParserStatus::QQmlParserStatus() : d(0) { } /*! \internal */ -QDeclarativeParserStatus::~QDeclarativeParserStatus() +QQmlParserStatus::~QQmlParserStatus() { if(d) (*d) = 0; } /*! - \fn void QDeclarativeParserStatus::classBegin() + \fn void QQmlParserStatus::classBegin() Invoked after class creation, but before any properties have been set. */ /*! - \fn void QDeclarativeParserStatus::componentComplete() + \fn void QQmlParserStatus::componentComplete() Invoked after the root component that caused this instantiation has completed construction. At this point all static values and binding values diff --git a/src/declarative/qml/qdeclarativeparserstatus.h b/src/qml/qml/qqmlparserstatus.h similarity index 75% rename from src/declarative/qml/qdeclarativeparserstatus.h rename to src/qml/qml/qqmlparserstatus.h index d8544310bd..9f06f45b06 100644 --- a/src/declarative/qml/qdeclarativeparserstatus.h +++ b/src/qml/qml/qqmlparserstatus.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPARSERSTATUS_H -#define QDECLARATIVEPARSERSTATUS_H +#ifndef QQMLPARSERSTATUS_H +#define QQMLPARSERSTATUS_H +#include #include QT_BEGIN_HEADER @@ -49,26 +50,26 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class Q_DECLARATIVE_EXPORT QDeclarativeParserStatus +class Q_QML_EXPORT QQmlParserStatus { public: - QDeclarativeParserStatus(); - virtual ~QDeclarativeParserStatus(); + QQmlParserStatus(); + virtual ~QQmlParserStatus(); virtual void classBegin()=0; virtual void componentComplete()=0; private: - friend class QDeclarativeVME; - friend class QDeclarativeComponent; - friend class QDeclarativeComponentPrivate; - friend class QDeclarativeEnginePrivate; - QDeclarativeParserStatus **d; + friend class QQmlVME; + friend class QQmlComponent; + friend class QQmlComponentPrivate; + friend class QQmlEnginePrivate; + QQmlParserStatus **d; }; -Q_DECLARE_INTERFACE(QDeclarativeParserStatus, "com.trolltech.qml.QDeclarativeParserStatus") +Q_DECLARE_INTERFACE(QQmlParserStatus, "com.trolltech.qml.QQmlParserStatus") QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEPARSERSTATUS_H +#endif // QQMLPARSERSTATUS_H diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/qml/qml/qqmlprivate.h similarity index 83% rename from src/declarative/qml/qdeclarativeprivate.h rename to src/qml/qml/qqmlprivate.h index 3477d469af..b4c6fc3a12 100644 --- a/src/declarative/qml/qdeclarativeprivate.h +++ b/src/qml/qml/qqmlprivate.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPRIVATE_H -#define QDECLARATIVEPRIVATE_H +#ifndef QQMLPRIVATE_H +#define QQMLPRIVATE_H // // W A R N I N G @@ -53,6 +53,8 @@ // We mean it. // +#include + #include #include @@ -61,10 +63,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -typedef QObject *(*QDeclarativeAttachedPropertiesFunc)(QObject *); +typedef QObject *(*QQmlAttachedPropertiesFunc)(QObject *); template -class QDeclarativeTypeInfo +class QQmlTypeInfo { public: enum { @@ -75,22 +77,22 @@ class QDeclarativeTypeInfo class QJSValue; class QJSEngine; -class QDeclarativeEngine; -class QDeclarativeCustomParser; -namespace QDeclarativePrivate +class QQmlEngine; +class QQmlCustomParser; +namespace QQmlPrivate { - void Q_DECLARATIVE_EXPORT qdeclarativeelement_destructor(QObject *); + void Q_QML_EXPORT qdeclarativeelement_destructor(QObject *); template - class QDeclarativeElement : public T + class QQmlElement : public T { public: - virtual ~QDeclarativeElement() { - QDeclarativePrivate::qdeclarativeelement_destructor(this); + virtual ~QQmlElement() { + QQmlPrivate::qdeclarativeelement_destructor(this); } }; template - void createInto(void *memory) { new (memory) QDeclarativeElement; } + void createInto(void *memory) { new (memory) QQmlElement; } template QObject *createParent(QObject *p) { return new T(p); } @@ -125,7 +127,7 @@ namespace QDeclarativePrivate template struct has_attachedPropertiesMember { - static bool const value = QDeclarativeTypeInfo::hasAttachedProperties; + static bool const value = QQmlTypeInfo::hasAttachedProperties; }; template @@ -153,7 +155,7 @@ namespace QDeclarativePrivate class AttachedPropertySelector { public: - static inline QDeclarativeAttachedPropertiesFunc func() { return 0; } + static inline QQmlAttachedPropertiesFunc func() { return 0; } static inline const QMetaObject *metaObject() { return 0; } }; template @@ -167,7 +169,7 @@ namespace QDeclarativePrivate return &ReturnType::staticMetaObject; } public: - static inline QDeclarativeAttachedPropertiesFunc func() { + static inline QQmlAttachedPropertiesFunc func() { return &attachedProperties; } static inline const QMetaObject *metaObject() { @@ -176,7 +178,7 @@ namespace QDeclarativePrivate }; template - inline QDeclarativeAttachedPropertiesFunc attachedPropertiesFunc() + inline QQmlAttachedPropertiesFunc attachedPropertiesFunc() { return AttachedPropertySelector::value>::value>::func(); } @@ -205,7 +207,7 @@ namespace QDeclarativePrivate const char *elementName; const QMetaObject *metaObject; - QDeclarativeAttachedPropertiesFunc attachedPropertiesFunction; + QQmlAttachedPropertiesFunc attachedPropertiesFunction; const QMetaObject *attachedPropertiesMetaObject; int parserStatusCast; @@ -215,7 +217,7 @@ namespace QDeclarativePrivate QObject *(*extensionObjectCreate)(QObject *); const QMetaObject *extensionMetaObject; - QDeclarativeCustomParser *customParser; + QQmlCustomParser *customParser; int revision; // If this is extended ensure "version" is bumped!!! }; @@ -242,8 +244,8 @@ namespace QDeclarativePrivate int versionMajor; int versionMinor; - QJSValue (*scriptApi)(QDeclarativeEngine *, QJSEngine *); - QObject *(*qobjectApi)(QDeclarativeEngine *, QJSEngine *); + QJSValue (*scriptApi)(QQmlEngine *, QJSEngine *); + QObject *(*qobjectApi)(QQmlEngine *, QJSEngine *); }; enum RegistrationType { @@ -253,11 +255,11 @@ namespace QDeclarativePrivate ModuleApiRegistration = 3 }; - int Q_DECLARATIVE_EXPORT qmlregister(RegistrationType, void *); + int Q_QML_EXPORT qmlregister(RegistrationType, void *); } QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEPRIVATE_H +#endif // QQMLPRIVATE_H diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/qml/qml/qqmlproperty.cpp similarity index 72% rename from src/declarative/qml/qdeclarativeproperty.cpp rename to src/qml/qml/qqmlproperty.cpp index 7ba801d72f..6321592e9a 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,22 +39,22 @@ ** ****************************************************************************/ -#include "qdeclarativeproperty.h" -#include "qdeclarativeproperty_p.h" - -#include "qdeclarative.h" -#include "qdeclarativebinding_p.h" -#include "qdeclarativecontext.h" -#include "qdeclarativecontext_p.h" -#include "qdeclarativeboundsignal_p.h" -#include "qdeclarativeengine.h" -#include "qdeclarativeengine_p.h" -#include "qdeclarativedata_p.h" -#include "qdeclarativestringconverters_p.h" -#include "qdeclarativelist_p.h" -#include "qdeclarativecompiler_p.h" -#include "qdeclarativevmemetaobject_p.h" -#include "qdeclarativeexpression_p.h" +#include "qqmlproperty.h" +#include "qqmlproperty_p.h" + +#include "qqml.h" +#include "qqmlbinding_p.h" +#include "qqmlcontext.h" +#include "qqmlcontext_p.h" +#include "qqmlboundsignal_p.h" +#include "qqmlengine.h" +#include "qqmlengine_p.h" +#include "qqmldata_p.h" +#include "qqmlstringconverters_p.h" +#include "qqmllist_p.h" +#include "qqmlcompiler_p.h" +#include "qqmlvmemetaobject_p.h" +#include "qqmlexpression_p.h" #include #include @@ -70,18 +70,18 @@ Q_DECLARE_METATYPE(QList) QT_BEGIN_NAMESPACE /*! -\class QDeclarativeProperty +\class QQmlProperty \since 4.7 -\brief The QDeclarativeProperty class abstracts accessing properties on objects created from QML. +\brief The QQmlProperty 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 and interact with objects created by QML. However, some of the new features provided by QML - such -as type safety and attached properties - are most easily used through the QDeclarativeProperty class +as type safety and attached properties - are most easily used through the QQmlProperty class that simplifies some of their natural complexity. -Unlike QMetaProperty which represents a property on a class type, QDeclarativeProperty encapsulates +Unlike QMetaProperty which represents a property on a class type, QQmlProperty encapsulates a property on a specific object instance. To read a property's value, programmers create a -QDeclarativeProperty instance and call the read() method. Likewise to write a property value the +QQmlProperty instance and call the read() method. Likewise to write a property value the write() method is used. For example, for the following QML code: @@ -93,16 +93,16 @@ import QtQuick 2.0 Text { text: "A bit of text" } \endqml -The \l Text object's properties could be accessed using QDeclarativeProperty, like this: +The \l Text object's properties could be accessed using QQmlProperty, like this: \code -#include +#include #include ... -QDeclarativeView view(QUrl::fromLocalFile("MyItem.qml")); -QDeclarativeProperty property(view.rootObject(), "font.pixelSize"); +QQuickView view(QUrl::fromLocalFile("MyItem.qml")); +QQmlProperty property(view.rootObject(), "font.pixelSize"); qWarning() << "Current pixel size:" << property.read().toInt(); property.write(24); qWarning() << "Pixel size should now be 24:" << property.read().toInt(); @@ -110,15 +110,15 @@ qWarning() << "Pixel size should now be 24:" << property.read().toInt(); */ /*! - Create an invalid QDeclarativeProperty. + Create an invalid QQmlProperty. */ -QDeclarativeProperty::QDeclarativeProperty() +QQmlProperty::QQmlProperty() : d(0) { } /*! \internal */ -QDeclarativeProperty::~QDeclarativeProperty() +QQmlProperty::~QQmlProperty() { if (d) d->release(); @@ -126,37 +126,37 @@ QDeclarativeProperty::~QDeclarativeProperty() } /*! - Creates a QDeclarativeProperty for the default property of \a obj. If there is no - default property, an invalid QDeclarativeProperty will be created. + Creates a QQmlProperty for the default property of \a obj. If there is no + default property, an invalid QQmlProperty will be created. */ -QDeclarativeProperty::QDeclarativeProperty(QObject *obj) -: d(new QDeclarativePropertyPrivate) +QQmlProperty::QQmlProperty(QObject *obj) +: d(new QQmlPropertyPrivate) { d->initDefault(obj); } /*! - Creates a QDeclarativeProperty for the default property of \a obj - using the \l{QDeclarativeContext} {context} \a ctxt. If there is - no default property, an invalid QDeclarativeProperty will be + Creates a QQmlProperty for the default property of \a obj + using the \l{QQmlContext} {context} \a ctxt. If there is + no default property, an invalid QQmlProperty will be created. */ -QDeclarativeProperty::QDeclarativeProperty(QObject *obj, QDeclarativeContext *ctxt) -: d(new QDeclarativePropertyPrivate) +QQmlProperty::QQmlProperty(QObject *obj, QQmlContext *ctxt) +: d(new QQmlPropertyPrivate) { - d->context = ctxt?QDeclarativeContextData::get(ctxt):0; + d->context = ctxt?QQmlContextData::get(ctxt):0; d->engine = ctxt?ctxt->engine():0; d->initDefault(obj); } /*! - Creates a QDeclarativeProperty for the default property of \a obj + Creates a QQmlProperty for the default property of \a obj using the environment for instantiating QML components that is provided by \a engine. If there is no default property, an - invalid QDeclarativeProperty will be created. + invalid QQmlProperty will be created. */ -QDeclarativeProperty::QDeclarativeProperty(QObject *obj, QDeclarativeEngine *engine) - : d(new QDeclarativePropertyPrivate) +QQmlProperty::QQmlProperty(QObject *obj, QQmlEngine *engine) + : d(new QQmlPropertyPrivate) { d->context = 0; d->engine = engine; @@ -166,50 +166,50 @@ QDeclarativeProperty::QDeclarativeProperty(QObject *obj, QDeclarativeEngine *eng /*! Initialize from the default property of \a obj */ -void QDeclarativePropertyPrivate::initDefault(QObject *obj) +void QQmlPropertyPrivate::initDefault(QObject *obj) { if (!obj) return; - QMetaProperty p = QDeclarativeMetaType::defaultProperty(obj); + QMetaProperty p = QQmlMetaType::defaultProperty(obj); core.load(p); if (core.isValid()) object = obj; } /*! - Creates a QDeclarativeProperty for the property \a name of \a obj. + Creates a QQmlProperty for the property \a name of \a obj. */ -QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name) -: d(new QDeclarativePropertyPrivate) +QQmlProperty::QQmlProperty(QObject *obj, const QString &name) +: d(new QQmlPropertyPrivate) { d->initProperty(obj, name); if (!isValid()) d->object = 0; } /*! - Creates a QDeclarativeProperty for the property \a name of \a obj - using the \l{QDeclarativeContext} {context} \a ctxt. + Creates a QQmlProperty for the property \a name of \a obj + using the \l{QQmlContext} {context} \a ctxt. - Creating a QDeclarativeProperty without a context will render some + Creating a QQmlProperty without a context will render some properties - like attached properties - inaccessible. */ -QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name, QDeclarativeContext *ctxt) -: d(new QDeclarativePropertyPrivate) +QQmlProperty::QQmlProperty(QObject *obj, const QString &name, QQmlContext *ctxt) +: d(new QQmlPropertyPrivate) { - d->context = ctxt?QDeclarativeContextData::get(ctxt):0; + d->context = ctxt?QQmlContextData::get(ctxt):0; d->engine = ctxt?ctxt->engine():0; d->initProperty(obj, name); if (!isValid()) { d->object = 0; d->context = 0; d->engine = 0; } } /*! - Creates a QDeclarativeProperty for the property \a name of \a obj + Creates a QQmlProperty for the property \a name of \a obj using the environment for instantiating QML components that is provided by \a engine. */ -QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name, QDeclarativeEngine *engine) -: d(new QDeclarativePropertyPrivate) +QQmlProperty::QQmlProperty(QObject *obj, const QString &name, QQmlEngine *engine) +: d(new QQmlPropertyPrivate) { d->context = 0; d->engine = engine; @@ -217,25 +217,25 @@ QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name, QD if (!isValid()) { d->object = 0; d->context = 0; d->engine = 0; } } -Q_GLOBAL_STATIC(QDeclarativeValueTypeFactory, qmlValueTypes); +Q_GLOBAL_STATIC(QQmlValueTypeFactory, qmlValueTypes); -QDeclarativePropertyPrivate::QDeclarativePropertyPrivate() +QQmlPropertyPrivate::QQmlPropertyPrivate() : context(0), engine(0), object(0), isNameCached(false) { } -QDeclarativeContextData *QDeclarativePropertyPrivate::effectiveContext() const +QQmlContextData *QQmlPropertyPrivate::effectiveContext() const { if (context) return context; - else if (engine) return QDeclarativeContextData::get(engine->rootContext()); + else if (engine) return QQmlContextData::get(engine->rootContext()); else return 0; } -void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name) +void QQmlPropertyPrivate::initProperty(QObject *obj, const QString &name) { if (!obj) return; - QDeclarativeTypeNameCache *typeNameCache = context?context->imports:0; + QQmlTypeNameCache *typeNameCache = context?context->imports:0; QStringList path = name.split(QLatin1Char('.')); if (path.isEmpty()) return; @@ -247,10 +247,10 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name const QString &pathName = path.at(ii); if (typeNameCache) { - QDeclarativeTypeNameCache::Result r = typeNameCache->query(pathName); + QQmlTypeNameCache::Result r = typeNameCache->query(pathName); if (r.isValid()) { if (r.type) { - QDeclarativeAttachedPropertiesFunc func = r.type->attachedPropertiesFunction(); + QQmlAttachedPropertiesFunc func = r.type->attachedPropertiesFunction(); if (!func) return; // Not an attachable type currentObject = qmlAttachedPropertiesObjectById(r.type->attachedPropertiesId(), currentObject); @@ -261,7 +261,7 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name ++ii; r = typeNameCache->query(path.at(ii), r.importNamespace); if (!r.type) return; // Invalid type in namespace - QDeclarativeAttachedPropertiesFunc func = r.type->attachedPropertiesFunction(); + QQmlAttachedPropertiesFunc func = r.type->attachedPropertiesFunction(); if (!func) return; // Not an attachable type currentObject = qmlAttachedPropertiesObjectById(r.type->attachedPropertiesId(), currentObject); @@ -277,15 +277,15 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name } - QDeclarativePropertyData local; - QDeclarativePropertyData *property = - QDeclarativePropertyCache::property(engine, obj, pathName, local); + QQmlPropertyData local; + QQmlPropertyData *property = + QQmlPropertyCache::property(engine, obj, pathName, local); if (!property) return; // Not a property if (property->isFunction()) return; // Not an object property - if (ii == (path.count() - 2) && QDeclarativeValueTypeFactory::isValueType(property->propType)) { + if (ii == (path.count() - 2) && QQmlValueTypeFactory::isValueType(property->propType)) { // We're now at a value type property. We can use a global valuetypes array as we // never actually use the objects, just look up their properties. QObject *typeObject = (*qmlValueTypes())[property->propType]; @@ -296,7 +296,7 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name QMetaProperty vtProp = typeObject->metaObject()->property(idx); - typedef QDeclarativePropertyData PCD; + typedef QQmlPropertyData PCD; Q_ASSERT(PCD::flagsForProperty(vtProp) <= PCD::ValueTypeFlagMask); Q_ASSERT(vtProp.userType() <= 0xFF); @@ -341,9 +341,9 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name } // Property - QDeclarativePropertyData local; - QDeclarativePropertyData *property = - QDeclarativePropertyCache::property(engine, currentObject, terminal, local); + QQmlPropertyData local; + QQmlPropertyData *property = + QQmlPropertyCache::property(engine, currentObject, terminal, local); if (property && !property->isFunction()) { object = currentObject; core = *property; @@ -355,7 +355,7 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name /*! Create a copy of \a other. */ -QDeclarativeProperty::QDeclarativeProperty(const QDeclarativeProperty &other) +QQmlProperty::QQmlProperty(const QQmlProperty &other) { d = other.d; if (d) @@ -363,18 +363,18 @@ QDeclarativeProperty::QDeclarativeProperty(const QDeclarativeProperty &other) } /*! - \enum QDeclarativeProperty::PropertyTypeCategory + \enum QQmlProperty::PropertyTypeCategory This enum specifies a category of QML property. \value InvalidCategory The property is invalid, or is a signal property. - \value List The property is a QDeclarativeListProperty list property + \value List The property is a QQmlListProperty list property \value Object The property is a QObject derived type pointer \value Normal The property is a normal value property. */ /*! - \enum QDeclarativeProperty::Type + \enum QQmlProperty::Type This enum specifies a type of QML property. @@ -386,32 +386,32 @@ QDeclarativeProperty::QDeclarativeProperty(const QDeclarativeProperty &other) /*! Returns the property category. */ -QDeclarativeProperty::PropertyTypeCategory QDeclarativeProperty::propertyTypeCategory() const +QQmlProperty::PropertyTypeCategory QQmlProperty::propertyTypeCategory() const { return d ? d->propertyTypeCategory() : InvalidCategory; } -QDeclarativeProperty::PropertyTypeCategory -QDeclarativePropertyPrivate::propertyTypeCategory() const +QQmlProperty::PropertyTypeCategory +QQmlPropertyPrivate::propertyTypeCategory() const { uint type = this->type(); if (isValueType()) { - return QDeclarativeProperty::Normal; - } else if (type & QDeclarativeProperty::Property) { + return QQmlProperty::Normal; + } else if (type & QQmlProperty::Property) { int type = propertyType(); if (type == QVariant::Invalid) - return QDeclarativeProperty::InvalidCategory; - else if (QDeclarativeValueTypeFactory::isValueType((uint)type)) - return QDeclarativeProperty::Normal; + return QQmlProperty::InvalidCategory; + else if (QQmlValueTypeFactory::isValueType((uint)type)) + return QQmlProperty::Normal; else if (core.isQObject()) - return QDeclarativeProperty::Object; + return QQmlProperty::Object; else if (core.isQList()) - return QDeclarativeProperty::List; + return QQmlProperty::List; else - return QDeclarativeProperty::Normal; + return QQmlProperty::Normal; } else { - return QDeclarativeProperty::InvalidCategory; + return QQmlProperty::InvalidCategory; } } @@ -419,16 +419,16 @@ QDeclarativePropertyPrivate::propertyTypeCategory() const Returns the type name of the property, or 0 if the property has no type name. */ -const char *QDeclarativeProperty::propertyTypeName() const +const char *QQmlProperty::propertyTypeName() const { if (!d) return 0; if (d->isValueType()) { - QDeclarativeEnginePrivate *ep = d->engine?QDeclarativeEnginePrivate::get(d->engine):0; - QDeclarativeValueType *valueType = 0; + QQmlEnginePrivate *ep = d->engine?QQmlEnginePrivate::get(d->engine):0; + QQmlValueType *valueType = 0; if (ep) valueType = ep->valueTypes[d->core.propType]; - else valueType = QDeclarativeValueTypeFactory::valueType(d->core.propType); + else valueType = QQmlValueTypeFactory::valueType(d->core.propType); Q_ASSERT(valueType); const char *rv = valueType->metaObject()->property(d->core.valueTypeCoreIndex).typeName(); @@ -444,10 +444,10 @@ const char *QDeclarativeProperty::propertyTypeName() const } /*! - Returns true if \a other and this QDeclarativeProperty represent the same + Returns true if \a other and this QQmlProperty represent the same property. */ -bool QDeclarativeProperty::operator==(const QDeclarativeProperty &other) const +bool QQmlProperty::operator==(const QQmlProperty &other) const { if (!d || !other.d) return false; @@ -465,74 +465,74 @@ bool QDeclarativeProperty::operator==(const QDeclarativeProperty &other) const Returns the QVariant type of the property, or QVariant::Invalid if the property has no QVariant type. */ -int QDeclarativeProperty::propertyType() const +int QQmlProperty::propertyType() const { return d ? d->propertyType() : int(QVariant::Invalid); } -bool QDeclarativePropertyPrivate::isValueType() const +bool QQmlPropertyPrivate::isValueType() const { return core.isValueTypeVirtual(); } -int QDeclarativePropertyPrivate::propertyType() const +int QQmlPropertyPrivate::propertyType() const { uint type = this->type(); if (isValueType()) { return core.valueTypePropType; - } else if (type & QDeclarativeProperty::Property) { + } else if (type & QQmlProperty::Property) { return core.propType; } else { return QVariant::Invalid; } } -QDeclarativeProperty::Type QDeclarativePropertyPrivate::type() const +QQmlProperty::Type QQmlPropertyPrivate::type() const { if (core.isFunction()) - return QDeclarativeProperty::SignalProperty; + return QQmlProperty::SignalProperty; else if (core.isValid()) - return QDeclarativeProperty::Property; + return QQmlProperty::Property; else - return QDeclarativeProperty::Invalid; + return QQmlProperty::Invalid; } /*! Returns the type of the property. */ -QDeclarativeProperty::Type QDeclarativeProperty::type() const +QQmlProperty::Type QQmlProperty::type() const { return d ? d->type() : Invalid; } /*! - Returns true if this QDeclarativeProperty represents a regular Qt property. + Returns true if this QQmlProperty represents a regular Qt property. */ -bool QDeclarativeProperty::isProperty() const +bool QQmlProperty::isProperty() const { return type() & Property; } /*! - Returns true if this QDeclarativeProperty represents a QML signal property. + Returns true if this QQmlProperty represents a QML signal property. */ -bool QDeclarativeProperty::isSignalProperty() const +bool QQmlProperty::isSignalProperty() const { return type() & SignalProperty; } /*! - Returns the QDeclarativeProperty's QObject. + Returns the QQmlProperty's QObject. */ -QObject *QDeclarativeProperty::object() const +QObject *QQmlProperty::object() const { return d ? d->object : 0; } /*! - Assign \a other to this QDeclarativeProperty. + Assign \a other to this QQmlProperty. */ -QDeclarativeProperty &QDeclarativeProperty::operator=(const QDeclarativeProperty &other) +QQmlProperty &QQmlProperty::operator=(const QQmlProperty &other) { if (d) d->release(); @@ -546,7 +546,7 @@ QDeclarativeProperty &QDeclarativeProperty::operator=(const QDeclarativeProperty /*! Returns true if the property is writable, otherwise false. */ -bool QDeclarativeProperty::isWritable() const +bool QQmlProperty::isWritable() const { if (!d) return false; @@ -565,7 +565,7 @@ bool QDeclarativeProperty::isWritable() const /*! Returns true if the property is designable, otherwise false. */ -bool QDeclarativeProperty::isDesignable() const +bool QQmlProperty::isDesignable() const { if (!d) return false; @@ -578,7 +578,7 @@ bool QDeclarativeProperty::isDesignable() const /*! Returns true if the property is resettable, otherwise false. */ -bool QDeclarativeProperty::isResettable() const +bool QQmlProperty::isResettable() const { if (!d) return false; @@ -589,10 +589,10 @@ bool QDeclarativeProperty::isResettable() const } /*! - Returns true if the QDeclarativeProperty refers to a valid property, otherwise + Returns true if the QQmlProperty refers to a valid property, otherwise false. */ -bool QDeclarativeProperty::isValid() const +bool QQmlProperty::isValid() const { if (!d) return false; @@ -602,7 +602,7 @@ bool QDeclarativeProperty::isValid() const /*! Return the name of this QML property. */ -QString QDeclarativeProperty::name() const +QString QQmlProperty::name() const { if (!d) return QString(); @@ -612,10 +612,10 @@ QString QDeclarativeProperty::name() const } else if (d->isValueType()) { QString rv = d->core.name(d->object) + QLatin1Char('.'); - QDeclarativeEnginePrivate *ep = d->engine?QDeclarativeEnginePrivate::get(d->engine):0; - QDeclarativeValueType *valueType = 0; + QQmlEnginePrivate *ep = d->engine?QQmlEnginePrivate::get(d->engine):0; + QQmlValueType *valueType = 0; if (ep) valueType = ep->valueTypes[d->core.propType]; - else valueType = QDeclarativeValueTypeFactory::valueType(d->core.propType); + else valueType = QQmlValueTypeFactory::valueType(d->core.propType); Q_ASSERT(valueType); const char *vtName = valueType->metaObject()->property(d->core.valueTypeCoreIndex).name(); @@ -641,7 +641,7 @@ QString QDeclarativeProperty::name() const Returns the \l{QMetaProperty} {Qt property} associated with this QML property. */ -QMetaProperty QDeclarativeProperty::property() const +QMetaProperty QQmlProperty::property() const { if (!d) return QMetaProperty(); @@ -655,7 +655,7 @@ QMetaProperty QDeclarativeProperty::property() const Return the QMetaMethod for this property if it is a SignalProperty, otherwise returns an invalid QMetaMethod. */ -QMetaMethod QDeclarativeProperty::method() const +QMetaMethod QQmlProperty::method() const { if (!d) return QMetaMethod(); @@ -669,8 +669,8 @@ QMetaMethod QDeclarativeProperty::method() const Returns the binding associated with this property, or 0 if no binding exists. */ -QDeclarativeAbstractBinding * -QDeclarativePropertyPrivate::binding(const QDeclarativeProperty &that) +QQmlAbstractBinding * +QQmlPropertyPrivate::binding(const QQmlProperty &that) { if (!that.d || !that.isProperty() || !that.d->object) return 0; @@ -692,9 +692,9 @@ QDeclarativePropertyPrivate::binding(const QDeclarativeProperty &that) \a flags is passed through to the binding and is used for the initial update (when the binding sets the initial value, it will use these flags for the write). */ -QDeclarativeAbstractBinding * -QDeclarativePropertyPrivate::setBinding(const QDeclarativeProperty &that, - QDeclarativeAbstractBinding *newBinding, +QQmlAbstractBinding * +QQmlPropertyPrivate::setBinding(const QQmlProperty &that, + QQmlAbstractBinding *newBinding, WriteFlags flags) { if (!that.d || !that.isProperty() || !that.d->object) { @@ -720,18 +720,18 @@ QDeclarativePropertyPrivate::setBinding(const QDeclarativeProperty &that, } } -QDeclarativeAbstractBinding * -QDeclarativePropertyPrivate::binding(QObject *object, int coreIndex, int valueTypeIndex) +QQmlAbstractBinding * +QQmlPropertyPrivate::binding(QObject *object, int coreIndex, int valueTypeIndex) { - QDeclarativeData *data = QDeclarativeData::get(object); + QQmlData *data = QQmlData::get(object); if (!data) return 0; - QDeclarativePropertyData *propertyData = + QQmlPropertyData *propertyData = data->propertyCache?data->propertyCache->property(coreIndex):0; if (propertyData && propertyData->isAlias()) { - const QDeclarativeVMEMetaObject *vme = - static_cast(metaObjectForProperty(object->metaObject(), coreIndex)); + const QQmlVMEMetaObject *vme = + static_cast(metaObjectForProperty(object->metaObject(), coreIndex)); QObject *aObject = 0; int aCoreIndex = -1; int aValueTypeIndex = -1; if (!vme->aliasTarget(coreIndex, &aObject, &aCoreIndex, &aValueTypeIndex) || aCoreIndex == -1) @@ -746,34 +746,34 @@ QDeclarativePropertyPrivate::binding(QObject *object, int coreIndex, int valueTy if (!data->hasBindingBit(coreIndex)) return 0; - QDeclarativeAbstractBinding *binding = data->bindings; + QQmlAbstractBinding *binding = data->bindings; while (binding && binding->propertyIndex() != coreIndex) binding = binding->m_nextBinding; if (binding && valueTypeIndex != -1) { - if (binding->bindingType() == QDeclarativeAbstractBinding::ValueTypeProxy) { + if (binding->bindingType() == QQmlAbstractBinding::ValueTypeProxy) { int index = coreIndex | (valueTypeIndex << 24); - binding = static_cast(binding)->binding(index); + binding = static_cast(binding)->binding(index); } } return binding; } -void QDeclarativePropertyPrivate::findAliasTarget(QObject *object, int bindingIndex, +void QQmlPropertyPrivate::findAliasTarget(QObject *object, int bindingIndex, QObject **targetObject, int *targetBindingIndex) { int coreIndex = bindingIndex & 0xFFFFFF; int valueTypeIndex = bindingIndex >> 24; if (valueTypeIndex == 0) valueTypeIndex = -1; - QDeclarativeData *data = QDeclarativeData::get(object, false); + QQmlData *data = QQmlData::get(object, false); if (data) { - QDeclarativePropertyData *propertyData = + QQmlPropertyData *propertyData = data->propertyCache?data->propertyCache->property(coreIndex):0; if (propertyData && propertyData->isAlias()) { - const QDeclarativeVMEMetaObject *vme = - static_cast(metaObjectForProperty(object->metaObject(), coreIndex)); + const QQmlVMEMetaObject *vme = + static_cast(metaObjectForProperty(object->metaObject(), coreIndex)); QObject *aObject = 0; int aCoreIndex = -1; int aValueTypeIndex = -1; if (vme->aliasTarget(coreIndex, &aObject, &aCoreIndex, &aValueTypeIndex)) { // This will either be a value type sub-reference or an alias to a value-type sub-reference not both @@ -795,19 +795,19 @@ void QDeclarativePropertyPrivate::findAliasTarget(QObject *object, int bindingIn *targetBindingIndex = bindingIndex; } -QDeclarativeAbstractBinding * -QDeclarativePropertyPrivate::setBinding(QObject *object, int coreIndex, int valueTypeIndex, - QDeclarativeAbstractBinding *newBinding, WriteFlags flags) +QQmlAbstractBinding * +QQmlPropertyPrivate::setBinding(QObject *object, int coreIndex, int valueTypeIndex, + QQmlAbstractBinding *newBinding, WriteFlags flags) { - QDeclarativeData *data = QDeclarativeData::get(object, 0 != newBinding); - QDeclarativeAbstractBinding *binding = 0; + QQmlData *data = QQmlData::get(object, 0 != newBinding); + QQmlAbstractBinding *binding = 0; if (data) { - QDeclarativePropertyData *propertyData = + QQmlPropertyData *propertyData = data->propertyCache?data->propertyCache->property(coreIndex):0; if (propertyData && propertyData->isAlias()) { - const QDeclarativeVMEMetaObject *vme = - static_cast(metaObjectForProperty(object->metaObject(), coreIndex)); + const QQmlVMEMetaObject *vme = + static_cast(metaObjectForProperty(object->metaObject(), coreIndex)); QObject *aObject = 0; int aCoreIndex = -1; int aValueTypeIndex = -1; if (!vme->aliasTarget(coreIndex, &aObject, &aCoreIndex, &aValueTypeIndex)) { @@ -833,8 +833,8 @@ QDeclarativePropertyPrivate::setBinding(QObject *object, int coreIndex, int valu if (valueTypeIndex != -1) index |= (valueTypeIndex << 24); - if (binding && valueTypeIndex != -1 && binding->bindingType() == QDeclarativeAbstractBinding::ValueTypeProxy) - binding = static_cast(binding)->binding(index); + if (binding && valueTypeIndex != -1 && binding->bindingType() == QQmlAbstractBinding::ValueTypeProxy) + binding = static_cast(binding)->binding(index); if (binding) { binding->removeFromObject(); @@ -855,19 +855,19 @@ QDeclarativePropertyPrivate::setBinding(QObject *object, int coreIndex, int valu return binding; } -QDeclarativeAbstractBinding * -QDeclarativePropertyPrivate::setBindingNoEnable(QObject *object, int coreIndex, int valueTypeIndex, - QDeclarativeAbstractBinding *newBinding) +QQmlAbstractBinding * +QQmlPropertyPrivate::setBindingNoEnable(QObject *object, int coreIndex, int valueTypeIndex, + QQmlAbstractBinding *newBinding) { - QDeclarativeData *data = QDeclarativeData::get(object, 0 != newBinding); - QDeclarativeAbstractBinding *binding = 0; + QQmlData *data = QQmlData::get(object, 0 != newBinding); + QQmlAbstractBinding *binding = 0; if (data) { - QDeclarativePropertyData *propertyData = + QQmlPropertyData *propertyData = data->propertyCache?data->propertyCache->property(coreIndex):0; if (propertyData && propertyData->isAlias()) { - const QDeclarativeVMEMetaObject *vme = - static_cast(metaObjectForProperty(object->metaObject(), coreIndex)); + const QQmlVMEMetaObject *vme = + static_cast(metaObjectForProperty(object->metaObject(), coreIndex)); QObject *aObject = 0; int aCoreIndex = -1; int aValueTypeIndex = -1; if (!vme->aliasTarget(coreIndex, &aObject, &aCoreIndex, &aValueTypeIndex)) { @@ -893,8 +893,8 @@ QDeclarativePropertyPrivate::setBindingNoEnable(QObject *object, int coreIndex, if (valueTypeIndex != -1) index |= (valueTypeIndex << 24); - if (binding && valueTypeIndex != -1 && binding->bindingType() == QDeclarativeAbstractBinding::ValueTypeProxy) - binding = static_cast(binding)->binding(index); + if (binding && valueTypeIndex != -1 && binding->bindingType() == QQmlAbstractBinding::ValueTypeProxy) + binding = static_cast(binding)->binding(index); if (binding) binding->removeFromObject(); @@ -916,10 +916,10 @@ QDeclarativePropertyPrivate::setBindingNoEnable(QObject *object, int coreIndex, Returns the expression associated with this signal property, or 0 if no signal expression exists. */ -QDeclarativeExpression * -QDeclarativePropertyPrivate::signalExpression(const QDeclarativeProperty &that) +QQmlExpression * +QQmlPropertyPrivate::signalExpression(const QQmlProperty &that) { - if (!(that.type() & QDeclarativeProperty::SignalProperty)) + if (!(that.type() & QQmlProperty::SignalProperty)) return 0; const QObjectList &children = that.d->object->children(); @@ -927,7 +927,7 @@ QDeclarativePropertyPrivate::signalExpression(const QDeclarativeProperty &that) for (int ii = 0; ii < children.count(); ++ii) { QObject *child = children.at(ii); - QDeclarativeBoundSignal *signal = QDeclarativeBoundSignal::cast(child); + QQmlBoundSignal *signal = QQmlBoundSignal::cast(child); if (signal && signal->index() == that.index()) return signal->expression(); } @@ -942,11 +942,11 @@ QDeclarativePropertyPrivate::signalExpression(const QDeclarativeProperty &that) Ownership of \a expr transfers to QML. Ownership of the return value is assumed by the caller. */ -QDeclarativeExpression * -QDeclarativePropertyPrivate::setSignalExpression(const QDeclarativeProperty &that, - QDeclarativeExpression *expr) +QQmlExpression * +QQmlPropertyPrivate::setSignalExpression(const QQmlProperty &that, + QQmlExpression *expr) { - if (!(that.type() & QDeclarativeProperty::SignalProperty)) { + if (!(that.type() & QQmlProperty::SignalProperty)) { delete expr; return 0; } @@ -956,13 +956,13 @@ QDeclarativePropertyPrivate::setSignalExpression(const QDeclarativeProperty &tha for (int ii = 0; ii < children.count(); ++ii) { QObject *child = children.at(ii); - QDeclarativeBoundSignal *signal = QDeclarativeBoundSignal::cast(child); + QQmlBoundSignal *signal = QQmlBoundSignal::cast(child); if (signal && signal->index() == that.index()) return signal->setExpression(expr); } if (expr) { - QDeclarativeBoundSignal *signal = new QDeclarativeBoundSignal(that.d->object, that.method(), that.d->object); + QQmlBoundSignal *signal = new QQmlBoundSignal(that.d->object, that.method(), that.d->object); return signal->setExpression(expr); } else { return 0; @@ -972,7 +972,7 @@ QDeclarativePropertyPrivate::setSignalExpression(const QDeclarativeProperty &tha /*! Returns the property value. */ -QVariant QDeclarativeProperty::read() const +QVariant QQmlProperty::read() const { if (!d) return QVariant(); @@ -994,29 +994,29 @@ QVariant QDeclarativeProperty::read() const /*! Return the \a name property value of \a object. This method is equivalent to: \code - QDeclarativeProperty p(object, name); + QQmlProperty p(object, name); p.read(); \endcode */ -QVariant QDeclarativeProperty::read(QObject *object, const QString &name) +QVariant QQmlProperty::read(QObject *object, const QString &name) { - QDeclarativeProperty p(object, name); + QQmlProperty p(object, name); return p.read(); } /*! Return the \a name property value of \a object using the - \l{QDeclarativeContext} {context} \a ctxt. This method is + \l{QQmlContext} {context} \a ctxt. This method is equivalent to: \code - QDeclarativeProperty p(object, name, context); + QQmlProperty p(object, name, context); p.read(); \endcode */ -QVariant QDeclarativeProperty::read(QObject *object, const QString &name, QDeclarativeContext *ctxt) +QVariant QQmlProperty::read(QObject *object, const QString &name, QQmlContext *ctxt) { - QDeclarativeProperty p(object, name, ctxt); + QQmlProperty p(object, name, ctxt); return p.read(); } @@ -1027,24 +1027,24 @@ QVariant QDeclarativeProperty::read(QObject *object, const QString &name, QDecla This method is equivalent to: \code - QDeclarativeProperty p(object, name, engine); + QQmlProperty p(object, name, engine); p.read(); \endcode */ -QVariant QDeclarativeProperty::read(QObject *object, const QString &name, QDeclarativeEngine *engine) +QVariant QQmlProperty::read(QObject *object, const QString &name, QQmlEngine *engine) { - QDeclarativeProperty p(object, name, engine); + QQmlProperty p(object, name, engine); return p.read(); } -QVariant QDeclarativePropertyPrivate::readValueProperty() +QVariant QQmlPropertyPrivate::readValueProperty() { if (isValueType()) { - QDeclarativeEnginePrivate *ep = engine?QDeclarativeEnginePrivate::get(engine):0; - QDeclarativeValueType *valueType = 0; + QQmlEnginePrivate *ep = engine?QQmlEnginePrivate::get(engine):0; + QQmlValueType *valueType = 0; if (ep) valueType = ep->valueTypes[core.propType]; - else valueType = QDeclarativeValueTypeFactory::valueType(core.propType); + else valueType = QQmlValueTypeFactory::valueType(core.propType); Q_ASSERT(valueType); valueType->read(object, core.coreIndex); @@ -1056,10 +1056,10 @@ QVariant QDeclarativePropertyPrivate::readValueProperty() } else if (core.isQList()) { - QDeclarativeListProperty prop; + QQmlListProperty prop; void *args[] = { &prop, 0 }; QMetaObject::metacall(object, QMetaObject::ReadProperty, core.coreIndex, args); - return QVariant::fromValue(QDeclarativeListReferencePrivate::init(prop, core.propType, engine)); + return QVariant::fromValue(QQmlListReferencePrivate::init(prop, core.propType, engine)); } else if (core.isQObject()) { @@ -1092,7 +1092,7 @@ static QUrl urlFromUserString(const QString &data) } // helper function to allow assignment / binding to QList properties. -static QVariant resolvedUrlSequence(const QVariant &value, QDeclarativeContextData *context) +static QVariant resolvedUrlSequence(const QVariant &value, QQmlContextData *context) { QList urls; if (value.userType() == qMetaTypeId()) { @@ -1125,7 +1125,7 @@ static QVariant resolvedUrlSequence(const QVariant &value, QDeclarativeContextDa } //writeEnumProperty MIRRORS the relelvant bit of QMetaProperty::write AND MUST BE KEPT IN SYNC! -bool QDeclarativePropertyPrivate::writeEnumProperty(const QMetaProperty &prop, int idx, QObject *object, const QVariant &value, int flags) +bool QQmlPropertyPrivate::writeEnumProperty(const QMetaProperty &prop, int idx, QObject *object, const QVariant &value, int flags) { if (!object || !prop.isWritable()) return false; @@ -1165,20 +1165,20 @@ bool QDeclarativePropertyPrivate::writeEnumProperty(const QMetaProperty &prop, i return status; } -bool QDeclarativePropertyPrivate::writeValueProperty(const QVariant &value, WriteFlags flags) +bool QQmlPropertyPrivate::writeValueProperty(const QVariant &value, WriteFlags flags) { return writeValueProperty(object, engine, core, value, effectiveContext(), flags); } bool -QDeclarativePropertyPrivate::writeValueProperty(QObject *object, QDeclarativeEngine *engine, - const QDeclarativePropertyData &core, +QQmlPropertyPrivate::writeValueProperty(QObject *object, QQmlEngine *engine, + const QQmlPropertyData &core, const QVariant &value, - QDeclarativeContextData *context, WriteFlags flags) + QQmlContextData *context, WriteFlags flags) { // Remove any existing bindings on this property if (!(flags & DontRemoveBinding) && object) { - QDeclarativeAbstractBinding *binding = setBinding(object, core.coreIndex, + QQmlAbstractBinding *binding = setBinding(object, core.coreIndex, core.getValueTypeCoreIndex(), 0, flags); if (binding) binding->destroy(); @@ -1186,19 +1186,19 @@ QDeclarativePropertyPrivate::writeValueProperty(QObject *object, QDeclarativeEng bool rv = false; if (core.isValueTypeVirtual()) { - QDeclarativeEnginePrivate *ep = engine?QDeclarativeEnginePrivate::get(engine):0; + QQmlEnginePrivate *ep = engine?QQmlEnginePrivate::get(engine):0; - QDeclarativeValueType *writeBack = 0; + QQmlValueType *writeBack = 0; if (ep) { writeBack = ep->valueTypes[core.propType]; } else { - writeBack = QDeclarativeValueTypeFactory::valueType(core.propType); + writeBack = QQmlValueTypeFactory::valueType(core.propType); } writeBack->read(object, core.coreIndex); - QDeclarativePropertyData data = core; - data.setFlags(QDeclarativePropertyData::Flag(core.valueTypeFlags)); + QQmlPropertyData data = core; + data.setFlags(QQmlPropertyData::Flag(core.valueTypeFlags)); data.coreIndex = core.valueTypeCoreIndex; data.propType = core.valueTypePropType; @@ -1216,9 +1216,9 @@ QDeclarativePropertyPrivate::writeValueProperty(QObject *object, QDeclarativeEng return rv; } -bool QDeclarativePropertyPrivate::write(QObject *object, - const QDeclarativePropertyData &property, - const QVariant &value, QDeclarativeContextData *context, +bool QQmlPropertyPrivate::write(QObject *object, + const QQmlPropertyData &property, + const QVariant &value, QQmlContextData *context, WriteFlags flags) { int coreIdx = property.coreIndex; @@ -1240,7 +1240,7 @@ bool QDeclarativePropertyPrivate::write(QObject *object, int propertyType = property.propType; int variantType = value.userType(); - QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(context); + QQmlEnginePrivate *enginePriv = QQmlEnginePrivate::get(context); if (propertyType == QVariant::Url) { @@ -1314,13 +1314,13 @@ bool QDeclarativePropertyPrivate::write(QObject *object, if (enginePriv) { listType = enginePriv->rawMetaObjectForType(enginePriv->listType(property.propType)); } else { - QDeclarativeType *type = QDeclarativeMetaType::qmlType(QDeclarativeMetaType::listType(property.propType)); + QQmlType *type = QQmlMetaType::qmlType(QQmlMetaType::listType(property.propType)); if (!type) return false; listType = type->baseMetaObject(); } if (!listType) return false; - QDeclarativeListProperty prop; + QQmlListProperty prop; void *args[] = { &prop, 0 }; QMetaObject::metacall(object, QMetaObject::ReadProperty, coreIdx, args); @@ -1328,8 +1328,8 @@ bool QDeclarativePropertyPrivate::write(QObject *object, prop.clear(&prop); - if (value.userType() == qMetaTypeId()) { - QDeclarativeListReference qdlr = value.value(); + if (value.userType() == qMetaTypeId()) { + QQmlListReference qdlr = value.value(); for (int ii = 0; ii < qdlr.count(); ++ii) { QObject *o = qdlr.at(ii); @@ -1347,7 +1347,7 @@ bool QDeclarativePropertyPrivate::write(QObject *object, prop.append(&prop, (void *)o); } } else { - QObject *o = enginePriv?enginePriv->toQObject(value):QDeclarativeMetaType::toQObject(value); + QObject *o = enginePriv?enginePriv->toQObject(value):QQmlMetaType::toQObject(value); if (o && !canConvert(o->metaObject(), listType)) o = 0; prop.append(&prop, (void *)o); @@ -1359,13 +1359,13 @@ bool QDeclarativePropertyPrivate::write(QObject *object, bool ok = false; QVariant v; if (variantType == QVariant::String) - v = QDeclarativeStringConverters::variantFromString(value.toString(), propertyType, &ok); + v = QQmlStringConverters::variantFromString(value.toString(), propertyType, &ok); if (!ok) { v = value; if (v.convert((QVariant::Type)propertyType)) { ok = true; } else if ((uint)propertyType >= QVariant::UserType && variantType == QVariant::String) { - QDeclarativeMetaType::StringConverter con = QDeclarativeMetaType::customStringConverter(propertyType); + QQmlMetaType::StringConverter con = QQmlMetaType::customStringConverter(propertyType); if (con) { v = con(value.toString()); if (v.userType() == propertyType) @@ -1417,18 +1417,18 @@ bool QDeclarativePropertyPrivate::write(QObject *object, } // Returns true if successful, false if an error description was set on expression -bool QDeclarativePropertyPrivate::writeBinding(QObject *object, - const QDeclarativePropertyData &core, - QDeclarativeContextData *context, - QDeclarativeJavaScriptExpression *expression, +bool QQmlPropertyPrivate::writeBinding(QObject *object, + const QQmlPropertyData &core, + QQmlContextData *context, + QQmlJavaScriptExpression *expression, v8::Handle result, bool isUndefined, WriteFlags flags) { Q_ASSERT(object); Q_ASSERT(core.coreIndex != -1); - QDeclarativeEngine *engine = context->engine; - QV8Engine *v8engine = QDeclarativeEnginePrivate::getV8Engine(engine); + QQmlEngine *engine = context->engine; + QV8Engine *v8engine = QQmlEnginePrivate::getV8Engine(engine); #define QUICK_STORE(cpptype, conversion) \ { \ @@ -1468,7 +1468,7 @@ bool QDeclarativePropertyPrivate::writeBinding(QObject *object, int type = core.isValueTypeVirtual()?core.valueTypePropType:core.propType; - QDeclarativeJavaScriptExpression::DeleteWatcher watcher(expression); + QQmlJavaScriptExpression::DeleteWatcher watcher(expression); QVariant value; bool isVmeProperty = core.isVMEProperty(); @@ -1498,7 +1498,7 @@ bool QDeclarativePropertyPrivate::writeBinding(QObject *object, expression->delayedError()->error.setDescription(QLatin1String("Unable to assign a function to a property.")); return false; } else if (isVmeProperty) { - typedef QDeclarativeVMEMetaObject VMEMO; + typedef QQmlVMEMetaObject VMEMO; VMEMO *vmemo = static_cast(const_cast(object->metaObject())); vmemo->setVMEProperty(core.coreIndex, result); } else if (!writeValueProperty(object, engine, core, value, context, flags)) { @@ -1520,13 +1520,13 @@ bool QDeclarativePropertyPrivate::writeBinding(QObject *object, return true; } -bool QDeclarativePropertyPrivate::writeBinding(const QDeclarativeProperty &that, - QDeclarativeContextData *context, - QDeclarativeJavaScriptExpression *expression, +bool QQmlPropertyPrivate::writeBinding(const QQmlProperty &that, + QQmlContextData *context, + QQmlJavaScriptExpression *expression, v8::Handle result, bool isUndefined, WriteFlags flags) { - QDeclarativePropertyPrivate *pp = that.d; + QQmlPropertyPrivate *pp = that.d; if (!pp) return true; @@ -1538,12 +1538,12 @@ bool QDeclarativePropertyPrivate::writeBinding(const QDeclarativeProperty &that, return writeBinding(object, pp->core, context, expression, result, isUndefined, flags); } -const QMetaObject *QDeclarativePropertyPrivate::rawMetaObjectForType(QDeclarativeEnginePrivate *engine, int userType) +const QMetaObject *QQmlPropertyPrivate::rawMetaObjectForType(QQmlEnginePrivate *engine, int userType) { if (engine) { return engine->rawMetaObjectForType(userType); } else { - QDeclarativeType *type = QDeclarativeMetaType::qmlType(userType); + QQmlType *type = QQmlMetaType::qmlType(userType); return type?type->baseMetaObject():0; } } @@ -1553,9 +1553,9 @@ const QMetaObject *QDeclarativePropertyPrivate::rawMetaObjectForType(QDeclarativ Returns false if the property can't be set because the \a value is the wrong type, for example. */ -bool QDeclarativeProperty::write(const QVariant &value) const +bool QQmlProperty::write(const QVariant &value) const { - return QDeclarativePropertyPrivate::write(*this, value, 0); + return QQmlPropertyPrivate::write(*this, value, 0); } /*! @@ -1563,32 +1563,32 @@ bool QDeclarativeProperty::write(const QVariant &value) const is equivalent to: \code - QDeclarativeProperty p(object, name); + QQmlProperty p(object, name); p.write(value); \endcode */ -bool QDeclarativeProperty::write(QObject *object, const QString &name, const QVariant &value) +bool QQmlProperty::write(QObject *object, const QString &name, const QVariant &value) { - QDeclarativeProperty p(object, name); + QQmlProperty p(object, name); return p.write(value); } /*! Writes \a value to the \a name property of \a object using the - \l{QDeclarativeContext} {context} \a ctxt. This method is + \l{QQmlContext} {context} \a ctxt. This method is equivalent to: \code - QDeclarativeProperty p(object, name, ctxt); + QQmlProperty p(object, name, ctxt); p.write(value); \endcode */ -bool QDeclarativeProperty::write(QObject *object, +bool QQmlProperty::write(QObject *object, const QString &name, const QVariant &value, - QDeclarativeContext *ctxt) + QQmlContext *ctxt) { - QDeclarativeProperty p(object, name, ctxt); + QQmlProperty p(object, name, ctxt); return p.write(value); } @@ -1599,14 +1599,14 @@ bool QDeclarativeProperty::write(QObject *object, \a engine. This method is equivalent to: \code - QDeclarativeProperty p(object, name, engine); + QQmlProperty p(object, name, engine); p.write(value); \endcode */ -bool QDeclarativeProperty::write(QObject *object, const QString &name, const QVariant &value, - QDeclarativeEngine *engine) +bool QQmlProperty::write(QObject *object, const QString &name, const QVariant &value, + QQmlEngine *engine) { - QDeclarativeProperty p(object, name, engine); + QQmlProperty p(object, name, engine); return p.write(value); } @@ -1615,7 +1615,7 @@ bool QDeclarativeProperty::write(QObject *object, const QString &name, const QVa resettable. If the property is not resettable, nothing happens and false is returned. */ -bool QDeclarativeProperty::reset() const +bool QQmlProperty::reset() const { if (isResettable()) { void *args[] = { 0 }; @@ -1626,12 +1626,12 @@ bool QDeclarativeProperty::reset() const } } -bool QDeclarativePropertyPrivate::write(const QDeclarativeProperty &that, +bool QQmlPropertyPrivate::write(const QQmlProperty &that, const QVariant &value, WriteFlags flags) { if (!that.d) return false; - if (that.d->object && that.type() & QDeclarativeProperty::Property && + if (that.d->object && that.type() & QQmlProperty::Property && that.d->core.isValid() && that.isWritable()) return that.d->writeValueProperty(value, flags); else @@ -1641,7 +1641,7 @@ bool QDeclarativePropertyPrivate::write(const QDeclarativeProperty &that, /*! Returns true if the property has a change notifier signal, otherwise false. */ -bool QDeclarativeProperty::hasNotifySignal() const +bool QQmlProperty::hasNotifySignal() const { if (type() & Property && d->object) { return d->object->metaObject()->property(d->core.coreIndex).hasNotifySignal(); @@ -1656,7 +1656,7 @@ bool QDeclarativeProperty::hasNotifySignal() const Some properties, such as attached properties or those whose value never changes, do not require a change notifier. */ -bool QDeclarativeProperty::needsNotifySignal() const +bool QQmlProperty::needsNotifySignal() const { return type() & Property && !property().isConstant(); } @@ -1669,14 +1669,14 @@ bool QDeclarativeProperty::needsNotifySignal() const change notifier signal, or if the \a dest object does not have the specified \a method. */ -bool QDeclarativeProperty::connectNotifySignal(QObject *dest, int method) const +bool QQmlProperty::connectNotifySignal(QObject *dest, int method) const { if (!(type() & Property) || !d->object) return false; QMetaProperty prop = d->object->metaObject()->property(d->core.coreIndex); if (prop.hasNotifySignal()) { - return QDeclarativePropertyPrivate::connect(d->object, prop.notifySignalIndex(), dest, method, Qt::DirectConnection); + return QQmlPropertyPrivate::connect(d->object, prop.notifySignalIndex(), dest, method, Qt::DirectConnection); } else { return false; } @@ -1690,7 +1690,7 @@ bool QDeclarativeProperty::connectNotifySignal(QObject *dest, int method) const change notifier signal, or if the \a dest object does not have the specified \a slot. */ -bool QDeclarativeProperty::connectNotifySignal(QObject *dest, const char *slot) const +bool QQmlProperty::connectNotifySignal(QObject *dest, const char *slot) const { if (!(type() & Property) || !d->object) return false; @@ -1707,12 +1707,12 @@ bool QDeclarativeProperty::connectNotifySignal(QObject *dest, const char *slot) /*! Return the Qt metaobject index of the property. */ -int QDeclarativeProperty::index() const +int QQmlProperty::index() const { return d ? d->core.coreIndex : -1; } -int QDeclarativePropertyPrivate::valueTypeCoreIndex(const QDeclarativeProperty &that) +int QQmlPropertyPrivate::valueTypeCoreIndex(const QQmlProperty &that) { return that.d ? that.d->core.getValueTypeCoreIndex() : -1; } @@ -1721,14 +1721,14 @@ int QDeclarativePropertyPrivate::valueTypeCoreIndex(const QDeclarativeProperty & Returns the "property index" for use in bindings. The top 8 bits are the value type offset, and 0 otherwise. The bottom 24-bits are the regular property index. */ -int QDeclarativePropertyPrivate::bindingIndex(const QDeclarativeProperty &that) +int QQmlPropertyPrivate::bindingIndex(const QQmlProperty &that) { if (!that.d) return -1; return bindingIndex(that.d->core); } -int QDeclarativePropertyPrivate::bindingIndex(const QDeclarativePropertyData &that) +int QQmlPropertyPrivate::bindingIndex(const QQmlPropertyData &that) { int rv = that.coreIndex; if (rv != -1 && that.isValueTypeVirtual()) @@ -1736,30 +1736,30 @@ int QDeclarativePropertyPrivate::bindingIndex(const QDeclarativePropertyData &th return rv; } -QDeclarativePropertyData -QDeclarativePropertyPrivate::saveValueType(const QMetaObject *metaObject, int index, +QQmlPropertyData +QQmlPropertyPrivate::saveValueType(const QMetaObject *metaObject, int index, const QMetaObject *subObject, int subIndex, - QDeclarativeEngine *) + QQmlEngine *) { QMetaProperty subProp = subObject->property(subIndex); - QDeclarativePropertyData core; + QQmlPropertyData core; core.load(metaObject->property(index)); - core.setFlags(core.getFlags() | QDeclarativePropertyData::IsValueTypeVirtual); - core.valueTypeFlags = QDeclarativePropertyData::flagsForProperty(subProp); + core.setFlags(core.getFlags() | QQmlPropertyData::IsValueTypeVirtual); + core.valueTypeFlags = QQmlPropertyData::flagsForProperty(subProp); core.valueTypeCoreIndex = subIndex; core.valueTypePropType = subProp.userType(); return core; } -QDeclarativeProperty -QDeclarativePropertyPrivate::restore(QObject *object, const QDeclarativePropertyData &data, - QDeclarativeContextData *ctxt) +QQmlProperty +QQmlPropertyPrivate::restore(QObject *object, const QQmlPropertyData &data, + QQmlContextData *ctxt) { - QDeclarativeProperty prop; + QQmlProperty prop; - prop.d = new QDeclarativePropertyPrivate; + prop.d = new QQmlPropertyPrivate; prop.d->object = object; prop.d->context = ctxt; prop.d->engine = ctxt?ctxt->engine:0; @@ -1772,7 +1772,7 @@ QDeclarativePropertyPrivate::restore(QObject *object, const QDeclarativeProperty /*! Returns true if lhs and rhs refer to the same metaobject data */ -bool QDeclarativePropertyPrivate::equal(const QMetaObject *lhs, const QMetaObject *rhs) +bool QQmlPropertyPrivate::equal(const QMetaObject *lhs, const QMetaObject *rhs) { return lhs == rhs || (1 && lhs && rhs && lhs->d.stringdata == rhs->d.stringdata); } @@ -1780,7 +1780,7 @@ bool QDeclarativePropertyPrivate::equal(const QMetaObject *lhs, const QMetaObjec /*! Returns true if from inherits to. */ -bool QDeclarativePropertyPrivate::canConvert(const QMetaObject *from, const QMetaObject *to) +bool QQmlPropertyPrivate::canConvert(const QMetaObject *from, const QMetaObject *to) { if (from && to == &QObject::staticMetaObject) return true; @@ -1797,7 +1797,7 @@ bool QDeclarativePropertyPrivate::canConvert(const QMetaObject *from, const QMet /*! Return the signal corresponding to \a name */ -QMetaMethod QDeclarativePropertyPrivate::findSignalByName(const QMetaObject *mo, const QByteArray &name) +QMetaMethod QQmlPropertyPrivate::findSignalByName(const QMetaObject *mo, const QByteArray &name) { Q_ASSERT(mo); int methods = mo->methodCount(); @@ -1856,9 +1856,9 @@ static inline int QMetaObject_properties(const QMetaObject *metaObject) static inline void flush_vme_signal(const QObject *object, int index) { - QDeclarativeData *data = static_cast(QObjectPrivate::get(const_cast(object))->declarativeData); + QQmlData *data = static_cast(QObjectPrivate::get(const_cast(object))->declarativeData); if (data && data->propertyCache) { - QDeclarativePropertyData *property = data->propertyCache->method(index); + QQmlPropertyData *property = data->propertyCache->method(index); if (property && property->isVMESignal()) { const QMetaObject *metaObject = object->metaObject(); @@ -1869,8 +1869,8 @@ static inline void flush_vme_signal(const QObject *object, int index) methodOffset -= QMetaObject_methods(metaObject); } - QDeclarativeVMEMetaObject *vme = - static_cast(const_cast(metaObject)); + QQmlVMEMetaObject *vme = + static_cast(const_cast(metaObject)); vme->connectAliasSignal(index); } @@ -1884,7 +1884,7 @@ it connects any lazy "proxy" signal connections set up by QML. It is possible that this logic should be moved to QMetaObject::connect(). */ -bool QDeclarativePropertyPrivate::connect(const QObject *sender, int signal_index, +bool QQmlPropertyPrivate::connect(const QObject *sender, int signal_index, const QObject *receiver, int method_index, int type, int *types) { @@ -1894,7 +1894,7 @@ bool QDeclarativePropertyPrivate::connect(const QObject *sender, int signal_inde return QMetaObject::connect(sender, signal_index, receiver, method_index, type, types); } -void QDeclarativePropertyPrivate::flushSignal(const QObject *sender, int signal_index) +void QQmlPropertyPrivate::flushSignal(const QObject *sender, int signal_index) { flush_vme_signal(sender, signal_index); } @@ -1902,7 +1902,7 @@ void QDeclarativePropertyPrivate::flushSignal(const QObject *sender, int signal_ /*! Return \a metaObject's [super] meta object that provides data for \a property. */ -const QMetaObject *QDeclarativePropertyPrivate::metaObjectForProperty(const QMetaObject *metaObject, int property) +const QMetaObject *QQmlPropertyPrivate::metaObjectForProperty(const QMetaObject *metaObject, int property) { int propertyOffset = metaObject->propertyOffset(); diff --git a/src/declarative/qml/qdeclarativeproperty.h b/src/qml/qml/qqmlproperty.h similarity index 70% rename from src/declarative/qml/qdeclarativeproperty.h rename to src/qml/qml/qqmlproperty.h index 5012d0065d..2c4b2544c1 100644 --- a/src/declarative/qml/qdeclarativeproperty.h +++ b/src/qml/qml/qqmlproperty.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPROPERTY_H -#define QDECLARATIVEPROPERTY_H +#ifndef QQMLPROPERTY_H +#define QQMLPROPERTY_H +#include #include QT_BEGIN_HEADER @@ -51,11 +52,11 @@ QT_BEGIN_NAMESPACE class QObject; class QVariant; -class QDeclarativeContext; -class QDeclarativeEngine; +class QQmlContext; +class QQmlEngine; -class QDeclarativePropertyPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeProperty +class QQmlPropertyPrivate; +class Q_QML_EXPORT QQmlProperty { public: enum PropertyTypeCategory { @@ -71,21 +72,21 @@ class Q_DECLARATIVE_EXPORT QDeclarativeProperty SignalProperty }; - QDeclarativeProperty(); - ~QDeclarativeProperty(); + QQmlProperty(); + ~QQmlProperty(); - QDeclarativeProperty(QObject *); - QDeclarativeProperty(QObject *, QDeclarativeContext *); - QDeclarativeProperty(QObject *, QDeclarativeEngine *); + QQmlProperty(QObject *); + QQmlProperty(QObject *, QQmlContext *); + QQmlProperty(QObject *, QQmlEngine *); - QDeclarativeProperty(QObject *, const QString &); - QDeclarativeProperty(QObject *, const QString &, QDeclarativeContext *); - QDeclarativeProperty(QObject *, const QString &, QDeclarativeEngine *); + QQmlProperty(QObject *, const QString &); + QQmlProperty(QObject *, const QString &, QQmlContext *); + QQmlProperty(QObject *, const QString &, QQmlEngine *); - QDeclarativeProperty(const QDeclarativeProperty &); - QDeclarativeProperty &operator=(const QDeclarativeProperty &); + QQmlProperty(const QQmlProperty &); + QQmlProperty &operator=(const QQmlProperty &); - bool operator==(const QDeclarativeProperty &) const; + bool operator==(const QQmlProperty &) const; Type type() const; bool isValid() const; @@ -100,13 +101,13 @@ class Q_DECLARATIVE_EXPORT QDeclarativeProperty QVariant read() const; static QVariant read(QObject *, const QString &); - static QVariant read(QObject *, const QString &, QDeclarativeContext *); - static QVariant read(QObject *, const QString &, QDeclarativeEngine *); + static QVariant read(QObject *, const QString &, QQmlContext *); + static QVariant read(QObject *, const QString &, QQmlEngine *); bool write(const QVariant &) const; static bool write(QObject *, const QString &, const QVariant &); - static bool write(QObject *, const QString &, const QVariant &, QDeclarativeContext *); - static bool write(QObject *, const QString &, const QVariant &, QDeclarativeEngine *); + static bool write(QObject *, const QString &, const QVariant &, QQmlContext *); + static bool write(QObject *, const QString &, const QVariant &, QQmlEngine *); bool reset() const; @@ -125,12 +126,12 @@ class Q_DECLARATIVE_EXPORT QDeclarativeProperty QMetaMethod method() const; private: - friend class QDeclarativePropertyPrivate; - QDeclarativePropertyPrivate *d; + friend class QQmlPropertyPrivate; + QQmlPropertyPrivate *d; }; -typedef QList QDeclarativeProperties; +typedef QList QQmlProperties; -inline uint qHash (const QDeclarativeProperty &key) +inline uint qHash (const QQmlProperty &key) { return qHash(key.object()) + qHash(key.name()); } @@ -139,4 +140,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEPROPERTY_H +#endif // QQMLPROPERTY_H diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/qml/qml/qqmlproperty_p.h similarity index 54% rename from src/declarative/qml/qdeclarativeproperty_p.h rename to src/qml/qml/qqmlproperty_p.h index fc106cc463..0f97a63155 100644 --- a/src/declarative/qml/qdeclarativeproperty_p.h +++ b/src/qml/qml/qqmlproperty_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPROPERTY_P_H -#define QDECLARATIVEPROPERTY_P_H +#ifndef QQMLPROPERTY_P_H +#define QQMLPROPERTY_P_H // // W A R N I N G @@ -53,20 +53,20 @@ // We mean it. // -#include "qdeclarativeproperty.h" +#include "qqmlproperty.h" #include -#include -#include -#include +#include +#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeContext; -class QDeclarativeExpression; -class QDeclarativeEnginePrivate; -class QDeclarativeJavaScriptExpression; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyPrivate : public QDeclarativeRefCount +class QQmlContext; +class QQmlExpression; +class QQmlEnginePrivate; +class QQmlJavaScriptExpression; +class Q_QML_PRIVATE_EXPORT QQmlPropertyPrivate : public QQmlRefCount { public: enum WriteFlag { @@ -76,86 +76,86 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyPrivate : public QDeclara }; Q_DECLARE_FLAGS(WriteFlags, WriteFlag) - QDeclarativeContextData *context; - QDeclarativeEngine *engine; - QDeclarativeGuard object; + QQmlContextData *context; + QQmlEngine *engine; + QQmlGuard object; - QDeclarativePropertyData core; + QQmlPropertyData core; bool isNameCached:1; QString nameCache; - QDeclarativePropertyPrivate(); + QQmlPropertyPrivate(); - inline QDeclarativeContextData *effectiveContext() const; + inline QQmlContextData *effectiveContext() const; void initProperty(QObject *obj, const QString &name); void initDefault(QObject *obj); bool isValueType() const; int propertyType() const; - QDeclarativeProperty::Type type() const; - QDeclarativeProperty::PropertyTypeCategory propertyTypeCategory() const; + QQmlProperty::Type type() const; + QQmlProperty::PropertyTypeCategory propertyTypeCategory() const; QVariant readValueProperty(); bool writeValueProperty(const QVariant &, WriteFlags); - static const QMetaObject *rawMetaObjectForType(QDeclarativeEnginePrivate *, int); + static const QMetaObject *rawMetaObjectForType(QQmlEnginePrivate *, int); static bool writeEnumProperty(const QMetaProperty &prop, int idx, QObject *object, const QVariant &value, int flags); - static bool writeValueProperty(QObject *, QDeclarativeEngine *, - const QDeclarativePropertyData &, - const QVariant &, QDeclarativeContextData *, + static bool writeValueProperty(QObject *, QQmlEngine *, + const QQmlPropertyData &, + const QVariant &, QQmlContextData *, WriteFlags flags = 0); - static bool write(QObject *, const QDeclarativePropertyData &, const QVariant &, - QDeclarativeContextData *, WriteFlags flags = 0); + static bool write(QObject *, const QQmlPropertyData &, const QVariant &, + QQmlContextData *, WriteFlags flags = 0); static void findAliasTarget(QObject *, int, QObject **, int *); - static QDeclarativeAbstractBinding *setBinding(QObject *, int coreIndex, + static QQmlAbstractBinding *setBinding(QObject *, int coreIndex, int valueTypeIndex /* -1 */, - QDeclarativeAbstractBinding *, + QQmlAbstractBinding *, WriteFlags flags = DontRemoveBinding); - static QDeclarativeAbstractBinding *setBindingNoEnable(QObject *, int coreIndex, + static QQmlAbstractBinding *setBindingNoEnable(QObject *, int coreIndex, int valueTypeIndex /* -1 */, - QDeclarativeAbstractBinding *); - static QDeclarativeAbstractBinding *binding(QObject *, int coreIndex, + QQmlAbstractBinding *); + static QQmlAbstractBinding *binding(QObject *, int coreIndex, int valueTypeIndex /* -1 */); - static QDeclarativePropertyData saveValueType(const QMetaObject *, int, + static QQmlPropertyData saveValueType(const QMetaObject *, int, const QMetaObject *, int, - QDeclarativeEngine *); - static QDeclarativeProperty restore(QObject *, - const QDeclarativePropertyData &, - QDeclarativeContextData *); + QQmlEngine *); + static QQmlProperty restore(QObject *, + const QQmlPropertyData &, + QQmlContextData *); static bool equal(const QMetaObject *, const QMetaObject *); static bool canConvert(const QMetaObject *from, const QMetaObject *to); - static inline QDeclarativePropertyPrivate *get(const QDeclarativeProperty &p) { + static inline QQmlPropertyPrivate *get(const QQmlProperty &p) { return p.d; } // "Public" (to QML) methods - static QDeclarativeAbstractBinding *binding(const QDeclarativeProperty &that); - static QDeclarativeAbstractBinding *setBinding(const QDeclarativeProperty &that, - QDeclarativeAbstractBinding *, + static QQmlAbstractBinding *binding(const QQmlProperty &that); + static QQmlAbstractBinding *setBinding(const QQmlProperty &that, + QQmlAbstractBinding *, WriteFlags flags = DontRemoveBinding); - static QDeclarativeExpression *signalExpression(const QDeclarativeProperty &that); - static QDeclarativeExpression *setSignalExpression(const QDeclarativeProperty &that, - QDeclarativeExpression *) ; - static bool write(const QDeclarativeProperty &that, const QVariant &, WriteFlags); - static bool writeBinding(const QDeclarativeProperty &that, - QDeclarativeContextData *context, - QDeclarativeJavaScriptExpression *expression, + static QQmlExpression *signalExpression(const QQmlProperty &that); + static QQmlExpression *setSignalExpression(const QQmlProperty &that, + QQmlExpression *) ; + static bool write(const QQmlProperty &that, const QVariant &, WriteFlags); + static bool writeBinding(const QQmlProperty &that, + QQmlContextData *context, + QQmlJavaScriptExpression *expression, v8::Handle result, bool isUndefined, WriteFlags flags); - static bool writeBinding(QObject *, const QDeclarativePropertyData &, - QDeclarativeContextData *context, - QDeclarativeJavaScriptExpression *expression, + static bool writeBinding(QObject *, const QQmlPropertyData &, + QQmlContextData *context, + QQmlJavaScriptExpression *expression, v8::Handle result, bool isUndefined, WriteFlags flags); - static int valueTypeCoreIndex(const QDeclarativeProperty &that); - static int bindingIndex(const QDeclarativeProperty &that); - static int bindingIndex(const QDeclarativePropertyData &that); + static int valueTypeCoreIndex(const QQmlProperty &that); + static int bindingIndex(const QQmlProperty &that); + static int bindingIndex(const QQmlPropertyData &that); static QMetaMethod findSignalByName(const QMetaObject *mo, const QByteArray &); static bool connect(const QObject *sender, int signal_index, const QObject *receiver, int method_index, @@ -164,8 +164,8 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyPrivate : public QDeclara static void flushSignal(const QObject *sender, int signal_index); }; -Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativePropertyPrivate::WriteFlags) +Q_DECLARE_OPERATORS_FOR_FLAGS(QQmlPropertyPrivate::WriteFlags) QT_END_NAMESPACE -#endif // QDECLARATIVEPROPERTY_P_H +#endif // QQMLPROPERTY_P_H diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp similarity index 68% rename from src/declarative/qml/qdeclarativepropertycache.cpp rename to src/qml/qml/qqmlpropertycache.cpp index c8bfd98363..9b132a4647 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,79 +39,79 @@ ** ****************************************************************************/ -#include "qdeclarativepropertycache_p.h" +#include "qqmlpropertycache_p.h" -#include "qdeclarativeengine_p.h" -#include "qdeclarativebinding_p.h" +#include "qqmlengine_p.h" +#include "qqmlbinding_p.h" #include #include -#include +#include #include Q_DECLARE_METATYPE(QJSValue) -Q_DECLARE_METATYPE(QDeclarativeV8Handle); +Q_DECLARE_METATYPE(QQmlV8Handle); QT_BEGIN_NAMESPACE #define Q_INT16_MAX 32767 -class QDeclarativePropertyCacheMethodArguments +class QQmlPropertyCacheMethodArguments { public: - QDeclarativePropertyCacheMethodArguments *next; + QQmlPropertyCacheMethodArguments *next; int arguments[0]; }; // Flags that do *NOT* depend on the property's QMetaProperty::userType() and thus are quick // to load -static QDeclarativePropertyData::Flags fastFlagsForProperty(const QMetaProperty &p) +static QQmlPropertyData::Flags fastFlagsForProperty(const QMetaProperty &p) { - QDeclarativePropertyData::Flags flags; + QQmlPropertyData::Flags flags; if (p.isConstant()) - flags |= QDeclarativePropertyData::IsConstant; + flags |= QQmlPropertyData::IsConstant; if (p.isWritable()) - flags |= QDeclarativePropertyData::IsWritable; + flags |= QQmlPropertyData::IsWritable; if (p.isResettable()) - flags |= QDeclarativePropertyData::IsResettable; + flags |= QQmlPropertyData::IsResettable; if (p.isFinal()) - flags |= QDeclarativePropertyData::IsFinal; + flags |= QQmlPropertyData::IsFinal; if (p.isEnumType()) - flags |= QDeclarativePropertyData::IsEnumType; + flags |= QQmlPropertyData::IsEnumType; return flags; } // Flags that do depend on the property's QMetaProperty::userType() and thus are slow to // load -static QDeclarativePropertyData::Flags flagsForPropertyType(int propType, QDeclarativeEngine *engine) +static QQmlPropertyData::Flags flagsForPropertyType(int propType, QQmlEngine *engine) { Q_ASSERT(propType != -1); - QDeclarativePropertyData::Flags flags; + QQmlPropertyData::Flags flags; if (propType == QMetaType::QObjectStar || propType == QMetaType::QWidgetStar) { - flags |= QDeclarativePropertyData::IsQObjectDerived; + flags |= QQmlPropertyData::IsQObjectDerived; } else if (propType == QMetaType::QVariant) { - flags |= QDeclarativePropertyData::IsQVariant; + flags |= QQmlPropertyData::IsQVariant; } else if (propType < (int)QVariant::UserType) { - } else if (propType == qMetaTypeId()) { - flags |= QDeclarativePropertyData::IsQmlBinding; + } else if (propType == qMetaTypeId()) { + flags |= QQmlPropertyData::IsQmlBinding; } else if (propType == qMetaTypeId()) { - flags |= QDeclarativePropertyData::IsQJSValue; - } else if (propType == qMetaTypeId()) { - flags |= QDeclarativePropertyData::IsV8Handle; + flags |= QQmlPropertyData::IsQJSValue; + } else if (propType == qMetaTypeId()) { + flags |= QQmlPropertyData::IsV8Handle; } else { - QDeclarativeMetaType::TypeCategory cat = - engine ? QDeclarativeEnginePrivate::get(engine)->typeCategory(propType) - : QDeclarativeMetaType::typeCategory(propType); - - if (cat == QDeclarativeMetaType::Object) - flags |= QDeclarativePropertyData::IsQObjectDerived; - else if (cat == QDeclarativeMetaType::List) - flags |= QDeclarativePropertyData::IsQList; + QQmlMetaType::TypeCategory cat = + engine ? QQmlEnginePrivate::get(engine)->typeCategory(propType) + : QQmlMetaType::typeCategory(propType); + + if (cat == QQmlMetaType::Object) + flags |= QQmlPropertyData::IsQObjectDerived; + else if (cat == QQmlMetaType::List) + flags |= QQmlPropertyData::IsQList; } return flags; @@ -125,13 +125,13 @@ static int metaObjectSignalCount(const QMetaObject *metaObject) return signalCount; } -QDeclarativePropertyData::Flags -QDeclarativePropertyData::flagsForProperty(const QMetaProperty &p, QDeclarativeEngine *engine) +QQmlPropertyData::Flags +QQmlPropertyData::flagsForProperty(const QMetaProperty &p, QQmlEngine *engine) { return fastFlagsForProperty(p) | flagsForPropertyType(p.userType(), engine); } -void QDeclarativePropertyData::lazyLoad(const QMetaProperty &p, QDeclarativeEngine *engine) +void QQmlPropertyData::lazyLoad(const QMetaProperty &p, QQmlEngine *engine) { Q_UNUSED(engine); @@ -145,19 +145,19 @@ void QDeclarativePropertyData::lazyLoad(const QMetaProperty &p, QDeclarativeEngi int type = p.type(); if (type == QMetaType::QObjectStar || type == QMetaType::QWidgetStar) { propType = type; - flags |= QDeclarativePropertyData::IsQObjectDerived; + flags |= QQmlPropertyData::IsQObjectDerived; } else if (type == QMetaType::QVariant) { propType = type; - flags |= QDeclarativePropertyData::IsQVariant; + flags |= QQmlPropertyData::IsQVariant; } else if (type == QVariant::UserType || type == -1) { propTypeName = p.typeName(); - flags |= QDeclarativePropertyData::NotFullyResolved; + flags |= QQmlPropertyData::NotFullyResolved; } else { propType = type; } } -void QDeclarativePropertyData::load(const QMetaProperty &p, QDeclarativeEngine *engine) +void QQmlPropertyData::load(const QMetaProperty &p, QQmlEngine *engine) { propType = p.userType(); coreIndex = p.propertyIndex(); @@ -167,7 +167,7 @@ void QDeclarativePropertyData::load(const QMetaProperty &p, QDeclarativeEngine * revision = p.revision(); } -void QDeclarativePropertyData::load(const QMetaMethod &m) +void QQmlPropertyData::load(const QMetaMethod &m) { coreIndex = m.methodIndex(); arguments = 0; @@ -186,7 +186,7 @@ void QDeclarativePropertyData::load(const QMetaMethod &m) ++signature; if (*signature != ')') { flags |= HasArguments; - if (0 == ::strcmp(signature, "QDeclarativeV8Function*)")) { + if (0 == ::strcmp(signature, "QQmlV8Function*)")) { flags |= IsV8Function; } } @@ -195,7 +195,7 @@ void QDeclarativePropertyData::load(const QMetaMethod &m) revision = m.revision(); } -void QDeclarativePropertyData::lazyLoad(const QMetaMethod &m) +void QQmlPropertyData::lazyLoad(const QMetaMethod &m) { coreIndex = m.methodIndex(); arguments = 0; @@ -216,7 +216,7 @@ void QDeclarativePropertyData::lazyLoad(const QMetaMethod &m) ++signature; if (*signature != ')') { flags |= HasArguments; - if (0 == ::strcmp(signature, "QDeclarativeV8Function*)")) { + if (0 == ::strcmp(signature, "QQmlV8Function*)")) { flags |= IsV8Function; } } @@ -226,9 +226,9 @@ void QDeclarativePropertyData::lazyLoad(const QMetaMethod &m) } /*! -Creates a new empty QDeclarativePropertyCache. +Creates a new empty QQmlPropertyCache. */ -QDeclarativePropertyCache::QDeclarativePropertyCache(QDeclarativeEngine *e) +QQmlPropertyCache::QQmlPropertyCache(QQmlEngine *e) : engine(e), parent(0), propertyIndexCacheStart(0), methodIndexCacheStart(0), signalHanderIndexCacheStart(0), metaObject(0), argumentsCache(0) { @@ -236,9 +236,9 @@ QDeclarativePropertyCache::QDeclarativePropertyCache(QDeclarativeEngine *e) } /*! -Creates a new QDeclarativePropertyCache of \a metaObject. +Creates a new QQmlPropertyCache of \a metaObject. */ -QDeclarativePropertyCache::QDeclarativePropertyCache(QDeclarativeEngine *e, const QMetaObject *metaObject) +QQmlPropertyCache::QQmlPropertyCache(QQmlEngine *e, const QMetaObject *metaObject) : engine(e), parent(0), propertyIndexCacheStart(0), methodIndexCacheStart(0), signalHanderIndexCacheStart(0), metaObject(0), argumentsCache(0) { @@ -248,13 +248,13 @@ QDeclarativePropertyCache::QDeclarativePropertyCache(QDeclarativeEngine *e, cons update(engine, metaObject); } -QDeclarativePropertyCache::~QDeclarativePropertyCache() +QQmlPropertyCache::~QQmlPropertyCache() { clear(); - QDeclarativePropertyCacheMethodArguments *args = argumentsCache; + QQmlPropertyCacheMethodArguments *args = argumentsCache; while (args) { - QDeclarativePropertyCacheMethodArguments *next = args->next; + QQmlPropertyCacheMethodArguments *next = args->next; free(args); args = next; } @@ -267,26 +267,26 @@ QDeclarativePropertyCache::~QDeclarativePropertyCache() engine = 0; } -void QDeclarativePropertyCache::destroy() +void QQmlPropertyCache::destroy() { Q_ASSERT(engine || constructor.IsEmpty()); if (constructor.IsEmpty()) delete this; else - QDeclarativeEnginePrivate::deleteInEngineThread(engine, this); + QQmlEnginePrivate::deleteInEngineThread(engine, this); } -// This is inherited from QDeclarativeCleanup, so it should only clear the things -// that are tied to the specific QDeclarativeEngine. -void QDeclarativePropertyCache::clear() +// This is inherited from QQmlCleanup, so it should only clear the things +// that are tied to the specific QQmlEngine. +void QQmlPropertyCache::clear() { qPersistentDispose(constructor); engine = 0; } -QDeclarativePropertyCache *QDeclarativePropertyCache::copy(int reserve) +QQmlPropertyCache *QQmlPropertyCache::copy(int reserve) { - QDeclarativePropertyCache *cache = new QDeclarativePropertyCache(engine); + QQmlPropertyCache *cache = new QQmlPropertyCache(engine); cache->parent = this; cache->parent->addref(); cache->propertyIndexCacheStart = propertyIndexCache.count() + propertyIndexCacheStart; @@ -301,33 +301,33 @@ QDeclarativePropertyCache *QDeclarativePropertyCache::copy(int reserve) return cache; } -QDeclarativePropertyCache *QDeclarativePropertyCache::copy() +QQmlPropertyCache *QQmlPropertyCache::copy() { return copy(0); } -QDeclarativePropertyCache * -QDeclarativePropertyCache::copyAndAppend(QDeclarativeEngine *engine, const QMetaObject *metaObject, - QDeclarativePropertyData::Flag propertyFlags, - QDeclarativePropertyData::Flag methodFlags, - QDeclarativePropertyData::Flag signalFlags) +QQmlPropertyCache * +QQmlPropertyCache::copyAndAppend(QQmlEngine *engine, const QMetaObject *metaObject, + QQmlPropertyData::Flag propertyFlags, + QQmlPropertyData::Flag methodFlags, + QQmlPropertyData::Flag signalFlags) { return copyAndAppend(engine, metaObject, -1, propertyFlags, methodFlags, signalFlags); } -QDeclarativePropertyCache * -QDeclarativePropertyCache::copyAndAppend(QDeclarativeEngine *engine, const QMetaObject *metaObject, +QQmlPropertyCache * +QQmlPropertyCache::copyAndAppend(QQmlEngine *engine, const QMetaObject *metaObject, int revision, - QDeclarativePropertyData::Flag propertyFlags, - QDeclarativePropertyData::Flag methodFlags, - QDeclarativePropertyData::Flag signalFlags) + QQmlPropertyData::Flag propertyFlags, + QQmlPropertyData::Flag methodFlags, + QQmlPropertyData::Flag signalFlags) { Q_ASSERT(QMetaObjectPrivate::get(metaObject)->revision >= 4); // Reserve enough space in the name hash for all the methods (including signals), all the // signal handlers and all the properties. This assumes no name clashes, but this is the // common case. - QDeclarativePropertyCache *rv = copy(QMetaObjectPrivate::get(metaObject)->methodCount + + QQmlPropertyCache *rv = copy(QMetaObjectPrivate::get(metaObject)->methodCount + QMetaObjectPrivate::get(metaObject)->signalCount + QMetaObjectPrivate::get(metaObject)->propertyCount); @@ -336,19 +336,19 @@ QDeclarativePropertyCache::copyAndAppend(QDeclarativeEngine *engine, const QMeta return rv; } -void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaObject *metaObject, - QDeclarativePropertyData::Flag propertyFlags, - QDeclarativePropertyData::Flag methodFlags, - QDeclarativePropertyData::Flag signalFlags) +void QQmlPropertyCache::append(QQmlEngine *engine, const QMetaObject *metaObject, + QQmlPropertyData::Flag propertyFlags, + QQmlPropertyData::Flag methodFlags, + QQmlPropertyData::Flag signalFlags) { append(engine, metaObject, -1, propertyFlags, methodFlags, signalFlags); } -void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaObject *metaObject, +void QQmlPropertyCache::append(QQmlEngine *engine, const QMetaObject *metaObject, int revision, - QDeclarativePropertyData::Flag propertyFlags, - QDeclarativePropertyData::Flag methodFlags, - QDeclarativePropertyData::Flag signalFlags) + QQmlPropertyData::Flag propertyFlags, + QQmlPropertyData::Flag methodFlags, + QQmlPropertyData::Flag signalFlags) { Q_UNUSED(revision); Q_ASSERT(constructor.IsEmpty()); // We should not be appending to an in-use property cache @@ -364,11 +364,11 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb int signalCount = metaObjectSignalCount(metaObject); int classInfoCount = QMetaObjectPrivate::get(metaObject)->classInfoCount; - QDeclarativeAccessorProperties::Properties accessorProperties; + QQmlAccessorProperties::Properties accessorProperties; // Special case QObject as we don't want to add a qt_HasQmlAccessors classinfo to it if (metaObject == &QObject::staticMetaObject) { - accessorProperties = QDeclarativeAccessorProperties::properties(metaObject); + accessorProperties = QQmlAccessorProperties::properties(metaObject); } else if (classInfoCount) { int classInfoOffset = metaObject->classInfoOffset(); bool hasFastProperty = false; @@ -382,15 +382,15 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb } if (hasFastProperty) { - accessorProperties = QDeclarativeAccessorProperties::properties(metaObject); + accessorProperties = QQmlAccessorProperties::properties(metaObject); if (accessorProperties.count == 0) - qFatal("QDeclarativePropertyCache: %s has FastProperty class info, but has not " + qFatal("QQmlPropertyCache: %s has FastProperty class info, but has not " "installed property accessors", metaObject->className()); } else { #ifndef QT_NO_DEBUG - accessorProperties = QDeclarativeAccessorProperties::properties(metaObject); + accessorProperties = QQmlAccessorProperties::properties(metaObject); if (accessorProperties.count != 0) - qFatal("QDeclarativePropertyCache: %s has fast property accessors, but is missing " + qFatal("QQmlPropertyCache: %s has fast property accessors, but is missing " "FastProperty class info", metaObject->className()); #endif } @@ -421,8 +421,8 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb ++cptr; } - QDeclarativePropertyData *data = &methodIndexCache[ii - methodIndexCacheStart]; - QDeclarativePropertyData *sigdata = 0; + QQmlPropertyData *data = &methodIndexCache[ii - methodIndexCacheStart]; + QQmlPropertyData *sigdata = 0; data->lazyLoad(m); @@ -432,7 +432,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb data->flags |= methodFlags; if (!dynamicMetaObject) - data->flags |= QDeclarativePropertyData::IsDirect; + data->flags |= QQmlPropertyData::IsDirect; Q_ASSERT((allowedRevisionCache.count() - 1) < Q_INT16_MAX); data->metaObjectOffset = allowedRevisionCache.count() - 1; @@ -440,14 +440,14 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb if (data->isSignal()) { sigdata = &signalHandlerIndexCache[signalHandlerIndex - signalHanderIndexCacheStart]; *sigdata = *data; - sigdata->flags |= QDeclarativePropertyData::IsSignalHandler; + sigdata->flags |= QQmlPropertyData::IsSignalHandler; } - QDeclarativePropertyData *old = 0; + QQmlPropertyData *old = 0; if (utf8) { QHashedString methodName(QString::fromUtf8(signature, cptr - signature)); - if (QDeclarativePropertyData **it = stringCache.value(methodName)) + if (QQmlPropertyData **it = stringCache.value(methodName)) old = *it; stringCache.insert(methodName, data); @@ -458,7 +458,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb } } else { QHashedCStringRef methodName(signature, cptr - signature); - if (QDeclarativePropertyData **it = stringCache.value(methodName)) + if (QQmlPropertyData **it = stringCache.value(methodName)) old = *it; stringCache.insert(methodName, data); @@ -482,7 +482,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb if (old) { // We only overload methods in the same class, exactly like C++ if (old->isFunction() && old->coreIndex >= methodOffset) - data->flags |= QDeclarativePropertyData::IsOverload; + data->flags |= QQmlPropertyData::IsOverload; data->overrideIndexIsProperty = !old->isFunction(); data->overrideIndex = old->coreIndex; } @@ -507,38 +507,38 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb ++cptr; } - QDeclarativePropertyData *data = &propertyIndexCache[ii - propertyIndexCacheStart]; + QQmlPropertyData *data = &propertyIndexCache[ii - propertyIndexCacheStart]; data->lazyLoad(p, engine); data->flags |= propertyFlags; if (!dynamicMetaObject) - data->flags |= QDeclarativePropertyData::IsDirect; + data->flags |= QQmlPropertyData::IsDirect; Q_ASSERT((allowedRevisionCache.count() - 1) < Q_INT16_MAX); data->metaObjectOffset = allowedRevisionCache.count() - 1; - QDeclarativePropertyData *old = 0; + QQmlPropertyData *old = 0; if (utf8) { QHashedString propName(QString::fromUtf8(str, cptr - str)); - if (QDeclarativePropertyData **it = stringCache.value(propName)) + if (QQmlPropertyData **it = stringCache.value(propName)) old = *it; stringCache.insert(propName, data); } else { QHashedCStringRef propName(str, cptr - str); - if (QDeclarativePropertyData **it = stringCache.value(propName)) + if (QQmlPropertyData **it = stringCache.value(propName)) old = *it; stringCache.insert(propName, data); } - QDeclarativeAccessorProperties::Property *accessorProperty = accessorProperties.property(str); + QQmlAccessorProperties::Property *accessorProperty = accessorProperties.property(str); // Fast properties may not be overrides or revisioned Q_ASSERT(accessorProperty == 0 || (old == 0 && data->revision == 0)); if (accessorProperty) { - data->flags |= QDeclarativePropertyData::HasAccessors; + data->flags |= QQmlPropertyData::HasAccessors; data->accessors = accessorProperty->accessors; data->accessorData = accessorProperty->data; } else if (old) { @@ -548,7 +548,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb } } -void QDeclarativePropertyCache::resolve(QDeclarativePropertyData *data) const +void QQmlPropertyCache::resolve(QQmlPropertyData *data) const { Q_ASSERT(data->notFullyResolved()); @@ -557,10 +557,10 @@ void QDeclarativePropertyCache::resolve(QDeclarativePropertyData *data) const if (!data->isFunction()) data->flags |= flagsForPropertyType(data->propType, engine); - data->flags &= ~QDeclarativePropertyData::NotFullyResolved; + data->flags &= ~QQmlPropertyData::NotFullyResolved; } -void QDeclarativePropertyCache::updateRecur(QDeclarativeEngine *engine, const QMetaObject *metaObject) +void QQmlPropertyCache::updateRecur(QQmlEngine *engine, const QMetaObject *metaObject) { if (!metaObject) return; @@ -570,7 +570,7 @@ void QDeclarativePropertyCache::updateRecur(QDeclarativeEngine *engine, const QM append(engine, metaObject); } -void QDeclarativePropertyCache::update(QDeclarativeEngine *engine, const QMetaObject *metaObject) +void QQmlPropertyCache::update(QQmlEngine *engine, const QMetaObject *metaObject) { Q_ASSERT(engine); Q_ASSERT(metaObject); @@ -593,8 +593,8 @@ void QDeclarativePropertyCache::update(QDeclarativeEngine *engine, const QMetaOb updateRecur(engine,metaObject); } -QDeclarativePropertyData * -QDeclarativePropertyCache::property(int index) const +QQmlPropertyData * +QQmlPropertyCache::property(int index) const { if (index < 0 || index >= (propertyIndexCacheStart + propertyIndexCache.count())) return 0; @@ -602,13 +602,13 @@ QDeclarativePropertyCache::property(int index) const if (index < propertyIndexCacheStart) return parent->property(index); - QDeclarativePropertyData *rv = const_cast(&propertyIndexCache.at(index - propertyIndexCacheStart)); + QQmlPropertyData *rv = const_cast(&propertyIndexCache.at(index - propertyIndexCacheStart)); if (rv->notFullyResolved()) resolve(rv); return rv; } -QDeclarativePropertyData * -QDeclarativePropertyCache::method(int index) const +QQmlPropertyData * +QQmlPropertyCache::method(int index) const { if (index < 0 || index >= (methodIndexCacheStart + methodIndexCache.count())) return 0; @@ -616,36 +616,36 @@ QDeclarativePropertyCache::method(int index) const if (index < methodIndexCacheStart) return parent->method(index); - QDeclarativePropertyData *rv = const_cast(&methodIndexCache.at(index - methodIndexCacheStart)); + QQmlPropertyData *rv = const_cast(&methodIndexCache.at(index - methodIndexCacheStart)); if (rv->notFullyResolved()) resolve(rv); return rv; } -QDeclarativePropertyData * -QDeclarativePropertyCache::property(const QHashedStringRef &str) const +QQmlPropertyData * +QQmlPropertyCache::property(const QHashedStringRef &str) const { - QDeclarativePropertyData **rv = stringCache.value(str); + QQmlPropertyData **rv = stringCache.value(str); if (rv && (*rv)->notFullyResolved()) resolve(*rv); return rv?*rv:0; } -QDeclarativePropertyData * -QDeclarativePropertyCache::property(const QHashedCStringRef &str) const +QQmlPropertyData * +QQmlPropertyCache::property(const QHashedCStringRef &str) const { - QDeclarativePropertyData **rv = stringCache.value(str); + QQmlPropertyData **rv = stringCache.value(str); if (rv && (*rv)->notFullyResolved()) resolve(*rv); return rv?*rv:0; } -QDeclarativePropertyData * -QDeclarativePropertyCache::property(const QString &str) const +QQmlPropertyData * +QQmlPropertyCache::property(const QString &str) const { - QDeclarativePropertyData **rv = stringCache.value(str); + QQmlPropertyData **rv = stringCache.value(str); if (rv && (*rv)->notFullyResolved()) resolve(*rv); return rv?*rv:0; } -QString QDeclarativePropertyData::name(QObject *object) +QString QQmlPropertyData::name(QObject *object) { if (!object) return QString(); @@ -653,7 +653,7 @@ QString QDeclarativePropertyData::name(QObject *object) return name(object->metaObject()); } -QString QDeclarativePropertyData::name(const QMetaObject *metaObject) +QString QQmlPropertyData::name(const QMetaObject *metaObject) { if (!metaObject || coreIndex == -1) return QString(); @@ -672,7 +672,7 @@ QString QDeclarativePropertyData::name(const QMetaObject *metaObject) } } -QStringList QDeclarativePropertyCache::propertyNames() const +QStringList QQmlPropertyCache::propertyNames() const { QStringList keys; for (StringCache::ConstIterator iter = stringCache.begin(); iter != stringCache.end(); ++iter) @@ -701,24 +701,24 @@ static int EnumType(const QMetaObject *meta, const QByteArray &str) // Returns an array of the arguments for method \a index. The first entry in the array // is the number of arguments. -int *QDeclarativePropertyCache::methodParameterTypes(QObject *object, int index, +int *QQmlPropertyCache::methodParameterTypes(QObject *object, int index, QVarLengthArray &dummy, QByteArray *unknownTypeError) { Q_ASSERT(object && index >= 0); - QDeclarativeData *ddata = QDeclarativeData::get(object, false); + QQmlData *ddata = QQmlData::get(object, false); if (ddata && ddata->propertyCache) { - typedef QDeclarativePropertyCacheMethodArguments A; + typedef QQmlPropertyCacheMethodArguments A; - QDeclarativePropertyCache *c = ddata->propertyCache; + QQmlPropertyCache *c = ddata->propertyCache; Q_ASSERT(index < c->methodIndexCacheStart + c->methodIndexCache.count()); while (index < c->methodIndexCacheStart) c = c->parent; - QDeclarativePropertyData *rv = const_cast(&c->methodIndexCache.at(index - c->methodIndexCacheStart)); + QQmlPropertyData *rv = const_cast(&c->methodIndexCache.at(index - c->methodIndexCacheStart)); if (rv->arguments) return static_cast(rv->arguments)->arguments; @@ -768,12 +768,12 @@ int *QDeclarativePropertyCache::methodParameterTypes(QObject *object, int index, } } -QDeclarativePropertyData qDeclarativePropertyCacheCreate(const QMetaObject *metaObject, +QQmlPropertyData qQmlPropertyCacheCreate(const QMetaObject *metaObject, const QString &property) { Q_ASSERT(metaObject); - QDeclarativePropertyData rv; + QQmlPropertyData rv; { const QMetaObject *cmo = metaObject; const QByteArray propertyName = property.toUtf8(); @@ -817,46 +817,46 @@ QDeclarativePropertyData qDeclarativePropertyCacheCreate(const QMetaObject *meta return rv; } -inline const QString &qDeclarativePropertyCacheToString(const QString &string) +inline const QString &qQmlPropertyCacheToString(const QString &string) { return string; } -inline QString qDeclarativePropertyCacheToString(const QHashedV8String &string) +inline QString qQmlPropertyCacheToString(const QHashedV8String &string) { return QV8Engine::toStringStatic(string.string()); } template -QDeclarativePropertyData * -qDeclarativePropertyCacheProperty(QDeclarativeEngine *engine, QObject *obj, - const T &name, QDeclarativePropertyData &local) +QQmlPropertyData * +qQmlPropertyCacheProperty(QQmlEngine *engine, QObject *obj, + const T &name, QQmlPropertyData &local) { - QDeclarativePropertyCache *cache = 0; + QQmlPropertyCache *cache = 0; if (engine) { - QDeclarativeData *ddata = QDeclarativeData::get(obj); + QQmlData *ddata = QQmlData::get(obj); if (ddata && ddata->propertyCache) { cache = ddata->propertyCache; } else if (engine) { - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); cache = ep->cache(obj); if (cache) { - ddata = QDeclarativeData::get(obj, true); + ddata = QQmlData::get(obj, true); cache->addref(); ddata->propertyCache = cache; } } } - QDeclarativePropertyData *rv = 0; + QQmlPropertyData *rv = 0; if (cache) { rv = cache->property(name); } else { - local = qDeclarativePropertyCacheCreate(obj->metaObject(), - qDeclarativePropertyCacheToString(name)); + local = qQmlPropertyCacheCreate(obj->metaObject(), + qQmlPropertyCacheToString(name)); if (local.isValid()) rv = &local; } @@ -864,24 +864,24 @@ qDeclarativePropertyCacheProperty(QDeclarativeEngine *engine, QObject *obj, return rv; } -QDeclarativePropertyData * -QDeclarativePropertyCache::property(QDeclarativeEngine *engine, QObject *obj, - const QHashedV8String &name, QDeclarativePropertyData &local) +QQmlPropertyData * +QQmlPropertyCache::property(QQmlEngine *engine, QObject *obj, + const QHashedV8String &name, QQmlPropertyData &local) { - return qDeclarativePropertyCacheProperty(engine, obj, name, local); + return qQmlPropertyCacheProperty(engine, obj, name, local); } -QDeclarativePropertyData * -QDeclarativePropertyCache::property(QDeclarativeEngine *engine, QObject *obj, - const QString &name, QDeclarativePropertyData &local) +QQmlPropertyData * +QQmlPropertyCache::property(QQmlEngine *engine, QObject *obj, + const QString &name, QQmlPropertyData &local) { - return qDeclarativePropertyCacheProperty(engine, obj, name, local); + return qQmlPropertyCacheProperty(engine, obj, name, local); } static inline const QMetaObjectPrivate *priv(const uint* data) { return reinterpret_cast(data); } -bool QDeclarativePropertyCache::isDynamicMetaObject(const QMetaObject *mo) +bool QQmlPropertyCache::isDynamicMetaObject(const QMetaObject *mo) { return priv(mo->d.data)->revision >= 3 && priv(mo->d.data)->flags & DynamicMetaObject; } diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h similarity index 64% rename from src/declarative/qml/qdeclarativepropertycache_p.h rename to src/qml/qml/qqmlpropertycache_p.h index d5d7095667..095ee79867 100644 --- a/src/declarative/qml/qdeclarativepropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPROPERTYCACHE_P_H -#define QDECLARATIVEPROPERTYCACHE_P_H +#ifndef QQMLPROPERTYCACHE_P_H +#define QQMLPROPERTYCACHE_P_H // // W A R N I N G @@ -53,9 +53,9 @@ // We mean it. // -#include -#include "qdeclarativecleanup_p.h" -#include "qdeclarativenotifier_p.h" +#include +#include "qqmlcleanup_p.h" +#include "qqmlnotifier_p.h" #include #include @@ -66,15 +66,15 @@ QT_BEGIN_NAMESPACE class QV8Engine; class QMetaProperty; class QV8QObjectWrapper; -class QDeclarativeEngine; -class QDeclarativePropertyData; -class QDeclarativeAccessors; -class QDeclarativePropertyCacheMethodArguments; +class QQmlEngine; +class QQmlPropertyData; +class QQmlAccessors; +class QQmlPropertyCacheMethodArguments; // We have this somewhat awful split between RawData and Data so that RawData can be // used in unions. In normal code, you should always use Data which initializes RawData // to an invalid state on construction. -class QDeclarativePropertyRawData +class QQmlPropertyRawData { public: enum Flag { @@ -95,9 +95,9 @@ class QDeclarativePropertyRawData IsQObjectDerived = 0x00000100, // Property type is a QObject* derived type IsEnumType = 0x00000200, // Property type is an enum IsQList = 0x00000400, // Property type is a QML list - IsQmlBinding = 0x00000800, // Property type is a QDeclarativeBinding* + IsQmlBinding = 0x00000800, // Property type is a QQmlBinding* IsQJSValue = 0x00001000, // Property type is a QScriptValue - IsV8Handle = 0x00002000, // Property type is a QDeclarativeV8Handle + IsV8Handle = 0x00002000, // Property type is a QQmlV8Handle IsVMEProperty = 0x00004000, // Property type is a "var" property of VMEMO IsValueTypeVirtual = 0x00008000, // Property is a value type "virtual" property IsQVariant = 0x00010000, // Property is a QVariant @@ -107,11 +107,11 @@ class QDeclarativePropertyRawData HasArguments = 0x00040000, // Function takes arguments IsSignal = 0x00080000, // Function is a signal IsVMESignal = 0x00100000, // Signal was added by QML - IsV8Function = 0x00200000, // Function takes QDeclarativeV8Function* args + IsV8Function = 0x00200000, // Function takes QQmlV8Function* args IsSignalHandler = 0x00400000, // Function is a signal handler IsOverload = 0x00800000, // Function is an overload of another function - // Internal QDeclarativePropertyCache flags + // Internal QQmlPropertyCache flags NotFullyResolved = 0x01000000 // True if the type data is to be lazily resolved }; Q_DECLARE_FLAGS(Flags, Flag) @@ -189,84 +189,84 @@ class QDeclarativePropertyRawData }; }; struct { // When HasAccessors - QDeclarativeAccessors *accessors; + QQmlAccessors *accessors; intptr_t accessorData; }; }; private: - friend class QDeclarativePropertyData; - friend class QDeclarativePropertyCache; + friend class QQmlPropertyData; + friend class QQmlPropertyCache; quint32 flags; }; -Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativePropertyRawData::Flags); +Q_DECLARE_OPERATORS_FOR_FLAGS(QQmlPropertyRawData::Flags); -class QDeclarativePropertyData : public QDeclarativePropertyRawData +class QQmlPropertyData : public QQmlPropertyRawData { public: - inline QDeclarativePropertyData(); - inline QDeclarativePropertyData(const QDeclarativePropertyRawData &); + inline QQmlPropertyData(); + inline QQmlPropertyData(const QQmlPropertyRawData &); - inline bool operator==(const QDeclarativePropertyRawData &); + inline bool operator==(const QQmlPropertyRawData &); - static Flags flagsForProperty(const QMetaProperty &, QDeclarativeEngine *engine = 0); - void load(const QMetaProperty &, QDeclarativeEngine *engine = 0); + static Flags flagsForProperty(const QMetaProperty &, QQmlEngine *engine = 0); + void load(const QMetaProperty &, QQmlEngine *engine = 0); void load(const QMetaMethod &); QString name(QObject *); QString name(const QMetaObject *); private: - friend class QDeclarativePropertyCache; - void lazyLoad(const QMetaProperty &, QDeclarativeEngine *engine = 0); + friend class QQmlPropertyCache; + void lazyLoad(const QMetaProperty &, QQmlEngine *engine = 0); void lazyLoad(const QMetaMethod &); bool notFullyResolved() const { return flags & NotFullyResolved; } }; -class Q_DECLARATIVE_EXPORT QDeclarativePropertyCache : public QDeclarativeRefCount, public QDeclarativeCleanup +class Q_QML_EXPORT QQmlPropertyCache : public QQmlRefCount, public QQmlCleanup { public: - QDeclarativePropertyCache(QDeclarativeEngine *); - QDeclarativePropertyCache(QDeclarativeEngine *, const QMetaObject *); - virtual ~QDeclarativePropertyCache(); - - void update(QDeclarativeEngine *, const QMetaObject *); - - QDeclarativePropertyCache *copy(); - - QDeclarativePropertyCache *copyAndAppend(QDeclarativeEngine *, const QMetaObject *, - QDeclarativePropertyData::Flag propertyFlags = QDeclarativePropertyData::NoFlags, - QDeclarativePropertyData::Flag methodFlags = QDeclarativePropertyData::NoFlags, - QDeclarativePropertyData::Flag signalFlags = QDeclarativePropertyData::NoFlags); - QDeclarativePropertyCache *copyAndAppend(QDeclarativeEngine *, const QMetaObject *, int revision, - QDeclarativePropertyData::Flag propertyFlags = QDeclarativePropertyData::NoFlags, - QDeclarativePropertyData::Flag methodFlags = QDeclarativePropertyData::NoFlags, - QDeclarativePropertyData::Flag signalFlags = QDeclarativePropertyData::NoFlags); - - void append(QDeclarativeEngine *, const QMetaObject *, - QDeclarativePropertyData::Flag propertyFlags = QDeclarativePropertyData::NoFlags, - QDeclarativePropertyData::Flag methodFlags = QDeclarativePropertyData::NoFlags, - QDeclarativePropertyData::Flag signalFlags = QDeclarativePropertyData::NoFlags); - void append(QDeclarativeEngine *, const QMetaObject *, int revision, - QDeclarativePropertyData::Flag propertyFlags = QDeclarativePropertyData::NoFlags, - QDeclarativePropertyData::Flag methodFlags = QDeclarativePropertyData::NoFlags, - QDeclarativePropertyData::Flag signalFlags = QDeclarativePropertyData::NoFlags); - - inline QDeclarativePropertyData *property(const QHashedV8String &) const; - QDeclarativePropertyData *property(const QHashedStringRef &) const; - QDeclarativePropertyData *property(const QHashedCStringRef &) const; - QDeclarativePropertyData *property(const QString &) const; - QDeclarativePropertyData *property(int) const; - QDeclarativePropertyData *method(int) const; + QQmlPropertyCache(QQmlEngine *); + QQmlPropertyCache(QQmlEngine *, const QMetaObject *); + virtual ~QQmlPropertyCache(); + + void update(QQmlEngine *, const QMetaObject *); + + QQmlPropertyCache *copy(); + + QQmlPropertyCache *copyAndAppend(QQmlEngine *, const QMetaObject *, + QQmlPropertyData::Flag propertyFlags = QQmlPropertyData::NoFlags, + QQmlPropertyData::Flag methodFlags = QQmlPropertyData::NoFlags, + QQmlPropertyData::Flag signalFlags = QQmlPropertyData::NoFlags); + QQmlPropertyCache *copyAndAppend(QQmlEngine *, const QMetaObject *, int revision, + QQmlPropertyData::Flag propertyFlags = QQmlPropertyData::NoFlags, + QQmlPropertyData::Flag methodFlags = QQmlPropertyData::NoFlags, + QQmlPropertyData::Flag signalFlags = QQmlPropertyData::NoFlags); + + void append(QQmlEngine *, const QMetaObject *, + QQmlPropertyData::Flag propertyFlags = QQmlPropertyData::NoFlags, + QQmlPropertyData::Flag methodFlags = QQmlPropertyData::NoFlags, + QQmlPropertyData::Flag signalFlags = QQmlPropertyData::NoFlags); + void append(QQmlEngine *, const QMetaObject *, int revision, + QQmlPropertyData::Flag propertyFlags = QQmlPropertyData::NoFlags, + QQmlPropertyData::Flag methodFlags = QQmlPropertyData::NoFlags, + QQmlPropertyData::Flag signalFlags = QQmlPropertyData::NoFlags); + + inline QQmlPropertyData *property(const QHashedV8String &) const; + QQmlPropertyData *property(const QHashedStringRef &) const; + QQmlPropertyData *property(const QHashedCStringRef &) const; + QQmlPropertyData *property(const QString &) const; + QQmlPropertyData *property(int) const; + QQmlPropertyData *method(int) const; QStringList propertyNames() const; - inline QDeclarativePropertyData *overrideData(QDeclarativePropertyData *) const; - inline bool isAllowedInRevision(QDeclarativePropertyData *) const; + inline QQmlPropertyData *overrideData(QQmlPropertyData *) const; + inline bool isAllowedInRevision(QQmlPropertyData *) const; - inline QDeclarativeEngine *qmlEngine() const; - static QDeclarativePropertyData *property(QDeclarativeEngine *, QObject *, const QString &, - QDeclarativePropertyData &); - static QDeclarativePropertyData *property(QDeclarativeEngine *, QObject *, const QHashedV8String &, - QDeclarativePropertyData &); + inline QQmlEngine *qmlEngine() const; + static QQmlPropertyData *property(QQmlEngine *, QObject *, const QString &, + QQmlPropertyData &); + static QQmlPropertyData *property(QQmlEngine *, QObject *, const QHashedV8String &, + QQmlPropertyData &); static int *methodParameterTypes(QObject *, int index, QVarLengthArray &dummy, QByteArray *unknownTypeError); @@ -276,24 +276,24 @@ class Q_DECLARATIVE_EXPORT QDeclarativePropertyCache : public QDeclarativeRefCou virtual void clear(); private: - friend class QDeclarativeEnginePrivate; + friend class QQmlEnginePrivate; friend class QV8QObjectWrapper; - inline QDeclarativePropertyCache *copy(int reserve); + inline QQmlPropertyCache *copy(int reserve); // Implemented in v8/qv8qobjectwrapper.cpp v8::Local newQObject(QObject *, QV8Engine *); - typedef QVector IndexCache; - typedef QStringHash StringCache; + typedef QVector IndexCache; + typedef QStringHash StringCache; typedef QVector AllowedRevisionCache; - void resolve(QDeclarativePropertyData *) const; - void updateRecur(QDeclarativeEngine *, const QMetaObject *); + void resolve(QQmlPropertyData *) const; + void updateRecur(QQmlEngine *, const QMetaObject *); - QDeclarativeEngine *engine; + QQmlEngine *engine; - QDeclarativePropertyCache *parent; + QQmlPropertyCache *parent; int propertyIndexCacheStart; int methodIndexCacheStart; int signalHanderIndexCacheStart; @@ -306,10 +306,10 @@ class Q_DECLARATIVE_EXPORT QDeclarativePropertyCache : public QDeclarativeRefCou v8::Persistent constructor; const QMetaObject *metaObject; - QDeclarativePropertyCacheMethodArguments *argumentsCache; + QQmlPropertyCacheMethodArguments *argumentsCache; }; -QDeclarativePropertyData::QDeclarativePropertyData() +QQmlPropertyData::QQmlPropertyData() { propType = 0; coreIndex = -1; @@ -321,12 +321,12 @@ QDeclarativePropertyData::QDeclarativePropertyData() flags = 0; } -QDeclarativePropertyData::QDeclarativePropertyData(const QDeclarativePropertyRawData &d) +QQmlPropertyData::QQmlPropertyData(const QQmlPropertyRawData &d) { - *(static_cast(this)) = d; + *(static_cast(this)) = d; } -bool QDeclarativePropertyData::operator==(const QDeclarativePropertyRawData &other) +bool QQmlPropertyData::operator==(const QQmlPropertyRawData &other) { return flags == other.flags && propType == other.propType && @@ -338,18 +338,18 @@ bool QDeclarativePropertyData::operator==(const QDeclarativePropertyRawData &oth valueTypePropType == other.valueTypePropType)); } -int QDeclarativePropertyRawData::getValueTypeCoreIndex() const +int QQmlPropertyRawData::getValueTypeCoreIndex() const { return isValueTypeVirtual()?valueTypeCoreIndex:-1; } -int QDeclarativePropertyRawData::encodedIndex() const +int QQmlPropertyRawData::encodedIndex() const { return isValueTypeVirtual()?(coreIndex | (valueTypeCoreIndex << 24)):coreIndex; } -QDeclarativePropertyData * -QDeclarativePropertyCache::overrideData(QDeclarativePropertyData *data) const +QQmlPropertyData * +QQmlPropertyCache::overrideData(QQmlPropertyData *data) const { if (!data->hasOverride()) return 0; @@ -360,24 +360,24 @@ QDeclarativePropertyCache::overrideData(QDeclarativePropertyData *data) const return method(data->overrideIndex); } -bool QDeclarativePropertyCache::isAllowedInRevision(QDeclarativePropertyData *data) const +bool QQmlPropertyCache::isAllowedInRevision(QQmlPropertyData *data) const { return (data->hasAccessors() || (data->metaObjectOffset == -1 && data->revision == 0)) || (allowedRevisionCache[data->metaObjectOffset] >= data->revision); } -QDeclarativeEngine *QDeclarativePropertyCache::qmlEngine() const +QQmlEngine *QQmlPropertyCache::qmlEngine() const { return engine; } -QDeclarativePropertyData *QDeclarativePropertyCache::property(const QHashedV8String &str) const +QQmlPropertyData *QQmlPropertyCache::property(const QHashedV8String &str) const { - QDeclarativePropertyData **rv = stringCache.value(str); + QQmlPropertyData **rv = stringCache.value(str); if (rv && (*rv)->notFullyResolved()) resolve(*rv); return rv?*rv:0; } QT_END_NAMESPACE -#endif // QDECLARATIVEPROPERTYCACHE_P_H +#endif // QQMLPROPERTYCACHE_P_H diff --git a/src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp b/src/qml/qml/qqmlpropertyvalueinterceptor.cpp similarity index 75% rename from src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp rename to src/qml/qml/qqmlpropertyvalueinterceptor.cpp index 4abe5a4e1f..331b90da5c 100644 --- a/src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp +++ b/src/qml/qml/qqmlpropertyvalueinterceptor.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#include "qdeclarativepropertyvalueinterceptor_p.h" +#include "qqmlpropertyvalueinterceptor_p.h" -#include "qdeclarative.h" +#include "qqml.h" QT_BEGIN_NAMESPACE /*! - \class QDeclarativePropertyValueInterceptor - \brief The QDeclarativePropertyValueInterceptor class is inherited by property interceptors such as Behavior. + \class QQmlPropertyValueInterceptor + \brief The QQmlPropertyValueInterceptor class is inherited by property interceptors such as Behavior. \internal This class intercepts property writes, allowing for custom handling. For example, Behavior uses this @@ -55,24 +55,24 @@ QT_BEGIN_NAMESPACE */ /*! - Constructs a QDeclarativePropertyValueInterceptor. + Constructs a QQmlPropertyValueInterceptor. */ -QDeclarativePropertyValueInterceptor::QDeclarativePropertyValueInterceptor() +QQmlPropertyValueInterceptor::QQmlPropertyValueInterceptor() { } -QDeclarativePropertyValueInterceptor::~QDeclarativePropertyValueInterceptor() +QQmlPropertyValueInterceptor::~QQmlPropertyValueInterceptor() { } /*! - \fn void QDeclarativePropertyValueInterceptor::setTarget(const QDeclarativeProperty &property) + \fn void QQmlPropertyValueInterceptor::setTarget(const QQmlProperty &property) Set the target \a property for the value interceptor. This method will be called by the QML engine when assigning a value interceptor. */ /*! - \fn void QDeclarativePropertyValueInterceptor::write(const QVariant &value) + \fn void QQmlPropertyValueInterceptor::write(const QVariant &value) This method will be called when a new \a value is assigned to the property being intercepted. */ diff --git a/src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h b/src/qml/qml/qqmlpropertyvalueinterceptor_p.h similarity index 77% rename from src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h rename to src/qml/qml/qqmlpropertyvalueinterceptor_p.h index ed5e54f646..f8b8643a00 100644 --- a/src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h +++ b/src/qml/qml/qqmlpropertyvalueinterceptor_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPROPERTYVALUEINTERCEPTOR_P_H -#define QDECLARATIVEPROPERTYVALUEINTERCEPTOR_P_H +#ifndef QQMLPROPERTYVALUEINTERCEPTOR_P_H +#define QQMLPROPERTYVALUEINTERCEPTOR_P_H // // W A R N I N G @@ -53,21 +53,22 @@ // We mean it. // +#include #include QT_BEGIN_NAMESPACE -class QDeclarativeProperty; -class Q_DECLARATIVE_EXPORT QDeclarativePropertyValueInterceptor +class QQmlProperty; +class Q_QML_EXPORT QQmlPropertyValueInterceptor { public: - QDeclarativePropertyValueInterceptor(); - virtual ~QDeclarativePropertyValueInterceptor(); - virtual void setTarget(const QDeclarativeProperty &property) = 0; + QQmlPropertyValueInterceptor(); + virtual ~QQmlPropertyValueInterceptor(); + virtual void setTarget(const QQmlProperty &property) = 0; virtual void write(const QVariant &value) = 0; }; -Q_DECLARE_INTERFACE(QDeclarativePropertyValueInterceptor, "com.trolltech.qml.QDeclarativePropertyValueInterceptor") +Q_DECLARE_INTERFACE(QQmlPropertyValueInterceptor, "com.trolltech.qml.QQmlPropertyValueInterceptor") QT_END_NAMESPACE -#endif // QDECLARATIVEPROPERTYVALUEINTERCEPTOR_P_H +#endif // QQMLPROPERTYVALUEINTERCEPTOR_P_H diff --git a/src/declarative/qml/qdeclarativepropertyvaluesource.cpp b/src/qml/qml/qqmlpropertyvaluesource.cpp similarity index 76% rename from src/declarative/qml/qdeclarativepropertyvaluesource.cpp rename to src/qml/qml/qqmlpropertyvaluesource.cpp index 2f91bc388c..bd1ca05b81 100644 --- a/src/declarative/qml/qdeclarativepropertyvaluesource.cpp +++ b/src/qml/qml/qqmlpropertyvaluesource.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,36 +39,36 @@ ** ****************************************************************************/ -#include "qdeclarativepropertyvaluesource.h" +#include "qqmlpropertyvaluesource.h" -#include "qdeclarative.h" +#include "qqml.h" QT_BEGIN_NAMESPACE /*! - \class QDeclarativePropertyValueSource - \brief The QDeclarativePropertyValueSource class is an interface for property value sources such as animations and bindings. + \class QQmlPropertyValueSource + \brief The QQmlPropertyValueSource 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. */ /*! - Constructs a QDeclarativePropertyValueSource. + Constructs a QQmlPropertyValueSource. */ -QDeclarativePropertyValueSource::QDeclarativePropertyValueSource() +QQmlPropertyValueSource::QQmlPropertyValueSource() { } /*! Destroys the value source. */ -QDeclarativePropertyValueSource::~QDeclarativePropertyValueSource() +QQmlPropertyValueSource::~QQmlPropertyValueSource() { } /*! - \fn void QDeclarativePropertyValueSource::setTarget(const QDeclarativeProperty &property) + \fn void QQmlPropertyValueSource::setTarget(const QQmlProperty &property) Set the target \a property for the value source. This method will be called by the QML engine when assigning a value source. */ diff --git a/src/qml/qml/qqmlpropertyvaluesource.h b/src/qml/qml/qqmlpropertyvaluesource.h new file mode 100644 index 0000000000..910b23877e --- /dev/null +++ b/src/qml/qml/qqmlpropertyvaluesource.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QQMLPROPERTYVALUESOURCE_H +#define QQMLPROPERTYVALUESOURCE_H + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + + +class QQmlProperty; +class Q_QML_EXPORT QQmlPropertyValueSource +{ +public: + QQmlPropertyValueSource(); + virtual ~QQmlPropertyValueSource(); + virtual void setTarget(const QQmlProperty &) = 0; +}; +Q_DECLARE_INTERFACE(QQmlPropertyValueSource, "com.trolltech.qml.QQmlPropertyValueSource") + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QQMLPROPERTYVALUESOURCE_H diff --git a/src/declarative/qml/qdeclarativeproxymetaobject.cpp b/src/qml/qml/qqmlproxymetaobject.cpp similarity index 89% rename from src/declarative/qml/qdeclarativeproxymetaobject.cpp rename to src/qml/qml/qqmlproxymetaobject.cpp index 6c48640da1..55bf67739d 100644 --- a/src/declarative/qml/qdeclarativeproxymetaobject.cpp +++ b/src/qml/qml/qqmlproxymetaobject.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,12 +39,12 @@ ** ****************************************************************************/ -#include "qdeclarativeproxymetaobject_p.h" -#include "qdeclarativeproperty_p.h" +#include "qqmlproxymetaobject_p.h" +#include "qqmlproperty_p.h" QT_BEGIN_NAMESPACE -QDeclarativeProxyMetaObject::QDeclarativeProxyMetaObject(QObject *obj, QList *mList) +QQmlProxyMetaObject::QQmlProxyMetaObject(QObject *obj, QList *mList) : metaObjects(mList), proxies(0), parent(0), object(obj) { *static_cast(this) = *metaObjects->first().metaObject; @@ -56,7 +56,7 @@ QDeclarativeProxyMetaObject::QDeclarativeProxyMetaObject(QObject *obj, QListmetaObject = this; } -QDeclarativeProxyMetaObject::~QDeclarativeProxyMetaObject() +QQmlProxyMetaObject::~QQmlProxyMetaObject() { if (parent) delete parent; @@ -67,7 +67,7 @@ QDeclarativeProxyMetaObject::~QDeclarativeProxyMetaObject() proxies = 0; } -int QDeclarativeProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a) +int QQmlProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a) { if ((c == QMetaObject::ReadProperty || c == QMetaObject::WriteProperty) && @@ -96,7 +96,7 @@ int QDeclarativeProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a) QMetaMethod method = metaObject->method(jj + methodOffset); if (method.methodType() == QMetaMethod::Signal) - QDeclarativePropertyPrivate::connect(proxy, methodOffset + jj, object, localOffset + jj); + QQmlPropertyPrivate::connect(proxy, methodOffset + jj, object, localOffset + jj); } } diff --git a/src/declarative/qml/qdeclarativeproxymetaobject_p.h b/src/qml/qml/qqmlproxymetaobject_p.h similarity index 86% rename from src/declarative/qml/qdeclarativeproxymetaobject_p.h rename to src/qml/qml/qqmlproxymetaobject_p.h index 04c6f93dc3..ec9df42f7f 100644 --- a/src/declarative/qml/qdeclarativeproxymetaobject_p.h +++ b/src/qml/qml/qqmlproxymetaobject_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPROXYMETAOBJECT_P_H -#define QDECLARATIVEPROXYMETAOBJECT_P_H +#ifndef QQMLPROXYMETAOBJECT_P_H +#define QQMLPROXYMETAOBJECT_P_H // // W A R N I N G @@ -54,7 +54,7 @@ // #include -#include "qdeclarative.h" +#include "qqml.h" #include #include @@ -66,7 +66,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeProxyMetaObject : public QAbstractDynamicMetaObject +class QQmlProxyMetaObject : public QAbstractDynamicMetaObject { public: struct ProxyData { @@ -77,8 +77,8 @@ class QDeclarativeProxyMetaObject : public QAbstractDynamicMetaObject int methodOffset; }; - QDeclarativeProxyMetaObject(QObject *, QList *); - virtual ~QDeclarativeProxyMetaObject(); + QQmlProxyMetaObject(QObject *, QList *); + virtual ~QQmlProxyMetaObject(); protected: virtual int metaCall(QMetaObject::Call _c, int _id, void **_a); @@ -95,5 +95,5 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEPROXYMETAOBJECT_P_H +#endif // QQMLPROXYMETAOBJECT_P_H diff --git a/src/declarative/qml/qdeclarativerewrite.cpp b/src/qml/qml/qqmlrewrite.cpp similarity index 94% rename from src/declarative/qml/qdeclarativerewrite.cpp rename to src/qml/qml/qqmlrewrite.cpp index 77da943704..828f7bf641 100644 --- a/src/declarative/qml/qdeclarativerewrite.cpp +++ b/src/qml/qml/qqmlrewrite.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include "qdeclarativerewrite_p.h" +#include "qqmlrewrite_p.h" -#include "qdeclarativeglobal_p.h" +#include #include @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(rewriteDump, QML_REWRITE_DUMP); -namespace QDeclarativeRewrite { +namespace QQmlRewrite { bool SharedBindingTester::isSharable(const QString &code) { @@ -91,7 +91,7 @@ QString RewriteBinding::operator()(const QString &code, bool *ok, bool *sharable return rewrite(code, 0, parser.statement()); } -QString RewriteBinding::operator()(QDeclarativeJS::AST::Node *node, const QString &code, bool *sharable) +QString RewriteBinding::operator()(QQmlJS::AST::Node *node, const QString &code, bool *sharable) { if (!node) return code; @@ -101,8 +101,8 @@ QString RewriteBinding::operator()(QDeclarativeJS::AST::Node *node, const QStrin *sharable = tester.isSharable(node); } - QDeclarativeJS::AST::ExpressionNode *expression = node->expressionCast(); - QDeclarativeJS::AST::Statement *statement = node->statementCast(); + QQmlJS::AST::ExpressionNode *expression = node->expressionCast(); + QQmlJS::AST::Statement *statement = node->statementCast(); if(!expression && !statement) return code; @@ -404,7 +404,7 @@ void RewriteSignalHandler::rewriteMultilineStrings(QString &code) code.replace(replaceR[ii], 1, QLatin1String("\\r")); } -QString RewriteSignalHandler::operator()(QDeclarativeJS::AST::Node *node, const QString &code, const QString &name) +QString RewriteSignalHandler::operator()(QQmlJS::AST::Node *node, const QString &code, const QString &name) { if (rewriteDump()) { qWarning() << "============================================================="; @@ -412,8 +412,8 @@ QString RewriteSignalHandler::operator()(QDeclarativeJS::AST::Node *node, const qWarning() << qPrintable(code); } - QDeclarativeJS::AST::ExpressionNode *expression = node->expressionCast(); - QDeclarativeJS::AST::Statement *statement = node->statementCast(); + QQmlJS::AST::ExpressionNode *expression = node->expressionCast(); + QQmlJS::AST::Statement *statement = node->statementCast(); if (!expression && !statement) return code; @@ -436,6 +436,6 @@ QString RewriteSignalHandler::operator()(QDeclarativeJS::AST::Node *node, const return rewritten; } -} // namespace QDeclarativeRewrite +} // namespace QQmlRewrite QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativerewrite_p.h b/src/qml/qml/qqmlrewrite_p.h similarity index 87% rename from src/declarative/qml/qdeclarativerewrite_p.h rename to src/qml/qml/qqmlrewrite_p.h index 74c408cd21..e915d797df 100644 --- a/src/declarative/qml/qdeclarativerewrite_p.h +++ b/src/qml/qml/qqmlrewrite_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEREWRITE_P_H -#define QDECLARATIVEREWRITE_P_H +#ifndef QQMLREWRITE_P_H +#define QQMLREWRITE_P_H // // W A R N I N G @@ -54,14 +54,14 @@ // #include -#include -#include -#include +#include +#include +#include QT_BEGIN_NAMESPACE -namespace QDeclarativeRewrite { -using namespace QDeclarativeJS; +namespace QQmlRewrite { +using namespace QQmlJS; class SharedBindingTester : protected AST::Visitor { @@ -84,7 +84,7 @@ class RewriteBinding: protected AST::Visitor public: QString operator()(const QString &code, bool *ok = 0, bool *sharable = 0); - QString operator()(QDeclarativeJS::AST::Node *node, const QString &code, bool *sharable = 0); + QString operator()(QQmlJS::AST::Node *node, const QString &code, bool *sharable = 0); //name of the function: used for the debugger void setName(const QString &name) { _name = name; } @@ -131,7 +131,7 @@ class RewriteSignalHandler: protected AST::Visitor int _position; public: - QString operator()(QDeclarativeJS::AST::Node *node, const QString &code, const QString &name); + QString operator()(QQmlJS::AST::Node *node, const QString &code, const QString &name); protected: void rewriteMultilineStrings(QString &code); @@ -141,9 +141,9 @@ class RewriteSignalHandler: protected AST::Visitor virtual bool visit(AST::StringLiteral *ast); }; -} // namespace QDeclarativeRewrite +} // namespace QQmlRewrite QT_END_NAMESPACE -#endif // QDECLARATIVEREWRITE_P_H +#endif // QQMLREWRITE_P_H diff --git a/src/declarative/qml/qdeclarativescript.cpp b/src/qml/qml/qqmlscript.cpp similarity index 77% rename from src/declarative/qml/qdeclarativescript.cpp rename to src/qml/qml/qqmlscript.cpp index 7a2247fac0..d1c2faa138 100644 --- a/src/declarative/qml/qdeclarativescript.cpp +++ b/src/qml/qml/qqmlscript.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#include "qdeclarativescript_p.h" +#include "qqmlscript_p.h" -#include "parser/qdeclarativejsengine_p.h" -#include "parser/qdeclarativejsparser_p.h" -#include "parser/qdeclarativejslexer_p.h" -#include "parser/qdeclarativejsmemorypool_p.h" -#include "parser/qdeclarativejsastvisitor_p.h" -#include "parser/qdeclarativejsast_p.h" -#include +#include "parser/qqmljsengine_p.h" +#include "parser/qqmljsparser_p.h" +#include "parser/qqmljslexer_p.h" +#include "parser/qqmljsmemorypool_p.h" +#include "parser/qqmljsastvisitor_p.h" +#include "parser/qqmljsast_p.h" +#include #include #include @@ -55,19 +55,19 @@ QT_BEGIN_NAMESPACE -using namespace QDeclarativeJS; -using namespace QDeclarativeScript; +using namespace QQmlJS; +using namespace QQmlScript; // // Parser IR classes // -QDeclarativeScript::Object::Object() +QQmlScript::Object::Object() : type(-1), idIndex(-1), metatype(0), synthCache(0), defaultProperty(0), parserStatusCast(-1), componentCompileState(0), nextAliasingObject(0), nextIdObject(0) { } -QDeclarativeScript::Object::~Object() +QQmlScript::Object::~Object() { if (synthCache) synthCache->release(); } @@ -89,7 +89,7 @@ const QMetaObject *Object::metaObject() const return metatype; } -QDeclarativeScript::Property *Object::getDefaultProperty() +QQmlScript::Property *Object::getDefaultProperty() { if (!defaultProperty) { defaultProperty = pool()->New(); @@ -98,38 +98,38 @@ QDeclarativeScript::Property *Object::getDefaultProperty() return defaultProperty; } -void QDeclarativeScript::Object::addValueProperty(Property *p) +void QQmlScript::Object::addValueProperty(Property *p) { valueProperties.append(p); } -void QDeclarativeScript::Object::addSignalProperty(Property *p) +void QQmlScript::Object::addSignalProperty(Property *p) { signalProperties.append(p); } -void QDeclarativeScript::Object::addAttachedProperty(Property *p) +void QQmlScript::Object::addAttachedProperty(Property *p) { attachedProperties.append(p); } -void QDeclarativeScript::Object::addGroupedProperty(Property *p) +void QQmlScript::Object::addGroupedProperty(Property *p) { groupedProperties.append(p); } -void QDeclarativeScript::Object::addValueTypeProperty(Property *p) +void QQmlScript::Object::addValueTypeProperty(Property *p) { valueTypeProperties.append(p); } -void QDeclarativeScript::Object::addScriptStringProperty(Property *p) +void QQmlScript::Object::addScriptStringProperty(Property *p) { scriptStringProperties.append(p); } // This lookup is optimized for missing, and having to create a new property. -Property *QDeclarativeScript::Object::getProperty(const QHashedStringRef &name, bool create) +Property *QQmlScript::Object::getProperty(const QHashedStringRef &name, bool create) { if (create) { quint32 h = name.hash(); @@ -156,12 +156,12 @@ Property *QDeclarativeScript::Object::getProperty(const QHashedStringRef &name, return 0; } -Property *QDeclarativeScript::Object::getProperty(const QStringRef &name, bool create) +Property *QQmlScript::Object::getProperty(const QStringRef &name, bool create) { return getProperty(QHashedStringRef(name), create); } -Property *QDeclarativeScript::Object::getProperty(const QString &name, bool create) +Property *QQmlScript::Object::getProperty(const QString &name, bool create) { for (Property *p = properties.first(); p; p = properties.next(p)) { if (p->name() == name) @@ -181,19 +181,19 @@ Property *QDeclarativeScript::Object::getProperty(const QString &name, bool crea } } -QDeclarativeScript::Object::DynamicProperty::DynamicProperty() +QQmlScript::Object::DynamicProperty::DynamicProperty() : isDefaultProperty(false), isReadOnly(false), type(Variant), defaultValue(0), nextProperty(0), resolvedCustomTypeName(0) { } -QDeclarativeScript::Object::DynamicSignal::DynamicSignal() +QQmlScript::Object::DynamicSignal::DynamicSignal() : nextSignal(0) { } // Returns length in utf8 bytes -int QDeclarativeScript::Object::DynamicSignal::parameterTypesLength() const +int QQmlScript::Object::DynamicSignal::parameterTypesLength() const { int rv = 0; for (int ii = 0; ii < parameterTypes.count(); ++ii) @@ -202,7 +202,7 @@ int QDeclarativeScript::Object::DynamicSignal::parameterTypesLength() const } // Returns length in utf8 bytes -int QDeclarativeScript::Object::DynamicSignal::parameterNamesLength() const +int QQmlScript::Object::DynamicSignal::parameterNamesLength() const { int rv = 0; for (int ii = 0; ii < parameterNames.count(); ++ii) @@ -210,12 +210,12 @@ int QDeclarativeScript::Object::DynamicSignal::parameterNamesLength() const return rv; } -QDeclarativeScript::Object::DynamicSlot::DynamicSlot() +QQmlScript::Object::DynamicSlot::DynamicSlot() : nextSlot(0) { } -int QDeclarativeScript::Object::DynamicSlot::parameterNamesLength() const +int QQmlScript::Object::DynamicSlot::parameterNamesLength() const { int rv = 0; for (int ii = 0; ii < parameterNames.count(); ++ii) @@ -223,70 +223,70 @@ int QDeclarativeScript::Object::DynamicSlot::parameterNamesLength() const return rv; } -QDeclarativeScript::Property::Property() +QQmlScript::Property::Property() : parent(0), type(0), index(-1), value(0), isDefault(true), isDeferred(false), isValueTypeSubProperty(false), isAlias(false), isReadOnlyDeclaration(false), scriptStringScope(-1), nextMainProperty(0), nextProperty(0) { } -QDeclarativeScript::Object *QDeclarativeScript::Property::getValue(const LocationSpan &l) +QQmlScript::Object *QQmlScript::Property::getValue(const LocationSpan &l) { if (!value) { value = pool()->New(); value->location = l; } return value; } -void QDeclarativeScript::Property::addValue(Value *v) +void QQmlScript::Property::addValue(Value *v) { values.append(v); } -void QDeclarativeScript::Property::addOnValue(Value *v) +void QQmlScript::Property::addOnValue(Value *v) { onValues.append(v); } -bool QDeclarativeScript::Property::isEmpty() const +bool QQmlScript::Property::isEmpty() const { return !value && values.isEmpty() && onValues.isEmpty(); } -QDeclarativeScript::Value::Value() +QQmlScript::Value::Value() : type(Unknown), object(0), bindingReference(0), nextValue(0) { } -QDeclarativeScript::Variant::Variant() +QQmlScript::Variant::Variant() : t(Invalid) { } -QDeclarativeScript::Variant::Variant(const Variant &o) +QQmlScript::Variant::Variant(const Variant &o) : t(o.t), d(o.d), asWritten(o.asWritten) { } -QDeclarativeScript::Variant::Variant(bool v) +QQmlScript::Variant::Variant(bool v) : t(Boolean), b(v) { } -QDeclarativeScript::Variant::Variant(double v, const QStringRef &asWritten) +QQmlScript::Variant::Variant(double v, const QStringRef &asWritten) : t(Number), d(v), asWritten(asWritten) { } -QDeclarativeScript::Variant::Variant(QDeclarativeJS::AST::StringLiteral *v) +QQmlScript::Variant::Variant(QQmlJS::AST::StringLiteral *v) : t(String), l(v) { } -QDeclarativeScript::Variant::Variant(const QStringRef &asWritten, QDeclarativeJS::AST::Node *n) +QQmlScript::Variant::Variant(const QStringRef &asWritten, QQmlJS::AST::Node *n) : t(Script), n(n), asWritten(asWritten) { } -QDeclarativeScript::Variant &QDeclarativeScript::Variant::operator=(const Variant &o) +QQmlScript::Variant &QQmlScript::Variant::operator=(const Variant &o) { t = o.t; d = o.d; @@ -294,17 +294,17 @@ QDeclarativeScript::Variant &QDeclarativeScript::Variant::operator=(const Varian return *this; } -QDeclarativeScript::Variant::Type QDeclarativeScript::Variant::type() const +QQmlScript::Variant::Type QQmlScript::Variant::type() const { return t; } -bool QDeclarativeScript::Variant::asBoolean() const +bool QQmlScript::Variant::asBoolean() const { return b; } -QString QDeclarativeScript::Variant::asString() const +QString QQmlScript::Variant::asString() const { if (t == String) { return l->value.toString(); @@ -313,7 +313,7 @@ QString QDeclarativeScript::Variant::asString() const } } -double QDeclarativeScript::Variant::asNumber() const +double QQmlScript::Variant::asNumber() const { return d; } @@ -361,7 +361,7 @@ QString escapedString(const QString &string) return tmp; } -QString QDeclarativeScript::Variant::asScript() const +QString QQmlScript::Variant::asScript() const { switch(type()) { default: @@ -384,7 +384,7 @@ QString QDeclarativeScript::Variant::asScript() const } } -QDeclarativeJS::AST::Node *QDeclarativeScript::Variant::asAST() const +QQmlJS::AST::Node *QQmlScript::Variant::asAST() const { if (type() == Script) return n; @@ -392,7 +392,7 @@ QDeclarativeJS::AST::Node *QDeclarativeScript::Variant::asAST() const return 0; } -bool QDeclarativeScript::Variant::isStringList() const +bool QQmlScript::Variant::isStringList() const { if (isString()) return true; @@ -417,7 +417,7 @@ bool QDeclarativeScript::Variant::isStringList() const return true; } -QStringList QDeclarativeScript::Variant::asStringList() const +QStringList QQmlScript::Variant::asStringList() const { QStringList rv; if (isString()) { @@ -446,7 +446,7 @@ QStringList QDeclarativeScript::Variant::asStringList() const // // Actual parser classes // -void QDeclarativeScript::Import::extractVersion(int *maj, int *min) const +void QQmlScript::Import::extractVersion(int *maj, int *min) const { *maj = -1; *min = -1; @@ -468,16 +468,16 @@ class ProcessAST: protected AST::Visitor { struct State { State() : object(0), property(0) {} - State(QDeclarativeScript::Object *o) : object(o), property(0) {} - State(QDeclarativeScript::Object *o, Property *p) : object(o), property(p) {} + State(QQmlScript::Object *o) : object(o), property(0) {} + State(QQmlScript::Object *o, Property *p) : object(o), property(p) {} - QDeclarativeScript::Object *object; + QQmlScript::Object *object; Property *property; }; struct StateStack : public QStack { - void pushObject(QDeclarativeScript::Object *obj) + void pushObject(QQmlScript::Object *obj) { push(State(obj)); } @@ -516,21 +516,21 @@ class ProcessAST: protected AST::Visitor }; public: - ProcessAST(QDeclarativeScript::Parser *parser); + ProcessAST(QQmlScript::Parser *parser); virtual ~ProcessAST(); void operator()(const QString &code, AST::Node *node); protected: - QDeclarativeScript::Object *defineObjectBinding(AST::UiQualifiedId *propertyName, bool onAssignment, + QQmlScript::Object *defineObjectBinding(AST::UiQualifiedId *propertyName, bool onAssignment, const QString &objectType, AST::SourceLocation typeLocation, LocationSpan location, AST::UiObjectInitializer *initializer = 0); - QDeclarativeScript::Variant getVariant(AST::Statement *stmt); - QDeclarativeScript::Variant getVariant(AST::ExpressionNode *expr); + QQmlScript::Variant getVariant(AST::Statement *stmt); + QQmlScript::Variant getVariant(AST::ExpressionNode *expr); LocationSpan location(AST::SourceLocation start, AST::SourceLocation end); LocationSpan location(AST::UiQualifiedId *); @@ -553,7 +553,7 @@ class ProcessAST: protected AST::Visitor QString asString(AST::UiQualifiedId *node) const; const State state() const; - QDeclarativeScript::Object *currentObject() const; + QQmlScript::Object *currentObject() const; Property *currentProperty() const; QString qualifiedNameId() const; @@ -607,13 +607,13 @@ class ProcessAST: protected AST::Visitor } private: - QDeclarativeScript::Parser *_parser; + QQmlScript::Parser *_parser; StateStack _stateStack; QStringList _scope; const QString *_contents; }; -ProcessAST::ProcessAST(QDeclarativeScript::Parser *parser) +ProcessAST::ProcessAST(QQmlScript::Parser *parser) : _parser(parser) { } @@ -641,7 +641,7 @@ const ProcessAST::State ProcessAST::state() const return _stateStack.back(); } -QDeclarativeScript::Object *ProcessAST::currentObject() const +QQmlScript::Object *ProcessAST::currentObject() const { return state().object; } @@ -670,7 +670,7 @@ QString ProcessAST::asString(AST::UiQualifiedId *node) const return s; } -QDeclarativeScript::Object * +QQmlScript::Object * ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName, bool onAssignment, const QString &objectType, @@ -691,8 +691,8 @@ ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName, } if (!onAssignment && propertyCount && currentProperty() && !currentProperty()->values.isEmpty()) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Property value set multiple times")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Property value set multiple times")); error.setLine(this->location(propertyName).start.line); error.setColumn(this->location(propertyName).start.column); _parser->_errors << error; @@ -707,7 +707,7 @@ ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName, const QString qualifier(objectType.left(lastTypeDot)); for (int ii = 0; ii < _parser->_imports.count(); ++ii) { - const QDeclarativeScript::Import &import = _parser->_imports.at(ii); + const QQmlScript::Import &import = _parser->_imports.at(ii); if (import.qualifier == qualifier) { // The qualifier is a namespace - expect a type here namespaceLength = qualifier.length() + 1; @@ -717,8 +717,8 @@ ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName, } if (propertyCount || !currentObject() || namespaceLength) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Expected type name")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Expected type name")); error.setLine(typeLocation.startLine); error.setColumn(typeLocation.startColumn + namespaceLength); _parser->_errors << error; @@ -742,9 +742,9 @@ ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName, if (lastTypeDot >= 0) resolvableObjectType.replace(QLatin1Char('.'),QLatin1Char('/')); - QDeclarativeScript::Object *obj = _parser->_pool.New(); + QQmlScript::Object *obj = _parser->_pool.New(); - QDeclarativeScript::TypeReference *typeRef = _parser->findOrCreateType(resolvableObjectType); + QQmlScript::TypeReference *typeRef = _parser->findOrCreateType(resolvableObjectType); obj->type = typeRef->id; typeRef->refObjects.append(obj); @@ -758,7 +758,7 @@ ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName, if (propertyCount) { Property *prop = currentProperty(); - QDeclarativeScript::Value *v = _parser->_pool.New(); + QQmlScript::Value *v = _parser->_pool.New(); v->object = obj; v->location = obj->location; if (onAssignment) @@ -775,7 +775,7 @@ ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName, _parser->setTree(obj); } else { const State state = _stateStack.top(); - QDeclarativeScript::Value *v = _parser->_pool.New(); + QQmlScript::Value *v = _parser->_pool.New(); v->object = obj; v->location = obj->location; if (state.property) { @@ -829,18 +829,18 @@ bool ProcessAST::visit(AST::UiProgram *node) bool ProcessAST::visit(AST::UiImport *node) { QString uri; - QDeclarativeScript::Import import; + QQmlScript::Import import; if (!node->fileName.isNull()) { uri = node->fileName.toString(); if (uri.endsWith(QLatin1String(".js"))) { - import.type = QDeclarativeScript::Import::Script; + import.type = QQmlScript::Import::Script; } else { - import.type = QDeclarativeScript::Import::File; + import.type = QQmlScript::Import::File; } } else { - import.type = QDeclarativeScript::Import::Library; + import.type = QQmlScript::Import::Library; uri = asString(node->importUri); } @@ -851,16 +851,16 @@ bool ProcessAST::visit(AST::UiImport *node) if (!node->importId.isNull()) { import.qualifier = node->importId.toString(); if (!import.qualifier.at(0).isUpper()) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Invalid import qualifier ID")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Invalid import qualifier ID")); error.setLine(node->importIdToken.startLine); error.setColumn(node->importIdToken.startColumn); _parser->_errors << error; return false; } if (import.qualifier == QLatin1String("Qt")) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Reserved name \"Qt\" cannot be used as an qualifier")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Reserved name \"Qt\" cannot be used as an qualifier")); error.setLine(node->importIdToken.startLine); error.setColumn(node->importIdToken.startColumn); _parser->_errors << error; @@ -868,14 +868,14 @@ bool ProcessAST::visit(AST::UiImport *node) } // Check for script qualifier clashes - bool isScript = import.type == QDeclarativeScript::Import::Script; + bool isScript = import.type == QQmlScript::Import::Script; for (int ii = 0; ii < _parser->_imports.count(); ++ii) { - const QDeclarativeScript::Import &other = _parser->_imports.at(ii); - bool otherIsScript = other.type == QDeclarativeScript::Import::Script; + const QQmlScript::Import &other = _parser->_imports.at(ii); + bool otherIsScript = other.type == QQmlScript::Import::Script; if ((isScript || otherIsScript) && import.qualifier == other.qualifier) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Script import qualifiers must be unique.")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Script import qualifiers must be unique.")); error.setLine(node->importIdToken.startLine); error.setColumn(node->importIdToken.startColumn); _parser->_errors << error; @@ -883,9 +883,9 @@ bool ProcessAST::visit(AST::UiImport *node) } } - } else if (import.type == QDeclarativeScript::Import::Script) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Script import requires a qualifier")); + } else if (import.type == QQmlScript::Import::Script) { + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Script import requires a qualifier")); error.setLine(node->fileNameToken.startLine); error.setColumn(node->fileNameToken.startColumn); _parser->_errors << error; @@ -894,9 +894,9 @@ bool ProcessAST::visit(AST::UiImport *node) if (node->versionToken.isValid()) { import.version = textAt(node->versionToken); - } else if (import.type == QDeclarativeScript::Import::Library) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Library import requires a version")); + } else if (import.type == QQmlScript::Import::Library) { + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Library import requires a version")); error.setLine(node->importIdToken.startLine); error.setColumn(node->importIdToken.startColumn); _parser->_errors << error; @@ -970,8 +970,8 @@ bool ProcessAST::visit(AST::UiPublicMember *node) } if (!type) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Expected parameter type")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Expected parameter type")); error.setLine(node->typeToken.startLine); error.setColumn(node->typeToken.startColumn); _parser->_errors << error; @@ -1017,8 +1017,8 @@ bool ProcessAST::visit(AST::UiPublicMember *node) QHashedString::compare(typeModifier.constData(), "list", strlen("list"))) { type = Object::DynamicProperty::CustomList; } else { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Invalid property type modifier")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Invalid property type modifier")); error.setLine(node->typeModifierToken.startLine); error.setColumn(node->typeModifierToken.startColumn); _parser->_errors << error; @@ -1026,8 +1026,8 @@ bool ProcessAST::visit(AST::UiPublicMember *node) } typeFound = true; } else if (!node->typeModifier.isNull()) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Unexpected property type modifier")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Unexpected property type modifier")); error.setLine(node->typeModifierToken.startLine); error.setColumn(node->typeModifierToken.startColumn); _parser->_errors << error; @@ -1035,8 +1035,8 @@ bool ProcessAST::visit(AST::UiPublicMember *node) } if(!typeFound) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Expected property type")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Expected property type")); error.setLine(node->typeToken.startLine); error.setColumn(node->typeToken.startColumn); _parser->_errors << error; @@ -1050,7 +1050,7 @@ bool ProcessAST::visit(AST::UiPublicMember *node) property->nameLocation.line = node->identifierToken.startLine; property->nameLocation.column = node->identifierToken.startColumn; if (type >= Object::DynamicProperty::Custom) { - QDeclarativeScript::TypeReference *typeRef = + QQmlScript::TypeReference *typeRef = _parser->findOrCreateType(memberType.toString()); typeRef->refObjects.append(_stateStack.top().object); property->customType = memberType; @@ -1066,7 +1066,7 @@ bool ProcessAST::visit(AST::UiPublicMember *node) property->defaultValue->location = location(node->statement->firstSourceLocation(), node->statement->lastSourceLocation()); - QDeclarativeScript::Value *value = _parser->_pool.New(); + QQmlScript::Value *value = _parser->_pool.New(); value->location = location(node->statement->firstSourceLocation(), node->statement->lastSourceLocation()); value->value = getVariant(node->statement); @@ -1114,37 +1114,37 @@ bool ProcessAST::visit(AST::UiObjectBinding *node) return false; } -QDeclarativeScript::Variant ProcessAST::getVariant(AST::Statement *stmt) +QQmlScript::Variant ProcessAST::getVariant(AST::Statement *stmt) { if (stmt) { if (AST::ExpressionStatement *exprStmt = AST::cast(stmt)) return getVariant(exprStmt->expression); - return QDeclarativeScript::Variant(asStringRef(stmt), stmt); + return QQmlScript::Variant(asStringRef(stmt), stmt); } - return QDeclarativeScript::Variant(); + return QQmlScript::Variant(); } -QDeclarativeScript::Variant ProcessAST::getVariant(AST::ExpressionNode *expr) +QQmlScript::Variant ProcessAST::getVariant(AST::ExpressionNode *expr) { if (AST::StringLiteral *lit = AST::cast(expr)) { - return QDeclarativeScript::Variant(lit); + return QQmlScript::Variant(lit); } else if (expr->kind == AST::Node::Kind_TrueLiteral) { - return QDeclarativeScript::Variant(true); + return QQmlScript::Variant(true); } else if (expr->kind == AST::Node::Kind_FalseLiteral) { - return QDeclarativeScript::Variant(false); + return QQmlScript::Variant(false); } else if (AST::NumericLiteral *lit = AST::cast(expr)) { - return QDeclarativeScript::Variant(lit->value, asStringRef(expr)); + return QQmlScript::Variant(lit->value, asStringRef(expr)); } else { if (AST::UnaryMinusExpression *unaryMinus = AST::cast(expr)) { if (AST::NumericLiteral *lit = AST::cast(unaryMinus->expression)) { - return QDeclarativeScript::Variant(-lit->value, asStringRef(expr)); + return QQmlScript::Variant(-lit->value, asStringRef(expr)); } } - return QDeclarativeScript::Variant(asStringRef(expr), expr); + return QQmlScript::Variant(asStringRef(expr), expr); } } @@ -1163,25 +1163,25 @@ bool ProcessAST::visit(AST::UiScriptBinding *node) Property *prop = currentProperty(); if (!prop->values.isEmpty()) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Property value set multiple times")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Property value set multiple times")); error.setLine(this->location(propertyName).start.line); error.setColumn(this->location(propertyName).start.column); _parser->_errors << error; return 0; } - QDeclarativeScript::Variant primitive; + QQmlScript::Variant primitive; if (AST::ExpressionStatement *stmt = AST::cast(node->statement)) { primitive = getVariant(stmt->expression); } else { // do binding - primitive = QDeclarativeScript::Variant(asStringRef(node->statement), node->statement); + primitive = QQmlScript::Variant(asStringRef(node->statement), node->statement); } prop->location.range.length = prop->location.range.offset + prop->location.range.length - node->qualifiedId->identifierToken.offset; prop->location.range.offset = node->qualifiedId->identifierToken.offset; - QDeclarativeScript::Value *v = _parser->_pool.New(); + QQmlScript::Value *v = _parser->_pool.New(); v->value = primitive; v->location = location(node->statement->firstSourceLocation(), node->statement->lastSourceLocation()); @@ -1208,8 +1208,8 @@ bool ProcessAST::visit(AST::UiArrayBinding *node) Property* prop = currentProperty(); if (!prop->values.isEmpty()) { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","Property value set multiple times")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","Property value set multiple times")); error.setLine(this->location(propertyName).start.line); error.setColumn(this->location(propertyName).start.column); _parser->_errors << error; @@ -1230,7 +1230,7 @@ bool ProcessAST::visit(AST::UiArrayBinding *node) bool ProcessAST::visit(AST::UiSourceElement *node) { - QDeclarativeScript::Object *obj = currentObject(); + QQmlScript::Object *obj = currentObject(); if (AST::FunctionDeclaration *funDecl = AST::cast(node->sourceElement)) { @@ -1252,8 +1252,8 @@ bool ProcessAST::visit(AST::UiSourceElement *node) obj->dynamicSlots.append(slot); } else { - QDeclarativeError error; - error.setDescription(QCoreApplication::translate("QDeclarativeParser","JavaScript declaration outside Script element")); + QQmlError error; + error.setDescription(QCoreApplication::translate("QQmlParser","JavaScript declaration outside Script element")); error.setLine(node->firstSourceLocation().startLine); error.setColumn(node->firstSourceLocation().startColumn); _parser->_errors << error; @@ -1264,18 +1264,18 @@ bool ProcessAST::visit(AST::UiSourceElement *node) } // end of anonymous namespace -QDeclarativeScript::Parser::Parser() +QQmlScript::Parser::Parser() : root(0), data(0) { } -QDeclarativeScript::Parser::~Parser() +QQmlScript::Parser::~Parser() { clear(); } -namespace QDeclarativeScript { +namespace QQmlScript { class ParserJsASTData { public: @@ -1287,7 +1287,7 @@ class ParserJsASTData }; } -bool QDeclarativeScript::Parser::parse(const QByteArray &qmldata, const QUrl &url, +bool QQmlScript::Parser::parse(const QByteArray &qmldata, const QUrl &url, const QString &urlString) { clear(); @@ -1305,12 +1305,12 @@ bool QDeclarativeScript::Parser::parse(const QByteArray &qmldata, const QUrl &ur #endif QString *code = _pool.NewString(stream.readAll()); - data = new QDeclarativeScript::ParserJsASTData(_scriptFile); + data = new QQmlScript::ParserJsASTData(_scriptFile); Lexer lexer(&data->engine); lexer.setCode(*code, /*line = */ 1); - QDeclarativeJS::Parser parser(&data->engine); + QQmlJS::Parser parser(&data->engine); if (! parser.parse() || !_errors.isEmpty()) { @@ -1320,7 +1320,7 @@ bool QDeclarativeScript::Parser::parse(const QByteArray &qmldata, const QUrl &ur if (m.isWarning()) continue; - QDeclarativeError error; + QQmlError error; error.setUrl(url); error.setDescription(m.message); error.setLine(m.loc.startLine); @@ -1342,22 +1342,22 @@ bool QDeclarativeScript::Parser::parse(const QByteArray &qmldata, const QUrl &ur return _errors.isEmpty(); } -QList QDeclarativeScript::Parser::referencedTypes() const +QList QQmlScript::Parser::referencedTypes() const { return _refTypes; } -QDeclarativeScript::Object *QDeclarativeScript::Parser::tree() const +QQmlScript::Object *QQmlScript::Parser::tree() const { return root; } -QList QDeclarativeScript::Parser::imports() const +QList QQmlScript::Parser::imports() const { return _imports; } -QList QDeclarativeScript::Parser::errors() const +QList QQmlScript::Parser::errors() const { return _errors; } @@ -1370,10 +1370,10 @@ static void replaceWithSpace(QString &str, int idx, int n) *data++ = space; } -static QDeclarativeScript::LocationSpan -locationFromLexer(const QDeclarativeJS::Lexer &lex, int startLine, int startColumn, int startOffset) +static QQmlScript::LocationSpan +locationFromLexer(const QQmlJS::Lexer &lex, int startLine, int startColumn, int startOffset) { - QDeclarativeScript::LocationSpan l; + QQmlScript::LocationSpan l; l.start.line = startLine; l.start.column = startColumn; l.end.line = lex.tokenEndLine(); l.end.column = lex.tokenEndColumn(); @@ -1388,20 +1388,20 @@ Searches for ".pragma " declarations within \a script. Currently support are: library */ -QDeclarativeScript::Object::ScriptBlock::Pragmas QDeclarativeScript::Parser::extractPragmas(QString &script) +QQmlScript::Object::ScriptBlock::Pragmas QQmlScript::Parser::extractPragmas(QString &script) { - QDeclarativeScript::Object::ScriptBlock::Pragmas rv = QDeclarativeScript::Object::ScriptBlock::None; + QQmlScript::Object::ScriptBlock::Pragmas rv = QQmlScript::Object::ScriptBlock::None; const QString pragma(QLatin1String("pragma")); const QString library(QLatin1String("library")); - QDeclarativeJS::Lexer l(0); + QQmlJS::Lexer l(0); l.setCode(script, 0); int token = l.lex(); while (true) { - if (token != QDeclarativeJSGrammar::T_DOT) + if (token != QQmlJSGrammar::T_DOT) return rv; int startOffset = l.tokenOffset(); @@ -1409,14 +1409,14 @@ QDeclarativeScript::Object::ScriptBlock::Pragmas QDeclarativeScript::Parser::ext token = l.lex(); - if (token != QDeclarativeJSGrammar::T_IDENTIFIER || + if (token != QQmlJSGrammar::T_IDENTIFIER || l.tokenStartLine() != startLine || script.mid(l.tokenOffset(), l.tokenLength()) != pragma) return rv; token = l.lex(); - if (token != QDeclarativeJSGrammar::T_IDENTIFIER || + if (token != QQmlJSGrammar::T_IDENTIFIER || l.tokenStartLine() != startLine) return rv; @@ -1428,7 +1428,7 @@ QDeclarativeScript::Object::ScriptBlock::Pragmas QDeclarativeScript::Parser::ext return rv; if (pragmaValue == library) { - rv |= QDeclarativeScript::Object::ScriptBlock::Shared; + rv |= QQmlScript::Object::ScriptBlock::Shared; replaceWithSpace(script, startOffset, endOffset - startOffset); } else { return rv; @@ -1438,52 +1438,52 @@ QDeclarativeScript::Object::ScriptBlock::Pragmas QDeclarativeScript::Parser::ext } #define CHECK_LINE if (l.tokenStartLine() != startLine) return rv; -#define CHECK_TOKEN(t) if (token != QDeclarativeJSGrammar:: t) return rv; +#define CHECK_TOKEN(t) if (token != QQmlJSGrammar:: t) return rv; static const int uriTokens[] = { - QDeclarativeJSGrammar::T_IDENTIFIER, - QDeclarativeJSGrammar::T_PROPERTY, - QDeclarativeJSGrammar::T_SIGNAL, - QDeclarativeJSGrammar::T_READONLY, - QDeclarativeJSGrammar::T_ON, - QDeclarativeJSGrammar::T_BREAK, - QDeclarativeJSGrammar::T_CASE, - QDeclarativeJSGrammar::T_CATCH, - QDeclarativeJSGrammar::T_CONTINUE, - QDeclarativeJSGrammar::T_DEFAULT, - QDeclarativeJSGrammar::T_DELETE, - QDeclarativeJSGrammar::T_DO, - QDeclarativeJSGrammar::T_ELSE, - QDeclarativeJSGrammar::T_FALSE, - QDeclarativeJSGrammar::T_FINALLY, - QDeclarativeJSGrammar::T_FOR, - QDeclarativeJSGrammar::T_FUNCTION, - QDeclarativeJSGrammar::T_IF, - QDeclarativeJSGrammar::T_IN, - QDeclarativeJSGrammar::T_INSTANCEOF, - QDeclarativeJSGrammar::T_NEW, - QDeclarativeJSGrammar::T_NULL, - QDeclarativeJSGrammar::T_RETURN, - QDeclarativeJSGrammar::T_SWITCH, - QDeclarativeJSGrammar::T_THIS, - QDeclarativeJSGrammar::T_THROW, - QDeclarativeJSGrammar::T_TRUE, - QDeclarativeJSGrammar::T_TRY, - QDeclarativeJSGrammar::T_TYPEOF, - QDeclarativeJSGrammar::T_VAR, - QDeclarativeJSGrammar::T_VOID, - QDeclarativeJSGrammar::T_WHILE, - QDeclarativeJSGrammar::T_CONST, - QDeclarativeJSGrammar::T_DEBUGGER, - QDeclarativeJSGrammar::T_RESERVED_WORD, - QDeclarativeJSGrammar::T_WITH, - - QDeclarativeJSGrammar::EOF_SYMBOL + QQmlJSGrammar::T_IDENTIFIER, + QQmlJSGrammar::T_PROPERTY, + QQmlJSGrammar::T_SIGNAL, + QQmlJSGrammar::T_READONLY, + QQmlJSGrammar::T_ON, + QQmlJSGrammar::T_BREAK, + QQmlJSGrammar::T_CASE, + QQmlJSGrammar::T_CATCH, + QQmlJSGrammar::T_CONTINUE, + QQmlJSGrammar::T_DEFAULT, + QQmlJSGrammar::T_DELETE, + QQmlJSGrammar::T_DO, + QQmlJSGrammar::T_ELSE, + QQmlJSGrammar::T_FALSE, + QQmlJSGrammar::T_FINALLY, + QQmlJSGrammar::T_FOR, + QQmlJSGrammar::T_FUNCTION, + QQmlJSGrammar::T_IF, + QQmlJSGrammar::T_IN, + QQmlJSGrammar::T_INSTANCEOF, + QQmlJSGrammar::T_NEW, + QQmlJSGrammar::T_NULL, + QQmlJSGrammar::T_RETURN, + QQmlJSGrammar::T_SWITCH, + QQmlJSGrammar::T_THIS, + QQmlJSGrammar::T_THROW, + QQmlJSGrammar::T_TRUE, + QQmlJSGrammar::T_TRY, + QQmlJSGrammar::T_TYPEOF, + QQmlJSGrammar::T_VAR, + QQmlJSGrammar::T_VOID, + QQmlJSGrammar::T_WHILE, + QQmlJSGrammar::T_CONST, + QQmlJSGrammar::T_DEBUGGER, + QQmlJSGrammar::T_RESERVED_WORD, + QQmlJSGrammar::T_WITH, + + QQmlJSGrammar::EOF_SYMBOL }; static inline bool isUriToken(int token) { const int *current = uriTokens; - while (*current != QDeclarativeJSGrammar::EOF_SYMBOL) { + while (*current != QQmlJSGrammar::EOF_SYMBOL) { if (*current == token) return true; ++current; @@ -1491,23 +1491,23 @@ static inline bool isUriToken(int token) return false; } -QDeclarativeScript::Parser::JavaScriptMetaData QDeclarativeScript::Parser::extractMetaData(QString &script) +QQmlScript::Parser::JavaScriptMetaData QQmlScript::Parser::extractMetaData(QString &script) { JavaScriptMetaData rv; - QDeclarativeScript::Object::ScriptBlock::Pragmas &pragmas = rv.pragmas; + QQmlScript::Object::ScriptBlock::Pragmas &pragmas = rv.pragmas; const QString pragma(QLatin1String("pragma")); const QString js(QLatin1String(".js")); const QString library(QLatin1String("library")); - QDeclarativeJS::Lexer l(0); + QQmlJS::Lexer l(0); l.setCode(script, 0); int token = l.lex(); while (true) { - if (token != QDeclarativeJSGrammar::T_DOT) + if (token != QQmlJSGrammar::T_DOT) return rv; int startOffset = l.tokenOffset(); @@ -1518,7 +1518,7 @@ QDeclarativeScript::Parser::JavaScriptMetaData QDeclarativeScript::Parser::extra CHECK_LINE; - if (token == QDeclarativeJSGrammar::T_IMPORT) { + if (token == QQmlJSGrammar::T_IMPORT) { // .import as // .import as @@ -1527,7 +1527,7 @@ QDeclarativeScript::Parser::JavaScriptMetaData QDeclarativeScript::Parser::extra CHECK_LINE; - if (token == QDeclarativeJSGrammar::T_STRING_LITERAL) { + if (token == QQmlJSGrammar::T_STRING_LITERAL) { QString file = l.tokenText(); @@ -1551,7 +1551,7 @@ QDeclarativeScript::Parser::JavaScriptMetaData QDeclarativeScript::Parser::extra if (!importId.at(0).isUpper()) return rv; - QDeclarativeScript::LocationSpan location = + QQmlScript::LocationSpan location = locationFromLexer(l, startLine, startColumn, startOffset); token = l.lex(); @@ -1580,7 +1580,7 @@ QDeclarativeScript::Parser::JavaScriptMetaData QDeclarativeScript::Parser::extra token = l.lex(); CHECK_LINE; - if (token != QDeclarativeJSGrammar::T_DOT) + if (token != QQmlJSGrammar::T_DOT) break; uri.append(QLatin1Char('.')); @@ -1609,7 +1609,7 @@ QDeclarativeScript::Parser::JavaScriptMetaData QDeclarativeScript::Parser::extra if (!importId.at(0).isUpper()) return rv; - QDeclarativeScript::LocationSpan location = + QQmlScript::LocationSpan location = locationFromLexer(l, startLine, startColumn, startOffset); token = l.lex(); @@ -1628,7 +1628,7 @@ QDeclarativeScript::Parser::JavaScriptMetaData QDeclarativeScript::Parser::extra rv.imports << import; } - } else if (token == QDeclarativeJSGrammar::T_IDENTIFIER && + } else if (token == QQmlJSGrammar::T_IDENTIFIER && script.mid(l.tokenOffset(), l.tokenLength()) == pragma) { token = l.lex(); @@ -1640,7 +1640,7 @@ QDeclarativeScript::Parser::JavaScriptMetaData QDeclarativeScript::Parser::extra int endOffset = l.tokenLength() + l.tokenOffset(); if (pragmaValue == library) { - pragmas |= QDeclarativeScript::Object::ScriptBlock::Shared; + pragmas |= QQmlScript::Object::ScriptBlock::Shared; replaceWithSpace(script, startOffset, endOffset - startOffset); } else { return rv; @@ -1657,7 +1657,7 @@ QDeclarativeScript::Parser::JavaScriptMetaData QDeclarativeScript::Parser::extra return rv; } -void QDeclarativeScript::Parser::clear() +void QQmlScript::Parser::clear() { _imports.clear(); qDeleteAll(_refTypes); @@ -1672,7 +1672,7 @@ void QDeclarativeScript::Parser::clear() _pool.clear(); } -QDeclarativeScript::TypeReference *QDeclarativeScript::Parser::findOrCreateType(const QString &name) +QQmlScript::TypeReference *QQmlScript::Parser::findOrCreateType(const QString &name) { TypeReference *type = 0; int i = 0; @@ -1690,7 +1690,7 @@ QDeclarativeScript::TypeReference *QDeclarativeScript::Parser::findOrCreateType( return type; } -void QDeclarativeScript::Parser::setTree(QDeclarativeScript::Object *tree) +void QQmlScript::Parser::setTree(QQmlScript::Object *tree) { Q_ASSERT(! root); diff --git a/src/declarative/qml/qdeclarativescript_p.h b/src/qml/qml/qqmlscript_p.h similarity index 82% rename from src/declarative/qml/qdeclarativescript_p.h rename to src/qml/qml/qqmlscript_p.h index 86fc1c5bfd..ddf4c9a392 100644 --- a/src/declarative/qml/qdeclarativescript_p.h +++ b/src/qml/qml/qqmlscript_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -38,8 +38,8 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#ifndef QDECLARATIVESCRIPT_P_H -#define QDECLARATIVESCRIPT_P_H +#ifndef QQMLSCRIPT_P_H +#define QQMLSCRIPT_P_H // // W A R N I N G @@ -52,13 +52,13 @@ // We mean it. // -#include +#include #include #include #include -#include -#include +#include +#include #include #include @@ -69,11 +69,11 @@ QT_BEGIN_NAMESPACE class QByteArray; -class QDeclarativePropertyCache; -namespace QDeclarativeJS { namespace AST { class Node; class StringLiteral; } } -namespace QDeclarativeCompilerTypes { struct BindingReference; struct ComponentCompileState; } +class QQmlPropertyCache; +namespace QQmlJS { namespace AST { class Node; class StringLiteral; } } +namespace QQmlCompilerTypes { struct BindingReference; struct ComponentCompileState; } -namespace QDeclarativeScript { +namespace QQmlScript { struct Location { @@ -120,7 +120,7 @@ class Import void extractVersion(int *maj, int *min) const; - QDeclarativeScript::LocationSpan location; + QQmlScript::LocationSpan location; }; class Object; @@ -133,13 +133,13 @@ class TypeReference // type as it has been referenced in Qml QString name; // objects in parse tree referencing the type - QList refObjects; + QList refObjects; }; class Object; class Property; -class Q_DECLARATIVE_EXPORT Variant +class Q_QML_EXPORT Variant { public: enum Type { @@ -154,8 +154,8 @@ class Q_DECLARATIVE_EXPORT Variant Variant(const Variant &); explicit Variant(bool); explicit Variant(double, const QStringRef &asWritten = QStringRef()); - explicit Variant(QDeclarativeJS::AST::StringLiteral *); - explicit Variant(const QStringRef &asWritten, QDeclarativeJS::AST::Node *); + explicit Variant(QQmlJS::AST::StringLiteral *); + explicit Variant(const QStringRef &asWritten, QQmlJS::AST::Node *); Variant &operator=(const Variant &); Type type() const; @@ -170,7 +170,7 @@ class Q_DECLARATIVE_EXPORT Variant QString asString() const; double asNumber() const; QString asScript() const; - QDeclarativeJS::AST::Node *asAST() const; + QQmlJS::AST::Node *asAST() const; QStringList asStringList() const; private: @@ -178,13 +178,13 @@ class Q_DECLARATIVE_EXPORT Variant union { bool b; double d; - QDeclarativeJS::AST::StringLiteral *l; - QDeclarativeJS::AST::Node *n; + QQmlJS::AST::StringLiteral *l; + QQmlJS::AST::Node *n; }; QStringRef asWritten; }; -class Value : public QDeclarativePool::POD +class Value : public QQmlPool::POD { public: Value(); @@ -196,9 +196,9 @@ class Value : public QDeclarativePool::POD Literal, // This is used as a property binding assignment PropertyBinding, - // This is used as a QDeclarativePropertyValueSource assignment + // This is used as a QQmlPropertyValueSource assignment ValueSource, - // This is used as a QDeclarativePropertyValueInterceptor assignment + // This is used as a QQmlPropertyValueInterceptor assignment ValueInterceptor, // This is used as a property QObject assignment CreatedObject, @@ -223,7 +223,7 @@ class Value : public QDeclarativePool::POD // Used by compiler union { - QDeclarativeCompilerTypes::BindingReference *bindingReference; + QQmlCompilerTypes::BindingReference *bindingReference; int signalExpressionContextStack; }; @@ -231,7 +231,7 @@ class Value : public QDeclarativePool::POD Value *nextValue; }; -class Property : public QDeclarativePool::POD +class Property : public QQmlPool::POD { public: Property(); @@ -251,7 +251,7 @@ class Property : public QDeclarativePool::POD // The core data in the case of a regular property. // XXX This has to be a value now as the synthCache may change during // compilation which invalidates pointers. We should fix this. - QDeclarativePropertyData core; + QQmlPropertyData core; // Returns true if this is an empty property - both value and values // are unset. @@ -273,12 +273,12 @@ class Property : public QDeclarativePool::POD // True if this property was accessed as the default property. bool isDefault; // True if the setting of this property will be deferred. Set by the - // QDeclarativeCompiler + // QQmlCompiler bool isDeferred; // True if this property is a value-type pseudo-property bool isValueTypeSubProperty; // True if this property is a property alias. Set by the - // QDeclarativeCompiler + // QQmlCompiler bool isAlias; // True if this is a readonly property declaration bool isReadOnlyDeclaration; @@ -300,22 +300,22 @@ class Property : public QDeclarativePool::POD QHashedStringRef _name; }; -class Object : public QDeclarativePool::Class +class Object : public QQmlPool::Class { public: Object(); virtual ~Object(); // Type of the object. The integer is an index into the - // QDeclarativeCompiledData::types array, or -1 if the object is a property + // QQmlCompiledData::types array, or -1 if the object is a property // group. int type; // The fully-qualified name of this type QString typeName; - // The id assigned to the object (if any). Set by the QDeclarativeCompiler + // The id assigned to the object (if any). Set by the QQmlCompiler QString id; - // The id index assigned to the object (if any). Set by the QDeclarativeCompiler + // The id index assigned to the object (if any). Set by the QQmlCompiler int idIndex; // Custom parsed data QByteArray custom; @@ -333,7 +333,7 @@ class Object : public QDeclarativePool::Class QAbstractDynamicMetaObject extObject; QByteArray metadata; // Generated by compiler QByteArray synthdata; // Generated by compiler - QDeclarativePropertyCache *synthCache; // Generated by compiler + QQmlPropertyCache *synthCache; // Generated by compiler Property *getDefaultProperty(); // name ptr must be guarenteed to remain valid @@ -377,14 +377,14 @@ class Object : public QDeclarativePool::Class Pragmas pragmas; }; - // The bytes to cast instances by to get to the QDeclarativeParserStatus + // The bytes to cast instances by to get to the QQmlParserStatus // interface. -1 indicates the type doesn't support this interface. - // Set by the QDeclarativeCompiler. + // Set by the QQmlCompiler. int parserStatusCast; LocationSpan location; - struct DynamicProperty : public QDeclarativePool::POD + struct DynamicProperty : public QQmlPool::POD { DynamicProperty(); @@ -398,7 +398,7 @@ class Object : public QDeclarativePool::Class QHashedStringRef customType; QHashedStringRef name; - QDeclarativeScript::Property *defaultValue; + QQmlScript::Property *defaultValue; LocationSpan location; Location nameLocation; @@ -412,13 +412,13 @@ class Object : public QDeclarativePool::Class QFastMetaBuilder::StringRef changedSignatureRef; }; - struct DynamicSignal : public QDeclarativePool::POD + struct DynamicSignal : public QQmlPool::POD { DynamicSignal(); QHashedStringRef name; - QDeclarativePool::List parameterTypes; - QDeclarativePool::List parameterNames; + QQmlPool::List parameterTypes; + QQmlPool::List parameterNames; int parameterTypesLength() const; int parameterNamesLength() const; @@ -432,7 +432,7 @@ class Object : public QDeclarativePool::Class LocationSpan location; }; - struct DynamicSlot : public QDeclarativePool::Class + struct DynamicSlot : public QQmlPool::Class { DynamicSlot(); @@ -462,7 +462,7 @@ class Object : public QDeclarativePool::Class DynamicSlotList dynamicSlots; // Used by compiler - QDeclarativeCompilerTypes::ComponentCompileState *componentCompileState; + QQmlCompilerTypes::ComponentCompileState *componentCompileState; // Used by ComponentCompileState::AliasingObjectsList Object *nextAliasingObject; @@ -482,38 +482,38 @@ class Q_AUTOTEST_EXPORT Parser QList referencedTypes() const; - QDeclarativeScript::Object *tree() const; + QQmlScript::Object *tree() const; QList imports() const; void clear(); - QList errors() const; + QList errors() const; class JavaScriptMetaData { public: JavaScriptMetaData() - : pragmas(QDeclarativeScript::Object::ScriptBlock::None) {} + : pragmas(QQmlScript::Object::ScriptBlock::None) {} - QDeclarativeScript::Object::ScriptBlock::Pragmas pragmas; + QQmlScript::Object::ScriptBlock::Pragmas pragmas; QList imports; }; - static QDeclarativeScript::Object::ScriptBlock::Pragmas extractPragmas(QString &); + static QQmlScript::Object::ScriptBlock::Pragmas extractPragmas(QString &); static JavaScriptMetaData extractMetaData(QString &); // ### private: TypeReference *findOrCreateType(const QString &name); - void setTree(QDeclarativeScript::Object *tree); + void setTree(QQmlScript::Object *tree); void setScriptFile(const QString &filename) {_scriptFile = filename; } QString scriptFile() const { return _scriptFile; } // ### private: - QList _errors; + QList _errors; - QDeclarativePool _pool; - QDeclarativeScript::Object *root; + QQmlPool _pool; + QQmlScript::Object *root; QList _imports; QList _refTypes; QString _scriptFile; @@ -522,12 +522,12 @@ class Q_AUTOTEST_EXPORT Parser } -Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeScript::Object::ScriptBlock::Pragmas); +Q_DECLARE_OPERATORS_FOR_FLAGS(QQmlScript::Object::ScriptBlock::Pragmas); QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeScript::Variant) +Q_DECLARE_METATYPE(QQmlScript::Variant) QT_END_HEADER -#endif // QDECLARATIVESCRIPT_P_H +#endif // QQMLSCRIPT_P_H diff --git a/src/declarative/qml/qdeclarativescriptstring.cpp b/src/qml/qml/qqmlscriptstring.cpp similarity index 68% rename from src/declarative/qml/qdeclarativescriptstring.cpp rename to src/qml/qml/qqmlscriptstring.cpp index b409908902..ed7a6affa1 100644 --- a/src/declarative/qml/qdeclarativescriptstring.cpp +++ b/src/qml/qml/qqmlscriptstring.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,17 +39,17 @@ ** ****************************************************************************/ -#include "qdeclarativescriptstring.h" -#include "qdeclarativescriptstring_p.h" +#include "qqmlscriptstring.h" +#include "qqmlscriptstring_p.h" QT_BEGIN_NAMESPACE /*! -\class QDeclarativeScriptString +\class QQmlScriptString \since 4.7 -\brief The QDeclarativeScriptString class encapsulates a script and its context. +\brief The QQmlScriptString class encapsulates a script and its context. -QDeclarativeScriptString is used to create QObject properties that accept a script "assignment" from QML. +QQmlScriptString is used to create QObject properties that accept a script "assignment" from QML. 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)} @@ -60,31 +60,31 @@ MyType { } \endqml -If instead the property had a type of QDeclarativeScriptString, +If instead the property had a type of QQmlScriptString, 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. +the script at some later time using a QQmlExpression. \code -QDeclarativeExpression expr(scriptString); +QQmlExpression expr(scriptString); expr.evaluate(); \endcode -\sa QDeclarativeExpression +\sa QQmlExpression */ /*! Constructs an empty instance. */ -QDeclarativeScriptString::QDeclarativeScriptString() -: d(new QDeclarativeScriptStringPrivate) +QQmlScriptString::QQmlScriptString() +: d(new QQmlScriptStringPrivate) { } /*! Copies \a other. */ -QDeclarativeScriptString::QDeclarativeScriptString(const QDeclarativeScriptString &other) +QQmlScriptString::QQmlScriptString(const QQmlScriptString &other) : d(other.d) { } @@ -92,14 +92,14 @@ QDeclarativeScriptString::QDeclarativeScriptString(const QDeclarativeScriptStrin /*! \internal */ -QDeclarativeScriptString::~QDeclarativeScriptString() +QQmlScriptString::~QQmlScriptString() { } /*! Assigns \a other to this. */ -QDeclarativeScriptString &QDeclarativeScriptString::operator=(const QDeclarativeScriptString &other) +QQmlScriptString &QQmlScriptString::operator=(const QQmlScriptString &other) { d = other.d; return *this; @@ -108,7 +108,7 @@ QDeclarativeScriptString &QDeclarativeScriptString::operator=(const QDeclarative /*! Returns the context for the script. */ -QDeclarativeContext *QDeclarativeScriptString::context() const +QQmlContext *QQmlScriptString::context() const { return d->context; } @@ -116,7 +116,7 @@ QDeclarativeContext *QDeclarativeScriptString::context() const /*! Sets the \a context for the script. */ -void QDeclarativeScriptString::setContext(QDeclarativeContext *context) +void QQmlScriptString::setContext(QQmlContext *context) { d->context = context; } @@ -124,7 +124,7 @@ void QDeclarativeScriptString::setContext(QDeclarativeContext *context) /*! Returns the scope object for the script. */ -QObject *QDeclarativeScriptString::scopeObject() const +QObject *QQmlScriptString::scopeObject() const { return d->scope; } @@ -132,7 +132,7 @@ QObject *QDeclarativeScriptString::scopeObject() const /*! Sets the scope \a object for the script. */ -void QDeclarativeScriptString::setScopeObject(QObject *object) +void QQmlScriptString::setScopeObject(QObject *object) { d->scope = object; } @@ -140,7 +140,7 @@ void QDeclarativeScriptString::setScopeObject(QObject *object) /*! Returns the script text. */ -QString QDeclarativeScriptString::script() const +QString QQmlScriptString::script() const { return d->script; } @@ -148,7 +148,7 @@ QString QDeclarativeScriptString::script() const /*! Sets the \a script text. */ -void QDeclarativeScriptString::setScript(const QString &script) +void QQmlScriptString::setScript(const QString &script) { d->script = script; } diff --git a/src/declarative/qml/qdeclarativescriptstring.h b/src/qml/qml/qqmlscriptstring.h similarity index 72% rename from src/declarative/qml/qdeclarativescriptstring.h rename to src/qml/qml/qqmlscriptstring.h index 86357c8cb4..15db9088f7 100644 --- a/src/declarative/qml/qdeclarativescriptstring.h +++ b/src/qml/qml/qqmlscriptstring.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESCRIPTSTRING_H -#define QDECLARATIVESCRIPTSTRING_H +#ifndef QQMLSCRIPTSTRING_H +#define QQMLSCRIPTSTRING_H +#include #include #include #include @@ -52,19 +53,19 @@ QT_BEGIN_NAMESPACE class QObject; -class QDeclarativeContext; -class QDeclarativeScriptStringPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeScriptString +class QQmlContext; +class QQmlScriptStringPrivate; +class Q_QML_EXPORT QQmlScriptString { public: - QDeclarativeScriptString(); - QDeclarativeScriptString(const QDeclarativeScriptString &); - ~QDeclarativeScriptString(); + QQmlScriptString(); + QQmlScriptString(const QQmlScriptString &); + ~QQmlScriptString(); - QDeclarativeScriptString &operator=(const QDeclarativeScriptString &); + QQmlScriptString &operator=(const QQmlScriptString &); - QDeclarativeContext *context() const; - void setContext(QDeclarativeContext *); + QQmlContext *context() const; + void setContext(QQmlContext *); QObject *scopeObject() const; void setScopeObject(QObject *); @@ -73,17 +74,17 @@ class Q_DECLARATIVE_EXPORT QDeclarativeScriptString void setScript(const QString &); private: - QSharedDataPointer d; + QSharedDataPointer d; - friend class QDeclarativeVME; - friend class QDeclarativeExpression; + friend class QQmlVME; + friend class QQmlExpression; }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeScriptString) +Q_DECLARE_METATYPE(QQmlScriptString) QT_END_HEADER -#endif // QDECLARATIVESCRIPTSTRING_H +#endif // QQMLSCRIPTSTRING_H diff --git a/src/declarative/qml/qdeclarativescriptstring_p.h b/src/qml/qml/qqmlscriptstring_p.h similarity index 80% rename from src/declarative/qml/qdeclarativescriptstring_p.h rename to src/qml/qml/qqmlscriptstring_p.h index 5f8c1e6c10..15786c7aae 100644 --- a/src/declarative/qml/qdeclarativescriptstring_p.h +++ b/src/qml/qml/qqmlscriptstring_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,19 +39,19 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESCRIPTSTRING_P_H -#define QDECLARATIVESCRIPTSTRING_P_H +#ifndef QQMLSCRIPTSTRING_P_H +#define QQMLSCRIPTSTRING_P_H -#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeScriptStringPrivate : public QSharedData +class QQmlScriptStringPrivate : public QSharedData { public: - QDeclarativeScriptStringPrivate() : context(0), scope(0), bindingId(-1), lineNumber(-1), columnNumber(-1) {} + QQmlScriptStringPrivate() : context(0), scope(0), bindingId(-1), lineNumber(-1), columnNumber(-1) {} - QDeclarativeContext *context; + QQmlContext *context; QObject *scope; QString script; int bindingId; @@ -61,4 +61,4 @@ class QDeclarativeScriptStringPrivate : public QSharedData QT_END_NAMESPACE -#endif // QDECLARATIVESCRIPTSTRING_P_H +#endif // QQMLSCRIPTSTRING_P_H diff --git a/src/declarative/qml/qdeclarativestringconverters.cpp b/src/qml/qml/qqmlstringconverters.cpp similarity index 89% rename from src/declarative/qml/qdeclarativestringconverters.cpp rename to src/qml/qml/qqmlstringconverters.cpp index ce35a63727..2c7f6c9f6e 100644 --- a/src/declarative/qml/qdeclarativestringconverters.cpp +++ b/src/qml/qml/qqmlstringconverters.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativestringconverters_p.h" +#include "qqmlstringconverters_p.h" #include #include @@ -79,7 +79,7 @@ static uchar fromHex(const QString &s, int idx) return fromHex(c, c2); } -QVariant QDeclarativeStringConverters::variantFromString(const QString &s) +QVariant QQmlStringConverters::variantFromString(const QString &s) { if (s.isEmpty()) return QVariant(s); @@ -100,7 +100,7 @@ QVariant QDeclarativeStringConverters::variantFromString(const QString &s) return QVariant(s); } -QVariant QDeclarativeStringConverters::variantFromString(const QString &s, int preferredType, bool *ok) +QVariant QQmlStringConverters::variantFromString(const QString &s, int preferredType, bool *ok) { switch (preferredType) { case QMetaType::Int: @@ -139,7 +139,7 @@ QVariant QDeclarativeStringConverters::variantFromString(const QString &s, int p } } -QColor QDeclarativeStringConverters::colorFromString(const QString &s, bool *ok) +QColor QQmlStringConverters::colorFromString(const QString &s, bool *ok) { if (s.length() == 9 && s.startsWith(QLatin1Char('#'))) { uchar a = fromHex(s, 1); @@ -156,21 +156,21 @@ QColor QDeclarativeStringConverters::colorFromString(const QString &s, bool *ok) } #ifndef QT_NO_DATESTRING -QDate QDeclarativeStringConverters::dateFromString(const QString &s, bool *ok) +QDate QQmlStringConverters::dateFromString(const QString &s, bool *ok) { QDate d = QDate::fromString(s, Qt::ISODate); if (ok) *ok = d.isValid(); return d; } -QTime QDeclarativeStringConverters::timeFromString(const QString &s, bool *ok) +QTime QQmlStringConverters::timeFromString(const QString &s, bool *ok) { QTime t = QTime::fromString(s, Qt::ISODate); if (ok) *ok = t.isValid(); return t; } -QDateTime QDeclarativeStringConverters::dateTimeFromString(const QString &s, bool *ok) +QDateTime QQmlStringConverters::dateTimeFromString(const QString &s, bool *ok) { QDateTime d = QDateTime::fromString(s, Qt::ISODate); if (ok) *ok = d.isValid(); @@ -179,7 +179,7 @@ QDateTime QDeclarativeStringConverters::dateTimeFromString(const QString &s, boo #endif // QT_NO_DATESTRING //expects input of "x,y" -QPointF QDeclarativeStringConverters::pointFFromString(const QString &s, bool *ok) +QPointF QQmlStringConverters::pointFFromString(const QString &s, bool *ok) { if (s.count(QLatin1Char(',')) != 1) { if (ok) @@ -203,7 +203,7 @@ QPointF QDeclarativeStringConverters::pointFFromString(const QString &s, bool *o } //expects input of "widthxheight" -QSizeF QDeclarativeStringConverters::sizeFFromString(const QString &s, bool *ok) +QSizeF QQmlStringConverters::sizeFFromString(const QString &s, bool *ok) { if (s.count(QLatin1Char('x')) != 1) { if (ok) @@ -227,7 +227,7 @@ QSizeF QDeclarativeStringConverters::sizeFFromString(const QString &s, bool *ok) } //expects input of "x,y,widthxheight" //### use space instead of second comma? -QRectF QDeclarativeStringConverters::rectFFromString(const QString &s, bool *ok) +QRectF QQmlStringConverters::rectFFromString(const QString &s, bool *ok) { if (s.count(QLatin1Char(',')) != 2 || s.count(QLatin1Char('x')) != 1) { if (ok) @@ -255,7 +255,7 @@ QRectF QDeclarativeStringConverters::rectFFromString(const QString &s, bool *ok) } //expects input of "x,y,z" -QVector3D QDeclarativeStringConverters::vector3DFromString(const QString &s, bool *ok) +QVector3D QQmlStringConverters::vector3DFromString(const QString &s, bool *ok) { if (s.count(QLatin1Char(',')) != 2) { if (ok) @@ -281,7 +281,7 @@ QVector3D QDeclarativeStringConverters::vector3DFromString(const QString &s, boo } //expects input of "x,y,z,w" -QVector4D QDeclarativeStringConverters::vector4DFromString(const QString &s, bool *ok) +QVector4D QQmlStringConverters::vector4DFromString(const QString &s, bool *ok) { if (s.count(QLatin1Char(',')) != 3) { if (ok) diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/qml/qml/qqmlstringconverters_p.h similarity index 64% rename from src/declarative/qml/qdeclarativestringconverters_p.h rename to src/qml/qml/qqmlstringconverters_p.h index c9a83b6be8..8f6fb2485d 100644 --- a/src/declarative/qml/qdeclarativestringconverters_p.h +++ b/src/qml/qml/qqmlstringconverters_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESTRINGCONVERTERS_P_H -#define QDECLARATIVESTRINGCONVERTERS_P_H +#ifndef QQMLSTRINGCONVERTERS_P_H +#define QQMLSTRINGCONVERTERS_P_H // // W A R N I N G @@ -56,7 +56,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE @@ -70,24 +70,24 @@ class QVector3D; class QVector4D; // XXX - Bauhaus currently uses these methods which is why they're exported -namespace QDeclarativeStringConverters +namespace QQmlStringConverters { - QVariant Q_DECLARATIVE_PRIVATE_EXPORT variantFromString(const QString &); - QVariant Q_DECLARATIVE_PRIVATE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0); + QVariant Q_QML_PRIVATE_EXPORT variantFromString(const QString &); + QVariant Q_QML_PRIVATE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0); - QColor Q_DECLARATIVE_PRIVATE_EXPORT colorFromString(const QString &, bool *ok = 0); + QColor Q_QML_PRIVATE_EXPORT colorFromString(const QString &, bool *ok = 0); #ifndef QT_NO_DATESTRING - QDate Q_DECLARATIVE_PRIVATE_EXPORT dateFromString(const QString &, bool *ok = 0); - QTime Q_DECLARATIVE_PRIVATE_EXPORT timeFromString(const QString &, bool *ok = 0); - QDateTime Q_DECLARATIVE_PRIVATE_EXPORT dateTimeFromString(const QString &, bool *ok = 0); + QDate Q_QML_PRIVATE_EXPORT dateFromString(const QString &, bool *ok = 0); + QTime Q_QML_PRIVATE_EXPORT timeFromString(const QString &, bool *ok = 0); + QDateTime Q_QML_PRIVATE_EXPORT dateTimeFromString(const QString &, bool *ok = 0); #endif - QPointF Q_DECLARATIVE_PRIVATE_EXPORT pointFFromString(const QString &, bool *ok = 0); - QSizeF Q_DECLARATIVE_PRIVATE_EXPORT sizeFFromString(const QString &, bool *ok = 0); - QRectF Q_DECLARATIVE_PRIVATE_EXPORT rectFFromString(const QString &, bool *ok = 0); - QVector3D Q_DECLARATIVE_PRIVATE_EXPORT vector3DFromString(const QString &, bool *ok = 0); - QVector4D Q_DECLARATIVE_PRIVATE_EXPORT vector4DFromString(const QString &, bool *ok = 0); + QPointF Q_QML_PRIVATE_EXPORT pointFFromString(const QString &, bool *ok = 0); + QSizeF Q_QML_PRIVATE_EXPORT sizeFFromString(const QString &, bool *ok = 0); + QRectF Q_QML_PRIVATE_EXPORT rectFFromString(const QString &, bool *ok = 0); + QVector3D Q_QML_PRIVATE_EXPORT vector3DFromString(const QString &, bool *ok = 0); + QVector4D Q_QML_PRIVATE_EXPORT vector4DFromString(const QString &, bool *ok = 0); } QT_END_NAMESPACE -#endif // QDECLARATIVESTRINGCONVERTERS_P_H +#endif // QQMLSTRINGCONVERTERS_P_H diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp similarity index 64% rename from src/declarative/qml/qdeclarativetypeloader.cpp rename to src/qml/qml/qqmltypeloader.cpp index 0524d5d661..cde2885f0c 100644 --- a/src/declarative/qml/qdeclarativetypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,14 +39,14 @@ ** ****************************************************************************/ -#include "qdeclarativetypeloader_p.h" +#include "qqmltypeloader_p.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -55,8 +55,8 @@ #include #include #include -#include -#include +#include +#include #if defined (Q_OS_UNIX) #include @@ -67,9 +67,9 @@ #ifdef DATABLOB_DEBUG -#define ASSERT_MAINTHREAD() do { if(m_thread->isThisThread()) qFatal("QDeclarativeDataLoader: Caller not in main thread"); } while(false) -#define ASSERT_LOADTHREAD() do { if(!m_thread->isThisThread()) qFatal("QDeclarativeDataLoader: Caller not in load thread"); } while(false) -#define ASSERT_CALLBACK() do { if(!m_manager || !m_manager->m_thread->isThisThread()) qFatal("QDeclarativeDataBlob: An API call was made outside a callback"); } while(false) +#define ASSERT_MAINTHREAD() do { if(m_thread->isThisThread()) qFatal("QQmlDataLoader: Caller not in main thread"); } while(false) +#define ASSERT_LOADTHREAD() do { if(!m_thread->isThisThread()) qFatal("QQmlDataLoader: Caller not in load thread"); } while(false) +#define ASSERT_CALLBACK() do { if(!m_manager || !m_manager->m_thread->isThisThread()) qFatal("QQmlDataBlob: An API call was made outside a callback"); } while(false) #else @@ -83,62 +83,62 @@ QT_BEGIN_NAMESPACE // This is a lame object that we need to ensure that slots connected to // QNetworkReply get called in the correct thread (the loader thread). -// As QDeclarativeDataLoader lives in the main thread, and we can't use +// As QQmlDataLoader lives in the main thread, and we can't use // Qt::DirectConnection connections from a QNetworkReply (because then // sender() wont work), we need to insert this object in the middle. -class QDeclarativeDataLoaderNetworkReplyProxy : public QObject +class QQmlDataLoaderNetworkReplyProxy : public QObject { Q_OBJECT public: - QDeclarativeDataLoaderNetworkReplyProxy(QDeclarativeDataLoader *l); + QQmlDataLoaderNetworkReplyProxy(QQmlDataLoader *l); public slots: void finished(); void downloadProgress(qint64, qint64); private: - QDeclarativeDataLoader *l; + QQmlDataLoader *l; }; -class QDeclarativeDataLoaderThread : public QDeclarativeThread +class QQmlDataLoaderThread : public QQmlThread { - typedef QDeclarativeDataLoaderThread This; + typedef QQmlDataLoaderThread This; public: - QDeclarativeDataLoaderThread(QDeclarativeDataLoader *loader); + QQmlDataLoaderThread(QQmlDataLoader *loader); QNetworkAccessManager *networkAccessManager() const; - QDeclarativeDataLoaderNetworkReplyProxy *networkReplyProxy() const; + QQmlDataLoaderNetworkReplyProxy *networkReplyProxy() const; - void load(QDeclarativeDataBlob *b); - void loadAsync(QDeclarativeDataBlob *b); - void loadWithStaticData(QDeclarativeDataBlob *b, const QByteArray &); - void loadWithStaticDataAsync(QDeclarativeDataBlob *b, const QByteArray &); - void callCompleted(QDeclarativeDataBlob *b); - void callDownloadProgressChanged(QDeclarativeDataBlob *b, qreal p); - void initializeEngine(QDeclarativeExtensionInterface *, const char *); + void load(QQmlDataBlob *b); + void loadAsync(QQmlDataBlob *b); + void loadWithStaticData(QQmlDataBlob *b, const QByteArray &); + void loadWithStaticDataAsync(QQmlDataBlob *b, const QByteArray &); + void callCompleted(QQmlDataBlob *b); + void callDownloadProgressChanged(QQmlDataBlob *b, qreal p); + void initializeEngine(QQmlExtensionInterface *, const char *); protected: virtual void shutdownThread(); private: - void loadThread(QDeclarativeDataBlob *b); - void loadWithStaticDataThread(QDeclarativeDataBlob *b, const QByteArray &); - void callCompletedMain(QDeclarativeDataBlob *b); - void callDownloadProgressChangedMain(QDeclarativeDataBlob *b, qreal p); - void initializeEngineMain(QDeclarativeExtensionInterface *iface, const char *uri); + void loadThread(QQmlDataBlob *b); + void loadWithStaticDataThread(QQmlDataBlob *b, const QByteArray &); + void callCompletedMain(QQmlDataBlob *b); + void callDownloadProgressChangedMain(QQmlDataBlob *b, qreal p); + void initializeEngineMain(QQmlExtensionInterface *iface, const char *uri); - QDeclarativeDataLoader *m_loader; + QQmlDataLoader *m_loader; mutable QNetworkAccessManager *m_networkAccessManager; - mutable QDeclarativeDataLoaderNetworkReplyProxy *m_networkReplyProxy; + mutable QQmlDataLoaderNetworkReplyProxy *m_networkReplyProxy; }; -QDeclarativeDataLoaderNetworkReplyProxy::QDeclarativeDataLoaderNetworkReplyProxy(QDeclarativeDataLoader *l) +QQmlDataLoaderNetworkReplyProxy::QQmlDataLoaderNetworkReplyProxy(QQmlDataLoader *l) : l(l) { } -void QDeclarativeDataLoaderNetworkReplyProxy::finished() +void QQmlDataLoaderNetworkReplyProxy::finished() { Q_ASSERT(sender()); Q_ASSERT(qobject_cast(sender())); @@ -146,7 +146,7 @@ void QDeclarativeDataLoaderNetworkReplyProxy::finished() l->networkReplyFinished(reply); } -void QDeclarativeDataLoaderNetworkReplyProxy::downloadProgress(qint64 bytesReceived, qint64 bytesTotal) +void QQmlDataLoaderNetworkReplyProxy::downloadProgress(qint64 bytesReceived, qint64 bytesTotal) { Q_ASSERT(sender()); Q_ASSERT(qobject_cast(sender())); @@ -233,26 +233,26 @@ static QStringHash *qmlFilesInDirectory(const QString &path) /*! -\class QDeclarativeDataBlob -\brief The QDeclarativeDataBlob encapsulates a data request that can be issued to a QDeclarativeDataLoader. +\class QQmlDataBlob +\brief The QQmlDataBlob encapsulates a data request that can be issued to a QQmlDataLoader. \internal -QDeclarativeDataBlob's are loaded by a QDeclarativeDataLoader. The user creates the QDeclarativeDataBlob -and then calls QDeclarativeDataLoader::load() or QDeclarativeDataLoader::loadWithStaticData() to load it. -The QDeclarativeDataLoader invokes callbacks on the QDeclarativeDataBlob as data becomes available. +QQmlDataBlob's are loaded by a QQmlDataLoader. The user creates the QQmlDataBlob +and then calls QQmlDataLoader::load() or QQmlDataLoader::loadWithStaticData() to load it. +The QQmlDataLoader invokes callbacks on the QQmlDataBlob as data becomes available. */ /*! -\enum QDeclarativeDataBlob::Status +\enum QQmlDataBlob::Status This enum describes the status of the data blob. \list -\o Null The blob has not yet been loaded by a QDeclarativeDataLoader -\o Loading The blob is loading network data. The QDeclarativeDataBlob::setData() callback has not yet been +\o Null The blob has not yet been loaded by a QQmlDataLoader +\o Loading The blob is loading network data. The QQmlDataBlob::setData() callback has not yet been invoked or has not yet returned. \o WaitingForDependencies The blob is waiting for dependencies to be done before continueing. This status -only occurs after the QDeclarativeDataBlob::setData() callback has been made, and when the blob has outstanding +only occurs after the QQmlDataBlob::setData() callback has been made, and when the blob has outstanding dependencies. \o Complete The blob's data has been loaded and all dependencies are done. \o Error An error has been set on this blob. @@ -260,28 +260,28 @@ dependencies. */ /*! -\enum QDeclarativeDataBlob::Type +\enum QQmlDataBlob::Type This enum describes the type of the data blob. \list -\o QmlFile This is a QDeclarativeTypeData -\o JavaScriptFile This is a QDeclarativeScriptData -\o QmldirFile This is a QDeclarativeQmldirData +\o QmlFile This is a QQmlTypeData +\o JavaScriptFile This is a QQmlScriptData +\o QmldirFile This is a QQmlQmldirData \endlist */ /*! -Create a new QDeclarativeDataBlob for \a url and of the provided \a type. +Create a new QQmlDataBlob for \a url and of the provided \a type. */ -QDeclarativeDataBlob::QDeclarativeDataBlob(const QUrl &url, Type type) +QQmlDataBlob::QQmlDataBlob(const QUrl &url, Type type) : m_type(type), m_url(url), m_finalUrl(url), m_manager(0), m_redirectCount(0), m_inCallback(false), m_isDone(false) { } /*! \internal */ -QDeclarativeDataBlob::~QDeclarativeDataBlob() +QQmlDataBlob::~QQmlDataBlob() { Q_ASSERT(m_waitingOnMe.isEmpty()); @@ -291,7 +291,7 @@ QDeclarativeDataBlob::~QDeclarativeDataBlob() /*! Returns the type provided to the constructor. */ -QDeclarativeDataBlob::Type QDeclarativeDataBlob::type() const +QQmlDataBlob::Type QQmlDataBlob::type() const { return m_type; } @@ -299,7 +299,7 @@ QDeclarativeDataBlob::Type QDeclarativeDataBlob::type() const /*! Returns the blob's status. */ -QDeclarativeDataBlob::Status QDeclarativeDataBlob::status() const +QQmlDataBlob::Status QQmlDataBlob::status() const { return m_data.status(); } @@ -307,7 +307,7 @@ QDeclarativeDataBlob::Status QDeclarativeDataBlob::status() const /*! Returns true if the status is Null. */ -bool QDeclarativeDataBlob::isNull() const +bool QQmlDataBlob::isNull() const { return status() == Null; } @@ -315,7 +315,7 @@ bool QDeclarativeDataBlob::isNull() const /*! Returns true if the status is Loading. */ -bool QDeclarativeDataBlob::isLoading() const +bool QQmlDataBlob::isLoading() const { return status() == Loading; } @@ -323,7 +323,7 @@ bool QDeclarativeDataBlob::isLoading() const /*! Returns true if the status is WaitingForDependencies. */ -bool QDeclarativeDataBlob::isWaiting() const +bool QQmlDataBlob::isWaiting() const { return status() == WaitingForDependencies; } @@ -331,7 +331,7 @@ bool QDeclarativeDataBlob::isWaiting() const /*! Returns true if the status is Complete. */ -bool QDeclarativeDataBlob::isComplete() const +bool QQmlDataBlob::isComplete() const { return status() == Complete; } @@ -339,7 +339,7 @@ bool QDeclarativeDataBlob::isComplete() const /*! Returns true if the status is Error. */ -bool QDeclarativeDataBlob::isError() const +bool QQmlDataBlob::isError() const { return status() == Error; } @@ -347,7 +347,7 @@ bool QDeclarativeDataBlob::isError() const /*! Returns true if the status is Complete or Error. */ -bool QDeclarativeDataBlob::isCompleteOrError() const +bool QQmlDataBlob::isCompleteOrError() const { Status s = status(); return s == Error || s == Complete; @@ -356,7 +356,7 @@ bool QDeclarativeDataBlob::isCompleteOrError() const /*! Returns the data download progress from 0 to 1. */ -qreal QDeclarativeDataBlob::progress() const +qreal QQmlDataBlob::progress() const { quint8 p = m_data.progress(); if (p == 0xFF) return 1.; @@ -369,7 +369,7 @@ happens while fetching the data, this url remains the same. \sa finalUrl() */ -QUrl QDeclarativeDataBlob::url() const +QUrl QQmlDataBlob::url() const { return m_url; } @@ -381,7 +381,7 @@ is updated to reflect the new location. May only be called from the load thread, or after the blob isCompleteOrError(). */ -QUrl QDeclarativeDataBlob::finalUrl() const +QUrl QQmlDataBlob::finalUrl() const { Q_ASSERT(isCompleteOrError() || (m_manager && m_manager->m_thread->isThisThread())); return m_finalUrl; @@ -390,7 +390,7 @@ QUrl QDeclarativeDataBlob::finalUrl() const /*! Returns the finalUrl() as a string. */ -QString QDeclarativeDataBlob::finalUrlString() const +QString QQmlDataBlob::finalUrlString() const { Q_ASSERT(isCompleteOrError() || (m_manager && m_manager->m_thread->isThisThread())); if (m_finalUrlString.isEmpty()) @@ -404,7 +404,7 @@ Return the errors on this blob. May only be called from the load thread, or after the blob isCompleteOrError(). */ -QList QDeclarativeDataBlob::errors() const +QList QQmlDataBlob::errors() const { Q_ASSERT(isCompleteOrError() || (m_manager && m_manager->m_thread->isThisThread())); return m_errors; @@ -416,13 +416,13 @@ Mark this blob as having \a errors. All outstanding dependencies will be cancelled. Requests to add new dependencies will be ignored. Entry into the Error state is irreversable. -The setError() method may only be called from within a QDeclarativeDataBlob callback. +The setError() method may only be called from within a QQmlDataBlob callback. */ -void QDeclarativeDataBlob::setError(const QDeclarativeError &errors) +void QQmlDataBlob::setError(const QQmlError &errors) { ASSERT_CALLBACK(); - QList l; + QList l; l << errors; setError(l); } @@ -430,7 +430,7 @@ void QDeclarativeDataBlob::setError(const QDeclarativeError &errors) /*! \overload */ -void QDeclarativeDataBlob::setError(const QList &errors) +void QQmlDataBlob::setError(const QList &errors) { ASSERT_CALLBACK(); @@ -450,9 +450,9 @@ void QDeclarativeDataBlob::setError(const QList &errors) Wait for \a blob to become complete or to error. If \a blob is already complete or in error, or this blob is already complete, this has no effect. -The setError() method may only be called from within a QDeclarativeDataBlob callback. +The setError() method may only be called from within a QQmlDataBlob callback. */ -void QDeclarativeDataBlob::addDependency(QDeclarativeDataBlob *blob) +void QQmlDataBlob::addDependency(QQmlDataBlob *blob) { ASSERT_CALLBACK(); @@ -473,7 +473,7 @@ void QDeclarativeDataBlob::addDependency(QDeclarativeDataBlob *blob) } /*! -\fn void QDeclarativeDataBlob::dataReceived(const QByteArray &data) +\fn void QQmlDataBlob::dataReceived(const QByteArray &data) Invoked when data for the blob is received. Implementors should use this callback to determine a blob's dependencies. Within this callback you may call setError() @@ -492,20 +492,20 @@ The default implementation does nothing. XXX Rename processData() or some such to avoid confusion between done() (processing thread) and completed() (main thread) */ -void QDeclarativeDataBlob::done() +void QQmlDataBlob::done() { } /*! Invoked if there is a network error while fetching this blob. -The default implementation sets an appropriate QDeclarativeError. +The default implementation sets an appropriate QQmlError. */ -void QDeclarativeDataBlob::networkError(QNetworkReply::NetworkError networkError) +void QQmlDataBlob::networkError(QNetworkReply::NetworkError networkError) { Q_UNUSED(networkError); - QDeclarativeError error; + QQmlError error; error.setUrl(m_finalUrl); const char *errorString = 0; @@ -554,7 +554,7 @@ Called if \a blob, which was previously waited for, has an error. The default implementation does nothing. */ -void QDeclarativeDataBlob::dependencyError(QDeclarativeDataBlob *blob) +void QQmlDataBlob::dependencyError(QQmlDataBlob *blob) { Q_UNUSED(blob); } @@ -564,7 +564,7 @@ Called if \a blob, which was previously waited for, has completed. The default implementation does nothing. */ -void QDeclarativeDataBlob::dependencyComplete(QDeclarativeDataBlob *blob) +void QQmlDataBlob::dependencyComplete(QQmlDataBlob *blob) { Q_UNUSED(blob); } @@ -575,7 +575,7 @@ whether they are in error, or complete state. The default implementation does nothing. */ -void QDeclarativeDataBlob::allDependenciesDone() +void QQmlDataBlob::allDependenciesDone() { } @@ -590,7 +590,7 @@ operation. The default implementation does nothing. */ -void QDeclarativeDataBlob::downloadProgressChanged(qreal progress) +void QQmlDataBlob::downloadProgressChanged(qreal progress) { Q_UNUSED(progress); } @@ -609,19 +609,19 @@ operation. The default implementation does nothing. */ -void QDeclarativeDataBlob::completed() +void QQmlDataBlob::completed() { } -void QDeclarativeDataBlob::tryDone() +void QQmlDataBlob::tryDone() { if (status() != Loading && m_waitingFor.isEmpty() && !m_isDone) { m_isDone = true; addref(); #ifdef DATABLOB_DEBUG - qWarning("QDeclarativeDataBlob::done() %s", qPrintable(url().toString())); + qWarning("QQmlDataBlob::done() %s", qPrintable(url().toString())); #endif done(); @@ -634,7 +634,7 @@ void QDeclarativeDataBlob::tryDone() // already be protected against the blob being completed (as set above); if (m_data.isAsync()) { #ifdef DATABLOB_DEBUG - qWarning("QDeclarativeDataBlob: Dispatching completed"); + qWarning("QQmlDataBlob: Dispatching completed"); #endif m_manager->m_thread->callCompleted(this); } @@ -643,10 +643,10 @@ void QDeclarativeDataBlob::tryDone() } } -void QDeclarativeDataBlob::cancelAllWaitingFor() +void QQmlDataBlob::cancelAllWaitingFor() { while (m_waitingFor.count()) { - QDeclarativeDataBlob *blob = m_waitingFor.takeLast(); + QQmlDataBlob *blob = m_waitingFor.takeLast(); Q_ASSERT(blob->m_waitingOnMe.contains(this)); @@ -656,10 +656,10 @@ void QDeclarativeDataBlob::cancelAllWaitingFor() } } -void QDeclarativeDataBlob::notifyAllWaitingOnMe() +void QQmlDataBlob::notifyAllWaitingOnMe() { while (m_waitingOnMe.count()) { - QDeclarativeDataBlob *blob = m_waitingOnMe.takeLast(); + QQmlDataBlob *blob = m_waitingOnMe.takeLast(); Q_ASSERT(blob->m_waitingFor.contains(this)); @@ -667,7 +667,7 @@ void QDeclarativeDataBlob::notifyAllWaitingOnMe() } } -void QDeclarativeDataBlob::notifyComplete(QDeclarativeDataBlob *blob) +void QQmlDataBlob::notifyComplete(QQmlDataBlob *blob) { Q_ASSERT(m_waitingFor.contains(blob)); Q_ASSERT(blob->status() == Error || blob->status() == Complete); @@ -697,17 +697,17 @@ void QDeclarativeDataBlob::notifyComplete(QDeclarativeDataBlob *blob) #define TD_PROGRESS_SHIFT 16 #define TD_ASYNC_MASK 0x80000000 -QDeclarativeDataBlob::ThreadData::ThreadData() +QQmlDataBlob::ThreadData::ThreadData() : _p(0) { } -QDeclarativeDataBlob::Status QDeclarativeDataBlob::ThreadData::status() const +QQmlDataBlob::Status QQmlDataBlob::ThreadData::status() const { - return QDeclarativeDataBlob::Status((_p.load() & TD_STATUS_MASK) >> TD_STATUS_SHIFT); + return QQmlDataBlob::Status((_p.load() & TD_STATUS_MASK) >> TD_STATUS_SHIFT); } -void QDeclarativeDataBlob::ThreadData::setStatus(QDeclarativeDataBlob::Status status) +void QQmlDataBlob::ThreadData::setStatus(QQmlDataBlob::Status status) { while (true) { int d = _p.load(); @@ -716,12 +716,12 @@ void QDeclarativeDataBlob::ThreadData::setStatus(QDeclarativeDataBlob::Status st } } -bool QDeclarativeDataBlob::ThreadData::isAsync() const +bool QQmlDataBlob::ThreadData::isAsync() const { return _p.load() & TD_ASYNC_MASK; } -void QDeclarativeDataBlob::ThreadData::setIsAsync(bool v) +void QQmlDataBlob::ThreadData::setIsAsync(bool v) { while (true) { int d = _p.load(); @@ -730,12 +730,12 @@ void QDeclarativeDataBlob::ThreadData::setIsAsync(bool v) } } -quint8 QDeclarativeDataBlob::ThreadData::progress() const +quint8 QQmlDataBlob::ThreadData::progress() const { return quint8((_p.load() & TD_PROGRESS_MASK) >> TD_PROGRESS_SHIFT); } -void QDeclarativeDataBlob::ThreadData::setProgress(quint8 v) +void QQmlDataBlob::ThreadData::setProgress(quint8 v) { while (true) { int d = _p.load(); @@ -744,72 +744,72 @@ void QDeclarativeDataBlob::ThreadData::setProgress(quint8 v) } } -QDeclarativeDataLoaderThread::QDeclarativeDataLoaderThread(QDeclarativeDataLoader *loader) +QQmlDataLoaderThread::QQmlDataLoaderThread(QQmlDataLoader *loader) : m_loader(loader), m_networkAccessManager(0), m_networkReplyProxy(0) { } -QNetworkAccessManager *QDeclarativeDataLoaderThread::networkAccessManager() const +QNetworkAccessManager *QQmlDataLoaderThread::networkAccessManager() const { Q_ASSERT(isThisThread()); if (!m_networkAccessManager) { - m_networkAccessManager = QDeclarativeEnginePrivate::get(m_loader->engine())->createNetworkAccessManager(0); - m_networkReplyProxy = new QDeclarativeDataLoaderNetworkReplyProxy(m_loader); + m_networkAccessManager = QQmlEnginePrivate::get(m_loader->engine())->createNetworkAccessManager(0); + m_networkReplyProxy = new QQmlDataLoaderNetworkReplyProxy(m_loader); } return m_networkAccessManager; } -QDeclarativeDataLoaderNetworkReplyProxy *QDeclarativeDataLoaderThread::networkReplyProxy() const +QQmlDataLoaderNetworkReplyProxy *QQmlDataLoaderThread::networkReplyProxy() const { Q_ASSERT(isThisThread()); Q_ASSERT(m_networkReplyProxy); // Must call networkAccessManager() first return m_networkReplyProxy; } -void QDeclarativeDataLoaderThread::load(QDeclarativeDataBlob *b) +void QQmlDataLoaderThread::load(QQmlDataBlob *b) { b->addref(); callMethodInThread(&This::loadThread, b); } -void QDeclarativeDataLoaderThread::loadAsync(QDeclarativeDataBlob *b) +void QQmlDataLoaderThread::loadAsync(QQmlDataBlob *b) { b->addref(); postMethodToThread(&This::loadThread, b); } -void QDeclarativeDataLoaderThread::loadWithStaticData(QDeclarativeDataBlob *b, const QByteArray &d) +void QQmlDataLoaderThread::loadWithStaticData(QQmlDataBlob *b, const QByteArray &d) { b->addref(); callMethodInThread(&This::loadWithStaticDataThread, b, d); } -void QDeclarativeDataLoaderThread::loadWithStaticDataAsync(QDeclarativeDataBlob *b, const QByteArray &d) +void QQmlDataLoaderThread::loadWithStaticDataAsync(QQmlDataBlob *b, const QByteArray &d) { b->addref(); postMethodToThread(&This::loadWithStaticDataThread, b, d); } -void QDeclarativeDataLoaderThread::callCompleted(QDeclarativeDataBlob *b) +void QQmlDataLoaderThread::callCompleted(QQmlDataBlob *b) { b->addref(); postMethodToMain(&This::callCompletedMain, b); } -void QDeclarativeDataLoaderThread::callDownloadProgressChanged(QDeclarativeDataBlob *b, qreal p) +void QQmlDataLoaderThread::callDownloadProgressChanged(QQmlDataBlob *b, qreal p) { b->addref(); postMethodToMain(&This::callDownloadProgressChangedMain, b, p); } -void QDeclarativeDataLoaderThread::initializeEngine(QDeclarativeExtensionInterface *iface, +void QQmlDataLoaderThread::initializeEngine(QQmlExtensionInterface *iface, const char *uri) { callMethodInMain(&This::initializeEngineMain, iface, uri); } -void QDeclarativeDataLoaderThread::shutdownThread() +void QQmlDataLoaderThread::shutdownThread() { delete m_networkAccessManager; m_networkAccessManager = 0; @@ -817,38 +817,38 @@ void QDeclarativeDataLoaderThread::shutdownThread() m_networkReplyProxy = 0; } -void QDeclarativeDataLoaderThread::loadThread(QDeclarativeDataBlob *b) +void QQmlDataLoaderThread::loadThread(QQmlDataBlob *b) { m_loader->loadThread(b); b->release(); } -void QDeclarativeDataLoaderThread::loadWithStaticDataThread(QDeclarativeDataBlob *b, const QByteArray &d) +void QQmlDataLoaderThread::loadWithStaticDataThread(QQmlDataBlob *b, const QByteArray &d) { m_loader->loadWithStaticDataThread(b, d); b->release(); } -void QDeclarativeDataLoaderThread::callCompletedMain(QDeclarativeDataBlob *b) +void QQmlDataLoaderThread::callCompletedMain(QQmlDataBlob *b) { #ifdef DATABLOB_DEBUG - qWarning("QDeclarativeDataLoaderThread: %s completed() callback", qPrintable(b->url().toString())); + qWarning("QQmlDataLoaderThread: %s completed() callback", qPrintable(b->url().toString())); #endif b->completed(); b->release(); } -void QDeclarativeDataLoaderThread::callDownloadProgressChangedMain(QDeclarativeDataBlob *b, qreal p) +void QQmlDataLoaderThread::callDownloadProgressChangedMain(QQmlDataBlob *b, qreal p) { #ifdef DATABLOB_DEBUG - qWarning("QDeclarativeDataLoaderThread: %s downloadProgressChanged(%f) callback", + qWarning("QQmlDataLoaderThread: %s downloadProgressChanged(%f) callback", qPrintable(b->url().toString()), p); #endif b->downloadProgressChanged(p); b->release(); } -void QDeclarativeDataLoaderThread::initializeEngineMain(QDeclarativeExtensionInterface *iface, +void QQmlDataLoaderThread::initializeEngineMain(QQmlExtensionInterface *iface, const char *uri) { Q_ASSERT(m_loader->engine()->thread() == QThread::currentThread()); @@ -856,45 +856,45 @@ void QDeclarativeDataLoaderThread::initializeEngineMain(QDeclarativeExtensionInt } /*! -\class QDeclarativeDataLoader -\brief The QDeclarativeDataLoader class abstracts loading files and their dependencies over the network. +\class QQmlDataLoader +\brief The QQmlDataLoader class abstracts loading files and their dependencies over the network. \internal -The QDeclarativeDataLoader class is provided for the exclusive use of the QDeclarativeTypeLoader class. +The QQmlDataLoader class is provided for the exclusive use of the QQmlTypeLoader class. -Clients create QDeclarativeDataBlob instances and submit them to the QDeclarativeDataLoader class -through the QDeclarativeDataLoader::load() or QDeclarativeDataLoader::loadWithStaticData() methods. +Clients create QQmlDataBlob instances and submit them to the QQmlDataLoader class +through the QQmlDataLoader::load() or QQmlDataLoader::loadWithStaticData() methods. The loader then fetches the data over the network or from the local file system in an efficient way. -QDeclarativeDataBlob is an abstract class, so should always be specialized. +QQmlDataBlob is an abstract class, so should always be specialized. -Once data is received, the QDeclarativeDataBlob::dataReceived() method is invoked on the blob. The +Once data is received, the QQmlDataBlob::dataReceived() method is invoked on the blob. The derived class should use this callback to process the received data. Processing of the data can -result in an error being set (QDeclarativeDataBlob::setError()), or one or more dependencies being -created (QDeclarativeDataBlob::addDependency()). Dependencies are other QDeclarativeDataBlob's that +result in an error being set (QQmlDataBlob::setError()), or one or more dependencies being +created (QQmlDataBlob::addDependency()). Dependencies are other QQmlDataBlob's that are required before processing can fully complete. -To complete processing, the QDeclarativeDataBlob::done() callback is invoked. done() is called when +To complete processing, the QQmlDataBlob::done() callback is invoked. done() is called when one of these three preconditions are met. \list 1 -\o The QDeclarativeDataBlob has no dependencies. -\o The QDeclarativeDataBlob has an error set. -\o All the QDeclarativeDataBlob's dependencies are themselves "done()". +\o The QQmlDataBlob has no dependencies. +\o The QQmlDataBlob has an error set. +\o All the QQmlDataBlob's dependencies are themselves "done()". \endlist -Thus QDeclarativeDataBlob::done() will always eventually be called, even if the blob has an error set. +Thus QQmlDataBlob::done() will always eventually be called, even if the blob has an error set. */ /*! -Create a new QDeclarativeDataLoader for \a engine. +Create a new QQmlDataLoader for \a engine. */ -QDeclarativeDataLoader::QDeclarativeDataLoader(QDeclarativeEngine *engine) -: m_engine(engine), m_thread(new QDeclarativeDataLoaderThread(this)) +QQmlDataLoader::QQmlDataLoader(QQmlEngine *engine) +: m_engine(engine), m_thread(new QQmlDataLoaderThread(this)) { } /*! \internal */ -QDeclarativeDataLoader::~QDeclarativeDataLoader() +QQmlDataLoader::~QQmlDataLoader() { for (NetworkReplies::Iterator iter = m_networkReplies.begin(); iter != m_networkReplies.end(); ++iter) (*iter)->release(); @@ -903,12 +903,12 @@ QDeclarativeDataLoader::~QDeclarativeDataLoader() delete m_thread; } -void QDeclarativeDataLoader::lock() +void QQmlDataLoader::lock() { m_thread->lock(); } -void QDeclarativeDataLoader::unlock() +void QQmlDataLoader::unlock() { m_thread->unlock(); } @@ -918,17 +918,17 @@ Load the provided \a blob from the network or filesystem. The loader must be locked. */ -void QDeclarativeDataLoader::load(QDeclarativeDataBlob *blob, Mode mode) +void QQmlDataLoader::load(QQmlDataBlob *blob, Mode mode) { #ifdef DATABLOB_DEBUG - qWarning("QDeclarativeDataLoader::load(%s): %s thread", qPrintable(blob->m_url.toString()), + qWarning("QQmlDataLoader::load(%s): %s thread", qPrintable(blob->m_url.toString()), m_thread->isThisThread()?"Compile":"Engine"); #endif - Q_ASSERT(blob->status() == QDeclarativeDataBlob::Null); + Q_ASSERT(blob->status() == QQmlDataBlob::Null); Q_ASSERT(blob->m_manager == 0); - blob->m_data.setStatus(QDeclarativeDataBlob::Loading); + blob->m_data.setStatus(QQmlDataBlob::Loading); blob->m_manager = this; if (m_thread->isThisThread()) { @@ -955,17 +955,17 @@ Load the provided \a blob with \a data. The blob's URL is not used by the data The loader must be locked. */ -void QDeclarativeDataLoader::loadWithStaticData(QDeclarativeDataBlob *blob, const QByteArray &data, Mode mode) +void QQmlDataLoader::loadWithStaticData(QQmlDataBlob *blob, const QByteArray &data, Mode mode) { #ifdef DATABLOB_DEBUG - qWarning("QDeclarativeDataLoader::loadWithStaticData(%s, data): %s thread", qPrintable(blob->m_url.toString()), + qWarning("QQmlDataLoader::loadWithStaticData(%s, data): %s thread", qPrintable(blob->m_url.toString()), m_thread->isThisThread()?"Compile":"Engine"); #endif - Q_ASSERT(blob->status() == QDeclarativeDataBlob::Null); + Q_ASSERT(blob->status() == QQmlDataBlob::Null); Q_ASSERT(blob->m_manager == 0); - blob->m_data.setStatus(QDeclarativeDataBlob::Loading); + blob->m_data.setStatus(QQmlDataBlob::Loading); blob->m_manager = this; if (m_thread->isThisThread()) { @@ -987,29 +987,29 @@ void QDeclarativeDataLoader::loadWithStaticData(QDeclarativeDataBlob *blob, cons } } -void QDeclarativeDataLoader::loadWithStaticDataThread(QDeclarativeDataBlob *blob, const QByteArray &data) +void QQmlDataLoader::loadWithStaticDataThread(QQmlDataBlob *blob, const QByteArray &data) { ASSERT_LOADTHREAD(); setData(blob, data); } -void QDeclarativeDataLoader::loadThread(QDeclarativeDataBlob *blob) +void QQmlDataLoader::loadThread(QQmlDataBlob *blob) { ASSERT_LOADTHREAD(); if (blob->m_url.isEmpty()) { - QDeclarativeError error; + QQmlError error; error.setDescription(QLatin1String("Invalid null URL")); blob->setError(error); return; } - QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(blob->m_url); + QString lf = QQmlEnginePrivate::urlToLocalFileOrQrc(blob->m_url); if (!lf.isEmpty()) { - if (!QDeclarative_isFileCaseCorrect(lf)) { - QDeclarativeError error; + if (!QQml_isFileCaseCorrect(lf)) { + QQmlError error; error.setUrl(blob->m_url); error.setDescription(QLatin1String("File name case mismatch")); blob->setError(error); @@ -1044,13 +1044,13 @@ void QDeclarativeDataLoader::loadThread(QDeclarativeDataBlob *blob) #define DATALOADER_MAXIMUM_REDIRECT_RECURSION 16 -void QDeclarativeDataLoader::networkReplyFinished(QNetworkReply *reply) +void QQmlDataLoader::networkReplyFinished(QNetworkReply *reply) { Q_ASSERT(m_thread->isThisThread()); reply->deleteLater(); - QDeclarativeDataBlob *blob = m_networkReplies.take(reply); + QQmlDataBlob *blob = m_networkReplies.take(reply); Q_ASSERT(blob); @@ -1080,12 +1080,12 @@ void QDeclarativeDataLoader::networkReplyFinished(QNetworkReply *reply) blob->release(); } -void QDeclarativeDataLoader::networkReplyProgress(QNetworkReply *reply, +void QQmlDataLoader::networkReplyProgress(QNetworkReply *reply, qint64 bytesReceived, qint64 bytesTotal) { Q_ASSERT(m_thread->isThisThread()); - QDeclarativeDataBlob *blob = m_networkReplies.value(reply); + QQmlDataBlob *blob = m_networkReplies.value(reply); Q_ASSERT(blob); @@ -1098,18 +1098,18 @@ void QDeclarativeDataLoader::networkReplyProgress(QNetworkReply *reply, } /*! -Return the QDeclarativeEngine associated with this loader +Return the QQmlEngine associated with this loader */ -QDeclarativeEngine *QDeclarativeDataLoader::engine() const +QQmlEngine *QQmlDataLoader::engine() const { return m_engine; } /*! -Call the initializeEngine() method on \a iface. Used by QDeclarativeImportDatabase to ensure it +Call the initializeEngine() method on \a iface. Used by QQmlImportDatabase to ensure it gets called in the correct thread. */ -void QDeclarativeDataLoader::initializeEngine(QDeclarativeExtensionInterface *iface, +void QQmlDataLoader::initializeEngine(QQmlExtensionInterface *iface, const char *uri) { Q_ASSERT(m_thread->isThisThread() || engine()->thread() == QThread::currentThread()); @@ -1123,7 +1123,7 @@ void QDeclarativeDataLoader::initializeEngine(QDeclarativeExtensionInterface *if } -void QDeclarativeDataLoader::setData(QDeclarativeDataBlob *blob, const QByteArray &data) +void QQmlDataLoader::setData(QQmlDataBlob *blob, const QByteArray &data) { blob->m_inCallback = true; @@ -1132,8 +1132,8 @@ void QDeclarativeDataLoader::setData(QDeclarativeDataBlob *blob, const QByteArra if (!blob->isError() && !blob->isWaiting()) blob->allDependenciesDone(); - if (blob->status() != QDeclarativeDataBlob::Error) - blob->m_data.setStatus(QDeclarativeDataBlob::WaitingForDependencies); + if (blob->status() != QQmlDataBlob::Error) + blob->m_data.setStatus(QQmlDataBlob::WaitingForDependencies); blob->m_inCallback = false; @@ -1143,8 +1143,8 @@ void QDeclarativeDataLoader::setData(QDeclarativeDataBlob *blob, const QByteArra /*! Constructs a new type loader that uses the given \a engine. */ -QDeclarativeTypeLoader::QDeclarativeTypeLoader(QDeclarativeEngine *engine) -: QDeclarativeDataLoader(engine) +QQmlTypeLoader::QQmlTypeLoader(QQmlEngine *engine) +: QQmlDataLoader(engine) { } @@ -1152,13 +1152,13 @@ QDeclarativeTypeLoader::QDeclarativeTypeLoader(QDeclarativeEngine *engine) Destroys the type loader, first clearing the cache of any information about loaded files. */ -QDeclarativeTypeLoader::~QDeclarativeTypeLoader() +QQmlTypeLoader::~QQmlTypeLoader() { clearCache(); } /*! -\enum QDeclarativeTypeLoader::Option +\enum QQmlTypeLoader::Option This enum defines the options that control the way type data is handled. @@ -1169,22 +1169,22 @@ This enum defines the options that control the way type data is handled. */ /*! -Returns a QDeclarativeTypeData for the specified \a url. The QDeclarativeTypeData may be cached. +Returns a QQmlTypeData for the specified \a url. The QQmlTypeData may be cached. */ -QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QUrl &url) +QQmlTypeData *QQmlTypeLoader::get(const QUrl &url) { Q_ASSERT(!url.isRelative() && - (QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url).isEmpty() || - !QDir::isRelativePath(QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url)))); + (QQmlEnginePrivate::urlToLocalFileOrQrc(url).isEmpty() || + !QDir::isRelativePath(QQmlEnginePrivate::urlToLocalFileOrQrc(url)))); lock(); - QDeclarativeTypeData *typeData = m_typeCache.value(url); + QQmlTypeData *typeData = m_typeCache.value(url); if (!typeData) { - typeData = new QDeclarativeTypeData(url, None, this); + typeData = new QQmlTypeData(url, None, this); m_typeCache.insert(url, typeData); - QDeclarativeDataLoader::load(typeData); + QQmlDataLoader::load(typeData); } typeData->addref(); @@ -1195,17 +1195,17 @@ QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QUrl &url) } /*! -Returns a QDeclarativeTypeData for the given \a data with the provided base \a url. The -QDeclarativeTypeData will not be cached. +Returns a QQmlTypeData for the given \a data with the provided base \a url. The +QQmlTypeData will not be cached. The specified \a options control how the loader handles type data. */ -QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QByteArray &data, const QUrl &url, Options options) +QQmlTypeData *QQmlTypeLoader::get(const QByteArray &data, const QUrl &url, Options options) { lock(); - QDeclarativeTypeData *typeData = new QDeclarativeTypeData(url, options, this); - QDeclarativeDataLoader::loadWithStaticData(typeData, data); + QQmlTypeData *typeData = new QQmlTypeData(url, options, this); + QQmlDataLoader::loadWithStaticData(typeData, data); unlock(); @@ -1213,22 +1213,22 @@ QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QByteArray &data, const } /*! -Return a QDeclarativeScriptBlob for \a url. The QDeclarativeScriptData may be cached. +Return a QQmlScriptBlob for \a url. The QQmlScriptData may be cached. */ -QDeclarativeScriptBlob *QDeclarativeTypeLoader::getScript(const QUrl &url) +QQmlScriptBlob *QQmlTypeLoader::getScript(const QUrl &url) { Q_ASSERT(!url.isRelative() && - (QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url).isEmpty() || - !QDir::isRelativePath(QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url)))); + (QQmlEnginePrivate::urlToLocalFileOrQrc(url).isEmpty() || + !QDir::isRelativePath(QQmlEnginePrivate::urlToLocalFileOrQrc(url)))); lock(); - QDeclarativeScriptBlob *scriptBlob = m_scriptCache.value(url); + QQmlScriptBlob *scriptBlob = m_scriptCache.value(url); if (!scriptBlob) { - scriptBlob = new QDeclarativeScriptBlob(url, this); + scriptBlob = new QQmlScriptBlob(url, this); m_scriptCache.insert(url, scriptBlob); - QDeclarativeDataLoader::load(scriptBlob); + QQmlDataLoader::load(scriptBlob); } scriptBlob->addref(); @@ -1239,22 +1239,22 @@ QDeclarativeScriptBlob *QDeclarativeTypeLoader::getScript(const QUrl &url) } /*! -Returns a QDeclarativeQmldirData for \a url. The QDeclarativeQmldirData may be cached. +Returns a QQmlQmldirData for \a url. The QQmlQmldirData may be cached. */ -QDeclarativeQmldirData *QDeclarativeTypeLoader::getQmldir(const QUrl &url) +QQmlQmldirData *QQmlTypeLoader::getQmldir(const QUrl &url) { Q_ASSERT(!url.isRelative() && - (QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url).isEmpty() || - !QDir::isRelativePath(QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url)))); + (QQmlEnginePrivate::urlToLocalFileOrQrc(url).isEmpty() || + !QDir::isRelativePath(QQmlEnginePrivate::urlToLocalFileOrQrc(url)))); lock(); - QDeclarativeQmldirData *qmldirData = m_qmldirCache.value(url); + QQmlQmldirData *qmldirData = m_qmldirCache.value(url); if (!qmldirData) { - qmldirData = new QDeclarativeQmldirData(url); + qmldirData = new QQmlQmldirData(url); m_qmldirCache.insert(url, qmldirData); - QDeclarativeDataLoader::load(qmldirData); + QQmlDataLoader::load(qmldirData); } qmldirData->addref(); @@ -1269,7 +1269,7 @@ Returns the absolute filename of path via a directory cache for files named "qmldir", "*.qml", "*.js", and plugins. Returns a empty string if the path does not exist. */ -QString QDeclarativeTypeLoader::absoluteFilePath(const QString &path) +QString QQmlTypeLoader::absoluteFilePath(const QString &path) { if (path.isEmpty()) return QString(); @@ -1316,7 +1316,7 @@ QString QDeclarativeTypeLoader::absoluteFilePath(const QString &path) Returns true if the path is a directory via a directory cache. Cache is shared with absoluteFilePath(). */ -bool QDeclarativeTypeLoader::directoryExists(const QString &path) +bool QQmlTypeLoader::directoryExists(const QString &path) { if (path.isEmpty()) return false; @@ -1352,14 +1352,14 @@ bool QDeclarativeTypeLoader::directoryExists(const QString &path) /*! -Return a QDeclarativeDirParser for absoluteFilePath. The QDeclarativeDirParser may be cached. +Return a QQmlDirParser for absoluteFilePath. The QQmlDirParser may be cached. */ -const QDeclarativeDirParser *QDeclarativeTypeLoader::qmlDirParser(const QString &absoluteFilePath) +const QQmlDirParser *QQmlTypeLoader::qmlDirParser(const QString &absoluteFilePath) { - QDeclarativeDirParser *qmldirParser; - QDeclarativeDirParser **val = m_importQmlDirCache.value(absoluteFilePath); + QQmlDirParser *qmldirParser; + QQmlDirParser **val = m_importQmlDirCache.value(absoluteFilePath); if (!val) { - qmldirParser = new QDeclarativeDirParser; + qmldirParser = new QQmlDirParser; qmldirParser->setFileSource(absoluteFilePath); qmldirParser->setUrl(QUrl::fromLocalFile(absoluteFilePath)); qmldirParser->parse(); @@ -1376,7 +1376,7 @@ const QDeclarativeDirParser *QDeclarativeTypeLoader::qmlDirParser(const QString Clears cached information about loaded files, including any type data, scripts and qmldir information. */ -void QDeclarativeTypeLoader::clearCache() +void QQmlTypeLoader::clearCache() { for (TypeCache::Iterator iter = m_typeCache.begin(); iter != m_typeCache.end(); ++iter) (*iter)->release(); @@ -1395,14 +1395,14 @@ void QDeclarativeTypeLoader::clearCache() } -QDeclarativeTypeData::QDeclarativeTypeData(const QUrl &url, QDeclarativeTypeLoader::Options options, - QDeclarativeTypeLoader *manager) -: QDeclarativeDataBlob(url, QmlFile), m_options(options), m_imports(manager), m_typesResolved(false), +QQmlTypeData::QQmlTypeData(const QUrl &url, QQmlTypeLoader::Options options, + QQmlTypeLoader *manager) +: QQmlDataBlob(url, QmlFile), m_options(options), m_imports(manager), m_typesResolved(false), m_compiledData(0), m_typeLoader(manager) { } -QDeclarativeTypeData::~QDeclarativeTypeData() +QQmlTypeData::~QQmlTypeData() { for (int ii = 0; ii < m_scripts.count(); ++ii) m_scripts.at(ii).script->release(); @@ -1414,37 +1414,37 @@ QDeclarativeTypeData::~QDeclarativeTypeData() m_compiledData->release(); } -QDeclarativeTypeLoader *QDeclarativeTypeData::typeLoader() const +QQmlTypeLoader *QQmlTypeData::typeLoader() const { return m_typeLoader; } -const QDeclarativeImports &QDeclarativeTypeData::imports() const +const QQmlImports &QQmlTypeData::imports() const { return m_imports; } -const QDeclarativeScript::Parser &QDeclarativeTypeData::parser() const +const QQmlScript::Parser &QQmlTypeData::parser() const { return scriptParser; } -const QList &QDeclarativeTypeData::resolvedTypes() const +const QList &QQmlTypeData::resolvedTypes() const { return m_types; } -const QList &QDeclarativeTypeData::resolvedScripts() const +const QList &QQmlTypeData::resolvedScripts() const { return m_scripts; } -const QSet &QDeclarativeTypeData::namespaces() const +const QSet &QQmlTypeData::namespaces() const { return m_namespaces; } -QDeclarativeCompiledData *QDeclarativeTypeData::compiledData() const +QQmlCompiledData *QQmlTypeData::compiledData() const { if (m_compiledData) m_compiledData->addref(); @@ -1452,32 +1452,32 @@ QDeclarativeCompiledData *QDeclarativeTypeData::compiledData() const return m_compiledData; } -void QDeclarativeTypeData::registerCallback(TypeDataCallback *callback) +void QQmlTypeData::registerCallback(TypeDataCallback *callback) { Q_ASSERT(!m_callbacks.contains(callback)); m_callbacks.append(callback); } -void QDeclarativeTypeData::unregisterCallback(TypeDataCallback *callback) +void QQmlTypeData::unregisterCallback(TypeDataCallback *callback) { Q_ASSERT(m_callbacks.contains(callback)); m_callbacks.removeOne(callback); Q_ASSERT(!m_callbacks.contains(callback)); } -void QDeclarativeTypeData::done() +void QQmlTypeData::done() { // Check all script dependencies for errors for (int ii = 0; !isError() && ii < m_scripts.count(); ++ii) { const ScriptReference &script = m_scripts.at(ii); Q_ASSERT(script.script->isCompleteOrError()); if (script.script->isError()) { - QList errors = script.script->errors(); - QDeclarativeError error; + QList errors = script.script->errors(); + QQmlError error; error.setUrl(finalUrl()); error.setLine(script.location.line); error.setColumn(script.location.column); - error.setDescription(QDeclarativeTypeLoader::tr("Script %1 unavailable").arg(script.script->url().toString())); + error.setDescription(QQmlTypeLoader::tr("Script %1 unavailable").arg(script.script->url().toString())); errors.prepend(error); setError(errors); } @@ -1490,12 +1490,12 @@ void QDeclarativeTypeData::done() if (type.typeData && type.typeData->isError()) { QString typeName = scriptParser.referencedTypes().at(ii)->name; - QList errors = type.typeData->errors(); - QDeclarativeError error; + QList errors = type.typeData->errors(); + QQmlError error; error.setUrl(finalUrl()); error.setLine(type.location.line); error.setColumn(type.location.column); - error.setDescription(QDeclarativeTypeLoader::tr("Type %1 unavailable").arg(typeName)); + error.setDescription(QQmlTypeLoader::tr("Type %1 unavailable").arg(typeName)); errors.prepend(error); setError(errors); } @@ -1505,11 +1505,11 @@ void QDeclarativeTypeData::done() if (!isError()) compile(); - if (!(m_options & QDeclarativeTypeLoader::PreserveParser)) + if (!(m_options & QQmlTypeLoader::PreserveParser)) scriptParser.clear(); } -void QDeclarativeTypeData::completed() +void QQmlTypeData::completed() { // Notify callbacks while (!m_callbacks.isEmpty()) { @@ -1518,7 +1518,7 @@ void QDeclarativeTypeData::completed() } } -void QDeclarativeTypeData::dataReceived(const QByteArray &data) +void QQmlTypeData::dataReceived(const QByteArray &data) { if (!scriptParser.parse(data, finalUrl(), finalUrlString())) { setError(scriptParser.errors()); @@ -1527,17 +1527,17 @@ void QDeclarativeTypeData::dataReceived(const QByteArray &data) m_imports.setBaseUrl(finalUrl(), finalUrlString()); - foreach (const QDeclarativeScript::Import &import, scriptParser.imports()) { - if (import.type == QDeclarativeScript::Import::File && import.qualifier.isEmpty()) { + foreach (const QQmlScript::Import &import, scriptParser.imports()) { + if (import.type == QQmlScript::Import::File && import.qualifier.isEmpty()) { QUrl importUrl = finalUrl().resolved(QUrl(import.uri + QLatin1String("/qmldir"))); - if (QDeclarativeEnginePrivate::urlToLocalFileOrQrc(importUrl).isEmpty()) { - QDeclarativeQmldirData *data = typeLoader()->getQmldir(importUrl); + if (QQmlEnginePrivate::urlToLocalFileOrQrc(importUrl).isEmpty()) { + QQmlQmldirData *data = typeLoader()->getQmldir(importUrl); addDependency(data); m_qmldirs << data; } - } else if (import.type == QDeclarativeScript::Import::Script) { + } else if (import.type == QQmlScript::Import::Script) { QUrl scriptUrl = finalUrl().resolved(QUrl(import.uri)); - QDeclarativeScriptBlob *blob = typeLoader()->getScript(scriptUrl); + QQmlScriptBlob *blob = typeLoader()->getScript(scriptUrl); addDependency(blob); ScriptReference ref; @@ -1551,15 +1551,15 @@ void QDeclarativeTypeData::dataReceived(const QByteArray &data) if (!finalUrl().scheme().isEmpty()) { QUrl importUrl = finalUrl().resolved(QUrl(QLatin1String("qmldir"))); - if (QDeclarativeEnginePrivate::urlToLocalFileOrQrc(importUrl).isEmpty()) { - QDeclarativeQmldirData *data = typeLoader()->getQmldir(importUrl); + if (QQmlEnginePrivate::urlToLocalFileOrQrc(importUrl).isEmpty()) { + QQmlQmldirData *data = typeLoader()->getQmldir(importUrl); addDependency(data); m_qmldirs << data; } } } -void QDeclarativeTypeData::allDependenciesDone() +void QQmlTypeData::allDependenciesDone() { if (!m_typesResolved) { resolveTypes(); @@ -1567,7 +1567,7 @@ void QDeclarativeTypeData::allDependenciesDone() } } -void QDeclarativeTypeData::downloadProgressChanged(qreal p) +void QQmlTypeData::downloadProgressChanged(qreal p) { for (int ii = 0; ii < m_callbacks.count(); ++ii) { TypeDataCallback *callback = m_callbacks.at(ii); @@ -1575,51 +1575,51 @@ void QDeclarativeTypeData::downloadProgressChanged(qreal p) } } -void QDeclarativeTypeData::compile() +void QQmlTypeData::compile() { Q_ASSERT(m_compiledData == 0); - QDeclarativeProfilerService::startRange(QDeclarativeProfilerService::Compiling); + QQmlProfilerService::startRange(QQmlProfilerService::Compiling); - m_compiledData = new QDeclarativeCompiledData(typeLoader()->engine()); + m_compiledData = new QQmlCompiledData(typeLoader()->engine()); m_compiledData->url = finalUrl(); m_compiledData->name = finalUrlString(); - QDeclarativeProfilerService::rangeLocation(QDeclarativeProfilerService::Compiling, QUrl(m_compiledData->name),1,1); - QDeclarativeProfilerService::rangeData(QDeclarativeProfilerService::Compiling, m_compiledData->name); + QQmlProfilerService::rangeLocation(QQmlProfilerService::Compiling, QUrl(m_compiledData->name),1,1); + QQmlProfilerService::rangeData(QQmlProfilerService::Compiling, m_compiledData->name); - QDeclarativeCompiler compiler(&scriptParser._pool); + QQmlCompiler compiler(&scriptParser._pool); if (!compiler.compile(typeLoader()->engine(), this, m_compiledData)) { setError(compiler.errors()); m_compiledData->release(); m_compiledData = 0; } - QDeclarativeProfilerService::endRange(QDeclarativeProfilerService::Compiling); + QQmlProfilerService::endRange(QQmlProfilerService::Compiling); } -void QDeclarativeTypeData::resolveTypes() +void QQmlTypeData::resolveTypes() { - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(m_typeLoader->engine()); - QDeclarativeImportDatabase *importDatabase = &ep->importDatabase; + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(m_typeLoader->engine()); + QQmlImportDatabase *importDatabase = &ep->importDatabase; // For local urls, add an implicit import "." as first (most overridden) lookup. // This will also trigger the loading of the qmldir and the import of any native // types from available plugins. - QList errors; - if (QDeclarativeQmldirData *qmldir = qmldirForUrl(finalUrl().resolved(QUrl(QLatin1String("./qmldir"))))) { + QList errors; + if (QQmlQmldirData *qmldir = qmldirForUrl(finalUrl().resolved(QUrl(QLatin1String("./qmldir"))))) { m_imports.addImport(importDatabase, QLatin1String("."), - QString(), -1, -1, QDeclarativeScript::Import::File, + QString(), -1, -1, QQmlScript::Import::File, qmldir->dirComponents(), &errors); } else { m_imports.addImport(importDatabase, QLatin1String("."), - QString(), -1, -1, QDeclarativeScript::Import::File, - QDeclarativeDirComponents(), &errors); + QString(), -1, -1, QQmlScript::Import::File, + QQmlDirComponents(), &errors); } // remove any errors which are due to the implicit import which aren't real errors. // for example, if the implicitly included qmldir file doesn't exist, that is not an error. - QList realErrors; + QList realErrors; for (int i = 0; i < errors.size(); ++i) { - if (errors.at(i).description() != QDeclarativeImportDatabase::tr("import \".\" has no qmldir and no namespace") - && errors.at(i).description() != QDeclarativeImportDatabase::tr("\".\": no such directory")) { + if (errors.at(i).description() != QQmlImportDatabase::tr("import \".\" has no qmldir and no namespace") + && errors.at(i).description() != QQmlImportDatabase::tr("\".\": no such directory")) { realErrors.prepend(errors.at(i)); // this is a real error. } } @@ -1630,14 +1630,14 @@ void QDeclarativeTypeData::resolveTypes() return; } - foreach (const QDeclarativeScript::Import &import, scriptParser.imports()) { - QDeclarativeDirComponents qmldircomponentsnetwork; - if (import.type == QDeclarativeScript::Import::Script) + foreach (const QQmlScript::Import &import, scriptParser.imports()) { + QQmlDirComponents qmldircomponentsnetwork; + if (import.type == QQmlScript::Import::Script) continue; - if (import.type == QDeclarativeScript::Import::File && import.qualifier.isEmpty()) { + if (import.type == QQmlScript::Import::File && import.qualifier.isEmpty()) { QUrl qmldirUrl = finalUrl().resolved(QUrl(import.uri + QLatin1String("/qmldir"))); - if (QDeclarativeQmldirData *qmldir = qmldirForUrl(qmldirUrl)) + if (QQmlQmldirData *qmldir = qmldirForUrl(qmldirUrl)) qmldircomponentsnetwork = qmldir->dirComponents(); } @@ -1645,16 +1645,16 @@ void QDeclarativeTypeData::resolveTypes() int vmin = -1; import.extractVersion(&vmaj, &vmin); - QList errors; + QList errors; if (!m_imports.addImport(importDatabase, import.uri, import.qualifier, vmaj, vmin, import.type, qmldircomponentsnetwork, &errors)) { - QDeclarativeError error; + QQmlError error; if (errors.size()) { error = errors.takeFirst(); } else { // this should not be possible! // Description should come from error provided by addImport() function. - error.setDescription(QDeclarativeTypeLoader::tr("Unreported error adding script import to import database")); + error.setDescription(QQmlTypeLoader::tr("Unreported error adding script import to import database")); } error.setUrl(m_imports.baseUrl()); error.setLine(import.location.start.line); @@ -1667,9 +1667,9 @@ void QDeclarativeTypeData::resolveTypes() } // Add any imported scripts to our resolved set - foreach (const QDeclarativeImports::ScriptReference &script, m_imports.resolvedScripts()) + foreach (const QQmlImports::ScriptReference &script, m_imports.resolvedScripts()) { - QDeclarativeScriptBlob *blob = typeLoader()->getScript(script.location); + QQmlScriptBlob *blob = typeLoader()->getScript(script.location); addDependency(blob); ScriptReference ref; @@ -1687,39 +1687,39 @@ void QDeclarativeTypeData::resolveTypes() m_scripts << ref; } - foreach (QDeclarativeScript::TypeReference *parserRef, scriptParser.referencedTypes()) { + foreach (QQmlScript::TypeReference *parserRef, scriptParser.referencedTypes()) { TypeReference ref; QString url; int majorVersion; int minorVersion; - QDeclarativeImportedNamespace *typeNamespace = 0; - QList errors; + QQmlImportedNamespace *typeNamespace = 0; + QList errors; if (!m_imports.resolveType(parserRef->name, &ref.type, &url, &majorVersion, &minorVersion, &typeNamespace, &errors) || typeNamespace) { // Known to not be a type: // - known to be a namespace (Namespace {}) // - type with unknown namespace (UnknownNamespace.SomeType {}) - QDeclarativeError error; + QQmlError error; QString userTypeName = parserRef->name; userTypeName.replace(QLatin1Char('/'),QLatin1Char('.')); if (typeNamespace) { - error.setDescription(QDeclarativeTypeLoader::tr("Namespace %1 cannot be used as a type").arg(userTypeName)); + error.setDescription(QQmlTypeLoader::tr("Namespace %1 cannot be used as a type").arg(userTypeName)); } else { if (errors.size()) { error = errors.takeFirst(); } else { // this should not be possible! // Description should come from error provided by addImport() function. - error.setDescription(QDeclarativeTypeLoader::tr("Unreported error adding script import to import database")); + error.setDescription(QQmlTypeLoader::tr("Unreported error adding script import to import database")); } error.setUrl(m_imports.baseUrl()); - error.setDescription(QDeclarativeTypeLoader::tr("%1 %2").arg(userTypeName).arg(error.description())); + error.setDescription(QQmlTypeLoader::tr("%1 %2").arg(userTypeName).arg(error.description())); } if (!parserRef->refObjects.isEmpty()) { - QDeclarativeScript::Object *obj = parserRef->refObjects.first(); + QQmlScript::Object *obj = parserRef->refObjects.first(); error.setLine(obj->location.start.line); error.setColumn(obj->location.start.column); } @@ -1744,7 +1744,7 @@ void QDeclarativeTypeData::resolveTypes() } } -QDeclarativeQmldirData *QDeclarativeTypeData::qmldirForUrl(const QUrl &url) +QQmlQmldirData *QQmlTypeData::qmldirForUrl(const QUrl &url) { for (int ii = 0; ii < m_qmldirs.count(); ++ii) { if (m_qmldirs.at(ii)->url() == url) @@ -1753,16 +1753,16 @@ QDeclarativeQmldirData *QDeclarativeTypeData::qmldirForUrl(const QUrl &url) return 0; } -QDeclarativeScriptData::QDeclarativeScriptData() -: importCache(0), pragmas(QDeclarativeScript::Object::ScriptBlock::None), m_loaded(false) +QQmlScriptData::QQmlScriptData() +: importCache(0), pragmas(QQmlScript::Object::ScriptBlock::None), m_loaded(false) { } -QDeclarativeScriptData::~QDeclarativeScriptData() +QQmlScriptData::~QQmlScriptData() { } -void QDeclarativeScriptData::clear() +void QQmlScriptData::clear() { if (importCache) { importCache->release(); @@ -1776,17 +1776,17 @@ void QDeclarativeScriptData::clear() qPersistentDispose(m_program); qPersistentDispose(m_value); - // An addref() was made when the QDeclarativeCleanup was added to the engine. + // An addref() was made when the QQmlCleanup was added to the engine. release(); } -QDeclarativeScriptBlob::QDeclarativeScriptBlob(const QUrl &url, QDeclarativeTypeLoader *loader) -: QDeclarativeDataBlob(url, JavaScriptFile), m_pragmas(QDeclarativeScript::Object::ScriptBlock::None), +QQmlScriptBlob::QQmlScriptBlob(const QUrl &url, QQmlTypeLoader *loader) +: QQmlDataBlob(url, JavaScriptFile), m_pragmas(QQmlScript::Object::ScriptBlock::None), m_imports(loader), m_scriptData(0), m_typeLoader(loader) { } -QDeclarativeScriptBlob::~QDeclarativeScriptBlob() +QQmlScriptBlob::~QQmlScriptBlob() { if (m_scriptData) { m_scriptData->release(); @@ -1794,46 +1794,46 @@ QDeclarativeScriptBlob::~QDeclarativeScriptBlob() } } -QDeclarativeScript::Object::ScriptBlock::Pragmas QDeclarativeScriptBlob::pragmas() const +QQmlScript::Object::ScriptBlock::Pragmas QQmlScriptBlob::pragmas() const { return m_pragmas; } -QDeclarativeTypeLoader *QDeclarativeScriptBlob::typeLoader() const +QQmlTypeLoader *QQmlScriptBlob::typeLoader() const { return m_typeLoader; } -const QDeclarativeImports &QDeclarativeScriptBlob::imports() const +const QQmlImports &QQmlScriptBlob::imports() const { return m_imports; } -QDeclarativeScriptData *QDeclarativeScriptBlob::scriptData() const +QQmlScriptData *QQmlScriptBlob::scriptData() const { return m_scriptData; } -void QDeclarativeScriptBlob::dataReceived(const QByteArray &data) +void QQmlScriptBlob::dataReceived(const QByteArray &data) { - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(m_typeLoader->engine()); - QDeclarativeImportDatabase *importDatabase = &ep->importDatabase; + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(m_typeLoader->engine()); + QQmlImportDatabase *importDatabase = &ep->importDatabase; m_source = QString::fromUtf8(data); - QDeclarativeScript::Parser::JavaScriptMetaData metadata = - QDeclarativeScript::Parser::extractMetaData(m_source); + QQmlScript::Parser::JavaScriptMetaData metadata = + QQmlScript::Parser::extractMetaData(m_source); m_imports.setBaseUrl(finalUrl(), finalUrlString()); m_pragmas = metadata.pragmas; - foreach (const QDeclarativeScript::Import &import, metadata.imports) { - Q_ASSERT(import.type != QDeclarativeScript::Import::File); + foreach (const QQmlScript::Import &import, metadata.imports) { + Q_ASSERT(import.type != QQmlScript::Import::File); - if (import.type == QDeclarativeScript::Import::Script) { + if (import.type == QQmlScript::Import::Script) { QUrl scriptUrl = finalUrl().resolved(QUrl(import.uri)); - QDeclarativeScriptBlob *blob = typeLoader()->getScript(scriptUrl); + QQmlScriptBlob *blob = typeLoader()->getScript(scriptUrl); addDependency(blob); ScriptReference ref; @@ -1842,15 +1842,15 @@ void QDeclarativeScriptBlob::dataReceived(const QByteArray &data) ref.script = blob; m_scripts << ref; } else { - Q_ASSERT(import.type == QDeclarativeScript::Import::Library); + Q_ASSERT(import.type == QQmlScript::Import::Library); int vmaj = -1; int vmin = -1; import.extractVersion(&vmaj, &vmin); - QList errors; + QList errors; if (!m_imports.addImport(importDatabase, import.uri, import.qualifier, vmaj, vmin, - import.type, QDeclarativeDirComponents(), &errors)) { - QDeclarativeError error = errors.takeFirst(); + import.type, QQmlDirComponents(), &errors)) { + QQmlError error = errors.takeFirst(); // description should be set by addImport(). error.setUrl(m_imports.baseUrl()); error.setLine(import.location.start.line); @@ -1864,15 +1864,15 @@ void QDeclarativeScriptBlob::dataReceived(const QByteArray &data) } } -void QDeclarativeScriptBlob::done() +void QQmlScriptBlob::done() { // Check all script dependencies for errors for (int ii = 0; !isError() && ii < m_scripts.count(); ++ii) { const ScriptReference &script = m_scripts.at(ii); Q_ASSERT(script.script->isCompleteOrError()); if (script.script->isError()) { - QList errors = script.script->errors(); - QDeclarativeError error; + QList errors = script.script->errors(); + QQmlError error; error.setUrl(finalUrl()); error.setLine(script.location.line); error.setColumn(script.location.column); @@ -1885,11 +1885,11 @@ void QDeclarativeScriptBlob::done() if (isError()) return; - QDeclarativeEngine *engine = typeLoader()->engine(); - m_scriptData = new QDeclarativeScriptData(); + QQmlEngine *engine = typeLoader()->engine(); + m_scriptData = new QQmlScriptData(); m_scriptData->url = finalUrl(); m_scriptData->urlString = finalUrlString(); - m_scriptData->importCache = new QDeclarativeTypeNameCache(); + m_scriptData->importCache = new QQmlTypeNameCache(); for (int ii = 0; !isError() && ii < m_scripts.count(); ++ii) { const ScriptReference &script = m_scripts.at(ii); @@ -1905,19 +1905,19 @@ void QDeclarativeScriptBlob::done() m_source.clear(); } -QDeclarativeQmldirData::QDeclarativeQmldirData(const QUrl &url) -: QDeclarativeDataBlob(url, QmldirFile) +QQmlQmldirData::QQmlQmldirData(const QUrl &url) +: QQmlDataBlob(url, QmldirFile) { } -const QDeclarativeDirComponents &QDeclarativeQmldirData::dirComponents() const +const QQmlDirComponents &QQmlQmldirData::dirComponents() const { return m_components; } -void QDeclarativeQmldirData::dataReceived(const QByteArray &data) +void QQmlQmldirData::dataReceived(const QByteArray &data) { - QDeclarativeDirParser parser; + QQmlDirParser parser; parser.setSource(QString::fromUtf8(data)); parser.parse(); m_components = parser.components(); @@ -1925,4 +1925,4 @@ void QDeclarativeQmldirData::dataReceived(const QByteArray &data) QT_END_NAMESPACE -#include "qdeclarativetypeloader.moc" +#include "qqmltypeloader.moc" diff --git a/src/declarative/qml/qdeclarativetypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h similarity index 52% rename from src/declarative/qml/qdeclarativetypeloader_p.h rename to src/qml/qml/qqmltypeloader_p.h index 7b35fea916..0dd7adecac 100644 --- a/src/declarative/qml/qdeclarativetypeloader_p.h +++ b/src/qml/qml/qqmltypeloader_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVETYPELOADER_P_H -#define QDECLARATIVETYPELOADER_P_H +#ifndef QQMLTYPELOADER_P_H +#define QQMLTYPELOADER_P_H // // W A R N I N G @@ -56,34 +56,34 @@ #include #include #include -#include -#include +#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeScriptData; -class QDeclarativeScriptBlob; -class QDeclarativeQmldirData; -class QDeclarativeTypeLoader; -class QDeclarativeCompiledData; -class QDeclarativeComponentPrivate; -class QDeclarativeTypeData; -class QDeclarativeDataLoader; -class QDeclarativeExtensionInterface; +class QQmlScriptData; +class QQmlScriptBlob; +class QQmlQmldirData; +class QQmlTypeLoader; +class QQmlCompiledData; +class QQmlComponentPrivate; +class QQmlTypeData; +class QQmlDataLoader; +class QQmlExtensionInterface; // Exported for QtQuick1 -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDataBlob : public QDeclarativeRefCount +class Q_QML_PRIVATE_EXPORT QQmlDataBlob : public QQmlRefCount { public: enum Status { - Null, // Prior to QDeclarativeDataLoader::load() + Null, // Prior to QQmlDataLoader::load() Loading, // Prior to data being received and dataReceived() being called WaitingForDependencies, // While there are outstanding addDependency()s Complete, // Finished @@ -96,8 +96,8 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDataBlob : public QDeclarativeRef QmldirFile }; - QDeclarativeDataBlob(const QUrl &, Type); - virtual ~QDeclarativeDataBlob(); + QQmlDataBlob(const QUrl &, Type); + virtual ~QQmlDataBlob(); Type type() const; @@ -115,38 +115,38 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDataBlob : public QDeclarativeRef QUrl finalUrl() const; QString finalUrlString() const; - QList errors() const; + QList errors() const; protected: // Can be called from within callbacks - void setError(const QDeclarativeError &); - void setError(const QList &errors); - void addDependency(QDeclarativeDataBlob *); + void setError(const QQmlError &); + void setError(const QList &errors); + void addDependency(QQmlDataBlob *); // Callbacks made in load thread virtual void dataReceived(const QByteArray &) = 0; virtual void done(); virtual void networkError(QNetworkReply::NetworkError); - virtual void dependencyError(QDeclarativeDataBlob *); - virtual void dependencyComplete(QDeclarativeDataBlob *); + virtual void dependencyError(QQmlDataBlob *); + virtual void dependencyComplete(QQmlDataBlob *); virtual void allDependenciesDone(); // Callbacks made in main thread virtual void downloadProgressChanged(qreal); virtual void completed(); private: - friend class QDeclarativeDataLoader; - friend class QDeclarativeDataLoaderThread; + friend class QQmlDataLoader; + friend class QQmlDataLoaderThread; void tryDone(); void cancelAllWaitingFor(); void notifyAllWaitingOnMe(); - void notifyComplete(QDeclarativeDataBlob *); + void notifyComplete(QQmlDataBlob *); struct ThreadData { inline ThreadData(); - inline QDeclarativeDataBlob::Status status() const; - inline void setStatus(QDeclarativeDataBlob::Status); + inline QQmlDataBlob::Status status() const; + inline void setStatus(QQmlDataBlob::Status); inline bool isAsync() const; inline void setIsAsync(bool); inline quint8 progress() const; @@ -161,7 +161,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDataBlob : public QDeclarativeRef // We use the status change as a memory fence around m_errors so that locking // isn't required. Once the status is set to Error (or Complete), m_errors // cannot be changed. - QList m_errors; + QList m_errors; Type m_type; @@ -169,26 +169,26 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDataBlob : public QDeclarativeRef QUrl m_finalUrl; mutable QString m_finalUrlString; - // List of QDeclarativeDataBlob's that are waiting for me to complete. - QList m_waitingOnMe; + // List of QQmlDataBlob's that are waiting for me to complete. + QList m_waitingOnMe; - // List of QDeclarativeDataBlob's that I am waiting for to complete. - QList m_waitingFor; + // List of QQmlDataBlob's that I am waiting for to complete. + QList m_waitingFor; // Manager that is currently fetching data for me - QDeclarativeDataLoader *m_manager; + QQmlDataLoader *m_manager; int m_redirectCount:30; bool m_inCallback:1; bool m_isDone:1; }; -class QDeclarativeDataLoaderThread; +class QQmlDataLoaderThread; // Exported for QtQuick1 -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDataLoader +class Q_QML_PRIVATE_EXPORT QQmlDataLoader { public: - QDeclarativeDataLoader(QDeclarativeEngine *); - ~QDeclarativeDataLoader(); + QQmlDataLoader(QQmlEngine *); + ~QQmlDataLoader(); void lock(); void unlock(); @@ -197,38 +197,38 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDataLoader enum Mode { PreferSynchronous, Asynchronous }; - void load(QDeclarativeDataBlob *, Mode = PreferSynchronous); - void loadWithStaticData(QDeclarativeDataBlob *, const QByteArray &, Mode = PreferSynchronous); + void load(QQmlDataBlob *, Mode = PreferSynchronous); + void loadWithStaticData(QQmlDataBlob *, const QByteArray &, Mode = PreferSynchronous); - QDeclarativeEngine *engine() const; - void initializeEngine(QDeclarativeExtensionInterface *, const char *); + QQmlEngine *engine() const; + void initializeEngine(QQmlExtensionInterface *, const char *); private: - friend class QDeclarativeDataBlob; - friend class QDeclarativeDataLoaderThread; - friend class QDeclarativeDataLoaderNetworkReplyProxy; + friend class QQmlDataBlob; + friend class QQmlDataLoaderThread; + friend class QQmlDataLoaderNetworkReplyProxy; - void loadThread(QDeclarativeDataBlob *); - void loadWithStaticDataThread(QDeclarativeDataBlob *, const QByteArray &); + void loadThread(QQmlDataBlob *); + void loadWithStaticDataThread(QQmlDataBlob *, const QByteArray &); void networkReplyFinished(QNetworkReply *); void networkReplyProgress(QNetworkReply *, qint64, qint64); - typedef QHash NetworkReplies; + typedef QHash NetworkReplies; - void setData(QDeclarativeDataBlob *, const QByteArray &); + void setData(QQmlDataBlob *, const QByteArray &); - QDeclarativeEngine *m_engine; - QDeclarativeDataLoaderThread *m_thread; + QQmlEngine *m_engine; + QQmlDataLoaderThread *m_thread; NetworkReplies m_networkReplies; }; // Exported for QtQuick1 -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeTypeLoader : public QDeclarativeDataLoader +class Q_QML_PRIVATE_EXPORT QQmlTypeLoader : public QQmlDataLoader { - Q_DECLARE_TR_FUNCTIONS(QDeclarativeTypeLoader) + Q_DECLARE_TR_FUNCTIONS(QQmlTypeLoader) public: - QDeclarativeTypeLoader(QDeclarativeEngine *); - ~QDeclarativeTypeLoader(); + QQmlTypeLoader(QQmlEngine *); + ~QQmlTypeLoader(); enum Option { None, @@ -236,23 +236,23 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeTypeLoader : public QDeclarativeD }; Q_DECLARE_FLAGS(Options, Option) - QDeclarativeTypeData *get(const QUrl &url); - QDeclarativeTypeData *get(const QByteArray &, const QUrl &url, Options = None); + QQmlTypeData *get(const QUrl &url); + QQmlTypeData *get(const QByteArray &, const QUrl &url, Options = None); void clearCache(); - QDeclarativeScriptBlob *getScript(const QUrl &); - QDeclarativeQmldirData *getQmldir(const QUrl &); + QQmlScriptBlob *getScript(const QUrl &); + QQmlQmldirData *getQmldir(const QUrl &); QString absoluteFilePath(const QString &path); bool directoryExists(const QString &path); - const QDeclarativeDirParser *qmlDirParser(const QString &absoluteFilePath); + const QQmlDirParser *qmlDirParser(const QString &absoluteFilePath); private: - typedef QHash TypeCache; - typedef QHash ScriptCache; - typedef QHash QmldirCache; + typedef QHash TypeCache; + typedef QHash ScriptCache; + typedef QHash QmldirCache; typedef QStringHash StringSet; typedef QStringHash ImportDirCache; - typedef QStringHash ImportQmlDirCache; + typedef QStringHash ImportQmlDirCache; TypeCache m_typeCache; ScriptCache m_scriptCache; @@ -261,50 +261,50 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeTypeLoader : public QDeclarativeD ImportQmlDirCache m_importQmlDirCache; }; -Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeTypeLoader::Options) +Q_DECLARE_OPERATORS_FOR_FLAGS(QQmlTypeLoader::Options) -class Q_AUTOTEST_EXPORT QDeclarativeTypeData : public QDeclarativeDataBlob +class Q_AUTOTEST_EXPORT QQmlTypeData : public QQmlDataBlob { public: struct TypeReference { TypeReference() : type(0), majorVersion(0), minorVersion(0), typeData(0) {} - QDeclarativeScript::Location location; - QDeclarativeType *type; + QQmlScript::Location location; + QQmlType *type; int majorVersion; int minorVersion; - QDeclarativeTypeData *typeData; + QQmlTypeData *typeData; }; struct ScriptReference { ScriptReference() : script(0) {} - QDeclarativeScript::Location location; + QQmlScript::Location location; QString qualifier; - QDeclarativeScriptBlob *script; + QQmlScriptBlob *script; }; - QDeclarativeTypeData(const QUrl &, QDeclarativeTypeLoader::Options, QDeclarativeTypeLoader *); - ~QDeclarativeTypeData(); + QQmlTypeData(const QUrl &, QQmlTypeLoader::Options, QQmlTypeLoader *); + ~QQmlTypeData(); - QDeclarativeTypeLoader *typeLoader() const; + QQmlTypeLoader *typeLoader() const; - const QDeclarativeImports &imports() const; - const QDeclarativeScript::Parser &parser() const; + const QQmlImports &imports() const; + const QQmlScript::Parser &parser() const; const QList &resolvedTypes() const; const QList &resolvedScripts() const; const QSet &namespaces() const; - QDeclarativeCompiledData *compiledData() const; + QQmlCompiledData *compiledData() const; - // Used by QDeclarativeComponent to get notifications + // Used by QQmlComponent to get notifications struct TypeDataCallback { ~TypeDataCallback() {} - virtual void typeDataProgress(QDeclarativeTypeData *, qreal) {} - virtual void typeDataReady(QDeclarativeTypeData *) {} + virtual void typeDataProgress(QQmlTypeData *, qreal) {} + virtual void typeDataReady(QQmlTypeData *) {} }; void registerCallback(TypeDataCallback *); void unregisterCallback(TypeDataCallback *); @@ -320,57 +320,57 @@ class Q_AUTOTEST_EXPORT QDeclarativeTypeData : public QDeclarativeDataBlob void resolveTypes(); void compile(); - QDeclarativeTypeLoader::Options m_options; + QQmlTypeLoader::Options m_options; - QDeclarativeQmldirData *qmldirForUrl(const QUrl &); + QQmlQmldirData *qmldirForUrl(const QUrl &); - QDeclarativeScript::Parser scriptParser; - QDeclarativeImports m_imports; + QQmlScript::Parser scriptParser; + QQmlImports m_imports; QList m_scripts; - QList m_qmldirs; + QList m_qmldirs; QSet m_namespaces; QList m_types; bool m_typesResolved:1; - QDeclarativeCompiledData *m_compiledData; + QQmlCompiledData *m_compiledData; QList m_callbacks; - QDeclarativeTypeLoader *m_typeLoader; + QQmlTypeLoader *m_typeLoader; }; -// QDeclarativeScriptData instances are created, uninitialized, by the loader in the +// QQmlScriptData instances are created, uninitialized, by the loader in the // load thread. The first time they are used by the VME, they are initialized which // creates their v8 objects and they are referenced and added to the engine's cleanup -// list. During QDeclarativeCleanup::clear() all v8 resources are destroyed, and the +// list. During QQmlCleanup::clear() all v8 resources are destroyed, and the // reference that was created is released but final deletion only occurs once all the // references as released. This is all intended to ensure that the v8 resources are // only created and destroyed in the main thread :) -class Q_AUTOTEST_EXPORT QDeclarativeScriptData : public QDeclarativeCleanup, - public QDeclarativeRefCount +class Q_AUTOTEST_EXPORT QQmlScriptData : public QQmlCleanup, + public QQmlRefCount { public: - QDeclarativeScriptData(); - ~QDeclarativeScriptData(); + QQmlScriptData(); + ~QQmlScriptData(); QUrl url; QString urlString; - QDeclarativeTypeNameCache *importCache; - QList scripts; - QDeclarativeScript::Object::ScriptBlock::Pragmas pragmas; + QQmlTypeNameCache *importCache; + QList scripts; + QQmlScript::Object::ScriptBlock::Pragmas pragmas; bool isInitialized() const { return hasEngine(); } - void initialize(QDeclarativeEngine *); + void initialize(QQmlEngine *); protected: - virtual void clear(); // From QDeclarativeCleanup + virtual void clear(); // From QQmlCleanup private: - friend class QDeclarativeVME; - friend class QDeclarativeScriptBlob; + friend class QQmlVME; + friend class QQmlScriptBlob; bool m_loaded; QByteArray m_programSource; @@ -378,58 +378,58 @@ class Q_AUTOTEST_EXPORT QDeclarativeScriptData : public QDeclarativeCleanup, v8::Persistent m_value; }; -class Q_AUTOTEST_EXPORT QDeclarativeScriptBlob : public QDeclarativeDataBlob +class Q_AUTOTEST_EXPORT QQmlScriptBlob : public QQmlDataBlob { public: - QDeclarativeScriptBlob(const QUrl &, QDeclarativeTypeLoader *); - ~QDeclarativeScriptBlob(); + QQmlScriptBlob(const QUrl &, QQmlTypeLoader *); + ~QQmlScriptBlob(); struct ScriptReference { ScriptReference() : script(0) {} - QDeclarativeScript::Location location; + QQmlScript::Location location; QString qualifier; - QDeclarativeScriptBlob *script; + QQmlScriptBlob *script; }; - QDeclarativeScript::Object::ScriptBlock::Pragmas pragmas() const; + QQmlScript::Object::ScriptBlock::Pragmas pragmas() const; - QDeclarativeTypeLoader *typeLoader() const; - const QDeclarativeImports &imports() const; + QQmlTypeLoader *typeLoader() const; + const QQmlImports &imports() const; - QDeclarativeScriptData *scriptData() const; + QQmlScriptData *scriptData() const; protected: virtual void dataReceived(const QByteArray &); virtual void done(); private: - QDeclarativeScript::Object::ScriptBlock::Pragmas m_pragmas; + QQmlScript::Object::ScriptBlock::Pragmas m_pragmas; QString m_source; - QDeclarativeImports m_imports; + QQmlImports m_imports; QList m_scripts; - QDeclarativeScriptData *m_scriptData; + QQmlScriptData *m_scriptData; - QDeclarativeTypeLoader *m_typeLoader; + QQmlTypeLoader *m_typeLoader; }; -class Q_AUTOTEST_EXPORT QDeclarativeQmldirData : public QDeclarativeDataBlob +class Q_AUTOTEST_EXPORT QQmlQmldirData : public QQmlDataBlob { public: - QDeclarativeQmldirData(const QUrl &); + QQmlQmldirData(const QUrl &); - const QDeclarativeDirComponents &dirComponents() const; + const QQmlDirComponents &dirComponents() const; protected: virtual void dataReceived(const QByteArray &); private: - QDeclarativeDirComponents m_components; + QQmlDirComponents m_components; }; QT_END_NAMESPACE -#endif // QDECLARATIVETYPELOADER_P_H +#endif // QQMLTYPELOADER_P_H diff --git a/src/declarative/qml/qdeclarativetypenamecache.cpp b/src/qml/qml/qqmltypenamecache.cpp similarity index 77% rename from src/declarative/qml/qdeclarativetypenamecache.cpp rename to src/qml/qml/qqmltypenamecache.cpp index 9d433d4472..f9d3e7704c 100644 --- a/src/declarative/qml/qdeclarativetypenamecache.cpp +++ b/src/qml/qml/qqmltypenamecache.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,21 +39,21 @@ ** ****************************************************************************/ -#include "qdeclarativetypenamecache_p.h" +#include "qqmltypenamecache_p.h" -#include "qdeclarativeengine_p.h" +#include "qqmlengine_p.h" QT_BEGIN_NAMESPACE -QDeclarativeTypeNameCache::QDeclarativeTypeNameCache() +QQmlTypeNameCache::QQmlTypeNameCache() { } -QDeclarativeTypeNameCache::~QDeclarativeTypeNameCache() +QQmlTypeNameCache::~QQmlTypeNameCache() { } -void QDeclarativeTypeNameCache::add(const QHashedString &name, int importedScriptIndex, const QHashedString &nameSpace) +void QQmlTypeNameCache::add(const QHashedString &name, int importedScriptIndex, const QHashedString &nameSpace) { Import import; import.scriptIndex = importedScriptIndex; @@ -71,7 +71,7 @@ void QDeclarativeTypeNameCache::add(const QHashedString &name, int importedScrip m_namedImports.insert(name, import); } -QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashedStringRef &name) +QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name) { Result result = query(m_namedImports, name); @@ -81,7 +81,7 @@ QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashed return result; } -QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashedStringRef &name, +QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name, const void *importNamespace) { Q_ASSERT(importNamespace); @@ -91,7 +91,7 @@ QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashed return typeSearch(i->modules, name); } -QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashedV8String &name) +QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedV8String &name) { Result result = query(m_namedImports, name); @@ -101,7 +101,7 @@ QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashed return result; } -QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashedV8String &name, const void *importNamespace) +QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedV8String &name, const void *importNamespace) { Q_ASSERT(importNamespace); const Import *i = static_cast(importNamespace); @@ -114,7 +114,7 @@ QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashed return typeSearch(i->modules, name); } -QDeclarativeMetaType::ModuleApiInstance *QDeclarativeTypeNameCache::moduleApi(const void *importNamespace) +QQmlMetaType::ModuleApiInstance *QQmlTypeNameCache::moduleApi(const void *importNamespace) { Q_ASSERT(importNamespace); const Import *i = static_cast(importNamespace); diff --git a/src/declarative/qml/qdeclarativetypenamecache_p.h b/src/qml/qml/qqmltypenamecache_p.h similarity index 69% rename from src/declarative/qml/qdeclarativetypenamecache_p.h rename to src/qml/qml/qqmltypenamecache_p.h index 9cf52f9d72..a9268db37a 100644 --- a/src/declarative/qml/qdeclarativetypenamecache_p.h +++ b/src/qml/qml/qqmltypenamecache_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVETYPENAMECACHE_P_H -#define QDECLARATIVETYPENAMECACHE_P_H +#ifndef QQMLTYPENAMECACHE_P_H +#define QQMLTYPENAMECACHE_P_H // // W A R N I N G @@ -53,9 +53,9 @@ // We mean it. // -#include -#include "qdeclarativecleanup_p.h" -#include "qdeclarativemetatype_p.h" +#include +#include "qqmlcleanup_p.h" +#include "qqmlmetatype_p.h" #include @@ -63,13 +63,13 @@ QT_BEGIN_NAMESPACE -class QDeclarativeType; -class QDeclarativeEngine; -class QDeclarativeTypeNameCache : public QDeclarativeRefCount +class QQmlType; +class QQmlEngine; +class QQmlTypeNameCache : public QQmlRefCount { public: - QDeclarativeTypeNameCache(); - virtual ~QDeclarativeTypeNameCache(); + QQmlTypeNameCache(); + virtual ~QQmlTypeNameCache(); inline bool isEmpty() const; @@ -78,13 +78,13 @@ class QDeclarativeTypeNameCache : public QDeclarativeRefCount struct Result { inline Result(); inline Result(const void *importNamespace); - inline Result(QDeclarativeType *type); + inline Result(QQmlType *type); inline Result(int scriptIndex); inline Result(const Result &); inline bool isValid() const; - QDeclarativeType *type; + QQmlType *type; const void *importNamespace; int scriptIndex; }; @@ -92,16 +92,16 @@ class QDeclarativeTypeNameCache : public QDeclarativeRefCount Result query(const QHashedStringRef &, const void *importNamespace); Result query(const QHashedV8String &); Result query(const QHashedV8String &, const void *importNamespace); - QDeclarativeMetaType::ModuleApiInstance *moduleApi(const void *importNamespace); + QQmlMetaType::ModuleApiInstance *moduleApi(const void *importNamespace); private: - friend class QDeclarativeImports; + friend class QQmlImports; struct Import { inline Import(); // Imported module - QDeclarativeMetaType::ModuleApiInstance *moduleApi; - QVector modules; + QQmlMetaType::ModuleApiInstance *moduleApi; + QVector modules; // Or, imported script int scriptIndex; @@ -123,11 +123,11 @@ class QDeclarativeTypeNameCache : public QDeclarativeRefCount } template - Result typeSearch(const QVector &modules, Key key) + Result typeSearch(const QVector &modules, Key key) { - QVector::const_iterator end = modules.constEnd(); - for (QVector::const_iterator it = modules.constBegin(); it != end; ++it) { - if (QDeclarativeType *type = it->type(key)) + QVector::const_iterator end = modules.constEnd(); + for (QVector::const_iterator it = modules.constBegin(); it != end; ++it) { + if (QQmlType *type = it->type(key)) return Result(type); } @@ -136,52 +136,52 @@ class QDeclarativeTypeNameCache : public QDeclarativeRefCount QStringHash m_namedImports; QMap > m_namespacedImports; - QVector m_anonymousImports; + QVector m_anonymousImports; - QDeclarativeEngine *engine; + QQmlEngine *engine; }; -QDeclarativeTypeNameCache::Result::Result() +QQmlTypeNameCache::Result::Result() : type(0), importNamespace(0), scriptIndex(-1) { } -QDeclarativeTypeNameCache::Result::Result(const void *importNamespace) +QQmlTypeNameCache::Result::Result(const void *importNamespace) : type(0), importNamespace(importNamespace), scriptIndex(-1) { } -QDeclarativeTypeNameCache::Result::Result(QDeclarativeType *type) +QQmlTypeNameCache::Result::Result(QQmlType *type) : type(type), importNamespace(0), scriptIndex(-1) { } -QDeclarativeTypeNameCache::Result::Result(int scriptIndex) +QQmlTypeNameCache::Result::Result(int scriptIndex) : type(0), importNamespace(0), scriptIndex(scriptIndex) { } -QDeclarativeTypeNameCache::Result::Result(const Result &o) +QQmlTypeNameCache::Result::Result(const Result &o) : type(o.type), importNamespace(o.importNamespace), scriptIndex(o.scriptIndex) { } -bool QDeclarativeTypeNameCache::Result::isValid() const +bool QQmlTypeNameCache::Result::isValid() const { return type || importNamespace || scriptIndex != -1; } -QDeclarativeTypeNameCache::Import::Import() +QQmlTypeNameCache::Import::Import() : moduleApi(0), scriptIndex(-1) { } -bool QDeclarativeTypeNameCache::isEmpty() const +bool QQmlTypeNameCache::isEmpty() const { return m_namedImports.isEmpty() && m_anonymousImports.isEmpty(); } QT_END_NAMESPACE -#endif // QDECLARATIVETYPENAMECACHE_P_H +#endif // QQMLTYPENAMECACHE_P_H diff --git a/src/declarative/qml/qdeclarativetypenotavailable.cpp b/src/qml/qml/qqmltypenotavailable.cpp similarity index 85% rename from src/declarative/qml/qdeclarativetypenotavailable.cpp rename to src/qml/qml/qqmltypenotavailable.cpp index ed24b4e8be..6eb891af71 100644 --- a/src/declarative/qml/qdeclarativetypenotavailable.cpp +++ b/src/qml/qml/qqmltypenotavailable.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#include "qdeclarativetypenotavailable_p.h" +#include "qqmltypenotavailable_p.h" QT_BEGIN_NAMESPACE int qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message) { - return qmlRegisterUncreatableType(uri,versionMajor,versionMinor,qmlName,message); + return qmlRegisterUncreatableType(uri,versionMajor,versionMinor,qmlName,message); } -QDeclarativeTypeNotAvailable::QDeclarativeTypeNotAvailable() { } +QQmlTypeNotAvailable::QQmlTypeNotAvailable() { } QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativetypenotavailable_p.h b/src/qml/qml/qqmltypenotavailable_p.h similarity index 83% rename from src/declarative/qml/qdeclarativetypenotavailable_p.h rename to src/qml/qml/qqmltypenotavailable_p.h index 05ed6fd5ff..d0618a0686 100644 --- a/src/declarative/qml/qdeclarativetypenotavailable_p.h +++ b/src/qml/qml/qqmltypenotavailable_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,26 +39,26 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVETYPENOTAVAILABLE_H -#define QDECLARATIVETYPENOTAVAILABLE_H +#ifndef QQMLTYPENOTAVAILABLE_H +#define QQMLTYPENOTAVAILABLE_H -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeTypeNotAvailable : public QObject { +class QQmlTypeNotAvailable : public QObject { Q_OBJECT public: - QDeclarativeTypeNotAvailable(); + QQmlTypeNotAvailable(); }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeTypeNotAvailable) +QML_DECLARE_TYPE(QQmlTypeNotAvailable) QT_END_HEADER -#endif // QDECLARATIVETYPENOTAVAILABLE_H +#endif // QQMLTYPENOTAVAILABLE_H diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/qml/qml/qqmlvaluetype.cpp similarity index 58% rename from src/declarative/qml/qdeclarativevaluetype.cpp rename to src/qml/qml/qqmlvaluetype.cpp index 6dd3a84dc9..4ade00f9b4 100644 --- a/src/declarative/qml/qdeclarativevaluetype.cpp +++ b/src/qml/qml/qqmlvaluetype.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include "qdeclarativevaluetype_p.h" +#include "qqmlvaluetype_p.h" -#include "qdeclarativemetatype_p.h" +#include "qqmlmetatype_p.h" #include #include @@ -55,7 +55,7 @@ int qmlRegisterValueTypeEnums(const char *uri, int versionMajor, int versionMino QByteArray pointerName(name + '*'); - QDeclarativePrivate::RegisterType type = { + QQmlPrivate::RegisterType type = { 0, qRegisterMetaType(pointerName.constData()), 0, 0, 0, @@ -74,23 +74,23 @@ int qmlRegisterValueTypeEnums(const char *uri, int versionMajor, int versionMino 0 }; - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); + return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type); } -QDeclarativeValueTypeFactory::QDeclarativeValueTypeFactory() +QQmlValueTypeFactory::QQmlValueTypeFactory() { // ### Optimize for (unsigned int ii = 0; ii < (QVariant::UserType - 1); ++ii) valueTypes[ii] = valueType(ii); } -QDeclarativeValueTypeFactory::~QDeclarativeValueTypeFactory() +QQmlValueTypeFactory::~QQmlValueTypeFactory() { for (unsigned int ii = 0; ii < (QVariant::UserType - 1); ++ii) delete valueTypes[ii]; } -bool QDeclarativeValueTypeFactory::isValueType(int idx) +bool QQmlValueTypeFactory::isValueType(int idx) { if ((uint)idx < QVariant::UserType && idx != QVariant::StringList @@ -103,63 +103,63 @@ bool QDeclarativeValueTypeFactory::isValueType(int idx) return false; } -void QDeclarativeValueTypeFactory::registerBaseTypes(const char *uri, int versionMajor, int versionMinor) +void QQmlValueTypeFactory::registerBaseTypes(const char *uri, int versionMajor, int versionMinor) { - qmlRegisterValueTypeEnums(uri, versionMajor, versionMinor, "Easing"); - qmlRegisterValueTypeEnums(uri, versionMajor, versionMinor, "Font"); + qmlRegisterValueTypeEnums(uri, versionMajor, versionMinor, "Easing"); + qmlRegisterValueTypeEnums(uri, versionMajor, versionMinor, "Font"); } -void QDeclarativeValueTypeFactory::registerValueTypes() +void QQmlValueTypeFactory::registerValueTypes() { registerBaseTypes("QtQuick", 2, 0); } -QDeclarativeValueType *QDeclarativeValueTypeFactory::valueType(int t) +QQmlValueType *QQmlValueTypeFactory::valueType(int t) { - QDeclarativeValueType *rv = 0; + QQmlValueType *rv = 0; switch (t) { case QVariant::Point: - rv = new QDeclarativePointValueType; + rv = new QQmlPointValueType; break; case QVariant::PointF: - rv = new QDeclarativePointFValueType; + rv = new QQmlPointFValueType; break; case QVariant::Size: - rv = new QDeclarativeSizeValueType; + rv = new QQmlSizeValueType; break; case QVariant::SizeF: - rv = new QDeclarativeSizeFValueType; + rv = new QQmlSizeFValueType; break; case QVariant::Rect: - rv = new QDeclarativeRectValueType; + rv = new QQmlRectValueType; break; case QVariant::RectF: - rv = new QDeclarativeRectFValueType; + rv = new QQmlRectFValueType; break; case QVariant::Vector2D: - rv = new QDeclarativeVector2DValueType; + rv = new QQmlVector2DValueType; break; case QVariant::Vector3D: - rv = new QDeclarativeVector3DValueType; + rv = new QQmlVector3DValueType; break; case QVariant::Vector4D: - rv = new QDeclarativeVector4DValueType; + rv = new QQmlVector4DValueType; break; case QVariant::Quaternion: - rv = new QDeclarativeQuaternionValueType; + rv = new QQmlQuaternionValueType; break; case QVariant::Matrix4x4: - rv = new QDeclarativeMatrix4x4ValueType; + rv = new QQmlMatrix4x4ValueType; break; case QVariant::EasingCurve: - rv = new QDeclarativeEasingValueType; + rv = new QQmlEasingValueType; break; case QVariant::Font: - rv = new QDeclarativeFontValueType; + rv = new QQmlFontValueType; break; case QVariant::Color: - rv = new QDeclarativeColorValueType; + rv = new QQmlColorValueType; break; default: break; @@ -169,38 +169,38 @@ QDeclarativeValueType *QDeclarativeValueTypeFactory::valueType(int t) return rv; } -QDeclarativeValueType::QDeclarativeValueType(QObject *parent) +QQmlValueType::QQmlValueType(QObject *parent) : QObject(parent) { } #define QML_VALUETYPE_READWRITE(name, cpptype, var) \ - QDeclarative ## name ## ValueType::QDeclarative ## name ## ValueType(QObject *parent) \ - : QDeclarativeValueType(parent) \ + QQml ## name ## ValueType::QQml ## name ## ValueType(QObject *parent) \ + : QQmlValueType(parent) \ { \ } \ - void QDeclarative ## name ## ValueType::read(QObject *obj, int idx) \ + void QQml ## name ## ValueType::read(QObject *obj, int idx) \ { \ void *a[] = { &var, 0 }; \ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a); \ onLoad(); \ } \ - void QDeclarative ## name ## ValueType::write(QObject *obj, int idx, \ - QDeclarativePropertyPrivate::WriteFlags flags) \ + void QQml ## name ## ValueType::write(QObject *obj, int idx, \ + QQmlPropertyPrivate::WriteFlags flags) \ { \ int status = -1; \ void *a[] = { &var, 0, &status, &flags }; \ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a); \ } \ - bool QDeclarative ## name ## ValueType::isEqual(const QVariant &value) const \ + bool QQml ## name ## ValueType::isEqual(const QVariant &value) const \ { \ return QVariant(var) == value; \ } \ - QVariant QDeclarative ## name ## ValueType::value() \ + QVariant QQml ## name ## ValueType::value() \ { \ return QVariant(var); \ } \ - void QDeclarative ## name ## ValueType::setValue(const QVariant &value) \ + void QQml ## name ## ValueType::setValue(const QVariant &value) \ { \ var = qvariant_cast(value); \ onLoad(); \ @@ -221,347 +221,347 @@ QML_VALUETYPE_READWRITE(Easing, QEasingCurve, easing); QML_VALUETYPE_READWRITE(Font, QFont, font); QML_VALUETYPE_READWRITE(Color, QColor, color); -QString QDeclarativePointFValueType::toString() const +QString QQmlPointFValueType::toString() const { return QString(QLatin1String("QPointF(%1, %2)")).arg(point.x()).arg(point.y()); } -qreal QDeclarativePointFValueType::x() const +qreal QQmlPointFValueType::x() const { return point.x(); } -qreal QDeclarativePointFValueType::y() const +qreal QQmlPointFValueType::y() const { return point.y(); } -void QDeclarativePointFValueType::setX(qreal x) +void QQmlPointFValueType::setX(qreal x) { point.setX(x); } -void QDeclarativePointFValueType::setY(qreal y) +void QQmlPointFValueType::setY(qreal y) { point.setY(y); } -QString QDeclarativePointValueType::toString() const +QString QQmlPointValueType::toString() const { return QString(QLatin1String("QPoint(%1, %2)")).arg(point.x()).arg(point.y()); } -int QDeclarativePointValueType::x() const +int QQmlPointValueType::x() const { return point.x(); } -int QDeclarativePointValueType::y() const +int QQmlPointValueType::y() const { return point.y(); } -void QDeclarativePointValueType::setX(int x) +void QQmlPointValueType::setX(int x) { point.setX(x); } -void QDeclarativePointValueType::setY(int y) +void QQmlPointValueType::setY(int y) { point.setY(y); } -QString QDeclarativeSizeFValueType::toString() const +QString QQmlSizeFValueType::toString() const { return QString(QLatin1String("QSizeF(%1, %2)")).arg(size.width()).arg(size.height()); } -qreal QDeclarativeSizeFValueType::width() const +qreal QQmlSizeFValueType::width() const { return size.width(); } -qreal QDeclarativeSizeFValueType::height() const +qreal QQmlSizeFValueType::height() const { return size.height(); } -void QDeclarativeSizeFValueType::setWidth(qreal w) +void QQmlSizeFValueType::setWidth(qreal w) { size.setWidth(w); } -void QDeclarativeSizeFValueType::setHeight(qreal h) +void QQmlSizeFValueType::setHeight(qreal h) { size.setHeight(h); } -QString QDeclarativeSizeValueType::toString() const +QString QQmlSizeValueType::toString() const { return QString(QLatin1String("QSize(%1, %2)")).arg(size.width()).arg(size.height()); } -int QDeclarativeSizeValueType::width() const +int QQmlSizeValueType::width() const { return size.width(); } -int QDeclarativeSizeValueType::height() const +int QQmlSizeValueType::height() const { return size.height(); } -void QDeclarativeSizeValueType::setWidth(int w) +void QQmlSizeValueType::setWidth(int w) { size.setWidth(w); } -void QDeclarativeSizeValueType::setHeight(int h) +void QQmlSizeValueType::setHeight(int h) { size.setHeight(h); } -QString QDeclarativeRectFValueType::toString() const +QString QQmlRectFValueType::toString() const { return QString(QLatin1String("QRectF(%1, %2, %3, %4)")).arg(rect.x()).arg(rect.y()).arg(rect.width()).arg(rect.height()); } -qreal QDeclarativeRectFValueType::x() const +qreal QQmlRectFValueType::x() const { return rect.x(); } -qreal QDeclarativeRectFValueType::y() const +qreal QQmlRectFValueType::y() const { return rect.y(); } -void QDeclarativeRectFValueType::setX(qreal x) +void QQmlRectFValueType::setX(qreal x) { rect.moveLeft(x); } -void QDeclarativeRectFValueType::setY(qreal y) +void QQmlRectFValueType::setY(qreal y) { rect.moveTop(y); } -qreal QDeclarativeRectFValueType::width() const +qreal QQmlRectFValueType::width() const { return rect.width(); } -qreal QDeclarativeRectFValueType::height() const +qreal QQmlRectFValueType::height() const { return rect.height(); } -void QDeclarativeRectFValueType::setWidth(qreal w) +void QQmlRectFValueType::setWidth(qreal w) { rect.setWidth(w); } -void QDeclarativeRectFValueType::setHeight(qreal h) +void QQmlRectFValueType::setHeight(qreal h) { rect.setHeight(h); } -QString QDeclarativeRectValueType::toString() const +QString QQmlRectValueType::toString() const { return QString(QLatin1String("QRect(%1, %2, %3, %4)")).arg(rect.x()).arg(rect.y()).arg(rect.width()).arg(rect.height()); } -int QDeclarativeRectValueType::x() const +int QQmlRectValueType::x() const { return rect.x(); } -int QDeclarativeRectValueType::y() const +int QQmlRectValueType::y() const { return rect.y(); } -void QDeclarativeRectValueType::setX(int x) +void QQmlRectValueType::setX(int x) { rect.moveLeft(x); } -void QDeclarativeRectValueType::setY(int y) +void QQmlRectValueType::setY(int y) { rect.moveTop(y); } -int QDeclarativeRectValueType::width() const +int QQmlRectValueType::width() const { return rect.width(); } -int QDeclarativeRectValueType::height() const +int QQmlRectValueType::height() const { return rect.height(); } -void QDeclarativeRectValueType::setWidth(int w) +void QQmlRectValueType::setWidth(int w) { rect.setWidth(w); } -void QDeclarativeRectValueType::setHeight(int h) +void QQmlRectValueType::setHeight(int h) { rect.setHeight(h); } -QString QDeclarativeVector2DValueType::toString() const +QString QQmlVector2DValueType::toString() const { return QString(QLatin1String("QVector2D(%1, %2)")).arg(vector.x()).arg(vector.y()); } -qreal QDeclarativeVector2DValueType::x() const +qreal QQmlVector2DValueType::x() const { return vector.x(); } -qreal QDeclarativeVector2DValueType::y() const +qreal QQmlVector2DValueType::y() const { return vector.y(); } -void QDeclarativeVector2DValueType::setX(qreal x) +void QQmlVector2DValueType::setX(qreal x) { vector.setX(x); } -void QDeclarativeVector2DValueType::setY(qreal y) +void QQmlVector2DValueType::setY(qreal y) { vector.setY(y); } -QString QDeclarativeVector3DValueType::toString() const +QString QQmlVector3DValueType::toString() const { return QString(QLatin1String("QVector3D(%1, %2, %3)")).arg(vector.x()).arg(vector.y()).arg(vector.z()); } -qreal QDeclarativeVector3DValueType::x() const +qreal QQmlVector3DValueType::x() const { return vector.x(); } -qreal QDeclarativeVector3DValueType::y() const +qreal QQmlVector3DValueType::y() const { return vector.y(); } -qreal QDeclarativeVector3DValueType::z() const +qreal QQmlVector3DValueType::z() const { return vector.z(); } -void QDeclarativeVector3DValueType::setX(qreal x) +void QQmlVector3DValueType::setX(qreal x) { vector.setX(x); } -void QDeclarativeVector3DValueType::setY(qreal y) +void QQmlVector3DValueType::setY(qreal y) { vector.setY(y); } -void QDeclarativeVector3DValueType::setZ(qreal z) +void QQmlVector3DValueType::setZ(qreal z) { vector.setZ(z); } -QString QDeclarativeVector4DValueType::toString() const +QString QQmlVector4DValueType::toString() const { return QString(QLatin1String("QVector4D(%1, %2, %3, %4)")).arg(vector.x()).arg(vector.y()).arg(vector.z()).arg(vector.w()); } -qreal QDeclarativeVector4DValueType::x() const +qreal QQmlVector4DValueType::x() const { return vector.x(); } -qreal QDeclarativeVector4DValueType::y() const +qreal QQmlVector4DValueType::y() const { return vector.y(); } -qreal QDeclarativeVector4DValueType::z() const +qreal QQmlVector4DValueType::z() const { return vector.z(); } -qreal QDeclarativeVector4DValueType::w() const +qreal QQmlVector4DValueType::w() const { return vector.w(); } -void QDeclarativeVector4DValueType::setX(qreal x) +void QQmlVector4DValueType::setX(qreal x) { vector.setX(x); } -void QDeclarativeVector4DValueType::setY(qreal y) +void QQmlVector4DValueType::setY(qreal y) { vector.setY(y); } -void QDeclarativeVector4DValueType::setZ(qreal z) +void QQmlVector4DValueType::setZ(qreal z) { vector.setZ(z); } -void QDeclarativeVector4DValueType::setW(qreal w) +void QQmlVector4DValueType::setW(qreal w) { vector.setW(w); } -QString QDeclarativeQuaternionValueType::toString() const +QString QQmlQuaternionValueType::toString() const { return QString(QLatin1String("QQuaternion(%1, %2, %3, %4)")).arg(quaternion.scalar()).arg(quaternion.x()).arg(quaternion.y()).arg(quaternion.z()); } -qreal QDeclarativeQuaternionValueType::scalar() const +qreal QQmlQuaternionValueType::scalar() const { return quaternion.scalar(); } -qreal QDeclarativeQuaternionValueType::x() const +qreal QQmlQuaternionValueType::x() const { return quaternion.x(); } -qreal QDeclarativeQuaternionValueType::y() const +qreal QQmlQuaternionValueType::y() const { return quaternion.y(); } -qreal QDeclarativeQuaternionValueType::z() const +qreal QQmlQuaternionValueType::z() const { return quaternion.z(); } -void QDeclarativeQuaternionValueType::setScalar(qreal scalar) +void QQmlQuaternionValueType::setScalar(qreal scalar) { quaternion.setScalar(scalar); } -void QDeclarativeQuaternionValueType::setX(qreal x) +void QQmlQuaternionValueType::setX(qreal x) { quaternion.setX(x); } -void QDeclarativeQuaternionValueType::setY(qreal y) +void QQmlQuaternionValueType::setY(qreal y) { quaternion.setY(y); } -void QDeclarativeQuaternionValueType::setZ(qreal z) +void QQmlQuaternionValueType::setZ(qreal z) { quaternion.setZ(z); } -QString QDeclarativeMatrix4x4ValueType::toString() const +QString QQmlMatrix4x4ValueType::toString() const { return QString(QLatin1String("QMatrix4x4(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15, %16)")) .arg(matrix(0, 0)).arg(matrix(0, 1)).arg(matrix(0, 2)).arg(matrix(0, 3)) @@ -570,52 +570,52 @@ QString QDeclarativeMatrix4x4ValueType::toString() const .arg(matrix(3, 0)).arg(matrix(3, 1)).arg(matrix(3, 2)).arg(matrix(3, 3)); } -QString QDeclarativeEasingValueType::toString() const +QString QQmlEasingValueType::toString() const { return QString(QLatin1String("QEasingCurve(%1, %2, %3, %4)")).arg(easing.type()).arg(easing.amplitude()).arg(easing.overshoot()).arg(easing.period()); } -QDeclarativeEasingValueType::Type QDeclarativeEasingValueType::type() const +QQmlEasingValueType::Type QQmlEasingValueType::type() const { - return (QDeclarativeEasingValueType::Type)easing.type(); + return (QQmlEasingValueType::Type)easing.type(); } -qreal QDeclarativeEasingValueType::amplitude() const +qreal QQmlEasingValueType::amplitude() const { return easing.amplitude(); } -qreal QDeclarativeEasingValueType::overshoot() const +qreal QQmlEasingValueType::overshoot() const { return easing.overshoot(); } -qreal QDeclarativeEasingValueType::period() const +qreal QQmlEasingValueType::period() const { return easing.period(); } -void QDeclarativeEasingValueType::setType(QDeclarativeEasingValueType::Type type) +void QQmlEasingValueType::setType(QQmlEasingValueType::Type type) { easing.setType((QEasingCurve::Type)type); } -void QDeclarativeEasingValueType::setAmplitude(qreal amplitude) +void QQmlEasingValueType::setAmplitude(qreal amplitude) { easing.setAmplitude(amplitude); } -void QDeclarativeEasingValueType::setOvershoot(qreal overshoot) +void QQmlEasingValueType::setOvershoot(qreal overshoot) { easing.setOvershoot(overshoot); } -void QDeclarativeEasingValueType::setPeriod(qreal period) +void QQmlEasingValueType::setPeriod(qreal period) { easing.setPeriod(period); } -void QDeclarativeEasingValueType::setBezierCurve(const QVariantList &customCurveVariant) +void QQmlEasingValueType::setBezierCurve(const QVariantList &customCurveVariant) { if (customCurveVariant.isEmpty()) return; @@ -652,7 +652,7 @@ void QDeclarativeEasingValueType::setBezierCurve(const QVariantList &customCurve } } -QVariantList QDeclarativeEasingValueType::bezierCurve() const +QVariantList QQmlEasingValueType::bezierCurve() const { QVariantList rv; QList points = easing.cubicBezierSpline(); @@ -661,88 +661,88 @@ QVariantList QDeclarativeEasingValueType::bezierCurve() const return rv; } -void QDeclarativeFontValueType::onLoad() +void QQmlFontValueType::onLoad() { pixelSizeSet = false; pointSizeSet = false; } -QString QDeclarativeFontValueType::toString() const +QString QQmlFontValueType::toString() const { return QString(QLatin1String("QFont(%1)")).arg(font.toString()); } -QString QDeclarativeFontValueType::family() const +QString QQmlFontValueType::family() const { return font.family(); } -void QDeclarativeFontValueType::setFamily(const QString &family) +void QQmlFontValueType::setFamily(const QString &family) { font.setFamily(family); } -bool QDeclarativeFontValueType::bold() const +bool QQmlFontValueType::bold() const { return font.bold(); } -void QDeclarativeFontValueType::setBold(bool b) +void QQmlFontValueType::setBold(bool b) { font.setBold(b); } -QDeclarativeFontValueType::FontWeight QDeclarativeFontValueType::weight() const +QQmlFontValueType::FontWeight QQmlFontValueType::weight() const { - return (QDeclarativeFontValueType::FontWeight)font.weight(); + return (QQmlFontValueType::FontWeight)font.weight(); } -void QDeclarativeFontValueType::setWeight(QDeclarativeFontValueType::FontWeight w) +void QQmlFontValueType::setWeight(QQmlFontValueType::FontWeight w) { font.setWeight((QFont::Weight)w); } -bool QDeclarativeFontValueType::italic() const +bool QQmlFontValueType::italic() const { return font.italic(); } -void QDeclarativeFontValueType::setItalic(bool b) +void QQmlFontValueType::setItalic(bool b) { font.setItalic(b); } -bool QDeclarativeFontValueType::underline() const +bool QQmlFontValueType::underline() const { return font.underline(); } -void QDeclarativeFontValueType::setUnderline(bool b) +void QQmlFontValueType::setUnderline(bool b) { font.setUnderline(b); } -bool QDeclarativeFontValueType::overline() const +bool QQmlFontValueType::overline() const { return font.overline(); } -void QDeclarativeFontValueType::setOverline(bool b) +void QQmlFontValueType::setOverline(bool b) { font.setOverline(b); } -bool QDeclarativeFontValueType::strikeout() const +bool QQmlFontValueType::strikeout() const { return font.strikeOut(); } -void QDeclarativeFontValueType::setStrikeout(bool b) +void QQmlFontValueType::setStrikeout(bool b) { font.setStrikeOut(b); } -qreal QDeclarativeFontValueType::pointSize() const +qreal QQmlFontValueType::pointSize() const { if (font.pointSizeF() == -1) { if (dpi.isNull) @@ -752,7 +752,7 @@ qreal QDeclarativeFontValueType::pointSize() const return font.pointSizeF(); } -void QDeclarativeFontValueType::setPointSize(qreal size) +void QQmlFontValueType::setPointSize(qreal size) { if (pixelSizeSet) { qWarning() << "Both point size and pixel size set. Using pixel size."; @@ -767,7 +767,7 @@ void QDeclarativeFontValueType::setPointSize(qreal size) } } -int QDeclarativeFontValueType::pixelSize() const +int QQmlFontValueType::pixelSize() const { if (font.pixelSize() == -1) { if (dpi.isNull) @@ -777,7 +777,7 @@ int QDeclarativeFontValueType::pixelSize() const return font.pixelSize(); } -void QDeclarativeFontValueType::setPixelSize(int size) +void QQmlFontValueType::setPixelSize(int size) { if (size >0) { if (pointSizeSet) @@ -789,78 +789,78 @@ void QDeclarativeFontValueType::setPixelSize(int size) } } -QDeclarativeFontValueType::Capitalization QDeclarativeFontValueType::capitalization() const +QQmlFontValueType::Capitalization QQmlFontValueType::capitalization() const { - return (QDeclarativeFontValueType::Capitalization)font.capitalization(); + return (QQmlFontValueType::Capitalization)font.capitalization(); } -void QDeclarativeFontValueType::setCapitalization(QDeclarativeFontValueType::Capitalization c) +void QQmlFontValueType::setCapitalization(QQmlFontValueType::Capitalization c) { font.setCapitalization((QFont::Capitalization)c); } -qreal QDeclarativeFontValueType::letterSpacing() const +qreal QQmlFontValueType::letterSpacing() const { return font.letterSpacing(); } -void QDeclarativeFontValueType::setLetterSpacing(qreal size) +void QQmlFontValueType::setLetterSpacing(qreal size) { font.setLetterSpacing(QFont::AbsoluteSpacing, size); } -qreal QDeclarativeFontValueType::wordSpacing() const +qreal QQmlFontValueType::wordSpacing() const { return font.wordSpacing(); } -void QDeclarativeFontValueType::setWordSpacing(qreal size) +void QQmlFontValueType::setWordSpacing(qreal size) { font.setWordSpacing(size); } -QString QDeclarativeColorValueType::toString() const +QString QQmlColorValueType::toString() const { // special case - to maintain behaviour with QtQuick 1.0, we just output normal toString() value. return QVariant(color).toString(); } -qreal QDeclarativeColorValueType::r() const +qreal QQmlColorValueType::r() const { return color.redF(); } -qreal QDeclarativeColorValueType::g() const +qreal QQmlColorValueType::g() const { return color.greenF(); } -qreal QDeclarativeColorValueType::b() const +qreal QQmlColorValueType::b() const { return color.blueF(); } -qreal QDeclarativeColorValueType::a() const +qreal QQmlColorValueType::a() const { return color.alphaF(); } -void QDeclarativeColorValueType::setR(qreal r) +void QQmlColorValueType::setR(qreal r) { color.setRedF(r); } -void QDeclarativeColorValueType::setG(qreal g) +void QQmlColorValueType::setG(qreal g) { color.setGreenF(g); } -void QDeclarativeColorValueType::setB(qreal b) +void QQmlColorValueType::setB(qreal b) { color.setBlueF(b); } -void QDeclarativeColorValueType::setA(qreal a) +void QQmlColorValueType::setA(qreal a) { color.setAlphaF(a); } diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/qml/qml/qqmlvaluetype_p.h similarity index 80% rename from src/declarative/qml/qdeclarativevaluetype_p.h rename to src/qml/qml/qqmlvaluetype_p.h index be4c4c2e6d..71817c2a2d 100644 --- a/src/declarative/qml/qdeclarativevaluetype_p.h +++ b/src/qml/qml/qqmlvaluetype_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEVALUETYPE_P_H -#define QDECLARATIVEVALUETYPE_P_H +#ifndef QQMLVALUETYPE_P_H +#define QQMLVALUETYPE_P_H // // W A R N I N G @@ -53,9 +53,9 @@ // We mean it. // -#include "qdeclarativeproperty.h" -#include "qdeclarativeproperty_p.h" -#include "qdeclarativenullablevalue_p_p.h" +#include "qqmlproperty.h" +#include "qqmlproperty_p.h" +#include "qqmlnullablevalue_p_p.h" #include #include @@ -71,13 +71,13 @@ QT_BEGIN_NAMESPACE -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeValueType : public QObject +class Q_QML_PRIVATE_EXPORT QQmlValueType : public QObject { Q_OBJECT public: - QDeclarativeValueType(QObject *parent = 0); + QQmlValueType(QObject *parent = 0); virtual void read(QObject *, int) = 0; - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags flags) = 0; + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags flags) = 0; virtual QVariant value() = 0; virtual void setValue(const QVariant &) = 0; @@ -87,37 +87,37 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeValueType : public QObject inline void onLoad(); }; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeValueTypeFactory +class Q_QML_PRIVATE_EXPORT QQmlValueTypeFactory { public: - QDeclarativeValueTypeFactory(); - ~QDeclarativeValueTypeFactory(); + QQmlValueTypeFactory(); + ~QQmlValueTypeFactory(); static bool isValueType(int); - static QDeclarativeValueType *valueType(int); + static QQmlValueType *valueType(int); static void registerBaseTypes(const char *uri, int versionMajor, int versionMinor); static void registerValueTypes(); - QDeclarativeValueType *operator[](int idx) const { + QQmlValueType *operator[](int idx) const { if (idx >= (int)QVariant::UserType) return 0; else return valueTypes[idx]; } private: - QDeclarativeValueType *valueTypes[QVariant::UserType - 1]; + QQmlValueType *valueTypes[QVariant::UserType - 1]; }; // Exported for QtQuick1 -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePointFValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlPointFValueType : public QQmlValueType { Q_PROPERTY(qreal x READ x WRITE setX) Q_PROPERTY(qreal y READ y WRITE setY) Q_OBJECT public: - QDeclarativePointFValueType(QObject *parent = 0); + QQmlPointFValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -133,16 +133,16 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePointFValueType : public QDeclara }; // Exported for QtQuick1 -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePointValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlPointValueType : public QQmlValueType { Q_PROPERTY(int x READ x WRITE setX) Q_PROPERTY(int y READ y WRITE setY) Q_OBJECT public: - QDeclarativePointValueType(QObject *parent = 0); + QQmlPointValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -158,16 +158,16 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePointValueType : public QDeclarat }; // Exported for QtQuick1 -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeSizeFValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlSizeFValueType : public QQmlValueType { Q_PROPERTY(qreal width READ width WRITE setWidth) Q_PROPERTY(qreal height READ height WRITE setHeight) Q_OBJECT public: - QDeclarativeSizeFValueType(QObject *parent = 0); + QQmlSizeFValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -183,16 +183,16 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeSizeFValueType : public QDeclarat }; // Exported for QtQuick1 -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeSizeValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlSizeValueType : public QQmlValueType { Q_PROPERTY(int width READ width WRITE setWidth) Q_PROPERTY(int height READ height WRITE setHeight) Q_OBJECT public: - QDeclarativeSizeValueType(QObject *parent = 0); + QQmlSizeValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -208,7 +208,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeSizeValueType : public QDeclarati }; // Exported for QtQuick1 -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeRectFValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlRectFValueType : public QQmlValueType { Q_PROPERTY(qreal x READ x WRITE setX) Q_PROPERTY(qreal y READ y WRITE setY) @@ -216,10 +216,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeRectFValueType : public QDeclarat Q_PROPERTY(qreal height READ height WRITE setHeight) Q_OBJECT public: - QDeclarativeRectFValueType(QObject *parent = 0); + QQmlRectFValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -240,7 +240,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeRectFValueType : public QDeclarat }; // Exported for QtQuick1 -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeRectValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlRectValueType : public QQmlValueType { Q_PROPERTY(int x READ x WRITE setX) Q_PROPERTY(int y READ y WRITE setY) @@ -248,10 +248,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeRectValueType : public QDeclarati Q_PROPERTY(int height READ height WRITE setHeight) Q_OBJECT public: - QDeclarativeRectValueType(QObject *parent = 0); + QQmlRectValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -271,16 +271,16 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeRectValueType : public QDeclarati QRect rect; }; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeVector2DValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlVector2DValueType : public QQmlValueType { Q_PROPERTY(qreal x READ x WRITE setX) Q_PROPERTY(qreal y READ y WRITE setY) Q_OBJECT public: - QDeclarativeVector2DValueType(QObject *parent = 0); + QQmlVector2DValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -295,17 +295,17 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeVector2DValueType : public QDecla QVector2D vector; }; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeVector3DValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlVector3DValueType : public QQmlValueType { Q_PROPERTY(qreal x READ x WRITE setX) Q_PROPERTY(qreal y READ y WRITE setY) Q_PROPERTY(qreal z READ z WRITE setZ) Q_OBJECT public: - QDeclarativeVector3DValueType(QObject *parent = 0); + QQmlVector3DValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -322,7 +322,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeVector3DValueType : public QDecla QVector3D vector; }; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeVector4DValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlVector4DValueType : public QQmlValueType { Q_PROPERTY(qreal x READ x WRITE setX) Q_PROPERTY(qreal y READ y WRITE setY) @@ -330,10 +330,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeVector4DValueType : public QDecla Q_PROPERTY(qreal w READ w WRITE setW) Q_OBJECT public: - QDeclarativeVector4DValueType(QObject *parent = 0); + QQmlVector4DValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -352,7 +352,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeVector4DValueType : public QDecla QVector4D vector; }; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeQuaternionValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlQuaternionValueType : public QQmlValueType { Q_PROPERTY(qreal scalar READ scalar WRITE setScalar) Q_PROPERTY(qreal x READ x WRITE setX) @@ -360,10 +360,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeQuaternionValueType : public QDec Q_PROPERTY(qreal z READ z WRITE setZ) Q_OBJECT public: - QDeclarativeQuaternionValueType(QObject *parent = 0); + QQmlQuaternionValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -382,7 +382,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeQuaternionValueType : public QDec QQuaternion quaternion; }; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMatrix4x4ValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlMatrix4x4ValueType : public QQmlValueType { Q_PROPERTY(qreal m11 READ m11 WRITE setM11) Q_PROPERTY(qreal m12 READ m12 WRITE setM12) @@ -402,10 +402,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMatrix4x4ValueType : public QDecl Q_PROPERTY(qreal m44 READ m44 WRITE setM44) Q_OBJECT public: - QDeclarativeMatrix4x4ValueType(QObject *parent = 0); + QQmlMatrix4x4ValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -449,12 +449,12 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMatrix4x4ValueType : public QDecl QMatrix4x4 matrix; }; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEasingValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlEasingValueType : public QQmlValueType { Q_OBJECT Q_ENUMS(Type) - Q_PROPERTY(QDeclarativeEasingValueType::Type type READ type WRITE setType) + Q_PROPERTY(QQmlEasingValueType::Type type READ type WRITE setType) Q_PROPERTY(qreal amplitude READ amplitude WRITE setAmplitude) Q_PROPERTY(qreal overshoot READ overshoot WRITE setOvershoot) Q_PROPERTY(qreal period READ period WRITE setPeriod) @@ -487,10 +487,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEasingValueType : public QDeclara Bezier = QEasingCurve::BezierSpline }; - QDeclarativeEasingValueType(QObject *parent = 0); + QQmlEasingValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -512,7 +512,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEasingValueType : public QDeclara QEasingCurve easing; }; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeFontValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlFontValueType : public QQmlValueType { Q_OBJECT Q_ENUMS(FontWeight) @@ -543,10 +543,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeFontValueType : public QDeclarati SmallCaps = QFont::SmallCaps, Capitalize = QFont::Capitalize }; - QDeclarativeFontValueType(QObject *parent = 0); + QQmlFontValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -593,10 +593,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeFontValueType : public QDeclarati QFont font; bool pixelSizeSet; bool pointSizeSet; - mutable QDeclarativeNullableValue dpi; + mutable QQmlNullableValue dpi; }; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeColorValueType : public QDeclarativeValueType +class Q_QML_PRIVATE_EXPORT QQmlColorValueType : public QQmlValueType { Q_PROPERTY(qreal r READ r WRITE setR) Q_PROPERTY(qreal g READ g WRITE setG) @@ -604,10 +604,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeColorValueType : public QDeclarat Q_PROPERTY(qreal a READ a WRITE setA) Q_OBJECT public: - QDeclarativeColorValueType(QObject *parent = 0); + QQmlColorValueType(QObject *parent = 0); virtual void read(QObject *, int); - virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags); + virtual void write(QObject *, int, QQmlPropertyPrivate::WriteFlags); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual QString toString() const; @@ -626,10 +626,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeColorValueType : public QDeclarat QColor color; }; -void QDeclarativeValueType::onLoad() +void QQmlValueType::onLoad() { } QT_END_NAMESPACE -#endif // QDECLARATIVEVALUETYPE_P_H +#endif // QQMLVALUETYPE_P_H diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/qml/qml/qqmlvme.cpp similarity index 76% rename from src/declarative/qml/qdeclarativevme.cpp rename to src/qml/qml/qqmlvme.cpp index 254ae5de43..2b66e00bad 100644 --- a/src/declarative/qml/qdeclarativevme.cpp +++ b/src/qml/qml/qqmlvme.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,33 +39,33 @@ ** ****************************************************************************/ -#include "qdeclarativevme_p.h" +#include "qqmlvme_p.h" -#include "qdeclarativecompiler_p.h" -#include "qdeclarativeboundsignal_p.h" -#include "qdeclarativestringconverters_p.h" +#include "qqmlcompiler_p.h" +#include "qqmlboundsignal_p.h" +#include "qqmlstringconverters_p.h" #include #include -#include "qdeclarativedata_p.h" -#include "qdeclarative.h" -#include "qdeclarativecustomparser_p.h" -#include "qdeclarativeengine.h" -#include "qdeclarativecontext.h" -#include "qdeclarativecomponent.h" -#include "qdeclarativecomponentattached_p.h" -#include "qdeclarativebinding_p.h" -#include "qdeclarativeengine_p.h" -#include "qdeclarativecomponent_p.h" -#include "qdeclarativevmemetaobject_p.h" -#include "qdeclarativebinding_p_p.h" -#include "qdeclarativecontext_p.h" +#include "qqmldata_p.h" +#include "qqml.h" +#include "qqmlcustomparser_p.h" +#include "qqmlengine.h" +#include "qqmlcontext.h" +#include "qqmlcomponent.h" +#include "qqmlcomponentattached_p.h" +#include "qqmlbinding_p.h" +#include "qqmlengine_p.h" +#include "qqmlcomponent_p.h" +#include "qqmlvmemetaobject_p.h" +#include "qqmlbinding_p_p.h" +#include "qqmlcontext_p.h" #include #include -#include "qdeclarativeglobal_p.h" +#include "qqmlglobal_p.h" #include -#include "qdeclarativescriptstring.h" -#include "qdeclarativescriptstring_p.h" -#include "qdeclarativepropertyvalueinterceptor_p.h" +#include "qqmlscriptstring.h" +#include "qqmlscriptstring_p.h" +#include "qqmlpropertyvalueinterceptor_p.h" #include #include @@ -77,15 +77,15 @@ #include #include #include -#include +#include QT_BEGIN_NAMESPACE -using namespace QDeclarativeVMETypes; +using namespace QQmlVMETypes; #define VME_EXCEPTION(desc, line) \ { \ - QDeclarativeError error; \ + QQmlError error; \ error.setDescription(desc.trimmed()); \ error.setLine(line); \ error.setUrl(COMP->url); \ @@ -93,8 +93,8 @@ using namespace QDeclarativeVMETypes; goto exceptionExit; \ } -void QDeclarativeVME::init(QDeclarativeContextData *ctxt, QDeclarativeCompiledData *comp, int start, - QDeclarativeContextData *creation) +void QQmlVME::init(QQmlContextData *ctxt, QQmlCompiledData *comp, int start, + QQmlContextData *creation) { Q_ASSERT(ctxt); Q_ASSERT(comp); @@ -111,7 +111,7 @@ void QDeclarativeVME::init(QDeclarativeContextData *ctxt, QDeclarativeCompiledDa initState.instructionStream = comp->bytecode.constData() + start; states.push(initState); - typedef QDeclarativeInstruction I; + typedef QQmlInstruction I; I *i = (I *)initState.instructionStream; Q_ASSERT(comp->instructionType(i) == I::Init); @@ -130,15 +130,15 @@ void QDeclarativeVME::init(QDeclarativeContextData *ctxt, QDeclarativeCompiledDa engine = ctxt->engine; } -bool QDeclarativeVME::initDeferred(QObject *object) +bool QQmlVME::initDeferred(QObject *object) { - QDeclarativeData *data = QDeclarativeData::get(object); + QQmlData *data = QQmlData::get(object); if (!data || !data->context || !data->deferredComponent) return false; - QDeclarativeContextData *ctxt = data->context; - QDeclarativeCompiledData *comp = data->deferredComponent; + QQmlContextData *ctxt = data->context; + QQmlCompiledData *comp = data->deferredComponent; int start = data->deferredIdx; State initState; @@ -148,7 +148,7 @@ bool QDeclarativeVME::initDeferred(QObject *object) initState.instructionStream = comp->bytecode.constData() + start; states.push(initState); - typedef QDeclarativeInstruction I; + typedef QQmlInstruction I; I *i = (I *)initState.instructionStream; Q_ASSERT(comp->instructionType(i) == I::DeferInit); @@ -174,25 +174,25 @@ bool QDeclarativeVME::initDeferred(QObject *object) namespace { struct ActiveVMERestorer { - ActiveVMERestorer(QDeclarativeVME *me, QDeclarativeEnginePrivate *ep) + ActiveVMERestorer(QQmlVME *me, QQmlEnginePrivate *ep) : ep(ep), oldVME(ep->activeVME) { ep->activeVME = me; } ~ActiveVMERestorer() { ep->activeVME = oldVME; } - QDeclarativeEnginePrivate *ep; - QDeclarativeVME *oldVME; + QQmlEnginePrivate *ep; + QQmlVME *oldVME; }; } -QObject *QDeclarativeVME::execute(QList *errors, const Interrupt &interrupt) +QObject *QQmlVME::execute(QList *errors, const Interrupt &interrupt) { Q_ASSERT(states.count() >= 1); #ifdef QML_ENABLE_TRACE - QDeclarativeTrace trace("VME Execute"); + QQmlTrace trace("VME Execute"); trace.addDetail("URL", rootComponent->url); #endif - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(states.at(0).context->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(states.at(0).context->engine); ActiveVMERestorer restore(this, ep); @@ -203,7 +203,7 @@ QObject *QDeclarativeVME::execute(QList *errors, const Interr inline bool fastHasBinding(QObject *o, int index) { - QDeclarativeData *ddata = static_cast(QObjectPrivate::get(o)->declarativeData); + QQmlData *ddata = static_cast(QObjectPrivate::get(o)->declarativeData); return ddata && (ddata->bindingBitsSize > index) && (ddata->bindingBits[index / 32] & (1 << (index % 32))); @@ -211,20 +211,20 @@ inline bool fastHasBinding(QObject *o, int index) static void removeBindingOnProperty(QObject *o, int index) { - QDeclarativeAbstractBinding *binding = QDeclarativePropertyPrivate::setBinding(o, index, -1, 0); + QQmlAbstractBinding *binding = QQmlPropertyPrivate::setBinding(o, index, -1, 0); if (binding) binding->destroy(); } static QVariant variantFromString(const QString &string) { - return QDeclarativeStringConverters::variantFromString(string); + return QQmlStringConverters::variantFromString(string); } // XXX we probably need some form of "work count" here to prevent us checking this // for every instruction. #define QML_BEGIN_INSTR_COMMON(I) { \ - const QDeclarativeInstructionMeta<(int)QDeclarativeInstruction::I>::DataType &instr = QDeclarativeInstructionMeta<(int)QDeclarativeInstruction::I>::data(*genericInstr); \ - INSTRUCTIONSTREAM += QDeclarativeInstructionMeta<(int)QDeclarativeInstruction::I>::Size; \ + const QQmlInstructionMeta<(int)QQmlInstruction::I>::DataType &instr = QQmlInstructionMeta<(int)QQmlInstruction::I>::data(*genericInstr); \ + INSTRUCTIONSTREAM += QQmlInstructionMeta<(int)QQmlInstruction::I>::Size; \ Q_UNUSED(instr); #ifdef QML_THREADED_VME_INTERPRETER @@ -233,19 +233,19 @@ static QVariant variantFromString(const QString &string) # define QML_NEXT_INSTR(I) { \ if (watcher.hasRecursed()) return 0; \ - genericInstr = reinterpret_cast(INSTRUCTIONSTREAM); \ + genericInstr = reinterpret_cast(INSTRUCTIONSTREAM); \ goto *genericInstr->common.code; \ } # define QML_END_INSTR(I) } \ if (watcher.hasRecursed()) return 0; \ - genericInstr = reinterpret_cast(INSTRUCTIONSTREAM); \ + genericInstr = reinterpret_cast(INSTRUCTIONSTREAM); \ if (interrupt.shouldInterrupt()) return 0; \ goto *genericInstr->common.code; #else # define QML_BEGIN_INSTR(I) \ - case QDeclarativeInstruction::I: \ + case QQmlInstruction::I: \ QML_BEGIN_INSTR_COMMON(I) # define QML_NEXT_INSTR(I) { \ @@ -283,7 +283,7 @@ static QVariant variantFromString(const QString &string) QObject *target = objects.top(); \ CLEAN_PROPERTY(target, instr.propertyIndex); \ QMetaObject *mo = const_cast(target->metaObject()); \ - QDeclarativeVMEMetaObject *vmemo = static_cast(mo); \ + QQmlVMEMetaObject *vmemo = static_cast(mo); \ vmemo->setVMEProperty(instr.propertyIndex, v8value); \ QML_END_INSTR(name) @@ -299,7 +299,7 @@ static QVariant variantFromString(const QString &string) if (fastHasBinding(o, index)) \ removeBindingOnProperty(o, index) -QObject *QDeclarativeVME::run(QList *errors, +QObject *QQmlVME::run(QList *errors, const Interrupt &interrupt #ifdef QML_THREADED_VME_INTERPRETER , void ***storeJumpTable @@ -320,18 +320,18 @@ QObject *QDeclarativeVME::run(QList *errors, Q_ASSERT(errors->isEmpty()); Q_ASSERT(states.count() >= 1); - QDeclarativeEngine *engine = states.at(0).context->engine; - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + QQmlEngine *engine = states.at(0).context->engine; + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); // Need a v8 handle scope and execution context for StoreVar instructions. v8::HandleScope handleScope; v8::Context::Scope contextScope(ep->v8engine()->context()); int status = -1; // needed for dbus - QDeclarativePropertyPrivate::WriteFlags flags = QDeclarativePropertyPrivate::BypassInterceptor | - QDeclarativePropertyPrivate::RemoveBindingOnAliasWrite; + QQmlPropertyPrivate::WriteFlags flags = QQmlPropertyPrivate::BypassInterceptor | + QQmlPropertyPrivate::RemoveBindingOnAliasWrite; - QRecursionWatcher watcher(this); + QRecursionWatcher watcher(this); #define COMP states.top().compiledData #define CTXT states.top().context @@ -347,11 +347,11 @@ QObject *QDeclarativeVME::run(QList *errors, #define URLS COMP->urls #ifdef QML_THREADED_VME_INTERPRETER - const QDeclarativeInstruction *genericInstr = reinterpret_cast(INSTRUCTIONSTREAM); + const QQmlInstruction *genericInstr = reinterpret_cast(INSTRUCTIONSTREAM); goto *genericInstr->common.code; #else for (;;) { - const QDeclarativeInstruction *genericInstr = reinterpret_cast(INSTRUCTIONSTREAM); + const QQmlInstruction *genericInstr = reinterpret_cast(INSTRUCTIONSTREAM); switch (genericInstr->common.instructionType) { #endif @@ -416,8 +416,8 @@ QObject *QDeclarativeVME::run(QList *errors, // Ensure that the compiled data has been initialized if (!COMP->isInitialized()) COMP->initialize(engine); - QDeclarativeContextData *parentCtxt = CTXT; - CTXT = new QDeclarativeContextData; + QQmlContextData *parentCtxt = CTXT; + CTXT = new QQmlContextData; CTXT->isInternal = true; CTXT->url = COMP->url; CTXT->urlString = COMP->name; @@ -468,7 +468,7 @@ QObject *QDeclarativeVME::run(QList *errors, QML_END_INSTR(Done) QML_BEGIN_INSTR(CreateQMLObject) - const QDeclarativeCompiledData::TypeReference &type = TYPES.at(instr.type); + const QQmlCompiledData::TypeReference &type = TYPES.at(instr.type); Q_ASSERT(type.component); states.push(State()); @@ -494,7 +494,7 @@ QObject *QDeclarativeVME::run(QList *errors, QML_BEGIN_INSTR(CompleteQMLObject) QObject *o = objects.top(); - QDeclarativeData *ddata = QDeclarativeData::get(o); + QQmlData *ddata = QQmlData::get(o); Q_ASSERT(ddata); if (instr.isRoot) { @@ -502,7 +502,7 @@ QObject *QDeclarativeVME::run(QList *errors, Q_ASSERT(ddata->context != CTXT); Q_ASSERT(ddata->outerContext); Q_ASSERT(ddata->outerContext != CTXT); - QDeclarativeContextData *c = ddata->context; + QQmlContextData *c = ddata->context; while (c->linkedContext) c = c->linkedContext; c->linkedContext = CTXT; } else { @@ -521,13 +521,13 @@ QObject *QDeclarativeVME::run(QList *errors, QML_END_INSTR(CompleteQMLObject) QML_BEGIN_INSTR(CreateCppObject) - const QDeclarativeCompiledData::TypeReference &type = TYPES.at(instr.type); + const QQmlCompiledData::TypeReference &type = TYPES.at(instr.type); Q_ASSERT(type.type); QObject *o = 0; void *memory = 0; - type.type->create(&o, &memory, sizeof(QDeclarativeData)); - QDeclarativeData *ddata = new (memory) QDeclarativeData; + type.type->create(&o, &memory, sizeof(QQmlData)); + QQmlData *ddata = new (memory) QQmlData; ddata->ownMemory = false; QObjectPrivate::get(o)->declarativeData = ddata; @@ -544,7 +544,7 @@ QObject *QDeclarativeVME::run(QList *errors, Q_ASSERT(ddata->context != CTXT); Q_ASSERT(ddata->outerContext); Q_ASSERT(ddata->outerContext != CTXT); - QDeclarativeContextData *c = ddata->context; + QQmlContextData *c = ddata->context; while (c->linkedContext) c = c->linkedContext; c->linkedContext = CTXT; } else { @@ -562,7 +562,7 @@ QObject *QDeclarativeVME::run(QList *errors, ddata->columnNumber = instr.column; if (instr.data != -1) { - QDeclarativeCustomParser *customParser = + QQmlCustomParser *customParser = TYPES.at(instr.type).type->customParser(); customParser->setCustomData(o, DATAS.at(instr.data)); } @@ -573,18 +573,18 @@ QObject *QDeclarativeVME::run(QList *errors, static_cast(o)->setParent(static_cast(parent)); else #endif - QDeclarative_setParent_noEvent(o, parent); + QQml_setParent_noEvent(o, parent); } objects.push(o); QML_END_INSTR(CreateCppObject) QML_BEGIN_INSTR(CreateSimpleObject) - QObject *o = (QObject *)operator new(instr.typeSize + sizeof(QDeclarativeData)); - ::memset(o, 0, instr.typeSize + sizeof(QDeclarativeData)); + QObject *o = (QObject *)operator new(instr.typeSize + sizeof(QQmlData)); + ::memset(o, 0, instr.typeSize + sizeof(QQmlData)); instr.create(o); - QDeclarativeData *ddata = (QDeclarativeData *)(((const char *)o) + instr.typeSize); - const QDeclarativeCompiledData::TypeReference &ref = TYPES.at(instr.type); + QQmlData *ddata = (QQmlData *)(((const char *)o) + instr.typeSize); + const QQmlCompiledData::TypeReference &ref = TYPES.at(instr.type); if (!ddata->propertyCache && ref.typePropertyCache) { ddata->propertyCache = ref.typePropertyCache; ddata->propertyCache->addref(); @@ -601,7 +601,7 @@ QObject *QDeclarativeVME::run(QList *errors, CTXT->contextObjects = ddata; QObject *parent = objects.top(); - QDeclarative_setParent_noEvent(o, parent); + QQml_setParent_noEvent(o, parent); objects.push(o); QML_END_INSTR(CreateSimpleObject) @@ -616,11 +616,11 @@ QObject *QDeclarativeVME::run(QList *errors, QML_END_INSTR(SetDefault) QML_BEGIN_INSTR(CreateComponent) - QDeclarativeComponent *qcomp = - new QDeclarativeComponent(CTXT->engine, COMP, INSTRUCTIONSTREAM - COMP->bytecode.constData(), + QQmlComponent *qcomp = + new QQmlComponent(CTXT->engine, COMP, INSTRUCTIONSTREAM - COMP->bytecode.constData(), objects.isEmpty() ? 0 : objects.top()); - QDeclarativeData *ddata = QDeclarativeData::get(qcomp, true); + QQmlData *ddata = QQmlData::get(qcomp, true); Q_ASSERT(ddata); CTXT->addObject(qcomp); @@ -633,7 +633,7 @@ QObject *QDeclarativeVME::run(QList *errors, ddata->lineNumber = instr.line; ddata->columnNumber = instr.column; - QDeclarativeComponentPrivate::get(qcomp)->creationContext = CTXT; + QQmlComponentPrivate::get(qcomp)->creationContext = CTXT; objects.push(qcomp); INSTRUCTIONSTREAM += instr.count; @@ -646,13 +646,13 @@ QObject *QDeclarativeVME::run(QList *errors, const QByteArray &metadata = DATAS.at(instr.data); QFastMetaBuilder::fromData(&mo, 0, metadata); - const QDeclarativeVMEMetaData *data = - (const QDeclarativeVMEMetaData *)DATAS.at(instr.aliasData).constData(); + const QQmlVMEMetaData *data = + (const QQmlVMEMetaData *)DATAS.at(instr.aliasData).constData(); - (void)new QDeclarativeVMEMetaObject(target, &mo, data, COMP); + (void)new QQmlVMEMetaObject(target, &mo, data, COMP); if (instr.propertyCache != -1) { - QDeclarativeData *ddata = QDeclarativeData::get(target, true); + QQmlData *ddata = QQmlData::get(target, true); if (ddata->propertyCache) ddata->propertyCache->release(); ddata->propertyCache = PROPERTYCACHES.at(instr.propertyCache); ddata->propertyCache->addref(); @@ -665,7 +665,7 @@ QObject *QDeclarativeVME::run(QList *errors, const QString &primitive = PRIMITIVES.at(instr.primitive); int type = instr.type; - QDeclarativeMetaType::StringConverter converter = QDeclarativeMetaType::customStringConverter(type); + QQmlMetaType::StringConverter converter = QQmlMetaType::customStringConverter(type); QVariant v = (*converter)(primitive); QMetaProperty prop = @@ -686,17 +686,17 @@ QObject *QDeclarativeVME::run(QList *errors, int sigIdx = instr.signal; const QString &pr = PRIMITIVES.at(sigIdx); - QDeclarativeProperty prop(target, pr); - if (prop.type() & QDeclarativeProperty::SignalProperty) { + QQmlProperty prop(target, pr); + if (prop.type() & QQmlProperty::SignalProperty) { - QMetaMethod method = QDeclarativeMetaType::defaultMethod(assign); + QMetaMethod method = QQmlMetaType::defaultMethod(assign); if (method.signature() == 0) VME_EXCEPTION(tr("Cannot assign object type %1 with no default method").arg(QString::fromLatin1(assign->metaObject()->className())), instr.line); if (!QMetaObject::checkConnectArgs(prop.method().signature(), method.signature())) VME_EXCEPTION(tr("Cannot connect mismatched signal/slot %1 %vs. %2").arg(QString::fromLatin1(method.signature())).arg(QString::fromLatin1(prop.method().signature())), instr.line); - QDeclarativePropertyPrivate::connect(target, prop.index(), assign, method.methodIndex()); + QQmlPropertyPrivate::connect(target, prop.index(), assign, method.methodIndex()); } else { VME_EXCEPTION(tr("Cannot assign an object to signal property %1").arg(pr), instr.line); @@ -711,9 +711,9 @@ QObject *QDeclarativeVME::run(QList *errors, QMetaMethod signal = target->metaObject()->method(instr.signalIndex); - QDeclarativeBoundSignal *bs = new QDeclarativeBoundSignal(target, signal, target); - QDeclarativeExpression *expr = - new QDeclarativeExpression(CTXT, context, DATAS.at(instr.value), true, COMP->name, instr.line, instr.column, *new QDeclarativeExpressionPrivate); + QQmlBoundSignal *bs = new QQmlBoundSignal(target, signal, target); + QQmlExpression *expr = + new QQmlExpression(CTXT, context, DATAS.at(instr.value), true, COMP->name, instr.line, instr.column, *new QQmlExpressionPrivate); bs->setExpression(expr); QML_END_INSTR(StoreSignal) @@ -724,8 +724,8 @@ QObject *QDeclarativeVME::run(QList *errors, QML_BEGIN_INSTR(StoreScriptString) QObject *target = objects.top(); QObject *scope = objects.at(objects.count() - 1 - instr.scope); - QDeclarativeScriptString ss; - ss.setContext(CTXT->asQDeclarativeContext()); + QQmlScriptString ss; + ss.setContext(CTXT->asQQmlContext()); ss.setScopeObject(scope); ss.setScript(PRIMITIVES.at(instr.value)); ss.d.data()->bindingId = instr.bindingId; @@ -739,11 +739,11 @@ QObject *QDeclarativeVME::run(QList *errors, QML_BEGIN_INSTR(BeginObject) QObject *target = objects.top(); - QDeclarativeParserStatus *status = reinterpret_cast(reinterpret_cast(target) + instr.castValue); + QQmlParserStatus *status = reinterpret_cast(reinterpret_cast(target) + instr.castValue); parserStatus.push(status); #ifdef QML_ENABLE_TRACE Q_ASSERT(QObjectPrivate::get(target)->declarativeData); - parserStatusData.push(static_cast(QObjectPrivate::get(target)->declarativeData)); + parserStatusData.push(static_cast(QObjectPrivate::get(target)->declarativeData)); #endif status->d = &parserStatus.top(); @@ -763,14 +763,14 @@ QObject *QDeclarativeVME::run(QList *errors, if (instr.isRoot && BINDINGSKIPLIST.testBit(instr.property.coreIndex)) QML_NEXT_INSTR(StoreBinding); - QDeclarativeBinding *bind = new QDeclarativeBinding(PRIMITIVES.at(instr.value), true, + QQmlBinding *bind = new QQmlBinding(PRIMITIVES.at(instr.value), true, context, CTXT, COMP->name, instr.line, instr.column); bindValues.push(bind); bind->m_mePtr = &bindValues.top(); bind->setTarget(target, instr.property, CTXT); - typedef QDeclarativePropertyPrivate QDPP; + typedef QQmlPropertyPrivate QDPP; Q_ASSERT(bind->propertyIndex() == QDPP::bindingIndex(instr.property)); Q_ASSERT(bind->object() == target); @@ -786,15 +786,15 @@ QObject *QDeclarativeVME::run(QList *errors, if (instr.isRoot && BINDINGSKIPLIST.testBit(instr.property.coreIndex)) QML_NEXT_INSTR(StoreBindingOnAlias); - QDeclarativeBinding *bind = new QDeclarativeBinding(PRIMITIVES.at(instr.value), true, + QQmlBinding *bind = new QQmlBinding(PRIMITIVES.at(instr.value), true, context, CTXT, COMP->name, instr.line, instr.column); bindValues.push(bind); bind->m_mePtr = &bindValues.top(); bind->setTarget(target, instr.property, CTXT); - QDeclarativeAbstractBinding *old = - QDeclarativePropertyPrivate::setBindingNoEnable(target, instr.property.coreIndex, + QQmlAbstractBinding *old = + QQmlPropertyPrivate::setBindingNoEnable(target, instr.property.coreIndex, instr.property.getValueTypeCoreIndex(), bind); if (old) { old->destroy(); } @@ -810,7 +810,7 @@ QObject *QDeclarativeVME::run(QList *errors, if (instr.isRoot && BINDINGSKIPLIST.testBit(property & 0xFFFF)) QML_NEXT_INSTR(StoreV4Binding); - QDeclarativeAbstractBinding *binding = + QQmlAbstractBinding *binding = CTXT->v4bindings->configBinding(instr.value, target, scope, property, instr.line, instr.column); bindValues.push(binding); @@ -831,13 +831,13 @@ QObject *QDeclarativeVME::run(QList *errors, if (instr.isRoot && BINDINGSKIPLIST.testBit(instr.property.coreIndex)) QML_NEXT_INSTR(StoreV8Binding); - QDeclarativeAbstractBinding *binding = CTXT->v8bindings->configBinding(target, scope, + QQmlAbstractBinding *binding = CTXT->v8bindings->configBinding(target, scope, &instr); if (binding) { bindValues.push(binding); binding->m_mePtr = &bindValues.top(); - typedef QDeclarativePropertyPrivate QDPP; + typedef QQmlPropertyPrivate QDPP; Q_ASSERT(binding->propertyIndex() == QDPP::bindingIndex(instr.property)); Q_ASSERT(binding->object() == target); @@ -847,30 +847,30 @@ QObject *QDeclarativeVME::run(QList *errors, QML_BEGIN_INSTR(StoreValueSource) QObject *obj = objects.pop(); - QDeclarativePropertyValueSource *vs = reinterpret_cast(reinterpret_cast(obj) + instr.castValue); + QQmlPropertyValueSource *vs = reinterpret_cast(reinterpret_cast(obj) + instr.castValue); QObject *target = objects.at(objects.count() - 1 - instr.owner); obj->setParent(target); - vs->setTarget(QDeclarativePropertyPrivate::restore(target, instr.property, CTXT)); + vs->setTarget(QQmlPropertyPrivate::restore(target, instr.property, CTXT)); QML_END_INSTR(StoreValueSource) QML_BEGIN_INSTR(StoreValueInterceptor) QObject *obj = objects.pop(); - QDeclarativePropertyValueInterceptor *vi = reinterpret_cast(reinterpret_cast(obj) + instr.castValue); + QQmlPropertyValueInterceptor *vi = reinterpret_cast(reinterpret_cast(obj) + instr.castValue); QObject *target = objects.at(objects.count() - 1 - instr.owner); - QDeclarativeProperty prop = - QDeclarativePropertyPrivate::restore(target, instr.property, CTXT); + QQmlProperty prop = + QQmlPropertyPrivate::restore(target, instr.property, CTXT); obj->setParent(target); vi->setTarget(prop); - QDeclarativeVMEMetaObject *mo = static_cast((QMetaObject*)target->metaObject()); - mo->registerInterceptor(prop.index(), QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), vi); + QQmlVMEMetaObject *mo = static_cast((QMetaObject*)target->metaObject()); + mo->registerInterceptor(prop.index(), QQmlPropertyPrivate::valueTypeCoreIndex(prop), vi); QML_END_INSTR(StoreValueInterceptor) QML_BEGIN_INSTR(StoreObjectQList) QObject *assign = objects.pop(); const List &list = lists.top(); - list.qListProperty.append((QDeclarativeListProperty*)&list.qListProperty, assign); + list.qListProperty.append((QQmlListProperty*)&list.qListProperty, assign); QML_END_INSTR(StoreObjectQList) QML_BEGIN_INSTR(AssignObjectList) @@ -882,14 +882,14 @@ QObject *QDeclarativeVME::run(QList *errors, void *ptr = 0; - const char *iid = QDeclarativeMetaType::interfaceIId(type); + const char *iid = QQmlMetaType::interfaceIId(type); if (iid) ptr = assign->qt_metacast(iid); if (!ptr) VME_EXCEPTION(tr("Cannot assign object to list"), instr.line); - list.qListProperty.append((QDeclarativeListProperty*)&list.qListProperty, ptr); + list.qListProperty.append((QQmlListProperty*)&list.qListProperty, ptr); QML_END_INSTR(AssignObjectList) QML_BEGIN_INSTR(StoreInterface) @@ -900,7 +900,7 @@ QObject *QDeclarativeVME::run(QList *errors, int coreIdx = instr.propertyIndex; QMetaProperty prop = target->metaObject()->property(coreIdx); int t = prop.userType(); - const char *iid = QDeclarativeMetaType::interfaceIId(t); + const char *iid = QQmlMetaType::interfaceIId(t); bool ok = false; if (iid) { void *ptr = assign->qt_metacast(iid); @@ -963,8 +963,8 @@ QObject *QDeclarativeVME::run(QList *errors, QML_BEGIN_INSTR(Defer) if (instr.deferCount) { QObject *target = objects.top(); - QDeclarativeData *data = - QDeclarativeData::get(target, true); + QQmlData *data = + QQmlData::get(target, true); COMP->addref(); data->deferredComponent = COMP; data->deferredIdx = INSTRUCTIONSTREAM - COMP->bytecode.constData(); @@ -981,39 +981,39 @@ QObject *QDeclarativeVME::run(QList *errors, if (instr.bindingSkipList != 0) { // Possibly need to clear bindings - QDeclarativeData *targetData = QDeclarativeData::get(target); + QQmlData *targetData = QQmlData::get(target); if (targetData) { - QDeclarativeAbstractBinding *binding = - QDeclarativePropertyPrivate::binding(target, instr.property, -1); + QQmlAbstractBinding *binding = + QQmlPropertyPrivate::binding(target, instr.property, -1); - if (binding && binding->bindingType() != QDeclarativeAbstractBinding::ValueTypeProxy) { - QDeclarativePropertyPrivate::setBinding(target, instr.property, -1, 0); + if (binding && binding->bindingType() != QQmlAbstractBinding::ValueTypeProxy) { + QQmlPropertyPrivate::setBinding(target, instr.property, -1, 0); binding->destroy(); } else if (binding) { - QDeclarativeValueTypeProxyBinding *proxy = - static_cast(binding); + QQmlValueTypeProxyBinding *proxy = + static_cast(binding); proxy->removeBindings(instr.bindingSkipList); } } } - QDeclarativeValueType *valueHandler = ep->valueTypes[instr.type]; + QQmlValueType *valueHandler = ep->valueTypes[instr.type]; valueHandler->read(target, instr.property); objects.push(valueHandler); QML_END_INSTR(FetchValueType) QML_BEGIN_INSTR(PopValueType) - QDeclarativeValueType *valueHandler = - static_cast(objects.pop()); + QQmlValueType *valueHandler = + static_cast(objects.pop()); QObject *target = objects.top(); - valueHandler->write(target, instr.property, QDeclarativePropertyPrivate::BypassInterceptor); + valueHandler->write(target, instr.property, QQmlPropertyPrivate::BypassInterceptor); QML_END_INSTR(PopValueType) #ifdef QML_THREADED_VME_INTERPRETER // nothing to do #else default: - qFatal("QDeclarativeCompiledData: Internal error - unknown instruction %d", genericInstr->common.instructionType); + qFatal("QQmlCompiledData: Internal error - unknown instruction %d", genericInstr->common.instructionType); break; } } @@ -1039,11 +1039,11 @@ QObject *QDeclarativeVME::run(QList *errors, return rv; } -void QDeclarativeVME::reset() +void QQmlVME::reset() { Q_ASSERT(!states.isEmpty() || objects.isEmpty()); - QRecursionWatcher watcher(this); + QRecursionWatcher watcher(this); if (!objects.isEmpty() && !(states.at(0).flags & State::Deferred)) delete objects.at(0); @@ -1051,12 +1051,12 @@ void QDeclarativeVME::reset() if (!rootContext.isNull()) rootContext->activeVMEData = 0; - // Remove the QDeclarativeParserStatus and QDeclarativeAbstractBinding back pointers + // Remove the QQmlParserStatus and QQmlAbstractBinding back pointers blank(parserStatus); blank(bindValues); while (componentAttached) { - QDeclarativeComponentAttached *a = componentAttached; + QQmlComponentAttached *a = componentAttached; a->rem(); } @@ -1075,13 +1075,13 @@ void QDeclarativeVME::reset() } // Must be called with a handle scope and context -void QDeclarativeScriptData::initialize(QDeclarativeEngine *engine) +void QQmlScriptData::initialize(QQmlEngine *engine) { Q_ASSERT(m_program.IsEmpty()); Q_ASSERT(engine); Q_ASSERT(!hasEngine()); - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); QV8Engine *v8engine = ep->v8engine(); // If compilation throws an error, a surrounding v8::TryCatch will record it. @@ -1098,23 +1098,23 @@ void QDeclarativeScriptData::initialize(QDeclarativeEngine *engine) addref(); } -v8::Persistent QDeclarativeVME::run(QDeclarativeContextData *parentCtxt, QDeclarativeScriptData *script) +v8::Persistent QQmlVME::run(QQmlContextData *parentCtxt, QQmlScriptData *script) { if (script->m_loaded) return qPersistentNew(script->m_value); Q_ASSERT(parentCtxt && parentCtxt->engine); - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(parentCtxt->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(parentCtxt->engine); QV8Engine *v8engine = ep->v8engine(); - bool shared = script->pragmas & QDeclarativeScript::Object::ScriptBlock::Shared; + bool shared = script->pragmas & QQmlScript::Object::ScriptBlock::Shared; - QDeclarativeContextData *effectiveCtxt = parentCtxt; + QQmlContextData *effectiveCtxt = parentCtxt; if (shared) effectiveCtxt = 0; // Create the script context if required - QDeclarativeContextData *ctxt = new QDeclarativeContextData; + QQmlContextData *ctxt = new QQmlContextData; ctxt->isInternal = true; ctxt->isJSContext = true; if (shared) @@ -1170,8 +1170,8 @@ v8::Persistent QDeclarativeVME::run(QDeclarativeContextData *parentC if (try_catch.HasCaught()) { v8::Local message = try_catch.Message(); if (!message.IsEmpty()) { - QDeclarativeError error; - QDeclarativeExpressionPrivate::exceptionToError(message, error); + QQmlError error; + QQmlExpressionPrivate::exceptionToError(message, error); ep->warning(error); } } @@ -1186,19 +1186,19 @@ v8::Persistent QDeclarativeVME::run(QDeclarativeContextData *parentC } #ifdef QML_THREADED_VME_INTERPRETER -void **QDeclarativeVME::instructionJumpTable() +void **QQmlVME::instructionJumpTable() { static void **jumpTable = 0; if (!jumpTable) { - QDeclarativeVME dummy; - QDeclarativeVME::Interrupt i; + QQmlVME dummy; + QQmlVME::Interrupt i; dummy.run(0, i, &jumpTable); } return jumpTable; } #endif -QDeclarativeContextData *QDeclarativeVME::complete(const Interrupt &interrupt) +QQmlContextData *QQmlVME::complete(const Interrupt &interrupt) { Q_ASSERT(engine || (bindValues.isEmpty() && @@ -1210,24 +1210,24 @@ QDeclarativeContextData *QDeclarativeVME::complete(const Interrupt &interrupt) if (!engine) return 0; - QDeclarativeTrace trace("VME Complete"); + QQmlTrace trace("VME Complete"); #ifdef QML_ENABLE_TRACE trace.addDetail("URL", rootComponent->url); #endif - ActiveVMERestorer restore(this, QDeclarativeEnginePrivate::get(engine)); - QRecursionWatcher watcher(this); + ActiveVMERestorer restore(this, QQmlEnginePrivate::get(engine)); + QRecursionWatcher watcher(this); { - QDeclarativeTrace trace("VME Binding Enable"); + QQmlTrace trace("VME Binding Enable"); trace.event("begin binding eval"); while (!bindValues.isEmpty()) { - QDeclarativeAbstractBinding *b = bindValues.pop(); + QQmlAbstractBinding *b = bindValues.pop(); if(b) { b->m_mePtr = 0; - b->setEnabled(true, QDeclarativePropertyPrivate::BypassInterceptor | - QDeclarativePropertyPrivate::DontRemoveBinding); + b->setEnabled(true, QQmlPropertyPrivate::BypassInterceptor | + QQmlPropertyPrivate::DontRemoveBinding); } if (watcher.hasRecursed() || interrupt.shouldInterrupt()) @@ -1237,17 +1237,17 @@ QDeclarativeContextData *QDeclarativeVME::complete(const Interrupt &interrupt) } { - QDeclarativeTrace trace("VME Component Complete"); + QQmlTrace trace("VME Component Complete"); while (!parserStatus.isEmpty()) { - QDeclarativeParserStatus *status = parserStatus.pop(); + QQmlParserStatus *status = parserStatus.pop(); #ifdef QML_ENABLE_TRACE - QDeclarativeData *data = parserStatusData.pop(); + QQmlData *data = parserStatusData.pop(); #endif if (status && status->d) { status->d = 0; #ifdef QML_ENABLE_TRACE - QDeclarativeTrace trace("Component complete"); + QQmlTrace trace("Component complete"); trace.addDetail("URL", data->outerContext->url); trace.addDetail("Line", data->lineNumber); #endif @@ -1261,9 +1261,9 @@ QDeclarativeContextData *QDeclarativeVME::complete(const Interrupt &interrupt) } { - QDeclarativeTrace trace("VME Finalize Callbacks"); + QQmlTrace trace("VME Finalize Callbacks"); for (int ii = 0; ii < finalizeCallbacks.count(); ++ii) { - QDeclarativeEnginePrivate::FinalizeCallback callback = finalizeCallbacks.at(ii); + QQmlEnginePrivate::FinalizeCallback callback = finalizeCallbacks.at(ii); QObject *obj = callback.first; if (obj) { void *args[] = { 0 }; @@ -1276,11 +1276,11 @@ QDeclarativeContextData *QDeclarativeVME::complete(const Interrupt &interrupt) } { - QDeclarativeTrace trace("VME Component.onCompleted Callbacks"); + QQmlTrace trace("VME Component.onCompleted Callbacks"); while (componentAttached) { - QDeclarativeComponentAttached *a = componentAttached; + QQmlComponentAttached *a = componentAttached; a->rem(); - QDeclarativeData *d = QDeclarativeData::get(a->parent()); + QQmlData *d = QQmlData::get(a->parent()); Q_ASSERT(d); Q_ASSERT(d->context); a->add(&d->context->componentAttached); @@ -1291,7 +1291,7 @@ QDeclarativeContextData *QDeclarativeVME::complete(const Interrupt &interrupt) } } - QDeclarativeContextData *rv = rootContext; + QQmlContextData *rv = rootContext; reset(); @@ -1300,50 +1300,50 @@ QDeclarativeContextData *QDeclarativeVME::complete(const Interrupt &interrupt) return rv; } -void QDeclarativeVME::blank(QFiniteStack &bs) +void QQmlVME::blank(QFiniteStack &bs) { for (int ii = 0; ii < bs.count(); ++ii) { - QDeclarativeAbstractBinding *b = bs.at(ii); + QQmlAbstractBinding *b = bs.at(ii); if (b) b->m_mePtr = 0; } } -void QDeclarativeVME::blank(QFiniteStack &pss) +void QQmlVME::blank(QFiniteStack &pss) { for (int ii = 0; ii < pss.count(); ++ii) { - QDeclarativeParserStatus *ps = pss.at(ii); + QQmlParserStatus *ps = pss.at(ii); if(ps) ps->d = 0; } } -QDeclarativeVMEGuard::QDeclarativeVMEGuard() +QQmlVMEGuard::QQmlVMEGuard() : m_objectCount(0), m_objects(0), m_contextCount(0), m_contexts(0) { } -QDeclarativeVMEGuard::~QDeclarativeVMEGuard() +QQmlVMEGuard::~QQmlVMEGuard() { clear(); } -void QDeclarativeVMEGuard::guard(QDeclarativeVME *vme) +void QQmlVMEGuard::guard(QQmlVME *vme) { clear(); m_objectCount = vme->objects.count(); - m_objects = new QDeclarativeGuard[m_objectCount]; + m_objects = new QQmlGuard[m_objectCount]; for (int ii = 0; ii < m_objectCount; ++ii) m_objects[ii] = vme->objects[ii]; m_contextCount = (vme->rootContext.isNull()?0:1) + vme->states.count(); - m_contexts = new QDeclarativeGuardedContextData[m_contextCount]; + m_contexts = new QQmlGuardedContextData[m_contextCount]; for (int ii = 0; ii < vme->states.count(); ++ii) m_contexts[ii] = vme->states.at(ii).context; if (!vme->rootContext.isNull()) m_contexts[m_contextCount - 1] = vme->rootContext.contextData(); } -void QDeclarativeVMEGuard::clear() +void QQmlVMEGuard::clear() { delete [] m_objects; delete [] m_contexts; @@ -1354,7 +1354,7 @@ void QDeclarativeVMEGuard::clear() m_contexts = 0; } -bool QDeclarativeVMEGuard::isOK() const +bool QQmlVMEGuard::isOK() const { for (int ii = 0; ii < m_objectCount; ++ii) if (m_objects[ii].isNull()) diff --git a/src/declarative/qml/qdeclarativevme_p.h b/src/qml/qml/qqmlvme_p.h similarity index 60% rename from src/declarative/qml/qdeclarativevme_p.h rename to src/qml/qml/qqmlvme_p.h index d413555847..8c8d4d079e 100644 --- a/src/declarative/qml/qdeclarativevme_p.h +++ b/src/qml/qml/qqmlvme_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEVME_P_H -#define QDECLARATIVEVME_P_H +#ifndef QQMLVME_P_H +#define QQMLVME_P_H // // W A R N I N G @@ -53,9 +53,9 @@ // We mean it. // -#include "qdeclarativeerror.h" +#include "qqmlerror.h" #include -#include "qdeclarativeinstruction_p.h" +#include "qqmlinstruction_p.h" #include #include @@ -64,35 +64,35 @@ #include #include -#include +#include #include -#include +#include QT_BEGIN_NAMESPACE class QObject; class QJSValue; -class QDeclarativeScriptData; -class QDeclarativeCompiledData; -class QDeclarativeCompiledData; -class QDeclarativeContextData; +class QQmlScriptData; +class QQmlCompiledData; +class QQmlCompiledData; +class QQmlContextData; -namespace QDeclarativeVMETypes { +namespace QQmlVMETypes { struct List { List() : type(0) {} List(int t) : type(t) {} int type; - QDeclarativeListProperty qListProperty; + QQmlListProperty qListProperty; }; } -Q_DECLARE_TYPEINFO(QDeclarativeVMETypes::List, Q_PRIMITIVE_TYPE | Q_MOVABLE_TYPE); +Q_DECLARE_TYPEINFO(QQmlVMETypes::List, Q_PRIMITIVE_TYPE | Q_MOVABLE_TYPE); -class QDeclarativeVME +class QQmlVME { - Q_DECLARE_TR_FUNCTIONS(QDeclarativeVME) + Q_DECLARE_TR_FUNCTIONS(QQmlVME) public: class Interrupt { public: @@ -114,115 +114,115 @@ class QDeclarativeVME }; }; - QDeclarativeVME() : data(0), componentAttached(0) {} - QDeclarativeVME(void *data) : data(data), componentAttached(0) {} + QQmlVME() : data(0), componentAttached(0) {} + QQmlVME(void *data) : data(data), componentAttached(0) {} void *data; - QDeclarativeComponentAttached *componentAttached; - QList finalizeCallbacks; + QQmlComponentAttached *componentAttached; + QList finalizeCallbacks; - void init(QDeclarativeContextData *, QDeclarativeCompiledData *, int start, - QDeclarativeContextData * = 0); + void init(QQmlContextData *, QQmlCompiledData *, int start, + QQmlContextData * = 0); bool initDeferred(QObject *); void reset(); - QObject *execute(QList *errors, const Interrupt & = Interrupt()); - QDeclarativeContextData *complete(const Interrupt & = Interrupt()); + QObject *execute(QList *errors, const Interrupt & = Interrupt()); + QQmlContextData *complete(const Interrupt & = Interrupt()); private: - friend class QDeclarativeVMEGuard; + friend class QQmlVMEGuard; - QObject *run(QList *errors, const Interrupt & + QObject *run(QList *errors, const Interrupt & #ifdef QML_THREADED_VME_INTERPRETER , void ***storeJumpTable = 0 #endif ); - v8::Persistent run(QDeclarativeContextData *, QDeclarativeScriptData *); + v8::Persistent run(QQmlContextData *, QQmlScriptData *); #ifdef QML_THREADED_VME_INTERPRETER static void **instructionJumpTable(); - friend class QDeclarativeCompiledData; + friend class QQmlCompiledData; #endif - QDeclarativeEngine *engine; + QQmlEngine *engine; QRecursionNode recursion; #ifdef QML_ENABLE_TRACE - QDeclarativeCompiledData *rootComponent; + QQmlCompiledData *rootComponent; #endif QFiniteStack objects; - QFiniteStack lists; + QFiniteStack lists; - QFiniteStack bindValues; - QFiniteStack parserStatus; + QFiniteStack bindValues; + QFiniteStack parserStatus; #ifdef QML_ENABLE_TRACE - QFiniteStack parserStatusData; + QFiniteStack parserStatusData; #endif - QDeclarativeGuardedContextData rootContext; - QDeclarativeGuardedContextData creationContext; + QQmlGuardedContextData rootContext; + QQmlGuardedContextData creationContext; struct State { enum Flag { Deferred = 0x00000001 }; State() : flags(0), context(0), compiledData(0), instructionStream(0) {} quint32 flags; - QDeclarativeContextData *context; - QDeclarativeCompiledData *compiledData; + QQmlContextData *context; + QQmlCompiledData *compiledData; const char *instructionStream; QBitField bindingSkipList; }; QStack states; - static void blank(QFiniteStack &); - static void blank(QFiniteStack &); + static void blank(QFiniteStack &); + static void blank(QFiniteStack &); }; -// Used to check that a QDeclarativeVME that is interrupted mid-execution +// Used to check that a QQmlVME that is interrupted mid-execution // is still valid. Checks all the objects and contexts have not been // deleted. -class QDeclarativeVMEGuard +class QQmlVMEGuard { public: - QDeclarativeVMEGuard(); - ~QDeclarativeVMEGuard(); + QQmlVMEGuard(); + ~QQmlVMEGuard(); - void guard(QDeclarativeVME *); + void guard(QQmlVME *); void clear(); bool isOK() const; private: int m_objectCount; - QDeclarativeGuard *m_objects; + QQmlGuard *m_objects; int m_contextCount; - QDeclarativeGuardedContextData *m_contexts; + QQmlGuardedContextData *m_contexts; }; -QDeclarativeVME::Interrupt::Interrupt() +QQmlVME::Interrupt::Interrupt() : mode(None) { } -QDeclarativeVME::Interrupt::Interrupt(bool *runWhile) +QQmlVME::Interrupt::Interrupt(bool *runWhile) : mode(Flag), runWhile(runWhile) { } -QDeclarativeVME::Interrupt::Interrupt(int nsecs) +QQmlVME::Interrupt::Interrupt(int nsecs) : mode(Time), nsecs(nsecs) { } -void QDeclarativeVME::Interrupt::reset() +void QQmlVME::Interrupt::reset() { if (mode == Time) timer.start(); } -bool QDeclarativeVME::Interrupt::shouldInterrupt() const +bool QQmlVME::Interrupt::shouldInterrupt() const { if (mode == None) { return false; @@ -237,4 +237,4 @@ bool QDeclarativeVME::Interrupt::shouldInterrupt() const QT_END_NAMESPACE -#endif // QDECLARATIVEVME_P_H +#endif // QQMLVME_P_H diff --git a/src/declarative/qml/qdeclarativevmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp similarity index 76% rename from src/declarative/qml/qdeclarativevmemetaobject.cpp rename to src/qml/qml/qqmlvmemetaobject.cpp index f7361eb2ce..7ea89a4a2d 100644 --- a/src/declarative/qml/qdeclarativevmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,16 +39,16 @@ ** ****************************************************************************/ -#include "qdeclarativevmemetaobject_p.h" +#include "qqmlvmemetaobject_p.h" -#include "qdeclarative.h" -#include -#include "qdeclarativeexpression.h" -#include "qdeclarativeexpression_p.h" -#include "qdeclarativecontext_p.h" -#include "qdeclarativebinding_p.h" -#include "qdeclarativepropertyvalueinterceptor_p.h" +#include "qqml.h" +#include +#include "qqmlexpression.h" +#include "qqmlexpression_p.h" +#include "qqmlcontext_p.h" +#include "qqmlbinding_p.h" +#include "qqmlpropertyvalueinterceptor_p.h" #include @@ -56,11 +56,11 @@ Q_DECLARE_METATYPE(QJSValue); QT_BEGIN_NAMESPACE -class QDeclarativeVMEVariant +class QQmlVMEVariant { public: - inline QDeclarativeVMEVariant(); - inline ~QDeclarativeVMEVariant(); + inline QQmlVMEVariant(); + inline ~QQmlVMEVariant(); inline const void *dataPtr() const; inline void *dataPtr(); @@ -98,28 +98,28 @@ class QDeclarativeVMEVariant inline void cleanup(); }; -class QDeclarativeVMEMetaObjectEndpoint : public QDeclarativeNotifierEndpoint +class QQmlVMEMetaObjectEndpoint : public QQmlNotifierEndpoint { public: - QDeclarativeVMEMetaObjectEndpoint(); - static void vmecallback(QDeclarativeNotifierEndpoint *); + QQmlVMEMetaObjectEndpoint(); + static void vmecallback(QQmlNotifierEndpoint *); void tryConnect(); - QFlagPointer metaObject; + QFlagPointer metaObject; }; -QDeclarativeVMEVariant::QDeclarativeVMEVariant() +QQmlVMEVariant::QQmlVMEVariant() : type(QVariant::Invalid) { } -QDeclarativeVMEVariant::~QDeclarativeVMEVariant() +QQmlVMEVariant::~QQmlVMEVariant() { cleanup(); } -void QDeclarativeVMEVariant::cleanup() +void QQmlVMEVariant::cleanup() { if (type == QVariant::Invalid) { } else if (type == QMetaType::Int || @@ -127,7 +127,7 @@ void QDeclarativeVMEVariant::cleanup() type == QMetaType::Double) { type = QVariant::Invalid; } else if (type == QMetaType::QObjectStar) { - ((QDeclarativeGuard*)dataPtr())->~QDeclarativeGuard(); + ((QQmlGuard*)dataPtr())->~QQmlGuard(); type = QVariant::Invalid; } else if (type == QMetaType::QString) { ((QString *)dataPtr())->~QString(); @@ -157,30 +157,30 @@ void QDeclarativeVMEVariant::cleanup() } -int QDeclarativeVMEVariant::dataType() const +int QQmlVMEVariant::dataType() const { return type; } -const void *QDeclarativeVMEVariant::dataPtr() const +const void *QQmlVMEVariant::dataPtr() const { return &data; } -void *QDeclarativeVMEVariant::dataPtr() +void *QQmlVMEVariant::dataPtr() { return &data; } -QObject *QDeclarativeVMEVariant::asQObject() +QObject *QQmlVMEVariant::asQObject() { if (type != QMetaType::QObjectStar) setValue((QObject *)0); - return *(QDeclarativeGuard *)(dataPtr()); + return *(QQmlGuard *)(dataPtr()); } -const QVariant &QDeclarativeVMEVariant::asQVariant() +const QVariant &QQmlVMEVariant::asQVariant() { if (type != QMetaType::QVariant) setValue(QVariant()); @@ -188,7 +188,7 @@ const QVariant &QDeclarativeVMEVariant::asQVariant() return *(QVariant *)(dataPtr()); } -int QDeclarativeVMEVariant::asInt() +int QQmlVMEVariant::asInt() { if (type != QMetaType::Int) setValue(int(0)); @@ -196,7 +196,7 @@ int QDeclarativeVMEVariant::asInt() return *(int *)(dataPtr()); } -bool QDeclarativeVMEVariant::asBool() +bool QQmlVMEVariant::asBool() { if (type != QMetaType::Bool) setValue(bool(false)); @@ -204,7 +204,7 @@ bool QDeclarativeVMEVariant::asBool() return *(bool *)(dataPtr()); } -double QDeclarativeVMEVariant::asDouble() +double QQmlVMEVariant::asDouble() { if (type != QMetaType::Double) setValue(double(0)); @@ -212,7 +212,7 @@ double QDeclarativeVMEVariant::asDouble() return *(double *)(dataPtr()); } -const QString &QDeclarativeVMEVariant::asQString() +const QString &QQmlVMEVariant::asQString() { if (type != QMetaType::QString) setValue(QString()); @@ -220,7 +220,7 @@ const QString &QDeclarativeVMEVariant::asQString() return *(QString *)(dataPtr()); } -const QUrl &QDeclarativeVMEVariant::asQUrl() +const QUrl &QQmlVMEVariant::asQUrl() { if (type != QMetaType::QUrl) setValue(QUrl()); @@ -228,7 +228,7 @@ const QUrl &QDeclarativeVMEVariant::asQUrl() return *(QUrl *)(dataPtr()); } -const QColor &QDeclarativeVMEVariant::asQColor() +const QColor &QQmlVMEVariant::asQColor() { if (type != QMetaType::QColor) setValue(QColor()); @@ -236,7 +236,7 @@ const QColor &QDeclarativeVMEVariant::asQColor() return *(QColor *)(dataPtr()); } -const QTime &QDeclarativeVMEVariant::asQTime() +const QTime &QQmlVMEVariant::asQTime() { if (type != QMetaType::QTime) setValue(QTime()); @@ -244,7 +244,7 @@ const QTime &QDeclarativeVMEVariant::asQTime() return *(QTime *)(dataPtr()); } -const QDate &QDeclarativeVMEVariant::asQDate() +const QDate &QQmlVMEVariant::asQDate() { if (type != QMetaType::QDate) setValue(QDate()); @@ -252,7 +252,7 @@ const QDate &QDeclarativeVMEVariant::asQDate() return *(QDate *)(dataPtr()); } -const QDateTime &QDeclarativeVMEVariant::asQDateTime() +const QDateTime &QQmlVMEVariant::asQDateTime() { if (type != QMetaType::QDateTime) setValue(QDateTime()); @@ -260,7 +260,7 @@ const QDateTime &QDeclarativeVMEVariant::asQDateTime() return *(QDateTime *)(dataPtr()); } -const QJSValue &QDeclarativeVMEVariant::asQJSValue() +const QJSValue &QQmlVMEVariant::asQJSValue() { if (type != qMetaTypeId()) setValue(QJSValue()); @@ -268,17 +268,17 @@ const QJSValue &QDeclarativeVMEVariant::asQJSValue() return *(QJSValue *)(dataPtr()); } -void QDeclarativeVMEVariant::setValue(QObject *v) +void QQmlVMEVariant::setValue(QObject *v) { if (type != QMetaType::QObjectStar) { cleanup(); type = QMetaType::QObjectStar; - new (dataPtr()) QDeclarativeGuard(); + new (dataPtr()) QQmlGuard(); } - *(QDeclarativeGuard*)(dataPtr()) = v; + *(QQmlGuard*)(dataPtr()) = v; } -void QDeclarativeVMEVariant::setValue(const QVariant &v) +void QQmlVMEVariant::setValue(const QVariant &v) { if (type != qMetaTypeId()) { cleanup(); @@ -289,7 +289,7 @@ void QDeclarativeVMEVariant::setValue(const QVariant &v) } } -void QDeclarativeVMEVariant::setValue(int v) +void QQmlVMEVariant::setValue(int v) { if (type != QMetaType::Int) { cleanup(); @@ -298,7 +298,7 @@ void QDeclarativeVMEVariant::setValue(int v) *(int *)(dataPtr()) = v; } -void QDeclarativeVMEVariant::setValue(bool v) +void QQmlVMEVariant::setValue(bool v) { if (type != QMetaType::Bool) { cleanup(); @@ -307,7 +307,7 @@ void QDeclarativeVMEVariant::setValue(bool v) *(bool *)(dataPtr()) = v; } -void QDeclarativeVMEVariant::setValue(double v) +void QQmlVMEVariant::setValue(double v) { if (type != QMetaType::Double) { cleanup(); @@ -316,7 +316,7 @@ void QDeclarativeVMEVariant::setValue(double v) *(double *)(dataPtr()) = v; } -void QDeclarativeVMEVariant::setValue(const QString &v) +void QQmlVMEVariant::setValue(const QString &v) { if (type != QMetaType::QString) { cleanup(); @@ -327,7 +327,7 @@ void QDeclarativeVMEVariant::setValue(const QString &v) } } -void QDeclarativeVMEVariant::setValue(const QUrl &v) +void QQmlVMEVariant::setValue(const QUrl &v) { if (type != QMetaType::QUrl) { cleanup(); @@ -338,7 +338,7 @@ void QDeclarativeVMEVariant::setValue(const QUrl &v) } } -void QDeclarativeVMEVariant::setValue(const QColor &v) +void QQmlVMEVariant::setValue(const QColor &v) { if (type != QMetaType::QColor) { cleanup(); @@ -349,7 +349,7 @@ void QDeclarativeVMEVariant::setValue(const QColor &v) } } -void QDeclarativeVMEVariant::setValue(const QTime &v) +void QQmlVMEVariant::setValue(const QTime &v) { if (type != QMetaType::QTime) { cleanup(); @@ -360,7 +360,7 @@ void QDeclarativeVMEVariant::setValue(const QTime &v) } } -void QDeclarativeVMEVariant::setValue(const QDate &v) +void QQmlVMEVariant::setValue(const QDate &v) { if (type != QMetaType::QDate) { cleanup(); @@ -371,7 +371,7 @@ void QDeclarativeVMEVariant::setValue(const QDate &v) } } -void QDeclarativeVMEVariant::setValue(const QDateTime &v) +void QQmlVMEVariant::setValue(const QDateTime &v) { if (type != QMetaType::QDateTime) { cleanup(); @@ -382,7 +382,7 @@ void QDeclarativeVMEVariant::setValue(const QDateTime &v) } } -void QDeclarativeVMEVariant::setValue(const QJSValue &v) +void QQmlVMEVariant::setValue(const QJSValue &v) { if (type != qMetaTypeId()) { cleanup(); @@ -393,18 +393,18 @@ void QDeclarativeVMEVariant::setValue(const QJSValue &v) } } -QDeclarativeVMEMetaObjectEndpoint::QDeclarativeVMEMetaObjectEndpoint() +QQmlVMEMetaObjectEndpoint::QQmlVMEMetaObjectEndpoint() { callback = &vmecallback; } -void QDeclarativeVMEMetaObjectEndpoint::vmecallback(QDeclarativeNotifierEndpoint *e) +void QQmlVMEMetaObjectEndpoint::vmecallback(QQmlNotifierEndpoint *e) { - QDeclarativeVMEMetaObjectEndpoint *vmee = static_cast(e); + QQmlVMEMetaObjectEndpoint *vmee = static_cast(e); vmee->tryConnect(); } -void QDeclarativeVMEMetaObjectEndpoint::tryConnect() +void QQmlVMEMetaObjectEndpoint::tryConnect() { int aliasId = this - metaObject->aliasEndpoints; @@ -413,9 +413,9 @@ void QDeclarativeVMEMetaObjectEndpoint::tryConnect() int sigIdx = metaObject->methodOffset + aliasId + metaObject->metaData->propertyCount; QMetaObject::activate(metaObject->object, sigIdx, 0); } else { - QDeclarativeVMEMetaData::AliasData *d = metaObject->metaData->aliasData() + aliasId; + QQmlVMEMetaData::AliasData *d = metaObject->metaData->aliasData() + aliasId; if (!d->isObjectAlias()) { - QDeclarativeContextData *ctxt = metaObject->ctxt; + QQmlContextData *ctxt = metaObject->ctxt; QObject *target = ctxt->idValues[d->contextIdx].data(); if (!target) return; @@ -429,12 +429,12 @@ void QDeclarativeVMEMetaObjectEndpoint::tryConnect() } } -QDeclarativeVMEMetaObject::QDeclarativeVMEMetaObject(QObject *obj, +QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj, const QMetaObject *other, - const QDeclarativeVMEMetaData *meta, - QDeclarativeCompiledData *cdata) + const QQmlVMEMetaData *meta, + QQmlCompiledData *cdata) : QV8GCCallback::Node(GcPrologueCallback), object(obj), compiledData(cdata), - ctxt(QDeclarativeData::get(obj, true)->outerContext), metaData(meta), data(0), + ctxt(QQmlData::get(obj, true)->outerContext), metaData(meta), data(0), aliasEndpoints(0), firstVarPropertyIndex(-1), varPropertiesInitialized(false), v8methods(0), parent(0) { @@ -451,10 +451,10 @@ QDeclarativeVMEMetaObject::QDeclarativeVMEMetaObject(QObject *obj, propOffset = QAbstractDynamicMetaObject::propertyOffset(); methodOffset = QAbstractDynamicMetaObject::methodOffset(); - data = new QDeclarativeVMEVariant[metaData->propertyCount - metaData->varPropertyCount]; + data = new QQmlVMEVariant[metaData->propertyCount - metaData->varPropertyCount]; aConnected.resize(metaData->aliasCount); - int list_type = qMetaTypeId >(); + int list_type = qMetaTypeId >(); // ### Optimize for (int ii = 0; ii < metaData->propertyCount - metaData->varPropertyCount; ++ii) { @@ -470,7 +470,7 @@ QDeclarativeVMEMetaObject::QDeclarativeVMEMetaObject(QObject *obj, QV8GCCallback::addGcCallbackNode(this); } -QDeclarativeVMEMetaObject::~QDeclarativeVMEMetaObject() +QQmlVMEMetaObject::~QQmlVMEMetaObject() { compiledData->release(); delete parent; @@ -486,25 +486,25 @@ QDeclarativeVMEMetaObject::~QDeclarativeVMEMetaObject() qPersistentDispose(varProperties); // if not weak, will not have been cleaned up by the callback. } -int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) +int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) { int id = _id; if(c == QMetaObject::WriteProperty) { int flags = *reinterpret_cast(a[3]); - if (!(flags & QDeclarativePropertyPrivate::BypassInterceptor) + if (!(flags & QQmlPropertyPrivate::BypassInterceptor) && !aInterceptors.isEmpty() && aInterceptors.testBit(id)) { - QPair pair = interceptors.value(id); + QPair pair = interceptors.value(id); int valueIndex = pair.first; - QDeclarativePropertyValueInterceptor *vi = pair.second; + QQmlPropertyValueInterceptor *vi = pair.second; int type = property(id).userType(); if (type != QVariant::Invalid) { if (valueIndex != -1) { - QDeclarativeEnginePrivate *ep = ctxt?QDeclarativeEnginePrivate::get(ctxt->engine):0; - QDeclarativeValueType *valueType = 0; + QQmlEnginePrivate *ep = ctxt?QQmlEnginePrivate::get(ctxt->engine):0; + QQmlValueType *valueType = 0; if (ep) valueType = ep->valueTypes[type]; - else valueType = QDeclarativeValueTypeFactory::valueType(type); + else valueType = QQmlValueTypeFactory::valueType(type); Q_ASSERT(valueType); valueType->setValue(QVariant(type, a[0])); @@ -531,7 +531,7 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) if (id >= firstVarPropertyIndex) { Q_ASSERT(t == QMetaType::QVariant); // the context can be null if accessing var properties from cpp after re-parenting an item. - QDeclarativeEnginePrivate *ep = (ctxt == 0 || ctxt->engine == 0) ? 0 : QDeclarativeEnginePrivate::get(ctxt->engine); + QQmlEnginePrivate *ep = (ctxt == 0 || ctxt->engine == 0) ? 0 : QQmlEnginePrivate::get(ctxt->engine); QV8Engine *v8e = (ep == 0) ? 0 : ep->v8engine(); if (v8e) { v8::HandleScope handleScope; @@ -583,11 +583,11 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) default: break; } - if (t == qMetaTypeId >()) { + if (t == qMetaTypeId >()) { int listIndex = data[id].asInt(); const List *list = &listProperties.at(listIndex); - *reinterpret_cast *>(a[0]) = - QDeclarativeListProperty(object, (void *)list, + *reinterpret_cast *>(a[0]) = + QQmlListProperty(object, (void *)list, list_append, list_count, list_at, list_clear); } @@ -652,15 +652,15 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) if (id < metaData->aliasCount) { - QDeclarativeVMEMetaData::AliasData *d = metaData->aliasData() + id; + QQmlVMEMetaData::AliasData *d = metaData->aliasData() + id; if (d->flags & QML_ALIAS_FLAG_PTR && c == QMetaObject::ReadProperty) *reinterpret_cast(a[0]) = 0; if (!ctxt) return -1; - QDeclarativeContext *context = ctxt->asQDeclarativeContext(); - QDeclarativeContextPrivate *ctxtPriv = QDeclarativeContextPrivate::get(context); + QQmlContext *context = ctxt->asQQmlContext(); + QQmlContextPrivate *ctxtPriv = QQmlContextPrivate::get(context); QObject *target = ctxtPriv->data->idValues[d->contextIdx].data(); if (!target) @@ -676,10 +676,10 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) // Remove binding (if any) on write if(c == QMetaObject::WriteProperty) { int flags = *reinterpret_cast(a[3]); - if (flags & QDeclarativePropertyPrivate::RemoveBindingOnAliasWrite) { - QDeclarativeData *targetData = QDeclarativeData::get(target); + if (flags & QQmlPropertyPrivate::RemoveBindingOnAliasWrite) { + QQmlData *targetData = QQmlData::get(target); if (targetData && targetData->hasBindingBit(d->propertyIndex())) { - QDeclarativeAbstractBinding *binding = QDeclarativePropertyPrivate::setBinding(target, d->propertyIndex(), d->isValueTypeAlias()?d->valueTypeIndex():-1, 0); + QQmlAbstractBinding *binding = QQmlPropertyPrivate::setBinding(target, d->propertyIndex(), d->isValueTypeAlias()?d->valueTypeIndex():-1, 0); if (binding) binding->destroy(); } } @@ -687,9 +687,9 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) if (d->isValueTypeAlias()) { // Value type property - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(ctxt->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(ctxt->engine); - QDeclarativeValueType *valueType = ep->valueTypes[d->valueType()]; + QQmlValueType *valueType = ep->valueTypes[d->valueType()]; Q_ASSERT(valueType); valueType->read(target, d->propertyIndex()); @@ -727,7 +727,7 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) if (!ctxt->engine) return -1; // We can't run the method - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(ctxt->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(ctxt->engine); ep->referenceScarceResources(); // "hold" scarce resources in memory during evaluation. v8::Handle function = method(id); @@ -736,14 +736,14 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) // expression rewriter does not rewrite properly (e.g., \r-terminated lines // are not rewritten correctly but this bug is deemed out-of-scope to fix for // performance reasons; see QTBUG-24064) and thus compilation will have failed. - QDeclarativeError e; + QQmlError e; e.setDescription(QString(QLatin1String("Exception occurred during compilation of function: %1")). arg(QLatin1String(QMetaObject::method(_id).signature()))); ep->warning(e); return -1; // The dynamic method with that id is not available. } - QDeclarativeVMEMetaData::MethodData *data = metaData->methodData() + id; + QQmlVMEMetaData::MethodData *data = metaData->methodData() + id; v8::HandleScope handle_scope; v8::Context::Scope scope(ep->v8engine()->context()); @@ -761,8 +761,8 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) QVariant rv; if (try_catch.HasCaught()) { - QDeclarativeError error; - QDeclarativeExpressionPrivate::exceptionToError(try_catch.Message(), error); + QQmlError error; + QQmlExpressionPrivate::exceptionToError(try_catch.Message(), error); if (error.isValid()) ep->warning(error); if (a[0]) *(QVariant *)a[0] = QVariant(); @@ -783,13 +783,13 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) return object->qt_metacall(c, _id, a); } -v8::Handle QDeclarativeVMEMetaObject::method(int index) +v8::Handle QQmlVMEMetaObject::method(int index) { if (!v8methods) v8methods = new v8::Persistent[metaData->methodCount]; if (v8methods[index].IsEmpty()) { - QDeclarativeVMEMetaData::MethodData *data = metaData->methodData() + index; + QQmlVMEMetaData::MethodData *data = metaData->methodData() + index; const char *body = ((const char*)metaData) + data->bodyOffset; int bodyLength = data->bodyLength; @@ -797,7 +797,7 @@ v8::Handle QDeclarativeVMEMetaObject::method(int index) // XXX We should evaluate all methods in a single big script block to // improve the call time between dynamic methods defined on the same // object - v8methods[index] = QDeclarativeExpressionPrivate::evalFunction(ctxt, object, body, + v8methods[index] = QQmlExpressionPrivate::evalFunction(ctxt, object, body, bodyLength, ctxt->urlString, data->lineNumber); @@ -806,7 +806,7 @@ v8::Handle QDeclarativeVMEMetaObject::method(int index) return v8methods[index]; } -v8::Handle QDeclarativeVMEMetaObject::readVarProperty(int id) +v8::Handle QQmlVMEMetaObject::readVarProperty(int id) { Q_ASSERT(id >= firstVarPropertyIndex); @@ -814,11 +814,11 @@ v8::Handle QDeclarativeVMEMetaObject::readVarProperty(int id) return varProperties->Get(id - firstVarPropertyIndex); } -QVariant QDeclarativeVMEMetaObject::readPropertyAsVariant(int id) +QVariant QQmlVMEMetaObject::readPropertyAsVariant(int id) { if (id >= firstVarPropertyIndex) { ensureVarPropertiesAllocated(); - return QDeclarativeEnginePrivate::get(ctxt->engine)->v8engine()->toVariant(varProperties->Get(id - firstVarPropertyIndex), -1); + return QQmlEnginePrivate::get(ctxt->engine)->v8engine()->toVariant(varProperties->Get(id - firstVarPropertyIndex), -1); } else { if (data[id].dataType() == QMetaType::QObjectStar) { return QVariant::fromValue(data[id].asQObject()); @@ -828,7 +828,7 @@ QVariant QDeclarativeVMEMetaObject::readPropertyAsVariant(int id) } } -void QDeclarativeVMEMetaObject::writeVarProperty(int id, v8::Handle value) +void QQmlVMEMetaObject::writeVarProperty(int id, v8::Handle value) { Q_ASSERT(id >= firstVarPropertyIndex); ensureVarPropertiesAllocated(); @@ -857,7 +857,7 @@ void QDeclarativeVMEMetaObject::writeVarProperty(int id, v8::Handle v activate(object, methodOffset + id, 0); } -void QDeclarativeVMEMetaObject::writeProperty(int id, const QVariant &value) +void QQmlVMEMetaObject::writeProperty(int id, const QVariant &value) { if (id >= firstVarPropertyIndex) { ensureVarPropertiesAllocated(); @@ -874,7 +874,7 @@ void QDeclarativeVMEMetaObject::writeProperty(int id, const QVariant &value) // And, if the new value is a scarce resource, we need to ensure that it does not get // automatically released by the engine until no other references to it exist. - v8::Handle newv = QDeclarativeEnginePrivate::get(ctxt->engine)->v8engine()->fromVariant(value); + v8::Handle newv = QQmlEnginePrivate::get(ctxt->engine)->v8engine()->fromVariant(value); if (newv->IsObject()) { QV8VariantResource *r = v8_resource_cast(v8::Handle::Cast(newv)); if (r) { @@ -905,36 +905,36 @@ void QDeclarativeVMEMetaObject::writeProperty(int id, const QVariant &value) } } -void QDeclarativeVMEMetaObject::listChanged(int id) +void QQmlVMEMetaObject::listChanged(int id) { activate(object, methodOffset + id, 0); } -void QDeclarativeVMEMetaObject::list_append(QDeclarativeListProperty *prop, QObject *o) +void QQmlVMEMetaObject::list_append(QQmlListProperty *prop, QObject *o) { List *list = static_cast(prop->data); list->append(o); QMetaObject::activate(prop->object, list->notifyIndex, 0); } -int QDeclarativeVMEMetaObject::list_count(QDeclarativeListProperty *prop) +int QQmlVMEMetaObject::list_count(QQmlListProperty *prop) { return static_cast(prop->data)->count(); } -QObject *QDeclarativeVMEMetaObject::list_at(QDeclarativeListProperty *prop, int index) +QObject *QQmlVMEMetaObject::list_at(QQmlListProperty *prop, int index) { return static_cast(prop->data)->at(index); } -void QDeclarativeVMEMetaObject::list_clear(QDeclarativeListProperty *prop) +void QQmlVMEMetaObject::list_clear(QQmlListProperty *prop) { List *list = static_cast(prop->data); list->clear(); QMetaObject::activate(prop->object, list->notifyIndex, 0); } -void QDeclarativeVMEMetaObject::registerInterceptor(int index, int valueIndex, QDeclarativePropertyValueInterceptor *interceptor) +void QQmlVMEMetaObject::registerInterceptor(int index, int valueIndex, QQmlPropertyValueInterceptor *interceptor) { if (aInterceptors.isEmpty()) aInterceptors.resize(propertyCount() + metaData->propertyCount); @@ -942,11 +942,11 @@ void QDeclarativeVMEMetaObject::registerInterceptor(int index, int valueIndex, Q interceptors.insert(index, qMakePair(valueIndex, interceptor)); } -int QDeclarativeVMEMetaObject::vmeMethodLineNumber(int index) +int QQmlVMEMetaObject::vmeMethodLineNumber(int index) { if (index < methodOffset) { Q_ASSERT(parent); - return static_cast(parent)->vmeMethodLineNumber(index); + return static_cast(parent)->vmeMethodLineNumber(index); } int plainSignals = metaData->signalCount + metaData->propertyCount + metaData->aliasCount; @@ -954,15 +954,15 @@ int QDeclarativeVMEMetaObject::vmeMethodLineNumber(int index) int rawIndex = index - methodOffset - plainSignals; - QDeclarativeVMEMetaData::MethodData *data = metaData->methodData() + rawIndex; + QQmlVMEMetaData::MethodData *data = metaData->methodData() + rawIndex; return data->lineNumber; } -v8::Handle QDeclarativeVMEMetaObject::vmeMethod(int index) +v8::Handle QQmlVMEMetaObject::vmeMethod(int index) { if (index < methodOffset) { Q_ASSERT(parent); - return static_cast(parent)->vmeMethod(index); + return static_cast(parent)->vmeMethod(index); } int plainSignals = metaData->signalCount + metaData->propertyCount + metaData->aliasCount; Q_ASSERT(index >= (methodOffset + plainSignals) && index < (methodOffset + plainSignals + metaData->methodCount)); @@ -970,11 +970,11 @@ v8::Handle QDeclarativeVMEMetaObject::vmeMethod(int index) } // Used by debugger -void QDeclarativeVMEMetaObject::setVmeMethod(int index, v8::Persistent value) +void QQmlVMEMetaObject::setVmeMethod(int index, v8::Persistent value) { if (index < methodOffset) { Q_ASSERT(parent); - return static_cast(parent)->setVmeMethod(index, value); + return static_cast(parent)->setVmeMethod(index, value); } int plainSignals = metaData->signalCount + metaData->propertyCount + metaData->aliasCount; Q_ASSERT(index >= (methodOffset + plainSignals) && index < (methodOffset + plainSignals + metaData->methodCount)); @@ -988,36 +988,36 @@ void QDeclarativeVMEMetaObject::setVmeMethod(int index, v8::Persistent QDeclarativeVMEMetaObject::vmeProperty(int index) +v8::Handle QQmlVMEMetaObject::vmeProperty(int index) { if (index < propOffset) { Q_ASSERT(parent); - return static_cast(parent)->vmeProperty(index); + return static_cast(parent)->vmeProperty(index); } return readVarProperty(index - propOffset); } -void QDeclarativeVMEMetaObject::setVMEProperty(int index, v8::Handle v) +void QQmlVMEMetaObject::setVMEProperty(int index, v8::Handle v) { if (index < propOffset) { Q_ASSERT(parent); - static_cast(parent)->setVMEProperty(index, v); + static_cast(parent)->setVMEProperty(index, v); return; } return writeVarProperty(index - propOffset, v); } -void QDeclarativeVMEMetaObject::ensureVarPropertiesAllocated() +void QQmlVMEMetaObject::ensureVarPropertiesAllocated() { if (!varPropertiesInitialized) allocateVarPropertiesArray(); } // see also: QV8GCCallback::garbageCollectorPrologueCallback() -void QDeclarativeVMEMetaObject::allocateVarPropertiesArray() +void QQmlVMEMetaObject::allocateVarPropertiesArray() { v8::HandleScope handleScope; - v8::Context::Scope cs(QDeclarativeEnginePrivate::get(ctxt->engine)->v8engine()->context()); + v8::Context::Scope cs(QQmlEnginePrivate::get(ctxt->engine)->v8engine()->context()); varProperties = qPersistentNew(v8::Array::New(metaData->varPropertyCount)); varProperties.MakeWeak(static_cast(this), VarPropertiesWeakReferenceCallback); varPropertiesInitialized = true; @@ -1030,25 +1030,25 @@ void QDeclarativeVMEMetaObject::allocateVarPropertiesArray() is cleared as a result of all other handles to that v8object being released. See QV8GCCallback::garbageCollectorPrologueCallback() for more information. */ -void QDeclarativeVMEMetaObject::VarPropertiesWeakReferenceCallback(v8::Persistent object, void* parameter) +void QQmlVMEMetaObject::VarPropertiesWeakReferenceCallback(v8::Persistent object, void* parameter) { - QDeclarativeVMEMetaObject *vmemo = static_cast(parameter); + QQmlVMEMetaObject *vmemo = static_cast(parameter); Q_ASSERT(vmemo); qPersistentDispose(object); vmemo->varProperties.Clear(); } -void QDeclarativeVMEMetaObject::GcPrologueCallback(QV8GCCallback::Node *node) +void QQmlVMEMetaObject::GcPrologueCallback(QV8GCCallback::Node *node) { - QDeclarativeVMEMetaObject *vmemo = static_cast(node); + QQmlVMEMetaObject *vmemo = static_cast(node); Q_ASSERT(vmemo); if (!vmemo->varPropertiesInitialized || vmemo->varProperties.IsEmpty() || !vmemo->ctxt || !vmemo->ctxt->engine) return; - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(vmemo->ctxt->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(vmemo->ctxt->engine); ep->v8engine()->addRelationshipForGC(vmemo->object, vmemo->varProperties); } -bool QDeclarativeVMEMetaObject::aliasTarget(int index, QObject **target, int *coreIndex, int *valueTypeIndex) const +bool QQmlVMEMetaObject::aliasTarget(int index, QObject **target, int *coreIndex, int *valueTypeIndex) const { Q_ASSERT(index >= propOffset + metaData->propertyCount); @@ -1059,9 +1059,9 @@ bool QDeclarativeVMEMetaObject::aliasTarget(int index, QObject **target, int *co if (!ctxt) return false; - QDeclarativeVMEMetaData::AliasData *d = metaData->aliasData() + (index - propOffset - metaData->propertyCount); - QDeclarativeContext *context = ctxt->asQDeclarativeContext(); - QDeclarativeContextPrivate *ctxtPriv = QDeclarativeContextPrivate::get(context); + QQmlVMEMetaData::AliasData *d = metaData->aliasData() + (index - propOffset - metaData->propertyCount); + QQmlContext *context = ctxt->asQQmlContext(); + QQmlContextPrivate *ctxtPriv = QQmlContextPrivate::get(context); *target = ctxtPriv->data->idValues[d->contextIdx].data(); if (!*target) @@ -1078,18 +1078,18 @@ bool QDeclarativeVMEMetaObject::aliasTarget(int index, QObject **target, int *co return true; } -void QDeclarativeVMEMetaObject::connectAlias(int aliasId) +void QQmlVMEMetaObject::connectAlias(int aliasId) { if (!aConnected.testBit(aliasId)) { if (!aliasEndpoints) - aliasEndpoints = new QDeclarativeVMEMetaObjectEndpoint[metaData->aliasCount]; + aliasEndpoints = new QQmlVMEMetaObjectEndpoint[metaData->aliasCount]; aConnected.setBit(aliasId); - QDeclarativeVMEMetaData::AliasData *d = metaData->aliasData() + aliasId; + QQmlVMEMetaData::AliasData *d = metaData->aliasData() + aliasId; - QDeclarativeVMEMetaObjectEndpoint *endpoint = aliasEndpoints + aliasId; + QQmlVMEMetaObjectEndpoint *endpoint = aliasEndpoints + aliasId; endpoint->metaObject = this; endpoint->connect(&ctxt->idValues[d->contextIdx].bindings); @@ -1098,7 +1098,7 @@ void QDeclarativeVMEMetaObject::connectAlias(int aliasId) } } -void QDeclarativeVMEMetaObject::connectAliasSignal(int index) +void QQmlVMEMetaObject::connectAliasSignal(int index) { int aliasId = (index - methodOffset) - metaData->propertyCount; if (aliasId < 0 || aliasId >= metaData->aliasCount) diff --git a/src/declarative/qml/qdeclarativevmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h similarity index 77% rename from src/declarative/qml/qdeclarativevmemetaobject_p.h rename to src/qml/qml/qqmlvmemetaobject_p.h index a8b7c4c359..deee989383 100644 --- a/src/declarative/qml/qdeclarativevmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEVMEMETAOBJECT_P_H -#define QDECLARATIVEVMEMETAOBJECT_P_H +#ifndef QQMLVMEMETAOBJECT_P_H +#define QQMLVMEMETAOBJECT_P_H // // W A R N I N G @@ -53,7 +53,7 @@ // We mean it. // -#include "qdeclarative.h" +#include "qqml.h" #include #include @@ -65,9 +65,9 @@ #include -#include "qdeclarativeguard_p.h" -#include "qdeclarativecompiler_p.h" -#include "qdeclarativecontext_p.h" +#include "qqmlguard_p.h" +#include "qqmlcompiler_p.h" +#include "qqmlcontext_p.h" #include @@ -77,7 +77,7 @@ QT_BEGIN_NAMESPACE #define QML_ALIAS_FLAG_PTR 0x00000001 -struct QDeclarativeVMEMetaData +struct QQmlVMEMetaData { short varPropertyCount; short propertyCount; @@ -124,7 +124,7 @@ struct QDeclarativeVMEMetaData }; PropertyData *propertyData() const { - return (PropertyData *)(((const char *)this) + sizeof(QDeclarativeVMEMetaData)); + return (PropertyData *)(((const char *)this) + sizeof(QQmlVMEMetaData)); } AliasData *aliasData() const { @@ -137,19 +137,19 @@ struct QDeclarativeVMEMetaData }; class QV8QObjectWrapper; -class QDeclarativeVMEVariant; -class QDeclarativeRefCount; -class QDeclarativeVMEMetaObjectEndpoint; -class Q_AUTOTEST_EXPORT QDeclarativeVMEMetaObject : public QAbstractDynamicMetaObject, +class QQmlVMEVariant; +class QQmlRefCount; +class QQmlVMEMetaObjectEndpoint; +class Q_AUTOTEST_EXPORT QQmlVMEMetaObject : public QAbstractDynamicMetaObject, public QV8GCCallback::Node { public: - QDeclarativeVMEMetaObject(QObject *obj, const QMetaObject *other, const QDeclarativeVMEMetaData *data, - QDeclarativeCompiledData *compiledData); - ~QDeclarativeVMEMetaObject(); + QQmlVMEMetaObject(QObject *obj, const QMetaObject *other, const QQmlVMEMetaData *data, + QQmlCompiledData *compiledData); + ~QQmlVMEMetaObject(); bool aliasTarget(int index, QObject **target, int *coreIndex, int *valueTypeIndex) const; - void registerInterceptor(int index, int valueIndex, QDeclarativePropertyValueInterceptor *interceptor); + void registerInterceptor(int index, int valueIndex, QQmlPropertyValueInterceptor *interceptor); v8::Handle vmeMethod(int index); int vmeMethodLineNumber(int index); void setVmeMethod(int index, v8::Persistent); @@ -162,18 +162,18 @@ class Q_AUTOTEST_EXPORT QDeclarativeVMEMetaObject : public QAbstractDynamicMetaO virtual int metaCall(QMetaObject::Call _c, int _id, void **_a); private: - friend class QDeclarativeVMEMetaObjectEndpoint; + friend class QQmlVMEMetaObjectEndpoint; QObject *object; - QDeclarativeCompiledData *compiledData; - QDeclarativeGuardedContextData ctxt; + QQmlCompiledData *compiledData; + QQmlGuardedContextData ctxt; - const QDeclarativeVMEMetaData *metaData; + const QQmlVMEMetaData *metaData; int propOffset; int methodOffset; - QDeclarativeVMEVariant *data; - QDeclarativeVMEMetaObjectEndpoint *aliasEndpoints; + QQmlVMEVariant *data; + QQmlVMEMetaObjectEndpoint *aliasEndpoints; v8::Persistent varProperties; int firstVarPropertyIndex; @@ -186,7 +186,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeVMEMetaObject : public QAbstractDynamicMetaO void connectAlias(int aliasId); QBitArray aConnected; QBitArray aInterceptors; - QHash > interceptors; + QHash > interceptors; v8::Persistent *v8methods; v8::Handle method(int); @@ -207,10 +207,10 @@ class Q_AUTOTEST_EXPORT QDeclarativeVMEMetaObject : public QAbstractDynamicMetaO }; QList listProperties; - static void list_append(QDeclarativeListProperty *, QObject *); - static int list_count(QDeclarativeListProperty *); - static QObject *list_at(QDeclarativeListProperty *, int); - static void list_clear(QDeclarativeListProperty *); + static void list_append(QQmlListProperty *, QObject *); + static int list_count(QQmlListProperty *); + static QObject *list_at(QQmlListProperty *, int); + static void list_clear(QQmlListProperty *); friend class QV8GCCallback; friend class QV8QObjectWrapper; @@ -218,4 +218,4 @@ class Q_AUTOTEST_EXPORT QDeclarativeVMEMetaObject : public QAbstractDynamicMetaO QT_END_NAMESPACE -#endif // QDECLARATIVEVMEMETAOBJECT_P_H +#endif // QQMLVMEMETAOBJECT_P_H diff --git a/src/declarative/qml/qdeclarativewatcher.cpp b/src/qml/qml/qqmlwatcher.cpp similarity index 60% rename from src/declarative/qml/qdeclarativewatcher.cpp rename to src/qml/qml/qqmlwatcher.cpp index 1136134499..500185762f 100644 --- a/src/declarative/qml/qdeclarativewatcher.cpp +++ b/src/qml/qml/qqmlwatcher.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#include "qdeclarativewatcher_p.h" +#include "qqmlwatcher_p.h" -#include "qdeclarativeexpression.h" -#include "qdeclarativecontext.h" -#include "qdeclarative.h" +#include "qqmlexpression.h" +#include "qqmlcontext.h" +#include "qqml.h" -#include -#include "qdeclarativeproperty_p.h" -#include "qdeclarativevaluetype_p.h" +#include +#include "qqmlproperty_p.h" +#include "qqmlvaluetype_p.h" #include #include @@ -55,79 +55,79 @@ QT_BEGIN_NAMESPACE -class QDeclarativeWatchProxy : public QObject +class QQmlWatchProxy : public QObject { Q_OBJECT public: - QDeclarativeWatchProxy(int id, + QQmlWatchProxy(int id, QObject *object, int debugId, const QMetaProperty &prop, - QDeclarativeWatcher *parent = 0); + QQmlWatcher *parent = 0); - QDeclarativeWatchProxy(int id, - QDeclarativeExpression *exp, + QQmlWatchProxy(int id, + QQmlExpression *exp, int debugId, - QDeclarativeWatcher *parent = 0); + QQmlWatcher *parent = 0); public slots: void notifyValueChanged(); private: - friend class QDeclarativeWatcher; + friend class QQmlWatcher; int m_id; - QDeclarativeWatcher *m_watch; + QQmlWatcher *m_watch; QObject *m_object; int m_debugId; QMetaProperty m_property; - QDeclarativeExpression *m_expr; + QQmlExpression *m_expr; }; -QDeclarativeWatchProxy::QDeclarativeWatchProxy(int id, - QDeclarativeExpression *exp, +QQmlWatchProxy::QQmlWatchProxy(int id, + QQmlExpression *exp, int debugId, - QDeclarativeWatcher *parent) + QQmlWatcher *parent) : QObject(parent), m_id(id), m_watch(parent), m_object(0), m_debugId(debugId), m_expr(exp) { QObject::connect(m_expr, SIGNAL(valueChanged()), this, SLOT(notifyValueChanged())); } -QDeclarativeWatchProxy::QDeclarativeWatchProxy(int id, +QQmlWatchProxy::QQmlWatchProxy(int id, QObject *object, int debugId, const QMetaProperty &prop, - QDeclarativeWatcher *parent) + QQmlWatcher *parent) : QObject(parent), m_id(id), m_watch(parent), m_object(object), m_debugId(debugId), m_property(prop), m_expr(0) { static int refreshIdx = -1; if(refreshIdx == -1) - refreshIdx = QDeclarativeWatchProxy::staticMetaObject.indexOfMethod("notifyValueChanged()"); + refreshIdx = QQmlWatchProxy::staticMetaObject.indexOfMethod("notifyValueChanged()"); if (prop.hasNotifySignal()) - QDeclarativePropertyPrivate::connect(m_object, prop.notifySignalIndex(), this, refreshIdx); + QQmlPropertyPrivate::connect(m_object, prop.notifySignalIndex(), this, refreshIdx); } -void QDeclarativeWatchProxy::notifyValueChanged() +void QQmlWatchProxy::notifyValueChanged() { QVariant v; if (m_expr) v = m_expr->evaluate(); - else if (QDeclarativeValueTypeFactory::isValueType(m_property.userType())) + else if (QQmlValueTypeFactory::isValueType(m_property.userType())) v = m_property.read(m_object); emit m_watch->propertyChanged(m_id, m_debugId, m_property, v); } -QDeclarativeWatcher::QDeclarativeWatcher(QObject *parent) +QQmlWatcher::QQmlWatcher(QObject *parent) : QObject(parent) { } -bool QDeclarativeWatcher::addWatch(int id, quint32 debugId) +bool QQmlWatcher::addWatch(int id, quint32 debugId) { - QObject *object = QDeclarativeDebugService::objectForId(debugId); + QObject *object = QQmlDebugService::objectForId(debugId); if (object) { int propCount = object->metaObject()->propertyCount(); for (int ii=0; iimetaObject()->indexOfProperty(property.constData()); if (index >= 0) { @@ -150,14 +150,14 @@ bool QDeclarativeWatcher::addWatch(int id, quint32 debugId, const QByteArray &pr return false; } -bool QDeclarativeWatcher::addWatch(int id, quint32 objectId, const QString &expr) +bool QQmlWatcher::addWatch(int id, quint32 objectId, const QString &expr) { - QObject *object = QDeclarativeDebugService::objectForId(objectId); - QDeclarativeContext *context = qmlContext(object); + QObject *object = QQmlDebugService::objectForId(objectId); + QQmlContext *context = qmlContext(object); if (context) { - QDeclarativeExpression *exprObj = new QDeclarativeExpression(context, object, expr); + QQmlExpression *exprObj = new QQmlExpression(context, object, expr); exprObj->setNotifyOnValueChanged(true); - QDeclarativeWatchProxy *proxy = new QDeclarativeWatchProxy(id, exprObj, objectId, this); + QQmlWatchProxy *proxy = new QQmlWatchProxy(id, exprObj, objectId, this); exprObj->setParent(proxy); m_proxies[id].append(proxy); proxy->notifyValueChanged(); @@ -166,18 +166,18 @@ bool QDeclarativeWatcher::addWatch(int id, quint32 objectId, const QString &expr return false; } -void QDeclarativeWatcher::removeWatch(int id) +void QQmlWatcher::removeWatch(int id) { if (!m_proxies.contains(id)) return; - QList > proxies = m_proxies.take(id); + QList > proxies = m_proxies.take(id); qDeleteAll(proxies); } -void QDeclarativeWatcher::addPropertyWatch(int id, QObject *object, quint32 debugId, const QMetaProperty &property) +void QQmlWatcher::addPropertyWatch(int id, QObject *object, quint32 debugId, const QMetaProperty &property) { - QDeclarativeWatchProxy *proxy = new QDeclarativeWatchProxy(id, object, debugId, property, this); + QQmlWatchProxy *proxy = new QQmlWatchProxy(id, object, debugId, property, this); m_proxies[id].append(proxy); proxy->notifyValueChanged(); @@ -185,4 +185,4 @@ void QDeclarativeWatcher::addPropertyWatch(int id, QObject *object, quint32 debu QT_END_NAMESPACE -#include +#include diff --git a/src/declarative/qml/qdeclarativewatcher_p.h b/src/qml/qml/qqmlwatcher_p.h similarity index 85% rename from src/declarative/qml/qdeclarativewatcher_p.h rename to src/qml/qml/qqmlwatcher_p.h index 54b348664c..70dc9d468c 100644 --- a/src/declarative/qml/qdeclarativewatcher_p.h +++ b/src/qml/qml/qqmlwatcher_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEWATCHER_P_H -#define QDECLARATIVEWATCHER_P_H +#ifndef QQMLWATCHER_P_H +#define QQMLWATCHER_P_H // // W A R N I N G @@ -62,16 +62,16 @@ QT_BEGIN_NAMESPACE -class QDeclarativeWatchProxy; -class QDeclarativeExpression; -class QDeclarativeContext; +class QQmlWatchProxy; +class QQmlExpression; +class QQmlContext; class QMetaProperty; -class QDeclarativeWatcher : public QObject +class QQmlWatcher : public QObject { Q_OBJECT public: - QDeclarativeWatcher(QObject * = 0); + QQmlWatcher(QObject * = 0); bool addWatch(int id, quint32 objectId); bool addWatch(int id, quint32 objectId, const QByteArray &property); @@ -83,12 +83,12 @@ class QDeclarativeWatcher : public QObject void propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value); private: - friend class QDeclarativeWatchProxy; + friend class QQmlWatchProxy; void addPropertyWatch(int id, QObject *object, quint32 objectId, const QMetaProperty &property); - QHash > > m_proxies; + QHash > > m_proxies; }; QT_END_NAMESPACE -#endif // QDECLARATIVEWATCHER_P_H +#endif // QQMLWATCHER_P_H diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp similarity index 84% rename from src/declarative/qml/qdeclarativexmlhttprequest.cpp rename to src/qml/qml/qqmlxmlhttprequest.cpp index c439948513..122693ad91 100644 --- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,21 +39,21 @@ ** ****************************************************************************/ -#include "qdeclarativexmlhttprequest_p.h" +#include "qqmlxmlhttprequest_p.h" #include -#include "qdeclarativeengine.h" -#include "qdeclarativeengine_p.h" -#include -#include "qdeclarativeengine_p.h" -#include "qdeclarativeexpression_p.h" -#include "qdeclarativeglobal_p.h" +#include "qqmlengine.h" +#include "qqmlengine_p.h" +#include +#include "qqmlengine_p.h" +#include "qqmlexpression_p.h" +#include "qqmlglobal_p.h" #include #include -#include -#include +#include +#include #include #include #include @@ -76,9 +76,9 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(xhrDump, QML_XHR_DUMP); -struct QDeclarativeXMLHttpRequestData { - QDeclarativeXMLHttpRequestData(); - ~QDeclarativeXMLHttpRequestData(); +struct QQmlXMLHttpRequestData { + QQmlXMLHttpRequestData(); + ~QQmlXMLHttpRequestData(); v8::Persistent nodeFunction; @@ -95,16 +95,16 @@ struct QDeclarativeXMLHttpRequestData { v8::Local newNode(); }; -static inline QDeclarativeXMLHttpRequestData *xhrdata(QV8Engine *engine) +static inline QQmlXMLHttpRequestData *xhrdata(QV8Engine *engine) { - return (QDeclarativeXMLHttpRequestData *)engine->xmlHttpRequestData(); + return (QQmlXMLHttpRequestData *)engine->xmlHttpRequestData(); } -QDeclarativeXMLHttpRequestData::QDeclarativeXMLHttpRequestData() +QQmlXMLHttpRequestData::QQmlXMLHttpRequestData() { } -QDeclarativeXMLHttpRequestData::~QDeclarativeXMLHttpRequestData() +QQmlXMLHttpRequestData::~QQmlXMLHttpRequestData() { qPersistentDispose(nodeFunction); qPersistentDispose(namedNodeMapPrototype); @@ -118,7 +118,7 @@ QDeclarativeXMLHttpRequestData::~QDeclarativeXMLHttpRequestData() qPersistentDispose(documentPrototype); } -v8::Local QDeclarativeXMLHttpRequestData::newNode() +v8::Local QQmlXMLHttpRequestData::newNode() { if (nodeFunction.IsEmpty()) { v8::Local ft = v8::FunctionTemplate::New(); @@ -175,7 +175,7 @@ class NodeImpl QList attributes; }; -class DocumentImpl : public QDeclarativeRefCount, public NodeImpl +class DocumentImpl : public QQmlRefCount, public NodeImpl { public: DocumentImpl() : root(0) { type = Document; } @@ -189,8 +189,8 @@ class DocumentImpl : public QDeclarativeRefCount, public NodeImpl NodeImpl *root; - void addref() { QDeclarativeRefCount::addref(); } - void release() { QDeclarativeRefCount::release(); } + void addref() { QQmlRefCount::addref(); } + void release() { QQmlRefCount::release(); } }; class NamedNodeMap @@ -322,16 +322,16 @@ class Document : public Node } -class QDeclarativeDOMNodeResource : public QV8ObjectResource, public Node +class QQmlDOMNodeResource : public QV8ObjectResource, public Node { V8_RESOURCE_TYPE(DOMNodeType); public: - QDeclarativeDOMNodeResource(QV8Engine *e); + QQmlDOMNodeResource(QV8Engine *e); QList *list; // Only used in NamedNodeMap }; -QDeclarativeDOMNodeResource::QDeclarativeDOMNodeResource(QV8Engine *e) +QQmlDOMNodeResource::QQmlDOMNodeResource(QV8Engine *e) : QV8ObjectResource(e), list(0) { } @@ -356,7 +356,7 @@ void NodeImpl::release() v8::Handle Node::nodeName(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -374,7 +374,7 @@ v8::Handle Node::nodeName(v8::Local, const v8::AccessorIn v8::Handle Node::nodeValue(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -392,14 +392,14 @@ v8::Handle Node::nodeValue(v8::Local, const v8::AccessorI v8::Handle Node::nodeType(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); return v8::Integer::New(r->d->type); } v8::Handle Node::parentNode(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -409,7 +409,7 @@ v8::Handle Node::parentNode(v8::Local, const v8::Accessor v8::Handle Node::childNodes(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -418,7 +418,7 @@ v8::Handle Node::childNodes(v8::Local, const v8::Accessor v8::Handle Node::firstChild(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -428,7 +428,7 @@ v8::Handle Node::firstChild(v8::Local, const v8::Accessor v8::Handle Node::lastChild(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -438,7 +438,7 @@ v8::Handle Node::lastChild(v8::Local, const v8::AccessorI v8::Handle Node::previousSibling(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -456,7 +456,7 @@ v8::Handle Node::previousSibling(v8::Local, const v8::Acc v8::Handle Node::nextSibling(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -474,7 +474,7 @@ v8::Handle Node::nextSibling(v8::Local, const v8::Accesso v8::Handle Node::attributes(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -486,7 +486,7 @@ v8::Handle Node::attributes(v8::Local, const v8::Accessor v8::Handle Node::prototype(QV8Engine *engine) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); if (d->nodePrototype.IsEmpty()) { d->nodePrototype = qPersistentNew(v8::Object::New()); d->nodePrototype->SetAccessor(v8::String::New("nodeName"), nodeName, @@ -516,7 +516,7 @@ v8::Handle Node::prototype(QV8Engine *engine) v8::Handle Node::create(QV8Engine *engine, NodeImpl *data) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); v8::Local instance = d->newNode(); switch (data->type) { @@ -543,7 +543,7 @@ v8::Handle Node::create(QV8Engine *engine, NodeImpl *data) break; } - QDeclarativeDOMNodeResource *r = new QDeclarativeDOMNodeResource(engine); + QQmlDOMNodeResource *r = new QQmlDOMNodeResource(engine); r->d = data; if (data) A(data); instance->SetExternalResource(r); @@ -553,7 +553,7 @@ v8::Handle Node::create(QV8Engine *engine, NodeImpl *data) v8::Handle Element::prototype(QV8Engine *engine) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); if (d->elementPrototype.IsEmpty()) { d->elementPrototype = qPersistentNew(v8::Object::New()); d->elementPrototype->SetPrototype(Node::prototype(engine)); @@ -566,7 +566,7 @@ v8::Handle Element::prototype(QV8Engine *engine) v8::Handle Attr::prototype(QV8Engine *engine) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); if (d->attrPrototype.IsEmpty()) { d->attrPrototype = qPersistentNew(v8::Object::New()); d->attrPrototype->SetPrototype(Node::prototype(engine)); @@ -583,7 +583,7 @@ v8::Handle Attr::prototype(QV8Engine *engine) v8::Handle Attr::name(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -592,7 +592,7 @@ v8::Handle Attr::name(v8::Local, const v8::AccessorInfo & v8::Handle Attr::value(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -601,7 +601,7 @@ v8::Handle Attr::value(v8::Local, const v8::AccessorInfo v8::Handle Attr::ownerElement(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -610,7 +610,7 @@ v8::Handle Attr::ownerElement(v8::Local, const v8::Access v8::Handle CharacterData::length(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); Q_UNUSED(engine) @@ -619,7 +619,7 @@ v8::Handle CharacterData::length(v8::Local, const v8::Acc v8::Handle CharacterData::prototype(QV8Engine *engine) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); if (d->characterDataPrototype.IsEmpty()) { d->characterDataPrototype = qPersistentNew(v8::Object::New()); d->characterDataPrototype->SetPrototype(Node::prototype(engine)); @@ -634,7 +634,7 @@ v8::Handle CharacterData::prototype(QV8Engine *engine) v8::Handle Text::isElementContentWhitespace(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); Q_UNUSED(engine) @@ -643,7 +643,7 @@ v8::Handle Text::isElementContentWhitespace(v8::Local, co v8::Handle Text::wholeText(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -652,7 +652,7 @@ v8::Handle Text::wholeText(v8::Local, const v8::AccessorI v8::Handle Text::prototype(QV8Engine *engine) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); if (d->textPrototype.IsEmpty()) { d->textPrototype = qPersistentNew(v8::Object::New()); d->textPrototype->SetPrototype(CharacterData::prototype(engine)); @@ -667,7 +667,7 @@ v8::Handle Text::prototype(QV8Engine *engine) v8::Handle CDATA::prototype(QV8Engine *engine) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); if (d->cdataPrototype.IsEmpty()) { d->cdataPrototype = qPersistentNew(v8::Object::New()); d->cdataPrototype->SetPrototype(Text::prototype(engine)); @@ -678,7 +678,7 @@ v8::Handle CDATA::prototype(QV8Engine *engine) v8::Handle Document::prototype(QV8Engine *engine) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); if (d->documentPrototype.IsEmpty()) { d->documentPrototype = qPersistentNew(v8::Object::New()); d->documentPrototype->SetPrototype(Node::prototype(engine)); @@ -777,7 +777,7 @@ v8::Handle Document::load(QV8Engine *engine, const QByteArray &data) } v8::Local instance = xhrdata(engine)->newNode(); - QDeclarativeDOMNodeResource *r = new QDeclarativeDOMNodeResource(engine); + QQmlDOMNodeResource *r = new QQmlDOMNodeResource(engine); r->d = document; instance->SetExternalResource(r); instance->SetPrototype(Document::prototype(engine)); @@ -807,7 +807,7 @@ bool Node::isNull() const v8::Handle NamedNodeMap::length(v8::Local, const v8::AccessorInfo &args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); Q_UNUSED(engine) @@ -816,7 +816,7 @@ v8::Handle NamedNodeMap::length(v8::Local, const v8::Acce v8::Handle NamedNodeMap::indexed(uint32_t index, const v8::AccessorInfo& args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r || !r->list) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -829,7 +829,7 @@ v8::Handle NamedNodeMap::indexed(uint32_t index, const v8::AccessorIn v8::Handle NamedNodeMap::named(v8::Local property, const v8::AccessorInfo& args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r || !r->list) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -845,7 +845,7 @@ v8::Handle NamedNodeMap::named(v8::Local property, const v8::Handle NamedNodeMap::prototype(QV8Engine *engine) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); if (d->namedNodeMapPrototype.IsEmpty()) { v8::Local ot = v8::ObjectTemplate::New(); ot->SetAccessor(v8::String::New("length"), length, 0, v8::External::Wrap(engine)); @@ -859,10 +859,10 @@ v8::Handle NamedNodeMap::prototype(QV8Engine *engine) v8::Handle NamedNodeMap::create(QV8Engine *engine, NodeImpl *data, QList *list) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); v8::Local instance = d->newNode(); instance->SetPrototype(NamedNodeMap::prototype(engine)); - QDeclarativeDOMNodeResource *r = new QDeclarativeDOMNodeResource(engine); + QQmlDOMNodeResource *r = new QQmlDOMNodeResource(engine); r->d = data; r->list = list; if (data) A(data); @@ -872,7 +872,7 @@ v8::Handle NamedNodeMap::create(QV8Engine *engine, NodeImpl *data, QL v8::Handle NodeList::indexed(uint32_t index, const v8::AccessorInfo& args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -885,7 +885,7 @@ v8::Handle NodeList::indexed(uint32_t index, const v8::AccessorInfo& v8::Handle NodeList::length(v8::Local, const v8::AccessorInfo& args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); Q_UNUSED(engine) @@ -894,7 +894,7 @@ v8::Handle NodeList::length(v8::Local, const v8::Accessor v8::Handle NodeList::prototype(QV8Engine *engine) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); if (d->nodeListPrototype.IsEmpty()) { v8::Local ot = v8::ObjectTemplate::New(); ot->SetAccessor(v8::String::New("length"), length, 0, v8::External::Wrap(engine)); @@ -907,10 +907,10 @@ v8::Handle NodeList::prototype(QV8Engine *engine) v8::Handle NodeList::create(QV8Engine *engine, NodeImpl *data) { - QDeclarativeXMLHttpRequestData *d = xhrdata(engine); + QQmlXMLHttpRequestData *d = xhrdata(engine); v8::Local instance = d->newNode(); instance->SetPrototype(NodeList::prototype(engine)); - QDeclarativeDOMNodeResource *r = new QDeclarativeDOMNodeResource(engine); + QQmlDOMNodeResource *r = new QQmlDOMNodeResource(engine); r->d = data; if (data) A(data); instance->SetExternalResource(r); @@ -919,7 +919,7 @@ v8::Handle NodeList::create(QV8Engine *engine, NodeImpl *data) v8::Handle Document::documentElement(v8::Local, const v8::AccessorInfo& args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r || r->d->type != NodeImpl::Document) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -928,7 +928,7 @@ v8::Handle Document::documentElement(v8::Local, const v8: v8::Handle Document::xmlStandalone(v8::Local, const v8::AccessorInfo& args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r || r->d->type != NodeImpl::Document) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); Q_UNUSED(engine) @@ -937,7 +937,7 @@ v8::Handle Document::xmlStandalone(v8::Local, const v8::A v8::Handle Document::xmlVersion(v8::Local, const v8::AccessorInfo& args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r || r->d->type != NodeImpl::Document) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); @@ -946,14 +946,14 @@ v8::Handle Document::xmlVersion(v8::Local, const v8::Acce v8::Handle Document::xmlEncoding(v8::Local, const v8::AccessorInfo& args) { - QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); + QQmlDOMNodeResource *r = v8_resource_cast(args.This()); if (!r || r->d->type != NodeImpl::Document) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); return engine->toString(static_cast(r->d)->encoding); } -class QDeclarativeXMLHttpRequest : public QObject, public QV8ObjectResource +class QQmlXMLHttpRequest : public QObject, public QV8ObjectResource { Q_OBJECT V8_RESOURCE_TYPE(XMLHttpRequestType) @@ -962,8 +962,8 @@ V8_RESOURCE_TYPE(XMLHttpRequestType) Opened = 1, HeadersReceived = 2, Loading = 3, Done = 4 }; - QDeclarativeXMLHttpRequest(QV8Engine *engine, QNetworkAccessManager *manager); - virtual ~QDeclarativeXMLHttpRequest(); + QQmlXMLHttpRequest(QV8Engine *engine, QNetworkAccessManager *manager); + virtual ~QQmlXMLHttpRequest(); bool sendFlag() const; bool errorFlag() const; @@ -1024,50 +1024,50 @@ private slots: int m_status; QString m_statusText; QNetworkRequest m_request; - QDeclarativeGuard m_network; + QQmlGuard m_network; void destroyNetwork(); QNetworkAccessManager *m_nam; QNetworkAccessManager *networkAccessManager() { return m_nam; } }; -QDeclarativeXMLHttpRequest::QDeclarativeXMLHttpRequest(QV8Engine *engine, QNetworkAccessManager *manager) +QQmlXMLHttpRequest::QQmlXMLHttpRequest(QV8Engine *engine, QNetworkAccessManager *manager) : QV8ObjectResource(engine), m_state(Unsent), m_errorFlag(false), m_sendFlag(false), m_redirectCount(0), m_gotXml(false), m_textCodec(0), m_network(0), m_nam(manager) { } -QDeclarativeXMLHttpRequest::~QDeclarativeXMLHttpRequest() +QQmlXMLHttpRequest::~QQmlXMLHttpRequest() { destroyNetwork(); } -bool QDeclarativeXMLHttpRequest::sendFlag() const +bool QQmlXMLHttpRequest::sendFlag() const { return m_sendFlag; } -bool QDeclarativeXMLHttpRequest::errorFlag() const +bool QQmlXMLHttpRequest::errorFlag() const { return m_errorFlag; } -quint32 QDeclarativeXMLHttpRequest::readyState() const +quint32 QQmlXMLHttpRequest::readyState() const { return m_state; } -int QDeclarativeXMLHttpRequest::replyStatus() const +int QQmlXMLHttpRequest::replyStatus() const { return m_status; } -QString QDeclarativeXMLHttpRequest::replyStatusText() const +QString QQmlXMLHttpRequest::replyStatusText() const { return m_statusText; } -v8::Handle QDeclarativeXMLHttpRequest::open(v8::Handle me, const QString &method, +v8::Handle QQmlXMLHttpRequest::open(v8::Handle me, const QString &method, const QUrl &url) { destroyNetwork(); @@ -1081,7 +1081,7 @@ v8::Handle QDeclarativeXMLHttpRequest::open(v8::Handle me return v8::Undefined(); } -void QDeclarativeXMLHttpRequest::addHeader(const QString &name, const QString &value) +void QQmlXMLHttpRequest::addHeader(const QString &name, const QString &value) { QByteArray utfname = name.toUtf8(); @@ -1092,7 +1092,7 @@ void QDeclarativeXMLHttpRequest::addHeader(const QString &name, const QString &v } } -QString QDeclarativeXMLHttpRequest::header(const QString &name) +QString QQmlXMLHttpRequest::header(const QString &name) { QByteArray utfname = name.toLower().toUtf8(); @@ -1103,7 +1103,7 @@ QString QDeclarativeXMLHttpRequest::header(const QString &name) return QString(); } -QString QDeclarativeXMLHttpRequest::headers() +QString QQmlXMLHttpRequest::headers() { QString ret; @@ -1116,7 +1116,7 @@ QString QDeclarativeXMLHttpRequest::headers() return ret; } -void QDeclarativeXMLHttpRequest::fillHeadersList() +void QQmlXMLHttpRequest::fillHeadersList() { QList headerList = m_network->rawHeaderList(); @@ -1131,7 +1131,7 @@ void QDeclarativeXMLHttpRequest::fillHeadersList() } } -void QDeclarativeXMLHttpRequest::requestFromUrl(const QUrl &url) +void QQmlXMLHttpRequest::requestFromUrl(const QUrl &url) { QNetworkRequest request = m_request; request.setUrl(url); @@ -1191,7 +1191,7 @@ void QDeclarativeXMLHttpRequest::requestFromUrl(const QUrl &url) this, SLOT(finished())); } -v8::Handle QDeclarativeXMLHttpRequest::send(v8::Handle me, const QByteArray &data) +v8::Handle QQmlXMLHttpRequest::send(v8::Handle me, const QByteArray &data) { m_errorFlag = false; m_sendFlag = true; @@ -1205,7 +1205,7 @@ v8::Handle QDeclarativeXMLHttpRequest::send(v8::Handle me return v8::Undefined(); } -v8::Handle QDeclarativeXMLHttpRequest::abort(v8::Handle me) +v8::Handle QQmlXMLHttpRequest::abort(v8::Handle me) { destroyNetwork(); m_responseEntityBody = QByteArray(); @@ -1226,12 +1226,12 @@ v8::Handle QDeclarativeXMLHttpRequest::abort(v8::Handle m return v8::Undefined(); } -v8::Handle QDeclarativeXMLHttpRequest::getMe() const +v8::Handle QQmlXMLHttpRequest::getMe() const { return m_me; } -void QDeclarativeXMLHttpRequest::setMe(v8::Handle me) +void QQmlXMLHttpRequest::setMe(v8::Handle me) { qPersistentDispose(m_me); @@ -1239,7 +1239,7 @@ void QDeclarativeXMLHttpRequest::setMe(v8::Handle me) m_me = qPersistentNew(me); } -void QDeclarativeXMLHttpRequest::downloadProgress(qint64 bytes) +void QQmlXMLHttpRequest::downloadProgress(qint64 bytes) { v8::HandleScope handle_scope; @@ -1280,7 +1280,7 @@ static const char *errorToString(QNetworkReply::NetworkError error) else return name; } -void QDeclarativeXMLHttpRequest::error(QNetworkReply::NetworkError error) +void QQmlXMLHttpRequest::error(QNetworkReply::NetworkError error) { v8::HandleScope handle_scope; @@ -1323,7 +1323,7 @@ void QDeclarativeXMLHttpRequest::error(QNetworkReply::NetworkError error) } #define XMLHTTPREQUEST_MAXIMUM_REDIRECT_RECURSION 15 -void QDeclarativeXMLHttpRequest::finished() +void QQmlXMLHttpRequest::finished() { v8::HandleScope handle_scope; @@ -1380,7 +1380,7 @@ void QDeclarativeXMLHttpRequest::finished() } -void QDeclarativeXMLHttpRequest::readEncoding() +void QQmlXMLHttpRequest::readEncoding() { foreach (const HeaderPair &header, m_headersList) { if (header.first == "content-type") { @@ -1404,14 +1404,14 @@ void QDeclarativeXMLHttpRequest::readEncoding() m_gotXml = true; } -bool QDeclarativeXMLHttpRequest::receivedXml() const +bool QQmlXMLHttpRequest::receivedXml() const { return m_gotXml; } #ifndef QT_NO_TEXTCODEC -QTextCodec* QDeclarativeXMLHttpRequest::findTextCodec() const +QTextCodec* QQmlXMLHttpRequest::findTextCodec() const { QTextCodec *codec = 0; @@ -1437,7 +1437,7 @@ QTextCodec* QDeclarativeXMLHttpRequest::findTextCodec() const #endif -QString QDeclarativeXMLHttpRequest::responseBody() +QString QQmlXMLHttpRequest::responseBody() { #ifndef QT_NO_TEXTCODEC if (!m_textCodec) @@ -1449,13 +1449,13 @@ QString QDeclarativeXMLHttpRequest::responseBody() return QString::fromUtf8(m_responseEntityBody); } -const QByteArray &QDeclarativeXMLHttpRequest::rawResponseBody() const +const QByteArray &QQmlXMLHttpRequest::rawResponseBody() const { return m_responseEntityBody; } // Requires a TryCatch scope -void QDeclarativeXMLHttpRequest::dispatchCallback(v8::Handle me) +void QQmlXMLHttpRequest::dispatchCallback(v8::Handle me) { v8::Local callback = me->Get(v8::String::New("onreadystatechange")); if (callback->IsFunction()) { @@ -1466,16 +1466,16 @@ void QDeclarativeXMLHttpRequest::dispatchCallback(v8::Handle me) } // Must have a handle scope -void QDeclarativeXMLHttpRequest::printError(v8::Handle message) +void QQmlXMLHttpRequest::printError(v8::Handle message) { v8::Context::Scope scope(engine->context()); - QDeclarativeError error; - QDeclarativeExpressionPrivate::exceptionToError(message, error); - QDeclarativeEnginePrivate::warning(QDeclarativeEnginePrivate::get(engine->engine()), error); + QQmlError error; + QQmlExpressionPrivate::exceptionToError(message, error); + QQmlEnginePrivate::warning(QQmlEnginePrivate::get(engine->engine()), error); } -void QDeclarativeXMLHttpRequest::destroyNetwork() +void QQmlXMLHttpRequest::destroyNetwork() { if (m_network) { m_network->disconnect(); @@ -1487,7 +1487,7 @@ void QDeclarativeXMLHttpRequest::destroyNetwork() // XMLHttpRequest methods static v8::Handle qmlxmlhttprequest_open(const v8::Arguments &args) { - QDeclarativeXMLHttpRequest *r = v8_resource_cast(args.This()); + QQmlXMLHttpRequest *r = v8_resource_cast(args.This()); if (!r) V8THROW_REFERENCE("Not an XMLHttpRequest object"); @@ -1534,14 +1534,14 @@ static v8::Handle qmlxmlhttprequest_open(const v8::Arguments &args) static v8::Handle qmlxmlhttprequest_setRequestHeader(const v8::Arguments &args) { - QDeclarativeXMLHttpRequest *r = v8_resource_cast(args.This()); + QQmlXMLHttpRequest *r = v8_resource_cast(args.This()); if (!r) V8THROW_REFERENCE("Not an XMLHttpRequest object"); if (args.Length() != 2) V8THROW_DOM(DOMEXCEPTION_SYNTAX_ERR, "Incorrect argument count"); - if (r->readyState() != QDeclarativeXMLHttpRequest::Opened || r->sendFlag()) + if (r->readyState() != QQmlXMLHttpRequest::Opened || r->sendFlag()) V8THROW_DOM(DOMEXCEPTION_INVALID_STATE_ERR, "Invalid state"); QV8Engine *engine = r->engine; @@ -1581,13 +1581,13 @@ static v8::Handle qmlxmlhttprequest_setRequestHeader(const v8::Argume static v8::Handle qmlxmlhttprequest_send(const v8::Arguments &args) { - QDeclarativeXMLHttpRequest *r = v8_resource_cast(args.This()); + QQmlXMLHttpRequest *r = v8_resource_cast(args.This()); if (!r) V8THROW_REFERENCE("Not an XMLHttpRequest object"); QV8Engine *engine = r->engine; - if (r->readyState() != QDeclarativeXMLHttpRequest::Opened || + if (r->readyState() != QQmlXMLHttpRequest::Opened || r->sendFlag()) V8THROW_DOM(DOMEXCEPTION_INVALID_STATE_ERR, "Invalid state"); @@ -1600,7 +1600,7 @@ static v8::Handle qmlxmlhttprequest_send(const v8::Arguments &args) static v8::Handle qmlxmlhttprequest_abort(const v8::Arguments &args) { - QDeclarativeXMLHttpRequest *r = v8_resource_cast(args.This()); + QQmlXMLHttpRequest *r = v8_resource_cast(args.This()); if (!r) V8THROW_REFERENCE("Not an XMLHttpRequest object"); @@ -1609,7 +1609,7 @@ static v8::Handle qmlxmlhttprequest_abort(const v8::Arguments &args) static v8::Handle qmlxmlhttprequest_getResponseHeader(const v8::Arguments &args) { - QDeclarativeXMLHttpRequest *r = v8_resource_cast(args.This()); + QQmlXMLHttpRequest *r = v8_resource_cast(args.This()); if (!r) V8THROW_REFERENCE("Not an XMLHttpRequest object"); @@ -1618,9 +1618,9 @@ static v8::Handle qmlxmlhttprequest_getResponseHeader(const v8::Argum if (args.Length() != 1) V8THROW_DOM(DOMEXCEPTION_SYNTAX_ERR, "Incorrect argument count"); - if (r->readyState() != QDeclarativeXMLHttpRequest::Loading && - r->readyState() != QDeclarativeXMLHttpRequest::Done && - r->readyState() != QDeclarativeXMLHttpRequest::HeadersReceived) + if (r->readyState() != QQmlXMLHttpRequest::Loading && + r->readyState() != QQmlXMLHttpRequest::Done && + r->readyState() != QQmlXMLHttpRequest::HeadersReceived) V8THROW_DOM(DOMEXCEPTION_INVALID_STATE_ERR, "Invalid state"); return engine->toString(r->header(engine->toString(args[0]))); @@ -1628,7 +1628,7 @@ static v8::Handle qmlxmlhttprequest_getResponseHeader(const v8::Argum static v8::Handle qmlxmlhttprequest_getAllResponseHeaders(const v8::Arguments &args) { - QDeclarativeXMLHttpRequest *r = v8_resource_cast(args.This()); + QQmlXMLHttpRequest *r = v8_resource_cast(args.This()); if (!r) V8THROW_REFERENCE("Not an XMLHttpRequest object"); @@ -1637,9 +1637,9 @@ static v8::Handle qmlxmlhttprequest_getAllResponseHeaders(const v8::A if (args.Length() != 0) V8THROW_DOM(DOMEXCEPTION_SYNTAX_ERR, "Incorrect argument count"); - if (r->readyState() != QDeclarativeXMLHttpRequest::Loading && - r->readyState() != QDeclarativeXMLHttpRequest::Done && - r->readyState() != QDeclarativeXMLHttpRequest::HeadersReceived) + if (r->readyState() != QQmlXMLHttpRequest::Loading && + r->readyState() != QQmlXMLHttpRequest::Done && + r->readyState() != QQmlXMLHttpRequest::HeadersReceived) V8THROW_DOM(DOMEXCEPTION_INVALID_STATE_ERR, "Invalid state"); return engine->toString(r->headers()); @@ -1649,7 +1649,7 @@ static v8::Handle qmlxmlhttprequest_getAllResponseHeaders(const v8::A static v8::Handle qmlxmlhttprequest_readyState(v8::Local /* property */, const v8::AccessorInfo& info) { - QDeclarativeXMLHttpRequest *r = v8_resource_cast(info.This()); + QQmlXMLHttpRequest *r = v8_resource_cast(info.This()); if (!r) V8THROW_REFERENCE("Not an XMLHttpRequest object"); @@ -1659,12 +1659,12 @@ static v8::Handle qmlxmlhttprequest_readyState(v8::Local static v8::Handle qmlxmlhttprequest_status(v8::Local /* property */, const v8::AccessorInfo& info) { - QDeclarativeXMLHttpRequest *r = v8_resource_cast(info.This()); + QQmlXMLHttpRequest *r = v8_resource_cast(info.This()); if (!r) V8THROW_REFERENCE("Not an XMLHttpRequest object"); - if (r->readyState() == QDeclarativeXMLHttpRequest::Unsent || - r->readyState() == QDeclarativeXMLHttpRequest::Opened) + if (r->readyState() == QQmlXMLHttpRequest::Unsent || + r->readyState() == QQmlXMLHttpRequest::Opened) V8THROW_DOM(DOMEXCEPTION_INVALID_STATE_ERR, "Invalid state"); if (r->errorFlag()) @@ -1676,14 +1676,14 @@ static v8::Handle qmlxmlhttprequest_status(v8::Local /* p static v8::Handle qmlxmlhttprequest_statusText(v8::Local /* property */, const v8::AccessorInfo& info) { - QDeclarativeXMLHttpRequest *r = v8_resource_cast(info.This()); + QQmlXMLHttpRequest *r = v8_resource_cast(info.This()); if (!r) V8THROW_REFERENCE("Not an XMLHttpRequest object"); QV8Engine *engine = r->engine; - if (r->readyState() == QDeclarativeXMLHttpRequest::Unsent || - r->readyState() == QDeclarativeXMLHttpRequest::Opened) + if (r->readyState() == QQmlXMLHttpRequest::Unsent || + r->readyState() == QQmlXMLHttpRequest::Opened) V8THROW_DOM(DOMEXCEPTION_INVALID_STATE_ERR, "Invalid state"); if (r->errorFlag()) @@ -1695,14 +1695,14 @@ static v8::Handle qmlxmlhttprequest_statusText(v8::Local static v8::Handle qmlxmlhttprequest_responseText(v8::Local /* property */, const v8::AccessorInfo& info) { - QDeclarativeXMLHttpRequest *r = v8_resource_cast(info.This()); + QQmlXMLHttpRequest *r = v8_resource_cast(info.This()); if (!r) V8THROW_REFERENCE("Not an XMLHttpRequest object"); QV8Engine *engine = r->engine; - if (r->readyState() != QDeclarativeXMLHttpRequest::Loading && - r->readyState() != QDeclarativeXMLHttpRequest::Done) + if (r->readyState() != QQmlXMLHttpRequest::Loading && + r->readyState() != QQmlXMLHttpRequest::Done) return engine->toString(QString()); else return engine->toString(r->responseBody()); @@ -1711,13 +1711,13 @@ static v8::Handle qmlxmlhttprequest_responseText(v8::Local qmlxmlhttprequest_responseXML(v8::Local /* property */, const v8::AccessorInfo& info) { - QDeclarativeXMLHttpRequest *r = v8_resource_cast(info.This()); + QQmlXMLHttpRequest *r = v8_resource_cast(info.This()); if (!r) V8THROW_REFERENCE("Not an XMLHttpRequest object"); if (!r->receivedXml() || - (r->readyState() != QDeclarativeXMLHttpRequest::Loading && - r->readyState() != QDeclarativeXMLHttpRequest::Done)) { + (r->readyState() != QQmlXMLHttpRequest::Loading && + r->readyState() != QQmlXMLHttpRequest::Done)) { return v8::Null(); } else { return Document::load(r->engine, r->rawResponseBody()); @@ -1728,9 +1728,9 @@ static v8::Handle qmlxmlhttprequest_new(const v8::Arguments &args) { if (args.IsConstructCall()) { QV8Engine *engine = V8ENGINE(); - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine->engine()); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine->engine()); Q_UNUSED(ep) - QDeclarativeXMLHttpRequest *r = new QDeclarativeXMLHttpRequest(engine, engine->networkAccessManager()); + QQmlXMLHttpRequest *r = new QQmlXMLHttpRequest(engine, engine->networkAccessManager()); args.This()->SetExternalResource(r); return args.This(); @@ -1743,7 +1743,7 @@ static v8::Handle qmlxmlhttprequest_new(const v8::Arguments &args) void qt_rem_qmlxmlhttprequest(QV8Engine * /* engine */, void *d) { - QDeclarativeXMLHttpRequestData *data = (QDeclarativeXMLHttpRequestData *)d; + QQmlXMLHttpRequestData *data = (QQmlXMLHttpRequestData *)d; delete data; } @@ -1786,7 +1786,7 @@ void *qt_add_qmlxmlhttprequest(QV8Engine *engine) xmlhttprequest->Set(v8::String::New("DONE"), v8::Integer::New(4), attributes); engine->global()->Set(v8::String::New("XMLHttpRequest"), xmlhttprequest->GetFunction()); - QDeclarativeXMLHttpRequestData *data = new QDeclarativeXMLHttpRequestData; + QQmlXMLHttpRequestData *data = new QQmlXMLHttpRequestData; return data; } @@ -1794,4 +1794,4 @@ QT_END_NAMESPACE #endif // QT_NO_XMLSTREAMREADER -#include +#include diff --git a/src/declarative/qml/qdeclarativexmlhttprequest_p.h b/src/qml/qml/qqmlxmlhttprequest_p.h similarity index 90% rename from src/declarative/qml/qdeclarativexmlhttprequest_p.h rename to src/qml/qml/qqmlxmlhttprequest_p.h index 3177a7a3be..2cfdf6a140 100644 --- a/src/declarative/qml/qdeclarativexmlhttprequest_p.h +++ b/src/qml/qml/qqmlxmlhttprequest_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEXMLHTTPREQUEST_P_H -#define QDECLARATIVEXMLHTTPREQUEST_P_H +#ifndef QQMLXMLHTTPREQUEST_P_H +#define QQMLXMLHTTPREQUEST_P_H -#include +#include // // W A R N I N G // ------------- @@ -69,5 +69,5 @@ QT_END_NAMESPACE #endif // QT_NO_XMLSTREAMREADER -#endif // QDECLARATIVEXMLHTTPREQUEST_P_H +#endif // QQMLXMLHTTPREQUEST_P_H diff --git a/src/declarative/qml/qdeclarativeapplication.cpp b/src/qml/qml/qquickapplication.cpp similarity index 79% rename from src/declarative/qml/qdeclarativeapplication.cpp rename to src/qml/qml/qquickapplication.cpp index b5ceaf2550..198a917cb8 100644 --- a/src/declarative/qml/qdeclarativeapplication.cpp +++ b/src/qml/qml/qquickapplication.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativeapplication_p.h" +#include "qquickapplication_p.h" #include #include #include @@ -47,11 +47,11 @@ QT_BEGIN_NAMESPACE -class QDeclarativeApplicationPrivate : public QObjectPrivate +class QQuickApplicationPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeApplication) + Q_DECLARE_PUBLIC(QQuickApplication) public: - QDeclarativeApplicationPrivate() : active(QGuiApplication::activeWindow() != 0), + QQuickApplicationPrivate() : active(QGuiApplication::activeWindow() != 0), layoutDirection(QGuiApplication::layoutDirection()) {} bool active; Qt::LayoutDirection layoutDirection; @@ -62,29 +62,29 @@ class QDeclarativeApplicationPrivate : public QObjectPrivate in qdeclarativengine.cpp */ -QDeclarativeApplication::QDeclarativeApplication(QObject *parent) : QObject(*new QDeclarativeApplicationPrivate(), parent) +QQuickApplication::QQuickApplication(QObject *parent) : QObject(*new QQuickApplicationPrivate(), parent) { if (qApp) qApp->installEventFilter(this); } -QDeclarativeApplication::~QDeclarativeApplication() +QQuickApplication::~QQuickApplication() { } -bool QDeclarativeApplication::active() const +bool QQuickApplication::active() const { - Q_D(const QDeclarativeApplication); + Q_D(const QQuickApplication); return d->active; } -Qt::LayoutDirection QDeclarativeApplication::layoutDirection() const +Qt::LayoutDirection QQuickApplication::layoutDirection() const { - Q_D(const QDeclarativeApplication); + Q_D(const QQuickApplication); return d->layoutDirection; } -QObject *QDeclarativeApplication::inputPanel() const +QObject *QQuickApplication::inputPanel() const { static bool warned = false; if (!warned) { @@ -94,10 +94,10 @@ QObject *QDeclarativeApplication::inputPanel() const return qApp ? qApp->inputMethod() : 0; } -bool QDeclarativeApplication::eventFilter(QObject *obj, QEvent *event) +bool QQuickApplication::eventFilter(QObject *obj, QEvent *event) { Q_UNUSED(obj) - Q_D(QDeclarativeApplication); + Q_D(QQuickApplication); if (event->type() == QEvent::ApplicationActivate || event->type() == QEvent::ApplicationDeactivate) { bool active = d->active; diff --git a/src/declarative/qml/qdeclarativeapplication_p.h b/src/qml/qml/qquickapplication_p.h similarity index 79% rename from src/declarative/qml/qdeclarativeapplication_p.h rename to src/qml/qml/qquickapplication_p.h index 4a0ff52d3e..66198948ac 100644 --- a/src/declarative/qml/qdeclarativeapplication_p.h +++ b/src/qml/qml/qquickapplication_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,20 +39,20 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEAPPLICATION_P_H -#define QDECLARATIVEAPPLICATION_P_H +#ifndef QQUICKAPPLICATION_P_H +#define QQUICKAPPLICATION_P_H #include -#include -#include +#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeApplicationPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeApplication : public QObject +class QQuickApplicationPrivate; +class Q_QML_PRIVATE_EXPORT QQuickApplication : public QObject { Q_OBJECT Q_PROPERTY(bool active READ active NOTIFY activeChanged) @@ -60,8 +60,8 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeApplication : public QObject Q_PROPERTY(QObject *inputPanel READ inputPanel CONSTANT) public: - explicit QDeclarativeApplication(QObject *parent = 0); - virtual ~QDeclarativeApplication(); + explicit QQuickApplication(QObject *parent = 0); + virtual ~QQuickApplication(); bool active() const; Qt::LayoutDirection layoutDirection() const; QT_DEPRECATED QObject *inputPanel() const; @@ -74,14 +74,14 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeApplication : public QObject void layoutDirectionChanged(); private: - Q_DISABLE_COPY(QDeclarativeApplication) - Q_DECLARE_PRIVATE(QDeclarativeApplication) + Q_DISABLE_COPY(QQuickApplication) + Q_DECLARE_PRIVATE(QQuickApplication) }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeApplication) +QML_DECLARE_TYPE(QQuickApplication) QT_END_HEADER -#endif // QDECLARATIVEAPPLICATION_P_H +#endif // QQUICKAPPLICATION_P_H diff --git a/src/declarative/qml/qdeclarativelistmodel.cpp b/src/qml/qml/qquicklistmodel.cpp similarity index 88% rename from src/declarative/qml/qdeclarativelistmodel.cpp rename to src/qml/qml/qquicklistmodel.cpp index ce7235e548..30c4f5d1d1 100644 --- a/src/declarative/qml/qdeclarativelistmodel.cpp +++ b/src/qml/qml/qquicklistmodel.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,17 +39,17 @@ ** ****************************************************************************/ -#include "qdeclarativelistmodel_p_p.h" -#include "qdeclarativelistmodelworkeragent_p.h" -#include "qdeclarativeopenmetaobject_p.h" -#include -#include +#include "qquicklistmodel_p_p.h" +#include "qquicklistmodelworkeragent_p.h" +#include "qqmlopenmetaobject_p.h" +#include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -119,7 +119,7 @@ const ListLayout::Role &ListLayout::getRoleOrCreate(v8::Handle key, const ListLayout::Role &ListLayout::createRole(const QString &key, ListLayout::Role::DataType type) { - const int dataSizes[] = { sizeof(QString), sizeof(double), sizeof(bool), sizeof(ListModel *), sizeof(QDeclarativeGuard), sizeof(QVariantMap) }; + const int dataSizes[] = { sizeof(QString), sizeof(double), sizeof(bool), sizeof(ListModel *), sizeof(QQmlGuard), sizeof(QVariantMap) }; const int dataAlignments[] = { sizeof(QString), sizeof(double), sizeof(bool), sizeof(ListModel *), sizeof(QObject *), sizeof(QVariantMap) }; Role *r = new Role; @@ -247,7 +247,7 @@ const ListLayout::Role *ListLayout::getExistingRole(v8::Handle key) return r; } -ModelObject *ListModel::getOrCreateModelObject(QDeclarativeListModel *model, int elementIndex) +ModelObject *ListModel::getOrCreateModelObject(QQuickListModel *model, int elementIndex) { ListElement *e = elements[elementIndex]; if (e->m_objectCache == 0) { @@ -327,7 +327,7 @@ void ListModel::sync(ListModel *src, ListModel *target, QHash } } -ListModel::ListModel(ListLayout *layout, QDeclarativeListModel *modelCache, int uid) : m_layout(layout), m_modelCache(modelCache) +ListModel::ListModel(ListLayout *layout, QQuickListModel *modelCache, int uid) : m_layout(layout), m_modelCache(modelCache) { if (uid == -1) uid = uidCounter.fetchAndAddOrdered(1); @@ -395,7 +395,7 @@ void ListModel::updateCacheIndices() } } -QVariant ListModel::getProperty(int elementIndex, int roleIndex, const QDeclarativeListModel *owner, QV8Engine *eng) +QVariant ListModel::getProperty(int elementIndex, int roleIndex, const QQuickListModel *owner, QV8Engine *eng) { ListElement *e = elements[elementIndex]; const ListLayout::Role &r = m_layout->getExistingRole(roleIndex); @@ -636,7 +636,7 @@ QString *ListElement::getStringProperty(const ListLayout::Role &role) QObject *ListElement::getQObjectProperty(const ListLayout::Role &role) { char *mem = getPropertyMemory(role); - QDeclarativeGuard *o = reinterpret_cast *>(mem); + QQmlGuard *o = reinterpret_cast *>(mem); return o->data(); } @@ -651,22 +651,22 @@ QVariantMap *ListElement::getVariantMapProperty(const ListLayout::Role &role) return map; } -QDeclarativeGuard *ListElement::getGuardProperty(const ListLayout::Role &role) +QQmlGuard *ListElement::getGuardProperty(const ListLayout::Role &role) { char *mem = getPropertyMemory(role); bool existingGuard = false; - for (size_t i=0 ; i < sizeof(QDeclarativeGuard) ; ++i) { + for (size_t i=0 ; i < sizeof(QQmlGuard) ; ++i) { if (mem[i] != 0) { existingGuard = true; break; } } - QDeclarativeGuard *o = 0; + QQmlGuard *o = 0; if (existingGuard) - o = reinterpret_cast *>(mem); + o = reinterpret_cast *>(mem); return o; } @@ -678,7 +678,7 @@ ListModel *ListElement::getListProperty(const ListLayout::Role &role) return *value; } -QVariant ListElement::getProperty(const ListLayout::Role &role, const QDeclarativeListModel *owner, QV8Engine *eng) +QVariant ListElement::getProperty(const ListLayout::Role &role, const QQuickListModel *owner, QV8Engine *eng) { char *mem = getPropertyMemory(role); @@ -711,8 +711,8 @@ QVariant ListElement::getProperty(const ListLayout::Role &role, const QDeclarati if (model) { if (model->m_modelCache == 0) { - model->m_modelCache = new QDeclarativeListModel(owner, model, eng); - QDeclarativeEngine::setContextForObject(model->m_modelCache, QDeclarativeEngine::contextForObject(owner)); + model->m_modelCache = new QQuickListModel(owner, model, eng); + QQmlEngine::setContextForObject(model->m_modelCache, QQmlEngine::contextForObject(owner)); } QObject *object = model->m_modelCache; @@ -722,7 +722,7 @@ QVariant ListElement::getProperty(const ListLayout::Role &role, const QDeclarati break; case ListLayout::Role::QObject: { - QDeclarativeGuard *guard = reinterpret_cast *>(mem); + QQmlGuard *guard = reinterpret_cast *>(mem); QObject *object = guard->data(); if (object) data = QVariant::fromValue(object); @@ -821,9 +821,9 @@ int ListElement::setQObjectProperty(const ListLayout::Role &role, QObject *o) if (role.type == ListLayout::Role::QObject) { char *mem = getPropertyMemory(role); - QDeclarativeGuard *g = reinterpret_cast *>(mem); + QQmlGuard *g = reinterpret_cast *>(mem); bool existingGuard = false; - for (size_t i=0 ; i < sizeof(QDeclarativeGuard) ; ++i) { + for (size_t i=0 ; i < sizeof(QQmlGuard) ; ++i) { if (mem[i] != 0) { existingGuard = true; break; @@ -832,11 +832,11 @@ int ListElement::setQObjectProperty(const ListLayout::Role &role, QObject *o) bool changed; if (existingGuard) { changed = g->data() != o; - g->~QDeclarativeGuard(); + g->~QQmlGuard(); } else { changed = true; } - new (mem) QDeclarativeGuard(o); + new (mem) QQmlGuard(o); if (changed) roleIndex = role.index; } @@ -904,7 +904,7 @@ void ListElement::setBoolPropertyFast(const ListLayout::Role &role, bool b) void ListElement::setQObjectPropertyFast(const ListLayout::Role &role, QObject *o) { char *mem = getPropertyMemory(role); - new (mem) QDeclarativeGuard(o); + new (mem) QQmlGuard(o); } void ListElement::setListPropertyFast(const ListLayout::Role &role, ListModel *m) @@ -1040,9 +1040,9 @@ void ListElement::destroy(ListLayout *layout) break; case ListLayout::Role::QObject: { - QDeclarativeGuard *guard = getGuardProperty(r); + QQmlGuard *guard = getGuardProperty(r); if (guard) - guard->~QDeclarativeGuard(); + guard->~QQmlGuard(); } break; case ListLayout::Role::VariantMap: @@ -1135,7 +1135,7 @@ int ListElement::setJsProperty(const ListLayout::Role &role, v8::Handle &roles) } ModelNodeMetaObject::ModelNodeMetaObject(ModelObject *object) -: QDeclarativeOpenMetaObject(object), m_enabled(false), m_obj(object) +: QQmlOpenMetaObject(object), m_enabled(false), m_obj(object) { } @@ -1197,12 +1197,12 @@ void ModelNodeMetaObject::propertyWritten(int index) } } -DynamicRoleModelNode::DynamicRoleModelNode(QDeclarativeListModel *owner, int uid) : m_owner(owner), m_uid(uid), m_meta(new DynamicRoleModelNodeMetaObject(this)) +DynamicRoleModelNode::DynamicRoleModelNode(QQuickListModel *owner, int uid) : m_owner(owner), m_uid(uid), m_meta(new DynamicRoleModelNodeMetaObject(this)) { setNodeUpdatesEnabled(true); } -DynamicRoleModelNode *DynamicRoleModelNode::create(const QVariantMap &obj, QDeclarativeListModel *owner) +DynamicRoleModelNode *DynamicRoleModelNode::create(const QVariantMap &obj, QQuickListModel *owner) { DynamicRoleModelNode *object = new DynamicRoleModelNode(owner, uidCounter.fetchAndAddOrdered(1)); QList roles; @@ -1210,20 +1210,20 @@ DynamicRoleModelNode *DynamicRoleModelNode::create(const QVariantMap &obj, QDecl return object; } -void DynamicRoleModelNode::sync(DynamicRoleModelNode *src, DynamicRoleModelNode *target, QHash *targetModelHash) +void DynamicRoleModelNode::sync(DynamicRoleModelNode *src, DynamicRoleModelNode *target, QHash *targetModelHash) { for (int i=0 ; i < src->m_meta->count() ; ++i) { const QByteArray &name = src->m_meta->name(i); QVariant value = src->m_meta->value(i); - QDeclarativeListModel *srcModel = qobject_cast(value.value()); - QDeclarativeListModel *targetModel = qobject_cast(target->m_meta->value(i).value()); + QQuickListModel *srcModel = qobject_cast(value.value()); + QQuickListModel *targetModel = qobject_cast(target->m_meta->value(i).value()); if (srcModel) { if (targetModel == 0) - targetModel = QDeclarativeListModel::createWithOwner(target->m_owner); + targetModel = QQuickListModel::createWithOwner(target->m_owner); - QDeclarativeListModel::sync(srcModel, targetModel, targetModelHash); + QQuickListModel::sync(srcModel, targetModel, targetModelHash); QObject *targetModelObject = targetModel; value = QVariant::fromValue(targetModelObject); @@ -1254,7 +1254,7 @@ void DynamicRoleModelNode::updateValues(const QVariantMap &object, QList &r QVariant value = object[key]; if (value.type() == QVariant::List) { - QDeclarativeListModel *subModel = QDeclarativeListModel::createWithOwner(m_owner); + QQuickListModel *subModel = QQuickListModel::createWithOwner(m_owner); QVariantList subArray = value.toList(); QVariantList::const_iterator subIt = subArray.begin(); @@ -1271,7 +1271,7 @@ void DynamicRoleModelNode::updateValues(const QVariantMap &object, QList &r const QByteArray &keyUtf8 = key.toUtf8(); - QDeclarativeListModel *existingModel = qobject_cast(m_meta->value(keyUtf8).value()); + QQuickListModel *existingModel = qobject_cast(m_meta->value(keyUtf8).value()); if (existingModel) delete existingModel; @@ -1283,14 +1283,14 @@ void DynamicRoleModelNode::updateValues(const QVariantMap &object, QList &r } DynamicRoleModelNodeMetaObject::DynamicRoleModelNodeMetaObject(DynamicRoleModelNode *object) - : QDeclarativeOpenMetaObject(object), m_enabled(false), m_owner(object) + : QQmlOpenMetaObject(object), m_enabled(false), m_owner(object) { } DynamicRoleModelNodeMetaObject::~DynamicRoleModelNodeMetaObject() { for (int i=0 ; i < count() ; ++i) { - QDeclarativeListModel *subModel = qobject_cast(value(i).value()); + QQuickListModel *subModel = qobject_cast(value(i).value()); if (subModel) delete subModel; } @@ -1302,7 +1302,7 @@ void DynamicRoleModelNodeMetaObject::propertyWrite(int index) return; QVariant v = value(index); - QDeclarativeListModel *model = qobject_cast(v.value()); + QQuickListModel *model = qobject_cast(v.value()); if (model) delete model; } @@ -1312,11 +1312,11 @@ void DynamicRoleModelNodeMetaObject::propertyWritten(int index) if (!m_enabled) return; - QDeclarativeListModel *parentModel = m_owner->m_owner; + QQuickListModel *parentModel = m_owner->m_owner; QVariant v = value(index); if (v.type() == QVariant::List) { - QDeclarativeListModel *subModel = QDeclarativeListModel::createWithOwner(parentModel); + QQuickListModel *subModel = QQuickListModel::createWithOwner(parentModel); QVariantList subArray = v.toList(); QVariantList::const_iterator subIt = subArray.begin(); @@ -1344,13 +1344,13 @@ void DynamicRoleModelNodeMetaObject::propertyWritten(int index) } } -QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListModelData::instructions() const +QQuickListModelParser::ListInstruction *QQuickListModelParser::ListModelData::instructions() const { - return (QDeclarativeListModelParser::ListInstruction *)((char *)this + sizeof(ListModelData)); + return (QQuickListModelParser::ListInstruction *)((char *)this + sizeof(ListModelData)); } /*! - \qmlclass ListModel QDeclarativeListModel + \qmlclass ListModel QQuickListModel \inqmlmodule QtQuick 2 \ingroup qml-working-with-data \brief The ListModel element defines a free-form list data source. @@ -1376,7 +1376,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM \inlineimage listmodel.png \enddiv - \snippet doc/src/snippets/declarative/listmodel.qml 0 + \snippet doc/src/snippets/qml/listmodel.qml 0 \clearfloat Roles (properties) in each element must begin with a lower-case letter and @@ -1386,14 +1386,14 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM Since the example model contains an \c id property, it can be referenced by views, such as the ListView in this example: - \snippet doc/src/snippets/declarative/listmodel-simple.qml 0 + \snippet doc/src/snippets/qml/listmodel-simple.qml 0 \dots 8 - \snippet doc/src/snippets/declarative/listmodel-simple.qml 1 + \snippet doc/src/snippets/qml/listmodel-simple.qml 1 It is possible for roles to contain list data. In the following example we create a list of fruit attributes: - \snippet doc/src/snippets/declarative/listmodel-nested.qml model + \snippet doc/src/snippets/qml/listmodel-nested.qml model The delegate displays all the fruit attributes: @@ -1401,7 +1401,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM \inlineimage listmodel-nested.png \enddiv - \snippet doc/src/snippets/declarative/listmodel-nested.qml delegate + \snippet doc/src/snippets/qml/listmodel-nested.qml delegate \clearfloat \section1 Modifying List Models @@ -1409,7 +1409,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM The content of a ListModel may be created and modified using the clear(), append(), set(), insert() and setProperty() methods. For example: - \snippet doc/src/snippets/declarative/listmodel-modify.qml delegate + \snippet doc/src/snippets/qml/listmodel-modify.qml delegate Note that when creating content dynamically the set of available properties cannot be changed once set. Whatever properties are first added to the model @@ -1440,10 +1440,10 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM handler. You must call sync() or else the changes made to the list from the external thread will not be reflected in the list model in the main thread. - \sa {qmlmodels}{Data Models}, {declarative/threading/threadedlistmodel}{Threaded ListModel example}, QtDeclarative + \sa {qmlmodels}{Data Models}, {declarative/threading/threadedlistmodel}{Threaded ListModel example}, QtQml */ -QDeclarativeListModel::QDeclarativeListModel(QObject *parent) +QQuickListModel::QQuickListModel(QObject *parent) : QListModelInterface(parent) { m_mainThread = true; @@ -1458,7 +1458,7 @@ QDeclarativeListModel::QDeclarativeListModel(QObject *parent) m_engine = 0; } -QDeclarativeListModel::QDeclarativeListModel(const QDeclarativeListModel *owner, ListModel *data, QV8Engine *eng, QObject *parent) +QQuickListModel::QQuickListModel(const QQuickListModel *owner, ListModel *data, QV8Engine *eng, QObject *parent) : QListModelInterface(parent) { m_mainThread = owner->m_mainThread; @@ -1473,7 +1473,7 @@ QDeclarativeListModel::QDeclarativeListModel(const QDeclarativeListModel *owner, m_engine = eng; } -QDeclarativeListModel::QDeclarativeListModel(QDeclarativeListModel *orig, QDeclarativeListModelWorkerAgent *agent) +QQuickListModel::QQuickListModel(QQuickListModel *orig, QQuickListModelWorkerAgent *agent) : QListModelInterface(agent) { m_mainThread = false; @@ -1492,7 +1492,7 @@ QDeclarativeListModel::QDeclarativeListModel(QDeclarativeListModel *orig, QDecla m_engine = 0; } -QDeclarativeListModel::~QDeclarativeListModel() +QQuickListModel::~QQuickListModel() { for (int i=0 ; i < m_modelObjects.count() ; ++i) delete m_modelObjects[i]; @@ -1513,9 +1513,9 @@ QDeclarativeListModel::~QDeclarativeListModel() m_layout = 0; } -QDeclarativeListModel *QDeclarativeListModel::createWithOwner(QDeclarativeListModel *newOwner) +QQuickListModel *QQuickListModel::createWithOwner(QQuickListModel *newOwner) { - QDeclarativeListModel *model = new QDeclarativeListModel; + QQuickListModel *model = new QQuickListModel; model->m_mainThread = newOwner->m_mainThread; model->m_engine = newOwner->m_engine; @@ -1525,21 +1525,21 @@ QDeclarativeListModel *QDeclarativeListModel::createWithOwner(QDeclarativeListMo if (model->m_mainThread && model->m_agent) model->m_agent->addref(); - QDeclarativeEngine::setContextForObject(model, QDeclarativeEngine::contextForObject(newOwner)); + QQmlEngine::setContextForObject(model, QQmlEngine::contextForObject(newOwner)); return model; } -QV8Engine *QDeclarativeListModel::engine() const +QV8Engine *QQuickListModel::engine() const { if (m_engine == 0) { - m_engine = QDeclarativeEnginePrivate::getV8Engine(qmlEngine(this)); + m_engine = QQmlEnginePrivate::getV8Engine(qmlEngine(this)); } return m_engine; } -void QDeclarativeListModel::sync(QDeclarativeListModel *src, QDeclarativeListModel *target, QHash *targetModelHash) +void QQuickListModel::sync(QQuickListModel *src, QQuickListModel *target, QHash *targetModelHash) { Q_ASSERT(src->m_dynamicRoles && target->m_dynamicRoles); @@ -1600,7 +1600,7 @@ void QDeclarativeListModel::sync(QDeclarativeListModel *src, QDeclarativeListMod } } -void QDeclarativeListModel::emitItemsChanged(int index, int count, const QList &roles) +void QQuickListModel::emitItemsChanged(int index, int count, const QList &roles) { if (m_mainThread) { emit itemsChanged(index, count, roles); @@ -1610,7 +1610,7 @@ void QDeclarativeListModel::emitItemsChanged(int index, int count, const QList QDeclarativeListModel::roles() const +QList QQuickListModel::roles() const { QList rolesArray; @@ -1668,7 +1668,7 @@ QList QDeclarativeListModel::roles() const return rolesArray; } -QString QDeclarativeListModel::toString(int role) const +QString QQuickListModel::toString(int role) const { QString roleName; @@ -1682,7 +1682,7 @@ QString QDeclarativeListModel::toString(int role) const return roleName; } -QVariant QDeclarativeListModel::data(int index, int role) const +QVariant QQuickListModel::data(int index, int role) const { QVariant v; @@ -1723,7 +1723,7 @@ QVariant QDeclarativeListModel::data(int index, int role) const Due to the performance cost of using dynamic roles, they are disabled by default. */ -void QDeclarativeListModel::setDynamicRoles(bool enableDynamicRoles) +void QQuickListModel::setDynamicRoles(bool enableDynamicRoles) { if (m_mainThread && m_agent == 0) { if (enableDynamicRoles) { @@ -1747,7 +1747,7 @@ void QDeclarativeListModel::setDynamicRoles(bool enableDynamicRoles) \qmlproperty int QtQuick2::ListModel::count The number of data entries in the model. */ -int QDeclarativeListModel::count() const +int QQuickListModel::count() const { int count; @@ -1767,7 +1767,7 @@ int QDeclarativeListModel::count() const \sa append() remove() */ -void QDeclarativeListModel::clear() +void QQuickListModel::clear() { int cleared = count(); @@ -1789,7 +1789,7 @@ void QDeclarativeListModel::clear() \sa clear() */ -void QDeclarativeListModel::remove(QDeclarativeV8Function *args) +void QQuickListModel::remove(QQmlV8Function *args) { int argLength = args->Length(); @@ -1832,7 +1832,7 @@ void QDeclarativeListModel::remove(QDeclarativeV8Function *args) \sa set() append() */ -void QDeclarativeListModel::insert(QDeclarativeV8Function *args) +void QQuickListModel::insert(QQmlV8Function *args) { if (args->Length() == 2) { @@ -1891,7 +1891,7 @@ void QDeclarativeListModel::insert(QDeclarativeV8Function *args) \sa append() */ -void QDeclarativeListModel::move(int from, int to, int n) +void QQuickListModel::move(int from, int to, int n) { if (n==0 || from==to) return; @@ -1942,7 +1942,7 @@ void QDeclarativeListModel::move(int from, int to, int n) \sa set() remove() */ -void QDeclarativeListModel::append(QDeclarativeV8Function *args) +void QQuickListModel::append(QQmlV8Function *args) { if (args->Length() == 1) { v8::Handle arg = (*args)[0]; @@ -2015,7 +2015,7 @@ void QDeclarativeListModel::append(QDeclarativeV8Function *args) \sa append() */ -QDeclarativeV8Handle QDeclarativeListModel::get(int index) const +QQmlV8Handle QQuickListModel::get(int index) const { v8::Handle result = v8::Undefined(); @@ -2026,12 +2026,12 @@ QDeclarativeV8Handle QDeclarativeListModel::get(int index) const DynamicRoleModelNode *object = m_modelObjects[index]; result = v8engine->newQObject(object); } else { - ModelObject *object = m_listModel->getOrCreateModelObject(const_cast(this), index); + ModelObject *object = m_listModel->getOrCreateModelObject(const_cast(this), index); result = v8engine->newQObject(object); } } - return QDeclarativeV8Handle::fromHandle(result); + return QQmlV8Handle::fromHandle(result); } /*! @@ -2050,7 +2050,7 @@ QDeclarativeV8Handle QDeclarativeListModel::get(int index) const \sa append() */ -void QDeclarativeListModel::set(int index, const QDeclarativeV8Handle &handle) +void QQuickListModel::set(int index, const QQmlV8Handle &handle) { v8::Handle valuemap = handle.toHandle(); @@ -2102,7 +2102,7 @@ void QDeclarativeListModel::set(int index, const QDeclarativeV8Handle &handle) \sa append() */ -void QDeclarativeListModel::setProperty(int index, const QString& property, const QVariant& value) +void QQuickListModel::setProperty(int index, const QString& property, const QVariant& value) { if (count() == 0 || index >= count() || index < 0) { qmlInfo(this) << tr("set: index %1 out of range").arg(index); @@ -2138,28 +2138,28 @@ void QDeclarativeListModel::setProperty(int index, const QString& property, cons Writes any unsaved changes to the list model after it has been modified from a worker script. */ -void QDeclarativeListModel::sync() +void QQuickListModel::sync() { // This is just a dummy method to make it look like sync() exists in - // ListModel (and not just QDeclarativeListModelWorkerAgent) and to let + // ListModel (and not just QQuickListModelWorkerAgent) and to let // us document sync(). qmlInfo(this) << "List sync() can only be called from a WorkerScript"; } -bool QDeclarativeListModelParser::compileProperty(const QDeclarativeCustomParserProperty &prop, QList &instr, QByteArray &data) +bool QQuickListModelParser::compileProperty(const QQmlCustomParserProperty &prop, QList &instr, QByteArray &data) { QList values = prop.assignedValues(); for(int ii = 0; ii < values.count(); ++ii) { const QVariant &value = values.at(ii); - if(value.userType() == qMetaTypeId()) { - QDeclarativeCustomParserNode node = - qvariant_cast(value); + if(value.userType() == qMetaTypeId()) { + QQmlCustomParserNode node = + qvariant_cast(value); if (node.name() != listElementTypeName) { const QMetaObject *mo = resolveType(node.name()); - if (mo != &QDeclarativeListElement::staticMetaObject) { - error(node, QDeclarativeListModel::tr("ListElement: cannot contain nested elements")); + if (mo != &QQuickListElement::staticMetaObject) { + error(node, QQuickListModel::tr("ListElement: cannot contain nested elements")); return false; } listElementTypeName = node.name(); // cache right name for next time @@ -2172,15 +2172,15 @@ bool QDeclarativeListModelParser::compileProperty(const QDeclarativeCustomParser instr << li; } - QList props = node.properties(); + QList props = node.properties(); for(int jj = 0; jj < props.count(); ++jj) { - const QDeclarativeCustomParserProperty &nodeProp = props.at(jj); + const QQmlCustomParserProperty &nodeProp = props.at(jj); if (nodeProp.name().isEmpty()) { - error(nodeProp, QDeclarativeListModel::tr("ListElement: cannot contain nested elements")); + error(nodeProp, QQuickListModel::tr("ListElement: cannot contain nested elements")); return false; } if (nodeProp.name() == QStringLiteral("id")) { - error(nodeProp, QDeclarativeListModel::tr("ListElement: cannot use reserved \"id\" property")); + error(nodeProp, QQuickListModel::tr("ListElement: cannot use reserved \"id\" property")); return false; } @@ -2209,8 +2209,8 @@ bool QDeclarativeListModelParser::compileProperty(const QDeclarativeCustomParser } else { - QDeclarativeScript::Variant variant = - qvariant_cast(value); + QQmlScript::Variant variant = + qvariant_cast(value); int ref = data.count(); @@ -2224,12 +2224,12 @@ bool QDeclarativeListModelParser::compileProperty(const QDeclarativeCustomParser d += char(variant.asBoolean()); } else if (variant.isScript()) { if (definesEmptyList(variant.asScript())) { - d[0] = char(QDeclarativeScript::Variant::Invalid); // marks empty list + d[0] = char(QQmlScript::Variant::Invalid); // marks empty list } else { QByteArray script = variant.asScript().toUtf8(); int v = evaluateEnum(script); if (v<0) { - using namespace QDeclarativeJS; + using namespace QQmlJS; AST::Node *node = variant.asAST(); AST::StringLiteral *literal = 0; if (AST::CallExpression *callExpr = AST::cast(node)) { @@ -2238,14 +2238,14 @@ bool QDeclarativeListModelParser::compileProperty(const QDeclarativeCustomParser if (callExpr->arguments && !callExpr->arguments->next) literal = AST::cast(callExpr->arguments->expression); if (!literal) { - error(prop, QDeclarativeListModel::tr("ListElement: improperly specified %1").arg(idExpr->name.toString())); + error(prop, QQuickListModel::tr("ListElement: improperly specified %1").arg(idExpr->name.toString())); return false; } } else if (idExpr->name == QLatin1String("QT_TRANSLATE_NOOP")) { if (callExpr->arguments && callExpr->arguments->next && !callExpr->arguments->next->next) literal = AST::cast(callExpr->arguments->next->expression); if (!literal) { - error(prop, QDeclarativeListModel::tr("ListElement: improperly specified QT_TRANSLATE_NOOP")); + error(prop, QQuickListModel::tr("ListElement: improperly specified QT_TRANSLATE_NOOP")); return false; } } @@ -2253,14 +2253,14 @@ bool QDeclarativeListModelParser::compileProperty(const QDeclarativeCustomParser } if (literal) { - d[0] = char(QDeclarativeScript::Variant::String); + d[0] = char(QQmlScript::Variant::String); d += literal->value.toUtf8(); } else { - error(prop, QDeclarativeListModel::tr("ListElement: cannot use script for property value")); + error(prop, QQuickListModel::tr("ListElement: cannot use script for property value")); return false; } } else { - d[0] = char(QDeclarativeScript::Variant::Number); + d[0] = char(QQmlScript::Variant::Number); d += QByteArray::number(v); } } @@ -2278,16 +2278,16 @@ bool QDeclarativeListModelParser::compileProperty(const QDeclarativeCustomParser return true; } -QByteArray QDeclarativeListModelParser::compile(const QList &customProps) +QByteArray QQuickListModelParser::compile(const QList &customProps) { QList instr; QByteArray data; listElementTypeName = QString(); // unknown for(int ii = 0; ii < customProps.count(); ++ii) { - const QDeclarativeCustomParserProperty &prop = customProps.at(ii); + const QQmlCustomParserProperty &prop = customProps.at(ii); if(!prop.name().isEmpty()) { // isn't default property - error(prop, QDeclarativeListModel::tr("ListModel: undefined property '%1'").arg(prop.name())); + error(prop, QQuickListModel::tr("ListModel: undefined property '%1'").arg(prop.name())); return QByteArray(); } @@ -2314,11 +2314,11 @@ QByteArray QDeclarativeListModelParser::compile(const QList(obj); + QQuickListModel *rv = static_cast(obj); - QV8Engine *engine = QDeclarativeEnginePrivate::getV8Engine(qmlEngine(rv)); + QV8Engine *engine = QQmlEnginePrivate::getV8Engine(qmlEngine(rv)); rv->m_engine = engine; const ListModelData *lmd = (const ListModelData *)d.constData(); @@ -2373,21 +2373,21 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & QString name = e0.name; QVariant value; - switch (QDeclarativeScript::Variant::Type(data[instr.dataIdx])) { - case QDeclarativeScript::Variant::Invalid: + switch (QQmlScript::Variant::Type(data[instr.dataIdx])) { + case QQmlScript::Variant::Invalid: { const ListLayout::Role &role = e1.model->getOrCreateListRole(e0.name); ListModel *emptyModel = new ListModel(role.subLayout, 0, -1); value = QVariant::fromValue(emptyModel); } break; - case QDeclarativeScript::Variant::Boolean: + case QQmlScript::Variant::Boolean: value = bool(data[1 + instr.dataIdx]); break; - case QDeclarativeScript::Variant::Number: + case QQmlScript::Variant::Number: value = QByteArray(data + 1 + instr.dataIdx).toDouble(); break; - case QDeclarativeScript::Variant::String: + case QQmlScript::Variant::String: value = QString::fromUtf8(data + 1 + instr.dataIdx); break; default: @@ -2409,7 +2409,7 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & } } -bool QDeclarativeListModelParser::definesEmptyList(const QString &s) +bool QQuickListModelParser::definesEmptyList(const QString &s) { if (s.startsWith(QLatin1Char('[')) && s.endsWith(QLatin1Char(']'))) { for (int i=1; i -#include +#include +#include #include #include @@ -60,19 +60,19 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeListModelWorkerAgent; +class QQuickListModelWorkerAgent; class ListModel; class ListLayout; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeListModel : public QListModelInterface +class Q_QML_PRIVATE_EXPORT QQuickListModel : public QListModelInterface { Q_OBJECT Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(bool dynamicRoles READ dynamicRoles WRITE setDynamicRoles) public: - QDeclarativeListModel(QObject *parent=0); - ~QDeclarativeListModel(); + QQuickListModel(QObject *parent=0); + ~QQuickListModel(); virtual QList roles() const; virtual QString toString(int role) const; @@ -80,16 +80,16 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeListModel : public QListModelInte virtual QVariant data(int index, int role) const; Q_INVOKABLE void clear(); - Q_INVOKABLE void remove(QDeclarativeV8Function *args); - Q_INVOKABLE void append(QDeclarativeV8Function *args); - Q_INVOKABLE void insert(QDeclarativeV8Function *args); - Q_INVOKABLE QDeclarativeV8Handle get(int index) const; - Q_INVOKABLE void set(int index, const QDeclarativeV8Handle &); + Q_INVOKABLE void remove(QQmlV8Function *args); + Q_INVOKABLE void append(QQmlV8Function *args); + Q_INVOKABLE void insert(QQmlV8Function *args); + Q_INVOKABLE QQmlV8Handle get(int index) const; + Q_INVOKABLE void set(int index, const QQmlV8Handle &); Q_INVOKABLE void setProperty(int index, const QString& property, const QVariant& value); Q_INVOKABLE void move(int from, int to, int count); Q_INVOKABLE void sync(); - QDeclarativeListModelWorkerAgent *agent(); + QQuickListModelWorkerAgent *agent(); bool dynamicRoles() const { return m_dynamicRoles; } void setDynamicRoles(bool enableDynamicRoles); @@ -98,8 +98,8 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeListModel : public QListModelInte void countChanged(); private: - friend class QDeclarativeListModelParser; - friend class QDeclarativeListModelWorkerAgent; + friend class QQuickListModelParser; + friend class QQuickListModelWorkerAgent; friend class ModelObject; friend class ModelNodeMetaObject; friend class ListModel; @@ -108,14 +108,14 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeListModel : public QListModelInte friend class DynamicRoleModelNodeMetaObject; // Constructs a flat list model for a worker agent - QDeclarativeListModel(QDeclarativeListModel *orig, QDeclarativeListModelWorkerAgent *agent); - QDeclarativeListModel(const QDeclarativeListModel *owner, ListModel *data, QV8Engine *eng, QObject *parent=0); + QQuickListModel(QQuickListModel *orig, QQuickListModelWorkerAgent *agent); + QQuickListModel(const QQuickListModel *owner, ListModel *data, QV8Engine *eng, QObject *parent=0); QV8Engine *engine() const; inline bool canMove(int from, int to, int n) const { return !(from+n > count() || to+n > count() || from < 0 || to < 0 || n < 0); } - QDeclarativeListModelWorkerAgent *m_agent; + QQuickListModelWorkerAgent *m_agent; mutable QV8Engine *m_engine; bool m_mainThread; bool m_primary; @@ -139,8 +139,8 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeListModel : public QListModelInte int getUid() const { return m_uid; } - static void sync(QDeclarativeListModel *src, QDeclarativeListModel *target, QHash *targetModelHash); - static QDeclarativeListModel *createWithOwner(QDeclarativeListModel *newOwner); + static void sync(QQuickListModel *src, QQuickListModel *target, QHash *targetModelHash); + static QQuickListModel *createWithOwner(QQuickListModel *newOwner); void emitItemsChanged(int index, int count, const QList &roles); void emitItemsRemoved(int index, int count); @@ -149,16 +149,16 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeListModel : public QListModelInte }; // ### FIXME -class QDeclarativeListElement : public QObject +class QQuickListElement : public QObject { Q_OBJECT }; -class QDeclarativeListModelParser : public QDeclarativeCustomParser +class QQuickListModelParser : public QQmlCustomParser { public: - QDeclarativeListModelParser() : QDeclarativeCustomParser(QDeclarativeCustomParser::AcceptsSignalHandlers) {} - QByteArray compile(const QList &); + QQuickListModelParser() : QQmlCustomParser(QQmlCustomParser::AcceptsSignalHandlers) {} + QByteArray compile(const QList &); void setCustomData(QObject *, const QByteArray &); private: @@ -173,7 +173,7 @@ class QDeclarativeListModelParser : public QDeclarativeCustomParser int instrCount; ListInstruction *instructions() const; }; - bool compileProperty(const QDeclarativeCustomParserProperty &prop, QList &instr, QByteArray &data); + bool compileProperty(const QQmlCustomParserProperty &prop, QList &instr, QByteArray &data); bool definesEmptyList(const QString &); @@ -191,9 +191,9 @@ class QDeclarativeListModelParser : public QDeclarativeCustomParser QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeListModel) -QML_DECLARE_TYPE(QDeclarativeListElement) +QML_DECLARE_TYPE(QQuickListModel) +QML_DECLARE_TYPE(QQuickListElement) QT_END_HEADER -#endif // QDECLARATIVELISTMODEL_H +#endif // QQUICKLISTMODEL_H diff --git a/src/declarative/qml/qdeclarativelistmodel_p_p.h b/src/qml/qml/qquicklistmodel_p_p.h similarity index 88% rename from src/declarative/qml/qdeclarativelistmodel_p_p.h rename to src/qml/qml/qquicklistmodel_p_p.h index 22e19079a6..f9256c9f0a 100644 --- a/src/declarative/qml/qdeclarativelistmodel_p_p.h +++ b/src/qml/qml/qquicklistmodel_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVELISTMODEL_P_P_H -#define QDECLARATIVELISTMODEL_P_P_H +#ifndef QQUICKLISTMODEL_P_P_H +#define QQUICKLISTMODEL_P_P_H // // W A R N I N G @@ -53,10 +53,10 @@ // We mean it. // -#include "qdeclarativelistmodel_p.h" -#include -#include "qdeclarativeopenmetaobject_p.h" -#include +#include "qquicklistmodel_p.h" +#include +#include "qqmlopenmetaobject_p.h" +#include QT_BEGIN_HEADER @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE class DynamicRoleModelNode; -class DynamicRoleModelNodeMetaObject : public QDeclarativeOpenMetaObject +class DynamicRoleModelNodeMetaObject : public QQmlOpenMetaObject { public: DynamicRoleModelNodeMetaObject(DynamicRoleModelNode *object); @@ -85,9 +85,9 @@ class DynamicRoleModelNode : public QObject { Q_OBJECT public: - DynamicRoleModelNode(QDeclarativeListModel *owner, int uid); + DynamicRoleModelNode(QQuickListModel *owner, int uid); - static DynamicRoleModelNode *create(const QVariantMap &obj, QDeclarativeListModel *owner); + static DynamicRoleModelNode *create(const QVariantMap &obj, QQuickListModel *owner); void updateValues(const QVariantMap &object, QList &roles); @@ -111,10 +111,10 @@ class DynamicRoleModelNode : public QObject return m_uid; } - static void sync(DynamicRoleModelNode *src, DynamicRoleModelNode *target, QHash *targetModelHash); + static void sync(DynamicRoleModelNode *src, DynamicRoleModelNode *target, QHash *targetModelHash); private: - QDeclarativeListModel *m_owner; + QQuickListModel *m_owner; int m_uid; DynamicRoleModelNodeMetaObject *m_meta; @@ -123,7 +123,7 @@ class DynamicRoleModelNode : public QObject class ModelObject; -class ModelNodeMetaObject : public QDeclarativeOpenMetaObject +class ModelNodeMetaObject : public QQmlOpenMetaObject { public: ModelNodeMetaObject(ModelObject *object); @@ -143,7 +143,7 @@ class ModelObject : public QObject { Q_OBJECT public: - ModelObject(QDeclarativeListModel *model, int elementIndex); + ModelObject(QQuickListModel *model, int elementIndex); void setValue(const QByteArray &name, const QVariant &val, bool force) { @@ -164,7 +164,7 @@ class ModelObject : public QObject void updateValues(); void updateValues(const QList &roles); - QDeclarativeListModel *m_model; + QQuickListModel *m_model; int m_elementIndex; private: @@ -270,11 +270,11 @@ class ListElement void clearProperty(const ListLayout::Role &role); - QVariant getProperty(const ListLayout::Role &role, const QDeclarativeListModel *owner, QV8Engine *eng); + QVariant getProperty(const ListLayout::Role &role, const QQuickListModel *owner, QV8Engine *eng); ListModel *getListProperty(const ListLayout::Role &role); QString *getStringProperty(const ListLayout::Role &role); QObject *getQObjectProperty(const ListLayout::Role &role); - QDeclarativeGuard *getGuardProperty(const ListLayout::Role &role); + QQmlGuard *getGuardProperty(const ListLayout::Role &role); QVariantMap *getVariantMapProperty(const ListLayout::Role &role); inline char *getPropertyMemory(const ListLayout::Role &role); @@ -294,7 +294,7 @@ class ListModel { public: - ListModel(ListLayout *layout, QDeclarativeListModel *modelCache, int uid); + ListModel(ListLayout *layout, QQuickListModel *modelCache, int uid); ~ListModel() {} void destroy(); @@ -302,7 +302,7 @@ class ListModel int setOrCreateProperty(int elementIndex, const QString &key, const QVariant &data); int setExistingProperty(int uid, const QString &key, v8::Handle data, QV8Engine *eng); - QVariant getProperty(int elementIndex, int roleIndex, const QDeclarativeListModel *owner, QV8Engine *eng); + QVariant getProperty(int elementIndex, int roleIndex, const QQuickListModel *owner, QV8Engine *eng); ListModel *getListProperty(int elementIndex, const ListLayout::Role &role); int roleCount() const @@ -343,14 +343,14 @@ class ListModel static void sync(ListModel *src, ListModel *target, QHash *srcModelHash); - ModelObject *getOrCreateModelObject(QDeclarativeListModel *model, int elementIndex); + ModelObject *getOrCreateModelObject(QQuickListModel *model, int elementIndex); private: QPODVector elements; ListLayout *m_layout; int m_uid; - QDeclarativeListModel *m_modelCache; + QQuickListModel *m_modelCache; struct ElementSync { @@ -365,7 +365,7 @@ class ListModel void updateCacheIndices(); friend class ListElement; - friend class QDeclarativeListModelWorkerAgent; + friend class QQuickListModelWorkerAgent; }; QT_END_NAMESPACE @@ -374,5 +374,5 @@ Q_DECLARE_METATYPE(ListModel *); QT_END_HEADER -#endif // QDECLARATIVELISTMODEL_P_P_H +#endif // QQUICKLISTMODEL_P_P_H diff --git a/src/declarative/qml/qdeclarativelistmodelworkeragent.cpp b/src/qml/qml/qquicklistmodelworkeragent.cpp similarity index 69% rename from src/declarative/qml/qdeclarativelistmodelworkeragent.cpp rename to src/qml/qml/qquicklistmodelworkeragent.cpp index 51ac460adf..c50b348a4a 100644 --- a/src/declarative/qml/qdeclarativelistmodelworkeragent.cpp +++ b/src/qml/qml/qquicklistmodelworkeragent.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#include "qdeclarativelistmodelworkeragent_p.h" -#include "qdeclarativelistmodel_p_p.h" -#include -#include -#include +#include "qquicklistmodelworkeragent_p.h" +#include "qquicklistmodel_p_p.h" +#include +#include +#include #include #include @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE -void QDeclarativeListModelWorkerAgent::Data::clearChange(int uid) +void QQuickListModelWorkerAgent::Data::clearChange(int uid) { for (int i=0 ; i < changes.count() ; ++i) { if (changes[i].modelUid == uid) { @@ -63,53 +63,53 @@ void QDeclarativeListModelWorkerAgent::Data::clearChange(int uid) } } -void QDeclarativeListModelWorkerAgent::Data::insertChange(int uid, int index, int count) +void QQuickListModelWorkerAgent::Data::insertChange(int uid, int index, int count) { Change c = { uid, Change::Inserted, index, count, 0, QList() }; changes << c; } -void QDeclarativeListModelWorkerAgent::Data::removeChange(int uid, int index, int count) +void QQuickListModelWorkerAgent::Data::removeChange(int uid, int index, int count) { Change c = { uid, Change::Removed, index, count, 0, QList() }; changes << c; } -void QDeclarativeListModelWorkerAgent::Data::moveChange(int uid, int index, int count, int to) +void QQuickListModelWorkerAgent::Data::moveChange(int uid, int index, int count, int to) { Change c = { uid, Change::Moved, index, count, to, QList() }; changes << c; } -void QDeclarativeListModelWorkerAgent::Data::changedChange(int uid, int index, int count, const QList &roles) +void QQuickListModelWorkerAgent::Data::changedChange(int uid, int index, int count, const QList &roles) { Change c = { uid, Change::Changed, index, count, 0, roles }; changes << c; } -QDeclarativeListModelWorkerAgent::QDeclarativeListModelWorkerAgent(QDeclarativeListModel *model) -: m_ref(1), m_orig(model), m_copy(new QDeclarativeListModel(model, this)) +QQuickListModelWorkerAgent::QQuickListModelWorkerAgent(QQuickListModel *model) +: m_ref(1), m_orig(model), m_copy(new QQuickListModel(model, this)) { } -QDeclarativeListModelWorkerAgent::~QDeclarativeListModelWorkerAgent() +QQuickListModelWorkerAgent::~QQuickListModelWorkerAgent() { mutex.lock(); syncDone.wakeAll(); mutex.unlock(); } -void QDeclarativeListModelWorkerAgent::setV8Engine(QV8Engine *eng) +void QQuickListModelWorkerAgent::setV8Engine(QV8Engine *eng) { m_copy->m_engine = eng; } -void QDeclarativeListModelWorkerAgent::addref() +void QQuickListModelWorkerAgent::addref() { m_ref.ref(); } -void QDeclarativeListModelWorkerAgent::release() +void QQuickListModelWorkerAgent::release() { bool del = !m_ref.deref(); @@ -117,57 +117,57 @@ void QDeclarativeListModelWorkerAgent::release() deleteLater(); } -void QDeclarativeListModelWorkerAgent::modelDestroyed() +void QQuickListModelWorkerAgent::modelDestroyed() { m_orig = 0; } -int QDeclarativeListModelWorkerAgent::count() const +int QQuickListModelWorkerAgent::count() const { return m_copy->count(); } -void QDeclarativeListModelWorkerAgent::clear() +void QQuickListModelWorkerAgent::clear() { m_copy->clear(); } -void QDeclarativeListModelWorkerAgent::remove(QDeclarativeV8Function *args) +void QQuickListModelWorkerAgent::remove(QQmlV8Function *args) { m_copy->remove(args); } -void QDeclarativeListModelWorkerAgent::append(QDeclarativeV8Function *args) +void QQuickListModelWorkerAgent::append(QQmlV8Function *args) { m_copy->append(args); } -void QDeclarativeListModelWorkerAgent::insert(QDeclarativeV8Function *args) +void QQuickListModelWorkerAgent::insert(QQmlV8Function *args) { m_copy->insert(args); } -QDeclarativeV8Handle QDeclarativeListModelWorkerAgent::get(int index) const +QQmlV8Handle QQuickListModelWorkerAgent::get(int index) const { return m_copy->get(index); } -void QDeclarativeListModelWorkerAgent::set(int index, const QDeclarativeV8Handle &value) +void QQuickListModelWorkerAgent::set(int index, const QQmlV8Handle &value) { m_copy->set(index, value); } -void QDeclarativeListModelWorkerAgent::setProperty(int index, const QString& property, const QVariant& value) +void QQuickListModelWorkerAgent::setProperty(int index, const QString& property, const QVariant& value) { m_copy->setProperty(index, property, value); } -void QDeclarativeListModelWorkerAgent::move(int from, int to, int count) +void QQuickListModelWorkerAgent::move(int from, int to, int count) { m_copy->move(from, to, count); } -void QDeclarativeListModelWorkerAgent::sync() +void QQuickListModelWorkerAgent::sync() { Sync *s = new Sync; s->data = data; @@ -180,7 +180,7 @@ void QDeclarativeListModelWorkerAgent::sync() mutex.unlock(); } -bool QDeclarativeListModelWorkerAgent::event(QEvent *e) +bool QQuickListModelWorkerAgent::event(QEvent *e) { if (e->type() == QEvent::User) { bool cc = false; @@ -191,19 +191,19 @@ bool QDeclarativeListModelWorkerAgent::event(QEvent *e) cc = m_orig->count() != s->list->count(); - QHash targetModelDynamicHash; + QHash targetModelDynamicHash; QHash targetModelStaticHash; Q_ASSERT(m_orig->m_dynamicRoles == s->list->m_dynamicRoles); if (m_orig->m_dynamicRoles) - QDeclarativeListModel::sync(s->list, m_orig, &targetModelDynamicHash); + QQuickListModel::sync(s->list, m_orig, &targetModelDynamicHash); else ListModel::sync(s->list->m_listModel, m_orig->m_listModel, &targetModelStaticHash); for (int ii = 0; ii < changes.count(); ++ii) { const Change &change = changes.at(ii); - QDeclarativeListModel *model = 0; + QQuickListModel *model = 0; if (m_orig->m_dynamicRoles) { model = targetModelDynamicHash.value(change.modelUid); } else { diff --git a/src/declarative/qml/qdeclarativelistmodelworkeragent_p.h b/src/qml/qml/qquicklistmodelworkeragent_p.h similarity index 76% rename from src/declarative/qml/qdeclarativelistmodelworkeragent_p.h rename to src/qml/qml/qquicklistmodelworkeragent_p.h index f2c971c1e1..cf2ef45c16 100644 --- a/src/declarative/qml/qdeclarativelistmodelworkeragent_p.h +++ b/src/qml/qml/qquicklistmodelworkeragent_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVELISTMODELWORKERAGENT_P_H -#define QDECLARATIVELISTMODELWORKERAGENT_P_H +#ifndef QQUICKLISTMODELWORKERAGENT_P_H +#define QQUICKLISTMODELWORKERAGENT_P_H // // W A R N I N G @@ -53,7 +53,7 @@ // We mean it. // -#include +#include #include #include @@ -66,16 +66,16 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeListModel; +class QQuickListModel; -class QDeclarativeListModelWorkerAgent : public QObject +class QQuickListModelWorkerAgent : public QObject { Q_OBJECT Q_PROPERTY(int count READ count) public: - QDeclarativeListModelWorkerAgent(QDeclarativeListModel *); - ~QDeclarativeListModelWorkerAgent(); + QQuickListModelWorkerAgent(QQuickListModel *); + ~QQuickListModelWorkerAgent(); void setV8Engine(QV8Engine *eng); void addref(); @@ -84,11 +84,11 @@ class QDeclarativeListModelWorkerAgent : public QObject int count() const; Q_INVOKABLE void clear(); - Q_INVOKABLE void remove(QDeclarativeV8Function *args); - Q_INVOKABLE void append(QDeclarativeV8Function *args); - Q_INVOKABLE void insert(QDeclarativeV8Function *args); - Q_INVOKABLE QDeclarativeV8Handle get(int index) const; - Q_INVOKABLE void set(int index, const QDeclarativeV8Handle &); + Q_INVOKABLE void remove(QQmlV8Function *args); + Q_INVOKABLE void append(QQmlV8Function *args); + Q_INVOKABLE void insert(QQmlV8Function *args); + Q_INVOKABLE QQmlV8Handle get(int index) const; + Q_INVOKABLE void set(int index, const QQmlV8Handle &); Q_INVOKABLE void setProperty(int index, const QString& property, const QVariant& value); Q_INVOKABLE void move(int from, int to, int count); Q_INVOKABLE void sync(); @@ -97,7 +97,7 @@ class QDeclarativeListModelWorkerAgent : public QObject { VariantRef() : a(0) {} VariantRef(const VariantRef &r) : a(r.a) { if (a) a->addref(); } - VariantRef(QDeclarativeListModelWorkerAgent *_a) : a(_a) { if (a) a->addref(); } + VariantRef(QQuickListModelWorkerAgent *_a) : a(_a) { if (a) a->addref(); } ~VariantRef() { if (a) a->release(); } VariantRef &operator=(const VariantRef &o) { @@ -106,15 +106,15 @@ class QDeclarativeListModelWorkerAgent : public QObject return *this; } - QDeclarativeListModelWorkerAgent *a; + QQuickListModelWorkerAgent *a; }; void modelDestroyed(); protected: virtual bool event(QEvent *); private: - friend class QDeclarativeWorkerScriptEnginePrivate; - friend class QDeclarativeListModel; + friend class QQuickWorkerScriptEnginePrivate; + friend class QQuickListModel; struct Change { @@ -141,21 +141,21 @@ class QDeclarativeListModelWorkerAgent : public QObject struct Sync : public QEvent { Sync() : QEvent(QEvent::User) {} Data data; - QDeclarativeListModel *list; + QQuickListModel *list; }; QAtomicInt m_ref; - QDeclarativeListModel *m_orig; - QDeclarativeListModel *m_copy; + QQuickListModel *m_orig; + QQuickListModel *m_copy; QMutex mutex; QWaitCondition syncDone; }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeListModelWorkerAgent::VariantRef) +Q_DECLARE_METATYPE(QQuickListModelWorkerAgent::VariantRef) QT_END_HEADER -#endif // QDECLARATIVEWORKERSCRIPT_P_H +#endif // QQUICKLISTMODELWORKERAGENT_P_H diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/qml/qml/qquickworkerscript.cpp similarity index 75% rename from src/declarative/qml/qdeclarativeworkerscript.cpp rename to src/qml/qml/qquickworkerscript.cpp index 53283113b6..f91aa28509 100644 --- a/src/declarative/qml/qdeclarativeworkerscript.cpp +++ b/src/qml/qml/qquickworkerscript.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,23 +39,23 @@ ** ****************************************************************************/ -#include "qdeclarativeworkerscript_p.h" -#include "qdeclarativelistmodel_p.h" -#include "qdeclarativelistmodelworkeragent_p.h" -#include "qdeclarativeengine_p.h" -#include "qdeclarativeexpression_p.h" +#include "qquickworkerscript_p.h" +#include "qquicklistmodel_p.h" +#include "qquicklistmodelworkeragent_p.h" +#include "qqmlengine_p.h" +#include "qqmlexpression_p.h" #include #include #include -#include +#include #include #include #include #include #include -#include -#include "qdeclarativenetworkaccessmanagerfactory.h" +#include +#include "qqmlnetworkaccessmanagerfactory.h" #include #include @@ -111,15 +111,15 @@ class WorkerErrorEvent : public QEvent public: enum Type { WorkerError = WorkerRemoveEvent::WorkerRemove + 1 }; - WorkerErrorEvent(const QDeclarativeError &error); + WorkerErrorEvent(const QQmlError &error); - QDeclarativeError error() const; + QQmlError error() const; private: - QDeclarativeError m_error; + QQmlError m_error; }; -class QDeclarativeWorkerScriptEnginePrivate : public QObject +class QQuickWorkerScriptEnginePrivate : public QObject { Q_OBJECT public: @@ -127,18 +127,18 @@ class QDeclarativeWorkerScriptEnginePrivate : public QObject WorkerDestroyEvent = QEvent::User + 100 }; - QDeclarativeWorkerScriptEnginePrivate(QDeclarativeEngine *eng); + QQuickWorkerScriptEnginePrivate(QQmlEngine *eng); class WorkerEngine : public QV8Engine { public: - WorkerEngine(QDeclarativeWorkerScriptEnginePrivate *parent); + WorkerEngine(QQuickWorkerScriptEnginePrivate *parent); ~WorkerEngine(); void init(); virtual QNetworkAccessManager *networkAccessManager(); - QDeclarativeWorkerScriptEnginePrivate *p; + QQuickWorkerScriptEnginePrivate *p; v8::Local sendFunction(int id); void callOnMessage(v8::Handle object, v8::Handle arg); @@ -149,11 +149,11 @@ class QDeclarativeWorkerScriptEnginePrivate : public QObject }; WorkerEngine *workerEngine; - static QDeclarativeWorkerScriptEnginePrivate *get(QV8Engine *e) { + static QQuickWorkerScriptEnginePrivate *get(QV8Engine *e) { return static_cast(e)->p; } - QDeclarativeEngine *qmlengine; + QQmlEngine *qmlengine; QMutex m_lock; QWaitCondition m_wait; @@ -165,7 +165,7 @@ class QDeclarativeWorkerScriptEnginePrivate : public QObject int id; QUrl source; bool initialized; - QDeclarativeWorkerScript *owner; + QQuickWorkerScript *owner; v8::Persistent object; }; @@ -185,22 +185,22 @@ class QDeclarativeWorkerScriptEnginePrivate : public QObject private: void processMessage(int, const QByteArray &); void processLoad(int, const QUrl &); - void reportScriptException(WorkerScript *, const QDeclarativeError &error); + void reportScriptException(WorkerScript *, const QQmlError &error); }; -QDeclarativeWorkerScriptEnginePrivate::WorkerEngine::WorkerEngine(QDeclarativeWorkerScriptEnginePrivate *parent) +QQuickWorkerScriptEnginePrivate::WorkerEngine::WorkerEngine(QQuickWorkerScriptEnginePrivate *parent) : QV8Engine(0), p(parent), accessManager(0) { } -QDeclarativeWorkerScriptEnginePrivate::WorkerEngine::~WorkerEngine() +QQuickWorkerScriptEnginePrivate::WorkerEngine::~WorkerEngine() { qPersistentDispose(createsend); qPersistentDispose(onmessage); delete accessManager; } -void QDeclarativeWorkerScriptEnginePrivate::WorkerEngine::init() +void QQuickWorkerScriptEnginePrivate::WorkerEngine::init() { initDeclarativeGlobalObject(); #define CALL_ONMESSAGE_SCRIPT \ @@ -234,7 +234,7 @@ void QDeclarativeWorkerScriptEnginePrivate::WorkerEngine::init() v8::Local createsendconstructor = v8::Local::Cast(createsendscript->Run()); v8::Handle args[] = { - V8FUNCTION(QDeclarativeWorkerScriptEnginePrivate::sendMessage, this) + V8FUNCTION(QQuickWorkerScriptEnginePrivate::sendMessage, this) }; v8::Local createsendvalue = createsendconstructor->Call(global(), 1, args); @@ -243,21 +243,21 @@ void QDeclarativeWorkerScriptEnginePrivate::WorkerEngine::init() } // Requires handle and context scope -v8::Local QDeclarativeWorkerScriptEnginePrivate::WorkerEngine::sendFunction(int id) +v8::Local QQuickWorkerScriptEnginePrivate::WorkerEngine::sendFunction(int id) { v8::Handle args[] = { v8::Integer::New(id) }; return v8::Local::Cast(createsend->Call(global(), 1, args)); } // Requires handle and context scope -void QDeclarativeWorkerScriptEnginePrivate::WorkerEngine::callOnMessage(v8::Handle object, +void QQuickWorkerScriptEnginePrivate::WorkerEngine::callOnMessage(v8::Handle object, v8::Handle arg) { v8::Handle args[] = { object, arg }; onmessage->Call(global(), 2, args); } -QNetworkAccessManager *QDeclarativeWorkerScriptEnginePrivate::WorkerEngine::networkAccessManager() +QNetworkAccessManager *QQuickWorkerScriptEnginePrivate::WorkerEngine::networkAccessManager() { if (!accessManager) { if (p->qmlengine && p->qmlengine->networkAccessManagerFactory()) { @@ -269,12 +269,12 @@ QNetworkAccessManager *QDeclarativeWorkerScriptEnginePrivate::WorkerEngine::netw return accessManager; } -QDeclarativeWorkerScriptEnginePrivate::QDeclarativeWorkerScriptEnginePrivate(QDeclarativeEngine *engine) +QQuickWorkerScriptEnginePrivate::QQuickWorkerScriptEnginePrivate(QQmlEngine *engine) : workerEngine(0), qmlengine(engine), m_nextId(0) { } -v8::Handle QDeclarativeWorkerScriptEnginePrivate::sendMessage(const v8::Arguments &args) +v8::Handle QQuickWorkerScriptEnginePrivate::sendMessage(const v8::Arguments &args) { WorkerEngine *engine = (WorkerEngine*)V8ENGINE(); @@ -294,7 +294,7 @@ v8::Handle QDeclarativeWorkerScriptEnginePrivate::sendMessage(const v } // Requires handle scope and context scope -v8::Handle QDeclarativeWorkerScriptEnginePrivate::getWorker(WorkerScript *script) +v8::Handle QQuickWorkerScriptEnginePrivate::getWorker(WorkerScript *script) { if (!script->initialized) { script->initialized = true; @@ -314,7 +314,7 @@ v8::Handle QDeclarativeWorkerScriptEnginePrivate::getWorker(WorkerSc return script->object; } -bool QDeclarativeWorkerScriptEnginePrivate::event(QEvent *event) +bool QQuickWorkerScriptEnginePrivate::event(QEvent *event) { if (event->type() == (QEvent::Type)WorkerDataEvent::WorkerData) { WorkerDataEvent *workerEvent = static_cast(event); @@ -336,7 +336,7 @@ bool QDeclarativeWorkerScriptEnginePrivate::event(QEvent *event) } } -void QDeclarativeWorkerScriptEnginePrivate::processMessage(int id, const QByteArray &data) +void QQuickWorkerScriptEnginePrivate::processMessage(int id, const QByteArray &data) { WorkerScript *script = workers.value(id); if (!script) @@ -351,24 +351,24 @@ void QDeclarativeWorkerScriptEnginePrivate::processMessage(int id, const QByteAr workerEngine->callOnMessage(script->object, value); if (tc.HasCaught()) { - QDeclarativeError error; - QDeclarativeExpressionPrivate::exceptionToError(tc.Message(), error); + QQmlError error; + QQmlExpressionPrivate::exceptionToError(tc.Message(), error); reportScriptException(script, error); } } -void QDeclarativeWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url) +void QQuickWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url) { if (url.isRelative()) return; - QString fileName = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url); + QString fileName = QQmlEnginePrivate::urlToLocalFileOrQrc(url); QFile f(fileName); if (f.open(QIODevice::ReadOnly)) { QByteArray data = f.readAll(); QString sourceCode = QString::fromUtf8(data); - QDeclarativeScript::Parser::extractPragmas(sourceCode); + QQmlScript::Parser::extractPragmas(sourceCode); v8::HandleScope handle_scope; v8::Context::Scope scope(workerEngine->context()); @@ -391,8 +391,8 @@ void QDeclarativeWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url) program->Run(activation); if (tc.HasCaught()) { - QDeclarativeError error; - QDeclarativeExpressionPrivate::exceptionToError(tc.Message(), error); + QQmlError error; + QQmlExpressionPrivate::exceptionToError(tc.Message(), error); reportScriptException(script, error); } } else { @@ -400,10 +400,10 @@ void QDeclarativeWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url) } } -void QDeclarativeWorkerScriptEnginePrivate::reportScriptException(WorkerScript *script, - const QDeclarativeError &error) +void QQuickWorkerScriptEnginePrivate::reportScriptException(WorkerScript *script, + const QQmlError &error) { - QDeclarativeWorkerScriptEnginePrivate *p = QDeclarativeWorkerScriptEnginePrivate::get(workerEngine); + QQuickWorkerScriptEnginePrivate *p = QQuickWorkerScriptEnginePrivate::get(workerEngine); QMutexLocker(&p->m_lock); if (script->owner) @@ -454,18 +454,18 @@ int WorkerRemoveEvent::workerId() const return m_id; } -WorkerErrorEvent::WorkerErrorEvent(const QDeclarativeError &error) +WorkerErrorEvent::WorkerErrorEvent(const QQmlError &error) : QEvent((QEvent::Type)WorkerError), m_error(error) { } -QDeclarativeError WorkerErrorEvent::error() const +QQmlError WorkerErrorEvent::error() const { return m_error; } -QDeclarativeWorkerScriptEngine::QDeclarativeWorkerScriptEngine(QDeclarativeEngine *parent) -: QThread(parent), d(new QDeclarativeWorkerScriptEnginePrivate(parent)) +QQuickWorkerScriptEngine::QQuickWorkerScriptEngine(QQmlEngine *parent) +: QThread(parent), d(new QQuickWorkerScriptEnginePrivate(parent)) { d->m_lock.lock(); connect(d, SIGNAL(stopThread()), this, SLOT(quit()), Qt::DirectConnection); @@ -475,33 +475,33 @@ QDeclarativeWorkerScriptEngine::QDeclarativeWorkerScriptEngine(QDeclarativeEngin d->m_lock.unlock(); } -QDeclarativeWorkerScriptEngine::~QDeclarativeWorkerScriptEngine() +QQuickWorkerScriptEngine::~QQuickWorkerScriptEngine() { d->m_lock.lock(); - QCoreApplication::postEvent(d, new QEvent((QEvent::Type)QDeclarativeWorkerScriptEnginePrivate::WorkerDestroyEvent)); + QCoreApplication::postEvent(d, new QEvent((QEvent::Type)QQuickWorkerScriptEnginePrivate::WorkerDestroyEvent)); d->m_lock.unlock(); //We have to force to cleanup the main thread's event queue here //to make sure the main GUI release all pending locks/wait conditions which - //some worker script/agent are waiting for (QDeclarativeListModelWorkerAgent::sync() for example). + //some worker script/agent are waiting for (QQuickListModelWorkerAgent::sync() for example). QCoreApplication::processEvents(); wait(); d->deleteLater(); } -QDeclarativeWorkerScriptEnginePrivate::WorkerScript::WorkerScript() +QQuickWorkerScriptEnginePrivate::WorkerScript::WorkerScript() : id(-1), initialized(false), owner(0) { } -QDeclarativeWorkerScriptEnginePrivate::WorkerScript::~WorkerScript() +QQuickWorkerScriptEnginePrivate::WorkerScript::~WorkerScript() { qPersistentDispose(object); } -int QDeclarativeWorkerScriptEngine::registerWorkerScript(QDeclarativeWorkerScript *owner) +int QQuickWorkerScriptEngine::registerWorkerScript(QQuickWorkerScript *owner) { - typedef QDeclarativeWorkerScriptEnginePrivate::WorkerScript WorkerScript; + typedef QQuickWorkerScriptEnginePrivate::WorkerScript WorkerScript; WorkerScript *script = new WorkerScript; script->id = d->m_nextId++; @@ -514,30 +514,30 @@ int QDeclarativeWorkerScriptEngine::registerWorkerScript(QDeclarativeWorkerScrip return script->id; } -void QDeclarativeWorkerScriptEngine::removeWorkerScript(int id) +void QQuickWorkerScriptEngine::removeWorkerScript(int id) { - QDeclarativeWorkerScriptEnginePrivate::WorkerScript* script = d->workers.value(id); + QQuickWorkerScriptEnginePrivate::WorkerScript* script = d->workers.value(id); if (script) { script->owner = 0; QCoreApplication::postEvent(d, new WorkerRemoveEvent(id)); } } -void QDeclarativeWorkerScriptEngine::executeUrl(int id, const QUrl &url) +void QQuickWorkerScriptEngine::executeUrl(int id, const QUrl &url) { QCoreApplication::postEvent(d, new WorkerLoadEvent(id, url)); } -void QDeclarativeWorkerScriptEngine::sendMessage(int id, const QByteArray &data) +void QQuickWorkerScriptEngine::sendMessage(int id, const QByteArray &data) { QCoreApplication::postEvent(d, new WorkerDataEvent(id, data)); } -void QDeclarativeWorkerScriptEngine::run() +void QQuickWorkerScriptEngine::run() { d->m_lock.lock(); - d->workerEngine = new QDeclarativeWorkerScriptEnginePrivate::WorkerEngine(d); + d->workerEngine = new QQuickWorkerScriptEnginePrivate::WorkerEngine(d); d->workerEngine->init(); d->m_wait.wakeAll(); @@ -554,7 +554,7 @@ void QDeclarativeWorkerScriptEngine::run() /*! - \qmlclass WorkerScript QDeclarativeWorkerScript + \qmlclass WorkerScript QQuickWorkerScript \ingroup qml-utility-elements \brief The WorkerScript element enables the use of threads in QML. @@ -567,12 +567,12 @@ void QDeclarativeWorkerScriptEngine::run() An example: - \snippet doc/src/snippets/declarative/workerscript.qml 0 + \snippet doc/src/snippets/qml/workerscript.qml 0 The above worker script specifies a JavaScript file, "script.js", that handles the operations to be performed in the new thread. Here is \c script.js: - \quotefile doc/src/snippets/declarative/script.js + \quotefile doc/src/snippets/qml/script.js When the user clicks anywhere within the rectangle, \c sendMessage() is called, triggering the \tt WorkerScript.onMessage() handler in @@ -587,7 +587,7 @@ void QDeclarativeWorkerScriptEngine::run() that unlike an ordinary JavaScript file that is imported into QML, the \c script.js in the above example cannot access the properties, methods or other attributes of the QML item, nor can it access any context properties set on the QML object - through QDeclarativeContext. + through QQmlContext. Additionally, there are restrictions on the types of values that can be passed to and from the worker script. See the sendMessage() documentation for details. @@ -595,12 +595,12 @@ void QDeclarativeWorkerScriptEngine::run() \sa {declarative/threading/workerscript}{WorkerScript example}, {declarative/threading/threadedlistmodel}{Threaded ListModel example} */ -QDeclarativeWorkerScript::QDeclarativeWorkerScript(QObject *parent) +QQuickWorkerScript::QQuickWorkerScript(QObject *parent) : QObject(parent), m_engine(0), m_scriptId(-1), m_componentComplete(true) { } -QDeclarativeWorkerScript::~QDeclarativeWorkerScript() +QQuickWorkerScript::~QQuickWorkerScript() { if (m_scriptId != -1) m_engine->removeWorkerScript(m_scriptId); } @@ -611,12 +611,12 @@ QDeclarativeWorkerScript::~QDeclarativeWorkerScript() This holds the url of the JavaScript file that implements the \tt WorkerScript.onMessage() handler for threaded operations. */ -QUrl QDeclarativeWorkerScript::source() const +QUrl QQuickWorkerScript::source() const { return m_source; } -void QDeclarativeWorkerScript::setSource(const QUrl &source) +void QQuickWorkerScript::setSource(const QUrl &source) { if (m_source == source) return; @@ -649,10 +649,10 @@ void QDeclarativeWorkerScript::setSource(const QUrl &source) of ListModel objects, any modifications by the other thread to an object passed in \c message will not be reflected in the original object. */ -void QDeclarativeWorkerScript::sendMessage(QDeclarativeV8Function *args) +void QQuickWorkerScript::sendMessage(QQmlV8Function *args) { if (!engine()) { - qWarning("QDeclarativeWorkerScript: Attempt to send message before WorkerScript establishment"); + qWarning("QQuickWorkerScript: Attempt to send message before WorkerScript establishment"); return; } @@ -663,22 +663,22 @@ void QDeclarativeWorkerScript::sendMessage(QDeclarativeV8Function *args) m_engine->sendMessage(m_scriptId, QV8Worker::serialize(argument, args->engine())); } -void QDeclarativeWorkerScript::classBegin() +void QQuickWorkerScript::classBegin() { m_componentComplete = false; } -QDeclarativeWorkerScriptEngine *QDeclarativeWorkerScript::engine() +QQuickWorkerScriptEngine *QQuickWorkerScript::engine() { if (m_engine) return m_engine; if (m_componentComplete) { - QDeclarativeEngine *engine = qmlEngine(this); + QQmlEngine *engine = qmlEngine(this); if (!engine) { - qWarning("QDeclarativeWorkerScript: engine() called without qmlEngine() set"); + qWarning("QQuickWorkerScript: engine() called without qmlEngine() set"); return 0; } - m_engine = QDeclarativeEnginePrivate::get(engine)->getWorkerScriptEngine(); + m_engine = QQmlEnginePrivate::get(engine)->getWorkerScriptEngine(); m_scriptId = m_engine->registerWorkerScript(this); if (m_source.isValid()) @@ -689,7 +689,7 @@ QDeclarativeWorkerScriptEngine *QDeclarativeWorkerScript::engine() return 0; } -void QDeclarativeWorkerScript::componentComplete() +void QQuickWorkerScript::componentComplete() { m_componentComplete = true; engine(); // Get it started now. @@ -702,22 +702,22 @@ void QDeclarativeWorkerScript::componentComplete() script in another thread through a call to sendMessage(). */ -bool QDeclarativeWorkerScript::event(QEvent *event) +bool QQuickWorkerScript::event(QEvent *event) { if (event->type() == (QEvent::Type)WorkerDataEvent::WorkerData) { - QDeclarativeEngine *engine = qmlEngine(this); + QQmlEngine *engine = qmlEngine(this); if (engine) { WorkerDataEvent *workerEvent = static_cast(event); - QV8Engine *v8engine = QDeclarativeEnginePrivate::get(engine)->v8engine(); + QV8Engine *v8engine = QQmlEnginePrivate::get(engine)->v8engine(); v8::HandleScope handle_scope; v8::Context::Scope scope(v8engine->context()); v8::Handle value = QV8Worker::deserialize(workerEvent->data(), v8engine); - emit message(QDeclarativeV8Handle::fromHandle(value)); + emit message(QQmlV8Handle::fromHandle(value)); } return true; } else if (event->type() == (QEvent::Type)WorkerErrorEvent::WorkerError) { WorkerErrorEvent *workerEvent = static_cast(event); - QDeclarativeEnginePrivate::warning(qmlEngine(this), workerEvent->error()); + QQmlEnginePrivate::warning(qmlEngine(this), workerEvent->error()); return true; } else { return QObject::event(event); @@ -726,5 +726,5 @@ bool QDeclarativeWorkerScript::event(QEvent *event) QT_END_NAMESPACE -#include +#include diff --git a/src/declarative/qml/qdeclarativeworkerscript_p.h b/src/qml/qml/qquickworkerscript_p.h similarity index 69% rename from src/declarative/qml/qdeclarativeworkerscript_p.h rename to src/qml/qml/qquickworkerscript_p.h index 192251f8ac..fd1c3ed690 100644 --- a/src/declarative/qml/qdeclarativeworkerscript_p.h +++ b/src/qml/qml/qquickworkerscript_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEWORKERSCRIPT_P_H -#define QDECLARATIVEWORKERSCRIPT_P_H +#ifndef QQUICKWORKERSCRIPT_P_H +#define QQUICKWORKERSCRIPT_P_H // // W A R N I N G @@ -53,11 +53,11 @@ // We mean it. // -#include "qdeclarative.h" -#include "qdeclarativeparserstatus.h" +#include "qqml.h" +#include "qqmlparserstatus.h" #include -#include +#include #include QT_BEGIN_HEADER @@ -65,16 +65,16 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeWorkerScript; -class QDeclarativeWorkerScriptEnginePrivate; -class QDeclarativeWorkerScriptEngine : public QThread +class QQuickWorkerScript; +class QQuickWorkerScriptEnginePrivate; +class QQuickWorkerScriptEngine : public QThread { Q_OBJECT public: - QDeclarativeWorkerScriptEngine(QDeclarativeEngine *parent = 0); - virtual ~QDeclarativeWorkerScriptEngine(); + QQuickWorkerScriptEngine(QQmlEngine *parent = 0); + virtual ~QQuickWorkerScriptEngine(); - int registerWorkerScript(QDeclarativeWorkerScript *); + int registerWorkerScript(QQuickWorkerScript *); void removeWorkerScript(int); void executeUrl(int, const QUrl &); void sendMessage(int, const QByteArray &); @@ -83,30 +83,30 @@ Q_OBJECT virtual void run(); private: - QDeclarativeWorkerScriptEnginePrivate *d; + QQuickWorkerScriptEnginePrivate *d; }; -class QDeclarativeV8Function; -class QDeclarativeV8Handle; -class Q_AUTOTEST_EXPORT QDeclarativeWorkerScript : public QObject, public QDeclarativeParserStatus +class QQmlV8Function; +class QQmlV8Handle; +class Q_AUTOTEST_EXPORT QQuickWorkerScript : public QObject, public QQmlParserStatus { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) public: - QDeclarativeWorkerScript(QObject *parent = 0); - virtual ~QDeclarativeWorkerScript(); + QQuickWorkerScript(QObject *parent = 0); + virtual ~QQuickWorkerScript(); QUrl source() const; void setSource(const QUrl &); public slots: - void sendMessage(QDeclarativeV8Function*); + void sendMessage(QQmlV8Function*); signals: void sourceChanged(); - void message(const QDeclarativeV8Handle &messageObject); + void message(const QQmlV8Handle &messageObject); protected: virtual void classBegin(); @@ -114,8 +114,8 @@ public slots: virtual bool event(QEvent *); private: - QDeclarativeWorkerScriptEngine *engine(); - QDeclarativeWorkerScriptEngine *m_engine; + QQuickWorkerScriptEngine *engine(); + QQuickWorkerScriptEngine *m_engine; int m_scriptId; QUrl m_source; bool m_componentComplete; @@ -123,8 +123,8 @@ public slots: QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeWorkerScript) +QML_DECLARE_TYPE(QQuickWorkerScript) QT_END_HEADER -#endif // QDECLARATIVEWORKERSCRIPT_P_H +#endif // QQUICKWORKERSCRIPT_P_H diff --git a/src/declarative/qml/rewriter/rewriter.pri b/src/qml/qml/rewriter/rewriter.pri similarity index 100% rename from src/declarative/qml/rewriter/rewriter.pri rename to src/qml/qml/rewriter/rewriter.pri diff --git a/src/declarative/qml/rewriter/textwriter.cpp b/src/qml/qml/rewriter/textwriter.cpp similarity index 98% rename from src/declarative/qml/rewriter/textwriter.cpp rename to src/qml/qml/rewriter/textwriter.cpp index 5cf5c0388e..f14c4af521 100644 --- a/src/declarative/qml/rewriter/textwriter.cpp +++ b/src/qml/qml/rewriter/textwriter.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,7 +43,7 @@ QT_QML_BEGIN_NAMESPACE -using namespace QDeclarativeJS; +using namespace QQmlJS; TextWriter::TextWriter() :string(0), cursor(0) diff --git a/src/declarative/qml/rewriter/textwriter_p.h b/src/qml/qml/rewriter/textwriter_p.h similarity index 93% rename from src/declarative/qml/rewriter/textwriter_p.h rename to src/qml/qml/rewriter/textwriter_p.h index aae9271c1a..94e2d08730 100644 --- a/src/declarative/qml/rewriter/textwriter_p.h +++ b/src/qml/qml/rewriter/textwriter_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,7 +42,7 @@ #ifndef TEXTWRITER_H #define TEXTWRITER_H -#include +#include #include #include @@ -51,7 +51,7 @@ QT_BEGIN_HEADER QT_QML_BEGIN_NAMESPACE -namespace QDeclarativeJS { +namespace QQmlJS { class TextWriter { @@ -93,7 +93,7 @@ class TextWriter }; -} // end of namespace QDeclarativeJS +} // end of namespace QQmlJS QT_QML_END_NAMESPACE QT_END_HEADER diff --git a/src/declarative/qml/v4/qv4bindings.cpp b/src/qml/qml/v4/qv4bindings.cpp similarity index 93% rename from src/declarative/qml/v4/qv4bindings.cpp rename to src/qml/qml/v4/qv4bindings.cpp index 2c26fff3d8..c03292d74d 100644 --- a/src/declarative/qml/v4/qv4bindings.cpp +++ b/src/qml/qml/v4/qv4bindings.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -46,23 +46,23 @@ #include "qv4compiler_p.h" #include "qv4compiler_p_p.h" -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include #include #include #include // ::fmod QT_BEGIN_NAMESPACE -using namespace QDeclarativeJS; +using namespace QQmlJS; namespace { struct Register { - typedef QDeclarativeRegisterType Type; + typedef QQmlRegisterType Type; void setUndefined() { dataType = UndefinedType; } void setNaN() { setqreal(qSNaN()); } @@ -189,8 +189,8 @@ void Register::init(Type type) } // end of anonymous namespace QV4Bindings::QV4Bindings(const char *programData, - QDeclarativeContextData *context, - QDeclarativeRefCount *ref) + QQmlContextData *context, + QQmlRefCount *ref) : subscriptions(0), program(0), dataRef(0), bindings(0) { program = (QV4Program *)programData; @@ -201,7 +201,7 @@ QV4Bindings::QV4Bindings(const char *programData, subscriptions = new Subscription[program->subscriptions]; bindings = new Binding[program->bindings]; - QDeclarativeAbstractExpression::setContext(context); + QQmlAbstractExpression::setContext(context); } } @@ -212,7 +212,7 @@ QV4Bindings::~QV4Bindings() if (dataRef) dataRef->release(); } -QDeclarativeAbstractBinding *QV4Bindings::configBinding(int index, QObject *target, +QQmlAbstractBinding *QV4Bindings::configBinding(int index, QObject *target, QObject *scope, int property, int line, int column) { @@ -231,7 +231,7 @@ QDeclarativeAbstractBinding *QV4Bindings::configBinding(int index, QObject *targ return rv; } -void QV4Bindings::Binding::setEnabled(bool e, QDeclarativePropertyPrivate::WriteFlags flags) +void QV4Bindings::Binding::setEnabled(bool e, QQmlPropertyPrivate::WriteFlags flags) { if (enabled != e) { enabled = e; @@ -240,7 +240,7 @@ void QV4Bindings::Binding::setEnabled(bool e, QDeclarativePropertyPrivate::Write } } -void QV4Bindings::Binding::update(QDeclarativePropertyPrivate::WriteFlags flags) +void QV4Bindings::Binding::update(QQmlPropertyPrivate::WriteFlags flags) { parent->run(this, flags); } @@ -264,7 +264,7 @@ QObject *QV4Bindings::Binding::object() const return target; } -void QV4Bindings::Subscription::subscriptionCallback(QDeclarativeNotifierEndpoint *e) +void QV4Bindings::Subscription::subscriptionCallback(QQmlNotifierEndpoint *e) { Subscription *s = static_cast(e); s->bindings->subscriptionNotify(s->method); @@ -280,33 +280,33 @@ void QV4Bindings::subscriptionNotify(int id) Binding *binding = bindings + bindingRef->binding; if (binding->executedBlocks & bindingRef->blockMask) { - run(binding, QDeclarativePropertyPrivate::DontRemoveBinding); + run(binding, QQmlPropertyPrivate::DontRemoveBinding); } } } -void QV4Bindings::run(Binding *binding, QDeclarativePropertyPrivate::WriteFlags flags) +void QV4Bindings::run(Binding *binding, QQmlPropertyPrivate::WriteFlags flags) { if (!binding->enabled) return; - QDeclarativeContextData *context = QDeclarativeAbstractExpression::context(); + QQmlContextData *context = QQmlAbstractExpression::context(); if (!context || !context->isValid()) return; - QDeclarativeTrace trace("V4 Binding Update"); + QQmlTrace trace("V4 Binding Update"); trace.addDetail("URL", context->url); trace.addDetail("Line", binding->line); trace.addDetail("Column", binding->column); - QDeclarativeBindingProfiler prof(context->urlString, binding->line, binding->column); + QQmlBindingProfiler prof(context->urlString, binding->line, binding->column); if (binding->updating) { QString name; if (binding->property & 0xFFFF0000) { - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context->engine); - QDeclarativeValueType *vt = ep->valueTypes[(binding->property >> 16) & 0xFF]; + QQmlValueType *vt = ep->valueTypes[(binding->property >> 16) & 0xFF]; Q_ASSERT(vt); name = QLatin1String(binding->target->metaObject()->property(binding->property & 0xFFFF).name()); @@ -321,9 +321,9 @@ void QV4Bindings::run(Binding *binding, QDeclarativePropertyPrivate::WriteFlags binding->updating = true; if (binding->property & 0xFFFF0000) { - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context->engine); - QDeclarativeValueType *vt = ep->valueTypes[(binding->property >> 16) & 0xFF]; + QQmlValueType *vt = ep->valueTypes[(binding->property >> 16) & 0xFF]; Q_ASSERT(vt); vt->read(binding->target, binding->property & 0xFFFF); @@ -344,7 +344,7 @@ void QV4Bindings::unsubscribe(int subIndex) sub->disconnect(); } -void QV4Bindings::subscribeId(QDeclarativeContextData *p, int idIndex, int subIndex) +void QV4Bindings::subscribeId(QQmlContextData *p, int idIndex, int subIndex) { unsubscribe(subIndex); @@ -416,7 +416,7 @@ inline static bool toBool(Register *reg, int type, bool *ok = 0) } } -inline static QUrl toUrl(Register *reg, int type, QDeclarativeContextData *context, bool *ok = 0) +inline static QUrl toUrl(Register *reg, int type, QQmlContextData *context, bool *ok = 0) { if (ok) *ok = true; @@ -463,8 +463,8 @@ static bool testCompareVariants(const QVariant &qtscriptRaw, const QVariant &v4) int type = qtscript.userType(); - if (type == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) { - return QDeclarativeMetaType::QQuickAnchorLineCompare(qtscript.constData(), v4.constData()); + if (type == QQmlMetaType::QQuickAnchorLineMetaTypeId()) { + return QQmlMetaType::QQuickAnchorLineCompare(qtscript.constData(), v4.constData()); } else if (type == QMetaType::Double) { double la = qvariant_cast(qtscript); @@ -497,10 +497,10 @@ QByteArray testResultToString(const QVariant &result, bool undefined) } static void testBindingResult(const QString &binding, int line, int column, - QDeclarativeContextData *context, QObject *scope, + QQmlContextData *context, QObject *scope, const Register &result, int resultType) { - QDeclarativeExpression expression(context->asQDeclarativeContext(), scope, binding); + QQmlExpression expression(context->asQQmlContext(), scope, binding); bool isUndefined = false; QVariant value = expression.evaluate(&isUndefined); @@ -543,8 +543,8 @@ static void testBindingResult(const QString &binding, int line, int column, v4value = result.getqreal(); break; default: - if (resultType == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) { - v4value = QVariant(QDeclarativeMetaType::QQuickAnchorLineMetaTypeId(), result.typeDataPtr()); + if (resultType == QQmlMetaType::QQuickAnchorLineMetaTypeId()) { + v4value = QVariant(QQmlMetaType::QQuickAnchorLineMetaTypeId(), result.typeDataPtr()); } else { iserror = true; v4Result = "Unknown V4 type"; @@ -567,9 +567,9 @@ static void testBindingResult(const QString &binding, int line, int column, } static void testBindingException(const QString &binding, int line, int column, - QDeclarativeContextData *context, QObject *scope) + QQmlContextData *context, QObject *scope) { - QDeclarativeExpression expression(context->asQDeclarativeContext(), scope, binding); + QQmlExpression expression(context->asQQmlContext(), scope, binding); bool isUndefined = false; QVariant value = expression.evaluate(&isUndefined); @@ -582,8 +582,8 @@ static void testBindingException(const QString &binding, int line, int column, } } -static void throwException(int id, QDeclarativeDelayedError *error, - QV4Program *program, QDeclarativeContextData *context, +static void throwException(int id, QQmlDelayedError *error, + QV4Program *program, QQmlContextData *context, const QString &description = QString()) { error->error.setUrl(context->url); @@ -599,8 +599,8 @@ static void throwException(int id, QDeclarativeDelayedError *error, error->error.setLine(-1); error->error.setColumn(-1); } - if (!context->engine || !error->addError(QDeclarativeEnginePrivate::get(context->engine))) - QDeclarativeEnginePrivate::warning(context->engine, error->error); + if (!context->engine || !error->addError(QQmlEnginePrivate::get(context->engine))) + QQmlEnginePrivate::warning(context->engine, error->error); } const qreal QV4Bindings::D32 = 4294967296.0; @@ -675,7 +675,7 @@ void **QV4Bindings::getDecodeInstrTable() QV4Bindings *dummy = new QV4Bindings(0, 0, 0); quint32 executedBlocks = 0; dummy->run(0, executedBlocks, 0, 0, 0, 0, - QDeclarativePropertyPrivate::BypassInterceptor, + QQmlPropertyPrivate::BypassInterceptor, &decode_instr); dummy->release(); } @@ -684,9 +684,9 @@ void **QV4Bindings::getDecodeInstrTable() #endif void QV4Bindings::run(int instrIndex, quint32 &executedBlocks, - QDeclarativeContextData *context, QDeclarativeDelayedError *error, + QQmlContextData *context, QQmlDelayedError *error, QObject *scope, QObject *output, - QDeclarativePropertyPrivate::WriteFlags storeFlags + QQmlPropertyPrivate::WriteFlags storeFlags #ifdef QML_THREADED_INTERPRETER ,void ***table #endif @@ -771,12 +771,12 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks, reg.init((Register::Type)instr->fetchAndSubscribe.valueType); if (instr->fetchAndSubscribe.valueType >= FirstCleanupType) MARK_REGISTER(instr->fetchAndSubscribe.reg); - QDeclarativeAccessors *accessors = instr->fetchAndSubscribe.property.accessors; + QQmlAccessors *accessors = instr->fetchAndSubscribe.property.accessors; accessors->read(object, instr->fetchAndSubscribe.property.accessorData, reg.typeDataPtr()); if (accessors->notifier) { - QDeclarativeNotifier *notifier = 0; + QQmlNotifier *notifier = 0; accessors->notifier(object, instr->fetchAndSubscribe.property.accessorData, ¬ifier); if (notifier) sub->connect(notifier); } else if (instr->fetchAndSubscribe.property.notifyIndex != -1) { diff --git a/src/declarative/qml/v4/qv4bindings_p.h b/src/qml/qml/v4/qv4bindings_p.h similarity index 72% rename from src/declarative/qml/v4/qv4bindings_p.h rename to src/qml/qml/v4/qv4bindings_p.h index 58dd4328af..61d29a6f57 100644 --- a/src/declarative/qml/v4/qv4bindings_p.h +++ b/src/qml/qml/v4/qv4bindings_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -53,8 +53,8 @@ // We mean it. // -#include "private/qdeclarativeexpression_p.h" -#include "private/qdeclarativebinding_p.h" +#include "private/qqmlexpression_p.h" +#include "private/qqmlbinding_p.h" #include "private/qv4instruction_p.h" QT_BEGIN_HEADER @@ -62,16 +62,16 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE struct QV4Program; -class QV4Bindings : public QDeclarativeAbstractExpression, - public QDeclarativeRefCount +class QV4Bindings : public QQmlAbstractExpression, + public QQmlRefCount { Q_DECLARE_TR_FUNCTIONS(QV4Bindings) public: - QV4Bindings(const char *program, QDeclarativeContextData *context, - QDeclarativeRefCount *); + QV4Bindings(const char *program, QQmlContextData *context, + QQmlRefCount *); virtual ~QV4Bindings(); - QDeclarativeAbstractBinding *configBinding(int index, QObject *target, + QQmlAbstractBinding *configBinding(int index, QObject *target, QObject *scope, int property, int line, int column); @@ -82,13 +82,13 @@ class QV4Bindings : public QDeclarativeAbstractExpression, private: Q_DISABLE_COPY(QV4Bindings) - struct Binding : public QDeclarativeAbstractBinding, public QDeclarativeDelayedError { + struct Binding : public QQmlAbstractBinding, public QQmlDelayedError { Binding() : enabled(false), updating(0), property(0), scope(0), target(0), executedBlocks(0), parent(0) {} - // Inherited from QDeclarativeAbstractBinding - virtual void setEnabled(bool, QDeclarativePropertyPrivate::WriteFlags flags); - virtual void update(QDeclarativePropertyPrivate::WriteFlags flags); + // Inherited from QQmlAbstractBinding + virtual void setEnabled(bool, QQmlPropertyPrivate::WriteFlags flags); + virtual void update(QQmlPropertyPrivate::WriteFlags flags); virtual void destroy(); virtual int propertyIndex() const; virtual QObject *object() const; @@ -106,11 +106,11 @@ class QV4Bindings : public QDeclarativeAbstractExpression, QV4Bindings *parent; }; - class Subscription : public QDeclarativeNotifierEndpoint + class Subscription : public QQmlNotifierEndpoint { public: Subscription() : bindings(0), method(-1) { callback = &subscriptionCallback; } - static void subscriptionCallback(QDeclarativeNotifierEndpoint *e); + static void subscriptionCallback(QQmlNotifierEndpoint *e); QV4Bindings *bindings; int method; }; @@ -119,16 +119,16 @@ class QV4Bindings : public QDeclarativeAbstractExpression, Subscription *subscriptions; void subscriptionNotify(int); - void run(Binding *, QDeclarativePropertyPrivate::WriteFlags flags); + void run(Binding *, QQmlPropertyPrivate::WriteFlags flags); QV4Program *program; - QDeclarativeRefCount *dataRef; + QQmlRefCount *dataRef; Binding *bindings; void init(); - void run(int instr, quint32 &executedBlocks, QDeclarativeContextData *context, - QDeclarativeDelayedError *error, QObject *scope, QObject *output, - QDeclarativePropertyPrivate::WriteFlags storeFlags + void run(int instr, quint32 &executedBlocks, QQmlContextData *context, + QQmlDelayedError *error, QObject *scope, QObject *output, + QQmlPropertyPrivate::WriteFlags storeFlags #ifdef QML_THREADED_INTERPRETER , void ***decode_instr = 0 #endif @@ -136,7 +136,7 @@ class QV4Bindings : public QDeclarativeAbstractExpression, inline void unsubscribe(int subIndex); - inline void subscribeId(QDeclarativeContextData *p, int idIndex, int subIndex); + inline void subscribeId(QQmlContextData *p, int idIndex, int subIndex); inline void subscribe(QObject *o, int notifyIndex, int subIndex); inline static qint32 toInt32(qreal n); diff --git a/src/declarative/qml/v4/qv4compiler.cpp b/src/qml/qml/v4/qv4compiler.cpp similarity index 96% rename from src/declarative/qml/v4/qv4compiler.cpp rename to src/qml/qml/v4/qv4compiler.cpp index 42e56d12c9..d61fd580c7 100644 --- a/src/declarative/qml/v4/qv4compiler.cpp +++ b/src/qml/qml/v4/qv4compiler.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,9 +45,10 @@ #include "qv4ir_p.h" #include "qv4irbuilder_p.h" -#include -#include -#include +#include +#include +#include +#include QT_BEGIN_NAMESPACE @@ -60,7 +61,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlBindingsTestEnv, QML_BINDINGS_TEST) static bool qmlBindingsTest = false; static bool qmlEnableV4 = true; -using namespace QDeclarativeJS; +using namespace QQmlJS; QV4CompilerPrivate::QV4CompilerPrivate() : _function(0) , _block(0) , _discarded(false) { @@ -321,11 +322,11 @@ void QV4CompilerPrivate::visitName(IR::Name *e) if (e->property->coreIndex == -1) { QMetaProperty prop; - e->property->load(prop, QDeclarativeEnginePrivate::get(engine)); + e->property->load(prop, QQmlEnginePrivate::get(engine)); } const int propTy = e->property->propType; - QDeclarativeRegisterType regType; + QQmlRegisterType regType; switch (propTy) { case QMetaType::QReal: @@ -345,9 +346,9 @@ void QV4CompilerPrivate::visitName(IR::Name *e) break; default: - if (propTy == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) { + if (propTy == QQmlMetaType::QQuickAnchorLineMetaTypeId()) { regType = PODValueType; - } else if (QDeclarativeMetaType::isQObject(propTy)) { + } else if (QQmlMetaType::isQObject(propTy)) { regType = QObjectStarType; } else { if (qmlVerboseCompiler()) @@ -989,7 +990,7 @@ void QV4CompilerPrivate::visitRet(IR::Ret *s) test.regType = QMetaType::QUrl; break; case IR::SGAnchorLineType: - test.regType = QDeclarativeMetaType::QQuickAnchorLineMetaTypeId(); + test.regType = QQmlMetaType::QQuickAnchorLineMetaTypeId(); break; case IR::ObjectType: test.regType = QMetaType::QObjectStar; @@ -1070,7 +1071,7 @@ int QV4CompilerPrivate::commitCompile() return rv; } -bool QV4CompilerPrivate::compile(QDeclarativeJS::AST::Node *node) +bool QV4CompilerPrivate::compile(QQmlJS::AST::Node *node) { resetInstanceState(); @@ -1229,11 +1230,11 @@ quint8 QV4CompilerPrivate::exceptionId(quint32 line, quint32 column) return rv; } -quint8 QV4CompilerPrivate::exceptionId(QDeclarativeJS::AST::ExpressionNode *n) +quint8 QV4CompilerPrivate::exceptionId(QQmlJS::AST::ExpressionNode *n) { quint8 rv = 0xFF; if (n && exceptions.count() < 0xFF) { - QDeclarativeJS::AST::SourceLocation l = n->firstSourceLocation(); + QQmlJS::AST::SourceLocation l = n->firstSourceLocation(); rv = exceptionId(l.startLine, l.startColumn); } return rv; @@ -1261,7 +1262,7 @@ bool QV4Compiler::isValid() const /* -1 on failure, otherwise the binding index to use. */ -int QV4Compiler::compile(const Expression &expression, QDeclarativeEnginePrivate *engine) +int QV4Compiler::compile(const Expression &expression, QQmlEnginePrivate *engine) { if (!expression.expression.asAST()) return false; @@ -1286,8 +1287,8 @@ QByteArray QV4CompilerPrivate::buildSignalTable() const QHash > > table; for (int ii = 0; ii < committed.count(); ++ii) { - const QDeclarativeAssociationList &deps = committed.dependencies.at(ii); - for (QDeclarativeAssociationList::const_iterator iter = deps.begin(); iter != deps.end(); ++iter) + const QQmlAssociationList &deps = committed.dependencies.at(ii); + for (QQmlAssociationList::const_iterator iter = deps.begin(); iter != deps.end(); ++iter) table[iter->first].append(qMakePair(ii, iter->second)); } @@ -1370,7 +1371,7 @@ QByteArray QV4Compiler::program() const if (bindingsDump()) { qWarning().nospace() << "Subscription slots:"; - for (QDeclarativeAssociationList::ConstIterator iter = d->committed.subscriptionIds.begin(); + for (QQmlAssociationList::ConstIterator iter = d->committed.subscriptionIds.begin(); iter != d->committed.subscriptionIds.end(); ++iter) { qWarning().nospace() << " " << iter->first << "\t-> " << iter->second; diff --git a/src/declarative/qml/v4/qv4compiler_p.h b/src/qml/qml/v4/qv4compiler_p.h similarity index 78% rename from src/declarative/qml/v4/qv4compiler_p.h rename to src/qml/qml/v4/qv4compiler_p.h index 99d5569b6a..a93248ad14 100644 --- a/src/declarative/qml/v4/qv4compiler_p.h +++ b/src/qml/qml/v4/qv4compiler_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -53,15 +53,15 @@ // We mean it. // -#include -#include -#include +#include +#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeTypeNameCache; +class QQmlTypeNameCache; class QV4CompilerPrivate; class Q_AUTOTEST_EXPORT QV4Compiler { @@ -74,18 +74,18 @@ class Q_AUTOTEST_EXPORT QV4Compiler struct Expression { - Expression(const QDeclarativeImports &imp) : imports(imp) {} - QDeclarativeScript::Object *component; - QDeclarativeScript::Object *context; - QDeclarativeScript::Property *property; - QDeclarativeScript::Variant expression; - QDeclarativeCompilerTypes::IdList *ids; - QDeclarativeTypeNameCache *importCache; - QDeclarativeImports imports; + Expression(const QQmlImports &imp) : imports(imp) {} + QQmlScript::Object *component; + QQmlScript::Object *context; + QQmlScript::Property *property; + QQmlScript::Variant expression; + QQmlCompilerTypes::IdList *ids; + QQmlTypeNameCache *importCache; + QQmlImports imports; }; // -1 on failure, otherwise the binding index to use - int compile(const Expression &, QDeclarativeEnginePrivate *); + int compile(const Expression &, QQmlEnginePrivate *); // Returns the compiled program QByteArray program() const; diff --git a/src/declarative/qml/v4/qv4compiler_p_p.h b/src/qml/qml/v4/qv4compiler_p_p.h similarity index 65% rename from src/declarative/qml/v4/qv4compiler_p_p.h rename to src/qml/qml/v4/qv4compiler_p_p.h index 85a7c36f87..4b74a1d1c5 100644 --- a/src/declarative/qml/v4/qv4compiler_p_p.h +++ b/src/qml/qml/v4/qv4compiler_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -55,16 +55,16 @@ #include "qv4instruction_p.h" #include "qv4ir_p.h" -#include -#include -#include +#include +#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE template -class QDeclarativeAssociationList +class QQmlAssociationList { public: typedef QVarLengthArray, 8> Container; @@ -111,8 +111,8 @@ class QDeclarativeAssociationList Container _container; }; -class QV4CompilerPrivate: protected QDeclarativeJS::IR::ExprVisitor, - protected QDeclarativeJS::IR::StmtVisitor +class QV4CompilerPrivate: protected QQmlJS::IR::ExprVisitor, + protected QQmlJS::IR::StmtVisitor { public: QV4CompilerPrivate(); @@ -121,15 +121,15 @@ class QV4CompilerPrivate: protected QDeclarativeJS::IR::ExprVisitor, int commitCompile(); const QV4Compiler::Expression *expression; - QDeclarativeEnginePrivate *engine; + QQmlEnginePrivate *engine; QString contextName() const { return QLatin1String("$$$SCOPE_") + QString::number((quintptr)expression->context, 16); } - bool compile(QDeclarativeJS::AST::Node *); + bool compile(QQmlJS::AST::Node *); int registerLiteralString(quint8 reg, const QStringRef &); int registerString(const QString &); - QDeclarativeAssociationList > registeredStrings; + QQmlAssociationList > registeredStrings; QByteArray data; bool blockNeedsSubscription(const QStringList &); @@ -137,36 +137,36 @@ class QV4CompilerPrivate: protected QDeclarativeJS::IR::ExprVisitor, quint32 subscriptionBlockMask(const QStringList &); quint8 exceptionId(quint32 line, quint32 column); - quint8 exceptionId(QDeclarativeJS::AST::ExpressionNode *); + quint8 exceptionId(QQmlJS::AST::ExpressionNode *); QVector exceptions; - QDeclarativeAssociationList usedSubscriptionIds; + QQmlAssociationList usedSubscriptionIds; - QDeclarativeAssociationList subscriptionIds; - QDeclarativeJS::Bytecode bytecode; + QQmlAssociationList subscriptionIds; + QQmlJS::Bytecode bytecode; // back patching struct Patch { - QDeclarativeJS::IR::BasicBlock *block; // the basic block + QQmlJS::IR::BasicBlock *block; // the basic block int offset; // the index of the instruction to patch - Patch(QDeclarativeJS::IR::BasicBlock *block = 0, int index = -1) + Patch(QQmlJS::IR::BasicBlock *block = 0, int index = -1) : block(block), offset(index) {} }; QVector patches; - QDeclarativePool pool; + QQmlPool pool; // Committed binding data struct { QList offsets; - QList > dependencies; + QList > dependencies; - //QDeclarativeJS::Bytecode bytecode; + //QQmlJS::Bytecode bytecode; QByteArray bytecode; QByteArray data; - QDeclarativeAssociationList subscriptionIds; + QQmlAssociationList subscriptionIds; QVector exceptions; - QDeclarativeAssociationList > registeredStrings; + QQmlAssociationList > registeredStrings; int count() const { return offsets.count(); } } committed; @@ -174,13 +174,13 @@ class QV4CompilerPrivate: protected QDeclarativeJS::IR::ExprVisitor, QByteArray buildSignalTable() const; QByteArray buildExceptionData() const; - void convertToReal(QDeclarativeJS::IR::Expr *expr, int reg); - void convertToInt(QDeclarativeJS::IR::Expr *expr, int reg); - void convertToBool(QDeclarativeJS::IR::Expr *expr, int reg); - quint8 instructionOpcode(QDeclarativeJS::IR::Binop *e); + void convertToReal(QQmlJS::IR::Expr *expr, int reg); + void convertToInt(QQmlJS::IR::Expr *expr, int reg); + void convertToBool(QQmlJS::IR::Expr *expr, int reg); + quint8 instructionOpcode(QQmlJS::IR::Binop *e); struct Instr { -#define QML_V4_INSTR_DATA_TYPEDEF(I, FMT) typedef QDeclarativeJS::V4InstrData I; +#define QML_V4_INSTR_DATA_TYPEDEF(I, FMT) typedef QQmlJS::V4InstrData I; FOR_EACH_V4_INSTR(QML_V4_INSTR_DATA_TYPEDEF) #undef QML_v4_INSTR_DATA_TYPEDEF private: @@ -192,42 +192,42 @@ class QV4CompilerPrivate: protected QDeclarativeJS::IR::ExprVisitor, // tracing // void trace(int line, int column); - void trace(QVector *blocks); - void traceExpression(QDeclarativeJS::IR::Expr *e, quint8 r); + void trace(QVector *blocks); + void traceExpression(QQmlJS::IR::Expr *e, quint8 r); template - inline void gen(const QDeclarativeJS::V4InstrData &i) + inline void gen(const QQmlJS::V4InstrData &i) { bytecode.append(i); } - inline void gen(QDeclarativeJS::V4Instr::Type type, QDeclarativeJS::V4Instr &instr) + inline void gen(QQmlJS::V4Instr::Type type, QQmlJS::V4Instr &instr) { bytecode.append(type, instr); } - inline QDeclarativeJS::V4Instr::Type instructionType(const QDeclarativeJS::V4Instr *i) const + inline QQmlJS::V4Instr::Type instructionType(const QQmlJS::V4Instr *i) const { return bytecode.instructionType(i); } // // expressions // - virtual void visitConst(QDeclarativeJS::IR::Const *e); - virtual void visitString(QDeclarativeJS::IR::String *e); - virtual void visitName(QDeclarativeJS::IR::Name *e); - virtual void visitTemp(QDeclarativeJS::IR::Temp *e); - virtual void visitUnop(QDeclarativeJS::IR::Unop *e); - virtual void visitBinop(QDeclarativeJS::IR::Binop *e); - virtual void visitCall(QDeclarativeJS::IR::Call *e); + virtual void visitConst(QQmlJS::IR::Const *e); + virtual void visitString(QQmlJS::IR::String *e); + virtual void visitName(QQmlJS::IR::Name *e); + virtual void visitTemp(QQmlJS::IR::Temp *e); + virtual void visitUnop(QQmlJS::IR::Unop *e); + virtual void visitBinop(QQmlJS::IR::Binop *e); + virtual void visitCall(QQmlJS::IR::Call *e); // // statements // - virtual void visitExp(QDeclarativeJS::IR::Exp *s); - virtual void visitMove(QDeclarativeJS::IR::Move *s); - virtual void visitJump(QDeclarativeJS::IR::Jump *s); - virtual void visitCJump(QDeclarativeJS::IR::CJump *s); - virtual void visitRet(QDeclarativeJS::IR::Ret *s); + virtual void visitExp(QQmlJS::IR::Exp *s); + virtual void visitMove(QQmlJS::IR::Move *s); + virtual void visitJump(QQmlJS::IR::Jump *s); + virtual void visitCJump(QQmlJS::IR::CJump *s); + virtual void visitRet(QQmlJS::IR::Ret *s); private: QStringList _subscribeName; - QDeclarativeJS::IR::Function *_function; - QDeclarativeJS::IR::BasicBlock *_block; + QQmlJS::IR::Function *_function; + QQmlJS::IR::BasicBlock *_block; void discard() { _discarded = true; } bool _discarded; quint8 currentReg; diff --git a/src/declarative/qml/v4/qv4instruction.cpp b/src/qml/qml/v4/qv4instruction.cpp similarity index 99% rename from src/declarative/qml/v4/qv4instruction.cpp rename to src/qml/qml/v4/qv4instruction.cpp index d470b5b841..08b2570747 100644 --- a/src/declarative/qml/v4/qv4instruction.cpp +++ b/src/qml/qml/v4/qv4instruction.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,7 +43,7 @@ #include "qv4bindings_p.h" #include -#include +#include // Define this to do a test dump of all the instructions at startup. This is // helpful to test that each instruction's Instr::dump() case uses the correct @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE -namespace QDeclarativeJS { +namespace QQmlJS { #ifdef DEBUG_INSTR_DUMP static struct DumpInstrAtStartup { diff --git a/src/declarative/qml/v4/qv4instruction_p.h b/src/qml/qml/v4/qv4instruction_p.h similarity index 98% rename from src/declarative/qml/v4/qv4instruction_p.h rename to src/qml/qml/v4/qv4instruction_p.h index 477a085dd7..8150eedf54 100644 --- a/src/declarative/qml/v4/qv4instruction_p.h +++ b/src/qml/qml/v4/qv4instruction_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -58,7 +58,7 @@ #include #include -#include +#include QT_BEGIN_HEADER @@ -173,9 +173,9 @@ QT_BEGIN_NAMESPACE #endif class QObject; -class QDeclarativeNotifier; +class QQmlNotifier; -namespace QDeclarativeJS { +namespace QQmlJS { union V4Instr { enum Type { @@ -241,7 +241,7 @@ union V4Instr { quint8 exceptionId; quint8 valueType; quint16 subscription; - QDeclarativePropertyRawData property; + QQmlPropertyRawData property; }; struct instr_fetch{ diff --git a/src/declarative/qml/v4/qv4ir.cpp b/src/qml/qml/v4/qv4ir.cpp similarity index 93% rename from src/declarative/qml/v4/qv4ir.cpp rename to src/qml/qml/v4/qv4ir.cpp index 149479d757..be822145a4 100644 --- a/src/declarative/qml/v4/qv4ir.cpp +++ b/src/qml/qml/v4/qv4ir.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE -namespace QDeclarativeJS { +namespace QQmlJS { namespace IR { inline const char *typeName(Type t) @@ -480,7 +480,7 @@ Name *BasicBlock::NAME(Name *base, const QString &id, quint32 line, quint32 colu return e; } -Name *BasicBlock::SYMBOL(Type type, const QString &id, const QMetaObject *meta, QDeclarativePropertyData *property, Name::Storage storage, +Name *BasicBlock::SYMBOL(Type type, const QString &id, const QMetaObject *meta, QQmlPropertyData *property, Name::Storage storage, quint32 line, quint32 column) { Name *name = SYMBOL(/*base = */ 0, type, id, meta, property, line, column); @@ -488,7 +488,7 @@ Name *BasicBlock::SYMBOL(Type type, const QString &id, const QMetaObject *meta, return name; } -Name *BasicBlock::SYMBOL(Name *base, Type type, const QString &id, const QMetaObject *meta, QDeclarativePropertyData *property, Name::Storage storage, +Name *BasicBlock::SYMBOL(Name *base, Type type, const QString &id, const QMetaObject *meta, QQmlPropertyData *property, Name::Storage storage, quint32 line, quint32 column) { Name *name = function->pool->New(); @@ -500,7 +500,7 @@ Name *BasicBlock::SYMBOL(Name *base, Type type, const QString &id, const QMetaOb return name; } -Name *BasicBlock::SYMBOL(Name *base, Type type, const QString &id, const QMetaObject *meta, QDeclarativePropertyData *property, +Name *BasicBlock::SYMBOL(Name *base, Type type, const QString &id, const QMetaObject *meta, QQmlPropertyData *property, quint32 line, quint32 column) { Name *name = function->pool->New(); @@ -511,7 +511,7 @@ Name *BasicBlock::SYMBOL(Name *base, Type type, const QString &id, const QMetaOb return name; } -Name *BasicBlock::ID_OBJECT(const QString &id, const QDeclarativeScript::Object *object, quint32 line, quint32 column) +Name *BasicBlock::ID_OBJECT(const QString &id, const QQmlScript::Object *object, quint32 line, quint32 column) { Name *name = function->pool->New(); name->init(/*base = */ 0, IR::ObjectType, @@ -523,7 +523,7 @@ Name *BasicBlock::ID_OBJECT(const QString &id, const QDeclarativeScript::Object return name; } -Name *BasicBlock::ATTACH_TYPE(const QString &id, const QDeclarativeType *attachType, Name::Storage storage, +Name *BasicBlock::ATTACH_TYPE(const QString &id, const QQmlType *attachType, Name::Storage storage, quint32 line, quint32 column) { Name *name = function->pool->New(); @@ -713,7 +713,7 @@ void IRDump::dec() void IRDump::dec(); -void IRDump::expression(QDeclarativeJS::IR::Expr *e) +void IRDump::expression(QQmlJS::IR::Expr *e) { inc(); @@ -722,7 +722,7 @@ void IRDump::expression(QDeclarativeJS::IR::Expr *e) dec(); } -void IRDump::basicblock(QDeclarativeJS::IR::BasicBlock *b) +void IRDump::basicblock(QQmlJS::IR::BasicBlock *b) { inc(); @@ -737,7 +737,7 @@ void IRDump::basicblock(QDeclarativeJS::IR::BasicBlock *b) dec(); } -void IRDump::statement(QDeclarativeJS::IR::Stmt *s) +void IRDump::statement(QQmlJS::IR::Stmt *s) { inc(); @@ -746,7 +746,7 @@ void IRDump::statement(QDeclarativeJS::IR::Stmt *s) dec(); } -void IRDump::function(QDeclarativeJS::IR::Function *f) +void IRDump::function(QQmlJS::IR::Function *f) { inc(); @@ -764,35 +764,35 @@ const char *IRDump::indent() return indentData.constData(); } -void IRDump::visitConst(QDeclarativeJS::IR::Const *e) +void IRDump::visitConst(QQmlJS::IR::Const *e) { qWarning().nospace() << indent() << "Const:Expr { type: " << typeName(e->type) << ", value: " << e->value << "}"; } -void IRDump::visitString(QDeclarativeJS::IR::String *e) +void IRDump::visitString(QQmlJS::IR::String *e) { qWarning().nospace() << indent() << "String:Expr { type: " << typeName(e->type) << ", value: " << e->value << "}"; } -static void namedumprecur(QDeclarativeJS::IR::Name *e, const char *indent) +static void namedumprecur(QQmlJS::IR::Name *e, const char *indent) { if (e->base) namedumprecur(e->base, indent); qWarning().nospace() << indent << " { type: " << typeName(e->type) << ", symbol: " << symbolname(e->symbol) << ", storage: " << storagename(e->storage) << ", id: " << e->id << "}"; } -void IRDump::visitName(QDeclarativeJS::IR::Name *e) +void IRDump::visitName(QQmlJS::IR::Name *e) { qWarning().nospace() << indent() << "Name:Expr {"; namedumprecur(e, indent()); qWarning().nospace() << indent() << "}"; } -void IRDump::visitTemp(QDeclarativeJS::IR::Temp *e) +void IRDump::visitTemp(QQmlJS::IR::Temp *e) { qWarning().nospace() << indent() << "Temp:Expr { type: " << typeName(e->type) << ", index: " << e->index << " }"; } -void IRDump::visitUnop(QDeclarativeJS::IR::Unop *e) +void IRDump::visitUnop(QQmlJS::IR::Unop *e) { qWarning().nospace() << indent() << "Unop:Expr { "; qWarning().nospace() << indent() << " type: " << typeName(e->type) << ", op: " << opname(e->op); @@ -802,7 +802,7 @@ void IRDump::visitUnop(QDeclarativeJS::IR::Unop *e) qWarning().nospace() << indent() << "}"; } -void IRDump::visitBinop(QDeclarativeJS::IR::Binop *e) +void IRDump::visitBinop(QQmlJS::IR::Binop *e) { qWarning().nospace() << indent() << "Binop:Expr { "; qWarning().nospace() << indent() << " type: " << typeName(e->type) << ", op: " << opname(e->op); @@ -819,20 +819,20 @@ void IRDump::visitBinop(QDeclarativeJS::IR::Binop *e) qWarning().nospace() << indent() << "}"; } -void IRDump::visitCall(QDeclarativeJS::IR::Call *e) +void IRDump::visitCall(QQmlJS::IR::Call *e) { Q_UNUSED(e); qWarning().nospace() << indent() << "Exp::Call { }"; } -void IRDump::visitExp(QDeclarativeJS::IR::Exp *s) +void IRDump::visitExp(QQmlJS::IR::Exp *s) { qWarning().nospace() << indent() << "Exp:Stmt {"; expression(s->expr); qWarning().nospace() << indent() << "}"; } -void IRDump::visitMove(QDeclarativeJS::IR::Move *s) +void IRDump::visitMove(QQmlJS::IR::Move *s) { qWarning().nospace() << indent() << "Move:Stmt {"; qWarning().nospace() << indent() << " isMoveForReturn: " << s->isMoveForReturn; @@ -849,12 +849,12 @@ void IRDump::visitMove(QDeclarativeJS::IR::Move *s) qWarning().nospace() << indent() << "}"; } -void IRDump::visitJump(QDeclarativeJS::IR::Jump *s) +void IRDump::visitJump(QQmlJS::IR::Jump *s) { qWarning().nospace() << indent() << "Jump:Stmt { BasicBlock(" << s->target << ") }"; } -void IRDump::visitCJump(QDeclarativeJS::IR::CJump *s) +void IRDump::visitCJump(QQmlJS::IR::CJump *s) { qWarning().nospace() << indent() << "CJump:Stmt {"; qWarning().nospace() << indent() << " cond: {"; @@ -867,7 +867,7 @@ void IRDump::visitCJump(QDeclarativeJS::IR::CJump *s) qWarning().nospace() << indent() << "}"; } -void IRDump::visitRet(QDeclarativeJS::IR::Ret *s) +void IRDump::visitRet(QQmlJS::IR::Ret *s) { qWarning().nospace() << indent() << "Ret:Stmt {"; qWarning().nospace() << indent() << " type: " << typeName(s->type); @@ -877,6 +877,6 @@ void IRDump::visitRet(QDeclarativeJS::IR::Ret *s) #endif } // end of namespace IR -} // end of namespace QDeclarativeJS +} // end of namespace QQmlJS QT_END_NAMESPACE diff --git a/src/declarative/qml/v4/qv4ir_p.h b/src/qml/qml/v4/qv4ir_p.h similarity index 85% rename from src/declarative/qml/v4/qv4ir_p.h rename to src/qml/qml/v4/qv4ir_p.h index 746995e5be..48a08adf9f 100644 --- a/src/declarative/qml/v4/qv4ir_p.h +++ b/src/qml/qml/v4/qv4ir_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -53,14 +53,14 @@ // We mean it. // -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include +#include #include // #define DEBUG_IR_STRUCTURE @@ -70,9 +70,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE class QTextStream; -class QDeclarativeType; +class QQmlType; -namespace QDeclarativeJS { +namespace QQmlJS { namespace IR { @@ -174,7 +174,7 @@ struct StmtVisitor { virtual void visitRet(Ret *) {} }; -struct Expr: QDeclarativePool::POD { +struct Expr: QQmlPool::POD { Type type; Expr(): type(InvalidType) {} @@ -190,7 +190,7 @@ struct Expr: QDeclarativePool::POD { virtual void dump(QTextStream &out) = 0; }; -struct ExprList: QDeclarativePool::POD { +struct ExprList: QQmlPool::POD { Expr *expr; ExprList *next; @@ -265,10 +265,10 @@ struct Name: Expr { union { void *ptr; const QMetaObject *meta; - const QDeclarativeType *declarativeType; - const QDeclarativeScript::Object *idObject; + const QQmlType *declarativeType; + const QQmlScript::Object *idObject; }; - QDeclarativePropertyData *property; + QQmlPropertyData *property; Storage storage; BuiltinSymbol builtin; quint32 line; @@ -368,7 +368,7 @@ struct Call: Expr { static Type typeForFunction(Expr *base); }; -struct Stmt: QDeclarativePool::POD { +struct Stmt: QQmlPool::POD { enum Mode { HIR, MIR @@ -477,11 +477,11 @@ struct Ret: Stmt { }; struct Function { - QDeclarativePool *pool; + QQmlPool *pool; QVarLengthArray basicBlocks; int tempCount; - Function(QDeclarativePool *pool) + Function(QQmlPool *pool) : pool(pool), tempCount(0) {} ~Function(); @@ -530,11 +530,11 @@ struct BasicBlock { Name *NAME(const QString &id, quint32 line, quint32 column); Name *NAME(Name *base, const QString &id, quint32 line, quint32 column); - Name *SYMBOL(Type type, const QString &id, const QMetaObject *meta, QDeclarativePropertyData *property, Name::Storage storage, quint32 line, quint32 column); - Name *SYMBOL(Name *base, Type type, const QString &id, const QMetaObject *meta, QDeclarativePropertyData *property, quint32 line, quint32 column); - Name *SYMBOL(Name *base, Type type, const QString &id, const QMetaObject *meta, QDeclarativePropertyData *property, Name::Storage storage, quint32 line, quint32 column); - Name *ID_OBJECT(const QString &id, const QDeclarativeScript::Object *object, quint32 line, quint32 column); - Name *ATTACH_TYPE(const QString &id, const QDeclarativeType *attachType, Name::Storage storage, quint32 line, quint32 column); + Name *SYMBOL(Type type, const QString &id, const QMetaObject *meta, QQmlPropertyData *property, Name::Storage storage, quint32 line, quint32 column); + Name *SYMBOL(Name *base, Type type, const QString &id, const QMetaObject *meta, QQmlPropertyData *property, quint32 line, quint32 column); + Name *SYMBOL(Name *base, Type type, const QString &id, const QMetaObject *meta, QQmlPropertyData *property, Name::Storage storage, quint32 line, quint32 column); + Name *ID_OBJECT(const QString &id, const QQmlScript::Object *object, quint32 line, quint32 column); + Name *ATTACH_TYPE(const QString &id, const QQmlType *attachType, Name::Storage storage, quint32 line, quint32 column); Expr *UNOP(AluOp op, Expr *expr); Expr *BINOP(AluOp op, Expr *left, Expr *right); @@ -557,10 +557,10 @@ struct IRDump : public ExprVisitor, public: IRDump(); - void expression(QDeclarativeJS::IR::Expr *); - void basicblock(QDeclarativeJS::IR::BasicBlock *); - void statement(QDeclarativeJS::IR::Stmt *); - void function(QDeclarativeJS::IR::Function *); + void expression(QQmlJS::IR::Expr *); + void basicblock(QQmlJS::IR::BasicBlock *); + void statement(QQmlJS::IR::Stmt *); + void function(QQmlJS::IR::Function *); protected: const char *indent(); @@ -568,22 +568,22 @@ struct IRDump : public ExprVisitor, // // expressions // - virtual void visitConst(QDeclarativeJS::IR::Const *e); - virtual void visitString(QDeclarativeJS::IR::String *e); - virtual void visitName(QDeclarativeJS::IR::Name *e); - virtual void visitTemp(QDeclarativeJS::IR::Temp *e); - virtual void visitUnop(QDeclarativeJS::IR::Unop *e); - virtual void visitBinop(QDeclarativeJS::IR::Binop *e); - virtual void visitCall(QDeclarativeJS::IR::Call *e); + virtual void visitConst(QQmlJS::IR::Const *e); + virtual void visitString(QQmlJS::IR::String *e); + virtual void visitName(QQmlJS::IR::Name *e); + virtual void visitTemp(QQmlJS::IR::Temp *e); + virtual void visitUnop(QQmlJS::IR::Unop *e); + virtual void visitBinop(QQmlJS::IR::Binop *e); + virtual void visitCall(QQmlJS::IR::Call *e); // // statements // - virtual void visitExp(QDeclarativeJS::IR::Exp *s); - virtual void visitMove(QDeclarativeJS::IR::Move *s); - virtual void visitJump(QDeclarativeJS::IR::Jump *s); - virtual void visitCJump(QDeclarativeJS::IR::CJump *s); - virtual void visitRet(QDeclarativeJS::IR::Ret *s); + virtual void visitExp(QQmlJS::IR::Exp *s); + virtual void visitMove(QQmlJS::IR::Move *s); + virtual void visitJump(QQmlJS::IR::Jump *s); + virtual void visitCJump(QQmlJS::IR::CJump *s); + virtual void visitRet(QQmlJS::IR::Ret *s); private: int indentSize; @@ -595,7 +595,7 @@ struct IRDump : public ExprVisitor, } // end of namespace IR -} // end of namespace QDeclarativeJS +} // end of namespace QQmlJS QT_END_NAMESPACE diff --git a/src/declarative/qml/v4/qv4irbuilder.cpp b/src/qml/qml/v4/qv4irbuilder.cpp similarity index 95% rename from src/declarative/qml/v4/qv4irbuilder.cpp rename to src/qml/qml/v4/qv4irbuilder.cpp index 604eeaa713..1956be8e72 100644 --- a/src/declarative/qml/v4/qv4irbuilder.cpp +++ b/src/qml/qml/v4/qv4irbuilder.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,16 +42,17 @@ #include "qv4irbuilder_p.h" #include "qv4compiler_p_p.h" -#include -#include +#include +#include +#include DEFINE_BOOL_CONFIG_OPTION(qmlVerboseCompiler, QML_VERBOSE_COMPILER) QT_BEGIN_NAMESPACE -using namespace QDeclarativeJS; +using namespace QQmlJS; -static IR::Type irTypeFromVariantType(int t, QDeclarativeEnginePrivate *engine, const QMetaObject * /* meta */) +static IR::Type irTypeFromVariantType(int t, QQmlEnginePrivate *engine, const QMetaObject * /* meta */) { switch (t) { case QMetaType::Bool: @@ -70,7 +71,7 @@ static IR::Type irTypeFromVariantType(int t, QDeclarativeEnginePrivate *engine, return IR::UrlType; default: - if (t == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) { + if (t == QQmlMetaType::QQuickAnchorLineMetaTypeId()) { return IR::SGAnchorLineType; } else if (engine->metaObjectForType(t)) { return IR::ObjectType; @@ -81,13 +82,13 @@ static IR::Type irTypeFromVariantType(int t, QDeclarativeEnginePrivate *engine, } QV4IRBuilder::QV4IRBuilder(const QV4Compiler::Expression *expr, - QDeclarativeEnginePrivate *engine) + QQmlEnginePrivate *engine) : m_expression(expr), m_engine(engine), _function(0), _block(0), _discard(false) { } -bool QV4IRBuilder::operator()(QDeclarativeJS::IR::Function *function, - QDeclarativeJS::AST::Node *ast) +bool QV4IRBuilder::operator()(QQmlJS::IR::Function *function, + QQmlJS::AST::Node *ast) { bool discarded = false; @@ -413,14 +414,14 @@ bool QV4IRBuilder::visit(AST::IdentifierExpression *ast) } else if (m_engine->v8engine()->illegalNames().contains(name) ) { if (qmlVerboseCompiler()) qWarning() << "*** illegal symbol:" << name; return false; - } else if (const QDeclarativeScript::Object *obj = m_expression->ids->value(name)) { + } else if (const QQmlScript::Object *obj = m_expression->ids->value(name)) { IR::Name *code = _block->ID_OBJECT(name, obj, line, column); if (obj == m_expression->component) code->storage = IR::Name::RootStorage; _expr.code = code; } else { - QDeclarativeTypeNameCache::Result r = m_expression->importCache->query(name); + QQmlTypeNameCache::Result r = m_expression->importCache->query(name); if (r.isValid()) { if (r.type) { _expr.code = _block->ATTACH_TYPE(name, r.type, IR::Name::ScopeStorage, line, column); @@ -431,11 +432,11 @@ bool QV4IRBuilder::visit(AST::IdentifierExpression *ast) if (m_expression->context != m_expression->component) { // RootStorage is more efficient than ScopeStorage, so prefer that if they are the same - QDeclarativePropertyCache *cache = m_expression->context->synthCache; + QQmlPropertyCache *cache = m_expression->context->synthCache; const QMetaObject *metaObject = m_expression->context->metaObject(); if (!cache) cache = m_engine->cache(metaObject); - QDeclarativePropertyData *data = cache->property(name); + QQmlPropertyData *data = cache->property(name); if (data && data->revision != 0) { if (qmlVerboseCompiler()) @@ -452,11 +453,11 @@ bool QV4IRBuilder::visit(AST::IdentifierExpression *ast) } if (!found) { - QDeclarativePropertyCache *cache = m_expression->component->synthCache; + QQmlPropertyCache *cache = m_expression->component->synthCache; const QMetaObject *metaObject = m_expression->component->metaObject(); if (!cache) cache = m_engine->cache(metaObject); - QDeclarativePropertyData *data = cache->property(name); + QQmlPropertyData *data = cache->property(name); if (data && data->revision != 0) { if (qmlVerboseCompiler()) @@ -581,8 +582,8 @@ bool QV4IRBuilder::visit(AST::FieldMemberExpression *ast) qWarning() << "*** unresolved enum:" << (*baseName->id + QLatin1String(".") + ast->name.toString()); } else if(const QMetaObject *attachedMeta = baseName->declarativeType->attachedPropertiesType()) { - QDeclarativePropertyCache *cache = m_engine->cache(attachedMeta); - QDeclarativePropertyData *data = cache->property(name); + QQmlPropertyCache *cache = m_engine->cache(attachedMeta); + QQmlPropertyData *data = cache->property(name); if (!data || data->isFunction()) return false; // Don't support methods (or non-existing properties ;) @@ -600,11 +601,11 @@ bool QV4IRBuilder::visit(AST::FieldMemberExpression *ast) break; case IR::Name::IdObject: { - const QDeclarativeScript::Object *idObject = baseName->idObject; - QDeclarativePropertyCache *cache = + const QQmlScript::Object *idObject = baseName->idObject; + QQmlPropertyCache *cache = idObject->synthCache?idObject->synthCache:m_engine->cache(idObject->metaObject()); - QDeclarativePropertyData *data = cache->property(name); + QQmlPropertyData *data = cache->property(name); if (!data || data->isFunction()) return false; // Don't support methods (or non-existing properties ;) @@ -624,11 +625,11 @@ bool QV4IRBuilder::visit(AST::FieldMemberExpression *ast) case IR::Name::Property: if (baseName->type == IR::ObjectType && baseName->meta && baseName->property->isFinal()) { - QDeclarativePropertyCache *cache = m_engine->cache(baseName->meta); + QQmlPropertyCache *cache = m_engine->cache(baseName->meta); if (!cache) return false; - if (QDeclarativePropertyData *data = cache->property(name)) { + if (QQmlPropertyData *data = cache->property(name)) { if (!data->isFinal()) { if (qmlVerboseCompiler()) qWarning() << "*** non-final property access:" diff --git a/src/qml/qml/v4/qv4irbuilder_p.h b/src/qml/qml/v4/qv4irbuilder_p.h new file mode 100644 index 0000000000..2b338c0778 --- /dev/null +++ b/src/qml/qml/v4/qv4irbuilder_p.h @@ -0,0 +1,240 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QV4IRBUILDER_P_H +#define QV4IRBUILDER_P_H + +#include + +#include "qv4ir_p.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QV4IRBuilder : public QQmlJS::AST::Visitor +{ +public: + QV4IRBuilder(const QV4Compiler::Expression *, QQmlEnginePrivate *); + + bool operator()(QQmlJS::IR::Function *, QQmlJS::AST::Node *); + +protected: + struct ExprResult { + enum Format { + ex, // expression + cx // condition + }; + + QQmlJS::IR::Expr *code; + QQmlJS::IR::BasicBlock *iftrue; + QQmlJS::IR::BasicBlock *iffalse; + Format hint; // requested format + Format format; // instruction format + + ExprResult(QQmlJS::IR::Expr *expr = 0) + : code(expr), iftrue(0), iffalse(0), hint(ex), format(ex) {} + + ExprResult(QQmlJS::IR::BasicBlock *iftrue, QQmlJS::IR::BasicBlock *iffalse) + : code(0), iftrue(iftrue), iffalse(iffalse), hint(cx), format(ex) {} + + inline QQmlJS::IR::Type type() const { return code ? code->type : QQmlJS::IR::InvalidType; } + + inline QQmlJS::IR::Expr *get() const { return code; } + inline operator QQmlJS::IR::Expr *() const { return get(); } + inline QQmlJS::IR::Expr *operator->() const { return get(); } + inline bool isValid() const { return code ? code->type != QQmlJS::IR::InvalidType : false; } + inline bool is(QQmlJS::IR::Type t) const { return type() == t; } + inline bool isNot(QQmlJS::IR::Type t) const { return type() != t; } + + bool isPrimitive() const { + switch (type()) { + case QQmlJS::IR::UndefinedType: // ### TODO + case QQmlJS::IR::NullType: // ### TODO + case QQmlJS::IR::UrlType: // ### TODO + return false; + + case QQmlJS::IR::StringType: + case QQmlJS::IR::BoolType: + case QQmlJS::IR::IntType: + case QQmlJS::IR::RealType: + case QQmlJS::IR::RealNaNType: + return true; + + default: + return false; + } // switch + } + }; + + inline void accept(QQmlJS::AST::Node *ast) { QQmlJS::AST::Node::accept(ast, this); } + + ExprResult expression(QQmlJS::AST::ExpressionNode *ast); + ExprResult statement(QQmlJS::AST::Statement *ast); + void sourceElement(QQmlJS::AST::SourceElement *ast); + void condition(QQmlJS::AST::ExpressionNode *ast, QQmlJS::IR::BasicBlock *iftrue, QQmlJS::IR::BasicBlock *iffalse); + void binop(QQmlJS::AST::BinaryExpression *ast, ExprResult left, ExprResult right); + + void implicitCvt(ExprResult &expr, QQmlJS::IR::Type type); + + virtual bool preVisit(QQmlJS::AST::Node *ast); + + // QML + virtual bool visit(QQmlJS::AST::UiProgram *ast); + virtual bool visit(QQmlJS::AST::UiImportList *ast); + virtual bool visit(QQmlJS::AST::UiImport *ast); + virtual bool visit(QQmlJS::AST::UiPublicMember *ast); + virtual bool visit(QQmlJS::AST::UiSourceElement *ast); + virtual bool visit(QQmlJS::AST::UiObjectDefinition *ast); + virtual bool visit(QQmlJS::AST::UiObjectInitializer *ast); + virtual bool visit(QQmlJS::AST::UiObjectBinding *ast); + virtual bool visit(QQmlJS::AST::UiScriptBinding *ast); + virtual bool visit(QQmlJS::AST::UiArrayBinding *ast); + virtual bool visit(QQmlJS::AST::UiObjectMemberList *ast); + virtual bool visit(QQmlJS::AST::UiArrayMemberList *ast); + virtual bool visit(QQmlJS::AST::UiQualifiedId *ast); + + // JS + virtual bool visit(QQmlJS::AST::Program *ast); + virtual bool visit(QQmlJS::AST::SourceElements *ast); + virtual bool visit(QQmlJS::AST::FunctionSourceElement *ast); + virtual bool visit(QQmlJS::AST::StatementSourceElement *ast); + + // object literals + virtual bool visit(QQmlJS::AST::PropertyNameAndValueList *ast); + virtual bool visit(QQmlJS::AST::IdentifierPropertyName *ast); + virtual bool visit(QQmlJS::AST::StringLiteralPropertyName *ast); + virtual bool visit(QQmlJS::AST::NumericLiteralPropertyName *ast); + + // array literals + virtual bool visit(QQmlJS::AST::ElementList *ast); + virtual bool visit(QQmlJS::AST::Elision *ast); + + // function calls + virtual bool visit(QQmlJS::AST::ArgumentList *ast); + + // expressions + virtual bool visit(QQmlJS::AST::ObjectLiteral *ast); + virtual bool visit(QQmlJS::AST::ArrayLiteral *ast); + virtual bool visit(QQmlJS::AST::ThisExpression *ast); + virtual bool visit(QQmlJS::AST::IdentifierExpression *ast); + virtual bool visit(QQmlJS::AST::NullExpression *ast); + virtual bool visit(QQmlJS::AST::TrueLiteral *ast); + virtual bool visit(QQmlJS::AST::FalseLiteral *ast); + virtual bool visit(QQmlJS::AST::StringLiteral *ast); + virtual bool visit(QQmlJS::AST::NumericLiteral *ast); + virtual bool visit(QQmlJS::AST::RegExpLiteral *ast); + virtual bool visit(QQmlJS::AST::NestedExpression *ast); + virtual bool visit(QQmlJS::AST::ArrayMemberExpression *ast); + virtual bool visit(QQmlJS::AST::FieldMemberExpression *ast); + virtual bool visit(QQmlJS::AST::NewMemberExpression *ast); + virtual bool visit(QQmlJS::AST::NewExpression *ast); + virtual bool visit(QQmlJS::AST::CallExpression *ast); + virtual bool visit(QQmlJS::AST::PostIncrementExpression *ast); + virtual bool visit(QQmlJS::AST::PostDecrementExpression *ast); + virtual bool visit(QQmlJS::AST::DeleteExpression *ast); + virtual bool visit(QQmlJS::AST::VoidExpression *ast); + virtual bool visit(QQmlJS::AST::TypeOfExpression *ast); + virtual bool visit(QQmlJS::AST::PreIncrementExpression *ast); + virtual bool visit(QQmlJS::AST::PreDecrementExpression *ast); + virtual bool visit(QQmlJS::AST::UnaryPlusExpression *ast); + virtual bool visit(QQmlJS::AST::UnaryMinusExpression *ast); + virtual bool visit(QQmlJS::AST::TildeExpression *ast); + virtual bool visit(QQmlJS::AST::NotExpression *ast); + virtual bool visit(QQmlJS::AST::BinaryExpression *ast); + virtual bool visit(QQmlJS::AST::ConditionalExpression *ast); + virtual bool visit(QQmlJS::AST::Expression *ast); + + // statements + virtual bool visit(QQmlJS::AST::Block *ast); + virtual bool visit(QQmlJS::AST::StatementList *ast); + virtual bool visit(QQmlJS::AST::VariableStatement *ast); + virtual bool visit(QQmlJS::AST::VariableDeclarationList *ast); + virtual bool visit(QQmlJS::AST::VariableDeclaration *ast); + virtual bool visit(QQmlJS::AST::EmptyStatement *ast); + virtual bool visit(QQmlJS::AST::ExpressionStatement *ast); + virtual bool visit(QQmlJS::AST::IfStatement *ast); + virtual bool visit(QQmlJS::AST::DoWhileStatement *ast); + virtual bool visit(QQmlJS::AST::WhileStatement *ast); + virtual bool visit(QQmlJS::AST::ForStatement *ast); + virtual bool visit(QQmlJS::AST::LocalForStatement *ast); + virtual bool visit(QQmlJS::AST::ForEachStatement *ast); + virtual bool visit(QQmlJS::AST::LocalForEachStatement *ast); + virtual bool visit(QQmlJS::AST::ContinueStatement *ast); + virtual bool visit(QQmlJS::AST::BreakStatement *ast); + virtual bool visit(QQmlJS::AST::ReturnStatement *ast); + virtual bool visit(QQmlJS::AST::WithStatement *ast); + virtual bool visit(QQmlJS::AST::SwitchStatement *ast); + virtual bool visit(QQmlJS::AST::CaseBlock *ast); + virtual bool visit(QQmlJS::AST::CaseClauses *ast); + virtual bool visit(QQmlJS::AST::CaseClause *ast); + virtual bool visit(QQmlJS::AST::DefaultClause *ast); + virtual bool visit(QQmlJS::AST::LabelledStatement *ast); + virtual bool visit(QQmlJS::AST::ThrowStatement *ast); + virtual bool visit(QQmlJS::AST::TryStatement *ast); + virtual bool visit(QQmlJS::AST::Catch *ast); + virtual bool visit(QQmlJS::AST::Finally *ast); + virtual bool visit(QQmlJS::AST::FunctionDeclaration *ast); + virtual bool visit(QQmlJS::AST::FunctionExpression *ast); + virtual bool visit(QQmlJS::AST::FormalParameterList *ast); + virtual bool visit(QQmlJS::AST::FunctionBody *ast); + virtual bool visit(QQmlJS::AST::DebuggerStatement *ast); + +private: + bool buildName(QList &name, QQmlJS::AST::Node *node, + QList *nodes); + void discard(); + + const QV4Compiler::Expression *m_expression; + QQmlEnginePrivate *m_engine; + + QQmlJS::IR::Function *_function; + QQmlJS::IR::BasicBlock *_block; + bool _discard; + + ExprResult _expr; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QV4IRBUILDER_P_H diff --git a/src/declarative/qml/v4/qv4program_p.h b/src/qml/qml/v4/qv4program_p.h similarity index 96% rename from src/declarative/qml/v4/qv4program_p.h rename to src/qml/qml/v4/qv4program_p.h index 1f37786307..b6b03e438b 100644 --- a/src/declarative/qml/v4/qv4program_p.h +++ b/src/qml/qml/v4/qv4program_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -83,7 +83,7 @@ struct QV4Program { inline BindingReferenceList *signalTable(int signalIndex) const; }; -enum QDeclarativeRegisterType { +enum QQmlRegisterType { UndefinedType, QObjectStarType, QRealType, diff --git a/src/declarative/qml/v4/v4.pri b/src/qml/qml/v4/v4.pri similarity index 100% rename from src/declarative/qml/v4/v4.pri rename to src/qml/qml/v4/v4.pri diff --git a/src/declarative/qml/v8/notes.txt b/src/qml/qml/v8/notes.txt similarity index 76% rename from src/declarative/qml/v8/notes.txt rename to src/qml/qml/v8/notes.txt index ff5a289b7c..a4006b93c6 100644 --- a/src/declarative/qml/v8/notes.txt +++ b/src/qml/qml/v8/notes.txt @@ -1,4 +1,4 @@ Removed backwards compatible imports - QTBUG-17518 autotest print() taking objects that don't ToString() -autotest QDeclarativeV8Function +autotest QQmlV8Function diff --git a/src/declarative/qml/v8/qjsconverter_impl_p.h b/src/qml/qml/v8/qjsconverter_impl_p.h similarity index 99% rename from src/declarative/qml/v8/qjsconverter_impl_p.h rename to src/qml/qml/v8/qjsconverter_impl_p.h index 018c0441a2..10b8ab5fae 100644 --- a/src/declarative/qml/v8/qjsconverter_impl_p.h +++ b/src/qml/qml/v8/qjsconverter_impl_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qjsconverter_p.h b/src/qml/qml/v8/qjsconverter_p.h similarity index 100% rename from src/declarative/qml/v8/qjsconverter_p.h rename to src/qml/qml/v8/qjsconverter_p.h diff --git a/src/declarative/qml/v8/qjsengine.cpp b/src/qml/qml/v8/qjsengine.cpp similarity index 100% rename from src/declarative/qml/v8/qjsengine.cpp rename to src/qml/qml/v8/qjsengine.cpp diff --git a/src/declarative/qml/v8/qjsengine.h b/src/qml/qml/v8/qjsengine.h similarity index 97% rename from src/declarative/qml/v8/qjsengine.h rename to src/qml/qml/v8/qjsengine.h index 94c4dffde4..1521c752d4 100644 --- a/src/declarative/qml/v8/qjsengine.h +++ b/src/qml/qml/v8/qjsengine.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include QT_BEGIN_HEADER @@ -42,7 +42,7 @@ template inline T qjsvalue_cast(const QJSValue &); class QJSEnginePrivate; -class Q_DECLARATIVE_EXPORT QJSEngine +class Q_QML_EXPORT QJSEngine : public QObject { Q_OBJECT diff --git a/src/declarative/qml/v8/qjsengine_p.h b/src/qml/qml/v8/qjsengine_p.h similarity index 100% rename from src/declarative/qml/v8/qjsengine_p.h rename to src/qml/qml/v8/qjsengine_p.h diff --git a/src/declarative/qml/v8/qjsvalue.cpp b/src/qml/qml/v8/qjsvalue.cpp similarity index 100% rename from src/declarative/qml/v8/qjsvalue.cpp rename to src/qml/qml/v8/qjsvalue.cpp diff --git a/src/declarative/qml/v8/qjsvalue.h b/src/qml/qml/v8/qjsvalue.h similarity index 98% rename from src/declarative/qml/v8/qjsvalue.h rename to src/qml/qml/v8/qjsvalue.h index bfe0ec0951..30ea2e7345 100644 --- a/src/declarative/qml/v8/qjsvalue.h +++ b/src/qml/qml/v8/qjsvalue.h @@ -24,8 +24,9 @@ #ifndef QJSVALUE_H #define QJSVALUE_H -#include +#include +#include #include #include #include @@ -48,7 +49,7 @@ class QJSValuePrivate; struct QScriptValuePrivatePointerDeleter; template class QScriptPassPointer; -class Q_DECLARATIVE_EXPORT QJSValue +class Q_QML_EXPORT QJSValue { public: enum SpecialValue { diff --git a/src/declarative/qml/v8/qjsvalue_impl_p.h b/src/qml/qml/v8/qjsvalue_impl_p.h similarity index 100% rename from src/declarative/qml/v8/qjsvalue_impl_p.h rename to src/qml/qml/v8/qjsvalue_impl_p.h diff --git a/src/declarative/qml/v8/qjsvalue_p.h b/src/qml/qml/v8/qjsvalue_p.h similarity index 100% rename from src/declarative/qml/v8/qjsvalue_p.h rename to src/qml/qml/v8/qjsvalue_p.h diff --git a/src/declarative/qml/v8/qjsvalueiterator.cpp b/src/qml/qml/v8/qjsvalueiterator.cpp similarity index 100% rename from src/declarative/qml/v8/qjsvalueiterator.cpp rename to src/qml/qml/v8/qjsvalueiterator.cpp diff --git a/src/declarative/qml/v8/qjsvalueiterator.h b/src/qml/qml/v8/qjsvalueiterator.h similarity index 95% rename from src/declarative/qml/v8/qjsvalueiterator.h rename to src/qml/qml/v8/qjsvalueiterator.h index 5f5446430e..c47f07d43b 100644 --- a/src/declarative/qml/v8/qjsvalueiterator.h +++ b/src/qml/qml/v8/qjsvalueiterator.h @@ -24,7 +24,7 @@ #ifndef QSCRIPTVALUEITERATOR_H #define QSCRIPTVALUEITERATOR_H -#include +#include #include QT_BEGIN_HEADER @@ -35,7 +35,7 @@ QT_BEGIN_NAMESPACE class QString; class QJSValueIteratorPrivate; -class Q_DECLARATIVE_EXPORT QJSValueIterator +class Q_QML_EXPORT QJSValueIterator { public: QJSValueIterator(const QJSValue &value); diff --git a/src/declarative/qml/v8/qjsvalueiterator_impl_p.h b/src/qml/qml/v8/qjsvalueiterator_impl_p.h similarity index 98% rename from src/declarative/qml/v8/qjsvalueiterator_impl_p.h rename to src/qml/qml/v8/qjsvalueiterator_impl_p.h index 40814b1969..131296ecac 100644 --- a/src/declarative/qml/v8/qjsvalueiterator_impl_p.h +++ b/src/qml/qml/v8/qjsvalueiterator_impl_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qjsvalueiterator_p.h b/src/qml/qml/v8/qjsvalueiterator_p.h similarity index 96% rename from src/declarative/qml/v8/qjsvalueiterator_p.h rename to src/qml/qml/v8/qjsvalueiterator_p.h index d1869506e9..2a5bcdec22 100644 --- a/src/declarative/qml/v8/qjsvalueiterator_p.h +++ b/src/qml/qml/v8/qjsvalueiterator_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qdeclarativebuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp similarity index 94% rename from src/declarative/qml/v8/qdeclarativebuiltinfunctions.cpp rename to src/qml/qml/v8/qqmlbuiltinfunctions.cpp index 12f06e6b76..5284832ae1 100644 --- a/src/declarative/qml/v8/qdeclarativebuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,18 +39,18 @@ ** ****************************************************************************/ -#include "qdeclarativebuiltinfunctions_p.h" +#include "qqmlbuiltinfunctions_p.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include -#include +#include #include #include @@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE -namespace QDeclarativeBuiltinFunctions { +namespace QQmlBuiltinFunctions { enum ConsoleLogTypes { Log, @@ -206,7 +206,7 @@ v8::Handle consoleProfile(const v8::Arguments &args) int line; jsContext(&file, &line, &function); - if (QDeclarativeProfilerService::startProfiling()) { + if (QQmlProfilerService::startProfiling()) { QV8ProfilerService::instance()->startProfiling(title); QMessageLogger(*v8::String::AsciiValue(file), line, @@ -233,10 +233,10 @@ v8::Handle consoleProfileEnd(const v8::Arguments &args) int line; jsContext(&file, &line, &function); - if (QDeclarativeProfilerService::stopProfiling()) { + if (QQmlProfilerService::stopProfiling()) { QV8ProfilerService *profiler = QV8ProfilerService::instance(); profiler->stopProfiling(title); - QDeclarativeProfilerService::sendProfilingData(); + QQmlProfilerService::sendProfilingData(); profiler->sendProfilingData(); QMessageLogger(*v8::String::AsciiValue(file), line, @@ -557,7 +557,7 @@ v8::Handle lighter(const v8::Arguments &args) color = v.value(); } else if (v.userType() == QVariant::String) { bool ok = false; - color = QDeclarativeStringConverters::colorFromString(v.toString(), &ok); + color = QQmlStringConverters::colorFromString(v.toString(), &ok); if (!ok) { return v8::Null(); } @@ -599,7 +599,7 @@ v8::Handle darker(const v8::Arguments &args) color = v.value(); } else if (v.userType() == QVariant::String) { bool ok = false; - color = QDeclarativeStringConverters::colorFromString(v.toString(), &ok); + color = QQmlStringConverters::colorFromString(v.toString(), &ok); if (!ok) { return v8::Null(); } @@ -651,7 +651,7 @@ v8::Handle tint(const v8::Arguments &args) color = v.value(); } else if (v.userType() == QVariant::String) { bool ok = false; - color = QDeclarativeStringConverters::colorFromString(v.toString(), &ok); + color = QQmlStringConverters::colorFromString(v.toString(), &ok); if (!ok) { return v8::Null(); } @@ -666,7 +666,7 @@ v8::Handle tint(const v8::Arguments &args) tintColor = v.value(); } else if (v.userType() == QVariant::String) { bool ok = false; - tintColor = QDeclarativeStringConverters::colorFromString(v.toString(), &ok); + tintColor = QQmlStringConverters::colorFromString(v.toString(), &ok); if (!ok) { return v8::Null(); } @@ -922,11 +922,11 @@ v8::Handle openUrlExternally(const v8::Arguments &args) v8::Handle resolvedUrl(const v8::Arguments &args) { QUrl url = V8ENGINE()->toVariant(args[0], -1).toUrl(); - QDeclarativeEngine *e = V8ENGINE()->engine(); - QDeclarativeEnginePrivate *p = 0; - if (e) p = QDeclarativeEnginePrivate::get(e); + QQmlEngine *e = V8ENGINE()->engine(); + QQmlEnginePrivate *p = 0; + if (e) p = QQmlEnginePrivate::get(e); if (p) { - QDeclarativeContextData *ctxt = V8ENGINE()->callingContext(); + QQmlContextData *ctxt = V8ENGINE()->callingContext(); if (ctxt) return V8ENGINE()->toString(ctxt->resolvedUrl(url).toString()); else @@ -993,14 +993,14 @@ v8::Handle atob(const v8::Arguments &args) /*! \qmlmethod Qt::quit() -This function causes the QDeclarativeEngine::quit() signal to be emitted. +This function causes the QQmlEngine::quit() signal to be emitted. Within the \l {QML Viewer}, this causes the launcher application to exit; to quit a C++ application when this method is called, connect the -QDeclarativeEngine::quit() signal to the QCoreApplication::quit() slot. +QQmlEngine::quit() signal to the QCoreApplication::quit() slot. */ v8::Handle quit(const v8::Arguments &args) { - QDeclarativeEnginePrivate::get(V8ENGINE()->engine())->sendQuit(); + QQmlEnginePrivate::get(V8ENGINE()->engine())->sendQuit(); return v8::Undefined(); } @@ -1014,7 +1014,7 @@ If \a filepath is specified, it will be used for error reporting for the created Example (where \c parentItem is the id of an existing QML item): -\snippet doc/src/snippets/declarative/createQmlObject.qml 0 +\snippet doc/src/snippets/qml/createQmlObject.qml 0 In the case of an error, a QtScript Error object is thrown. This object has an additional property, \c qmlErrors, which is an array of the errors encountered. @@ -1034,12 +1034,12 @@ v8::Handle createQmlObject(const v8::Arguments &args) V8THROW_ERROR("Qt.createQmlObject(): Invalid arguments"); struct Error { - static v8::Local create(QV8Engine *engine, const QList &errors) { + static v8::Local create(QV8Engine *engine, const QList &errors) { QString errorstr = QLatin1String("Qt.createQmlObject(): failed to create object: "); v8::Local qmlerrors = v8::Array::New(errors.count()); for (int ii = 0; ii < errors.count(); ++ii) { - const QDeclarativeError &error = errors.at(ii); + const QQmlError &error = errors.at(ii); errorstr += QLatin1String("\n ") + error.toString(); v8::Local qmlerror = v8::Object::New(); qmlerror->Set(v8::String::New("lineNumber"), v8::Integer::New(error.line())); @@ -1057,14 +1057,14 @@ v8::Handle createQmlObject(const v8::Arguments &args) }; QV8Engine *v8engine = V8ENGINE(); - QDeclarativeEngine *engine = v8engine->engine(); + QQmlEngine *engine = v8engine->engine(); - QDeclarativeContextData *context = v8engine->callingContext(); - QDeclarativeContext *effectiveContext = 0; + QQmlContextData *context = v8engine->callingContext(); + QQmlContext *effectiveContext = 0; if (context->isPragmaLibraryContext) effectiveContext = engine->rootContext(); else - effectiveContext = context->asQDeclarativeContext(); + effectiveContext = context->asQQmlContext(); Q_ASSERT(context && effectiveContext); QString qml = v8engine->toString(args[0]->ToString()); @@ -1084,7 +1084,7 @@ v8::Handle createQmlObject(const v8::Arguments &args) if (!parentArg) V8THROW_ERROR("Qt.createQmlObject(): Missing parent object"); - QDeclarativeComponent component(engine); + QQmlComponent component(engine); component.setData(qml.toUtf8(), url); if (component.isError()) { @@ -1097,7 +1097,7 @@ v8::Handle createQmlObject(const v8::Arguments &args) QObject *obj = component.beginCreate(effectiveContext); if (obj) - QDeclarativeData::get(obj, true)->setImplicitDestructible(); + QQmlData::get(obj, true)->setImplicitDestructible(); component.completeCreate(); if (component.isError()) { @@ -1109,9 +1109,9 @@ v8::Handle createQmlObject(const v8::Arguments &args) obj->setParent(parentArg); - QList functions = QDeclarativeMetaType::parentFunctions(); + QList functions = QQmlMetaType::parentFunctions(); for (int ii = 0; ii < functions.count(); ++ii) { - if (QDeclarativePrivate::Parented == functions.at(ii)(obj, parentArg)) + if (QQmlPrivate::Parented == functions.at(ii)(obj, parentArg)) break; } @@ -1133,7 +1133,7 @@ component to create an object instance of the component. For example: -\snippet doc/src/snippets/declarative/createComponent-simple.qml 0 +\snippet doc/src/snippets/qml/createComponent-simple.qml 0 See \l {Dynamic Object Management in QML} for more information on using this function. @@ -1146,10 +1146,10 @@ v8::Handle createComponent(const v8::Arguments &args) V8THROW_ERROR("Qt.createComponent(): Invalid arguments"); QV8Engine *v8engine = V8ENGINE(); - QDeclarativeEngine *engine = v8engine->engine(); + QQmlEngine *engine = v8engine->engine(); - QDeclarativeContextData *context = v8engine->callingContext(); - QDeclarativeContextData *effectiveContext = context; + QQmlContextData *context = v8engine->callingContext(); + QQmlContextData *effectiveContext = context; if (context->isPragmaLibraryContext) effectiveContext = 0; Q_ASSERT(context); @@ -1159,9 +1159,9 @@ v8::Handle createComponent(const v8::Arguments &args) return v8::Null(); QUrl url = context->resolvedUrl(QUrl(arg)); - QDeclarativeComponent *c = new QDeclarativeComponent(engine, url, engine); - QDeclarativeComponentPrivate::get(c)->creationContext = effectiveContext; - QDeclarativeData::get(c, true)->setImplicitDestructible(); + QQmlComponent *c = new QQmlComponent(engine, url, engine); + QQmlComponentPrivate::get(c)->creationContext = effectiveContext; + QQmlData::get(c, true)->setImplicitDestructible(); return v8engine->newQObject(c); } @@ -1228,7 +1228,7 @@ v8::Handle qsTr(const v8::Arguments &args) V8THROW_ERROR("qsTr(): third argument (n) must be a number"); QV8Engine *v8engine = V8ENGINE(); - QDeclarativeContextData *ctxt = v8engine->callingContext(); + QQmlContextData *ctxt = v8engine->callingContext(); QString path = ctxt->url.toString(); int lastSlash = path.lastIndexOf(QLatin1Char('/')); @@ -1312,9 +1312,9 @@ v8::Handle locale(const v8::Arguments &args) if (args.Length() == 1) code = v8engine->toString(args[0]); - return QDeclarativeLocale::locale(v8engine, code); + return QQmlLocale::locale(v8engine, code); } -} // namespace QDeclarativeBuiltinFunctions +} // namespace QQmlBuiltinFunctions QT_END_NAMESPACE diff --git a/src/declarative/qml/v8/qdeclarativebuiltinfunctions_p.h b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h similarity index 95% rename from src/declarative/qml/v8/qdeclarativebuiltinfunctions_p.h rename to src/qml/qml/v8/qqmlbuiltinfunctions_p.h index d5780dc70d..ddb1c64243 100644 --- a/src/declarative/qml/v8/qdeclarativebuiltinfunctions_p.h +++ b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEBUILTINFUNCTIONS_P_H -#define QDECLARATIVEBUILTINFUNCTIONS_P_H +#ifndef QQMLBUILTINFUNCTIONS_P_H +#define QQMLBUILTINFUNCTIONS_P_H // // W A R N I N G @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE -namespace QDeclarativeBuiltinFunctions +namespace QQmlBuiltinFunctions { v8::Handle gc(const v8::Arguments &args); v8::Handle consoleError(const v8::Arguments &args); @@ -107,4 +107,4 @@ v8::Handle locale(const v8::Arguments &args); QT_END_NAMESPACE -#endif // QDECLARATIVEBUILTINFUNCTIONS_P_H +#endif // QQMLBUILTINFUNCTIONS_P_H diff --git a/src/declarative/qml/v8/qscript_impl_p.h b/src/qml/qml/v8/qscript_impl_p.h similarity index 100% rename from src/declarative/qml/v8/qscript_impl_p.h rename to src/qml/qml/v8/qscript_impl_p.h diff --git a/src/declarative/qml/v8/qscriptisolate_p.h b/src/qml/qml/v8/qscriptisolate_p.h similarity index 100% rename from src/declarative/qml/v8/qscriptisolate_p.h rename to src/qml/qml/v8/qscriptisolate_p.h diff --git a/src/declarative/qml/v8/qscriptoriginalglobalobject_p.h b/src/qml/qml/v8/qscriptoriginalglobalobject_p.h similarity index 100% rename from src/declarative/qml/v8/qscriptoriginalglobalobject_p.h rename to src/qml/qml/v8/qscriptoriginalglobalobject_p.h diff --git a/src/declarative/qml/v8/qscriptshareddata_p.h b/src/qml/qml/v8/qscriptshareddata_p.h similarity index 100% rename from src/declarative/qml/v8/qscriptshareddata_p.h rename to src/qml/qml/v8/qscriptshareddata_p.h diff --git a/src/declarative/qml/v8/qscripttools_p.h b/src/qml/qml/v8/qscripttools_p.h similarity index 100% rename from src/declarative/qml/v8/qscripttools_p.h rename to src/qml/qml/v8/qscripttools_p.h diff --git a/src/declarative/qml/v8/qv8_p.h b/src/qml/qml/v8/qv8_p.h similarity index 96% rename from src/declarative/qml/v8/qv8_p.h rename to src/qml/qml/v8/qv8_p.h index 13867bdfc8..d6a06593f5 100644 --- a/src/declarative/qml/v8/qv8_p.h +++ b/src/qml/qml/v8/qv8_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qv8bindings.cpp b/src/qml/qml/v8/qv8bindings.cpp similarity index 78% rename from src/declarative/qml/v8/qv8bindings.cpp rename to src/qml/qml/v8/qv8bindings.cpp index 439ba1e1a4..76fbea137e 100644 --- a/src/declarative/qml/v8/qv8bindings.cpp +++ b/src/qml/qml/v8/qv8bindings.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,28 +42,28 @@ #include "qv8bindings_p.h" #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include QT_BEGIN_NAMESPACE -static QDeclarativeJavaScriptExpression::VTable QV8Bindings_Binding_jsvtable = { +static QQmlJavaScriptExpression::VTable QV8Bindings_Binding_jsvtable = { QV8Bindings::Binding::expressionIdentifier, QV8Bindings::Binding::expressionChanged }; QV8Bindings::Binding::Binding() -: QDeclarativeJavaScriptExpression(&QV8Bindings_Binding_jsvtable), target(0), parent(0) +: QQmlJavaScriptExpression(&QV8Bindings_Binding_jsvtable), target(0), parent(0) { } -void QV8Bindings::Binding::setEnabled(bool e, QDeclarativePropertyPrivate::WriteFlags flags) +void QV8Bindings::Binding::setEnabled(bool e, QQmlPropertyPrivate::WriteFlags flags) { if (enabledFlag() != e) { setEnabledFlag(e); @@ -94,25 +94,25 @@ QObject *QV8Bindings::Binding::object() const return target; } -void QV8Bindings::Binding::update(QDeclarativePropertyPrivate::WriteFlags flags) +void QV8Bindings::Binding::update(QQmlPropertyPrivate::WriteFlags flags) { if (!enabledFlag()) return; - QDeclarativeTrace trace("V8 Binding Update"); + QQmlTrace trace("V8 Binding Update"); trace.addDetail("URL", parent->url()); trace.addDetail("Line", instruction->line); trace.addDetail("Column", instruction->column); - QDeclarativeBindingProfiler prof(parent->urlString(), instruction->line, instruction->column); + QQmlBindingProfiler prof(parent->urlString(), instruction->line, instruction->column); - QDeclarativeContextData *context = parent->context(); + QQmlContextData *context = parent->context(); if (!context || !context->isValid()) return; if (!updatingFlag()) { setUpdatingFlag(true); - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context->engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context->engine); bool isUndefined = false; @@ -129,7 +129,7 @@ void QV8Bindings::Binding::update(QDeclarativePropertyPrivate::WriteFlags flags) trace.event("writing V8 result"); bool needsErrorData = false; if (!watcher.wasDeleted() && !hasError()) { - typedef QDeclarativePropertyPrivate PP; + typedef QQmlPropertyPrivate PP; needsErrorData = !PP::writeBinding(target, instruction->property, context, this, result, isUndefined, flags); } @@ -157,23 +157,23 @@ void QV8Bindings::Binding::update(QDeclarativePropertyPrivate::WriteFlags flags) ep->dereferenceScarceResources(); } else { - QDeclarativeProperty p = QDeclarativePropertyPrivate::restore(target, instruction->property, + QQmlProperty p = QQmlPropertyPrivate::restore(target, instruction->property, context); - QDeclarativeBindingPrivate::printBindingLoopError(p); + QQmlBindingPrivate::printBindingLoopError(p); } } -QString QV8Bindings::Binding::expressionIdentifier(QDeclarativeJavaScriptExpression *e) +QString QV8Bindings::Binding::expressionIdentifier(QQmlJavaScriptExpression *e) { Binding *This = static_cast(e); return This->parent->urlString() + QLatin1String(":") + QString::number(This->instruction->line); } -void QV8Bindings::Binding::expressionChanged(QDeclarativeJavaScriptExpression *e) +void QV8Bindings::Binding::expressionChanged(QQmlJavaScriptExpression *e) { Binding *This = static_cast(e); - This->update(QDeclarativePropertyPrivate::DontRemoveBinding); + This->update(QQmlPropertyPrivate::DontRemoveBinding); } void QV8Bindings::Binding::destroy() @@ -185,14 +185,14 @@ void QV8Bindings::Binding::destroy() parent->release(); } -QV8Bindings::QV8Bindings(QDeclarativeCompiledData::V8Program *program, +QV8Bindings::QV8Bindings(QQmlCompiledData::V8Program *program, int line, - QDeclarativeContextData *context) + QQmlContextData *context) : program(program), bindings(0), refCount(1) { program->cdata->addref(); - QV8Engine *engine = QDeclarativeEnginePrivate::getV8Engine(context->engine); + QV8Engine *engine = QQmlEnginePrivate::getV8Engine(context->engine); if (program->bindings.IsEmpty()) { v8::HandleScope handle_scope; @@ -211,12 +211,12 @@ QV8Bindings::QV8Bindings(QDeclarativeCompiledData::V8Program *program, // are not rewritten correctly but this bug is demed out-of-scope to fix for // performance reasons; see QTBUG-24064). compileFailed = true; - QDeclarativeError error; + QQmlError error; error.setDescription(QString(QLatin1String("Exception occurred during compilation of binding at line: %1")).arg(line)); v8::Local message = try_catch.Message(); if (!message.IsEmpty()) - QDeclarativeExpressionPrivate::exceptionToError(message, error); - QDeclarativeEnginePrivate::get(engine->engine())->warning(error); + QQmlExpressionPrivate::exceptionToError(message, error); + QQmlEnginePrivate::get(engine->engine())->warning(error); program->bindings = qPersistentNew(v8::Array::New()); } } @@ -245,9 +245,9 @@ QV8Bindings::~QV8Bindings() bindings = 0; } -QDeclarativeAbstractBinding * +QQmlAbstractBinding * QV8Bindings::configBinding(QObject *target, QObject *scope, - const QDeclarativeInstruction::instr_assignBinding *i) + const QQmlInstruction::instr_assignBinding *i) { if (!bindings) // initialization failed. return 0; diff --git a/src/declarative/qml/v8/qv8bindings_p.h b/src/qml/qml/v8/qv8bindings_p.h similarity index 68% rename from src/declarative/qml/v8/qv8bindings_p.h rename to src/qml/qml/v8/qv8bindings_p.h index 14de2d1705..ad5b2cb8b0 100644 --- a/src/declarative/qml/v8/qv8bindings_p.h +++ b/src/qml/qml/v8/qv8bindings_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -53,48 +53,48 @@ // We mean it. // -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeCompiledData; +class QQmlCompiledData; class QV8BindingsPrivate; -class QV8Bindings : public QDeclarativeAbstractExpression +class QV8Bindings : public QQmlAbstractExpression { public: - QV8Bindings(QDeclarativeCompiledData::V8Program *, + QV8Bindings(QQmlCompiledData::V8Program *, int line, - QDeclarativeContextData *context); + QQmlContextData *context); virtual ~QV8Bindings(); - QDeclarativeAbstractBinding *configBinding(QObject *target, QObject *scope, - const QDeclarativeInstruction::instr_assignBinding *); + QQmlAbstractBinding *configBinding(QObject *target, QObject *scope, + const QQmlInstruction::instr_assignBinding *); - // Inherited from QDeclarativeAbstractExpression + // Inherited from QQmlAbstractExpression virtual void refresh(); - struct Binding : public QDeclarativeJavaScriptExpression, - public QDeclarativeAbstractBinding { + struct Binding : public QQmlJavaScriptExpression, + public QQmlAbstractBinding { Binding(); - void update() { QDeclarativeAbstractBinding::update(); } + void update() { QQmlAbstractBinding::update(); } void refresh(); - // "Inherited" from QDeclarativeJavaScriptExpression - static QString expressionIdentifier(QDeclarativeJavaScriptExpression *); - static void expressionChanged(QDeclarativeJavaScriptExpression *); + // "Inherited" from QQmlJavaScriptExpression + static QString expressionIdentifier(QQmlJavaScriptExpression *); + static void expressionChanged(QQmlJavaScriptExpression *); - // Inherited from QDeclarativeAbstractBinding - virtual void setEnabled(bool, QDeclarativePropertyPrivate::WriteFlags flags); - virtual void update(QDeclarativePropertyPrivate::WriteFlags flags); + // Inherited from QQmlAbstractBinding + virtual void setEnabled(bool, QQmlPropertyPrivate::WriteFlags flags); + virtual void update(QQmlPropertyPrivate::WriteFlags flags); virtual void destroy(); virtual int propertyIndex() const; virtual QObject *object() const; @@ -105,7 +105,7 @@ class QV8Bindings : public QDeclarativeAbstractExpression // To save memory, we store flags inside the instruction pointer. // flag1: enabled // flag2: updating - QFlagPointer instruction; + QFlagPointer instruction; inline bool enabledFlag() const { return instruction.flag(); } inline void setEnabledFlag(bool v) { instruction.setFlagValue(v); } @@ -123,7 +123,7 @@ class QV8Bindings : public QDeclarativeAbstractExpression const QString &urlString() const; v8::Persistent &functions() const; - QDeclarativeCompiledData::V8Program *program; + QQmlCompiledData::V8Program *program; Binding *bindings; int refCount; }; diff --git a/src/declarative/qml/v8/qv8contextwrapper.cpp b/src/qml/qml/v8/qv8contextwrapper.cpp similarity index 87% rename from src/declarative/qml/v8/qv8contextwrapper.cpp rename to src/qml/qml/v8/qv8contextwrapper.cpp index 8b7fbe8941..246b716aa0 100644 --- a/src/declarative/qml/v8/qv8contextwrapper.cpp +++ b/src/qml/qml/v8/qv8contextwrapper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,8 +42,8 @@ #include "qv8contextwrapper_p.h" #include "qv8engine_p.h" -#include -#include +#include +#include QT_BEGIN_NAMESPACE @@ -55,10 +55,10 @@ class QV8ContextResource : public QV8ObjectResource V8_RESOURCE_TYPE(ContextType); public: - QV8ContextResource(QV8Engine *engine, QDeclarativeContextData *context, QObject *scopeObject); + QV8ContextResource(QV8Engine *engine, QQmlContextData *context, QObject *scopeObject); ~QV8ContextResource(); - inline QDeclarativeContextData *getContext() const; + inline QQmlContextData *getContext() const; inline QObject *getScopeObject() const; quint32 isSharedContext:1; @@ -75,20 +75,20 @@ class QV8ContextResource : public QV8ObjectResource // v8::Script::Data() later on to resolve names and URLs against the sub-context instead // of the main outer context. struct SubContext : public v8::String::ExternalStringResource { - SubContext(QDeclarativeContextData *context) : context(context) {} - QDeclarativeGuardedContextData context; + SubContext(QQmlContextData *context) : context(context) {} + QQmlGuardedContextData context; virtual const uint16_t* data() const { return (const uint16_t *)internal.constData(); } virtual size_t length() const { return internal.length(); } }; private: - QDeclarativeGuardedContextData context; - QDeclarativeGuard scopeObject; + QQmlGuardedContextData context; + QQmlGuard scopeObject; }; -QV8ContextResource::QV8ContextResource(QV8Engine *engine, QDeclarativeContextData *context, QObject *scopeObject) +QV8ContextResource::QV8ContextResource(QV8Engine *engine, QQmlContextData *context, QObject *scopeObject) : QV8ObjectResource(engine), isSharedContext(false), hasSubContexts(false), readOnly(true), secondaryScope(0), context(context), scopeObject(scopeObject) { @@ -104,16 +104,16 @@ QV8ContextResource::~QV8ContextResource() QObject *QV8ContextResource::getScopeObject() const { if (isSharedContext) - return QDeclarativeEnginePrivate::get(engine->engine())->sharedScope; + return QQmlEnginePrivate::get(engine->engine())->sharedScope; else return scopeObject; } // Returns the context, including resolving a subcontext -QDeclarativeContextData *QV8ContextResource::getContext() const +QQmlContextData *QV8ContextResource::getContext() const { if (isSharedContext) - return QDeclarativeEnginePrivate::get(engine->engine())->sharedContext; + return QQmlEnginePrivate::get(engine->engine())->sharedContext; if (!hasSubContexts) return context; @@ -170,7 +170,7 @@ void QV8ContextWrapper::init(QV8Engine *engine) } } -v8::Local QV8ContextWrapper::qmlScope(QDeclarativeContextData *ctxt, QObject *scope) +v8::Local QV8ContextWrapper::qmlScope(QQmlContextData *ctxt, QObject *scope) { // XXX NewInstance() should be optimized v8::Local rv = m_constructor->NewInstance(); @@ -181,7 +181,7 @@ v8::Local QV8ContextWrapper::qmlScope(QDeclarativeContextData *ctxt, v8::Local QV8ContextWrapper::urlScope(const QUrl &url) { - QDeclarativeContextData *context = new QDeclarativeContextData; + QQmlContextData *context = new QQmlContextData; context->url = url; context->isInternal = true; context->isJSContext = true; @@ -201,7 +201,7 @@ void QV8ContextWrapper::setReadOnly(v8::Handle qmlglobal, bool readO } void QV8ContextWrapper::addSubContext(v8::Handle qmlglobal, v8::Handle script, - QDeclarativeContextData *ctxt) + QQmlContextData *ctxt) { QV8ContextResource *resource = v8_resource_cast(qmlglobal); Q_ASSERT(resource); @@ -219,7 +219,7 @@ QObject *QV8ContextWrapper::setSecondaryScope(v8::Handle ctxt, QObje return rv; } -QDeclarativeContextData *QV8ContextWrapper::callingContext() +QQmlContextData *QV8ContextWrapper::callingContext() { v8::Local qmlglobal = v8::Context::GetCallingQmlGlobal(); if (qmlglobal.IsEmpty()) return 0; @@ -228,7 +228,7 @@ QDeclarativeContextData *QV8ContextWrapper::callingContext() return r?r->getContext():0; } -QDeclarativeContextData *QV8ContextWrapper::context(v8::Handle value) +QQmlContextData *QV8ContextWrapper::context(v8::Handle value) { if (!value->IsObject()) return 0; @@ -257,8 +257,8 @@ v8::Handle QV8ContextWrapper::Getter(v8::Local property, // Its possible we could delay the calculation of the "actual" context (in the case // of sub contexts) until it is definately needed. - QDeclarativeContextData *context = resource->getContext(); - QDeclarativeContextData *expressionContext = context; + QQmlContextData *context = resource->getContext(); + QQmlContextData *expressionContext = context; if (!context) return v8::Undefined(); @@ -283,7 +283,7 @@ v8::Handle QV8ContextWrapper::Getter(v8::Local property, if (context->imports && QV8Engine::startsWithUpper(property)) { // Search for attached properties, enums and imported scripts - QDeclarativeTypeNameCache::Result r = context->imports->query(propertystring); + QQmlTypeNameCache::Result r = context->imports->query(propertystring); if (r.isValid()) { if (r.scriptIndex != -1) { @@ -303,7 +303,7 @@ v8::Handle QV8ContextWrapper::Getter(v8::Local property, // Fall through } - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine->engine()); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine->engine()); QV8QObjectWrapper *qobjectWrapper = engine->qobjectWrapper(); if (resource->secondaryScope) { @@ -325,18 +325,18 @@ v8::Handle QV8ContextWrapper::Getter(v8::Local property, return engine->newQObject(context->idValues[propertyIdx]); } else { - QDeclarativeContextPrivate *cp = context->asQDeclarativeContextPrivate(); + QQmlContextPrivate *cp = context->asQQmlContextPrivate(); - ep->captureProperty(context->asQDeclarativeContext(), -1, + ep->captureProperty(context->asQQmlContext(), -1, propertyIdx + cp->notifyIndex); const QVariant &value = cp->propertyValues.at(propertyIdx); if (value.userType() == qMetaTypeId >()) { - QDeclarativeListProperty prop(context->asQDeclarativeContext(), (void*)propertyIdx, + QQmlListProperty prop(context->asQQmlContext(), (void*)propertyIdx, 0, - QDeclarativeContextPrivate::context_count, - QDeclarativeContextPrivate::context_at); - return engine->listWrapper()->newList(prop, qMetaTypeId >()); + QQmlContextPrivate::context_count, + QQmlContextPrivate::context_at); + return engine->listWrapper()->newList(prop, qMetaTypeId >()); } else { return engine->fromVariant(cp->propertyValues.at(propertyIdx)); } @@ -396,8 +396,8 @@ v8::Handle QV8ContextWrapper::Setter(v8::Local property, // Its possible we could delay the calculation of the "actual" context (in the case // of sub contexts) until it is definately needed. - QDeclarativeContextData *context = resource->getContext(); - QDeclarativeContextData *expressionContext = context; + QQmlContextData *context = resource->getContext(); + QQmlContextData *expressionContext = context; if (!context) return v8::Undefined(); diff --git a/src/declarative/qml/v8/qv8contextwrapper_p.h b/src/qml/qml/v8/qv8contextwrapper_p.h similarity index 91% rename from src/declarative/qml/v8/qv8contextwrapper_p.h rename to src/qml/qml/v8/qv8contextwrapper_p.h index eabbc15f15..117f16ab39 100644 --- a/src/declarative/qml/v8/qv8contextwrapper_p.h +++ b/src/qml/qml/v8/qv8contextwrapper_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE class QUrl; class QObject; class QV8Engine; -class QDeclarativeContextData; +class QQmlContextData; class QV8ContextWrapper { public: @@ -71,13 +71,13 @@ class QV8ContextWrapper void init(QV8Engine *); void destroy(); - v8::Local qmlScope(QDeclarativeContextData *ctxt, QObject *scope); + v8::Local qmlScope(QQmlContextData *ctxt, QObject *scope); v8::Local urlScope(const QUrl &); void setReadOnly(v8::Handle, bool); void addSubContext(v8::Handle qmlglobal, v8::Handle, - QDeclarativeContextData *ctxt); + QQmlContextData *ctxt); // XXX We only use the secondary scope to pass the "arguments" of the signal to // on properties. Instead of doing this we should rewrite the @@ -86,8 +86,8 @@ class QV8ContextWrapper // not members of the QV8Engine::illegalNames() set. QObject *setSecondaryScope(v8::Handle, QObject *); - QDeclarativeContextData *callingContext(); - QDeclarativeContextData *context(v8::Handle); + QQmlContextData *callingContext(); + QQmlContextData *context(v8::Handle); inline v8::Handle sharedContext() const; diff --git a/src/declarative/qml/v8/qv8debug_p.h b/src/qml/qml/v8/qv8debug_p.h similarity index 96% rename from src/declarative/qml/v8/qv8debug_p.h rename to src/qml/qml/v8/qv8debug_p.h index cf1d945712..4e1ec3e2ca 100644 --- a/src/declarative/qml/v8/qv8debug_p.h +++ b/src/qml/qml/v8/qv8debug_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qv8domerrors.cpp b/src/qml/qml/v8/qv8domerrors.cpp similarity index 98% rename from src/declarative/qml/v8/qv8domerrors.cpp rename to src/qml/qml/v8/qv8domerrors.cpp index 2f340e736f..7b8f10a27e 100644 --- a/src/declarative/qml/v8/qv8domerrors.cpp +++ b/src/qml/qml/v8/qv8domerrors.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qv8domerrors_p.h b/src/qml/qml/v8/qv8domerrors_p.h similarity index 97% rename from src/declarative/qml/v8/qv8domerrors_p.h rename to src/qml/qml/v8/qv8domerrors_p.h index 5131f960f1..5d5f277d55 100644 --- a/src/declarative/qml/v8/qv8domerrors_p.h +++ b/src/qml/qml/v8/qv8domerrors_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp similarity index 97% rename from src/declarative/qml/v8/qv8engine.cpp rename to src/qml/qml/v8/qv8engine.cpp index 04589fe244..4c2cce1525 100644 --- a/src/declarative/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -50,12 +50,12 @@ #include "qjsengine_p.h" #include "../../../3rdparty/javascriptcore/DateMath.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "qscript_impl_p.h" #include "qv8domerrors_p.h" @@ -67,7 +67,7 @@ Q_DECLARE_METATYPE(QList) // XXX TODO: Need to check all the global functions will also work in a worker script where the -// QDeclarativeEngine is not available +// QQmlEngine is not available QT_BEGIN_NAMESPACE static bool ObjectComparisonCallback(v8::Local lhs, v8::Local rhs) @@ -369,14 +369,14 @@ v8::Handle QV8Engine::fromVariant(const QVariant &variant) } if (m_engine) { - if (QDeclarativeValueType *vt = QDeclarativeEnginePrivate::get(m_engine)->valueTypes[type]) + if (QQmlValueType *vt = QQmlEnginePrivate::get(m_engine)->valueTypes[type]) return m_valueTypeWrapper.newValueType(variant, vt); } } else { - if (type == qMetaTypeId()) { - typedef QDeclarativeListReferencePrivate QDLRP; - QDLRP *p = QDLRP::get((QDeclarativeListReference*)ptr); + if (type == qMetaTypeId()) { + typedef QQmlListReferencePrivate QDLRP; + QDLRP *p = QDLRP::get((QQmlListReference*)ptr); if (p->object) { return m_listWrapper.newList(p->property, p->propertyType); } else { @@ -398,7 +398,7 @@ v8::Handle QV8Engine::fromVariant(const QVariant &variant) } bool objOk; - QObject *obj = QDeclarativeMetaType::toQObject(variant, &objOk); + QObject *obj = QQmlMetaType::toQObject(variant, &objOk); if (objOk) return newQObject(obj); @@ -453,7 +453,7 @@ v8::Local QV8Engine::qmlModeCompile(const char *source, int sourceLe QNetworkAccessManager *QV8Engine::networkAccessManager() { - return QDeclarativeEnginePrivate::get(m_engine)->getNetworkAccessManager(); + return QQmlEnginePrivate::get(m_engine)->getNetworkAccessManager(); } const QStringHash &QV8Engine::illegalNames() const @@ -474,7 +474,7 @@ v8::Local QV8Engine::getOwnPropertyNames(v8::Handle o) return v8::Local::Cast(r); } -QDeclarativeContextData *QV8Engine::callingContext() +QQmlContextData *QV8Engine::callingContext() { return m_contextWrapper.callingContext(); } @@ -542,7 +542,7 @@ struct StaticQtMetaObject : public QObject void QV8Engine::initializeGlobal(v8::Handle global) { - using namespace QDeclarativeBuiltinFunctions; + using namespace QQmlBuiltinFunctions; v8::Local console = v8::Object::New(); v8::Local consoleLogFn = V8FUNCTION(consoleLog, this); @@ -598,7 +598,7 @@ void QV8Engine::initializeGlobal(v8::Handle global) qt->Set(v8::String::New("locale"), V8FUNCTION(locale, this)); if (m_engine) { - qt->Set(v8::String::New("application"), newQObject(new QDeclarativeApplication(m_engine))); + qt->Set(v8::String::New("application"), newQObject(new QQuickApplication(m_engine))); qt->Set(v8::String::New("inputMethod"), newQObject(qGuiApp->inputMethod(), CppOwnership)); qt->Set(v8::String::New("lighter"), V8FUNCTION(lighter, this)); qt->Set(v8::String::New("darker"), V8FUNCTION(darker, this)); @@ -618,7 +618,7 @@ void QV8Engine::initializeGlobal(v8::Handle global) global->Set(v8::String::New("print"), consoleLogFn); global->Set(v8::String::New("console"), console); global->Set(v8::String::New("Qt"), qt); - global->Set(v8::String::New("gc"), V8FUNCTION(QDeclarativeBuiltinFunctions::gc, this)); + global->Set(v8::String::New("gc"), V8FUNCTION(QQmlBuiltinFunctions::gc, this)); { #define STRING_ARG "(function(stringArg) { "\ @@ -636,9 +636,9 @@ void QV8Engine::initializeGlobal(v8::Handle global) #undef STRING_ARG } - QDeclarativeLocale::registerStringLocaleCompare(this); - QDeclarativeDateExtension::registerExtension(this); - QDeclarativeNumberExtension::registerExtension(this); + QQmlLocale::registerStringLocaleCompare(this); + QQmlDateExtension::registerExtension(this); + QQmlNumberExtension::registerExtension(this); qt_add_domexceptions(this); m_xmlHttpRequestData = qt_add_qmlxmlhttprequest(this); @@ -785,9 +785,9 @@ v8::Persistent *QV8Engine::findOwnerAndStrength(QObject *object, boo QObject *parent = object->parent(); if (!parent) { // if the object has JS ownership, the object's v8object owns the lifetime of the persistent value. - if (QDeclarativeEngine::objectOwnership(object) == QDeclarativeEngine::JavaScriptOwnership) { + if (QQmlEngine::objectOwnership(object) == QQmlEngine::JavaScriptOwnership) { *shouldBeStrong = false; - return &(QDeclarativeData::get(object)->v8object); + return &(QQmlData::get(object)->v8object); } // no parent, and has CPP ownership - doesn't have an implicit parent. @@ -800,10 +800,10 @@ v8::Persistent *QV8Engine::findOwnerAndStrength(QObject *object, boo while (parent->parent()) parent = parent->parent(); - if (QDeclarativeEngine::objectOwnership(parent) == QDeclarativeEngine::JavaScriptOwnership) { + if (QQmlEngine::objectOwnership(parent) == QQmlEngine::JavaScriptOwnership) { // root parent is owned by JS. It's v8object owns the persistent value in question. *shouldBeStrong = false; - return &(QDeclarativeData::get(parent)->v8object); + return &(QQmlData::get(parent)->v8object); } else { // root parent has CPP ownership. The persistent value should not be made weak. *shouldBeStrong = true; @@ -847,7 +847,7 @@ void QV8Engine::addRelationshipForGC(QObject *object, QObject *other) { bool handleShouldBeStrong = false; v8::Persistent *implicitOwner = findOwnerAndStrength(object, &handleShouldBeStrong); - v8::Persistent handle = QDeclarativeData::get(other, true)->v8object; + v8::Persistent handle = QQmlData::get(other, true)->v8object; if (handleShouldBeStrong) { v8::V8::AddImplicitReferences(m_strongReferencer, &handle, 1); } else if (!implicitOwner->IsEmpty()) { @@ -882,7 +882,7 @@ void QV8Engine::initDeclarativeGlobalObject() freezeObject(m_context->Global()); } -void QV8Engine::setEngine(QDeclarativeEngine *engine) +void QV8Engine::setEngine(QQmlEngine *engine) { m_engine = engine; initDeclarativeGlobalObject(); diff --git a/src/declarative/qml/v8/qv8engine_impl_p.h b/src/qml/qml/v8/qv8engine_impl_p.h similarity index 98% rename from src/declarative/qml/v8/qv8engine_impl_p.h rename to src/qml/qml/v8/qv8engine_impl_p.h index 349589680a..ebb21f851c 100644 --- a/src/declarative/qml/v8/qv8engine_impl_p.h +++ b/src/qml/qml/v8/qv8engine_impl_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h similarity index 90% rename from src/declarative/qml/v8/qv8engine_p.h rename to src/qml/qml/v8/qv8engine_p.h index 4bfb991eae..22a8d7599f 100644 --- a/src/declarative/qml/v8/qv8engine_p.h +++ b/src/qml/qml/v8/qv8engine_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEV8ENGINE_P_H -#define QDECLARATIVEV8ENGINE_P_H +#ifndef QQMLV8ENGINE_P_H +#define QQMLV8ENGINE_P_H // // W A R N I N G @@ -70,7 +70,7 @@ #include "qscriptoriginalglobalobject_p.h" #include "qscripttools_p.h" -#include +#include #include "qv8contextwrapper_p.h" #include "qv8qobjectwrapper_p.h" @@ -165,63 +165,63 @@ inline T *v8_resource_check(v8::Handle object) { // class MyClass : public QObject { // Q_OBJECT // ... -// Q_INVOKABLE void myMethod(QDeclarativeV8Function*); +// Q_INVOKABLE void myMethod(QQmlV8Function*); // }; -// The QDeclarativeV8Function - and consequently the arguments and return value - only remains +// The QQmlV8Function - and consequently the arguments and return value - only remains // valid during the call. If the return value isn't set within myMethod(), the will return // undefined. class QV8Engine; -class QDeclarativeV8Function +class QQmlV8Function { public: int Length() const { return _ac; } v8::Local operator[](int idx) { return (*_a)->Get(idx); } - QDeclarativeContextData *context() { return _c; } + QQmlContextData *context() { return _c; } v8::Handle qmlGlobal() { return *_g; } void returnValue(v8::Handle rv) { *_r = rv; } QV8Engine *engine() const { return _e; } private: friend class QV8QObjectWrapper; - QDeclarativeV8Function(); - QDeclarativeV8Function(const QDeclarativeV8Function &); - QDeclarativeV8Function &operator=(const QDeclarativeV8Function &); + QQmlV8Function(); + QQmlV8Function(const QQmlV8Function &); + QQmlV8Function &operator=(const QQmlV8Function &); - QDeclarativeV8Function(int length, v8::Handle &args, + QQmlV8Function(int length, v8::Handle &args, v8::Handle &rv, v8::Handle &global, - QDeclarativeContextData *c, QV8Engine *e) + QQmlContextData *c, QV8Engine *e) : _ac(length), _a(&args), _r(&rv), _g(&global), _c(c), _e(e) {} int _ac; v8::Handle *_a; v8::Handle *_r; v8::Handle *_g; - QDeclarativeContextData *_c; + QQmlContextData *_c; QV8Engine *_e; }; -class QDeclarativeV8Handle +class QQmlV8Handle { public: - QDeclarativeV8Handle() : d(0) {} - QDeclarativeV8Handle(const QDeclarativeV8Handle &other) : d(other.d) {} - QDeclarativeV8Handle &operator=(const QDeclarativeV8Handle &other) { d = other.d; return *this; } + QQmlV8Handle() : d(0) {} + QQmlV8Handle(const QQmlV8Handle &other) : d(other.d) {} + QQmlV8Handle &operator=(const QQmlV8Handle &other) { d = other.d; return *this; } - static QDeclarativeV8Handle fromHandle(v8::Handle h) { - return QDeclarativeV8Handle(*h); + static QQmlV8Handle fromHandle(v8::Handle h) { + return QQmlV8Handle(*h); } v8::Handle toHandle() const { return v8::Handle((v8::Value *)d); } private: - QDeclarativeV8Handle(void *d) : d(d) {} + QQmlV8Handle(void *d) : d(d) {} void *d; }; class QObject; -class QDeclarativeEngine; -class QDeclarativeValueType; +class QQmlEngine; +class QQmlValueType; class QNetworkAccessManager; -class QDeclarativeContextData; +class QQmlContextData; class Q_AUTOTEST_EXPORT QV8GCCallback { @@ -244,7 +244,7 @@ class Q_AUTOTEST_EXPORT QV8GCCallback static void addGcCallbackNode(Node *node); }; -class Q_DECLARATIVE_EXPORT QV8Engine +class Q_QML_EXPORT QV8Engine { public: static QV8Engine* get(QJSEngine* q) { Q_ASSERT(q); return q->handle(); } @@ -253,7 +253,7 @@ class Q_DECLARATIVE_EXPORT QV8Engine QV8Engine(QJSEngine* qq,QJSEngine::ContextOwnership ownership = QJSEngine::CreateNewContext); virtual ~QV8Engine(); - // This enum should be in sync with QDeclarativeEngine::ObjectOwnership + // This enum should be in sync with QQmlEngine::ObjectOwnership enum ObjectOwnership { CppOwnership, JavaScriptOwnership }; struct Deletable { @@ -284,8 +284,8 @@ class Q_DECLARATIVE_EXPORT QV8Engine }; void initDeclarativeGlobalObject(); - void setEngine(QDeclarativeEngine *engine); - QDeclarativeEngine *engine() { return m_engine; } + void setEngine(QQmlEngine *engine); + QQmlEngine *engine() { return m_engine; } v8::Local global() { return m_context->Global(); } v8::Handle context() const { return m_context; } @@ -310,7 +310,7 @@ class Q_DECLARATIVE_EXPORT QV8Engine Deletable *listModelData() { return m_listModelData; } void setListModelData(Deletable *d) { if (m_listModelData) delete m_listModelData; m_listModelData = d; } - QDeclarativeContextData *callingContext(); + QQmlContextData *callingContext(); v8::Local getOwnPropertyNames(v8::Handle); inline QJSValuePrivate::PropertyFlags getPropertyFlags(v8::Handle object, v8::Handle property); @@ -335,7 +335,7 @@ class Q_DECLARATIVE_EXPORT QV8Engine int lineNumber = 1); // Return the QML global "scope" object for the \a ctxt context and \a scope object. - inline v8::Local qmlScope(QDeclarativeContextData *ctxt, QObject *scope); + inline v8::Local qmlScope(QQmlContextData *ctxt, QObject *scope); // Return a JS wrapper for the given QObject \a object inline v8::Handle newQObject(QObject *object); @@ -347,8 +347,8 @@ class Q_DECLARATIVE_EXPORT QV8Engine inline v8::Local toString(const QString &string); // Create a new value type object - inline v8::Handle newValueType(QObject *, int coreIndex, QDeclarativeValueType *); - inline v8::Handle newValueType(const QVariant &, QDeclarativeValueType *); + inline v8::Handle newValueType(QObject *, int coreIndex, QQmlValueType *); + inline v8::Handle newValueType(const QVariant &, QQmlValueType *); // Create a new sequence type object inline v8::Handle newSequence(int sequenceType, QObject *, int coreIndex, bool *succeeded); @@ -358,7 +358,7 @@ class Q_DECLARATIVE_EXPORT QV8Engine inline v8::Handle newQVariant(const QVariant &); // Return the network access manager for this engine. By default this returns the network - // access manager of the QDeclarativeEngine. It is overridden in the case of a threaded v8 + // access manager of the QQmlEngine. It is overridden in the case of a threaded v8 // instance (like in WorkerScript). virtual QNetworkAccessManager *networkAccessManager(); @@ -456,7 +456,7 @@ class Q_DECLARATIVE_EXPORT QV8Engine protected: QJSEngine* q; - QDeclarativeEngine *m_engine; + QQmlEngine *m_engine; bool m_ownsV8Context; v8::Persistent m_context; QScriptOriginalGlobalObject m_originalGlobalObject; @@ -555,7 +555,7 @@ bool QV8Engine::isVariant(v8::Handle value) return m_variantWrapper.isVariant(value); } -v8::Local QV8Engine::qmlScope(QDeclarativeContextData *ctxt, QObject *scope) +v8::Local QV8Engine::qmlScope(QQmlContextData *ctxt, QObject *scope) { return m_contextWrapper.qmlScope(ctxt, scope); } @@ -581,7 +581,7 @@ v8::Handle QV8Engine::newQObject(QObject *object, const ObjectOwnersh return v8::Null(); v8::Handle result = newQObject(object); - QDeclarativeData *ddata = QDeclarativeData::get(object, true); + QQmlData *ddata = QQmlData::get(object, true); if (ownership == JavaScriptOwnership && ddata) { ddata->indestructible = false; ddata->explicitIndestructibleSet = true; @@ -594,12 +594,12 @@ v8::Local QV8Engine::toString(const QString &string) return m_stringWrapper.toString(string); } -v8::Handle QV8Engine::newValueType(QObject *object, int property, QDeclarativeValueType *type) +v8::Handle QV8Engine::newValueType(QObject *object, int property, QQmlValueType *type) { return m_valueTypeWrapper.newValueType(object, property, type); } -v8::Handle QV8Engine::newValueType(const QVariant &value, QDeclarativeValueType *type) +v8::Handle QV8Engine::newValueType(const QVariant &value, QQmlValueType *type) { return m_valueTypeWrapper.newValueType(value, type); } @@ -628,4 +628,4 @@ QV8Engine::Deletable *QV8Engine::extensionData(int index) const QT_END_NAMESPACE -#endif // QDECLARATIVEV8ENGINE_P_H +#endif // QQMLV8ENGINE_P_H diff --git a/src/declarative/qml/v8/qv8include.cpp b/src/qml/qml/v8/qv8include.cpp similarity index 92% rename from src/declarative/qml/v8/qv8include.cpp rename to src/qml/qml/v8/qv8include.cpp index 116baee0e2..89f60f256e 100644 --- a/src/declarative/qml/v8/qv8include.cpp +++ b/src/qml/qml/v8/qv8include.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -41,16 +41,16 @@ #include "qv8include_p.h" -#include +#include #include #include #include -#include +#include QT_BEGIN_NAMESPACE -QV8Include::QV8Include(const QUrl &url, QV8Engine *engine, QDeclarativeContextData *context, +QV8Include::QV8Include(const QUrl &url, QV8Engine *engine, QQmlContextData *context, v8::Handle qmlglobal, v8::Handle callback) : m_engine(engine), m_network(0), m_reply(0), m_url(url), m_redirectCount(0), m_context(context) { @@ -130,9 +130,9 @@ void QV8Include::finished() QByteArray data = m_reply->readAll(); QString code = QString::fromUtf8(data); - QDeclarativeScript::Parser::extractPragmas(code); + QQmlScript::Parser::extractPragmas(code); - QDeclarativeContextData *importContext = new QDeclarativeContextData; + QQmlContextData *importContext = new QQmlContextData; importContext->isInternal = true; importContext->isJSContext = true; importContext->url = m_url; @@ -174,7 +174,7 @@ v8::Handle QV8Include::include(const v8::Arguments &args) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); - QDeclarativeContextData *context = engine->callingContext(); + QQmlContextData *context = engine->callingContext(); if (!context || !context->isJSContext) V8THROW_ERROR("Qt.include(): Can only be called from JavaScript files"); @@ -185,7 +185,7 @@ v8::Handle QV8Include::include(const v8::Arguments &args) if (args.Length() >= 2 && args[1]->IsFunction()) callbackFunction = v8::Local::Cast(args[1]); - QString localFile = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url); + QString localFile = QQmlEnginePrivate::urlToLocalFileOrQrc(url); v8::Local result; @@ -203,9 +203,9 @@ v8::Handle QV8Include::include(const v8::Arguments &args) if (f.open(QIODevice::ReadOnly)) { QByteArray data = f.readAll(); QString code = QString::fromUtf8(data); - QDeclarativeScript::Parser::extractPragmas(code); + QQmlScript::Parser::extractPragmas(code); - QDeclarativeContextData *importContext = new QDeclarativeContextData; + QQmlContextData *importContext = new QQmlContextData; importContext->isInternal = true; importContext->isJSContext = true; importContext->url = url; diff --git a/src/declarative/qml/v8/qv8include_p.h b/src/qml/qml/v8/qv8include_p.h similarity index 89% rename from src/declarative/qml/v8/qv8include_p.h rename to src/qml/qml/v8/qv8include_p.h index 89ff2967ed..f1e57b3eee 100644 --- a/src/declarative/qml/v8/qv8include_p.h +++ b/src/qml/qml/v8/qv8include_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -56,14 +56,14 @@ #include #include -#include -#include +#include +#include #include QT_BEGIN_NAMESPACE -class QDeclarativeEngine; +class QQmlEngine; class QNetworkAccessManager; class QNetworkReply; class QV8Engine; @@ -84,7 +84,7 @@ private slots: void finished(); private: - QV8Include(const QUrl &, QV8Engine *, QDeclarativeContextData *, + QV8Include(const QUrl &, QV8Engine *, QQmlContextData *, v8::Handle, v8::Handle); ~QV8Include(); @@ -95,7 +95,7 @@ private slots: QV8Engine *m_engine; QNetworkAccessManager *m_network; - QDeclarativeGuard m_reply; + QQmlGuard m_reply; QUrl m_url; int m_redirectCount; @@ -103,7 +103,7 @@ private slots: v8::Persistent m_callbackFunction; v8::Persistent m_resultObject; - QDeclarativeGuardedContextData m_context; + QQmlGuardedContextData m_context; v8::Persistent m_qmlglobal; }; diff --git a/src/declarative/qml/v8/qv8listwrapper.cpp b/src/qml/qml/v8/qv8listwrapper.cpp similarity index 93% rename from src/declarative/qml/v8/qv8listwrapper.cpp rename to src/qml/qml/v8/qv8listwrapper.cpp index 08b548aa08..d6eab7af34 100644 --- a/src/declarative/qml/v8/qv8listwrapper.cpp +++ b/src/qml/qml/v8/qv8listwrapper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -41,7 +41,7 @@ #include "qv8listwrapper_p.h" #include "qv8engine_p.h" -#include +#include QT_BEGIN_NAMESPACE @@ -51,8 +51,8 @@ class QV8ListResource : public QV8ObjectResource public: QV8ListResource(QV8Engine *engine) : QV8ObjectResource(engine) {} - QDeclarativeGuard object; - QDeclarativeListProperty property; + QQmlGuard object; + QQmlListProperty property; int propertyType; }; @@ -99,7 +99,7 @@ v8::Handle QV8ListWrapper::newList(QObject *object, int propId, int p return rv; } -v8::Handle QV8ListWrapper::newList(const QDeclarativeListProperty &prop, int propType) +v8::Handle QV8ListWrapper::newList(const QQmlListProperty &prop, int propType) { // XXX NewInstance() should be optimized v8::Local rv = m_constructor->NewInstance(); @@ -126,7 +126,7 @@ QVariant QV8ListWrapper::toVariant(QV8ObjectResource *r) if (!resource->object) return QVariant(); - return QVariant::fromValue(QDeclarativeListReferencePrivate::init(resource->property, resource->propertyType, + return QVariant::fromValue(QQmlListReferencePrivate::init(resource->property, resource->propertyType, m_engine->engine())); } diff --git a/src/declarative/qml/v8/qv8listwrapper_p.h b/src/qml/qml/v8/qv8listwrapper_p.h similarity index 94% rename from src/declarative/qml/v8/qv8listwrapper_p.h rename to src/qml/qml/v8/qv8listwrapper_p.h index 891e84de65..1e4bab06d5 100644 --- a/src/declarative/qml/v8/qv8listwrapper_p.h +++ b/src/qml/qml/v8/qv8listwrapper_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -54,7 +54,7 @@ // #include -#include +#include #include QT_BEGIN_NAMESPACE @@ -71,7 +71,7 @@ class QV8ListWrapper void destroy(); v8::Handle newList(QObject *, int, int); - v8::Handle newList(const QDeclarativeListProperty &, int); + v8::Handle newList(const QQmlListProperty &, int); QVariant toVariant(v8::Handle); QVariant toVariant(QV8ObjectResource *); diff --git a/src/declarative/qml/v8/qv8profiler_p.h b/src/qml/qml/v8/qv8profiler_p.h similarity index 96% rename from src/declarative/qml/v8/qv8profiler_p.h rename to src/qml/qml/v8/qv8profiler_p.h index 4aba9ecdb5..45df5a17c4 100644 --- a/src/declarative/qml/v8/qv8profiler_p.h +++ b/src/qml/qml/v8/qv8profiler_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qv8qobjectwrapper.cpp b/src/qml/qml/v8/qv8qobjectwrapper.cpp similarity index 89% rename from src/declarative/qml/v8/qv8qobjectwrapper.cpp rename to src/qml/qml/v8/qv8qobjectwrapper.cpp index 11733be5fd..b84ae339be 100644 --- a/src/declarative/qml/v8/qv8qobjectwrapper.cpp +++ b/src/qml/qml/v8/qv8qobjectwrapper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,23 +43,23 @@ #include "qv8contextwrapper_p.h" #include "qv8engine_p.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include -#include -#include +#include +#include -#include +#include #include #include #include Q_DECLARE_METATYPE(QJSValue); -Q_DECLARE_METATYPE(QDeclarativeV8Handle); +Q_DECLARE_METATYPE(QQmlV8Handle); QT_BEGIN_NAMESPACE @@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE #define QOBJECT_TOSTRING_INDEX -2 #define QOBJECT_DESTROY_INDEX -3 -// XXX TODO: Need to review all calls to QDeclarativeEngine *engine() to confirm QObjects work +// XXX TODO: Need to review all calls to QQmlEngine *engine() to confirm QObjects work // correctly in a worker thread class QV8QObjectResource : public QV8ObjectResource @@ -84,14 +84,14 @@ class QV8QObjectResource : public QV8ObjectResource public: QV8QObjectResource(QV8Engine *engine, QObject *object); - QDeclarativeGuard object; + QQmlGuard object; }; -class QV8QObjectInstance : public QDeclarativeGuard +class QV8QObjectInstance : public QQmlGuard { public: QV8QObjectInstance(QObject *o, QV8QObjectWrapper *w) - : QDeclarativeGuard(o), wrapper(w) + : QQmlGuard(o), wrapper(w) { } @@ -117,7 +117,7 @@ class QV8SignalHandlerResource : public QV8ObjectResource public: QV8SignalHandlerResource(QV8Engine *engine, QObject *object, int index); - QDeclarativeGuard object; + QQmlGuard object; int index; }; @@ -158,7 +158,7 @@ struct CallArgument { QString, QList, QJSValue, - QDeclarativeV8Handle>::Size]; + QQmlV8Handle>::Size]; qint64 q_for_alignment; }; @@ -168,7 +168,7 @@ struct CallArgument { QVariant *qvariantPtr; QList *qlistPtr; QJSValue *qjsValuePtr; - QDeclarativeV8Handle *handlePtr; + QQmlV8Handle *handlePtr; }; int type; @@ -216,8 +216,8 @@ void QV8QObjectWrapper::destroy() } struct ReadAccessor { - static inline void Indirect(QObject *object, const QDeclarativePropertyData &property, - void *output, QDeclarativeNotifier **n) + static inline void Indirect(QObject *object, const QQmlPropertyData &property, + void *output, QQmlNotifier **n) { Q_ASSERT(n == 0); Q_UNUSED(n); @@ -226,8 +226,8 @@ struct ReadAccessor { QMetaObject::metacall(object, QMetaObject::ReadProperty, property.coreIndex, args); } - static inline void Direct(QObject *object, const QDeclarativePropertyData &property, - void *output, QDeclarativeNotifier **n) + static inline void Direct(QObject *object, const QQmlPropertyData &property, + void *output, QQmlNotifier **n) { Q_ASSERT(n == 0); Q_UNUSED(n); @@ -236,8 +236,8 @@ struct ReadAccessor { object->qt_metacall(QMetaObject::ReadProperty, property.coreIndex, args); } - static inline void Accessor(QObject *object, const QDeclarativePropertyData &property, - void *output, QDeclarativeNotifier **n) + static inline void Accessor(QObject *object, const QQmlPropertyData &property, + void *output, QQmlNotifier **n) { Q_ASSERT(property.accessors); @@ -261,8 +261,8 @@ static inline v8::Handle valueToHandle(QV8Engine *, double v) static inline v8::Handle valueToHandle(QV8Engine *e, QObject *v) { return e->newQObject(v); } -template +template static v8::Handle GenericValueGetter(v8::Local, const v8::AccessorInfo &info) { v8::Handle This = info.This(); @@ -271,17 +271,17 @@ static v8::Handle GenericValueGetter(v8::Local, const v8: QObject *object = resource->object; if (!object) return v8::Undefined(); - QDeclarativePropertyData *property = - (QDeclarativePropertyData *)v8::External::Unwrap(info.Data()); + QQmlPropertyData *property = + (QQmlPropertyData *)v8::External::Unwrap(info.Data()); - QDeclarativeEngine *engine = resource->engine->engine(); - QDeclarativeEnginePrivate *ep = engine?QDeclarativeEnginePrivate::get(engine):0; + QQmlEngine *engine = resource->engine->engine(); + QQmlEnginePrivate *ep = engine?QQmlEnginePrivate::get(engine):0; T value = T(); if (ep && ep->propertyCapture) { if (ReadFunction == ReadAccessor::Accessor && property->accessors->notifier) { - QDeclarativeNotifier *notifier = 0; + QQmlNotifier *notifier = 0; ReadFunction(object, *property, &value, ¬ifier); if (notifier) ep->captureProperty(notifier); } else if (!property->isConstant()) { @@ -380,11 +380,11 @@ QObject *QV8QObjectWrapper::toQObject(QV8ObjectResource *r) } // Load value properties -template +template static v8::Handle LoadProperty(QV8Engine *engine, QObject *object, - const QDeclarativePropertyData &property, - QDeclarativeNotifier **notifier) + const QQmlPropertyData &property, + QQmlNotifier **notifier) { Q_ASSERT(!property.isFunction()); @@ -423,19 +423,19 @@ static v8::Handle LoadProperty(QV8Engine *engine, QObject *object, ReadFunction(object, property, &v, notifier); return valueToHandle(engine, v); } else if (property.isV8Handle()) { - QDeclarativeV8Handle handle; + QQmlV8Handle handle; ReadFunction(object, property, &handle, notifier); return handle.toHandle(); } else if (property.isQVariant()) { QVariant v; ReadFunction(object, property, &v, notifier); return engine->fromVariant(v); - } else if (QDeclarativeValueTypeFactory::isValueType((uint)property.propType) + } else if (QQmlValueTypeFactory::isValueType((uint)property.propType) && engine->engine()) { Q_ASSERT(notifier == 0); - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine->engine()); - QDeclarativeValueType *valueType = ep->valueTypes[property.propType]; + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine->engine()); + QQmlValueType *valueType = ep->valueTypes[property.propType]; if (valueType) return engine->newValueType(object, property.coreIndex, valueType); } else { @@ -500,28 +500,28 @@ v8::Handle QV8QObjectWrapper::GetProperty(QV8Engine *engine, QObject } } - QDeclarativePropertyData local; - QDeclarativePropertyData *result = 0; + QQmlPropertyData local; + QQmlPropertyData *result = 0; { - QDeclarativeData *ddata = QDeclarativeData::get(object, false); + QQmlData *ddata = QQmlData::get(object, false); if (ddata && ddata->propertyCache) result = ddata->propertyCache->property(property); else - result = QDeclarativePropertyCache::property(engine->engine(), object, property, local); + result = QQmlPropertyCache::property(engine->engine(), object, property, local); } if (!result) return v8::Handle(); if (revisionMode == QV8QObjectWrapper::CheckRevision && result->revision != 0) { - QDeclarativeData *ddata = QDeclarativeData::get(object); + QQmlData *ddata = QQmlData::get(object); if (ddata && ddata->propertyCache && !ddata->propertyCache->isAllowedInRevision(result)) return v8::Handle(); } if (result->isFunction()) { if (result->isVMEFunction()) { - return ((QDeclarativeVMEMetaObject *)(object->metaObject()))->vmeMethod(result->coreIndex); + return ((QQmlVMEMetaObject *)(object->metaObject()))->vmeMethod(result->coreIndex); } else if (result->isV8Function()) { return MethodClosure::createWithGlobal(engine, object, objectHandle, result->coreIndex); } else if (result->isSignalHandler()) { @@ -534,12 +534,12 @@ v8::Handle QV8QObjectWrapper::GetProperty(QV8Engine *engine, QObject } } - QDeclarativeEnginePrivate *ep = - engine->engine()?QDeclarativeEnginePrivate::get(engine->engine()):0; + QQmlEnginePrivate *ep = + engine->engine()?QQmlEnginePrivate::get(engine->engine()):0; if (result->hasAccessors()) { - QDeclarativeNotifier *n = 0; - QDeclarativeNotifier **nptr = 0; + QQmlNotifier *n = 0; + QQmlNotifier **nptr = 0; if (ep && ep->propertyCapture && result->accessors->notifier) nptr = &n; @@ -558,13 +558,13 @@ v8::Handle QV8QObjectWrapper::GetProperty(QV8Engine *engine, QObject if (ep && !result->isConstant()) { if (result->coreIndex == 0) - ep->captureProperty(QDeclarativeData::get(object, true)->objectNameNotifier()); + ep->captureProperty(QQmlData::get(object, true)->objectNameNotifier()); else ep->captureProperty(object, result->coreIndex, result->notifyIndex); } if (result->isVMEProperty()) { - typedef QDeclarativeVMEMetaObject VMEMO; + typedef QQmlVMEMetaObject VMEMO; VMEMO *vmemo = const_cast(static_cast(object->metaObject())); return vmemo->vmeProperty(result->coreIndex); } else if (result->isDirect()) { @@ -575,13 +575,13 @@ v8::Handle QV8QObjectWrapper::GetProperty(QV8Engine *engine, QObject } // Setter for writable properties. Shared between the interceptor and fast property accessor -static inline void StoreProperty(QV8Engine *engine, QObject *object, QDeclarativePropertyData *property, +static inline void StoreProperty(QV8Engine *engine, QObject *object, QQmlPropertyData *property, v8::Handle value) { - QDeclarativeBinding *newBinding = 0; + QQmlBinding *newBinding = 0; if (value->IsFunction()) { - QDeclarativeContextData *context = engine->callingContext(); + QQmlContextData *context = engine->callingContext(); v8::Handle function = v8::Handle::Cast(value); v8::Local trace = @@ -592,15 +592,15 @@ static inline void StoreProperty(QV8Engine *engine, QObject *object, QDeclarativ int columNumber = frame->GetColumn(); QString url = engine->toString(frame->GetScriptName()); - newBinding = new QDeclarativeBinding(&function, object, context); + newBinding = new QQmlBinding(&function, object, context); newBinding->setSourceLocation(url, lineNumber, columNumber); newBinding->setTarget(object, *property, context); newBinding->setEvaluateFlags(newBinding->evaluateFlags() | - QDeclarativeBinding::RequiresThisObject); + QQmlBinding::RequiresThisObject); } - QDeclarativeAbstractBinding *oldBinding = - QDeclarativePropertyPrivate::setBinding(object, property->coreIndex, -1, newBinding); + QQmlAbstractBinding *oldBinding = + QQmlPropertyPrivate::setBinding(object, property->coreIndex, -1, newBinding); if (oldBinding) oldBinding->destroy(); @@ -636,7 +636,7 @@ static inline void StoreProperty(QV8Engine *engine, QObject *object, QDeclarativ } else if (property->propType == QMetaType::QString && value->IsString()) { PROPERTY_STORE(QString, engine->toString(value->ToString())); } else if (property->isVMEProperty()) { - static_cast(const_cast(object->metaObject()))->setVMEProperty(property->coreIndex, value); + static_cast(const_cast(object->metaObject()))->setVMEProperty(property->coreIndex, value); } else { QVariant v; if (property->isQList()) @@ -644,8 +644,8 @@ static inline void StoreProperty(QV8Engine *engine, QObject *object, QDeclarativ else v = engine->toVariant(value, property->propType); - QDeclarativeContextData *context = engine->callingContext(); - if (!QDeclarativePropertyPrivate::write(object, *property, v, context)) { + QQmlContextData *context = engine->callingContext(); + if (!QQmlPropertyPrivate::write(object, *property, v, context)) { const char *valueType = 0; if (v.userType() == QVariant::Invalid) valueType = "null"; else valueType = QMetaType::typeName(v.userType()); @@ -666,15 +666,15 @@ bool QV8QObjectWrapper::SetProperty(QV8Engine *engine, QObject *object, const QH engine->qobjectWrapper()->m_destroyString == property) return true; - QDeclarativePropertyData local; - QDeclarativePropertyData *result = 0; - result = QDeclarativePropertyCache::property(engine->engine(), object, property, local); + QQmlPropertyData local; + QQmlPropertyData *result = 0; + result = QQmlPropertyCache::property(engine->engine(), object, property, local); if (!result) return false; if (revisionMode == QV8QObjectWrapper::CheckRevision && result->revision != 0) { - QDeclarativeData *ddata = QDeclarativeData::get(object); + QQmlData *ddata = QQmlData::get(object); if (ddata && ddata->propertyCache && !ddata->propertyCache->isAllowedInRevision(result)) return false; } @@ -712,10 +712,10 @@ v8::Handle QV8QObjectWrapper::Getter(v8::Local property, if (QV8Engine::startsWithUpper(property)) { // Check for attached properties - QDeclarativeContextData *context = v8engine->callingContext(); + QQmlContextData *context = v8engine->callingContext(); if (context && context->imports) { - QDeclarativeTypeNameCache::Result r = context->imports->query(propertystring); + QQmlTypeNameCache::Result r = context->imports->query(propertystring); if (r.isValid()) { if (r.scriptIndex != -1) { @@ -773,9 +773,9 @@ v8::Handle QV8QObjectWrapper::Query(v8::Local property, QHashedV8String propertystring(property); - QDeclarativePropertyData local; - QDeclarativePropertyData *result = 0; - result = QDeclarativePropertyCache::property(engine->engine(), object, propertystring, local); + QQmlPropertyData local; + QQmlPropertyData *result = 0; + result = QQmlPropertyCache::property(engine->engine(), object, propertystring, local); if (!result) return v8::Handle(); @@ -796,12 +796,12 @@ v8::Handle QV8QObjectWrapper::Enumerator(const v8::AccessorInfo &info QStringList result; - QDeclarativeEnginePrivate *ep = resource->engine->engine() - ? QDeclarativeEnginePrivate::get(resource->engine->engine()) + QQmlEnginePrivate *ep = resource->engine->engine() + ? QQmlEnginePrivate::get(resource->engine->engine()) : 0; - QDeclarativePropertyCache *cache = 0; - QDeclarativeData *ddata = QDeclarativeData::get(object); + QQmlPropertyCache *cache = 0; + QQmlData *ddata = QQmlData::get(object); if (ddata) cache = ddata->propertyCache; @@ -839,16 +839,16 @@ static void FastValueSetter(v8::Local, v8::Local value, QObject *object = resource->object; - QDeclarativePropertyData *property = - (QDeclarativePropertyData *)v8::External::Unwrap(info.Data()); + QQmlPropertyData *property = + (QQmlPropertyData *)v8::External::Unwrap(info.Data()); int index = property->coreIndex; - QDeclarativeData *ddata = QDeclarativeData::get(object, false); + QQmlData *ddata = QQmlData::get(object, false); Q_ASSERT(ddata); Q_ASSERT(ddata->propertyCache); - QDeclarativePropertyData *pdata = ddata->propertyCache->property(index); + QQmlPropertyData *pdata = ddata->propertyCache->property(index); Q_ASSERT(pdata); Q_ASSERT(pdata->isWritable() || pdata->isQList()); @@ -881,7 +881,7 @@ static void WeakQObjectReferenceCallback(v8::Persistent handle, void QObject *object = resource->object; if (object) { - QDeclarativeData *ddata = QDeclarativeData::get(object, false); + QQmlData *ddata = QQmlData::get(object, false); if (ddata) { ddata->v8object.Clear(); if (!object->parent() && !ddata->indestructible) @@ -899,13 +899,13 @@ static void WeakQObjectInstanceCallback(v8::Persistent handle, void * qPersistentDispose(handle); } -v8::Local QDeclarativePropertyCache::newQObject(QObject *object, QV8Engine *engine) +v8::Local QQmlPropertyCache::newQObject(QObject *object, QV8Engine *engine) { Q_ASSERT(object); Q_ASSERT(this->engine); - Q_ASSERT(QDeclarativeData::get(object, false)); - Q_ASSERT(QDeclarativeData::get(object, false)->propertyCache == this); + Q_ASSERT(QQmlData::get(object, false)); + Q_ASSERT(QQmlData::get(object, false)->propertyCache == this); // Setup constructor if (constructor.IsEmpty()) { @@ -930,7 +930,7 @@ v8::Local QDeclarativePropertyCache::newQObject(QObject *object, QV8 uniqueHash.insert(iter); } - QDeclarativePropertyData *property = *iter; + QQmlPropertyData *property = *iter; if (property->notFullyResolved()) resolve(property); if (property->isFunction()) @@ -971,7 +971,7 @@ v8::Local QDeclarativePropertyCache::newQObject(QObject *object, QV8 ft->InstanceTemplate()->SetHasExternalResource(true); } - // We wrap the raw QDeclarativePropertyData pointer here. This is safe as the + // We wrap the raw QQmlPropertyData pointer here. This is safe as the // pointer will remain valid at least as long as the lifetime of any QObject's of // this type and the property accessor checks if the object is 0 (deleted) before // dereferencing the pointer. @@ -992,7 +992,7 @@ v8::Local QDeclarativePropertyCache::newQObject(QObject *object, QV8 constructor = qPersistentNew(ft->GetFunction()); } - QDeclarativeCleanup::addToEngine(this->engine); + QQmlCleanup::addToEngine(this->engine); } v8::Local result = constructor->NewInstance(); @@ -1001,12 +1001,12 @@ v8::Local QDeclarativePropertyCache::newQObject(QObject *object, QV8 return result; } -v8::Local QV8QObjectWrapper::newQObject(QObject *object, QDeclarativeData *ddata, QV8Engine *engine) +v8::Local QV8QObjectWrapper::newQObject(QObject *object, QQmlData *ddata, QV8Engine *engine) { v8::Local rv; if (!ddata->propertyCache && engine->engine()) { - ddata->propertyCache = QDeclarativeEnginePrivate::get(engine->engine())->cache(object); + ddata->propertyCache = QQmlEnginePrivate::get(engine->engine())->cache(object); if (ddata->propertyCache) ddata->propertyCache->addref(); } @@ -1027,14 +1027,14 @@ As V8 doesn't support an equality callback, for QObject's we have to return exac V8 handle for subsequent calls to newQObject for the same QObject. To do this we have a two pronged strategy: 1. If there is no current outstanding V8 handle to the QObject, we create one and store a - persistent handle in QDeclarativeData::v8object. We mark the QV8QObjectWrapper that - "owns" this handle by setting the QDeclarativeData::v8objectid to the id of this + persistent handle in QQmlData::v8object. We mark the QV8QObjectWrapper that + "owns" this handle by setting the QQmlData::v8objectid to the id of this QV8QObjectWrapper. - 2. If another QV8QObjectWrapper has create the handle in QDeclarativeData::v8object we create + 2. If another QV8QObjectWrapper has create the handle in QQmlData::v8object we create an entry in the m_taintedObject hash where we store the handle and mark the object as - "tainted" in the QDeclarativeData::hasTaintedV8Object flag. + "tainted" in the QQmlData::hasTaintedV8Object flag. We have to mark the object as tainted to ensure that we search our m_taintedObject hash even -in the case that the original QV8QObjectWrapper owner of QDeclarativeData::v8object has +in the case that the original QV8QObjectWrapper owner of QQmlData::v8object has released the handle. */ v8::Handle QV8QObjectWrapper::newQObject(QObject *object) @@ -1045,7 +1045,7 @@ v8::Handle QV8QObjectWrapper::newQObject(QObject *object) if (QObjectPrivate::get(object)->wasDeleted) return v8::Undefined(); - QDeclarativeData *ddata = QDeclarativeData::get(object, true); + QQmlData *ddata = QQmlData::get(object, true); if (!ddata) return v8::Undefined(); @@ -1132,7 +1132,7 @@ QPair QV8QObjectWrapper::ExtractQtMethod(QV8Engine *engine, v8:: return qMakePair((QObject *)0, -1); } -class QV8QObjectConnectionList : public QObject, public QDeclarativeGuard +class QV8QObjectConnectionList : public QObject, public QQmlGuard { public: QV8QObjectConnectionList(QObject *object, QV8Engine *engine); @@ -1179,7 +1179,7 @@ class QV8QObjectConnectionList : public QObject, public QDeclarativeGuard(object), engine(engine), needsDestroy(false), inUse(0) +: QQmlGuard(object), engine(engine), needsDestroy(false), inUse(0) { } @@ -1222,7 +1222,7 @@ int QV8QObjectConnectionList::qt_metacall(QMetaObject::Call method, int index, v QList connections = connectionList; QVarLengthArray dummy; - int *argsTypes = QDeclarativePropertyCache::methodParameterTypes(data(), index, dummy, 0); + int *argsTypes = QQmlPropertyCache::methodParameterTypes(data(), index, dummy, 0); v8::HandleScope handle_scope; v8::Context::Scope scope(engine->context()); @@ -1252,12 +1252,12 @@ int QV8QObjectConnectionList::qt_metacall(QMetaObject::Call method, int index, v } if (try_catch.HasCaught()) { - QDeclarativeError error; + QQmlError error; error.setDescription(QString(QLatin1String("Unknown exception occurred during evaluation of connected function: %1")).arg(engine->toString(connection.function->GetName()))); v8::Local message = try_catch.Message(); if (!message.IsEmpty()) - QDeclarativeExpressionPrivate::exceptionToError(message, error); - QDeclarativeEnginePrivate::get(engine->engine())->warning(error); + QQmlExpressionPrivate::exceptionToError(message, error); + QQmlEnginePrivate::get(engine->engine())->warning(error); } } @@ -1649,11 +1649,11 @@ static QByteArray QMetaMethod_name(const QMetaMethod &m) /*! Returns the next related method, if one, or 0. */ -static const QDeclarativePropertyData * RelatedMethod(QObject *object, - const QDeclarativePropertyData *current, - QDeclarativePropertyData &dummy) +static const QQmlPropertyData * RelatedMethod(QObject *object, + const QQmlPropertyData *current, + QQmlPropertyData &dummy) { - QDeclarativePropertyCache *cache = QDeclarativeData::get(object)->propertyCache; + QQmlPropertyCache *cache = QQmlData::get(object)->propertyCache; if (!current->isOverload()) return 0; @@ -1677,7 +1677,7 @@ static const QDeclarativePropertyData * RelatedMethod(QObject *object, QByteArray methodName = QMetaMethod_name(method); for (int ii = current->overrideIndex - 1; ii >= methodOffset; --ii) { if (methodName == QMetaMethod_name(mo->method(ii))) { - dummy.setFlags(dummy.getFlags() | QDeclarativePropertyData::IsOverload); + dummy.setFlags(dummy.getFlags() | QQmlPropertyData::IsOverload); dummy.overrideIndexIsProperty = 0; dummy.overrideIndex = ii; return &dummy; @@ -1688,7 +1688,7 @@ static const QDeclarativePropertyData * RelatedMethod(QObject *object, } } -static v8::Handle CallPrecise(QObject *object, const QDeclarativePropertyData &data, +static v8::Handle CallPrecise(QObject *object, const QQmlPropertyData &data, QV8Engine *engine, CallArgs &callArgs) { if (data.hasArguments()) { @@ -1697,7 +1697,7 @@ static v8::Handle CallPrecise(QObject *object, const QDeclarativeProp QVarLengthArray dummy; QByteArray unknownTypeError; - args = QDeclarativePropertyCache::methodParameterTypes(object, data.coreIndex, dummy, + args = QQmlPropertyCache::methodParameterTypes(object, data.coreIndex, dummy, &unknownTypeError); if (!args) { @@ -1735,24 +1735,24 @@ Resolve the overloaded method to call. The algorithm works conceptually like th If two or more overloads have the same match score, call the last one. The match score is constructed by adding the matchScore() result for each of the parameters. */ -static v8::Handle CallOverloaded(QObject *object, const QDeclarativePropertyData &data, +static v8::Handle CallOverloaded(QObject *object, const QQmlPropertyData &data, QV8Engine *engine, CallArgs &callArgs) { int argumentCount = callArgs.Length(); - const QDeclarativePropertyData *best = 0; + const QQmlPropertyData *best = 0; int bestParameterScore = INT_MAX; int bestMatchScore = INT_MAX; - QDeclarativePropertyData dummy; - const QDeclarativePropertyData *attempt = &data; + QQmlPropertyData dummy; + const QQmlPropertyData *attempt = &data; do { QVarLengthArray dummy; int methodArgumentCount = 0; int *methodArgTypes = 0; if (attempt->hasArguments()) { - typedef QDeclarativePropertyCache PC; + typedef QQmlPropertyCache PC; int *args = PC::methodParameterTypes(object, attempt->coreIndex, dummy, 0); if (!args) // Must be an unknown argument continue; @@ -1787,7 +1787,7 @@ static v8::Handle CallOverloaded(QObject *object, const QDeclarativeP return CallPrecise(object, *best, engine, callArgs); } else { QString error = QLatin1String("Unable to determine callable overload. Candidates are:"); - const QDeclarativePropertyData *candidate = &data; + const QQmlPropertyData *candidate = &data; while (candidate) { error += QLatin1String("\n ") + QString::fromUtf8(object->metaObject()->method(candidate->coreIndex).signature()); @@ -1825,7 +1825,7 @@ static v8::Handle ToString(QV8Engine *engine, QObject *object, int, v static v8::Handle Destroy(QV8Engine *, QObject *object, int argCount, v8::Handle args) { - QDeclarativeData *ddata = QDeclarativeData::get(object, false); + QQmlData *ddata = QQmlData::get(object, false); if (!ddata || ddata->indestructible) { const char *error = "Invalid attempt to destroy() an indestructible object"; v8::ThrowException(v8::Exception::Error(v8::String::New(error))); @@ -1883,11 +1883,11 @@ v8::Handle QV8QObjectWrapper::Invoke(const v8::Arguments &args) } } - QDeclarativePropertyData method; + QQmlPropertyData method; - if (QDeclarativeData *ddata = static_cast(QObjectPrivate::get(object)->declarativeData)) { + if (QQmlData *ddata = static_cast(QObjectPrivate::get(object)->declarativeData)) { if (ddata->propertyCache) { - QDeclarativePropertyData *d = ddata->propertyCache->method(index); + QQmlPropertyData *d = ddata->propertyCache->method(index); if (!d) return v8::Undefined(); method = *d; @@ -1905,10 +1905,10 @@ v8::Handle QV8QObjectWrapper::Invoke(const v8::Arguments &args) v8::Handle rv; v8::Handle qmlglobal = args[2]->ToObject(); - QDeclarativeV8Function func(argCount, arguments, rv, qmlglobal, + QQmlV8Function func(argCount, arguments, rv, qmlglobal, resource->engine->contextWrapper()->context(qmlglobal), resource->engine); - QDeclarativeV8Function *funcptr = &func; + QQmlV8Function *funcptr = &func; void *args[] = { 0, &funcptr }; QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, method.coreIndex, args); @@ -1982,9 +1982,9 @@ void CallArgument::initAsType(int callType) } else if (callType == qMetaTypeId >()) { type = callType; qlistPtr = new (&allocData) QList(); - } else if (callType == qMetaTypeId()) { + } else if (callType == qMetaTypeId()) { type = callType; - handlePtr = new (&allocData) QDeclarativeV8Handle; + handlePtr = new (&allocData) QQmlV8Handle; } else { type = -1; qvariantPtr = new (&allocData) QVariant(callType, (void *)0); @@ -2036,14 +2036,14 @@ void CallArgument::fromValue(int callType, QV8Engine *engine, v8::Handleappend(engine->toQObject(value)); } type = callType; - } else if (callType == qMetaTypeId()) { - handlePtr = new (&allocData) QDeclarativeV8Handle(QDeclarativeV8Handle::fromHandle(value)); + } else if (callType == qMetaTypeId()) { + handlePtr = new (&allocData) QQmlV8Handle(QQmlV8Handle::fromHandle(value)); type = callType; } else { qvariantPtr = new (&allocData) QVariant(); type = -1; - QDeclarativeEnginePrivate *ep = engine->engine() ? QDeclarativeEnginePrivate::get(engine->engine()) : 0; + QQmlEnginePrivate *ep = engine->engine() ? QQmlEnginePrivate::get(engine->engine()) : 0; QVariant v = engine->toVariant(value, -1); if (v.userType() == callType) { @@ -2086,7 +2086,7 @@ v8::Handle CallArgument::toValue(QV8Engine *engine) } else if (type == QMetaType::QObjectStar) { QObject *object = qobjectPtr; if (object) - QDeclarativeData::get(object, true)->setImplicitDestructible(); + QQmlData::get(object, true)->setImplicitDestructible(); return engine->newQObject(object); } else if (type == qMetaTypeId >()) { // XXX Can this be made more by using Array as a prototype and implementing @@ -2096,13 +2096,13 @@ v8::Handle CallArgument::toValue(QV8Engine *engine) for (int ii = 0; ii < list.count(); ++ii) array->Set(ii, engine->newQObject(list.at(ii))); return array; - } else if (type == qMetaTypeId()) { + } else if (type == qMetaTypeId()) { return handlePtr->toHandle(); } else if (type == -1 || type == qMetaTypeId()) { QVariant value = *qvariantPtr; v8::Handle rv = engine->fromVariant(value); if (QObject *object = engine->toQObject(rv)) - QDeclarativeData::get(object, true)->setImplicitDestructible(); + QQmlData::get(object, true)->setImplicitDestructible(); return rv; } else { return v8::Undefined(); diff --git a/src/declarative/qml/v8/qv8qobjectwrapper_p.h b/src/qml/qml/v8/qv8qobjectwrapper_p.h similarity index 91% rename from src/declarative/qml/v8/qv8qobjectwrapper_p.h rename to src/qml/qml/v8/qv8qobjectwrapper_p.h index c029285d08..f7b965690b 100644 --- a/src/declarative/qml/v8/qv8qobjectwrapper_p.h +++ b/src/qml/qml/v8/qv8qobjectwrapper_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -59,19 +59,19 @@ #include #include #include -#include -#include +#include +#include QT_BEGIN_NAMESPACE class QObject; class QV8Engine; -class QDeclarativeData; +class QQmlData; class QV8ObjectResource; class QV8QObjectInstance; class QV8QObjectConnectionList; -class QDeclarativePropertyCache; -class Q_DECLARATIVE_EXPORT QV8QObjectWrapper +class QQmlPropertyCache; +class Q_QML_EXPORT QV8QObjectWrapper { public: QV8QObjectWrapper(); @@ -90,11 +90,11 @@ class Q_DECLARATIVE_EXPORT QV8QObjectWrapper inline bool setProperty(QObject *, const QHashedV8String &, v8::Handle, RevisionMode); private: - friend class QDeclarativePropertyCache; + friend class QQmlPropertyCache; friend class QV8QObjectConnectionList; friend class QV8QObjectInstance; - v8::Local newQObject(QObject *, QDeclarativeData *, QV8Engine *); + v8::Local newQObject(QObject *, QQmlData *, QV8Engine *); static v8::Handle GetProperty(QV8Engine *, QObject *, v8::Handle *, const QHashedV8String &, QV8QObjectWrapper::RevisionMode); static bool SetProperty(QV8Engine *, QObject *, const QHashedV8String &, @@ -131,7 +131,7 @@ class Q_DECLARATIVE_EXPORT QV8QObjectWrapper v8::Handle QV8QObjectWrapper::getProperty(QObject *object, const QHashedV8String &string, RevisionMode mode) { - QDeclarativeData *dd = QDeclarativeData::get(object, false); + QQmlData *dd = QQmlData::get(object, false); if (!dd || !dd->propertyCache || m_toStringString == string || m_destroyString == string || dd->propertyCache->property(string)) { return GetProperty(m_engine, object, 0, string, mode); @@ -143,7 +143,7 @@ v8::Handle QV8QObjectWrapper::getProperty(QObject *object, const QHas bool QV8QObjectWrapper::setProperty(QObject *object, const QHashedV8String &string, v8::Handle value, RevisionMode mode) { - QDeclarativeData *dd = QDeclarativeData::get(object, false); + QQmlData *dd = QQmlData::get(object, false); if (!dd || !dd->propertyCache || m_toStringString == string || m_destroyString == string || dd->propertyCache->property(string)) { return SetProperty(m_engine, object, string, value, mode); diff --git a/src/declarative/qml/v8/qv8sequencewrapper.cpp b/src/qml/qml/v8/qv8sequencewrapper.cpp similarity index 98% rename from src/declarative/qml/v8/qv8sequencewrapper.cpp rename to src/qml/qml/v8/qv8sequencewrapper.cpp index 7d7184e83d..883ed1b60c 100644 --- a/src/declarative/qml/v8/qv8sequencewrapper.cpp +++ b/src/qml/qml/v8/qv8sequencewrapper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "qv8sequencewrapper_p.h" #include "qv8sequencewrapper_p_p.h" diff --git a/src/declarative/qml/v8/qv8sequencewrapper_p.h b/src/qml/qml/v8/qv8sequencewrapper_p.h similarity index 98% rename from src/declarative/qml/v8/qv8sequencewrapper_p.h rename to src/qml/qml/v8/qv8sequencewrapper_p.h index fae21d0b88..104135ff76 100644 --- a/src/declarative/qml/v8/qv8sequencewrapper_p.h +++ b/src/qml/qml/v8/qv8sequencewrapper_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qv8sequencewrapper_p_p.h b/src/qml/qml/v8/qv8sequencewrapper_p_p.h similarity index 97% rename from src/declarative/qml/v8/qv8sequencewrapper_p_p.h rename to src/qml/qml/v8/qv8sequencewrapper_p_p.h index 41cdcaa8b7..9d519809fa 100644 --- a/src/declarative/qml/v8/qv8sequencewrapper_p_p.h +++ b/src/qml/qml/v8/qv8sequencewrapper_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -53,8 +53,8 @@ // We mean it. // -#include -#include +#include +#include QT_BEGIN_NAMESPACE @@ -113,11 +113,11 @@ static void generateWarning(QV8Engine *engine, const QString& description) if (currFrame.IsEmpty()) return; - QDeclarativeError retn; + QQmlError retn; retn.setDescription(description); retn.setLine(currFrame->GetLineNumber()); retn.setUrl(QUrl(engine->toString(currFrame->GetScriptName()))); - QDeclarativeEnginePrivate::warning(engine->engine(), retn); + QQmlEnginePrivate::warning(engine->engine(), retn); } @@ -480,13 +480,13 @@ static QString convertUrlToString(QV8Engine *, const QUrl &v) Q_ASSERT(object); \ Q_ASSERT(objectType == QV8SequenceResource::Reference); \ int status = -1; \ - QDeclarativePropertyPrivate::WriteFlags flags = \ - QDeclarativePropertyPrivate::DontRemoveBinding; \ + QQmlPropertyPrivate::WriteFlags flags = \ + QQmlPropertyPrivate::DontRemoveBinding; \ void *a[] = { &c, 0, &status, &flags }; \ QMetaObject::metacall(object, QMetaObject::WriteProperty, propertyIndex, a); \ } \ private: \ - QDeclarativeGuard object; \ + QQmlGuard object; \ int propertyIndex; \ SequenceType c; \ }; diff --git a/src/declarative/qml/v8/qv8sqlerrors.cpp b/src/qml/qml/v8/qv8sqlerrors.cpp similarity index 97% rename from src/declarative/qml/v8/qv8sqlerrors.cpp rename to src/qml/qml/v8/qv8sqlerrors.cpp index f5e868650e..8c5856ea18 100644 --- a/src/declarative/qml/v8/qv8sqlerrors.cpp +++ b/src/qml/qml/v8/qv8sqlerrors.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qv8sqlerrors_p.h b/src/qml/qml/v8/qv8sqlerrors_p.h similarity index 97% rename from src/declarative/qml/v8/qv8sqlerrors_p.h rename to src/qml/qml/v8/qv8sqlerrors_p.h index 8f4668cedd..c799be6e7c 100644 --- a/src/declarative/qml/v8/qv8sqlerrors_p.h +++ b/src/qml/qml/v8/qv8sqlerrors_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qv8stringwrapper.cpp b/src/qml/qml/v8/qv8stringwrapper.cpp similarity index 97% rename from src/declarative/qml/v8/qv8stringwrapper.cpp rename to src/qml/qml/v8/qv8stringwrapper.cpp index bff932150d..d4abbdc60b 100644 --- a/src/declarative/qml/v8/qv8stringwrapper.cpp +++ b/src/qml/qml/v8/qv8stringwrapper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/qv8stringwrapper_p.h b/src/qml/qml/v8/qv8stringwrapper_p.h similarity index 90% rename from src/declarative/qml/v8/qv8stringwrapper_p.h rename to src/qml/qml/v8/qv8stringwrapper_p.h index 89fd5448d7..1609720298 100644 --- a/src/declarative/qml/v8/qv8stringwrapper_p.h +++ b/src/qml/qml/v8/qv8stringwrapper_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEV8STRINGWRAPPER_P_H -#define QDECLARATIVEV8STRINGWRAPPER_P_H +#ifndef QQMLV8STRINGWRAPPER_P_H +#define QQMLV8STRINGWRAPPER_P_H // // W A R N I N G @@ -53,12 +53,14 @@ // We mean it. // +#include + #include #include QT_BEGIN_NAMESPACE -class Q_DECLARATIVE_EXPORT QV8StringWrapper +class Q_QML_EXPORT QV8StringWrapper { public: QV8StringWrapper(); @@ -73,4 +75,4 @@ class Q_DECLARATIVE_EXPORT QV8StringWrapper QT_END_NAMESPACE -#endif // QDECLARATIVEV8STRINGWRAPPER_P_H +#endif // QQMLV8STRINGWRAPPER_P_H diff --git a/src/declarative/qml/v8/qv8typewrapper.cpp b/src/qml/qml/v8/qv8typewrapper.cpp similarity index 90% rename from src/declarative/qml/v8/qv8typewrapper.cpp rename to src/qml/qml/v8/qv8typewrapper.cpp index d9060be309..dbf369e678 100644 --- a/src/declarative/qml/v8/qv8typewrapper.cpp +++ b/src/qml/qml/v8/qv8typewrapper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,8 +42,8 @@ #include "qv8contextwrapper_p.h" #include "qv8engine_p.h" -#include -#include +#include +#include #include #include @@ -60,10 +60,10 @@ class QV8TypeResource : public QV8ObjectResource QV8TypeWrapper::TypeNameMode mode; - QDeclarativeGuard object; + QQmlGuard object; - QDeclarativeType *type; - QDeclarativeTypeNameCache *typeNamespace; + QQmlType *type; + QQmlTypeNameCache *typeNamespace; const void *importNamespace; }; @@ -101,7 +101,7 @@ void QV8TypeWrapper::init(QV8Engine *engine) } // Returns a type wrapper for type t on o. This allows access of enums, and attached properties. -v8::Local QV8TypeWrapper::newObject(QObject *o, QDeclarativeType *t, TypeNameMode mode) +v8::Local QV8TypeWrapper::newObject(QObject *o, QQmlType *t, TypeNameMode mode) { Q_ASSERT(t); // XXX NewInstance() should be optimized @@ -114,7 +114,7 @@ v8::Local QV8TypeWrapper::newObject(QObject *o, QDeclarativeType *t, // Returns a type wrapper for importNamespace (of t) on o. This allows nested resolution of a type in a // namespace. -v8::Local QV8TypeWrapper::newObject(QObject *o, QDeclarativeTypeNameCache *t, +v8::Local QV8TypeWrapper::newObject(QObject *o, QQmlTypeNameCache *t, const void *importNamespace, TypeNameMode mode) { Q_ASSERT(t); @@ -135,7 +135,7 @@ QVariant QV8TypeWrapper::toVariant(QV8ObjectResource *r) QV8Engine *v8engine = resource->engine; if (resource->typeNamespace) { - if (QDeclarativeMetaType::ModuleApiInstance *moduleApi = resource->typeNamespace->moduleApi(resource->importNamespace)) { + if (QQmlMetaType::ModuleApiInstance *moduleApi = resource->typeNamespace->moduleApi(resource->importNamespace)) { if (moduleApi->scriptCallback) { moduleApi->scriptApi = moduleApi->scriptCallback(v8engine->engine(), v8engine->engine()); moduleApi->scriptCallback = 0; @@ -170,7 +170,7 @@ v8::Handle QV8TypeWrapper::Getter(v8::Local property, QHashedV8String propertystring(property); if (resource->type) { - QDeclarativeType *type = resource->type; + QQmlType *type = resource->type; if (QV8Engine::startsWithUpper(property)) { int value = type->enumValue(propertystring); @@ -192,7 +192,7 @@ v8::Handle QV8TypeWrapper::Getter(v8::Local property, } else if (resource->typeNamespace) { Q_ASSERT(resource->importNamespace); - QDeclarativeTypeNameCache::Result r = resource->typeNamespace->query(propertystring, + QQmlTypeNameCache::Result r = resource->typeNamespace->query(propertystring, resource->importNamespace); if (r.isValid()) { @@ -200,13 +200,13 @@ v8::Handle QV8TypeWrapper::Getter(v8::Local property, return v8engine->typeWrapper()->newObject(object, r.type, resource->mode); } else if (r.scriptIndex != -1) { int index = r.scriptIndex; - QDeclarativeContextData *context = v8engine->callingContext(); + QQmlContextData *context = v8engine->callingContext(); if (index < context->importedScripts.count()) return context->importedScripts.at(index); } return v8::Undefined(); - } else if (QDeclarativeMetaType::ModuleApiInstance *moduleApi = resource->typeNamespace->moduleApi(resource->importNamespace)) { + } else if (QQmlMetaType::ModuleApiInstance *moduleApi = resource->typeNamespace->moduleApi(resource->importNamespace)) { if (moduleApi->scriptCallback) { moduleApi->scriptApi = moduleApi->scriptCallback(v8engine->engine(), v8engine->engine()); @@ -273,14 +273,14 @@ v8::Handle QV8TypeWrapper::Setter(v8::Local property, QHashedV8String propertystring(property); if (resource->type && resource->object) { - QDeclarativeType *type = resource->type; + QQmlType *type = resource->type; QObject *object = resource->object; QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(), object); if (ao) v8engine->qobjectWrapper()->setProperty(ao, propertystring, value, QV8QObjectWrapper::IgnoreRevision); } else if (resource->typeNamespace) { - if (QDeclarativeMetaType::ModuleApiInstance *moduleApi = resource->typeNamespace->moduleApi(resource->importNamespace)) { + if (QQmlMetaType::ModuleApiInstance *moduleApi = resource->typeNamespace->moduleApi(resource->importNamespace)) { if (moduleApi->scriptCallback) { moduleApi->scriptApi = moduleApi->scriptCallback(v8engine->engine(), v8engine->engine()); moduleApi->scriptCallback = 0; diff --git a/src/declarative/qml/v8/qv8typewrapper_p.h b/src/qml/qml/v8/qv8typewrapper_p.h similarity index 90% rename from src/declarative/qml/v8/qv8typewrapper_p.h rename to src/qml/qml/v8/qv8typewrapper_p.h index d30dbfbc24..8b658da6fb 100644 --- a/src/declarative/qml/v8/qv8typewrapper_p.h +++ b/src/qml/qml/v8/qv8typewrapper_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -60,8 +60,8 @@ QT_BEGIN_NAMESPACE class QObject; class QV8Engine; -class QDeclarativeType; -class QDeclarativeTypeNameCache; +class QQmlType; +class QQmlTypeNameCache; class QV8TypeWrapper { public: @@ -72,8 +72,8 @@ class QV8TypeWrapper void destroy(); enum TypeNameMode { IncludeEnums, ExcludeEnums }; - v8::Local newObject(QObject *, QDeclarativeType *, TypeNameMode = IncludeEnums); - v8::Local newObject(QObject *, QDeclarativeTypeNameCache *, const void *, + v8::Local newObject(QObject *, QQmlType *, TypeNameMode = IncludeEnums); + v8::Local newObject(QObject *, QQmlTypeNameCache *, const void *, TypeNameMode = IncludeEnums); QVariant toVariant(QV8ObjectResource *); diff --git a/src/declarative/qml/v8/qv8valuetypewrapper.cpp b/src/qml/qml/v8/qv8valuetypewrapper.cpp similarity index 91% rename from src/declarative/qml/v8/qv8valuetypewrapper.cpp rename to src/qml/qml/v8/qv8valuetypewrapper.cpp index 7da3d8a2dc..54d871d5f0 100644 --- a/src/declarative/qml/v8/qv8valuetypewrapper.cpp +++ b/src/qml/qml/v8/qv8valuetypewrapper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,8 +42,8 @@ #include "qv8valuetypewrapper_p.h" #include "qv8engine_p.h" -#include -#include +#include +#include QT_BEGIN_NAMESPACE @@ -57,7 +57,7 @@ class QV8ValueTypeResource : public QV8ObjectResource QV8ValueTypeResource(QV8Engine *engine, ObjectType objectType); ObjectType objectType; - QDeclarativeValueType *type; + QQmlValueType *type; }; class QV8ValueTypeReferenceResource : public QV8ValueTypeResource @@ -65,7 +65,7 @@ class QV8ValueTypeReferenceResource : public QV8ValueTypeResource public: QV8ValueTypeReferenceResource(QV8Engine *engine); - QDeclarativeGuard object; + QQmlGuard object; int property; }; @@ -128,7 +128,7 @@ void QV8ValueTypeWrapper::init(QV8Engine *engine) toStringHash = m_toStringString.hash(); } -v8::Local QV8ValueTypeWrapper::newValueType(QObject *object, int property, QDeclarativeValueType *type) +v8::Local QV8ValueTypeWrapper::newValueType(QObject *object, int property, QQmlValueType *type) { // XXX NewInstance() should be optimized v8::Local rv = m_constructor->NewInstance(); @@ -138,7 +138,7 @@ v8::Local QV8ValueTypeWrapper::newValueType(QObject *object, int pro return rv; } -v8::Local QV8ValueTypeWrapper::newValueType(const QVariant &value, QDeclarativeValueType *type) +v8::Local QV8ValueTypeWrapper::newValueType(const QVariant &value, QQmlValueType *type) { // XXX NewInstance() should be optimized v8::Local rv = m_constructor->NewInstance(); @@ -249,14 +249,14 @@ v8::Handle QV8ValueTypeWrapper::Getter(v8::Local property } } - QDeclarativePropertyData local; - QDeclarativePropertyData *result = 0; + QQmlPropertyData local; + QQmlPropertyData *result = 0; { - QDeclarativeData *ddata = QDeclarativeData::get(r->type, false); + QQmlData *ddata = QQmlData::get(r->type, false); if (ddata && ddata->propertyCache) result = ddata->propertyCache->property(propertystring); else - result = QDeclarativePropertyCache::property(r->engine->engine(), r->type, + result = QQmlPropertyCache::property(r->engine->engine(), r->type, propertystring, local); } @@ -321,15 +321,15 @@ v8::Handle QV8ValueTypeWrapper::Setter(v8::Local property r->type->read(reference->object, reference->property); QMetaProperty p = r->type->metaObject()->property(index); - QDeclarativeBinding *newBinding = 0; + QQmlBinding *newBinding = 0; if (value->IsFunction()) { - QDeclarativeContextData *context = r->engine->callingContext(); + QQmlContextData *context = r->engine->callingContext(); v8::Handle function = v8::Handle::Cast(value); - QDeclarativePropertyData cacheData; - cacheData.setFlags(QDeclarativePropertyData::IsWritable | - QDeclarativePropertyData::IsValueTypeVirtual); + QQmlPropertyData cacheData; + cacheData.setFlags(QQmlPropertyData::IsWritable | + QQmlPropertyData::IsValueTypeVirtual); cacheData.propType = reference->object->metaObject()->property(reference->property).userType(); cacheData.coreIndex = reference->property; cacheData.valueTypeFlags = 0; @@ -345,15 +345,15 @@ v8::Handle QV8ValueTypeWrapper::Setter(v8::Local property int columnNumber = frame->GetColumn(); QString url = r->engine->toString(frame->GetScriptName()); - newBinding = new QDeclarativeBinding(&function, reference->object, context); + newBinding = new QQmlBinding(&function, reference->object, context); newBinding->setSourceLocation(url, lineNumber, columnNumber); newBinding->setTarget(reference->object, cacheData, context); newBinding->setEvaluateFlags(newBinding->evaluateFlags() | - QDeclarativeBinding::RequiresThisObject); + QQmlBinding::RequiresThisObject); } - QDeclarativeAbstractBinding *oldBinding = - QDeclarativePropertyPrivate::setBinding(reference->object, reference->property, index, newBinding); + QQmlAbstractBinding *oldBinding = + QQmlPropertyPrivate::setBinding(reference->object, reference->property, index, newBinding); if (oldBinding) oldBinding->destroy(); diff --git a/src/declarative/qml/v8/qv8valuetypewrapper_p.h b/src/qml/qml/v8/qv8valuetypewrapper_p.h similarity index 91% rename from src/declarative/qml/v8/qv8valuetypewrapper_p.h rename to src/qml/qml/v8/qv8valuetypewrapper_p.h index 09f6e7def3..b80d3cbbba 100644 --- a/src/declarative/qml/v8/qv8valuetypewrapper_p.h +++ b/src/qml/qml/v8/qv8valuetypewrapper_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -54,7 +54,7 @@ // #include -#include +#include #include #include @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE class QV8Engine; class QV8ObjectResource; -class QDeclarativeValueType; +class QQmlValueType; class QV8ValueTypeWrapper { public: @@ -72,8 +72,8 @@ class QV8ValueTypeWrapper void init(QV8Engine *); void destroy(); - v8::Local newValueType(QObject *, int, QDeclarativeValueType *); - v8::Local newValueType(const QVariant &, QDeclarativeValueType *); + v8::Local newValueType(QObject *, int, QQmlValueType *); + v8::Local newValueType(const QVariant &, QQmlValueType *); QVariant toVariant(v8::Handle); QVariant toVariant(QV8ObjectResource *); diff --git a/src/declarative/qml/v8/qv8variantresource_p.h b/src/qml/qml/v8/qv8variantresource_p.h similarity index 92% rename from src/declarative/qml/v8/qv8variantresource_p.h rename to src/qml/qml/v8/qv8variantresource_p.h index dd8664ff15..0b6328cb54 100644 --- a/src/declarative/qml/v8/qv8variantresource_p.h +++ b/src/qml/qml/v8/qv8variantresource_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -56,12 +56,12 @@ #include #include #include -#include +#include QT_BEGIN_NAMESPACE class QV8VariantResource : public QV8ObjectResource, - public QDeclarativeEnginePrivate::ScarceResourceData + public QQmlEnginePrivate::ScarceResourceData { V8_RESOURCE_TYPE(VariantType) diff --git a/src/declarative/qml/v8/qv8variantwrapper.cpp b/src/qml/qml/v8/qv8variantwrapper.cpp similarity index 95% rename from src/declarative/qml/v8/qv8variantwrapper.cpp rename to src/qml/qml/v8/qv8variantwrapper.cpp index cd9d09e451..4b1fc643f6 100644 --- a/src/declarative/qml/v8/qv8variantwrapper.cpp +++ b/src/qml/qml/v8/qv8variantwrapper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,12 +42,12 @@ #include "qv8variantwrapper_p.h" #include "qv8variantresource_p.h" #include "qv8engine_p.h" -#include +#include QT_BEGIN_NAMESPACE QV8VariantResource::QV8VariantResource(QV8Engine *engine, const QVariant &data) -: QV8ObjectResource(engine), QDeclarativeEnginePrivate::ScarceResourceData(data), m_isScarceResource(false), m_vmePropertyReferenceCount(0) +: QV8ObjectResource(engine), QQmlEnginePrivate::ScarceResourceData(data), m_isScarceResource(false), m_vmePropertyReferenceCount(0) { } @@ -67,7 +67,7 @@ void QV8VariantResource::removeVmePropertyReference() // and add to the ep->scarceResources list // since it is now eligible to be released // automatically by the engine. - QDeclarativeEnginePrivate::get(engine->engine())->scarceResources.insert(this); + QQmlEnginePrivate::get(engine->engine())->scarceResources.insert(this); } } @@ -143,7 +143,7 @@ v8::Local QV8VariantWrapper::newVariant(const QVariant &value) QV8VariantResource *r = new QV8VariantResource(m_engine, value); if (scarceResource) { - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(m_engine->engine()); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(m_engine->engine()); Q_ASSERT(ep->scarceResourcesRefCount); rv = m_scarceConstructor->NewInstance(); r->m_isScarceResource = true; diff --git a/src/declarative/qml/v8/qv8variantwrapper_p.h b/src/qml/qml/v8/qv8variantwrapper_p.h similarity index 97% rename from src/declarative/qml/v8/qv8variantwrapper_p.h rename to src/qml/qml/v8/qv8variantwrapper_p.h index 578acf01c8..877155c8ca 100644 --- a/src/declarative/qml/v8/qv8variantwrapper_p.h +++ b/src/qml/qml/v8/qv8variantwrapper_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -54,7 +54,7 @@ // #include -#include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/declarative/qml/v8/qv8worker.cpp b/src/qml/qml/v8/qv8worker.cpp similarity index 96% rename from src/declarative/qml/v8/qv8worker.cpp rename to src/qml/qml/v8/qv8worker.cpp index 90c8b8441d..6ea527166c 100644 --- a/src/declarative/qml/v8/qv8worker.cpp +++ b/src/qml/qml/v8/qv8worker.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -41,8 +41,8 @@ #include "qv8worker_p.h" -#include -#include +#include +#include QT_BEGIN_NAMESPACE @@ -242,9 +242,9 @@ void QV8Worker::serialize(QByteArray &data, v8::Handle v, QV8Engine * } else if (engine->isQObject(v)) { // XXX TODO: Generalize passing objects between the main thread and worker scripts so // that others can trivially plug in their elements. - QDeclarativeListModel *lm = qobject_cast(engine->toQObject(v)); + QQuickListModel *lm = qobject_cast(engine->toQObject(v)); if (lm && lm->agent()) { - QDeclarativeListModelWorkerAgent *agent = lm->agent(); + QQuickListModelWorkerAgent *agent = lm->agent(); agent->addref(); push(data, valueheader(WorkerListModel)); push(data, (void *)agent); @@ -347,10 +347,10 @@ v8::Handle QV8Worker::deserialize(const char *&data, QV8Engine *engin case WorkerListModel: { void *ptr = popPtr(data); - QDeclarativeListModelWorkerAgent *agent = (QDeclarativeListModelWorkerAgent *)ptr; + QQuickListModelWorkerAgent *agent = (QQuickListModelWorkerAgent *)ptr; v8::Handle rv = engine->newQObject(agent); if (rv->IsObject()) { - QDeclarativeListModelWorkerAgent::VariantRef ref(agent); + QQuickListModelWorkerAgent::VariantRef ref(agent); QVariant var = qVariantFromValue(ref); rv->ToObject()->SetHiddenValue(v8::String::New("qml::ref"), engine->fromVariant(var)); } diff --git a/src/declarative/qml/v8/qv8worker_p.h b/src/qml/qml/v8/qv8worker_p.h similarity index 97% rename from src/declarative/qml/v8/qv8worker_p.h rename to src/qml/qml/v8/qv8worker_p.h index f920446b27..d398d21f60 100644 --- a/src/declarative/qml/v8/qv8worker_p.h +++ b/src/qml/qml/v8/qv8worker_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/declarative/qml/v8/script.pri b/src/qml/qml/v8/script.pri similarity index 100% rename from src/declarative/qml/v8/script.pri rename to src/qml/qml/v8/script.pri diff --git a/src/declarative/qml/v8/v8.pri b/src/qml/qml/v8/v8.pri similarity index 93% rename from src/declarative/qml/v8/v8.pri rename to src/qml/qml/v8/v8.pri index 72416c4dbb..de492a8ce5 100644 --- a/src/declarative/qml/v8/v8.pri +++ b/src/qml/qml/v8/v8.pri @@ -24,7 +24,7 @@ HEADERS += \ $$PWD/qv8engine_impl_p.h \ $$PWD/qv8domerrors_p.h \ $$PWD/qv8sqlerrors_p.h \ - $$PWD/qdeclarativebuiltinfunctions_p.h + $$PWD/qqmlbuiltinfunctions_p.h SOURCES += \ $$PWD/qv8stringwrapper.cpp \ @@ -42,4 +42,4 @@ SOURCES += \ $$PWD/../../../3rdparty/javascriptcore/DateMath.cpp \ $$PWD/qv8domerrors.cpp \ $$PWD/qv8sqlerrors.cpp \ - $$PWD/qdeclarativebuiltinfunctions.cpp \ No newline at end of file + $$PWD/qqmlbuiltinfunctions.cpp \ No newline at end of file diff --git a/src/qml/qtqmlglobal.h b/src/qml/qtqmlglobal.h new file mode 100644 index 0000000000..65277e60a9 --- /dev/null +++ b/src/qml/qtqmlglobal.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTQMLGLOBAL_H +#define QTQMLGLOBAL_H + +#include + +#if defined(Q_OS_WIN) +# if defined(QT_MAKEDLL) /* create a Qt DLL library */ +# if defined(QT_BUILD_QML_LIB) +# define Q_QML_EXPORT Q_DECL_EXPORT +# else +# define Q_QML_EXPORT Q_DECL_IMPORT +# endif +# elif defined(QT_DLL) /* use a Qt DLL library */ +# define Q_QML_EXPORT Q_DECL_IMPORT +# endif +#endif + +#if !defined(Q_QML_EXPORT) +# if defined(QT_SHARED) +# define Q_QML_EXPORT Q_DECL_EXPORT +# else +# define Q_QML_EXPORT +# endif +#endif + +#endif // QTQMLGLOBAL_H diff --git a/src/qml/qtqmlglobal_p.h b/src/qml/qtqmlglobal_p.h new file mode 100644 index 0000000000..36926228c7 --- /dev/null +++ b/src/qml/qtqmlglobal_p.h @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTQMLGLOBAL_P_H +#define QTQMLGLOBAL_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. +// + +#include "qtqmlglobal.h" + +#define Q_QML_PRIVATE_EXPORT Q_QML_EXPORT + +#endif // QTQMLGLOBAL_P_H diff --git a/src/declarative/util/qdeclarativepropertymap.cpp b/src/qml/util/qqmlpropertymap.cpp similarity index 67% rename from src/declarative/util/qdeclarativepropertymap.cpp rename to src/qml/util/qqmlpropertymap.cpp index 8ec1517017..5010af17c8 100644 --- a/src/declarative/util/qdeclarativepropertymap.cpp +++ b/src/qml/util/qqmlpropertymap.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,42 +39,42 @@ ** ****************************************************************************/ -#include "qdeclarativepropertymap.h" +#include "qqmlpropertymap.h" #include -#include +#include #include QT_BEGIN_NAMESPACE -//QDeclarativePropertyMapMetaObject lets us listen for changes coming from QML +//QQmlPropertyMapMetaObject lets us listen for changes coming from QML //so we can emit the changed signal. -class QDeclarativePropertyMapMetaObject : public QDeclarativeOpenMetaObject +class QQmlPropertyMapMetaObject : public QQmlOpenMetaObject { public: - QDeclarativePropertyMapMetaObject(QDeclarativePropertyMap *obj, QDeclarativePropertyMapPrivate *objPriv); + QQmlPropertyMapMetaObject(QQmlPropertyMap *obj, QQmlPropertyMapPrivate *objPriv); protected: virtual void propertyWritten(int index); virtual void propertyCreated(int, QMetaPropertyBuilder &); virtual int createProperty(const char *, const char *); private: - QDeclarativePropertyMap *map; - QDeclarativePropertyMapPrivate *priv; + QQmlPropertyMap *map; + QQmlPropertyMapPrivate *priv; }; -class QDeclarativePropertyMapPrivate : public QObjectPrivate +class QQmlPropertyMapPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativePropertyMap) + Q_DECLARE_PUBLIC(QQmlPropertyMap) public: - QDeclarativePropertyMapMetaObject *mo; + QQmlPropertyMapMetaObject *mo; QStringList keys; void emitChanged(const QString &key, const QVariant &value); bool validKeyName(const QString& name); }; -bool QDeclarativePropertyMapPrivate::validKeyName(const QString& name) +bool QQmlPropertyMapPrivate::validKeyName(const QString& name) { //The following strings shouldn't be used as property names return name != QLatin1String("keys") @@ -84,53 +84,53 @@ bool QDeclarativePropertyMapPrivate::validKeyName(const QString& name) && name != QLatin1String("deleteLater"); } -void QDeclarativePropertyMapPrivate::emitChanged(const QString &key, const QVariant &value) +void QQmlPropertyMapPrivate::emitChanged(const QString &key, const QVariant &value) { - Q_Q(QDeclarativePropertyMap); + Q_Q(QQmlPropertyMap); emit q->valueChanged(key, value); } -QDeclarativePropertyMapMetaObject::QDeclarativePropertyMapMetaObject(QDeclarativePropertyMap *obj, QDeclarativePropertyMapPrivate *objPriv) : QDeclarativeOpenMetaObject(obj) +QQmlPropertyMapMetaObject::QQmlPropertyMapMetaObject(QQmlPropertyMap *obj, QQmlPropertyMapPrivate *objPriv) : QQmlOpenMetaObject(obj) { map = obj; priv = objPriv; } -void QDeclarativePropertyMapMetaObject::propertyWritten(int index) +void QQmlPropertyMapMetaObject::propertyWritten(int index) { priv->emitChanged(QString::fromUtf8(name(index)), operator[](index)); } -void QDeclarativePropertyMapMetaObject::propertyCreated(int, QMetaPropertyBuilder &b) +void QQmlPropertyMapMetaObject::propertyCreated(int, QMetaPropertyBuilder &b) { priv->keys.append(QString::fromUtf8(b.name())); } -int QDeclarativePropertyMapMetaObject::createProperty(const char *name, const char *value) +int QQmlPropertyMapMetaObject::createProperty(const char *name, const char *value) { if (!priv->validKeyName(QString::fromUtf8(name))) return -1; - return QDeclarativeOpenMetaObject::createProperty(name, value); + return QQmlOpenMetaObject::createProperty(name, value); } /*! - \class QDeclarativePropertyMap - \brief The QDeclarativePropertyMap class allows you to set key-value pairs that can be used in QML bindings. + \class QQmlPropertyMap + \brief The QQmlPropertyMap 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. + QQmlPropertyMap 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 access it in QML. In the C++ file: \code // create our data - QDeclarativePropertyMap ownerData; + QQmlPropertyMap ownerData; ownerData.insert("name", QVariant(QString("John Smith"))); ownerData.insert("phone", QVariant(QString("555-5555"))); // expose it to the UI layer - QDeclarativeView view; - QDeclarativeContext *ctxt = view.rootContext(); + QQuickView view; + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("owner", &ownerData); view.setSource(QUrl::fromLocalFile("main.qml")); @@ -156,26 +156,26 @@ int QDeclarativePropertyMapMetaObject::createProperty(const char *name, const ch /*! Constructs a bindable map with parent object \a parent. */ -QDeclarativePropertyMap::QDeclarativePropertyMap(QObject *parent) -: QObject(*(new QDeclarativePropertyMapPrivate), parent) +QQmlPropertyMap::QQmlPropertyMap(QObject *parent) +: QObject(*(new QQmlPropertyMapPrivate), parent) { - Q_D(QDeclarativePropertyMap); - d->mo = new QDeclarativePropertyMapMetaObject(this, d); + Q_D(QQmlPropertyMap); + d->mo = new QQmlPropertyMapMetaObject(this, d); } /*! Destroys the bindable map. */ -QDeclarativePropertyMap::~QDeclarativePropertyMap() +QQmlPropertyMap::~QQmlPropertyMap() { } /*! Clears the value (if any) associated with \a key. */ -void QDeclarativePropertyMap::clear(const QString &key) +void QQmlPropertyMap::clear(const QString &key) { - Q_D(QDeclarativePropertyMap); + Q_D(QQmlPropertyMap); d->mo->setValue(key.toUtf8(), QVariant()); } @@ -185,9 +185,9 @@ void QDeclarativePropertyMap::clear(const QString &key) If no value has been set for this key (or if the value has been cleared), an invalid QVariant is returned. */ -QVariant QDeclarativePropertyMap::value(const QString &key) const +QVariant QQmlPropertyMap::value(const QString &key) const { - Q_D(const QDeclarativePropertyMap); + Q_D(const QQmlPropertyMap); return d->mo->value(key.toUtf8()); } @@ -196,9 +196,9 @@ QVariant QDeclarativePropertyMap::value(const QString &key) const If the key doesn't exist, it is automatically created. */ -void QDeclarativePropertyMap::insert(const QString &key, const QVariant &value) +void QQmlPropertyMap::insert(const QString &key, const QVariant &value) { - Q_D(QDeclarativePropertyMap); + Q_D(QQmlPropertyMap); if (d->validKeyName(key)) { d->mo->setValue(key.toUtf8(), value); @@ -215,9 +215,9 @@ void QDeclarativePropertyMap::insert(const QString &key, const QVariant &value) Keys that have been cleared will still appear in this list, even though their associated values are invalid QVariants. */ -QStringList QDeclarativePropertyMap::keys() const +QStringList QQmlPropertyMap::keys() const { - Q_D(const QDeclarativePropertyMap); + Q_D(const QQmlPropertyMap); return d->keys; } @@ -226,9 +226,9 @@ QStringList QDeclarativePropertyMap::keys() const Same as size(). */ -int QDeclarativePropertyMap::count() const +int QQmlPropertyMap::count() const { - Q_D(const QDeclarativePropertyMap); + Q_D(const QQmlPropertyMap); return d->keys.count(); } @@ -237,9 +237,9 @@ int QDeclarativePropertyMap::count() const \sa isEmpty(), count() */ -int QDeclarativePropertyMap::size() const +int QQmlPropertyMap::size() const { - Q_D(const QDeclarativePropertyMap); + Q_D(const QQmlPropertyMap); return d->keys.size(); } @@ -249,9 +249,9 @@ int QDeclarativePropertyMap::size() const \sa size() */ -bool QDeclarativePropertyMap::isEmpty() const +bool QQmlPropertyMap::isEmpty() const { - Q_D(const QDeclarativePropertyMap); + Q_D(const QQmlPropertyMap); return d->keys.isEmpty(); } @@ -260,9 +260,9 @@ bool QDeclarativePropertyMap::isEmpty() const \sa size() */ -bool QDeclarativePropertyMap::contains(const QString &key) const +bool QQmlPropertyMap::contains(const QString &key) const { - Q_D(const QDeclarativePropertyMap); + Q_D(const QQmlPropertyMap); return d->keys.contains(key); } @@ -276,10 +276,10 @@ bool QDeclarativePropertyMap::contains(const QString &key) const \sa insert(), value() */ -QVariant &QDeclarativePropertyMap::operator[](const QString &key) +QVariant &QQmlPropertyMap::operator[](const QString &key) { //### optimize - Q_D(QDeclarativePropertyMap); + Q_D(QQmlPropertyMap); QByteArray utf8key = key.toUtf8(); if (!d->keys.contains(key)) insert(key, QVariant());//force creation -- needed below @@ -292,13 +292,13 @@ QVariant &QDeclarativePropertyMap::operator[](const QString &key) Same as value(). */ -QVariant QDeclarativePropertyMap::operator[](const QString &key) const +QVariant QQmlPropertyMap::operator[](const QString &key) const { return value(key); } /*! - \fn void QDeclarativePropertyMap::valueChanged(const QString &key, const QVariant &value) + \fn void QQmlPropertyMap::valueChanged(const QString &key, const QVariant &value) This signal is emitted whenever one of the values in the map is changed. \a key is the key corresponding to the \a value that was changed. diff --git a/src/declarative/util/qdeclarativepropertymap.h b/src/qml/util/qqmlpropertymap.h similarity index 84% rename from src/declarative/util/qdeclarativepropertymap.h rename to src/qml/util/qqmlpropertymap.h index 3a2ce7b33d..53254ab672 100644 --- a/src/declarative/util/qdeclarativepropertymap.h +++ b/src/qml/util/qqmlpropertymap.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPROPERTYMAP_H -#define QDECLARATIVEPROPERTYMAP_H +#ifndef QQMLPROPERTYMAP_H +#define QQMLPROPERTYMAP_H + +#include #include #include @@ -52,13 +54,13 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativePropertyMapPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativePropertyMap : public QObject +class QQmlPropertyMapPrivate; +class Q_QML_EXPORT QQmlPropertyMap : public QObject { Q_OBJECT public: - QDeclarativePropertyMap(QObject *parent = 0); - virtual ~QDeclarativePropertyMap(); + QQmlPropertyMap(QObject *parent = 0); + virtual ~QQmlPropertyMap(); QVariant value(const QString &key) const; void insert(const QString &key, const QVariant &value); @@ -78,8 +80,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativePropertyMap : public QObject void valueChanged(const QString &key, const QVariant &value); private: - Q_DECLARE_PRIVATE(QDeclarativePropertyMap) - Q_DISABLE_COPY(QDeclarativePropertyMap) + Q_DECLARE_PRIVATE(QQmlPropertyMap) + Q_DISABLE_COPY(QQmlPropertyMap) }; QT_END_NAMESPACE diff --git a/src/qml/util/util.pri b/src/qml/util/util.pri new file mode 100644 index 0000000000..3b121ba3cb --- /dev/null +++ b/src/qml/util/util.pri @@ -0,0 +1,5 @@ +SOURCES += \ + $$PWD/qqmlpropertymap.cpp + +HEADERS += \ + $$PWD/qqmlpropertymap.h diff --git a/src/qmldevtools/qmldevtools.pro b/src/qmldevtools/qmldevtools.pro index 3aac5e5a9c..97b3788dcd 100644 --- a/src/qmldevtools/qmldevtools.pro +++ b/src/qmldevtools/qmldevtools.pro @@ -17,4 +17,4 @@ HEADERS += qtqmldevtoolsversion.h unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore -include($$QT.declarative.sources/qml/parser/parser.pri) +include($$QT.qml.sources/qml/parser/parser.pri) diff --git a/src/qmltest/qmltest.pro b/src/qmltest/qmltest.pro index 39b7dc8a3f..d2e90c2b5d 100644 --- a/src/qmltest/qmltest.pro +++ b/src/qmltest/qmltest.pro @@ -7,7 +7,7 @@ CONFIG += module CONFIG += dll warn_on declarative_debug MODULE_PRI += ../../modules/qt_qmltest.pri -QT += testlib-private declarative testlib quick widgets widgets-private gui +QT += testlib-private qml testlib quick widgets widgets-private gui DEFINES += QT_BUILD_QUICK_TEST_LIB QT_NO_URL_CAST_FROM_STRING load(qt_module_config) diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index 19acfaf6f0..e6c27eec00 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -44,15 +44,15 @@ #include #include "qtestoptions_p.h" #include -#include -#include -#include +#include +#include +#include #if defined(QML_VERSION) && QML_VERSION >= 0x020000 #include #define QUICK_TEST_SCENEGRAPH 1 #endif -#include -#include +#include +#include #include #include #include @@ -107,7 +107,7 @@ static inline QString stripQuotes(const QString &s) template void handleCompileErrors(const QFileInfo &fi, const View &view) { // Error compiling the test - flag failure in the log and continue. - const QList errors = view.errors(); + const QList errors = view.errors(); QuickTestResult results; results.setTestCaseName(fi.baseName()); results.startLogging(); @@ -117,7 +117,7 @@ template void handleCompileErrors(const QFileInfo &fi, const View & QTextStream str(&message); str << "\n " << QDir::toNativeSeparators(fi.absoluteFilePath()) << " produced " << errors.size() << " error(s):\n"; - foreach (const QDeclarativeError &e, errors) { + foreach (const QQmlError &e, errors) { str << " "; if (e.url().isLocalFile()) { str << e.url().toLocalFile(); @@ -129,7 +129,7 @@ template void handleCompileErrors(const QFileInfo &fi, const View & str << ": " << e.description() << '\n'; } str << " Working directory: " << QDir::toNativeSeparators(QDir::current().absolutePath()) << '\n'; - if (QDeclarativeEngine *engine = view.engine()) { + if (QQmlEngine *engine = view.engine()) { str << " View: " << view.metaObject()->className() << ", import paths:\n"; foreach (const QString &i, engine->importPathList()) str << " '" << QDir::toNativeSeparators(i) << "'\n"; @@ -254,7 +254,7 @@ int quick_test_main(int argc, char **argv, const char *name, quick_test_viewport } // Scan through all of the "tst_*.qml" files and run each of them - // in turn with a QDeclarativeView. + // in turn with a QQuickView. #ifdef QUICK_TEST_SCENEGRAPH if (qtQuick2) { QQuickView view; diff --git a/src/qmltest/quicktestevent.cpp b/src/qmltest/quicktestevent.cpp index 4dee9bee77..f996adbeca 100644 --- a/src/qmltest/quicktestevent.cpp +++ b/src/qmltest/quicktestevent.cpp @@ -41,7 +41,7 @@ #include "quicktestevent_p.h" #include -#include +#include #if defined(QML_VERSION) && QML_VERSION >= 0x020000 #include #include @@ -279,7 +279,7 @@ QWindow *QuickTestEvent::eventWindow() #endif return 0; /* - QDeclarativeItem *item = qobject_cast(parent()); + QQuickItem *item = qobject_cast(parent()); if (!item) return 0; QGraphicsScene *s = item->scene(); diff --git a/src/quick/designer/designersupport.cpp b/src/quick/designer/designersupport.cpp index d500e0a1ee..d389190642 100644 --- a/src/quick/designer/designersupport.cpp +++ b/src/quick/designer/designersupport.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,9 +44,9 @@ #include #include -#include +#include #include -#include +#include #include QT_BEGIN_NAMESPACE @@ -309,7 +309,7 @@ QQuickItem *DesignerSupport::anchorCenterInTargetItem(QQuickItem *item) -QPair DesignerSupport::anchorLineTarget(QQuickItem *item, const QString &name, QDeclarativeContext *context) +QPair DesignerSupport::anchorLineTarget(QQuickItem *item, const QString &name, QQmlContext *context) { QObject *targetObject = 0; QString targetName; @@ -319,7 +319,7 @@ QPair DesignerSupport::anchorLineTarget(QQuickItem *item, con } else if (name == QLatin1String("anchors.centerIn")) { targetObject = anchors(item)->centerIn(); } else { - QDeclarativeProperty metaProperty(item, name, context); + QQmlProperty metaProperty(item, name, context); if (!metaProperty.isValid()) return QPair(); @@ -360,7 +360,7 @@ void DesignerSupport::resetAnchor(QQuickItem *item, const QString &name) QList DesignerSupport::statesForItem(QQuickItem *item) { QList objectList; - QList stateList = QQuickItemPrivate::get(item)->_states()->states(); + QList stateList = QQuickItemPrivate::get(item)->_states()->states(); qCopy(stateList.begin(), stateList.end(), objectList.begin()); return objectList; @@ -380,9 +380,9 @@ int DesignerSupport::borderWidth(QQuickItem *item) return 0; } -void DesignerSupport::refreshExpressions(QDeclarativeContext *context) +void DesignerSupport::refreshExpressions(QQmlContext *context) { - QDeclarativeContextPrivate::get(context)->data->refreshExpressions(); + QQmlContextPrivate::get(context)->data->refreshExpressions(); } void DesignerSupport::setRootItem(QQuickView *view, QQuickItem *item) diff --git a/src/quick/designer/designersupport.h b/src/quick/designer/designersupport.h index e80a537859..a31c8c3d46 100644 --- a/src/quick/designer/designersupport.h +++ b/src/quick/designer/designersupport.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -67,7 +67,7 @@ class QQuickItem; class QQuickShaderEffectTexture; class QImage; class QTransform; -class QDeclarativeContext; +class QQmlContext; class QQuickView; @@ -122,7 +122,7 @@ class Q_QUICK_EXPORT DesignerSupport static bool hasAnchor(QQuickItem *item, const QString &name); static QQuickItem *anchorFillTargetItem(QQuickItem *item); static QQuickItem *anchorCenterInTargetItem(QQuickItem *item); - static QPair anchorLineTarget(QQuickItem *item, const QString &name, QDeclarativeContext *context); + static QPair anchorLineTarget(QQuickItem *item, const QString &name, QQmlContext *context); static void resetAnchor(QQuickItem *item, const QString &name); @@ -132,7 +132,7 @@ class Q_QUICK_EXPORT DesignerSupport static int borderWidth(QQuickItem *item); - static void refreshExpressions(QDeclarativeContext *context); + static void refreshExpressions(QQmlContext *context); static void setRootItem(QQuickView *view, QQuickItem *item); diff --git a/src/quick/items/context2d/qquickcanvascontext.cpp b/src/quick/items/context2d/qquickcanvascontext.cpp index 3e6e51c89d..bb1065bd6a 100644 --- a/src/quick/items/context2d/qquickcanvascontext.cpp +++ b/src/quick/items/context2d/qquickcanvascontext.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/context2d/qquickcanvascontext_p.h b/src/quick/items/context2d/qquickcanvascontext_p.h index 6a2edef7a8..37b5fa33fa 100644 --- a/src/quick/items/context2d/qquickcanvascontext_p.h +++ b/src/quick/items/context2d/qquickcanvascontext_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 7031294ecc..550ab20403 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,10 +45,10 @@ #include #include #include -#include +#include -#include -#include +#include +#include #include QT_BEGIN_NAMESPACE @@ -71,7 +71,7 @@ class QQuickCanvasItemPrivate : public QQuickItemPrivate QQuickCanvasItem::RenderTarget renderTarget; QQuickCanvasItem::RenderStrategy renderStrategy; QString contextType; - QHash images; + QHash images; QUrl baseUrl; QMap > animationCallbacks; }; @@ -254,13 +254,13 @@ void QQuickCanvasItem::setContextType(const QString &contextType) this property will contain the current drawing context, otherwise null. */ -QDeclarativeV8Handle QQuickCanvasItem::context() const +QQmlV8Handle QQuickCanvasItem::context() const { Q_D(const QQuickCanvasItem); if (d->contextInitialized) - return QDeclarativeV8Handle::fromHandle(d->context->v8value()); + return QQmlV8Handle::fromHandle(d->context->v8value()); - return QDeclarativeV8Handle::fromHandle(v8::Null()); + return QQmlV8Handle::fromHandle(v8::Null()); } /*! @@ -532,7 +532,7 @@ void QQuickCanvasItem::updatePolish() foreach (int key, animationCallbacks.keys()) { v8::HandleScope handle_scope; - v8::Handle self = QDeclarativeEnginePrivate::getV8Engine(qmlEngine(this))->newQObject(this).As(); + v8::Handle self = QQmlEnginePrivate::getV8Engine(qmlEngine(this))->newQObject(this).As(); v8::Handle args[] = { v8::Uint32::New(QDateTime::currentDateTimeUtc().toTime_t()) }; v8::Persistent f = animationCallbacks.value(key); f->Call(self, 1, args); @@ -591,7 +591,7 @@ QSGNode *QQuickCanvasItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData Canvas only supports a 2d context. */ -void QQuickCanvasItem::getContext(QDeclarativeV8Function *args) +void QQuickCanvasItem::getContext(QQmlV8Function *args) { Q_D(QQuickCanvasItem); @@ -633,7 +633,7 @@ void QQuickCanvasItem::getContext(QDeclarativeV8Function *args) scene. */ -void QQuickCanvasItem::requestAnimationFrame(QDeclarativeV8Function *args) +void QQuickCanvasItem::requestAnimationFrame(QQmlV8Function *args) { if (args->Length() < 1 || !(*args)[0]->IsFunction()) { qmlInfo(this) << "requestAnimationFrame should be called with an animation callback function"; @@ -659,7 +659,7 @@ void QQuickCanvasItem::requestAnimationFrame(QDeclarativeV8Function *args) This function will cancel the animation callback referenced by \a handle. */ -void QQuickCanvasItem::cancelRequestAnimationFrame(QDeclarativeV8Function *args) +void QQuickCanvasItem::cancelRequestAnimationFrame(QQmlV8Function *args) { if (args->Length() < 1 || !(*args)[0]->IsInt32()) { qmlInfo(this) << "cancelRequestAnimationFrame should be called with an animation callback id"; @@ -737,7 +737,7 @@ QImage QQuickCanvasItem::loadedImage(const QUrl& url) if (!d->images.contains(fullPathUrl)) { loadImage(url); } - QDeclarativePixmap* pix = d->images.value(fullPathUrl); + QQuickPixmap* pix = d->images.value(fullPathUrl); if (pix->isLoading() || pix->isError()) { return QImage(); } @@ -760,12 +760,12 @@ void QQuickCanvasItem::loadImage(const QUrl& url) Q_D(QQuickCanvasItem); QUrl fullPathUrl = d->baseUrl.resolved(url); if (!d->images.contains(fullPathUrl)) { - QDeclarativePixmap* pix = new QDeclarativePixmap(); + QQuickPixmap* pix = new QQuickPixmap(); d->images.insert(fullPathUrl, pix); pix->load(qmlEngine(this) , fullPathUrl - , QDeclarativePixmap::Cache | QDeclarativePixmap::Asynchronous); + , QQuickPixmap::Cache | QQuickPixmap::Asynchronous); if (pix->isLoading()) pix->connectFinished(this, SIGNAL(imageLoaded())); } @@ -918,7 +918,7 @@ void QQuickCanvasItem::initializeContext(QQuickCanvasContext *context, const QVa d->context = context; d->context->init(this, args); - d->context->setV8Engine(QDeclarativeEnginePrivate::getV8Engine(qmlEngine(this))); + d->context->setV8Engine(QQmlEnginePrivate::getV8Engine(qmlEngine(this))); d->contextInitialized = true; connect(d->context, SIGNAL(textureChanged()), SLOT(update())); connect(d->context, SIGNAL(textureChanged()), SIGNAL(painted())); diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h index 0dad629eea..9a57733d4c 100644 --- a/src/quick/items/context2d/qquickcanvasitem_p.h +++ b/src/quick/items/context2d/qquickcanvasitem_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -60,7 +60,7 @@ class Q_QUICK_EXPORT QQuickCanvasItem : public QQuickItem Q_PROPERTY(bool available READ isAvailable NOTIFY availableChanged); Q_PROPERTY(QString contextType READ contextType WRITE setContextType NOTIFY contextTypeChanged) - Q_PROPERTY(QDeclarativeV8Handle context READ context NOTIFY contextChanged); + Q_PROPERTY(QQmlV8Handle context READ context NOTIFY contextChanged); Q_PROPERTY(QSizeF canvasSize READ canvasSize WRITE setCanvasSize NOTIFY canvasSizeChanged) Q_PROPERTY(QSize tileSize READ tileSize WRITE setTileSize NOTIFY tileSizeChanged) Q_PROPERTY(QRectF canvasWindow READ canvasWindow WRITE setCanvasWindow NOTIFY canvasWindowChanged) @@ -87,7 +87,7 @@ class Q_QUICK_EXPORT QQuickCanvasItem : public QQuickItem QString contextType() const; void setContextType(const QString &contextType); - QDeclarativeV8Handle context() const; + QQmlV8Handle context() const; QSizeF canvasSize() const; void setCanvasSize(const QSizeF &); @@ -108,10 +108,10 @@ class Q_QUICK_EXPORT QQuickCanvasItem : public QQuickItem QImage toImage(const QRectF& rect = QRectF()) const; - Q_INVOKABLE void getContext(QDeclarativeV8Function *args); + Q_INVOKABLE void getContext(QQmlV8Function *args); - Q_INVOKABLE void requestAnimationFrame(QDeclarativeV8Function *args); - Q_INVOKABLE void cancelRequestAnimationFrame(QDeclarativeV8Function *args); + Q_INVOKABLE void requestAnimationFrame(QQmlV8Function *args); + Q_INVOKABLE void cancelRequestAnimationFrame(QQmlV8Function *args); Q_INVOKABLE void requestPaint(); Q_INVOKABLE void markDirty(const QRectF& dirtyRect = QRectF()); diff --git a/src/quick/items/context2d/qquickcanvasitemnode.cpp b/src/quick/items/context2d/qquickcanvasitemnode.cpp index b9347dd33c..5a2dd80ff1 100644 --- a/src/quick/items/context2d/qquickcanvasitemnode.cpp +++ b/src/quick/items/context2d/qquickcanvasitemnode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/context2d/qquickcanvasitemnode_p.h b/src/quick/items/context2d/qquickcanvasitemnode_p.h index 77181c64e6..7eb7d2aec5 100644 --- a/src/quick/items/context2d/qquickcanvasitemnode_p.h +++ b/src/quick/items/context2d/qquickcanvasitemnode_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index ba709b7f66..fc2ada2867 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -49,17 +49,17 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include -#include +#include #include #include @@ -1586,12 +1586,12 @@ static void ctx2d_path_set(v8::Local, v8::Local value, co r->context->beginPath(); if (value->IsObject()) { - QDeclarativePath* path = qobject_cast(engine->toQObject(value)); + QQuickPath* path = qobject_cast(engine->toQObject(value)); if (path) r->context->m_path = path->path(); } else { QString path = engine->toString(value->ToString()); - QDeclarativeSvgParser::parsePathDataFast(path, r->context->m_path); + QQuickSvgParser::parsePathDataFast(path, r->context->m_path); } r->context->m_v8path = value; } diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h index 3cabb6b198..239a244739 100644 --- a/src/quick/items/context2d/qquickcontext2d_p.h +++ b/src/quick/items/context2d/qquickcontext2d_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,8 +43,8 @@ #define QQUICKCONTEXT2D_P_H #include -#include -#include +#include +#include #include #include #include @@ -67,7 +67,7 @@ QT_BEGIN_NAMESPACE class QQuickContext2DCommandBuffer; class QQuickContext2DTexture; -class QDeclarativePixmap; +class QQuickPixmap; class QSGTexture; class QLockedCommandBuffer { diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp index 7342999864..591fc216a4 100644 --- a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp +++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -41,7 +41,7 @@ #include "qquickcontext2dcommandbuffer_p.h" #include "qquickcanvasitem_p.h" -#include +#include #include #define HAS_SHADOW(offsetX, offsetY, blur, color) (color.isValid() && color.alpha() && (blur || offsetX || offsetY)) diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h index fc4c1a3a9c..f33c43a936 100644 --- a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h +++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,7 +44,7 @@ #include #include "qquickcontext2d_p.h" -#include +#include QT_BEGIN_HEADER diff --git a/src/quick/items/context2d/qquickcontext2dtexture.cpp b/src/quick/items/context2d/qquickcontext2dtexture.cpp index 5d0c0ab63e..28460e2164 100644 --- a/src/quick/items/context2d/qquickcontext2dtexture.cpp +++ b/src/quick/items/context2d/qquickcontext2dtexture.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/context2d/qquickcontext2dtexture_p.h b/src/quick/items/context2d/qquickcontext2dtexture_p.h index bd4d4ff72c..9e00ece16c 100644 --- a/src/quick/items/context2d/qquickcontext2dtexture_p.h +++ b/src/quick/items/context2d/qquickcontext2dtexture_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/context2d/qquickcontext2dtile.cpp b/src/quick/items/context2d/qquickcontext2dtile.cpp index 284cdcef83..dd416e15af 100644 --- a/src/quick/items/context2d/qquickcontext2dtile.cpp +++ b/src/quick/items/context2d/qquickcontext2dtile.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/context2d/qquickcontext2dtile_p.h b/src/quick/items/context2d/qquickcontext2dtile_p.h index e05030cb88..2e6d61c8f2 100644 --- a/src/quick/items/context2d/qquickcontext2dtile_p.h +++ b/src/quick/items/context2d/qquickcontext2dtile_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/items.pri b/src/quick/items/items.pri index f02c769c3a..9a3b24c328 100644 --- a/src/quick/items/items.pri +++ b/src/quick/items/items.pri @@ -58,8 +58,8 @@ HEADERS += \ $$PWD/qquickclipnode_p.h \ $$PWD/qquickview.h \ $$PWD/qquickview_p.h \ - $$PWD/qquickanimation_p.h \ - $$PWD/qquickanimation_p_p.h \ + $$PWD/qquickitemanimation_p.h \ + $$PWD/qquickitemanimation_p_p.h \ $$PWD/qquickstateoperations_p.h \ $$PWD/qquickimplicitsizeitem_p.h \ $$PWD/qquickimplicitsizeitem_p_p.h \ @@ -111,7 +111,7 @@ SOURCES += \ $$PWD/qquicktranslate.cpp \ $$PWD/qquickclipnode.cpp \ $$PWD/qquickview.cpp \ - $$PWD/qquickanimation.cpp \ + $$PWD/qquickitemanimation.cpp \ $$PWD/qquickstateoperations.cpp \ $$PWD/qquickimplicitsizeitem.cpp \ $$PWD/qquickspriteengine.cpp \ diff --git a/src/quick/items/qquickaccessibleattached.cpp b/src/quick/items/qquickaccessibleattached.cpp index b28c28ba29..177454eedc 100644 --- a/src/quick/items/qquickaccessibleattached.cpp +++ b/src/quick/items/qquickaccessibleattached.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickaccessibleattached_p.h b/src/quick/items/qquickaccessibleattached_p.h index 02b427337e..5eea44b6e4 100644 --- a/src/quick/items/qquickaccessibleattached_p.h +++ b/src/quick/items/qquickaccessibleattached_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickanchors.cpp b/src/quick/items/qquickanchors.cpp index 2df304e15d..b7071b9598 100644 --- a/src/quick/items/qquickanchors.cpp +++ b/src/quick/items/qquickanchors.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,7 +44,7 @@ #include "qquickitem.h" #include "qquickitem_p.h" -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/quick/items/qquickanchors_p.h b/src/quick/items/qquickanchors_p.h index 52248db3b8..9076fbe697 100644 --- a/src/quick/items/qquickanchors_p.h +++ b/src/quick/items/qquickanchors_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,7 +42,7 @@ #ifndef QQUICKANCHORS_P_H #define QQUICKANCHORS_P_H -#include +#include #include diff --git a/src/quick/items/qquickanchors_p_p.h b/src/quick/items/qquickanchors_p_p.h index b2b587932b..1814185980 100644 --- a/src/quick/items/qquickanchors_p_p.h +++ b/src/quick/items/qquickanchors_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickanimatedimage.cpp b/src/quick/items/qquickanimatedimage.cpp index 7bea56cc53..eef20db361 100644 --- a/src/quick/items/qquickanimatedimage.cpp +++ b/src/quick/items/qquickanimatedimage.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,12 +44,12 @@ #ifndef QT_NO_MOVIE -#include +#include #include #include #include -#include +#include QT_BEGIN_NAMESPACE /*! @@ -82,7 +82,7 @@ QT_BEGIN_NAMESPACE \bold Note: Unlike images, animated images are not cached or shared internally. \clearfloat - \snippet doc/src/snippets/declarative/animatedimage.qml document + \snippet doc/src/snippets/qml/animatedimage.qml document \sa BorderImage, Image */ @@ -95,7 +95,7 @@ QT_BEGIN_NAMESPACE AnimatedImage can handle any image format supported by Qt, loaded from any URL scheme supported by Qt. - \sa QDeclarativeImageProvider + \sa QQmlImageProvider */ /*! @@ -264,7 +264,7 @@ void QQuickAnimatedImage::load() if (d->progress != oldProgress) emit progressChanged(d->progress); } else { - QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(d->url); + QString lf = QQmlEnginePrivate::urlToLocalFileOrQrc(d->url); if (!lf.isEmpty()) { //### should be unified with movieRequestFinished d->_movie = new QMovie(lf); diff --git a/src/quick/items/qquickanimatedimage_p.h b/src/quick/items/qquickanimatedimage_p.h index 3c1f77d674..86910199ac 100644 --- a/src/quick/items/qquickanimatedimage_p.h +++ b/src/quick/items/qquickanimatedimage_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickanimatedimage_p_p.h b/src/quick/items/qquickanimatedimage_p_p.h index b1288d78a1..95142f5f1f 100644 --- a/src/quick/items/qquickanimatedimage_p_p.h +++ b/src/quick/items/qquickanimatedimage_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickborderimage.cpp b/src/quick/items/qquickborderimage.cpp index 67b5cdf737..5beb345afc 100644 --- a/src/quick/items/qquickborderimage.cpp +++ b/src/quick/items/qquickborderimage.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,10 +43,11 @@ #include "qquickborderimage_p_p.h" #include "qquickninepatchnode_p.h" -#include +#include #include -#include +#include +#include QT_BEGIN_NAMESPACE @@ -97,7 +98,7 @@ QT_BEGIN_NAMESPACE used to determine the parts of the image that will lie inside the unscaled corner areas and the parts that will be stretched horizontally and vertically. - \snippet doc/src/snippets/declarative/borderimage/normal-image.qml normal image + \snippet doc/src/snippets/qml/borderimage/normal-image.qml normal image \clearfloat \beginfloatleft @@ -111,7 +112,7 @@ QT_BEGIN_NAMESPACE is set to \l{BorderImage::verticalTileMode}{BorderImage.Stretch}, the parts of image in regions 4 and 6 are stretched vertically. - \snippet doc/src/snippets/declarative/borderimage/borderimage-scaled.qml scaled border image + \snippet doc/src/snippets/qml/borderimage/borderimage-scaled.qml scaled border image \clearfloat \beginfloatleft @@ -125,7 +126,7 @@ QT_BEGIN_NAMESPACE \l{BorderImage::verticalTileMode}{BorderImage.Repeat}, the parts of image in regions 4 and 6 are tiled so that they fill the space at the left and right of the element. - \snippet doc/src/snippets/declarative/borderimage/borderimage-tiled.qml tiled border image + \snippet doc/src/snippets/qml/borderimage/borderimage-tiled.qml tiled border image \clearfloat In some situations, the width of regions 2 and 8 may not be an exact multiple of the width @@ -256,7 +257,7 @@ QQuickBorderImage::~QQuickBorderImage() The URL may be absolute, or relative to the URL of the component. - \sa QDeclarativeImageProvider + \sa QQmlImageProvider */ /*! @@ -305,7 +306,7 @@ void QQuickBorderImage::load() } else { d->status = Loading; if (d->url.path().endsWith(QLatin1String("sci"))) { - QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(d->url); + QString lf = QQmlEnginePrivate::urlToLocalFileOrQrc(d->url); if (!lf.isEmpty()) { QFile file(lf); file.open(QIODevice::ReadOnly); @@ -317,11 +318,11 @@ void QQuickBorderImage::load() } } else { - QDeclarativePixmap::Options options; + QQuickPixmap::Options options; if (d->async) - options |= QDeclarativePixmap::Asynchronous; + options |= QQuickPixmap::Asynchronous; if (d->cache) - options |= QDeclarativePixmap::Cache; + options |= QQuickPixmap::Cache; d->pix.clear(this); d->pix.load(qmlEngine(this), d->url, options); @@ -448,11 +449,11 @@ void QQuickBorderImage::setGridScaledImage(const QQuickGridScaledImage& sci) d->sciurl = d->url.resolved(QUrl(sci.pixmapUrl())); - QDeclarativePixmap::Options options; + QQuickPixmap::Options options; if (d->async) - options |= QDeclarativePixmap::Asynchronous; + options |= QQuickPixmap::Asynchronous; if (d->cache) - options |= QDeclarativePixmap::Cache; + options |= QQuickPixmap::Cache; d->pix.clear(this); d->pix.load(qmlEngine(this), d->sciurl, options); diff --git a/src/quick/items/qquickborderimage_p.h b/src/quick/items/qquickborderimage_p.h index 93dc452e87..80532b7082 100644 --- a/src/quick/items/qquickborderimage_p.h +++ b/src/quick/items/qquickborderimage_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickborderimage_p_p.h b/src/quick/items/qquickborderimage_p_p.h index b9b5723a06..07a62b4d29 100644 --- a/src/quick/items/qquickborderimage_p_p.h +++ b/src/quick/items/qquickborderimage_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -56,6 +56,8 @@ #include "qquickimagebase_p_p.h" #include "qquickscalegrid_p_p.h" +#include + QT_BEGIN_NAMESPACE class QNetworkReply; diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp index a9df484a98..1e1db18723 100644 --- a/src/quick/items/qquickcanvas.cpp +++ b/src/quick/items/qquickcanvas.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -65,11 +65,11 @@ #include #include #include -#include +#include -#include +#include -#include +#include QT_BEGIN_NAMESPACE @@ -83,7 +83,7 @@ void QQuickCanvasPrivate::updateFocusItemTransform() qApp->inputMethod()->setInputItemTransform(QQuickItemPrivate::get(focus)->itemToCanvasTransform()); } -class QQuickCanvasIncubationController : public QObject, public QDeclarativeIncubationController +class QQuickCanvasIncubationController : public QObject, public QQmlIncubationController { public: QQuickCanvasIncubationController(QQuickCanvasPrivate *canvas) @@ -340,7 +340,7 @@ void QQuickCanvasPrivate::init(QQuickCanvas *c) engine->setCanvas(q); } -QDeclarativeListProperty QQuickCanvasPrivate::data() +QQmlListProperty QQuickCanvasPrivate::data() { initRootItem(); return QQuickItemPrivate::get(rootItem)->data(); @@ -663,7 +663,7 @@ void QQuickCanvasPrivate::clearFocusInScope(QQuickItem *scope, QQuickItem *item, void QQuickCanvasPrivate::notifyFocusChangesRecur(QQuickItem **items, int remaining) { - QDeclarativeGuard item(*items); + QQmlGuard item(*items); if (remaining) notifyFocusChangesRecur(items + 1, remaining - 1); @@ -761,7 +761,7 @@ void QQuickCanvas::releaseResources() { Q_D(QQuickCanvas); d->windowManager->releaseResources(); - QDeclarativePixmap::purgeCache(); + QQuickPixmap::purgeCache(); } @@ -2044,12 +2044,12 @@ QImage QQuickCanvas::grabFrameBuffer() /*! Returns an incubation controller that splices incubation between frames for this canvas. QQuickView automatically installs this controller for you, - otherwise you will need to install it yourself using \l{QDeclarativeEngine::setIncubationController} + otherwise you will need to install it yourself using \l{QQmlEngine::setIncubationController} The controller is owned by the canvas and will be destroyed when the canvas is deleted. */ -QDeclarativeIncubationController *QQuickCanvas::incubationController() const +QQmlIncubationController *QQuickCanvas::incubationController() const { Q_D(const QQuickCanvas); diff --git a/src/quick/items/qquickcanvas.h b/src/quick/items/qquickcanvas.h index 3246d53a42..0b6b01b05a 100644 --- a/src/quick/items/qquickcanvas.h +++ b/src/quick/items/qquickcanvas.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -58,13 +58,13 @@ class QSGTexture; class QInputMethodEvent; class QQuickCanvasPrivate; class QOpenGLFramebufferObject; -class QDeclarativeIncubationController; +class QQmlIncubationController; class QInputMethodEvent; class Q_QUICK_EXPORT QQuickCanvas : public QWindow { Q_OBJECT - Q_PRIVATE_PROPERTY(QQuickCanvas::d_func(), QDeclarativeListProperty data READ data DESIGNABLE false) + Q_PRIVATE_PROPERTY(QQuickCanvas::d_func(), QQmlListProperty data READ data DESIGNABLE false) Q_PROPERTY(QColor color READ clearColor WRITE setClearColor NOTIFY clearColorChanged) Q_CLASSINFO("DefaultProperty", "data") Q_DECLARE_PRIVATE(QQuickCanvas) @@ -100,7 +100,7 @@ class Q_QUICK_EXPORT QQuickCanvas : public QWindow uint renderTargetId() const; QSize renderTargetSize() const; - QDeclarativeIncubationController *incubationController() const; + QQmlIncubationController *incubationController() const; virtual QAccessibleInterface *accessibleRoot() const; diff --git a/src/quick/items/qquickcanvas_p.h b/src/quick/items/qquickcanvas_p.h index d4d6a01f75..147526466e 100644 --- a/src/quick/items/qquickcanvas_p.h +++ b/src/quick/items/qquickcanvas_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -55,7 +55,7 @@ #include "qquickitem.h" #include "qquickcanvas.h" -#include +#include #include #include @@ -108,7 +108,7 @@ class Q_QUICK_EXPORT QQuickCanvasPrivate : public QWindowPrivate QQuickRootItem *rootItem; QSet parentlessItems; - QDeclarativeListProperty data(); + QQmlListProperty data(); QQuickItem *activeFocusItem; QQuickItem *mouseGrabberItem; diff --git a/src/quick/items/qquickclipnode.cpp b/src/quick/items/qquickclipnode.cpp index 168e973927..f9894edb48 100644 --- a/src/quick/items/qquickclipnode.cpp +++ b/src/quick/items/qquickclipnode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickclipnode_p.h b/src/quick/items/qquickclipnode_p.h index a48972532c..02902a758e 100644 --- a/src/quick/items/qquickclipnode_p.h +++ b/src/quick/items/qquickclipnode_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp index c44e1acd4b..f8c1281af5 100644 --- a/src/quick/items/qquickdrag.cpp +++ b/src/quick/items/qquickdrag.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include QT_BEGIN_NAMESPACE @@ -76,8 +76,8 @@ class QQuickDragAttachedPrivate : public QObjectPrivate, public QQuickItemChange QQuickDragGrabber dragGrabber; - QDeclarativeGuard source; - QDeclarativeGuard target; + QQmlGuard source; + QQmlGuard target; QQuickItem *attachedItem; QQuickDragMimeData *mimeData; Qt::DropAction proposedAction; @@ -106,7 +106,7 @@ class QQuickDragAttachedPrivate : public QObjectPrivate, public QQuickItemChange However, dragging is not limited to mouse drags, anything that can move an item can generate drag events, this can include touch events, animations and bindings. - \snippet doc/src/snippets/declarative/drag.qml 0 + \snippet doc/src/snippets/qml/drag.qml 0 A drag can be terminated either by canceling it with Drag.cancel() or setting Drag.active to false, or it can be terminated with a drop event by calling @@ -377,7 +377,7 @@ void QQuickDragAttachedPrivate::start(Qt::DropActions supportedActions) property for the started sequence. */ -void QQuickDragAttached::start(QDeclarativeV8Function *args) +void QQuickDragAttached::start(QQmlV8Function *args) { Q_D(QQuickDragAttached); if (d->inEvent) { diff --git a/src/quick/items/qquickdrag_p.h b/src/quick/items/qquickdrag_p.h index eca3927624..ac19c021e0 100644 --- a/src/quick/items/qquickdrag_p.h +++ b/src/quick/items/qquickdrag_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -60,10 +60,10 @@ class QQuickDragPrivate; class QQuickDragGrabber { - class Item : public QDeclarativeGuard + class Item : public QQmlGuard { public: - Item(QQuickItem *item) : QDeclarativeGuard(item) {} + Item(QQuickItem *item) : QQmlGuard(item) {} QIntrusiveListNode node; protected: @@ -142,7 +142,7 @@ class QQuickDragMimeData : public QMimeData friend class QQuickDragAttachedPrivate; }; -class QDeclarativeV8Function; +class QQmlV8Function; class QQuickDragAttachedPrivate; class QQuickDragAttached : public QObject @@ -183,7 +183,7 @@ class QQuickDragAttached : public QObject Q_INVOKABLE int drop(); public Q_SLOTS: - void start(QDeclarativeV8Function *); + void start(QQmlV8Function *); void cancel(); Q_SIGNALS: diff --git a/src/quick/items/qquickdroparea.cpp b/src/quick/items/qquickdroparea.cpp index 0534fb5bb0..ed5fb23658 100644 --- a/src/quick/items/qquickdroparea.cpp +++ b/src/quick/items/qquickdroparea.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,7 +44,7 @@ #include "qquickitem_p.h" #include "qquickcanvas.h" -#include +#include QT_BEGIN_NAMESPACE @@ -74,8 +74,8 @@ class QQuickDropAreaPrivate : public QQuickItemPrivate QRegExp keyRegExp; QPointF dragPosition; QQuickDropAreaDrag *drag; - QDeclarativeGuard source; - QDeclarativeGuard mimeData; + QQmlGuard source; + QQmlGuard mimeData; }; QQuickDropAreaPrivate::QQuickDropAreaPrivate() @@ -409,7 +409,7 @@ QStringList QQuickDropEvent::keys() const If an \a action is specified it will overwrite the value of the \l action property. */ -void QQuickDropEvent::accept(QDeclarativeV8Function *args) +void QQuickDropEvent::accept(QQmlV8Function *args) { Qt::DropAction action = event->dropAction(); diff --git a/src/quick/items/qquickdroparea_p.h b/src/quick/items/qquickdroparea_p.h index 6fdfc4b03b..e207787198 100644 --- a/src/quick/items/qquickdroparea_p.h +++ b/src/quick/items/qquickdroparea_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,7 +44,7 @@ #include "qquickitem.h" -#include +#include #include #include @@ -82,7 +82,7 @@ class QQuickDropEvent : public QObject bool accepted() const { return event->isAccepted(); } void setAccepted(bool accepted) { event->setAccepted(accepted); } - Q_INVOKABLE void accept(QDeclarativeV8Function *); + Q_INVOKABLE void accept(QQmlV8Function *); private: QQuickDropAreaPrivate *d; diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp index 6e7769f1d3..597e64eb18 100644 --- a/src/quick/items/qquickevents.cpp +++ b/src/quick/items/qquickevents.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h index 1d13a19fed..e69d44303b 100644 --- a/src/quick/items/qquickevents_p_p.h +++ b/src/quick/items/qquickevents_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -54,7 +54,7 @@ // #include -#include +#include #include #include diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index 43aaf92b1a..ef67549780 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,7 +45,9 @@ #include "qquickcanvas_p.h" #include "qquickevents_p_p.h" -#include +#include + +#include #include #include #include @@ -204,7 +206,7 @@ QQuickFlickablePrivate::QQuickFlickablePrivate() void QQuickFlickablePrivate::init() { Q_Q(QQuickFlickable); - QDeclarative_setParent_noEvent(contentItem, q); + QQml_setParent_noEvent(contentItem, q); contentItem->setParentItem(q); FAST_CONNECT(&timeline, SIGNAL(completed()), q, SLOT(movementEnding())) q->setAcceptedMouseButtons(Qt::LeftButton); @@ -277,7 +279,7 @@ void QQuickFlickablePrivate::flickY(qreal velocity) } void QQuickFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal, - QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity) + QQuickTimeLineCallback::Callback fixupCallback, qreal velocity) { Q_Q(QQuickFlickable); qreal maxDistance = -1; @@ -303,7 +305,7 @@ void QQuickFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal maxExt timeline.accel(data.move, v, deceleration); else timeline.accel(data.move, v, deceleration, maxDistance); - timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this)); + timeline.callback(QQuickTimeLineCallback(&data.move, fixupCallback, this)); if (!hData.flicking && q->xflick() && (&data == &hData)) { hData.flicking = true; emit q->flickingChanged(); @@ -507,7 +509,7 @@ is finished. The following example shows a small view onto a large image in which the user can drag or flick the image in order to view different parts of it. - \snippet doc/src/snippets/declarative/flickable.qml document + \snippet doc/src/snippets/qml/flickable.qml document \clearfloat @@ -569,9 +571,9 @@ is finished. These properties are typically used to draw a scrollbar. For example: - \snippet doc/src/snippets/declarative/flickableScrollbar.qml 0 + \snippet doc/src/snippets/qml/flickableScrollbar.qml 0 \dots 8 - \snippet doc/src/snippets/declarative/flickableScrollbar.qml 1 + \snippet doc/src/snippets/qml/flickableScrollbar.qml 1 \sa {declarative/ui-components/scrollbar}{scrollbar example} */ @@ -1302,7 +1304,7 @@ void QQuickFlickable::viewportMoved() qreal maxDistance = d->overShootDistance(height()); d->timeline.reset(d->vData.move); d->timeline.accel(d->vData.move, -d->vData.smoothVelocity.value(), d->deceleration*QML_FLICK_OVERSHOOTFRICTION, maxDistance); - d->timeline.callback(QDeclarativeTimeLineCallback(&d->vData.move, d->fixupY_callback, d)); + d->timeline.callback(QQuickTimeLineCallback(&d->vData.move, d->fixupY_callback, d)); } if (!d->hData.inOvershoot && !d->hData.fixingUp && d->hData.flicking && (d->hData.move.value() > minXExtent() || d->hData.move.value() < maxXExtent()) @@ -1312,7 +1314,7 @@ void QQuickFlickable::viewportMoved() qreal maxDistance = d->overShootDistance(width()); d->timeline.reset(d->hData.move); d->timeline.accel(d->hData.move, -d->hData.smoothVelocity.value(), d->deceleration*QML_FLICK_OVERSHOOTFRICTION, maxDistance); - d->timeline.callback(QDeclarativeTimeLineCallback(&d->hData.move, d->fixupX_callback, d)); + d->timeline.callback(QQuickTimeLineCallback(&d->hData.move, d->fixupX_callback, d)); } d->lastFlickablePosition = QPointF(d->hData.move.value(), d->vData.move.value()); @@ -1386,7 +1388,7 @@ void QQuickFlickable::cancelFlick() movementEnding(); } -void QQuickFlickablePrivate::data_append(QDeclarativeListProperty *prop, QObject *o) +void QQuickFlickablePrivate::data_append(QQmlListProperty *prop, QObject *o) { QQuickItem *i = qobject_cast(o); if (i) { @@ -1396,33 +1398,33 @@ void QQuickFlickablePrivate::data_append(QDeclarativeListProperty *prop } } -int QQuickFlickablePrivate::data_count(QDeclarativeListProperty *) +int QQuickFlickablePrivate::data_count(QQmlListProperty *) { // XXX todo return 0; } -QObject *QQuickFlickablePrivate::data_at(QDeclarativeListProperty *, int) +QObject *QQuickFlickablePrivate::data_at(QQmlListProperty *, int) { // XXX todo return 0; } -void QQuickFlickablePrivate::data_clear(QDeclarativeListProperty *) +void QQuickFlickablePrivate::data_clear(QQmlListProperty *) { // XXX todo } -QDeclarativeListProperty QQuickFlickable::flickableData() +QQmlListProperty QQuickFlickable::flickableData() { Q_D(QQuickFlickable); - return QDeclarativeListProperty(this, (void *)d, QQuickFlickablePrivate::data_append, + return QQmlListProperty(this, (void *)d, QQuickFlickablePrivate::data_append, QQuickFlickablePrivate::data_count, QQuickFlickablePrivate::data_at, QQuickFlickablePrivate::data_clear); } -QDeclarativeListProperty QQuickFlickable::flickableChildren() +QQmlListProperty QQuickFlickable::flickableChildren() { Q_D(QQuickFlickable); return QQuickItemPrivate::get(d->contentItem)->children(); @@ -1475,7 +1477,7 @@ void QQuickFlickable::setBoundsBehavior(BoundsBehavior b) The following snippet shows how these properties are used to display an image that is larger than the Flickable item itself: - \snippet doc/src/snippets/declarative/flickable.qml document + \snippet doc/src/snippets/qml/flickable.qml document In some cases, the the content dimensions can be automatically set using the \l {Item::childrenRect.width}{childrenRect.width} diff --git a/src/quick/items/qquickflickable_p.h b/src/quick/items/qquickflickable_p.h index 9d6ca94770..7a19b0c05a 100644 --- a/src/quick/items/qquickflickable_p.h +++ b/src/quick/items/qquickflickable_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -97,8 +97,8 @@ class Q_QUICK_EXPORT QQuickFlickable : public QQuickItem Q_PROPERTY(bool pixelAligned READ pixelAligned WRITE setPixelAligned NOTIFY pixelAlignedChanged) - Q_PROPERTY(QDeclarativeListProperty flickableData READ flickableData) - Q_PROPERTY(QDeclarativeListProperty flickableChildren READ flickableChildren) + Q_PROPERTY(QQmlListProperty flickableData READ flickableData) + Q_PROPERTY(QQmlListProperty flickableChildren READ flickableChildren) Q_CLASSINFO("DefaultProperty", "flickableData") Q_ENUMS(FlickableDirection) @@ -108,8 +108,8 @@ class Q_QUICK_EXPORT QQuickFlickable : public QQuickItem QQuickFlickable(QQuickItem *parent=0); ~QQuickFlickable(); - QDeclarativeListProperty flickableData(); - QDeclarativeListProperty flickableChildren(); + QQmlListProperty flickableData(); + QQmlListProperty flickableChildren(); enum BoundsBehavior { StopAtBounds, DragOverBounds, DragAndOvershootBounds }; BoundsBehavior boundsBehavior() const; diff --git a/src/quick/items/qquickflickable_p_p.h b/src/quick/items/qquickflickable_p_p.h index 7b16f1ac52..ac6f2fffed 100644 --- a/src/quick/items/qquickflickable_p_p.h +++ b/src/quick/items/qquickflickable_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -57,12 +57,12 @@ #include "qquickitem_p.h" #include "qquickitemchangelistener_p.h" -#include +#include #include #include "qplatformdefs.h" -#include -#include +#include +#include QT_BEGIN_NAMESPACE @@ -80,13 +80,13 @@ class Q_AUTOTEST_EXPORT QQuickFlickablePrivate : public QQuickItemPrivate, publi QQuickFlickablePrivate(); void init(); - struct Velocity : public QDeclarativeTimeLineValue + struct Velocity : public QQuickTimeLineValue { Velocity(QQuickFlickablePrivate *p) : parent(p) {} virtual void setValue(qreal v) { if (v != value()) { - QDeclarativeTimeLineValue::setValue(v); + QQuickTimeLineValue::setValue(v); parent->updateVelocity(); } } @@ -119,7 +119,7 @@ class Q_AUTOTEST_EXPORT QQuickFlickablePrivate : public QQuickItemPrivate, publi void addVelocitySample(qreal v, qreal maxVelocity); void updateVelocity(); - QDeclarativeTimeLineValueProxy move; + QQuickTimeLineValueProxy move; qreal viewSize; qreal pressPos; qreal dragStartOffset; @@ -148,7 +148,7 @@ class Q_AUTOTEST_EXPORT QQuickFlickablePrivate : public QQuickItemPrivate, publi void flickX(qreal velocity); void flickY(qreal velocity); virtual void flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize, - QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity); + QQuickTimeLineCallback::Callback fixupCallback, qreal velocity); void fixupX(); void fixupY(); @@ -176,7 +176,7 @@ class Q_AUTOTEST_EXPORT QQuickFlickablePrivate : public QQuickItemPrivate, publi AxisData hData; AxisData vData; - QDeclarativeTimeLine timeline; + QQuickTimeLine timeline; bool hMoved : 1; bool vMoved : 1; bool stealMouse : 1; @@ -209,7 +209,7 @@ class Q_AUTOTEST_EXPORT QQuickFlickablePrivate : public QQuickItemPrivate, publi void updateVelocity(); int vTime; - QDeclarativeTimeLine velocityTimeline; + QQuickTimeLine velocityTimeline; QQuickFlickableVisibleArea *visibleArea; QQuickFlickable::FlickableDirection flickableDirection; QQuickFlickable::BoundsBehavior boundsBehavior; @@ -221,10 +221,10 @@ class Q_AUTOTEST_EXPORT QQuickFlickablePrivate : public QQuickItemPrivate, publi qint64 computeCurrentTime(QInputEvent *event); // flickableData property - static void data_append(QDeclarativeListProperty *, QObject *); - static int data_count(QDeclarativeListProperty *); - static QObject *data_at(QDeclarativeListProperty *, int); - static void data_clear(QDeclarativeListProperty *); + static void data_append(QQmlListProperty *, QObject *); + static int data_count(QQmlListProperty *); + static QObject *data_at(QQmlListProperty *, int); + static void data_clear(QQmlListProperty *); }; class QQuickFlickableVisibleArea : public QObject diff --git a/src/quick/items/qquickflipable.cpp b/src/quick/items/qquickflipable.cpp index a29c6f0d83..f454ce54d5 100644 --- a/src/quick/items/qquickflipable.cpp +++ b/src/quick/items/qquickflipable.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,9 +42,9 @@ #include "qquickflipable_p.h" #include "qquickitem_p.h" -#include +#include -#include +#include QT_BEGIN_NAMESPACE @@ -78,9 +78,9 @@ class QQuickFlipablePrivate : public QQuickItemPrivate void setBackTransform(); QQuickFlipable::Side current; - QDeclarativeGuard backTransform; - QDeclarativeGuard front; - QDeclarativeGuard back; + QQmlGuard backTransform; + QQmlGuard front; + QQmlGuard back; bool sideDirty; bool wantBackXFlipped; @@ -113,7 +113,7 @@ class QQuickFlipablePrivate : public QQuickItemPrivate degrees to produce the flipping effect. When \c flipped is false, the item reverts to the default state, in which the \c angle value is 0. - \snippet doc/src/snippets/declarative/flipable/flipable.qml 0 + \snippet doc/src/snippets/qml/flipable/flipable.qml 0 \image flipable.gif diff --git a/src/quick/items/qquickflipable_p.h b/src/quick/items/qquickflipable_p.h index cf17bce314..dd53ec3d49 100644 --- a/src/quick/items/qquickflipable_p.h +++ b/src/quick/items/qquickflipable_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickfocusscope.cpp b/src/quick/items/qquickfocusscope.cpp index b1d3516d3b..7ef2476b30 100644 --- a/src/quick/items/qquickfocusscope.cpp +++ b/src/quick/items/qquickfocusscope.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickfocusscope_p.h b/src/quick/items/qquickfocusscope_p.h index 889b45ca1c..6d43dbb619 100644 --- a/src/quick/items/qquickfocusscope_p.h +++ b/src/quick/items/qquickfocusscope_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp index d7f4b808f2..a57d0ee778 100644 --- a/src/quick/items/qquickgridview.cpp +++ b/src/quick/items/qquickgridview.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,7 +44,7 @@ #include "qquickflickable_p_p.h" #include "qquickitemview_p_p.h" -#include +#include #include #include @@ -193,7 +193,7 @@ class QQuickGridViewPrivate : public QQuickItemViewPrivate virtual void setPosition(qreal pos); virtual void layoutVisibleItems(int fromModelIndex = 0); - virtual bool applyInsertionChange(const QDeclarativeChangeSet::Insert &insert, ChangeResult *changeResult, QList *addedItems, QList *movingIntoView); + virtual bool applyInsertionChange(const QQuickChangeSet::Insert &insert, ChangeResult *changeResult, QList *addedItems, QList *movingIntoView); virtual void translateAndTransitionItemsAfter(int afterModelIndex, const ChangeResult &insertionResult, const ChangeResult &removalResult); virtual bool needsRefillForAddedOrRemovedIndex(int index) const; @@ -211,7 +211,7 @@ class QQuickGridViewPrivate : public QQuickItemViewPrivate virtual void fixupPosition(); virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent); virtual void flick(QQuickItemViewPrivate::AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize, - QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity); + QQuickTimeLineCallback::Callback fixupCallback, qreal velocity); QQuickGridView::Flow flow; qreal cellWidth; @@ -692,10 +692,10 @@ void QQuickGridViewPrivate::createHighlight() if (autoHighlight) resetHighlightPosition(); highlightXAnimator = new QSmoothedAnimation; - highlightXAnimator->target = QDeclarativeProperty(item, QLatin1String("x")); + highlightXAnimator->target = QQmlProperty(item, QLatin1String("x")); highlightXAnimator->userDuration = highlightMoveDuration; highlightYAnimator = new QSmoothedAnimation; - highlightYAnimator->target = QDeclarativeProperty(item, QLatin1String("y")); + highlightYAnimator->target = QQmlProperty(item, QLatin1String("y")); highlightYAnimator->userDuration = highlightMoveDuration; highlight = newHighlight; @@ -960,7 +960,7 @@ void QQuickGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExte } void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize, - QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity) + QQuickTimeLineCallback::Callback fixupCallback, qreal velocity) { Q_Q(QQuickGridView); data.fixingUp = false; @@ -1060,7 +1060,7 @@ void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte } timeline.reset(data.move); timeline.accel(data.move, v, accel, maxDistance + overshootDist); - timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this)); + timeline.callback(QQuickTimeLineCallback(&data.move, fixupCallback, this)); if (!hData.flicking && q->xflick()) { hData.flicking = true; emit q->flickingChanged(); @@ -1103,7 +1103,7 @@ void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte The following example shows the definition of a simple list model defined in a file called \c ContactModel.qml: - \snippet doc/src/snippets/declarative/gridview/ContactModel.qml 0 + \snippet doc/src/snippets/qml/gridview/ContactModel.qml 0 \div {class="float-right"} \inlineimage gridview-simple.png @@ -1117,9 +1117,9 @@ void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte (containing \l Image and \l Text elements) for its delegate. \clearfloat - \snippet doc/src/snippets/declarative/gridview/gridview.qml import + \snippet doc/src/snippets/qml/gridview/gridview.qml import \codeline - \snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs simple + \snippet doc/src/snippets/qml/gridview/gridview.qml classdocs simple \div {class="float-right"} \inlineimage gridview-highlight.png @@ -1132,7 +1132,7 @@ void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte into a separate \c contactDelegate component. \clearfloat - \snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs advanced + \snippet doc/src/snippets/qml/gridview/gridview.qml classdocs advanced The currently selected item is highlighted with a blue \l Rectangle using the \l highlight property, and \c focus is set to \c true to enable keyboard navigation for the grid view. @@ -1146,7 +1146,7 @@ void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte this attached property directly as \c GridView.isCurrentItem, while the child \c contactInfo object must refer to this property as \c wrapper.GridView.isCurrentItem. - \snippet doc/src/snippets/declarative/gridview/gridview.qml isCurrentItem + \snippet doc/src/snippets/qml/gridview/gridview.qml isCurrentItem \note Views do not set the \l{Item::}{clip} property automatically. If the view is not clipped by another item or the screen, it will be necessary @@ -1190,7 +1190,7 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight) It is attached to each instance of the delegate. - \snippet doc/src/snippets/declarative/gridview/gridview.qml isCurrentItem + \snippet doc/src/snippets/qml/gridview/gridview.qml isCurrentItem */ /*! @@ -1202,7 +1202,7 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight) until an animation completes. The example delegate below ensures that the animation completes before the item is removed from the list. - \snippet doc/src/snippets/declarative/gridview/gridview.qml delayRemove + \snippet doc/src/snippets/qml/gridview/gridview.qml delayRemove If a \l remove transition has been specified, it will not be applied until delayRemove is returned to \c false. @@ -1310,7 +1310,7 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight) Here is a highlight with its motion defined by a \l {SpringAnimation} item: - \snippet doc/src/snippets/declarative/gridview/gridview.qml highlightFollowsCurrentItem + \snippet doc/src/snippets/qml/gridview/gridview.qml highlightFollowsCurrentItem */ @@ -2051,7 +2051,7 @@ void QQuickGridView::moveCurrentIndexRight() } } -bool QQuickGridViewPrivate::applyInsertionChange(const QDeclarativeChangeSet::Insert &change, ChangeResult *insertResult, QList *addedItems, QList *movingIntoView) +bool QQuickGridViewPrivate::applyInsertionChange(const QQuickChangeSet::Insert &change, ChangeResult *insertResult, QList *addedItems, QList *movingIntoView) { Q_Q(QQuickGridView); diff --git a/src/quick/items/qquickgridview_p.h b/src/quick/items/qquickgridview_p.h index b8f44ed0e1..ac3c8f097d 100644 --- a/src/quick/items/qquickgridview_p.h +++ b/src/quick/items/qquickgridview_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,7 +44,7 @@ #include "qquickitemview_p.h" -#include +#include QT_BEGIN_HEADER @@ -131,7 +131,7 @@ class QQuickGridViewAttached : public QQuickItemViewAttached void viewChanged(); public: - QDeclarativeGuard m_view; + QQmlGuard m_view; }; diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp index a71c666977..a939365e98 100644 --- a/src/quick/items/qquickimage.cpp +++ b/src/quick/items/qquickimage.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -120,7 +120,7 @@ QQuickImagePrivate::QQuickImagePrivate() The following example shows the simplest usage of the Image element. - \snippet doc/src/snippets/declarative/image.qml document + \snippet doc/src/snippets/qml/image.qml document \beginfloatleft \image declarative-qtlogo.png @@ -147,7 +147,7 @@ QQuickImagePrivate::QQuickImagePrivate() size bounded via the \l sourceSize property. This is especially important for content that is loaded from external sources or provided by the user. - \sa {declarative/imageelements/image}{Image example}, QDeclarativeImageProvider + \sa {declarative/imageelements/image}{Image example}, QQmlImageProvider */ QQuickImage::QQuickImage(QQuickItem *parent) @@ -431,7 +431,7 @@ qreal QQuickImage::paintedHeight() const The URL may be absolute, or relative to the URL of the component. - \sa QDeclarativeImageProvider + \sa QQmlImageProvider */ /*! diff --git a/src/quick/items/qquickimage_p.h b/src/quick/items/qquickimage_p.h index 35337dfd09..a9e37b47e1 100644 --- a/src/quick/items/qquickimage_p.h +++ b/src/quick/items/qquickimage_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickimage_p_p.h b/src/quick/items/qquickimage_p_p.h index 25e267ccff..6a0ba1535f 100644 --- a/src/quick/items/qquickimage_p_p.h +++ b/src/quick/items/qquickimage_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp index 8b127ba571..0bdfab67a9 100644 --- a/src/quick/items/qquickimagebase.cpp +++ b/src/quick/items/qquickimagebase.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,7 +42,7 @@ #include "qquickimagebase_p.h" #include "qquickimagebase_p_p.h" -#include +#include QT_BEGIN_NAMESPACE @@ -202,11 +202,11 @@ void QQuickImageBase::load() emit statusChanged(d->status); update(); } else { - QDeclarativePixmap::Options options; + QQuickPixmap::Options options; if (d->async) - options |= QDeclarativePixmap::Asynchronous; + options |= QQuickPixmap::Asynchronous; if (d->cache) - options |= QDeclarativePixmap::Cache; + options |= QQuickPixmap::Cache; d->pix.clear(this); pixmapChange(); d->pix.load(qmlEngine(this), d->url, d->explicitSourceSize ? sourceSize() : QSize(), options); diff --git a/src/quick/items/qquickimagebase_p.h b/src/quick/items/qquickimagebase_p.h index bbda9dba9a..dfff1e4b0e 100644 --- a/src/quick/items/qquickimagebase_p.h +++ b/src/quick/items/qquickimagebase_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickimagebase_p_p.h b/src/quick/items/qquickimagebase_p_p.h index dd9185676f..7c2fce1e79 100644 --- a/src/quick/items/qquickimagebase_p_p.h +++ b/src/quick/items/qquickimagebase_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -56,7 +56,7 @@ #include "qquickimplicitsizeitem_p_p.h" #include "qquickimagebase_p.h" -#include +#include QT_BEGIN_NAMESPACE @@ -76,7 +76,7 @@ class QQuickImageBasePrivate : public QQuickImplicitSizeItemPrivate { } - QDeclarativePixmap pix; + QQuickPixmap pix; QQuickImageBase::Status status; QUrl url; qreal progress; diff --git a/src/quick/items/qquickimplicitsizeitem.cpp b/src/quick/items/qquickimplicitsizeitem.cpp index 040263e35a..427be42312 100644 --- a/src/quick/items/qquickimplicitsizeitem.cpp +++ b/src/quick/items/qquickimplicitsizeitem.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickimplicitsizeitem_p.h b/src/quick/items/qquickimplicitsizeitem_p.h index 5c4bac3585..a6d58325d8 100644 --- a/src/quick/items/qquickimplicitsizeitem_p.h +++ b/src/quick/items/qquickimplicitsizeitem_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickimplicitsizeitem_p_p.h b/src/quick/items/qquickimplicitsizeitem_p_p.h index 15ca8b3127..84e3027e64 100644 --- a/src/quick/items/qquickimplicitsizeitem_p_p.h +++ b/src/quick/items/qquickimplicitsizeitem_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 04f4c1f801..357c72cc71 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,15 +42,15 @@ #include "qquickitem.h" #include "qquickcanvas.h" -#include +#include #include "qquickcanvas_p.h" #include "qquickevents_p_p.h" #include "qquickscreen_p.h" -#include -#include -#include +#include +#include +#include #include #include #include @@ -59,13 +59,14 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include -#include +#include #include #include @@ -74,7 +75,7 @@ QT_BEGIN_NAMESPACE -static void QQuickItem_parentNotifier(QObject *o, intptr_t, QDeclarativeNotifier **n) +static void QQuickItem_parentNotifier(QObject *o, intptr_t, QQmlNotifier **n) { QQuickItemPrivate *d = QQuickItemPrivate::get(static_cast(o)); *n = &d->parentNotifier; @@ -86,11 +87,11 @@ QML_PRIVATE_ACCESSOR(QQuickItem, qreal, y, y) QML_PRIVATE_ACCESSOR(QQuickItem, qreal, width, width) QML_PRIVATE_ACCESSOR(QQuickItem, qreal, height, height) -static QDeclarativeAccessors QQuickItem_parent = { QQuickItem_parentRead, QQuickItem_parentNotifier }; -static QDeclarativeAccessors QQuickItem_x = { QQuickItem_xRead, 0 }; -static QDeclarativeAccessors QQuickItem_y = { QQuickItem_yRead, 0 }; -static QDeclarativeAccessors QQuickItem_width = { QQuickItem_widthRead, 0 }; -static QDeclarativeAccessors QQuickItem_height = { QQuickItem_heightRead, 0 }; +static QQmlAccessors QQuickItem_parent = { QQuickItem_parentRead, QQuickItem_parentNotifier }; +static QQmlAccessors QQuickItem_x = { QQuickItem_xRead, 0 }; +static QQmlAccessors QQuickItem_y = { QQuickItem_yRead, 0 }; +static QQmlAccessors QQuickItem_width = { QQuickItem_widthRead, 0 }; +static QQmlAccessors QQuickItem_height = { QQuickItem_heightRead, 0 }; QML_DECLARE_PROPERTIES(QQuickItem) { { QML_PROPERTY_NAME(parent), 0, &QQuickItem_parent }, @@ -233,7 +234,7 @@ void QQuickItemPrivate::registerAccessorProperties() rotations you must specify the axis to rotate around in addition to the origin point. The following example shows various 3D-like rotations applied to an \l Image. - \snippet doc/src/snippets/declarative/rotation.qml 0 + \snippet doc/src/snippets/qml/rotation.qml 0 \image axisrotation.png @@ -491,7 +492,7 @@ void QQuickItemKeyFilter::componentComplete() The following example provides key navigation for a 2x2 grid of items: - \snippet doc/src/snippets/declarative/keynavigation.qml 0 + \snippet doc/src/snippets/qml/keynavigation.qml 0 The top-left item initially receives focus by setting \l {Item::}{focus} to \c true. When an arrow key is pressed, the focus will move to the @@ -912,13 +913,13 @@ bool QQuickKeysAttachedPrivate::isConnected(const char *signalName) be used to test for a certain key; in this case, the left cursor key: - \snippet doc/src/snippets/declarative/keys/keys-pressed.qml key item + \snippet doc/src/snippets/qml/keys/keys-pressed.qml key item Some keys may alternatively be handled via specific signal properties, for example \e onSelectPressed. These handlers automatically set \e event.accepted to true. - \snippet doc/src/snippets/declarative/keys/keys-handler.qml key item + \snippet doc/src/snippets/qml/keys/keys-handler.qml key item See \l{Qt::Key}{Qt.Key} for the list of keyboard codes. @@ -1460,7 +1461,7 @@ QQuickKeysAttached *QQuickKeysAttached::qmlAttachedProperties(QObject *obj) from left to right by default, they are now positioned from right to left instead, as demonstrated by the numbering and opacity of the items: - \snippet doc/src/snippets/declarative/layoutmirroring.qml 0 + \snippet doc/src/snippets/qml/layoutmirroring.qml 0 \image layoutmirroring.png @@ -2351,7 +2352,7 @@ void QQuickItemPrivate::init(QQuickItem *parent) } } -void QQuickItemPrivate::data_append(QDeclarativeListProperty *prop, QObject *o) +void QQuickItemPrivate::data_append(QQmlListProperty *prop, QObject *o) { if (!o) return; @@ -2410,14 +2411,14 @@ void QQuickItemPrivate::data_append(QDeclarativeListProperty *prop, QOb specify it. */ -int QQuickItemPrivate::data_count(QDeclarativeListProperty *prop) +int QQuickItemPrivate::data_count(QQmlListProperty *prop) { Q_UNUSED(prop); // XXX todo return 0; } -QObject *QQuickItemPrivate::data_at(QDeclarativeListProperty *prop, int i) +QObject *QQuickItemPrivate::data_at(QQmlListProperty *prop, int i) { Q_UNUSED(prop); Q_UNUSED(i); @@ -2425,13 +2426,13 @@ QObject *QQuickItemPrivate::data_at(QDeclarativeListProperty *prop, int return 0; } -void QQuickItemPrivate::data_clear(QDeclarativeListProperty *prop) +void QQuickItemPrivate::data_clear(QQmlListProperty *prop) { Q_UNUSED(prop); // XXX todo } -QObject *QQuickItemPrivate::resources_at(QDeclarativeListProperty *prop, int index) +QObject *QQuickItemPrivate::resources_at(QQmlListProperty *prop, int index) { const QObjectList children = prop->object->children(); if (index < children.count()) @@ -2440,18 +2441,18 @@ QObject *QQuickItemPrivate::resources_at(QDeclarativeListProperty *prop return 0; } -void QQuickItemPrivate::resources_append(QDeclarativeListProperty *prop, QObject *o) +void QQuickItemPrivate::resources_append(QQmlListProperty *prop, QObject *o) { // XXX todo - do we really want this behavior? o->setParent(prop->object); } -int QQuickItemPrivate::resources_count(QDeclarativeListProperty *prop) +int QQuickItemPrivate::resources_count(QQmlListProperty *prop) { return prop->object->children().count(); } -void QQuickItemPrivate::resources_clear(QDeclarativeListProperty *prop) +void QQuickItemPrivate::resources_clear(QQmlListProperty *prop) { // XXX todo - do we really want this behavior? const QObjectList children = prop->object->children(); @@ -2459,7 +2460,7 @@ void QQuickItemPrivate::resources_clear(QDeclarativeListProperty *prop) children.at(index)->setParent(0); } -QQuickItem *QQuickItemPrivate::children_at(QDeclarativeListProperty *prop, int index) +QQuickItem *QQuickItemPrivate::children_at(QQmlListProperty *prop, int index) { QQuickItemPrivate *p = QQuickItemPrivate::get(static_cast(prop->object)); if (index >= p->childItems.count() || index < 0) @@ -2468,7 +2469,7 @@ QQuickItem *QQuickItemPrivate::children_at(QDeclarativeListProperty return p->childItems.at(index); } -void QQuickItemPrivate::children_append(QDeclarativeListProperty *prop, QQuickItem *o) +void QQuickItemPrivate::children_append(QQmlListProperty *prop, QQuickItem *o) { if (!o) return; @@ -2480,13 +2481,13 @@ void QQuickItemPrivate::children_append(QDeclarativeListProperty *pr o->setParentItem(that); } -int QQuickItemPrivate::children_count(QDeclarativeListProperty *prop) +int QQuickItemPrivate::children_count(QQmlListProperty *prop) { QQuickItemPrivate *p = QQuickItemPrivate::get(static_cast(prop->object)); return p->childItems.count(); } -void QQuickItemPrivate::children_clear(QDeclarativeListProperty *prop) +void QQuickItemPrivate::children_clear(QQmlListProperty *prop) { QQuickItem *that = static_cast(prop->object); QQuickItemPrivate *p = QQuickItemPrivate::get(that); @@ -2494,13 +2495,13 @@ void QQuickItemPrivate::children_clear(QDeclarativeListProperty *pro p->childItems.at(0)->setParentItem(0); } -void QQuickItemPrivate::visibleChildren_append(QDeclarativeListProperty*, QQuickItem *self) +void QQuickItemPrivate::visibleChildren_append(QQmlListProperty*, QQuickItem *self) { // do nothing qmlInfo(self) << "QQuickItem: visibleChildren property is readonly and cannot be assigned to."; } -int QQuickItemPrivate::visibleChildren_count(QDeclarativeListProperty *prop) +int QQuickItemPrivate::visibleChildren_count(QQmlListProperty *prop) { QQuickItemPrivate *p = QQuickItemPrivate::get(static_cast(prop->object)); int visibleCount = 0; @@ -2512,7 +2513,7 @@ int QQuickItemPrivate::visibleChildren_count(QDeclarativeListProperty *prop, int index) +QQuickItem *QQuickItemPrivate::visibleChildren_at(QQmlListProperty *prop, int index) { QQuickItemPrivate *p = QQuickItemPrivate::get(static_cast(prop->object)); const int childCount = p->childItems.count(); @@ -2527,7 +2528,7 @@ QQuickItem *QQuickItemPrivate::visibleChildren_at(QDeclarativeListProperty *prop) +int QQuickItemPrivate::transform_count(QQmlListProperty *prop) { QQuickItem *that = static_cast(prop->object); QQuickItemPrivate *p = QQuickItemPrivate::get(that); @@ -2573,7 +2574,7 @@ void QQuickTransform::prependToItem(QQuickItem *item) p->dirty(QQuickItemPrivate::Transform); } -void QQuickItemPrivate::transform_append(QDeclarativeListProperty *prop, QQuickTransform *transform) +void QQuickItemPrivate::transform_append(QQmlListProperty *prop, QQuickTransform *transform) { if (!transform) return; @@ -2582,7 +2583,7 @@ void QQuickItemPrivate::transform_append(QDeclarativeListPropertyappendToItem(that); } -QQuickTransform *QQuickItemPrivate::transform_at(QDeclarativeListProperty *prop, int idx) +QQuickTransform *QQuickItemPrivate::transform_at(QQmlListProperty *prop, int idx) { QQuickItem *that = static_cast(prop->object); QQuickItemPrivate *p = QQuickItemPrivate::get(that); @@ -2593,7 +2594,7 @@ QQuickTransform *QQuickItemPrivate::transform_at(QDeclarativeListPropertytransforms.at(idx); } -void QQuickItemPrivate::transform_clear(QDeclarativeListProperty *prop) +void QQuickItemPrivate::transform_clear(QQmlListProperty *prop) { QQuickItem *that = static_cast(prop->object); QQuickItemPrivate *p = QQuickItemPrivate::get(that); @@ -2852,9 +2853,9 @@ void QQuickItemPrivate::siblingOrderChanged() } } -QDeclarativeListProperty QQuickItemPrivate::data() +QQmlListProperty QQuickItemPrivate::data() { - return QDeclarativeListProperty(q_func(), 0, QQuickItemPrivate::data_append, + return QQmlListProperty(q_func(), 0, QQuickItemPrivate::data_append, QQuickItemPrivate::data_count, QQuickItemPrivate::data_at, QQuickItemPrivate::data_clear); @@ -3233,7 +3234,7 @@ void QQuickItem::polish() } } -void QQuickItem::mapFromItem(QDeclarativeV8Function *args) const +void QQuickItem::mapFromItem(QQmlV8Function *args) const { if (args->Length() != 0) { v8::Local item = (*args)[0]; @@ -3276,7 +3277,7 @@ QTransform QQuickItem::itemTransform(QQuickItem *other, bool *ok) const return t; } -void QQuickItem::mapToItem(QDeclarativeV8Function *args) const +void QQuickItem::mapToItem(QQmlV8Function *args) const { if (args->Length() != 0) { v8::Local item = (*args)[0]; @@ -3332,17 +3333,17 @@ QQuickItem *QQuickItem::childAt(qreal x, qreal y) const return 0; } -QDeclarativeListProperty QQuickItemPrivate::resources() +QQmlListProperty QQuickItemPrivate::resources() { - return QDeclarativeListProperty(q_func(), 0, QQuickItemPrivate::resources_append, + return QQmlListProperty(q_func(), 0, QQuickItemPrivate::resources_append, QQuickItemPrivate::resources_count, QQuickItemPrivate::resources_at, QQuickItemPrivate::resources_clear); } -QDeclarativeListProperty QQuickItemPrivate::children() +QQmlListProperty QQuickItemPrivate::children() { - return QDeclarativeListProperty(q_func(), 0, QQuickItemPrivate::children_append, + return QQmlListProperty(q_func(), 0, QQuickItemPrivate::children_append, QQuickItemPrivate::children_count, QQuickItemPrivate::children_at, QQuickItemPrivate::children_clear); @@ -3355,20 +3356,20 @@ QDeclarativeListProperty QQuickItemPrivate::children() Note that a child's visibility may have changed explicitly, or because the visibility of this (it's parent) item or another grandparent changed. */ -QDeclarativeListProperty QQuickItemPrivate::visibleChildren() +QQmlListProperty QQuickItemPrivate::visibleChildren() { - return QDeclarativeListProperty(q_func(), 0, QQuickItemPrivate::visibleChildren_append, + return QQmlListProperty(q_func(), 0, QQuickItemPrivate::visibleChildren_append, QQuickItemPrivate::visibleChildren_count, QQuickItemPrivate::visibleChildren_at); } -QDeclarativeListProperty QQuickItemPrivate::states() +QQmlListProperty QQuickItemPrivate::states() { return _states()->statesProperty(); } -QDeclarativeListProperty QQuickItemPrivate::transitions() +QQmlListProperty QQuickItemPrivate::transitions() { return _states()->transitionsProperty(); } @@ -3398,9 +3399,9 @@ void QQuickItem::setState(const QString &state) d->setState(state); } -QDeclarativeListProperty QQuickItem::transform() +QQmlListProperty QQuickItem::transform() { - return QDeclarativeListProperty(this, 0, QQuickItemPrivate::transform_append, + return QQmlListProperty(this, 0, QQuickItemPrivate::transform_append, QQuickItemPrivate::transform_count, QQuickItemPrivate::transform_at, QQuickItemPrivate::transform_clear); @@ -3439,11 +3440,11 @@ void QQuickItem::componentComplete() d->extra->contents->complete(); } -QDeclarativeStateGroup *QQuickItemPrivate::_states() +QQuickStateGroup *QQuickItemPrivate::_states() { Q_Q(QQuickItem); if (!_stateGroup) { - _stateGroup = new QDeclarativeStateGroup; + _stateGroup = new QQuickStateGroup; if (!componentComplete) _stateGroup->classBegin(); FAST_CONNECT(_stateGroup, SIGNAL(stateChanged(QString)), @@ -5566,7 +5567,7 @@ void QQuickItemLayer::deactivateEffect() \sa samplerName */ -void QQuickItemLayer::setEffect(QDeclarativeComponent *component) +void QQuickItemLayer::setEffect(QQmlComponent *component) { if (component == m_effectComponent) return; diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h index 7f98db9168..c44192bd3a 100644 --- a/src/quick/items/qquickitem.h +++ b/src/quick/items/qquickitem.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,8 +43,8 @@ #define QQUICKITEM_H #include -#include -#include +#include +#include #include #include @@ -81,10 +81,10 @@ protected Q_SLOTS: }; class QQuickItemLayer; -class QDeclarativeV8Function; -class QDeclarativeState; +class QQmlV8Function; +class QQuickState; class QQuickAnchorLine; -class QDeclarativeTransition; +class QQuickTransition; class QQuickKeyEvent; class QQuickAnchors; class QQuickItemPrivate; @@ -95,15 +95,15 @@ class QSGNode; class QSGTransformNode; class QSGTextureProvider; -class Q_QUICK_EXPORT QQuickItem : public QObject, public QDeclarativeParserStatus +class Q_QUICK_EXPORT QQuickItem : public QObject, public QQmlParserStatus { Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) Q_PROPERTY(QQuickItem *parent READ parentItem WRITE setParentItem NOTIFY parentChanged DESIGNABLE false FINAL) - Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QDeclarativeListProperty data READ data DESIGNABLE false) - Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QDeclarativeListProperty resources READ resources DESIGNABLE false) - Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QDeclarativeListProperty children READ children NOTIFY childrenChanged DESIGNABLE false) + Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQmlListProperty data READ data DESIGNABLE false) + Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQmlListProperty resources READ resources DESIGNABLE false) + Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQmlListProperty children READ children NOTIFY childrenChanged DESIGNABLE false) Q_PROPERTY(QPointF pos READ pos FINAL) Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged FINAL) @@ -115,10 +115,10 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QDeclarativeParserStatu Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged FINAL) Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL) - Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QDeclarativeListProperty visibleChildren READ visibleChildren NOTIFY visibleChildrenChanged DESIGNABLE false) + Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQmlListProperty visibleChildren READ visibleChildren NOTIFY visibleChildrenChanged DESIGNABLE false) - Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QDeclarativeListProperty states READ states DESIGNABLE false) - Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QDeclarativeListProperty transitions READ transitions DESIGNABLE false) + Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQmlListProperty states READ states DESIGNABLE false) + Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQmlListProperty transitions READ transitions DESIGNABLE false) Q_PROPERTY(QString state READ state WRITE setState NOTIFY stateChanged) Q_PROPERTY(QRectF childrenRect READ childrenRect NOTIFY childrenRectChanged DESIGNABLE false FINAL) Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQuickAnchors * anchors READ anchors DESIGNABLE false CONSTANT FINAL) @@ -140,7 +140,7 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QDeclarativeParserStatu Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged) Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged) Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // XXX todo - notify? - Q_PROPERTY(QDeclarativeListProperty transform READ transform DESIGNABLE false FINAL) + Q_PROPERTY(QQmlListProperty transform READ transform DESIGNABLE false FINAL) Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged) Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged) @@ -215,7 +215,7 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QDeclarativeParserStatu qreal baselineOffset() const; void setBaselineOffset(qreal); - QDeclarativeListProperty transform(); + QQmlListProperty transform(); qreal x() const; qreal y() const; @@ -303,8 +303,8 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QDeclarativeParserStatu void polish(); - Q_INVOKABLE void mapFromItem(QDeclarativeV8Function*) const; - Q_INVOKABLE void mapToItem(QDeclarativeV8Function*) const; + Q_INVOKABLE void mapFromItem(QQmlV8Function*) const; + Q_INVOKABLE void mapToItem(QQmlV8Function*) const; Q_INVOKABLE void forceActiveFocus(); Q_INVOKABLE QQuickItem *childAt(qreal x, qreal y) const; diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index c2cc7d000b..8adb80e88b 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -65,14 +65,14 @@ #include "qquickclipnode_p.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include #include @@ -149,7 +149,7 @@ class QQuickItemLayer : public QObject, public QQuickItemChangeListener Q_PROPERTY(QQuickShaderEffectSource::WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged) Q_PROPERTY(QQuickShaderEffectSource::Format format READ format WRITE setFormat NOTIFY formatChanged) Q_PROPERTY(QByteArray samplerName READ name WRITE setName NOTIFY nameChanged) - Q_PROPERTY(QDeclarativeComponent *effect READ effect WRITE setEffect NOTIFY effectChanged) + Q_PROPERTY(QQmlComponent *effect READ effect WRITE setEffect NOTIFY effectChanged) public: QQuickItemLayer(QQuickItem *item); ~QQuickItemLayer(); @@ -181,8 +181,8 @@ class QQuickItemLayer : public QObject, public QQuickItemChangeListener QByteArray name() const { return m_name; } void setName(const QByteArray &name); - QDeclarativeComponent *effect() const { return m_effectComponent; } - void setEffect(QDeclarativeComponent *effect); + QQmlComponent *effect() const { return m_effectComponent; } + void setEffect(QQmlComponent *effect); QQuickShaderEffectSource *effectSource() const { return m_effectSource; } @@ -203,7 +203,7 @@ class QQuickItemLayer : public QObject, public QQuickItemChangeListener void mipmapChanged(bool mipmap); void wrapModeChanged(QQuickShaderEffectSource::WrapMode mode); void nameChanged(const QByteArray &name); - void effectChanged(QDeclarativeComponent *component); + void effectChanged(QQmlComponent *component); void smoothChanged(bool smooth); void formatChanged(QQuickShaderEffectSource::Format format); void sourceRectChanged(const QRectF &sourceRect); @@ -224,7 +224,7 @@ class QQuickItemLayer : public QObject, public QQuickItemChangeListener QSize m_size; QRectF m_sourceRect; QByteArray m_name; - QDeclarativeComponent *m_effectComponent; + QQmlComponent *m_effectComponent; QQuickItem *m_effect; QQuickShaderEffectSource *m_effectSource; }; @@ -243,13 +243,13 @@ class Q_QUICK_EXPORT QQuickItemPrivate : public QObjectPrivate ~QQuickItemPrivate(); void init(QQuickItem *parent); - QDeclarativeListProperty data(); - QDeclarativeListProperty resources(); - QDeclarativeListProperty children(); - QDeclarativeListProperty visibleChildren(); + QQmlListProperty data(); + QQmlListProperty resources(); + QQmlListProperty children(); + QQmlListProperty visibleChildren(); - QDeclarativeListProperty states(); - QDeclarativeListProperty transitions(); + QQmlListProperty states(); + QQmlListProperty transitions(); QString state() const; void setState(const QString &); @@ -265,33 +265,33 @@ class Q_QUICK_EXPORT QQuickItemPrivate : public QObjectPrivate QQuickItemLayer *layer() const; // data property - static void data_append(QDeclarativeListProperty *, QObject *); - static int data_count(QDeclarativeListProperty *); - static QObject *data_at(QDeclarativeListProperty *, int); - static void data_clear(QDeclarativeListProperty *); + static void data_append(QQmlListProperty *, QObject *); + static int data_count(QQmlListProperty *); + static QObject *data_at(QQmlListProperty *, int); + static void data_clear(QQmlListProperty *); // resources property - static QObject *resources_at(QDeclarativeListProperty *, int); - static void resources_append(QDeclarativeListProperty *, QObject *); - static int resources_count(QDeclarativeListProperty *); - static void resources_clear(QDeclarativeListProperty *); + static QObject *resources_at(QQmlListProperty *, int); + static void resources_append(QQmlListProperty *, QObject *); + static int resources_count(QQmlListProperty *); + static void resources_clear(QQmlListProperty *); // children property - static void children_append(QDeclarativeListProperty *, QQuickItem *); - static int children_count(QDeclarativeListProperty *); - static QQuickItem *children_at(QDeclarativeListProperty *, int); - static void children_clear(QDeclarativeListProperty *); + static void children_append(QQmlListProperty *, QQuickItem *); + static int children_count(QQmlListProperty *); + static QQuickItem *children_at(QQmlListProperty *, int); + static void children_clear(QQmlListProperty *); // visibleChildren property - static void visibleChildren_append(QDeclarativeListProperty *prop, QQuickItem *o); - static int visibleChildren_count(QDeclarativeListProperty *prop); - static QQuickItem *visibleChildren_at(QDeclarativeListProperty *prop, int index); + static void visibleChildren_append(QQmlListProperty *prop, QQuickItem *o); + static int visibleChildren_count(QQmlListProperty *prop); + static QQuickItem *visibleChildren_at(QQmlListProperty *prop, int index); // transform property - static int transform_count(QDeclarativeListProperty *list); - static void transform_append(QDeclarativeListProperty *list, QQuickTransform *); - static QQuickTransform *transform_at(QDeclarativeListProperty *list, int); - static void transform_clear(QDeclarativeListProperty *list); + static int transform_count(QQmlListProperty *list); + static void transform_append(QQmlListProperty *list, QQuickTransform *); + static QQuickTransform *transform_at(QQmlListProperty *list, int); + static void transform_clear(QQmlListProperty *list); enum ChangeType { Geometry = 0x01, @@ -372,8 +372,8 @@ class Q_QUICK_EXPORT QQuickItemPrivate : public QObjectPrivate void updateOrAddGeometryChangeListener(QQuickItemChangeListener *listener, GeometryChangeTypes types); void updateOrRemoveGeometryChangeListener(QQuickItemChangeListener *listener, GeometryChangeTypes types); - QDeclarativeStateGroup *_states(); - QDeclarativeStateGroup *_stateGroup; + QQuickStateGroup *_states(); + QQuickStateGroup *_stateGroup; inline QQuickItem::TransformOrigin origin() const; @@ -453,7 +453,7 @@ class Q_QUICK_EXPORT QQuickItemPrivate : public QObjectPrivate inline QSGContext *sceneGraphContext() const; QQuickItem *parentItem; - QDeclarativeNotifier parentNotifier; + QQmlNotifier parentNotifier; QList childItems; mutable QList *sortedChildItems; @@ -723,7 +723,7 @@ class QQuickKeysAttached : public QObject, public QQuickItemKeyFilter Q_DECLARE_PRIVATE(QQuickKeysAttached) Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) - Q_PROPERTY(QDeclarativeListProperty forwardTo READ forwardTo) + Q_PROPERTY(QQmlListProperty forwardTo READ forwardTo) Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged) Q_ENUMS(Priority) @@ -745,9 +745,9 @@ class QQuickKeysAttached : public QObject, public QQuickItemKeyFilter Priority priority() const; void setPriority(Priority); - QDeclarativeListProperty forwardTo() { + QQmlListProperty forwardTo() { Q_D(QQuickKeysAttached); - return QDeclarativeListProperty(this, d->targets); + return QQmlListProperty(this, d->targets); } virtual void componentComplete(); diff --git a/src/quick/items/qquickanimation.cpp b/src/quick/items/qquickitemanimation.cpp similarity index 92% rename from src/quick/items/qquickanimation.cpp rename to src/quick/items/qquickitemanimation.cpp index 4880190697..1316a3d84a 100644 --- a/src/quick/items/qquickanimation.cpp +++ b/src/quick/items/qquickitemanimation.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,14 +39,14 @@ ** ****************************************************************************/ -#include "qquickanimation_p.h" -#include "qquickanimation_p_p.h" +#include "qquickitemanimation_p.h" +#include "qquickitemanimation_p_p.h" #include "qquickstateoperations_p.h" -#include -#include +#include +#include -#include +#include #include #include "private/qsequentialanimationgroupjob_p.h" #include "private/qparallelanimationgroupjob_p.h" @@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE the transition, ensures the item animates smoothly as it moves to its new parent: - \snippet doc/src/snippets/declarative/parentanimation.qml 0 + \snippet doc/src/snippets/qml/parentanimation.qml 0 A ParentAnimation can contain any number of animations. These animations will be run in parallel; to run them sequentially, define them within a @@ -93,7 +93,7 @@ QT_BEGIN_NAMESPACE \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ QQuickParentAnimation::QQuickParentAnimation(QObject *parent) - : QDeclarativeAnimationGroup(*(new QQuickParentAnimationPrivate), parent) + : QQuickAnimationGroup(*(new QQuickParentAnimationPrivate), parent) { } @@ -204,8 +204,8 @@ QPointF QQuickParentAnimationPrivate::computeTransformOrigin(QQuickItem::Transfo } } -QAbstractAnimationJob* QQuickParentAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { @@ -216,14 +216,14 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QDeclarativeStateAction QQuickParentAnimationData() {} ~QQuickParentAnimationData() { qDeleteAll(pc); } - QDeclarativeStateActions actions; + QQuickStateActions actions; //### reverse should probably apply on a per-action basis bool reverse; QList pc; virtual void doAction() { for (int ii = 0; ii < actions.count(); ++ii) { - const QDeclarativeAction &action = actions.at(ii); + const QQuickAction &action = actions.at(ii); if (reverse) action.event->reverse(); else @@ -238,7 +238,7 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QDeclarativeStateAction bool hasExplicit = false; if (d->target && d->newParent) { data->reverse = false; - QDeclarativeAction myAction; + QQuickAction myAction; QQuickParentChange *pc = new QQuickParentChange; pc->setObject(d->target); pc->setParent(d->newParent); @@ -248,7 +248,7 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QDeclarativeStateAction hasExplicit = true; if (d->via) { viaData->reverse = false; - QDeclarativeAction myVAction; + QQuickAction myVAction; QQuickParentChange *vpc = new QQuickParentChange; vpc->setObject(d->target); vpc->setParent(d->via); @@ -262,12 +262,12 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QDeclarativeStateAction if (!hasExplicit) for (int i = 0; i < actions.size(); ++i) { - QDeclarativeAction &action = actions[i]; - if (action.event && action.event->type() == QDeclarativeActionEvent::ParentChange + QQuickAction &action = actions[i]; + if (action.event && action.event->type() == QQuickActionEvent::ParentChange && (!d->target || static_cast(action.event)->object() == d->target)) { QQuickParentChange *pc = static_cast(action.event); - QDeclarativeAction myAction = action; + QQuickAction myAction = action; data->reverse = action.reverseEvent; //### this logic differs from PropertyAnimation @@ -287,18 +287,18 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QDeclarativeStateAction if (d->via) { viaData->reverse = false; - QDeclarativeAction myAction; + QQuickAction myAction; QQuickParentChange *vpc = new QQuickParentChange; vpc->setObject(pc->object()); vpc->setParent(d->via); myAction.event = vpc; viaData->pc << vpc; viaData->actions << myAction; - QDeclarativeAction dummyAction; - QDeclarativeAction &xAction = pc->xIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction; - QDeclarativeAction &yAction = pc->yIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction; - QDeclarativeAction &sAction = pc->scaleIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction; - QDeclarativeAction &rAction = pc->rotationIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction; + QQuickAction dummyAction; + QQuickAction &xAction = pc->xIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction; + QQuickAction &yAction = pc->yIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction; + QQuickAction &sAction = pc->scaleIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction; + QQuickAction &rAction = pc->rotationIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction; QQuickItem *target = pc->object(); QQuickItem *targetParent = action.reverseEvent ? pc->originalParent() : pc->parent(); @@ -393,7 +393,7 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QDeclarativeStateAction } //TODO: simplify/clarify logic - bool forwards = direction == QDeclarativeAbstractAnimation::Forward; + bool forwards = direction == QQuickAbstractAnimation::Forward; if (forwards) { topLevelGroup->appendAnimation(d->via ? viaAction : targetAction); topLevelGroup->appendAnimation(ag); @@ -424,7 +424,7 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QDeclarativeStateAction In the following snippet we animate the addition of a right anchor to a \l Rectangle: - \snippet doc/src/snippets/declarative/anchoranimation.qml 0 + \snippet doc/src/snippets/qml/anchoranimation.qml 0 For convenience, when an AnchorAnimation is used in a \l Transition, it will animate any AnchorChanges that have occurred during the state change. @@ -439,7 +439,7 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QDeclarativeStateAction \sa {QML Animation and Transitions}, AnchorChanges */ QQuickAnchorAnimation::QQuickAnchorAnimation(QObject *parent) -: QDeclarativeAbstractAnimation(*(new QQuickAnchorAnimationPrivate), parent) +: QQuickAbstractAnimation(*(new QQuickAnchorAnimationPrivate), parent) { } @@ -454,10 +454,10 @@ QQuickAnchorAnimation::~QQuickAnchorAnimation() If no targets are specified all AnchorChanges will be animated by the AnchorAnimation. */ -QDeclarativeListProperty QQuickAnchorAnimation::targets() +QQmlListProperty QQuickAnchorAnimation::targets() { Q_D(QQuickAnchorAnimation); - return QDeclarativeListProperty(this, d->targets); + return QQmlListProperty(this, d->targets); } /*! @@ -520,15 +520,15 @@ void QQuickAnchorAnimation::setEasing(const QEasingCurve &e) emit easingChanged(e); } -QAbstractAnimationJob* QQuickAnchorAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickAnchorAnimation::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { Q_UNUSED(modified); Q_UNUSED(defaultTarget); Q_D(QQuickAnchorAnimation); - QDeclarativeAnimationPropertyUpdater *data = new QDeclarativeAnimationPropertyUpdater; + QQuickAnimationPropertyUpdater *data = new QQuickAnimationPropertyUpdater; data->interpolatorType = QMetaType::QReal; data->interpolator = d->interpolator; data->reverse = direction == Backward ? true : false; @@ -536,14 +536,14 @@ QAbstractAnimationJob* QQuickAnchorAnimation::transition(QDeclarativeStateAction data->fromDefined = false; for (int ii = 0; ii < actions.count(); ++ii) { - QDeclarativeAction &action = actions[ii]; - if (action.event && action.event->type() == QDeclarativeActionEvent::AnchorChanges + QQuickAction &action = actions[ii]; + if (action.event && action.event->type() == QQuickActionEvent::AnchorChanges && (d->targets.isEmpty() || d->targets.contains(static_cast(action.event)->object()))) { data->actions << static_cast(action.event)->additionalActions(); } } - QDeclarativeBulkValueAnimator *animator = new QDeclarativeBulkValueAnimator; + QQuickBulkValueAnimator *animator = new QQuickBulkValueAnimator; if (data->actions.count()) { animator->setAnimValue(data); animator->setFromSourcedValue(&data->fromSourced); @@ -580,7 +580,7 @@ QAbstractAnimationJob* QQuickAnchorAnimation::transition(QDeclarativeStateAction \sa {QML Animation and Transitions}, PathInterpolator */ QQuickPathAnimation::QQuickPathAnimation(QObject *parent) -: QDeclarativeAbstractAnimation(*(new QQuickPathAnimationPrivate), parent) +: QQuickAbstractAnimation(*(new QQuickPathAnimationPrivate), parent) { } @@ -655,13 +655,13 @@ void QQuickPathAnimation::setEasing(const QEasingCurve &e) For more information on defining a path see the \l Path documentation. */ -QDeclarativePath *QQuickPathAnimation::path() const +QQuickPath *QQuickPathAnimation::path() const { Q_D(const QQuickPathAnimation); return d->path; } -void QQuickPathAnimation::setPath(QDeclarativePath *path) +void QQuickPathAnimation::setPath(QQuickPath *path) { Q_D(QQuickPathAnimation); if (d->path == path) @@ -824,8 +824,8 @@ void QQuickPathAnimation::setEndRotation(qreal rotation) emit endRotationChanged(d->endRotation); } -QAbstractAnimationJob* QQuickPathAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickPathAnimation::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { @@ -866,7 +866,7 @@ QAbstractAnimationJob* QQuickPathAnimation::transition(QDeclarativeStateActions int origModifiedSize = modified.count(); for (int i = 0; i < actions.count(); ++i) { - QDeclarativeAction &action = actions[i]; + QQuickAction &action = actions[i]; if (action.event) continue; if (action.specifiedObject == target && action.property.name() == QLatin1String("x")) { @@ -894,7 +894,7 @@ QAbstractAnimationJob* QQuickPathAnimation::transition(QDeclarativeStateActions // treat interruptions specially, otherwise we end up with strange paths if ((data->reverse || prevData.reverse) && prevData.currentV > 0 && prevData.currentV < 1) { if (!data->fromDefined && !data->toDefined && !prevData.painterPath.isEmpty()) { - QPointF pathPos = QDeclarativePath::sequentialPointAt(prevData.painterPath, prevData.pathLength, prevData.attributePoints, prevData.prevBez, prevData.currentV); + QPointF pathPos = QQuickPath::sequentialPointAt(prevData.painterPath, prevData.pathLength, prevData.attributePoints, prevData.prevBez, prevData.currentV); if (!prevData.anchorPoint.isNull()) pathPos -= prevData.anchorPoint; if (pathPos == data->target->pos()) { //only treat as interruption if we interrupted ourself diff --git a/src/quick/items/qquickanimation_p.h b/src/quick/items/qquickitemanimation_p.h similarity index 82% rename from src/quick/items/qquickanimation_p.h rename to src/quick/items/qquickitemanimation_p.h index 0823ba0cdd..a3a7e77871 100644 --- a/src/quick/items/qquickanimation_p.h +++ b/src/quick/items/qquickitemanimation_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,19 +39,19 @@ ** ****************************************************************************/ -#ifndef QQUICKANIMATION_H -#define QQUICKANIMATION_H +#ifndef QQUICKITEMANIMATION_H +#define QQUICKITEMANIMATION_H #include "qquickitem.h" -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE class QQuickParentAnimationPrivate; -class Q_QUICK_PRIVATE_EXPORT QQuickParentAnimation : public QDeclarativeAnimationGroup +class Q_QUICK_PRIVATE_EXPORT QQuickParentAnimation : public QQuickAnimationGroup { Q_OBJECT Q_DECLARE_PRIVATE(QQuickParentAnimation) @@ -79,18 +79,18 @@ class Q_QUICK_PRIVATE_EXPORT QQuickParentAnimation : public QDeclarativeAnimatio void viaChanged(); protected: - virtual QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); }; class QQuickAnchorAnimationPrivate; -class Q_QUICK_PRIVATE_EXPORT QQuickAnchorAnimation : public QDeclarativeAbstractAnimation +class Q_QUICK_PRIVATE_EXPORT QQuickAnchorAnimation : public QQuickAbstractAnimation { Q_OBJECT Q_DECLARE_PRIVATE(QQuickAnchorAnimation) - Q_PROPERTY(QDeclarativeListProperty targets READ targets) + Q_PROPERTY(QQmlListProperty targets READ targets) Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged) @@ -98,7 +98,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickAnchorAnimation : public QDeclarativeAbstract QQuickAnchorAnimation(QObject *parent=0); virtual ~QQuickAnchorAnimation(); - QDeclarativeListProperty targets(); + QQmlListProperty targets(); int duration() const; void setDuration(int); @@ -111,23 +111,23 @@ class Q_QUICK_PRIVATE_EXPORT QQuickAnchorAnimation : public QDeclarativeAbstract void easingChanged(const QEasingCurve&); protected: - virtual QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); }; class QQuickItem; -class QDeclarativePath; +class QQuickPath; class QQuickPathAnimationPrivate; -class Q_QUICK_PRIVATE_EXPORT QQuickPathAnimation : public QDeclarativeAbstractAnimation +class Q_QUICK_PRIVATE_EXPORT QQuickPathAnimation : public QQuickAbstractAnimation { Q_OBJECT Q_DECLARE_PRIVATE(QQuickPathAnimation) Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged) - Q_PROPERTY(QDeclarativePath *path READ path WRITE setPath NOTIFY pathChanged) + Q_PROPERTY(QQuickPath *path READ path WRITE setPath NOTIFY pathChanged) Q_PROPERTY(QQuickItem *target READ target WRITE setTargetObject NOTIFY targetChanged) Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged) Q_PROPERTY(QPointF anchorPoint READ anchorPoint WRITE setAnchorPoint NOTIFY anchorPointChanged) @@ -154,8 +154,8 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPathAnimation : public QDeclarativeAbstractAn QEasingCurve easing() const; void setEasing(const QEasingCurve &); - QDeclarativePath *path() const; - void setPath(QDeclarativePath *); + QQuickPath *path() const; + void setPath(QQuickPath *); QQuickItem *target() const; void setTargetObject(QQuickItem *); @@ -176,8 +176,8 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPathAnimation : public QDeclarativeAbstractAn void setEndRotation(qreal); protected: - virtual QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); Q_SIGNALS: @@ -200,4 +200,4 @@ QML_DECLARE_TYPE(QQuickPathAnimation) QT_END_HEADER -#endif // QQUICKANIMATION_H +#endif // QQUICKITEMANIMATION_H diff --git a/src/quick/items/qquickanimation_p_p.h b/src/quick/items/qquickitemanimation_p_p.h similarity index 80% rename from src/quick/items/qquickanimation_p_p.h rename to src/quick/items/qquickitemanimation_p_p.h index c34b5ab963..f61b255218 100644 --- a/src/quick/items/qquickanimation_p_p.h +++ b/src/quick/items/qquickitemanimation_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -53,19 +53,19 @@ // We mean it. // -#include "qquickanimation_p.h" +#include "qquickitemanimation_p.h" -#include -#include +#include +#include QT_BEGIN_NAMESPACE -class QQuickParentAnimationPrivate : public QDeclarativeAnimationGroupPrivate +class QQuickParentAnimationPrivate : public QQuickAnimationGroupPrivate { Q_DECLARE_PUBLIC(QQuickParentAnimation) public: QQuickParentAnimationPrivate() - : QDeclarativeAnimationGroupPrivate(), target(0), newParent(0), via(0) {} + : QQuickAnimationGroupPrivate(), target(0), newParent(0), via(0) {} QQuickItem *target; QQuickItem *newParent; @@ -74,7 +74,7 @@ class QQuickParentAnimationPrivate : public QDeclarativeAnimationGroupPrivate QPointF computeTransformOrigin(QQuickItem::TransformOrigin origin, qreal width, qreal height) const; }; -class QQuickAnchorAnimationPrivate : public QDeclarativeAbstractAnimationPrivate +class QQuickAnchorAnimationPrivate : public QQuickAbstractAnimationPrivate { Q_DECLARE_PUBLIC(QQuickAnchorAnimation) public: @@ -86,7 +86,7 @@ class QQuickAnchorAnimationPrivate : public QDeclarativeAbstractAnimationPrivate QList targets; }; -class QQuickPathAnimationUpdater : public QDeclarativeBulkValueUpdater +class QQuickPathAnimationUpdater : public QQuickBulkValueUpdater { public: QQuickPathAnimationUpdater() : path(0), target(0), reverse(false), @@ -97,12 +97,12 @@ class QQuickPathAnimationUpdater : public QDeclarativeBulkValueUpdater void setValue(qreal v); - QDeclarativePath *path; + QQuickPath *path; QPainterPath painterPath; - QDeclarativeCachedBezier prevBez; + QQuickCachedBezier prevBez; qreal pathLength; - QList attributePoints; + QList attributePoints; QQuickItem *target; bool reverse; @@ -112,18 +112,18 @@ class QQuickPathAnimationUpdater : public QDeclarativeBulkValueUpdater qreal toX; qreal toY; qreal currentV; - QDeclarativeNullableValue interruptStart; + QQmlNullableValue interruptStart; //TODO: bundle below into common struct QQuickPathAnimation::Orientation orientation; QPointF anchorPoint; qreal entryInterval; qreal exitInterval; - QDeclarativeNullableValue endRotation; - QDeclarativeNullableValue startRotation; + QQmlNullableValue endRotation; + QQmlNullableValue startRotation; }; class QQuickPathAnimationPrivate; -class QQuickPathAnimationAnimator : public QDeclarativeBulkValueAnimator +class QQuickPathAnimationAnimator : public QQuickBulkValueAnimator { public: QQuickPathAnimationAnimator(QQuickPathAnimationPrivate * = 0); @@ -136,20 +136,20 @@ class QQuickPathAnimationAnimator : public QDeclarativeBulkValueAnimator QQuickPathAnimationPrivate *animationTemplate; }; -class QQuickPathAnimationPrivate : public QDeclarativeAbstractAnimationPrivate +class QQuickPathAnimationPrivate : public QQuickAbstractAnimationPrivate { Q_DECLARE_PUBLIC(QQuickPathAnimation) public: QQuickPathAnimationPrivate() : path(0), target(0), orientation(QQuickPathAnimation::Fixed), entryDuration(0), exitDuration(0), duration(250) {} - QDeclarativePath *path; + QQuickPath *path; QQuickItem *target; QQuickPathAnimation::Orientation orientation; QPointF anchorPoint; qreal entryDuration; qreal exitDuration; - QDeclarativeNullableValue endRotation; + QQmlNullableValue endRotation; int duration; QEasingCurve easingCurve; QHash activeAnimations; diff --git a/src/quick/items/qquickitemchangelistener_p.h b/src/quick/items/qquickitemchangelistener_p.h index d59b5b8856..3a5c25f5f5 100644 --- a/src/quick/items/qquickitemchangelistener_p.h +++ b/src/quick/items/qquickitemchangelistener_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp index a4cfa26205..64b84d35dd 100644 --- a/src/quick/items/qquickitemsmodule.cpp +++ b/src/quick/items/qquickitemsmodule.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -61,8 +61,8 @@ #include "qquickvisualdatamodel_p.h" #include "qquickgridview_p.h" #include "qquickpathview_p.h" -#include -#include +#include +#include #include "qquickpositioners_p.h" #include "qquickrepeater_p.h" #include "qquickloader_p.h" @@ -70,7 +70,7 @@ #include "qquickflipable_p.h" #include "qquicktranslate_p.h" #include "qquickstateoperations_p.h" -#include "qquickanimation_p.h" +#include "qquickitemanimation_p.h" #include #include //#include @@ -81,21 +81,21 @@ #include "qquickdrag_p.h" #include "qquickdroparea_p.h" #include "qquickmultipointtoucharea_p.h" -#include +#include #include -static QDeclarativePrivate::AutoParentResult qquickitem_autoParent(QObject *obj, QObject *parent) +static QQmlPrivate::AutoParentResult qquickitem_autoParent(QObject *obj, QObject *parent) { QQuickItem *item = qobject_cast(obj); if (!item) - return QDeclarativePrivate::IncompatibleObject; + return QQmlPrivate::IncompatibleObject; QQuickItem *parentItem = qobject_cast(parent); if (!parentItem) - return QDeclarativePrivate::IncompatibleParent; + return QQmlPrivate::IncompatibleParent; item->setParentItem(parentItem); - return QDeclarativePrivate::Parented; + return QQmlPrivate::Parented; } static bool compareQQuickAnchorLines(const void *p1, const void *p2) @@ -107,8 +107,8 @@ static bool compareQQuickAnchorLines(const void *p1, const void *p2) static void qt_quickitems_defineModule(const char *uri, int major, int minor) { - QDeclarativePrivate::RegisterAutoParent autoparent = { 0, &qquickitem_autoParent }; - QDeclarativePrivate::qmlregister(QDeclarativePrivate::AutoParentRegistration, &autoparent); + QQmlPrivate::RegisterAutoParent autoparent = { 0, &qquickitem_autoParent }; + QQmlPrivate::qmlregister(QQmlPrivate::AutoParentRegistration, &autoparent); QQuickItemPrivate::registerAccessorProperties(); #ifdef QT_NO_MOVIE @@ -121,7 +121,7 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType(uri,major,minor,"Flickable"); qmlRegisterType(uri,major,minor,"Flipable"); qmlRegisterType(uri,major,minor,"Flow"); -// qmlRegisterType(uri,major,minor,"FocusPanel"); +// qmlRegisterType(uri,major,minor,"FocusPanel"); qmlRegisterType(uri,major,minor,"FocusScope"); qmlRegisterType(uri,major,minor,"Gradient"); qmlRegisterType(uri,major,minor,"GradientStop"); @@ -132,15 +132,15 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType(uri,major,minor,"ListView"); qmlRegisterType(uri,major,minor,"Loader"); qmlRegisterType(uri,major,minor,"MouseArea"); - qmlRegisterType(uri,major,minor,"Path"); - qmlRegisterType(uri,major,minor,"PathAttribute"); - qmlRegisterType(uri,major,minor,"PathCubic"); - qmlRegisterType(uri,major,minor,"PathLine"); - qmlRegisterType(uri,major,minor,"PathPercent"); - qmlRegisterType(uri,major,minor,"PathQuad"); - qmlRegisterType("QtQuick",2,0,"PathCurve"); - qmlRegisterType("QtQuick",2,0,"PathArc"); - qmlRegisterType("QtQuick",2,0,"PathSvg"); + qmlRegisterType(uri,major,minor,"Path"); + qmlRegisterType(uri,major,minor,"PathAttribute"); + qmlRegisterType(uri,major,minor,"PathCubic"); + qmlRegisterType(uri,major,minor,"PathLine"); + qmlRegisterType(uri,major,minor,"PathPercent"); + qmlRegisterType(uri,major,minor,"PathQuad"); + qmlRegisterType("QtQuick",2,0,"PathCurve"); + qmlRegisterType("QtQuick",2,0,"PathArc"); + qmlRegisterType("QtQuick",2,0,"PathSvg"); qmlRegisterType(uri,major,minor,"PathView"); qmlRegisterUncreatableType(uri,major,minor,"Positioner", QStringLiteral("Positioner is an abstract type that is only available as an attached property.")); @@ -168,8 +168,8 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); - qmlRegisterType(); - qmlRegisterType(); + qmlRegisterType(); + qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); #ifndef QT_NO_VALIDATOR @@ -179,7 +179,7 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType(); qmlRegisterType(); qRegisterMetaType("QQuickAnchorLine"); - QDeclarativeMetaType::setQQuickAnchorLineCompareFunction(compareQQuickAnchorLines); + QQmlMetaType::setQQuickAnchorLineCompareFunction(compareQQuickAnchorLines); qmlRegisterUncreatableType(uri,major,minor,"KeyNavigation",QQuickKeyNavigationAttached::tr("KeyNavigation is only available via attached properties")); qmlRegisterUncreatableType(uri,major,minor,"Keys",QQuickKeysAttached::tr("Keys is only available via attached properties")); @@ -208,7 +208,7 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType(uri, major, minor,"AnchorAnimation"); qmlRegisterType(uri, major, minor,"ParentAnimation"); qmlRegisterType("QtQuick",2,0,"PathAnimation"); - qmlRegisterType("QtQuick",2,0,"PathInterpolator"); + qmlRegisterType("QtQuick",2,0,"PathInterpolator"); qmlRegisterType("QtQuick", 2, 0, "DropArea"); qmlRegisterType(); diff --git a/src/quick/items/qquickitemsmodule_p.h b/src/quick/items/qquickitemsmodule_p.h index cc51771a0b..1d6844ca5e 100644 --- a/src/quick/items/qquickitemsmodule_p.h +++ b/src/quick/items/qquickitemsmodule_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,7 +42,7 @@ #ifndef QQUICKITEMSMODULE_P_H #define QQUICKITEMSMODULE_P_H -#include +#include QT_BEGIN_HEADER diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp index 533e1f6852..418b3196ed 100644 --- a/src/quick/items/qquickitemview.cpp +++ b/src/quick/items/qquickitemview.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qquickitemview_p_p.h" -#include +#include QT_BEGIN_NAMESPACE @@ -253,7 +253,7 @@ void FxViewItemTransitionManager::startTransition(FxViewItem *item, FxViewItemTr QQuickItemViewPrivate *vp = static_cast(QObjectPrivate::get(item->itemView())); - QDeclarativeTransition *trans = 0; + QQuickTransition *trans = 0; switch (type) { case NoTransition: break; @@ -312,16 +312,16 @@ void FxViewItemTransitionManager::startTransition(FxViewItem *item, FxViewItemTr emit attached->targetItemsChanged(); } - QDeclarativeStateOperation::ActionList actions; - actions << QDeclarativeAction(item->item, QLatin1String("x"), QVariant(to.x())); - actions << QDeclarativeAction(item->item, QLatin1String("y"), QVariant(to.y())); + QQuickStateOperation::ActionList actions; + actions << QQuickAction(item->item, QLatin1String("x"), QVariant(to.x())); + actions << QQuickAction(item->item, QLatin1String("y"), QVariant(to.y())); - QDeclarativeTransitionManager::transition(actions, trans, item->item); + QQuickTransitionManager::transition(actions, trans, item->item); } void FxViewItemTransitionManager::finished() { - QDeclarativeTransitionManager::finished(); + QQuickTransitionManager::finished(); m_active = false; @@ -346,14 +346,14 @@ bool QQuickItemViewChangeSet::hasPendingChanges() const return !pendingChanges.isEmpty(); } -void QQuickItemViewChangeSet::applyChanges(const QDeclarativeChangeSet &changeSet) +void QQuickItemViewChangeSet::applyChanges(const QQuickChangeSet &changeSet) { pendingChanges.apply(changeSet); int moveId = -1; int moveOffset = 0; - foreach (const QDeclarativeChangeSet::Remove &r, changeSet.removes()) { + foreach (const QQuickChangeSet::Remove &r, changeSet.removes()) { itemCount -= r.count; if (moveId == -1 && newCurrentIndex >= r.index + r.count) { newCurrentIndex -= r.count; @@ -372,7 +372,7 @@ void QQuickItemViewChangeSet::applyChanges(const QDeclarativeChangeSet &changeSe currentChanged = true; } } - foreach (const QDeclarativeChangeSet::Insert &i, changeSet.inserts()) { + foreach (const QQuickChangeSet::Insert &i, changeSet.inserts()) { if (moveId == -1) { if (itemCount && newCurrentIndex >= i.index) { newCurrentIndex += i.count; @@ -758,9 +758,9 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent) \sa QtQuick2::ViewTransition::targetIndexes */ -QDeclarativeListProperty QQuickViewTransitionAttached::targetItems() +QQmlListProperty QQuickViewTransitionAttached::targetItems() { - return QDeclarativeListProperty(this, m_targetItems); + return QQmlListProperty(this, m_targetItems); } QQuickViewTransitionAttached *QQuickViewTransitionAttached::qmlAttachedProperties(QObject *obj) @@ -810,8 +810,8 @@ void QQuickItemView::setModel(const QVariant &model) if (d->modelVariant == model) return; if (d->model) { - disconnect(d->model, SIGNAL(modelUpdated(QDeclarativeChangeSet,bool)), - this, SLOT(modelUpdated(QDeclarativeChangeSet,bool))); + disconnect(d->model, SIGNAL(modelUpdated(QQuickChangeSet,bool)), + this, SLOT(modelUpdated(QQuickChangeSet,bool))); disconnect(d->model, SIGNAL(initItem(int,QQuickItem*)), this, SLOT(initItem(int,QQuickItem*))); disconnect(d->model, SIGNAL(createdItem(int,QQuickItem*)), this, SLOT(createdItem(int,QQuickItem*))); disconnect(d->model, SIGNAL(destroyingItem(QQuickItem*)), this, SLOT(destroyingItem(QQuickItem*))); @@ -873,14 +873,14 @@ void QQuickItemView::setModel(const QVariant &model) polish(); } } - connect(d->model, SIGNAL(modelUpdated(QDeclarativeChangeSet,bool)), - this, SLOT(modelUpdated(QDeclarativeChangeSet,bool))); + connect(d->model, SIGNAL(modelUpdated(QQuickChangeSet,bool)), + this, SLOT(modelUpdated(QQuickChangeSet,bool))); emit countChanged(); } emit modelChanged(); } -QDeclarativeComponent *QQuickItemView::delegate() const +QQmlComponent *QQuickItemView::delegate() const { Q_D(const QQuickItemView); if (d->model) { @@ -891,7 +891,7 @@ QDeclarativeComponent *QQuickItemView::delegate() const return 0; } -void QQuickItemView::setDelegate(QDeclarativeComponent *delegate) +void QQuickItemView::setDelegate(QQmlComponent *delegate) { Q_D(QQuickItemView); if (delegate == this->delegate()) @@ -1026,7 +1026,7 @@ Qt::LayoutDirection QQuickItemView::effectiveLayoutDirection() const } -QDeclarativeComponent *QQuickItemView::header() const +QQmlComponent *QQuickItemView::header() const { Q_D(const QQuickItemView); return d->headerComponent; @@ -1039,7 +1039,7 @@ QQuickItem *QQuickItemView::headerItem() const return d->header ? d->header->item : 0; } -void QQuickItemView::setHeader(QDeclarativeComponent *headerComponent) +void QQuickItemView::setHeader(QQmlComponent *headerComponent) { Q_D(QQuickItemView); if (d->headerComponent != headerComponent) { @@ -1062,7 +1062,7 @@ void QQuickItemView::setHeader(QDeclarativeComponent *headerComponent) } } -QDeclarativeComponent *QQuickItemView::footer() const +QQmlComponent *QQuickItemView::footer() const { Q_D(const QQuickItemView); return d->footerComponent; @@ -1075,7 +1075,7 @@ QQuickItem *QQuickItemView::footerItem() const return d->footer ? d->footer->item : 0; } -void QQuickItemView::setFooter(QDeclarativeComponent *footerComponent) +void QQuickItemView::setFooter(QQmlComponent *footerComponent) { Q_D(QQuickItemView); if (d->footerComponent != footerComponent) { @@ -1095,14 +1095,14 @@ void QQuickItemView::setFooter(QDeclarativeComponent *footerComponent) } } -QDeclarativeComponent *QQuickItemView::highlight() const +QQmlComponent *QQuickItemView::highlight() const { Q_D(const QQuickItemView); const_cast(d)->applyPendingChanges(); return d->highlightComponent; } -void QQuickItemView::setHighlight(QDeclarativeComponent *highlightComponent) +void QQuickItemView::setHighlight(QQmlComponent *highlightComponent) { Q_D(QQuickItemView); if (highlightComponent != d->highlightComponent) { @@ -1225,13 +1225,13 @@ void QQuickItemView::setHighlightMoveDuration(int duration) } } -QDeclarativeTransition *QQuickItemView::populateTransition() const +QQuickTransition *QQuickItemView::populateTransition() const { Q_D(const QQuickItemView); return d->populateTransition; } -void QQuickItemView::setPopulateTransition(QDeclarativeTransition *transition) +void QQuickItemView::setPopulateTransition(QQuickTransition *transition) { Q_D(QQuickItemView); if (d->populateTransition != transition) { @@ -1240,13 +1240,13 @@ void QQuickItemView::setPopulateTransition(QDeclarativeTransition *transition) } } -QDeclarativeTransition *QQuickItemView::addTransition() const +QQuickTransition *QQuickItemView::addTransition() const { Q_D(const QQuickItemView); return d->addTransition; } -void QQuickItemView::setAddTransition(QDeclarativeTransition *transition) +void QQuickItemView::setAddTransition(QQuickTransition *transition) { Q_D(QQuickItemView); if (d->addTransition != transition) { @@ -1255,13 +1255,13 @@ void QQuickItemView::setAddTransition(QDeclarativeTransition *transition) } } -QDeclarativeTransition *QQuickItemView::addDisplacedTransition() const +QQuickTransition *QQuickItemView::addDisplacedTransition() const { Q_D(const QQuickItemView); return d->addDisplacedTransition; } -void QQuickItemView::setAddDisplacedTransition(QDeclarativeTransition *transition) +void QQuickItemView::setAddDisplacedTransition(QQuickTransition *transition) { Q_D(QQuickItemView); if (d->addDisplacedTransition != transition) { @@ -1270,13 +1270,13 @@ void QQuickItemView::setAddDisplacedTransition(QDeclarativeTransition *transitio } } -QDeclarativeTransition *QQuickItemView::moveTransition() const +QQuickTransition *QQuickItemView::moveTransition() const { Q_D(const QQuickItemView); return d->moveTransition; } -void QQuickItemView::setMoveTransition(QDeclarativeTransition *transition) +void QQuickItemView::setMoveTransition(QQuickTransition *transition) { Q_D(QQuickItemView); if (d->moveTransition != transition) { @@ -1285,13 +1285,13 @@ void QQuickItemView::setMoveTransition(QDeclarativeTransition *transition) } } -QDeclarativeTransition *QQuickItemView::moveDisplacedTransition() const +QQuickTransition *QQuickItemView::moveDisplacedTransition() const { Q_D(const QQuickItemView); return d->moveDisplacedTransition; } -void QQuickItemView::setMoveDisplacedTransition(QDeclarativeTransition *transition) +void QQuickItemView::setMoveDisplacedTransition(QQuickTransition *transition) { Q_D(QQuickItemView); if (d->moveDisplacedTransition != transition) { @@ -1300,13 +1300,13 @@ void QQuickItemView::setMoveDisplacedTransition(QDeclarativeTransition *transiti } } -QDeclarativeTransition *QQuickItemView::removeTransition() const +QQuickTransition *QQuickItemView::removeTransition() const { Q_D(const QQuickItemView); return d->removeTransition; } -void QQuickItemView::setRemoveTransition(QDeclarativeTransition *transition) +void QQuickItemView::setRemoveTransition(QQuickTransition *transition) { Q_D(QQuickItemView); if (d->removeTransition != transition) { @@ -1315,13 +1315,13 @@ void QQuickItemView::setRemoveTransition(QDeclarativeTransition *transition) } } -QDeclarativeTransition *QQuickItemView::removeDisplacedTransition() const +QQuickTransition *QQuickItemView::removeDisplacedTransition() const { Q_D(const QQuickItemView); return d->removeDisplacedTransition; } -void QQuickItemView::setRemoveDisplacedTransition(QDeclarativeTransition *transition) +void QQuickItemView::setRemoveDisplacedTransition(QQuickTransition *transition) { Q_D(QQuickItemView); if (d->removeDisplacedTransition != transition) { @@ -1522,7 +1522,7 @@ void QQuickItemViewPrivate::transitionNextReposition(FxViewItem *item, FxViewIte } } -int QQuickItemViewPrivate::findMoveKeyIndex(QDeclarativeChangeSet::MoveKey key, const QVector &changes) const +int QQuickItemViewPrivate::findMoveKeyIndex(QQuickChangeSet::MoveKey key, const QVector &changes) const { for (int i=0; i prevViewPos; + QQmlNullableValue prevViewPos; int prevFirstVisibleIndex = -1; if (prevFirstVisible) { prevViewPos = prevFirstVisible->position(); @@ -2365,8 +2365,8 @@ bool QQuickItemViewPrivate::applyModelChanges(ChangeResult *totalInsertionResult totalInsertionResult->visiblePos = prevViewPos; totalRemovalResult->visiblePos = prevViewPos; - const QVector &removals = currentChanges.pendingChanges.removes(); - const QVector &insertions = currentChanges.pendingChanges.inserts(); + const QVector &removals = currentChanges.pendingChanges.removes(); + const QVector &insertions = currentChanges.pendingChanges.inserts(); ChangeResult insertionResult(prevViewPos); ChangeResult removalResult(prevViewPos); @@ -2385,7 +2385,7 @@ bool QQuickItemViewPrivate::applyModelChanges(ChangeResult *totalInsertionResult } } if (runDelayedRemoveTransition) { - QDeclarativeChangeSet::Remove removal; + QQuickChangeSet::Remove removal; for (QList::Iterator it = visibleItems.begin(); it != visibleItems.end();) { FxViewItem *item = *it; if (item->index == -1 && !item->attached->delayRemove()) { @@ -2453,7 +2453,7 @@ bool QQuickItemViewPrivate::applyModelChanges(ChangeResult *totalInsertionResult // Whatever removed/moved items remain are no longer visible items. prepareRemoveTransitions(¤tChanges.removedItems); - for (QHash::Iterator it = currentChanges.removedItems.begin(); + for (QHash::Iterator it = currentChanges.removedItems.begin(); it != currentChanges.removedItems.end(); ++it) { releaseItem(it.value()); } @@ -2483,7 +2483,7 @@ bool QQuickItemViewPrivate::applyModelChanges(ChangeResult *totalInsertionResult return visibleAffected; } -bool QQuickItemViewPrivate::applyRemovalChange(const QDeclarativeChangeSet::Remove &removal, ChangeResult *removeResult, int *removedCount) +bool QQuickItemViewPrivate::applyRemovalChange(const QQuickChangeSet::Remove &removal, ChangeResult *removeResult, int *removedCount) { Q_Q(QQuickItemView); bool visibleAffected = false; @@ -2533,7 +2533,7 @@ bool QQuickItemViewPrivate::applyRemovalChange(const QDeclarativeChangeSet::Remo return visibleAffected; } -void QQuickItemViewPrivate::removeItem(FxViewItem *item, const QDeclarativeChangeSet::Remove &removal, ChangeResult *removeResult) +void QQuickItemViewPrivate::removeItem(FxViewItem *item, const QQuickChangeSet::Remove &removal, ChangeResult *removeResult) { if (removeResult->visiblePos.isValid()) { if (item->position() < removeResult->visiblePos) @@ -2546,7 +2546,7 @@ void QQuickItemViewPrivate::removeItem(FxViewItem *item, const QDeclarativeChang transitionNextReposition(item, FxViewItemTransitionManager::MoveTransition, true); } else { // track item so it is released later - currentChanges.removedItems.insertMulti(QDeclarativeChangeSet::MoveKey(), item); + currentChanges.removedItems.insertMulti(QQuickChangeSet::MoveKey(), item); } if (!removeResult->changedFirstItem && item == *visibleItems.constBegin()) removeResult->changedFirstItem = true; @@ -2558,7 +2558,7 @@ void QQuickItemViewPrivate::repositionFirstItem(FxViewItem *prevVisibleItemsFirs ChangeResult *insertionResult, ChangeResult *removalResult) { - const QDeclarativeNullableValue prevViewPos = insertionResult->visiblePos; + const QQmlNullableValue prevViewPos = insertionResult->visiblePos; // reposition visibleItems.first() correctly so that the content y doesn't jump if (visibleItems.count()) { @@ -2629,13 +2629,13 @@ void QQuickItemViewPrivate::prepareVisibleItemTransitions() } } -void QQuickItemViewPrivate::prepareRemoveTransitions(QHash *removedItems) +void QQuickItemViewPrivate::prepareRemoveTransitions(QHash *removedItems) { removeTransitionIndexes.clear(); removeTransitionTargets.clear(); if (canTransition(FxViewItemTransitionManager::RemoveTransition, true)) { - for (QHash::Iterator it = removedItems->begin(); + for (QHash::Iterator it = removedItems->begin(); it != removedItems->end(); ) { bool isRemove = it.key().moveId < 0; if (isRemove) { @@ -2710,7 +2710,7 @@ FxViewItem *QQuickItemViewPrivate::createItem(int modelIndex, bool asynchronous) if (QQuickItem *item = model->item(modelIndex, asynchronous)) { item->setParentItem(q->contentItem()); - QDeclarative_setParent_noEvent(item, q->contentItem()); + QQml_setParent_noEvent(item, q->contentItem()); requestedIndex = -1; FxViewItem *viewItem = requestedItem; if (!viewItem) @@ -2757,7 +2757,7 @@ void QQuickItemView::initItem(int index, QQuickItem *item) if (d->requestedAsync) item->setVisible(false); item->setParentItem(contentItem()); - QDeclarative_setParent_noEvent(item, contentItem()); + QQml_setParent_noEvent(item, contentItem()); d->requestedItem = d->newViewItem(index, item); } } @@ -2790,18 +2790,18 @@ QQuickItem *QQuickItemViewPrivate::createHighlightItem() return createComponentItem(highlightComponent, true, true); } -QQuickItem *QQuickItemViewPrivate::createComponentItem(QDeclarativeComponent *component, bool receiveItemGeometryChanges, bool createDefault) +QQuickItem *QQuickItemViewPrivate::createComponentItem(QQmlComponent *component, bool receiveItemGeometryChanges, bool createDefault) { Q_Q(QQuickItemView); QQuickItem *item = 0; if (component) { - QDeclarativeContext *creationContext = component->creationContext(); - QDeclarativeContext *context = new QDeclarativeContext( + QQmlContext *creationContext = component->creationContext(); + QQmlContext *context = new QQmlContext( creationContext ? creationContext : qmlContext(q)); QObject *nobj = component->create(context); if (nobj) { - QDeclarative_setParent_noEvent(context, nobj); + QQml_setParent_noEvent(context, nobj); item = qobject_cast(nobj); if (!item) delete nobj; @@ -2812,7 +2812,7 @@ QQuickItem *QQuickItemViewPrivate::createComponentItem(QDeclarativeComponent *co item = new QQuickItem; } if (item) { - QDeclarative_setParent_noEvent(item, q->contentItem()); + QQml_setParent_noEvent(item, q->contentItem()); item->setParentItem(q->contentItem()); if (receiveItemGeometryChanges) { QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); diff --git a/src/quick/items/qquickitemview_p.h b/src/quick/items/qquickitemview_p.h index 0d3cd1c3ce..01a6ee28ec 100644 --- a/src/quick/items/qquickitemview_p.h +++ b/src/quick/items/qquickitemview_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -48,9 +48,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Declarative) +QT_MODULE(Qml) -class QDeclarativeChangeSet; +class QQuickChangeSet; class QQuickItemViewPrivate; @@ -59,7 +59,7 @@ class Q_AUTOTEST_EXPORT QQuickItemView : public QQuickFlickable Q_OBJECT Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged) - Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) @@ -71,20 +71,20 @@ class Q_AUTOTEST_EXPORT QQuickItemView : public QQuickFlickable Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged) Q_PROPERTY(Qt::LayoutDirection effectiveLayoutDirection READ effectiveLayoutDirection NOTIFY effectiveLayoutDirectionChanged) - Q_PROPERTY(QDeclarativeComponent *header READ header WRITE setHeader NOTIFY headerChanged) + Q_PROPERTY(QQmlComponent *header READ header WRITE setHeader NOTIFY headerChanged) Q_PROPERTY(QQuickItem *headerItem READ headerItem NOTIFY headerItemChanged) - Q_PROPERTY(QDeclarativeComponent *footer READ footer WRITE setFooter NOTIFY footerChanged) + Q_PROPERTY(QQmlComponent *footer READ footer WRITE setFooter NOTIFY footerChanged) Q_PROPERTY(QQuickItem *footerItem READ footerItem NOTIFY footerItemChanged) - Q_PROPERTY(QDeclarativeTransition *populate READ populateTransition WRITE setPopulateTransition NOTIFY populateTransitionChanged) - Q_PROPERTY(QDeclarativeTransition *add READ addTransition WRITE setAddTransition NOTIFY addTransitionChanged) - Q_PROPERTY(QDeclarativeTransition *addDisplaced READ addDisplacedTransition WRITE setAddDisplacedTransition NOTIFY addDisplacedTransitionChanged) - Q_PROPERTY(QDeclarativeTransition *move READ moveTransition WRITE setMoveTransition NOTIFY moveTransitionChanged) - Q_PROPERTY(QDeclarativeTransition *moveDisplaced READ moveDisplacedTransition WRITE setMoveDisplacedTransition NOTIFY moveDisplacedTransitionChanged) - Q_PROPERTY(QDeclarativeTransition *remove READ removeTransition WRITE setRemoveTransition NOTIFY removeTransitionChanged) - Q_PROPERTY(QDeclarativeTransition *removeDisplaced READ removeDisplacedTransition WRITE setRemoveDisplacedTransition NOTIFY removeDisplacedTransitionChanged) + Q_PROPERTY(QQuickTransition *populate READ populateTransition WRITE setPopulateTransition NOTIFY populateTransitionChanged) + Q_PROPERTY(QQuickTransition *add READ addTransition WRITE setAddTransition NOTIFY addTransitionChanged) + Q_PROPERTY(QQuickTransition *addDisplaced READ addDisplacedTransition WRITE setAddDisplacedTransition NOTIFY addDisplacedTransitionChanged) + Q_PROPERTY(QQuickTransition *move READ moveTransition WRITE setMoveTransition NOTIFY moveTransitionChanged) + Q_PROPERTY(QQuickTransition *moveDisplaced READ moveDisplacedTransition WRITE setMoveDisplacedTransition NOTIFY moveDisplacedTransitionChanged) + Q_PROPERTY(QQuickTransition *remove READ removeTransition WRITE setRemoveTransition NOTIFY removeTransitionChanged) + Q_PROPERTY(QQuickTransition *removeDisplaced READ removeDisplacedTransition WRITE setRemoveDisplacedTransition NOTIFY removeDisplacedTransitionChanged) - Q_PROPERTY(QDeclarativeComponent *highlight READ highlight WRITE setHighlight NOTIFY highlightChanged) + Q_PROPERTY(QQmlComponent *highlight READ highlight WRITE setHighlight NOTIFY highlightChanged) Q_PROPERTY(QQuickItem *highlightItem READ highlightItem NOTIFY highlightItemChanged) Q_PROPERTY(bool highlightFollowsCurrentItem READ highlightFollowsCurrentItem WRITE setHighlightFollowsCurrentItem NOTIFY highlightFollowsCurrentItemChanged) Q_PROPERTY(HighlightRangeMode highlightRangeMode READ highlightRangeMode WRITE setHighlightRangeMode NOTIFY highlightRangeModeChanged) @@ -102,8 +102,8 @@ class Q_AUTOTEST_EXPORT QQuickItemView : public QQuickFlickable QVariant model() const; void setModel(const QVariant &); - QDeclarativeComponent *delegate() const; - void setDelegate(QDeclarativeComponent *); + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *); int count() const; @@ -122,37 +122,37 @@ class Q_AUTOTEST_EXPORT QQuickItemView : public QQuickFlickable void setLayoutDirection(Qt::LayoutDirection); Qt::LayoutDirection effectiveLayoutDirection() const; - QDeclarativeComponent *footer() const; - void setFooter(QDeclarativeComponent *); + QQmlComponent *footer() const; + void setFooter(QQmlComponent *); QQuickItem *footerItem() const; - QDeclarativeComponent *header() const; - void setHeader(QDeclarativeComponent *); + QQmlComponent *header() const; + void setHeader(QQmlComponent *); QQuickItem *headerItem() const; - QDeclarativeTransition *populateTransition() const; - void setPopulateTransition(QDeclarativeTransition *transition); + QQuickTransition *populateTransition() const; + void setPopulateTransition(QQuickTransition *transition); - QDeclarativeTransition *addTransition() const; - void setAddTransition(QDeclarativeTransition *transition); + QQuickTransition *addTransition() const; + void setAddTransition(QQuickTransition *transition); - QDeclarativeTransition *addDisplacedTransition() const; - void setAddDisplacedTransition(QDeclarativeTransition *transition); + QQuickTransition *addDisplacedTransition() const; + void setAddDisplacedTransition(QQuickTransition *transition); - QDeclarativeTransition *moveTransition() const; - void setMoveTransition(QDeclarativeTransition *transition); + QQuickTransition *moveTransition() const; + void setMoveTransition(QQuickTransition *transition); - QDeclarativeTransition *moveDisplacedTransition() const; - void setMoveDisplacedTransition(QDeclarativeTransition *transition); + QQuickTransition *moveDisplacedTransition() const; + void setMoveDisplacedTransition(QQuickTransition *transition); - QDeclarativeTransition *removeTransition() const; - void setRemoveTransition(QDeclarativeTransition *transition); + QQuickTransition *removeTransition() const; + void setRemoveTransition(QQuickTransition *transition); - QDeclarativeTransition *removeDisplacedTransition() const; - void setRemoveDisplacedTransition(QDeclarativeTransition *transition); + QQuickTransition *removeDisplacedTransition() const; + void setRemoveDisplacedTransition(QQuickTransition *transition); - QDeclarativeComponent *highlight() const; - void setHighlight(QDeclarativeComponent *); + QQmlComponent *highlight() const; + void setHighlight(QQmlComponent *); QQuickItem *highlightItem() const; @@ -234,7 +234,7 @@ protected slots: void destroyRemoved(); void createdItem(int index, QQuickItem *item); void initItem(int index, QQuickItem *item); - void modelUpdated(const QDeclarativeChangeSet &changeSet, bool reset); + void modelUpdated(const QQuickChangeSet &changeSet, bool reset); void destroyingItem(QQuickItem *item); void animStopped(); void trackedPositionChanged(); @@ -333,7 +333,7 @@ class QQuickViewTransitionAttached : public QObject Q_PROPERTY(QPointF destination READ destination NOTIFY destinationChanged) Q_PROPERTY(QList targetIndexes READ targetIndexes NOTIFY targetIndexesChanged) - Q_PROPERTY(QDeclarativeListProperty targetItems READ targetItems NOTIFY targetItemsChanged) + Q_PROPERTY(QQmlListProperty targetItems READ targetItems NOTIFY targetItemsChanged) public: QQuickViewTransitionAttached(QObject *parent); @@ -343,7 +343,7 @@ class QQuickViewTransitionAttached : public QObject QPointF destination() const { return m_destination; } QList targetIndexes() const { return m_targetIndexes; } - QDeclarativeListProperty targetItems(); + QQmlListProperty targetItems(); static QQuickViewTransitionAttached *qmlAttachedProperties(QObject *); diff --git a/src/quick/items/qquickitemview_p_p.h b/src/quick/items/qquickitemview_p_p.h index 05927c0d68..a4892e8972 100644 --- a/src/quick/items/qquickitemview_p_p.h +++ b/src/quick/items/qquickitemview_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -46,8 +46,8 @@ #include "qquickflickable_p_p.h" #include "qquickvisualdatamodel_p.h" #include "qquickvisualitemmodel_p.h" -#include -#include +#include +#include QT_BEGIN_HEADER @@ -58,7 +58,7 @@ QT_MODULE(Declarative) class FxViewItem; -class FxViewItemTransitionManager : public QDeclarativeTransitionManager +class FxViewItemTransitionManager : public QQuickTransitionManager { public: enum TransitionType { @@ -142,12 +142,12 @@ class QQuickItemViewChangeSet void prepare(int currentIndex, int count); void reset(); - void applyChanges(const QDeclarativeChangeSet &changeSet); + void applyChanges(const QQuickChangeSet &changeSet); int itemCount; int newCurrentIndex; - QDeclarativeChangeSet pendingChanges; - QHash removedItems; + QQuickChangeSet pendingChanges; + QHash removedItems; bool active : 1; bool currentChanged : 1; @@ -162,7 +162,7 @@ class QQuickItemViewPrivate : public QQuickFlickablePrivate QQuickItemViewPrivate(); struct ChangeResult { - QDeclarativeNullableValue visiblePos; + QQmlNullableValue visiblePos; bool changedFirstItem; qreal sizeChangesBeforeVisiblePos; qreal sizeChangesAfterVisiblePos; @@ -174,7 +174,7 @@ class QQuickItemViewPrivate : public QQuickFlickablePrivate sizeChangesBeforeVisiblePos(0), sizeChangesAfterVisiblePos(0), countChangeBeforeVisible(0), countChangeAfterVisibleItems(0) {} - ChangeResult(const QDeclarativeNullableValue &p) + ChangeResult(const QQmlNullableValue &p) : visiblePos(p), changedFirstItem(false), sizeChangesBeforeVisiblePos(0), sizeChangesAfterVisiblePos(0), countChangeBeforeVisible(0), countChangeAfterVisibleItems(0) {} @@ -228,7 +228,7 @@ class QQuickItemViewPrivate : public QQuickFlickablePrivate virtual void releaseItem(FxViewItem *item); QQuickItem *createHighlightItem(); - QQuickItem *createComponentItem(QDeclarativeComponent *component, bool receiveItemGeometryChanges, bool createDefault = false); + QQuickItem *createComponentItem(QQmlComponent *component, bool receiveItemGeometryChanges, bool createDefault = false); void updateCurrent(int modelIndex); void updateTrackedItem(); @@ -238,19 +238,19 @@ class QQuickItemViewPrivate : public QQuickFlickablePrivate void positionViewAtIndex(int index, int mode); void applyPendingChanges(); bool applyModelChanges(ChangeResult *insertionResult, ChangeResult *removalResult); - bool applyRemovalChange(const QDeclarativeChangeSet::Remove &removal, ChangeResult *changeResult, int *removedCount); - void removeItem(FxViewItem *item, const QDeclarativeChangeSet::Remove &removal, ChangeResult *removeResult); + bool applyRemovalChange(const QQuickChangeSet::Remove &removal, ChangeResult *changeResult, int *removedCount); + void removeItem(FxViewItem *item, const QQuickChangeSet::Remove &removal, ChangeResult *removeResult); void repositionFirstItem(FxViewItem *prevVisibleItemsFirst, qreal prevVisibleItemsFirstPos, FxViewItem *prevFirstVisible, ChangeResult *insertionResult, ChangeResult *removalResult); void prepareVisibleItemTransitions(); - void prepareRemoveTransitions(QHash *removedItems); + void prepareRemoveTransitions(QHash *removedItems); bool prepareNonVisibleItemTransition(FxViewItem *item, const QRectF &viewBounds); bool canTransition(FxViewItemTransitionManager::TransitionType type, bool asTarget) const; bool hasItemTransitions() const; void transitionNextReposition(FxViewItem *item, FxViewItemTransitionManager::TransitionType type, bool isTarget); - int findMoveKeyIndex(QDeclarativeChangeSet::MoveKey key, const QVector &changes) const; + int findMoveKeyIndex(QQuickChangeSet::MoveKey key, const QVector &changes) const; void checkVisible() const; void showVisibleItems() const; @@ -262,7 +262,7 @@ class QQuickItemViewPrivate : public QQuickFlickablePrivate hData.markExtentsDirty(); } - QDeclarativeGuard model; + QQmlGuard model; QVariant modelVariant; int itemCount; int buffer; @@ -282,25 +282,25 @@ class QQuickItemViewPrivate : public QQuickFlickablePrivate QQuickItemViewChangeSet currentChanges; // XXX split into struct - QDeclarativeComponent *highlightComponent; + QQmlComponent *highlightComponent; FxViewItem *highlight; int highlightRange; // enum value qreal highlightRangeStart; qreal highlightRangeEnd; int highlightMoveDuration; - QDeclarativeComponent *headerComponent; + QQmlComponent *headerComponent; FxViewItem *header; - QDeclarativeComponent *footerComponent; + QQmlComponent *footerComponent; FxViewItem *footer; - QDeclarativeTransition *populateTransition; - QDeclarativeTransition *addTransition; - QDeclarativeTransition *addDisplacedTransition; - QDeclarativeTransition *moveTransition; - QDeclarativeTransition *moveDisplacedTransition; - QDeclarativeTransition *removeTransition; - QDeclarativeTransition *removeDisplacedTransition; + QQuickTransition *populateTransition; + QQuickTransition *addTransition; + QQuickTransition *addDisplacedTransition; + QQuickTransition *moveTransition; + QQuickTransition *moveDisplacedTransition; + QQuickTransition *removeTransition; + QQuickTransition *removeDisplacedTransition; QList addTransitionIndexes; QList moveTransitionIndexes; @@ -311,8 +311,8 @@ class QQuickItemViewPrivate : public QQuickFlickablePrivate struct MovedItem { FxViewItem *item; - QDeclarativeChangeSet::MoveKey moveKey; - MovedItem(FxViewItem *i, QDeclarativeChangeSet::MoveKey k) + QQuickChangeSet::MoveKey moveKey; + MovedItem(FxViewItem *i, QQuickChangeSet::MoveKey k) : item(i), moveKey(k) {} }; QList releasePendingTransition; @@ -372,7 +372,7 @@ class QQuickItemViewPrivate : public QQuickFlickablePrivate virtual void layoutVisibleItems(int fromModelIndex = 0) = 0; virtual void changedVisibleIndex(int newIndex) = 0; - virtual bool applyInsertionChange(const QDeclarativeChangeSet::Insert &insert, ChangeResult *changeResult, + virtual bool applyInsertionChange(const QQuickChangeSet::Insert &insert, ChangeResult *changeResult, QList *newItems, QList *movingIntoView) = 0; virtual bool needsRefillForAddedOrRemovedIndex(int) const { return false; } diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp index 906b9b3781..beb607dde5 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,14 +43,14 @@ #include "qquickitemview_p_p.h" #include "qquickvisualitemmodel_p.h" -#include -#include -#include +#include +#include +#include #include #include #include -#include +#include #include #include "qplatformdefs.h" @@ -106,7 +106,7 @@ class QQuickListViewPrivate : public QQuickItemViewPrivate virtual void setPosition(qreal pos); virtual void layoutVisibleItems(int fromModelIndex = 0); - virtual bool applyInsertionChange(const QDeclarativeChangeSet::Insert &insert, ChangeResult *changeResult, QList *addedItems, QList *movingIntoView); + virtual bool applyInsertionChange(const QQuickChangeSet::Insert &insert, ChangeResult *changeResult, QList *addedItems, QList *movingIntoView); virtual void translateAndTransitionItemsAfter(int afterIndex, const ChangeResult &insertionResult, const ChangeResult &removalResult); virtual void updateSections(); @@ -132,7 +132,7 @@ class QQuickListViewPrivate : public QQuickItemViewPrivate virtual void fixupPosition(); virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent); virtual void flick(QQuickItemViewPrivate::AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize, - QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity); + QQuickTimeLineCallback::Callback fixupCallback, qreal velocity); QQuickListView::Orientation orient; qreal visiblePos; @@ -205,7 +205,7 @@ void QQuickViewSection::setCriteria(QQuickViewSection::SectionCriteria criteria) } } -void QQuickViewSection::setDelegate(QDeclarativeComponent *delegate) +void QQuickViewSection::setDelegate(QQmlComponent *delegate) { if (delegate != m_delegate) { m_delegate = delegate; @@ -833,7 +833,7 @@ void QQuickListViewPrivate::createHighlight() } const QLatin1String posProp(orient == QQuickListView::Vertical ? "y" : "x"); highlightPosAnimator = new QSmoothedAnimation; - highlightPosAnimator->target = QDeclarativeProperty(item, posProp); + highlightPosAnimator->target = QQmlProperty(item, posProp); highlightPosAnimator->velocity = highlightMoveSpeed; highlightPosAnimator->userDuration = highlightMoveDuration; @@ -841,7 +841,7 @@ void QQuickListViewPrivate::createHighlight() highlightSizeAnimator = new QSmoothedAnimation; highlightSizeAnimator->velocity = highlightResizeSpeed; highlightSizeAnimator->userDuration = highlightResizeDuration; - highlightSizeAnimator->target = QDeclarativeProperty(item, sizeProp); + highlightSizeAnimator->target = QQmlProperty(item, sizeProp); highlight = newHighlight; changed = true; @@ -896,22 +896,22 @@ QQuickItem * QQuickListViewPrivate::getSectionItem(const QString §ion) sectionItem = sectionCache[i]; sectionCache[i] = 0; sectionItem->setVisible(true); - QDeclarativeContext *context = QDeclarativeEngine::contextForObject(sectionItem)->parentContext(); + QQmlContext *context = QQmlEngine::contextForObject(sectionItem)->parentContext(); context->setContextProperty(QLatin1String("section"), section); } else { - QDeclarativeContext *creationContext = sectionCriteria->delegate()->creationContext(); - QDeclarativeContext *context = new QDeclarativeContext( + QQmlContext *creationContext = sectionCriteria->delegate()->creationContext(); + QQmlContext *context = new QQmlContext( creationContext ? creationContext : qmlContext(q)); context->setContextProperty(QLatin1String("section"), section); QObject *nobj = sectionCriteria->delegate()->beginCreate(context); if (nobj) { - QDeclarative_setParent_noEvent(context, nobj); + QQml_setParent_noEvent(context, nobj); sectionItem = qobject_cast(nobj); if (!sectionItem) { delete nobj; } else { sectionItem->setZ(2); - QDeclarative_setParent_noEvent(sectionItem, contentItem); + QQml_setParent_noEvent(sectionItem, contentItem); sectionItem->setParentItem(contentItem); } } else { @@ -949,7 +949,7 @@ void QQuickListViewPrivate::updateInlineSection(FxListItemSG *listItem) listItem->section = getSectionItem(listItem->attached->m_section); listItem->setPosition(pos); } else { - QDeclarativeContext *context = QDeclarativeEngine::contextForObject(listItem->section)->parentContext(); + QQmlContext *context = QQmlEngine::contextForObject(listItem->section)->parentContext(); context->setContextProperty(QLatin1String("section"), listItem->attached->m_section); } } else if (listItem->section) { @@ -1002,7 +1002,7 @@ void QQuickListViewPrivate::updateStickySections() if (!currentSectionItem) { currentSectionItem = getSectionItem(currentSection); } else if (currentStickySection != currentSection) { - QDeclarativeContext *context = QDeclarativeEngine::contextForObject(currentSectionItem)->parentContext(); + QQmlContext *context = QQmlEngine::contextForObject(currentSectionItem)->parentContext(); context->setContextProperty(QLatin1String("section"), currentSection); } currentStickySection = currentSection; @@ -1035,7 +1035,7 @@ void QQuickListViewPrivate::updateStickySections() if (!nextSectionItem) { nextSectionItem = getSectionItem(nextSection); } else if (nextStickySection != nextSection) { - QDeclarativeContext *context = QDeclarativeEngine::contextForObject(nextSectionItem)->parentContext(); + QQmlContext *context = QQmlEngine::contextForObject(nextSectionItem)->parentContext(); context->setContextProperty(QLatin1String("section"), nextSection); } nextStickySection = nextSection; @@ -1414,7 +1414,7 @@ void QQuickListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExte } void QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize, - QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity) + QQuickTimeLineCallback::Callback fixupCallback, qreal velocity) { Q_Q(QQuickListView); @@ -1528,7 +1528,7 @@ void QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte } timeline.reset(data.move); timeline.accel(data.move, v, accel, maxDistance + overshootDist); - timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this)); + timeline.callback(QQuickTimeLineCallback(&data.move, fixupCallback, this)); if (!hData.flicking && q->xflick()) { hData.flicking = true; emit q->flickingChanged(); @@ -1569,7 +1569,7 @@ void QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte } timeline.reset(data.move); timeline.accelDistance(data.move, v, -dist); - timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this)); + timeline.callback(QQuickTimeLineCallback(&data.move, fixupCallback, this)); } } else { correctFlick = false; @@ -1601,13 +1601,13 @@ void QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte The following example shows the definition of a simple list model defined in a file called \c ContactModel.qml: - \snippet doc/src/snippets/declarative/listview/ContactModel.qml 0 + \snippet doc/src/snippets/qml/listview/ContactModel.qml 0 Another component can display this model data in a ListView, like this: - \snippet doc/src/snippets/declarative/listview/listview.qml import + \snippet doc/src/snippets/qml/listview/listview.qml import \codeline - \snippet doc/src/snippets/declarative/listview/listview.qml classdocs simple + \snippet doc/src/snippets/qml/listview/listview.qml classdocs simple \image listview-simple.png @@ -1618,7 +1618,7 @@ void QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte An improved list view is shown below. The delegate is visually improved and is moved into a separate \c contactDelegate component. - \snippet doc/src/snippets/declarative/listview/listview.qml classdocs advanced + \snippet doc/src/snippets/qml/listview/listview.qml classdocs advanced \image listview-highlight.png The currently selected item is highlighted with a blue \l Rectangle using the \l highlight property, @@ -1633,7 +1633,7 @@ void QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte this attached property directly as \c ListView.isCurrentItem, while the child \c contactInfo object must refer to this property as \c wrapper.ListView.isCurrentItem. - \snippet doc/src/snippets/declarative/listview/listview.qml isCurrentItem + \snippet doc/src/snippets/qml/listview/listview.qml isCurrentItem \note Views do not enable \e clip automatically. If the view is not clipped by another item or the screen, it will be necessary @@ -1659,7 +1659,7 @@ QQuickListView::~QQuickListView() This property may be used to adjust the appearance of the current item, for example: - \snippet doc/src/snippets/declarative/listview/listview.qml isCurrentItem + \snippet doc/src/snippets/qml/listview/listview.qml isCurrentItem */ /*! @@ -1706,7 +1706,7 @@ QQuickListView::~QQuickListView() until an animation completes. The example delegate below ensures that the animation completes before the item is removed from the list. - \snippet doc/src/snippets/declarative/listview/listview.qml delayRemove + \snippet doc/src/snippets/qml/listview/listview.qml delayRemove If a \l remove transition has been specified, it will not be applied until delayRemove is returned to \c false. @@ -1816,7 +1816,7 @@ QQuickListView::~QQuickListView() Here is a highlight with its motion defined by a \l {SpringAnimation} item: - \snippet doc/src/snippets/declarative/listview/listview.qml highlightFollowsCurrentItem + \snippet doc/src/snippets/qml/listview/listview.qml highlightFollowsCurrentItem Note that the highlight animation also affects the way that the view is scrolled. This is because the view moves to maintain the @@ -2662,7 +2662,7 @@ void QQuickListView::updateSections() } } -bool QQuickListViewPrivate::applyInsertionChange(const QDeclarativeChangeSet::Insert &change, ChangeResult *insertResult, QList *addedItems, QList *movingIntoView) +bool QQuickListViewPrivate::applyInsertionChange(const QQuickChangeSet::Insert &change, ChangeResult *insertResult, QList *addedItems, QList *movingIntoView) { int modelIndex = change.index; int count = change.count; diff --git a/src/quick/items/qquicklistview_p.h b/src/quick/items/qquicklistview_p.h index bffd935616..239647a954 100644 --- a/src/quick/items/qquicklistview_p.h +++ b/src/quick/items/qquicklistview_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,7 +44,7 @@ #include "qquickitemview_p.h" -#include +#include QT_BEGIN_HEADER @@ -57,7 +57,7 @@ class Q_AUTOTEST_EXPORT QQuickViewSection : public QObject Q_OBJECT Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged) Q_PROPERTY(SectionCriteria criteria READ criteria WRITE setCriteria NOTIFY criteriaChanged) - Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) Q_PROPERTY(int labelPositioning READ labelPositioning WRITE setLabelPositioning NOTIFY labelPositioningChanged) Q_ENUMS(SectionCriteria) Q_ENUMS(LabelPositioning) @@ -71,8 +71,8 @@ class Q_AUTOTEST_EXPORT QQuickViewSection : public QObject SectionCriteria criteria() const { return m_criteria; } void setCriteria(SectionCriteria); - QDeclarativeComponent *delegate() const { return m_delegate; } - void setDelegate(QDeclarativeComponent *delegate); + QQmlComponent *delegate() const { return m_delegate; } + void setDelegate(QQmlComponent *delegate); QString sectionString(const QString &value); @@ -89,7 +89,7 @@ class Q_AUTOTEST_EXPORT QQuickViewSection : public QObject private: QString m_property; SectionCriteria m_criteria; - QDeclarativeComponent *m_delegate; + QQmlComponent *m_delegate; int m_labelPositioning; QQuickListViewPrivate *m_view; }; @@ -197,7 +197,7 @@ class QQuickListViewAttached : public QQuickItemViewAttached void viewChanged(); public: - QDeclarativeGuard m_view; + QQmlGuard m_view; }; diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp index 92724f4095..bbc51a4d26 100644 --- a/src/quick/items/qquickloader.cpp +++ b/src/quick/items/qquickloader.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -41,12 +41,12 @@ #include "qquickloader_p_p.h" -#include +#include -#include -#include +#include +#include -#include +#include #include @@ -133,7 +133,7 @@ void QQuickLoaderPrivate::initResize() Here is a Loader that loads "Page1.qml" as a component when the \l MouseArea is clicked: - \snippet doc/src/snippets/declarative/loader/simple.qml 0 + \snippet doc/src/snippets/qml/loader/simple.qml 0 The loaded item can be accessed using the \l item property. @@ -165,8 +165,8 @@ void QQuickLoaderPrivate::initResize() \o sizeloader.qml \o sizeitem.qml \row - \o \snippet doc/src/snippets/declarative/loader/sizeloader.qml 0 - \o \snippet doc/src/snippets/declarative/loader/sizeitem.qml 0 + \o \snippet doc/src/snippets/qml/loader/sizeloader.qml 0 + \o \snippet doc/src/snippets/qml/loader/sizeitem.qml 0 \row \o The red rectangle will be sized to the size of the root item. \o The red rectangle will be 50x50, centered in the root item. @@ -185,8 +185,8 @@ void QQuickLoaderPrivate::initResize() \o application.qml \o MyItem.qml \row - \o \snippet doc/src/snippets/declarative/loader/connections.qml 0 - \o \snippet doc/src/snippets/declarative/loader/MyItem.qml 0 + \o \snippet doc/src/snippets/qml/loader/connections.qml 0 + \o \snippet doc/src/snippets/qml/loader/MyItem.qml 0 \endtable Alternatively, since \c MyItem.qml is loaded within the scope of the @@ -212,8 +212,8 @@ void QQuickLoaderPrivate::initResize() \o application.qml \o KeyReader.qml \row - \o \snippet doc/src/snippets/declarative/loader/focus.qml 0 - \o \snippet doc/src/snippets/declarative/loader/KeyReader.qml 0 + \o \snippet doc/src/snippets/qml/loader/focus.qml 0 + \o \snippet doc/src/snippets/qml/loader/KeyReader.qml 0 \endtable Once \c KeyReader.qml is loaded, it accepts key events and sets @@ -344,7 +344,7 @@ void QQuickLoader::loadFromSource() } if (isComponentComplete()) { - d->component = new QDeclarativeComponent(qmlEngine(this), d->source, this); + d->component = new QQmlComponent(qmlEngine(this), d->source, this); d->load(); } } @@ -371,13 +371,13 @@ void QQuickLoader::loadFromSource() \sa source, progress */ -QDeclarativeComponent *QQuickLoader::sourceComponent() const +QQmlComponent *QQuickLoader::sourceComponent() const { Q_D(const QQuickLoader); return d->component; } -void QQuickLoader::setSourceComponent(QDeclarativeComponent *comp) +void QQuickLoader::setSourceComponent(QQmlComponent *comp) { Q_D(QQuickLoader); if (comp == d->component) @@ -476,7 +476,7 @@ void QQuickLoader::loadFromSourceComponent() \sa source, active */ -void QQuickLoader::setSource(QDeclarativeV8Function *args) +void QQuickLoader::setSource(QQmlV8Function *args) { Q_ASSERT(args); Q_D(QQuickLoader); @@ -516,7 +516,7 @@ void QQuickLoaderPrivate::load() if (!component->isLoading()) { _q_sourceLoaded(); } else { - QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), + QObject::connect(component, SIGNAL(statusChanged(QQmlComponent::Status)), q, SLOT(_q_sourceLoaded())); QObject::connect(component, SIGNAL(progressChanged(qreal)), q, SIGNAL(progressChanged())); @@ -541,15 +541,15 @@ void QQuickLoaderPrivate::setInitialState(QObject *obj) QQuickItem *item = qobject_cast(obj); if (item) { - QDeclarative_setParent_noEvent(itemContext, obj); - QDeclarative_setParent_noEvent(item, q); + QQml_setParent_noEvent(itemContext, obj); + QQml_setParent_noEvent(item, q); item->setParentItem(q); } if (initialPropertyValues.IsEmpty()) return; - QDeclarativeComponentPrivate *d = QDeclarativeComponentPrivate::get(component); + QQmlComponentPrivate *d = QQmlComponentPrivate::get(component); Q_ASSERT(d && d->engine); d->initializeObjectWithInitialProperties(qmlGlobalForIpv, initialPropertyValues, obj); } @@ -559,13 +559,13 @@ void QQuickLoaderIncubator::statusChanged(Status status) loader->incubatorStateChanged(status); } -void QQuickLoaderPrivate::incubatorStateChanged(QDeclarativeIncubator::Status status) +void QQuickLoaderPrivate::incubatorStateChanged(QQmlIncubator::Status status) { Q_Q(QQuickLoader); - if (status == QDeclarativeIncubator::Loading || status == QDeclarativeIncubator::Null) + if (status == QQmlIncubator::Loading || status == QQmlIncubator::Null) return; - if (status == QDeclarativeIncubator::Ready) { + if (status == QQmlIncubator::Ready) { QObject *obj = incubator->object(); item = qobject_cast(obj); if (item) { @@ -579,9 +579,9 @@ void QQuickLoaderPrivate::incubatorStateChanged(QDeclarativeIncubator::Status st emit q->itemChanged(); } incubator->clear(); - } else if (status == QDeclarativeIncubator::Error) { + } else if (status == QQmlIncubator::Error) { if (!incubator->errors().isEmpty()) - QDeclarativeEnginePrivate::warning(qmlEngine(q), incubator->errors()); + QQmlEnginePrivate::warning(qmlEngine(q), incubator->errors()); delete itemContext; itemContext = 0; delete incubator->object(); @@ -603,7 +603,7 @@ void QQuickLoaderPrivate::_q_sourceLoaded() Q_Q(QQuickLoader); if (!component || !component->errors().isEmpty()) { if (component) - QDeclarativeEnginePrivate::warning(qmlEngine(q), component->errors()); + QQmlEnginePrivate::warning(qmlEngine(q), component->errors()); if (loadingFromSource) emit q->sourceChanged(); else @@ -614,17 +614,17 @@ void QQuickLoaderPrivate::_q_sourceLoaded() return; } - QDeclarativeContext *creationContext = component->creationContext(); + QQmlContext *creationContext = component->creationContext(); if (!creationContext) creationContext = qmlContext(q); - itemContext = new QDeclarativeContext(creationContext); + itemContext = new QQmlContext(creationContext); itemContext->setContextObject(q); delete incubator; - incubator = new QQuickLoaderIncubator(this, asynchronous ? QDeclarativeIncubator::Asynchronous : QDeclarativeIncubator::AsynchronousIfNested); + incubator = new QQuickLoaderIncubator(this, asynchronous ? QQmlIncubator::Asynchronous : QQmlIncubator::AsynchronousIfNested); component->create(*incubator, itemContext); - if (incubator && incubator->status() == QDeclarativeIncubator::Loading) + if (incubator && incubator->status() == QQmlIncubator::Loading) emit q->statusChanged(); } @@ -677,11 +677,11 @@ QQuickLoader::Status QQuickLoader::status() const if (d->component) { switch (d->component->status()) { - case QDeclarativeComponent::Loading: + case QQmlComponent::Loading: return Loading; - case QDeclarativeComponent::Error: + case QQmlComponent::Error: return Error; - case QDeclarativeComponent::Null: + case QQmlComponent::Null: return Null; default: break; @@ -690,9 +690,9 @@ QQuickLoader::Status QQuickLoader::status() const if (d->incubator) { switch (d->incubator->status()) { - case QDeclarativeIncubator::Loading: + case QQmlIncubator::Loading: return Loading; - case QDeclarativeIncubator::Error: + case QQmlIncubator::Error: return Error; default: break; @@ -711,7 +711,7 @@ void QQuickLoader::componentComplete() QQuickItem::componentComplete(); if (active()) { if (d->loadingFromSource) { - d->component = new QDeclarativeComponent(qmlEngine(this), d->source, this); + d->component = new QQmlComponent(qmlEngine(this), d->source, this); } d->load(); } @@ -826,19 +826,19 @@ void QQuickLoader::geometryChanged(const QRectF &newGeometry, const QRectF &oldG QQuickItem::geometryChanged(newGeometry, oldGeometry); } -QUrl QQuickLoaderPrivate::resolveSourceUrl(QDeclarativeV8Function *args) +QUrl QQuickLoaderPrivate::resolveSourceUrl(QQmlV8Function *args) { QV8Engine *v8engine = args->engine(); QString arg = v8engine->toString((*args)[0]->ToString()); if (arg.isEmpty()) return QUrl(); - QDeclarativeContextData *context = args->context(); + QQmlContextData *context = args->context(); Q_ASSERT(context); return context->resolvedUrl(QUrl(arg)); } -v8::Handle QQuickLoaderPrivate::extractInitialPropertyValues(QDeclarativeV8Function *args, QObject *loader, bool *error) +v8::Handle QQuickLoaderPrivate::extractInitialPropertyValues(QQmlV8Function *args, QObject *loader, bool *error) { v8::Local valuemap; if (args->Length() >= 2) { diff --git a/src/quick/items/qquickloader_p.h b/src/quick/items/qquickloader_p.h index a6cc5a18d9..c5f544b0e8 100644 --- a/src/quick/items/qquickloader_p.h +++ b/src/quick/items/qquickloader_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -56,7 +56,7 @@ class Q_AUTOTEST_EXPORT QQuickLoader : public QQuickImplicitSizeItem Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged) Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) - Q_PROPERTY(QDeclarativeComponent *sourceComponent READ sourceComponent WRITE setSourceComponent RESET resetSourceComponent NOTIFY sourceComponentChanged) + Q_PROPERTY(QQmlComponent *sourceComponent READ sourceComponent WRITE setSourceComponent RESET resetSourceComponent NOTIFY sourceComponentChanged) Q_PROPERTY(QQuickItem *item READ item NOTIFY itemChanged) Q_PROPERTY(Status status READ status NOTIFY statusChanged) Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged) @@ -69,13 +69,13 @@ class Q_AUTOTEST_EXPORT QQuickLoader : public QQuickImplicitSizeItem bool active() const; void setActive(bool newVal); - Q_INVOKABLE void setSource(QDeclarativeV8Function *); + Q_INVOKABLE void setSource(QQmlV8Function *); QUrl source() const; void setSource(const QUrl &); - QDeclarativeComponent *sourceComponent() const; - void setSourceComponent(QDeclarativeComponent *); + QQmlComponent *sourceComponent() const; + void setSourceComponent(QQmlComponent *); void resetSourceComponent(); enum Status { Null, Ready, Loading, Error }; diff --git a/src/quick/items/qquickloader_p_p.h b/src/quick/items/qquickloader_p_p.h index 3ef0038493..1ad7756ed8 100644 --- a/src/quick/items/qquickloader_p_p.h +++ b/src/quick/items/qquickloader_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -56,7 +56,7 @@ #include "qquickloader_p.h" #include "qquickimplicitsizeitem_p_p.h" #include "qquickitemchangelistener_p.h" -#include +#include #include @@ -64,10 +64,10 @@ QT_BEGIN_NAMESPACE class QQuickLoaderPrivate; -class QQuickLoaderIncubator : public QDeclarativeIncubator +class QQuickLoaderIncubator : public QQmlIncubator { public: - QQuickLoaderIncubator(QQuickLoaderPrivate *l, IncubationMode mode) : QDeclarativeIncubator(mode), loader(l) {} + QQuickLoaderIncubator(QQuickLoaderPrivate *l, IncubationMode mode) : QQmlIncubator(mode), loader(l) {} protected: virtual void statusChanged(Status); @@ -77,7 +77,7 @@ class QQuickLoaderIncubator : public QDeclarativeIncubator QQuickLoaderPrivate *loader; }; -class QDeclarativeContext; +class QQmlContext; class QQuickLoaderPrivate : public QQuickImplicitSizeItemPrivate, public QQuickItemChangeListener { Q_DECLARE_PUBLIC(QQuickLoader) @@ -91,16 +91,16 @@ class QQuickLoaderPrivate : public QQuickImplicitSizeItemPrivate, public QQuickI void initResize(); void load(); - void incubatorStateChanged(QDeclarativeIncubator::Status status); + void incubatorStateChanged(QQmlIncubator::Status status); void setInitialState(QObject *o); void disposeInitialPropertyValues(); - QUrl resolveSourceUrl(QDeclarativeV8Function *args); - v8::Handle extractInitialPropertyValues(QDeclarativeV8Function *args, QObject *loader, bool *error); + QUrl resolveSourceUrl(QQmlV8Function *args); + v8::Handle extractInitialPropertyValues(QQmlV8Function *args, QObject *loader, bool *error); QUrl source; QQuickItem *item; - QDeclarativeComponent *component; - QDeclarativeContext *itemContext; + QQmlComponent *component; + QQmlContext *itemContext; QQuickLoaderIncubator *incubator; v8::Persistent initialPropertyValues; v8::Persistent qmlGlobalForIpv; diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp index d0894e9590..ec2c980879 100644 --- a/src/quick/items/qquickmousearea.cpp +++ b/src/quick/items/qquickmousearea.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -348,9 +348,9 @@ bool QQuickMouseAreaPrivate::propagateHelper(QQuickMouseEvent *ev, QQuickItem *i The following example uses a MouseArea in a \l Rectangle that changes the \l Rectangle color to red when clicked: - \snippet doc/src/snippets/declarative/mousearea/mousearea.qml import + \snippet doc/src/snippets/qml/mousearea/mousearea.qml import \codeline - \snippet doc/src/snippets/declarative/mousearea/mousearea.qml intro + \snippet doc/src/snippets/qml/mousearea/mousearea.qml intro \clearfloat Many MouseArea signals pass a \l{MouseEvent}{mouse} parameter that contains @@ -360,7 +360,7 @@ bool QQuickMouseAreaPrivate::propagateHelper(QQuickMouseEvent *ev, QQuickItem *i Here is an extension of the previous example that produces a different color when the area is right clicked: - \snippet doc/src/snippets/declarative/mousearea/mousearea.qml intro-extended + \snippet doc/src/snippets/qml/mousearea/mousearea.qml intro-extended Behavioral Change in QtQuick 2.0 @@ -659,7 +659,7 @@ void QQuickMouseArea::setPropagateComposedEvents(bool prevent) The code below displays "right" when the right mouse buttons is pressed: - \snippet doc/src/snippets/declarative/mousearea/mousearea.qml mousebuttons + \snippet doc/src/snippets/qml/mousearea/mousearea.qml mousebuttons \sa acceptedButtons */ @@ -1148,7 +1148,7 @@ bool QQuickMouseArea::setPressed(bool p) The following example displays a \l Rectangle that can be dragged along the X-axis. The opacity of the rectangle is reduced when it is dragged to the right. - \snippet doc/src/snippets/declarative/mousearea/mousearea.qml drag + \snippet doc/src/snippets/qml/mousearea/mousearea.qml drag \note Items cannot be dragged if they are anchored for the requested \c drag.axis. For example, if \c anchors.left or \c anchors.right was set @@ -1159,7 +1159,7 @@ bool QQuickMouseArea::setPressed(bool p) If \c drag.filterChildren is set to true, a drag can override descendant MouseAreas. This enables a parent MouseArea to handle drags, for example, while descendants handle clicks: - \snippet doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml dragfilter + \snippet doc/src/snippets/qml/mousearea/mouseareadragfilter.qml dragfilter */ diff --git a/src/quick/items/qquickmousearea_p.h b/src/quick/items/qquickmousearea_p.h index 0723f8326f..93a0635eb5 100644 --- a/src/quick/items/qquickmousearea_p.h +++ b/src/quick/items/qquickmousearea_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -132,7 +132,7 @@ class Q_QUICK_EXPORT QQuickMouseArea : public QQuickItem Q_PROPERTY(Qt::MouseButtons pressedButtons READ pressedButtons NOTIFY pressedChanged) Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged) Q_PROPERTY(bool hoverEnabled READ hoverEnabled WRITE setHoverEnabled NOTIFY hoverEnabledChanged) - Q_PROPERTY(QQuickDrag *drag READ drag CONSTANT) //### add flicking to QQuickDrag or add a QDeclarativeFlick ??? + Q_PROPERTY(QQuickDrag *drag READ drag CONSTANT) //### add flicking to QQuickDrag or add a QQuickFlick ??? Q_PROPERTY(bool preventStealing READ preventStealing WRITE setPreventStealing NOTIFY preventStealingChanged) Q_PROPERTY(bool propagateComposedEvents READ propagateComposedEvents WRITE setPropagateComposedEvents NOTIFY propagateComposedEventsChanged) diff --git a/src/quick/items/qquickmousearea_p_p.h b/src/quick/items/qquickmousearea_p_p.h index 2060671698..bcdf033cba 100644 --- a/src/quick/items/qquickmousearea_p_p.h +++ b/src/quick/items/qquickmousearea_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -99,7 +99,7 @@ class QQuickMouseAreaPrivate : public QQuickItemPrivate QPointF startScene; QPointF targetStartPos; QPointF lastPos; - QDeclarativeNullableValue lastScenePos; + QQmlNullableValue lastScenePos; Qt::MouseButton lastButton; Qt::MouseButtons lastButtons; Qt::KeyboardModifiers lastModifiers; diff --git a/src/quick/items/qquickmultipointtoucharea.cpp b/src/quick/items/qquickmultipointtoucharea.cpp index c1c60c1756..7dd6ec0589 100644 --- a/src/quick/items/qquickmultipointtoucharea.cpp +++ b/src/quick/items/qquickmultipointtoucharea.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -309,7 +309,7 @@ void QQuickTouchPoint::setSceneY(qreal sceneY) In the following example, we have two small rectangles that follow our touch points. - \snippet doc/src/snippets/declarative/multipointtoucharea/multipointtoucharea.qml 0 + \snippet doc/src/snippets/qml/multipointtoucharea/multipointtoucharea.qml 0 By default this property holds an empty list. diff --git a/src/quick/items/qquickmultipointtoucharea_p.h b/src/quick/items/qquickmultipointtoucharea_p.h index ccb086fd7e..3651278735 100644 --- a/src/quick/items/qquickmultipointtoucharea_p.h +++ b/src/quick/items/qquickmultipointtoucharea_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -166,7 +166,7 @@ class Q_AUTOTEST_EXPORT QQuickTouchPoint : public QObject class QQuickGrabGestureEvent : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty touchPoints READ touchPoints) + Q_PROPERTY(QQmlListProperty touchPoints READ touchPoints) Q_PROPERTY(qreal dragThreshold READ dragThreshold) public: QQuickGrabGestureEvent() : _grab(false), _dragThreshold(qApp->styleHints()->startDragDistance()) {} @@ -174,8 +174,8 @@ class QQuickGrabGestureEvent : public QObject Q_INVOKABLE void grab() { _grab = true; } bool wantsGrab() const { return _grab; } - QDeclarativeListProperty touchPoints() { - return QDeclarativeListProperty(this, _touchPoints); + QQmlListProperty touchPoints() { + return QQmlListProperty(this, _touchPoints); } qreal dragThreshold() const { return _dragThreshold; } @@ -190,7 +190,7 @@ class Q_AUTOTEST_EXPORT QQuickMultiPointTouchArea : public QQuickItem { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty touchPoints READ touchPoints) + Q_PROPERTY(QQmlListProperty touchPoints READ touchPoints) Q_PROPERTY(int minimumTouchPoints READ minimumTouchPoints WRITE setMinimumTouchPoints NOTIFY minimumTouchPointsChanged) Q_PROPERTY(int maximumTouchPoints READ maximumTouchPoints WRITE setMaximumTouchPoints NOTIFY maximumTouchPointsChanged) @@ -203,21 +203,21 @@ class Q_AUTOTEST_EXPORT QQuickMultiPointTouchArea : public QQuickItem int maximumTouchPoints() const; void setMaximumTouchPoints(int num); - QDeclarativeListProperty touchPoints() { - return QDeclarativeListProperty(this, 0, QQuickMultiPointTouchArea::touchPoint_append, QQuickMultiPointTouchArea::touchPoint_count, QQuickMultiPointTouchArea::touchPoint_at, 0); + QQmlListProperty touchPoints() { + return QQmlListProperty(this, 0, QQuickMultiPointTouchArea::touchPoint_append, QQuickMultiPointTouchArea::touchPoint_count, QQuickMultiPointTouchArea::touchPoint_at, 0); } - static void touchPoint_append(QDeclarativeListProperty *list, QQuickTouchPoint* touch) { + static void touchPoint_append(QQmlListProperty *list, QQuickTouchPoint* touch) { QQuickMultiPointTouchArea *q = static_cast(list->object); q->addTouchPrototype(touch); } - static int touchPoint_count(QDeclarativeListProperty *list) { + static int touchPoint_count(QQmlListProperty *list) { QQuickMultiPointTouchArea *q = static_cast(list->object); return q->_touchPrototypes.count(); } - static QQuickTouchPoint* touchPoint_at(QDeclarativeListProperty *list, int index) { + static QQuickTouchPoint* touchPoint_at(QQmlListProperty *list, int index) { QQuickMultiPointTouchArea *q = static_cast(list->object); return q->_touchPrototypes[index]; } diff --git a/src/quick/items/qquickninepatchnode.cpp b/src/quick/items/qquickninepatchnode.cpp index ff265b3a97..649fa527ee 100644 --- a/src/quick/items/qquickninepatchnode.cpp +++ b/src/quick/items/qquickninepatchnode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickninepatchnode_p.h b/src/quick/items/qquickninepatchnode_p.h index 277b368de7..c2761f74e5 100644 --- a/src/quick/items/qquickninepatchnode_p.h +++ b/src/quick/items/qquickninepatchnode_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickpainteditem.cpp b/src/quick/items/qquickpainteditem.cpp index 02afc0c4f5..349f2ff3c1 100644 --- a/src/quick/items/qquickpainteditem.cpp +++ b/src/quick/items/qquickpainteditem.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickpainteditem.h b/src/quick/items/qquickpainteditem.h index 06768796ca..15afdf8339 100644 --- a/src/quick/items/qquickpainteditem.h +++ b/src/quick/items/qquickpainteditem.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickpainteditem_p.h b/src/quick/items/qquickpainteditem_p.h index 8c0a1475a7..d98216ffb0 100644 --- a/src/quick/items/qquickpainteditem_p.h +++ b/src/quick/items/qquickpainteditem_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index afc336fa04..f8098c8f65 100644 --- a/src/quick/items/qquickpathview.cpp +++ b/src/quick/items/qquickpathview.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,10 +43,11 @@ #include "qquickpathview_p_p.h" #include "qquickcanvas.h" -#include -#include +#include +#include +#include #include -#include +#include #include #include @@ -78,16 +79,16 @@ inline qreal qmlMod(qreal x, qreal y) return fmod(x, y); } -static QDeclarativeOpenMetaObjectType *qPathViewAttachedType = 0; +static QQmlOpenMetaObjectType *qPathViewAttachedType = 0; QQuickPathViewAttached::QQuickPathViewAttached(QObject *parent) : QObject(parent), m_percent(-1), m_view(0), m_onPath(false), m_isCurrent(false) { if (qPathViewAttachedType) { - m_metaobject = new QDeclarativeOpenMetaObject(this, qPathViewAttachedType); + m_metaobject = new QQmlOpenMetaObject(this, qPathViewAttachedType); m_metaobject->setCached(true); } else { - m_metaobject = new QDeclarativeOpenMetaObject(this); + m_metaobject = new QQmlOpenMetaObject(this); } } @@ -126,7 +127,7 @@ QQuickItem *QQuickPathViewPrivate::getItem(int modelIndex, qreal z, bool onPath) inRequest = true; QQuickItem *item = model->item(modelIndex, false); if (item) { - QDeclarative_setParent_noEvent(item, q); + QQml_setParent_noEvent(item, q); item->setParentItem(q); requestedIndex = -1; qPathViewAttachedType = attType; @@ -153,7 +154,7 @@ void QQuickPathView::createdItem(int index, QQuickItem *item) att->setOnPath(false); } item->setParentItem(this); - QDeclarative_setParent_noEvent(item, this); + QQml_setParent_noEvent(item, this); d->updateItem(item, index < d->firstIndex ? 0.0 : 1.0); } else { d->requestedIndex = -1; @@ -200,12 +201,12 @@ QQuickPathViewAttached *QQuickPathViewPrivate::attached(QQuickItem *item) return static_cast(qmlAttachedPropertiesObject(item, false)); } -QDeclarativeOpenMetaObjectType *QQuickPathViewPrivate::attachedType() +QQmlOpenMetaObjectType *QQuickPathViewPrivate::attachedType() { Q_Q(QQuickPathView); if (!attType) { // pre-create one metatype to share with all attached objects - attType = new QDeclarativeOpenMetaObjectType(&QQuickPathViewAttached::staticMetaObject, qmlEngine(q)); + attType = new QQmlOpenMetaObjectType(&QQuickPathViewAttached::staticMetaObject, qmlEngine(q)); foreach (const QString &attr, path->attributes()) attType->createProperty(attr.toUtf8()); } @@ -273,12 +274,12 @@ void QQuickPathViewPrivate::createHighlight() QQuickItem *item = 0; if (highlightComponent) { - QDeclarativeContext *creationContext = highlightComponent->creationContext(); - QDeclarativeContext *highlightContext = new QDeclarativeContext( + QQmlContext *creationContext = highlightComponent->creationContext(); + QQmlContext *highlightContext = new QQmlContext( creationContext ? creationContext : qmlContext(q)); QObject *nobj = highlightComponent->create(highlightContext); if (nobj) { - QDeclarative_setParent_noEvent(highlightContext, nobj); + QQml_setParent_noEvent(highlightContext, nobj); item = qobject_cast(nobj); if (!item) delete nobj; @@ -289,7 +290,7 @@ void QQuickPathViewPrivate::createHighlight() item = new QQuickItem; } if (item) { - QDeclarative_setParent_noEvent(item, q); + QQml_setParent_noEvent(item, q); item->setParentItem(q); highlightItem = item; changed = true; @@ -426,11 +427,11 @@ void QQuickPathViewPrivate::regenerate() For example, if there is a simple list model defined in a file \c ContactModel.qml like this: - \snippet doc/src/snippets/declarative/pathview/ContactModel.qml 0 + \snippet doc/src/snippets/qml/pathview/ContactModel.qml 0 This data can be represented as a PathView, like this: - \snippet doc/src/snippets/declarative/pathview/pathview.qml 0 + \snippet doc/src/snippets/qml/pathview/pathview.qml 0 \image pathview.gif @@ -463,7 +464,7 @@ void QQuickPathViewPrivate::regenerate() this attached property directly as \c PathView.isCurrentItem, while the child \c nameText object must refer to this property as \c wrapper.PathView.isCurrentItem. - \snippet doc/src/snippets/declarative/pathview/pathview.qml 1 + \snippet doc/src/snippets/qml/pathview/pathview.qml 1 \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 @@ -525,7 +526,7 @@ QQuickPathView::~QQuickPathView() This property may be used to adjust the appearance of the current item. - \snippet doc/src/snippets/declarative/pathview/pathview.qml 1 + \snippet doc/src/snippets/qml/pathview/pathview.qml 1 */ /*! @@ -551,8 +552,8 @@ void QQuickPathView::setModel(const QVariant &model) return; if (d->model) { - disconnect(d->model, SIGNAL(modelUpdated(QDeclarativeChangeSet,bool)), - this, SLOT(modelUpdated(QDeclarativeChangeSet,bool))); + disconnect(d->model, SIGNAL(modelUpdated(QQuickChangeSet,bool)), + this, SLOT(modelUpdated(QQuickChangeSet,bool))); disconnect(d->model, SIGNAL(createdItem(int,QQuickItem*)), this, SLOT(createdItem(int,QQuickItem*))); disconnect(d->model, SIGNAL(initItem(int,QQuickItem*)), this, SLOT(initItem(int,QQuickItem*))); for (int i=0; iitems.count(); i++){ @@ -583,8 +584,8 @@ void QQuickPathView::setModel(const QVariant &model) } d->modelCount = 0; if (d->model) { - connect(d->model, SIGNAL(modelUpdated(QDeclarativeChangeSet,bool)), - this, SLOT(modelUpdated(QDeclarativeChangeSet,bool))); + connect(d->model, SIGNAL(modelUpdated(QQuickChangeSet,bool)), + this, SLOT(modelUpdated(QQuickChangeSet,bool))); connect(d->model, SIGNAL(createdItem(int,QQuickItem*)), this, SLOT(createdItem(int,QQuickItem*))); connect(d->model, SIGNAL(initItem(int,QQuickItem*)), this, SLOT(initItem(int,QQuickItem*))); d->modelCount = d->model->count(); @@ -617,13 +618,13 @@ int QQuickPathView::count() const This property holds the path used to lay out the items. For more information see the \l Path documentation. */ -QDeclarativePath *QQuickPathView::path() const +QQuickPath *QQuickPathView::path() const { Q_D(const QQuickPathView); return d->path; } -void QQuickPathView::setPath(QDeclarativePath *path) +void QQuickPathView::setPath(QQuickPath *path) { Q_D(QQuickPathView); if (d->path == path) @@ -786,13 +787,13 @@ void QQuickPathViewPrivate::setAdjustedOffset(qreal o) \sa highlightItem, highlightRangeMode */ -QDeclarativeComponent *QQuickPathView::highlight() const +QQmlComponent *QQuickPathView::highlight() const { Q_D(const QQuickPathView); return d->highlightComponent; } -void QQuickPathView::setHighlight(QDeclarativeComponent *highlight) +void QQuickPathView::setHighlight(QQmlComponent *highlight) { Q_D(QQuickPathView); if (highlight != d->highlightComponent) { @@ -1069,9 +1070,9 @@ bool QQuickPathView::isFlicking() const item in the delegate. Here is an example delegate: - \snippet doc/src/snippets/declarative/pathview/pathview.qml 1 + \snippet doc/src/snippets/qml/pathview/pathview.qml 1 */ -QDeclarativeComponent *QQuickPathView::delegate() const +QQmlComponent *QQuickPathView::delegate() const { Q_D(const QQuickPathView); if (d->model) { @@ -1082,7 +1083,7 @@ QDeclarativeComponent *QQuickPathView::delegate() const return 0; } -void QQuickPathView::setDelegate(QDeclarativeComponent *delegate) +void QQuickPathView::setDelegate(QQmlComponent *delegate) { Q_D(QQuickPathView); if (delegate == this->delegate()) @@ -1337,7 +1338,7 @@ void QQuickPathViewPrivate::handleMouseReleaseEvent(QMouseEvent *) offsetAdj = 0.0; moveOffset.setValue(offset); tl.accel(moveOffset, velocity, accel, dist); - tl.callback(QDeclarativeTimeLineCallback(&moveOffset, fixOffsetCallback, this)); + tl.callback(QQuickTimeLineCallback(&moveOffset, fixOffsetCallback, this)); if (!flicking) { flicking = true; emit q->flickingChanged(); @@ -1583,7 +1584,7 @@ void QQuickPathView::refill() d->releaseItem(d->itemCache.takeLast()); } -void QQuickPathView::modelUpdated(const QDeclarativeChangeSet &changeSet, bool reset) +void QQuickPathView::modelUpdated(const QQuickChangeSet &changeSet, bool reset) { Q_D(QQuickPathView); if (!d->model || !d->model->isValid() || !d->path || !isComponentComplete()) @@ -1604,7 +1605,7 @@ void QQuickPathView::modelUpdated(const QDeclarativeChangeSet &changeSet, bool r int moveOffset; bool currentChanged = false; bool changedOffset = false; - foreach (const QDeclarativeChangeSet::Remove &r, changeSet.removes()) { + foreach (const QQuickChangeSet::Remove &r, changeSet.removes()) { if (moveId == -1 && d->currentIndex >= r.index + r.count) { d->currentIndex -= r.count; currentChanged = true; @@ -1630,7 +1631,7 @@ void QQuickPathView::modelUpdated(const QDeclarativeChangeSet &changeSet, bool r } d->modelCount -= r.count; } - foreach (const QDeclarativeChangeSet::Insert &i, changeSet.inserts()) { + foreach (const QQuickChangeSet::Insert &i, changeSet.inserts()) { if (d->modelCount) { if (moveId == -1 && i.index <= d->currentIndex) { d->currentIndex += i.count; diff --git a/src/quick/items/qquickpathview_p.h b/src/quick/items/qquickpathview_p.h index 77348302ea..8f1ecd6caf 100644 --- a/src/quick/items/qquickpathview_p.h +++ b/src/quick/items/qquickpathview_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,13 +44,13 @@ #include "qquickitem.h" -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeChangeSet; +class QQuickChangeSet; class QQuickPathViewPrivate; class QQuickPathViewAttached; @@ -59,12 +59,12 @@ class Q_AUTOTEST_EXPORT QQuickPathView : public QQuickItem Q_OBJECT Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged) - Q_PROPERTY(QDeclarativePath *path READ path WRITE setPath NOTIFY pathChanged) + Q_PROPERTY(QQuickPath *path READ path WRITE setPath NOTIFY pathChanged) Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) Q_PROPERTY(QQuickItem *currentItem READ currentItem NOTIFY currentItemChanged) Q_PROPERTY(qreal offset READ offset WRITE setOffset NOTIFY offsetChanged) - Q_PROPERTY(QDeclarativeComponent *highlight READ highlight WRITE setHighlight NOTIFY highlightChanged) + Q_PROPERTY(QQmlComponent *highlight READ highlight WRITE setHighlight NOTIFY highlightChanged) Q_PROPERTY(QQuickItem *highlightItem READ highlightItem NOTIFY highlightItemChanged) Q_PROPERTY(qreal preferredHighlightBegin READ preferredHighlightBegin WRITE setPreferredHighlightBegin NOTIFY preferredHighlightBeginChanged) @@ -80,7 +80,7 @@ class Q_AUTOTEST_EXPORT QQuickPathView : public QQuickItem Q_PROPERTY(bool flicking READ isFlicking NOTIFY flickingChanged) Q_PROPERTY(int count READ count NOTIFY countChanged) - Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount NOTIFY pathItemCountChanged) Q_ENUMS(HighlightRangeMode) @@ -92,8 +92,8 @@ class Q_AUTOTEST_EXPORT QQuickPathView : public QQuickItem QVariant model() const; void setModel(const QVariant &); - QDeclarativePath *path() const; - void setPath(QDeclarativePath *); + QQuickPath *path() const; + void setPath(QQuickPath *); int currentIndex() const; void setCurrentIndex(int idx); @@ -103,8 +103,8 @@ class Q_AUTOTEST_EXPORT QQuickPathView : public QQuickItem qreal offset() const; void setOffset(qreal offset); - QDeclarativeComponent *highlight() const; - void setHighlight(QDeclarativeComponent *highlight); + QQmlComponent *highlight() const; + void setHighlight(QQmlComponent *highlight); QQuickItem *highlightItem(); enum HighlightRangeMode { NoHighlightRange, ApplyRange, StrictlyEnforceRange }; @@ -134,8 +134,8 @@ class Q_AUTOTEST_EXPORT QQuickPathView : public QQuickItem int count() const; - QDeclarativeComponent *delegate() const; - void setDelegate(QDeclarativeComponent *); + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *); int pathItemCount() const; void setPathItemCount(int); @@ -186,7 +186,7 @@ private Q_SLOTS: void refill(); void ticked(); void movementEnding(); - void modelUpdated(const QDeclarativeChangeSet &changeSet, bool reset); + void modelUpdated(const QQuickChangeSet &changeSet, bool reset); void createdItem(int index, QQuickItem *item); void initItem(int index, QQuickItem *item); void destroyingItem(QQuickItem *item); @@ -198,7 +198,7 @@ private Q_SLOTS: Q_DECLARE_PRIVATE(QQuickPathView) }; -class QDeclarativeOpenMetaObject; +class QQmlOpenMetaObject; class QQuickPathViewAttached : public QObject { Q_OBJECT @@ -241,7 +241,7 @@ class QQuickPathViewAttached : public QObject friend class QQuickPathViewPrivate; friend class QQuickPathView; QQuickPathView *m_view; - QDeclarativeOpenMetaObject *m_metaobject; + QQmlOpenMetaObject *m_metaobject; bool m_onPath : 1; bool m_isCurrent : 1; }; diff --git a/src/quick/items/qquickpathview_p_p.h b/src/quick/items/qquickpathview_p_p.h index b57aa13cbf..a80c01f320 100644 --- a/src/quick/items/qquickpathview_p_p.h +++ b/src/quick/items/qquickpathview_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -57,17 +57,17 @@ #include "qquickitem_p.h" #include "qquickvisualdatamodel_p.h" -#include +#include #include #include -#include -#include -#include +#include +#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeOpenMetaObjectType; +class QQmlOpenMetaObjectType; class QQuickPathViewAttached; class QQuickPathViewPrivate : public QQuickItemPrivate, public QQuickItemChangeListener { @@ -114,7 +114,7 @@ class QQuickPathViewPrivate : public QQuickItemPrivate, public QQuickItemChangeL QQuickItem *getItem(int modelIndex, qreal z = 0, bool onPath=true); void releaseItem(QQuickItem *item); QQuickPathViewAttached *attached(QQuickItem *item); - QDeclarativeOpenMetaObjectType *attachedType(); + QQmlOpenMetaObjectType *attachedType(); void clear(); void updateMappedRange(); qreal positionOfIndex(qreal index) const; @@ -143,9 +143,9 @@ class QQuickPathViewPrivate : public QQuickItemPrivate, public QQuickItemChangeL void addVelocitySample(qreal v); qreal calcVelocity() const; - QDeclarativePath *path; + QQuickPath *path; int currentIndex; - QDeclarativeGuard currentItem; + QQmlGuard currentItem; qreal currentItemOffset; qreal startPc; QPointF startPoint; @@ -169,24 +169,24 @@ class QQuickPathViewPrivate : public QQuickItemPrivate, public QQuickItemChangeL QPointF lastPos; qreal dragMargin; qreal deceleration; - QDeclarativeTimeLine tl; - QDeclarativeTimeLineValueProxy moveOffset; + QQuickTimeLine tl; + QQuickTimeLineValueProxy moveOffset; int firstIndex; int pathItems; int requestedIndex; qreal requestedZ; QList items; QList itemCache; - QDeclarativeGuard model; + QQmlGuard model; QVariant modelVariant; enum MovementReason { Other, SetIndex, Mouse }; MovementReason moveReason; enum MovementDirection { Shortest, Negative, Positive }; MovementDirection moveDirection; - QDeclarativeOpenMetaObjectType *attType; - QDeclarativeComponent *highlightComponent; + QQmlOpenMetaObjectType *attType; + QQmlComponent *highlightComponent; QQuickItem *highlightItem; - QDeclarativeTimeLineValueProxy moveHighlight; + QQuickTimeLineValueProxy moveHighlight; qreal highlightPosition; qreal highlightRangeStart; qreal highlightRangeEnd; diff --git a/src/quick/items/qquickpositioners.cpp b/src/quick/items/qquickpositioners.cpp index 77d2a360b8..739f74d69a 100644 --- a/src/quick/items/qquickpositioners.cpp +++ b/src/quick/items/qquickpositioners.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,15 +42,15 @@ #include "qquickpositioners_p.h" #include "qquickpositioners_p_p.h" -#include -#include +#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include QT_BEGIN_NAMESPACE @@ -137,13 +137,13 @@ void QQuickBasePositioner::setSpacing(qreal s) emit spacingChanged(); } -QDeclarativeTransition *QQuickBasePositioner::move() const +QQuickTransition *QQuickBasePositioner::move() const { Q_D(const QQuickBasePositioner); return d->moveTransition; } -void QQuickBasePositioner::setMove(QDeclarativeTransition *mt) +void QQuickBasePositioner::setMove(QQuickTransition *mt) { Q_D(QQuickBasePositioner); if (mt == d->moveTransition) @@ -152,13 +152,13 @@ void QQuickBasePositioner::setMove(QDeclarativeTransition *mt) emit moveChanged(); } -QDeclarativeTransition *QQuickBasePositioner::add() const +QQuickTransition *QQuickBasePositioner::add() const { Q_D(const QQuickBasePositioner); return d->addTransition; } -void QQuickBasePositioner::setAdd(QDeclarativeTransition *add) +void QQuickBasePositioner::setAdd(QQuickTransition *add) { Q_D(QQuickBasePositioner); if (add == d->addTransition) @@ -266,12 +266,12 @@ void QQuickBasePositioner::positionX(qreal x, const PositionedItem &target) if (!d->addTransition || !d->addTransition->enabled()) target.item->setX(x); else - d->addActions << QDeclarativeAction(target.item, QLatin1String("x"), QVariant(x)); + d->addActions << QQuickAction(target.item, QLatin1String("x"), QVariant(x)); } else if (x != target.item->x()) { if (!d->moveTransition || !d->moveTransition->enabled()) target.item->setX(x); else - d->moveActions << QDeclarativeAction(target.item, QLatin1String("x"), QVariant(x)); + d->moveActions << QQuickAction(target.item, QLatin1String("x"), QVariant(x)); } } } @@ -284,12 +284,12 @@ void QQuickBasePositioner::positionY(qreal y, const PositionedItem &target) if (!d->addTransition || !d->addTransition->enabled()) target.item->setY(y); else - d->addActions << QDeclarativeAction(target.item, QLatin1String("y"), QVariant(y)); + d->addActions << QQuickAction(target.item, QLatin1String("y"), QVariant(y)); } else if (y != target.item->y()) { if (!d->moveTransition || !d->moveTransition->enabled()) target.item->setY(y); else - d->moveActions << QDeclarativeAction(target.item, QLatin1String("y"), QVariant(y)); + d->moveActions << QQuickAction(target.item, QLatin1String("y"), QVariant(y)); } } } @@ -454,7 +454,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem) Below is a Column that contains three rectangles of various sizes: - \snippet doc/src/snippets/declarative/column/vertical-positioner.qml document + \snippet doc/src/snippets/qml/column/vertical-positioner.qml document The Column automatically positions these items in a vertical formation, like this: @@ -483,7 +483,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem) For example, the Column below sets the \l move property to a specific \l Transition: - \snippet doc/src/snippets/declarative/column/column-transitions.qml document + \snippet doc/src/snippets/qml/column/column-transitions.qml document When the Space key is pressed, the \l {Item::visible}{visible} value of the green \l Rectangle is toggled. As it appears and disappears, the blue \l Rectangle moves within @@ -491,7 +491,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem) \image verticalpositioner_transition.gif - \sa Row, Grid, Flow, Positioner, {declarative/positioners}{Positioners example} + \sa Row, Grid, Flow, Positioner, {qml/positioners}{Positioners example} */ /*! \qmlproperty Transition QtQuick2::Column::add @@ -519,7 +519,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem) addition or removal of other items in the positioner, or when items move due to a move operation in a related model, or when items resize themselves. - \sa add, {declarative/positioners}{Positioners example} + \sa add, {qml/positioners}{Positioners example} */ /*! \qmlproperty real QtQuick2::Column::spacing @@ -593,7 +593,7 @@ void QQuickColumn::reportConflictingAnchors() Below is a Row that contains three rectangles of various sizes: - \snippet doc/src/snippets/declarative/row/row.qml document + \snippet doc/src/snippets/qml/row/row.qml document The Row automatically positions these items in a horizontal formation, like this: @@ -615,7 +615,7 @@ void QQuickColumn::reportConflictingAnchors() \l{Item Layouts}. - \sa Column, Grid, Flow, Positioner, {declarative/positioners}{Positioners example} + \sa Column, Grid, Flow, Positioner, {qml/positioners}{Positioners example} */ /*! \qmlproperty Transition QtQuick2::Row::add @@ -655,7 +655,7 @@ void QQuickColumn::reportConflictingAnchors() } \endqml - \sa add, {declarative/positioners}{Positioners example} + \sa add, {qml/positioners}{Positioners example} */ /*! \qmlproperty real QtQuick2::Row::spacing @@ -684,7 +684,7 @@ QQuickRow::QQuickRow(QQuickItem *parent) the right anchor remains to the right of the row. \endlist - \sa Grid::layoutDirection, Flow::layoutDirection, {declarative/righttoleft/layoutdirection}{Layout directions example} + \sa Grid::layoutDirection, Flow::layoutDirection, {qml/righttoleft/layoutdirection}{Layout directions example} */ Qt::LayoutDirection QQuickRow::layoutDirection() const @@ -813,7 +813,7 @@ void QQuickRow::reportConflictingAnchors() For example, below is a Grid that contains five rectangles of various sizes: - \snippet doc/src/snippets/declarative/grid/grid.qml document + \snippet doc/src/snippets/qml/grid/grid.qml document The Grid automatically positions the child items in a grid formation: @@ -829,7 +829,7 @@ void QQuickRow::reportConflictingAnchors() \l{Item Layouts}. - \sa Flow, Row, Column, Positioner, {declarative/positioners}{Positioners example} + \sa Flow, Row, Column, Positioner, {qml/positioners}{Positioners example} */ /*! \qmlproperty Transition QtQuick2::Grid::add @@ -868,7 +868,7 @@ void QQuickRow::reportConflictingAnchors() } \endqml - \sa add, {declarative/positioners}{Positioners example} + \sa add, {qml/positioners}{Positioners example} */ /*! \qmlproperty qreal QtQuick2::Grid::spacing @@ -1023,7 +1023,7 @@ void QQuickGrid::setColumnSpacing(const qreal columnSpacing) \l Grid::flow property. \endlist - \sa Flow::layoutDirection, Row::layoutDirection, {declarative/righttoleft/layoutdirection}{Layout directions example} + \sa Flow::layoutDirection, Row::layoutDirection, {qml/righttoleft/layoutdirection}{Layout directions example} */ Qt::LayoutDirection QQuickGrid::layoutDirection() const { @@ -1228,7 +1228,7 @@ void QQuickGrid::reportConflictingAnchors() Below is a Flow that contains various \l Text items: - \snippet doc/src/snippets/declarative/flow.qml flow item + \snippet doc/src/snippets/qml/flow.qml flow item The Flow item automatically positions the child \l Text items side by side, wrapping as necessary: @@ -1244,7 +1244,7 @@ void QQuickGrid::reportConflictingAnchors() For more information on using Flow and other related positioner-type elements, see \l{Item Layouts}. - \sa Column, Row, Grid, Positioner, {declarative/positioners}{Positioners example} + \sa Column, Row, Grid, Positioner, {qml/positioners}{Positioners example} */ /*! \qmlproperty Transition QtQuick2::Flow::add @@ -1284,7 +1284,7 @@ void QQuickGrid::reportConflictingAnchors() } \endqml - \sa add, {declarative/positioners}{Positioners example} + \sa add, {qml/positioners}{Positioners example} */ /*! \qmlproperty real QtQuick2::Flow::spacing @@ -1362,7 +1362,7 @@ void QQuickFlow::setFlow(Flow flow) \l Flow::flow property. \endlist - \sa Grid::layoutDirection, Row::layoutDirection, {declarative/righttoleft/layoutdirection}{Layout directions example} + \sa Grid::layoutDirection, Row::layoutDirection, {qml/righttoleft/layoutdirection}{Layout directions example} */ Qt::LayoutDirection QQuickFlow::layoutDirection() const diff --git a/src/quick/items/qquickpositioners_p.h b/src/quick/items/qquickpositioners_p.h index a4f18cfc21..a2ad572c0e 100644 --- a/src/quick/items/qquickpositioners_p.h +++ b/src/quick/items/qquickpositioners_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,7 +44,7 @@ #include "qquickimplicitsizeitem_p.h" -#include +#include #include #include @@ -92,8 +92,8 @@ class Q_QUICK_PRIVATE_EXPORT QQuickBasePositioner : public QQuickImplicitSizeIte Q_OBJECT Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged) - Q_PROPERTY(QDeclarativeTransition *move READ move WRITE setMove NOTIFY moveChanged) - Q_PROPERTY(QDeclarativeTransition *add READ add WRITE setAdd NOTIFY addChanged) + Q_PROPERTY(QQuickTransition *move READ move WRITE setMove NOTIFY moveChanged) + Q_PROPERTY(QQuickTransition *add READ add WRITE setAdd NOTIFY addChanged) public: enum PositionerType { None = 0x0, Horizontal = 0x1, Vertical = 0x2, Both = 0x3 }; QQuickBasePositioner(PositionerType, QQuickItem *parent); @@ -102,11 +102,11 @@ class Q_QUICK_PRIVATE_EXPORT QQuickBasePositioner : public QQuickImplicitSizeIte qreal spacing() const; void setSpacing(qreal); - QDeclarativeTransition *move() const; - void setMove(QDeclarativeTransition *); + QQuickTransition *move() const; + void setMove(QQuickTransition *); - QDeclarativeTransition *add() const; - void setAdd(QDeclarativeTransition *); + QQuickTransition *add() const; + void setAdd(QQuickTransition *); static QQuickPositionerAttached *qmlAttachedProperties(QObject *obj); diff --git a/src/quick/items/qquickpositioners_p_p.h b/src/quick/items/qquickpositioners_p_p.h index d281f1a372..39ca806b5e 100644 --- a/src/quick/items/qquickpositioners_p_p.h +++ b/src/quick/items/qquickpositioners_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -56,9 +56,9 @@ #include "qquickpositioners_p.h" #include "qquickimplicitsizeitem_p_p.h" -#include -#include -#include +#include +#include +#include #include #include @@ -87,12 +87,12 @@ class QQuickBasePositionerPrivate : public QQuickImplicitSizeItemPrivate, public qreal spacing; QQuickBasePositioner::PositionerType type; - QDeclarativeTransition *moveTransition; - QDeclarativeTransition *addTransition; - QDeclarativeStateOperation::ActionList addActions; - QDeclarativeStateOperation::ActionList moveActions; - QDeclarativeTransitionManager addTransitionManager; - QDeclarativeTransitionManager moveTransitionManager; + QQuickTransition *moveTransition; + QQuickTransition *addTransition; + QQuickStateOperation::ActionList addActions; + QQuickStateOperation::ActionList moveActions; + QQuickTransitionManager addTransitionManager; + QQuickTransitionManager moveTransitionManager; void watchChanges(QQuickItem *other); void unwatchChanges(QQuickItem* other); diff --git a/src/quick/items/qquickrectangle.cpp b/src/quick/items/qquickrectangle.cpp index e2dbf17a29..062df127b3 100644 --- a/src/quick/items/qquickrectangle.cpp +++ b/src/quick/items/qquickrectangle.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -207,7 +207,7 @@ void QQuickGradientStop::updateGradient() with red, blending to yellow at one third of the height of the rectangle, and ending with green: - \snippet doc/src/snippets/declarative/gradient.qml code + \snippet doc/src/snippets/qml/gradient.qml code \clearfloat \section1 Performance and Limitations @@ -248,9 +248,9 @@ QQuickGradient::~QQuickGradient() delete m_gradient; } -QDeclarativeListProperty QQuickGradient::stops() +QQmlListProperty QQuickGradient::stops() { - return QDeclarativeListProperty(this, m_stops); + return QQmlListProperty(this, m_stops); } const QGradient *QQuickGradient::gradient() const @@ -309,7 +309,7 @@ int QQuickRectanglePrivate::doUpdateSlotIdx = -1; The following example shows the effects of some of the common properties on a Rectangle item, which in this case is used to create a square: - \snippet doc/src/snippets/declarative/rectangle/rectangle.qml document + \snippet doc/src/snippets/qml/rectangle/rectangle.qml document \clearfloat \section1 Performance @@ -370,7 +370,7 @@ void QQuickRectangle::doUpdate() \inlineimage rect-border-width.png \enddiv - \snippet doc/src/snippets/declarative/rectangle/rect-border-width.qml 0 + \snippet doc/src/snippets/qml/rectangle/rect-border-width.qml 0 \clearfloat Here, the innermost rectangle's border is clipped on the bottom and right edges by its @@ -394,7 +394,7 @@ QQuickPen *QQuickRectangle::border() \inlineimage declarative-rect_gradient.png \enddiv - \snippet doc/src/snippets/declarative/rectangle/rectangle-gradient.qml rectangles + \snippet doc/src/snippets/qml/rectangle/rectangle-gradient.qml rectangles \clearfloat If both a gradient and a color are specified, the gradient will be used. @@ -463,7 +463,7 @@ void QQuickRectangle::setRadius(qreal radius) The following example shows rectangles with colors specified using hexadecimal and named color notation: - \snippet doc/src/snippets/declarative/rectangle/rectangle-colors.qml rectangles + \snippet doc/src/snippets/qml/rectangle/rectangle-colors.qml rectangles \clearfloat If both a gradient and a color are specified, the gradient will be used. diff --git a/src/quick/items/qquickrectangle_p.h b/src/quick/items/qquickrectangle_p.h index 621e9dd980..eec2b56fd3 100644 --- a/src/quick/items/qquickrectangle_p.h +++ b/src/quick/items/qquickrectangle_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -111,14 +111,14 @@ class Q_AUTOTEST_EXPORT QQuickGradient : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty stops READ stops) + Q_PROPERTY(QQmlListProperty stops READ stops) Q_CLASSINFO("DefaultProperty", "stops") public: QQuickGradient(QObject *parent=0); ~QQuickGradient(); - QDeclarativeListProperty stops(); + QQmlListProperty stops(); const QGradient *gradient() const; diff --git a/src/quick/items/qquickrectangle_p_p.h b/src/quick/items/qquickrectangle_p_p.h index b2f53108a4..cb923ee563 100644 --- a/src/quick/items/qquickrectangle_p_p.h +++ b/src/quick/items/qquickrectangle_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp index 4dcbac772d..d26ebed85e 100644 --- a/src/quick/items/qquickrepeater.cpp +++ b/src/quick/items/qquickrepeater.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,10 +43,10 @@ #include "qquickrepeater_p_p.h" #include "qquickvisualdatamodel_p.h" -#include -#include +#include +#include #include -#include +#include QT_BEGIN_NAMESPACE @@ -79,9 +79,9 @@ QQuickRepeaterPrivate::~QQuickRepeaterPrivate() The following Repeater creates three instances of a \l Rectangle item within a \l Row: - \snippet doc/src/snippets/declarative/repeaters/repeater.qml import + \snippet doc/src/snippets/qml/repeaters/repeater.qml import \codeline - \snippet doc/src/snippets/declarative/repeaters/repeater.qml simple + \snippet doc/src/snippets/qml/repeaters/repeater.qml simple \image repeater-simple.png @@ -96,7 +96,7 @@ QQuickRepeaterPrivate::~QQuickRepeaterPrivate() a Repeater to be used inside a layout. For example, the following Repeater's items are stacked between a red rectangle and a blue rectangle: - \snippet doc/src/snippets/declarative/repeaters/repeater.qml layout + \snippet doc/src/snippets/qml/repeaters/repeater.qml layout \image repeater.png @@ -186,8 +186,8 @@ void QQuickRepeater::setModel(const QVariant &model) clear(); if (d->model) { - disconnect(d->model, SIGNAL(modelUpdated(QDeclarativeChangeSet,bool)), - this, SLOT(modelUpdated(QDeclarativeChangeSet,bool))); + disconnect(d->model, SIGNAL(modelUpdated(QQuickChangeSet,bool)), + this, SLOT(modelUpdated(QQuickChangeSet,bool))); disconnect(d->model, SIGNAL(createdItem(int,QQuickItem*)), this, SLOT(createdItem(int,QQuickItem*))); disconnect(d->model, SIGNAL(initItem(int,QQuickItem*)), this, SLOT(initItem(int,QQuickItem*))); // disconnect(d->model, SIGNAL(destroyingItem(QQuickItem*)), this, SLOT(destroyingItem(QQuickItem*))); @@ -212,8 +212,8 @@ void QQuickRepeater::setModel(const QVariant &model) dataModel->setModel(model); } if (d->model) { - connect(d->model, SIGNAL(modelUpdated(QDeclarativeChangeSet,bool)), - this, SLOT(modelUpdated(QDeclarativeChangeSet,bool))); + connect(d->model, SIGNAL(modelUpdated(QQuickChangeSet,bool)), + this, SLOT(modelUpdated(QQuickChangeSet,bool))); connect(d->model, SIGNAL(createdItem(int,QQuickItem*)), this, SLOT(createdItem(int,QQuickItem*))); connect(d->model, SIGNAL(initItem(int,QQuickItem*)), this, SLOT(initItem(int,QQuickItem*))); // connect(d->model, SIGNAL(destroyingItem(QQuickItem*)), this, SLOT(destroyingItem(QQuickItem*))); @@ -235,7 +235,7 @@ void QQuickRepeater::setModel(const QVariant &model) \table \row - \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml index + \o \snippet doc/src/snippets/qml/repeaters/repeater.qml index \o \image repeater-index.png \endtable @@ -246,7 +246,7 @@ void QQuickRepeater::setModel(const QVariant &model) \table \row - \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml modeldata + \o \snippet doc/src/snippets/qml/repeaters/repeater.qml modeldata \o \image repeater-modeldata.png \endtable @@ -256,7 +256,7 @@ void QQuickRepeater::setModel(const QVariant &model) \sa {QML Data Models} */ -QDeclarativeComponent *QQuickRepeater::delegate() const +QQmlComponent *QQuickRepeater::delegate() const { Q_D(const QQuickRepeater); if (d->model) { @@ -267,7 +267,7 @@ QDeclarativeComponent *QQuickRepeater::delegate() const return 0; } -void QQuickRepeater::setDelegate(QDeclarativeComponent *delegate) +void QQuickRepeater::setDelegate(QQmlComponent *delegate) { Q_D(QQuickRepeater); if (QQuickVisualDataModel *dataModel = qobject_cast(d->model)) @@ -379,7 +379,7 @@ void QQuickRepeaterPrivate::createItems() break; } deletables[ii] = item; - QDeclarative_setParent_noEvent(item, q->parentItem()); + QQml_setParent_noEvent(item, q->parentItem()); item->setParentItem(q->parentItem()); if (ii > 0 && deletables.at(ii-1)) { item->stackAfter(deletables.at(ii-1)); @@ -408,11 +408,11 @@ void QQuickRepeater::createdItem(int, QQuickItem *) void QQuickRepeater::initItem(int, QQuickItem *item) { - QDeclarative_setParent_noEvent(item, parentItem()); + QQml_setParent_noEvent(item, parentItem()); item->setParentItem(parentItem()); } -void QQuickRepeater::modelUpdated(const QDeclarativeChangeSet &changeSet, bool reset) +void QQuickRepeater::modelUpdated(const QQuickChangeSet &changeSet, bool reset) { Q_D(QQuickRepeater); @@ -426,7 +426,7 @@ void QQuickRepeater::modelUpdated(const QDeclarativeChangeSet &changeSet, bool r int difference = 0; QHash > > moved; - foreach (const QDeclarativeChangeSet::Remove &remove, changeSet.removes()) { + foreach (const QQuickChangeSet::Remove &remove, changeSet.removes()) { int index = qMin(remove.index, d->deletables.count()); int count = qMin(remove.index + remove.count, d->deletables.count()) - index; if (remove.isMove()) { @@ -447,7 +447,7 @@ void QQuickRepeater::modelUpdated(const QDeclarativeChangeSet &changeSet, bool r } d->createFrom = -1; - foreach (const QDeclarativeChangeSet::Insert &insert, changeSet.inserts()) { + foreach (const QQuickChangeSet::Insert &insert, changeSet.inserts()) { int index = qMin(insert.index, d->deletables.count()); if (insert.isMove()) { QVector > items = moved.value(insert.moveId); diff --git a/src/quick/items/qquickrepeater_p.h b/src/quick/items/qquickrepeater_p.h index f23b1a3034..c67b065def 100644 --- a/src/quick/items/qquickrepeater_p.h +++ b/src/quick/items/qquickrepeater_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -48,7 +48,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeChangeSet; +class QQuickChangeSet; class QQuickRepeaterPrivate; class Q_AUTOTEST_EXPORT QQuickRepeater : public QQuickItem @@ -56,7 +56,7 @@ class Q_AUTOTEST_EXPORT QQuickRepeater : public QQuickItem Q_OBJECT Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged) - Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) Q_PROPERTY(int count READ count NOTIFY countChanged) Q_CLASSINFO("DefaultProperty", "delegate") @@ -67,8 +67,8 @@ class Q_AUTOTEST_EXPORT QQuickRepeater : public QQuickItem QVariant model() const; void setModel(const QVariant &); - QDeclarativeComponent *delegate() const; - void setDelegate(QDeclarativeComponent *); + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *); int count() const; @@ -93,7 +93,7 @@ class Q_AUTOTEST_EXPORT QQuickRepeater : public QQuickItem private Q_SLOTS: void createdItem(int index, QQuickItem *item); void initItem(int, QQuickItem *item); - void modelUpdated(const QDeclarativeChangeSet &changeSet, bool reset); + void modelUpdated(const QQuickChangeSet &changeSet, bool reset); private: Q_DISABLE_COPY(QQuickRepeater) diff --git a/src/quick/items/qquickrepeater_p_p.h b/src/quick/items/qquickrepeater_p_p.h index 761e00c7b0..88e0c94218 100644 --- a/src/quick/items/qquickrepeater_p_p.h +++ b/src/quick/items/qquickrepeater_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE -class QDeclarativeContext; +class QQmlContext; class QQuickVisualModel; class QQuickRepeaterPrivate : public QQuickItemPrivate { diff --git a/src/quick/items/qquickscalegrid.cpp b/src/quick/items/qquickscalegrid.cpp index c9b1d3eba7..de10d8de47 100644 --- a/src/quick/items/qquickscalegrid.cpp +++ b/src/quick/items/qquickscalegrid.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -41,7 +41,7 @@ #include "qquickscalegrid_p_p.h" -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/quick/items/qquickscalegrid_p_p.h b/src/quick/items/qquickscalegrid_p_p.h index 9d02b6afb3..ae5627a48e 100644 --- a/src/quick/items/qquickscalegrid_p_p.h +++ b/src/quick/items/qquickscalegrid_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,10 +44,10 @@ #include "qquickborderimage_p.h" -#include +#include #include -#include +#include #include QT_BEGIN_HEADER diff --git a/src/quick/items/qquickscreen.cpp b/src/quick/items/qquickscreen.cpp index 3dfeb90ee0..a00df4600d 100644 --- a/src/quick/items/qquickscreen.cpp +++ b/src/quick/items/qquickscreen.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickscreen_p.h b/src/quick/items/qquickscreen_p.h index 7e2c389d6c..1a501f2f0f 100644 --- a/src/quick/items/qquickscreen_p.h +++ b/src/quick/items/qquickscreen_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,10 +42,10 @@ #ifndef QQUICKSCREEN_P_H #define QQUICKSCREEN_P_H -#include +#include #include #include -#include +#include QT_BEGIN_HEADER diff --git a/src/quick/items/qquickshadereffect.cpp b/src/quick/items/qquickshadereffect.cpp index d90d8761c8..3024c31d51 100644 --- a/src/quick/items/qquickshadereffect.cpp +++ b/src/quick/items/qquickshadereffect.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickshadereffect_p.h b/src/quick/items/qquickshadereffect_p.h index 2217cbc827..4475c22b28 100644 --- a/src/quick/items/qquickshadereffect_p.h +++ b/src/quick/items/qquickshadereffect_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickshadereffectmesh.cpp b/src/quick/items/qquickshadereffectmesh.cpp index 8a43fb55f0..eff5910a09 100644 --- a/src/quick/items/qquickshadereffectmesh.cpp +++ b/src/quick/items/qquickshadereffectmesh.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickshadereffectmesh_p.h b/src/quick/items/qquickshadereffectmesh_p.h index 2e57d7db4c..0d8f5a24d0 100644 --- a/src/quick/items/qquickshadereffectmesh_p.h +++ b/src/quick/items/qquickshadereffectmesh_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativeparserstatus.h" +#include "qqmlparserstatus.h" #include #include diff --git a/src/quick/items/qquickshadereffectnode.cpp b/src/quick/items/qquickshadereffectnode.cpp index c809c70612..ae61ad940d 100644 --- a/src/quick/items/qquickshadereffectnode.cpp +++ b/src/quick/items/qquickshadereffectnode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickshadereffectnode_p.h b/src/quick/items/qquickshadereffectnode_p.h index 295ac61d94..fc47f626e1 100644 --- a/src/quick/items/qquickshadereffectnode_p.h +++ b/src/quick/items/qquickshadereffectnode_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickshadereffectsource.cpp b/src/quick/items/qquickshadereffectsource.cpp index 54590292c5..708d75d137 100644 --- a/src/quick/items/qquickshadereffectsource.cpp +++ b/src/quick/items/qquickshadereffectsource.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickshadereffectsource_p.h b/src/quick/items/qquickshadereffectsource_p.h index 55d72c18d9..793e89cd69 100644 --- a/src/quick/items/qquickshadereffectsource_p.h +++ b/src/quick/items/qquickshadereffectsource_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquicksprite.cpp b/src/quick/items/qquicksprite.cpp index 4de7880916..817a6b411a 100644 --- a/src/quick/items/qquicksprite.cpp +++ b/src/quick/items/qquicksprite.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qquicksprite_p.h" -#include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/quick/items/qquicksprite_p.h b/src/quick/items/qquicksprite_p.h index 4c5e5ff58e..7c5c20bb50 100644 --- a/src/quick/items/qquicksprite_p.h +++ b/src/quick/items/qquicksprite_p.h @@ -45,8 +45,8 @@ #include #include #include -#include -#include +#include +#include #include "qquickspriteengine_p.h" QT_BEGIN_HEADER @@ -298,7 +298,7 @@ private slots: int m_frameDuration; int m_frameDurationVariation; bool m_frameSync; - QDeclarativePixmap m_pix; + QQuickPixmap m_pix; }; QT_END_NAMESPACE diff --git a/src/quick/items/qquickspriteengine.cpp b/src/quick/items/qquickspriteengine.cpp index c19a5e65c9..5a78472b45 100644 --- a/src/quick/items/qquickspriteengine.cpp +++ b/src/quick/items/qquickspriteengine.cpp @@ -41,8 +41,8 @@ #include "qquickspriteengine_p.h" #include "qquicksprite_p.h" -#include -#include +#include +#include #include #include #include @@ -307,27 +307,27 @@ void QQuickStochasticEngine::setGoal(int state, int sprite, bool jump) return; } -QDeclarativePixmap::Status QQuickSpriteEngine::status()//Composed status of all Sprites +QQuickPixmap::Status QQuickSpriteEngine::status()//Composed status of all Sprites { if (!m_startedImageAssembly) - return QDeclarativePixmap::Null; + return QQuickPixmap::Null; int null, loading, ready; null = loading = ready = 0; foreach (QQuickSprite* s, m_sprites) { switch (s->m_pix.status()) { - case QDeclarativePixmap::Null : null++; break; - case QDeclarativePixmap::Loading : loading++; break; - case QDeclarativePixmap::Error : return QDeclarativePixmap::Error; - case QDeclarativePixmap::Ready : ready++; break; + case QQuickPixmap::Null : null++; break; + case QQuickPixmap::Loading : loading++; break; + case QQuickPixmap::Error : return QQuickPixmap::Error; + case QQuickPixmap::Ready : ready++; break; } } if (null) - return QDeclarativePixmap::Null; + return QQuickPixmap::Null; if (loading) - return QDeclarativePixmap::Loading; + return QQuickPixmap::Loading; if (ready) - return QDeclarativePixmap::Ready; - return QDeclarativePixmap::Null; + return QQuickPixmap::Ready; + return QQuickPixmap::Null; } void QQuickSpriteEngine::startAssemblingImage() @@ -348,13 +348,13 @@ void QQuickSpriteEngine::startAssemblingImage() QImage QQuickSpriteEngine::assembledImage() { - QDeclarativePixmap::Status stat = status(); - if (stat == QDeclarativePixmap::Error) + QQuickPixmap::Status stat = status(); + if (stat == QQuickPixmap::Error) foreach (QQuickSprite* s, m_sprites) if (s->m_pix.isError()) qmlInfo(s) << s->m_pix.error(); - if (stat != QDeclarativePixmap::Ready) + if (stat != QQuickPixmap::Ready) return QImage(); int h = 0; diff --git a/src/quick/items/qquickspriteengine_p.h b/src/quick/items/qquickspriteengine_p.h index 500d526da5..751b75f231 100644 --- a/src/quick/items/qquickspriteengine_p.h +++ b/src/quick/items/qquickspriteengine_p.h @@ -47,10 +47,10 @@ #include #include #include -#include +#include #include #include -#include +#include QT_BEGIN_HEADER @@ -178,15 +178,15 @@ class Q_AUTOTEST_EXPORT QQuickStochasticEngine : public QObject Q_OBJECT //TODO: Optimize single state case? Q_PROPERTY(QString globalGoal READ globalGoal WRITE setGlobalGoal NOTIFY globalGoalChanged) - Q_PROPERTY(QDeclarativeListProperty states READ states) + Q_PROPERTY(QQmlListProperty states READ states) public: explicit QQuickStochasticEngine(QObject *parent = 0); QQuickStochasticEngine(QList states, QObject *parent=0); ~QQuickStochasticEngine(); - QDeclarativeListProperty states() + QQmlListProperty states() { - return QDeclarativeListProperty(this, m_states); + return QQmlListProperty(this, m_states); } QString globalGoal() const @@ -255,14 +255,14 @@ public slots: class QQuickSpriteEngine : public QQuickStochasticEngine { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty sprites READ sprites) + Q_PROPERTY(QQmlListProperty sprites READ sprites) public: explicit QQuickSpriteEngine(QObject *parent = 0); QQuickSpriteEngine(QList sprites, QObject *parent=0); ~QQuickSpriteEngine(); - QDeclarativeListProperty sprites() + QQmlListProperty sprites() { - return QDeclarativeListProperty(this, m_sprites); + return QQmlListProperty(this, m_sprites); } QQuickSprite* sprite(int sprite=0); @@ -280,12 +280,12 @@ class QQuickSpriteEngine : public QQuickStochasticEngine virtual void restart(int index=0); virtual void advance(int index=0); - //Similar API to QDeclarativePixmap for async loading convenience - bool isNull() { return status() == QDeclarativePixmap::Null; } - bool isReady() { return status() == QDeclarativePixmap::Ready; } - bool isLoading() { return status() == QDeclarativePixmap::Loading; } - bool isError() { return status() == QDeclarativePixmap::Error; } - QDeclarativePixmap::Status status();//Composed status of all Sprites + //Similar API to QQuickPixmap for async loading convenience + bool isNull() { return status() == QQuickPixmap::Null; } + bool isReady() { return status() == QQuickPixmap::Ready; } + bool isLoading() { return status() == QQuickPixmap::Loading; } + bool isError() { return status() == QQuickPixmap::Error; } + QQuickPixmap::Status status();//Composed status of all Sprites void startAssemblingImage(); QImage assembledImage(); @@ -296,24 +296,24 @@ class QQuickSpriteEngine : public QQuickStochasticEngine }; //Common use is to have your own list property which is transparently an engine -inline void spriteAppend(QDeclarativeListProperty *p, QQuickSprite* s) +inline void spriteAppend(QQmlListProperty *p, QQuickSprite* s) { reinterpret_cast *>(p->data)->append(s); p->object->metaObject()->invokeMethod(p->object, "createEngine"); } -inline QQuickSprite* spriteAt(QDeclarativeListProperty *p, int idx) +inline QQuickSprite* spriteAt(QQmlListProperty *p, int idx) { return reinterpret_cast *>(p->data)->at(idx); } -inline void spriteClear(QDeclarativeListProperty *p) +inline void spriteClear(QQmlListProperty *p) { reinterpret_cast *>(p->data)->clear(); p->object->metaObject()->invokeMethod(p->object, "createEngine"); } -inline int spriteCount(QDeclarativeListProperty *p) +inline int spriteCount(QQmlListProperty *p) { return reinterpret_cast *>(p->data)->count(); } diff --git a/src/quick/items/qquickspriteimage.cpp b/src/quick/items/qquickspriteimage.cpp index 1b3b57710a..6edb3ad8c3 100644 --- a/src/quick/items/qquickspriteimage.cpp +++ b/src/quick/items/qquickspriteimage.cpp @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include #include @@ -294,9 +294,9 @@ void QQuickSpriteImage::setGoalSprite(const QString &sprite) } } -QDeclarativeListProperty QQuickSpriteImage::sprites() +QQmlListProperty QQuickSpriteImage::sprites() { - return QDeclarativeListProperty(this, &m_sprites, spriteAppend, spriteCount, spriteAt, spriteClear); + return QQmlListProperty(this, &m_sprites, spriteAppend, spriteCount, spriteAt, spriteClear); } void QQuickSpriteImage::createEngine() @@ -327,11 +327,11 @@ QSGGeometryNode* QQuickSpriteImage::buildNode() if (!m_spriteEngine) { qmlInfo(this) << "No sprite engine..."; return 0; - } else if (m_spriteEngine->status() == QDeclarativePixmap::Null) { + } else if (m_spriteEngine->status() == QQuickPixmap::Null) { m_spriteEngine->startAssemblingImage(); update();//Schedule another update, where we will check again return 0; - } else if (m_spriteEngine->status() == QDeclarativePixmap::Loading) { + } else if (m_spriteEngine->status() == QQuickPixmap::Loading) { update();//Schedule another update, where we will check again return 0; } diff --git a/src/quick/items/qquickspriteimage_p.h b/src/quick/items/qquickspriteimage_p.h index 8017263bb1..1574afcb75 100644 --- a/src/quick/items/qquickspriteimage_p.h +++ b/src/quick/items/qquickspriteimage_p.h @@ -62,13 +62,13 @@ class Q_AUTOTEST_EXPORT QQuickSpriteImage : public QQuickItem Q_PROPERTY(QString goalSprite READ goalSprite WRITE setGoalSprite NOTIFY goalSpriteChanged) Q_PROPERTY(QString currentSprite READ currentSprite NOTIFY currentSpriteChanged) //###try to share similar spriteEngines for less overhead? - Q_PROPERTY(QDeclarativeListProperty sprites READ sprites) + Q_PROPERTY(QQmlListProperty sprites READ sprites) Q_CLASSINFO("DefaultProperty", "sprites") public: explicit QQuickSpriteImage(QQuickItem *parent = 0); - QDeclarativeListProperty sprites(); + QQmlListProperty sprites(); bool running() const { diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp index c4dd0fd146..037a48ceed 100644 --- a/src/quick/items/qquickstateoperations.cpp +++ b/src/quick/items/qquickstateoperations.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,14 +42,14 @@ #include "qquickstateoperations_p.h" #include "qquickitem_p.h" -#include +#include -#include +#include #include QT_BEGIN_NAMESPACE -class QQuickParentChangePrivate : public QDeclarativeStateOperationPrivate +class QQuickParentChangePrivate : public QQuickStateOperationPrivate { Q_DECLARE_PUBLIC(QQuickParentChange) public: @@ -57,18 +57,18 @@ class QQuickParentChangePrivate : public QDeclarativeStateOperationPrivate rewindParent(0), rewindStackBefore(0) {} QQuickItem *target; - QDeclarativeGuard parent; - QDeclarativeGuard origParent; - QDeclarativeGuard origStackBefore; + QQmlGuard parent; + QQmlGuard origParent; + QQmlGuard origStackBefore; QQuickItem *rewindParent; QQuickItem *rewindStackBefore; - QDeclarativeNullableValue xString; - QDeclarativeNullableValue yString; - QDeclarativeNullableValue widthString; - QDeclarativeNullableValue heightString; - QDeclarativeNullableValue scaleString; - QDeclarativeNullableValue rotationString; + QQmlNullableValue xString; + QQmlNullableValue yString; + QQmlNullableValue widthString; + QQmlNullableValue heightString; + QQmlNullableValue scaleString; + QQmlNullableValue rotationString; void doChange(QQuickItem *targetParent, QQuickItem *stackBefore = 0); }; @@ -148,7 +148,7 @@ void QQuickParentChangePrivate::doChange(QQuickItem *targetParent, QQuickItem *s } QQuickParentChange::QQuickParentChange(QObject *parent) - : QDeclarativeStateOperation(*(new QQuickParentChangePrivate), parent) + : QQuickStateOperation(*(new QQuickParentChangePrivate), parent) { } @@ -156,13 +156,13 @@ QQuickParentChange::~QQuickParentChange() { } -QDeclarativeScriptString QQuickParentChange::x() const +QQmlScriptString QQuickParentChange::x() const { Q_D(const QQuickParentChange); return d->xString.value; } -void QQuickParentChange::setX(QDeclarativeScriptString x) +void QQuickParentChange::setX(QQmlScriptString x) { Q_D(QQuickParentChange); d->xString = x; @@ -174,13 +174,13 @@ bool QQuickParentChange::xIsSet() const return d->xString.isValid(); } -QDeclarativeScriptString QQuickParentChange::y() const +QQmlScriptString QQuickParentChange::y() const { Q_D(const QQuickParentChange); return d->yString.value; } -void QQuickParentChange::setY(QDeclarativeScriptString y) +void QQuickParentChange::setY(QQmlScriptString y) { Q_D(QQuickParentChange); d->yString = y; @@ -192,13 +192,13 @@ bool QQuickParentChange::yIsSet() const return d->yString.isValid(); } -QDeclarativeScriptString QQuickParentChange::width() const +QQmlScriptString QQuickParentChange::width() const { Q_D(const QQuickParentChange); return d->widthString.value; } -void QQuickParentChange::setWidth(QDeclarativeScriptString width) +void QQuickParentChange::setWidth(QQmlScriptString width) { Q_D(QQuickParentChange); d->widthString = width; @@ -210,13 +210,13 @@ bool QQuickParentChange::widthIsSet() const return d->widthString.isValid(); } -QDeclarativeScriptString QQuickParentChange::height() const +QQmlScriptString QQuickParentChange::height() const { Q_D(const QQuickParentChange); return d->heightString.value; } -void QQuickParentChange::setHeight(QDeclarativeScriptString height) +void QQuickParentChange::setHeight(QQmlScriptString height) { Q_D(QQuickParentChange); d->heightString = height; @@ -228,13 +228,13 @@ bool QQuickParentChange::heightIsSet() const return d->heightString.isValid(); } -QDeclarativeScriptString QQuickParentChange::scale() const +QQmlScriptString QQuickParentChange::scale() const { Q_D(const QQuickParentChange); return d->scaleString.value; } -void QQuickParentChange::setScale(QDeclarativeScriptString scale) +void QQuickParentChange::setScale(QQmlScriptString scale) { Q_D(QQuickParentChange); d->scaleString = scale; @@ -246,13 +246,13 @@ bool QQuickParentChange::scaleIsSet() const return d->scaleString.isValid(); } -QDeclarativeScriptString QQuickParentChange::rotation() const +QQmlScriptString QQuickParentChange::rotation() const { Q_D(const QQuickParentChange); return d->rotationString.value; } -void QQuickParentChange::setRotation(QDeclarativeScriptString rotation) +void QQuickParentChange::setRotation(QQmlScriptString rotation) { Q_D(QQuickParentChange); d->rotationString = rotation; @@ -294,7 +294,7 @@ void QQuickParentChange::setParent(QQuickItem *parent) d->parent = parent; } -QDeclarativeStateOperation::ActionList QQuickParentChange::actions() +QQuickStateOperation::ActionList QQuickParentChange::actions() { Q_D(QQuickParentChange); if (!d->target || !d->parent) @@ -302,7 +302,7 @@ QDeclarativeStateOperation::ActionList QQuickParentChange::actions() ActionList actions; - QDeclarativeAction a; + QQuickAction a; a.event = this; actions << a; @@ -311,13 +311,13 @@ QDeclarativeStateOperation::ActionList QQuickParentChange::actions() QString script = d->xString.value.script(); qreal x = script.toFloat(&ok); if (ok) { - QDeclarativeAction xa(d->target, QLatin1String("x"), x); + QQuickAction xa(d->target, QLatin1String("x"), x); actions << xa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - QDeclarativeProperty property(d->target, QLatin1String("x")); + QQmlBinding *newBinding = new QQmlBinding(script, d->target, qmlContext(this)); + QQmlProperty property(d->target, QLatin1String("x")); newBinding->setTarget(property); - QDeclarativeAction xa; + QQuickAction xa; xa.property = property; xa.toBinding = newBinding; xa.fromValue = xa.property.read(); @@ -331,13 +331,13 @@ QDeclarativeStateOperation::ActionList QQuickParentChange::actions() QString script = d->yString.value.script(); qreal y = script.toFloat(&ok); if (ok) { - QDeclarativeAction ya(d->target, QLatin1String("y"), y); + QQuickAction ya(d->target, QLatin1String("y"), y); actions << ya; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - QDeclarativeProperty property(d->target, QLatin1String("y")); + QQmlBinding *newBinding = new QQmlBinding(script, d->target, qmlContext(this)); + QQmlProperty property(d->target, QLatin1String("y")); newBinding->setTarget(property); - QDeclarativeAction ya; + QQuickAction ya; ya.property = property; ya.toBinding = newBinding; ya.fromValue = ya.property.read(); @@ -351,13 +351,13 @@ QDeclarativeStateOperation::ActionList QQuickParentChange::actions() QString script = d->scaleString.value.script(); qreal scale = script.toFloat(&ok); if (ok) { - QDeclarativeAction sa(d->target, QLatin1String("scale"), scale); + QQuickAction sa(d->target, QLatin1String("scale"), scale); actions << sa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - QDeclarativeProperty property(d->target, QLatin1String("scale")); + QQmlBinding *newBinding = new QQmlBinding(script, d->target, qmlContext(this)); + QQmlProperty property(d->target, QLatin1String("scale")); newBinding->setTarget(property); - QDeclarativeAction sa; + QQuickAction sa; sa.property = property; sa.toBinding = newBinding; sa.fromValue = sa.property.read(); @@ -371,13 +371,13 @@ QDeclarativeStateOperation::ActionList QQuickParentChange::actions() QString script = d->rotationString.value.script(); qreal rotation = script.toFloat(&ok); if (ok) { - QDeclarativeAction ra(d->target, QLatin1String("rotation"), rotation); + QQuickAction ra(d->target, QLatin1String("rotation"), rotation); actions << ra; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - QDeclarativeProperty property(d->target, QLatin1String("rotation")); + QQmlBinding *newBinding = new QQmlBinding(script, d->target, qmlContext(this)); + QQmlProperty property(d->target, QLatin1String("rotation")); newBinding->setTarget(property); - QDeclarativeAction ra; + QQuickAction ra; ra.property = property; ra.toBinding = newBinding; ra.fromValue = ra.property.read(); @@ -391,13 +391,13 @@ QDeclarativeStateOperation::ActionList QQuickParentChange::actions() QString script = d->widthString.value.script(); qreal width = script.toFloat(&ok); if (ok) { - QDeclarativeAction wa(d->target, QLatin1String("width"), width); + QQuickAction wa(d->target, QLatin1String("width"), width); actions << wa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - QDeclarativeProperty property(d->target, QLatin1String("width")); + QQmlBinding *newBinding = new QQmlBinding(script, d->target, qmlContext(this)); + QQmlProperty property(d->target, QLatin1String("width")); newBinding->setTarget(property); - QDeclarativeAction wa; + QQuickAction wa; wa.property = property; wa.toBinding = newBinding; wa.fromValue = wa.property.read(); @@ -411,13 +411,13 @@ QDeclarativeStateOperation::ActionList QQuickParentChange::actions() QString script = d->heightString.value.script(); qreal height = script.toFloat(&ok); if (ok) { - QDeclarativeAction ha(d->target, QLatin1String("height"), height); + QQuickAction ha(d->target, QLatin1String("height"), height); actions << ha; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - QDeclarativeProperty property(d->target, QLatin1String("height")); + QQmlBinding *newBinding = new QQmlBinding(script, d->target, qmlContext(this)); + QQmlProperty property(d->target, QLatin1String("height")); newBinding->setTarget(property); - QDeclarativeAction ha; + QQuickAction ha; ha.property = property; ha.toBinding = newBinding; ha.fromValue = ha.property.read(); @@ -437,7 +437,7 @@ void QQuickParentChange::saveOriginals() d->origStackBefore = d->rewindStackBefore; } -/*void QQuickParentChange::copyOriginals(QDeclarativeActionEvent *other) +/*void QQuickParentChange::copyOriginals(QQuickActionEvent *other) { Q_D(QQuickParentChange); QQuickParentChange *pc = static_cast(other); @@ -465,12 +465,12 @@ void QQuickParentChange::reverse(Reason) d->doChange(d->origParent, d->origStackBefore); } -QDeclarativeActionEvent::EventType QQuickParentChange::type() const +QQuickActionEvent::EventType QQuickParentChange::type() const { return ParentChange; } -bool QQuickParentChange::override(QDeclarativeActionEvent*other) +bool QQuickParentChange::override(QQuickActionEvent*other) { Q_D(QQuickParentChange); if (other->type() != ParentChange) @@ -527,13 +527,13 @@ class QQuickAnchorSetPrivate : public QObjectPrivate QQuickItem *fill; QQuickItem *centerIn; - QDeclarativeScriptString leftScript; - QDeclarativeScriptString rightScript; - QDeclarativeScriptString topScript; - QDeclarativeScriptString bottomScript; - QDeclarativeScriptString hCenterScript; - QDeclarativeScriptString vCenterScript; - QDeclarativeScriptString baselineScript; + QQmlScriptString leftScript; + QQmlScriptString rightScript; + QQmlScriptString topScript; + QQmlScriptString bottomScript; + QQmlScriptString hCenterScript; + QQmlScriptString vCenterScript; + QQmlScriptString baselineScript; /*qreal leftMargin; qreal rightMargin; @@ -554,13 +554,13 @@ QQuickAnchorSet::~QQuickAnchorSet() { } -QDeclarativeScriptString QQuickAnchorSet::top() const +QQmlScriptString QQuickAnchorSet::top() const { Q_D(const QQuickAnchorSet); return d->topScript; } -void QQuickAnchorSet::setTop(const QDeclarativeScriptString &edge) +void QQuickAnchorSet::setTop(const QQmlScriptString &edge) { Q_D(QQuickAnchorSet); d->usedAnchors |= QQuickAnchors::TopAnchor; @@ -576,13 +576,13 @@ void QQuickAnchorSet::resetTop() d->resetAnchors |= QQuickAnchors::TopAnchor; } -QDeclarativeScriptString QQuickAnchorSet::bottom() const +QQmlScriptString QQuickAnchorSet::bottom() const { Q_D(const QQuickAnchorSet); return d->bottomScript; } -void QQuickAnchorSet::setBottom(const QDeclarativeScriptString &edge) +void QQuickAnchorSet::setBottom(const QQmlScriptString &edge) { Q_D(QQuickAnchorSet); d->usedAnchors |= QQuickAnchors::BottomAnchor; @@ -598,13 +598,13 @@ void QQuickAnchorSet::resetBottom() d->resetAnchors |= QQuickAnchors::BottomAnchor; } -QDeclarativeScriptString QQuickAnchorSet::verticalCenter() const +QQmlScriptString QQuickAnchorSet::verticalCenter() const { Q_D(const QQuickAnchorSet); return d->vCenterScript; } -void QQuickAnchorSet::setVerticalCenter(const QDeclarativeScriptString &edge) +void QQuickAnchorSet::setVerticalCenter(const QQmlScriptString &edge) { Q_D(QQuickAnchorSet); d->usedAnchors |= QQuickAnchors::VCenterAnchor; @@ -620,13 +620,13 @@ void QQuickAnchorSet::resetVerticalCenter() d->resetAnchors |= QQuickAnchors::VCenterAnchor; } -QDeclarativeScriptString QQuickAnchorSet::baseline() const +QQmlScriptString QQuickAnchorSet::baseline() const { Q_D(const QQuickAnchorSet); return d->baselineScript; } -void QQuickAnchorSet::setBaseline(const QDeclarativeScriptString &edge) +void QQuickAnchorSet::setBaseline(const QQmlScriptString &edge) { Q_D(QQuickAnchorSet); d->usedAnchors |= QQuickAnchors::BaselineAnchor; @@ -642,13 +642,13 @@ void QQuickAnchorSet::resetBaseline() d->resetAnchors |= QQuickAnchors::BaselineAnchor; } -QDeclarativeScriptString QQuickAnchorSet::left() const +QQmlScriptString QQuickAnchorSet::left() const { Q_D(const QQuickAnchorSet); return d->leftScript; } -void QQuickAnchorSet::setLeft(const QDeclarativeScriptString &edge) +void QQuickAnchorSet::setLeft(const QQmlScriptString &edge) { Q_D(QQuickAnchorSet); d->usedAnchors |= QQuickAnchors::LeftAnchor; @@ -664,13 +664,13 @@ void QQuickAnchorSet::resetLeft() d->resetAnchors |= QQuickAnchors::LeftAnchor; } -QDeclarativeScriptString QQuickAnchorSet::right() const +QQmlScriptString QQuickAnchorSet::right() const { Q_D(const QQuickAnchorSet); return d->rightScript; } -void QQuickAnchorSet::setRight(const QDeclarativeScriptString &edge) +void QQuickAnchorSet::setRight(const QQmlScriptString &edge) { Q_D(QQuickAnchorSet); d->usedAnchors |= QQuickAnchors::RightAnchor; @@ -686,13 +686,13 @@ void QQuickAnchorSet::resetRight() d->resetAnchors |= QQuickAnchors::RightAnchor; } -QDeclarativeScriptString QQuickAnchorSet::horizontalCenter() const +QQmlScriptString QQuickAnchorSet::horizontalCenter() const { Q_D(const QQuickAnchorSet); return d->hCenterScript; } -void QQuickAnchorSet::setHorizontalCenter(const QDeclarativeScriptString &edge) +void QQuickAnchorSet::setHorizontalCenter(const QQmlScriptString &edge) { Q_D(QQuickAnchorSet); d->usedAnchors |= QQuickAnchors::HCenterAnchor; @@ -743,7 +743,7 @@ void QQuickAnchorSet::resetCenterIn() } -class QQuickAnchorChangesPrivate : public QDeclarativeStateOperationPrivate +class QQuickAnchorChangesPrivate : public QQuickStateOperationPrivate { public: QQuickAnchorChangesPrivate() @@ -761,21 +761,21 @@ class QQuickAnchorChangesPrivate : public QDeclarativeStateOperationPrivate QQuickItem *target; QQuickAnchorSet *anchorSet; - 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; + QQmlBinding *leftBinding; + QQmlBinding *rightBinding; + QQmlBinding *hCenterBinding; + QQmlBinding *topBinding; + QQmlBinding *bottomBinding; + QQmlBinding *vCenterBinding; + QQmlBinding *baselineBinding; + + QQmlAbstractBinding *origLeftBinding; + QQmlAbstractBinding *origRightBinding; + QQmlAbstractBinding *origHCenterBinding; + QQmlAbstractBinding *origTopBinding; + QQmlAbstractBinding *origBottomBinding; + QQmlAbstractBinding *origVCenterBinding; + QQmlAbstractBinding *origBaselineBinding; QQuickAnchorLine rewindLeft; QQuickAnchorLine rewindRight; @@ -808,24 +808,24 @@ class QQuickAnchorChangesPrivate : public QDeclarativeStateOperationPrivate bool applyOrigVCenter; bool applyOrigBaseline; - QDeclarativeNullableValue origWidth; - QDeclarativeNullableValue origHeight; + QQmlNullableValue origWidth; + QQmlNullableValue origHeight; qreal origX; qreal origY; - QList oldBindings; + QList oldBindings; - QDeclarativeProperty leftProp; - QDeclarativeProperty rightProp; - QDeclarativeProperty hCenterProp; - QDeclarativeProperty topProp; - QDeclarativeProperty bottomProp; - QDeclarativeProperty vCenterProp; - QDeclarativeProperty baselineProp; + QQmlProperty leftProp; + QQmlProperty rightProp; + QQmlProperty hCenterProp; + QQmlProperty topProp; + QQmlProperty bottomProp; + QQmlProperty vCenterProp; + QQmlProperty baselineProp; }; QQuickAnchorChanges::QQuickAnchorChanges(QObject *parent) - : QDeclarativeStateOperation(*(new QQuickAnchorChangesPrivate), parent) + : QQuickStateOperation(*(new QQuickAnchorChangesPrivate), parent) { } @@ -839,44 +839,44 @@ QQuickAnchorChanges::ActionList QQuickAnchorChanges::actions() 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")); + d->leftProp = QQmlProperty(d->target, QLatin1String("anchors.left")); + d->rightProp = QQmlProperty(d->target, QLatin1String("anchors.right")); + d->hCenterProp = QQmlProperty(d->target, QLatin1String("anchors.horizontalCenter")); + d->topProp = QQmlProperty(d->target, QLatin1String("anchors.top")); + d->bottomProp = QQmlProperty(d->target, QLatin1String("anchors.bottom")); + d->vCenterProp = QQmlProperty(d->target, QLatin1String("anchors.verticalCenter")); + d->baselineProp = QQmlProperty(d->target, QLatin1String("anchors.baseline")); if (d->anchorSet->d_func()->usedAnchors & QQuickAnchors::LeftAnchor) { - d->leftBinding = new QDeclarativeBinding(d->anchorSet->d_func()->leftScript.script(), d->target, qmlContext(this)); + d->leftBinding = new QQmlBinding(d->anchorSet->d_func()->leftScript.script(), d->target, qmlContext(this)); d->leftBinding->setTarget(d->leftProp); } if (d->anchorSet->d_func()->usedAnchors & QQuickAnchors::RightAnchor) { - d->rightBinding = new QDeclarativeBinding(d->anchorSet->d_func()->rightScript.script(), d->target, qmlContext(this)); + d->rightBinding = new QQmlBinding(d->anchorSet->d_func()->rightScript.script(), d->target, qmlContext(this)); d->rightBinding->setTarget(d->rightProp); } if (d->anchorSet->d_func()->usedAnchors & QQuickAnchors::HCenterAnchor) { - d->hCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->hCenterScript.script(), d->target, qmlContext(this)); + d->hCenterBinding = new QQmlBinding(d->anchorSet->d_func()->hCenterScript.script(), d->target, qmlContext(this)); d->hCenterBinding->setTarget(d->hCenterProp); } if (d->anchorSet->d_func()->usedAnchors & QQuickAnchors::TopAnchor) { - d->topBinding = new QDeclarativeBinding(d->anchorSet->d_func()->topScript.script(), d->target, qmlContext(this)); + d->topBinding = new QQmlBinding(d->anchorSet->d_func()->topScript.script(), d->target, qmlContext(this)); d->topBinding->setTarget(d->topProp); } if (d->anchorSet->d_func()->usedAnchors & QQuickAnchors::BottomAnchor) { - d->bottomBinding = new QDeclarativeBinding(d->anchorSet->d_func()->bottomScript.script(), d->target, qmlContext(this)); + d->bottomBinding = new QQmlBinding(d->anchorSet->d_func()->bottomScript.script(), d->target, qmlContext(this)); d->bottomBinding->setTarget(d->bottomProp); } if (d->anchorSet->d_func()->usedAnchors & QQuickAnchors::VCenterAnchor) { - d->vCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->vCenterScript.script(), d->target, qmlContext(this)); + d->vCenterBinding = new QQmlBinding(d->anchorSet->d_func()->vCenterScript.script(), d->target, qmlContext(this)); d->vCenterBinding->setTarget(d->vCenterProp); } if (d->anchorSet->d_func()->usedAnchors & QQuickAnchors::BaselineAnchor) { - d->baselineBinding = new QDeclarativeBinding(d->anchorSet->d_func()->baselineScript.script(), d->target, qmlContext(this)); + d->baselineBinding = new QQmlBinding(d->anchorSet->d_func()->baselineScript.script(), d->target, qmlContext(this)); d->baselineBinding->setTarget(d->baselineProp); } - QDeclarativeAction a; + QQuickAction a; a.event = this; return ActionList() << a; } @@ -910,43 +910,43 @@ void QQuickAnchorChanges::execute(Reason reason) if (d->applyOrigLeft) { if (!d->origLeftBinding) targetPrivate->anchors()->resetLeft(); - QDeclarativePropertyPrivate::setBinding(d->leftProp, d->origLeftBinding); + QQmlPropertyPrivate::setBinding(d->leftProp, d->origLeftBinding); } if (d->applyOrigRight) { if (!d->origRightBinding) targetPrivate->anchors()->resetRight(); - QDeclarativePropertyPrivate::setBinding(d->rightProp, d->origRightBinding); + QQmlPropertyPrivate::setBinding(d->rightProp, d->origRightBinding); } if (d->applyOrigHCenter) { if (!d->origHCenterBinding) targetPrivate->anchors()->resetHorizontalCenter(); - QDeclarativePropertyPrivate::setBinding(d->hCenterProp, d->origHCenterBinding); + QQmlPropertyPrivate::setBinding(d->hCenterProp, d->origHCenterBinding); } if (d->applyOrigTop) { if (!d->origTopBinding) targetPrivate->anchors()->resetTop(); - QDeclarativePropertyPrivate::setBinding(d->topProp, d->origTopBinding); + QQmlPropertyPrivate::setBinding(d->topProp, d->origTopBinding); } if (d->applyOrigBottom) { if (!d->origBottomBinding) targetPrivate->anchors()->resetBottom(); - QDeclarativePropertyPrivate::setBinding(d->bottomProp, d->origBottomBinding); + QQmlPropertyPrivate::setBinding(d->bottomProp, d->origBottomBinding); } if (d->applyOrigVCenter) { if (!d->origVCenterBinding) targetPrivate->anchors()->resetVerticalCenter(); - QDeclarativePropertyPrivate::setBinding(d->vCenterProp, d->origVCenterBinding); + QQmlPropertyPrivate::setBinding(d->vCenterProp, d->origVCenterBinding); } if (d->applyOrigBaseline) { if (!d->origBaselineBinding) targetPrivate->anchors()->resetBaseline(); - QDeclarativePropertyPrivate::setBinding(d->baselineProp, d->origBaselineBinding); + QQmlPropertyPrivate::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); + QQmlAbstractBinding *binding = d->oldBindings.at(i); if (binding) binding->destroy(); } @@ -956,48 +956,48 @@ void QQuickAnchorChanges::execute(Reason reason) //reset any anchors that have been specified as "undefined" if (d->anchorSet->d_func()->resetAnchors & QQuickAnchors::LeftAnchor) { targetPrivate->anchors()->resetLeft(); - QDeclarativePropertyPrivate::setBinding(d->leftProp, 0); + QQmlPropertyPrivate::setBinding(d->leftProp, 0); } if (d->anchorSet->d_func()->resetAnchors & QQuickAnchors::RightAnchor) { targetPrivate->anchors()->resetRight(); - QDeclarativePropertyPrivate::setBinding(d->rightProp, 0); + QQmlPropertyPrivate::setBinding(d->rightProp, 0); } if (d->anchorSet->d_func()->resetAnchors & QQuickAnchors::HCenterAnchor) { targetPrivate->anchors()->resetHorizontalCenter(); - QDeclarativePropertyPrivate::setBinding(d->hCenterProp, 0); + QQmlPropertyPrivate::setBinding(d->hCenterProp, 0); } if (d->anchorSet->d_func()->resetAnchors & QQuickAnchors::TopAnchor) { targetPrivate->anchors()->resetTop(); - QDeclarativePropertyPrivate::setBinding(d->topProp, 0); + QQmlPropertyPrivate::setBinding(d->topProp, 0); } if (d->anchorSet->d_func()->resetAnchors & QQuickAnchors::BottomAnchor) { targetPrivate->anchors()->resetBottom(); - QDeclarativePropertyPrivate::setBinding(d->bottomProp, 0); + QQmlPropertyPrivate::setBinding(d->bottomProp, 0); } if (d->anchorSet->d_func()->resetAnchors & QQuickAnchors::VCenterAnchor) { targetPrivate->anchors()->resetVerticalCenter(); - QDeclarativePropertyPrivate::setBinding(d->vCenterProp, 0); + QQmlPropertyPrivate::setBinding(d->vCenterProp, 0); } if (d->anchorSet->d_func()->resetAnchors & QQuickAnchors::BaselineAnchor) { targetPrivate->anchors()->resetBaseline(); - QDeclarativePropertyPrivate::setBinding(d->baselineProp, 0); + QQmlPropertyPrivate::setBinding(d->baselineProp, 0); } //set any anchors that have been specified if (d->leftBinding) - QDeclarativePropertyPrivate::setBinding(d->leftBinding->property(), d->leftBinding); + QQmlPropertyPrivate::setBinding(d->leftBinding->property(), d->leftBinding); if (d->rightBinding) - QDeclarativePropertyPrivate::setBinding(d->rightBinding->property(), d->rightBinding); + QQmlPropertyPrivate::setBinding(d->rightBinding->property(), d->rightBinding); if (d->hCenterBinding) - QDeclarativePropertyPrivate::setBinding(d->hCenterBinding->property(), d->hCenterBinding); + QQmlPropertyPrivate::setBinding(d->hCenterBinding->property(), d->hCenterBinding); if (d->topBinding) - QDeclarativePropertyPrivate::setBinding(d->topBinding->property(), d->topBinding); + QQmlPropertyPrivate::setBinding(d->topBinding->property(), d->topBinding); if (d->bottomBinding) - QDeclarativePropertyPrivate::setBinding(d->bottomBinding->property(), d->bottomBinding); + QQmlPropertyPrivate::setBinding(d->bottomBinding->property(), d->bottomBinding); if (d->vCenterBinding) - QDeclarativePropertyPrivate::setBinding(d->vCenterBinding->property(), d->vCenterBinding); + QQmlPropertyPrivate::setBinding(d->vCenterBinding->property(), d->vCenterBinding); if (d->baselineBinding) - QDeclarativePropertyPrivate::setBinding(d->baselineBinding->property(), d->baselineBinding); + QQmlPropertyPrivate::setBinding(d->baselineBinding->property(), d->baselineBinding); } bool QQuickAnchorChanges::isReversable() @@ -1015,49 +1015,49 @@ void QQuickAnchorChanges::reverse(Reason reason) //reset any anchors set by the state if (d->leftBinding) { targetPrivate->anchors()->resetLeft(); - QDeclarativePropertyPrivate::setBinding(d->leftBinding->property(), 0); + QQmlPropertyPrivate::setBinding(d->leftBinding->property(), 0); if (reason == ActualChange) { d->leftBinding->destroy(); d->leftBinding = 0; } } if (d->rightBinding) { targetPrivate->anchors()->resetRight(); - QDeclarativePropertyPrivate::setBinding(d->rightBinding->property(), 0); + QQmlPropertyPrivate::setBinding(d->rightBinding->property(), 0); if (reason == ActualChange) { d->rightBinding->destroy(); d->rightBinding = 0; } } if (d->hCenterBinding) { targetPrivate->anchors()->resetHorizontalCenter(); - QDeclarativePropertyPrivate::setBinding(d->hCenterBinding->property(), 0); + QQmlPropertyPrivate::setBinding(d->hCenterBinding->property(), 0); if (reason == ActualChange) { d->hCenterBinding->destroy(); d->hCenterBinding = 0; } } if (d->topBinding) { targetPrivate->anchors()->resetTop(); - QDeclarativePropertyPrivate::setBinding(d->topBinding->property(), 0); + QQmlPropertyPrivate::setBinding(d->topBinding->property(), 0); if (reason == ActualChange) { d->topBinding->destroy(); d->topBinding = 0; } } if (d->bottomBinding) { targetPrivate->anchors()->resetBottom(); - QDeclarativePropertyPrivate::setBinding(d->bottomBinding->property(), 0); + QQmlPropertyPrivate::setBinding(d->bottomBinding->property(), 0); if (reason == ActualChange) { d->bottomBinding->destroy(); d->bottomBinding = 0; } } if (d->vCenterBinding) { targetPrivate->anchors()->resetVerticalCenter(); - QDeclarativePropertyPrivate::setBinding(d->vCenterBinding->property(), 0); + QQmlPropertyPrivate::setBinding(d->vCenterBinding->property(), 0); if (reason == ActualChange) { d->vCenterBinding->destroy(); d->vCenterBinding = 0; } } if (d->baselineBinding) { targetPrivate->anchors()->resetBaseline(); - QDeclarativePropertyPrivate::setBinding(d->baselineBinding->property(), 0); + QQmlPropertyPrivate::setBinding(d->baselineBinding->property(), 0); if (reason == ActualChange) { d->baselineBinding->destroy(); d->baselineBinding = 0; } @@ -1065,19 +1065,19 @@ void QQuickAnchorChanges::reverse(Reason reason) //restore previous anchors if (d->origLeftBinding) - QDeclarativePropertyPrivate::setBinding(d->leftProp, d->origLeftBinding); + QQmlPropertyPrivate::setBinding(d->leftProp, d->origLeftBinding); if (d->origRightBinding) - QDeclarativePropertyPrivate::setBinding(d->rightProp, d->origRightBinding); + QQmlPropertyPrivate::setBinding(d->rightProp, d->origRightBinding); if (d->origHCenterBinding) - QDeclarativePropertyPrivate::setBinding(d->hCenterProp, d->origHCenterBinding); + QQmlPropertyPrivate::setBinding(d->hCenterProp, d->origHCenterBinding); if (d->origTopBinding) - QDeclarativePropertyPrivate::setBinding(d->topProp, d->origTopBinding); + QQmlPropertyPrivate::setBinding(d->topProp, d->origTopBinding); if (d->origBottomBinding) - QDeclarativePropertyPrivate::setBinding(d->bottomProp, d->origBottomBinding); + QQmlPropertyPrivate::setBinding(d->bottomProp, d->origBottomBinding); if (d->origVCenterBinding) - QDeclarativePropertyPrivate::setBinding(d->vCenterProp, d->origVCenterBinding); + QQmlPropertyPrivate::setBinding(d->vCenterProp, d->origVCenterBinding); if (d->origBaselineBinding) - QDeclarativePropertyPrivate::setBinding(d->baselineProp, d->origBaselineBinding); + QQmlPropertyPrivate::setBinding(d->baselineProp, d->origBaselineBinding); //restore any absolute geometry changed by the state's anchors QQuickAnchors::Anchors stateVAnchors = d->anchorSet->d_func()->usedAnchors & QQuickAnchors::Vertical_Mask; @@ -1116,39 +1116,39 @@ void QQuickAnchorChanges::reverse(Reason reason) d->target->setY(d->origY); } -QDeclarativeActionEvent::EventType QQuickAnchorChanges::type() const +QQuickActionEvent::EventType QQuickAnchorChanges::type() const { return AnchorChanges; } -QList QQuickAnchorChanges::additionalActions() +QList QQuickAnchorChanges::additionalActions() { Q_D(QQuickAnchorChanges); - QList extra; + QList extra; QQuickAnchors::Anchors combined = d->anchorSet->d_func()->usedAnchors | d->anchorSet->d_func()->resetAnchors; bool hChange = combined & QQuickAnchors::Horizontal_Mask; bool vChange = combined & QQuickAnchors::Vertical_Mask; if (d->target) { - QDeclarativeAction a; + QQuickAction a; if (hChange && d->fromX != d->toX) { - a.property = QDeclarativeProperty(d->target, QLatin1String("x")); + a.property = QQmlProperty(d->target, QLatin1String("x")); a.toValue = d->toX; extra << a; } if (vChange && d->fromY != d->toY) { - a.property = QDeclarativeProperty(d->target, QLatin1String("y")); + a.property = QQmlProperty(d->target, QLatin1String("y")); a.toValue = d->toY; extra << a; } if (hChange && d->fromWidth != d->toWidth) { - a.property = QDeclarativeProperty(d->target, QLatin1String("width")); + a.property = QQmlProperty(d->target, QLatin1String("width")); a.toValue = d->toWidth; extra << a; } if (vChange && d->fromHeight != d->toHeight) { - a.property = QDeclarativeProperty(d->target, QLatin1String("height")); + a.property = QQmlProperty(d->target, QLatin1String("height")); a.toValue = d->toHeight; extra << a; } @@ -1168,13 +1168,13 @@ void QQuickAnchorChanges::saveOriginals() if (!d->target) return; - 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->origLeftBinding = QQmlPropertyPrivate::binding(d->leftProp); + d->origRightBinding = QQmlPropertyPrivate::binding(d->rightProp); + d->origHCenterBinding = QQmlPropertyPrivate::binding(d->hCenterProp); + d->origTopBinding = QQmlPropertyPrivate::binding(d->topProp); + d->origBottomBinding = QQmlPropertyPrivate::binding(d->bottomProp); + d->origVCenterBinding = QQmlPropertyPrivate::binding(d->vCenterProp); + d->origBaselineBinding = QQmlPropertyPrivate::binding(d->baselineProp); QQuickItemPrivate *targetPrivate = QQuickItemPrivate::get(d->target); if (targetPrivate->widthValid) @@ -1190,7 +1190,7 @@ void QQuickAnchorChanges::saveOriginals() saveCurrentValues(); } -void QQuickAnchorChanges::copyOriginals(QDeclarativeActionEvent *other) +void QQuickAnchorChanges::copyOriginals(QQuickActionEvent *other) { Q_D(QQuickAnchorChanges); QQuickAnchorChanges *ac = static_cast(other); @@ -1248,39 +1248,39 @@ void QQuickAnchorChanges::clearBindings() d->anchorSet->d_func()->usedAnchors; if (d->applyOrigLeft || (combined & QQuickAnchors::LeftAnchor)) { targetPrivate->anchors()->resetLeft(); - QDeclarativePropertyPrivate::setBinding(d->leftProp, 0); + QQmlPropertyPrivate::setBinding(d->leftProp, 0); } if (d->applyOrigRight || (combined & QQuickAnchors::RightAnchor)) { targetPrivate->anchors()->resetRight(); - QDeclarativePropertyPrivate::setBinding(d->rightProp, 0); + QQmlPropertyPrivate::setBinding(d->rightProp, 0); } if (d->applyOrigHCenter || (combined & QQuickAnchors::HCenterAnchor)) { targetPrivate->anchors()->resetHorizontalCenter(); - QDeclarativePropertyPrivate::setBinding(d->hCenterProp, 0); + QQmlPropertyPrivate::setBinding(d->hCenterProp, 0); } if (d->applyOrigTop || (combined & QQuickAnchors::TopAnchor)) { targetPrivate->anchors()->resetTop(); - QDeclarativePropertyPrivate::setBinding(d->topProp, 0); + QQmlPropertyPrivate::setBinding(d->topProp, 0); } if (d->applyOrigBottom || (combined & QQuickAnchors::BottomAnchor)) { targetPrivate->anchors()->resetBottom(); - QDeclarativePropertyPrivate::setBinding(d->bottomProp, 0); + QQmlPropertyPrivate::setBinding(d->bottomProp, 0); } if (d->applyOrigVCenter || (combined & QQuickAnchors::VCenterAnchor)) { targetPrivate->anchors()->resetVerticalCenter(); - QDeclarativePropertyPrivate::setBinding(d->vCenterProp, 0); + QQmlPropertyPrivate::setBinding(d->vCenterProp, 0); } if (d->applyOrigBaseline || (combined & QQuickAnchors::BaselineAnchor)) { targetPrivate->anchors()->resetBaseline(); - QDeclarativePropertyPrivate::setBinding(d->baselineProp, 0); + QQmlPropertyPrivate::setBinding(d->baselineProp, 0); } } -bool QQuickAnchorChanges::override(QDeclarativeActionEvent*other) +bool QQuickAnchorChanges::override(QQuickActionEvent*other) { if (other->type() != AnchorChanges) return false; - if (static_cast(this) == other) + if (static_cast(this) == other) return true; if (static_cast(other)->object() == object()) return true; diff --git a/src/quick/items/qquickstateoperations_p.h b/src/quick/items/qquickstateoperations_p.h index ff1671d53a..2523cc6d4f 100644 --- a/src/quick/items/qquickstateoperations_p.h +++ b/src/quick/items/qquickstateoperations_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,28 +45,28 @@ #include "qquickitem.h" #include "qquickanchors_p.h" -#include +#include -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE class QQuickParentChangePrivate; -class Q_AUTOTEST_EXPORT QQuickParentChange : public QDeclarativeStateOperation, public QDeclarativeActionEvent +class Q_AUTOTEST_EXPORT QQuickParentChange : public QQuickStateOperation, public QQuickActionEvent { Q_OBJECT Q_DECLARE_PRIVATE(QQuickParentChange) Q_PROPERTY(QQuickItem *target READ object WRITE setObject) Q_PROPERTY(QQuickItem *parent READ parent WRITE setParent) - Q_PROPERTY(QDeclarativeScriptString x READ x WRITE setX) - Q_PROPERTY(QDeclarativeScriptString y READ y WRITE setY) - Q_PROPERTY(QDeclarativeScriptString width READ width WRITE setWidth) - Q_PROPERTY(QDeclarativeScriptString height READ height WRITE setHeight) - Q_PROPERTY(QDeclarativeScriptString scale READ scale WRITE setScale) - Q_PROPERTY(QDeclarativeScriptString rotation READ rotation WRITE setRotation) + Q_PROPERTY(QQmlScriptString x READ x WRITE setX) + Q_PROPERTY(QQmlScriptString y READ y WRITE setY) + Q_PROPERTY(QQmlScriptString width READ width WRITE setWidth) + Q_PROPERTY(QQmlScriptString height READ height WRITE setHeight) + Q_PROPERTY(QQmlScriptString scale READ scale WRITE setScale) + Q_PROPERTY(QQmlScriptString rotation READ rotation WRITE setRotation) public: QQuickParentChange(QObject *parent=0); ~QQuickParentChange(); @@ -79,39 +79,39 @@ class Q_AUTOTEST_EXPORT QQuickParentChange : public QDeclarativeStateOperation, QQuickItem *originalParent() const; - QDeclarativeScriptString x() const; - void setX(QDeclarativeScriptString x); + QQmlScriptString x() const; + void setX(QQmlScriptString x); bool xIsSet() const; - QDeclarativeScriptString y() const; - void setY(QDeclarativeScriptString y); + QQmlScriptString y() const; + void setY(QQmlScriptString y); bool yIsSet() const; - QDeclarativeScriptString width() const; - void setWidth(QDeclarativeScriptString width); + QQmlScriptString width() const; + void setWidth(QQmlScriptString width); bool widthIsSet() const; - QDeclarativeScriptString height() const; - void setHeight(QDeclarativeScriptString height); + QQmlScriptString height() const; + void setHeight(QQmlScriptString height); bool heightIsSet() const; - QDeclarativeScriptString scale() const; - void setScale(QDeclarativeScriptString scale); + QQmlScriptString scale() const; + void setScale(QQmlScriptString scale); bool scaleIsSet() const; - QDeclarativeScriptString rotation() const; - void setRotation(QDeclarativeScriptString rotation); + QQmlScriptString rotation() const; + void setRotation(QQmlScriptString rotation); bool rotationIsSet() const; virtual ActionList actions(); virtual void saveOriginals(); - //virtual void copyOriginals(QDeclarativeActionEvent*); + //virtual void copyOriginals(QQuickActionEvent*); virtual void execute(Reason reason = ActualChange); virtual bool isReversable(); virtual void reverse(Reason reason = ActualChange); virtual EventType type() const; - virtual bool override(QDeclarativeActionEvent*other); + virtual bool override(QQuickActionEvent*other); virtual void rewind(); virtual void saveCurrentValues(); }; @@ -122,13 +122,13 @@ class Q_AUTOTEST_EXPORT QQuickAnchorSet : public QObject { Q_OBJECT - 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(QQmlScriptString left READ left WRITE setLeft RESET resetLeft) + Q_PROPERTY(QQmlScriptString right READ right WRITE setRight RESET resetRight) + Q_PROPERTY(QQmlScriptString horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter) + Q_PROPERTY(QQmlScriptString top READ top WRITE setTop RESET resetTop) + Q_PROPERTY(QQmlScriptString bottom READ bottom WRITE setBottom RESET resetBottom) + Q_PROPERTY(QQmlScriptString verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter) + Q_PROPERTY(QQmlScriptString baseline READ baseline WRITE setBaseline RESET resetBaseline) //Q_PROPERTY(QQuickItem *fill READ fill WRITE setFill RESET resetFill) //Q_PROPERTY(QQuickItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn) @@ -145,32 +145,32 @@ class Q_AUTOTEST_EXPORT QQuickAnchorSet : public QObject QQuickAnchorSet(QObject *parent=0); virtual ~QQuickAnchorSet(); - QDeclarativeScriptString left() const; - void setLeft(const QDeclarativeScriptString &edge); + QQmlScriptString left() const; + void setLeft(const QQmlScriptString &edge); void resetLeft(); - QDeclarativeScriptString right() const; - void setRight(const QDeclarativeScriptString &edge); + QQmlScriptString right() const; + void setRight(const QQmlScriptString &edge); void resetRight(); - QDeclarativeScriptString horizontalCenter() const; - void setHorizontalCenter(const QDeclarativeScriptString &edge); + QQmlScriptString horizontalCenter() const; + void setHorizontalCenter(const QQmlScriptString &edge); void resetHorizontalCenter(); - QDeclarativeScriptString top() const; - void setTop(const QDeclarativeScriptString &edge); + QQmlScriptString top() const; + void setTop(const QQmlScriptString &edge); void resetTop(); - QDeclarativeScriptString bottom() const; - void setBottom(const QDeclarativeScriptString &edge); + QQmlScriptString bottom() const; + void setBottom(const QQmlScriptString &edge); void resetBottom(); - QDeclarativeScriptString verticalCenter() const; - void setVerticalCenter(const QDeclarativeScriptString &edge); + QQmlScriptString verticalCenter() const; + void setVerticalCenter(const QQmlScriptString &edge); void resetVerticalCenter(); - QDeclarativeScriptString baseline() const; - void setBaseline(const QDeclarativeScriptString &edge); + QQmlScriptString baseline() const; + void setBaseline(const QQmlScriptString &edge); void resetBaseline(); QQuickItem *fill() const; @@ -224,7 +224,7 @@ class Q_AUTOTEST_EXPORT QQuickAnchorSet : public QObject }; class QQuickAnchorChangesPrivate; -class Q_AUTOTEST_EXPORT QQuickAnchorChanges : public QDeclarativeStateOperation, public QDeclarativeActionEvent +class Q_AUTOTEST_EXPORT QQuickAnchorChanges : public QQuickStateOperation, public QQuickActionEvent { Q_OBJECT Q_DECLARE_PRIVATE(QQuickAnchorChanges) @@ -247,16 +247,16 @@ class Q_AUTOTEST_EXPORT QQuickAnchorChanges : public QDeclarativeStateOperation, virtual bool isReversable(); virtual void reverse(Reason reason = ActualChange); virtual EventType type() const; - virtual bool override(QDeclarativeActionEvent*other); + virtual bool override(QQuickActionEvent*other); virtual bool changesBindings(); virtual void saveOriginals(); virtual bool needsCopy() { return true; } - virtual void copyOriginals(QDeclarativeActionEvent*); + virtual void copyOriginals(QQuickActionEvent*); virtual void clearBindings(); virtual void rewind(); virtual void saveCurrentValues(); - QList additionalActions(); + QList additionalActions(); virtual void saveTargetValues(); }; diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index 6f8aa383cd..7aa4276f8d 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,12 +43,13 @@ #include "qquicktext_p_p.h" #include +#include #include #include "qquicktextnode_p.h" #include "qquickimage_p_p.h" #include -#include +#include #include #include #include @@ -59,8 +60,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -111,11 +112,11 @@ QQuickTextDocumentWithImageResources::~QQuickTextDocumentWithImageResources() QVariant QQuickTextDocumentWithImageResources::loadResource(int type, const QUrl &name) { - QDeclarativeContext *context = qmlContext(parent()); + QQmlContext *context = qmlContext(parent()); QUrl url = m_baseUrl.resolved(name); if (type == QTextDocument::ImageResource) { - QDeclarativePixmap *p = loadPixmap(context, url); + QQuickPixmap *p = loadPixmap(context, url); return p->image(); } @@ -152,10 +153,10 @@ QSizeF QQuickTextDocumentWithImageResources::intrinsicSize( QSizeF size(width, height); if (!hasWidth || !hasHeight) { - QDeclarativeContext *context = qmlContext(parent()); + QQmlContext *context = qmlContext(parent()); QUrl url = m_baseUrl.resolved(QUrl(imageFormat.name())); - QDeclarativePixmap *p = loadPixmap(context, url); + QQuickPixmap *p = loadPixmap(context, url); if (!p->isReady()) { if (!hasWidth) size.setWidth(16); @@ -190,10 +191,10 @@ void QQuickTextDocumentWithImageResources::drawObject( QImage QQuickTextDocumentWithImageResources::image(const QTextImageFormat &format) { - QDeclarativeContext *context = qmlContext(parent()); + QQmlContext *context = qmlContext(parent()); QUrl url = m_baseUrl.resolved(QUrl(format.name())); - QDeclarativePixmap *p = loadPixmap(context, url); + QQuickPixmap *p = loadPixmap(context, url); return p->image(); } @@ -206,14 +207,14 @@ void QQuickTextDocumentWithImageResources::setBaseUrl(const QUrl &url, bool clea } } -QDeclarativePixmap *QQuickTextDocumentWithImageResources::loadPixmap( - QDeclarativeContext *context, const QUrl &url) +QQuickPixmap *QQuickTextDocumentWithImageResources::loadPixmap( + QQmlContext *context, const QUrl &url) { - QHash::Iterator iter = m_resources.find(url); + QHash::Iterator iter = m_resources.find(url); if (iter == m_resources.end()) { - QDeclarativePixmap *p = new QDeclarativePixmap(context->engine(), url); + QQuickPixmap *p = new QQuickPixmap(context->engine(), url); iter = m_resources.insert(url, p); if (p->isLoading()) { @@ -222,7 +223,7 @@ QDeclarativePixmap *QQuickTextDocumentWithImageResources::loadPixmap( } } - QDeclarativePixmap *p = *iter; + QQuickPixmap *p = *iter; if (p->isError()) { if (!errors.contains(url)) { errors.insert(url); @@ -234,7 +235,7 @@ QDeclarativePixmap *QQuickTextDocumentWithImageResources::loadPixmap( void QQuickTextDocumentWithImageResources::clearResources() { - foreach (QDeclarativePixmap *pixmap, m_resources) + foreach (QQuickPixmap *pixmap, m_resources) pixmap->clear(this); qDeleteAll(m_resources); m_resources.clear(); @@ -298,7 +299,7 @@ void QQuickTextPrivate::updateLayout() if (!richText) { if (textHasChanged) { if (styledText && !text.isEmpty()) { - QDeclarativeStyledText::parse(text, layout, imgTags, q->baseUrl(), qmlContext(q), !maximumLineCountValid); + QQuickStyledText::parse(text, layout, imgTags, q->baseUrl(), qmlContext(q), !maximumLineCountValid); } else { layout.clearAdditionalFormats(); multilengthEos = text.indexOf(QLatin1Char('\x9c')); @@ -341,7 +342,7 @@ void QQuickText::imageDownloadFinished() if (d->nbActiveDownloads == 0) { bool needToUpdateLayout = false; - foreach (QDeclarativeStyledTextImgTag *img, d->visibleImgTags) { + foreach (QQuickStyledTextImgTag *img, d->visibleImgTags) { if (!img->size.isValid()) { img->size = img->pix->implicitSize(); needToUpdateLayout = true; @@ -945,15 +946,15 @@ void QQuickTextPrivate::setLineGeometry(QTextLine &line, qreal lineWidth, qreal qreal textHeight = line.height(); qreal totalLineHeight = textHeight; - QList imagesInLine; + QList imagesInLine; - foreach (QDeclarativeStyledTextImgTag *image, imgTags) { + foreach (QQuickStyledTextImgTag *image, imgTags) { if (image->position >= line.textStart() && image->position < line.textStart() + line.textLength()) { if (!image->pix) { QUrl url = q->baseUrl().resolved(image->url); - image->pix = new QDeclarativePixmap(qmlEngine(q), url, image->size); + image->pix = new QQuickPixmap(qmlEngine(q), url, image->size); if (image->pix->isLoading()) { image->pix->connectFinished(q, SLOT(imageDownloadFinished())); nbActiveDownloads++; @@ -970,9 +971,9 @@ void QQuickTextPrivate::setLineGeometry(QTextLine &line, qreal lineWidth, qreal } qreal ih = qreal(image->size.height()); - if (image->align == QDeclarativeStyledTextImgTag::Top) + if (image->align == QQuickStyledTextImgTag::Top) image->pos.setY(0); - else if (image->align == QDeclarativeStyledTextImgTag::Middle) + else if (image->align == QQuickStyledTextImgTag::Middle) image->pos.setY((textHeight / 2.0) - (ih / 2.0)); else image->pos.setY(textHeight - ih); @@ -981,7 +982,7 @@ void QQuickTextPrivate::setLineGeometry(QTextLine &line, qreal lineWidth, qreal } } - foreach (QDeclarativeStyledTextImgTag *image, imagesInLine) { + foreach (QQuickStyledTextImgTag *image, imagesInLine) { totalLineHeight = qMax(totalLineHeight, textTop + image->pos.y() + image->size.height()); image->pos.setX(line.cursorToX(image->position)); image->pos.setY(image->pos.y() + height + textTop); @@ -1117,7 +1118,7 @@ QQuickText::~QQuickText() The link must be in rich text or HTML format and the \a link string provides access to the particular link. - \snippet doc/src/snippets/declarative/text/onLinkActivated.qml 0 + \snippet doc/src/snippets/qml/text/onLinkActivated.qml 0 The example code will display the text "The main website is at \l{http://qt.nokia.com}{Nokia Qt DF}." @@ -1841,7 +1842,7 @@ QUrl QQuickText::baseUrl() const { Q_D(const QQuickText); if (d->baseUrl.isEmpty()) { - if (QDeclarativeContext *context = qmlContext(this)) + if (QQmlContext *context = qmlContext(this)) const_cast(d)->baseUrl = context->baseUrl(); } return d->baseUrl; @@ -1867,7 +1868,7 @@ void QQuickText::setBaseUrl(const QUrl &url) void QQuickText::resetBaseUrl() { - if (QDeclarativeContext *context = qmlContext(this)) + if (QQmlContext *context = qmlContext(this)) setBaseUrl(context->baseUrl()); else setBaseUrl(QUrl()); @@ -2008,8 +2009,8 @@ QSGNode *QQuickText::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data node->addTextLayout(QPoint(0, bounds.y()), d->elideLayout, color, d->style, styleColor, linkColor); } - foreach (QDeclarativeStyledTextImgTag *img, d->visibleImgTags) { - QDeclarativePixmap *pix = img->pix; + foreach (QQuickStyledTextImgTag *img, d->visibleImgTags) { + QQuickPixmap *pix = img->pix; if (pix && pix->isReady()) node->addImage(QRectF(img->pos.x(), img->pos.y() + bounds.y(), pix->width(), pix->height()), pix->image()); } diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h index 37287b5445..d73c6e1a10 100644 --- a/src/quick/items/qquicktext_p.h +++ b/src/quick/items/qquicktext_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquicktext_p_p.h b/src/quick/items/qquicktext_p_p.h index 555f41ff94..0f8c93a9e3 100644 --- a/src/quick/items/qquicktext_p_p.h +++ b/src/quick/items/qquicktext_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -56,10 +56,10 @@ #include "qquicktext_p.h" #include "qquickimplicitsizeitem_p_p.h" -#include +#include #include #include -#include +#include QT_BEGIN_NAMESPACE @@ -93,8 +93,8 @@ class Q_AUTOTEST_EXPORT QQuickTextPrivate : public QQuickImplicitSizeItemPrivate QUrl baseUrl; QFont font; QFont sourceFont; - QList imgTags; - QList visibleImgTags; + QList imgTags; + QList visibleImgTags; QTextLayout layout; QTextLayout *elideLayout; @@ -165,7 +165,7 @@ class Q_AUTOTEST_EXPORT QQuickTextPrivate : public QQuickImplicitSizeItemPrivate } }; -class QDeclarativePixmap; +class QQuickPixmap; class QQuickTextDocumentWithImageResources : public QTextDocument, public QTextObjectInterface { Q_OBJECT @@ -194,13 +194,13 @@ class QQuickTextDocumentWithImageResources : public QTextDocument, public QTextO protected: QVariant loadResource(int type, const QUrl &name); - QDeclarativePixmap *loadPixmap(QDeclarativeContext *context, const QUrl &name); + QQuickPixmap *loadPixmap(QQmlContext *context, const QUrl &name); private slots: void requestFinished(); private: - QHash m_resources; + QHash m_resources; QUrl m_baseUrl; int outstanding; diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 6f3c32db7d..6eed95767b 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -48,15 +48,15 @@ #include "qquicktextnode_p.h" #include -#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include @@ -692,7 +692,7 @@ QUrl QQuickTextEdit::baseUrl() const { Q_D(const QQuickTextEdit); if (d->baseUrl.isEmpty()) { - if (QDeclarativeContext *context = qmlContext(this)) + if (QQmlContext *context = qmlContext(this)) const_cast(d)->baseUrl = context->baseUrl(); } return d->baseUrl; @@ -711,7 +711,7 @@ void QQuickTextEdit::setBaseUrl(const QUrl &url) void QQuickTextEdit::resetBaseUrl() { - if (QDeclarativeContext *context = qmlContext(this)) + if (QQmlContext *context = qmlContext(this)) setBaseUrl(context->baseUrl()); else setBaseUrl(QUrl()); @@ -919,16 +919,16 @@ void QQuickTextEdit::setCursorPosition(int pos) needed, and the x and y properties of delegate instance will be set so as to be one pixel before the top left of the current character. - Note that the root item of the delegate component must be a QDeclarativeItem or - QDeclarativeItem derived item. + Note that the root item of the delegate component must be a QQuickItem or + QQuickItem derived item. */ -QDeclarativeComponent* QQuickTextEdit::cursorDelegate() const +QQmlComponent* QQuickTextEdit::cursorDelegate() const { Q_D(const QQuickTextEdit); return d->cursorComponent; } -void QQuickTextEdit::setCursorDelegate(QDeclarativeComponent* c) +void QQuickTextEdit::setCursorDelegate(QQmlComponent* c) { Q_D(QQuickTextEdit); if (d->cursorComponent) { @@ -956,13 +956,13 @@ void QQuickTextEdit::loadCursorDelegate() Q_D(QQuickTextEdit); if (d->cursorComponent->isLoading() || !isComponentComplete()) return; - QDeclarativeContext *creationContext = d->cursorComponent->creationContext(); + QQmlContext *creationContext = d->cursorComponent->creationContext(); QObject *object = d->cursorComponent->create(creationContext ? creationContext : qmlContext(this)); d->cursor = qobject_cast(object); if (d->cursor) { d->control->setCursorWidth(0); updateCursor(); - QDeclarative_setParent_noEvent(d->cursor, this); + QQml_setParent_noEvent(d->cursor, this); d->cursor->setParentItem(this); d->cursor->setHeight(QFontMetrics(d->font).height()); moveCursorDelegate(); diff --git a/src/quick/items/qquicktextedit_p.h b/src/quick/items/qquicktextedit_p.h index 5f6317ab09..4dcb7f48d6 100644 --- a/src/quick/items/qquicktextedit_p.h +++ b/src/quick/items/qquicktextedit_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -80,7 +80,7 @@ class Q_AUTOTEST_EXPORT QQuickTextEdit : public QQuickImplicitSizeItem Q_PROPERTY(bool cursorVisible READ isCursorVisible WRITE setCursorVisible NOTIFY cursorVisibleChanged) Q_PROPERTY(int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged) Q_PROPERTY(QRect cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged) - Q_PROPERTY(QDeclarativeComponent* cursorDelegate READ cursorDelegate WRITE setCursorDelegate NOTIFY cursorDelegateChanged) + Q_PROPERTY(QQmlComponent* cursorDelegate READ cursorDelegate WRITE setCursorDelegate NOTIFY cursorDelegateChanged) Q_PROPERTY(int selectionStart READ selectionStart NOTIFY selectionStartChanged) Q_PROPERTY(int selectionEnd READ selectionEnd NOTIFY selectionEndChanged) Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectionChanged) @@ -172,8 +172,8 @@ class Q_AUTOTEST_EXPORT QQuickTextEdit : public QQuickImplicitSizeItem int cursorPosition() const; void setCursorPosition(int pos); - QDeclarativeComponent* cursorDelegate() const; - void setCursorDelegate(QDeclarativeComponent*); + QQmlComponent* cursorDelegate() const; + void setCursorDelegate(QQmlComponent*); int selectionStart() const; int selectionEnd() const; diff --git a/src/quick/items/qquicktextedit_p_p.h b/src/quick/items/qquicktextedit_p_p.h index d69e24f6bc..3004d5b833 100644 --- a/src/quick/items/qquicktextedit_p_p.h +++ b/src/quick/items/qquicktextedit_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -56,7 +56,7 @@ #include "qquicktextedit_p.h" #include "qquickimplicitsizeitem_p_p.h" -#include +#include QT_BEGIN_NAMESPACE class QTextLayout; @@ -121,7 +121,7 @@ class QQuickTextEditPrivate : public QQuickImplicitSizeItemPrivate qreal textMargin; int lastSelectionStart; int lastSelectionEnd; - QDeclarativeComponent* cursorComponent; + QQmlComponent* cursorComponent; QQuickItem* cursor; QQuickTextEdit::TextFormat format; QQuickTextDocumentWithImageResources *document; diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index 9b11e2e43a..ab5afa334d 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,9 +43,9 @@ #include "qquicktextinput_p_p.h" #include "qquickcanvas.h" -#include +#include -#include +#include #include #include #include "qquicktextnode_p.h" @@ -1215,16 +1215,16 @@ void QQuickTextInput::setInputMethodHints(Qt::InputMethodHints hints) needed, and the x property of delegate instance will be set so as to be one pixel before the top left of the current character. - Note that the root item of the delegate component must be a QDeclarativeItem or - QDeclarativeItem derived item. + Note that the root item of the delegate component must be a QQuickItem or + QQuickItem derived item. */ -QDeclarativeComponent* QQuickTextInput::cursorDelegate() const +QQmlComponent* QQuickTextInput::cursorDelegate() const { Q_D(const QQuickTextInput); return d->cursorComponent; } -void QQuickTextInput::setCursorDelegate(QDeclarativeComponent* c) +void QQuickTextInput::setCursorDelegate(QQmlComponent* c) { Q_D(QQuickTextInput); if (d->cursorComponent == c) @@ -1271,7 +1271,7 @@ void QQuickTextInput::createCursor() if (d->cursorItem) delete d->cursorItem; - QDeclarativeContext *creationContext = d->cursorComponent->creationContext(); + QQmlContext *creationContext = d->cursorComponent->creationContext(); QObject *object = d->cursorComponent->create(creationContext ? creationContext : qmlContext(this)); d->cursorItem = qobject_cast(object); if (!d->cursorItem) { @@ -1282,7 +1282,7 @@ void QQuickTextInput::createCursor() QRectF r = cursorRectangle(); - QDeclarative_setParent_noEvent(d->cursorItem, this); + QQml_setParent_noEvent(d->cursorItem, this); d->cursorItem->setParentItem(this); d->cursorItem->setPos(r.topLeft()); d->cursorItem->setHeight(r.height()); @@ -1332,7 +1332,7 @@ QRectF QQuickTextInput::positionToRectangle(int pos) const \endlist */ -void QQuickTextInput::positionAt(QDeclarativeV8Function *args) const +void QQuickTextInput::positionAt(QQmlV8Function *args) const { Q_D(const QQuickTextInput); diff --git a/src/quick/items/qquicktextinput_p.h b/src/quick/items/qquicktextinput_p.h index 0e60cf6ce4..8961dbc3e1 100644 --- a/src/quick/items/qquicktextinput_p.h +++ b/src/quick/items/qquicktextinput_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -77,7 +77,7 @@ class Q_AUTOTEST_EXPORT QQuickTextInput : public QQuickImplicitSizeItem Q_PROPERTY(bool cursorVisible READ isCursorVisible WRITE setCursorVisible NOTIFY cursorVisibleChanged) Q_PROPERTY(int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged) Q_PROPERTY(QRect cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged) - Q_PROPERTY(QDeclarativeComponent *cursorDelegate READ cursorDelegate WRITE setCursorDelegate NOTIFY cursorDelegateChanged) + Q_PROPERTY(QQmlComponent *cursorDelegate READ cursorDelegate WRITE setCursorDelegate NOTIFY cursorDelegateChanged) Q_PROPERTY(int selectionStart READ selectionStart NOTIFY selectionStartChanged) Q_PROPERTY(int selectionEnd READ selectionEnd NOTIFY selectionEndChanged) Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectedTextChanged) @@ -150,7 +150,7 @@ class Q_AUTOTEST_EXPORT QQuickTextInput : public QQuickImplicitSizeItem //Auxilliary functions needed to control the TextInput from QML - Q_INVOKABLE void positionAt(QDeclarativeV8Function *args) const; + Q_INVOKABLE void positionAt(QQmlV8Function *args) const; Q_INVOKABLE QRectF positionToRectangle(int pos) const; Q_INVOKABLE void moveCursorSelection(int pos); Q_INVOKABLE void moveCursorSelection(int pos, SelectionMode mode); @@ -220,8 +220,8 @@ class Q_AUTOTEST_EXPORT QQuickTextInput : public QQuickImplicitSizeItem QString displayText() const; - QDeclarativeComponent* cursorDelegate() const; - void setCursorDelegate(QDeclarativeComponent*); + QQmlComponent* cursorDelegate() const; + void setCursorDelegate(QQmlComponent*); bool focusOnPress() const; void setFocusOnPress(bool); diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h index e48b000e5c..2575694888 100644 --- a/src/quick/items/qquicktextinput_p_p.h +++ b/src/quick/items/qquicktextinput_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -46,7 +46,7 @@ #include "qquicktext_p.h" #include "qquickimplicitsizeitem_p_p.h" -#include +#include #include #include #include @@ -174,9 +174,9 @@ class Q_AUTOTEST_EXPORT QQuickTextInputPrivate : public QQuickImplicitSizeItemPr QPointF pressPos; QPointF tripleClickStartPoint; - QDeclarativeGuard cursorComponent; + QQmlGuard cursorComponent; #ifndef QT_NO_VALIDATOR - QDeclarativeGuard m_validator; + QQmlGuard m_validator; #endif QTextLayout m_textLayout; diff --git a/src/quick/items/qquicktextnode.cpp b/src/quick/items/qquicktextnode.cpp index a3daead6cb..5be4963809 100644 --- a/src/quick/items/qquicktextnode.cpp +++ b/src/quick/items/qquicktextnode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/quick/items/qquicktextnode_p.h b/src/quick/items/qquicktextnode_p.h index 9c2217bfd0..2ecd20d933 100644 --- a/src/quick/items/qquicktextnode_p.h +++ b/src/quick/items/qquicktextnode_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquicktranslate.cpp b/src/quick/items/qquicktranslate.cpp index a1a1f59173..6cfa7a0338 100644 --- a/src/quick/items/qquicktranslate.cpp +++ b/src/quick/items/qquicktranslate.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquicktranslate_p.h b/src/quick/items/qquicktranslate_p.h index 82901d7c6a..d2d8c3abc5 100644 --- a/src/quick/items/qquicktranslate_p.h +++ b/src/quick/items/qquicktranslate_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickview.cpp b/src/quick/items/qquickview.cpp index 76d82a4713..7d1411aa6e 100644 --- a/src/quick/items/qquickview.cpp +++ b/src/quick/items/qquickview.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -46,11 +46,11 @@ #include "qquickitem_p.h" #include "qquickitemchangelistener_p.h" -#include -#include +#include +#include -#include -#include +#include +#include #include @@ -62,8 +62,8 @@ void QQuickViewPrivate::init() engine.setIncubationController(q->incubationController()); - if (QDeclarativeDebugService::isDebuggingEnabled()) - QDeclarativeInspectorService::instance()->addView(q); + if (QQmlDebugService::isDebuggingEnabled()) + QQmlInspectorService::instance()->addView(q); } QQuickViewPrivate::QQuickViewPrivate() @@ -73,8 +73,8 @@ QQuickViewPrivate::QQuickViewPrivate() QQuickViewPrivate::~QQuickViewPrivate() { - if (QDeclarativeDebugService::isDebuggingEnabled()) - QDeclarativeInspectorService::instance()->removeView(q_func()); + if (QQmlDebugService::isDebuggingEnabled()) + QQmlInspectorService::instance()->removeView(q_func()); delete root; } @@ -91,11 +91,11 @@ void QQuickViewPrivate::execute() component = 0; } if (!source.isEmpty()) { - component = new QDeclarativeComponent(&engine, source, q); + component = new QQmlComponent(&engine, source, q); if (!component->isLoading()) { q->continueExecute(); } else { - QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), + QObject::connect(component, SIGNAL(statusChanged(QQmlComponent::Status)), q, SLOT(continueExecute())); } } @@ -120,7 +120,7 @@ void QQuickViewPrivate::itemGeometryChanged(QQuickItem *resizeItem, const QRectF This is a convenience subclass of QQuickCanvas which will automatically load and display a QML scene when given the URL of the main source file. Alternatively, - you can instantiate your own objects using QDeclarativeComponent and place them in a manually setup QQuickCanvas. + you can instantiate your own objects using QQmlComponent and place them in a manually setup QQuickCanvas. Typical usage: @@ -216,23 +216,23 @@ QUrl QQuickView::source() const } /*! - Returns a pointer to the QDeclarativeEngine used for instantiating + Returns a pointer to the QQmlEngine used for instantiating QML Components. */ -QDeclarativeEngine* QQuickView::engine() const +QQmlEngine* QQuickView::engine() const { Q_D(const QQuickView); - return const_cast(&d->engine); + return const_cast(&d->engine); } /*! This function returns the root of the context hierarchy. Each QML - component is instantiated in a QDeclarativeContext. QDeclarativeContext's are + component is instantiated in a QQmlContext. QQmlContext's are essential for passing data to QML components. In QML, contexts are arranged hierarchically and this hierarchy is managed by the - QDeclarativeEngine. + QQmlEngine. */ -QDeclarativeContext* QQuickView::rootContext() const +QQmlContext* QQuickView::rootContext() const { Q_D(const QQuickView); return d->engine.rootContext(); @@ -275,12 +275,12 @@ QQuickView::Status QQuickView::status() const Return the list of errors that occurred during the last compile or create operation. When the status is not Error, an empty list is returned. */ -QList QQuickView::errors() const +QList QQuickView::errors() const { Q_D(const QQuickView); if (d->component) return d->component->errors(); - return QList(); + return QList(); } /*! @@ -377,11 +377,11 @@ QQuickView::ResizeMode QQuickView::resizeMode() const void QQuickView::continueExecute() { Q_D(QQuickView); - disconnect(d->component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), this, SLOT(continueExecute())); + disconnect(d->component, SIGNAL(statusChanged(QQmlComponent::Status)), this, SLOT(continueExecute())); if (d->component->isError()) { - QList errorList = d->component->errors(); - foreach (const QDeclarativeError &error, errorList) { + QList errorList = d->component->errors(); + foreach (const QQmlError &error, errorList) { qWarning() << error; } emit statusChanged(status()); @@ -391,8 +391,8 @@ void QQuickView::continueExecute() QObject *obj = d->component->create(); if (d->component->isError()) { - QList errorList = d->component->errors(); - foreach (const QDeclarativeError &error, errorList) { + QList errorList = d->component->errors(); + foreach (const QQmlError &error, errorList) { qWarning() << error; } emit statusChanged(status()); @@ -422,7 +422,7 @@ void QQuickViewPrivate::setRootObject(QObject *obj) << "loaded has 'import QtQuick 1.0' or 'import Qt 4.7', this error will occur." << endl << endl << "To load files with 'import QtQuick 1.0' or 'import Qt 4.7', use the" << endl - << "QDeclarativeView class in the qtquick1 module." << endl; + << "QQuickView class in the qtquick1 module." << endl; delete obj; root = 0; } @@ -499,35 +499,35 @@ void QQuickView::resizeEvent(QResizeEvent *e) void QQuickView::keyPressEvent(QKeyEvent *e) { - QDeclarativeProfilerService::addEvent(QDeclarativeProfilerService::Key); + QQmlProfilerService::addEvent(QQmlProfilerService::Key); QQuickCanvas::keyPressEvent(e); } void QQuickView::keyReleaseEvent(QKeyEvent *e) { - QDeclarativeProfilerService::addEvent(QDeclarativeProfilerService::Key); + QQmlProfilerService::addEvent(QQmlProfilerService::Key); QQuickCanvas::keyReleaseEvent(e); } void QQuickView::mouseMoveEvent(QMouseEvent *e) { - QDeclarativeProfilerService::addEvent(QDeclarativeProfilerService::Mouse); + QQmlProfilerService::addEvent(QQmlProfilerService::Mouse); QQuickCanvas::mouseMoveEvent(e); } void QQuickView::mousePressEvent(QMouseEvent *e) { - QDeclarativeProfilerService::addEvent(QDeclarativeProfilerService::Mouse); + QQmlProfilerService::addEvent(QQmlProfilerService::Mouse); QQuickCanvas::mousePressEvent(e); } void QQuickView::mouseReleaseEvent(QMouseEvent *e) { - QDeclarativeProfilerService::addEvent(QDeclarativeProfilerService::Mouse); + QQmlProfilerService::addEvent(QQmlProfilerService::Mouse); QQuickCanvas::mouseReleaseEvent(e); } diff --git a/src/quick/items/qquickview.h b/src/quick/items/qquickview.h index 6f1b1f12cd..89cca506f7 100644 --- a/src/quick/items/qquickview.h +++ b/src/quick/items/qquickview.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,15 +44,15 @@ #include #include -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeEngine; -class QDeclarativeContext; -class QDeclarativeError; +class QQmlEngine; +class QQmlContext; +class QQmlError; class QQuickItem; class QQuickViewPrivate; @@ -70,8 +70,8 @@ class Q_QUICK_EXPORT QQuickView : public QQuickCanvas QUrl source() const; - QDeclarativeEngine* engine() const; - QDeclarativeContext* rootContext() const; + QQmlEngine* engine() const; + QQmlContext* rootContext() const; QQuickItem *rootObject() const; @@ -82,7 +82,7 @@ class Q_QUICK_EXPORT QQuickView : public QQuickCanvas enum Status { Null, Ready, Loading, Error }; Status status() const; - QList errors() const; + QList errors() const; QSize sizeHint() const; QSize initialSize() const; diff --git a/src/quick/items/qquickview_p.h b/src/quick/items/qquickview_p.h index 1dacf2f1ee..9b0e26e30d 100644 --- a/src/quick/items/qquickview_p.h +++ b/src/quick/items/qquickview_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include "qquickcanvas_p.h" #include "qquickitemchangelistener_p.h" @@ -57,10 +57,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeContext; -class QDeclarativeError; +class QQmlContext; +class QQmlError; class QQuickItem; -class QDeclarativeComponent; +class QQmlComponent; class QQuickViewPrivate : public QQuickCanvasPrivate, public QQuickItemChangeListener @@ -87,8 +87,8 @@ class QQuickViewPrivate : public QQuickCanvasPrivate, QUrl source; - QDeclarativeEngine engine; - QDeclarativeComponent *component; + QQmlEngine engine; + QQmlComponent *component; QBasicTimer resizetimer; QQuickView::ResizeMode resizeMode; diff --git a/src/quick/items/qquickvisualadaptormodel.cpp b/src/quick/items/qquickvisualadaptormodel.cpp index f504478a3d..fb85810984 100644 --- a/src/quick/items/qquickvisualadaptormodel.cpp +++ b/src/quick/items/qquickvisualadaptormodel.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,9 +42,9 @@ #include "qquickvisualadaptormodel_p.h" #include "qquickvisualdatamodel_p_p.h" -#include -#include -#include +#include +#include +#include #include #include #include @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE -class VDMDelegateDataType : public QDeclarativeRefCount +class VDMDelegateDataType : public QQmlRefCount { public: VDMDelegateDataType() @@ -86,7 +86,7 @@ class VDMDelegateDataType : public QDeclarativeRefCount } QMetaObject *metaObject; - QDeclarativePropertyCache *propertyCache; + QQmlPropertyCache *propertyCache; int propertyOffset; int signalOffset; bool shared : 1; @@ -166,10 +166,10 @@ class QQuickVisualAdaptorModelPrivate : public QObjectPrivate return 0; } - QDeclarativeGuard m_engine; - QDeclarativeGuard m_listModelInterface; - QDeclarativeGuard m_abstractItemModel; - QDeclarativeListAccessor *m_listAccessor; + QQmlGuard m_engine; + QQmlGuard m_listModelInterface; + QQmlGuard m_abstractItemModel; + QQuickListAccessor *m_listAccessor; VDMDelegateDataType *m_delegateDataType; CreateModelData createItem; StringValue stringValue; @@ -650,7 +650,7 @@ class QQuickVDMObjectDataMetaObject : public QQuickVisualDataModelItemMetaObject for (int i = previousPropertyCount; i < metaObject->propertyCount() - objectPropertyOffset; ++i) { QMetaProperty property = metaObject->property(i + objectPropertyOffset); if (property.hasNotifySignal()) { - QDeclarativePropertyPrivate::connect( + QQmlPropertyPrivate::connect( m_object, property.notifySignalIndex(), m_data, notifierId); ++notifierId; } @@ -658,7 +658,7 @@ class QQuickVDMObjectDataMetaObject : public QQuickVisualDataModelItemMetaObject return propertyIndex + m_type->propertyOffset - objectPropertyOffset; } - QDeclarativeGuard m_object; + QQmlGuard m_object; }; class QQuickVDMObjectData : public QQuickVisualDataModelItem, public QQuickVisualAdaptorModelProxyInterface @@ -712,7 +712,7 @@ void QQuickVisualAdaptorModelPrivate::createMetaObject() m_objectList = false; m_propertyData.clear(); - QV8Engine *v8Engine = QDeclarativeEnginePrivate::getV8Engine(m_engine); + QV8Engine *v8Engine = QQmlEnginePrivate::getV8Engine(m_engine); v8::HandleScope handleScope; v8::Context::Scope contextScope(v8Engine->context()); @@ -722,8 +722,8 @@ void QQuickVisualAdaptorModelPrivate::createMetaObject() v8::String::New("index"), QQuickVisualDataModelItemMetaObject::get_index); if (m_listAccessor - && m_listAccessor->type() != QDeclarativeListAccessor::ListProperty - && m_listAccessor->type() != QDeclarativeListAccessor::Instance) { + && m_listAccessor->type() != QQuickListAccessor::ListProperty + && m_listAccessor->type() != QQuickListAccessor::Instance) { createItem = &QQuickVDMListAccessorData::create; stringValue = &QQuickVDMListAccessorData::stringValue; ft->PrototypeTemplate()->SetAccessor( @@ -794,7 +794,7 @@ void QQuickVisualAdaptorModelPrivate::createMetaObject() } m_delegateDataType->metaObject = m_delegateDataType->builder.toMetaObject(); if (!m_objectList) { - m_delegateDataType->propertyCache = new QDeclarativePropertyCache( + m_delegateDataType->propertyCache = new QQmlPropertyCache( m_engine, m_delegateDataType->metaObject); m_constructor = qPersistentNew(ft->GetFunction()); } @@ -828,7 +828,7 @@ QVariant QQuickVisualAdaptorModel::model() const return d->m_modelVariant; } -void QQuickVisualAdaptorModel::setModel(const QVariant &model, QDeclarativeEngine *engine) +void QQuickVisualAdaptorModel::setModel(const QVariant &model, QQmlEngine *engine) { Q_D(QQuickVisualAdaptorModel); delete d->m_listAccessor; @@ -904,7 +904,7 @@ void QQuickVisualAdaptorModel::setModel(const QVariant &model, QDeclarativeEngin return; } - d->m_listAccessor = new QDeclarativeListAccessor; + d->m_listAccessor = new QQuickListAccessor; d->m_listAccessor->setList(model, d->m_engine); if ((d->m_count = d->m_listAccessor->count())) emit itemsInserted(0, d->m_count); @@ -964,7 +964,7 @@ QQuickVisualDataModelItem *QQuickVisualAdaptorModel::createItem(QQuickVisualData d->m_cache.insert(item); if (d->m_delegateDataType && d->m_delegateDataType->propertyCache) { - QDeclarativeData *qmldata = QDeclarativeData::get(item, true); + QQmlData *qmldata = QQmlData::get(item, true); qmldata->propertyCache = d->m_delegateDataType->propertyCache; qmldata->propertyCache->addref(); } diff --git a/src/quick/items/qquickvisualadaptormodel_p.h b/src/quick/items/qquickvisualadaptormodel_p.h index 9ae8325450..93de4b1126 100644 --- a/src/quick/items/qquickvisualadaptormodel_p.h +++ b/src/quick/items/qquickvisualadaptormodel_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -49,7 +49,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeEngine; +class QQmlEngine; class QQuickVisualDataModelItem; class QQuickVisualDataModelItemMetaType; @@ -72,7 +72,7 @@ class QQuickVisualAdaptorModel : public QObject Flags flags() const; QVariant model() const; - void setModel(const QVariant &, QDeclarativeEngine *); + void setModel(const QVariant &, QQmlEngine *); QVariant rootIndex() const; void setRootIndex(const QVariant &root); diff --git a/src/quick/items/qquickvisualdatamodel.cpp b/src/quick/items/qquickvisualdatamodel.cpp index 4fdcc98602..07ad3660be 100644 --- a/src/quick/items/qquickvisualdatamodel.cpp +++ b/src/quick/items/qquickvisualdatamodel.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,13 +42,13 @@ #include "qquickvisualdatamodel_p_p.h" #include "qquickitem.h" -#include +#include -#include +#include #include #include -#include -#include +#include +#include QT_BEGIN_NAMESPACE @@ -93,10 +93,10 @@ QHash QQuickVisualDataModelAttached::a The example below illustrates using a VisualDataModel with a ListView. - \snippet doc/src/snippets/declarative/visualdatamodel.qml 0 + \snippet doc/src/snippets/qml/visualdatamodel.qml 0 */ -QQuickVisualDataModelPrivate::QQuickVisualDataModelPrivate(QDeclarativeContext *ctxt) +QQuickVisualDataModelPrivate::QQuickVisualDataModelPrivate(QQmlContext *ctxt) : m_adaptorModel(0) , m_delegate(0) , m_cacheMetaType(0) @@ -153,7 +153,7 @@ QQuickVisualDataModel::QQuickVisualDataModel() d->init(); } -QQuickVisualDataModel::QQuickVisualDataModel(QDeclarativeContext *ctxt, QObject *parent) +QQuickVisualDataModel::QQuickVisualDataModel(QQmlContext *ctxt, QObject *parent) : QQuickVisualModel(*(new QQuickVisualDataModelPrivate(ctxt)), parent) { Q_D(QQuickVisualDataModel); @@ -223,7 +223,7 @@ void QQuickVisualDataModel::componentComplete() d->m_context = qmlContext(this); d->m_cacheMetaType = new QQuickVisualDataModelItemMetaType( - QDeclarativeEnginePrivate::getV8Engine(d->m_context->engine()), this, groupNames); + QQmlEnginePrivate::getV8Engine(d->m_context->engine()), this, groupNames); d->m_compositor.setGroupCount(d->m_groupCount); d->m_compositor.setDefaultGroups(defaultGroups); @@ -282,13 +282,13 @@ void QQuickVisualDataModel::setModel(const QVariant &model) The index is exposed as an accessible \c index property. Properties of the model are also available depending upon the type of \l {qmlmodels}{Data Model}. */ -QDeclarativeComponent *QQuickVisualDataModel::delegate() const +QQmlComponent *QQuickVisualDataModel::delegate() const { Q_D(const QQuickVisualDataModel); return d->m_delegate; } -void QQuickVisualDataModel::setDelegate(QDeclarativeComponent *delegate) +void QQuickVisualDataModel::setDelegate(QQmlComponent *delegate) { Q_D(QQuickVisualDataModel); if (d->m_transaction) { @@ -329,10 +329,10 @@ void QQuickVisualDataModel::setDelegate(QDeclarativeComponent *delegate) the new directory's contents. \c main.cpp: - \snippet doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp 0 + \snippet doc/src/snippets/qml/visualdatamodel_rootindex/main.cpp 0 \c view.qml: - \snippet doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml 0 + \snippet doc/src/snippets/qml/visualdatamodel_rootindex/view.qml 0 If the \l model is a QAbstractItemModel subclass, the delegate can also reference a \c hasModelChildren property (optionally qualified by a @@ -406,7 +406,7 @@ void QQuickVisualDataModelPrivate::destroy(QObject *object) { QObjectPrivate *p = QObjectPrivate::get(object); Q_ASSERT(p->declarativeData); - QDeclarativeData *data = static_cast(p->declarativeData); + QQmlData *data = static_cast(p->declarativeData); if (data->ownContext && data->context) data->context->clearContext(); object->deleteLater(); @@ -451,7 +451,7 @@ QQuickVisualDataModel::ReleaseFlags QQuickVisualDataModel::release(QQuickItem *i } void QQuickVisualDataModelPrivate::group_append( - QDeclarativeListProperty *property, QQuickVisualDataGroup *group) + QQmlListProperty *property, QQuickVisualDataGroup *group) { QQuickVisualDataModelPrivate *d = static_cast(property->data); if (d->m_complete) @@ -465,14 +465,14 @@ void QQuickVisualDataModelPrivate::group_append( } int QQuickVisualDataModelPrivate::group_count( - QDeclarativeListProperty *property) + QQmlListProperty *property) { QQuickVisualDataModelPrivate *d = static_cast(property->data); return d->m_groupCount - 1; } QQuickVisualDataGroup *QQuickVisualDataModelPrivate::group_at( - QDeclarativeListProperty *property, int index) + QQmlListProperty *property, int index) { QQuickVisualDataModelPrivate *d = static_cast(property->data); return index >= 0 && index < d->m_groupCount - 1 @@ -495,13 +495,13 @@ QQuickVisualDataGroup *QQuickVisualDataModelPrivate::group_at( The following example illustrates using groups to select items in a model. - \snippet doc/src/snippets/declarative/visualdatagroup.qml 0 + \snippet doc/src/snippets/qml/visualdatagroup.qml 0 */ -QDeclarativeListProperty QQuickVisualDataModel::groups() +QQmlListProperty QQuickVisualDataModel::groups() { Q_D(QQuickVisualDataModel); - return QDeclarativeListProperty( + return QQmlListProperty( this, d, QQuickVisualDataModelPrivate::group_append, @@ -587,7 +587,7 @@ void QQuickVisualDataModelPrivate::updateFilterGroup() if (!m_cacheMetaType) return; - QDeclarativeListCompositor::Group previousGroup = m_compositorGroup; + QQuickListCompositor::Group previousGroup = m_compositorGroup; m_compositorGroup = Compositor::Default; for (int i = 1; i < m_groupCount; ++i) { if (m_filterGroup == m_cacheMetaType->groupNames.at(i - 1)) { @@ -598,11 +598,11 @@ void QQuickVisualDataModelPrivate::updateFilterGroup() QQuickVisualDataGroupPrivate::get(m_groups[m_compositorGroup])->emitters.insert(this); if (m_compositorGroup != previousGroup) { - QVector removes; - QVector inserts; + QVector removes; + QVector inserts; m_compositor.transition(previousGroup, m_compositorGroup, &removes, &inserts); - QDeclarativeChangeSet changeSet; + QQuickChangeSet changeSet; changeSet.apply(removes, inserts); emit q->modelUpdated(changeSet, false); @@ -652,19 +652,19 @@ QObject *QQuickVisualDataModel::parts() return d->m_parts; } -void QQuickVisualDataModelPrivate::emitCreatedPackage(QQuickVisualDataModelItem *cacheItem, QDeclarativePackage *package) +void QQuickVisualDataModelPrivate::emitCreatedPackage(QQuickVisualDataModelItem *cacheItem, QQuickPackage *package) { for (int i = 1; i < m_groupCount; ++i) QQuickVisualDataGroupPrivate::get(m_groups[i])->createdPackage(cacheItem->index[i], package); } -void QQuickVisualDataModelPrivate::emitInitPackage(QQuickVisualDataModelItem *cacheItem, QDeclarativePackage *package) +void QQuickVisualDataModelPrivate::emitInitPackage(QQuickVisualDataModelItem *cacheItem, QQuickPackage *package) { for (int i = 1; i < m_groupCount; ++i) QQuickVisualDataGroupPrivate::get(m_groups[i])->initPackage(cacheItem->index[i], package); } -void QQuickVisualDataModelPrivate::emitDestroyingPackage(QDeclarativePackage *package) +void QQuickVisualDataModelPrivate::emitDestroyingPackage(QQuickPackage *package) { for (int i = 1; i < m_groupCount; ++i) QQuickVisualDataGroupPrivate::get(m_groups[i])->destroyingPackage(package); @@ -687,23 +687,23 @@ void QQuickVisualDataModelPrivate::releaseIncubator(QVDMIncubationTask *incubati } } -void QQuickVisualDataModelPrivate::incubatorStatusChanged(QVDMIncubationTask *incubationTask, QDeclarativeIncubator::Status status) +void QQuickVisualDataModelPrivate::incubatorStatusChanged(QVDMIncubationTask *incubationTask, QQmlIncubator::Status status) { Q_Q(QQuickVisualDataModel); - if (status != QDeclarativeIncubator::Ready && status != QDeclarativeIncubator::Error) + if (status != QQmlIncubator::Ready && status != QQmlIncubator::Error) return; QQuickVisualDataModelItem *cacheItem = incubationTask->incubating; cacheItem->incubationTask = 0; - if (status == QDeclarativeIncubator::Ready) { + if (status == QQmlIncubator::Ready) { incubationTask->incubating = 0; releaseIncubator(incubationTask); - if (QDeclarativePackage *package = qobject_cast(cacheItem->object)) + if (QQuickPackage *package = qobject_cast(cacheItem->object)) emitCreatedPackage(cacheItem, package); else if (QQuickItem *item = qobject_cast(cacheItem->object)) emitCreatedItem(cacheItem, item); - } else if (status == QDeclarativeIncubator::Error) { + } else if (status == QQmlIncubator::Error) { delete incubationTask->incubatingContext; incubationTask->incubatingContext = 0; if (!cacheItem->isReferenced()) { @@ -727,7 +727,7 @@ void QQuickVisualDataModelPrivate::setInitialState(QVDMIncubationTask *incubatio { QQuickVisualDataModelItem *cacheItem = incubationTask->incubating; cacheItem->object = o; - QDeclarative_setParent_noEvent(incubationTask->incubatingContext, cacheItem->object); + QQml_setParent_noEvent(incubationTask->incubatingContext, cacheItem->object); incubationTask->incubatingContext = 0; cacheItem->attached = QQuickVisualDataModelAttached::properties(cacheItem->object); @@ -735,7 +735,7 @@ void QQuickVisualDataModelPrivate::setInitialState(QVDMIncubationTask *incubatio new QQuickVisualDataModelAttachedMetaObject(cacheItem->attached, m_cacheMetaType); cacheItem->attached->emitChanges(); - if (QDeclarativePackage *package = qobject_cast(cacheItem->object)) + if (QQuickPackage *package = qobject_cast(cacheItem->object)) emitInitPackage(cacheItem, package); else if (QQuickItem *item = qobject_cast(cacheItem->object)) emitInitItem(cacheItem, item); @@ -771,13 +771,13 @@ QObject *QQuickVisualDataModelPrivate::object(Compositor::Group group, int index cacheItem->incubationTask->forceCompletion(); } } else if (!cacheItem->object) { - QVDMIncubationTask *incubator = new QVDMIncubationTask(this, asynchronous ? QDeclarativeIncubator::Asynchronous : QDeclarativeIncubator::AsynchronousIfNested); + QVDMIncubationTask *incubator = new QVDMIncubationTask(this, asynchronous ? QQmlIncubator::Asynchronous : QQmlIncubator::AsynchronousIfNested); cacheItem->incubationTask = incubator; - QDeclarativeContext *creationContext = m_delegate->creationContext(); - QDeclarativeContext *rootContext = new QQuickVisualDataModelContext( + QQmlContext *creationContext = m_delegate->creationContext(); + QQmlContext *rootContext = new QQuickVisualDataModelContext( cacheItem, creationContext ? creationContext : m_context.data()); - QDeclarativeContext *ctxt = rootContext; + QQmlContext *ctxt = rootContext; if (m_adaptorModel->flags() & QQuickVisualAdaptorModel::ProxiedObject) { if (QQuickVisualAdaptorModelProxyInterface *proxy = qobject_cast(cacheItem)) { ctxt->setContextObject(proxy->proxiedObject()); @@ -913,13 +913,13 @@ void QQuickVisualDataModelPrivate::itemsChanged(const QVector, Compositor::MaximumGroupCount> translatedChanges(m_groupCount); + QVarLengthArray, Compositor::MaximumGroupCount> translatedChanges(m_groupCount); foreach (const Compositor::Change &change, changes) { for (int i = 1; i < m_groupCount; ++i) { if (change.inGroup(i)) { translatedChanges[i].append( - QDeclarativeChangeSet::Change(change.index[i], change.count)); + QQuickChangeSet::Change(change.index[i], change.count)); } } } @@ -941,7 +941,7 @@ void QQuickVisualDataModel::_q_itemsChanged(int index, int count) void QQuickVisualDataModelPrivate::itemsInserted( const QVector &inserts, - QVarLengthArray, Compositor::MaximumGroupCount> *translatedInserts, + QVarLengthArray, Compositor::MaximumGroupCount> *translatedInserts, QHash > *movedItems) { int cacheIndex = 0; @@ -959,7 +959,7 @@ void QQuickVisualDataModelPrivate::itemsInserted( for (int i = 1; i < m_groupCount; ++i) { if (insert.inGroup(i)) { (*translatedInserts)[i].append( - QDeclarativeChangeSet::Insert(insert.index[i], insert.count, insert.moveId)); + QQuickChangeSet::Insert(insert.index[i], insert.count, insert.moveId)); inserted[i] += insert.count; } } @@ -995,7 +995,7 @@ void QQuickVisualDataModelPrivate::itemsInserted( void QQuickVisualDataModelPrivate::itemsInserted(const QVector &inserts) { - QVarLengthArray, Compositor::MaximumGroupCount> translatedInserts(m_groupCount); + QVarLengthArray, Compositor::MaximumGroupCount> translatedInserts(m_groupCount); itemsInserted(inserts, &translatedInserts); Q_ASSERT(m_cache.count() == m_compositor.count(Compositor::Cache)); if (!m_delegate) @@ -1019,7 +1019,7 @@ void QQuickVisualDataModel::_q_itemsInserted(int index, int count) void QQuickVisualDataModelPrivate::itemsRemoved( const QVector &removes, - QVarLengthArray, Compositor::MaximumGroupCount> *translatedRemoves, + QVarLengthArray, Compositor::MaximumGroupCount> *translatedRemoves, QHash > *movedItems) { int cacheIndex = 0; @@ -1038,7 +1038,7 @@ void QQuickVisualDataModelPrivate::itemsRemoved( for (int i = 1; i < m_groupCount; ++i) { if (remove.inGroup(i)) { (*translatedRemoves)[i].append( - QDeclarativeChangeSet::Remove(remove.index[i], remove.count, remove.moveId)); + QQuickChangeSet::Remove(remove.index[i], remove.count, remove.moveId)); removed[i] += remove.count; } } @@ -1056,7 +1056,7 @@ void QQuickVisualDataModelPrivate::itemsRemoved( QQuickVisualDataModelItem *cacheItem = m_cache.at(cacheIndex); if (remove.inGroup(Compositor::Persisted) && cacheItem->objectRef == 0 && cacheItem->object) { destroy(cacheItem->object); - if (QDeclarativePackage *package = qobject_cast(cacheItem->object)) + if (QQuickPackage *package = qobject_cast(cacheItem->object)) emitDestroyingPackage(package); else if (QQuickItem *item = qobject_cast(cacheItem->object)) emitDestroyingItem(item); @@ -1093,7 +1093,7 @@ void QQuickVisualDataModelPrivate::itemsRemoved( void QQuickVisualDataModelPrivate::itemsRemoved(const QVector &removes) { - QVarLengthArray, Compositor::MaximumGroupCount> translatedRemoves(m_groupCount); + QVarLengthArray, Compositor::MaximumGroupCount> translatedRemoves(m_groupCount); itemsRemoved(removes, &translatedRemoves); Q_ASSERT(m_cache.count() == m_compositor.count(Compositor::Cache)); if (!m_delegate) @@ -1121,10 +1121,10 @@ void QQuickVisualDataModelPrivate::itemsMoved( { QHash > movedItems; - QVarLengthArray, Compositor::MaximumGroupCount> translatedRemoves(m_groupCount); + QVarLengthArray, Compositor::MaximumGroupCount> translatedRemoves(m_groupCount); itemsRemoved(removes, &translatedRemoves, &movedItems); - QVarLengthArray, Compositor::MaximumGroupCount> translatedInserts(m_groupCount); + QVarLengthArray, Compositor::MaximumGroupCount> translatedInserts(m_groupCount); itemsInserted(inserts, &translatedInserts, &movedItems); Q_ASSERT(m_cache.count() == m_compositor.count(Compositor::Cache)); Q_ASSERT(movedItems.isEmpty()); @@ -1169,7 +1169,7 @@ QQuickVisualDataModelPrivate::buildChangeList(const QVector &changes) return indexes; } -void QQuickVisualDataModelPrivate::emitModelUpdated(const QDeclarativeChangeSet &changeSet, bool reset) +void QQuickVisualDataModelPrivate::emitModelUpdated(const QQuickChangeSet &changeSet, bool reset) { Q_Q(QQuickVisualDataModel); emit q->modelUpdated(changeSet, reset); @@ -1183,7 +1183,7 @@ void QQuickVisualDataModelPrivate::emitChanges() return; m_transaction = true; - QV8Engine *engine = QDeclarativeEnginePrivate::getV8Engine(m_context->engine()); + QV8Engine *engine = QQmlEnginePrivate::getV8Engine(m_context->engine()); for (int i = 1; i < m_groupCount; ++i) QQuickVisualDataGroupPrivate::get(m_groups[i])->emitChanges(engine); m_transaction = false; @@ -1714,14 +1714,14 @@ void QQuickVisualDataGroupPrivate::setModel(QQuickVisualDataModel *m, Compositor void QQuickVisualDataGroupPrivate::emitChanges(QV8Engine *engine) { Q_Q(QQuickVisualDataGroup); - static int idx = signalIndex("changed(QDeclarativeV8Handle,QDeclarativeV8Handle)"); + static int idx = signalIndex("changed(QQmlV8Handle,QQmlV8Handle)"); if (isSignalConnected(idx) && !changeSet.isEmpty()) { v8::HandleScope handleScope; v8::Context::Scope contextScope(engine->context()); v8::Local removed = QQuickVisualDataModelPrivate::buildChangeList(changeSet.removes()); v8::Local inserted = QQuickVisualDataModelPrivate::buildChangeList(changeSet.inserts()); emit q->changed( - QDeclarativeV8Handle::fromHandle(removed), QDeclarativeV8Handle::fromHandle(inserted)); + QQmlV8Handle::fromHandle(removed), QQmlV8Handle::fromHandle(inserted)); } if (changeSet.difference() != 0) emit q->countChanged(); @@ -1734,19 +1734,19 @@ void QQuickVisualDataGroupPrivate::emitModelUpdated(bool reset) changeSet.clear(); } -void QQuickVisualDataGroupPrivate::createdPackage(int index, QDeclarativePackage *package) +void QQuickVisualDataGroupPrivate::createdPackage(int index, QQuickPackage *package) { for (QQuickVisualDataGroupEmitterList::iterator it = emitters.begin(); it != emitters.end(); ++it) it->createdPackage(index, package); } -void QQuickVisualDataGroupPrivate::initPackage(int index, QDeclarativePackage *package) +void QQuickVisualDataGroupPrivate::initPackage(int index, QQuickPackage *package) { for (QQuickVisualDataGroupEmitterList::iterator it = emitters.begin(); it != emitters.end(); ++it) it->initPackage(index, package); } -void QQuickVisualDataGroupPrivate::destroyingPackage(QDeclarativePackage *package) +void QQuickVisualDataGroupPrivate::destroyingPackage(QQuickPackage *package) { for (QQuickVisualDataGroupEmitterList::iterator it = emitters.begin(); it != emitters.end(); ++it) it->destroyingPackage(package); @@ -1867,16 +1867,16 @@ void QQuickVisualDataGroup::setDefaultInclude(bool include) \endlist */ -QDeclarativeV8Handle QQuickVisualDataGroup::get(int index) +QQmlV8Handle QQuickVisualDataGroup::get(int index) { Q_D(QQuickVisualDataGroup); if (!d->model) - return QDeclarativeV8Handle::fromHandle(v8::Undefined());; + return QQmlV8Handle::fromHandle(v8::Undefined());; QQuickVisualDataModelPrivate *model = QQuickVisualDataModelPrivate::get(d->model); if (index < 0 || index >= model->m_compositor.count(d->group)) { qmlInfo(this) << tr("get: index out of range"); - return QDeclarativeV8Handle::fromHandle(v8::Undefined()); + return QQmlV8Handle::fromHandle(v8::Undefined()); } Compositor::iterator it = model->m_compositor.find(d->group, index); @@ -1902,7 +1902,7 @@ QDeclarativeV8Handle QQuickVisualDataGroup::get(int index) ++cacheItem->scriptRef; } - return QDeclarativeV8Handle::fromHandle(cacheItem->indexHandle); + return QQmlV8Handle::fromHandle(cacheItem->indexHandle); } bool QQuickVisualDataGroupPrivate::parseIndex( @@ -1925,7 +1925,7 @@ bool QQuickVisualDataGroupPrivate::parseIndex( return false; } -void QQuickVisualDataGroup::insert(QDeclarativeV8Function *args) +void QQuickVisualDataGroup::insert(QQmlV8Function *args) { Q_D(QQuickVisualDataGroup); QQuickVisualDataModelPrivate *model = QQuickVisualDataModelPrivate::get(d->model); @@ -1975,7 +1975,7 @@ void QQuickVisualDataGroup::insert(QDeclarativeV8Function *args) group remain instantiated when not referenced by any view. */ -void QQuickVisualDataGroup::create(QDeclarativeV8Function *args) +void QQuickVisualDataGroup::create(QQmlV8Function *args) { Q_D(QQuickVisualDataGroup); if (!d->model) @@ -2030,7 +2030,7 @@ void QQuickVisualDataGroup::create(QDeclarativeV8Function *args) model->emitChanges(); } -void QQuickVisualDataGroup::resolve(QDeclarativeV8Function *args) +void QQuickVisualDataGroup::resolve(QQmlV8Function *args) { Q_D(QQuickVisualDataGroup); if (!d->model) @@ -2130,7 +2130,7 @@ void QQuickVisualDataGroup::resolve(QDeclarativeV8Function *args) Removes \a count items starting at \a index from the group. */ -void QQuickVisualDataGroup::remove(QDeclarativeV8Function *args) +void QQuickVisualDataGroup::remove(QQmlV8Function *args) { Q_D(QQuickVisualDataGroup); if (!d->model) @@ -2169,7 +2169,7 @@ void QQuickVisualDataGroup::remove(QDeclarativeV8Function *args) } bool QQuickVisualDataGroupPrivate::parseGroupArgs( - QDeclarativeV8Function *args, Compositor::Group *group, int *index, int *count, int *groups) const + QQmlV8Function *args, Compositor::Group *group, int *index, int *count, int *groups) const { if (!model || !QQuickVisualDataModelPrivate::get(model)->m_cacheMetaType) return false; @@ -2202,7 +2202,7 @@ bool QQuickVisualDataGroupPrivate::parseGroupArgs( Adds \a count items starting at \a index to \a groups. */ -void QQuickVisualDataGroup::addGroups(QDeclarativeV8Function *args) +void QQuickVisualDataGroup::addGroups(QQmlV8Function *args) { Q_D(QQuickVisualDataGroup); Compositor::Group group = d->group; @@ -2232,7 +2232,7 @@ void QQuickVisualDataGroup::addGroups(QDeclarativeV8Function *args) Removes \a count items starting at \a index from \a groups. */ -void QQuickVisualDataGroup::removeGroups(QDeclarativeV8Function *args) +void QQuickVisualDataGroup::removeGroups(QQmlV8Function *args) { Q_D(QQuickVisualDataGroup); Compositor::Group group = d->group; @@ -2262,7 +2262,7 @@ void QQuickVisualDataGroup::removeGroups(QDeclarativeV8Function *args) Sets the \a groups \a count items starting at \a index belong to. */ -void QQuickVisualDataGroup::setGroups(QDeclarativeV8Function *args) +void QQuickVisualDataGroup::setGroups(QQmlV8Function *args) { Q_D(QQuickVisualDataGroup); Compositor::Group group = d->group; @@ -2298,7 +2298,7 @@ void QQuickVisualDataGroup::setGroups(QDeclarativeV8Function *args) Moves \a count at \a from in a group \a to a new position. */ -void QQuickVisualDataGroup::move(QDeclarativeV8Function *args) +void QQuickVisualDataGroup::move(QQmlV8Function *args) { Q_D(QQuickVisualDataGroup); @@ -2424,7 +2424,7 @@ void QQuickVisualPartsModel::updateFilterGroup() m_filterGroup = model->m_filterGroup; } - QDeclarativeListCompositor::Group previousGroup = m_compositorGroup; + QQuickListCompositor::Group previousGroup = m_compositorGroup; m_compositorGroup = Compositor::Default; QQuickVisualDataGroupPrivate::get(model->m_groups[Compositor::Default])->emitters.insert(this); for (int i = 1; i < model->m_groupCount; ++i) { @@ -2436,11 +2436,11 @@ void QQuickVisualPartsModel::updateFilterGroup() QQuickVisualDataGroupPrivate::get(model->m_groups[m_compositorGroup])->emitters.insert(this); if (m_compositorGroup != previousGroup) { - QVector removes; - QVector inserts; + QVector removes; + QVector inserts; model->m_compositor.transition(previousGroup, m_compositorGroup, &removes, &inserts); - QDeclarativeChangeSet changeSet; + QQuickChangeSet changeSet; changeSet.apply(removes, inserts); if (!changeSet.isEmpty()) emit modelUpdated(changeSet, false); @@ -2451,7 +2451,7 @@ void QQuickVisualPartsModel::updateFilterGroup() } void QQuickVisualPartsModel::updateFilterGroup( - Compositor::Group group, const QDeclarativeChangeSet &changeSet) + Compositor::Group group, const QQuickChangeSet &changeSet) { if (!m_inheritGroup) return; @@ -2492,7 +2492,7 @@ QQuickItem *QQuickVisualPartsModel::item(int index, bool asynchronous) QObject *object = model->object(m_compositorGroup, index, asynchronous, true); - if (QDeclarativePackage *package = qobject_cast(object)) { + if (QQuickPackage *package = qobject_cast(object)) { QObject *part = package->part(m_part); if (!part) return 0; @@ -2516,10 +2516,10 @@ QQuickVisualModel::ReleaseFlags QQuickVisualPartsModel::release(QQuickItem *item { QQuickVisualModel::ReleaseFlags flags = 0; - QHash::iterator it = m_packaged.find(item); + QHash::iterator it = m_packaged.find(item); if (it != m_packaged.end()) { - QDeclarativePackage *package = *it; - QDeclarative_setParent_noEvent(item, package); + QQuickPackage *package = *it; + QQml_setParent_noEvent(item, package); QQuickVisualDataModelPrivate *model = QQuickVisualDataModelPrivate::get(m_model); flags = model->release(package); m_packaged.erase(it); @@ -2545,7 +2545,7 @@ void QQuickVisualPartsModel::setWatchedRoles(QList roles) int QQuickVisualPartsModel::indexOf(QQuickItem *item, QObject *) const { - QHash::const_iterator it = m_packaged.find(item); + QHash::const_iterator it = m_packaged.find(item); if (it != m_packaged.end()) { if (QQuickVisualDataModelAttached *attached = QQuickVisualDataModelAttached::properties(*it)) return attached->m_cacheItem->index[m_compositorGroup]; @@ -2553,29 +2553,29 @@ int QQuickVisualPartsModel::indexOf(QQuickItem *item, QObject *) const return -1; } -void QQuickVisualPartsModel::createdPackage(int index, QDeclarativePackage *package) +void QQuickVisualPartsModel::createdPackage(int index, QQuickPackage *package) { if (QQuickItem *item = qobject_cast(package->part(m_part))) emit createdItem(index, item); } -void QQuickVisualPartsModel::initPackage(int index, QDeclarativePackage *package) +void QQuickVisualPartsModel::initPackage(int index, QQuickPackage *package) { if (QQuickItem *item = qobject_cast(package->part(m_part))) emit initItem(index, item); } -void QQuickVisualPartsModel::destroyingPackage(QDeclarativePackage *package) +void QQuickVisualPartsModel::destroyingPackage(QQuickPackage *package) { if (QQuickItem *item = qobject_cast(package->part(m_part))) { Q_ASSERT(!m_packaged.contains(item)); emit destroyingItem(item); item->setParentItem(0); - QDeclarative_setParent_noEvent(item, package); + QQml_setParent_noEvent(item, package); } } -void QQuickVisualPartsModel::emitModelUpdated(const QDeclarativeChangeSet &changeSet, bool reset) +void QQuickVisualPartsModel::emitModelUpdated(const QQuickChangeSet &changeSet, bool reset) { emit modelUpdated(changeSet, reset); if (changeSet.difference() != 0) diff --git a/src/quick/items/qquickvisualdatamodel_p.h b/src/quick/items/qquickvisualdatamodel_p.h index 54cc16d660..ee90d528f4 100644 --- a/src/quick/items/qquickvisualdatamodel_p.h +++ b/src/quick/items/qquickvisualdatamodel_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,7 +42,7 @@ #ifndef QQUICKVISUALDATAMODEL_P_H #define QQUICKVISUALDATAMODEL_P_H -#include +#include #include #include @@ -50,7 +50,7 @@ #include -#include +#include QT_BEGIN_HEADER @@ -58,33 +58,33 @@ Q_DECLARE_METATYPE(QModelIndex) QT_BEGIN_NAMESPACE -class QDeclarativeChangeSet; -class QDeclarativeComponent; -class QDeclarativePackage; -class QDeclarativeV8Function; +class QQuickChangeSet; +class QQmlComponent; +class QQuickPackage; +class QQmlV8Function; class QQuickVisualDataGroup; class QQuickVisualDataModelAttached; class QQuickVisualDataModelPrivate; -class Q_QUICK_EXPORT QQuickVisualDataModel : public QQuickVisualModel, public QDeclarativeParserStatus +class Q_QUICK_EXPORT QQuickVisualDataModel : public QQuickVisualModel, public QQmlParserStatus { Q_OBJECT Q_DECLARE_PRIVATE(QQuickVisualDataModel) Q_PROPERTY(QVariant model READ model WRITE setModel) - Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate) Q_PROPERTY(QString filterOnGroup READ filterGroup WRITE setFilterGroup NOTIFY filterGroupChanged RESET resetFilterGroup) Q_PROPERTY(QQuickVisualDataGroup *items READ items CONSTANT) Q_PROPERTY(QQuickVisualDataGroup *persistedItems READ persistedItems CONSTANT) - Q_PROPERTY(QDeclarativeListProperty groups READ groups CONSTANT) + Q_PROPERTY(QQmlListProperty groups READ groups CONSTANT) Q_PROPERTY(QObject *parts READ parts CONSTANT) Q_PROPERTY(QVariant rootIndex READ rootIndex WRITE setRootIndex NOTIFY rootIndexChanged) Q_CLASSINFO("DefaultProperty", "delegate") - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) public: QQuickVisualDataModel(); - QQuickVisualDataModel(QDeclarativeContext *, QObject *parent=0); + QQuickVisualDataModel(QQmlContext *, QObject *parent=0); virtual ~QQuickVisualDataModel(); void classBegin(); @@ -93,8 +93,8 @@ class Q_QUICK_EXPORT QQuickVisualDataModel : public QQuickVisualModel, public QD QVariant model() const; void setModel(const QVariant &); - QDeclarativeComponent *delegate() const; - void setDelegate(QDeclarativeComponent *); + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *); QVariant rootIndex() const; void setRootIndex(const QVariant &root); @@ -117,7 +117,7 @@ class Q_QUICK_EXPORT QQuickVisualDataModel : public QQuickVisualModel, public QD QQuickVisualDataGroup *items(); QQuickVisualDataGroup *persistedItems(); - QDeclarativeListProperty groups(); + QQmlListProperty groups(); QObject *parts(); bool event(QEvent *); @@ -159,23 +159,23 @@ class Q_AUTOTEST_EXPORT QQuickVisualDataGroup : public QObject bool defaultInclude() const; void setDefaultInclude(bool include); - Q_INVOKABLE QDeclarativeV8Handle get(int index); + Q_INVOKABLE QQmlV8Handle get(int index); public Q_SLOTS: - void insert(QDeclarativeV8Function *); - void create(QDeclarativeV8Function *); - void resolve(QDeclarativeV8Function *); - void remove(QDeclarativeV8Function *); - void addGroups(QDeclarativeV8Function *); - void removeGroups(QDeclarativeV8Function *); - void setGroups(QDeclarativeV8Function *); - void move(QDeclarativeV8Function *); + void insert(QQmlV8Function *); + void create(QQmlV8Function *); + void resolve(QQmlV8Function *); + void remove(QQmlV8Function *); + void addGroups(QQmlV8Function *); + void removeGroups(QQmlV8Function *); + void setGroups(QQmlV8Function *); + void move(QQmlV8Function *); Q_SIGNALS: void countChanged(); void nameChanged(); void defaultIncludeChanged(); - void changed(const QDeclarativeV8Handle &removed, const QDeclarativeV8Handle &inserted); + void changed(const QQmlV8Handle &removed, const QQmlV8Handle &inserted); private: Q_DECLARE_PRIVATE(QQuickVisualDataGroup) }; @@ -194,7 +194,7 @@ class QQuickVisualDataModelAttached : public QObject , m_previousGroups(0) , m_modelChanged(false) { - QDeclarative_setParent_noEvent(this, parent); + QQml_setParent_noEvent(this, parent); } ~QQuickVisualDataModelAttached() { attachedProperties.remove(parent()); } @@ -229,7 +229,7 @@ class QQuickVisualDataModelAttached : public QObject public: QQuickVisualDataModelItem *m_cacheItem; int m_previousGroups; - int m_previousIndex[QDeclarativeListCompositor::MaximumGroupCount]; + int m_previousIndex[QQuickListCompositor::MaximumGroupCount]; bool m_modelChanged; static QHash attachedProperties; diff --git a/src/quick/items/qquickvisualdatamodel_p_p.h b/src/quick/items/qquickvisualdatamodel_p_p.h index 1fb23d78bb..c53ed5bdbb 100644 --- a/src/quick/items/qquickvisualdatamodel_p_p.h +++ b/src/quick/items/qquickvisualdatamodel_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,10 +44,10 @@ #include "qquickvisualdatamodel_p.h" -#include -#include +#include +#include -#include +#include // // W A R N I N G @@ -62,9 +62,9 @@ QT_BEGIN_NAMESPACE -typedef QDeclarativeListCompositor Compositor; +typedef QQuickListCompositor Compositor; -class QQuickVisualDataModelItemMetaType : public QDeclarativeRefCount +class QQuickVisualDataModelItemMetaType : public QQmlRefCount { public: QQuickVisualDataModelItemMetaType(QV8Engine *engine, QQuickVisualDataModel *model, const QStringList &groupNames); @@ -85,7 +85,7 @@ class QQuickVisualDataModelItemMetaType : public QDeclarativeRefCount v8::Local, v8::Local value, const v8::AccessorInfo &info); static v8::Handle get_index(v8::Local, const v8::AccessorInfo &info); - QDeclarativeGuard model; + QQmlGuard model; const int groupCount; const int memberPropertyOffset; const int indexPropertyOffset; @@ -136,8 +136,8 @@ class QQuickVisualDataModelItem : public QObject, public QV8ObjectResource public: QQuickVisualDataModelItemMetaType * const metaType; - QDeclarativeGuard model; - QDeclarativeGuard object; + QQmlGuard model; + QQmlGuard object; QQuickVisualDataModelAttached *attached; v8::Persistent indexHandle; v8::Persistent modelHandle; @@ -145,17 +145,17 @@ class QQuickVisualDataModelItem : public QObject, public QV8ObjectResource int objectRef; int scriptRef; int groups; - int index[QDeclarativeListCompositor::MaximumGroupCount]; + int index[QQuickListCompositor::MaximumGroupCount]; QVDMIncubationTask *incubationTask; }; class QQuickVisualDataModelPrivate; -class QVDMIncubationTask : public QDeclarativeIncubator +class QVDMIncubationTask : public QQmlIncubator { public: QVDMIncubationTask(QQuickVisualDataModelPrivate *l, IncubationMode mode) - : QDeclarativeIncubator(mode) + : QQmlIncubator(mode) , incubating(0) , incubatingContext(0) , vdm(l) {} @@ -164,7 +164,7 @@ class QVDMIncubationTask : public QDeclarativeIncubator virtual void setInitialState(QObject *); QQuickVisualDataModelItem *incubating; - QDeclarativeContext *incubatingContext; + QQmlContext *incubatingContext; private: QQuickVisualDataModelPrivate *vdm; @@ -174,10 +174,10 @@ class QVDMIncubationTask : public QDeclarativeIncubator class QQuickVisualDataGroupEmitter { public: - virtual void emitModelUpdated(const QDeclarativeChangeSet &changeSet, bool reset) = 0; - virtual void createdPackage(int, QDeclarativePackage *) {} - virtual void initPackage(int, QDeclarativePackage *) {} - virtual void destroyingPackage(QDeclarativePackage *) {} + virtual void emitModelUpdated(const QQuickChangeSet &changeSet, bool reset) = 0; + virtual void createdPackage(int, QQuickPackage *) {} + virtual void initPackage(int, QQuickPackage *) {} + virtual void destroyingPackage(QQuickPackage *) {} QIntrusiveListNode emitterNode; }; @@ -198,18 +198,18 @@ class QQuickVisualDataGroupPrivate : public QObjectPrivate void emitChanges(QV8Engine *engine); void emitModelUpdated(bool reset); - void createdPackage(int index, QDeclarativePackage *package); - void initPackage(int index, QDeclarativePackage *package); - void destroyingPackage(QDeclarativePackage *package); + void createdPackage(int index, QQuickPackage *package); + void initPackage(int index, QQuickPackage *package); + void destroyingPackage(QQuickPackage *package); bool parseIndex(const v8::Local &value, int *index, Compositor::Group *group) const; bool parseGroupArgs( - QDeclarativeV8Function *args, Compositor::Group *group, int *index, int *count, int *groups) const; + QQmlV8Function *args, Compositor::Group *group, int *index, int *count, int *groups) const; Compositor::Group group; - QDeclarativeGuard model; + QQmlGuard model; QQuickVisualDataGroupEmitterList emitters; - QDeclarativeChangeSet changeSet; + QQuickChangeSet changeSet; QString name; bool defaultInclude; }; @@ -220,7 +220,7 @@ class QQuickVisualDataModelPrivate : public QObjectPrivate, public QQuickVisualD { Q_DECLARE_PUBLIC(QQuickVisualDataModel) public: - QQuickVisualDataModelPrivate(QDeclarativeContext *); + QQuickVisualDataModelPrivate(QQmlContext *); ~QQuickVisualDataModelPrivate(); static QQuickVisualDataModelPrivate *get(QQuickVisualDataModel *m) { @@ -234,13 +234,13 @@ class QQuickVisualDataModelPrivate : public QObjectPrivate, public QQuickVisualD void destroy(QObject *object); QQuickVisualDataModel::ReleaseFlags release(QObject *object); QString stringValue(Compositor::Group group, int index, const QString &name); - void emitCreatedPackage(QQuickVisualDataModelItem *cacheItem, QDeclarativePackage *package); - void emitInitPackage(QQuickVisualDataModelItem *cacheItem, QDeclarativePackage *package); + void emitCreatedPackage(QQuickVisualDataModelItem *cacheItem, QQuickPackage *package); + void emitInitPackage(QQuickVisualDataModelItem *cacheItem, QQuickPackage *package); void emitCreatedItem(QQuickVisualDataModelItem *cacheItem, QQuickItem *item) { emit q_func()->createdItem(cacheItem->index[m_compositorGroup], item); } void emitInitItem(QQuickVisualDataModelItem *cacheItem, QQuickItem *item) { emit q_func()->initItem(cacheItem->index[m_compositorGroup], item); } - void emitDestroyingPackage(QDeclarativePackage *package); + void emitDestroyingPackage(QQuickPackage *package); void emitDestroyingItem(QQuickItem *item) { emit q_func()->destroyingItem(item); } void updateFilterGroup(); @@ -251,12 +251,12 @@ class QQuickVisualDataModelPrivate : public QObjectPrivate, public QQuickVisualD void itemsInserted( const QVector &inserts, - QVarLengthArray, Compositor::MaximumGroupCount> *translatedInserts, + QVarLengthArray, Compositor::MaximumGroupCount> *translatedInserts, QHash > *movedItems = 0); void itemsInserted(const QVector &inserts); void itemsRemoved( const QVector &removes, - QVarLengthArray, Compositor::MaximumGroupCount> *translatedRemoves, + QVarLengthArray, Compositor::MaximumGroupCount> *translatedRemoves, QHash > *movedItems = 0); void itemsRemoved(const QVector &removes); void itemsMoved( @@ -264,29 +264,29 @@ class QQuickVisualDataModelPrivate : public QObjectPrivate, public QQuickVisualD void itemsChanged(const QVector &changes); template static v8::Local buildChangeList(const QVector &changes); void emitChanges(); - void emitModelUpdated(const QDeclarativeChangeSet &changeSet, bool reset); + void emitModelUpdated(const QQuickChangeSet &changeSet, bool reset); bool insert(Compositor::insert_iterator &before, const v8::Local &object, int groups); - static void group_append(QDeclarativeListProperty *property, QQuickVisualDataGroup *group); - static int group_count(QDeclarativeListProperty *property); - static QQuickVisualDataGroup *group_at(QDeclarativeListProperty *property, int index); + static void group_append(QQmlListProperty *property, QQuickVisualDataGroup *group); + static int group_count(QQmlListProperty *property); + static QQuickVisualDataGroup *group_at(QQmlListProperty *property, int index); void releaseIncubator(QVDMIncubationTask *incubationTask); - void incubatorStatusChanged(QVDMIncubationTask *incubationTask, QDeclarativeIncubator::Status status); + void incubatorStatusChanged(QVDMIncubationTask *incubationTask, QQmlIncubator::Status status); void setInitialState(QVDMIncubationTask *incubationTask, QObject *o); QQuickVisualAdaptorModel *m_adaptorModel; - QDeclarativeComponent *m_delegate; + QQmlComponent *m_delegate; QQuickVisualDataModelItemMetaType *m_cacheMetaType; - QDeclarativeGuard m_context; + QQmlGuard m_context; QList m_cache; QQuickVisualDataModelParts *m_parts; QQuickVisualDataGroupEmitterList m_pendingParts; - QDeclarativeListCompositor m_compositor; - QDeclarativeListCompositor::Group m_compositorGroup; + QQuickListCompositor m_compositor; + QQuickListCompositor::Group m_compositorGroup; bool m_complete : 1; bool m_delegateValidated : 1; bool m_reset : 1; @@ -321,7 +321,7 @@ class QQuickVisualPartsModel : public QQuickVisualModel, public QQuickVisualData void setFilterGroup(const QString &group); void resetFilterGroup(); void updateFilterGroup(); - void updateFilterGroup(Compositor::Group group, const QDeclarativeChangeSet &changeSet); + void updateFilterGroup(Compositor::Group group, const QQuickChangeSet &changeSet); int count() const; bool isValid() const; @@ -332,18 +332,18 @@ class QQuickVisualPartsModel : public QQuickVisualModel, public QQuickVisualData int indexOf(QQuickItem *item, QObject *objectContext) const; - void emitModelUpdated(const QDeclarativeChangeSet &changeSet, bool reset); + void emitModelUpdated(const QQuickChangeSet &changeSet, bool reset); - void createdPackage(int index, QDeclarativePackage *package); - void initPackage(int index, QDeclarativePackage *package); - void destroyingPackage(QDeclarativePackage *package); + void createdPackage(int index, QQuickPackage *package); + void initPackage(int index, QQuickPackage *package); + void destroyingPackage(QQuickPackage *package); Q_SIGNALS: void filterGroupChanged(); private: QQuickVisualDataModel *m_model; - QHash m_packaged; + QHash m_packaged; QString m_part; QString m_filterGroup; QList m_watchedRoles; @@ -353,11 +353,11 @@ class QQuickVisualPartsModel : public QQuickVisualModel, public QQuickVisualData class QMetaPropertyBuilder; -class QQuickVisualDataModelPartsMetaObject : public QDeclarativeOpenMetaObject +class QQuickVisualDataModelPartsMetaObject : public QQmlOpenMetaObject { public: QQuickVisualDataModelPartsMetaObject(QObject *parent) - : QDeclarativeOpenMetaObject(parent) {} + : QQmlOpenMetaObject(parent) {} virtual void propertyCreated(int, QMetaPropertyBuilder &); virtual QVariant initialValue(int); @@ -387,15 +387,15 @@ class QQuickVisualDataModelAttachedMetaObject : public QAbstractDynamicMetaObjec QQuickVisualDataModelItemMetaType *metaType; }; -class QQuickVisualDataModelContext : public QDeclarativeContext +class QQuickVisualDataModelContext : public QQmlContext { Q_OBJECT public: QQuickVisualDataModelContext( QQuickVisualDataModelItem *cacheItem, - QDeclarativeContext *parentContext, + QQmlContext *parentContext, QObject *parent = 0) - : QDeclarativeContext(parentContext, parent) + : QQmlContext(parentContext, parent) , cacheItem(cacheItem) { ++cacheItem->scriptRef; diff --git a/src/quick/items/qquickvisualitemmodel.cpp b/src/quick/items/qquickvisualitemmodel.cpp index 2a24e3946c..b1fce55d7d 100644 --- a/src/quick/items/qquickvisualitemmodel.cpp +++ b/src/quick/items/qquickvisualitemmodel.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,11 +43,11 @@ #include "qquickitem.h" #include -#include -#include +#include +#include -#include -#include +#include +#include #include #include @@ -64,18 +64,18 @@ class QQuickVisualItemModelPrivate : public QObjectPrivate public: QQuickVisualItemModelPrivate() : QObjectPrivate() {} - static void children_append(QDeclarativeListProperty *prop, QQuickItem *item) { - QDeclarative_setParent_noEvent(item, prop->object); + static void children_append(QQmlListProperty *prop, QQuickItem *item) { + QQml_setParent_noEvent(item, prop->object); static_cast(prop->data)->children.append(Item(item)); static_cast(prop->data)->itemAppended(); static_cast(prop->data)->emitChildrenChanged(); } - static int children_count(QDeclarativeListProperty *prop) { + static int children_count(QQmlListProperty *prop) { return static_cast(prop->data)->children.count(); } - static QQuickItem *children_at(QDeclarativeListProperty *prop, int index) { + static QQuickItem *children_at(QQmlListProperty *prop, int index) { return static_cast(prop->data)->children.at(index).item; } @@ -83,7 +83,7 @@ class QQuickVisualItemModelPrivate : public QObjectPrivate Q_Q(QQuickVisualItemModel); QQuickVisualItemModelAttached *attached = QQuickVisualItemModelAttached::properties(children.last().item); attached->setIndex(children.count()-1); - QDeclarativeChangeSet changeSet; + QQuickChangeSet changeSet; changeSet.insert(children.count() - 1, 1); emit q->modelUpdated(changeSet, false); emit q->countChanged(); @@ -165,10 +165,10 @@ QQuickVisualItemModel::QQuickVisualItemModel(QObject *parent) It is attached to each instance of the delegate. */ -QDeclarativeListProperty QQuickVisualItemModel::children() +QQmlListProperty QQuickVisualItemModel::children() { Q_D(QQuickVisualItemModel); - return QDeclarativeListProperty(this, d, d->children_append, + return QQmlListProperty(this, d, d->children_append, d->children_count, d->children_at); } @@ -206,7 +206,7 @@ QQuickVisualModel::ReleaseFlags QQuickVisualItemModel::release(QQuickItem *item) if (d->children[idx].deref()) { // XXX todo - the original did item->scene()->removeItem(). Why? item->setParentItem(0); - QDeclarative_setParent_noEvent(item, this); + QQml_setParent_noEvent(item, this); } } return 0; @@ -217,7 +217,7 @@ QString QQuickVisualItemModel::stringValue(int index, const QString &name) Q_D(QQuickVisualItemModel); if (index < 0 || index >= d->children.count()) return QString(); - return QDeclarativeEngine::contextForObject(d->children.at(index).item)->contextProperty(name).toString(); + return QQmlEngine::contextForObject(d->children.at(index).item)->contextProperty(name).toString(); } int QQuickVisualItemModel::indexOf(QQuickItem *item, QObject *) const diff --git a/src/quick/items/qquickvisualitemmodel_p.h b/src/quick/items/qquickvisualitemmodel_p.h index f1c9d066be..9f90a29125 100644 --- a/src/quick/items/qquickvisualitemmodel_p.h +++ b/src/quick/items/qquickvisualitemmodel_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,7 +43,7 @@ #define QQUICKVISUALITEMMODEL_P_H #include -#include +#include #include QT_BEGIN_HEADER @@ -51,7 +51,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE class QQuickItem; -class QDeclarativeChangeSet; +class QQuickChangeSet; class Q_QUICK_EXPORT QQuickVisualModel : public QObject { @@ -76,7 +76,7 @@ class Q_QUICK_EXPORT QQuickVisualModel : public QObject Q_SIGNALS: void countChanged(); - void modelUpdated(const QDeclarativeChangeSet &changeSet, bool reset); + void modelUpdated(const QQuickChangeSet &changeSet, bool reset); void createdItem(int index, QQuickItem *item); void initItem(int index, QQuickItem *item); void destroyingItem(QQuickItem *item); @@ -96,7 +96,7 @@ class Q_QUICK_EXPORT QQuickVisualItemModel : public QQuickVisualModel Q_OBJECT Q_DECLARE_PRIVATE(QQuickVisualItemModel) - Q_PROPERTY(QDeclarativeListProperty children READ children NOTIFY childrenChanged DESIGNABLE false) + Q_PROPERTY(QQmlListProperty children READ children NOTIFY childrenChanged DESIGNABLE false) Q_CLASSINFO("DefaultProperty", "children") public: @@ -112,7 +112,7 @@ class Q_QUICK_EXPORT QQuickVisualItemModel : public QQuickVisualModel virtual int indexOf(QQuickItem *item, QObject *objectContext) const; - QDeclarativeListProperty children(); + QQmlListProperty children(); static QQuickVisualItemModelAttached *qmlAttachedProperties(QObject *obj); diff --git a/src/quick/items/qquickwindowmanager.cpp b/src/quick/items/qquickwindowmanager.cpp index b999e6f85d..55f11bf4c0 100644 --- a/src/quick/items/qquickwindowmanager.cpp +++ b/src/quick/items/qquickwindowmanager.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include diff --git a/src/quick/items/qquickwindowmanager_p.h b/src/quick/items/qquickwindowmanager_p.h index 014b38132e..ed972b5c76 100644 --- a/src/quick/items/qquickwindowmanager_p.h +++ b/src/quick/items/qquickwindowmanager_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/items/qquickwindowmodule_p.h b/src/quick/items/qquickwindowmodule_p.h index b02d29e776..e0da37d22c 100644 --- a/src/quick/items/qquickwindowmodule_p.h +++ b/src/quick/items/qquickwindowmodule_p.h @@ -42,7 +42,7 @@ #ifndef QQUICKWINDOWMODULE_H #define QQUICKWINDOWMODULE_H -#include +#include QT_BEGIN_HEADER diff --git a/src/quick/items/syncexcludes b/src/quick/items/syncexcludes index ab7a374a5b..19e41ce643 100644 --- a/src/quick/items/syncexcludes +++ b/src/quick/items/syncexcludes @@ -6,6 +6,6 @@ qdeclarativelayoutitem.cpp qdeclarativelayoutitem_p.h qdeclarativefocuspanel.cpp qdeclarativefocuspanel_p.h -qdeclarativepath_p.h -qdeclarativepath_p_p.h +qquickpath_p.h +qquickpath_p_p.h qdeclarativepath.cpp diff --git a/src/quick/particles/qquickcumulativedirection.cpp b/src/quick/particles/qquickcumulativedirection.cpp index 0a2ac92a64..4f4a2cc46e 100644 --- a/src/quick/particles/qquickcumulativedirection.cpp +++ b/src/quick/particles/qquickcumulativedirection.cpp @@ -54,9 +54,9 @@ QQuickCumulativeDirection::QQuickCumulativeDirection(QObject *parent):QQuickDire { } -QDeclarativeListProperty QQuickCumulativeDirection::directions() +QQmlListProperty QQuickCumulativeDirection::directions() { - return QDeclarativeListProperty(this, m_directions);//TODO: Proper list property + return QQmlListProperty(this, m_directions);//TODO: Proper list property } const QPointF QQuickCumulativeDirection::sample(const QPointF &from) diff --git a/src/quick/particles/qquickcumulativedirection_p.h b/src/quick/particles/qquickcumulativedirection_p.h index 2fbb41151e..38663572fb 100644 --- a/src/quick/particles/qquickcumulativedirection_p.h +++ b/src/quick/particles/qquickcumulativedirection_p.h @@ -42,7 +42,7 @@ #ifndef QQuickCUMULATIVEDIRECTION_P_H #define QQuickCUMULATIVEDIRECTION_P_H #include "qquickdirection_p.h" -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -50,11 +50,11 @@ QT_BEGIN_NAMESPACE class QQuickCumulativeDirection : public QQuickDirection { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty directions READ directions) + Q_PROPERTY(QQmlListProperty directions READ directions) Q_CLASSINFO("DefaultProperty", "directions") public: explicit QQuickCumulativeDirection(QObject *parent = 0); - QDeclarativeListProperty directions(); + QQmlListProperty directions(); const QPointF sample(const QPointF &from); private: QList m_directions; diff --git a/src/quick/particles/qquickcustomaffector.cpp b/src/quick/particles/qquickcustomaffector.cpp index d890400a92..7c991c7352 100644 --- a/src/quick/particles/qquickcustomaffector.cpp +++ b/src/quick/particles/qquickcustomaffector.cpp @@ -41,8 +41,8 @@ #include "qquickcustomaffector_p.h" #include -#include -#include +#include +#include #include QT_BEGIN_NAMESPACE @@ -102,7 +102,7 @@ QQuickCustomAffector::QQuickCustomAffector(QQuickItem *parent) : bool QQuickCustomAffector::isAffectConnected() { - static int idx = QObjectPrivate::get(this)->signalIndex("affectParticles(QDeclarativeV8Handle,qreal)"); + static int idx = QObjectPrivate::get(this)->signalIndex("affectParticles(QQmlV8Handle,qreal)"); return QObjectPrivate::get(this)->isSignalConnected(idx); } @@ -130,14 +130,14 @@ void QQuickCustomAffector::affectSystem(qreal dt) dt = 1.0; v8::HandleScope handle_scope; - v8::Context::Scope scope(QDeclarativeEnginePrivate::getV8Engine(qmlEngine(this))->context()); + v8::Context::Scope scope(QQmlEnginePrivate::getV8Engine(qmlEngine(this))->context()); v8::Handle array = v8::Array::New(toAffect.size()); for (int i=0; iSet(i, toAffect[i]->v8Value().toHandle()); if (dt >= simulationCutoff || dt <= simulationDelta) { affectProperties(toAffect, dt); - emit affectParticles(QDeclarativeV8Handle::fromHandle(array), dt); + emit affectParticles(QQmlV8Handle::fromHandle(array), dt); } else { int realTime = m_system->timeInt; m_system->timeInt -= dt * 1000.0; @@ -145,12 +145,12 @@ void QQuickCustomAffector::affectSystem(qreal dt) m_system->timeInt += simulationDelta * 1000.0; dt -= simulationDelta; affectProperties(toAffect, simulationDelta); - emit affectParticles(QDeclarativeV8Handle::fromHandle(array), simulationDelta); + emit affectParticles(QQmlV8Handle::fromHandle(array), simulationDelta); } m_system->timeInt = realTime; if (dt > 0.0) { affectProperties(toAffect, dt); - emit affectParticles(QDeclarativeV8Handle::fromHandle(array), dt); + emit affectParticles(QQmlV8Handle::fromHandle(array), dt); } } diff --git a/src/quick/particles/qquickcustomaffector_p.h b/src/quick/particles/qquickcustomaffector_p.h index c38f53cb01..e831dbce1d 100644 --- a/src/quick/particles/qquickcustomaffector_p.h +++ b/src/quick/particles/qquickcustomaffector_p.h @@ -101,7 +101,7 @@ class QQuickCustomAffector : public QQuickParticleAffector signals: - void affectParticles(QDeclarativeV8Handle particles, qreal dt); + void affectParticles(QQmlV8Handle particles, qreal dt); void positionChanged(QQuickDirection * arg); diff --git a/src/quick/particles/qquickcustomparticle.cpp b/src/quick/particles/qquickcustomparticle.cpp index 347b749ca6..3647e5bfc5 100644 --- a/src/quick/particles/qquickcustomparticle.cpp +++ b/src/quick/particles/qquickcustomparticle.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/particles/qquickcustomparticle_p.h b/src/quick/particles/qquickcustomparticle_p.h index c121141621..29f3d19657 100644 --- a/src/quick/particles/qquickcustomparticle_p.h +++ b/src/quick/particles/qquickcustomparticle_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/particles/qquickimageparticle.cpp b/src/quick/particles/qquickimageparticle.cpp index 2936935f3f..bf576b0a54 100644 --- a/src/quick/particles/qquickimageparticle.cpp +++ b/src/quick/particles/qquickimageparticle.cpp @@ -53,8 +53,8 @@ #include #include #include -#include -#include +#include +#include #include QT_BEGIN_NAMESPACE @@ -834,9 +834,9 @@ QQuickImageParticle::~QQuickImageParticle() { } -QDeclarativeListProperty QQuickImageParticle::sprites() +QQmlListProperty QQuickImageParticle::sprites() { - return QDeclarativeListProperty(this, &m_sprites, spriteAppend, spriteCount, spriteAt, spriteClear); + return QQmlListProperty(this, &m_sprites, spriteAppend, spriteCount, spriteAt, spriteClear); } void QQuickImageParticle::setImage(const QUrl &image) diff --git a/src/quick/particles/qquickimageparticle_p.h b/src/quick/particles/qquickimageparticle_p.h index a0f1595192..401f4609b0 100644 --- a/src/quick/particles/qquickimageparticle_p.h +++ b/src/quick/particles/qquickimageparticle_p.h @@ -43,8 +43,8 @@ #define ULTRAPARTICLE_H #include "qquickparticlepainter_p.h" #include "qquickdirection_p.h" -#include -#include +#include +#include #include #include @@ -150,7 +150,7 @@ class QQuickImageParticle : public QQuickParticlePainter { Q_OBJECT Q_PROPERTY(QUrl source READ image WRITE setImage NOTIFY imageChanged) - Q_PROPERTY(QDeclarativeListProperty sprites READ sprites) + Q_PROPERTY(QQmlListProperty sprites READ sprites) Q_PROPERTY(Status status READ status NOTIFY statusChanged) //### Is it worth having progress like Image has? //Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged) @@ -193,7 +193,7 @@ class QQuickImageParticle : public QQuickParticlePainter enum Status { Null, Ready, Loading, Error }; - QDeclarativeListProperty sprites(); + QQmlListProperty sprites(); QQuickStochasticEngine* spriteEngine() {return m_spriteEngine;} enum EntryEffect { @@ -357,7 +357,7 @@ private slots: private: struct ImageData { QUrl source; - QDeclarativePixmap pix; + QQuickPixmap pix; }; ImageData *m_image; ImageData *m_colorTable; diff --git a/src/quick/particles/qquickitemparticle.cpp b/src/quick/particles/qquickitemparticle.cpp index db9e3d1519..571ca7f8a5 100644 --- a/src/quick/particles/qquickitemparticle.cpp +++ b/src/quick/particles/qquickitemparticle.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/quick/particles/qquickitemparticle_p.h b/src/quick/particles/qquickitemparticle_p.h index df104a5644..d02659889e 100644 --- a/src/quick/particles/qquickitemparticle_p.h +++ b/src/quick/particles/qquickitemparticle_p.h @@ -44,7 +44,7 @@ #include "qquickparticlepainter_p.h" #include #include -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -56,7 +56,7 @@ class QQuickItemParticle : public QQuickParticlePainter { Q_OBJECT Q_PROPERTY(bool fade READ fade WRITE setFade NOTIFY fadeChanged) - Q_PROPERTY(QDeclarativeComponent* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(QQmlComponent* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) public: explicit QQuickItemParticle(QQuickItem *parent = 0); ~QQuickItemParticle(); @@ -66,7 +66,7 @@ class QQuickItemParticle : public QQuickParticlePainter virtual QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *); static QQuickItemParticleAttached *qmlAttachedProperties(QObject *object); - QDeclarativeComponent* delegate() const + QQmlComponent* delegate() const { return m_delegate; } @@ -74,7 +74,7 @@ class QQuickItemParticle : public QQuickParticlePainter signals: void fadeChanged(); - void delegateChanged(QDeclarativeComponent* arg); + void delegateChanged(QQmlComponent* arg); public slots: //TODO: Add a follow mode, where moving the delegate causes the logical particle to go with it? @@ -84,7 +84,7 @@ public slots: void give(QQuickItem* item);//give from modelparticle void setFade(bool arg){if (arg == m_fade) return; m_fade = arg; emit fadeChanged();} - void setDelegate(QDeclarativeComponent* arg) + void setDelegate(QQmlComponent* arg) { if (m_delegate != arg) { m_delegate = arg; @@ -108,7 +108,7 @@ public slots: QSet m_stasis; qreal m_lastT; int m_activeCount; - QDeclarativeComponent* m_delegate; + QQmlComponent* m_delegate; typedef QTickAnimationProxy Clock; Clock *clock; diff --git a/src/quick/particles/qquickmaskextruder.cpp b/src/quick/particles/qquickmaskextruder.cpp index 3ed2eb953c..5c27cc7678 100644 --- a/src/quick/particles/qquickmaskextruder.cpp +++ b/src/quick/particles/qquickmaskextruder.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include "qquickmaskextruder_p.h" -#include -#include +#include +#include #include #include QT_BEGIN_NAMESPACE diff --git a/src/quick/particles/qquickmaskextruder_p.h b/src/quick/particles/qquickmaskextruder_p.h index 0c9f10b1b2..94b30720c1 100644 --- a/src/quick/particles/qquickmaskextruder_p.h +++ b/src/quick/particles/qquickmaskextruder_p.h @@ -42,7 +42,7 @@ #ifndef MASKEXTRUDER_H #define MASKEXTRUDER_H #include "qquickparticleextruder_p.h" -#include +#include #include #include @@ -81,7 +81,7 @@ private slots: void ensureInitialized(const QRectF &r); int m_lastWidth; int m_lastHeight; - QDeclarativePixmap m_pix; + QQuickPixmap m_pix; QImage m_img; QList m_mask;//TODO: More memory efficient datastructures //Perhaps just the mask for the largest bounds is stored, and interpolate up diff --git a/src/quick/particles/qquickparticleemitter.cpp b/src/quick/particles/qquickparticleemitter.cpp index 88c062b1f5..1625f1498a 100644 --- a/src/quick/particles/qquickparticleemitter.cpp +++ b/src/quick/particles/qquickparticleemitter.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qquickparticleemitter_p.h" -#include +#include QT_BEGIN_NAMESPACE @@ -253,7 +253,7 @@ QQuickParticleEmitter::~QQuickParticleEmitter() bool QQuickParticleEmitter::isEmitConnected() { - static int idx = QObjectPrivate::get(this)->signalIndex("emitParticles(QDeclarativeV8Handle)"); + static int idx = QObjectPrivate::get(this)->signalIndex("emitParticles(QQmlV8Handle)"); return QObjectPrivate::get(this)->isSignalConnected(idx); } @@ -479,12 +479,12 @@ void QQuickParticleEmitter::emitWindow(int timeStamp) if (isEmitConnected()) { v8::HandleScope handle_scope; - v8::Context::Scope scope(QDeclarativeEnginePrivate::getV8Engine(qmlEngine(this))->context()); + v8::Context::Scope scope(QQmlEnginePrivate::getV8Engine(qmlEngine(this))->context()); v8::Handle array = v8::Array::New(toEmit.size()); for (int i=0; iSet(i, toEmit[i]->v8Value().toHandle()); - emitParticles(QDeclarativeV8Handle::fromHandle(array));//A chance for arbitrary JS changes + emitParticles(QQmlV8Handle::fromHandle(array));//A chance for arbitrary JS changes } foreach (QQuickParticleData* d, toEmit) m_system->emitParticle(d); diff --git a/src/quick/particles/qquickparticleemitter_p.h b/src/quick/particles/qquickparticleemitter_p.h index 684a06be83..bb010a13e9 100644 --- a/src/quick/particles/qquickparticleemitter_p.h +++ b/src/quick/particles/qquickparticleemitter_p.h @@ -121,7 +121,7 @@ class QQuickParticleEmitter : public QQuickItem void setSpeedFromMovement(qreal s); virtual void componentComplete(); signals: - void emitParticles(QDeclarativeV8Handle particles); + void emitParticles(QQmlV8Handle particles); void particlesPerSecondChanged(qreal); void particleDurationChanged(int); void enabledChanged(bool); diff --git a/src/quick/particles/qquickparticlegroup.cpp b/src/quick/particles/qquickparticlegroup.cpp index ae0876f549..c4b230f5e9 100644 --- a/src/quick/particles/qquickparticlegroup.cpp +++ b/src/quick/particles/qquickparticlegroup.cpp @@ -96,20 +96,20 @@ QQuickParticleGroup::QQuickParticleGroup(QObject* parent) } -void delayedRedirect(QDeclarativeListProperty *prop, QObject *value) +void delayedRedirect(QQmlListProperty *prop, QObject *value) { QQuickParticleGroup* pg = qobject_cast(prop->object); if (pg) pg->delayRedirect(value); } -QDeclarativeListProperty QQuickParticleGroup::particleChildren() +QQmlListProperty QQuickParticleGroup::particleChildren() { QQuickParticleSystem* system = qobject_cast(parent()); if (system) - return QDeclarativeListProperty(this, 0, &QQuickParticleSystem::statePropertyRedirect); + return QQmlListProperty(this, 0, &QQuickParticleSystem::statePropertyRedirect); else - return QDeclarativeListProperty(this, 0, &delayedRedirect); + return QQmlListProperty(this, 0, &delayedRedirect); } void QQuickParticleGroup::setSystem(QQuickParticleSystem* arg) diff --git a/src/quick/particles/qquickparticlegroup_p.h b/src/quick/particles/qquickparticlegroup_p.h index f9703e8e03..774eb8df86 100644 --- a/src/quick/particles/qquickparticlegroup_p.h +++ b/src/quick/particles/qquickparticlegroup_p.h @@ -42,11 +42,11 @@ #define QQuickPARTICLEGROUP #include #include "qquickparticlesystem_p.h" -#include "qdeclarativeparserstatus.h" +#include "qqmlparserstatus.h" QT_BEGIN_NAMESPACE -class QQuickParticleGroup : public QQuickStochasticState, public QDeclarativeParserStatus +class QQuickParticleGroup : public QQuickStochasticState, public QQmlParserStatus { Q_OBJECT //### Would setting limits per group be useful? Or clutter the API? @@ -55,14 +55,14 @@ class QQuickParticleGroup : public QQuickStochasticState, public QDeclarativePar Q_PROPERTY(QQuickParticleSystem* system READ system WRITE setSystem NOTIFY systemChanged) //Intercept children requests and assign to the group & system - Q_PROPERTY(QDeclarativeListProperty particleChildren READ particleChildren DESIGNABLE false)//### Hidden property for in-state system definitions - ought not to be used in actual "Sprite" states + Q_PROPERTY(QQmlListProperty particleChildren READ particleChildren DESIGNABLE false)//### Hidden property for in-state system definitions - ought not to be used in actual "Sprite" states Q_CLASSINFO("DefaultProperty", "particleChildren") - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) public: explicit QQuickParticleGroup(QObject* parent = 0); - QDeclarativeListProperty particleChildren(); + QQmlListProperty particleChildren(); int maximumAlive() const { diff --git a/src/quick/particles/qquickparticlesmodule_p.h b/src/quick/particles/qquickparticlesmodule_p.h index 9ef9cd4711..6d16f00c15 100644 --- a/src/quick/particles/qquickparticlesmodule_p.h +++ b/src/quick/particles/qquickparticlesmodule_p.h @@ -42,7 +42,7 @@ #ifndef QQuickPARTICLESMODULE_H #define QQuickPARTICLESMODULE_H -#include +#include QT_BEGIN_HEADER diff --git a/src/quick/particles/qquickparticlesystem.cpp b/src/quick/particles/qquickparticlesystem.cpp index 2a79b8d90d..6dc6d21812 100644 --- a/src/quick/particles/qquickparticlesystem.cpp +++ b/src/quick/particles/qquickparticlesystem.cpp @@ -50,7 +50,8 @@ #include "qquickparticlegroup_p.h" #include "qquicktrailemitter_p.h"//###For auto-follow on states, perhaps should be in emitter? -#include +#include +#include #include #include @@ -524,10 +525,10 @@ void QQuickParticleData::clone(const QQuickParticleData& other) animationOwner = other.animationOwner; } -QDeclarativeV8Handle QQuickParticleData::v8Value() +QQmlV8Handle QQuickParticleData::v8Value() { if (!v8Datum) - v8Datum = new QQuickV8ParticleData(QDeclarativeEnginePrivate::getV8Engine(qmlEngine(system)), this); + v8Datum = new QQuickV8ParticleData(QQmlEnginePrivate::getV8Engine(qmlEngine(system)), this); return v8Datum->v8Value(); } //sets the x accleration without affecting the instantaneous x velocity or position @@ -782,7 +783,7 @@ void QQuickParticleSystem::setPaused(bool arg) { } } -void QQuickParticleSystem::statePropertyRedirect(QDeclarativeListProperty *prop, QObject *value) +void QQuickParticleSystem::statePropertyRedirect(QQmlListProperty *prop, QObject *value) { //Hooks up automatic state-associated stuff QQuickParticleSystem* sys = qobject_cast(prop->object->parent()); diff --git a/src/quick/particles/qquickparticlesystem_p.h b/src/quick/particles/qquickparticlesystem_p.h index 68b29b9bc0..387219f720 100644 --- a/src/quick/particles/qquickparticlesystem_p.h +++ b/src/quick/particles/qquickparticlesystem_p.h @@ -50,8 +50,8 @@ #include #include #include -#include -#include //For QDeclarativeV8Handle +#include +#include //For QQmlV8Handle QT_BEGIN_HEADER @@ -224,7 +224,7 @@ class Q_AUTOTEST_EXPORT QQuickParticleData { float lifeLeft(); float curSize(); void clone(const QQuickParticleData& other);//Not =, leaves meta-data like index - QDeclarativeV8Handle v8Value(); + QQmlV8Handle v8Value(); void extendLife(float time); private: QQuickV8ParticleData* v8Datum; @@ -314,7 +314,7 @@ private slots: void registerParticleAffector(QQuickParticleAffector* a); void registerParticleGroup(QQuickParticleGroup* g); - static void statePropertyRedirect(QDeclarativeListProperty *prop, QObject *value); + static void statePropertyRedirect(QQmlListProperty *prop, QObject *value); static void stateRedirect(QQuickParticleGroup* group, QQuickParticleSystem* sys, QObject *value); bool isPaused() const { diff --git a/src/quick/particles/qquickspritegoal_p.h b/src/quick/particles/qquickspritegoal_p.h index 1986bc9431..44b022ffee 100644 --- a/src/quick/particles/qquickspritegoal_p.h +++ b/src/quick/particles/qquickspritegoal_p.h @@ -42,7 +42,7 @@ #ifndef SPRITEGOALAFFECTOR_H #define SPRITEGOALAFFECTOR_H #include "qquickparticleaffector_p.h" -#include +#include QT_BEGIN_HEADER diff --git a/src/quick/particles/qquicktrailemitter.cpp b/src/quick/particles/qquicktrailemitter.cpp index f5bc78c9cb..e5317567fe 100644 --- a/src/quick/particles/qquicktrailemitter.cpp +++ b/src/quick/particles/qquicktrailemitter.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qquicktrailemitter_p.h" -#include +#include #include QT_BEGIN_NAMESPACE @@ -126,7 +126,7 @@ QQuickTrailEmitter::QQuickTrailEmitter(QQuickItem *parent) : bool QQuickTrailEmitter::isEmitFollowConnected() { - static int idx = QObjectPrivate::get(this)->signalIndex("emitFollowParticles(QDeclarativeV8Handle,QDeclarativeV8Handle)"); + static int idx = QObjectPrivate::get(this)->signalIndex("emitFollowParticles(QQmlV8Handle,QQmlV8Handle)"); return QObjectPrivate::get(this)->isSignalConnected(idx); } @@ -265,15 +265,15 @@ void QQuickTrailEmitter::emitWindow(int timeStamp) if (isEmitConnected() || isEmitFollowConnected()) { v8::HandleScope handle_scope; - v8::Context::Scope scope(QDeclarativeEnginePrivate::getV8Engine(qmlEngine(this))->context()); + v8::Context::Scope scope(QQmlEnginePrivate::getV8Engine(qmlEngine(this))->context()); v8::Handle array = v8::Array::New(toEmit.size()); for (int i=0; iSet(i, toEmit[i]->v8Value().toHandle()); if (isEmitFollowConnected()) - emitFollowParticles(QDeclarativeV8Handle::fromHandle(array), d->v8Value());//A chance for many arbitrary JS changes + emitFollowParticles(QQmlV8Handle::fromHandle(array), d->v8Value());//A chance for many arbitrary JS changes else if (isEmitConnected()) - emitParticles(QDeclarativeV8Handle::fromHandle(array));//A chance for arbitrary JS changes + emitParticles(QQmlV8Handle::fromHandle(array));//A chance for arbitrary JS changes } foreach (QQuickParticleData* d, toEmit) m_system->emitParticle(d); diff --git a/src/quick/particles/qquicktrailemitter_p.h b/src/quick/particles/qquicktrailemitter_p.h index bae6464c37..f68dd05441 100644 --- a/src/quick/particles/qquicktrailemitter_p.h +++ b/src/quick/particles/qquicktrailemitter_p.h @@ -93,7 +93,7 @@ class QQuickTrailEmitter : public QQuickParticleEmitter } signals: - void emitFollowParticles(QDeclarativeV8Handle particles, QDeclarativeV8Handle followed); + void emitFollowParticles(QQmlV8Handle particles, QQmlV8Handle followed); void particlesPerParticlePerSecondChanged(int arg); diff --git a/src/quick/particles/qquickturbulence_p.h b/src/quick/particles/qquickturbulence_p.h index cc0dfdc845..f453140cd2 100644 --- a/src/quick/particles/qquickturbulence_p.h +++ b/src/quick/particles/qquickturbulence_p.h @@ -42,7 +42,7 @@ #ifndef TURBULENCEAFFECTOR_H #define TURBULENCEAFFECTOR_H #include "qquickparticleaffector_p.h" -#include +#include QT_BEGIN_HEADER diff --git a/src/quick/particles/qquickv8particledata.cpp b/src/quick/particles/qquickv8particledata.cpp index 0a3e9f6e95..3a387d8f01 100644 --- a/src/quick/particles/qquickv8particledata.cpp +++ b/src/quick/particles/qquickv8particledata.cpp @@ -497,9 +497,9 @@ QQuickV8ParticleData::~QQuickV8ParticleData() qPersistentDispose(m_v8Value); } -QDeclarativeV8Handle QQuickV8ParticleData::v8Value() +QQmlV8Handle QQuickV8ParticleData::v8Value() { - return QDeclarativeV8Handle::fromHandle(m_v8Value); + return QQmlV8Handle::fromHandle(m_v8Value); } QT_END_NAMESPACE diff --git a/src/quick/particles/qquickv8particledata_p.h b/src/quick/particles/qquickv8particledata_p.h index 4afcd89cf9..9b4a4435cc 100644 --- a/src/quick/particles/qquickv8particledata_p.h +++ b/src/quick/particles/qquickv8particledata_p.h @@ -53,7 +53,7 @@ class QQuickV8ParticleData { public: QQuickV8ParticleData(QV8Engine*,QQuickParticleData*); ~QQuickV8ParticleData(); - QDeclarativeV8Handle v8Value(); + QQmlV8Handle v8Value(); private: v8::Persistent m_v8Value; }; diff --git a/src/quick/qtquick2.cpp b/src/quick/qtquick2.cpp index f1417260b9..621c3ff18e 100644 --- a/src/quick/qtquick2.cpp +++ b/src/quick/qtquick2.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -40,32 +40,32 @@ ****************************************************************************/ #include "qtquick2_p.h" -#include -#include -#include +#include +#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include QT_BEGIN_NAMESPACE -class QDeclarativeQtQuick2DebugStatesDelegate : public QDeclarativeDebugStatesDelegate +class QQmlQtQuick2DebugStatesDelegate : public QQmlDebugStatesDelegate { public: - QDeclarativeQtQuick2DebugStatesDelegate(); - virtual ~QDeclarativeQtQuick2DebugStatesDelegate(); - virtual void buildStatesList(QDeclarativeContext *ctxt, bool cleanList); - virtual void updateBinding(QDeclarativeContext *context, - const QDeclarativeProperty &property, + QQmlQtQuick2DebugStatesDelegate(); + virtual ~QQmlQtQuick2DebugStatesDelegate(); + virtual void buildStatesList(QQmlContext *ctxt, bool cleanList); + virtual void updateBinding(QQmlContext *context, + const QQmlProperty &property, const QVariant &expression, bool isLiteralValue, const QString &fileName, int line, int column, bool *isBaseState); @@ -79,37 +79,37 @@ class QDeclarativeQtQuick2DebugStatesDelegate : public QDeclarativeDebugStatesDe private: void buildStatesList(QObject *obj); - QList > m_allStates; + QList > m_allStates; }; -QDeclarativeQtQuick2DebugStatesDelegate::QDeclarativeQtQuick2DebugStatesDelegate() +QQmlQtQuick2DebugStatesDelegate::QQmlQtQuick2DebugStatesDelegate() { } -QDeclarativeQtQuick2DebugStatesDelegate::~QDeclarativeQtQuick2DebugStatesDelegate() +QQmlQtQuick2DebugStatesDelegate::~QQmlQtQuick2DebugStatesDelegate() { } -void QDeclarativeQtQuick2DebugStatesDelegate::buildStatesList(QDeclarativeContext *ctxt, bool cleanList) +void QQmlQtQuick2DebugStatesDelegate::buildStatesList(QQmlContext *ctxt, bool cleanList) { if (cleanList) m_allStates.clear(); - QDeclarativeContextPrivate *ctxtPriv = QDeclarativeContextPrivate::get(ctxt); + QQmlContextPrivate *ctxtPriv = QQmlContextPrivate::get(ctxt); for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { buildStatesList(ctxtPriv->instances.at(ii)); } - QDeclarativeContextData *child = QDeclarativeContextData::get(ctxt)->childContexts; + QQmlContextData *child = QQmlContextData::get(ctxt)->childContexts; while (child) { - buildStatesList(child->asQDeclarativeContext()); + buildStatesList(child->asQQmlContext()); child = child->nextChild; } } -void QDeclarativeQtQuick2DebugStatesDelegate::buildStatesList(QObject *obj) +void QQmlQtQuick2DebugStatesDelegate::buildStatesList(QObject *obj) { - if (QDeclarativeState *state = qobject_cast(obj)) { + if (QQuickState *state = qobject_cast(obj)) { m_allStates.append(state); } @@ -119,23 +119,23 @@ void QDeclarativeQtQuick2DebugStatesDelegate::buildStatesList(QObject *obj) } } -void QDeclarativeQtQuick2DebugStatesDelegate::updateBinding(QDeclarativeContext *context, - const QDeclarativeProperty &property, +void QQmlQtQuick2DebugStatesDelegate::updateBinding(QQmlContext *context, + const QQmlProperty &property, const QVariant &expression, bool isLiteralValue, const QString &fileName, int line, int column, bool *inBaseState) { QObject *object = property.object(); QString propertyName = property.name(); - foreach (QWeakPointer statePointer, m_allStates) { - if (QDeclarativeState *state = statePointer.data()) { + foreach (QWeakPointer statePointer, m_allStates) { + if (QQuickState *state = statePointer.data()) { // here we assume that the revert list on itself defines the base state if (state->isStateActive() && state->containsPropertyInRevertList(object, propertyName)) { *inBaseState = false; - QDeclarativeBinding *newBinding = 0; + QQmlBinding *newBinding = 0; if (!isLiteralValue) { - newBinding = new QDeclarativeBinding(expression.toString(), object, context); + newBinding = new QQmlBinding(expression.toString(), object, context); newBinding->setTarget(property); newBinding->setNotifyOnValueChanged(true); newBinding->setSourceLocation(fileName, line, column); @@ -150,12 +150,12 @@ void QDeclarativeQtQuick2DebugStatesDelegate::updateBinding(QDeclarativeContext } } -bool QDeclarativeQtQuick2DebugStatesDelegate::setBindingForInvalidProperty(QObject *object, +bool QQmlQtQuick2DebugStatesDelegate::setBindingForInvalidProperty(QObject *object, const QString &propertyName, const QVariant &expression, bool isLiteralValue) { - if (QDeclarativePropertyChanges *propertyChanges = qobject_cast(object)) { + if (QQuickPropertyChanges *propertyChanges = qobject_cast(object)) { if (isLiteralValue) propertyChanges->changeValue(propertyName, expression); else @@ -166,26 +166,26 @@ bool QDeclarativeQtQuick2DebugStatesDelegate::setBindingForInvalidProperty(QObje } } -void QDeclarativeQtQuick2DebugStatesDelegate::resetBindingForInvalidProperty(QObject *object, const QString &propertyName) +void QQmlQtQuick2DebugStatesDelegate::resetBindingForInvalidProperty(QObject *object, const QString &propertyName) { - if (QDeclarativePropertyChanges *propertyChanges = qobject_cast(object)) { + if (QQuickPropertyChanges *propertyChanges = qobject_cast(object)) { propertyChanges->removeProperty(propertyName); } } -void QDeclarativeQtQuick2Module::defineModule() +void QQmlQtQuick2Module::defineModule() { - QDeclarativeUtilModule::defineModule(); - QDeclarativeEnginePrivate::defineModule(); + QQuickUtilModule::defineModule(); + QQmlEnginePrivate::defineModule(); QQuickItemsModule::defineModule(); QQuickParticlesModule::defineModule(); QQuickWindowModule::defineModule(); - QDeclarativeValueTypeFactory::registerValueTypes(); + QQmlValueTypeFactory::registerValueTypes(); - if (QDeclarativeEngineDebugService::isDebuggingEnabled()) { - QDeclarativeEngineDebugService::instance()->setStatesDelegate( - new QDeclarativeQtQuick2DebugStatesDelegate); + if (QQmlEngineDebugService::isDebuggingEnabled()) { + QQmlEngineDebugService::instance()->setStatesDelegate( + new QQmlQtQuick2DebugStatesDelegate); } } diff --git a/src/quick/qtquick2_p.h b/src/quick/qtquick2_p.h index e242179dfa..4032991776 100644 --- a/src/quick/qtquick2_p.h +++ b/src/quick/qtquick2_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -48,7 +48,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class Q_QUICK_PRIVATE_EXPORT QDeclarativeQtQuick2Module +class Q_QUICK_PRIVATE_EXPORT QQmlQtQuick2Module { public: static void defineModule(); diff --git a/src/quick/qtquickglobal.h b/src/quick/qtquickglobal.h index b5eb962a2f..a1d8c714e8 100644 --- a/src/quick/qtquickglobal.h +++ b/src/quick/qtquickglobal.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/qtquickglobal_p.h b/src/quick/qtquickglobal_p.h index 539040727c..34ceeedff9 100644 --- a/src/quick/qtquickglobal_p.h +++ b/src/quick/qtquickglobal_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/quick.pro b/src/quick/quick.pro index b445e84248..0f0120ee79 100644 --- a/src/quick/quick.pro +++ b/src/quick/quick.pro @@ -6,13 +6,13 @@ CONFIG += module CONFIG += dll warn_on MODULE_PRI = ../../modules/qt_quick.pri -QT = core-private gui gui-private network v8-private declarative declarative-private +QT = core-private gui gui-private network v8-private qml qml-private DEFINES += QT_BUILD_QUICK_LIB QT_NO_URL_CAST_FROM_STRING QT_NO_INTEGER_EVENT_COORDINATES win32-msvc*:DEFINES *= _CRT_SECURE_NO_WARNINGS solaris-cc*:QMAKE_CXXFLAGS_RELEASE -= -O2 -exists("qdeclarative_enable_gcov") { +exists("qqml_enable_gcov") { QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage -fno-elide-constructors LIBS += -lgcov } @@ -36,12 +36,12 @@ mac { # FIXME: this is a workaround for broken qmake logic in qtAddModule() # This function refuses to use frameworks unless the framework exists on # the filesystem at the time qmake is run, resulting in a build failure - # if QtQuick is qmaked before QtDeclarative is built and frameworks are + # if QtQuick is qmaked before QtQml is built and frameworks are # in use. qtAddLibrary() contains correct logic to deal with this, so # we'll explicitly call that for now. load(qt) - LIBS -= -lQtDeclarative # in non-framework builds, these should be re-added - LIBS -= -lQtDeclarative_debug # within the qtAddLibrary if appropriate, so no - qtAddLibrary(QtDeclarative) # harm done :) + LIBS -= -lQtQml # in non-framework builds, these should be re-added + LIBS -= -lQtQml_debug # within the qtAddLibrary if appropriate, so no + qtAddLibrary(QtQml) # harm done :) } diff --git a/src/quick/scenegraph/coreapi/qsgdefaultrenderer.cpp b/src/quick/scenegraph/coreapi/qsgdefaultrenderer.cpp index bbea89b5ca..7a219585b0 100644 --- a/src/quick/scenegraph/coreapi/qsgdefaultrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgdefaultrenderer.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/coreapi/qsgdefaultrenderer_p.h b/src/quick/scenegraph/coreapi/qsgdefaultrenderer_p.h index 9ef7622a78..3896d03a80 100644 --- a/src/quick/scenegraph/coreapi/qsgdefaultrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgdefaultrenderer_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/coreapi/qsggeometry_p.h b/src/quick/scenegraph/coreapi/qsggeometry_p.h index 0b388ec587..63defa2374 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry_p.h +++ b/src/quick/scenegraph/coreapi/qsggeometry_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp index 308a1fa572..9f0def4706 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp +++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.h b/src/quick/scenegraph/coreapi/qsgmaterial.h index 0673aca814..450dd2866f 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterial.h +++ b/src/quick/scenegraph/coreapi/qsgmaterial.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp index 88afac7ecc..b9eec27e82 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.cpp +++ b/src/quick/scenegraph/coreapi/qsgnode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h index b7e776dbe8..6ba110b91e 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.h +++ b/src/quick/scenegraph/coreapi/qsgnode.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/coreapi/qsgnodeupdater.cpp b/src/quick/scenegraph/coreapi/qsgnodeupdater.cpp index 2562e8d56c..78f007af80 100644 --- a/src/quick/scenegraph/coreapi/qsgnodeupdater.cpp +++ b/src/quick/scenegraph/coreapi/qsgnodeupdater.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h b/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h index 0ad9d76586..c1df82332e 100644 --- a/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h +++ b/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp index 9737fbb294..30dd449b4b 100644 --- a/src/quick/scenegraph/coreapi/qsgrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgrenderer.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/coreapi/qsgrenderer_p.h b/src/quick/scenegraph/coreapi/qsgrenderer_p.h index 9b177abd6b..9d2402d727 100644 --- a/src/quick/scenegraph/coreapi/qsgrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgrenderer_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgadaptationlayer.cpp b/src/quick/scenegraph/qsgadaptationlayer.cpp index 08e85ab8cb..dcb1e5b8be 100644 --- a/src/quick/scenegraph/qsgadaptationlayer.cpp +++ b/src/quick/scenegraph/qsgadaptationlayer.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgadaptationlayer_p.h b/src/quick/scenegraph/qsgadaptationlayer_p.h index 39566c96ac..47dfdb4d8c 100644 --- a/src/quick/scenegraph/qsgadaptationlayer_p.h +++ b/src/quick/scenegraph/qsgadaptationlayer_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp index 03afed293a..e38a4eef6a 100644 --- a/src/quick/scenegraph/qsgcontext.cpp +++ b/src/quick/scenegraph/qsgcontext.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -50,13 +50,13 @@ #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include @@ -110,7 +110,7 @@ class QSGContextPrivate : public QObjectPrivate QOpenGLContext *gl; QHash materials; - QHash textures; + QHash textures; QSGDistanceFieldGlyphCacheManager *distanceFieldCacheManager; @@ -160,7 +160,7 @@ void QSGContext::invalidate() } -QSGTexture *QSGContext::textureForFactory(QDeclarativeTextureFactory *factory, QQuickCanvas *canvas) +QSGTexture *QSGContext::textureForFactory(QQuickTextureFactory *factory, QQuickCanvas *canvas) { Q_D(QSGContext); if (!factory) @@ -168,7 +168,7 @@ QSGTexture *QSGContext::textureForFactory(QDeclarativeTextureFactory *factory, Q QSGTexture *texture = d->textures.value(factory); if (!texture) { - if (QDeclarativeDefaultTextureFactory *dtf = qobject_cast(factory)) + if (QQuickDefaultTextureFactory *dtf = qobject_cast(factory)) texture = createTexture(dtf->image()); else texture = factory->createTexture(canvas); @@ -182,7 +182,7 @@ QSGTexture *QSGContext::textureForFactory(QDeclarativeTextureFactory *factory, Q void QSGContext::textureFactoryDestroyed(QObject *o) { Q_D(QSGContext); - QDeclarativeTextureFactory *f = static_cast(o); + QQuickTextureFactory *f = static_cast(o); // This function will only be called on the scene graph thread, so it is // safe to directly delete the texture here. diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h index 7fa3838db9..0f8b5ae1de 100644 --- a/src/quick/scenegraph/qsgcontext_p.h +++ b/src/quick/scenegraph/qsgcontext_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -72,7 +72,7 @@ class QSGEngine; class QOpenGLContext; class QOpenGLFramebufferObject; -class QDeclarativeTextureFactory; +class QQuickTextureFactory; class Q_QUICK_EXPORT QSGContext : public QObject { @@ -106,7 +106,7 @@ class Q_QUICK_EXPORT QSGContext : public QObject virtual QSurfaceFormat defaultSurfaceFormat() const; - QSGTexture *textureForFactory(QDeclarativeTextureFactory *factory, QQuickCanvas *canvas); + QSGTexture *textureForFactory(QQuickTextureFactory *factory, QQuickCanvas *canvas); static QSGContext *createDefaultContext(); @@ -121,7 +121,7 @@ class Q_QUICK_EXPORT QSGContext : public QObject virtual QAnimationDriver *createAnimationDriver(QObject *parent); - static QDeclarativeTextureFactory *createTextureFactoryFromImage(const QImage &image); + static QQuickTextureFactory *createTextureFactoryFromImage(const QImage &image); public slots: diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index 026afb2d56..d5f84553ba 100644 --- a/src/quick/scenegraph/qsgcontextplugin.cpp +++ b/src/quick/scenegraph/qsgcontextplugin.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -136,7 +136,7 @@ QSGContext *QSGContext::createDefaultContext() /*! - \fn QDeclarativeTextureFactory *createTextureFactoryFromImage(const QImage &image) + \fn QQuickTextureFactory *createTextureFactoryFromImage(const QImage &image) Calls into the scene graph adaptation if available and creates a texture factory. The primary purpose of this function is to reimplement hardware @@ -144,7 +144,7 @@ QSGContext *QSGContext::createDefaultContext() the image providers thread. */ -QDeclarativeTextureFactory *QSGContext::createTextureFactoryFromImage(const QImage &image) +QQuickTextureFactory *QSGContext::createTextureFactoryFromImage(const QImage &image) { QSGAdaptionPluginData *plugin = contextFactory(); if (plugin->factory) diff --git a/src/quick/scenegraph/qsgcontextplugin_p.h b/src/quick/scenegraph/qsgcontextplugin_p.h index 081e64ecdd..fa90873dc6 100644 --- a/src/quick/scenegraph/qsgcontextplugin_p.h +++ b/src/quick/scenegraph/qsgcontextplugin_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -46,7 +46,7 @@ #include #include -#include +#include QT_BEGIN_HEADER @@ -58,7 +58,7 @@ struct Q_QUICK_EXPORT QSGContextFactoryInterface : public QFactoryInterface { virtual QSGContext *create(const QString &key) const = 0; - virtual QDeclarativeTextureFactory *createTextureFactoryFromImage(const QImage &image) = 0; + virtual QQuickTextureFactory *createTextureFactoryFromImage(const QImage &image) = 0; }; #define QSGContextFactoryInterface_iid \ @@ -76,7 +76,7 @@ class Q_QUICK_EXPORT QSGContextPlugin : public QObject, public QSGContextFactory virtual QStringList keys() const = 0; virtual QSGContext *create(const QString &key) const = 0; - virtual QDeclarativeTextureFactory *createTextureFactoryFromImage(const QImage &) { return 0; } + virtual QQuickTextureFactory *createTextureFactoryFromImage(const QImage &) { return 0; } }; QT_END_NAMESPACE diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp index ef5b24d1fd..73dcad6a47 100644 --- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp +++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h index 7fc2ee63d4..76e4a64e60 100644 --- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h +++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdefaultglyphnode.cpp b/src/quick/scenegraph/qsgdefaultglyphnode.cpp index 70f561b61e..f84cd203fa 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp index adc092b1c6..33f02a8ac0 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p.h index b7c7e61014..66662d936a 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p.h +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h index 6b99ade8b0..d640d4cc2c 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdefaultimagenode.cpp b/src/quick/scenegraph/qsgdefaultimagenode.cpp index a6d6df8a00..e6855c4c78 100644 --- a/src/quick/scenegraph/qsgdefaultimagenode.cpp +++ b/src/quick/scenegraph/qsgdefaultimagenode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdefaultimagenode_p.h b/src/quick/scenegraph/qsgdefaultimagenode_p.h index 49c09dbfcd..9062aff2c2 100644 --- a/src/quick/scenegraph/qsgdefaultimagenode_p.h +++ b/src/quick/scenegraph/qsgdefaultimagenode_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp index cb385f6dd0..334bd4346f 100644 --- a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp +++ b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp @@ -4,7 +4,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdefaultrectanglenode_p.h b/src/quick/scenegraph/qsgdefaultrectanglenode_p.h index 49ca3771c1..2a0aa05b90 100644 --- a/src/quick/scenegraph/qsgdefaultrectanglenode_p.h +++ b/src/quick/scenegraph/qsgdefaultrectanglenode_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp index 7b30af85c3..79e5c3b0f4 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp index e525d2a458..30b4a2f9b8 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h index df5b8c6f6c..65ac2d499c 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h index 0aee5bb340..c4af15a2af 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgflashnode.cpp b/src/quick/scenegraph/qsgflashnode.cpp index 0988b23920..9359f5d9c5 100644 --- a/src/quick/scenegraph/qsgflashnode.cpp +++ b/src/quick/scenegraph/qsgflashnode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgflashnode_p.h b/src/quick/scenegraph/qsgflashnode_p.h index 91614ceb0b..68ae6eecd1 100644 --- a/src/quick/scenegraph/qsgflashnode_p.h +++ b/src/quick/scenegraph/qsgflashnode_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgpathsimplifier.cpp b/src/quick/scenegraph/qsgpathsimplifier.cpp index 21e5d473f0..3adf8d71c7 100644 --- a/src/quick/scenegraph/qsgpathsimplifier.cpp +++ b/src/quick/scenegraph/qsgpathsimplifier.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgpathsimplifier_p.h b/src/quick/scenegraph/qsgpathsimplifier_p.h index e60dc4fe37..9e38c5ad00 100644 --- a/src/quick/scenegraph/qsgpathsimplifier_p.h +++ b/src/quick/scenegraph/qsgpathsimplifier_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp index e762898602..799d354400 100644 --- a/src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp +++ b/src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h index cadf4bc55b..851f72d6a7 100644 --- a/src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h +++ b/src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgareaallocator.cpp b/src/quick/scenegraph/util/qsgareaallocator.cpp index 635f38fa5e..415037a7b5 100644 --- a/src/quick/scenegraph/util/qsgareaallocator.cpp +++ b/src/quick/scenegraph/util/qsgareaallocator.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgareaallocator_p.h b/src/quick/scenegraph/util/qsgareaallocator_p.h index cab4824c56..998f7ef4d1 100644 --- a/src/quick/scenegraph/util/qsgareaallocator_p.h +++ b/src/quick/scenegraph/util/qsgareaallocator_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgdistancefieldutil.cpp b/src/quick/scenegraph/util/qsgdistancefieldutil.cpp index be4673bdca..caca610fe2 100644 --- a/src/quick/scenegraph/util/qsgdistancefieldutil.cpp +++ b/src/quick/scenegraph/util/qsgdistancefieldutil.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgdistancefieldutil_p.h b/src/quick/scenegraph/util/qsgdistancefieldutil_p.h index 23da1d121f..cf805e7ff6 100644 --- a/src/quick/scenegraph/util/qsgdistancefieldutil_p.h +++ b/src/quick/scenegraph/util/qsgdistancefieldutil_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgengine.cpp b/src/quick/scenegraph/util/qsgengine.cpp index c5840b2d2b..5d50002870 100644 --- a/src/quick/scenegraph/util/qsgengine.cpp +++ b/src/quick/scenegraph/util/qsgengine.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgengine.h b/src/quick/scenegraph/util/qsgengine.h index 70896d3ef2..f62bdb2ab3 100644 --- a/src/quick/scenegraph/util/qsgengine.h +++ b/src/quick/scenegraph/util/qsgengine.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp index c1d5b04cc1..50c8d1661e 100644 --- a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp +++ b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.h b/src/quick/scenegraph/util/qsgflatcolormaterial.h index 1313a89eef..f1020faa56 100644 --- a/src/quick/scenegraph/util/qsgflatcolormaterial.h +++ b/src/quick/scenegraph/util/qsgflatcolormaterial.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgpainternode.cpp b/src/quick/scenegraph/util/qsgpainternode.cpp index d4a810c30a..1ea64f6205 100644 --- a/src/quick/scenegraph/util/qsgpainternode.cpp +++ b/src/quick/scenegraph/util/qsgpainternode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgpainternode_p.h b/src/quick/scenegraph/util/qsgpainternode_p.h index 0c603c43ca..24b4d26855 100644 --- a/src/quick/scenegraph/util/qsgpainternode_p.h +++ b/src/quick/scenegraph/util/qsgpainternode_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgsimplematerial.h b/src/quick/scenegraph/util/qsgsimplematerial.h index a3579326ee..5e58bd56ca 100644 --- a/src/quick/scenegraph/util/qsgsimplematerial.h +++ b/src/quick/scenegraph/util/qsgsimplematerial.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgsimplerectnode.cpp b/src/quick/scenegraph/util/qsgsimplerectnode.cpp index 4d4ae7c784..09a3b42e98 100644 --- a/src/quick/scenegraph/util/qsgsimplerectnode.cpp +++ b/src/quick/scenegraph/util/qsgsimplerectnode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgsimplerectnode.h b/src/quick/scenegraph/util/qsgsimplerectnode.h index abe9973306..cab8a60ad2 100644 --- a/src/quick/scenegraph/util/qsgsimplerectnode.h +++ b/src/quick/scenegraph/util/qsgsimplerectnode.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgsimpletexturenode.cpp b/src/quick/scenegraph/util/qsgsimpletexturenode.cpp index 0a8edc999c..c347dffbed 100644 --- a/src/quick/scenegraph/util/qsgsimpletexturenode.cpp +++ b/src/quick/scenegraph/util/qsgsimpletexturenode.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgsimpletexturenode.h b/src/quick/scenegraph/util/qsgsimpletexturenode.h index 8416556d00..d4bdca21ca 100644 --- a/src/quick/scenegraph/util/qsgsimpletexturenode.h +++ b/src/quick/scenegraph/util/qsgsimpletexturenode.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp index 7ccedc4c48..5dd4dad6e4 100644 --- a/src/quick/scenegraph/util/qsgtexture.cpp +++ b/src/quick/scenegraph/util/qsgtexture.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,7 +45,8 @@ #include #include #include -#include +#include +#include #if !defined(QT_NO_DEBUG) && (defined(Q_OS_LINUX) || defined(Q_OS_MAC)) #include diff --git a/src/quick/scenegraph/util/qsgtexture.h b/src/quick/scenegraph/util/qsgtexture.h index 2ff4b5daf8..0b4e6fede2 100644 --- a/src/quick/scenegraph/util/qsgtexture.h +++ b/src/quick/scenegraph/util/qsgtexture.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgtexture_p.h b/src/quick/scenegraph/util/qsgtexture_p.h index bbeeec4b74..3d80035c9a 100644 --- a/src/quick/scenegraph/util/qsgtexture_p.h +++ b/src/quick/scenegraph/util/qsgtexture_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp index c5e55a751c..96fc037bfe 100644 --- a/src/quick/scenegraph/util/qsgtexturematerial.cpp +++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgtexturematerial.h b/src/quick/scenegraph/util/qsgtexturematerial.h index 123fbaafed..bfc76422f1 100644 --- a/src/quick/scenegraph/util/qsgtexturematerial.h +++ b/src/quick/scenegraph/util/qsgtexturematerial.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgtexturematerial_p.h b/src/quick/scenegraph/util/qsgtexturematerial_p.h index 55d6ad0a78..0895dbd6c2 100644 --- a/src/quick/scenegraph/util/qsgtexturematerial_p.h +++ b/src/quick/scenegraph/util/qsgtexturematerial_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgtextureprovider.cpp b/src/quick/scenegraph/util/qsgtextureprovider.cpp index 0ec0c6f724..6d81e4eb79 100644 --- a/src/quick/scenegraph/util/qsgtextureprovider.cpp +++ b/src/quick/scenegraph/util/qsgtextureprovider.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgtextureprovider.h b/src/quick/scenegraph/util/qsgtextureprovider.h index 578b323c89..8dcc1f2678 100644 --- a/src/quick/scenegraph/util/qsgtextureprovider.h +++ b/src/quick/scenegraph/util/qsgtextureprovider.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp index 8c09780b15..545b5f201e 100644 --- a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp +++ b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/scenegraph/util/qsgvertexcolormaterial.h b/src/quick/scenegraph/util/qsgvertexcolormaterial.h index 3ba37eff4a..52808a50d9 100644 --- a/src/quick/scenegraph/util/qsgvertexcolormaterial.h +++ b/src/quick/scenegraph/util/qsgvertexcolormaterial.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/quick/util/qdeclarativeutilmodule.cpp b/src/quick/util/qdeclarativeutilmodule.cpp deleted file mode 100644 index 02e4e9cf52..0000000000 --- a/src/quick/util/qdeclarativeutilmodule.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qdeclarativeutilmodule_p.h" -#include "qdeclarativeanimation_p.h" -#include "qdeclarativeanimation_p_p.h" -#include "qdeclarativebehavior_p.h" -#include "qdeclarativebind_p.h" -#include "qdeclarativeconnections_p.h" -#include "qdeclarativesmoothedanimation_p.h" -#include "qdeclarativefontloader_p.h" -#include "qdeclarativepackage_p.h" -#include "qdeclarativepropertychanges_p.h" -#include "qdeclarativespringanimation_p.h" -#include "qdeclarativestategroup_p.h" -#include "qdeclarativestateoperations_p.h" -#include "qdeclarativestate_p.h" -#include "qdeclarativestate_p_p.h" -#include "qdeclarativesystempalette_p.h" -#include "qdeclarativetimer_p.h" -#include "qdeclarativetransition_p.h" -#include -#include -#include -#include -#include - -void QDeclarativeUtilModule::defineModule() -{ - qmlRegisterUncreatableType("QtQuick",2,0,"InputPanel", - QInputMethod::tr("InputPanel is an abstract class")); // deprecated - qmlRegisterUncreatableType("QtQuick",2,0,"InputMethod", - QInputMethod::tr("InputMethod is an abstract class")); - qmlRegisterUncreatableType("QtQuick",2,0,"Animation",QDeclarativeAbstractAnimation::tr("Animation is an abstract class")); - - qmlRegisterType("QtQuick",2,0,"Behavior"); - qmlRegisterType("QtQuick",2,0,"Binding"); - qmlRegisterType("QtQuick",2,0,"ColorAnimation"); - qmlRegisterType("QtQuick",2,0,"Connections"); - qmlRegisterType("QtQuick",2,0,"SmoothedAnimation"); - qmlRegisterType("QtQuick",2,0,"FontLoader"); - qmlRegisterType("QtQuick",2,0,"NumberAnimation"); - qmlRegisterType("QtQuick",2,0,"Package"); - qmlRegisterType("QtQuick",2,0,"ParallelAnimation"); - qmlRegisterType("QtQuick",2,0,"PauseAnimation"); - qmlRegisterType("QtQuick",2,0,"PropertyAction"); - qmlRegisterType("QtQuick",2,0,"PropertyAnimation"); - qmlRegisterType("QtQuick",2,0,"RotationAnimation"); - qmlRegisterType("QtQuick",2,0,"ScriptAction"); - qmlRegisterType("QtQuick",2,0,"SequentialAnimation"); - qmlRegisterType("QtQuick",2,0,"SpringAnimation"); - qmlRegisterType("QtQuick",2,0,"AnimationController"); - qmlRegisterType("QtQuick",2,0,"StateChangeScript"); - qmlRegisterType("QtQuick",2,0,"StateGroup"); - qmlRegisterType("QtQuick",2,0,"State"); - qmlRegisterType("QtQuick",2,0,"SystemPalette"); - qmlRegisterType("QtQuick",2,0,"Timer"); - qmlRegisterType("QtQuick",2,0,"Transition"); - qmlRegisterType("QtQuick",2,0,"Vector3dAnimation"); - - qmlRegisterType(); - - qmlRegisterCustomType("QtQuick",2,0,"PropertyChanges", new QDeclarativePropertyChangesParser); - qmlRegisterCustomType("QtQuick",2,0,"Connections", new QDeclarativeConnectionsParser); -} diff --git a/src/quick/util/qdeclarativeanimation.cpp b/src/quick/util/qquickanimation.cpp similarity index 73% rename from src/quick/util/qdeclarativeanimation.cpp rename to src/quick/util/qquickanimation.cpp index b3b6d93115..51b598b28d 100644 --- a/src/quick/util/qdeclarativeanimation.cpp +++ b/src/quick/util/qquickanimation.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,22 +39,22 @@ ** ****************************************************************************/ -#include "qdeclarativeanimation_p.h" -#include "qdeclarativeanimation_p_p.h" +#include "qquickanimation_p.h" +#include "qquickanimation_p_p.h" -#include -#include +#include +#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE /*! - \qmlclass Animation QDeclarativeAbstractAnimation + \qmlclass Animation QQuickAbstractAnimation \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \brief The Animation element is the base of all QML animations. @@ -81,25 +81,25 @@ QT_BEGIN_NAMESPACE element directly will result in an error. */ -QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(QObject *parent) -: QObject(*(new QDeclarativeAbstractAnimationPrivate), parent) +QQuickAbstractAnimation::QQuickAbstractAnimation(QObject *parent) +: QObject(*(new QQuickAbstractAnimationPrivate), parent) { } -QDeclarativeAbstractAnimation::~QDeclarativeAbstractAnimation() +QQuickAbstractAnimation::~QQuickAbstractAnimation() { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); delete d->animationInstance; } -QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(QDeclarativeAbstractAnimationPrivate &dd, QObject *parent) +QQuickAbstractAnimation::QQuickAbstractAnimation(QQuickAbstractAnimationPrivate &dd, QObject *parent) : QObject(dd, parent) { } -QAbstractAnimationJob* QDeclarativeAbstractAnimation::qtAnimation() +QAbstractAnimationJob* QQuickAbstractAnimation::qtAnimation() { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); return d->animationInstance; } @@ -137,16 +137,16 @@ QAbstractAnimationJob* QDeclarativeAbstractAnimation::qtAnimation() By default, animations are not running. Though, when the animations are assigned to properties, as property value sources using the \e on syntax, they are set to running by default. */ -bool QDeclarativeAbstractAnimation::isRunning() const +bool QQuickAbstractAnimation::isRunning() const { - Q_D(const QDeclarativeAbstractAnimation); + Q_D(const QQuickAbstractAnimation); return d->running; } // the behavior calls this function -void QDeclarativeAbstractAnimation::notifyRunningChanged(bool running) +void QQuickAbstractAnimation::notifyRunningChanged(bool running) { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); if (d->disableUserControl && d->running != running) { d->running = running; emit runningChanged(running); @@ -155,15 +155,15 @@ void QDeclarativeAbstractAnimation::notifyRunningChanged(bool running) //commence is called to start an animation when it is used as a //simple animation, and not as part of a transition -void QDeclarativeAbstractAnimationPrivate::commence() +void QQuickAbstractAnimationPrivate::commence() { - Q_Q(QDeclarativeAbstractAnimation); + Q_Q(QQuickAbstractAnimation); - QDeclarativeStateActions actions; - QDeclarativeProperties properties; + QQuickStateActions actions; + QQmlProperties properties; QAbstractAnimationJob *oldInstance = animationInstance; - animationInstance = q->transition(actions, properties, QDeclarativeAbstractAnimation::Forward); + animationInstance = q->transition(actions, properties, QQuickAbstractAnimation::Forward); if (oldInstance != animationInstance) { animationInstance->addAnimationChangeListener(this, QAbstractAnimationJob::Completion); if (oldInstance) @@ -176,29 +176,29 @@ void QDeclarativeAbstractAnimationPrivate::commence() } } -QDeclarativeProperty QDeclarativeAbstractAnimationPrivate::createProperty(QObject *obj, const QString &str, QObject *infoObj) +QQmlProperty QQuickAbstractAnimationPrivate::createProperty(QObject *obj, const QString &str, QObject *infoObj) { - QDeclarativeProperty prop(obj, str, qmlContext(infoObj)); + QQmlProperty prop(obj, str, qmlContext(infoObj)); if (!prop.isValid()) { - qmlInfo(infoObj) << QDeclarativeAbstractAnimation::tr("Cannot animate non-existent property \"%1\"").arg(str); - return QDeclarativeProperty(); + qmlInfo(infoObj) << QQuickAbstractAnimation::tr("Cannot animate non-existent property \"%1\"").arg(str); + return QQmlProperty(); } else if (!prop.isWritable()) { - qmlInfo(infoObj) << QDeclarativeAbstractAnimation::tr("Cannot animate read-only property \"%1\"").arg(str); - return QDeclarativeProperty(); + qmlInfo(infoObj) << QQuickAbstractAnimation::tr("Cannot animate read-only property \"%1\"").arg(str); + return QQmlProperty(); } return prop; } -void QDeclarativeAbstractAnimation::setRunning(bool r) +void QQuickAbstractAnimation::setRunning(bool r) { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); if (!d->componentComplete) { d->running = r; if (r == false) d->avoidPropertyValueSourceStart = true; else if (!d->registered) { d->registered = true; - QDeclarativeEnginePrivate *engPriv = QDeclarativeEnginePrivate::get(qmlEngine(this)); + QQmlEnginePrivate *engPriv = QQmlEnginePrivate::get(qmlEngine(this)); static int finalizedIdx = -1; if (finalizedIdx < 0) finalizedIdx = metaObject()->indexOfSlot("componentFinalized()"); @@ -257,15 +257,15 @@ void QDeclarativeAbstractAnimation::setRunning(bool r) By default, animations are not paused. */ -bool QDeclarativeAbstractAnimation::isPaused() const +bool QQuickAbstractAnimation::isPaused() const { - Q_D(const QDeclarativeAbstractAnimation); + Q_D(const QQuickAbstractAnimation); return d->paused; } -void QDeclarativeAbstractAnimation::setPaused(bool p) +void QQuickAbstractAnimation::setPaused(bool p) { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); if (d->paused == p) return; @@ -287,21 +287,21 @@ void QDeclarativeAbstractAnimation::setPaused(bool p) emit pausedChanged(d->paused); } -void QDeclarativeAbstractAnimation::classBegin() +void QQuickAbstractAnimation::classBegin() { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); d->componentComplete = false; } -void QDeclarativeAbstractAnimation::componentComplete() +void QQuickAbstractAnimation::componentComplete() { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); d->componentComplete = true; } -void QDeclarativeAbstractAnimation::componentFinalized() +void QQuickAbstractAnimation::componentFinalized() { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); if (d->running) { d->running = false; setRunning(true); @@ -328,15 +328,15 @@ void QDeclarativeAbstractAnimation::componentFinalized() \note alwaysRunToEnd has no effect on animations in a Transition. */ -bool QDeclarativeAbstractAnimation::alwaysRunToEnd() const +bool QQuickAbstractAnimation::alwaysRunToEnd() const { - Q_D(const QDeclarativeAbstractAnimation); + Q_D(const QQuickAbstractAnimation); return d->alwaysRunToEnd; } -void QDeclarativeAbstractAnimation::setAlwaysRunToEnd(bool f) +void QQuickAbstractAnimation::setAlwaysRunToEnd(bool f) { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); if (d->alwaysRunToEnd == f) return; @@ -367,15 +367,15 @@ void QDeclarativeAbstractAnimation::setAlwaysRunToEnd(bool f) } \endcode */ -int QDeclarativeAbstractAnimation::loops() const +int QQuickAbstractAnimation::loops() const { - Q_D(const QDeclarativeAbstractAnimation); + Q_D(const QQuickAbstractAnimation); return d->loopCount; } -void QDeclarativeAbstractAnimation::setLoops(int loops) +void QQuickAbstractAnimation::setLoops(int loops) { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); if (loops < 0) loops = -1; @@ -386,44 +386,44 @@ void QDeclarativeAbstractAnimation::setLoops(int loops) emit loopCountChanged(loops); } -int QDeclarativeAbstractAnimation::duration() const +int QQuickAbstractAnimation::duration() const { - Q_D(const QDeclarativeAbstractAnimation); + Q_D(const QQuickAbstractAnimation); return d->animationInstance ? d->animationInstance->duration() : 0; } -int QDeclarativeAbstractAnimation::currentTime() +int QQuickAbstractAnimation::currentTime() { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); return d->animationInstance ? d->animationInstance->currentLoopTime() : 0; } -void QDeclarativeAbstractAnimation::setCurrentTime(int time) +void QQuickAbstractAnimation::setCurrentTime(int time) { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); if (d->animationInstance) d->animationInstance->setCurrentTime(time); //TODO save value for start? } -QDeclarativeAnimationGroup *QDeclarativeAbstractAnimation::group() const +QQuickAnimationGroup *QQuickAbstractAnimation::group() const { - Q_D(const QDeclarativeAbstractAnimation); + Q_D(const QQuickAbstractAnimation); return d->group; } -void QDeclarativeAbstractAnimation::setGroup(QDeclarativeAnimationGroup *g) +void QQuickAbstractAnimation::setGroup(QQuickAnimationGroup *g) { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); if (d->group == g) return; if (d->group) - static_cast(d->group->d_func())->animations.removeAll(this); + static_cast(d->group->d_func())->animations.removeAll(this); d->group = g; - if (d->group && !static_cast(d->group->d_func())->animations.contains(this)) - static_cast(d->group->d_func())->animations.append(this); + if (d->group && !static_cast(d->group->d_func())->animations.contains(this)) + static_cast(d->group->d_func())->animations.append(this); //if (g) //if removed from a group, then the group should no longer be the parent setParent(g); @@ -436,7 +436,7 @@ void QDeclarativeAbstractAnimation::setGroup(QDeclarativeAnimationGroup *g) If the animation is already running, calling this method has no effect. The \c running property will be true following a call to \c start(). */ -void QDeclarativeAbstractAnimation::start() +void QQuickAbstractAnimation::start() { setRunning(true); } @@ -448,7 +448,7 @@ void QDeclarativeAbstractAnimation::start() If the animation is already paused, calling this method has no effect. The \c paused property will be true following a call to \c pause(). */ -void QDeclarativeAbstractAnimation::pause() +void QQuickAbstractAnimation::pause() { setPaused(true); } @@ -460,7 +460,7 @@ void QDeclarativeAbstractAnimation::pause() If the animation is not paused, calling this method has no effect. The \c paused property will be false following a call to \c resume(). */ -void QDeclarativeAbstractAnimation::resume() +void QQuickAbstractAnimation::resume() { setPaused(false); } @@ -485,7 +485,7 @@ void QDeclarativeAbstractAnimation::resume() continue running until it completes and then stop. The \c running property will still become false immediately. */ -void QDeclarativeAbstractAnimation::stop() +void QQuickAbstractAnimation::stop() { setRunning(false); } @@ -497,7 +497,7 @@ void QDeclarativeAbstractAnimation::stop() This is a convenience method, and is equivalent to calling \c stop() and then \c start(). */ -void QDeclarativeAbstractAnimation::restart() +void QQuickAbstractAnimation::restart() { stop(); start(); @@ -521,17 +521,17 @@ void QDeclarativeAbstractAnimation::restart() a value of 50, while calling \c complete() will set the \c x property to 100, exactly as though the animation had played the whole way through. */ -void QDeclarativeAbstractAnimation::complete() +void QQuickAbstractAnimation::complete() { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); if (isRunning() && d->animationInstance) { d->animationInstance->setCurrentTime(d->animationInstance->duration()); } } -void QDeclarativeAbstractAnimation::setTarget(const QDeclarativeProperty &p) +void QQuickAbstractAnimation::setTarget(const QQmlProperty &p) { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); d->defaultProperty = p; if (!d->avoidPropertyValueSourceStart) @@ -543,9 +543,9 @@ void QDeclarativeAbstractAnimation::setTarget(const QDeclarativeProperty &p) so this function allows us to do the same thing as setTarget without that assumption */ -void QDeclarativeAbstractAnimation::setDefaultTarget(const QDeclarativeProperty &p) +void QQuickAbstractAnimation::setDefaultTarget(const QQmlProperty &p) { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); d->defaultProperty = p; } @@ -554,34 +554,34 @@ void QDeclarativeAbstractAnimation::setDefaultTarget(const QDeclarativeProperty because something else (like a Behavior) already has control over the animation. */ -void QDeclarativeAbstractAnimation::setDisableUserControl() +void QQuickAbstractAnimation::setDisableUserControl() { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); d->disableUserControl = true; } -void QDeclarativeAbstractAnimation::setEnableUserControl() +void QQuickAbstractAnimation::setEnableUserControl() { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); d->disableUserControl = false; } -bool QDeclarativeAbstractAnimation::userControlDisabled() const +bool QQuickAbstractAnimation::userControlDisabled() const { - Q_D(const QDeclarativeAbstractAnimation); + Q_D(const QQuickAbstractAnimation); return d->disableUserControl; } -QAbstractAnimationJob* QDeclarativeAbstractAnimation::initInstance(QAbstractAnimationJob *animation) +QAbstractAnimationJob* QQuickAbstractAnimation::initInstance(QAbstractAnimationJob *animation) { - Q_D(QDeclarativeAbstractAnimation); + Q_D(QQuickAbstractAnimation); animation->setLoopCount(d->loopCount); return animation; } -QAbstractAnimationJob* QDeclarativeAbstractAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickAbstractAnimation::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { @@ -592,9 +592,9 @@ QAbstractAnimationJob* QDeclarativeAbstractAnimation::transition(QDeclarativeSta return 0; } -void QDeclarativeAbstractAnimationPrivate::animationFinished(QAbstractAnimationJob*) +void QQuickAbstractAnimationPrivate::animationFinished(QAbstractAnimationJob*) { - Q_Q(QDeclarativeAbstractAnimation); + Q_Q(QQuickAbstractAnimation); q->setRunning(false); if (alwaysRunToEnd && loopCount != 1) { //restore the proper loopCount for the next run @@ -603,7 +603,7 @@ void QDeclarativeAbstractAnimationPrivate::animationFinished(QAbstractAnimationJ } /*! - \qmlclass PauseAnimation QDeclarativePauseAnimation + \qmlclass PauseAnimation QQuickPauseAnimation \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits Animation @@ -621,14 +621,14 @@ void QDeclarativeAbstractAnimationPrivate::animationFinished(QAbstractAnimationJ } \endcode - \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {qml/animation/basics}{Animation basics example} */ -QDeclarativePauseAnimation::QDeclarativePauseAnimation(QObject *parent) -: QDeclarativeAbstractAnimation(*(new QDeclarativePauseAnimationPrivate), parent) +QQuickPauseAnimation::QQuickPauseAnimation(QObject *parent) +: QQuickAbstractAnimation(*(new QQuickPauseAnimationPrivate), parent) { } -QDeclarativePauseAnimation::~QDeclarativePauseAnimation() +QQuickPauseAnimation::~QQuickPauseAnimation() { } @@ -638,32 +638,32 @@ QDeclarativePauseAnimation::~QDeclarativePauseAnimation() The default value is 250. */ -int QDeclarativePauseAnimation::duration() const +int QQuickPauseAnimation::duration() const { - Q_D(const QDeclarativePauseAnimation); + Q_D(const QQuickPauseAnimation); return d->duration; } -void QDeclarativePauseAnimation::setDuration(int duration) +void QQuickPauseAnimation::setDuration(int duration) { if (duration < 0) { qmlInfo(this) << tr("Cannot set a duration of < 0"); return; } - Q_D(QDeclarativePauseAnimation); + Q_D(QQuickPauseAnimation); if (d->duration == duration) return; d->duration = duration; emit durationChanged(duration); } -QAbstractAnimationJob* QDeclarativePauseAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickPauseAnimation::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { - Q_D(QDeclarativePauseAnimation); + Q_D(QQuickPauseAnimation); Q_UNUSED(actions); Q_UNUSED(modified); Q_UNUSED(direction); @@ -673,7 +673,7 @@ QAbstractAnimationJob* QDeclarativePauseAnimation::transition(QDeclarativeStateA } /*! - \qmlclass ColorAnimation QDeclarativeColorAnimation + \qmlclass ColorAnimation QQuickColorAnimation \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits PropertyAnimation @@ -686,7 +686,7 @@ QAbstractAnimationJob* QDeclarativePauseAnimation::transition(QDeclarativeStateA as a property value source. It animates the \c color property's value from its current value to a value of "red", over 1000 milliseconds: - \snippet doc/src/snippets/declarative/coloranimation.qml 0 + \snippet doc/src/snippets/qml/coloranimation.qml 0 Like any other animation element, a ColorAnimation can be applied in a number of ways, including transitions, behaviors and property value @@ -699,18 +699,18 @@ QAbstractAnimationJob* QDeclarativePauseAnimation::transition(QDeclarativeStateA \l{PropertyAnimation::}{properties} are explicitly set for the animation, then those are used instead. - \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {qml/animation/basics}{Animation basics example} */ -QDeclarativeColorAnimation::QDeclarativeColorAnimation(QObject *parent) -: QDeclarativePropertyAnimation(parent) +QQuickColorAnimation::QQuickColorAnimation(QObject *parent) +: QQuickPropertyAnimation(parent) { - Q_D(QDeclarativePropertyAnimation); + Q_D(QQuickPropertyAnimation); d->interpolatorType = QMetaType::QColor; d->defaultToInterpolatorType = true; d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType); } -QDeclarativeColorAnimation::~QDeclarativeColorAnimation() +QQuickColorAnimation::~QQuickColorAnimation() { } @@ -740,15 +740,15 @@ QDeclarativeColorAnimation::~QDeclarativeColorAnimation() \sa {QML Animation and Transitions} */ -QColor QDeclarativeColorAnimation::from() const +QColor QQuickColorAnimation::from() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->from.value(); } -void QDeclarativeColorAnimation::setFrom(const QColor &f) +void QQuickColorAnimation::setFrom(const QColor &f) { - QDeclarativePropertyAnimation::setFrom(f); + QQuickPropertyAnimation::setFrom(f); } /*! @@ -763,15 +763,15 @@ void QDeclarativeColorAnimation::setFrom(const QColor &f) \sa {QML Animation and Transitions} */ -QColor QDeclarativeColorAnimation::to() const +QColor QQuickColorAnimation::to() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->to.value(); } -void QDeclarativeColorAnimation::setTo(const QColor &t) +void QQuickColorAnimation::setTo(const QColor &t) { - QDeclarativePropertyAnimation::setTo(t); + QQuickPropertyAnimation::setTo(t); } QActionAnimation::QActionAnimation() @@ -817,7 +817,7 @@ void QActionAnimation::updateState(State newState, State oldState) } /*! - \qmlclass ScriptAction QDeclarativeScriptAction + \qmlclass ScriptAction QQuickScriptAction \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits Animation @@ -840,35 +840,35 @@ void QActionAnimation::updateState(State newState, State oldState) When used as part of a Transition, you can also target a specific StateChangeScript to run using the \c scriptName property. - \snippet doc/src/snippets/declarative/states/statechangescript.qml state and transition + \snippet doc/src/snippets/qml/states/statechangescript.qml state and transition \sa StateChangeScript */ -QDeclarativeScriptAction::QDeclarativeScriptAction(QObject *parent) - :QDeclarativeAbstractAnimation(*(new QDeclarativeScriptActionPrivate), parent) +QQuickScriptAction::QQuickScriptAction(QObject *parent) + :QQuickAbstractAnimation(*(new QQuickScriptActionPrivate), parent) { } -QDeclarativeScriptAction::~QDeclarativeScriptAction() +QQuickScriptAction::~QQuickScriptAction() { } -QDeclarativeScriptActionPrivate::QDeclarativeScriptActionPrivate() - : QDeclarativeAbstractAnimationPrivate(), hasRunScriptScript(false), reversing(false){} +QQuickScriptActionPrivate::QQuickScriptActionPrivate() + : QQuickAbstractAnimationPrivate(), hasRunScriptScript(false), reversing(false){} /*! \qmlproperty script QtQuick2::ScriptAction::script This property holds the script to run. */ -QDeclarativeScriptString QDeclarativeScriptAction::script() const +QQmlScriptString QQuickScriptAction::script() const { - Q_D(const QDeclarativeScriptAction); + Q_D(const QQuickScriptAction); return d->script; } -void QDeclarativeScriptAction::setScript(const QDeclarativeScriptString &script) +void QQuickScriptAction::setScript(const QQmlScriptString &script) { - Q_D(QDeclarativeScriptAction); + Q_D(QQuickScriptAction); d->script = script; } @@ -882,56 +882,56 @@ void QDeclarativeScriptAction::setScript(const QDeclarativeScriptString &script) \note When using scriptName in a reversible transition, the script will only be run when the transition is being run forwards. */ -QString QDeclarativeScriptAction::stateChangeScriptName() const +QString QQuickScriptAction::stateChangeScriptName() const { - Q_D(const QDeclarativeScriptAction); + Q_D(const QQuickScriptAction); return d->name; } -void QDeclarativeScriptAction::setStateChangeScriptName(const QString &name) +void QQuickScriptAction::setStateChangeScriptName(const QString &name) { - Q_D(QDeclarativeScriptAction); + Q_D(QQuickScriptAction); d->name = name; } -QAbstractAnimationAction* QDeclarativeScriptActionPrivate::createAction() +QAbstractAnimationAction* QQuickScriptActionPrivate::createAction() { return new Proxy(this); } -void QDeclarativeScriptActionPrivate::execute() +void QQuickScriptActionPrivate::execute() { - Q_Q(QDeclarativeScriptAction); + Q_Q(QQuickScriptAction); if (hasRunScriptScript && reversing) return; - QDeclarativeScriptString scriptStr = hasRunScriptScript ? runScriptScript : script; + QQmlScriptString scriptStr = hasRunScriptScript ? runScriptScript : script; if (!scriptStr.script().isEmpty()) { - QDeclarativeExpression expr(scriptStr); + QQmlExpression expr(scriptStr); expr.evaluate(); if (expr.hasError()) qmlInfo(q) << expr.error(); } } -QAbstractAnimationJob* QDeclarativeScriptAction::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickScriptAction::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { - Q_D(QDeclarativeScriptAction); + Q_D(QQuickScriptAction); Q_UNUSED(modified); Q_UNUSED(defaultTarget); d->hasRunScriptScript = false; d->reversing = (direction == Backward); for (int ii = 0; ii < actions.count(); ++ii) { - QDeclarativeAction &action = actions[ii]; + QQuickAction &action = actions[ii]; - if (action.event && action.event->type() == QDeclarativeActionEvent::Script - && static_cast(action.event)->name() == d->name) { - d->runScriptScript = static_cast(action.event)->script(); + if (action.event && action.event->type() == QQuickActionEvent::Script + && static_cast(action.event)->name() == d->name) { + d->runScriptScript = static_cast(action.event)->script(); d->hasRunScriptScript = true; action.actionDone = true; break; //only match one (names should be unique) @@ -941,7 +941,7 @@ QAbstractAnimationJob* QDeclarativeScriptAction::transition(QDeclarativeStateAct } /*! - \qmlclass PropertyAction QDeclarativePropertyAction + \qmlclass PropertyAction QQuickPropertyAction \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits Animation @@ -956,14 +956,14 @@ QAbstractAnimationJob* QDeclarativeScriptAction::transition(QDeclarativeStateAct \l {Image::}{smooth} property to \c true, animates the width of the image, then sets \l {Image::}{smooth} back to \c false: - \snippet doc/src/snippets/declarative/propertyaction.qml standalone + \snippet doc/src/snippets/qml/propertyaction.qml standalone PropertyAction is also useful for setting the exact point at which a property change should occur during a \l Transition. For example, if PropertyChanges was used in a \l State to rotate an item around a particular \l {Item::}{transformOrigin}, it might be implemented like this: - \snippet doc/src/snippets/declarative/propertyaction.qml transition + \snippet doc/src/snippets/qml/propertyaction.qml transition However, with this code, the \c transformOrigin is not set until \e after the animation, as a \l State is taken to define the values at the \e end of @@ -971,48 +971,48 @@ QAbstractAnimationJob* QDeclarativeScriptAction::transition(QDeclarativeStateAct then jump to \c Item.BottomRight. To fix this, insert a PropertyAction before the RotationAnimation begins: - \snippet doc/src/snippets/declarative/propertyaction-sequential.qml sequential + \snippet doc/src/snippets/qml/propertyaction-sequential.qml sequential This immediately sets the \c transformOrigin property to the value defined in the end state of the \l Transition (i.e. the value defined in the PropertyAction object) so that the rotation animation begins with the correct transform origin. - \sa {QML Animation and Transitions}, QtDeclarative + \sa {QML Animation and Transitions}, QtQml */ -QDeclarativePropertyAction::QDeclarativePropertyAction(QObject *parent) -: QDeclarativeAbstractAnimation(*(new QDeclarativePropertyActionPrivate), parent) +QQuickPropertyAction::QQuickPropertyAction(QObject *parent) +: QQuickAbstractAnimation(*(new QQuickPropertyActionPrivate), parent) { } -QDeclarativePropertyAction::~QDeclarativePropertyAction() +QQuickPropertyAction::~QQuickPropertyAction() { } -QObject *QDeclarativePropertyAction::target() const +QObject *QQuickPropertyAction::target() const { - Q_D(const QDeclarativePropertyAction); + Q_D(const QQuickPropertyAction); return d->target; } -void QDeclarativePropertyAction::setTargetObject(QObject *o) +void QQuickPropertyAction::setTargetObject(QObject *o) { - Q_D(QDeclarativePropertyAction); + Q_D(QQuickPropertyAction); if (d->target == o) return; d->target = o; emit targetChanged(); } -QString QDeclarativePropertyAction::property() const +QString QQuickPropertyAction::property() const { - Q_D(const QDeclarativePropertyAction); + Q_D(const QQuickPropertyAction); return d->propertyName; } -void QDeclarativePropertyAction::setProperty(const QString &n) +void QQuickPropertyAction::setProperty(const QString &n) { - Q_D(QDeclarativePropertyAction); + Q_D(QQuickPropertyAction); if (d->propertyName == n) return; d->propertyName = n; @@ -1034,25 +1034,25 @@ void QDeclarativePropertyAction::setProperty(const QString &n) \sa exclude */ -QString QDeclarativePropertyAction::properties() const +QString QQuickPropertyAction::properties() const { - Q_D(const QDeclarativePropertyAction); + Q_D(const QQuickPropertyAction); return d->properties; } -void QDeclarativePropertyAction::setProperties(const QString &p) +void QQuickPropertyAction::setProperties(const QString &p) { - Q_D(QDeclarativePropertyAction); + Q_D(QQuickPropertyAction); if (d->properties == p) return; d->properties = p; emit propertiesChanged(p); } -QDeclarativeListProperty QDeclarativePropertyAction::targets() +QQmlListProperty QQuickPropertyAction::targets() { - Q_D(QDeclarativePropertyAction); - return QDeclarativeListProperty(this, d->targets); + Q_D(QQuickPropertyAction); + return QQmlListProperty(this, d->targets); } /*! @@ -1061,10 +1061,10 @@ QDeclarativeListProperty QDeclarativePropertyAction::targets() \sa targets */ -QDeclarativeListProperty QDeclarativePropertyAction::exclude() +QQmlListProperty QQuickPropertyAction::exclude() { - Q_D(QDeclarativePropertyAction); - return QDeclarativeListProperty(this, d->exclude); + Q_D(QQuickPropertyAction); + return QQmlListProperty(this, d->exclude); } /*! @@ -1076,37 +1076,37 @@ QDeclarativeListProperty QDeclarativePropertyAction::exclude() \l Transition, or the value of the property change that triggered the \l Behavior. */ -QVariant QDeclarativePropertyAction::value() const +QVariant QQuickPropertyAction::value() const { - Q_D(const QDeclarativePropertyAction); + Q_D(const QQuickPropertyAction); return d->value; } -void QDeclarativePropertyAction::setValue(const QVariant &v) +void QQuickPropertyAction::setValue(const QVariant &v) { - Q_D(QDeclarativePropertyAction); + Q_D(QQuickPropertyAction); if (d->value.isNull || d->value != v) { d->value = v; emit valueChanged(v); } } -QAbstractAnimationJob* QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickPropertyAction::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { - Q_D(QDeclarativePropertyAction); + Q_D(QQuickPropertyAction); Q_UNUSED(direction); - struct QDeclarativeSetPropertyAnimationAction : public QAbstractAnimationAction + struct QQuickSetPropertyAnimationAction : public QAbstractAnimationAction { - QDeclarativeStateActions actions; + QQuickStateActions actions; virtual void doAction() { for (int ii = 0; ii < actions.count(); ++ii) { - const QDeclarativeAction &action = actions.at(ii); - QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + const QQuickAction &action = actions.at(ii); + QQmlPropertyPrivate::write(action.property, action.toValue, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); } } }; @@ -1131,22 +1131,22 @@ QAbstractAnimationJob* QDeclarativePropertyAction::transition(QDeclarativeStateA if (defaultTarget && targets.isEmpty()) targets << defaultTarget; - QDeclarativeSetPropertyAnimationAction *data = new QDeclarativeSetPropertyAnimationAction; + QQuickSetPropertyAnimationAction *data = new QQuickSetPropertyAnimationAction; bool hasExplicit = false; //an explicit animation has been specified if (d->value.isValid()) { for (int i = 0; i < props.count(); ++i) { for (int j = 0; j < targets.count(); ++j) { - QDeclarativeAction myAction; + QQuickAction myAction; myAction.property = d->createProperty(targets.at(j), props.at(i), this); if (myAction.property.isValid()) { myAction.toValue = d->value; - QDeclarativePropertyAnimationPrivate::convertVariant(myAction.toValue, myAction.property.propertyType()); + QQuickPropertyAnimationPrivate::convertVariant(myAction.toValue, myAction.property.propertyType()); data->actions << myAction; hasExplicit = true; for (int ii = 0; ii < actions.count(); ++ii) { - QDeclarativeAction &action = actions[ii]; + QQuickAction &action = actions[ii]; if (action.property.object() == myAction.property.object() && myAction.property.name() == action.property.name()) { modified << action.property; @@ -1160,7 +1160,7 @@ QAbstractAnimationJob* QDeclarativePropertyAction::transition(QDeclarativeStateA if (!hasExplicit) for (int ii = 0; ii < actions.count(); ++ii) { - QDeclarativeAction &action = actions[ii]; + QQuickAction &action = actions[ii]; QObject *obj = action.property.object(); QString propertyName = action.property.name(); @@ -1171,11 +1171,11 @@ QAbstractAnimationJob* QDeclarativePropertyAction::transition(QDeclarativeStateA if ((targets.isEmpty() || targets.contains(obj) || (!same && targets.contains(sObj))) && (!d->exclude.contains(obj)) && (same || (!d->exclude.contains(sObj))) && (props.contains(propertyName) || (!same && props.contains(sPropertyName)))) { - QDeclarativeAction myAction = action; + QQuickAction myAction = action; if (d->value.isValid()) myAction.toValue = d->value; - QDeclarativePropertyAnimationPrivate::convertVariant(myAction.toValue, myAction.property.propertyType()); + QQuickPropertyAnimationPrivate::convertVariant(myAction.toValue, myAction.property.propertyType()); modified << action.property; data->actions << myAction; @@ -1193,7 +1193,7 @@ QAbstractAnimationJob* QDeclarativePropertyAction::transition(QDeclarativeStateA } /*! - \qmlclass NumberAnimation QDeclarativeNumberAnimation + \qmlclass NumberAnimation QQuickNumberAnimation \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits PropertyAnimation @@ -1206,7 +1206,7 @@ QAbstractAnimationJob* QDeclarativePropertyAction::transition(QDeclarativeStateA as a property value source. It animates the \c x value from its current value to a value of 50, over 1000 milliseconds: - \snippet doc/src/snippets/declarative/numberanimation.qml 0 + \snippet doc/src/snippets/qml/numberanimation.qml 0 Like any other animation element, a NumberAnimation can be applied in a number of ways, including transitions, behaviors and property value @@ -1217,27 +1217,27 @@ QAbstractAnimationJob* QDeclarativePropertyAction::transition(QDeclarativeStateA changes in the number value that it is tracking. If this is the case, use SmoothedAnimation instead. - \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {qml/animation/basics}{Animation basics example} */ -QDeclarativeNumberAnimation::QDeclarativeNumberAnimation(QObject *parent) -: QDeclarativePropertyAnimation(parent) +QQuickNumberAnimation::QQuickNumberAnimation(QObject *parent) +: QQuickPropertyAnimation(parent) { init(); } -QDeclarativeNumberAnimation::QDeclarativeNumberAnimation(QDeclarativePropertyAnimationPrivate &dd, QObject *parent) -: QDeclarativePropertyAnimation(dd, parent) +QQuickNumberAnimation::QQuickNumberAnimation(QQuickPropertyAnimationPrivate &dd, QObject *parent) +: QQuickPropertyAnimation(dd, parent) { init(); } -QDeclarativeNumberAnimation::~QDeclarativeNumberAnimation() +QQuickNumberAnimation::~QQuickNumberAnimation() { } -void QDeclarativeNumberAnimation::init() +void QQuickNumberAnimation::init() { - Q_D(QDeclarativePropertyAnimation); + Q_D(QQuickPropertyAnimation); d->interpolatorType = QMetaType::QReal; d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType); } @@ -1269,15 +1269,15 @@ void QDeclarativeNumberAnimation::init() \sa {QML Animation and Transitions} */ -qreal QDeclarativeNumberAnimation::from() const +qreal QQuickNumberAnimation::from() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->from.toReal(); } -void QDeclarativeNumberAnimation::setFrom(qreal f) +void QQuickNumberAnimation::setFrom(qreal f) { - QDeclarativePropertyAnimation::setFrom(f); + QQuickPropertyAnimation::setFrom(f); } /*! @@ -1291,21 +1291,21 @@ void QDeclarativeNumberAnimation::setFrom(qreal f) \sa {QML Animation and Transitions} */ -qreal QDeclarativeNumberAnimation::to() const +qreal QQuickNumberAnimation::to() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->to.toReal(); } -void QDeclarativeNumberAnimation::setTo(qreal t) +void QQuickNumberAnimation::setTo(qreal t) { - QDeclarativePropertyAnimation::setTo(t); + QQuickPropertyAnimation::setTo(t); } /*! - \qmlclass Vector3dAnimation QDeclarativeVector3dAnimation + \qmlclass Vector3dAnimation QQuickVector3dAnimation \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits PropertyAnimation @@ -1319,18 +1319,18 @@ void QDeclarativeNumberAnimation::setTo(qreal t) sources. The \l {QML Animation and Transitions} documentation shows a variety of methods for creating animations. - \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {qml/animation/basics}{Animation basics example} */ -QDeclarativeVector3dAnimation::QDeclarativeVector3dAnimation(QObject *parent) -: QDeclarativePropertyAnimation(parent) +QQuickVector3dAnimation::QQuickVector3dAnimation(QObject *parent) +: QQuickPropertyAnimation(parent) { - Q_D(QDeclarativePropertyAnimation); + Q_D(QQuickPropertyAnimation); d->interpolatorType = QMetaType::QVector3D; d->defaultToInterpolatorType = true; d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType); } -QDeclarativeVector3dAnimation::~QDeclarativeVector3dAnimation() +QQuickVector3dAnimation::~QQuickVector3dAnimation() { } @@ -1345,15 +1345,15 @@ QDeclarativeVector3dAnimation::~QDeclarativeVector3dAnimation() \sa {QML Animation and Transitions} */ -QVector3D QDeclarativeVector3dAnimation::from() const +QVector3D QQuickVector3dAnimation::from() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->from.value(); } -void QDeclarativeVector3dAnimation::setFrom(QVector3D f) +void QQuickVector3dAnimation::setFrom(QVector3D f) { - QDeclarativePropertyAnimation::setFrom(f); + QQuickPropertyAnimation::setFrom(f); } /*! @@ -1367,21 +1367,21 @@ void QDeclarativeVector3dAnimation::setFrom(QVector3D f) \sa {QML Animation and Transitions} */ -QVector3D QDeclarativeVector3dAnimation::to() const +QVector3D QQuickVector3dAnimation::to() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->to.value(); } -void QDeclarativeVector3dAnimation::setTo(QVector3D t) +void QQuickVector3dAnimation::setTo(QVector3D t) { - QDeclarativePropertyAnimation::setTo(t); + QQuickPropertyAnimation::setTo(t); } /*! - \qmlclass RotationAnimation QDeclarativeRotationAnimation + \qmlclass RotationAnimation QQuickRotationAnimation \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits PropertyAnimation @@ -1399,7 +1399,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t) In the following example we use RotationAnimation to animate the rotation between states via the shortest path: - \snippet doc/src/snippets/declarative/rotationanimation.qml 0 + \snippet doc/src/snippets/qml/rotationanimation.qml 0 Notice the RotationAnimation did not need to set a \l target value. As a convenience, when used in a transition, RotationAnimation will rotate all @@ -1418,7 +1418,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t) sources. The \l {QML Animation and Transitions} documentation shows a variety of methods for creating animations. - \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {qml/animation/basics}{Animation basics example} */ QVariant _q_interpolateShortestRotation(qreal &f, qreal &t, qreal progress) { @@ -1457,16 +1457,16 @@ QVariant _q_interpolateCounterclockwiseRotation(qreal &f, qreal &t, qreal progre return QVariant(f + (newt - f) * progress); } -QDeclarativeRotationAnimation::QDeclarativeRotationAnimation(QObject *parent) -: QDeclarativePropertyAnimation(*(new QDeclarativeRotationAnimationPrivate), parent) +QQuickRotationAnimation::QQuickRotationAnimation(QObject *parent) +: QQuickPropertyAnimation(*(new QQuickRotationAnimationPrivate), parent) { - Q_D(QDeclarativeRotationAnimation); + Q_D(QQuickRotationAnimation); d->interpolatorType = QMetaType::QReal; d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType); d->defaultProperties = QLatin1String("rotation,angle"); } -QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation() +QQuickRotationAnimation::~QQuickRotationAnimation() { } @@ -1496,15 +1496,15 @@ QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation() \sa {QML Animation and Transitions} */ -qreal QDeclarativeRotationAnimation::from() const +qreal QQuickRotationAnimation::from() const { - Q_D(const QDeclarativeRotationAnimation); + Q_D(const QQuickRotationAnimation); return d->from.toReal(); } -void QDeclarativeRotationAnimation::setFrom(qreal f) +void QQuickRotationAnimation::setFrom(qreal f) { - QDeclarativePropertyAnimation::setFrom(f); + QQuickPropertyAnimation::setFrom(f); } /*! @@ -1518,15 +1518,15 @@ void QDeclarativeRotationAnimation::setFrom(qreal f) \sa {QML Animation and Transitions} */ -qreal QDeclarativeRotationAnimation::to() const +qreal QQuickRotationAnimation::to() const { - Q_D(const QDeclarativeRotationAnimation); + Q_D(const QQuickRotationAnimation); return d->to.toReal(); } -void QDeclarativeRotationAnimation::setTo(qreal t) +void QQuickRotationAnimation::setTo(qreal t) { - QDeclarativePropertyAnimation::setTo(t); + QQuickPropertyAnimation::setTo(t); } /*! @@ -1544,15 +1544,15 @@ void QDeclarativeRotationAnimation::setTo(qreal t) A rotation from 10 to 350 will rotate 20 degrees counterclockwise. \endlist */ -QDeclarativeRotationAnimation::RotationDirection QDeclarativeRotationAnimation::direction() const +QQuickRotationAnimation::RotationDirection QQuickRotationAnimation::direction() const { - Q_D(const QDeclarativeRotationAnimation); + Q_D(const QQuickRotationAnimation); return d->direction; } -void QDeclarativeRotationAnimation::setDirection(QDeclarativeRotationAnimation::RotationDirection direction) +void QQuickRotationAnimation::setDirection(QQuickRotationAnimation::RotationDirection direction) { - Q_D(QDeclarativeRotationAnimation); + Q_D(QQuickRotationAnimation); if (d->direction == direction) return; @@ -1576,50 +1576,50 @@ void QDeclarativeRotationAnimation::setDirection(QDeclarativeRotationAnimation:: -QDeclarativeAnimationGroup::QDeclarativeAnimationGroup(QObject *parent) -: QDeclarativeAbstractAnimation(*(new QDeclarativeAnimationGroupPrivate), parent) +QQuickAnimationGroup::QQuickAnimationGroup(QObject *parent) +: QQuickAbstractAnimation(*(new QQuickAnimationGroupPrivate), parent) { } -QDeclarativeAnimationGroup::QDeclarativeAnimationGroup(QDeclarativeAnimationGroupPrivate &dd, QObject *parent) - : QDeclarativeAbstractAnimation(dd, parent) +QQuickAnimationGroup::QQuickAnimationGroup(QQuickAnimationGroupPrivate &dd, QObject *parent) + : QQuickAbstractAnimation(dd, parent) { } -void QDeclarativeAnimationGroupPrivate::append_animation(QDeclarativeListProperty *list, QDeclarativeAbstractAnimation *a) +void QQuickAnimationGroupPrivate::append_animation(QQmlListProperty *list, QQuickAbstractAnimation *a) { - QDeclarativeAnimationGroup *q = qobject_cast(list->object); + QQuickAnimationGroup *q = qobject_cast(list->object); if (q) { a->setGroup(q); } } -void QDeclarativeAnimationGroupPrivate::clear_animation(QDeclarativeListProperty *list) +void QQuickAnimationGroupPrivate::clear_animation(QQmlListProperty *list) { - QDeclarativeAnimationGroup *q = qobject_cast(list->object); + QQuickAnimationGroup *q = qobject_cast(list->object); if (q) { while (q->d_func()->animations.count()) { - QDeclarativeAbstractAnimation *firstAnim = q->d_func()->animations.at(0); + QQuickAbstractAnimation *firstAnim = q->d_func()->animations.at(0); firstAnim->setGroup(0); } } } -QDeclarativeAnimationGroup::~QDeclarativeAnimationGroup() +QQuickAnimationGroup::~QQuickAnimationGroup() { } -QDeclarativeListProperty QDeclarativeAnimationGroup::animations() +QQmlListProperty QQuickAnimationGroup::animations() { - Q_D(QDeclarativeAnimationGroup); - QDeclarativeListProperty list(this, d->animations); - list.append = &QDeclarativeAnimationGroupPrivate::append_animation; - list.clear = &QDeclarativeAnimationGroupPrivate::clear_animation; + Q_D(QQuickAnimationGroup); + QQmlListProperty list(this, d->animations); + list.append = &QQuickAnimationGroupPrivate::append_animation; + list.clear = &QQuickAnimationGroupPrivate::clear_animation; return list; } /*! - \qmlclass SequentialAnimation QDeclarativeSequentialAnimation + \qmlclass SequentialAnimation QQuickSequentialAnimation \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits Animation @@ -1633,7 +1633,7 @@ QDeclarativeListProperty QDeclarativeAnimationGro The following example runs two number animations in a sequence. The \l Rectangle animates to a \c x position of 50, then to a \c y position of 50. - \snippet doc/src/snippets/declarative/sequentialanimation.qml 0 + \snippet doc/src/snippets/qml/sequentialanimation.qml 0 Animations defined within a \l Transition are automatically run in parallel, so SequentialAnimation can be used to enclose the animations in a \l Transition @@ -1648,24 +1648,24 @@ QDeclarativeListProperty QDeclarativeAnimationGro ParallelAnimation, it cannot be individually started and stopped; the SequentialAnimation or ParallelAnimation must be started and stopped as a group. - \sa ParallelAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} + \sa ParallelAnimation, {QML Animation and Transitions}, {qml/animation/basics}{Animation basics example} */ -QDeclarativeSequentialAnimation::QDeclarativeSequentialAnimation(QObject *parent) : - QDeclarativeAnimationGroup(parent) +QQuickSequentialAnimation::QQuickSequentialAnimation(QObject *parent) : + QQuickAnimationGroup(parent) { } -QDeclarativeSequentialAnimation::~QDeclarativeSequentialAnimation() +QQuickSequentialAnimation::~QQuickSequentialAnimation() { } -QAbstractAnimationJob* QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickSequentialAnimation::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { - Q_D(QDeclarativeAnimationGroup); + Q_D(QQuickAnimationGroup); QSequentialAnimationGroupJob *ag = new QSequentialAnimationGroupJob; @@ -1691,7 +1691,7 @@ QAbstractAnimationJob* QDeclarativeSequentialAnimation::transition(QDeclarativeS /*! - \qmlclass ParallelAnimation QDeclarativeParallelAnimation + \qmlclass ParallelAnimation QQuickParallelAnimation \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits Animation @@ -1705,7 +1705,7 @@ QAbstractAnimationJob* QDeclarativeSequentialAnimation::transition(QDeclarativeS The following animation runs two number animations in parallel. The \l Rectangle moves to (50,50) by animating its \c x and \c y properties at the same time. - \snippet doc/src/snippets/declarative/parallelanimation.qml 0 + \snippet doc/src/snippets/qml/parallelanimation.qml 0 Like any other animation element, a ParallelAnimation can be applied in a number of ways, including transitions, behaviors and property value @@ -1716,23 +1716,23 @@ QAbstractAnimationJob* QDeclarativeSequentialAnimation::transition(QDeclarativeS ParallelAnimation, it cannot be individually started and stopped; the SequentialAnimation or ParallelAnimation must be started and stopped as a group. - \sa SequentialAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} + \sa SequentialAnimation, {QML Animation and Transitions}, {qml/animation/basics}{Animation basics example} */ -QDeclarativeParallelAnimation::QDeclarativeParallelAnimation(QObject *parent) : - QDeclarativeAnimationGroup(parent) +QQuickParallelAnimation::QQuickParallelAnimation(QObject *parent) : + QQuickAnimationGroup(parent) { } -QDeclarativeParallelAnimation::~QDeclarativeParallelAnimation() +QQuickParallelAnimation::~QQuickParallelAnimation() { } -QAbstractAnimationJob* QDeclarativeParallelAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickParallelAnimation::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { - Q_D(QDeclarativeAnimationGroup); + Q_D(QQuickAnimationGroup); QParallelAnimationGroupJob *ag = new QParallelAnimationGroupJob; bool valid = d->defaultProperty.isValid(); @@ -1747,7 +1747,7 @@ QAbstractAnimationJob* QDeclarativeParallelAnimation::transition(QDeclarativeSta } //convert a variant from string type to another animatable type -void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int type) +void QQuickPropertyAnimationPrivate::convertVariant(QVariant &variant, int type) { if (variant.userType() != QVariant::String) { variant.convert((QVariant::Type)type); @@ -1756,42 +1756,42 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int switch (type) { case QVariant::Rect: { - variant.setValue(QDeclarativeStringConverters::rectFFromString(variant.toString()).toRect()); + variant.setValue(QQmlStringConverters::rectFFromString(variant.toString()).toRect()); break; } case QVariant::RectF: { - variant.setValue(QDeclarativeStringConverters::rectFFromString(variant.toString())); + variant.setValue(QQmlStringConverters::rectFFromString(variant.toString())); break; } case QVariant::Point: { - variant.setValue(QDeclarativeStringConverters::pointFFromString(variant.toString()).toPoint()); + variant.setValue(QQmlStringConverters::pointFFromString(variant.toString()).toPoint()); break; } case QVariant::PointF: { - variant.setValue(QDeclarativeStringConverters::pointFFromString(variant.toString())); + variant.setValue(QQmlStringConverters::pointFFromString(variant.toString())); break; } case QVariant::Size: { - variant.setValue(QDeclarativeStringConverters::sizeFFromString(variant.toString()).toSize()); + variant.setValue(QQmlStringConverters::sizeFFromString(variant.toString()).toSize()); break; } case QVariant::SizeF: { - variant.setValue(QDeclarativeStringConverters::sizeFFromString(variant.toString())); + variant.setValue(QQmlStringConverters::sizeFFromString(variant.toString())); break; } case QVariant::Color: { - variant.setValue(QDeclarativeStringConverters::colorFromString(variant.toString())); + variant.setValue(QQmlStringConverters::colorFromString(variant.toString())); break; } case QVariant::Vector3D: { - variant.setValue(QDeclarativeStringConverters::vector3DFromString(variant.toString())); + variant.setValue(QQmlStringConverters::vector3DFromString(variant.toString())); break; } default: - if (QDeclarativeValueTypeFactory::isValueType((uint)type)) { + if (QQmlValueTypeFactory::isValueType((uint)type)) { variant.convert((QVariant::Type)type); } else { - QDeclarativeMetaType::StringConverter converter = QDeclarativeMetaType::customStringConverter(type); + QQmlMetaType::StringConverter converter = QQmlMetaType::customStringConverter(type); if (converter) variant = converter(variant.toString()); } @@ -1799,24 +1799,24 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int } } -QDeclarativeBulkValueAnimator::QDeclarativeBulkValueAnimator() +QQuickBulkValueAnimator::QQuickBulkValueAnimator() : QAbstractAnimationJob(), animValue(0), fromSourced(0), m_duration(250) { } -QDeclarativeBulkValueAnimator::~QDeclarativeBulkValueAnimator() +QQuickBulkValueAnimator::~QQuickBulkValueAnimator() { delete animValue; } -void QDeclarativeBulkValueAnimator::setAnimValue(QDeclarativeBulkValueUpdater *value) +void QQuickBulkValueAnimator::setAnimValue(QQuickBulkValueUpdater *value) { if (isRunning()) stop(); animValue = value; } -void QDeclarativeBulkValueAnimator::updateCurrentTime(int currentTime) +void QQuickBulkValueAnimator::updateCurrentTime(int currentTime) { if (isStopped()) return; @@ -1827,7 +1827,7 @@ void QDeclarativeBulkValueAnimator::updateCurrentTime(int currentTime) animValue->setValue(progress); } -void QDeclarativeBulkValueAnimator::topLevelAnimationLoopChanged() +void QQuickBulkValueAnimator::topLevelAnimationLoopChanged() { //check for new from every top-level loop (when the top level animation is started and all subsequent loops) if (fromSourced) @@ -1835,7 +1835,7 @@ void QDeclarativeBulkValueAnimator::topLevelAnimationLoopChanged() } /*! - \qmlclass PropertyAnimation QDeclarativePropertyAnimation + \qmlclass PropertyAnimation QQuickPropertyAnimation \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits Animation @@ -1851,21 +1851,21 @@ void QDeclarativeBulkValueAnimator::topLevelAnimationLoopChanged() For example, to animate any objects that have changed their \c x or \c y properties as a result of a state change, using an \c InOutQuad easing curve: - \snippet doc/src/snippets/declarative/propertyanimation.qml transition + \snippet doc/src/snippets/qml/propertyanimation.qml transition \o In a \l Behavior For example, to animate all changes to a rectangle's \c x property: - \snippet doc/src/snippets/declarative/propertyanimation.qml behavior + \snippet doc/src/snippets/qml/propertyanimation.qml behavior \o As a property value source For example, to repeatedly animate the rectangle's \c x property: - \snippet doc/src/snippets/declarative/propertyanimation.qml propertyvaluesource + \snippet doc/src/snippets/qml/propertyanimation.qml propertyvaluesource \o In a signal handler @@ -1882,7 +1882,7 @@ void QDeclarativeBulkValueAnimator::topLevelAnimationLoopChanged() For example, to animate \c rect's \c width property over 500ms, from its current width to 30: - \snippet doc/src/snippets/declarative/propertyanimation.qml standalone + \snippet doc/src/snippets/qml/propertyanimation.qml standalone \endlist @@ -1893,20 +1893,20 @@ void QDeclarativeBulkValueAnimator::topLevelAnimationLoopChanged() Note that PropertyAnimation inherits the abstract \l Animation element. This includes additional properties and methods for controlling the animation. - \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {qml/animation/basics}{Animation basics example} */ -QDeclarativePropertyAnimation::QDeclarativePropertyAnimation(QObject *parent) -: QDeclarativeAbstractAnimation(*(new QDeclarativePropertyAnimationPrivate), parent) +QQuickPropertyAnimation::QQuickPropertyAnimation(QObject *parent) +: QQuickAbstractAnimation(*(new QQuickPropertyAnimationPrivate), parent) { } -QDeclarativePropertyAnimation::QDeclarativePropertyAnimation(QDeclarativePropertyAnimationPrivate &dd, QObject *parent) -: QDeclarativeAbstractAnimation(dd, parent) +QQuickPropertyAnimation::QQuickPropertyAnimation(QQuickPropertyAnimationPrivate &dd, QObject *parent) +: QQuickAbstractAnimation(dd, parent) { } -QDeclarativePropertyAnimation::~QDeclarativePropertyAnimation() +QQuickPropertyAnimation::~QQuickPropertyAnimation() { } @@ -1916,20 +1916,20 @@ QDeclarativePropertyAnimation::~QDeclarativePropertyAnimation() The default value is 250. */ -int QDeclarativePropertyAnimation::duration() const +int QQuickPropertyAnimation::duration() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->duration; } -void QDeclarativePropertyAnimation::setDuration(int duration) +void QQuickPropertyAnimation::setDuration(int duration) { if (duration < 0) { qmlInfo(this) << tr("Cannot set a duration of < 0"); return; } - Q_D(QDeclarativePropertyAnimation); + Q_D(QQuickPropertyAnimation); if (d->duration == duration) return; d->duration = duration; @@ -1947,15 +1947,15 @@ void QDeclarativePropertyAnimation::setDuration(int duration) \sa {QML Animation and Transitions} */ -QVariant QDeclarativePropertyAnimation::from() const +QVariant QQuickPropertyAnimation::from() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->from; } -void QDeclarativePropertyAnimation::setFrom(const QVariant &f) +void QQuickPropertyAnimation::setFrom(const QVariant &f) { - Q_D(QDeclarativePropertyAnimation); + Q_D(QQuickPropertyAnimation); if (d->fromIsDefined && f == d->from) return; d->from = f; @@ -1974,15 +1974,15 @@ void QDeclarativePropertyAnimation::setFrom(const QVariant &f) \sa {QML Animation and Transitions} */ -QVariant QDeclarativePropertyAnimation::to() const +QVariant QQuickPropertyAnimation::to() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->to; } -void QDeclarativePropertyAnimation::setTo(const QVariant &t) +void QQuickPropertyAnimation::setTo(const QVariant &t) { - Q_D(QDeclarativePropertyAnimation); + Q_D(QQuickPropertyAnimation); if (d->toIsDefined && t == d->to) return; d->to = t; @@ -2195,18 +2195,18 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t) groups of three points defining a curve from 0,0 to 1,1 - control1, control2, end point: [cx1, cy1, cx2, cy2, endx, endy, ...]. The last point must be 1,1. - See the \l {declarative/animation/easing}{easing} example for a demonstration of + See the \l {qml/animation/easing}{easing} example for a demonstration of the different easing settings. */ -QEasingCurve QDeclarativePropertyAnimation::easing() const +QEasingCurve QQuickPropertyAnimation::easing() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->easing; } -void QDeclarativePropertyAnimation::setEasing(const QEasingCurve &e) +void QQuickPropertyAnimation::setEasing(const QEasingCurve &e) { - Q_D(QDeclarativePropertyAnimation); + Q_D(QQuickPropertyAnimation); if (d->easing == e) return; @@ -2214,45 +2214,45 @@ void QDeclarativePropertyAnimation::setEasing(const QEasingCurve &e) emit easingChanged(e); } -QObject *QDeclarativePropertyAnimation::target() const +QObject *QQuickPropertyAnimation::target() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->target; } -void QDeclarativePropertyAnimation::setTargetObject(QObject *o) +void QQuickPropertyAnimation::setTargetObject(QObject *o) { - Q_D(QDeclarativePropertyAnimation); + Q_D(QQuickPropertyAnimation); if (d->target == o) return; d->target = o; emit targetChanged(); } -QString QDeclarativePropertyAnimation::property() const +QString QQuickPropertyAnimation::property() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->propertyName; } -void QDeclarativePropertyAnimation::setProperty(const QString &n) +void QQuickPropertyAnimation::setProperty(const QString &n) { - Q_D(QDeclarativePropertyAnimation); + Q_D(QQuickPropertyAnimation); if (d->propertyName == n) return; d->propertyName = n; emit propertyChanged(); } -QString QDeclarativePropertyAnimation::properties() const +QString QQuickPropertyAnimation::properties() const { - Q_D(const QDeclarativePropertyAnimation); + Q_D(const QQuickPropertyAnimation); return d->properties; } -void QDeclarativePropertyAnimation::setProperties(const QString &prop) +void QQuickPropertyAnimation::setProperties(const QString &prop) { - Q_D(QDeclarativePropertyAnimation); + Q_D(QQuickPropertyAnimation); if (d->properties == prop) return; @@ -2350,10 +2350,10 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop) \sa exclude, {QML Animation and Transitions} */ -QDeclarativeListProperty QDeclarativePropertyAnimation::targets() +QQmlListProperty QQuickPropertyAnimation::targets() { - Q_D(QDeclarativePropertyAnimation); - return QDeclarativeListProperty(this, d->targets); + Q_D(QQuickPropertyAnimation); + return QQmlListProperty(this, d->targets); } /*! @@ -2361,28 +2361,28 @@ QDeclarativeListProperty QDeclarativePropertyAnimation::targets() This property holds the items not to be affected by this animation. \sa PropertyAnimation::targets */ -QDeclarativeListProperty QDeclarativePropertyAnimation::exclude() +QQmlListProperty QQuickPropertyAnimation::exclude() { - Q_D(QDeclarativePropertyAnimation); - return QDeclarativeListProperty(this, d->exclude); + Q_D(QQuickPropertyAnimation); + return QQmlListProperty(this, d->exclude); } -void QDeclarativeAnimationPropertyUpdater::setValue(qreal v) +void QQuickAnimationPropertyUpdater::setValue(qreal v) { bool deleted = false; wasDeleted = &deleted; if (reverse) v = 1 - v; for (int ii = 0; ii < actions.count(); ++ii) { - QDeclarativeAction &action = actions[ii]; + QQuickAction &action = actions[ii]; if (v == 1.) { - QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + QQmlPropertyPrivate::write(action.property, action.toValue, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); } else { if (!fromSourced && !fromDefined) { action.fromValue = action.property.read(); if (interpolatorType) { - QDeclarativePropertyAnimationPrivate::convertVariant(action.fromValue, interpolatorType); + QQuickPropertyAnimationPrivate::convertVariant(action.fromValue, interpolatorType); } } if (!interpolatorType) { @@ -2393,7 +2393,7 @@ void QDeclarativeAnimationPropertyUpdater::setValue(qreal v) } } if (interpolator) - QDeclarativePropertyPrivate::write(action.property, interpolator(action.fromValue.constData(), action.toValue.constData(), v), QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + QQmlPropertyPrivate::write(action.property, interpolator(action.fromValue.constData(), action.toValue.constData(), v), QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); } if (deleted) return; @@ -2402,12 +2402,12 @@ void QDeclarativeAnimationPropertyUpdater::setValue(qreal v) fromSourced = true; } -QDeclarativeStateActions QDeclarativePropertyAnimation::createTransitionActions(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QQuickStateActions QQuickPropertyAnimation::createTransitionActions(QQuickStateActions &actions, + QQmlProperties &modified, QObject *defaultTarget) { - Q_D(QDeclarativePropertyAnimation); - QDeclarativeStateActions newActions; + Q_D(QQuickPropertyAnimation); + QQuickStateActions newActions; QStringList props = d->properties.isEmpty() ? QStringList() : d->properties.split(QLatin1Char(',')); for (int ii = 0; ii < props.count(); ++ii) @@ -2439,7 +2439,7 @@ QDeclarativeStateActions QDeclarativePropertyAnimation::createTransitionActions( if (d->toIsDefined) { for (int i = 0; i < props.count(); ++i) { for (int j = 0; j < targets.count(); ++j) { - QDeclarativeAction myAction; + QQuickAction myAction; myAction.property = d->createProperty(targets.at(j), props.at(i), this); if (myAction.property.isValid()) { if (d->fromIsDefined) { @@ -2451,7 +2451,7 @@ QDeclarativeStateActions QDeclarativePropertyAnimation::createTransitionActions( newActions << myAction; hasExplicit = true; for (int ii = 0; ii < actions.count(); ++ii) { - QDeclarativeAction &action = actions[ii]; + QQuickAction &action = actions[ii]; if (action.property.object() == myAction.property.object() && myAction.property.name() == action.property.name()) { modified << action.property; @@ -2465,7 +2465,7 @@ QDeclarativeStateActions QDeclarativePropertyAnimation::createTransitionActions( if (!hasExplicit) for (int ii = 0; ii < actions.count(); ++ii) { - QDeclarativeAction &action = actions[ii]; + QQuickAction &action = actions[ii]; QObject *obj = action.property.object(); QString propertyName = action.property.name(); @@ -2477,7 +2477,7 @@ QDeclarativeStateActions QDeclarativePropertyAnimation::createTransitionActions( (!d->exclude.contains(obj)) && (same || (!d->exclude.contains(sObj))) && (props.contains(propertyName) || (!same && props.contains(sPropertyName)) || (useType && action.property.propertyType() == d->interpolatorType))) { - QDeclarativeAction myAction = action; + QQuickAction myAction = action; if (d->fromIsDefined) myAction.fromValue = d->from; @@ -2498,21 +2498,21 @@ QDeclarativeStateActions QDeclarativePropertyAnimation::createTransitionActions( return newActions; } -QAbstractAnimationJob* QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickPropertyAnimation::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { - Q_D(QDeclarativePropertyAnimation); + Q_D(QQuickPropertyAnimation); - QDeclarativeStateActions dataActions = createTransitionActions(actions, modified, defaultTarget); + QQuickStateActions dataActions = createTransitionActions(actions, modified, defaultTarget); - QDeclarativeBulkValueAnimator *animator = new QDeclarativeBulkValueAnimator; + QQuickBulkValueAnimator *animator = new QQuickBulkValueAnimator; animator->setDuration(d->duration); animator->setEasingCurve(d->easing); if (!dataActions.isEmpty()) { - QDeclarativeAnimationPropertyUpdater *data = new QDeclarativeAnimationPropertyUpdater; + QQuickAnimationPropertyUpdater *data = new QQuickAnimationPropertyUpdater; data->interpolatorType = d->interpolatorType; data->interpolator = d->interpolator; data->reverse = direction == Backward ? true : false; diff --git a/src/quick/util/qdeclarativeanimation_p.h b/src/quick/util/qquickanimation_p.h similarity index 54% rename from src/quick/util/qdeclarativeanimation_p.h rename to src/quick/util/qquickanimation_p.h index ec6a42861d..980a2f5171 100644 --- a/src/quick/util/qdeclarativeanimation_p.h +++ b/src/quick/util/qquickanimation_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEANIMATION_H -#define QDECLARATIVEANIMATION_H +#ifndef QQUICKANIMATION_H +#define QQUICKANIMATION_H -#include "qdeclarativestate_p.h" +#include "qquickstate_p.h" #include -#include -#include -#include +#include +#include +#include #include #include @@ -58,15 +58,15 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeAbstractAnimationPrivate; -class QDeclarativeAnimationGroup; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeAbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus +class QQuickAbstractAnimationPrivate; +class QQuickAnimationGroup; +class Q_QUICK_PRIVATE_EXPORT QQuickAbstractAnimation : public QObject, public QQmlPropertyValueSource, public QQmlParserStatus { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeAbstractAnimation) + Q_DECLARE_PRIVATE(QQuickAbstractAnimation) - Q_INTERFACES(QDeclarativeParserStatus) - Q_INTERFACES(QDeclarativePropertyValueSource) + Q_INTERFACES(QQmlParserStatus) + Q_INTERFACES(QQmlPropertyValueSource) Q_ENUMS(Loops) Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged) Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) @@ -75,8 +75,8 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeAbstractAnimation : public QObject, pub Q_CLASSINFO("DefaultMethod", "start()") public: - QDeclarativeAbstractAnimation(QObject *parent=0); - virtual ~QDeclarativeAbstractAnimation(); + QQuickAbstractAnimation(QObject *parent=0); + virtual ~QQuickAbstractAnimation(); enum Loops { Infinite = -2 }; @@ -94,10 +94,10 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeAbstractAnimation : public QObject, pub int currentTime(); void setCurrentTime(int); - QDeclarativeAnimationGroup *group() const; - void setGroup(QDeclarativeAnimationGroup *); + QQuickAnimationGroup *group() const; + void setGroup(QQuickAnimationGroup *); - void setDefaultTarget(const QDeclarativeProperty &); + void setDefaultTarget(const QQmlProperty &); void setDisableUserControl(); void setEnableUserControl(); bool userControlDisabled() const; @@ -121,13 +121,13 @@ public Q_SLOTS: void complete(); protected: - QDeclarativeAbstractAnimation(QDeclarativeAbstractAnimationPrivate &dd, QObject *parent); + QQuickAbstractAnimation(QQuickAbstractAnimationPrivate &dd, QObject *parent); QAbstractAnimationJob* initInstance(QAbstractAnimationJob *animation); public: enum TransitionDirection { Forward, Backward }; - virtual QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); QAbstractAnimationJob* qtAnimation(); @@ -135,23 +135,23 @@ public Q_SLOTS: private Q_SLOTS: void componentFinalized(); private: - virtual void setTarget(const QDeclarativeProperty &); + virtual void setTarget(const QQmlProperty &); void notifyRunningChanged(bool running); - friend class QDeclarativeBehavior; - friend class QDeclarativeBehaviorPrivate; + friend class QQuickBehavior; + friend class QQuickBehaviorPrivate; }; -class QDeclarativePauseAnimationPrivate; -class Q_QUICK_PRIVATE_EXPORT QDeclarativePauseAnimation : public QDeclarativeAbstractAnimation +class QQuickPauseAnimationPrivate; +class Q_QUICK_PRIVATE_EXPORT QQuickPauseAnimation : public QQuickAbstractAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativePauseAnimation) + Q_DECLARE_PRIVATE(QQuickPauseAnimation) Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) public: - QDeclarativePauseAnimation(QObject *parent=0); - virtual ~QDeclarativePauseAnimation(); + QQuickPauseAnimation(QObject *parent=0); + virtual ~QQuickPauseAnimation(); int duration() const; void setDuration(int); @@ -160,54 +160,54 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativePauseAnimation : public QDeclarativeAbs void durationChanged(int); protected: - QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); }; -class QDeclarativeScriptActionPrivate; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeScriptAction : public QDeclarativeAbstractAnimation +class QQuickScriptActionPrivate; +class Q_QUICK_PRIVATE_EXPORT QQuickScriptAction : public QQuickAbstractAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeScriptAction) + Q_DECLARE_PRIVATE(QQuickScriptAction) - Q_PROPERTY(QDeclarativeScriptString script READ script WRITE setScript) + Q_PROPERTY(QQmlScriptString script READ script WRITE setScript) Q_PROPERTY(QString scriptName READ stateChangeScriptName WRITE setStateChangeScriptName) public: - QDeclarativeScriptAction(QObject *parent=0); - virtual ~QDeclarativeScriptAction(); + QQuickScriptAction(QObject *parent=0); + virtual ~QQuickScriptAction(); - QDeclarativeScriptString script() const; - void setScript(const QDeclarativeScriptString &); + QQmlScriptString script() const; + void setScript(const QQmlScriptString &); QString stateChangeScriptName() const; void setStateChangeScriptName(const QString &); protected: - virtual QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); }; -class QDeclarativePropertyActionPrivate; -class Q_QUICK_PRIVATE_EXPORT QDeclarativePropertyAction : public QDeclarativeAbstractAnimation +class QQuickPropertyActionPrivate; +class Q_QUICK_PRIVATE_EXPORT QQuickPropertyAction : public QQuickAbstractAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativePropertyAction) + Q_DECLARE_PRIVATE(QQuickPropertyAction) Q_PROPERTY(QObject *target READ target WRITE setTargetObject NOTIFY targetChanged) Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged) Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged) - Q_PROPERTY(QDeclarativeListProperty targets READ targets) - Q_PROPERTY(QDeclarativeListProperty exclude READ exclude) + Q_PROPERTY(QQmlListProperty targets READ targets) + Q_PROPERTY(QQmlListProperty exclude READ exclude) Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged) public: - QDeclarativePropertyAction(QObject *parent=0); - virtual ~QDeclarativePropertyAction(); + QQuickPropertyAction(QObject *parent=0); + virtual ~QQuickPropertyAction(); QObject *target() const; void setTargetObject(QObject *); @@ -218,8 +218,8 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativePropertyAction : public QDeclarativeAbs QString properties() const; void setProperties(const QString &); - QDeclarativeListProperty targets(); - QDeclarativeListProperty exclude(); + QQmlListProperty targets(); + QQmlListProperty exclude(); QVariant value() const; void setValue(const QVariant &); @@ -231,17 +231,17 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativePropertyAction : public QDeclarativeAbs void propertyChanged(); protected: - virtual QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); }; -class QDeclarativePropertyAnimationPrivate; -class Q_QUICK_PRIVATE_EXPORT QDeclarativePropertyAnimation : public QDeclarativeAbstractAnimation +class QQuickPropertyAnimationPrivate; +class Q_QUICK_PRIVATE_EXPORT QQuickPropertyAnimation : public QQuickAbstractAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativePropertyAnimation) + Q_DECLARE_PRIVATE(QQuickPropertyAnimation) Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) Q_PROPERTY(QVariant from READ from WRITE setFrom NOTIFY fromChanged) @@ -250,12 +250,12 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativePropertyAnimation : public QDeclarative Q_PROPERTY(QObject *target READ target WRITE setTargetObject NOTIFY targetChanged) Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged) Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged) - Q_PROPERTY(QDeclarativeListProperty targets READ targets) - Q_PROPERTY(QDeclarativeListProperty exclude READ exclude) + Q_PROPERTY(QQmlListProperty targets READ targets) + Q_PROPERTY(QQmlListProperty exclude READ exclude) public: - QDeclarativePropertyAnimation(QObject *parent=0); - virtual ~QDeclarativePropertyAnimation(); + QQuickPropertyAnimation(QObject *parent=0); + virtual ~QQuickPropertyAnimation(); virtual int duration() const; virtual void setDuration(int); @@ -278,17 +278,17 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativePropertyAnimation : public QDeclarative QString properties() const; void setProperties(const QString &); - QDeclarativeListProperty targets(); - QDeclarativeListProperty exclude(); + QQmlListProperty targets(); + QQmlListProperty exclude(); protected: - QDeclarativeStateActions createTransitionActions(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + QQuickStateActions createTransitionActions(QQuickStateActions &actions, + QQmlProperties &modified, QObject *defaultTarget = 0); - QDeclarativePropertyAnimation(QDeclarativePropertyAnimationPrivate &dd, QObject *parent); - virtual QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + QQuickPropertyAnimation(QQuickPropertyAnimationPrivate &dd, QObject *parent); + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); Q_SIGNALS: @@ -301,16 +301,16 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativePropertyAnimation : public QDeclarative void propertyChanged(); }; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeColorAnimation : public QDeclarativePropertyAnimation +class Q_QUICK_PRIVATE_EXPORT QQuickColorAnimation : public QQuickPropertyAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativePropertyAnimation) + Q_DECLARE_PRIVATE(QQuickPropertyAnimation) Q_PROPERTY(QColor from READ from WRITE setFrom) Q_PROPERTY(QColor to READ to WRITE setTo) public: - QDeclarativeColorAnimation(QObject *parent=0); - virtual ~QDeclarativeColorAnimation(); + QQuickColorAnimation(QObject *parent=0); + virtual ~QQuickColorAnimation(); QColor from() const; void setFrom(const QColor &); @@ -319,17 +319,17 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeColorAnimation : public QDeclarativePro void setTo(const QColor &); }; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeNumberAnimation : public QDeclarativePropertyAnimation +class Q_QUICK_PRIVATE_EXPORT QQuickNumberAnimation : public QQuickPropertyAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativePropertyAnimation) + Q_DECLARE_PRIVATE(QQuickPropertyAnimation) Q_PROPERTY(qreal from READ from WRITE setFrom) Q_PROPERTY(qreal to READ to WRITE setTo) public: - QDeclarativeNumberAnimation(QObject *parent=0); - virtual ~QDeclarativeNumberAnimation(); + QQuickNumberAnimation(QObject *parent=0); + virtual ~QQuickNumberAnimation(); qreal from() const; void setFrom(qreal); @@ -338,23 +338,23 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeNumberAnimation : public QDeclarativePr void setTo(qreal); protected: - QDeclarativeNumberAnimation(QDeclarativePropertyAnimationPrivate &dd, QObject *parent); + QQuickNumberAnimation(QQuickPropertyAnimationPrivate &dd, QObject *parent); private: void init(); }; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeVector3dAnimation : public QDeclarativePropertyAnimation +class Q_QUICK_PRIVATE_EXPORT QQuickVector3dAnimation : public QQuickPropertyAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativePropertyAnimation) + Q_DECLARE_PRIVATE(QQuickPropertyAnimation) Q_PROPERTY(QVector3D from READ from WRITE setFrom) Q_PROPERTY(QVector3D to READ to WRITE setTo) public: - QDeclarativeVector3dAnimation(QObject *parent=0); - virtual ~QDeclarativeVector3dAnimation(); + QQuickVector3dAnimation(QObject *parent=0); + virtual ~QQuickVector3dAnimation(); QVector3D from() const; void setFrom(QVector3D); @@ -363,11 +363,11 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeVector3dAnimation : public QDeclarative void setTo(QVector3D); }; -class QDeclarativeRotationAnimationPrivate; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeRotationAnimation : public QDeclarativePropertyAnimation +class QQuickRotationAnimationPrivate; +class Q_QUICK_PRIVATE_EXPORT QQuickRotationAnimation : public QQuickPropertyAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeRotationAnimation) + Q_DECLARE_PRIVATE(QQuickRotationAnimation) Q_ENUMS(RotationDirection) Q_PROPERTY(qreal from READ from WRITE setFrom) @@ -375,8 +375,8 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeRotationAnimation : public QDeclarative Q_PROPERTY(RotationDirection direction READ direction WRITE setDirection NOTIFY directionChanged) public: - QDeclarativeRotationAnimation(QObject *parent=0); - virtual ~QDeclarativeRotationAnimation(); + QQuickRotationAnimation(QObject *parent=0); + virtual ~QQuickRotationAnimation(); qreal from() const; void setFrom(qreal); @@ -392,54 +392,54 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeRotationAnimation : public QDeclarative void directionChanged(); }; -class QDeclarativeAnimationGroupPrivate; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeAnimationGroup : public QDeclarativeAbstractAnimation +class QQuickAnimationGroupPrivate; +class Q_QUICK_PRIVATE_EXPORT QQuickAnimationGroup : public QQuickAbstractAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeAnimationGroup) + Q_DECLARE_PRIVATE(QQuickAnimationGroup) Q_CLASSINFO("DefaultProperty", "animations") - Q_PROPERTY(QDeclarativeListProperty animations READ animations) + Q_PROPERTY(QQmlListProperty animations READ animations) public: - QDeclarativeAnimationGroup(QObject *parent); - virtual ~QDeclarativeAnimationGroup(); + QQuickAnimationGroup(QObject *parent); + virtual ~QQuickAnimationGroup(); - QDeclarativeListProperty animations(); - friend class QDeclarativeAbstractAnimation; + QQmlListProperty animations(); + friend class QQuickAbstractAnimation; protected: - QDeclarativeAnimationGroup(QDeclarativeAnimationGroupPrivate &dd, QObject *parent); + QQuickAnimationGroup(QQuickAnimationGroupPrivate &dd, QObject *parent); }; -class QDeclarativeSequentialAnimation : public QDeclarativeAnimationGroup +class QQuickSequentialAnimation : public QQuickAnimationGroup { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeAnimationGroup) + Q_DECLARE_PRIVATE(QQuickAnimationGroup) public: - QDeclarativeSequentialAnimation(QObject *parent=0); - virtual ~QDeclarativeSequentialAnimation(); + QQuickSequentialAnimation(QObject *parent=0); + virtual ~QQuickSequentialAnimation(); protected: - virtual QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); }; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeParallelAnimation : public QDeclarativeAnimationGroup +class Q_QUICK_PRIVATE_EXPORT QQuickParallelAnimation : public QQuickAnimationGroup { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeAnimationGroup) + Q_DECLARE_PRIVATE(QQuickAnimationGroup) public: - QDeclarativeParallelAnimation(QObject *parent=0); - virtual ~QDeclarativeParallelAnimation(); + QQuickParallelAnimation(QObject *parent=0); + virtual ~QQuickParallelAnimation(); protected: - virtual QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); }; @@ -447,18 +447,18 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeParallelAnimation : public QDeclarative QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeAbstractAnimation) -QML_DECLARE_TYPE(QDeclarativePauseAnimation) -QML_DECLARE_TYPE(QDeclarativeScriptAction) -QML_DECLARE_TYPE(QDeclarativePropertyAction) -QML_DECLARE_TYPE(QDeclarativePropertyAnimation) -QML_DECLARE_TYPE(QDeclarativeColorAnimation) -QML_DECLARE_TYPE(QDeclarativeNumberAnimation) -QML_DECLARE_TYPE(QDeclarativeSequentialAnimation) -QML_DECLARE_TYPE(QDeclarativeParallelAnimation) -QML_DECLARE_TYPE(QDeclarativeVector3dAnimation) -QML_DECLARE_TYPE(QDeclarativeRotationAnimation) +QML_DECLARE_TYPE(QQuickAbstractAnimation) +QML_DECLARE_TYPE(QQuickPauseAnimation) +QML_DECLARE_TYPE(QQuickScriptAction) +QML_DECLARE_TYPE(QQuickPropertyAction) +QML_DECLARE_TYPE(QQuickPropertyAnimation) +QML_DECLARE_TYPE(QQuickColorAnimation) +QML_DECLARE_TYPE(QQuickNumberAnimation) +QML_DECLARE_TYPE(QQuickSequentialAnimation) +QML_DECLARE_TYPE(QQuickParallelAnimation) +QML_DECLARE_TYPE(QQuickVector3dAnimation) +QML_DECLARE_TYPE(QQuickRotationAnimation) QT_END_HEADER -#endif // QDECLARATIVEANIMATION_H +#endif // QQUICKANIMATION_H diff --git a/src/quick/util/qdeclarativeanimation_p_p.h b/src/quick/util/qquickanimation_p_p.h similarity index 62% rename from src/quick/util/qdeclarativeanimation_p_p.h rename to src/quick/util/qquickanimation_p_p.h index a6b47cbc17..e32453aef3 100644 --- a/src/quick/util/qdeclarativeanimation_p_p.h +++ b/src/quick/util/qquickanimation_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEANIMATION2_P_H -#define QDECLARATIVEANIMATION2_P_H +#ifndef QQUICKANIMATION2_P_H +#define QQUICKANIMATION2_P_H // // W A R N I N G @@ -53,12 +53,12 @@ // We mean it. // -#include "qdeclarativeanimation_p.h" +#include "qquickanimation_p.h" -#include +#include -#include -#include +#include +#include #include #include "private/qpauseanimationjob_p.h" @@ -83,7 +83,7 @@ class QAbstractAnimationAction //templated animation action //allows us to specify an action that calls a function of a class. -//(so that class doesn't have to inherit QDeclarativeAbstractAnimationAction) +//(so that class doesn't have to inherit QQuickAbstractAnimationAction) template class QAnimationActionProxy : public QAbstractAnimationAction { @@ -116,23 +116,23 @@ class Q_AUTOTEST_EXPORT QActionAnimation : public QAbstractAnimationJob QAbstractAnimationAction *animAction; }; -class QDeclarativeBulkValueUpdater +class QQuickBulkValueUpdater { public: - virtual ~QDeclarativeBulkValueUpdater() {} + virtual ~QQuickBulkValueUpdater() {} virtual void setValue(qreal value) = 0; }; -//animates QDeclarativeBulkValueUpdater (assumes start and end values will be reals or compatible) -class Q_AUTOTEST_EXPORT QDeclarativeBulkValueAnimator : public QAbstractAnimationJob +//animates QQuickBulkValueUpdater (assumes start and end values will be reals or compatible) +class Q_AUTOTEST_EXPORT QQuickBulkValueAnimator : public QAbstractAnimationJob { - Q_DISABLE_COPY(QDeclarativeBulkValueAnimator) + Q_DISABLE_COPY(QQuickBulkValueAnimator) public: - QDeclarativeBulkValueAnimator(); - ~QDeclarativeBulkValueAnimator(); + QQuickBulkValueAnimator(); + ~QQuickBulkValueAnimator(); - void setAnimValue(QDeclarativeBulkValueUpdater *value); - QDeclarativeBulkValueUpdater *getAnimValue() const { return animValue; } + void setAnimValue(QQuickBulkValueUpdater *value); + QQuickBulkValueUpdater *getAnimValue() const { return animValue; } void setFromSourcedValue(bool *value) { fromSourced = value; } @@ -147,7 +147,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeBulkValueAnimator : public QAbstractAnimatio void topLevelAnimationLoopChanged(); private: - QDeclarativeBulkValueUpdater *animValue; + QQuickBulkValueUpdater *animValue; bool *fromSourced; int m_duration; QEasingCurve easing; @@ -168,11 +168,11 @@ class QTickAnimationProxy : public QAbstractAnimationJob T *m_instance; }; -class QDeclarativeAbstractAnimationPrivate : public QObjectPrivate, public QAnimationJobChangeListener +class QQuickAbstractAnimationPrivate : public QObjectPrivate, public QAnimationJobChangeListener { - Q_DECLARE_PUBLIC(QDeclarativeAbstractAnimation) + Q_DECLARE_PUBLIC(QQuickAbstractAnimation) public: - QDeclarativeAbstractAnimationPrivate() + QQuickAbstractAnimationPrivate() : running(false), paused(false), alwaysRunToEnd(false), /*connectedTimeLine(false), */componentComplete(true), avoidPropertyValueSourceStart(false), disableUserControl(false), @@ -192,48 +192,48 @@ class QDeclarativeAbstractAnimationPrivate : public QObjectPrivate, public QAnim void commence(); virtual void animationFinished(QAbstractAnimationJob *); - QDeclarativeProperty defaultProperty; + QQmlProperty defaultProperty; - QDeclarativeAnimationGroup *group; + QQuickAnimationGroup *group; QAbstractAnimationJob* animationInstance; - static QDeclarativeProperty createProperty(QObject *obj, const QString &str, QObject *infoObj); + static QQmlProperty createProperty(QObject *obj, const QString &str, QObject *infoObj); }; -class QDeclarativePauseAnimationPrivate : public QDeclarativeAbstractAnimationPrivate +class QQuickPauseAnimationPrivate : public QQuickAbstractAnimationPrivate { - Q_DECLARE_PUBLIC(QDeclarativePauseAnimation) + Q_DECLARE_PUBLIC(QQuickPauseAnimation) public: - QDeclarativePauseAnimationPrivate() - : QDeclarativeAbstractAnimationPrivate(), duration(250) {} + QQuickPauseAnimationPrivate() + : QQuickAbstractAnimationPrivate(), duration(250) {} int duration; }; -class QDeclarativeScriptActionPrivate : public QDeclarativeAbstractAnimationPrivate +class QQuickScriptActionPrivate : public QQuickAbstractAnimationPrivate { - Q_DECLARE_PUBLIC(QDeclarativeScriptAction) + Q_DECLARE_PUBLIC(QQuickScriptAction) public: - QDeclarativeScriptActionPrivate(); + QQuickScriptActionPrivate(); - QDeclarativeScriptString script; + QQmlScriptString script; QString name; - QDeclarativeScriptString runScriptScript; + QQmlScriptString runScriptScript; bool hasRunScriptScript; bool reversing; void execute(); QAbstractAnimationAction* createAction(); - typedef QAnimationActionProxy Proxy; + typedef QAnimationActionProxy Proxy; }; -class QDeclarativePropertyActionPrivate : public QDeclarativeAbstractAnimationPrivate +class QQuickPropertyActionPrivate : public QQuickAbstractAnimationPrivate { - Q_DECLARE_PUBLIC(QDeclarativePropertyAction) + Q_DECLARE_PUBLIC(QQuickPropertyAction) public: - QDeclarativePropertyActionPrivate() - : QDeclarativeAbstractAnimationPrivate(), target(0) {} + QQuickPropertyActionPrivate() + : QQuickAbstractAnimationPrivate(), target(0) {} QObject *target; QString propertyName; @@ -241,27 +241,27 @@ class QDeclarativePropertyActionPrivate : public QDeclarativeAbstractAnimationPr QList targets; QList exclude; - QDeclarativeNullableValue value; + QQmlNullableValue value; }; -class QDeclarativeAnimationGroupPrivate : public QDeclarativeAbstractAnimationPrivate +class QQuickAnimationGroupPrivate : public QQuickAbstractAnimationPrivate { - Q_DECLARE_PUBLIC(QDeclarativeAnimationGroup) + Q_DECLARE_PUBLIC(QQuickAnimationGroup) public: - QDeclarativeAnimationGroupPrivate() - : QDeclarativeAbstractAnimationPrivate() {} + QQuickAnimationGroupPrivate() + : QQuickAbstractAnimationPrivate() {} - static void append_animation(QDeclarativeListProperty *list, QDeclarativeAbstractAnimation *role); - static void clear_animation(QDeclarativeListProperty *list); - QList animations; + static void append_animation(QQmlListProperty *list, QQuickAbstractAnimation *role); + static void clear_animation(QQmlListProperty *list); + QList animations; }; -class QDeclarativePropertyAnimationPrivate : public QDeclarativeAbstractAnimationPrivate +class QQuickPropertyAnimationPrivate : public QQuickAbstractAnimationPrivate { - Q_DECLARE_PUBLIC(QDeclarativePropertyAnimation) + Q_DECLARE_PUBLIC(QQuickPropertyAnimation) public: - QDeclarativePropertyAnimationPrivate() - : QDeclarativeAbstractAnimationPrivate(), target(0), fromSourced(false), fromIsDefined(false), toIsDefined(false), + QQuickPropertyAnimationPrivate() + : QQuickAbstractAnimationPrivate(), target(0), fromSourced(false), fromIsDefined(false), toIsDefined(false), defaultToInterpolatorType(0), interpolatorType(0), interpolator(0), duration(250), actions(0) {} QVariant from; @@ -283,31 +283,31 @@ class QDeclarativePropertyAnimationPrivate : public QDeclarativeAbstractAnimatio int duration; QEasingCurve easing; - // for animations that don't use the QDeclarativeBulkValueAnimator - QDeclarativeStateActions *actions; + // for animations that don't use the QQuickBulkValueAnimator + QQuickStateActions *actions; static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress); static void convertVariant(QVariant &variant, int type); }; -class QDeclarativeRotationAnimationPrivate : public QDeclarativePropertyAnimationPrivate +class QQuickRotationAnimationPrivate : public QQuickPropertyAnimationPrivate { - Q_DECLARE_PUBLIC(QDeclarativeRotationAnimation) + Q_DECLARE_PUBLIC(QQuickRotationAnimation) public: - QDeclarativeRotationAnimationPrivate() : direction(QDeclarativeRotationAnimation::Numerical) {} + QQuickRotationAnimationPrivate() : direction(QQuickRotationAnimation::Numerical) {} - QDeclarativeRotationAnimation::RotationDirection direction; + QQuickRotationAnimation::RotationDirection direction; }; -class Q_AUTOTEST_EXPORT QDeclarativeAnimationPropertyUpdater : public QDeclarativeBulkValueUpdater +class Q_AUTOTEST_EXPORT QQuickAnimationPropertyUpdater : public QQuickBulkValueUpdater { public: - QDeclarativeAnimationPropertyUpdater() : prevInterpolatorType(0), wasDeleted(0) {} - ~QDeclarativeAnimationPropertyUpdater() { if (wasDeleted) *wasDeleted = true; } + QQuickAnimationPropertyUpdater() : prevInterpolatorType(0), wasDeleted(0) {} + ~QQuickAnimationPropertyUpdater() { if (wasDeleted) *wasDeleted = true; } void setValue(qreal v); - QDeclarativeStateActions actions; + QQuickStateActions actions; int interpolatorType; //for Number/ColorAnimation QVariantAnimation::Interpolator interpolator; int prevInterpolatorType; //for generic @@ -319,4 +319,4 @@ class Q_AUTOTEST_EXPORT QDeclarativeAnimationPropertyUpdater : public QDeclarati QT_END_NAMESPACE -#endif // QDECLARATIVEANIMATION2_P_H +#endif // QQUICKANIMATION2_P_H diff --git a/src/quick/util/qdeclarativeanimationcontroller.cpp b/src/quick/util/qquickanimationcontroller.cpp similarity index 69% rename from src/quick/util/qdeclarativeanimationcontroller.cpp rename to src/quick/util/qquickanimationcontroller.cpp index 3901a65cb6..a3e343f26d 100644 --- a/src/quick/util/qdeclarativeanimationcontroller.cpp +++ b/src/quick/util/qquickanimationcontroller.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,29 +39,29 @@ ** ****************************************************************************/ -#include "qdeclarativeanimationcontroller_p.h" -#include -#include +#include "qquickanimationcontroller_p.h" +#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeAnimationControllerPrivate : public QObjectPrivate +class QQuickAnimationControllerPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeAnimationController) + Q_DECLARE_PUBLIC(QQuickAnimationController) public: - QDeclarativeAnimationControllerPrivate() + QQuickAnimationControllerPrivate() : progress(0.0), animation(0), animationInstance(0), finalized(false) {} qreal progress; - QDeclarativeAbstractAnimation *animation; + QQuickAbstractAnimation *animation; QAbstractAnimationJob *animationInstance; bool finalized:1; }; /*! - \qmlclass AnimationController QDeclarativeAnimationController + \qmlclass AnimationController QQuickAnimationController \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \brief The AnimationController element allows you to control animations manually. @@ -71,14 +71,14 @@ class QDeclarativeAnimationControllerPrivate : public QObjectPrivate */ -QDeclarativeAnimationController::QDeclarativeAnimationController(QObject *parent) -: QObject(*(new QDeclarativeAnimationControllerPrivate), parent) +QQuickAnimationController::QQuickAnimationController(QObject *parent) +: QObject(*(new QQuickAnimationControllerPrivate), parent) { } -QDeclarativeAnimationController::~QDeclarativeAnimationController() +QQuickAnimationController::~QQuickAnimationController() { - Q_D(QDeclarativeAnimationController); + Q_D(QQuickAnimationController); delete d->animationInstance; } @@ -89,15 +89,15 @@ QDeclarativeAnimationController::~QDeclarativeAnimationController() The valid \c progress value is 0.0 to 1.0, setting values less than 0 will be converted to 0, setting values great than 1 will be converted to 1. */ -qreal QDeclarativeAnimationController::progress() const +qreal QQuickAnimationController::progress() const { - Q_D(const QDeclarativeAnimationController); + Q_D(const QQuickAnimationController); return d->progress; } -void QDeclarativeAnimationController::setProgress(qreal progress) +void QQuickAnimationController::setProgress(qreal progress) { - Q_D(QDeclarativeAnimationController); + Q_D(QQuickAnimationController); progress = qBound(qreal(0), progress, qreal(1)); if (progress != d->progress) { @@ -117,27 +117,27 @@ void QDeclarativeAnimationController::setProgress(qreal progress) \c running and \c paused properties set to true. It can not be manually started or stopped (much like an animation in a Behavior can not be manually started or stopped). */ -QDeclarativeAbstractAnimation *QDeclarativeAnimationController::animation() const +QQuickAbstractAnimation *QQuickAnimationController::animation() const { - Q_D(const QDeclarativeAnimationController); + Q_D(const QQuickAnimationController); return d->animation; } -void QDeclarativeAnimationController::classBegin() +void QQuickAnimationController::classBegin() { - QDeclarativeEnginePrivate *engPriv = QDeclarativeEnginePrivate::get(qmlEngine(this)); + QQmlEnginePrivate *engPriv = QQmlEnginePrivate::get(qmlEngine(this)); engPriv->registerFinalizeCallback(this, this->metaObject()->indexOfSlot("componentFinalized()")); } -void QDeclarativeAnimationController::setAnimation(QDeclarativeAbstractAnimation *animation) +void QQuickAnimationController::setAnimation(QQuickAbstractAnimation *animation) { - Q_D(QDeclarativeAnimationController); + Q_D(QQuickAnimationController); if (animation != d->animation) { if (animation) { if (animation->userControlDisabled()) { - qmlInfo(this) << "QDeclarativeAnimationController::setAnimation: the animation is controlled by others, can't be used in AnimationController."; + qmlInfo(this) << "QQuickAnimationController::setAnimation: the animation is controlled by others, can't be used in AnimationController."; return; } animation->setDisableUserControl(); @@ -158,19 +158,19 @@ void QDeclarativeAnimationController::setAnimation(QDeclarativeAbstractAnimation If the animation properties changed, calling this method to reload the animation definations. */ -void QDeclarativeAnimationController::reload() +void QQuickAnimationController::reload() { - Q_D(QDeclarativeAnimationController); + Q_D(QQuickAnimationController); if (!d->finalized) return; if (!d->animation) { d->animationInstance = 0; } else { - QDeclarativeStateActions actions; - QDeclarativeProperties properties; + QQuickStateActions actions; + QQmlProperties properties; QAbstractAnimationJob *oldInstance = d->animationInstance; - d->animationInstance = d->animation->transition(actions, properties, QDeclarativeAbstractAnimation::Forward); + d->animationInstance = d->animation->transition(actions, properties, QQuickAbstractAnimation::Forward); if (oldInstance && oldInstance != d->animationInstance) delete oldInstance; d->animationInstance->setLoopCount(1); @@ -180,20 +180,20 @@ void QDeclarativeAnimationController::reload() } } -void QDeclarativeAnimationController::updateProgress() +void QQuickAnimationController::updateProgress() { - Q_D(QDeclarativeAnimationController); + Q_D(QQuickAnimationController); if (!d->animationInstance) return; d->animationInstance->start(); - QDeclarativeAnimationTimer::unregisterAnimation(d->animationInstance); + QQmlAnimationTimer::unregisterAnimation(d->animationInstance); d->animationInstance->setCurrentTime(d->progress * d->animationInstance->duration()); } -void QDeclarativeAnimationController::componentFinalized() +void QQuickAnimationController::componentFinalized() { - Q_D(QDeclarativeAnimationController); + Q_D(QQuickAnimationController); d->finalized = true; reload(); } diff --git a/src/quick/util/qdeclarativeanimationcontroller_p.h b/src/quick/util/qquickanimationcontroller_p.h similarity index 71% rename from src/quick/util/qdeclarativeanimationcontroller_p.h rename to src/quick/util/qquickanimationcontroller_p.h index 4a064f6808..24b0b4e2f8 100644 --- a/src/quick/util/qdeclarativeanimationcontroller_p.h +++ b/src/quick/util/qquickanimationcontroller_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEANIMATIONCONTROLLER_H -#define QDECLARATIVEANIMATIONCONTROLLER_H +#ifndef QQUICKANIMATIONCONTROLLER_H +#define QQUICKANIMATIONCONTROLLER_H -#include -#include "qdeclarativeanimation_p.h" +#include +#include "qquickanimation_p.h" QT_BEGIN_HEADER @@ -51,27 +51,27 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QDeclarativeAnimationControllerPrivate; -class Q_AUTOTEST_EXPORT QDeclarativeAnimationController : public QObject, public QDeclarativeParserStatus +class QQuickAnimationControllerPrivate; +class Q_AUTOTEST_EXPORT QQuickAnimationController : public QObject, public QQmlParserStatus { Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) - Q_DECLARE_PRIVATE(QDeclarativeAnimationController) + Q_DECLARE_PRIVATE(QQuickAnimationController) Q_CLASSINFO("DefaultProperty", "animation") Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged) - Q_PROPERTY(QDeclarativeAbstractAnimation *animation READ animation WRITE setAnimation NOTIFY animationChanged) + Q_PROPERTY(QQuickAbstractAnimation *animation READ animation WRITE setAnimation NOTIFY animationChanged) public: - QDeclarativeAnimationController(QObject *parent=0); - ~QDeclarativeAnimationController(); + QQuickAnimationController(QObject *parent=0); + ~QQuickAnimationController(); qreal progress() const; void setProgress(qreal progress); - QDeclarativeAbstractAnimation *animation() const; - void setAnimation(QDeclarativeAbstractAnimation *animation); + QQuickAbstractAnimation *animation() const; + void setAnimation(QQuickAbstractAnimation *animation); void classBegin(); void componentComplete() {} @@ -87,8 +87,8 @@ private Q_SLOTS: QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeAnimationController) +QML_DECLARE_TYPE(QQuickAnimationController) QT_END_HEADER -#endif // QDECLARATIVEANIMATIONCONTROLLER_H +#endif // QQUICKANIMATIONCONTROLLER_H diff --git a/src/quick/util/qdeclarativebehavior.cpp b/src/quick/util/qquickbehavior.cpp similarity index 69% rename from src/quick/util/qdeclarativebehavior.cpp rename to src/quick/util/qquickbehavior.cpp index 6cf372ece9..78d83371d3 100644 --- a/src/quick/util/qdeclarativebehavior.cpp +++ b/src/quick/util/qquickbehavior.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,33 +39,33 @@ ** ****************************************************************************/ -#include "qdeclarativebehavior_p.h" +#include "qquickbehavior_p.h" -#include "qdeclarativeanimation_p.h" -#include -#include -#include -#include -#include +#include "qquickanimation_p.h" +#include +#include +#include +#include +#include #include -#include +#include #include QT_BEGIN_NAMESPACE -class QDeclarativeBehaviorPrivate : public QObjectPrivate, public QAnimationJobChangeListener +class QQuickBehaviorPrivate : public QObjectPrivate, public QAnimationJobChangeListener { - Q_DECLARE_PUBLIC(QDeclarativeBehavior) + Q_DECLARE_PUBLIC(QQuickBehavior) public: - QDeclarativeBehaviorPrivate() : animation(0), animationInstance(0), enabled(true), finalized(false) + QQuickBehaviorPrivate() : animation(0), animationInstance(0), enabled(true), finalized(false) , blockRunningChanged(false) {} virtual void animationStateChanged(QAbstractAnimationJob *, QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState); - QDeclarativeProperty property; + QQmlProperty property; QVariant targetValue; - QDeclarativeGuard animation; + QQmlGuard animation; QAbstractAnimationJob *animationInstance; bool enabled; bool finalized; @@ -73,7 +73,7 @@ class QDeclarativeBehaviorPrivate : public QObjectPrivate, public QAnimationJobC }; /*! - \qmlclass Behavior QDeclarativeBehavior + \qmlclass Behavior QQuickBehavior \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \brief The Behavior element allows you to specify a default animation for a property change. @@ -85,7 +85,7 @@ class QDeclarativeBehaviorPrivate : public QObjectPrivate, public QAnimationJobC whenever the \l Rectangle's \c width value changes. When the MouseArea is clicked, the \c width is changed, triggering the behavior's animation: - \snippet doc/src/snippets/declarative/behavior.qml 0 + \snippet doc/src/snippets/qml/behavior.qml 0 Note that a property cannot have more than one assigned Behavior. To provide multiple animations within a Behavior, use ParallelAnimation or @@ -96,18 +96,18 @@ class QDeclarativeBehaviorPrivate : public QObjectPrivate, public QAnimationJobC state change. For general advice on using Behaviors to animate state changes, see \l{Using QML Behaviors with States}. - \sa {QML Animation and Transitions}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative + \sa {QML Animation and Transitions}, {declarative/animation/behaviors}{Behavior example}, QtQml */ -QDeclarativeBehavior::QDeclarativeBehavior(QObject *parent) - : QObject(*(new QDeclarativeBehaviorPrivate), parent) +QQuickBehavior::QQuickBehavior(QObject *parent) + : QObject(*(new QQuickBehaviorPrivate), parent) { } -QDeclarativeBehavior::~QDeclarativeBehavior() +QQuickBehavior::~QQuickBehavior() { - Q_D(QDeclarativeBehavior); + Q_D(QQuickBehavior); delete d->animationInstance; } @@ -118,15 +118,15 @@ QDeclarativeBehavior::~QDeclarativeBehavior() This property holds the animation to run when the behavior is triggered. */ -QDeclarativeAbstractAnimation *QDeclarativeBehavior::animation() +QQuickAbstractAnimation *QQuickBehavior::animation() { - Q_D(QDeclarativeBehavior); + Q_D(QQuickBehavior); return d->animation; } -void QDeclarativeBehavior::setAnimation(QDeclarativeAbstractAnimation *animation) +void QQuickBehavior::setAnimation(QQuickAbstractAnimation *animation) { - Q_D(QDeclarativeBehavior); + Q_D(QQuickBehavior); if (d->animation) { qmlInfo(this) << tr("Cannot change the animation assigned to a Behavior."); return; @@ -140,7 +140,7 @@ void QDeclarativeBehavior::setAnimation(QDeclarativeAbstractAnimation *animation } -void QDeclarativeBehaviorPrivate::animationStateChanged(QAbstractAnimationJob *, QAbstractAnimationJob::State newState,QAbstractAnimationJob::State) +void QQuickBehaviorPrivate::animationStateChanged(QAbstractAnimationJob *, QAbstractAnimationJob::State newState,QAbstractAnimationJob::State) { if (!blockRunningChanged) animation->notifyRunningChanged(newState == QAbstractAnimationJob::Running); @@ -155,29 +155,29 @@ void QDeclarativeBehaviorPrivate::animationStateChanged(QAbstractAnimationJob *, By default a Behavior is enabled. */ -bool QDeclarativeBehavior::enabled() const +bool QQuickBehavior::enabled() const { - Q_D(const QDeclarativeBehavior); + Q_D(const QQuickBehavior); return d->enabled; } -void QDeclarativeBehavior::setEnabled(bool enabled) +void QQuickBehavior::setEnabled(bool enabled) { - Q_D(QDeclarativeBehavior); + Q_D(QQuickBehavior); if (d->enabled == enabled) return; d->enabled = enabled; emit enabledChanged(); } -void QDeclarativeBehavior::write(const QVariant &value) +void QQuickBehavior::write(const QVariant &value) { - Q_D(QDeclarativeBehavior); + Q_D(QQuickBehavior); bool bypass = !d->enabled || !d->finalized; if (!bypass) qmlExecuteDeferred(this); if (!d->animation || bypass) { - QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + QQmlPropertyPrivate::write(d->property, value, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); d->targetValue = value; return; } @@ -194,16 +194,16 @@ void QDeclarativeBehavior::write(const QVariant &value) d->animationInstance->stop(); } - QDeclarativeStateOperation::ActionList actions; - QDeclarativeAction action; + QQuickStateOperation::ActionList actions; + QQuickAction action; action.property = d->property; action.fromValue = currentValue; action.toValue = value; actions << action; - QList after; + QList after; QAbstractAnimationJob *prev = d->animationInstance; - d->animationInstance = d->animation->transition(actions, after, QDeclarativeAbstractAnimation::Forward); + d->animationInstance = d->animation->transition(actions, after, QQuickAbstractAnimation::Forward); if (d->animationInstance != prev) { d->animationInstance->addAnimationChangeListener(d, QAbstractAnimationJob::StateChange); if (prev) @@ -212,26 +212,26 @@ void QDeclarativeBehavior::write(const QVariant &value) d->animationInstance->start(); d->blockRunningChanged = false; if (!after.contains(d->property)) - QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + QQmlPropertyPrivate::write(d->property, value, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); } -void QDeclarativeBehavior::setTarget(const QDeclarativeProperty &property) +void QQuickBehavior::setTarget(const QQmlProperty &property) { - Q_D(QDeclarativeBehavior); + Q_D(QQuickBehavior); d->property = property; if (d->animation) d->animation->setDefaultTarget(property); - QDeclarativeEnginePrivate *engPriv = QDeclarativeEnginePrivate::get(qmlEngine(this)); + QQmlEnginePrivate *engPriv = QQmlEnginePrivate::get(qmlEngine(this)); static int finalizedIdx = -1; if (finalizedIdx < 0) finalizedIdx = metaObject()->indexOfSlot("componentFinalized()"); engPriv->registerFinalizeCallback(this, finalizedIdx); } -void QDeclarativeBehavior::componentFinalized() +void QQuickBehavior::componentFinalized() { - Q_D(QDeclarativeBehavior); + Q_D(QQuickBehavior); d->finalized = true; } diff --git a/src/quick/util/qdeclarativebehavior_p.h b/src/quick/util/qquickbehavior_p.h similarity index 70% rename from src/quick/util/qdeclarativebehavior_p.h rename to src/quick/util/qquickbehavior_p.h index c95304dce7..1c258767d3 100644 --- a/src/quick/util/qdeclarativebehavior_p.h +++ b/src/quick/util/qquickbehavior_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,40 +39,40 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEBEHAVIOR_H -#define QDECLARATIVEBEHAVIOR_H +#ifndef QQUICKBEHAVIOR_H +#define QQUICKBEHAVIOR_H #include -#include -#include +#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeAbstractAnimation; -class QDeclarativeBehaviorPrivate; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeBehavior : public QObject, public QDeclarativePropertyValueInterceptor +class QQuickAbstractAnimation; +class QQuickBehaviorPrivate; +class Q_QUICK_PRIVATE_EXPORT QQuickBehavior : public QObject, public QQmlPropertyValueInterceptor { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeBehavior) + Q_DECLARE_PRIVATE(QQuickBehavior) - Q_INTERFACES(QDeclarativePropertyValueInterceptor) + Q_INTERFACES(QQmlPropertyValueInterceptor) Q_CLASSINFO("DefaultProperty", "animation") - Q_PROPERTY(QDeclarativeAbstractAnimation *animation READ animation WRITE setAnimation) + Q_PROPERTY(QQuickAbstractAnimation *animation READ animation WRITE setAnimation) Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) Q_CLASSINFO("DeferredPropertyNames", "animation") public: - QDeclarativeBehavior(QObject *parent=0); - ~QDeclarativeBehavior(); + QQuickBehavior(QObject *parent=0); + ~QQuickBehavior(); - virtual void setTarget(const QDeclarativeProperty &); + virtual void setTarget(const QQmlProperty &); virtual void write(const QVariant &value); - QDeclarativeAbstractAnimation *animation(); - void setAnimation(QDeclarativeAbstractAnimation *); + QQuickAbstractAnimation *animation(); + void setAnimation(QQuickAbstractAnimation *); bool enabled() const; void setEnabled(bool enabled); @@ -86,8 +86,8 @@ private Q_SLOTS: QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeBehavior) +QML_DECLARE_TYPE(QQuickBehavior) QT_END_HEADER -#endif // QDECLARATIVEBEHAVIOR_H +#endif // QQUICKBEHAVIOR_H diff --git a/src/quick/util/qdeclarativebind.cpp b/src/quick/util/qquickbind.cpp similarity index 73% rename from src/quick/util/qdeclarativebind.cpp rename to src/quick/util/qquickbind.cpp index 05d3b1e6b0..a3fba06359 100644 --- a/src/quick/util/qdeclarativebind.cpp +++ b/src/quick/util/qquickbind.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,17 +39,17 @@ ** ****************************************************************************/ -#include "qdeclarativebind_p.h" +#include "qquickbind_p.h" -#include -#include -#include -#include +#include +#include +#include +#include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -58,24 +58,24 @@ QT_BEGIN_NAMESPACE -class QDeclarativeBindPrivate : public QObjectPrivate +class QQuickBindPrivate : public QObjectPrivate { public: - QDeclarativeBindPrivate() : componentComplete(true), obj(0), prevBind(0) {} - ~QDeclarativeBindPrivate() { if (prevBind) prevBind->destroy(); } + QQuickBindPrivate() : componentComplete(true), obj(0), prevBind(0) {} + ~QQuickBindPrivate() { if (prevBind) prevBind->destroy(); } - QDeclarativeNullableValue when; + QQmlNullableValue when; bool componentComplete; - QDeclarativeGuard obj; + QQmlGuard obj; QString propName; - QDeclarativeNullableValue value; - QDeclarativeProperty prop; - QDeclarativeAbstractBinding *prevBind; + QQmlNullableValue value; + QQmlProperty prop; + QQmlAbstractBinding *prevBind; }; /*! - \qmlclass Binding QDeclarativeBind + \qmlclass Binding QQuickBind \inqmlmodule QtQuick 2 \ingroup qml-working-with-data \brief The Binding element allows arbitrary property bindings to be created. @@ -138,14 +138,14 @@ class QDeclarativeBindPrivate : public QObjectPrivate If the binding target or binding property is changed, the bound value is immediately pushed onto the new target. - \sa QtDeclarative + \sa QtQml */ -QDeclarativeBind::QDeclarativeBind(QObject *parent) - : QObject(*(new QDeclarativeBindPrivate), parent) +QQuickBind::QQuickBind(QObject *parent) + : QObject(*(new QQuickBindPrivate), parent) { } -QDeclarativeBind::~QDeclarativeBind() +QQuickBind::~QQuickBind() { } @@ -165,15 +165,15 @@ QDeclarativeBind::~QDeclarativeBind() When the binding becomes inactive again, any direct bindings that were previously set on the property will be restored. */ -bool QDeclarativeBind::when() const +bool QQuickBind::when() const { - Q_D(const QDeclarativeBind); + Q_D(const QQuickBind); return d->when; } -void QDeclarativeBind::setWhen(bool v) +void QQuickBind::setWhen(bool v) { - Q_D(QDeclarativeBind); + Q_D(QQuickBind); if (!d->when.isNull && d->when == v) return; @@ -186,15 +186,15 @@ void QDeclarativeBind::setWhen(bool v) The object to be updated. */ -QObject *QDeclarativeBind::object() +QObject *QQuickBind::object() { - Q_D(const QDeclarativeBind); + Q_D(const QQuickBind); return d->obj; } -void QDeclarativeBind::setObject(QObject *obj) +void QQuickBind::setObject(QObject *obj) { - Q_D(QDeclarativeBind); + Q_D(QQuickBind); if (d->obj && d->when.isValid() && d->when) { /* if we switch the object at runtime, we need to restore the previous binding on the old object before continuing */ @@ -204,7 +204,7 @@ void QDeclarativeBind::setObject(QObject *obj) } d->obj = obj; if (d->componentComplete) - d->prop = QDeclarativeProperty(d->obj, d->propName); + d->prop = QQmlProperty(d->obj, d->propName); eval(); } @@ -213,15 +213,15 @@ void QDeclarativeBind::setObject(QObject *obj) The property to be updated. */ -QString QDeclarativeBind::property() const +QString QQuickBind::property() const { - Q_D(const QDeclarativeBind); + Q_D(const QQuickBind); return d->propName; } -void QDeclarativeBind::setProperty(const QString &p) +void QQuickBind::setProperty(const QString &p) { - Q_D(QDeclarativeBind); + Q_D(QQuickBind); if (!d->propName.isEmpty() && d->when.isValid() && d->when) { /* if we switch the property name at runtime, we need to restore the previous binding on the old object before continuing */ @@ -231,7 +231,7 @@ void QDeclarativeBind::setProperty(const QString &p) } d->propName = p; if (d->componentComplete) - d->prop = QDeclarativeProperty(d->obj, d->propName); + d->prop = QQmlProperty(d->obj, d->propName); eval(); } @@ -241,43 +241,43 @@ void QDeclarativeBind::setProperty(const QString &p) The value to be set on the target object and property. This can be a constant (which isn't very useful), or a bound expression. */ -QVariant QDeclarativeBind::value() const +QVariant QQuickBind::value() const { - Q_D(const QDeclarativeBind); + Q_D(const QQuickBind); return d->value.value; } -void QDeclarativeBind::setValue(const QVariant &v) +void QQuickBind::setValue(const QVariant &v) { - Q_D(QDeclarativeBind); + Q_D(QQuickBind); d->value = v; eval(); } -void QDeclarativeBind::setTarget(const QDeclarativeProperty &p) +void QQuickBind::setTarget(const QQmlProperty &p) { - Q_D(QDeclarativeBind); + Q_D(QQuickBind); d->prop = p; } -void QDeclarativeBind::classBegin() +void QQuickBind::classBegin() { - Q_D(QDeclarativeBind); + Q_D(QQuickBind); d->componentComplete = false; } -void QDeclarativeBind::componentComplete() +void QQuickBind::componentComplete() { - Q_D(QDeclarativeBind); + Q_D(QQuickBind); d->componentComplete = true; if (!d->prop.isValid()) - d->prop = QDeclarativeProperty(d->obj, d->propName); + d->prop = QQmlProperty(d->obj, d->propName); eval(); } -void QDeclarativeBind::eval() +void QQuickBind::eval() { - Q_D(QDeclarativeBind); + Q_D(QQuickBind); if (!d->prop.isValid() || d->value.isNull || !d->componentComplete) return; @@ -285,9 +285,9 @@ void QDeclarativeBind::eval() if (!d->when) { //restore any previous binding if (d->prevBind) { - QDeclarativeAbstractBinding *tmp = d->prevBind; + QQmlAbstractBinding *tmp = d->prevBind; d->prevBind = 0; - tmp = QDeclarativePropertyPrivate::setBinding(d->prop, tmp); + tmp = QQmlPropertyPrivate::setBinding(d->prop, tmp); if (tmp) //should this ever be true? tmp->destroy(); } @@ -295,8 +295,8 @@ void QDeclarativeBind::eval() } //save any set binding for restoration - QDeclarativeAbstractBinding *tmp; - tmp = QDeclarativePropertyPrivate::setBinding(d->prop, 0); + QQmlAbstractBinding *tmp; + tmp = QQmlPropertyPrivate::setBinding(d->prop, 0); if (tmp && d->prevBind) d->prevBind->destroy(); else if (!d->prevBind) diff --git a/src/quick/util/qdeclarativebind_p.h b/src/quick/util/qquickbind_p.h similarity index 79% rename from src/quick/util/qdeclarativebind_p.h rename to src/quick/util/qquickbind_p.h index a06ca222d1..5236fac171 100644 --- a/src/quick/util/qdeclarativebind_p.h +++ b/src/quick/util/qquickbind_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEBIND_H -#define QDECLARATIVEBIND_H +#ifndef QQUICKBIND_H +#define QQUICKBIND_H -#include +#include #include @@ -50,21 +50,21 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeBindPrivate; -class Q_AUTOTEST_EXPORT QDeclarativeBind : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus +class QQuickBindPrivate; +class Q_AUTOTEST_EXPORT QQuickBind : public QObject, public QQmlPropertyValueSource, public QQmlParserStatus { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeBind) - Q_INTERFACES(QDeclarativeParserStatus) - Q_INTERFACES(QDeclarativePropertyValueSource) + Q_DECLARE_PRIVATE(QQuickBind) + Q_INTERFACES(QQmlParserStatus) + Q_INTERFACES(QQmlPropertyValueSource) Q_PROPERTY(QObject *target READ object WRITE setObject) Q_PROPERTY(QString property READ property WRITE setProperty) Q_PROPERTY(QVariant value READ value WRITE setValue) Q_PROPERTY(bool when READ when WRITE setWhen) public: - QDeclarativeBind(QObject *parent=0); - ~QDeclarativeBind(); + QQuickBind(QObject *parent=0); + ~QQuickBind(); bool when() const; void setWhen(bool); @@ -79,7 +79,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeBind : public QObject, public QDeclarativePr void setValue(const QVariant &); protected: - virtual void setTarget(const QDeclarativeProperty &); + virtual void setTarget(const QQmlProperty &); virtual void classBegin(); virtual void componentComplete(); @@ -89,7 +89,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeBind : public QObject, public QDeclarativePr QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeBind) +QML_DECLARE_TYPE(QQuickBind) QT_END_HEADER diff --git a/src/quick/util/qdeclarativechangeset.cpp b/src/quick/util/qquickchangeset.cpp similarity index 90% rename from src/quick/util/qdeclarativechangeset.cpp rename to src/quick/util/qquickchangeset.cpp index 74328a603e..b6b5adb60c 100644 --- a/src/quick/util/qdeclarativechangeset.cpp +++ b/src/quick/util/qquickchangeset.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,17 +39,17 @@ ** ****************************************************************************/ -#include "qdeclarativechangeset_p.h" +#include "qquickchangeset_p.h" QT_BEGIN_NAMESPACE -QDeclarativeChangeSet::QDeclarativeChangeSet() +QQuickChangeSet::QQuickChangeSet() : m_moveCounter(0) , m_difference(0) { } -QDeclarativeChangeSet::QDeclarativeChangeSet(const QDeclarativeChangeSet &changeSet) +QQuickChangeSet::QQuickChangeSet(const QQuickChangeSet &changeSet) : m_removes(changeSet.m_removes) , m_inserts(changeSet.m_inserts) , m_changes(changeSet.m_changes) @@ -58,11 +58,11 @@ QDeclarativeChangeSet::QDeclarativeChangeSet(const QDeclarativeChangeSet &change { } -QDeclarativeChangeSet::~QDeclarativeChangeSet() +QQuickChangeSet::~QQuickChangeSet() { } -QDeclarativeChangeSet &QDeclarativeChangeSet::operator =(const QDeclarativeChangeSet &changeSet) +QQuickChangeSet &QQuickChangeSet::operator =(const QQuickChangeSet &changeSet) { m_removes = changeSet.m_removes; m_inserts = changeSet.m_inserts; @@ -72,52 +72,52 @@ QDeclarativeChangeSet &QDeclarativeChangeSet::operator =(const QDeclarativeChang return *this; } -void QDeclarativeChangeSet::insert(int index, int count) +void QQuickChangeSet::insert(int index, int count) { applyInsertions(QVector() << Insert(index, count)); } -void QDeclarativeChangeSet::remove(int index, int count) +void QQuickChangeSet::remove(int index, int count) { QVector i; applyRemovals(QVector() << Remove(index, count), i); } -void QDeclarativeChangeSet::move(int from, int to, int count) +void QQuickChangeSet::move(int from, int to, int count) { apply(QVector() << Remove(from, count, -2), QVector() << Insert(to, count, -2)); } -void QDeclarativeChangeSet::change(int index, int count) +void QQuickChangeSet::change(int index, int count) { applyChanges(QVector() << Change(index, count)); } -void QDeclarativeChangeSet::apply(const QDeclarativeChangeSet &changeSet) +void QQuickChangeSet::apply(const QQuickChangeSet &changeSet) { apply(changeSet.m_removes, changeSet.m_inserts, changeSet.m_changes); } -void QDeclarativeChangeSet::apply(const QVector &removals) +void QQuickChangeSet::apply(const QVector &removals) { QVector r = removals; QVector i; applyRemovals(r, i); } -void QDeclarativeChangeSet::apply(const QVector &insertions) +void QQuickChangeSet::apply(const QVector &insertions) { QVector i = insertions; applyInsertions(i); } -void QDeclarativeChangeSet::apply(const QVector &changes) +void QQuickChangeSet::apply(const QVector &changes) { QVector c = changes; applyChanges(c); } -void QDeclarativeChangeSet::apply(const QVector &removals, const QVector &insertions, const QVector &changes) +void QQuickChangeSet::apply(const QVector &removals, const QVector &insertions, const QVector &changes) { QVector r = removals; QVector i = insertions; @@ -127,7 +127,7 @@ void QDeclarativeChangeSet::apply(const QVector &removals, const QVector applyChanges(c); } -void QDeclarativeChangeSet::applyRemovals(QVector &removals, QVector &insertions) +void QQuickChangeSet::applyRemovals(QVector &removals, QVector &insertions) { int removeCount = 0; int insertCount = 0; @@ -336,7 +336,7 @@ void QDeclarativeChangeSet::applyRemovals(QVector &removals, QVector &insertions) +void QQuickChangeSet::applyInsertions(QVector &insertions) { int insertCount = 0; QVector::iterator insert = m_inserts.begin(); @@ -403,7 +403,7 @@ void QDeclarativeChangeSet::applyInsertions(QVector &insertions) m_difference += insertCount; } -void QDeclarativeChangeSet::applyChanges(QVector &changes) +void QQuickChangeSet::applyChanges(QVector &changes) { QVector::iterator insert = m_inserts.begin(); QVector::iterator change = m_changes.begin(); @@ -451,26 +451,26 @@ void QDeclarativeChangeSet::applyChanges(QVector &changes) } } -QDebug operator <<(QDebug debug, const QDeclarativeChangeSet &set) +QDebug operator <<(QDebug debug, const QQuickChangeSet &set) { - debug.nospace() << "QDeclarativeChangeSet("; - foreach (const QDeclarativeChangeSet::Remove &remove, set.removes()) debug << remove; - foreach (const QDeclarativeChangeSet::Insert &insert, set.inserts()) debug << insert; - foreach (const QDeclarativeChangeSet::Change &change, set.changes()) debug << change; + debug.nospace() << "QQuickChangeSet("; + foreach (const QQuickChangeSet::Remove &remove, set.removes()) debug << remove; + foreach (const QQuickChangeSet::Insert &insert, set.inserts()) debug << insert; + foreach (const QQuickChangeSet::Change &change, set.changes()) debug << change; return debug.nospace() << ")"; } -QDebug operator <<(QDebug debug, const QDeclarativeChangeSet::Remove &remove) +QDebug operator <<(QDebug debug, const QQuickChangeSet::Remove &remove) { return (debug.nospace() << "Remove(" << remove.index << "," << remove.count << "," << remove.moveId << ")").space(); } -QDebug operator <<(QDebug debug, const QDeclarativeChangeSet::Insert &insert) +QDebug operator <<(QDebug debug, const QQuickChangeSet::Insert &insert) { return (debug.nospace() << "Insert(" << insert.index << "," << insert.count << "," << insert.moveId << ")").space(); } -QDebug operator <<(QDebug debug, const QDeclarativeChangeSet::Change &change) +QDebug operator <<(QDebug debug, const QQuickChangeSet::Change &change) { return (debug.nospace() << "Change(" << change.index << "," << change.count << ")").space(); } diff --git a/src/quick/util/qdeclarativechangeset_p.h b/src/quick/util/qquickchangeset_p.h similarity index 81% rename from src/quick/util/qdeclarativechangeset_p.h rename to src/quick/util/qquickchangeset_p.h index 6e26337149..64179666c7 100644 --- a/src/quick/util/qdeclarativechangeset_p.h +++ b/src/quick/util/qquickchangeset_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVECHANGESET_P_H -#define QDECLARATIVECHANGESET_P_H +#ifndef QQUICKCHANGESET_P_H +#define QQUICKCHANGESET_P_H // // W A R N I N G @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE -class Q_AUTOTEST_EXPORT QDeclarativeChangeSet +class Q_AUTOTEST_EXPORT QQuickChangeSet { public: struct MoveKey @@ -102,11 +102,11 @@ class Q_AUTOTEST_EXPORT QDeclarativeChangeSet Remove(int index, int count, int moveId) : Change(index, count, moveId) {} }; - QDeclarativeChangeSet(); - QDeclarativeChangeSet(const QDeclarativeChangeSet &changeSet); - ~QDeclarativeChangeSet(); + QQuickChangeSet(); + QQuickChangeSet(const QQuickChangeSet &changeSet); + ~QQuickChangeSet(); - QDeclarativeChangeSet &operator =(const QDeclarativeChangeSet &changeSet); + QQuickChangeSet &operator =(const QQuickChangeSet &changeSet); const QVector &removes() const { return m_removes; } const QVector &inserts() const { return m_inserts; } @@ -117,7 +117,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeChangeSet void move(int from, int to, int count); void change(int index, int count); - void apply(const QDeclarativeChangeSet &changeSet); + void apply(const QQuickChangeSet &changeSet); void apply(const QVector &removals); void apply(const QVector &insertions); void apply(const QVector &changes); @@ -152,14 +152,14 @@ class Q_AUTOTEST_EXPORT QDeclarativeChangeSet int m_difference; }; -inline uint qHash(const QDeclarativeChangeSet::MoveKey &key) { return qHash(qMakePair(key.moveId, key.offset)); } -inline bool operator ==(const QDeclarativeChangeSet::MoveKey &l, const QDeclarativeChangeSet::MoveKey &r) { +inline uint qHash(const QQuickChangeSet::MoveKey &key) { return qHash(qMakePair(key.moveId, key.offset)); } +inline bool operator ==(const QQuickChangeSet::MoveKey &l, const QQuickChangeSet::MoveKey &r) { return l.moveId == r.moveId && l.offset == r.offset; } -Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeChangeSet &change); -Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeChangeSet::Remove &remove); -Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeChangeSet::Insert &insert); -Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeChangeSet::Change &change); +Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickChangeSet &change); +Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickChangeSet::Remove &remove); +Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickChangeSet::Insert &insert); +Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickChangeSet::Change &change); QT_END_NAMESPACE diff --git a/src/quick/util/qdeclarativeconnections.cpp b/src/quick/util/qquickconnections.cpp similarity index 68% rename from src/quick/util/qdeclarativeconnections.cpp rename to src/quick/util/qquickconnections.cpp index c98c87abfa..6e176fde3d 100644 --- a/src/quick/util/qdeclarativeconnections.cpp +++ b/src/quick/util/qquickconnections.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,14 +39,14 @@ ** ****************************************************************************/ -#include "qdeclarativeconnections_p.h" +#include "qquickconnections_p.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -55,12 +55,12 @@ QT_BEGIN_NAMESPACE -class QDeclarativeConnectionsPrivate : public QObjectPrivate +class QQuickConnectionsPrivate : public QObjectPrivate { public: - QDeclarativeConnectionsPrivate() : target(0), targetSet(false), ignoreUnknownSignals(false), componentcomplete(true) {} + QQuickConnectionsPrivate() : target(0), targetSet(false), ignoreUnknownSignals(false), componentcomplete(true) {} - QList boundsignals; + QList boundsignals; QObject *target; bool targetSet; @@ -71,7 +71,7 @@ class QDeclarativeConnectionsPrivate : public QObjectPrivate }; /*! - \qmlclass Connections QDeclarativeConnections + \qmlclass Connections QQuickConnections \inqmlmodule QtQuick 2 \ingroup qml-utility-elements \brief A Connections element describes generalized connections to signals. @@ -125,14 +125,14 @@ class QDeclarativeConnectionsPrivate : public QObjectPrivate } \endqml - \sa QtDeclarative + \sa QtQml */ -QDeclarativeConnections::QDeclarativeConnections(QObject *parent) : - QObject(*(new QDeclarativeConnectionsPrivate), parent) +QQuickConnections::QQuickConnections(QObject *parent) : + QObject(*(new QQuickConnectionsPrivate), parent) { } -QDeclarativeConnections::~QDeclarativeConnections() +QQuickConnections::~QQuickConnections() { } @@ -145,19 +145,19 @@ QDeclarativeConnections::~QDeclarativeConnections() If set to null, no connection is made and any signal handlers are ignored until the target is not null. */ -QObject *QDeclarativeConnections::target() const +QObject *QQuickConnections::target() const { - Q_D(const QDeclarativeConnections); + Q_D(const QQuickConnections); return d->targetSet ? d->target : parent(); } -void QDeclarativeConnections::setTarget(QObject *obj) +void QQuickConnections::setTarget(QObject *obj) { - Q_D(QDeclarativeConnections); + Q_D(QQuickConnections); d->targetSet = true; // even if setting to 0, it is *set* if (d->target == obj) return; - foreach (QDeclarativeBoundSignal *s, d->boundsignals) { + foreach (QQmlBoundSignal *s, d->boundsignals) { // It is possible that target is being changed due to one of our signal // handlers -> use deleteLater(). if (s->isEvaluating()) @@ -180,22 +180,22 @@ void QDeclarativeConnections::setTarget(QObject *obj) This is useful if you intend to connect to different types of objects, handling a different set of signals for each object. */ -bool QDeclarativeConnections::ignoreUnknownSignals() const +bool QQuickConnections::ignoreUnknownSignals() const { - Q_D(const QDeclarativeConnections); + Q_D(const QQuickConnections); return d->ignoreUnknownSignals; } -void QDeclarativeConnections::setIgnoreUnknownSignals(bool ignore) +void QQuickConnections::setIgnoreUnknownSignals(bool ignore) { - Q_D(QDeclarativeConnections); + Q_D(QQuickConnections); d->ignoreUnknownSignals = ignore; } QByteArray -QDeclarativeConnectionsParser::compile(const QList &props) +QQmlConnectionsParser::compile(const QList &props) { QByteArray rv; QDataStream ds(&rv, QIODevice::WriteOnly); @@ -207,7 +207,7 @@ QDeclarativeConnectionsParser::compile(const QList()) { - error(props.at(ii), QDeclarativeConnections::tr("Connections: nested objects not allowed")); + if (value.userType() == qMetaTypeId()) { + error(props.at(ii), QQuickConnections::tr("Connections: nested objects not allowed")); return QByteArray(); - } else if (value.userType() == qMetaTypeId()) { - error(props.at(ii), QDeclarativeConnections::tr("Connections: syntax error")); + } else if (value.userType() == qMetaTypeId()) { + error(props.at(ii), QQuickConnections::tr("Connections: syntax error")); return QByteArray(); } else { - QDeclarativeScript::Variant v = qvariant_cast(value); + QQmlScript::Variant v = qvariant_cast(value); if (v.isScript()) { ds << propName; ds << rewriteSignalHandler(v, propName); ds << propLine; ds << propColumn; } else { - error(props.at(ii), QDeclarativeConnections::tr("Connections: script expected")); + error(props.at(ii), QQuickConnections::tr("Connections: script expected")); return QByteArray(); } } @@ -240,18 +240,18 @@ QDeclarativeConnectionsParser::compile(const QList(QObjectPrivate::get(object)); + QQuickConnectionsPrivate *p = + static_cast(QObjectPrivate::get(object)); p->data = data; } -void QDeclarativeConnections::connectSignals() +void QQuickConnections::connectSignals() { - Q_D(QDeclarativeConnections); + Q_D(QQuickConnections); if (!d->componentcomplete || (d->targetSet && !target())) return; @@ -266,22 +266,22 @@ void QDeclarativeConnections::connectSignals() int column; ds >> column; - QDeclarativeProperty prop(target(), propName); - if (prop.isValid() && (prop.type() & QDeclarativeProperty::SignalProperty)) { - QDeclarativeBoundSignal *signal = - new QDeclarativeBoundSignal(target(), prop.method(), this); + QQmlProperty prop(target(), propName); + if (prop.isValid() && (prop.type() & QQmlProperty::SignalProperty)) { + QQmlBoundSignal *signal = + new QQmlBoundSignal(target(), prop.method(), this); QString location; - QDeclarativeContextData *ctxtdata = 0; - QDeclarativeData *ddata = QDeclarativeData::get(this); + QQmlContextData *ctxtdata = 0; + QQmlData *ddata = QQmlData::get(this); if (ddata) { ctxtdata = ddata->outerContext; if (ctxtdata && !ctxtdata->url.isEmpty()) location = ddata->outerContext->urlString; } - QDeclarativeExpression *expression = ctxtdata ? - QDeclarativeExpressionPrivate::create(ctxtdata, 0, script, true, location, line, column) : 0; + QQmlExpression *expression = ctxtdata ? + QQmlExpressionPrivate::create(ctxtdata, 0, script, true, location, line, column) : 0; signal->setExpression(expression); d->boundsignals += signal; } else { @@ -291,15 +291,15 @@ void QDeclarativeConnections::connectSignals() } } -void QDeclarativeConnections::classBegin() +void QQuickConnections::classBegin() { - Q_D(QDeclarativeConnections); + Q_D(QQuickConnections); d->componentcomplete=false; } -void QDeclarativeConnections::componentComplete() +void QQuickConnections::componentComplete() { - Q_D(QDeclarativeConnections); + Q_D(QQuickConnections); d->componentcomplete=true; connectSignals(); } diff --git a/src/quick/util/qdeclarativeconnections_p.h b/src/quick/util/qquickconnections_p.h similarity index 75% rename from src/quick/util/qdeclarativeconnections_p.h rename to src/quick/util/qquickconnections_p.h index fcfbcaf5d2..8184697e88 100644 --- a/src/quick/util/qdeclarativeconnections_p.h +++ b/src/quick/util/qquickconnections_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVECONNECTIONS_H -#define QDECLARATIVECONNECTIONS_H +#ifndef QQUICKCONNECTIONS_H +#define QQUICKCONNECTIONS_H -#include -#include +#include +#include #include #include @@ -52,21 +52,21 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeBoundSignal; -class QDeclarativeContext; -class QDeclarativeConnectionsPrivate; -class Q_AUTOTEST_EXPORT QDeclarativeConnections : public QObject, public QDeclarativeParserStatus +class QQmlBoundSignal; +class QQmlContext; +class QQuickConnectionsPrivate; +class Q_AUTOTEST_EXPORT QQuickConnections : public QObject, public QQmlParserStatus { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeConnections) + Q_DECLARE_PRIVATE(QQuickConnections) - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged) Q_PROPERTY(bool ignoreUnknownSignals READ ignoreUnknownSignals WRITE setIgnoreUnknownSignals) public: - QDeclarativeConnections(QObject *parent=0); - ~QDeclarativeConnections(); + QQuickConnections(QObject *parent=0); + ~QQuickConnections(); QObject *target() const; void setTarget(QObject *); @@ -83,17 +83,17 @@ class Q_AUTOTEST_EXPORT QDeclarativeConnections : public QObject, public QDeclar void componentComplete(); }; -class QDeclarativeConnectionsParser : public QDeclarativeCustomParser +class QQmlConnectionsParser : public QQmlCustomParser { public: - virtual QByteArray compile(const QList &); + virtual QByteArray compile(const QList &); virtual void setCustomData(QObject *, const QByteArray &); }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeConnections) +QML_DECLARE_TYPE(QQuickConnections) QT_END_HEADER diff --git a/src/quick/util/qdeclarativefontloader.cpp b/src/quick/util/qquickfontloader.cpp similarity index 74% rename from src/quick/util/qdeclarativefontloader.cpp rename to src/quick/util/qquickfontloader.cpp index 441ecf60dd..438d00bd1b 100644 --- a/src/quick/util/qdeclarativefontloader.cpp +++ b/src/quick/util/qquickfontloader.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#include "qdeclarativefontloader_p.h" +#include "qquickfontloader_p.h" -#include -#include +#include +#include #include #include @@ -52,24 +52,24 @@ #include #include -#include -#include +#include +#include QT_BEGIN_NAMESPACE #define FONTLOADER_MAXIMUM_REDIRECT_RECURSION 16 -class QDeclarativeFontObject : public QObject +class QQuickFontObject : public QObject { Q_OBJECT public: - explicit QDeclarativeFontObject(int _id = -1); + explicit QQuickFontObject(int _id = -1); void download(const QUrl &url, QNetworkAccessManager *manager); Q_SIGNALS: - void fontDownloaded(const QString&, QDeclarativeFontLoader::Status); + void fontDownloaded(const QString&, QQuickFontLoader::Status); private Q_SLOTS: void replyFinished(); @@ -81,14 +81,14 @@ private Q_SLOTS: QNetworkReply *reply; int redirectCount; - Q_DISABLE_COPY(QDeclarativeFontObject) + Q_DISABLE_COPY(QQuickFontObject) }; -QDeclarativeFontObject::QDeclarativeFontObject(int _id) +QQuickFontObject::QQuickFontObject(int _id) : QObject(0), id(_id), reply(0), redirectCount(0) {} -void QDeclarativeFontObject::download(const QUrl &url, QNetworkAccessManager *manager) +void QQuickFontObject::download(const QUrl &url, QNetworkAccessManager *manager) { QNetworkRequest req(url); req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); @@ -96,7 +96,7 @@ void QDeclarativeFontObject::download(const QUrl &url, QNetworkAccessManager *ma QObject::connect(reply, SIGNAL(finished()), this, SLOT(replyFinished())); } -void QDeclarativeFontObject::replyFinished() +void QQuickFontObject::replyFinished() { if (reply) { redirectCount++; @@ -116,11 +116,11 @@ void QDeclarativeFontObject::replyFinished() if (!reply->error()) { id = QFontDatabase::addApplicationFontFromData(reply->readAll()); if (id != -1) - emit fontDownloaded(QFontDatabase::applicationFontFamilies(id).at(0), QDeclarativeFontLoader::Ready); + emit fontDownloaded(QFontDatabase::applicationFontFamilies(id).at(0), QQuickFontLoader::Ready); else - emit fontDownloaded(QString(), QDeclarativeFontLoader::Error); + emit fontDownloaded(QString(), QQuickFontLoader::Error); } else { - emit fontDownloaded(QString(), QDeclarativeFontLoader::Error); + emit fontDownloaded(QString(), QQuickFontLoader::Error); } reply->deleteLater(); reply = 0; @@ -128,23 +128,23 @@ void QDeclarativeFontObject::replyFinished() } -class QDeclarativeFontLoaderPrivate : public QObjectPrivate +class QQuickFontLoaderPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeFontLoader) + Q_DECLARE_PUBLIC(QQuickFontLoader) public: - QDeclarativeFontLoaderPrivate() : status(QDeclarativeFontLoader::Null) {} + QQuickFontLoaderPrivate() : status(QQuickFontLoader::Null) {} QUrl url; QString name; - QDeclarativeFontLoader::Status status; - static QHash fonts; + QQuickFontLoader::Status status; + static QHash fonts; }; -QHash QDeclarativeFontLoaderPrivate::fonts; +QHash QQuickFontLoaderPrivate::fonts; /*! - \qmlclass FontLoader QDeclarativeFontLoader + \qmlclass FontLoader QQuickFontLoader \inqmlmodule QtQuick 2 \ingroup qml-utility-elements \brief The FontLoader element allows fonts to be loaded by name or URL. @@ -169,12 +169,12 @@ QHash QDeclarativeFontLoaderPrivate::fonts; \sa {declarative/text/fonts}{Fonts example} */ -QDeclarativeFontLoader::QDeclarativeFontLoader(QObject *parent) - : QObject(*(new QDeclarativeFontLoaderPrivate), parent) +QQuickFontLoader::QQuickFontLoader(QObject *parent) + : QObject(*(new QQuickFontLoaderPrivate), parent) { } -QDeclarativeFontLoader::~QDeclarativeFontLoader() +QQuickFontLoader::~QQuickFontLoader() { } @@ -182,27 +182,27 @@ QDeclarativeFontLoader::~QDeclarativeFontLoader() \qmlproperty url QtQuick2::FontLoader::source The url of the font to load. */ -QUrl QDeclarativeFontLoader::source() const +QUrl QQuickFontLoader::source() const { - Q_D(const QDeclarativeFontLoader); + Q_D(const QQuickFontLoader); return d->url; } -void QDeclarativeFontLoader::setSource(const QUrl &url) +void QQuickFontLoader::setSource(const QUrl &url) { - Q_D(QDeclarativeFontLoader); + Q_D(QQuickFontLoader); if (url == d->url) return; d->url = url; emit sourceChanged(); - QString localFile = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(d->url); + QString localFile = QQmlEnginePrivate::urlToLocalFileOrQrc(d->url); if (!localFile.isEmpty()) { if (!d->fonts.contains(d->url)) { int id = QFontDatabase::addApplicationFont(localFile); if (id != -1) { updateFontInfo(QFontDatabase::applicationFontFamilies(id).at(0), Ready); - QDeclarativeFontObject *fo = new QDeclarativeFontObject(id); + QQuickFontObject *fo = new QQuickFontObject(id); d->fonts[d->url] = fo; } else { updateFontInfo(QString(), Error); @@ -212,20 +212,20 @@ void QDeclarativeFontLoader::setSource(const QUrl &url) } } else { if (!d->fonts.contains(d->url)) { - QDeclarativeFontObject *fo = new QDeclarativeFontObject; + QQuickFontObject *fo = new QQuickFontObject; d->fonts[d->url] = fo; fo->download(d->url, qmlEngine(this)->networkAccessManager()); d->status = Loading; emit statusChanged(); - QObject::connect(fo, SIGNAL(fontDownloaded(QString,QDeclarativeFontLoader::Status)), - this, SLOT(updateFontInfo(QString,QDeclarativeFontLoader::Status))); + QObject::connect(fo, SIGNAL(fontDownloaded(QString,QQuickFontLoader::Status)), + this, SLOT(updateFontInfo(QString,QQuickFontLoader::Status))); } else { - QDeclarativeFontObject *fo = d->fonts[d->url]; + QQuickFontObject *fo = d->fonts[d->url]; if (fo->id == -1) { d->status = Loading; emit statusChanged(); - QObject::connect(fo, SIGNAL(fontDownloaded(QString,QDeclarativeFontLoader::Status)), - this, SLOT(updateFontInfo(QString,QDeclarativeFontLoader::Status))); + QObject::connect(fo, SIGNAL(fontDownloaded(QString,QQuickFontLoader::Status)), + this, SLOT(updateFontInfo(QString,QQuickFontLoader::Status))); } else updateFontInfo(QFontDatabase::applicationFontFamilies(fo->id).at(0), Ready); @@ -233,9 +233,9 @@ void QDeclarativeFontLoader::setSource(const QUrl &url) } } -void QDeclarativeFontLoader::updateFontInfo(const QString& name, QDeclarativeFontLoader::Status status) +void QQuickFontLoader::updateFontInfo(const QString& name, QQuickFontLoader::Status status) { - Q_D(QDeclarativeFontLoader); + Q_D(QQuickFontLoader); if (name != d->name) { d->name = name; @@ -273,15 +273,15 @@ void QDeclarativeFontLoader::updateFontInfo(const QString& name, QDeclarativeFon } \endqml */ -QString QDeclarativeFontLoader::name() const +QString QQuickFontLoader::name() const { - Q_D(const QDeclarativeFontLoader); + Q_D(const QQuickFontLoader); return d->name; } -void QDeclarativeFontLoader::setName(const QString &name) +void QQuickFontLoader::setName(const QString &name) { - Q_D(QDeclarativeFontLoader); + Q_D(QQuickFontLoader); if (d->name == name) return; d->name = name; @@ -324,12 +324,12 @@ void QDeclarativeFontLoader::setName(const QString &name) \endqml \endlist */ -QDeclarativeFontLoader::Status QDeclarativeFontLoader::status() const +QQuickFontLoader::Status QQuickFontLoader::status() const { - Q_D(const QDeclarativeFontLoader); + Q_D(const QQuickFontLoader); return d->status; } QT_END_NAMESPACE -#include +#include diff --git a/src/quick/util/qdeclarativefontloader_p.h b/src/quick/util/qquickfontloader_p.h similarity index 81% rename from src/quick/util/qdeclarativefontloader_p.h rename to src/quick/util/qquickfontloader_p.h index 3cd75e1a46..191388df95 100644 --- a/src/quick/util/qdeclarativefontloader_p.h +++ b/src/quick/util/qquickfontloader_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEFONTLOADER_H -#define QDECLARATIVEFONTLOADER_H +#ifndef QQUICKFONTLOADER_H +#define QQUICKFONTLOADER_H -#include +#include #include #include @@ -51,11 +51,11 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeFontLoaderPrivate; -class Q_AUTOTEST_EXPORT QDeclarativeFontLoader : public QObject +class QQuickFontLoaderPrivate; +class Q_AUTOTEST_EXPORT QQuickFontLoader : public QObject { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeFontLoader) + Q_DECLARE_PRIVATE(QQuickFontLoader) Q_ENUMS(Status) Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) @@ -65,8 +65,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeFontLoader : public QObject public: enum Status { Null = 0, Ready, Loading, Error }; - QDeclarativeFontLoader(QObject *parent = 0); - ~QDeclarativeFontLoader(); + QQuickFontLoader(QObject *parent = 0); + ~QQuickFontLoader(); QUrl source() const; void setSource(const QUrl &url); @@ -77,7 +77,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeFontLoader : public QObject Status status() const; private Q_SLOTS: - void updateFontInfo(const QString&, QDeclarativeFontLoader::Status); + void updateFontInfo(const QString&, QQuickFontLoader::Status); Q_SIGNALS: void sourceChanged(); @@ -87,9 +87,9 @@ private Q_SLOTS: QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeFontLoader) +QML_DECLARE_TYPE(QQuickFontLoader) QT_END_HEADER -#endif // QDECLARATIVEFONTLOADER_H +#endif // QQUICKFONTLOADER_H diff --git a/src/quick/util/qdeclarativelistaccessor.cpp b/src/quick/util/qquicklistaccessor.cpp similarity index 75% rename from src/quick/util/qdeclarativelistaccessor.cpp rename to src/quick/util/qquicklistaccessor.cpp index ae60640328..532882a2f9 100644 --- a/src/quick/util/qdeclarativelistaccessor.cpp +++ b/src/quick/util/qquicklistaccessor.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,37 +39,37 @@ ** ****************************************************************************/ -#include "qdeclarativelistaccessor_p.h" +#include "qquicklistaccessor_p.h" -#include +#include #include #include // ### Remove me -#include +#include QT_BEGIN_NAMESPACE -QDeclarativeListAccessor::QDeclarativeListAccessor() +QQuickListAccessor::QQuickListAccessor() : m_type(Invalid) { } -QDeclarativeListAccessor::~QDeclarativeListAccessor() +QQuickListAccessor::~QQuickListAccessor() { } -QVariant QDeclarativeListAccessor::list() const +QVariant QQuickListAccessor::list() const { return d; } -void QDeclarativeListAccessor::setList(const QVariant &v, QDeclarativeEngine *engine) +void QQuickListAccessor::setList(const QVariant &v, QQmlEngine *engine) { d = v; - QDeclarativeEnginePrivate *enginePrivate = engine?QDeclarativeEnginePrivate::get(engine):0; + QQmlEnginePrivate *enginePrivate = engine?QQmlEnginePrivate::get(engine):0; if (!d.isValid()) { m_type = Invalid; @@ -79,19 +79,19 @@ void QDeclarativeListAccessor::setList(const QVariant &v, QDeclarativeEngine *en m_type = VariantList; } else if (d.canConvert(QVariant::Int)) { m_type = Integer; - } else if ((!enginePrivate && QDeclarativeMetaType::isQObject(d.userType())) || + } else if ((!enginePrivate && QQmlMetaType::isQObject(d.userType())) || (enginePrivate && enginePrivate->isQObject(d.userType()))) { - QObject *data = enginePrivate?enginePrivate->toQObject(v):QDeclarativeMetaType::toQObject(v); + QObject *data = enginePrivate?enginePrivate->toQObject(v):QQmlMetaType::toQObject(v); d = QVariant::fromValue(data); m_type = Instance; - } else if (d.userType() == qMetaTypeId()) { + } else if (d.userType() == qMetaTypeId()) { m_type = ListProperty; } else { m_type = Instance; } } -int QDeclarativeListAccessor::count() const +int QQuickListAccessor::count() const { switch(m_type) { case StringList: @@ -99,7 +99,7 @@ int QDeclarativeListAccessor::count() const case VariantList: return qvariant_cast(d).count(); case ListProperty: - return ((QDeclarativeListReference *)d.constData())->count(); + return ((QQmlListReference *)d.constData())->count(); case Instance: return 1; case Integer: @@ -110,7 +110,7 @@ int QDeclarativeListAccessor::count() const } } -QVariant QDeclarativeListAccessor::at(int idx) const +QVariant QQuickListAccessor::at(int idx) const { Q_ASSERT(idx >= 0 && idx < count()); switch(m_type) { @@ -119,7 +119,7 @@ QVariant QDeclarativeListAccessor::at(int idx) const case VariantList: return qvariant_cast(d).at(idx); case ListProperty: - return QVariant::fromValue(((QDeclarativeListReference *)d.constData())->at(idx)); + return QVariant::fromValue(((QQmlListReference *)d.constData())->at(idx)); case Instance: return d; case Integer: @@ -130,7 +130,7 @@ QVariant QDeclarativeListAccessor::at(int idx) const } } -bool QDeclarativeListAccessor::isValid() const +bool QQuickListAccessor::isValid() const { return m_type != Invalid; } diff --git a/src/quick/util/qdeclarativelistaccessor_p.h b/src/quick/util/qquicklistaccessor_p.h similarity index 84% rename from src/quick/util/qdeclarativelistaccessor_p.h rename to src/quick/util/qquicklistaccessor_p.h index 6fc589dec4..2b54c686bf 100644 --- a/src/quick/util/qdeclarativelistaccessor_p.h +++ b/src/quick/util/qquicklistaccessor_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVELISTACCESSOR_H -#define QDECLARATIVELISTACCESSOR_H +#ifndef QQUICKLISTACCESSOR_H +#define QQUICKLISTACCESSOR_H #include @@ -48,15 +48,15 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeEngine; -class Q_AUTOTEST_EXPORT QDeclarativeListAccessor +class QQmlEngine; +class Q_AUTOTEST_EXPORT QQuickListAccessor { public: - QDeclarativeListAccessor(); - ~QDeclarativeListAccessor(); + QQuickListAccessor(); + ~QQuickListAccessor(); QVariant list() const; - void setList(const QVariant &, QDeclarativeEngine * = 0); + void setList(const QVariant &, QQmlEngine * = 0); bool isValid() const; @@ -75,4 +75,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVELISTACCESSOR_H +#endif // QQUICKLISTACCESSOR_H diff --git a/src/quick/util/qdeclarativelistcompositor.cpp b/src/quick/util/qquicklistcompositor.cpp similarity index 80% rename from src/quick/util/qdeclarativelistcompositor.cpp rename to src/quick/util/qquicklistcompositor.cpp index 6011d6bc5d..d60fe5fb79 100644 --- a/src/quick/util/qdeclarativelistcompositor.cpp +++ b/src/quick/util/qquicklistcompositor.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,27 +39,27 @@ ** ****************************************************************************/ -#include "qdeclarativelistcompositor_p.h" +#include "qquicklistcompositor_p.h" #include -//#define QT_DECLARATIVE_VERIFY_MINIMAL -//#define QT_DECLARATIVE_VERIFY_INTEGRITY +//#define QT_QML_VERIFY_MINIMAL +//#define QT_QML_VERIFY_INTEGRITY QT_BEGIN_NAMESPACE -#ifdef QT_DECLARATIVE_VERIFY_MINIMAL -#define QT_DECLARATIVE_VERIFY_INTEGRITY +#ifdef QT_QML_VERIFY_MINIMAL +#define QT_QML_VERIFY_INTEGRITY static bool qt_verifyMinimal( - const QDeclarativeListCompositor::iterator &begin, - const QDeclarativeListCompositor::iterator &end) + const QQuickListCompositor::iterator &begin, + const QQuickListCompositor::iterator &end) { bool minimal = true; int index = 0; - for (const QDeclarativeListCompositor::Range *range = begin->next; range != *end; range = range->next, ++index) { + for (const QQuickListCompositor::Range *range = begin->next; range != *end; range = range->next, ++index) { if (range->previous->list == range->list - && range->previous->flags == (range->flags & ~QDeclarativeListCompositor::AppendFlag) + && range->previous->flags == (range->flags & ~QQuickListCompositor::AppendFlag) && range->previous->end() == range->index) { qWarning() << index << "Consecutive ranges"; qWarning() << *range->previous; @@ -73,22 +73,22 @@ static bool qt_verifyMinimal( #endif -#ifdef QT_DECLARATIVE_VERIFY_INTEGRITY -static bool qt_printInfo(const QDeclarativeListCompositor &compositor) +#ifdef QT_QML_VERIFY_INTEGRITY +static bool qt_printInfo(const QQuickListCompositor &compositor) { qWarning() << compositor; return true; } static bool qt_verifyIntegrity( - const QDeclarativeListCompositor::iterator &begin, - const QDeclarativeListCompositor::iterator &end, - const QDeclarativeListCompositor::iterator &cachedIt) + const QQuickListCompositor::iterator &begin, + const QQuickListCompositor::iterator &end, + const QQuickListCompositor::iterator &cachedIt) { bool valid = true; int index = 0; - QDeclarativeListCompositor::iterator it; + QQuickListCompositor::iterator it; for (it = begin; *it != *end; *it = it->next) { if (it->count == 0 && !it->append()) { qWarning() << index << "Empty non-append range"; @@ -98,7 +98,7 @@ static bool qt_verifyIntegrity( qWarning() << index << "Negative count"; valid = false; } - if (it->list && it->flags != QDeclarativeListCompositor::CacheFlag && it->index < 0) { + if (it->list && it->flags != QQuickListCompositor::CacheFlag && it->index < 0) { qWarning() << index <<"Negative index"; valid = false; } @@ -118,7 +118,7 @@ static bool qt_verifyIntegrity( if (groupIndex != cachedIt.index[i]) { qWarning() << index << "invalid cached index" - << QDeclarativeListCompositor::Group(i) + << QQuickListCompositor::Group(i) << "Expected:" << groupIndex << "Actual" @@ -142,21 +142,21 @@ static bool qt_verifyIntegrity( } #endif -#if defined(QT_DECLARATIVE_VERIFY_MINIMAL) -# define QT_DECLARATIVE_VERIFY_LISTCOMPOSITOR Q_ASSERT(!(!(qt_verifyIntegrity(iterator(m_ranges.next, 0, Default, m_groupCount), m_end, m_cacheIt) \ +#if defined(QT_QML_VERIFY_MINIMAL) +# define QT_QML_VERIFY_LISTCOMPOSITOR Q_ASSERT(!(!(qt_verifyIntegrity(iterator(m_ranges.next, 0, Default, m_groupCount), m_end, m_cacheIt) \ && qt_verifyMinimal(iterator(m_ranges.next, 0, Default, m_groupCount), m_end)) \ && qt_printInfo(*this))); -#elif defined(QT_DECLARATIVE_VERIFY_INTEGRITY) -# define QT_DECLARATIVE_VERIFY_LISTCOMPOSITOR Q_ASSERT(!(!qt_verifyIntegrity(iterator(m_ranges.next, 0, Default, m_groupCount), m_end, m_cacheIt) \ +#elif defined(QT_QML_VERIFY_INTEGRITY) +# define QT_QML_VERIFY_LISTCOMPOSITOR Q_ASSERT(!(!qt_verifyIntegrity(iterator(m_ranges.next, 0, Default, m_groupCount), m_end, m_cacheIt) \ && qt_printInfo(*this))); #else -# define QT_DECLARATIVE_VERIFY_LISTCOMPOSITOR +# define QT_QML_VERIFY_LISTCOMPOSITOR #endif -//#define QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(args) qDebug() << m_end.index[1] << m_end.index[0] << Q_FUNC_INFO args; -#define QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(args) +//#define QT_QML_TRACE_LISTCOMPOSITOR(args) qDebug() << m_end.index[1] << m_end.index[0] << Q_FUNC_INFO args; +#define QT_QML_TRACE_LISTCOMPOSITOR(args) -QDeclarativeListCompositor::iterator &QDeclarativeListCompositor::iterator::operator +=(int difference) +QQuickListCompositor::iterator &QQuickListCompositor::iterator::operator +=(int difference) { Q_ASSERT(difference >= 0); while (!(range->flags & groupFlag)) { @@ -176,7 +176,7 @@ QDeclarativeListCompositor::iterator &QDeclarativeListCompositor::iterator::oper return *this; } -QDeclarativeListCompositor::iterator &QDeclarativeListCompositor::iterator::operator -=(int difference) +QQuickListCompositor::iterator &QQuickListCompositor::iterator::operator -=(int difference) { Q_ASSERT(difference >= 0); while (!(range->flags & groupFlag)) { @@ -196,7 +196,7 @@ QDeclarativeListCompositor::iterator &QDeclarativeListCompositor::iterator::oper return *this; } -QDeclarativeListCompositor::insert_iterator &QDeclarativeListCompositor::insert_iterator::operator +=(int difference) +QQuickListCompositor::insert_iterator &QQuickListCompositor::insert_iterator::operator +=(int difference) { Q_ASSERT(difference >= 0); while (!(range->flags & groupFlag)) { @@ -219,7 +219,7 @@ QDeclarativeListCompositor::insert_iterator &QDeclarativeListCompositor::insert_ return *this; } -QDeclarativeListCompositor::insert_iterator &QDeclarativeListCompositor::insert_iterator::operator -=(int difference) +QQuickListCompositor::insert_iterator &QQuickListCompositor::insert_iterator::operator -=(int difference) { Q_ASSERT(difference >= 0); while (!(range->flags & groupFlag) && range->previous->flags) { @@ -248,7 +248,7 @@ QDeclarativeListCompositor::insert_iterator &QDeclarativeListCompositor::insert_ return *this; } -QDeclarativeListCompositor::QDeclarativeListCompositor() +QQuickListCompositor::QQuickListCompositor() : m_end(m_ranges.next, 0, Default, 2) , m_cacheIt(m_end) , m_groupCount(2) @@ -257,7 +257,7 @@ QDeclarativeListCompositor::QDeclarativeListCompositor() { } -QDeclarativeListCompositor::~QDeclarativeListCompositor() +QQuickListCompositor::~QQuickListCompositor() { for (Range *next, *range = m_ranges.next; range != &m_ranges; range = next) { next = range->next; @@ -265,13 +265,13 @@ QDeclarativeListCompositor::~QDeclarativeListCompositor() } } -inline QDeclarativeListCompositor::Range *QDeclarativeListCompositor::insert( +inline QQuickListCompositor::Range *QQuickListCompositor::insert( Range *before, void *list, int index, int count, uint flags) { return new Range(before, list, index, count, flags); } -inline QDeclarativeListCompositor::Range *QDeclarativeListCompositor::erase( +inline QQuickListCompositor::Range *QQuickListCompositor::erase( Range *range) { Range *next = range->next; @@ -281,21 +281,21 @@ inline QDeclarativeListCompositor::Range *QDeclarativeListCompositor::erase( return next; } -void QDeclarativeListCompositor::setGroupCount(int count) +void QQuickListCompositor::setGroupCount(int count) { m_groupCount = count; m_end = iterator(&m_ranges, 0, Default, m_groupCount); m_cacheIt = m_end; } -int QDeclarativeListCompositor::count(Group group) const +int QQuickListCompositor::count(Group group) const { return m_end.index[group]; } -QDeclarativeListCompositor::iterator QDeclarativeListCompositor::find(Group group, int index) +QQuickListCompositor::iterator QQuickListCompositor::find(Group group, int index) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< group << index) + QT_QML_TRACE_LISTCOMPOSITOR(<< group << index) Q_ASSERT(index >=0 && index < count(group)); if (m_cacheIt == m_end) { m_cacheIt = iterator(m_ranges.next, 0, group, m_groupCount); @@ -314,18 +314,18 @@ QDeclarativeListCompositor::iterator QDeclarativeListCompositor::find(Group grou } Q_ASSERT(m_cacheIt.index[group] == index); Q_ASSERT(m_cacheIt->inGroup(group)); - QT_DECLARATIVE_VERIFY_LISTCOMPOSITOR + QT_QML_VERIFY_LISTCOMPOSITOR return m_cacheIt; } -QDeclarativeListCompositor::iterator QDeclarativeListCompositor::find(Group group, int index) const +QQuickListCompositor::iterator QQuickListCompositor::find(Group group, int index) const { - return const_cast(this)->find(group, index); + return const_cast(this)->find(group, index); } -QDeclarativeListCompositor::insert_iterator QDeclarativeListCompositor::findInsertPosition(Group group, int index) +QQuickListCompositor::insert_iterator QQuickListCompositor::findInsertPosition(Group group, int index) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< group << index) + QT_QML_TRACE_LISTCOMPOSITOR(<< group << index) Q_ASSERT(index >=0 && index <= count(group)); insert_iterator it; if (m_cacheIt == m_end) { @@ -348,32 +348,32 @@ QDeclarativeListCompositor::insert_iterator QDeclarativeListCompositor::findInse return it; } -QDeclarativeListCompositor::iterator QDeclarativeListCompositor::begin(Group group) +QQuickListCompositor::iterator QQuickListCompositor::begin(Group group) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< group) + QT_QML_TRACE_LISTCOMPOSITOR(<< group) m_cacheIt = iterator(m_ranges.next, 0, group, m_groupCount); m_cacheIt += 0; return m_cacheIt; } -void QDeclarativeListCompositor::append( +void QQuickListCompositor::append( void *list, int index, int count, uint flags, QVector *inserts) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< list << index << count << flags) + QT_QML_TRACE_LISTCOMPOSITOR(<< list << index << count << flags) insert(m_end, list, index, count, flags, inserts); } -void QDeclarativeListCompositor::insert( +void QQuickListCompositor::insert( Group group, int before, void *list, int index, int count, uint flags, QVector *inserts) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< group << before << list << index << count << flags) + QT_QML_TRACE_LISTCOMPOSITOR(<< group << before << list << index << count << flags) insert(findInsertPosition(group, before), list, index, count, flags, inserts); } -QDeclarativeListCompositor::iterator QDeclarativeListCompositor::insert( +QQuickListCompositor::iterator QQuickListCompositor::insert( iterator before, void *list, int index, int count, uint flags, QVector *inserts) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< before << list << index << count << flags) + QT_QML_TRACE_LISTCOMPOSITOR(<< before << list << index << count << flags) if (inserts) { inserts->append(Insert(before, count, flags & GroupMask)); } @@ -407,21 +407,21 @@ QDeclarativeListCompositor::iterator QDeclarativeListCompositor::insert( m_end.incrementIndexes(count, flags); m_cacheIt = before; - QT_DECLARATIVE_VERIFY_LISTCOMPOSITOR + QT_QML_VERIFY_LISTCOMPOSITOR return before; } -void QDeclarativeListCompositor::setFlags( +void QQuickListCompositor::setFlags( Group fromGroup, int from, int count, Group group, int flags, QVector *inserts) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< group << index << count << flags) + QT_QML_TRACE_LISTCOMPOSITOR(<< group << index << count << flags) setFlags(find(fromGroup, from), count, group, flags, inserts); } -void QDeclarativeListCompositor::setFlags( +void QQuickListCompositor::setFlags( iterator from, int count, Group group, uint flags, QVector *inserts) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< from << count << flags) + QT_QML_TRACE_LISTCOMPOSITOR(<< from << count << flags) if (!flags || !count) return; @@ -490,20 +490,20 @@ void QDeclarativeListCompositor::setFlags( *from = erase(*from)->previous; } m_cacheIt = from; - QT_DECLARATIVE_VERIFY_LISTCOMPOSITOR + QT_QML_VERIFY_LISTCOMPOSITOR } -void QDeclarativeListCompositor::clearFlags( +void QQuickListCompositor::clearFlags( Group fromGroup, int from, int count, Group group, uint flags, QVector *removes) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< group << index << count << flags) + QT_QML_TRACE_LISTCOMPOSITOR(<< group << index << count << flags) clearFlags(find(fromGroup, from), count, group, flags, removes); } -void QDeclarativeListCompositor::clearFlags( +void QQuickListCompositor::clearFlags( iterator from, int count, Group group, uint flags, QVector *removes) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< from << count << flags) + QT_QML_TRACE_LISTCOMPOSITOR(<< from << count << flags) if (!flags || !count) return; @@ -577,12 +577,12 @@ void QDeclarativeListCompositor::clearFlags( *from = erase(*from)->previous; } m_cacheIt = from; - QT_DECLARATIVE_VERIFY_LISTCOMPOSITOR + QT_QML_VERIFY_LISTCOMPOSITOR } -void QDeclarativeListCompositor::removeList(void *list, QVector *removes, bool destroyed) +void QQuickListCompositor::removeList(void *list, QVector *removes, bool destroyed) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< list << destroyed) + QT_QML_TRACE_LISTCOMPOSITOR(<< list << destroyed) for (iterator it(m_ranges.next, 0, Default, m_groupCount); *it != &m_ranges; *it = it->next) { if (it->list == list) { const int flags = it->flags & (GroupMask | CacheFlag); @@ -603,10 +603,10 @@ void QDeclarativeListCompositor::removeList(void *list, QVector *removes } } m_cacheIt = m_end; - QT_DECLARATIVE_VERIFY_LISTCOMPOSITOR + QT_QML_VERIFY_LISTCOMPOSITOR } -bool QDeclarativeListCompositor::verifyMoveTo( +bool QQuickListCompositor::verifyMoveTo( Group fromGroup, int from, Group toGroup, int to, int count, Group group) const { if (group != toGroup) { @@ -631,7 +631,7 @@ bool QDeclarativeListCompositor::verifyMoveTo( return to >= 0 && to + count <= m_end.index[toGroup]; } -void QDeclarativeListCompositor::move( +void QQuickListCompositor::move( Group fromGroup, int from, Group toGroup, @@ -641,7 +641,7 @@ void QDeclarativeListCompositor::move( QVector *removes, QVector *inserts) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< fromGroup << from << toGroup << to << count) + QT_QML_TRACE_LISTCOMPOSITOR(<< fromGroup << from << toGroup << to << count) Q_ASSERT(count != 0); Q_ASSERT(from >=0 && from + count <= m_end.index[toGroup]); Q_ASSERT(verifyMoveTo(fromGroup, from, toGroup, to, count, group)); @@ -774,24 +774,24 @@ void QDeclarativeListCompositor::move( } m_cacheIt = toIt; - QT_DECLARATIVE_VERIFY_LISTCOMPOSITOR + QT_QML_VERIFY_LISTCOMPOSITOR } -void QDeclarativeListCompositor::clear() +void QQuickListCompositor::clear() { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR( ) + QT_QML_TRACE_LISTCOMPOSITOR( ) for (Range *range = m_ranges.next; range != &m_ranges; range = erase(range)) {} m_end = iterator(m_ranges.next, 0, Default, m_groupCount); m_cacheIt = m_end; } -void QDeclarativeListCompositor::listItemsInserted( +void QQuickListCompositor::listItemsInserted( QVector *translatedInsertions, void *list, - const QVector &insertions, + const QVector &insertions, const QVector *movedFlags) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< list << insertions) + QT_QML_TRACE_LISTCOMPOSITOR(<< list << insertions) for (iterator it(m_ranges.next, 0, Default, m_groupCount); *it != &m_ranges; *it = it->next) { if (it->list != list || it->flags == CacheFlag) { it.incrementIndexes(it->count); @@ -801,7 +801,7 @@ void QDeclarativeListCompositor::listItemsInserted( it.incrementIndexes(it->count); continue; } - foreach (const QDeclarativeChangeSet::Insert &insertion, insertions) { + foreach (const QQuickChangeSet::Insert &insertion, insertions) { int offset = insertion.index - it->index; if ((offset > 0 && offset < it->count) || (offset == 0 && it->prepend()) @@ -862,29 +862,29 @@ void QDeclarativeListCompositor::listItemsInserted( it.incrementIndexes(it->count); } m_cacheIt = m_end; - QT_DECLARATIVE_VERIFY_LISTCOMPOSITOR + QT_QML_VERIFY_LISTCOMPOSITOR } -void QDeclarativeListCompositor::listItemsInserted( +void QQuickListCompositor::listItemsInserted( void *list, int index, int count, QVector *translatedInsertions) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< list << index << count) + QT_QML_TRACE_LISTCOMPOSITOR(<< list << index << count) Q_ASSERT(count > 0); - QVector insertions; - insertions.append(QDeclarativeChangeSet::Insert(index, count)); + QVector insertions; + insertions.append(QQuickChangeSet::Insert(index, count)); listItemsInserted(translatedInsertions, list, insertions); } -void QDeclarativeListCompositor::listItemsRemoved( +void QQuickListCompositor::listItemsRemoved( QVector *translatedRemovals, void *list, - QVector *removals, - QVector *insertions, + QVector *removals, + QVector *insertions, QVector *movedFlags, int moveId) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< list << *removals) + QT_QML_TRACE_LISTCOMPOSITOR(<< list << *removals) for (iterator it(m_ranges.next, 0, Default, m_groupCount); *it != &m_ranges; *it = it->next) { if (it->list != list || it->flags == CacheFlag) { @@ -892,7 +892,7 @@ void QDeclarativeListCompositor::listItemsRemoved( continue; } bool removed = false; - for (QVector::iterator removal = removals->begin(); + for (QVector::iterator removal = removals->begin(); !removed && removal != removals->end(); ++removal) { int relativeIndex = removal->index - it->index; @@ -908,7 +908,7 @@ void QDeclarativeListCompositor::listItemsRemoved( translatedRemoval.index[i] += offset; } if (removal->isMove()) { - QVector::iterator insertion = insertions->begin(); + QVector::iterator insertion = insertions->begin(); for (; insertion != insertions->end() && insertion->moveId != removal->moveId; ++insertion) {} Q_ASSERT(insertion != insertions->end()); @@ -916,11 +916,11 @@ void QDeclarativeListCompositor::listItemsRemoved( if (relativeIndex < 0) { int splitMoveId = ++moveId; - removal = removals->insert(removal, QDeclarativeChangeSet::Remove( + removal = removals->insert(removal, QQuickChangeSet::Remove( removal->index, -relativeIndex, splitMoveId)); ++removal; removal->count -= -relativeIndex; - insertion = insertions->insert(insertion, QDeclarativeChangeSet::Insert( + insertion = insertions->insert(insertion, QQuickChangeSet::Insert( insertion->index, -relativeIndex, splitMoveId)); ++insertion; insertion->index += -relativeIndex; @@ -933,10 +933,10 @@ void QDeclarativeListCompositor::listItemsRemoved( movedFlags->append(MovedFlags(moveId, it->flags & ~AppendFlag)); if (removeCount < removal->count) { - removal = removals->insert(removal, QDeclarativeChangeSet::Remove( + removal = removals->insert(removal, QQuickChangeSet::Remove( removal->index, removeCount, translatedRemoval.moveId)); ++removal; - insertion = insertions->insert(insertion, QDeclarativeChangeSet::Insert( + insertion = insertions->insert(insertion, QQuickChangeSet::Insert( insertion->index, removeCount, translatedRemoval.moveId)); ++insertion; @@ -1013,21 +1013,21 @@ void QDeclarativeListCompositor::listItemsRemoved( } } m_cacheIt = m_end; - QT_DECLARATIVE_VERIFY_LISTCOMPOSITOR + QT_QML_VERIFY_LISTCOMPOSITOR } -void QDeclarativeListCompositor::listItemsRemoved( +void QQuickListCompositor::listItemsRemoved( void *list, int index, int count, QVector *translatedRemovals) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< list << index << count) + QT_QML_TRACE_LISTCOMPOSITOR(<< list << index << count) Q_ASSERT(count >= 0); - QVector removals; - removals.append(QDeclarativeChangeSet::Remove(index, count)); + QVector removals; + removals.append(QQuickChangeSet::Remove(index, count)); listItemsRemoved(translatedRemovals, list, &removals, 0, 0, 0); } -void QDeclarativeListCompositor::listItemsMoved( +void QQuickListCompositor::listItemsMoved( void *list, int from, int to, @@ -1035,25 +1035,25 @@ void QDeclarativeListCompositor::listItemsMoved( QVector *translatedRemovals, QVector *translatedInsertions) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< list << from << to << count) + QT_QML_TRACE_LISTCOMPOSITOR(<< list << from << to << count) Q_ASSERT(count >= 0); - QVector removals; - QVector insertions; + QVector removals; + QVector insertions; QVector movedFlags; - removals.append(QDeclarativeChangeSet::Remove(from, count, 0)); - insertions.append(QDeclarativeChangeSet::Insert(to, count, 0)); + removals.append(QQuickChangeSet::Remove(from, count, 0)); + insertions.append(QQuickChangeSet::Insert(to, count, 0)); listItemsRemoved(translatedRemovals, list, &removals, &insertions, &movedFlags, 0); listItemsInserted(translatedInsertions, list, insertions, &movedFlags); } -void QDeclarativeListCompositor::listItemsChanged( +void QQuickListCompositor::listItemsChanged( QVector *translatedChanges, void *list, - const QVector &changes) + const QVector &changes) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< list << changes) + QT_QML_TRACE_LISTCOMPOSITOR(<< list << changes) for (iterator it(m_ranges.next, 0, Default, m_groupCount); *it != &m_ranges; *it = it->next) { if (it->list != list || it->flags == CacheFlag) { it.incrementIndexes(it->count); @@ -1061,7 +1061,7 @@ void QDeclarativeListCompositor::listItemsChanged( } else if (!it->inGroup()) { continue; } - foreach (const QDeclarativeChangeSet::Change &change, changes) { + foreach (const QQuickChangeSet::Change &change, changes) { const int offset = change.index - it->index; if (offset + change.count > 0 && offset < it->count) { const int changeOffset = qMax(0, offset); @@ -1079,60 +1079,60 @@ void QDeclarativeListCompositor::listItemsChanged( } } -void QDeclarativeListCompositor::listItemsChanged( +void QQuickListCompositor::listItemsChanged( void *list, int index, int count, QVector *translatedChanges) { - QT_DECLARATIVE_TRACE_LISTCOMPOSITOR(<< list << index << count) + QT_QML_TRACE_LISTCOMPOSITOR(<< list << index << count) Q_ASSERT(count >= 0); - QVector changes; - changes.append(QDeclarativeChangeSet::Change(index, count)); + QVector changes; + changes.append(QQuickChangeSet::Change(index, count)); listItemsChanged(translatedChanges, list, changes); } -void QDeclarativeListCompositor::listChanged( +void QQuickListCompositor::listChanged( void *list, - const QDeclarativeChangeSet &changeSet, + const QQuickChangeSet &changeSet, QVector *translatedRemovals, QVector *translatedInsertions, QVector *translatedChanges) { - QVector removals = changeSet.removes(); - QVector insertions = changeSet.inserts(); + QVector removals = changeSet.removes(); + QVector insertions = changeSet.inserts(); QVector movedFlags; listItemsRemoved(translatedRemovals, list, &removals, &insertions, &movedFlags, changeSet.moveCounter()); listItemsInserted(translatedInsertions, list, insertions, &movedFlags); listItemsChanged(translatedChanges, list, changeSet.changes()); } -void QDeclarativeListCompositor::transition( +void QQuickListCompositor::transition( Group from, Group to, - QVector *removes, - QVector *inserts) + QVector *removes, + QVector *inserts) { int removeCount = 0; for (iterator it(m_ranges.next, 0, Default, m_groupCount); *it != &m_ranges; *it = it->next) { if (it == from && it != to) { - removes->append(QDeclarativeChangeSet::Remove(it.index[from]- removeCount, it->count)); + removes->append(QQuickChangeSet::Remove(it.index[from]- removeCount, it->count)); removeCount += it->count; } else if (it != from && it == to) { - inserts->append(QDeclarativeChangeSet::Insert(it.index[to], it->count)); + inserts->append(QQuickChangeSet::Insert(it.index[to], it->count)); } it.incrementIndexes(it->count); } } -QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::Group &group) +QDebug operator <<(QDebug debug, const QQuickListCompositor::Group &group) { switch (group) { - case QDeclarativeListCompositor::Cache: return debug << "Cache"; - case QDeclarativeListCompositor::Default: return debug << "Default"; + case QQuickListCompositor::Cache: return debug << "Cache"; + case QQuickListCompositor::Default: return debug << "Default"; default: return (debug.nospace() << "Group" << int(group)).space(); } } -QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::Range &range) +QDebug operator <<(QDebug debug, const QQuickListCompositor::Range &range) { (debug.nospace() << "Range(" @@ -1142,11 +1142,11 @@ QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::Range &range) << (range.isUnresolved() ? "U" : "0") << (range.append() ? "A" : "0") << (range.prepend() ? "P" : "0"); - for (int i = QDeclarativeListCompositor::MaximumGroupCount - 1; i >= 2; --i) + for (int i = QQuickListCompositor::MaximumGroupCount - 1; i >= 2; --i) debug << (range.inGroup(i) ? "1" : "0"); return (debug - << (range.inGroup(QDeclarativeListCompositor::Default) ? "D" : "0") - << (range.inGroup(QDeclarativeListCompositor::Cache) ? "C" : "0")); + << (range.inGroup(QQuickListCompositor::Default) ? "D" : "0") + << (range.inGroup(QQuickListCompositor::Cache) ? "C" : "0")); } static void qt_print_indexes(QDebug &debug, int count, const int *indexes) @@ -1155,50 +1155,50 @@ static void qt_print_indexes(QDebug &debug, int count, const int *indexes) debug << indexes[i]; } -QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::iterator &it) +QDebug operator <<(QDebug debug, const QQuickListCompositor::iterator &it) { (debug.nospace() << "iterator(" << it.group).space() << "offset:" << it.offset; qt_print_indexes(debug, it.groupCount, it.index); return ((debug << **it).nospace() << ")").space(); } -static QDebug qt_print_change(QDebug debug, const char *name, const QDeclarativeListCompositor::Change &change) +static QDebug qt_print_change(QDebug debug, const char *name, const QQuickListCompositor::Change &change) { debug.nospace() << name << "(" << change.moveId << " " << change.count << " "; - for (int i = QDeclarativeListCompositor::MaximumGroupCount - 1; i >= 2; --i) + for (int i = QQuickListCompositor::MaximumGroupCount - 1; i >= 2; --i) debug << (change.inGroup(i) ? "1" : "0"); - debug << (change.inGroup(QDeclarativeListCompositor::Default) ? "D" : "0") - << (change.inGroup(QDeclarativeListCompositor::Cache) ? "C" : "0"); - int i = QDeclarativeListCompositor::MaximumGroupCount - 1; + debug << (change.inGroup(QQuickListCompositor::Default) ? "D" : "0") + << (change.inGroup(QQuickListCompositor::Cache) ? "C" : "0"); + int i = QQuickListCompositor::MaximumGroupCount - 1; for (; i >= 0 && !change.inGroup(i); --i) {} for (; i >= 0; --i) debug << " " << change.index[i]; return (debug << ")").maybeSpace(); } -QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::Change &change) +QDebug operator <<(QDebug debug, const QQuickListCompositor::Change &change) { return qt_print_change(debug, "Change", change); } -QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::Remove &remove) +QDebug operator <<(QDebug debug, const QQuickListCompositor::Remove &remove) { return qt_print_change(debug, "Remove", remove); } -QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::Insert &insert) +QDebug operator <<(QDebug debug, const QQuickListCompositor::Insert &insert) { return qt_print_change(debug, "Insert", insert); } -QDebug operator <<(QDebug debug, const QDeclarativeListCompositor &list) +QDebug operator <<(QDebug debug, const QQuickListCompositor &list) { - int indexes[QDeclarativeListCompositor::MaximumGroupCount]; - for (int i = 0; i < QDeclarativeListCompositor::MaximumGroupCount; ++i) + int indexes[QQuickListCompositor::MaximumGroupCount]; + for (int i = 0; i < QQuickListCompositor::MaximumGroupCount; ++i) indexes[i] = 0; - debug.nospace() << "QDeclarativeListCompositor("; + debug.nospace() << "QQuickListCompositor("; qt_print_indexes(debug, list.m_groupCount, list.m_end.index); - for (QDeclarativeListCompositor::Range *range = list.m_ranges.next; range != &list.m_ranges; range = range->next) { + for (QQuickListCompositor::Range *range = list.m_ranges.next; range != &list.m_ranges; range = range->next) { (debug << "\n").space(); qt_print_indexes(debug, list.m_groupCount, indexes); debug << " " << *range; diff --git a/src/quick/util/qdeclarativelistcompositor_p.h b/src/quick/util/qquicklistcompositor_p.h similarity index 85% rename from src/quick/util/qdeclarativelistcompositor_p.h rename to src/quick/util/qquicklistcompositor_p.h index 4bee0dab69..b12ee8025f 100644 --- a/src/quick/util/qdeclarativelistcompositor_p.h +++ b/src/quick/util/qquicklistcompositor_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVELISTCOMPOSITOR_P_H -#define QDECLARATIVELISTCOMPOSITOR_P_H +#ifndef QQUICKLISTCOMPOSITOR_P_H +#define QQUICKLISTCOMPOSITOR_P_H // // W A R N I N G @@ -56,13 +56,13 @@ #include #include -#include +#include #include QT_BEGIN_NAMESPACE -class Q_AUTOTEST_EXPORT QDeclarativeListCompositor +class Q_AUTOTEST_EXPORT QQuickListCompositor { public: enum { MinimumGroupCount = 3, MaximumGroupCount = 11 }; @@ -209,8 +209,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeListCompositor : Change(it, count, flags, moveId) {} }; - QDeclarativeListCompositor(); - ~QDeclarativeListCompositor(); + QQuickListCompositor(); + ~QQuickListCompositor(); int defaultGroups() const { return m_defaultFlags & ~PrependFlag; } void setDefaultGroups(int groups) { m_defaultFlags = groups | PrependFlag; } @@ -266,7 +266,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeListCompositor void listItemsChanged(void *list, int index, int count, QVector *changes); void listChanged( void *list, - const QDeclarativeChangeSet &changeSet, + const QQuickChangeSet &changeSet, QVector *removals, QVector *inserts, QVector *changes); @@ -274,8 +274,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeListCompositor void transition( Group from, Group to, - QVector *removes, - QVector *inserts); + QVector *removes, + QVector *inserts); private: Range m_ranges; @@ -300,26 +300,26 @@ class Q_AUTOTEST_EXPORT QDeclarativeListCompositor void listItemsRemoved( QVector *translatedRemovals, void *list, - QVector *removals, - QVector *insertions = 0, + QVector *removals, + QVector *insertions = 0, QVector *movedFlags = 0, int moveId = 0); void listItemsInserted( QVector *translatedInsertions, void *list, - const QVector &insertions, + const QVector &insertions, const QVector *movedFlags = 0); void listItemsChanged( QVector *translatedChanges, void *list, - const QVector &changes); + const QVector &changes); - friend Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeListCompositor &list); + friend Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickListCompositor &list); }; -inline QDeclarativeListCompositor::iterator::iterator() +inline QQuickListCompositor::iterator::iterator() : range(0), offset(0), group(Default), groupCount(0) {} -inline QDeclarativeListCompositor::iterator::iterator(const iterator &it) +inline QQuickListCompositor::iterator::iterator(const iterator &it) : range(it.range) , offset(it.offset) , group(it.group) @@ -330,7 +330,7 @@ inline QDeclarativeListCompositor::iterator::iterator(const iterator &it) index[i] = it.index[i]; } -inline QDeclarativeListCompositor::iterator::iterator( +inline QQuickListCompositor::iterator::iterator( Range *range, int offset, Group group, int groupCount) : range(range) , offset(offset) @@ -342,7 +342,7 @@ inline QDeclarativeListCompositor::iterator::iterator( index[i] = 0; } -inline void QDeclarativeListCompositor::iterator::incrementIndexes(int difference, uint flags) +inline void QQuickListCompositor::iterator::incrementIndexes(int difference, uint flags) { for (int i = 0; i < groupCount; ++i) { if (flags & (1 << i)) @@ -350,7 +350,7 @@ inline void QDeclarativeListCompositor::iterator::incrementIndexes(int differenc } } -inline void QDeclarativeListCompositor::iterator::decrementIndexes(int difference, uint flags) +inline void QQuickListCompositor::iterator::decrementIndexes(int difference, uint flags) { for (int i = 0; i < groupCount; ++i) { if (flags & (1 << i)) @@ -358,24 +358,24 @@ inline void QDeclarativeListCompositor::iterator::decrementIndexes(int differenc } } -inline QDeclarativeListCompositor::insert_iterator::insert_iterator( +inline QQuickListCompositor::insert_iterator::insert_iterator( Range *range, int offset, Group group, int groupCount) : iterator(range, offset, group, groupCount) {} -inline QDeclarativeListCompositor::Change::Change(iterator it, int count, uint flags, int moveId) +inline QQuickListCompositor::Change::Change(iterator it, int count, uint flags, int moveId) : count(count), flags(flags), moveId(moveId) { for (int i = 0; i < MaximumGroupCount; ++i) index[i] = it.index[i]; } -Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::Group &group); -Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::Range &range); -Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::iterator &it); -Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::Change &change); -Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::Remove &remove); -Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeListCompositor::Insert &insert); -Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QDeclarativeListCompositor &list); +Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickListCompositor::Group &group); +Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickListCompositor::Range &range); +Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickListCompositor::iterator &it); +Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickListCompositor::Change &change); +Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickListCompositor::Remove &remove); +Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickListCompositor::Insert &insert); +Q_AUTOTEST_EXPORT QDebug operator <<(QDebug debug, const QQuickListCompositor &list); QT_END_NAMESPACE diff --git a/src/quick/util/qdeclarativepackage.cpp b/src/quick/util/qquickpackage.cpp similarity index 66% rename from src/quick/util/qdeclarativepackage.cpp rename to src/quick/util/qquickpackage.cpp index c6504ffea4..1939de62e1 100644 --- a/src/quick/util/qdeclarativepackage.cpp +++ b/src/quick/util/qquickpackage.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#include "qdeclarativepackage_p.h" +#include "qquickpackage_p.h" #include -#include +#include QT_BEGIN_NAMESPACE /*! - \qmlclass Package QDeclarativePackage + \qmlclass Package QQuickPackage \inqmlmodule QtQuick 2 \ingroup qml-working-with-data \brief Package provides a collection of named items. @@ -72,7 +72,7 @@ QT_BEGIN_NAMESPACE \snippet examples/declarative/modelviews/package/view.qml 0 - \sa {declarative/modelviews/package}{Package example}, {declarative/photoviewer}{Photo Viewer example}, QtDeclarative + \sa {declarative/modelviews/package}{Package example}, {declarative/photoviewer}{Photo Viewer example}, QtQml */ /*! @@ -81,14 +81,14 @@ QT_BEGIN_NAMESPACE */ -class QDeclarativePackagePrivate : public QObjectPrivate +class QQuickPackagePrivate : public QObjectPrivate { public: - QDeclarativePackagePrivate() {} + QQuickPackagePrivate() {} - struct DataGuard : public QDeclarativeGuard + struct DataGuard : public QQmlGuard { - DataGuard(QObject *obj, QList *l) : list(l) { (QDeclarativeGuard&)*this = obj; } + DataGuard(QObject *obj, QList *l) : list(l) { (QQmlGuard&)*this = obj; } QList *list; void objectDestroyed(QObject *) { // we assume priv will always be destroyed after objectDestroyed calls @@ -97,91 +97,91 @@ class QDeclarativePackagePrivate : public QObjectPrivate }; QList dataList; - static void data_append(QDeclarativeListProperty *prop, QObject *o) { + static void data_append(QQmlListProperty *prop, QObject *o) { QList *list = static_cast *>(prop->data); list->append(DataGuard(o, list)); } - static void data_clear(QDeclarativeListProperty *prop) { + static void data_clear(QQmlListProperty *prop) { QList *list = static_cast *>(prop->data); list->clear(); } - static QObject *data_at(QDeclarativeListProperty *prop, int index) { + static QObject *data_at(QQmlListProperty *prop, int index) { QList *list = static_cast *>(prop->data); return list->at(index); } - static int data_count(QDeclarativeListProperty *prop) { + static int data_count(QQmlListProperty *prop) { QList *list = static_cast *>(prop->data); return list->count(); } }; -QHash QDeclarativePackageAttached::attached; +QHash QQuickPackageAttached::attached; -QDeclarativePackageAttached::QDeclarativePackageAttached(QObject *parent) +QQuickPackageAttached::QQuickPackageAttached(QObject *parent) : QObject(parent) { attached.insert(parent, this); } -QDeclarativePackageAttached::~QDeclarativePackageAttached() +QQuickPackageAttached::~QQuickPackageAttached() { attached.remove(parent()); } -QString QDeclarativePackageAttached::name() const +QString QQuickPackageAttached::name() const { return _name; } -void QDeclarativePackageAttached::setName(const QString &n) +void QQuickPackageAttached::setName(const QString &n) { _name = n; } -QDeclarativePackage::QDeclarativePackage(QObject *parent) - : QObject(*(new QDeclarativePackagePrivate), parent) +QQuickPackage::QQuickPackage(QObject *parent) + : QObject(*(new QQuickPackagePrivate), parent) { } -QDeclarativePackage::~QDeclarativePackage() +QQuickPackage::~QQuickPackage() { - Q_D(QDeclarativePackage); + Q_D(QQuickPackage); for (int ii = 0; ii < d->dataList.count(); ++ii) { QObject *obj = d->dataList.at(ii); obj->setParent(this); } } -QDeclarativeListProperty QDeclarativePackage::data() +QQmlListProperty QQuickPackage::data() { - Q_D(QDeclarativePackage); - return QDeclarativeListProperty(this, &d->dataList, QDeclarativePackagePrivate::data_append, - QDeclarativePackagePrivate::data_count, - QDeclarativePackagePrivate::data_at, - QDeclarativePackagePrivate::data_clear); + Q_D(QQuickPackage); + return QQmlListProperty(this, &d->dataList, QQuickPackagePrivate::data_append, + QQuickPackagePrivate::data_count, + QQuickPackagePrivate::data_at, + QQuickPackagePrivate::data_clear); } -bool QDeclarativePackage::hasPart(const QString &name) +bool QQuickPackage::hasPart(const QString &name) { - Q_D(QDeclarativePackage); + Q_D(QQuickPackage); for (int ii = 0; ii < d->dataList.count(); ++ii) { QObject *obj = d->dataList.at(ii); - QDeclarativePackageAttached *a = QDeclarativePackageAttached::attached.value(obj); + QQuickPackageAttached *a = QQuickPackageAttached::attached.value(obj); if (a && a->name() == name) return true; } return false; } -QObject *QDeclarativePackage::part(const QString &name) +QObject *QQuickPackage::part(const QString &name) { - Q_D(QDeclarativePackage); + Q_D(QQuickPackage); if (name.isEmpty() && !d->dataList.isEmpty()) return d->dataList.at(0); for (int ii = 0; ii < d->dataList.count(); ++ii) { QObject *obj = d->dataList.at(ii); - QDeclarativePackageAttached *a = QDeclarativePackageAttached::attached.value(obj); + QQuickPackageAttached *a = QQuickPackageAttached::attached.value(obj); if (a && a->name() == name) return obj; } @@ -192,9 +192,9 @@ QObject *QDeclarativePackage::part(const QString &name) return 0; } -QDeclarativePackageAttached *QDeclarativePackage::qmlAttachedProperties(QObject *o) +QQuickPackageAttached *QQuickPackage::qmlAttachedProperties(QObject *o) { - return new QDeclarativePackageAttached(o); + return new QQuickPackageAttached(o); } diff --git a/src/quick/util/qdeclarativepackage_p.h b/src/quick/util/qquickpackage_p.h similarity index 68% rename from src/quick/util/qdeclarativepackage_p.h rename to src/quick/util/qquickpackage_p.h index ad164bc329..9f16521763 100644 --- a/src/quick/util/qdeclarativepackage_p.h +++ b/src/quick/util/qquickpackage_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,58 +39,58 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPACKAGE_H -#define QDECLARATIVEPACKAGE_H +#ifndef QQUICKPACKAGE_H +#define QQUICKPACKAGE_H -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativePackagePrivate; -class QDeclarativePackageAttached; -class Q_AUTOTEST_EXPORT QDeclarativePackage : public QObject +class QQuickPackagePrivate; +class QQuickPackageAttached; +class Q_AUTOTEST_EXPORT QQuickPackage : public QObject { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativePackage) + Q_DECLARE_PRIVATE(QQuickPackage) Q_CLASSINFO("DefaultProperty", "data") - Q_PROPERTY(QDeclarativeListProperty data READ data) + Q_PROPERTY(QQmlListProperty data READ data) public: - QDeclarativePackage(QObject *parent=0); - virtual ~QDeclarativePackage(); + QQuickPackage(QObject *parent=0); + virtual ~QQuickPackage(); - QDeclarativeListProperty data(); + QQmlListProperty data(); QObject *part(const QString & = QString()); bool hasPart(const QString &); - static QDeclarativePackageAttached *qmlAttachedProperties(QObject *); + static QQuickPackageAttached *qmlAttachedProperties(QObject *); }; -class QDeclarativePackageAttached : public QObject +class QQuickPackageAttached : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName) public: - QDeclarativePackageAttached(QObject *parent); - virtual ~QDeclarativePackageAttached(); + QQuickPackageAttached(QObject *parent); + virtual ~QQuickPackageAttached(); QString name() const; void setName(const QString &n); - static QHash attached; + static QHash attached; private: QString _name; }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativePackage) -QML_DECLARE_TYPEINFO(QDeclarativePackage, QML_HAS_ATTACHED_PROPERTIES) +QML_DECLARE_TYPE(QQuickPackage) +QML_DECLARE_TYPEINFO(QQuickPackage, QML_HAS_ATTACHED_PROPERTIES) QT_END_HEADER -#endif // QDECLARATIVEPACKAGE_H +#endif // QQUICKPACKAGE_H diff --git a/src/quick/util/qdeclarativepath.cpp b/src/quick/util/qquickpath.cpp similarity index 82% rename from src/quick/util/qdeclarativepath.cpp rename to src/quick/util/qquickpath.cpp index 2ee534880c..b6a01bfe3e 100644 --- a/src/quick/util/qdeclarativepath.cpp +++ b/src/quick/util/qquickpath.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include "qdeclarativepath_p.h" -#include "qdeclarativepath_p_p.h" -#include "qdeclarativesvgparser_p.h" +#include "qquickpath_p.h" +#include "qquickpath_p_p.h" +#include "qquicksvgparser_p.h" #include #include @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE /*! - \qmlclass PathElement QDeclarativePathElement + \qmlclass PathElement QQuickPathElement \inqmlmodule QtQuick 2 \ingroup qml-view-elements \brief PathElement is the base path type. @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlclass Path QDeclarativePath + \qmlclass Path QQuickPath \inqmlmodule QtQuick 2 \ingroup qml-view-elements \brief A Path object defines a path for use by \l PathView. @@ -81,12 +81,12 @@ QT_BEGIN_NAMESPACE \sa PathView, PathAttribute, PathPercent, PathLine, PathQuad, PathCubic, PathArc, PathCurve, PathSvg */ -QDeclarativePath::QDeclarativePath(QObject *parent) - : QObject(*(new QDeclarativePathPrivate), parent) +QQuickPath::QQuickPath(QObject *parent) + : QObject(*(new QQuickPathPrivate), parent) { } -QDeclarativePath::~QDeclarativePath() +QQuickPath::~QQuickPath() { } @@ -95,15 +95,15 @@ QDeclarativePath::~QDeclarativePath() \qmlproperty real QtQuick2::Path::startY These properties hold the starting position of the path. */ -qreal QDeclarativePath::startX() const +qreal QQuickPath::startX() const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); return d->startX.isNull ? 0 : d->startX.value; } -void QDeclarativePath::setStartX(qreal x) +void QQuickPath::setStartX(qreal x) { - Q_D(QDeclarativePath); + Q_D(QQuickPath); if (d->startX.isValid() && qFuzzyCompare(x, d->startX)) return; d->startX = x; @@ -111,21 +111,21 @@ void QDeclarativePath::setStartX(qreal x) processPath(); } -bool QDeclarativePath::hasStartX() const +bool QQuickPath::hasStartX() const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); return d->startX.isValid(); } -qreal QDeclarativePath::startY() const +qreal QQuickPath::startY() const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); return d->startY.isNull ? 0 : d->startY.value; } -void QDeclarativePath::setStartY(qreal y) +void QQuickPath::setStartY(qreal y) { - Q_D(QDeclarativePath); + Q_D(QQuickPath); if (d->startY.isValid() && qFuzzyCompare(y, d->startY)) return; d->startY = y; @@ -133,9 +133,9 @@ void QDeclarativePath::setStartY(qreal y) processPath(); } -bool QDeclarativePath::hasStartY() const +bool QQuickPath::hasStartY() const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); return d->startY.isValid(); } @@ -143,17 +143,17 @@ bool QDeclarativePath::hasStartY() const \qmlproperty bool QtQuick2::Path::closed This property holds whether the start and end of the path are identical. */ -bool QDeclarativePath::isClosed() const +bool QQuickPath::isClosed() const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); return d->closed; } -bool QDeclarativePath::hasEnd() const +bool QQuickPath::hasEnd() const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); for (int i = d->_pathElements.count() - 1; i > -1; --i) { - if (QDeclarativeCurve *curve = qobject_cast(d->_pathElements.at(i))) { + if (QQuickCurve *curve = qobject_cast(d->_pathElements.at(i))) { if ((!curve->hasX() && !curve->hasRelativeX()) || (!curve->hasY() && !curve->hasRelativeY())) return false; else @@ -181,22 +181,22 @@ bool QDeclarativePath::hasEnd() const \i \l PathPercent - a way to spread out items along various segments of the path. \endlist - \snippet doc/src/snippets/declarative/pathview/pathattributes.qml 2 + \snippet doc/src/snippets/qml/pathview/pathattributes.qml 2 */ -QDeclarativeListProperty QDeclarativePath::pathElements() +QQmlListProperty QQuickPath::pathElements() { - Q_D(QDeclarativePath); - return QDeclarativeListProperty(this, d->_pathElements); + Q_D(QQuickPath); + return QQmlListProperty(this, d->_pathElements); } -void QDeclarativePath::interpolate(int idx, const QString &name, qreal value) +void QQuickPath::interpolate(int idx, const QString &name, qreal value) { - Q_D(QDeclarativePath); + Q_D(QQuickPath); interpolate(d->_attributePoints, idx, name, value); } -void QDeclarativePath::interpolate(QList &attributePoints, int idx, const QString &name, qreal value) +void QQuickPath::interpolate(QList &attributePoints, int idx, const QString &name, qreal value) { if (!idx) return; @@ -226,9 +226,9 @@ void QDeclarativePath::interpolate(QList &attributePoints, int i } } -void QDeclarativePath::endpoint(const QString &name) +void QQuickPath::endpoint(const QString &name) { - Q_D(QDeclarativePath); + Q_D(QQuickPath); const AttributePoint &first = d->_attributePoints.first(); qreal val = first.values.value(name); for (int ii = d->_attributePoints.count() - 1; ii >= 0; ii--) { @@ -243,7 +243,7 @@ void QDeclarativePath::endpoint(const QString &name) } } -void QDeclarativePath::endpoint(QList &attributePoints, const QString &name) +void QQuickPath::endpoint(QList &attributePoints, const QString &name) { const AttributePoint &first = attributePoints.first(); qreal val = first.values.value(name); @@ -261,9 +261,9 @@ void QDeclarativePath::endpoint(QList &attributePoints, const QS static QString percentString(QLatin1String("_qfx_percent")); -void QDeclarativePath::processPath() +void QQuickPath::processPath() { - Q_D(QDeclarativePath); + Q_D(QQuickPath); if (!d->componentComplete) return; @@ -276,9 +276,9 @@ void QDeclarativePath::processPath() emit changed(); } -QPainterPath QDeclarativePath::createPath(const QPointF &startPoint, const QPointF &endPoint, const QStringList &attributes, qreal &pathLength, QList &attributePoints, bool *closed) +QPainterPath QQuickPath::createPath(const QPointF &startPoint, const QPointF &endPoint, const QStringList &attributes, qreal &pathLength, QList &attributePoints, bool *closed) { - Q_D(QDeclarativePath); + Q_D(QQuickPath); pathLength = 0; attributePoints.clear(); @@ -299,9 +299,9 @@ QPainterPath QDeclarativePath::createPath(const QPointF &startPoint, const QPoin bool usesPercent = false; int index = 0; - foreach (QDeclarativePathElement *pathElement, d->_pathElements) { - if (QDeclarativeCurve *curve = qobject_cast(pathElement)) { - QDeclarativePathData data; + foreach (QQuickPathElement *pathElement, d->_pathElements) { + if (QQuickCurve *curve = qobject_cast(pathElement)) { + QQuickPathData data; data.index = index; data.endPoint = endPoint; data.curves = d->_pathCurves; @@ -310,11 +310,11 @@ QPainterPath QDeclarativePath::createPath(const QPointF &startPoint, const QPoin p.origpercent = path.length(); attributePoints << p; ++index; - } else if (QDeclarativePathAttribute *attribute = qobject_cast(pathElement)) { + } else if (QQuickPathAttribute *attribute = qobject_cast(pathElement)) { AttributePoint &point = attributePoints.last(); point.values[attribute->name()] = attribute->value(); interpolate(attributePoints, attributePoints.count() - 1, attribute->name(), attribute->value()); - } else if (QDeclarativePathPercent *percent = qobject_cast(pathElement)) { + } else if (QQuickPathPercent *percent = qobject_cast(pathElement)) { AttributePoint &point = attributePoints.last(); point.values[percentString] = percent->value(); interpolate(attributePoints, attributePoints.count() - 1, percentString, percent->value()); @@ -340,7 +340,7 @@ QPainterPath QDeclarativePath::createPath(const QPointF &startPoint, const QPoin qreal prevorigpercent = 0; for (int ii = 0; ii < attributePoints.count(); ++ii) { const AttributePoint &point = attributePoints.at(ii); - if (point.values.contains(percentString)) { //special string for QDeclarativePathPercent + if (point.values.contains(percentString)) { //special string for QQuickPathPercent if ( ii > 0) { qreal scale = (attributePoints[ii].origpercent/length - prevorigpercent) / (point.values.value(percentString)-prevpercent); @@ -365,51 +365,51 @@ QPainterPath QDeclarativePath::createPath(const QPointF &startPoint, const QPoin return path; } -void QDeclarativePath::classBegin() +void QQuickPath::classBegin() { - Q_D(QDeclarativePath); + Q_D(QQuickPath); d->componentComplete = false; } -void QDeclarativePath::componentComplete() +void QQuickPath::componentComplete() { - Q_D(QDeclarativePath); + Q_D(QQuickPath); QSet attrs; d->componentComplete = true; // First gather up all the attributes - foreach (QDeclarativePathElement *pathElement, d->_pathElements) { - if (QDeclarativeCurve *curve = - qobject_cast(pathElement)) + foreach (QQuickPathElement *pathElement, d->_pathElements) { + if (QQuickCurve *curve = + qobject_cast(pathElement)) d->_pathCurves.append(curve); - else if (QDeclarativePathAttribute *attribute = - qobject_cast(pathElement)) + else if (QQuickPathAttribute *attribute = + qobject_cast(pathElement)) attrs.insert(attribute->name()); } d->_attributes = attrs.toList(); processPath(); - foreach (QDeclarativePathElement *pathElement, d->_pathElements) + foreach (QQuickPathElement *pathElement, d->_pathElements) connect(pathElement, SIGNAL(changed()), this, SLOT(processPath())); } -QPainterPath QDeclarativePath::path() const +QPainterPath QQuickPath::path() const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); return d->_path; } -QStringList QDeclarativePath::attributes() const +QStringList QQuickPath::attributes() const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); if (!d->componentComplete) { QSet attrs; // First gather up all the attributes - foreach (QDeclarativePathElement *pathElement, d->_pathElements) { - if (QDeclarativePathAttribute *attribute = - qobject_cast(pathElement)) + foreach (QQuickPathElement *pathElement, d->_pathElements) { + if (QQuickPathAttribute *attribute = + qobject_cast(pathElement)) attrs.insert(attribute->name()); } return attrs.toList(); @@ -461,9 +461,9 @@ static inline qreal slopeAt(qreal t, qreal a, qreal b, qreal c, qreal d) return 3*t*t*(d - 3*c + 3*b - a) + 6*t*(c - 2*b + a) + 3*(b - a); } -void QDeclarativePath::createPointCache() const +void QQuickPath::createPointCache() const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); qreal pathLength = d->pathLength; if (pathLength <= 0 || qIsNaN(pathLength)) return; @@ -513,19 +513,19 @@ void QDeclarativePath::createPointCache() const } } -void QDeclarativePath::invalidateSequentialHistory() const +void QQuickPath::invalidateSequentialHistory() const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); d->prevBez.isValid = false; } -QPointF QDeclarativePath::sequentialPointAt(qreal p, qreal *angle) const +QPointF QQuickPath::sequentialPointAt(qreal p, qreal *angle) const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); return sequentialPointAt(d->_path, d->pathLength, d->_attributePoints, d->prevBez, p, angle); } -QPointF QDeclarativePath::sequentialPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QDeclarativeCachedBezier &prevBez, qreal p, qreal *angle) +QPointF QQuickPath::sequentialPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle) { if (!prevBez.isValid) return p > .5 ? backwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle) : @@ -535,7 +535,7 @@ QPointF QDeclarativePath::sequentialPointAt(const QPainterPath &path, const qrea forwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle); } -QPointF QDeclarativePath::forwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QDeclarativeCachedBezier &prevBez, qreal p, qreal *angle) +QPointF QQuickPath::forwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle) { if (pathLength <= 0 || qIsNaN(pathLength)) return path.pointAtPercent(0); //expensive? @@ -591,7 +591,7 @@ QPointF QDeclarativePath::forwardsPointAt(const QPainterPath &path, const qreal } //ideally this should be merged with forwardsPointAt -QPointF QDeclarativePath::backwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QDeclarativeCachedBezier &prevBez, qreal p, qreal *angle) +QPointF QQuickPath::backwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle) { if (pathLength <= 0 || qIsNaN(pathLength)) return path.pointAtPercent(0); @@ -646,9 +646,9 @@ QPointF QDeclarativePath::backwardsPointAt(const QPainterPath &path, const qreal return QPointF(0,0); } -QPointF QDeclarativePath::pointAt(qreal p) const +QPointF QQuickPath::pointAt(qreal p) const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); if (d->_pointCache.isEmpty()) { createPointCache(); if (d->_pointCache.isEmpty()) @@ -681,9 +681,9 @@ QPointF QDeclarativePath::pointAt(qreal p) const return pos; } -qreal QDeclarativePath::attributeAt(const QString &name, qreal percent) const +qreal QQuickPath::attributeAt(const QString &name, qreal percent) const { - Q_D(const QDeclarativePath); + Q_D(const QQuickPath); if (percent < 0 || percent > 1) return 0; @@ -709,12 +709,12 @@ qreal QDeclarativePath::attributeAt(const QString &name, qreal percent) const /****************************************************************************/ -qreal QDeclarativeCurve::x() const +qreal QQuickCurve::x() const { return _x.isNull ? 0 : _x.value; } -void QDeclarativeCurve::setX(qreal x) +void QQuickCurve::setX(qreal x) { if (_x.isNull || _x != x) { _x = x; @@ -723,17 +723,17 @@ void QDeclarativeCurve::setX(qreal x) } } -bool QDeclarativeCurve::hasX() +bool QQuickCurve::hasX() { return _x.isValid(); } -qreal QDeclarativeCurve::y() const +qreal QQuickCurve::y() const { return _y.isNull ? 0 : _y.value; } -void QDeclarativeCurve::setY(qreal y) +void QQuickCurve::setY(qreal y) { if (_y.isNull || _y != y) { _y = y; @@ -742,17 +742,17 @@ void QDeclarativeCurve::setY(qreal y) } } -bool QDeclarativeCurve::hasY() +bool QQuickCurve::hasY() { return _y.isValid(); } -qreal QDeclarativeCurve::relativeX() const +qreal QQuickCurve::relativeX() const { return _relativeX; } -void QDeclarativeCurve::setRelativeX(qreal x) +void QQuickCurve::setRelativeX(qreal x) { if (_relativeX.isNull || _relativeX != x) { _relativeX = x; @@ -761,17 +761,17 @@ void QDeclarativeCurve::setRelativeX(qreal x) } } -bool QDeclarativeCurve::hasRelativeX() +bool QQuickCurve::hasRelativeX() { return _relativeX.isValid(); } -qreal QDeclarativeCurve::relativeY() const +qreal QQuickCurve::relativeY() const { return _relativeY; } -void QDeclarativeCurve::setRelativeY(qreal y) +void QQuickCurve::setRelativeY(qreal y) { if (_relativeY.isNull || _relativeY != y) { _relativeY = y; @@ -780,7 +780,7 @@ void QDeclarativeCurve::setRelativeY(qreal y) } } -bool QDeclarativeCurve::hasRelativeY() +bool QQuickCurve::hasRelativeY() { return _relativeY.isValid(); } @@ -788,7 +788,7 @@ bool QDeclarativeCurve::hasRelativeY() /****************************************************************************/ /*! - \qmlclass PathAttribute QDeclarativePathAttribute + \qmlclass PathAttribute QQuickPathAttribute \inqmlmodule QtQuick 2 \ingroup qml-view-elements \brief The PathAttribute allows setting an attribute at a given position in a Path. @@ -810,7 +810,7 @@ bool QDeclarativeCurve::hasRelativeY() \row \o \image declarative-pathattribute.png \o - \snippet doc/src/snippets/declarative/pathview/pathattributes.qml 0 + \snippet doc/src/snippets/qml/pathview/pathattributes.qml 0 (see the PathView documentation for the specification of ContactModel.qml used for ContactModel above.) \endtable @@ -835,12 +835,12 @@ bool QDeclarativeCurve::hasRelativeY() the name of the attribute to change. */ -QString QDeclarativePathAttribute::name() const +QString QQuickPathAttribute::name() const { return _name; } -void QDeclarativePathAttribute::setName(const QString &name) +void QQuickPathAttribute::setName(const QString &name) { if (_name == name) return; @@ -887,12 +887,12 @@ void QDeclarativePathAttribute::setName(const QString &name) /*! the new value of the attribute. */ -qreal QDeclarativePathAttribute::value() const +qreal QQuickPathAttribute::value() const { return _value; } -void QDeclarativePathAttribute::setValue(qreal value) +void QQuickPathAttribute::setValue(qreal value) { if (_value != value) { _value = value; @@ -904,7 +904,7 @@ void QDeclarativePathAttribute::setValue(qreal value) /****************************************************************************/ /*! - \qmlclass PathLine QDeclarativePathLine + \qmlclass PathLine QQuickPathLine \inqmlmodule QtQuick 2 \ingroup qml-view-elements \brief The PathLine defines a straight line. @@ -946,15 +946,15 @@ void QDeclarativePathAttribute::setValue(qreal value) \sa x, y */ -inline QPointF positionForCurve(const QDeclarativePathData &data, const QPointF &prevPoint) +inline QPointF positionForCurve(const QQuickPathData &data, const QPointF &prevPoint) { - QDeclarativeCurve *curve = data.curves.at(data.index); + QQuickCurve *curve = data.curves.at(data.index); bool isEnd = data.index == data.curves.size() - 1; return QPointF(curve->hasRelativeX() ? prevPoint.x() + curve->relativeX() : !isEnd || curve->hasX() ? curve->x() : data.endPoint.x(), curve->hasRelativeY() ? prevPoint.y() + curve->relativeY() : !isEnd || curve->hasY() ? curve->y() : data.endPoint.y()); } -void QDeclarativePathLine::addToPath(QPainterPath &path, const QDeclarativePathData &data) +void QQuickPathLine::addToPath(QPainterPath &path, const QQuickPathData &data) { path.lineTo(positionForCurve(data, path.currentPosition())); } @@ -962,7 +962,7 @@ void QDeclarativePathLine::addToPath(QPainterPath &path, const QDeclarativePathD /****************************************************************************/ /*! - \qmlclass PathQuad QDeclarativePathQuad + \qmlclass PathQuad QQuickPathQuad \inqmlmodule QtQuick 2 \ingroup qml-view-elements \brief The PathQuad defines a quadratic Bezier curve with a control point. @@ -1017,12 +1017,12 @@ void QDeclarativePathLine::addToPath(QPainterPath &path, const QDeclarativePathD /*! the x position of the control point. */ -qreal QDeclarativePathQuad::controlX() const +qreal QQuickPathQuad::controlX() const { return _controlX; } -void QDeclarativePathQuad::setControlX(qreal x) +void QQuickPathQuad::setControlX(qreal x) { if (_controlX != x) { _controlX = x; @@ -1035,12 +1035,12 @@ void QDeclarativePathQuad::setControlX(qreal x) /*! the y position of the control point. */ -qreal QDeclarativePathQuad::controlY() const +qreal QQuickPathQuad::controlY() const { return _controlY; } -void QDeclarativePathQuad::setControlY(qreal y) +void QQuickPathQuad::setControlY(qreal y) { if (_controlY != y) { _controlY = y; @@ -1064,12 +1064,12 @@ void QDeclarativePathQuad::setControlY(qreal y) \sa controlX, controlY */ -qreal QDeclarativePathQuad::relativeControlX() const +qreal QQuickPathQuad::relativeControlX() const { return _relativeControlX; } -void QDeclarativePathQuad::setRelativeControlX(qreal x) +void QQuickPathQuad::setRelativeControlX(qreal x) { if (_relativeControlX.isNull || _relativeControlX != x) { _relativeControlX = x; @@ -1078,17 +1078,17 @@ void QDeclarativePathQuad::setRelativeControlX(qreal x) } } -bool QDeclarativePathQuad::hasRelativeControlX() +bool QQuickPathQuad::hasRelativeControlX() { return _relativeControlX.isValid(); } -qreal QDeclarativePathQuad::relativeControlY() const +qreal QQuickPathQuad::relativeControlY() const { return _relativeControlY; } -void QDeclarativePathQuad::setRelativeControlY(qreal y) +void QQuickPathQuad::setRelativeControlY(qreal y) { if (_relativeControlY.isNull || _relativeControlY != y) { _relativeControlY = y; @@ -1097,12 +1097,12 @@ void QDeclarativePathQuad::setRelativeControlY(qreal y) } } -bool QDeclarativePathQuad::hasRelativeControlY() +bool QQuickPathQuad::hasRelativeControlY() { return _relativeControlY.isValid(); } -void QDeclarativePathQuad::addToPath(QPainterPath &path, const QDeclarativePathData &data) +void QQuickPathQuad::addToPath(QPainterPath &path, const QQuickPathData &data) { const QPointF &prevPoint = path.currentPosition(); QPointF controlPoint(hasRelativeControlX() ? prevPoint.x() + relativeControlX() : controlX(), @@ -1113,7 +1113,7 @@ void QDeclarativePathQuad::addToPath(QPainterPath &path, const QDeclarativePathD /****************************************************************************/ /*! - \qmlclass PathCubic QDeclarativePathCubic + \qmlclass PathCubic QQuickPathCubic \inqmlmodule QtQuick 2 \ingroup qml-view-elements \brief The PathCubic defines a cubic Bezier curve with two control points. @@ -1168,12 +1168,12 @@ void QDeclarativePathQuad::addToPath(QPainterPath &path, const QDeclarativePathD Defines the position of the first control point. */ -qreal QDeclarativePathCubic::control1X() const +qreal QQuickPathCubic::control1X() const { return _control1X; } -void QDeclarativePathCubic::setControl1X(qreal x) +void QQuickPathCubic::setControl1X(qreal x) { if (_control1X != x) { _control1X = x; @@ -1182,12 +1182,12 @@ void QDeclarativePathCubic::setControl1X(qreal x) } } -qreal QDeclarativePathCubic::control1Y() const +qreal QQuickPathCubic::control1Y() const { return _control1Y; } -void QDeclarativePathCubic::setControl1Y(qreal y) +void QQuickPathCubic::setControl1Y(qreal y) { if (_control1Y != y) { _control1Y = y; @@ -1202,12 +1202,12 @@ void QDeclarativePathCubic::setControl1Y(qreal y) Defines the position of the second control point. */ -qreal QDeclarativePathCubic::control2X() const +qreal QQuickPathCubic::control2X() const { return _control2X; } -void QDeclarativePathCubic::setControl2X(qreal x) +void QQuickPathCubic::setControl2X(qreal x) { if (_control2X != x) { _control2X = x; @@ -1216,12 +1216,12 @@ void QDeclarativePathCubic::setControl2X(qreal x) } } -qreal QDeclarativePathCubic::control2Y() const +qreal QQuickPathCubic::control2Y() const { return _control2Y; } -void QDeclarativePathCubic::setControl2Y(qreal y) +void QQuickPathCubic::setControl2Y(qreal y) { if (_control2Y != y) { _control2Y = y; @@ -1247,12 +1247,12 @@ void QDeclarativePathCubic::setControl2Y(qreal y) \sa control1X, control1Y, control2X, control2Y */ -qreal QDeclarativePathCubic::relativeControl1X() const +qreal QQuickPathCubic::relativeControl1X() const { return _relativeControl1X; } -void QDeclarativePathCubic::setRelativeControl1X(qreal x) +void QQuickPathCubic::setRelativeControl1X(qreal x) { if (_relativeControl1X.isNull || _relativeControl1X != x) { _relativeControl1X = x; @@ -1261,17 +1261,17 @@ void QDeclarativePathCubic::setRelativeControl1X(qreal x) } } -bool QDeclarativePathCubic::hasRelativeControl1X() +bool QQuickPathCubic::hasRelativeControl1X() { return _relativeControl1X.isValid(); } -qreal QDeclarativePathCubic::relativeControl1Y() const +qreal QQuickPathCubic::relativeControl1Y() const { return _relativeControl1Y; } -void QDeclarativePathCubic::setRelativeControl1Y(qreal y) +void QQuickPathCubic::setRelativeControl1Y(qreal y) { if (_relativeControl1Y.isNull || _relativeControl1Y != y) { _relativeControl1Y = y; @@ -1280,17 +1280,17 @@ void QDeclarativePathCubic::setRelativeControl1Y(qreal y) } } -bool QDeclarativePathCubic::hasRelativeControl1Y() +bool QQuickPathCubic::hasRelativeControl1Y() { return _relativeControl1Y.isValid(); } -qreal QDeclarativePathCubic::relativeControl2X() const +qreal QQuickPathCubic::relativeControl2X() const { return _relativeControl2X; } -void QDeclarativePathCubic::setRelativeControl2X(qreal x) +void QQuickPathCubic::setRelativeControl2X(qreal x) { if (_relativeControl2X.isNull || _relativeControl2X != x) { _relativeControl2X = x; @@ -1299,17 +1299,17 @@ void QDeclarativePathCubic::setRelativeControl2X(qreal x) } } -bool QDeclarativePathCubic::hasRelativeControl2X() +bool QQuickPathCubic::hasRelativeControl2X() { return _relativeControl2X.isValid(); } -qreal QDeclarativePathCubic::relativeControl2Y() const +qreal QQuickPathCubic::relativeControl2Y() const { return _relativeControl2Y; } -void QDeclarativePathCubic::setRelativeControl2Y(qreal y) +void QQuickPathCubic::setRelativeControl2Y(qreal y) { if (_relativeControl2Y.isNull || _relativeControl2Y != y) { _relativeControl2Y = y; @@ -1318,12 +1318,12 @@ void QDeclarativePathCubic::setRelativeControl2Y(qreal y) } } -bool QDeclarativePathCubic::hasRelativeControl2Y() +bool QQuickPathCubic::hasRelativeControl2Y() { return _relativeControl2Y.isValid(); } -void QDeclarativePathCubic::addToPath(QPainterPath &path, const QDeclarativePathData &data) +void QQuickPathCubic::addToPath(QPainterPath &path, const QQuickPathData &data) { const QPointF &prevPoint = path.currentPosition(); QPointF controlPoint1(hasRelativeControl1X() ? prevPoint.x() + relativeControl1X() : control1X(), @@ -1336,7 +1336,7 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path, const QDeclarativePath /****************************************************************************/ /*! - \qmlclass PathCurve QDeclarativePathCurve + \qmlclass PathCurve QQuickPathCurve \inqmlmodule QtQuick 2 \ingroup qml-view-elements \brief The PathCurve defines a point on a Catmull-Rom curve. @@ -1344,7 +1344,7 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path, const QDeclarativePath PathCurve provides an easy way to specify a curve passing directly through a set of points. Typically multiple PathCurves are used in a series, as the following example demonstrates: - \snippet doc/src/snippets/declarative/path/basiccurve.qml 0 + \snippet doc/src/snippets/qml/path/basiccurve.qml 0 This example produces the following path (with the starting point and PathCurve points highlighted in red): @@ -1388,7 +1388,7 @@ inline QPointF previousPathPosition(const QPainterPath &path) return index > -1 ? QPointF(path.elementAt(index)) : path.pointAtPercent(0); } -void QDeclarativePathCatmullRomCurve::addToPath(QPainterPath &path, const QDeclarativePathData &data) +void QQuickPathCatmullRomCurve::addToPath(QPainterPath &path, const QQuickPathData &data) { //here we convert catmull-rom spline to bezier for use in QPainterPath. //basic conversion algorithm: @@ -1400,18 +1400,18 @@ void QDeclarativePathCatmullRomCurve::addToPath(QPainterPath &path, const QDecla //get previous points int index = data.index - 1; - QDeclarativeCurve *curve = index == -1 ? 0 : data.curves.at(index); - if (qobject_cast(curve)) { + QQuickCurve *curve = index == -1 ? 0 : data.curves.at(index); + if (qobject_cast(curve)) { prev = path.currentPosition(); prevFar = previousPathPosition(path); } else { prev = path.currentPosition(); bool prevFarSet = false; if (index == -1 && data.curves.count() > 1) { - if (qobject_cast(data.curves.at(data.curves.count()-1))) { + if (qobject_cast(data.curves.at(data.curves.count()-1))) { //TODO: profile and optimize QPointF pos = prev; - QDeclarativePathData loopData; + QQuickPathData loopData; loopData.endPoint = data.endPoint; loopData.curves = data.curves; for (int i = data.index; i < data.curves.count(); ++i) { @@ -1436,14 +1436,14 @@ void QDeclarativePathCatmullRomCurve::addToPath(QPainterPath &path, const QDecla //get next point index = data.index + 1; - if (index < data.curves.count() && qobject_cast(data.curves.at(index))) { - QDeclarativePathData nextData; + if (index < data.curves.count() && qobject_cast(data.curves.at(index))) { + QQuickPathData nextData; nextData.index = index; nextData.endPoint = data.endPoint; nextData.curves = data.curves; next = positionForCurve(nextData, point); } else { - if (point == QPointF(path.elementAt(0)) && qobject_cast(data.curves.at(0))) { + if (point == QPointF(path.elementAt(0)) && qobject_cast(data.curves.at(0))) { //this is a closed path starting and ending with catmull-rom segments. //we try to smooth the join point next = QPointF(path.elementAt(3)); //the first catmull-rom point @@ -1481,7 +1481,7 @@ void QDeclarativePathCatmullRomCurve::addToPath(QPainterPath &path, const QDecla /****************************************************************************/ /*! - \qmlclass PathArc QDeclarativePathArc + \qmlclass PathArc QQuickPathArc \inqmlmodule QtQuick 2 \ingroup qml-view-elements \brief The PathArc defines an arc with the given radius. @@ -1493,7 +1493,7 @@ void QDeclarativePathCatmullRomCurve::addToPath(QPainterPath &path, const QDecla \table \row \o \image declarative-patharc.png - \o \snippet doc/src/snippets/declarative/path/basicarc.qml 0 + \o \snippet doc/src/snippets/qml/path/basicarc.qml 0 \endtable Note that a single PathArc cannot be used to specify a circle. Instead, you can @@ -1537,16 +1537,16 @@ void QDeclarativePathCatmullRomCurve::addToPath(QPainterPath &path, const QDecla \table \row \o \image declarative-arcradius.png - \o \snippet doc/src/snippets/declarative/path/arcradius.qml 0 + \o \snippet doc/src/snippets/qml/path/arcradius.qml 0 \endtable */ -qreal QDeclarativePathArc::radiusX() const +qreal QQuickPathArc::radiusX() const { return _radiusX; } -void QDeclarativePathArc::setRadiusX(qreal radius) +void QQuickPathArc::setRadiusX(qreal radius) { if (_radiusX == radius) return; @@ -1555,12 +1555,12 @@ void QDeclarativePathArc::setRadiusX(qreal radius) emit radiusXChanged(); } -qreal QDeclarativePathArc::radiusY() const +qreal QQuickPathArc::radiusY() const { return _radiusY; } -void QDeclarativePathArc::setRadiusY(qreal radius) +void QQuickPathArc::setRadiusY(qreal radius) { if (_radiusY == radius) return; @@ -1582,18 +1582,18 @@ void QDeclarativePathArc::setRadiusY(qreal radius) \table \row \o \image declarative-largearc.png - \o \snippet doc/src/snippets/declarative/path/largearc.qml 0 + \o \snippet doc/src/snippets/qml/path/largearc.qml 0 \endtable The default value is false. */ -bool QDeclarativePathArc::useLargeArc() const +bool QQuickPathArc::useLargeArc() const { return _useLargeArc; } -void QDeclarativePathArc::setUseLargeArc(bool largeArc) +void QQuickPathArc::setUseLargeArc(bool largeArc) { if (_useLargeArc == largeArc) return; @@ -1613,18 +1613,18 @@ void QDeclarativePathArc::setUseLargeArc(bool largeArc) \table \row \o \image declarative-arcdirection.png - \o \snippet doc/src/snippets/declarative/path/arcdirection.qml 0 + \o \snippet doc/src/snippets/qml/path/arcdirection.qml 0 \endtable \sa useLargeArc */ -QDeclarativePathArc::ArcDirection QDeclarativePathArc::direction() const +QQuickPathArc::ArcDirection QQuickPathArc::direction() const { return _direction; } -void QDeclarativePathArc::setDirection(ArcDirection direction) +void QQuickPathArc::setDirection(ArcDirection direction) { if (_direction == direction) return; @@ -1633,11 +1633,11 @@ void QDeclarativePathArc::setDirection(ArcDirection direction) emit directionChanged(); } -void QDeclarativePathArc::addToPath(QPainterPath &path, const QDeclarativePathData &data) +void QQuickPathArc::addToPath(QPainterPath &path, const QQuickPathData &data) { const QPointF &startPoint = path.currentPosition(); const QPointF &endPoint = positionForCurve(data, startPoint); - QDeclarativeSvgParser::pathArc(path, + QQuickSvgParser::pathArc(path, _radiusX, _radiusY, 0, //xAxisRotation @@ -1651,7 +1651,7 @@ void QDeclarativePathArc::addToPath(QPainterPath &path, const QDeclarativePathDa /****************************************************************************/ /*! - \qmlclass PathSvg QDeclarativePathSvg + \qmlclass PathSvg QQuickPathSvg \inqmlmodule QtQuick 2 \ingroup qml-view-elements \brief The PathSvg defines a path using an SVG path data string. @@ -1681,12 +1681,12 @@ void QDeclarativePathArc::addToPath(QPainterPath &path, const QDeclarativePathDa for more details on this format. */ -QString QDeclarativePathSvg::path() const +QString QQuickPathSvg::path() const { return _path; } -void QDeclarativePathSvg::setPath(const QString &path) +void QQuickPathSvg::setPath(const QString &path) { if (_path == path) return; @@ -1695,15 +1695,15 @@ void QDeclarativePathSvg::setPath(const QString &path) emit pathChanged(); } -void QDeclarativePathSvg::addToPath(QPainterPath &path, const QDeclarativePathData &) +void QQuickPathSvg::addToPath(QPainterPath &path, const QQuickPathData &) { - QDeclarativeSvgParser::parsePathDataFast(_path, path); + QQuickSvgParser::parsePathDataFast(_path, path); } /****************************************************************************/ /*! - \qmlclass PathPercent QDeclarativePathPercent + \qmlclass PathPercent QQuickPathPercent \inqmlmodule QtQuick 2 \ingroup qml-view-elements \brief The PathPercent manipulates the way a path is interpreted. @@ -1782,12 +1782,12 @@ void QDeclarativePathSvg::addToPath(QPainterPath &path, const QDeclarativePathDa \endqml */ -qreal QDeclarativePathPercent::value() const +qreal QQuickPathPercent::value() const { return _value; } -void QDeclarativePathPercent::setValue(qreal value) +void QQuickPathPercent::setValue(qreal value) { if (_value != value) { _value = value; diff --git a/src/quick/util/qdeclarativepath_p.h b/src/quick/util/qquickpath_p.h similarity index 70% rename from src/quick/util/qdeclarativepath_p.h rename to src/quick/util/qquickpath_p.h index 7dc2c47990..3ffcf3eaa6 100644 --- a/src/quick/util/qdeclarativepath_p.h +++ b/src/quick/util/qquickpath_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,12 +39,12 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPATH_H -#define QDECLARATIVEPATH_H +#ifndef QQUICKPATH_H +#define QQUICKPATH_H -#include +#include -#include +#include #include #include @@ -54,31 +54,31 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeCurve; -struct QDeclarativePathData +class QQuickCurve; +struct QQuickPathData { int index; QPointF endPoint; - QList curves; + QList curves; }; -class Q_AUTOTEST_EXPORT QDeclarativePathElement : public QObject +class Q_AUTOTEST_EXPORT QQuickPathElement : public QObject { Q_OBJECT public: - QDeclarativePathElement(QObject *parent=0) : QObject(parent) {} + QQuickPathElement(QObject *parent=0) : QObject(parent) {} Q_SIGNALS: void changed(); }; -class Q_AUTOTEST_EXPORT QDeclarativePathAttribute : public QDeclarativePathElement +class Q_AUTOTEST_EXPORT QQuickPathAttribute : public QQuickPathElement { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged) public: - QDeclarativePathAttribute(QObject *parent=0) : QDeclarativePathElement(parent), _value(0) {} + QQuickPathAttribute(QObject *parent=0) : QQuickPathElement(parent), _value(0) {} QString name() const; @@ -96,7 +96,7 @@ class Q_AUTOTEST_EXPORT QDeclarativePathAttribute : public QDeclarativePathEleme qreal _value; }; -class Q_AUTOTEST_EXPORT QDeclarativeCurve : public QDeclarativePathElement +class Q_AUTOTEST_EXPORT QQuickCurve : public QQuickPathElement { Q_OBJECT @@ -105,7 +105,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeCurve : public QDeclarativePathElement Q_PROPERTY(qreal relativeX READ relativeX WRITE setRelativeX NOTIFY relativeXChanged) Q_PROPERTY(qreal relativeY READ relativeY WRITE setRelativeY NOTIFY relativeYChanged) public: - QDeclarativeCurve(QObject *parent=0) : QDeclarativePathElement(parent) {} + QQuickCurve(QObject *parent=0) : QQuickPathElement(parent) {} qreal x() const; void setX(qreal x); @@ -123,7 +123,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeCurve : public QDeclarativePathElement void setRelativeY(qreal y); bool hasRelativeY(); - virtual void addToPath(QPainterPath &, const QDeclarativePathData &) {} + virtual void addToPath(QPainterPath &, const QQuickPathData &) {} Q_SIGNALS: void xChanged(); @@ -132,22 +132,22 @@ class Q_AUTOTEST_EXPORT QDeclarativeCurve : public QDeclarativePathElement void relativeYChanged(); private: - QDeclarativeNullableValue _x; - QDeclarativeNullableValue _y; - QDeclarativeNullableValue _relativeX; - QDeclarativeNullableValue _relativeY; + QQmlNullableValue _x; + QQmlNullableValue _y; + QQmlNullableValue _relativeX; + QQmlNullableValue _relativeY; }; -class Q_AUTOTEST_EXPORT QDeclarativePathLine : public QDeclarativeCurve +class Q_AUTOTEST_EXPORT QQuickPathLine : public QQuickCurve { Q_OBJECT public: - QDeclarativePathLine(QObject *parent=0) : QDeclarativeCurve(parent) {} + QQuickPathLine(QObject *parent=0) : QQuickCurve(parent) {} - void addToPath(QPainterPath &path, const QDeclarativePathData &); + void addToPath(QPainterPath &path, const QQuickPathData &); }; -class Q_AUTOTEST_EXPORT QDeclarativePathQuad : public QDeclarativeCurve +class Q_AUTOTEST_EXPORT QQuickPathQuad : public QQuickCurve { Q_OBJECT @@ -156,7 +156,7 @@ class Q_AUTOTEST_EXPORT QDeclarativePathQuad : public QDeclarativeCurve Q_PROPERTY(qreal relativeControlX READ relativeControlX WRITE setRelativeControlX NOTIFY relativeControlXChanged) Q_PROPERTY(qreal relativeControlY READ relativeControlY WRITE setRelativeControlY NOTIFY relativeControlYChanged) public: - QDeclarativePathQuad(QObject *parent=0) : QDeclarativeCurve(parent), _controlX(0), _controlY(0) {} + QQuickPathQuad(QObject *parent=0) : QQuickCurve(parent), _controlX(0), _controlY(0) {} qreal controlX() const; void setControlX(qreal x); @@ -172,7 +172,7 @@ class Q_AUTOTEST_EXPORT QDeclarativePathQuad : public QDeclarativeCurve void setRelativeControlY(qreal y); bool hasRelativeControlY(); - void addToPath(QPainterPath &path, const QDeclarativePathData &); + void addToPath(QPainterPath &path, const QQuickPathData &); Q_SIGNALS: void controlXChanged(); @@ -183,11 +183,11 @@ class Q_AUTOTEST_EXPORT QDeclarativePathQuad : public QDeclarativeCurve private: qreal _controlX; qreal _controlY; - QDeclarativeNullableValue _relativeControlX; - QDeclarativeNullableValue _relativeControlY; + QQmlNullableValue _relativeControlX; + QQmlNullableValue _relativeControlY; }; -class Q_AUTOTEST_EXPORT QDeclarativePathCubic : public QDeclarativeCurve +class Q_AUTOTEST_EXPORT QQuickPathCubic : public QQuickCurve { Q_OBJECT @@ -200,7 +200,7 @@ class Q_AUTOTEST_EXPORT QDeclarativePathCubic : public QDeclarativeCurve Q_PROPERTY(qreal relativeControl2X READ relativeControl2X WRITE setRelativeControl2X NOTIFY relativeControl2XChanged) Q_PROPERTY(qreal relativeControl2Y READ relativeControl2Y WRITE setRelativeControl2Y NOTIFY relativeControl2YChanged) public: - QDeclarativePathCubic(QObject *parent=0) : QDeclarativeCurve(parent), _control1X(0), _control1Y(0), _control2X(0), _control2Y(0) {} + QQuickPathCubic(QObject *parent=0) : QQuickCurve(parent), _control1X(0), _control1Y(0), _control2X(0), _control2Y(0) {} qreal control1X() const; void setControl1X(qreal x); @@ -230,7 +230,7 @@ class Q_AUTOTEST_EXPORT QDeclarativePathCubic : public QDeclarativeCurve void setRelativeControl2Y(qreal y); bool hasRelativeControl2Y(); - void addToPath(QPainterPath &path, const QDeclarativePathData &); + void addToPath(QPainterPath &path, const QQuickPathData &); Q_SIGNALS: void control1XChanged(); @@ -247,22 +247,22 @@ class Q_AUTOTEST_EXPORT QDeclarativePathCubic : public QDeclarativeCurve qreal _control1Y; qreal _control2X; qreal _control2Y; - QDeclarativeNullableValue _relativeControl1X; - QDeclarativeNullableValue _relativeControl1Y; - QDeclarativeNullableValue _relativeControl2X; - QDeclarativeNullableValue _relativeControl2Y; + QQmlNullableValue _relativeControl1X; + QQmlNullableValue _relativeControl1Y; + QQmlNullableValue _relativeControl2X; + QQmlNullableValue _relativeControl2Y; }; -class Q_AUTOTEST_EXPORT QDeclarativePathCatmullRomCurve : public QDeclarativeCurve +class Q_AUTOTEST_EXPORT QQuickPathCatmullRomCurve : public QQuickCurve { Q_OBJECT public: - QDeclarativePathCatmullRomCurve(QObject *parent=0) : QDeclarativeCurve(parent) {} + QQuickPathCatmullRomCurve(QObject *parent=0) : QQuickCurve(parent) {} - void addToPath(QPainterPath &path, const QDeclarativePathData &); + void addToPath(QPainterPath &path, const QQuickPathData &); }; -class Q_AUTOTEST_EXPORT QDeclarativePathArc : public QDeclarativeCurve +class Q_AUTOTEST_EXPORT QQuickPathArc : public QQuickCurve { Q_OBJECT Q_PROPERTY(qreal radiusX READ radiusX WRITE setRadiusX NOTIFY radiusXChanged) @@ -271,8 +271,8 @@ class Q_AUTOTEST_EXPORT QDeclarativePathArc : public QDeclarativeCurve Q_PROPERTY(ArcDirection direction READ direction WRITE setDirection NOTIFY directionChanged) public: - QDeclarativePathArc(QObject *parent=0) - : QDeclarativeCurve(parent), _radiusX(0), _radiusY(0), _useLargeArc(false), _direction(Clockwise) {} + QQuickPathArc(QObject *parent=0) + : QQuickCurve(parent), _radiusX(0), _radiusY(0), _useLargeArc(false), _direction(Clockwise) {} enum ArcDirection { Clockwise, Counterclockwise }; Q_ENUMS(ArcDirection) @@ -289,7 +289,7 @@ class Q_AUTOTEST_EXPORT QDeclarativePathArc : public QDeclarativeCurve ArcDirection direction() const; void setDirection(ArcDirection direction); - void addToPath(QPainterPath &path, const QDeclarativePathData &); + void addToPath(QPainterPath &path, const QQuickPathData &); Q_SIGNALS: void radiusXChanged(); @@ -304,17 +304,17 @@ class Q_AUTOTEST_EXPORT QDeclarativePathArc : public QDeclarativeCurve ArcDirection _direction; }; -class Q_AUTOTEST_EXPORT QDeclarativePathSvg : public QDeclarativeCurve +class Q_AUTOTEST_EXPORT QQuickPathSvg : public QQuickCurve { Q_OBJECT Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged) public: - QDeclarativePathSvg(QObject *parent=0) : QDeclarativeCurve(parent) {} + QQuickPathSvg(QObject *parent=0) : QQuickCurve(parent) {} QString path() const; void setPath(const QString &path); - void addToPath(QPainterPath &path, const QDeclarativePathData &); + void addToPath(QPainterPath &path, const QQuickPathData &); Q_SIGNALS: void pathChanged(); @@ -323,12 +323,12 @@ class Q_AUTOTEST_EXPORT QDeclarativePathSvg : public QDeclarativeCurve QString _path; }; -class Q_AUTOTEST_EXPORT QDeclarativePathPercent : public QDeclarativePathElement +class Q_AUTOTEST_EXPORT QQuickPathPercent : public QQuickPathElement { Q_OBJECT Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged) public: - QDeclarativePathPercent(QObject *parent=0) : QDeclarativePathElement(parent) {} + QQuickPathPercent(QObject *parent=0) : QQuickPathElement(parent) {} qreal value() const; void setValue(qreal value); @@ -340,9 +340,9 @@ class Q_AUTOTEST_EXPORT QDeclarativePathPercent : public QDeclarativePathElement qreal _value; }; -struct QDeclarativeCachedBezier +struct QQuickCachedBezier { - QDeclarativeCachedBezier() : isValid(false) {} + QQuickCachedBezier() : isValid(false) {} QBezier bezier; int element; qreal bezLength; @@ -351,23 +351,23 @@ struct QDeclarativeCachedBezier bool isValid; }; -class QDeclarativePathPrivate; -class Q_AUTOTEST_EXPORT QDeclarativePath : public QObject, public QDeclarativeParserStatus +class QQuickPathPrivate; +class Q_AUTOTEST_EXPORT QQuickPath : public QObject, public QQmlParserStatus { Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QDeclarativeListProperty pathElements READ pathElements) + Q_INTERFACES(QQmlParserStatus) + Q_PROPERTY(QQmlListProperty pathElements READ pathElements) Q_PROPERTY(qreal startX READ startX WRITE setStartX NOTIFY startXChanged) Q_PROPERTY(qreal startY READ startY WRITE setStartY NOTIFY startYChanged) Q_PROPERTY(bool closed READ isClosed NOTIFY changed) Q_CLASSINFO("DefaultProperty", "pathElements") - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) public: - QDeclarativePath(QObject *parent=0); - ~QDeclarativePath(); + QQuickPath(QObject *parent=0); + ~QQuickPath(); - QDeclarativeListProperty pathElements(); + QQmlListProperty pathElements(); qreal startX() const; void setStartX(qreal x); @@ -419,33 +419,33 @@ private Q_SLOTS: static void interpolate(QList &points, int idx, const QString &name, qreal value); static void endpoint(QList &attributePoints, const QString &name); - static QPointF forwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QDeclarativeCachedBezier &prevBez, qreal p, qreal *angle = 0); - static QPointF backwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QDeclarativeCachedBezier &prevBez, qreal p, qreal *angle = 0); + static QPointF forwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle = 0); + static QPointF backwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle = 0); private: - Q_DISABLE_COPY(QDeclarativePath) - Q_DECLARE_PRIVATE(QDeclarativePath) + Q_DISABLE_COPY(QQuickPath) + Q_DECLARE_PRIVATE(QQuickPath) friend class QQuickPathAnimationUpdater; public: QPainterPath createPath(const QPointF &startPoint, const QPointF &endPoint, const QStringList &attributes, qreal &pathLength, QList &attributePoints, bool *closed = 0); - static QPointF sequentialPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QDeclarativeCachedBezier &prevBez, qreal p, qreal *angle = 0); + static QPointF sequentialPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle = 0); }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativePathElement) -QML_DECLARE_TYPE(QDeclarativePathAttribute) -QML_DECLARE_TYPE(QDeclarativeCurve) -QML_DECLARE_TYPE(QDeclarativePathLine) -QML_DECLARE_TYPE(QDeclarativePathQuad) -QML_DECLARE_TYPE(QDeclarativePathCubic) -QML_DECLARE_TYPE(QDeclarativePathCatmullRomCurve) -QML_DECLARE_TYPE(QDeclarativePathArc) -QML_DECLARE_TYPE(QDeclarativePathSvg) -QML_DECLARE_TYPE(QDeclarativePathPercent) -QML_DECLARE_TYPE(QDeclarativePath) +QML_DECLARE_TYPE(QQuickPathElement) +QML_DECLARE_TYPE(QQuickPathAttribute) +QML_DECLARE_TYPE(QQuickCurve) +QML_DECLARE_TYPE(QQuickPathLine) +QML_DECLARE_TYPE(QQuickPathQuad) +QML_DECLARE_TYPE(QQuickPathCubic) +QML_DECLARE_TYPE(QQuickPathCatmullRomCurve) +QML_DECLARE_TYPE(QQuickPathArc) +QML_DECLARE_TYPE(QQuickPathSvg) +QML_DECLARE_TYPE(QQuickPathPercent) +QML_DECLARE_TYPE(QQuickPath) QT_END_HEADER -#endif // QDECLARATIVEPATH_H +#endif // QQUICKPATH_H diff --git a/src/quick/util/qdeclarativepath_p_p.h b/src/quick/util/qquickpath_p_p.h similarity index 76% rename from src/quick/util/qdeclarativepath_p_p.h rename to src/quick/util/qquickpath_p_p.h index f02ab79e19..a7be68c964 100644 --- a/src/quick/util/qdeclarativepath_p_p.h +++ b/src/quick/util/qquickpath_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPATH_P_H -#define QDECLARATIVEPATH_P_H +#ifndef QQUICKPATH_P_H +#define QQUICKPATH_P_H // // W A R N I N G @@ -53,31 +53,31 @@ // We mean it. // -#include "qdeclarativepath_p.h" +#include "qquickpath_p.h" -#include +#include #include #include QT_BEGIN_NAMESPACE -class QDeclarativePathPrivate : public QObjectPrivate +class QQuickPathPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativePath) + Q_DECLARE_PUBLIC(QQuickPath) public: - QDeclarativePathPrivate() : pathLength(0), closed(false), componentComplete(true) { } + QQuickPathPrivate() : pathLength(0), closed(false), componentComplete(true) { } QPainterPath _path; - QList _pathElements; + QList _pathElements; mutable QVector _pointCache; - QList _attributePoints; + QList _attributePoints; QStringList _attributes; - QList _pathCurves; - mutable QDeclarativeCachedBezier prevBez; - QDeclarativeNullableValue startX; - QDeclarativeNullableValue startY; + QList _pathCurves; + mutable QQuickCachedBezier prevBez; + QQmlNullableValue startX; + QQmlNullableValue startY; qreal pathLength; bool closed; bool componentComplete; diff --git a/src/quick/util/qdeclarativepathinterpolator.cpp b/src/quick/util/qquickpathinterpolator.cpp similarity index 84% rename from src/quick/util/qdeclarativepathinterpolator.cpp rename to src/quick/util/qquickpathinterpolator.cpp index 7550d54159..2b5fb62872 100644 --- a/src/quick/util/qdeclarativepathinterpolator.cpp +++ b/src/quick/util/qquickpathinterpolator.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include "qdeclarativepathinterpolator_p.h" +#include "qquickpathinterpolator_p.h" -#include "qdeclarativepath_p.h" +#include "qquickpath_p.h" QT_BEGIN_NAMESPACE @@ -55,10 +55,10 @@ QT_BEGIN_NAMESPACE In the following example, we animate a green rectangle along a bezier path. - \snippet doc/src/snippets/declarative/pathinterpolator.qml 0 + \snippet doc/src/snippets/qml/pathinterpolator.qml 0 */ -QDeclarativePathInterpolator::QDeclarativePathInterpolator(QObject *parent) : +QQuickPathInterpolator::QQuickPathInterpolator(QObject *parent) : QObject(parent), _path(0), _x(0), _y(0), _angle(0), _progress(0) { } @@ -69,12 +69,12 @@ QDeclarativePathInterpolator::QDeclarativePathInterpolator(QObject *parent) : For more information on defining a path see the \l Path documentation. */ -QDeclarativePath *QDeclarativePathInterpolator::path() const +QQuickPath *QQuickPathInterpolator::path() const { return _path; } -void QDeclarativePathInterpolator::setPath(QDeclarativePath *path) +void QQuickPathInterpolator::setPath(QQuickPath *path) { if (_path == path) return; @@ -95,12 +95,12 @@ void QDeclarativePathInterpolator::setPath(QDeclarativePath *path) Progress ranges from 0.0 to 1.0. */ -qreal QDeclarativePathInterpolator::progress() const +qreal QQuickPathInterpolator::progress() const { return _progress; } -void QDeclarativePathInterpolator::setProgress(qreal progress) +void QQuickPathInterpolator::setProgress(qreal progress) { if (progress == _progress) return; @@ -115,12 +115,12 @@ void QDeclarativePathInterpolator::setProgress(qreal progress) These properties hold the position of the path at \l progress. */ -qreal QDeclarativePathInterpolator::x() const +qreal QQuickPathInterpolator::x() const { return _x; } -qreal QDeclarativePathInterpolator::y() const +qreal QQuickPathInterpolator::y() const { return _y; } @@ -132,12 +132,12 @@ qreal QDeclarativePathInterpolator::y() const Angles are reported clockwise, with zero degrees at the 3 o'clock position. */ -qreal QDeclarativePathInterpolator::angle() const +qreal QQuickPathInterpolator::angle() const { return _angle; } -void QDeclarativePathInterpolator::_q_pathUpdated() +void QQuickPathInterpolator::_q_pathUpdated() { if (! _path) return; diff --git a/src/quick/util/qdeclarativepathinterpolator_p.h b/src/quick/util/qquickpathinterpolator_p.h similarity index 79% rename from src/quick/util/qdeclarativepathinterpolator_p.h rename to src/quick/util/qquickpathinterpolator_p.h index 24b58e6a3c..b018ce337a 100644 --- a/src/quick/util/qdeclarativepathinterpolator_p.h +++ b/src/quick/util/qquickpathinterpolator_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,30 +39,30 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPATHINTERPOLATOR_P_H -#define QDECLARATIVEPATHINTERPOLATOR_P_H +#ifndef QQUICKPATHINTERPOLATOR_P_H +#define QQUICKPATHINTERPOLATOR_P_H -#include +#include #include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativePath; -class Q_AUTOTEST_EXPORT QDeclarativePathInterpolator : public QObject +class QQuickPath; +class Q_AUTOTEST_EXPORT QQuickPathInterpolator : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativePath *path READ path WRITE setPath NOTIFY pathChanged) + Q_PROPERTY(QQuickPath *path READ path WRITE setPath NOTIFY pathChanged) Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged) Q_PROPERTY(qreal x READ x NOTIFY xChanged) Q_PROPERTY(qreal y READ y NOTIFY yChanged) Q_PROPERTY(qreal angle READ angle NOTIFY angleChanged) public: - explicit QDeclarativePathInterpolator(QObject *parent = 0); + explicit QQuickPathInterpolator(QObject *parent = 0); - QDeclarativePath *path() const; - void setPath(QDeclarativePath *path); + QQuickPath *path() const; + void setPath(QQuickPath *path); qreal progress() const; void setProgress(qreal progress); @@ -82,7 +82,7 @@ private Q_SLOTS: void _q_pathUpdated(); private: - QDeclarativePath *_path; + QQuickPath *_path; qreal _x; qreal _y; qreal _angle; @@ -91,8 +91,8 @@ private Q_SLOTS: QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativePathInterpolator) +QML_DECLARE_TYPE(QQuickPathInterpolator) QT_END_HEADER -#endif // QDECLARATIVEPATHINTERPOLATOR_P_H +#endif // QQUICKPATHINTERPOLATOR_P_H diff --git a/src/quick/util/qdeclarativepixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp similarity index 59% rename from src/quick/util/qdeclarativepixmapcache.cpp rename to src/quick/util/qquickpixmapcache.cpp index 95cbd361b8..85e155f081 100644 --- a/src/quick/util/qdeclarativepixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,13 +39,13 @@ ** ****************************************************************************/ -#include "qdeclarativepixmapcache_p.h" -#include -#include +#include "qquickpixmapcache_p.h" +#include +#include -#include -#include -#include +#include +#include +#include #include #include @@ -76,26 +76,26 @@ QT_BEGIN_NAMESPACE // The cache limit describes the maximum "junk" in the cache. static int cache_limit = 2048 * 1024; // 2048 KB cache limit for embedded in qpixmapcache.cpp -QSGTexture *QDeclarativeDefaultTextureFactory::createTexture(QQuickCanvas *) const +QSGTexture *QQuickDefaultTextureFactory::createTexture(QQuickCanvas *) const { QSGPlainTexture *t = new QSGPlainTexture(); t->setImage(im); return t; } -class QDeclarativePixmapReader; -class QDeclarativePixmapData; -class QDeclarativePixmapReply : public QObject +class QQuickPixmapReader; +class QQuickPixmapData; +class QQuickPixmapReply : public QObject { Q_OBJECT public: enum ReadError { NoError, Loading, Decoding }; - QDeclarativePixmapReply(QDeclarativePixmapData *); - ~QDeclarativePixmapReply(); + QQuickPixmapReply(QQuickPixmapData *); + ~QQuickPixmapReply(); - QDeclarativePixmapData *data; - QDeclarativeEngine *engineForReader; // always access reader inside readerMutex + QQuickPixmapData *data; + QQmlEngine *engineForReader; // always access reader inside readerMutex QSize requestSize; QUrl url; @@ -104,16 +104,16 @@ class QDeclarativePixmapReply : public QObject class Event : public QEvent { public: - Event(ReadError, const QString &, const QSize &, QDeclarativeTextureFactory *factory, const QImage &image); + Event(ReadError, const QString &, const QSize &, QQuickTextureFactory *factory, const QImage &image); ReadError error; QString errorString; QSize implicitSize; QImage image; - QDeclarativeTextureFactory *textureFactory; + QQuickTextureFactory *textureFactory; }; void postReply(ReadError, const QString &, const QSize &, const QImage &image); - void postReply(ReadError, const QString &, const QSize &, QDeclarativeTextureFactory *factory, const QImage &image); + void postReply(ReadError, const QString &, const QSize &, QQuickTextureFactory *factory, const QImage &image); Q_SIGNALS: @@ -124,118 +124,118 @@ class QDeclarativePixmapReply : public QObject bool event(QEvent *event); private: - Q_DISABLE_COPY(QDeclarativePixmapReply) + Q_DISABLE_COPY(QQuickPixmapReply) public: static int finishedIndex; static int downloadProgressIndex; }; -class QDeclarativePixmapReaderThreadObject : public QObject { +class QQuickPixmapReaderThreadObject : public QObject { Q_OBJECT public: - QDeclarativePixmapReaderThreadObject(QDeclarativePixmapReader *); + QQuickPixmapReaderThreadObject(QQuickPixmapReader *); void processJobs(); virtual bool event(QEvent *e); private slots: void networkRequestDone(); private: - QDeclarativePixmapReader *reader; + QQuickPixmapReader *reader; }; -class QDeclarativePixmapData; -class QDeclarativePixmapReader : public QThread +class QQuickPixmapData; +class QQuickPixmapReader : public QThread { Q_OBJECT public: - QDeclarativePixmapReader(QDeclarativeEngine *eng); - ~QDeclarativePixmapReader(); + QQuickPixmapReader(QQmlEngine *eng); + ~QQuickPixmapReader(); - QDeclarativePixmapReply *getImage(QDeclarativePixmapData *); - void cancel(QDeclarativePixmapReply *rep); + QQuickPixmapReply *getImage(QQuickPixmapData *); + void cancel(QQuickPixmapReply *rep); - static QDeclarativePixmapReader *instance(QDeclarativeEngine *engine); - static QDeclarativePixmapReader *existingInstance(QDeclarativeEngine *engine); + static QQuickPixmapReader *instance(QQmlEngine *engine); + static QQuickPixmapReader *existingInstance(QQmlEngine *engine); protected: void run(); private: - friend class QDeclarativePixmapReaderThreadObject; + friend class QQuickPixmapReaderThreadObject; void processJobs(); - void processJob(QDeclarativePixmapReply *, const QUrl &, const QSize &); + void processJob(QQuickPixmapReply *, const QUrl &, const QSize &); void networkRequestDone(QNetworkReply *); - QList jobs; - QList cancelled; - QDeclarativeEngine *engine; + QList jobs; + QList cancelled; + QQmlEngine *engine; QObject *eventLoopQuitHack; QMutex mutex; - QDeclarativePixmapReaderThreadObject *threadObject; + QQuickPixmapReaderThreadObject *threadObject; QWaitCondition waitCondition; QNetworkAccessManager *networkAccessManager(); QNetworkAccessManager *accessManager; - QHash replies; + QHash replies; static int replyDownloadProgress; static int replyFinished; static int downloadProgress; static int threadNetworkRequestDone; - static QHash readers; + static QHash readers; public: static QMutex readerMutex; }; -class QDeclarativePixmapData +class QQuickPixmapData { public: - QDeclarativePixmapData(QDeclarativePixmap *pixmap, const QUrl &u, const QSize &s, const QString &e) - : refCount(1), inCache(false), pixmapStatus(QDeclarativePixmap::Error), + QQuickPixmapData(QQuickPixmap *pixmap, const QUrl &u, const QSize &s, const QString &e) + : refCount(1), inCache(false), pixmapStatus(QQuickPixmap::Error), url(u), errorString(e), requestSize(s), textureFactory(0), reply(0), prevUnreferenced(0), prevUnreferencedPtr(0), nextUnreferenced(0) { declarativePixmaps.insert(pixmap); } - QDeclarativePixmapData(QDeclarativePixmap *pixmap, const QUrl &u, const QSize &r) - : refCount(1), inCache(false), pixmapStatus(QDeclarativePixmap::Loading), + QQuickPixmapData(QQuickPixmap *pixmap, const QUrl &u, const QSize &r) + : refCount(1), inCache(false), pixmapStatus(QQuickPixmap::Loading), url(u), requestSize(r), textureFactory(0), reply(0), prevUnreferenced(0), prevUnreferencedPtr(0), nextUnreferenced(0) { declarativePixmaps.insert(pixmap); } - QDeclarativePixmapData(QDeclarativePixmap *pixmap, const QUrl &u, const QImage &p, const QSize &s, const QSize &r) - : refCount(1), inCache(false), privatePixmap(false), pixmapStatus(QDeclarativePixmap::Ready), - url(u), image(p), implicitSize(s), requestSize(r), textureFactory(new QDeclarativeDefaultTextureFactory(p)), reply(0), prevUnreferenced(0), + QQuickPixmapData(QQuickPixmap *pixmap, const QUrl &u, const QImage &p, const QSize &s, const QSize &r) + : refCount(1), inCache(false), privatePixmap(false), pixmapStatus(QQuickPixmap::Ready), + url(u), image(p), implicitSize(s), requestSize(r), textureFactory(new QQuickDefaultTextureFactory(p)), reply(0), prevUnreferenced(0), prevUnreferencedPtr(0), nextUnreferenced(0) { declarativePixmaps.insert(pixmap); } - QDeclarativePixmapData(QDeclarativePixmap *pixmap, const QUrl &u, QDeclarativeTextureFactory *factory, const QImage &p, const QSize &s, const QSize &r) - : refCount(1), inCache(false), privatePixmap(false), pixmapStatus(QDeclarativePixmap::Ready), + QQuickPixmapData(QQuickPixmap *pixmap, const QUrl &u, QQuickTextureFactory *factory, const QImage &p, const QSize &s, const QSize &r) + : refCount(1), inCache(false), privatePixmap(false), pixmapStatus(QQuickPixmap::Ready), url(u), image(p), implicitSize(s), requestSize(r), textureFactory(factory), reply(0), prevUnreferenced(0), prevUnreferencedPtr(0), nextUnreferenced(0) { declarativePixmaps.insert(pixmap); } - QDeclarativePixmapData(QDeclarativePixmap *pixmap, const QImage &p) - : refCount(1), inCache(false), privatePixmap(true), pixmapStatus(QDeclarativePixmap::Ready), - image(p), implicitSize(p.size()), requestSize(p.size()), textureFactory(new QDeclarativeDefaultTextureFactory(p)), reply(0), prevUnreferenced(0), + QQuickPixmapData(QQuickPixmap *pixmap, const QImage &p) + : refCount(1), inCache(false), privatePixmap(true), pixmapStatus(QQuickPixmap::Ready), + image(p), implicitSize(p.size()), requestSize(p.size()), textureFactory(new QQuickDefaultTextureFactory(p)), reply(0), prevUnreferenced(0), prevUnreferencedPtr(0), nextUnreferenced(0) { declarativePixmaps.insert(pixmap); } - ~QDeclarativePixmapData() + ~QQuickPixmapData() { while (!declarativePixmaps.isEmpty()) { - QDeclarativePixmap *referencer = declarativePixmaps.first(); + QQuickPixmap *referencer = declarativePixmaps.first(); declarativePixmaps.remove(referencer); referencer->d = 0; } @@ -253,61 +253,61 @@ class QDeclarativePixmapData bool inCache:1; bool privatePixmap:1; - QDeclarativePixmap::Status pixmapStatus; + QQuickPixmap::Status pixmapStatus; QUrl url; QString errorString; QImage image; QSize implicitSize; QSize requestSize; - QDeclarativeTextureFactory *textureFactory; + QQuickTextureFactory *textureFactory; - QIntrusiveList declarativePixmaps; - QDeclarativePixmapReply *reply; + QIntrusiveList declarativePixmaps; + QQuickPixmapReply *reply; - QDeclarativePixmapData *prevUnreferenced; - QDeclarativePixmapData**prevUnreferencedPtr; - QDeclarativePixmapData *nextUnreferenced; + QQuickPixmapData *prevUnreferenced; + QQuickPixmapData**prevUnreferencedPtr; + QQuickPixmapData *nextUnreferenced; }; -int QDeclarativePixmapReply::finishedIndex = -1; -int QDeclarativePixmapReply::downloadProgressIndex = -1; +int QQuickPixmapReply::finishedIndex = -1; +int QQuickPixmapReply::downloadProgressIndex = -1; // XXX -QHash QDeclarativePixmapReader::readers; -QMutex QDeclarativePixmapReader::readerMutex; +QHash QQuickPixmapReader::readers; +QMutex QQuickPixmapReader::readerMutex; -int QDeclarativePixmapReader::replyDownloadProgress = -1; -int QDeclarativePixmapReader::replyFinished = -1; -int QDeclarativePixmapReader::downloadProgress = -1; -int QDeclarativePixmapReader::threadNetworkRequestDone = -1; +int QQuickPixmapReader::replyDownloadProgress = -1; +int QQuickPixmapReader::replyFinished = -1; +int QQuickPixmapReader::downloadProgress = -1; +int QQuickPixmapReader::threadNetworkRequestDone = -1; -void QDeclarativePixmapReply::postReply(ReadError error, const QString &errorString, +void QQuickPixmapReply::postReply(ReadError error, const QString &errorString, const QSize &implicitSize, const QImage &image) { loading = false; - QCoreApplication::postEvent(this, new Event(error, errorString, implicitSize, new QDeclarativeDefaultTextureFactory(image), image)); + QCoreApplication::postEvent(this, new Event(error, errorString, implicitSize, new QQuickDefaultTextureFactory(image), image)); } -void QDeclarativePixmapReply::postReply(ReadError error, const QString &errorString, - const QSize &implicitSize, QDeclarativeTextureFactory *factory, +void QQuickPixmapReply::postReply(ReadError error, const QString &errorString, + const QSize &implicitSize, QQuickTextureFactory *factory, const QImage &image) { loading = false; QCoreApplication::postEvent(this, new Event(error, errorString, implicitSize, factory, image)); } -QDeclarativePixmapReply::Event::Event(ReadError e, const QString &s, const QSize &iSize, QDeclarativeTextureFactory *factory, const QImage &i) +QQuickPixmapReply::Event::Event(ReadError e, const QString &s, const QSize &iSize, QQuickTextureFactory *factory, const QImage &i) : QEvent(QEvent::User), error(e), errorString(s), implicitSize(iSize), image(i), textureFactory(factory) { } -QNetworkAccessManager *QDeclarativePixmapReader::networkAccessManager() +QNetworkAccessManager *QQuickPixmapReader::networkAccessManager() { if (!accessManager) { Q_ASSERT(threadObject); - accessManager = QDeclarativeEnginePrivate::get(engine)->createNetworkAccessManager(threadObject); + accessManager = QQmlEnginePrivate::get(engine)->createNetworkAccessManager(threadObject); } return accessManager; } @@ -350,13 +350,13 @@ static bool readImage(const QUrl& url, QIODevice *dev, QImage *image, QString *e return true; } else { if (errorString) - *errorString = QDeclarativePixmap::tr("Error decoding: %1: %2").arg(url.toString()) + *errorString = QQuickPixmap::tr("Error decoding: %1: %2").arg(url.toString()) .arg(imgio.errorString()); return false; } } -QDeclarativePixmapReader::QDeclarativePixmapReader(QDeclarativeEngine *eng) +QQuickPixmapReader::QQuickPixmapReader(QQmlEngine *eng) : QThread(eng), engine(eng), threadObject(0), accessManager(0) { eventLoopQuitHack = new QObject; @@ -365,7 +365,7 @@ QDeclarativePixmapReader::QDeclarativePixmapReader(QDeclarativeEngine *eng) start(QThread::LowestPriority); } -QDeclarativePixmapReader::~QDeclarativePixmapReader() +QQuickPixmapReader::~QQuickPixmapReader() { readerMutex.lock(); readers.remove(engine); @@ -373,12 +373,12 @@ QDeclarativePixmapReader::~QDeclarativePixmapReader() mutex.lock(); // manually cancel all outstanding jobs. - foreach (QDeclarativePixmapReply *reply, jobs) { + foreach (QQuickPixmapReply *reply, jobs) { delete reply; } jobs.clear(); - QList activeJobs = replies.values(); - foreach (QDeclarativePixmapReply *reply, activeJobs) { + QList activeJobs = replies.values(); + foreach (QQuickPixmapReply *reply, activeJobs) { if (reply->loading) { cancelled.append(reply); reply->data = 0; @@ -391,9 +391,9 @@ QDeclarativePixmapReader::~QDeclarativePixmapReader() wait(); } -void QDeclarativePixmapReader::networkRequestDone(QNetworkReply *reply) +void QQuickPixmapReader::networkRequestDone(QNetworkReply *reply) { - QDeclarativePixmapReply *job = replies.take(reply); + QQuickPixmapReply *job = replies.take(reply); if (job) { job->redirectCount++; @@ -416,23 +416,23 @@ void QDeclarativePixmapReader::networkRequestDone(QNetworkReply *reply) } QImage image; - QDeclarativePixmapReply::ReadError error = QDeclarativePixmapReply::NoError; + QQuickPixmapReply::ReadError error = QQuickPixmapReply::NoError; QString errorString; QSize readSize; if (reply->error()) { - error = QDeclarativePixmapReply::Loading; + error = QQuickPixmapReply::Loading; errorString = reply->errorString(); } else { QByteArray all = reply->readAll(); QBuffer buff(&all); buff.open(QIODevice::ReadOnly); if (!readImage(reply->url(), &buff, &image, &errorString, &readSize, job->requestSize)) - error = QDeclarativePixmapReply::Decoding; + error = QQuickPixmapReply::Decoding; } - // send completion event to the QDeclarativePixmapReply + // send completion event to the QQuickPixmapReply mutex.lock(); if (!cancelled.contains(job)) { - QDeclarativeTextureFactory *factory = QSGContext::createTextureFactoryFromImage(image); + QQuickTextureFactory *factory = QSGContext::createTextureFactoryFromImage(image); if (factory) job->postReply(error, errorString, readSize, factory, image); else @@ -446,17 +446,17 @@ void QDeclarativePixmapReader::networkRequestDone(QNetworkReply *reply) threadObject->processJobs(); } -QDeclarativePixmapReaderThreadObject::QDeclarativePixmapReaderThreadObject(QDeclarativePixmapReader *i) +QQuickPixmapReaderThreadObject::QQuickPixmapReaderThreadObject(QQuickPixmapReader *i) : reader(i) { } -void QDeclarativePixmapReaderThreadObject::processJobs() +void QQuickPixmapReaderThreadObject::processJobs() { QCoreApplication::postEvent(this, new QEvent(QEvent::User)); } -bool QDeclarativePixmapReaderThreadObject::event(QEvent *e) +bool QQuickPixmapReaderThreadObject::event(QEvent *e) { if (e->type() == QEvent::User) { reader->processJobs(); @@ -466,13 +466,13 @@ bool QDeclarativePixmapReaderThreadObject::event(QEvent *e) } } -void QDeclarativePixmapReaderThreadObject::networkRequestDone() +void QQuickPixmapReaderThreadObject::networkRequestDone() { QNetworkReply *reply = static_cast(sender()); reader->networkRequestDone(reply); } -void QDeclarativePixmapReader::processJobs() +void QQuickPixmapReader::processJobs() { QMutexLocker locker(&mutex); @@ -483,7 +483,7 @@ void QDeclarativePixmapReader::processJobs() // Clean cancelled jobs if (cancelled.count()) { for (int i = 0; i < cancelled.count(); ++i) { - QDeclarativePixmapReply *job = cancelled.at(i); + QQuickPixmapReply *job = cancelled.at(i); QNetworkReply *reply = replies.key(job, 0); if (reply && reply->isRunning()) { // cancel any jobs already started @@ -497,7 +497,7 @@ void QDeclarativePixmapReader::processJobs() } if (!jobs.isEmpty() && replies.count() < IMAGEREQUEST_MAX_REQUEST_COUNT) { - QDeclarativePixmapReply *runningJob = jobs.takeLast(); + QQuickPixmapReply *runningJob = jobs.takeLast(); runningJob->loading = true; QUrl url = runningJob->url; @@ -509,34 +509,34 @@ void QDeclarativePixmapReader::processJobs() } } -void QDeclarativePixmapReader::processJob(QDeclarativePixmapReply *runningJob, const QUrl &url, +void QQuickPixmapReader::processJob(QQuickPixmapReply *runningJob, const QUrl &url, const QSize &requestSize) { // fetch if (url.scheme() == QLatin1String("image")) { // Use QmlImageProvider QSize readSize; - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); - QDeclarativeImageProvider::ImageType imageType = ep->getImageProviderType(url); - if (imageType == QDeclarativeImageProvider::Invalid) { - QDeclarativePixmapReply::ReadError errorCode = QDeclarativePixmapReply::Loading; - QString errorStr = QDeclarativePixmap::tr("Invalid image provider: %1").arg(url.toString()); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); + QQmlImageProvider::ImageType imageType = ep->getImageProviderType(url); + if (imageType == QQmlImageProvider::Invalid) { + QQuickPixmapReply::ReadError errorCode = QQuickPixmapReply::Loading; + QString errorStr = QQuickPixmap::tr("Invalid image provider: %1").arg(url.toString()); QImage image; mutex.lock(); if (!cancelled.contains(runningJob)) runningJob->postReply(errorCode, errorStr, readSize, image); mutex.unlock(); - } else if (imageType == QDeclarativeImageProvider::Image) { + } else if (imageType == QQmlImageProvider::Image) { QImage image = ep->getImageFromProvider(url, &readSize, requestSize); - QDeclarativePixmapReply::ReadError errorCode = QDeclarativePixmapReply::NoError; + QQuickPixmapReply::ReadError errorCode = QQuickPixmapReply::NoError; QString errorStr; if (image.isNull()) { - errorCode = QDeclarativePixmapReply::Loading; - errorStr = QDeclarativePixmap::tr("Failed to get image from provider: %1").arg(url.toString()); + errorCode = QQuickPixmapReply::Loading; + errorStr = QQuickPixmap::tr("Failed to get image from provider: %1").arg(url.toString()); } mutex.lock(); if (!cancelled.contains(runningJob)) { - QDeclarativeTextureFactory *factory = QSGContext::createTextureFactoryFromImage(image); + QQuickTextureFactory *factory = QSGContext::createTextureFactoryFromImage(image); if (factory) runningJob->postReply(errorCode, errorStr, readSize, factory, image); else @@ -545,12 +545,12 @@ void QDeclarativePixmapReader::processJob(QDeclarativePixmapReply *runningJob, c mutex.unlock(); } else { - QDeclarativeTextureFactory *t = ep->getTextureFromProvider(url, &readSize, requestSize); - QDeclarativePixmapReply::ReadError errorCode = QDeclarativePixmapReply::NoError; + QQuickTextureFactory *t = ep->getTextureFromProvider(url, &readSize, requestSize); + QQuickPixmapReply::ReadError errorCode = QQuickPixmapReply::NoError; QString errorStr; if (!t) { - errorCode = QDeclarativePixmapReply::Loading; - errorStr = QDeclarativePixmap::tr("Failed to get texture from provider: %1").arg(url.toString()); + errorCode = QQuickPixmapReply::Loading; + errorStr = QQuickPixmap::tr("Failed to get texture from provider: %1").arg(url.toString()); } mutex.lock(); if (!cancelled.contains(runningJob)) @@ -560,24 +560,24 @@ void QDeclarativePixmapReader::processJob(QDeclarativePixmapReply *runningJob, c } } else { - QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url); + QString lf = QQmlEnginePrivate::urlToLocalFileOrQrc(url); if (!lf.isEmpty()) { // Image is local - load/decode immediately QImage image; - QDeclarativePixmapReply::ReadError errorCode = QDeclarativePixmapReply::NoError; + QQuickPixmapReply::ReadError errorCode = QQuickPixmapReply::NoError; QString errorStr; QFile f(lf); QSize readSize; if (f.open(QIODevice::ReadOnly)) { if (!readImage(url, &f, &image, &errorStr, &readSize, requestSize)) - errorCode = QDeclarativePixmapReply::Loading; + errorCode = QQuickPixmapReply::Loading; } else { - errorStr = QDeclarativePixmap::tr("Cannot open: %1").arg(url.toString()); - errorCode = QDeclarativePixmapReply::Loading; + errorStr = QQuickPixmap::tr("Cannot open: %1").arg(url.toString()); + errorCode = QQuickPixmapReply::Loading; } mutex.lock(); if (!cancelled.contains(runningJob)) { - QDeclarativeTextureFactory *factory = QSGContext::createTextureFactoryFromImage(image); + QQuickTextureFactory *factory = QSGContext::createTextureFactoryFromImage(image); if (factory) runningJob->postReply(errorCode, errorStr, readSize, factory, image); else @@ -598,28 +598,28 @@ void QDeclarativePixmapReader::processJob(QDeclarativePixmapReply *runningJob, c } } -QDeclarativePixmapReader *QDeclarativePixmapReader::instance(QDeclarativeEngine *engine) +QQuickPixmapReader *QQuickPixmapReader::instance(QQmlEngine *engine) { // XXX NOTE: must be called within readerMutex locking. - QDeclarativePixmapReader *reader = readers.value(engine); + QQuickPixmapReader *reader = readers.value(engine); if (!reader) { - reader = new QDeclarativePixmapReader(engine); + reader = new QQuickPixmapReader(engine); readers.insert(engine, reader); } return reader; } -QDeclarativePixmapReader *QDeclarativePixmapReader::existingInstance(QDeclarativeEngine *engine) +QQuickPixmapReader *QQuickPixmapReader::existingInstance(QQmlEngine *engine) { // XXX NOTE: must be called within readerMutex locking. return readers.value(engine, 0); } -QDeclarativePixmapReply *QDeclarativePixmapReader::getImage(QDeclarativePixmapData *data) +QQuickPixmapReply *QQuickPixmapReader::getImage(QQuickPixmapData *data) { mutex.lock(); - QDeclarativePixmapReply *reply = new QDeclarativePixmapReply(data); + QQuickPixmapReply *reply = new QQuickPixmapReply(data); reply->engineForReader = engine; jobs.append(reply); // XXX @@ -628,7 +628,7 @@ QDeclarativePixmapReply *QDeclarativePixmapReader::getImage(QDeclarativePixmapDa return reply; } -void QDeclarativePixmapReader::cancel(QDeclarativePixmapReply *reply) +void QQuickPixmapReader::cancel(QQuickPixmapReply *reply) { mutex.lock(); if (reply->loading) { @@ -643,12 +643,12 @@ void QDeclarativePixmapReader::cancel(QDeclarativePixmapReply *reply) mutex.unlock(); } -void QDeclarativePixmapReader::run() +void QQuickPixmapReader::run() { if (replyDownloadProgress == -1) { const QMetaObject *nr = &QNetworkReply::staticMetaObject; - const QMetaObject *pr = &QDeclarativePixmapReply::staticMetaObject; - const QMetaObject *ir = &QDeclarativePixmapReaderThreadObject::staticMetaObject; + const QMetaObject *pr = &QQuickPixmapReply::staticMetaObject; + const QMetaObject *ir = &QQuickPixmapReaderThreadObject::staticMetaObject; replyDownloadProgress = nr->indexOfSignal("downloadProgress(qint64,qint64)"); replyFinished = nr->indexOfSignal("finished()"); downloadProgress = pr->indexOfSignal("downloadProgress(qint64,qint64)"); @@ -656,7 +656,7 @@ void QDeclarativePixmapReader::run() } mutex.lock(); - threadObject = new QDeclarativePixmapReaderThreadObject(this); + threadObject = new QQuickPixmapReaderThreadObject(this); mutex.unlock(); processJobs(); @@ -666,34 +666,34 @@ void QDeclarativePixmapReader::run() threadObject = 0; } -class QDeclarativePixmapKey +class QQuickPixmapKey { public: const QUrl *url; const QSize *size; }; -inline bool operator==(const QDeclarativePixmapKey &lhs, const QDeclarativePixmapKey &rhs) +inline bool operator==(const QQuickPixmapKey &lhs, const QQuickPixmapKey &rhs) { return *lhs.size == *rhs.size && *lhs.url == *rhs.url; } -inline uint qHash(const QDeclarativePixmapKey &key) +inline uint qHash(const QQuickPixmapKey &key) { return qHash(*key.url) ^ key.size->width() ^ key.size->height(); } class QSGContext; -class QDeclarativePixmapStore : public QObject +class QQuickPixmapStore : public QObject { Q_OBJECT public: - QDeclarativePixmapStore(); - ~QDeclarativePixmapStore(); + QQuickPixmapStore(); + ~QQuickPixmapStore(); - void unreferencePixmap(QDeclarativePixmapData *); - void referencePixmap(QDeclarativePixmapData *); + void unreferencePixmap(QQuickPixmapData *); + void referencePixmap(QQuickPixmapData *); void purgeCache(); @@ -701,32 +701,32 @@ class QDeclarativePixmapStore : public QObject virtual void timerEvent(QTimerEvent *); public: - QHash m_cache; + QHash m_cache; private: void shrinkCache(int remove); - QDeclarativePixmapData *m_unreferencedPixmaps; - QDeclarativePixmapData *m_lastUnreferencedPixmap; + QQuickPixmapData *m_unreferencedPixmaps; + QQuickPixmapData *m_lastUnreferencedPixmap; int m_unreferencedCost; int m_timerId; bool m_destroying; }; -Q_GLOBAL_STATIC(QDeclarativePixmapStore, pixmapStore); +Q_GLOBAL_STATIC(QQuickPixmapStore, pixmapStore); -QDeclarativePixmapStore::QDeclarativePixmapStore() +QQuickPixmapStore::QQuickPixmapStore() : m_unreferencedPixmaps(0), m_lastUnreferencedPixmap(0), m_unreferencedCost(0), m_timerId(-1), m_destroying(false) { } -QDeclarativePixmapStore::~QDeclarativePixmapStore() +QQuickPixmapStore::~QQuickPixmapStore() { m_destroying = true; int leakedPixmaps = 0; - QList cachedData = m_cache.values(); + QList cachedData = m_cache.values(); // Prevent unreferencePixmap() from assuming it needs to kick // off the cache expiry timer, as we're shrinking the cache @@ -734,7 +734,7 @@ QDeclarativePixmapStore::~QDeclarativePixmapStore() m_timerId = -2; // unreference all (leaked) pixmaps - foreach (QDeclarativePixmapData* pixmap, cachedData) { + foreach (QQuickPixmapData* pixmap, cachedData) { int currRefCount = pixmap->refCount; if (currRefCount) { leakedPixmaps++; @@ -754,7 +754,7 @@ QDeclarativePixmapStore::~QDeclarativePixmapStore() qDebug("Number of leaked pixmaps: %i", leakedPixmaps); } -void QDeclarativePixmapStore::unreferencePixmap(QDeclarativePixmapData *data) +void QQuickPixmapStore::unreferencePixmap(QQuickPixmapData *data) { Q_ASSERT(data->prevUnreferenced == 0); Q_ASSERT(data->prevUnreferencedPtr == 0); @@ -780,7 +780,7 @@ void QDeclarativePixmapStore::unreferencePixmap(QDeclarativePixmapData *data) m_timerId = startTimer(CACHE_EXPIRE_TIME * 1000); } -void QDeclarativePixmapStore::referencePixmap(QDeclarativePixmapData *data) +void QQuickPixmapStore::referencePixmap(QQuickPixmapData *data) { Q_ASSERT(data->prevUnreferencedPtr); @@ -799,10 +799,10 @@ void QDeclarativePixmapStore::referencePixmap(QDeclarativePixmapData *data) m_unreferencedCost -= data->cost(); } -void QDeclarativePixmapStore::shrinkCache(int remove) +void QQuickPixmapStore::shrinkCache(int remove) { while ((remove > 0 || m_unreferencedCost > cache_limit) && m_lastUnreferencedPixmap) { - QDeclarativePixmapData *data = m_lastUnreferencedPixmap; + QQuickPixmapData *data = m_lastUnreferencedPixmap; Q_ASSERT(data->nextUnreferenced == 0); *data->prevUnreferencedPtr = 0; @@ -817,7 +817,7 @@ void QDeclarativePixmapStore::shrinkCache(int remove) } } -void QDeclarativePixmapStore::timerEvent(QTimerEvent *) +void QQuickPixmapStore::timerEvent(QTimerEvent *) { int removalCost = m_unreferencedCost / CACHE_REMOVAL_FRACTION; @@ -829,38 +829,38 @@ void QDeclarativePixmapStore::timerEvent(QTimerEvent *) } } -void QDeclarativePixmapStore::purgeCache() +void QQuickPixmapStore::purgeCache() { shrinkCache(m_unreferencedCost); } -void QDeclarativePixmap::purgeCache() +void QQuickPixmap::purgeCache() { pixmapStore()->purgeCache(); } -QDeclarativePixmapReply::QDeclarativePixmapReply(QDeclarativePixmapData *d) +QQuickPixmapReply::QQuickPixmapReply(QQuickPixmapData *d) : data(d), engineForReader(0), requestSize(d->requestSize), url(d->url), loading(false), redirectCount(0) { if (finishedIndex == -1) { - finishedIndex = QDeclarativePixmapReply::staticMetaObject.indexOfSignal("finished()"); - downloadProgressIndex = QDeclarativePixmapReply::staticMetaObject.indexOfSignal("downloadProgress(qint64,qint64)"); + finishedIndex = QQuickPixmapReply::staticMetaObject.indexOfSignal("finished()"); + downloadProgressIndex = QQuickPixmapReply::staticMetaObject.indexOfSignal("downloadProgress(qint64,qint64)"); } } -QDeclarativePixmapReply::~QDeclarativePixmapReply() +QQuickPixmapReply::~QQuickPixmapReply() { } -bool QDeclarativePixmapReply::event(QEvent *event) +bool QQuickPixmapReply::event(QEvent *event) { if (event->type() == QEvent::User) { if (data) { Event *de = static_cast(event); - data->pixmapStatus = (de->error == NoError) ? QDeclarativePixmap::Ready : QDeclarativePixmap::Error; + data->pixmapStatus = (de->error == NoError) ? QQuickPixmap::Ready : QQuickPixmap::Error; - if (data->pixmapStatus == QDeclarativePixmap::Ready) { + if (data->pixmapStatus == QQuickPixmap::Ready) { if (de->textureFactory) { data->textureFactory = de->textureFactory; } @@ -882,37 +882,37 @@ bool QDeclarativePixmapReply::event(QEvent *event) } } -int QDeclarativePixmapData::cost() const +int QQuickPixmapData::cost() const { if (textureFactory) return textureFactory->textureByteCount(); return image.byteCount(); } -void QDeclarativePixmapData::addref() +void QQuickPixmapData::addref() { ++refCount; if (prevUnreferencedPtr) pixmapStore()->referencePixmap(this); } -void QDeclarativePixmapData::release() +void QQuickPixmapData::release() { Q_ASSERT(refCount > 0); --refCount; if (refCount == 0) { if (reply) { - QDeclarativePixmapReply *cancelReply = reply; + QQuickPixmapReply *cancelReply = reply; reply->data = 0; reply = 0; - QDeclarativePixmapReader::readerMutex.lock(); - QDeclarativePixmapReader *reader = QDeclarativePixmapReader::existingInstance(cancelReply->engineForReader); + QQuickPixmapReader::readerMutex.lock(); + QQuickPixmapReader *reader = QQuickPixmapReader::existingInstance(cancelReply->engineForReader); if (reader) reader->cancel(cancelReply); - QDeclarativePixmapReader::readerMutex.unlock(); + QQuickPixmapReader::readerMutex.unlock(); } - if (pixmapStatus == QDeclarativePixmap::Ready) { + if (pixmapStatus == QQuickPixmap::Ready) { pixmapStore()->unreferencePixmap(this); } else { removeFromCache(); @@ -921,68 +921,68 @@ void QDeclarativePixmapData::release() } } -void QDeclarativePixmapData::addToCache() +void QQuickPixmapData::addToCache() { if (!inCache) { - QDeclarativePixmapKey key = { &url, &requestSize }; + QQuickPixmapKey key = { &url, &requestSize }; pixmapStore()->m_cache.insert(key, this); inCache = true; } } -void QDeclarativePixmapData::removeFromCache() +void QQuickPixmapData::removeFromCache() { if (inCache) { - QDeclarativePixmapKey key = { &url, &requestSize }; + QQuickPixmapKey key = { &url, &requestSize }; pixmapStore()->m_cache.remove(key); inCache = false; } } -static QDeclarativePixmapData* createPixmapDataSync(QDeclarativePixmap *declarativePixmap, QDeclarativeEngine *engine, const QUrl &url, const QSize &requestSize, bool *ok) +static QQuickPixmapData* createPixmapDataSync(QQuickPixmap *declarativePixmap, QQmlEngine *engine, const QUrl &url, const QSize &requestSize, bool *ok) { if (url.scheme() == QLatin1String("image")) { QSize readSize; - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); - QDeclarativeImageProvider::ImageType imageType = ep->getImageProviderType(url); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); + QQmlImageProvider::ImageType imageType = ep->getImageProviderType(url); switch (imageType) { - case QDeclarativeImageProvider::Invalid: - return new QDeclarativePixmapData(declarativePixmap, url, requestSize, - QDeclarativePixmap::tr("Invalid image provider: %1").arg(url.toString())); - case QDeclarativeImageProvider::Texture: + case QQmlImageProvider::Invalid: + return new QQuickPixmapData(declarativePixmap, url, requestSize, + QQuickPixmap::tr("Invalid image provider: %1").arg(url.toString())); + case QQmlImageProvider::Texture: { - QDeclarativeTextureFactory *texture = ep->getTextureFromProvider(url, &readSize, requestSize); + QQuickTextureFactory *texture = ep->getTextureFromProvider(url, &readSize, requestSize); if (texture) { *ok = true; - return new QDeclarativePixmapData(declarativePixmap, url, texture, QImage(), readSize, requestSize); + return new QQuickPixmapData(declarativePixmap, url, texture, QImage(), readSize, requestSize); } } - case QDeclarativeImageProvider::Image: + case QQmlImageProvider::Image: { QImage image = ep->getImageFromProvider(url, &readSize, requestSize); if (!image.isNull()) { *ok = true; - return new QDeclarativePixmapData(declarativePixmap, url, image, readSize, requestSize); + return new QQuickPixmapData(declarativePixmap, url, image, readSize, requestSize); } } - case QDeclarativeImageProvider::Pixmap: + case QQmlImageProvider::Pixmap: { QPixmap pixmap = ep->getPixmapFromProvider(url, &readSize, requestSize); if (!pixmap.isNull()) { *ok = true; - return new QDeclarativePixmapData(declarativePixmap, url, pixmap.toImage(), readSize, requestSize); + return new QQuickPixmapData(declarativePixmap, url, pixmap.toImage(), readSize, requestSize); } } } // provider has bad image type, or provider returned null image - return new QDeclarativePixmapData(declarativePixmap, url, requestSize, - QDeclarativePixmap::tr("Failed to get image from provider: %1").arg(url.toString())); + return new QQuickPixmapData(declarativePixmap, url, requestSize, + QQuickPixmap::tr("Failed to get image from provider: %1").arg(url.toString())); } - QString localFile = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url); + QString localFile = QQmlEnginePrivate::urlToLocalFileOrQrc(url); if (localFile.isEmpty()) return 0; @@ -995,42 +995,42 @@ static QDeclarativePixmapData* createPixmapDataSync(QDeclarativePixmap *declarat if (readImage(url, &f, &image, &errorString, &readSize, requestSize)) { *ok = true; - return new QDeclarativePixmapData(declarativePixmap, url, image, readSize, requestSize); + return new QQuickPixmapData(declarativePixmap, url, image, readSize, requestSize); } - errorString = QDeclarativePixmap::tr("Invalid image data: %1").arg(url.toString()); + errorString = QQuickPixmap::tr("Invalid image data: %1").arg(url.toString()); } else { - errorString = QDeclarativePixmap::tr("Cannot open: %1").arg(url.toString()); + errorString = QQuickPixmap::tr("Cannot open: %1").arg(url.toString()); } - return new QDeclarativePixmapData(declarativePixmap, url, requestSize, errorString); + return new QQuickPixmapData(declarativePixmap, url, requestSize, errorString); } -struct QDeclarativePixmapNull { +struct QQuickPixmapNull { QUrl url; QImage image; QSize size; }; -Q_GLOBAL_STATIC(QDeclarativePixmapNull, nullPixmap); +Q_GLOBAL_STATIC(QQuickPixmapNull, nullPixmap); -QDeclarativePixmap::QDeclarativePixmap() +QQuickPixmap::QQuickPixmap() : d(0) { } -QDeclarativePixmap::QDeclarativePixmap(QDeclarativeEngine *engine, const QUrl &url) +QQuickPixmap::QQuickPixmap(QQmlEngine *engine, const QUrl &url) : d(0) { load(engine, url); } -QDeclarativePixmap::QDeclarativePixmap(QDeclarativeEngine *engine, const QUrl &url, const QSize &size) +QQuickPixmap::QQuickPixmap(QQmlEngine *engine, const QUrl &url, const QSize &size) : d(0) { load(engine, url, size); } -QDeclarativePixmap::~QDeclarativePixmap() +QQuickPixmap::~QQuickPixmap() { if (d) { d->declarativePixmaps.remove(this); @@ -1039,27 +1039,27 @@ QDeclarativePixmap::~QDeclarativePixmap() } } -bool QDeclarativePixmap::isNull() const +bool QQuickPixmap::isNull() const { return d == 0; } -bool QDeclarativePixmap::isReady() const +bool QQuickPixmap::isReady() const { return status() == Ready; } -bool QDeclarativePixmap::isError() const +bool QQuickPixmap::isError() const { return status() == Error; } -bool QDeclarativePixmap::isLoading() const +bool QQuickPixmap::isLoading() const { return status() == Loading; } -QString QDeclarativePixmap::error() const +QString QQuickPixmap::error() const { if (d) return d->errorString; @@ -1067,7 +1067,7 @@ QString QDeclarativePixmap::error() const return QString(); } -QDeclarativePixmap::Status QDeclarativePixmap::status() const +QQuickPixmap::Status QQuickPixmap::status() const { if (d) return d->pixmapStatus; @@ -1075,7 +1075,7 @@ QDeclarativePixmap::Status QDeclarativePixmap::status() const return Null; } -const QUrl &QDeclarativePixmap::url() const +const QUrl &QQuickPixmap::url() const { if (d) return d->url; @@ -1083,7 +1083,7 @@ const QUrl &QDeclarativePixmap::url() const return nullPixmap()->url; } -const QSize &QDeclarativePixmap::implicitSize() const +const QSize &QQuickPixmap::implicitSize() const { if (d) return d->implicitSize; @@ -1091,7 +1091,7 @@ const QSize &QDeclarativePixmap::implicitSize() const return nullPixmap()->size; } -const QSize &QDeclarativePixmap::requestSize() const +const QSize &QQuickPixmap::requestSize() const { if (d) return d->requestSize; @@ -1099,7 +1099,7 @@ const QSize &QDeclarativePixmap::requestSize() const return nullPixmap()->size; } -QDeclarativeTextureFactory *QDeclarativePixmap::textureFactory() const +QQuickTextureFactory *QQuickPixmap::textureFactory() const { if (d) return d->textureFactory; @@ -1107,7 +1107,7 @@ QDeclarativeTextureFactory *QDeclarativePixmap::textureFactory() const return 0; } -const QImage &QDeclarativePixmap::image() const +const QImage &QQuickPixmap::image() const { if (d) return d->image; @@ -1115,15 +1115,15 @@ const QImage &QDeclarativePixmap::image() const return nullPixmap()->image; } -void QDeclarativePixmap::setImage(const QImage &p) +void QQuickPixmap::setImage(const QImage &p) { clear(); if (!p.isNull()) - d = new QDeclarativePixmapData(this, p); + d = new QQuickPixmapData(this, p); } -int QDeclarativePixmap::width() const +int QQuickPixmap::width() const { if (d) return d->textureFactory ? d->textureFactory->textureSize().width() : d->image.width(); @@ -1131,7 +1131,7 @@ int QDeclarativePixmap::width() const return 0; } -int QDeclarativePixmap::height() const +int QQuickPixmap::height() const { if (d) return d->textureFactory ? d->textureFactory->textureSize().height() : d->image.height(); @@ -1139,7 +1139,7 @@ int QDeclarativePixmap::height() const return 0; } -QRect QDeclarativePixmap::rect() const +QRect QQuickPixmap::rect() const { if (d) return d->textureFactory ? QRect(QPoint(), d->textureFactory->textureSize()) : d->image.rect(); @@ -1147,22 +1147,22 @@ QRect QDeclarativePixmap::rect() const return QRect(); } -void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url) +void QQuickPixmap::load(QQmlEngine *engine, const QUrl &url) { - load(engine, url, QSize(), QDeclarativePixmap::Cache); + load(engine, url, QSize(), QQuickPixmap::Cache); } -void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, QDeclarativePixmap::Options options) +void QQuickPixmap::load(QQmlEngine *engine, const QUrl &url, QQuickPixmap::Options options) { load(engine, url, QSize(), options); } -void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const QSize &size) +void QQuickPixmap::load(QQmlEngine *engine, const QUrl &url, const QSize &size) { - load(engine, url, size, QDeclarativePixmap::Cache); + load(engine, url, size, QQuickPixmap::Cache); } -void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const QSize &requestSize, QDeclarativePixmap::Options options) +void QQuickPixmap::load(QQmlEngine *engine, const QUrl &url, const QSize &requestSize, QQuickPixmap::Options options) { if (d) { d->declarativePixmaps.remove(this); @@ -1170,25 +1170,25 @@ void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const d = 0; } - QDeclarativePixmapKey key = { &url, &requestSize }; - QDeclarativePixmapStore *store = pixmapStore(); + QQuickPixmapKey key = { &url, &requestSize }; + QQuickPixmapStore *store = pixmapStore(); - QHash::Iterator iter = store->m_cache.find(key); + QHash::Iterator iter = store->m_cache.find(key); if (iter == store->m_cache.end()) { - if (options & QDeclarativePixmap::Asynchronous) { + if (options & QQuickPixmap::Asynchronous) { // pixmaps can only be loaded synchronously if (url.scheme() == QLatin1String("image") - && QDeclarativeEnginePrivate::get(engine)->getImageProviderType(url) == QDeclarativeImageProvider::Pixmap) { - options &= ~QDeclarativePixmap::Asynchronous; + && QQmlEnginePrivate::get(engine)->getImageProviderType(url) == QQmlImageProvider::Pixmap) { + options &= ~QQuickPixmap::Asynchronous; } } - if (!(options & QDeclarativePixmap::Asynchronous)) { + if (!(options & QQuickPixmap::Asynchronous)) { bool ok = false; d = createPixmapDataSync(this, engine, url, requestSize, &ok); if (ok) { - if (options & QDeclarativePixmap::Cache) + if (options & QQuickPixmap::Cache) d->addToCache(); return; } @@ -1199,13 +1199,13 @@ void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const if (!engine) return; - d = new QDeclarativePixmapData(this, url, requestSize); - if (options & QDeclarativePixmap::Cache) + d = new QQuickPixmapData(this, url, requestSize); + if (options & QQuickPixmap::Cache) d->addToCache(); - QDeclarativePixmapReader::readerMutex.lock(); - d->reply = QDeclarativePixmapReader::instance(engine)->getImage(d); - QDeclarativePixmapReader::readerMutex.unlock(); + QQuickPixmapReader::readerMutex.lock(); + d->reply = QQuickPixmapReader::instance(engine)->getImage(d); + QQuickPixmapReader::readerMutex.unlock(); } else { d = *iter; d->addref(); @@ -1213,7 +1213,7 @@ void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const } } -void QDeclarativePixmap::clear() +void QQuickPixmap::clear() { if (d) { d->declarativePixmaps.remove(this); @@ -1222,7 +1222,7 @@ void QDeclarativePixmap::clear() } } -void QDeclarativePixmap::clear(QObject *obj) +void QQuickPixmap::clear(QObject *obj) { if (d) { if (d->reply) @@ -1233,46 +1233,46 @@ void QDeclarativePixmap::clear(QObject *obj) } } -bool QDeclarativePixmap::connectFinished(QObject *object, const char *method) +bool QQuickPixmap::connectFinished(QObject *object, const char *method) { if (!d || !d->reply) { - qWarning("QDeclarativePixmap: connectFinished() called when not loading."); + qWarning("QQuickPixmap: connectFinished() called when not loading."); return false; } return QObject::connect(d->reply, SIGNAL(finished()), object, method); } -bool QDeclarativePixmap::connectFinished(QObject *object, int method) +bool QQuickPixmap::connectFinished(QObject *object, int method) { if (!d || !d->reply) { - qWarning("QDeclarativePixmap: connectFinished() called when not loading."); + qWarning("QQuickPixmap: connectFinished() called when not loading."); return false; } - return QMetaObject::connect(d->reply, QDeclarativePixmapReply::finishedIndex, object, method); + return QMetaObject::connect(d->reply, QQuickPixmapReply::finishedIndex, object, method); } -bool QDeclarativePixmap::connectDownloadProgress(QObject *object, const char *method) +bool QQuickPixmap::connectDownloadProgress(QObject *object, const char *method) { if (!d || !d->reply) { - qWarning("QDeclarativePixmap: connectDownloadProgress() called when not loading."); + qWarning("QQuickPixmap: connectDownloadProgress() called when not loading."); return false; } return QObject::connect(d->reply, SIGNAL(downloadProgress(qint64,qint64)), object, method); } -bool QDeclarativePixmap::connectDownloadProgress(QObject *object, int method) +bool QQuickPixmap::connectDownloadProgress(QObject *object, int method) { if (!d || !d->reply) { - qWarning("QDeclarativePixmap: connectDownloadProgress() called when not loading."); + qWarning("QQuickPixmap: connectDownloadProgress() called when not loading."); return false; } - return QMetaObject::connect(d->reply, QDeclarativePixmapReply::downloadProgressIndex, object, method); + return QMetaObject::connect(d->reply, QQuickPixmapReply::downloadProgressIndex, object, method); } QT_END_NAMESPACE -#include +#include diff --git a/src/quick/util/qdeclarativepixmapcache_p.h b/src/quick/util/qquickpixmapcache_p.h similarity index 71% rename from src/quick/util/qdeclarativepixmapcache_p.h rename to src/quick/util/qquickpixmapcache_p.h index 69cd84c465..0b4c2fb473 100644 --- a/src/quick/util/qdeclarativepixmapcache_p.h +++ b/src/quick/util/qquickpixmapcache_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPIXMAPCACHE_H -#define QDECLARATIVEPIXMAPCACHE_H +#ifndef QQUICKPIXMAPCACHE_H +#define QQUICKPIXMAPCACHE_H #include #include @@ -49,21 +49,21 @@ #include #include -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeEngine; -class QDeclarativePixmapData; -class QDeclarativeTextureFactory; +class QQmlEngine; +class QQuickPixmapData; +class QQuickTextureFactory; -class QDeclarativeDefaultTextureFactory : public QDeclarativeTextureFactory +class QQuickDefaultTextureFactory : public QQuickTextureFactory { Q_OBJECT public: - QDeclarativeDefaultTextureFactory(const QImage &i) + QQuickDefaultTextureFactory(const QImage &i) : im(i) { } @@ -77,14 +77,14 @@ class QDeclarativeDefaultTextureFactory : public QDeclarativeTextureFactory QImage im; }; -class Q_QUICK_EXPORT QDeclarativePixmap +class Q_QUICK_EXPORT QQuickPixmap { - Q_DECLARE_TR_FUNCTIONS(QDeclarativePixmap) + Q_DECLARE_TR_FUNCTIONS(QQuickPixmap) public: - QDeclarativePixmap(); - QDeclarativePixmap(QDeclarativeEngine *, const QUrl &); - QDeclarativePixmap(QDeclarativeEngine *, const QUrl &, const QSize &); - ~QDeclarativePixmap(); + QQuickPixmap(); + QQuickPixmap(QQmlEngine *, const QUrl &); + QQuickPixmap(QQmlEngine *, const QUrl &, const QSize &); + ~QQuickPixmap(); enum Status { Null, Ready, Error, Loading }; @@ -107,16 +107,16 @@ class Q_QUICK_EXPORT QDeclarativePixmap const QImage &image() const; void setImage(const QImage &); - QDeclarativeTextureFactory *textureFactory() const; + QQuickTextureFactory *textureFactory() const; QRect rect() const; int width() const; int height() const; - void load(QDeclarativeEngine *, const QUrl &); - void load(QDeclarativeEngine *, const QUrl &, QDeclarativePixmap::Options options); - void load(QDeclarativeEngine *, const QUrl &, const QSize &); - void load(QDeclarativeEngine *, const QUrl &, const QSize &, QDeclarativePixmap::Options options); + void load(QQmlEngine *, const QUrl &); + void load(QQmlEngine *, const QUrl &, QQuickPixmap::Options options); + void load(QQmlEngine *, const QUrl &, const QSize &); + void load(QQmlEngine *, const QUrl &, const QSize &, QQuickPixmap::Options options); void clear(); void clear(QObject *); @@ -129,16 +129,16 @@ class Q_QUICK_EXPORT QDeclarativePixmap static void purgeCache(); private: - Q_DISABLE_COPY(QDeclarativePixmap) - QDeclarativePixmapData *d; + Q_DISABLE_COPY(QQuickPixmap) + QQuickPixmapData *d; QIntrusiveListNode dataListNode; - friend class QDeclarativePixmapData; + friend class QQuickPixmapData; }; -Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativePixmap::Options) +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickPixmap::Options) QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEPIXMAPCACHE_H +#endif // QQUICKPIXMAPCACHE_H diff --git a/src/quick/util/qdeclarativepropertychanges.cpp b/src/quick/util/qquickpropertychanges.cpp similarity index 61% rename from src/quick/util/qdeclarativepropertychanges.cpp rename to src/quick/util/qquickpropertychanges.cpp index 350c84e737..83ddb2530e 100644 --- a/src/quick/util/qdeclarativepropertychanges.cpp +++ b/src/quick/util/qquickpropertychanges.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,22 +39,22 @@ ** ****************************************************************************/ -#include "qdeclarativepropertychanges_p.h" +#include "qquickpropertychanges_p.h" -#include -#include -#include +#include +#include +#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE /*! - \qmlclass PropertyChanges QDeclarativePropertyChanges + \qmlclass PropertyChanges QQuickPropertyChanges \inqmlmodule QtQuick 2 \ingroup qml-state-elements \brief The PropertyChanges element describes new property bindings or values for a state. @@ -76,9 +76,9 @@ QT_BEGIN_NAMESPACE properties are to be modified, and define the new property values or bindings. For example: - \snippet doc/src/snippets/declarative/propertychanges.qml import + \snippet doc/src/snippets/qml/propertychanges.qml import \codeline - \snippet doc/src/snippets/declarative/propertychanges.qml 0 + \snippet doc/src/snippets/qml/propertychanges.qml 0 When the mouse is pressed, the \l Rectangle changes to the \e resized state. In this state, the PropertyChanges object sets the rectangle's @@ -112,7 +112,7 @@ QT_BEGIN_NAMESPACE state, its \c width property is reset, giving the text its natural width and displaying the whole string on a single line. - \snippet doc/src/snippets/declarative/propertychanges.qml reset + \snippet doc/src/snippets/qml/propertychanges.qml reset \section2 Immediate property changes in transitions @@ -127,7 +127,7 @@ QT_BEGIN_NAMESPACE See the PropertyAction documentation for more details. - \sa {declarative/animation/states}{states example}, {qmlstate}{States}, QtDeclarative + \sa {declarative/animation/states}{states example}, {qmlstate}{States}, QtQml */ /*! @@ -135,32 +135,32 @@ QT_BEGIN_NAMESPACE This property holds the object which contains the properties to be changed. */ -class QDeclarativeReplaceSignalHandler : public QDeclarativeActionEvent +class QQuickReplaceSignalHandler : public QQuickActionEvent { public: - QDeclarativeReplaceSignalHandler() : expression(0), reverseExpression(0), + QQuickReplaceSignalHandler() : expression(0), reverseExpression(0), rewindExpression(0), ownedExpression(0) {} - ~QDeclarativeReplaceSignalHandler() { + ~QQuickReplaceSignalHandler() { delete ownedExpression; } virtual EventType type() const { return SignalHandler; } - QDeclarativeProperty property; - QDeclarativeExpression *expression; - QDeclarativeExpression *reverseExpression; - QDeclarativeExpression *rewindExpression; - QDeclarativeGuard ownedExpression; + QQmlProperty property; + QQmlExpression *expression; + QQmlExpression *reverseExpression; + QQmlExpression *rewindExpression; + QQmlGuard ownedExpression; virtual void execute(Reason) { - ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, expression); + ownedExpression = QQmlPropertyPrivate::setSignalExpression(property, expression); if (ownedExpression == expression) ownedExpression = 0; } virtual bool isReversable() { return true; } virtual void reverse(Reason) { - ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, reverseExpression); + ownedExpression = QQmlPropertyPrivate::setSignalExpression(property, reverseExpression); if (ownedExpression == reverseExpression) ownedExpression = 0; } @@ -171,9 +171,9 @@ class QDeclarativeReplaceSignalHandler : public QDeclarativeActionEvent } virtual bool needsCopy() { return true; } - virtual void copyOriginals(QDeclarativeActionEvent *other) + virtual void copyOriginals(QQuickActionEvent *other) { - QDeclarativeReplaceSignalHandler *rsh = static_cast(other); + QQuickReplaceSignalHandler *rsh = static_cast(other); saveCurrentValues(); if (rsh == this) return; @@ -185,34 +185,34 @@ class QDeclarativeReplaceSignalHandler : public QDeclarativeActionEvent } virtual void rewind() { - ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, rewindExpression); + ownedExpression = QQmlPropertyPrivate::setSignalExpression(property, rewindExpression); if (ownedExpression == rewindExpression) ownedExpression = 0; } virtual void saveCurrentValues() { - rewindExpression = QDeclarativePropertyPrivate::signalExpression(property); + rewindExpression = QQmlPropertyPrivate::signalExpression(property); } - virtual bool override(QDeclarativeActionEvent*other) { + virtual bool override(QQuickActionEvent*other) { if (other == this) return true; if (other->type() != type()) return false; - if (static_cast(other)->property == property) + if (static_cast(other)->property == property) return true; return false; } }; -class QDeclarativePropertyChangesPrivate : public QDeclarativeStateOperationPrivate +class QQuickPropertyChangesPrivate : public QQuickStateOperationPrivate { - Q_DECLARE_PUBLIC(QDeclarativePropertyChanges) + Q_DECLARE_PUBLIC(QQuickPropertyChanges) public: - QDeclarativePropertyChangesPrivate() : decoded(true), restore(true), + QQuickPropertyChangesPrivate() : decoded(true), restore(true), isExplicit(false) {} - QDeclarativeGuard object; + QQmlGuard object; QByteArray data; bool decoded : 1; @@ -224,25 +224,25 @@ class QDeclarativePropertyChangesPrivate : public QDeclarativeStateOperationPriv class ExpressionChange { public: ExpressionChange(const QString &_name, - QDeclarativeBinding::Identifier _id, - QDeclarativeExpression *_expr) + QQmlBinding::Identifier _id, + QQmlExpression *_expr) : name(_name), id(_id), expression(_expr) {} QString name; - QDeclarativeBinding::Identifier id; - QDeclarativeExpression *expression; + QQmlBinding::Identifier id; + QQmlExpression *expression; }; QList > properties; QList expressions; - QList signalReplacements; + QList signalReplacements; - QDeclarativeProperty property(const QString &); + QQmlProperty property(const QString &); }; void -QDeclarativePropertyChangesParser::compileList(QList > &list, +QQuickPropertyChangesParser::compileList(QList > &list, const QString &pre, - const QDeclarativeCustomParserProperty &prop) + const QQmlCustomParserProperty &prop) { QString propName = pre + prop.name(); @@ -250,14 +250,14 @@ QDeclarativePropertyChangesParser::compileList(QList > for (int ii = 0; ii < values.count(); ++ii) { const QVariant &value = values.at(ii); - if (value.userType() == qMetaTypeId()) { - error(qvariant_cast(value), - QDeclarativePropertyChanges::tr("PropertyChanges does not support creating state-specific objects.")); + if (value.userType() == qMetaTypeId()) { + error(qvariant_cast(value), + QQuickPropertyChanges::tr("PropertyChanges does not support creating state-specific objects.")); continue; - } else if(value.userType() == qMetaTypeId()) { + } else if(value.userType() == qMetaTypeId()) { - QDeclarativeCustomParserProperty prop = - qvariant_cast(value); + QQmlCustomParserProperty prop = + qvariant_cast(value); QString pre = propName + QLatin1Char('.'); compileList(list, pre, prop); @@ -268,7 +268,7 @@ QDeclarativePropertyChangesParser::compileList(QList > } QByteArray -QDeclarativePropertyChangesParser::compile(const QList &props) +QQuickPropertyChangesParser::compile(const QList &props) { QList > data; for(int ii = 0; ii < props.count(); ++ii) @@ -279,22 +279,22 @@ QDeclarativePropertyChangesParser::compile(const QList(data.at(ii).second); + QQmlScript::Variant v = qvariant_cast(data.at(ii).second); QVariant var; bool isScript = v.isScript(); - QDeclarativeBinding::Identifier id = 0; + QQmlBinding::Identifier id = 0; switch(v.type()) { - case QDeclarativeScript::Variant::Boolean: + case QQmlScript::Variant::Boolean: var = QVariant(v.asBoolean()); break; - case QDeclarativeScript::Variant::Number: + case QQmlScript::Variant::Number: var = QVariant(v.asNumber()); break; - case QDeclarativeScript::Variant::String: + case QQmlScript::Variant::String: var = QVariant(v.asString()); break; - case QDeclarativeScript::Variant::Invalid: - case QDeclarativeScript::Variant::Script: + case QQmlScript::Variant::Invalid: + case QQmlScript::Variant::Script: var = QVariant(v.asScript()); { // Pre-rewrite the expression @@ -311,9 +311,9 @@ QDeclarativePropertyChangesParser::compile(const QList> name; ds >> isScript; ds >> data; if (isScript) ds >> id; - QDeclarativeProperty prop = property(name); //### better way to check for signal property? - if (prop.type() & QDeclarativeProperty::SignalProperty) { - QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), object, data.toString()); - QDeclarativeData *ddata = QDeclarativeData::get(q); + QQmlProperty prop = property(name); //### better way to check for signal property? + if (prop.type() & QQmlProperty::SignalProperty) { + QQmlExpression *expression = new QQmlExpression(qmlContext(q), object, data.toString()); + QQmlData *ddata = QQmlData::get(q); if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber, ddata->columnNumber); - QDeclarativeReplaceSignalHandler *handler = new QDeclarativeReplaceSignalHandler; + QQuickReplaceSignalHandler *handler = new QQuickReplaceSignalHandler; handler->property = prop; handler->expression = expression; signalReplacements << handler; } else if (isScript) { - QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), object, data.toString()); - QDeclarativeData *ddata = QDeclarativeData::get(q); + QQmlExpression *expression = new QQmlExpression(qmlContext(q), object, data.toString()); + QQmlData *ddata = QQmlData::get(q); if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber, ddata->columnNumber); expressions << ExpressionChange(name, id, expression); @@ -357,38 +357,38 @@ void QDeclarativePropertyChangesPrivate::decode() data.clear(); } -void QDeclarativePropertyChangesParser::setCustomData(QObject *object, +void QQuickPropertyChangesParser::setCustomData(QObject *object, const QByteArray &data) { - QDeclarativePropertyChangesPrivate *p = - static_cast(QObjectPrivate::get(object)); + QQuickPropertyChangesPrivate *p = + static_cast(QObjectPrivate::get(object)); p->data = data; p->decoded = false; } -QDeclarativePropertyChanges::QDeclarativePropertyChanges() -: QDeclarativeStateOperation(*(new QDeclarativePropertyChangesPrivate)) +QQuickPropertyChanges::QQuickPropertyChanges() +: QQuickStateOperation(*(new QQuickPropertyChangesPrivate)) { } -QDeclarativePropertyChanges::~QDeclarativePropertyChanges() +QQuickPropertyChanges::~QQuickPropertyChanges() { - Q_D(QDeclarativePropertyChanges); + Q_D(QQuickPropertyChanges); for(int ii = 0; ii < d->expressions.count(); ++ii) delete d->expressions.at(ii).expression; for(int ii = 0; ii < d->signalReplacements.count(); ++ii) delete d->signalReplacements.at(ii); } -QObject *QDeclarativePropertyChanges::object() const +QObject *QQuickPropertyChanges::object() const { - Q_D(const QDeclarativePropertyChanges); + Q_D(const QQuickPropertyChanges); return d->object; } -void QDeclarativePropertyChanges::setObject(QObject *o) +void QQuickPropertyChanges::setObject(QObject *o) { - Q_D(QDeclarativePropertyChanges); + Q_D(QQuickPropertyChanges); d->object = o; } @@ -401,36 +401,36 @@ void QDeclarativePropertyChanges::setObject(QObject *o) The default value is \c true. Setting this value to \c false creates a temporary state that has permanent effects on property values. */ -bool QDeclarativePropertyChanges::restoreEntryValues() const +bool QQuickPropertyChanges::restoreEntryValues() const { - Q_D(const QDeclarativePropertyChanges); + Q_D(const QQuickPropertyChanges); return d->restore; } -void QDeclarativePropertyChanges::setRestoreEntryValues(bool v) +void QQuickPropertyChanges::setRestoreEntryValues(bool v) { - Q_D(QDeclarativePropertyChanges); + Q_D(QQuickPropertyChanges); d->restore = v; } -QDeclarativeProperty -QDeclarativePropertyChangesPrivate::property(const QString &property) +QQmlProperty +QQuickPropertyChangesPrivate::property(const QString &property) { - Q_Q(QDeclarativePropertyChanges); - QDeclarativeProperty prop(object, property, qmlContext(q)); + Q_Q(QQuickPropertyChanges); + QQmlProperty prop(object, property, qmlContext(q)); if (!prop.isValid()) { - qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(property); - return QDeclarativeProperty(); - } else if (!(prop.type() & QDeclarativeProperty::SignalProperty) && !prop.isWritable()) { - qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(property); - return QDeclarativeProperty(); + qmlInfo(q) << QQuickPropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(property); + return QQmlProperty(); + } else if (!(prop.type() & QQmlProperty::SignalProperty) && !prop.isWritable()) { + qmlInfo(q) << QQuickPropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(property); + return QQmlProperty(); } return prop; } -QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() +QQuickPropertyChanges::ActionList QQuickPropertyChanges::actions() { - Q_D(QDeclarativePropertyChanges); + Q_D(QQuickPropertyChanges); d->decode(); @@ -438,7 +438,7 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() for (int ii = 0; ii < d->properties.count(); ++ii) { - QDeclarativeAction a(d->object, d->properties.at(ii).first, + QQuickAction a(d->object, d->properties.at(ii).first, qmlContext(this), d->properties.at(ii).second); if (a.property.isValid()) { @@ -449,10 +449,10 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() for (int ii = 0; ii < d->signalReplacements.count(); ++ii) { - QDeclarativeReplaceSignalHandler *handler = d->signalReplacements.at(ii); + QQuickReplaceSignalHandler *handler = d->signalReplacements.at(ii); if (handler->property.isValid()) { - QDeclarativeAction a; + QQuickAction a; a.event = handler; list << a; } @@ -461,10 +461,10 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() for (int ii = 0; ii < d->expressions.count(); ++ii) { const QString &property = d->expressions.at(ii).name; - QDeclarativeProperty prop = d->property(property); + QQmlProperty prop = d->property(property); if (prop.isValid()) { - QDeclarativeAction a; + QQuickAction a; a.restore = restoreEntryValues(); a.property = prop; a.fromValue = a.property.read(); @@ -474,12 +474,12 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() if (d->isExplicit) { a.toValue = d->expressions.at(ii).expression->evaluate(); } else { - QDeclarativeExpression *e = d->expressions.at(ii).expression; + QQmlExpression *e = d->expressions.at(ii).expression; - QDeclarativeBinding::Identifier id = d->expressions.at(ii).id; - QDeclarativeBinding *newBinding = id != QDeclarativeBinding::Invalid ? QDeclarativeBinding::createBinding(id, object(), qmlContext(this), e->sourceFile(), e->lineNumber()) : 0; + QQmlBinding::Identifier id = d->expressions.at(ii).id; + QQmlBinding *newBinding = id != QQmlBinding::Invalid ? QQmlBinding::createBinding(id, object(), qmlContext(this), e->sourceFile(), e->lineNumber()) : 0; if (!newBinding) { - newBinding = new QDeclarativeBinding(e->expression(), object(), qmlContext(this)); + newBinding = new QQmlBinding(e->expression(), object(), qmlContext(this)); newBinding->setSourceLocation(e->sourceFile(), e->lineNumber(), e->columnNumber()); } newBinding->setTarget(prop); @@ -513,21 +513,21 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() By default, explicit is false. */ -bool QDeclarativePropertyChanges::isExplicit() const +bool QQuickPropertyChanges::isExplicit() const { - Q_D(const QDeclarativePropertyChanges); + Q_D(const QQuickPropertyChanges); return d->isExplicit; } -void QDeclarativePropertyChanges::setIsExplicit(bool e) +void QQuickPropertyChanges::setIsExplicit(bool e) { - Q_D(QDeclarativePropertyChanges); + Q_D(QQuickPropertyChanges); d->isExplicit = e; } -bool QDeclarativePropertyChanges::containsValue(const QString &name) const +bool QQuickPropertyChanges::containsValue(const QString &name) const { - Q_D(const QDeclarativePropertyChanges); + Q_D(const QQuickPropertyChanges); typedef QPair PropertyEntry; QListIterator propertyIterator(d->properties); @@ -541,10 +541,10 @@ bool QDeclarativePropertyChanges::containsValue(const QString &name) const return false; } -bool QDeclarativePropertyChanges::containsExpression(const QString &name) const +bool QQuickPropertyChanges::containsExpression(const QString &name) const { - Q_D(const QDeclarativePropertyChanges); - typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; + Q_D(const QQuickPropertyChanges); + typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry; QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { @@ -557,16 +557,16 @@ bool QDeclarativePropertyChanges::containsExpression(const QString &name) const return false; } -bool QDeclarativePropertyChanges::containsProperty(const QString &name) const +bool QQuickPropertyChanges::containsProperty(const QString &name) const { return containsValue(name) || containsExpression(name); } -void QDeclarativePropertyChanges::changeValue(const QString &name, const QVariant &value) +void QQuickPropertyChanges::changeValue(const QString &name, const QVariant &value) { - Q_D(QDeclarativePropertyChanges); + Q_D(QQuickPropertyChanges); typedef QPair PropertyEntry; - typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; + typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry; QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { @@ -574,9 +574,9 @@ void QDeclarativePropertyChanges::changeValue(const QString &name, const QVarian if (entry.name == name) { expressionIterator.remove(); if (state() && state()->isStateActive()) { - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); + QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(d->property(name)); if (oldBinding) { - QDeclarativePropertyPrivate::setBinding(d->property(name), 0); + QQmlPropertyPrivate::setBinding(d->property(name), 0); oldBinding->destroy(); } d->property(name).write(value); @@ -598,7 +598,7 @@ void QDeclarativePropertyChanges::changeValue(const QString &name, const QVarian } } - QDeclarativeAction action; + QQuickAction action; action.restore = restoreEntryValues(); action.property = d->property(name); action.fromValue = action.property.read(); @@ -609,18 +609,18 @@ void QDeclarativePropertyChanges::changeValue(const QString &name, const QVarian propertyIterator.insert(PropertyEntry(name, value)); if (state() && state()->isStateActive()) { state()->addEntryToRevertList(action); - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(action.property); + QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(action.property); if (oldBinding) - oldBinding->setEnabled(false, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + oldBinding->setEnabled(false, QQmlPropertyPrivate::DontRemoveBinding | QQmlPropertyPrivate::BypassInterceptor); d->property(name).write(value); } } -void QDeclarativePropertyChanges::changeExpression(const QString &name, const QString &expression) +void QQuickPropertyChanges::changeExpression(const QString &name, const QString &expression) { - Q_D(QDeclarativePropertyChanges); + Q_D(QQuickPropertyChanges); typedef QPair PropertyEntry; - typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; + typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry; bool hadValue = false; @@ -640,36 +640,36 @@ void QDeclarativePropertyChanges::changeExpression(const QString &name, const QS if (entry.name == name) { entry.expression->setExpression(expression); if (state() && state()->isStateActive()) { - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); + QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(d->property(name)); if (oldBinding) { - QDeclarativePropertyPrivate::setBinding(d->property(name), 0); + QQmlPropertyPrivate::setBinding(d->property(name), 0); oldBinding->destroy(); } - QDeclarativeBinding *newBinding = new QDeclarativeBinding(expression, object(), qmlContext(this)); + QQmlBinding *newBinding = new QQmlBinding(expression, object(), qmlContext(this)); newBinding->setTarget(d->property(name)); - QDeclarativePropertyPrivate::setBinding(d->property(name), newBinding, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + QQmlPropertyPrivate::setBinding(d->property(name), newBinding, QQmlPropertyPrivate::DontRemoveBinding | QQmlPropertyPrivate::BypassInterceptor); } return; } } - QDeclarativeExpression *newExpression = new QDeclarativeExpression(qmlContext(this), d->object, expression); - expressionIterator.insert(ExpressionEntry(name, QDeclarativeBinding::Invalid, newExpression)); + QQmlExpression *newExpression = new QQmlExpression(qmlContext(this), d->object, expression); + expressionIterator.insert(ExpressionEntry(name, QQmlBinding::Invalid, newExpression)); if (state() && state()->isStateActive()) { if (hadValue) { - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); + QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(d->property(name)); if (oldBinding) { - oldBinding->setEnabled(false, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + oldBinding->setEnabled(false, QQmlPropertyPrivate::DontRemoveBinding | QQmlPropertyPrivate::BypassInterceptor); state()->changeBindingInRevertList(object(), name, oldBinding); } - QDeclarativeBinding *newBinding = new QDeclarativeBinding(expression, object(), qmlContext(this)); + QQmlBinding *newBinding = new QQmlBinding(expression, object(), qmlContext(this)); newBinding->setTarget(d->property(name)); - QDeclarativePropertyPrivate::setBinding(d->property(name), newBinding, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + QQmlPropertyPrivate::setBinding(d->property(name), newBinding, QQmlPropertyPrivate::DontRemoveBinding | QQmlPropertyPrivate::BypassInterceptor); } else { - QDeclarativeAction action; + QQuickAction action; action.restore = restoreEntryValues(); action.property = d->property(name); action.fromValue = action.property.read(); @@ -680,28 +680,28 @@ void QDeclarativePropertyChanges::changeExpression(const QString &name, const QS if (d->isExplicit) { action.toValue = newExpression->evaluate(); } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(newExpression->expression(), object(), qmlContext(this)); + QQmlBinding *newBinding = new QQmlBinding(newExpression->expression(), object(), qmlContext(this)); newBinding->setTarget(d->property(name)); action.toBinding = newBinding; action.deletableToBinding = true; state()->addEntryToRevertList(action); - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(action.property); + QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(action.property); if (oldBinding) - oldBinding->setEnabled(false, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + oldBinding->setEnabled(false, QQmlPropertyPrivate::DontRemoveBinding | QQmlPropertyPrivate::BypassInterceptor); - QDeclarativePropertyPrivate::setBinding(action.property, newBinding, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + QQmlPropertyPrivate::setBinding(action.property, newBinding, QQmlPropertyPrivate::DontRemoveBinding | QQmlPropertyPrivate::BypassInterceptor); } } } // what about the signal handler? } -QVariant QDeclarativePropertyChanges::property(const QString &name) const +QVariant QQuickPropertyChanges::property(const QString &name) const { - Q_D(const QDeclarativePropertyChanges); + Q_D(const QQuickPropertyChanges); typedef QPair PropertyEntry; - typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; + typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry; QListIterator propertyIterator(d->properties); while (propertyIterator.hasNext()) { @@ -722,11 +722,11 @@ QVariant QDeclarativePropertyChanges::property(const QString &name) const return QVariant(); } -void QDeclarativePropertyChanges::removeProperty(const QString &name) +void QQuickPropertyChanges::removeProperty(const QString &name) { - Q_D(QDeclarativePropertyChanges); + Q_D(QQuickPropertyChanges); typedef QPair PropertyEntry; - typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; + typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry; QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { @@ -749,9 +749,9 @@ void QDeclarativePropertyChanges::removeProperty(const QString &name) } } -QVariant QDeclarativePropertyChanges::value(const QString &name) const +QVariant QQuickPropertyChanges::value(const QString &name) const { - Q_D(const QDeclarativePropertyChanges); + Q_D(const QQuickPropertyChanges); typedef QPair PropertyEntry; QListIterator propertyIterator(d->properties); @@ -765,10 +765,10 @@ QVariant QDeclarativePropertyChanges::value(const QString &name) const return QVariant(); } -QString QDeclarativePropertyChanges::expression(const QString &name) const +QString QQuickPropertyChanges::expression(const QString &name) const { - Q_D(const QDeclarativePropertyChanges); - typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; + Q_D(const QQuickPropertyChanges); + typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry; QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { @@ -781,13 +781,13 @@ QString QDeclarativePropertyChanges::expression(const QString &name) const return QString(); } -void QDeclarativePropertyChanges::detachFromState() +void QQuickPropertyChanges::detachFromState() { if (state()) state()->removeAllEntriesFromRevertList(object()); } -void QDeclarativePropertyChanges::attachToState() +void QQuickPropertyChanges::attachToState() { if (state()) state()->addEntriesToRevertList(actions()); diff --git a/src/quick/util/qdeclarativepropertychanges_p.h b/src/quick/util/qquickpropertychanges_p.h similarity index 76% rename from src/quick/util/qdeclarativepropertychanges_p.h rename to src/quick/util/qquickpropertychanges_p.h index 2d5838ddf4..313a781302 100644 --- a/src/quick/util/qdeclarativepropertychanges_p.h +++ b/src/quick/util/qquickpropertychanges_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,28 +39,28 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEPROPERTYCHANGES_H -#define QDECLARATIVEPROPERTYCHANGES_H +#ifndef QQUICKPROPERTYCHANGES_H +#define QQUICKPROPERTYCHANGES_H -#include "qdeclarativestateoperations_p.h" -#include +#include "qquickstatechangescript_p.h" +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativePropertyChangesPrivate; -class Q_QUICK_PRIVATE_EXPORT QDeclarativePropertyChanges : public QDeclarativeStateOperation +class QQuickPropertyChangesPrivate; +class Q_QUICK_PRIVATE_EXPORT QQuickPropertyChanges : public QQuickStateOperation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativePropertyChanges) + Q_DECLARE_PRIVATE(QQuickPropertyChanges) Q_PROPERTY(QObject *target READ object WRITE setObject) Q_PROPERTY(bool restoreEntryValues READ restoreEntryValues WRITE setRestoreEntryValues) Q_PROPERTY(bool explicit READ isExplicit WRITE setIsExplicit) public: - QDeclarativePropertyChanges(); - ~QDeclarativePropertyChanges(); + QQuickPropertyChanges(); + ~QQuickPropertyChanges(); QObject *object() const; void setObject(QObject *); @@ -88,23 +88,23 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativePropertyChanges : public QDeclarativeSt QVariant property(const QString &name) const; }; -class QDeclarativePropertyChangesParser : public QDeclarativeCustomParser +class QQuickPropertyChangesParser : public QQmlCustomParser { public: - QDeclarativePropertyChangesParser() - : QDeclarativeCustomParser(AcceptsAttachedProperties) {} + QQuickPropertyChangesParser() + : QQmlCustomParser(AcceptsAttachedProperties) {} - void compileList(QList > &list, const QString &pre, const QDeclarativeCustomParserProperty &prop); + void compileList(QList > &list, const QString &pre, const QQmlCustomParserProperty &prop); - virtual QByteArray compile(const QList &); + virtual QByteArray compile(const QList &); virtual void setCustomData(QObject *, const QByteArray &); }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativePropertyChanges) +QML_DECLARE_TYPE(QQuickPropertyChanges) QT_END_HEADER -#endif // QDECLARATIVEPROPERTYCHANGES_H +#endif // QQUICKPROPERTYCHANGES_H diff --git a/src/quick/util/qdeclarativesmoothedanimation.cpp b/src/quick/util/qquicksmoothedanimation.cpp similarity index 80% rename from src/quick/util/qdeclarativesmoothedanimation.cpp rename to src/quick/util/qquicksmoothedanimation.cpp index 4f2ed7dbe3..024728f1f5 100644 --- a/src/quick/util/qdeclarativesmoothedanimation.cpp +++ b/src/quick/util/qquicksmoothedanimation.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#include "qdeclarativesmoothedanimation_p.h" -#include "qdeclarativesmoothedanimation_p_p.h" +#include "qquicksmoothedanimation_p.h" +#include "qquicksmoothedanimation_p_p.h" -#include "qdeclarativeanimation_p_p.h" +#include "qquickanimation_p_p.h" -#include -#include +#include +#include -#include +#include #include @@ -74,9 +74,9 @@ void QSmoothedAnimationTimer::stopAnimation() m_animation->stop(); } -QSmoothedAnimation::QSmoothedAnimation(QDeclarativeSmoothedAnimationPrivate *priv) +QSmoothedAnimation::QSmoothedAnimation(QQuickSmoothedAnimationPrivate *priv) : QAbstractAnimationJob(), to(0), velocity(200), userDuration(-1), maximumEasingTime(-1), - reversingMode(QDeclarativeSmoothedAnimation::Eased), initialVelocity(0), + reversingMode(QQuickSmoothedAnimation::Eased), initialVelocity(0), trackVelocity(0), initialValue(0), invert(false), finalDuration(-1), lastTime(0), useDelta(false), delayedStopTimer(new QSmoothedAnimationTimer(this)), animationTemplate(priv) { @@ -89,13 +89,13 @@ QSmoothedAnimation::~QSmoothedAnimation() delete delayedStopTimer; if (animationTemplate) { if (target.object()) { - QHash::iterator it = + QHash::iterator it = animationTemplate->activeAnimations.find(target); if (it != animationTemplate->activeAnimations.end() && it.value() == this) animationTemplate->activeAnimations.erase(it); } else { //target is no longer valid, need to search linearly - QHash::iterator it; + QHash::iterator it; for (it = animationTemplate->activeAnimations.begin(); it != animationTemplate->activeAnimations.end(); ++it) { if (it.value() == this) { animationTemplate->activeAnimations.erase(it); @@ -242,15 +242,15 @@ qreal QSmoothedAnimation::easeFollow(qreal time_seconds) void QSmoothedAnimation::updateCurrentTime(int t) { - qreal time_seconds = useDelta ? qreal(QDeclarativeAnimationTimer::instance()->currentDelta()) / 1000. : qreal(t - lastTime) / 1000.; + qreal time_seconds = useDelta ? qreal(QQmlAnimationTimer::instance()->currentDelta()) / 1000. : qreal(t - lastTime) / 1000.; if (useDelta) useDelta = false; qreal value = easeFollow(time_seconds); value *= (invert? -1.0: 1.0); - QDeclarativePropertyPrivate::write(target, initialValue + value, - QDeclarativePropertyPrivate::BypassInterceptor - | QDeclarativePropertyPrivate::DontRemoveBinding); + QQmlPropertyPrivate::write(target, initialValue + value, + QQmlPropertyPrivate::BypassInterceptor + | QQmlPropertyPrivate::DontRemoveBinding); } void QSmoothedAnimation::init() @@ -277,17 +277,17 @@ void QSmoothedAnimation::init() if (hasReversed) { switch (reversingMode) { default: - case QDeclarativeSmoothedAnimation::Eased: + case QQuickSmoothedAnimation::Eased: initialVelocity = -trackVelocity; break; - case QDeclarativeSmoothedAnimation::Sync: - QDeclarativePropertyPrivate::write(target, to, - QDeclarativePropertyPrivate::BypassInterceptor - | QDeclarativePropertyPrivate::DontRemoveBinding); + case QQuickSmoothedAnimation::Sync: + QQmlPropertyPrivate::write(target, to, + QQmlPropertyPrivate::BypassInterceptor + | QQmlPropertyPrivate::DontRemoveBinding); trackVelocity = 0; stop(); return; - case QDeclarativeSmoothedAnimation::Immediate: + case QQuickSmoothedAnimation::Immediate: initialVelocity = 0; break; } @@ -298,16 +298,16 @@ void QSmoothedAnimation::init() invert = (to < initialValue); if (!recalc()) { - QDeclarativePropertyPrivate::write(target, to, - QDeclarativePropertyPrivate::BypassInterceptor - | QDeclarativePropertyPrivate::DontRemoveBinding); + QQmlPropertyPrivate::write(target, to, + QQmlPropertyPrivate::BypassInterceptor + | QQmlPropertyPrivate::DontRemoveBinding); stop(); return; } } /*! - \qmlclass SmoothedAnimation QDeclarativeSmoothedAnimation + \qmlclass SmoothedAnimation QQuickSmoothedAnimation \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits NumberAnimation @@ -324,7 +324,7 @@ void QSmoothedAnimation::init() bound to those of the red rectangle. Whenever these values change, the green rectangle smoothly animates to its new position: - \snippet doc/src/snippets/declarative/smoothedanimation.qml 0 + \snippet doc/src/snippets/qml/smoothedanimation.qml 0 A SmoothedAnimation can be configured by setting the \l velocity at which the animation should occur, or the \l duration that the animation should take. @@ -353,32 +353,32 @@ void QSmoothedAnimation::init() \sa SpringAnimation, NumberAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ -QDeclarativeSmoothedAnimation::QDeclarativeSmoothedAnimation(QObject *parent) -: QDeclarativeNumberAnimation(*(new QDeclarativeSmoothedAnimationPrivate), parent) +QQuickSmoothedAnimation::QQuickSmoothedAnimation(QObject *parent) +: QQuickNumberAnimation(*(new QQuickSmoothedAnimationPrivate), parent) { } -QDeclarativeSmoothedAnimation::~QDeclarativeSmoothedAnimation() +QQuickSmoothedAnimation::~QQuickSmoothedAnimation() { } -QDeclarativeSmoothedAnimationPrivate::QDeclarativeSmoothedAnimationPrivate() +QQuickSmoothedAnimationPrivate::QQuickSmoothedAnimationPrivate() : anim(0) { anim = new QSmoothedAnimation; } -QDeclarativeSmoothedAnimationPrivate::~QDeclarativeSmoothedAnimationPrivate() +QQuickSmoothedAnimationPrivate::~QQuickSmoothedAnimationPrivate() { delete anim; - QHash::iterator it; + QHash::iterator it; for (it = activeAnimations.begin(); it != activeAnimations.end(); ++it) { it.value()->clearTemplate(); } } -void QDeclarativeSmoothedAnimationPrivate::updateRunningAnimations() +void QQuickSmoothedAnimationPrivate::updateRunningAnimations() { foreach(QSmoothedAnimation* ease, activeAnimations.values()){ ease->maximumEasingTime = anim->maximumEasingTime; @@ -389,15 +389,15 @@ void QDeclarativeSmoothedAnimationPrivate::updateRunningAnimations() } } -QAbstractAnimationJob* QDeclarativeSmoothedAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickSmoothedAnimation::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { Q_UNUSED(direction); - Q_D(QDeclarativeSmoothedAnimation); + Q_D(QQuickSmoothedAnimation); - QDeclarativeStateActions dataActions = QDeclarativePropertyAnimation::createTransitionActions(actions, modified, defaultTarget); + QQuickStateActions dataActions = QQuickPropertyAnimation::createTransitionActions(actions, modified, defaultTarget); QParallelAnimationGroupJob *wrapperGroup = new QParallelAnimationGroupJob(); @@ -455,15 +455,15 @@ QAbstractAnimationJob* QDeclarativeSmoothedAnimation::transition(QDeclarativeSta \o SmoothedAnimation.Sync - the property is immediately set to the target value \endlist */ -QDeclarativeSmoothedAnimation::ReversingMode QDeclarativeSmoothedAnimation::reversingMode() const +QQuickSmoothedAnimation::ReversingMode QQuickSmoothedAnimation::reversingMode() const { - Q_D(const QDeclarativeSmoothedAnimation); - return (QDeclarativeSmoothedAnimation::ReversingMode) d->anim->reversingMode; + Q_D(const QQuickSmoothedAnimation); + return (QQuickSmoothedAnimation::ReversingMode) d->anim->reversingMode; } -void QDeclarativeSmoothedAnimation::setReversingMode(ReversingMode m) +void QQuickSmoothedAnimation::setReversingMode(ReversingMode m) { - Q_D(QDeclarativeSmoothedAnimation); + Q_D(QQuickSmoothedAnimation); if (d->anim->reversingMode == m) return; @@ -482,26 +482,26 @@ void QDeclarativeSmoothedAnimation::setReversingMode(ReversingMode m) If the velocity value and the duration value are both enabled, then the animation will use whichever gives the shorter duration. */ -int QDeclarativeSmoothedAnimation::duration() const +int QQuickSmoothedAnimation::duration() const { - Q_D(const QDeclarativeSmoothedAnimation); + Q_D(const QQuickSmoothedAnimation); return d->anim->userDuration; } -void QDeclarativeSmoothedAnimation::setDuration(int duration) +void QQuickSmoothedAnimation::setDuration(int duration) { - Q_D(QDeclarativeSmoothedAnimation); + Q_D(QQuickSmoothedAnimation); if (duration != -1) - QDeclarativeNumberAnimation::setDuration(duration); + QQuickNumberAnimation::setDuration(duration); if(duration == d->anim->userDuration) return; d->anim->userDuration = duration; d->updateRunningAnimations(); } -qreal QDeclarativeSmoothedAnimation::velocity() const +qreal QQuickSmoothedAnimation::velocity() const { - Q_D(const QDeclarativeSmoothedAnimation); + Q_D(const QQuickSmoothedAnimation); return d->anim->velocity; } @@ -517,9 +517,9 @@ qreal QDeclarativeSmoothedAnimation::velocity() const If the velocity value and the duration value are both enabled, then the animation will use whichever gives the shorter duration. */ -void QDeclarativeSmoothedAnimation::setVelocity(qreal v) +void QQuickSmoothedAnimation::setVelocity(qreal v) { - Q_D(QDeclarativeSmoothedAnimation); + Q_D(QQuickSmoothedAnimation); if (d->anim->velocity == v) return; @@ -538,15 +538,15 @@ void QDeclarativeSmoothedAnimation::setVelocity(qreal v) The default value is -1. */ -int QDeclarativeSmoothedAnimation::maximumEasingTime() const +int QQuickSmoothedAnimation::maximumEasingTime() const { - Q_D(const QDeclarativeSmoothedAnimation); + Q_D(const QQuickSmoothedAnimation); return d->anim->maximumEasingTime; } -void QDeclarativeSmoothedAnimation::setMaximumEasingTime(int v) +void QQuickSmoothedAnimation::setMaximumEasingTime(int v) { - Q_D(QDeclarativeSmoothedAnimation); + Q_D(QQuickSmoothedAnimation); if(v == d->anim->maximumEasingTime) return; d->anim->maximumEasingTime = v; diff --git a/src/quick/util/qdeclarativesmoothedanimation_p.h b/src/quick/util/qquicksmoothedanimation_p.h similarity index 77% rename from src/quick/util/qdeclarativesmoothedanimation_p.h rename to src/quick/util/qquicksmoothedanimation_p.h index 9a0bc22216..8825a04a0e 100644 --- a/src/quick/util/qdeclarativesmoothedanimation_p.h +++ b/src/quick/util/qquicksmoothedanimation_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESMOOTHEDANIMATION_H -#define QDECLARATIVESMOOTHEDANIMATION_H +#ifndef QQUICKSMOOTHEDANIMATION_H +#define QQUICKSMOOTHEDANIMATION_H -#include -#include "qdeclarativeanimation_p.h" +#include +#include "qquickanimation_p.h" #include @@ -51,12 +51,12 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeProperty; -class QDeclarativeSmoothedAnimationPrivate; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeSmoothedAnimation : public QDeclarativeNumberAnimation +class QQmlProperty; +class QQuickSmoothedAnimationPrivate; +class Q_QUICK_PRIVATE_EXPORT QQuickSmoothedAnimation : public QQuickNumberAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeSmoothedAnimation) + Q_DECLARE_PRIVATE(QQuickSmoothedAnimation) Q_ENUMS(ReversingMode) Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity NOTIFY velocityChanged) @@ -66,8 +66,8 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeSmoothedAnimation : public QDeclarative public: enum ReversingMode { Eased, Immediate, Sync }; - QDeclarativeSmoothedAnimation(QObject *parent = 0); - ~QDeclarativeSmoothedAnimation(); + QQuickSmoothedAnimation(QObject *parent = 0); + ~QQuickSmoothedAnimation(); ReversingMode reversingMode() const; void setReversingMode(ReversingMode); @@ -81,8 +81,8 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeSmoothedAnimation : public QDeclarative int maximumEasingTime() const; void setMaximumEasingTime(int); - virtual QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); Q_SIGNALS: @@ -93,8 +93,8 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeSmoothedAnimation : public QDeclarative QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeSmoothedAnimation) +QML_DECLARE_TYPE(QQuickSmoothedAnimation) QT_END_HEADER -#endif // QDECLARATIVESMOOTHEDANIMATION_H +#endif // QQUICKSMOOTHEDANIMATION_H diff --git a/src/quick/util/qdeclarativesmoothedanimation_p_p.h b/src/quick/util/qquicksmoothedanimation_p_p.h similarity index 80% rename from src/quick/util/qdeclarativesmoothedanimation_p_p.h rename to src/quick/util/qquicksmoothedanimation_p_p.h index 9afb6506a7..8112aa2885 100644 --- a/src/quick/util/qdeclarativesmoothedanimation_p_p.h +++ b/src/quick/util/qquicksmoothedanimation_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESMOOTHEDANIMATION2_P_H -#define QDECLARATIVESMOOTHEDANIMATION2_P_H +#ifndef QQUICKSMOOTHEDANIMATION2_P_H +#define QQUICKSMOOTHEDANIMATION2_P_H // // W A R N I N G @@ -53,10 +53,10 @@ // We mean it. // -#include "qdeclarativesmoothedanimation_p.h" -#include "qdeclarativeanimation_p.h" +#include "qquicksmoothedanimation_p.h" +#include "qquickanimation_p.h" -#include "qdeclarativeanimation_p_p.h" +#include "qquickanimation_p_p.h" #include "private/qparallelanimationgroupjob_p.h" @@ -77,12 +77,12 @@ public Q_SLOTS: QSmoothedAnimation *m_animation; }; -class QDeclarativeSmoothedAnimationPrivate; +class QQuickSmoothedAnimationPrivate; class Q_AUTOTEST_EXPORT QSmoothedAnimation : public QAbstractAnimationJob { Q_DISABLE_COPY(QSmoothedAnimation) public: - QSmoothedAnimation(QDeclarativeSmoothedAnimationPrivate * = 0); + QSmoothedAnimation(QQuickSmoothedAnimationPrivate * = 0); ~QSmoothedAnimation(); qreal to; @@ -90,12 +90,12 @@ class Q_AUTOTEST_EXPORT QSmoothedAnimation : public QAbstractAnimationJob int userDuration; int maximumEasingTime; - QDeclarativeSmoothedAnimation::ReversingMode reversingMode; + QQuickSmoothedAnimation::ReversingMode reversingMode; qreal initialVelocity; qreal trackVelocity; - QDeclarativeProperty target; + QQmlProperty target; int duration() const; void restart(); @@ -134,21 +134,21 @@ class Q_AUTOTEST_EXPORT QSmoothedAnimation : public QAbstractAnimationJob bool recalc(); void delayedStop(); QSmoothedAnimationTimer *delayedStopTimer; - QDeclarativeSmoothedAnimationPrivate *animationTemplate; + QQuickSmoothedAnimationPrivate *animationTemplate; }; -class QDeclarativeSmoothedAnimationPrivate : public QDeclarativePropertyAnimationPrivate +class QQuickSmoothedAnimationPrivate : public QQuickPropertyAnimationPrivate { - Q_DECLARE_PUBLIC(QDeclarativeSmoothedAnimation) + Q_DECLARE_PUBLIC(QQuickSmoothedAnimation) public: - QDeclarativeSmoothedAnimationPrivate(); - ~QDeclarativeSmoothedAnimationPrivate(); + QQuickSmoothedAnimationPrivate(); + ~QQuickSmoothedAnimationPrivate(); void updateRunningAnimations(); QSmoothedAnimation *anim; - QHash activeAnimations; + QHash activeAnimations; }; QT_END_NAMESPACE -#endif // QDECLARATIVESMOOTHEDANIMATION2_P_H +#endif // QQUICKSMOOTHEDANIMATION2_P_H diff --git a/src/quick/util/qdeclarativespringanimation.cpp b/src/quick/util/qquickspringanimation.cpp similarity index 83% rename from src/quick/util/qdeclarativespringanimation.cpp rename to src/quick/util/qquickspringanimation.cpp index 3cc5f4dbc3..84de994452 100644 --- a/src/quick/util/qdeclarativespringanimation.cpp +++ b/src/quick/util/qquickspringanimation.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#include "qdeclarativespringanimation_p.h" +#include "qquickspringanimation_p.h" -#include "qdeclarativeanimation_p_p.h" -#include +#include "qquickanimation_p_p.h" +#include #include "private/qparallelanimationgroupjob_p.h" #include @@ -56,12 +56,12 @@ QT_BEGIN_NAMESPACE -class QDeclarativeSpringAnimationPrivate; +class QQuickSpringAnimationPrivate; class Q_AUTOTEST_EXPORT QSpringAnimation : public QAbstractAnimationJob { Q_DISABLE_COPY(QSpringAnimation) public: - QSpringAnimation(QDeclarativeSpringAnimationPrivate * = 0); + QSpringAnimation(QQuickSpringAnimationPrivate * = 0); ~QSpringAnimation(); int duration() const; @@ -81,7 +81,7 @@ class Q_AUTOTEST_EXPORT QSpringAnimation : public QAbstractAnimationJob Spring }; Mode mode; - QDeclarativeProperty target; + QQmlProperty target; qreal velocityms; qreal maxVelocity; @@ -94,7 +94,7 @@ class Q_AUTOTEST_EXPORT QSpringAnimation : public QAbstractAnimationJob bool useMass : 1; bool haveModulus : 1; bool useDelta : 1; - typedef QHash ActiveAnimationHash; + typedef QHash ActiveAnimationHash; void clearTemplate() { animationTemplate = 0; } @@ -103,15 +103,15 @@ class Q_AUTOTEST_EXPORT QSpringAnimation : public QAbstractAnimationJob virtual void updateState(QAbstractAnimationJob::State, QAbstractAnimationJob::State); private: - QDeclarativeSpringAnimationPrivate *animationTemplate; + QQuickSpringAnimationPrivate *animationTemplate; }; -class QDeclarativeSpringAnimationPrivate : public QDeclarativePropertyAnimationPrivate +class QQuickSpringAnimationPrivate : public QQuickPropertyAnimationPrivate { - Q_DECLARE_PUBLIC(QDeclarativeSpringAnimation) + Q_DECLARE_PUBLIC(QQuickSpringAnimation) public: - QDeclarativeSpringAnimationPrivate() - : QDeclarativePropertyAnimationPrivate() + QQuickSpringAnimationPrivate() + : QQuickPropertyAnimationPrivate() , velocityms(0) , maxVelocity(0) , mass(1.0) @@ -141,7 +141,7 @@ class QDeclarativeSpringAnimationPrivate : public QDeclarativePropertyAnimationP QElapsedTimer elapsed; }; -QSpringAnimation::QSpringAnimation(QDeclarativeSpringAnimationPrivate *priv) +QSpringAnimation::QSpringAnimation(QQuickSpringAnimationPrivate *priv) : QAbstractAnimationJob() , currentValue(0) , to(0) @@ -216,7 +216,7 @@ void QSpringAnimation::updateCurrentTime(int time) return; } - int elapsed = useDelta ? QDeclarativeAnimationTimer::instance()->currentDelta() : time - lastTime; + int elapsed = useDelta ? QQmlAnimationTimer::instance()->currentDelta() : time - lastTime; if (useDelta) { startTime = time - elapsed; useDelta = false; @@ -303,9 +303,9 @@ void QSpringAnimation::updateCurrentTime(int time) qreal old_to = to; - QDeclarativePropertyPrivate::write(target, currentValue, - QDeclarativePropertyPrivate::BypassInterceptor | - QDeclarativePropertyPrivate::DontRemoveBinding); + QQmlPropertyPrivate::write(target, currentValue, + QQmlPropertyPrivate::BypassInterceptor | + QQmlPropertyPrivate::DontRemoveBinding); if (stopped && old_to == to) { // do not stop if we got restarted stopTime = animationTemplate->elapsed.elapsed(); @@ -319,7 +319,7 @@ void QSpringAnimation::updateState(QAbstractAnimationJob::State newState, QAbstr init(); } -void QDeclarativeSpringAnimationPrivate::updateMode() +void QQuickSpringAnimationPrivate::updateMode() { if (spring == 0. && maxVelocity == 0.) mode = QSpringAnimation::Track; @@ -340,7 +340,7 @@ void QDeclarativeSpringAnimationPrivate::updateMode() } /*! - \qmlclass SpringAnimation QDeclarativeSpringAnimation + \qmlclass SpringAnimation QQuickSpringAnimation \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \inherits NumberAnimation @@ -357,7 +357,7 @@ void QDeclarativeSpringAnimationPrivate::updateMode() on the \c x and \c y values indicates that whenever these values are changed, a SpringAnimation should be applied. - \snippet doc/src/snippets/declarative/springanimation.qml 0 + \snippet doc/src/snippets/qml/springanimation.qml 0 Like any other animation element, a SpringAnimation can be applied in a number of ways, including transitions, behaviors and property value @@ -367,14 +367,14 @@ void QDeclarativeSpringAnimationPrivate::updateMode() \sa SmoothedAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example} */ -QDeclarativeSpringAnimation::QDeclarativeSpringAnimation(QObject *parent) -: QDeclarativeNumberAnimation(*(new QDeclarativeSpringAnimationPrivate),parent) +QQuickSpringAnimation::QQuickSpringAnimation(QObject *parent) +: QQuickNumberAnimation(*(new QQuickSpringAnimationPrivate),parent) { } -QDeclarativeSpringAnimation::~QDeclarativeSpringAnimation() +QQuickSpringAnimation::~QQuickSpringAnimation() { - Q_D(QDeclarativeSpringAnimation); + Q_D(QQuickSpringAnimation); QSpringAnimation::ActiveAnimationHash::iterator it; for (it = d->activeAnimations.begin(); it != d->activeAnimations.end(); ++it) { it.value()->clearTemplate(); @@ -389,15 +389,15 @@ QDeclarativeSpringAnimation::~QDeclarativeSpringAnimation() The default value is 0 (no maximum velocity). */ -qreal QDeclarativeSpringAnimation::velocity() const +qreal QQuickSpringAnimation::velocity() const { - Q_D(const QDeclarativeSpringAnimation); + Q_D(const QQuickSpringAnimation); return d->maxVelocity; } -void QDeclarativeSpringAnimation::setVelocity(qreal velocity) +void QQuickSpringAnimation::setVelocity(qreal velocity) { - Q_D(QDeclarativeSpringAnimation); + Q_D(QQuickSpringAnimation); d->maxVelocity = velocity; d->velocityms = velocity / 1000.0; d->updateMode(); @@ -414,15 +414,15 @@ void QDeclarativeSpringAnimation::setVelocity(qreal velocity) When this property is set and the \l velocity value is greater than 0, the \l velocity limits the maximum speed. */ -qreal QDeclarativeSpringAnimation::spring() const +qreal QQuickSpringAnimation::spring() const { - Q_D(const QDeclarativeSpringAnimation); + Q_D(const QQuickSpringAnimation); return d->spring; } -void QDeclarativeSpringAnimation::setSpring(qreal spring) +void QQuickSpringAnimation::setSpring(qreal spring) { - Q_D(QDeclarativeSpringAnimation); + Q_D(QQuickSpringAnimation); d->spring = spring; d->updateMode(); } @@ -437,15 +437,15 @@ void QDeclarativeSpringAnimation::setSpring(qreal spring) The useful value range is 0 - 1.0. The lower the value, the faster it comes to rest. */ -qreal QDeclarativeSpringAnimation::damping() const +qreal QQuickSpringAnimation::damping() const { - Q_D(const QDeclarativeSpringAnimation); + Q_D(const QQuickSpringAnimation); return d->damping; } -void QDeclarativeSpringAnimation::setDamping(qreal damping) +void QQuickSpringAnimation::setDamping(qreal damping) { - Q_D(QDeclarativeSpringAnimation); + Q_D(QQuickSpringAnimation); if (damping > 1.) damping = 1.; @@ -463,15 +463,15 @@ void QDeclarativeSpringAnimation::setDamping(qreal damping) The default is 0.01. Tuning this value can provide small performance improvements. */ -qreal QDeclarativeSpringAnimation::epsilon() const +qreal QQuickSpringAnimation::epsilon() const { - Q_D(const QDeclarativeSpringAnimation); + Q_D(const QQuickSpringAnimation); return d->epsilon; } -void QDeclarativeSpringAnimation::setEpsilon(qreal epsilon) +void QQuickSpringAnimation::setEpsilon(qreal epsilon) { - Q_D(QDeclarativeSpringAnimation); + Q_D(QQuickSpringAnimation); d->epsilon = epsilon; } @@ -482,15 +482,15 @@ void QDeclarativeSpringAnimation::setEpsilon(qreal epsilon) Setting a \a modulus forces the target value to "wrap around" at the modulus. For example, setting the modulus to 360 will cause a value of 370 to wrap around to 10. */ -qreal QDeclarativeSpringAnimation::modulus() const +qreal QQuickSpringAnimation::modulus() const { - Q_D(const QDeclarativeSpringAnimation); + Q_D(const QQuickSpringAnimation); return d->modulus; } -void QDeclarativeSpringAnimation::setModulus(qreal modulus) +void QQuickSpringAnimation::setModulus(qreal modulus) { - Q_D(QDeclarativeSpringAnimation); + Q_D(QQuickSpringAnimation); if (d->modulus != modulus) { d->haveModulus = modulus != 0.0; d->modulus = modulus; @@ -508,15 +508,15 @@ void QDeclarativeSpringAnimation::setModulus(qreal modulus) A greater mass causes slower movement and a greater spring-like motion when an item comes to rest. */ -qreal QDeclarativeSpringAnimation::mass() const +qreal QQuickSpringAnimation::mass() const { - Q_D(const QDeclarativeSpringAnimation); + Q_D(const QQuickSpringAnimation); return d->mass; } -void QDeclarativeSpringAnimation::setMass(qreal mass) +void QQuickSpringAnimation::setMass(qreal mass) { - Q_D(QDeclarativeSpringAnimation); + Q_D(QQuickSpringAnimation); if (d->mass != mass && mass > 0.0) { d->useMass = mass != 1.0; d->mass = mass; @@ -524,23 +524,23 @@ void QDeclarativeSpringAnimation::setMass(qreal mass) } } -QAbstractAnimationJob* QDeclarativeSpringAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, +QAbstractAnimationJob* QQuickSpringAnimation::transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget) { - Q_D(QDeclarativeSpringAnimation); + Q_D(QQuickSpringAnimation); Q_UNUSED(direction); QParallelAnimationGroupJob *wrapperGroup = new QParallelAnimationGroupJob(); - QDeclarativeStateActions dataActions = QDeclarativeNumberAnimation::createTransitionActions(actions, modified, defaultTarget); + QQuickStateActions dataActions = QQuickNumberAnimation::createTransitionActions(actions, modified, defaultTarget); if (!dataActions.isEmpty()) { QSet anims; for (int i = 0; i < dataActions.size(); ++i) { QSpringAnimation *animation; bool needsRestart = false; - const QDeclarativeProperty &property = dataActions.at(i).property; + const QQmlProperty &property = dataActions.at(i).property; if (d->activeAnimations.contains(property)) { animation = d->activeAnimations[property]; needsRestart = true; diff --git a/src/quick/util/qdeclarativespringanimation_p.h b/src/quick/util/qquickspringanimation_p.h similarity index 78% rename from src/quick/util/qdeclarativespringanimation_p.h rename to src/quick/util/qquickspringanimation_p.h index 2f28700208..03c586e687 100644 --- a/src/quick/util/qdeclarativespringanimation_p.h +++ b/src/quick/util/qquickspringanimation_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESPRINGANIMATION_H -#define QDECLARATIVESPRINGANIMATION_H +#ifndef QQUICKSPRINGANIMATION_H +#define QQUICKSPRINGANIMATION_H -#include -#include "qdeclarativeanimation_p.h" +#include +#include "qquickanimation_p.h" #include @@ -51,12 +51,12 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeSpringAnimationPrivate; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeSpringAnimation : public QDeclarativeNumberAnimation +class QQuickSpringAnimationPrivate; +class Q_QUICK_PRIVATE_EXPORT QQuickSpringAnimation : public QQuickNumberAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeSpringAnimation) - Q_INTERFACES(QDeclarativePropertyValueSource) + Q_DECLARE_PRIVATE(QQuickSpringAnimation) + Q_INTERFACES(QQmlPropertyValueSource) Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity) Q_PROPERTY(qreal spring READ spring WRITE setSpring) @@ -66,8 +66,8 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeSpringAnimation : public QDeclarativeNu Q_PROPERTY(qreal mass READ mass WRITE setMass NOTIFY massChanged) public: - QDeclarativeSpringAnimation(QObject *parent=0); - ~QDeclarativeSpringAnimation(); + QQuickSpringAnimation(QObject *parent=0); + ~QQuickSpringAnimation(); qreal velocity() const; void setVelocity(qreal velocity); @@ -87,8 +87,8 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeSpringAnimation : public QDeclarativeNu qreal modulus() const; void setModulus(qreal modulus); - virtual QAbstractAnimationJob* transition(QDeclarativeStateActions &actions, - QDeclarativeProperties &modified, + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget = 0); @@ -100,8 +100,8 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeSpringAnimation : public QDeclarativeNu QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeSpringAnimation) +QML_DECLARE_TYPE(QQuickSpringAnimation) QT_END_HEADER -#endif // QDECLARATIVESPRINGANIMATION_H +#endif // QQUICKSPRINGANIMATION_H diff --git a/src/quick/util/qdeclarativestate.cpp b/src/quick/util/qquickstate.cpp similarity index 61% rename from src/quick/util/qdeclarativestate.cpp rename to src/quick/util/qquickstate.cpp index f0795e92bc..53906a5651 100644 --- a/src/quick/util/qdeclarativestate.cpp +++ b/src/quick/util/qquickstate.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,13 +39,13 @@ ** ****************************************************************************/ -#include "qdeclarativestate_p_p.h" -#include "qdeclarativestate_p.h" +#include "qquickstate_p_p.h" +#include "qquickstate_p.h" -#include "qdeclarativestategroup_p.h" -#include "qdeclarativestateoperations_p.h" +#include "qquickstategroup_p.h" +#include "qquickstatechangescript_p.h" -#include +#include #include @@ -53,13 +53,13 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG); -QDeclarativeAction::QDeclarativeAction() +QQuickAction::QQuickAction() : restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), fromBinding(0), event(0), specifiedObject(0) { } -QDeclarativeAction::QDeclarativeAction(QObject *target, const QString &propertyName, +QQuickAction::QQuickAction(QObject *target, const QString &propertyName, const QVariant &value) : restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), property(target, propertyName, qmlEngine(target)), toValue(value), @@ -70,8 +70,8 @@ QDeclarativeAction::QDeclarativeAction(QObject *target, const QString &propertyN fromValue = property.read(); } -QDeclarativeAction::QDeclarativeAction(QObject *target, const QString &propertyName, - QDeclarativeContext *context, const QVariant &value) +QQuickAction::QQuickAction(QObject *target, const QString &propertyName, + QQmlContext *context, const QVariant &value) : restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), property(target, propertyName, context), toValue(value), fromBinding(0), event(0), @@ -82,45 +82,45 @@ QDeclarativeAction::QDeclarativeAction(QObject *target, const QString &propertyN } -QDeclarativeActionEvent::~QDeclarativeActionEvent() +QQuickActionEvent::~QQuickActionEvent() { } -void QDeclarativeActionEvent::execute(Reason) +void QQuickActionEvent::execute(Reason) { } -bool QDeclarativeActionEvent::isReversable() +bool QQuickActionEvent::isReversable() { return false; } -void QDeclarativeActionEvent::reverse(Reason) +void QQuickActionEvent::reverse(Reason) { } -bool QDeclarativeActionEvent::changesBindings() +bool QQuickActionEvent::changesBindings() { return false; } -void QDeclarativeActionEvent::clearBindings() +void QQuickActionEvent::clearBindings() { } -bool QDeclarativeActionEvent::override(QDeclarativeActionEvent *other) +bool QQuickActionEvent::override(QQuickActionEvent *other) { Q_UNUSED(other); return false; } -QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObject *parent) +QQuickStateOperation::QQuickStateOperation(QObjectPrivate &dd, QObject *parent) : QObject(dd, parent) { } /*! - \qmlclass State QDeclarativeState + \qmlclass State QQuickState \inqmlmodule QtQuick 2 \ingroup qml-state-elements \brief The State element defines configurations of objects and properties. @@ -139,7 +139,7 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje between the default state and the "clicked" state, thus toggling the color of the rectangle between black and red. - \snippet doc/src/snippets/declarative/state.qml 0 + \snippet doc/src/snippets/qml/state.qml 0 Notice the default state is referred to using an empty string (""). @@ -150,18 +150,18 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje not allowed. \sa {declarative/animation/states}{states example}, {qmlstates}{States}, - {QML Animation and Transitions}{Transitions}, QtDeclarative + {QML Animation and Transitions}{Transitions}, QtQml */ -QDeclarativeState::QDeclarativeState(QObject *parent) -: QObject(*(new QDeclarativeStatePrivate), parent) +QQuickState::QQuickState(QObject *parent) +: QObject(*(new QQuickStatePrivate), parent) { - Q_D(QDeclarativeState); + Q_D(QQuickState); d->transitionManager.setState(this); } -QDeclarativeState::~QDeclarativeState() +QQuickState::~QQuickState() { - Q_D(QDeclarativeState); + Q_D(QQuickState); if (d->group) d->group->removeState(this); } @@ -172,28 +172,28 @@ QDeclarativeState::~QDeclarativeState() Each state should have a unique name within its item. */ -QString QDeclarativeState::name() const +QString QQuickState::name() const { - Q_D(const QDeclarativeState); + Q_D(const QQuickState); return d->name; } -void QDeclarativeState::setName(const QString &n) +void QQuickState::setName(const QString &n) { - Q_D(QDeclarativeState); + Q_D(QQuickState); d->name = n; d->named = true; } -bool QDeclarativeState::isNamed() const +bool QQuickState::isNamed() const { - Q_D(const QDeclarativeState); + Q_D(const QQuickState); return d->named; } -bool QDeclarativeState::isWhenKnown() const +bool QQuickState::isWhenKnown() const { - Q_D(const QDeclarativeState); + Q_D(const QQuickState); return d->when != 0; } @@ -205,7 +205,7 @@ bool QDeclarativeState::isWhenKnown() const be applied. For example, the following \l Rectangle changes in and out of the "hidden" state when the \l MouseArea is pressed: - \snippet doc/src/snippets/declarative/state-when.qml 0 + \snippet doc/src/snippets/qml/state-when.qml 0 If multiple states in a group have \c when clauses that evaluate to \c true at the same time, the first matching state will be applied. For example, in @@ -221,15 +221,15 @@ bool QDeclarativeState::isWhenKnown() const } \endqml */ -QDeclarativeBinding *QDeclarativeState::when() const +QQmlBinding *QQuickState::when() const { - Q_D(const QDeclarativeState); + Q_D(const QQuickState); return d->when; } -void QDeclarativeState::setWhen(QDeclarativeBinding *when) +void QQuickState::setWhen(QQmlBinding *when) { - Q_D(QDeclarativeState); + Q_D(QQuickState); d->when = when; if (d->group) d->group->updateAutoState(); @@ -244,15 +244,15 @@ void QDeclarativeState::setWhen(QDeclarativeBinding *when) The state being extended is treated as the base state in regards to the changes specified by the extending state. */ -QString QDeclarativeState::extends() const +QString QQuickState::extends() const { - Q_D(const QDeclarativeState); + Q_D(const QQuickState); return d->extends; } -void QDeclarativeState::setExtends(const QString &extends) +void QQuickState::setExtends(const QString &extends) { - Q_D(QDeclarativeState); + Q_D(QQuickState); d->extends = extends; } @@ -265,41 +265,41 @@ void QDeclarativeState::setExtends(const QString &extends) extends another state, then the changes are applied against the state being extended. */ -QDeclarativeListProperty QDeclarativeState::changes() +QQmlListProperty QQuickState::changes() { - Q_D(QDeclarativeState); - return QDeclarativeListProperty(this, &d->operations, QDeclarativeStatePrivate::operations_append, - QDeclarativeStatePrivate::operations_count, QDeclarativeStatePrivate::operations_at, - QDeclarativeStatePrivate::operations_clear); + Q_D(QQuickState); + return QQmlListProperty(this, &d->operations, QQuickStatePrivate::operations_append, + QQuickStatePrivate::operations_count, QQuickStatePrivate::operations_at, + QQuickStatePrivate::operations_clear); } -int QDeclarativeState::operationCount() const +int QQuickState::operationCount() const { - Q_D(const QDeclarativeState); + Q_D(const QQuickState); return d->operations.count(); } -QDeclarativeStateOperation *QDeclarativeState::operationAt(int index) const +QQuickStateOperation *QQuickState::operationAt(int index) const { - Q_D(const QDeclarativeState); + Q_D(const QQuickState); return d->operations.at(index); } -QDeclarativeState &QDeclarativeState::operator<<(QDeclarativeStateOperation *op) +QQuickState &QQuickState::operator<<(QQuickStateOperation *op) { - Q_D(QDeclarativeState); - d->operations.append(QDeclarativeStatePrivate::OperationGuard(op, &d->operations)); + Q_D(QQuickState); + d->operations.append(QQuickStatePrivate::OperationGuard(op, &d->operations)); return *this; } -void QDeclarativeStatePrivate::complete() +void QQuickStatePrivate::complete() { - Q_Q(QDeclarativeState); + Q_Q(QQuickState); for (int ii = 0; ii < reverting.count(); ++ii) { for (int jj = 0; jj < revertList.count(); ++jj) { - const QDeclarativeRevertAction &revert = reverting.at(ii); - const QDeclarativeSimpleAction &simple = revertList.at(jj); + const QQuickRevertAction &revert = reverting.at(ii); + const QQuickSimpleAction &simple = revertList.at(jj); if ((revert.event && simple.event() == revert.event) || simple.property() == revert.property) { revertList.removeAt(jj); @@ -316,10 +316,10 @@ void QDeclarativeStatePrivate::complete() // Generate a list of actions for this state. This includes coelescing state // actions that this state "extends" -QDeclarativeStateOperation::ActionList -QDeclarativeStatePrivate::generateActionList() const +QQuickStateOperation::ActionList +QQuickStatePrivate::generateActionList() const { - QDeclarativeStateOperation::ActionList applyList; + QQuickStateOperation::ActionList applyList; if (inState) return applyList; @@ -327,57 +327,57 @@ QDeclarativeStatePrivate::generateActionList() const inState = true; if (!extends.isEmpty()) { - QList states = group ? group->states() : QList(); + QList states = group ? group->states() : QList(); for (int ii = 0; ii < states.count(); ++ii) if (states.at(ii)->name() == extends) { qmlExecuteDeferred(states.at(ii)); - applyList = static_cast(states.at(ii)->d_func())->generateActionList(); + applyList = static_cast(states.at(ii)->d_func())->generateActionList(); } } - foreach(QDeclarativeStateOperation *op, operations) + foreach(QQuickStateOperation *op, operations) applyList << op->actions(); inState = false; return applyList; } -QDeclarativeStateGroup *QDeclarativeState::stateGroup() const +QQuickStateGroup *QQuickState::stateGroup() const { - Q_D(const QDeclarativeState); + Q_D(const QQuickState); return d->group; } -void QDeclarativeState::setStateGroup(QDeclarativeStateGroup *group) +void QQuickState::setStateGroup(QQuickStateGroup *group) { - Q_D(QDeclarativeState); + Q_D(QQuickState); d->group = group; } -void QDeclarativeState::cancel() +void QQuickState::cancel() { - Q_D(QDeclarativeState); + Q_D(QQuickState); d->transitionManager.cancel(); } -void QDeclarativeAction::deleteFromBinding() +void QQuickAction::deleteFromBinding() { if (fromBinding) { - QDeclarativePropertyPrivate::setBinding(property, 0); + QQmlPropertyPrivate::setBinding(property, 0); fromBinding->destroy(); fromBinding = 0; } } -bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QString &name) const +bool QQuickState::containsPropertyInRevertList(QObject *target, const QString &name) const { - Q_D(const QDeclarativeState); + Q_D(const QQuickState); if (isStateActive()) { - QListIterator revertListIterator(d->revertList); + QListIterator revertListIterator(d->revertList); while (revertListIterator.hasNext()) { - const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + const QQuickSimpleAction &simpleAction = revertListIterator.next(); if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) return true; } @@ -386,15 +386,15 @@ bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QStr return false; } -bool QDeclarativeState::changeValueInRevertList(QObject *target, const QString &name, const QVariant &revertValue) +bool QQuickState::changeValueInRevertList(QObject *target, const QString &name, const QVariant &revertValue) { - Q_D(QDeclarativeState); + Q_D(QQuickState); if (isStateActive()) { - QMutableListIterator revertListIterator(d->revertList); + QMutableListIterator revertListIterator(d->revertList); while (revertListIterator.hasNext()) { - QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + QQuickSimpleAction &simpleAction = revertListIterator.next(); if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) { simpleAction.setValue(revertValue); return true; @@ -405,15 +405,15 @@ bool QDeclarativeState::changeValueInRevertList(QObject *target, const QString & return false; } -bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QString &name, QDeclarativeAbstractBinding *binding) +bool QQuickState::changeBindingInRevertList(QObject *target, const QString &name, QQmlAbstractBinding *binding) { - Q_D(QDeclarativeState); + Q_D(QQuickState); if (isStateActive()) { - QMutableListIterator revertListIterator(d->revertList); + QMutableListIterator revertListIterator(d->revertList); while (revertListIterator.hasNext()) { - QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + QQuickSimpleAction &simpleAction = revertListIterator.next(); if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) { if (simpleAction.binding()) simpleAction.binding()->destroy(); @@ -427,25 +427,25 @@ bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QString return false; } -bool QDeclarativeState::removeEntryFromRevertList(QObject *target, const QString &name) +bool QQuickState::removeEntryFromRevertList(QObject *target, const QString &name) { - Q_D(QDeclarativeState); + Q_D(QQuickState); if (isStateActive()) { - QMutableListIterator revertListIterator(d->revertList); + QMutableListIterator revertListIterator(d->revertList); while (revertListIterator.hasNext()) { - QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + QQuickSimpleAction &simpleAction = revertListIterator.next(); if (simpleAction.property().object() == target && simpleAction.property().name() == name) { - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); + QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(simpleAction.property()); if (oldBinding) { - QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); + QQmlPropertyPrivate::setBinding(simpleAction.property(), 0); oldBinding->destroy(); } simpleAction.property().write(simpleAction.value()); if (simpleAction.binding()) - QDeclarativePropertyPrivate::setBinding(simpleAction.property(), simpleAction.binding()); + QQmlPropertyPrivate::setBinding(simpleAction.property(), simpleAction.binding()); revertListIterator.remove(); return true; @@ -456,34 +456,34 @@ bool QDeclarativeState::removeEntryFromRevertList(QObject *target, const QString return false; } -void QDeclarativeState::addEntryToRevertList(const QDeclarativeAction &action) +void QQuickState::addEntryToRevertList(const QQuickAction &action) { - Q_D(QDeclarativeState); + Q_D(QQuickState); - QDeclarativeSimpleAction simpleAction(action); + QQuickSimpleAction simpleAction(action); d->revertList.append(simpleAction); } -void QDeclarativeState::removeAllEntriesFromRevertList(QObject *target) +void QQuickState::removeAllEntriesFromRevertList(QObject *target) { - Q_D(QDeclarativeState); + Q_D(QQuickState); if (isStateActive()) { - QMutableListIterator revertListIterator(d->revertList); + QMutableListIterator revertListIterator(d->revertList); while (revertListIterator.hasNext()) { - QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + QQuickSimpleAction &simpleAction = revertListIterator.next(); if (simpleAction.property().object() == target) { - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); + QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(simpleAction.property()); if (oldBinding) { - QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); + QQmlPropertyPrivate::setBinding(simpleAction.property(), 0); oldBinding->destroy(); } simpleAction.property().write(simpleAction.value()); if (simpleAction.binding()) - QDeclarativePropertyPrivate::setBinding(simpleAction.property(), simpleAction.binding()); + QQmlPropertyPrivate::setBinding(simpleAction.property(), simpleAction.binding()); revertListIterator.remove(); } @@ -491,22 +491,22 @@ void QDeclarativeState::removeAllEntriesFromRevertList(QObject *target) } } -void QDeclarativeState::addEntriesToRevertList(const QList &actionList) +void QQuickState::addEntriesToRevertList(const QList &actionList) { - Q_D(QDeclarativeState); + Q_D(QQuickState); if (isStateActive()) { - QList simpleActionList; + QList simpleActionList; - QListIterator actionListIterator(actionList); + QListIterator actionListIterator(actionList); while(actionListIterator.hasNext()) { - const QDeclarativeAction &action = actionListIterator.next(); - QDeclarativeSimpleAction simpleAction(action); + const QQuickAction &action = actionListIterator.next(); + QQuickSimpleAction simpleAction(action); action.property.write(action.toValue); if (!action.toBinding.isNull()) { - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); + QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(simpleAction.property()); if (oldBinding) - QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); - QDeclarativePropertyPrivate::setBinding(simpleAction.property(), action.toBinding.data(), QDeclarativePropertyPrivate::DontRemoveBinding); + QQmlPropertyPrivate::setBinding(simpleAction.property(), 0); + QQmlPropertyPrivate::setBinding(simpleAction.property(), action.toBinding.data(), QQmlPropertyPrivate::DontRemoveBinding); } simpleActionList.append(simpleAction); @@ -516,15 +516,15 @@ void QDeclarativeState::addEntriesToRevertList(const QList & } } -QVariant QDeclarativeState::valueInRevertList(QObject *target, const QString &name) const +QVariant QQuickState::valueInRevertList(QObject *target, const QString &name) const { - Q_D(const QDeclarativeState); + Q_D(const QQuickState); if (isStateActive()) { - QListIterator revertListIterator(d->revertList); + QListIterator revertListIterator(d->revertList); while (revertListIterator.hasNext()) { - const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + const QQuickSimpleAction &simpleAction = revertListIterator.next(); if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) return simpleAction.value(); } @@ -533,15 +533,15 @@ QVariant QDeclarativeState::valueInRevertList(QObject *target, const QString &na return QVariant(); } -QDeclarativeAbstractBinding *QDeclarativeState::bindingInRevertList(QObject *target, const QString &name) const +QQmlAbstractBinding *QQuickState::bindingInRevertList(QObject *target, const QString &name) const { - Q_D(const QDeclarativeState); + Q_D(const QQuickState); if (isStateActive()) { - QListIterator revertListIterator(d->revertList); + QListIterator revertListIterator(d->revertList); while (revertListIterator.hasNext()) { - const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + const QQuickSimpleAction &simpleAction = revertListIterator.next(); if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) return simpleAction.binding(); } @@ -550,14 +550,14 @@ QDeclarativeAbstractBinding *QDeclarativeState::bindingInRevertList(QObject *tar return 0; } -bool QDeclarativeState::isStateActive() const +bool QQuickState::isStateActive() const { return stateGroup() && stateGroup()->state() == name(); } -void QDeclarativeState::apply(QDeclarativeTransition *trans, QDeclarativeState *revert) +void QQuickState::apply(QQuickTransition *trans, QQuickState *revert) { - Q_D(QDeclarativeState); + Q_D(QQuickState); qmlExecuteDeferred(this); @@ -568,27 +568,27 @@ void QDeclarativeState::apply(QDeclarativeTransition *trans, QDeclarativeState * d->reverting.clear(); if (revert) { - QDeclarativeStatePrivate *revertPrivate = - static_cast(revert->d_func()); + QQuickStatePrivate *revertPrivate = + static_cast(revert->d_func()); d->revertList = revertPrivate->revertList; revertPrivate->revertList.clear(); } // List of actions caused by this state - QDeclarativeStateOperation::ActionList applyList = d->generateActionList(); + QQuickStateOperation::ActionList applyList = d->generateActionList(); // List of actions that need to be reverted to roll back (just) this state - QDeclarativeStatePrivate::SimpleActionList additionalReverts; + QQuickStatePrivate::SimpleActionList additionalReverts; // First add the reverse of all the applyList actions for (int ii = 0; ii < applyList.count(); ++ii) { - QDeclarativeAction &action = applyList[ii]; + QQuickAction &action = applyList[ii]; if (action.event) { if (!action.event->isReversable()) continue; bool found = false; for (int jj = 0; jj < d->revertList.count(); ++jj) { - QDeclarativeActionEvent *event = d->revertList.at(jj).event(); + QQuickActionEvent *event = d->revertList.at(jj).event(); if (event && event->type() == action.event->type()) { if (action.event->override(event)) { found = true; @@ -596,7 +596,7 @@ void QDeclarativeState::apply(QDeclarativeTransition *trans, QDeclarativeState * if (action.event != d->revertList.at(jj).event() && action.event->needsCopy()) { action.event->copyOriginals(d->revertList.at(jj).event()); - QDeclarativeSimpleAction r(action); + QQuickSimpleAction r(action); additionalReverts << r; d->revertList.removeAt(jj); --jj; @@ -611,12 +611,12 @@ void QDeclarativeState::apply(QDeclarativeTransition *trans, QDeclarativeState * action.event->saveOriginals(); // Only need to revert the applyList action if the previous // state doesn't have a higher priority revert already - QDeclarativeSimpleAction r(action); + QQuickSimpleAction r(action); additionalReverts << r; } } else { bool found = false; - action.fromBinding = QDeclarativePropertyPrivate::binding(action.property); + action.fromBinding = QQmlPropertyPrivate::binding(action.property); for (int jj = 0; jj < d->revertList.count(); ++jj) { if (d->revertList.at(jj).property() == action.property) { @@ -634,7 +634,7 @@ void QDeclarativeState::apply(QDeclarativeTransition *trans, QDeclarativeState * } else { // Only need to revert the applyList action if the previous // state doesn't have a higher priority revert already - QDeclarativeSimpleAction r(action); + QQuickSimpleAction r(action); additionalReverts << r; } } @@ -646,11 +646,11 @@ void QDeclarativeState::apply(QDeclarativeTransition *trans, QDeclarativeState * for (int ii = 0; ii < d->revertList.count(); ++ii) { bool found = false; if (d->revertList.at(ii).event()) { - QDeclarativeActionEvent *event = d->revertList.at(ii).event(); + QQuickActionEvent *event = d->revertList.at(ii).event(); if (!event->isReversable()) continue; for (int jj = 0; !found && jj < applyList.count(); ++jj) { - const QDeclarativeAction &action = applyList.at(jj); + const QQuickAction &action = applyList.at(jj); if (action.event && action.event->type() == event->type()) { if (action.event->override(event)) found = true; @@ -658,23 +658,23 @@ void QDeclarativeState::apply(QDeclarativeTransition *trans, QDeclarativeState * } } else { for (int jj = 0; !found && jj < applyList.count(); ++jj) { - const QDeclarativeAction &action = applyList.at(jj); + const QQuickAction &action = applyList.at(jj); if (action.property == d->revertList.at(ii).property()) found = true; } } if (!found) { QVariant cur = d->revertList.at(ii).property().read(); - QDeclarativeAbstractBinding *delBinding = - QDeclarativePropertyPrivate::setBinding(d->revertList.at(ii).property(), 0); + QQmlAbstractBinding *delBinding = + QQmlPropertyPrivate::setBinding(d->revertList.at(ii).property(), 0); if (delBinding) delBinding->destroy(); - QDeclarativeAction a; + QQuickAction a; a.property = d->revertList.at(ii).property(); a.fromValue = cur; a.toValue = d->revertList.at(ii).value(); - a.toBinding = QDeclarativeAbstractBinding::getPointer(d->revertList.at(ii).binding()); + a.toBinding = QQmlAbstractBinding::getPointer(d->revertList.at(ii).binding()); a.specifiedObject = d->revertList.at(ii).specifiedObject(); a.specifiedProperty = d->revertList.at(ii).specifiedProperty(); a.event = d->revertList.at(ii).event(); @@ -695,11 +695,11 @@ void QDeclarativeState::apply(QDeclarativeTransition *trans, QDeclarativeState * #ifndef QT_NO_DEBUG_STREAM // Output for debugging if (stateChangeDebug()) { - foreach(const QDeclarativeAction &action, applyList) { + foreach(const QQuickAction &action, applyList) { if (action.event) - qWarning() << " QDeclarativeAction event:" << action.event->type(); + qWarning() << " QQuickAction event:" << action.event->type(); else - qWarning() << " QDeclarativeAction:" << action.property.object() + qWarning() << " QQuickAction:" << action.property.object() << action.property.name() << "From:" << action.fromValue << "To:" << action.toValue; } @@ -709,20 +709,20 @@ void QDeclarativeState::apply(QDeclarativeTransition *trans, QDeclarativeState * d->transitionManager.transition(applyList, trans); } -QDeclarativeStateOperation::ActionList QDeclarativeStateOperation::actions() +QQuickStateOperation::ActionList QQuickStateOperation::actions() { return ActionList(); } -QDeclarativeState *QDeclarativeStateOperation::state() const +QQuickState *QQuickStateOperation::state() const { - Q_D(const QDeclarativeStateOperation); + Q_D(const QQuickStateOperation); return d->m_state; } -void QDeclarativeStateOperation::setState(QDeclarativeState *state) +void QQuickStateOperation::setState(QQuickState *state) { - Q_D(QDeclarativeStateOperation); + Q_D(QQuickStateOperation); d->m_state = state; } diff --git a/src/quick/util/qdeclarativestate_p.h b/src/quick/util/qquickstate_p.h similarity index 57% rename from src/quick/util/qdeclarativestate_p.h rename to src/quick/util/qquickstate_p.h index 5c2606e7cd..7dfc1daa44 100644 --- a/src/quick/util/qdeclarativestate_p.h +++ b/src/quick/util/qquickstate_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESTATE_H -#define QDECLARATIVESTATE_H +#ifndef QQUICKSTATE_H +#define QQUICKSTATE_H -#include -#include +#include +#include #include #include #include @@ -52,30 +52,30 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeActionEvent; -class QDeclarativeAbstractBinding; -class QDeclarativeBinding; -class QDeclarativeExpression; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeAction +class QQuickActionEvent; +class QQmlAbstractBinding; +class QQmlBinding; +class QQmlExpression; +class Q_QUICK_PRIVATE_EXPORT QQuickAction { public: - QDeclarativeAction(); - QDeclarativeAction(QObject *, const QString &, const QVariant &); - QDeclarativeAction(QObject *, const QString &, - QDeclarativeContext *, const QVariant &); + QQuickAction(); + QQuickAction(QObject *, const QString &, const QVariant &); + QQuickAction(QObject *, const QString &, + QQmlContext *, const QVariant &); bool restore:1; bool actionDone:1; bool reverseEvent:1; bool deletableToBinding:1; - QDeclarativeProperty property; + QQmlProperty property; QVariant fromValue; QVariant toValue; - QDeclarativeAbstractBinding *fromBinding; - QWeakPointer toBinding; - QDeclarativeActionEvent *event; + QQmlAbstractBinding *fromBinding; + QWeakPointer toBinding; + QQuickActionEvent *event; //strictly for matching QObject *specifiedObject; @@ -84,10 +84,10 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeAction void deleteFromBinding(); }; -class Q_AUTOTEST_EXPORT QDeclarativeActionEvent +class Q_AUTOTEST_EXPORT QQuickActionEvent { public: - virtual ~QDeclarativeActionEvent(); + virtual ~QQuickActionEvent(); enum EventType { Script, SignalHandler, ParentChange, AnchorChanges }; enum Reason { ActualChange, FastForward }; @@ -99,7 +99,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeActionEvent virtual void reverse(Reason reason = ActualChange); virtual void saveOriginals() {} virtual bool needsCopy() { return false; } - virtual void copyOriginals(QDeclarativeActionEvent *) {} + virtual void copyOriginals(QQuickActionEvent *) {} virtual bool isRewindable() { return isReversable(); } virtual void rewind() {} @@ -108,87 +108,87 @@ class Q_AUTOTEST_EXPORT QDeclarativeActionEvent virtual bool changesBindings(); virtual void clearBindings(); - virtual bool override(QDeclarativeActionEvent*other); + virtual bool override(QQuickActionEvent*other); }; -//### rename to QDeclarativeStateChange? -class QDeclarativeStateGroup; -class QDeclarativeState; -class QDeclarativeStateOperationPrivate; -class Q_QUICK_EXPORT QDeclarativeStateOperation : public QObject +//### rename to QQuickStateChange? +class QQuickStateGroup; +class QQuickState; +class QQuickStateOperationPrivate; +class Q_QUICK_EXPORT QQuickStateOperation : public QObject { Q_OBJECT public: - QDeclarativeStateOperation(QObject *parent = 0) + QQuickStateOperation(QObject *parent = 0) : QObject(parent) {} - typedef QList ActionList; + typedef QList ActionList; virtual ActionList actions(); - QDeclarativeState *state() const; - void setState(QDeclarativeState *state); + QQuickState *state() const; + void setState(QQuickState *state); protected: - QDeclarativeStateOperation(QObjectPrivate &dd, QObject *parent = 0); + QQuickStateOperation(QObjectPrivate &dd, QObject *parent = 0); private: - Q_DECLARE_PRIVATE(QDeclarativeStateOperation) - Q_DISABLE_COPY(QDeclarativeStateOperation) + Q_DECLARE_PRIVATE(QQuickStateOperation) + Q_DISABLE_COPY(QQuickStateOperation) }; -typedef QDeclarativeStateOperation::ActionList QDeclarativeStateActions; +typedef QQuickStateOperation::ActionList QQuickStateActions; -class QDeclarativeTransition; -class QDeclarativeStatePrivate; -class Q_QUICK_EXPORT QDeclarativeState : public QObject +class QQuickTransition; +class QQuickStatePrivate; +class Q_QUICK_EXPORT QQuickState : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName) - Q_PROPERTY(QDeclarativeBinding *when READ when WRITE setWhen) + Q_PROPERTY(QQmlBinding *when READ when WRITE setWhen) Q_PROPERTY(QString extend READ extends WRITE setExtends) - Q_PROPERTY(QDeclarativeListProperty changes READ changes) + Q_PROPERTY(QQmlListProperty changes READ changes) Q_CLASSINFO("DefaultProperty", "changes") Q_CLASSINFO("DeferredPropertyNames", "changes") public: - QDeclarativeState(QObject *parent=0); - virtual ~QDeclarativeState(); + QQuickState(QObject *parent=0); + virtual ~QQuickState(); QString name() const; void setName(const QString &); bool isNamed() const; - /*'when' is a QDeclarativeBinding to limit state changes oscillation + /*'when' is a QQmlBinding to limit state changes oscillation due to the unpredictable order of evaluation of bound expressions*/ bool isWhenKnown() const; - QDeclarativeBinding *when() const; - void setWhen(QDeclarativeBinding *); + QQmlBinding *when() const; + void setWhen(QQmlBinding *); QString extends() const; void setExtends(const QString &); - QDeclarativeListProperty changes(); + QQmlListProperty changes(); int operationCount() const; - QDeclarativeStateOperation *operationAt(int) const; + QQuickStateOperation *operationAt(int) const; - QDeclarativeState &operator<<(QDeclarativeStateOperation *); + QQuickState &operator<<(QQuickStateOperation *); - void apply(QDeclarativeTransition *, QDeclarativeState *revert); + void apply(QQuickTransition *, QQuickState *revert); void cancel(); - QDeclarativeStateGroup *stateGroup() const; - void setStateGroup(QDeclarativeStateGroup *); + QQuickStateGroup *stateGroup() const; + void setStateGroup(QQuickStateGroup *); bool containsPropertyInRevertList(QObject *target, const QString &name) const; bool changeValueInRevertList(QObject *target, const QString &name, const QVariant &revertValue); - bool changeBindingInRevertList(QObject *target, const QString &name, QDeclarativeAbstractBinding *binding); + bool changeBindingInRevertList(QObject *target, const QString &name, QQmlAbstractBinding *binding); bool removeEntryFromRevertList(QObject *target, const QString &name); - void addEntryToRevertList(const QDeclarativeAction &action); + void addEntryToRevertList(const QQuickAction &action); void removeAllEntriesFromRevertList(QObject *target); - void addEntriesToRevertList(const QList &actions); + void addEntriesToRevertList(const QList &actions); QVariant valueInRevertList(QObject *target, const QString &name) const; - QDeclarativeAbstractBinding *bindingInRevertList(QObject *target, const QString &name) const; + QQmlAbstractBinding *bindingInRevertList(QObject *target, const QString &name) const; bool isStateActive() const; @@ -196,15 +196,15 @@ class Q_QUICK_EXPORT QDeclarativeState : public QObject void completed(); private: - Q_DECLARE_PRIVATE(QDeclarativeState) - Q_DISABLE_COPY(QDeclarativeState) + Q_DECLARE_PRIVATE(QQuickState) + Q_DISABLE_COPY(QQuickState) }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeStateOperation) -QML_DECLARE_TYPE(QDeclarativeState) +QML_DECLARE_TYPE(QQuickStateOperation) +QML_DECLARE_TYPE(QQuickState) QT_END_HEADER -#endif // QDECLARATIVESTATE_H +#endif // QQUICKSTATE_H diff --git a/src/quick/util/qdeclarativestate_p_p.h b/src/quick/util/qquickstate_p_p.h similarity index 61% rename from src/quick/util/qdeclarativestate_p_p.h rename to src/quick/util/qquickstate_p_p.h index 4cf2bf4561..e1cd85a00c 100644 --- a/src/quick/util/qdeclarativestate_p_p.h +++ b/src/quick/util/qquickstate_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESTATE_P_H -#define QDECLARATIVESTATE_P_H +#ifndef QQUICKSTATE_P_H +#define QQUICKSTATE_P_H // // W A R N I N G @@ -53,24 +53,24 @@ // We mean it. // -#include "qdeclarativestate_p.h" +#include "qquickstate_p.h" -#include "qdeclarativetransitionmanager_p_p.h" +#include "qquicktransitionmanager_p_p.h" -#include -#include +#include +#include -#include +#include #include QT_BEGIN_NAMESPACE -class QDeclarativeSimpleAction +class QQuickSimpleAction { public: enum State { StartState, EndState }; - QDeclarativeSimpleAction(const QDeclarativeAction &a, State state = StartState) + QQuickSimpleAction(const QQuickAction &a, State state = StartState) { m_property = a.property; m_specifiedObject = a.specifiedObject; @@ -78,8 +78,8 @@ class QDeclarativeSimpleAction m_event = a.event; if (state == StartState) { m_value = a.fromValue; - if (QDeclarativePropertyPrivate::binding(m_property)) { - m_binding = QDeclarativeAbstractBinding::getPointer(QDeclarativePropertyPrivate::binding(m_property)); + if (QQmlPropertyPrivate::binding(m_property)) { + m_binding = QQmlAbstractBinding::getPointer(QQmlPropertyPrivate::binding(m_property)); } m_reverseEvent = true; } else { @@ -89,14 +89,14 @@ class QDeclarativeSimpleAction } } - ~QDeclarativeSimpleAction() + ~QQuickSimpleAction() { } - QDeclarativeSimpleAction(const QDeclarativeSimpleAction &other) + QQuickSimpleAction(const QQuickSimpleAction &other) : m_property(other.m_property), m_value(other.m_value), - m_binding(QDeclarativeAbstractBinding::getPointer(other.binding())), + m_binding(QQmlAbstractBinding::getPointer(other.binding())), m_specifiedObject(other.m_specifiedObject), m_specifiedProperty(other.m_specifiedProperty), m_event(other.m_event), @@ -104,11 +104,11 @@ class QDeclarativeSimpleAction { } - QDeclarativeSimpleAction &operator =(const QDeclarativeSimpleAction &other) + QQuickSimpleAction &operator =(const QQuickSimpleAction &other) { m_property = other.m_property; m_value = other.m_value; - m_binding = QDeclarativeAbstractBinding::getPointer(other.binding()); + m_binding = QQmlAbstractBinding::getPointer(other.binding()); m_specifiedObject = other.m_specifiedObject; m_specifiedProperty = other.m_specifiedProperty; m_event = other.m_event; @@ -117,12 +117,12 @@ class QDeclarativeSimpleAction return *this; } - void setProperty(const QDeclarativeProperty &property) + void setProperty(const QQmlProperty &property) { m_property = property; } - const QDeclarativeProperty &property() const + const QQmlProperty &property() const { return m_property; } @@ -137,12 +137,12 @@ class QDeclarativeSimpleAction return m_value; } - void setBinding(QDeclarativeAbstractBinding *binding) + void setBinding(QQmlAbstractBinding *binding) { - m_binding = QDeclarativeAbstractBinding::getPointer(binding); + m_binding = QQmlAbstractBinding::getPointer(binding); } - QDeclarativeAbstractBinding *binding() const + QQmlAbstractBinding *binding() const { return m_binding.data(); } @@ -157,7 +157,7 @@ class QDeclarativeSimpleAction return m_specifiedProperty; } - QDeclarativeActionEvent *event() const + QQuickActionEvent *event() const { return m_event; } @@ -168,97 +168,97 @@ class QDeclarativeSimpleAction } private: - QDeclarativeProperty m_property; + QQmlProperty m_property; QVariant m_value; - QDeclarativeAbstractBinding::Pointer m_binding; + QQmlAbstractBinding::Pointer m_binding; QObject *m_specifiedObject; QString m_specifiedProperty; - QDeclarativeActionEvent *m_event; + QQuickActionEvent *m_event; bool m_reverseEvent; }; -class QDeclarativeRevertAction +class QQuickRevertAction { public: - QDeclarativeRevertAction() : event(0) {} - QDeclarativeRevertAction(const QDeclarativeProperty &prop) : property(prop), event(0) {} - QDeclarativeRevertAction(QDeclarativeActionEvent *e) : event(e) {} - QDeclarativeProperty property; - QDeclarativeActionEvent *event; + QQuickRevertAction() : event(0) {} + QQuickRevertAction(const QQmlProperty &prop) : property(prop), event(0) {} + QQuickRevertAction(QQuickActionEvent *e) : event(e) {} + QQmlProperty property; + QQuickActionEvent *event; }; -class QDeclarativeStateOperationPrivate : public QObjectPrivate +class QQuickStateOperationPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeStateOperation) + Q_DECLARE_PUBLIC(QQuickStateOperation) public: - QDeclarativeStateOperationPrivate() + QQuickStateOperationPrivate() : m_state(0) {} - QDeclarativeState *m_state; + QQuickState *m_state; }; -class QDeclarativeStatePrivate : public QObjectPrivate +class QQuickStatePrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeState) + Q_DECLARE_PUBLIC(QQuickState) public: - QDeclarativeStatePrivate() + QQuickStatePrivate() : when(0), named(false), inState(false), group(0) {} - typedef QList SimpleActionList; + typedef QList SimpleActionList; QString name; - QDeclarativeBinding *when; + QQmlBinding *when; bool named; - struct OperationGuard : public QDeclarativeGuard + struct OperationGuard : public QQmlGuard { OperationGuard(QObject *obj, QList *l) : list(l) { - setObject(static_cast(obj)); + setObject(static_cast(obj)); } QList *list; - void objectDestroyed(QDeclarativeStateOperation *) { + void objectDestroyed(QQuickStateOperation *) { // we assume priv will always be destroyed after objectDestroyed calls list->removeOne(*this); } }; QList operations; - static void operations_append(QDeclarativeListProperty *prop, QDeclarativeStateOperation *op) { + static void operations_append(QQmlListProperty *prop, QQuickStateOperation *op) { QList *list = static_cast *>(prop->data); - op->setState(qobject_cast(prop->object)); + op->setState(qobject_cast(prop->object)); list->append(OperationGuard(op, list)); } - static void operations_clear(QDeclarativeListProperty *prop) { + static void operations_clear(QQmlListProperty *prop) { QList *list = static_cast *>(prop->data); QMutableListIterator listIterator(*list); while(listIterator.hasNext()) listIterator.next()->setState(0); list->clear(); } - static int operations_count(QDeclarativeListProperty *prop) { + static int operations_count(QQmlListProperty *prop) { QList *list = static_cast *>(prop->data); return list->count(); } - static QDeclarativeStateOperation *operations_at(QDeclarativeListProperty *prop, int index) { + static QQuickStateOperation *operations_at(QQmlListProperty *prop, int index) { QList *list = static_cast *>(prop->data); return list->at(index); } - QDeclarativeTransitionManager transitionManager; + QQuickTransitionManager transitionManager; SimpleActionList revertList; - QList reverting; + QList reverting; QString extends; mutable bool inState; - QDeclarativeStateGroup *group; + QQuickStateGroup *group; - QDeclarativeStateOperation::ActionList generateActionList() const; + QQuickStateOperation::ActionList generateActionList() const; void complete(); }; QT_END_NAMESPACE -#endif // QDECLARATIVESTATE_P_H +#endif // QQUICKSTATE_P_H diff --git a/src/quick/util/qdeclarativestateoperations.cpp b/src/quick/util/qquickstatechangescript.cpp similarity index 63% rename from src/quick/util/qdeclarativestateoperations.cpp rename to src/quick/util/qquickstatechangescript.cpp index 3ecf4973d5..4dedbcc920 100644 --- a/src/quick/util/qdeclarativestateoperations.cpp +++ b/src/quick/util/qquickstatechangescript.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,17 +39,17 @@ ** ****************************************************************************/ -#include "qdeclarativestateoperations_p.h" +#include "qquickstatechangescript_p.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "qdeclarativestate_p_p.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "qquickstate_p_p.h" #include #include @@ -58,17 +58,17 @@ QT_BEGIN_NAMESPACE -class QDeclarativeStateChangeScriptPrivate : public QDeclarativeStateOperationPrivate +class QQuickStateChangeScriptPrivate : public QQuickStateOperationPrivate { public: - QDeclarativeStateChangeScriptPrivate() {} + QQuickStateChangeScriptPrivate() {} - QDeclarativeScriptString script; + QQmlScriptString script; QString name; }; /*! - \qmlclass StateChangeScript QDeclarativeStateChangeScript + \qmlclass StateChangeScript QQuickStateChangeScript \inqmlmodule QtQuick 2 \ingroup qml-state-elements \brief The StateChangeScript element allows you to run a script in a state. @@ -82,12 +82,12 @@ class QDeclarativeStateChangeScriptPrivate : public QDeclarativeStateOperationPr \sa ScriptAction */ -QDeclarativeStateChangeScript::QDeclarativeStateChangeScript(QObject *parent) -: QDeclarativeStateOperation(*(new QDeclarativeStateChangeScriptPrivate), parent) +QQuickStateChangeScript::QQuickStateChangeScript(QObject *parent) +: QQuickStateOperation(*(new QQuickStateChangeScriptPrivate), parent) { } -QDeclarativeStateChangeScript::~QDeclarativeStateChangeScript() +QQuickStateChangeScript::~QQuickStateChangeScript() { } @@ -95,15 +95,15 @@ QDeclarativeStateChangeScript::~QDeclarativeStateChangeScript() \qmlproperty script QtQuick2::StateChangeScript::script This property holds the script to run when the state is current. */ -QDeclarativeScriptString QDeclarativeStateChangeScript::script() const +QQmlScriptString QQuickStateChangeScript::script() const { - Q_D(const QDeclarativeStateChangeScript); + Q_D(const QQuickStateChangeScript); return d->script; } -void QDeclarativeStateChangeScript::setScript(const QDeclarativeScriptString &s) +void QQuickStateChangeScript::setScript(const QQmlScriptString &s) { - Q_D(QDeclarativeStateChangeScript); + Q_D(QQuickStateChangeScript); d->script = s; } @@ -114,44 +114,45 @@ void QDeclarativeStateChangeScript::setScript(const QDeclarativeScriptString &s) \sa ScriptAction::scriptName */ -QString QDeclarativeStateChangeScript::name() const +QString QQuickStateChangeScript::name() const { - Q_D(const QDeclarativeStateChangeScript); + Q_D(const QQuickStateChangeScript); return d->name; } -void QDeclarativeStateChangeScript::setName(const QString &n) +void QQuickStateChangeScript::setName(const QString &n) { - Q_D(QDeclarativeStateChangeScript); + Q_D(QQuickStateChangeScript); d->name = n; } -void QDeclarativeStateChangeScript::execute(Reason) +void QQuickStateChangeScript::execute(Reason) { - Q_D(QDeclarativeStateChangeScript); + Q_D(QQuickStateChangeScript); if (!d->script.script().isEmpty()) { - QDeclarativeExpression expr(d->script); + QQmlExpression expr(d->script); expr.evaluate(); if (expr.hasError()) qmlInfo(this, expr.error()); } } -QDeclarativeStateChangeScript::ActionList QDeclarativeStateChangeScript::actions() +QQuickStateChangeScript::ActionList QQuickStateChangeScript::actions() { ActionList rv; - QDeclarativeAction a; + QQuickAction a; a.event = this; rv << a; return rv; } -QDeclarativeActionEvent::EventType QDeclarativeStateChangeScript::type() const +QQuickActionEvent::EventType QQuickStateChangeScript::type() const { return Script; } -#include + +#include QT_END_NAMESPACE diff --git a/src/quick/util/qdeclarativestateoperations_p.h b/src/quick/util/qquickstatechangescript_p.h similarity index 71% rename from src/quick/util/qdeclarativestateoperations_p.h rename to src/quick/util/qquickstatechangescript_p.h index a64a7e2972..444657d245 100644 --- a/src/quick/util/qdeclarativestateoperations_p.h +++ b/src/quick/util/qquickstatechangescript_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,35 +39,35 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESTATEOPERATIONS_H -#define QDECLARATIVESTATEOPERATIONS_H +#ifndef QQUICKSTATEOPERATIONS_H +#define QQUICKSTATEOPERATIONS_H -#include "qdeclarativestate_p.h" -#include +#include "qquickstate_p.h" +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeStateChangeScriptPrivate; -class Q_AUTOTEST_EXPORT QDeclarativeStateChangeScript : public QDeclarativeStateOperation, public QDeclarativeActionEvent +class QQuickStateChangeScriptPrivate; +class Q_AUTOTEST_EXPORT QQuickStateChangeScript : public QQuickStateOperation, public QQuickActionEvent { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeStateChangeScript) + Q_DECLARE_PRIVATE(QQuickStateChangeScript) - Q_PROPERTY(QDeclarativeScriptString script READ script WRITE setScript) + Q_PROPERTY(QQmlScriptString script READ script WRITE setScript) Q_PROPERTY(QString name READ name WRITE setName) public: - QDeclarativeStateChangeScript(QObject *parent=0); - ~QDeclarativeStateChangeScript(); + QQuickStateChangeScript(QObject *parent=0); + ~QQuickStateChangeScript(); virtual ActionList actions(); virtual EventType type() const; - QDeclarativeScriptString script() const; - void setScript(const QDeclarativeScriptString &); + QQmlScriptString script() const; + void setScript(const QQmlScriptString &); QString name() const; void setName(const QString &); @@ -78,8 +78,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeStateChangeScript : public QDeclarativeState QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeStateChangeScript) +QML_DECLARE_TYPE(QQuickStateChangeScript) QT_END_HEADER -#endif // QDECLARATIVESTATEOPERATIONS_H +#endif // QQUICKSTATEOPERATIONS_H diff --git a/src/quick/util/qdeclarativestategroup.cpp b/src/quick/util/qquickstategroup.cpp similarity index 62% rename from src/quick/util/qdeclarativestategroup.cpp rename to src/quick/util/qquickstategroup.cpp index 1ed3ffc582..3a3192716e 100644 --- a/src/quick/util/qdeclarativestategroup.cpp +++ b/src/quick/util/qquickstategroup.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,60 +39,60 @@ ** ****************************************************************************/ -#include "qdeclarativestategroup_p.h" +#include "qquickstategroup_p.h" -#include "qdeclarativetransition_p.h" +#include "qquicktransition_p.h" -#include -#include +#include +#include #include #include #include #include -#include +#include QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG); -class QDeclarativeStateGroupPrivate : public QObjectPrivate +class QQuickStateGroupPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeStateGroup) + Q_DECLARE_PUBLIC(QQuickStateGroup) public: - QDeclarativeStateGroupPrivate() + QQuickStateGroupPrivate() : nullState(0), componentComplete(true), ignoreTrans(false), applyingState(false), unnamedCount(0) {} QString currentState; - QDeclarativeState *nullState; + QQuickState *nullState; - static void append_state(QDeclarativeListProperty *list, QDeclarativeState *state); - static int count_state(QDeclarativeListProperty *list); - static QDeclarativeState *at_state(QDeclarativeListProperty *list, int index); - static void clear_states(QDeclarativeListProperty *list); + static void append_state(QQmlListProperty *list, QQuickState *state); + static int count_state(QQmlListProperty *list); + static QQuickState *at_state(QQmlListProperty *list, int index); + static void clear_states(QQmlListProperty *list); - static void append_transition(QDeclarativeListProperty *list, QDeclarativeTransition *state); - static int count_transitions(QDeclarativeListProperty *list); - static QDeclarativeTransition *at_transition(QDeclarativeListProperty *list, int index); - static void clear_transitions(QDeclarativeListProperty *list); + static void append_transition(QQmlListProperty *list, QQuickTransition *state); + static int count_transitions(QQmlListProperty *list); + static QQuickTransition *at_transition(QQmlListProperty *list, int index); + static void clear_transitions(QQmlListProperty *list); - QList states; - QList transitions; + QList states; + QList transitions; bool componentComplete; bool ignoreTrans; bool applyingState; int unnamedCount; - QDeclarativeTransition *findTransition(const QString &from, const QString &to); + QQuickTransition *findTransition(const QString &from, const QString &to); void setCurrentStateInternal(const QString &state, bool = false); bool updateAutoState(); }; /*! - \qmlclass StateGroup QDeclarativeStateGroup + \qmlclass StateGroup QQuickStateGroup \inqmlmodule QtQuick 2 \ingroup qml-state-elements \brief The StateGroup element provides state support for non-Item elements. @@ -118,24 +118,24 @@ class QDeclarativeStateGroupPrivate : public QObjectPrivate } \endqml - \sa {qmlstate}{States} {QML Animation and Transitions}{Transitions}, {QtDeclarative} + \sa {qmlstate}{States} {QML Animation and Transitions}{Transitions}, {QtQml} */ -QDeclarativeStateGroup::QDeclarativeStateGroup(QObject *parent) - : QObject(*(new QDeclarativeStateGroupPrivate), parent) +QQuickStateGroup::QQuickStateGroup(QObject *parent) + : QObject(*(new QQuickStateGroupPrivate), parent) { } -QDeclarativeStateGroup::~QDeclarativeStateGroup() +QQuickStateGroup::~QQuickStateGroup() { - Q_D(const QDeclarativeStateGroup); + Q_D(const QQuickStateGroup); for (int i = 0; i < d->states.count(); ++i) d->states.at(i)->setStateGroup(0); } -QList QDeclarativeStateGroup::states() const +QList QQuickStateGroup::states() const { - Q_D(const QDeclarativeStateGroup); + Q_D(const QQuickStateGroup); return d->states; } @@ -159,18 +159,18 @@ QList QDeclarativeStateGroup::states() const \sa {qmlstate}{States} */ -QDeclarativeListProperty QDeclarativeStateGroup::statesProperty() +QQmlListProperty QQuickStateGroup::statesProperty() { - Q_D(QDeclarativeStateGroup); - return QDeclarativeListProperty(this, &d->states, &QDeclarativeStateGroupPrivate::append_state, - &QDeclarativeStateGroupPrivate::count_state, - &QDeclarativeStateGroupPrivate::at_state, - &QDeclarativeStateGroupPrivate::clear_states); + Q_D(QQuickStateGroup); + return QQmlListProperty(this, &d->states, &QQuickStateGroupPrivate::append_state, + &QQuickStateGroupPrivate::count_state, + &QQuickStateGroupPrivate::at_state, + &QQuickStateGroupPrivate::clear_states); } -void QDeclarativeStateGroupPrivate::append_state(QDeclarativeListProperty *list, QDeclarativeState *state) +void QQuickStateGroupPrivate::append_state(QQmlListProperty *list, QQuickState *state) { - QDeclarativeStateGroup *_this = static_cast(list->object); + QQuickStateGroup *_this = static_cast(list->object); if (state) { _this->d_func()->states.append(state); state->setStateGroup(_this); @@ -178,21 +178,21 @@ void QDeclarativeStateGroupPrivate::append_state(QDeclarativeListProperty *list) +int QQuickStateGroupPrivate::count_state(QQmlListProperty *list) { - QDeclarativeStateGroup *_this = static_cast(list->object); + QQuickStateGroup *_this = static_cast(list->object); return _this->d_func()->states.count(); } -QDeclarativeState *QDeclarativeStateGroupPrivate::at_state(QDeclarativeListProperty *list, int index) +QQuickState *QQuickStateGroupPrivate::at_state(QQmlListProperty *list, int index) { - QDeclarativeStateGroup *_this = static_cast(list->object); + QQuickStateGroup *_this = static_cast(list->object); return _this->d_func()->states.at(index); } -void QDeclarativeStateGroupPrivate::clear_states(QDeclarativeListProperty *list) +void QQuickStateGroupPrivate::clear_states(QQmlListProperty *list) { - QDeclarativeStateGroup *_this = static_cast(list->object); + QQuickStateGroup *_this = static_cast(list->object); _this->d_func()->setCurrentStateInternal(QString(), true); for (int i = 0; i < _this->d_func()->states.count(); ++i) { _this->d_func()->states.at(i)->setStateGroup(0); @@ -220,37 +220,37 @@ void QDeclarativeStateGroupPrivate::clear_states(QDeclarativeListProperty QDeclarativeStateGroup::transitionsProperty() +QQmlListProperty QQuickStateGroup::transitionsProperty() { - Q_D(QDeclarativeStateGroup); - return QDeclarativeListProperty(this, &d->transitions, &QDeclarativeStateGroupPrivate::append_transition, - &QDeclarativeStateGroupPrivate::count_transitions, - &QDeclarativeStateGroupPrivate::at_transition, - &QDeclarativeStateGroupPrivate::clear_transitions); + Q_D(QQuickStateGroup); + return QQmlListProperty(this, &d->transitions, &QQuickStateGroupPrivate::append_transition, + &QQuickStateGroupPrivate::count_transitions, + &QQuickStateGroupPrivate::at_transition, + &QQuickStateGroupPrivate::clear_transitions); } -void QDeclarativeStateGroupPrivate::append_transition(QDeclarativeListProperty *list, QDeclarativeTransition *trans) +void QQuickStateGroupPrivate::append_transition(QQmlListProperty *list, QQuickTransition *trans) { - QDeclarativeStateGroup *_this = static_cast(list->object); + QQuickStateGroup *_this = static_cast(list->object); if (trans) _this->d_func()->transitions.append(trans); } -int QDeclarativeStateGroupPrivate::count_transitions(QDeclarativeListProperty *list) +int QQuickStateGroupPrivate::count_transitions(QQmlListProperty *list) { - QDeclarativeStateGroup *_this = static_cast(list->object); + QQuickStateGroup *_this = static_cast(list->object); return _this->d_func()->transitions.count(); } -QDeclarativeTransition *QDeclarativeStateGroupPrivate::at_transition(QDeclarativeListProperty *list, int index) +QQuickTransition *QQuickStateGroupPrivate::at_transition(QQmlListProperty *list, int index) { - QDeclarativeStateGroup *_this = static_cast(list->object); + QQuickStateGroup *_this = static_cast(list->object); return _this->d_func()->transitions.at(index); } -void QDeclarativeStateGroupPrivate::clear_transitions(QDeclarativeListProperty *list) +void QQuickStateGroupPrivate::clear_transitions(QQmlListProperty *list) { - QDeclarativeStateGroup *_this = static_cast(list->object); + QQuickStateGroup *_this = static_cast(list->object); _this->d_func()->transitions.clear(); } @@ -277,34 +277,34 @@ void QDeclarativeStateGroupPrivate::clear_transitions(QDeclarativeListPropertycurrentState; } -void QDeclarativeStateGroup::setState(const QString &state) +void QQuickStateGroup::setState(const QString &state) { - Q_D(QDeclarativeStateGroup); + Q_D(QQuickStateGroup); if (d->currentState == state) return; d->setCurrentStateInternal(state); } -void QDeclarativeStateGroup::classBegin() +void QQuickStateGroup::classBegin() { - Q_D(QDeclarativeStateGroup); + Q_D(QQuickStateGroup); d->componentComplete = false; } -void QDeclarativeStateGroup::componentComplete() +void QQuickStateGroup::componentComplete() { - Q_D(QDeclarativeStateGroup); + Q_D(QQuickStateGroup); d->componentComplete = true; for (int ii = 0; ii < d->states.count(); ++ii) { - QDeclarativeState *state = d->states.at(ii); + QQuickState *state = d->states.at(ii); if (!state->isNamed()) state->setName(QLatin1String("anonymousState") % QString::number(++d->unnamedCount)); } @@ -321,21 +321,21 @@ void QDeclarativeStateGroup::componentComplete() /*! Returns true if the state was changed, otherwise false. */ -bool QDeclarativeStateGroup::updateAutoState() +bool QQuickStateGroup::updateAutoState() { - Q_D(QDeclarativeStateGroup); + Q_D(QQuickStateGroup); return d->updateAutoState(); } -bool QDeclarativeStateGroupPrivate::updateAutoState() +bool QQuickStateGroupPrivate::updateAutoState() { - Q_Q(QDeclarativeStateGroup); + Q_Q(QQuickStateGroup); if (!componentComplete) return false; bool revert = false; for (int ii = 0; ii < states.count(); ++ii) { - QDeclarativeState *state = states.at(ii); + QQuickState *state = states.at(ii); if (state->isWhenKnown()) { if (state->isNamed()) { if (state->when() && state->when()->evaluate().toBool()) { @@ -363,15 +363,15 @@ bool QDeclarativeStateGroupPrivate::updateAutoState() } } -QDeclarativeTransition *QDeclarativeStateGroupPrivate::findTransition(const QString &from, const QString &to) +QQuickTransition *QQuickStateGroupPrivate::findTransition(const QString &from, const QString &to) { - QDeclarativeTransition *highest = 0; + QQuickTransition *highest = 0; int score = 0; bool reversed = false; bool done = false; for (int ii = 0; !done && ii < transitions.count(); ++ii) { - QDeclarativeTransition *t = transitions.at(ii); + QQuickTransition *t = transitions.at(ii); if (!t->enabled()) continue; for (int ii = 0; ii < 2; ++ii) @@ -428,10 +428,10 @@ QDeclarativeTransition *QDeclarativeStateGroupPrivate::findTransition(const QStr return highest; } -void QDeclarativeStateGroupPrivate::setCurrentStateInternal(const QString &state, +void QQuickStateGroupPrivate::setCurrentStateInternal(const QString &state, bool ignoreTrans) { - Q_Q(QDeclarativeStateGroup); + Q_Q(QQuickStateGroup); if (!componentComplete) { currentState = state; return; @@ -444,7 +444,7 @@ void QDeclarativeStateGroupPrivate::setCurrentStateInternal(const QString &state applyingState = true; - QDeclarativeTransition *transition = ignoreTrans ? 0 : findTransition(currentState, state); + QQuickTransition *transition = ignoreTrans ? 0 : findTransition(currentState, state); if (stateChangeDebug()) { qWarning() << this << "Changing state. From" << currentState << ". To" << state; if (transition) @@ -452,7 +452,7 @@ void QDeclarativeStateGroupPrivate::setCurrentStateInternal(const QString &state << transition->toState(); } - QDeclarativeState *oldState = 0; + QQuickState *oldState = 0; if (!currentState.isEmpty()) { for (int ii = 0; ii < states.count(); ++ii) { if (states.at(ii)->name() == currentState) { @@ -465,7 +465,7 @@ void QDeclarativeStateGroupPrivate::setCurrentStateInternal(const QString &state currentState = state; emit q->stateChanged(currentState); - QDeclarativeState *newState = 0; + QQuickState *newState = 0; for (int ii = 0; ii < states.count(); ++ii) { if (states.at(ii)->name() == currentState) { newState = states.at(ii); @@ -475,8 +475,8 @@ void QDeclarativeStateGroupPrivate::setCurrentStateInternal(const QString &state if (oldState == 0 || newState == 0) { if (!nullState) { - nullState = new QDeclarativeState; - QDeclarative_setParent_noEvent(nullState, q); + nullState = new QQuickState; + QQml_setParent_noEvent(nullState, q); nullState->setStateGroup(q); } if (!oldState) oldState = nullState; @@ -487,11 +487,11 @@ void QDeclarativeStateGroupPrivate::setCurrentStateInternal(const QString &state applyingState = false; //### consider removing this (don't allow state changes in transition) } -QDeclarativeState *QDeclarativeStateGroup::findState(const QString &name) const +QQuickState *QQuickStateGroup::findState(const QString &name) const { - Q_D(const QDeclarativeStateGroup); + Q_D(const QQuickStateGroup); for (int i = 0; i < d->states.count(); ++i) { - QDeclarativeState *state = d->states.at(i); + QQuickState *state = d->states.at(i); if (state->name() == name) return state; } @@ -499,15 +499,15 @@ QDeclarativeState *QDeclarativeStateGroup::findState(const QString &name) const return 0; } -void QDeclarativeStateGroup::removeState(QDeclarativeState *state) +void QQuickStateGroup::removeState(QQuickState *state) { - Q_D(QDeclarativeStateGroup); + Q_D(QQuickStateGroup); d->states.removeOne(state); } -void QDeclarativeStateGroup::stateAboutToComplete() +void QQuickStateGroup::stateAboutToComplete() { - Q_D(QDeclarativeStateGroup); + Q_D(QQuickStateGroup); d->applyingState = false; } diff --git a/src/quick/util/qdeclarativestategroup_p.h b/src/quick/util/qquickstategroup_p.h similarity index 64% rename from src/quick/util/qdeclarativestategroup_p.h rename to src/quick/util/qquickstategroup_p.h index d0dc599a63..07e3c0505a 100644 --- a/src/quick/util/qdeclarativestategroup_p.h +++ b/src/quick/util/qquickstategroup_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,40 +39,40 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESTATEGROUP_H -#define QDECLARATIVESTATEGROUP_H +#ifndef QQUICKSTATEGROUP_H +#define QQUICKSTATEGROUP_H -#include "qdeclarativestate_p.h" +#include "qquickstate_p.h" QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeStateGroupPrivate; -class Q_QUICK_EXPORT QDeclarativeStateGroup : public QObject, public QDeclarativeParserStatus +class QQuickStateGroupPrivate; +class Q_QUICK_EXPORT QQuickStateGroup : public QObject, public QQmlParserStatus { Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) - Q_DECLARE_PRIVATE(QDeclarativeStateGroup) + Q_INTERFACES(QQmlParserStatus) + Q_DECLARE_PRIVATE(QQuickStateGroup) Q_PROPERTY(QString state READ state WRITE setState NOTIFY stateChanged) - Q_PROPERTY(QDeclarativeListProperty states READ statesProperty DESIGNABLE false) - Q_PROPERTY(QDeclarativeListProperty transitions READ transitionsProperty DESIGNABLE false) + Q_PROPERTY(QQmlListProperty states READ statesProperty DESIGNABLE false) + Q_PROPERTY(QQmlListProperty transitions READ transitionsProperty DESIGNABLE false) public: - QDeclarativeStateGroup(QObject * = 0); - virtual ~QDeclarativeStateGroup(); + QQuickStateGroup(QObject * = 0); + virtual ~QQuickStateGroup(); QString state() const; void setState(const QString &); - QDeclarativeListProperty statesProperty(); - QList states() const; + QQmlListProperty statesProperty(); + QList states() const; - QDeclarativeListProperty transitionsProperty(); + QQmlListProperty transitionsProperty(); - QDeclarativeState *findState(const QString &name) const; - void removeState(QDeclarativeState *state); + QQuickState *findState(const QString &name) const; + void removeState(QQuickState *state); virtual void classBegin(); virtual void componentComplete(); @@ -80,16 +80,16 @@ class Q_QUICK_EXPORT QDeclarativeStateGroup : public QObject, public QDeclarativ void stateChanged(const QString &); private: - friend class QDeclarativeState; - friend class QDeclarativeStatePrivate; + friend class QQuickState; + friend class QQuickStatePrivate; bool updateAutoState(); void stateAboutToComplete(); }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeStateGroup) +QML_DECLARE_TYPE(QQuickStateGroup) QT_END_HEADER -#endif // QDECLARATIVESTATEGROUP_H +#endif // QQUICKSTATEGROUP_H diff --git a/src/quick/util/qdeclarativestyledtext.cpp b/src/quick/util/qquickstyledtext.cpp similarity index 86% rename from src/quick/util/qdeclarativestyledtext.cpp rename to src/quick/util/qquickstyledtext.cpp index 164e33cec1..87d447169c 100644 --- a/src/quick/util/qdeclarativestyledtext.cpp +++ b/src/quick/util/qquickstyledtext.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,11 +45,11 @@ #include #include #include -#include "qdeclarativestyledtext_p.h" -#include +#include "qquickstyledtext_p.h" +#include /* - QDeclarativeStyledText supports few tags: + QQuickStyledText supports few tags: - bold - bold @@ -69,7 +69,7 @@ QT_BEGIN_NAMESPACE -class QDeclarativeStyledTextPrivate +class QQuickStyledTextPrivate { public: enum ListType { Ordered, Unordered }; @@ -81,10 +81,10 @@ class QDeclarativeStyledTextPrivate ListFormat format; }; - QDeclarativeStyledTextPrivate(const QString &t, QTextLayout &l, - QList &imgTags, + QQuickStyledTextPrivate(const QString &t, QTextLayout &l, + QList &imgTags, const QUrl &baseUrl, - QDeclarativeContext *context, + QQmlContext *context, bool preloadImages) : text(t), layout(l), imgTags(&imgTags), baseFont(layout.font()), baseUrl(baseUrl), hasNewLine(false), nbImages(0), updateImagePositions(false) , preFormat(false), prependSpace(false), hasSpace(true), preloadImages(preloadImages), context(context) @@ -115,7 +115,7 @@ class QDeclarativeStyledTextPrivate QString text; QTextLayout &layout; - QList *imgTags; + QList *imgTags; QFont baseFont; QStack listStack; QUrl baseUrl; @@ -126,7 +126,7 @@ class QDeclarativeStyledTextPrivate bool prependSpace; bool hasSpace; bool preloadImages; - QDeclarativeContext *context; + QQmlContext *context; static const QChar lessThan; static const QChar greaterThan; @@ -143,46 +143,46 @@ class QDeclarativeStyledTextPrivate static const int tabsize = 6; }; -const QChar QDeclarativeStyledTextPrivate::lessThan(QLatin1Char('<')); -const QChar QDeclarativeStyledTextPrivate::greaterThan(QLatin1Char('>')); -const QChar QDeclarativeStyledTextPrivate::equals(QLatin1Char('=')); -const QChar QDeclarativeStyledTextPrivate::singleQuote(QLatin1Char('\'')); -const QChar QDeclarativeStyledTextPrivate::doubleQuote(QLatin1Char('\"')); -const QChar QDeclarativeStyledTextPrivate::slash(QLatin1Char('/')); -const QChar QDeclarativeStyledTextPrivate::ampersand(QLatin1Char('&')); -const QChar QDeclarativeStyledTextPrivate::bullet(0x2022); -const QChar QDeclarativeStyledTextPrivate::disc(0x25e6); -const QChar QDeclarativeStyledTextPrivate::square(0x25a1); -const QChar QDeclarativeStyledTextPrivate::lineFeed(QLatin1Char('\n')); -const QChar QDeclarativeStyledTextPrivate::space(QLatin1Char(' ')); - -QDeclarativeStyledText::QDeclarativeStyledText(const QString &string, QTextLayout &layout, - QList &imgTags, +const QChar QQuickStyledTextPrivate::lessThan(QLatin1Char('<')); +const QChar QQuickStyledTextPrivate::greaterThan(QLatin1Char('>')); +const QChar QQuickStyledTextPrivate::equals(QLatin1Char('=')); +const QChar QQuickStyledTextPrivate::singleQuote(QLatin1Char('\'')); +const QChar QQuickStyledTextPrivate::doubleQuote(QLatin1Char('\"')); +const QChar QQuickStyledTextPrivate::slash(QLatin1Char('/')); +const QChar QQuickStyledTextPrivate::ampersand(QLatin1Char('&')); +const QChar QQuickStyledTextPrivate::bullet(0x2022); +const QChar QQuickStyledTextPrivate::disc(0x25e6); +const QChar QQuickStyledTextPrivate::square(0x25a1); +const QChar QQuickStyledTextPrivate::lineFeed(QLatin1Char('\n')); +const QChar QQuickStyledTextPrivate::space(QLatin1Char(' ')); + +QQuickStyledText::QQuickStyledText(const QString &string, QTextLayout &layout, + QList &imgTags, const QUrl &baseUrl, - QDeclarativeContext *context, + QQmlContext *context, bool preloadImages) - : d(new QDeclarativeStyledTextPrivate(string, layout, imgTags, baseUrl, context, preloadImages)) + : d(new QQuickStyledTextPrivate(string, layout, imgTags, baseUrl, context, preloadImages)) { } -QDeclarativeStyledText::~QDeclarativeStyledText() +QQuickStyledText::~QQuickStyledText() { delete d; } -void QDeclarativeStyledText::parse(const QString &string, QTextLayout &layout, - QList &imgTags, +void QQuickStyledText::parse(const QString &string, QTextLayout &layout, + QList &imgTags, const QUrl &baseUrl, - QDeclarativeContext *context, + QQmlContext *context, bool preloadImages) { if (string.isEmpty()) return; - QDeclarativeStyledText styledText(string, layout, imgTags, baseUrl, context, preloadImages); + QQuickStyledText styledText(string, layout, imgTags, baseUrl, context, preloadImages); styledText.d->parse(); } -void QDeclarativeStyledTextPrivate::parse() +void QQuickStyledTextPrivate::parse() { QList ranges; QStack formatStack; @@ -288,7 +288,7 @@ void QDeclarativeStyledTextPrivate::parse() layout.setAdditionalFormats(ranges); } -void QDeclarativeStyledTextPrivate::appendText(const QString &textIn, int start, int length, QString &textOut) +void QQuickStyledTextPrivate::appendText(const QString &textIn, int start, int length, QString &textOut) { if (prependSpace) textOut.append(space); @@ -298,7 +298,7 @@ void QDeclarativeStyledTextPrivate::appendText(const QString &textIn, int start, hasNewLine = false; } -bool QDeclarativeStyledTextPrivate::parseTag(const QChar *&ch, const QString &textIn, QString &textOut, QTextCharFormat &format) +bool QQuickStyledTextPrivate::parseTag(const QChar *&ch, const QString &textIn, QString &textOut, QTextCharFormat &format) { skipSpace(ch); @@ -438,7 +438,7 @@ bool QDeclarativeStyledTextPrivate::parseTag(const QChar *&ch, const QString &te return false; } -bool QDeclarativeStyledTextPrivate::parseCloseTag(const QChar *&ch, const QString &textIn, QString &textOut) +bool QQuickStyledTextPrivate::parseCloseTag(const QChar *&ch, const QString &textIn, QString &textOut) { skipSpace(ch); @@ -516,7 +516,7 @@ bool QDeclarativeStyledTextPrivate::parseCloseTag(const QChar *&ch, const QStrin return false; } -void QDeclarativeStyledTextPrivate::parseEntity(const QChar *&ch, const QString &textIn, QString &textOut) +void QQuickStyledTextPrivate::parseEntity(const QChar *&ch, const QString &textIn, QString &textOut) { int entityStart = ch - textIn.constData(); int entityLength = 0; @@ -536,7 +536,7 @@ void QDeclarativeStyledTextPrivate::parseEntity(const QChar *&ch, const QString } } -bool QDeclarativeStyledTextPrivate::parseFontAttributes(const QChar *&ch, const QString &textIn, QTextCharFormat &format) +bool QQuickStyledTextPrivate::parseFontAttributes(const QChar *&ch, const QString &textIn, QTextCharFormat &format) { bool valid = false; QPair attr; @@ -560,7 +560,7 @@ bool QDeclarativeStyledTextPrivate::parseFontAttributes(const QChar *&ch, const return valid; } -bool QDeclarativeStyledTextPrivate::parseOrderedListAttributes(const QChar *&ch, const QString &textIn) +bool QQuickStyledTextPrivate::parseOrderedListAttributes(const QChar *&ch, const QString &textIn) { bool valid = false; @@ -589,7 +589,7 @@ bool QDeclarativeStyledTextPrivate::parseOrderedListAttributes(const QChar *&ch, return valid; } -bool QDeclarativeStyledTextPrivate::parseUnorderedListAttributes(const QChar *&ch, const QString &textIn) +bool QQuickStyledTextPrivate::parseUnorderedListAttributes(const QChar *&ch, const QString &textIn) { bool valid = false; @@ -614,7 +614,7 @@ bool QDeclarativeStyledTextPrivate::parseUnorderedListAttributes(const QChar *&c return valid; } -bool QDeclarativeStyledTextPrivate::parseAnchorAttributes(const QChar *&ch, const QString &textIn, QTextCharFormat &format) +bool QQuickStyledTextPrivate::parseAnchorAttributes(const QChar *&ch, const QString &textIn, QTextCharFormat &format) { bool valid = false; @@ -632,12 +632,12 @@ bool QDeclarativeStyledTextPrivate::parseAnchorAttributes(const QChar *&ch, cons return valid; } -void QDeclarativeStyledTextPrivate::parseImageAttributes(const QChar *&ch, const QString &textIn, QString &textOut) +void QQuickStyledTextPrivate::parseImageAttributes(const QChar *&ch, const QString &textIn, QString &textOut) { qreal imgWidth = 0.0; if (!updateImagePositions) { - QDeclarativeStyledTextImgTag *image = new QDeclarativeStyledTextImgTag; + QQuickStyledTextImgTag *image = new QQuickStyledTextImgTag; image->position = textOut.length() + 1; QPair attr; @@ -651,9 +651,9 @@ void QDeclarativeStyledTextPrivate::parseImageAttributes(const QChar *&ch, const image->size.setHeight(attr.second.toString().toInt()); } else if (attr.first == QLatin1String("align")) { if (attr.second.toString() == QLatin1String("top")) { - image->align = QDeclarativeStyledTextImgTag::Top; + image->align = QQuickStyledTextImgTag::Top; } else if (attr.second.toString() == QLatin1String("middle")) { - image->align = QDeclarativeStyledTextImgTag::Middle; + image->align = QQuickStyledTextImgTag::Middle; } } } while (!ch->isNull() && !attr.first.isEmpty()); @@ -664,7 +664,7 @@ void QDeclarativeStyledTextPrivate::parseImageAttributes(const QChar *&ch, const // to avoid a relayout later on. QUrl url = baseUrl.resolved(image->url); if (url.isLocalFile()) { - QDeclarativePixmap *pix = new QDeclarativePixmap(context->engine(), url, image->size); + QQuickPixmap *pix = new QQuickPixmap(context->engine(), url, image->size); if (pix && pix->isReady()) { image->size = pix->implicitSize(); image->pix = pix; @@ -678,7 +678,7 @@ void QDeclarativeStyledTextPrivate::parseImageAttributes(const QChar *&ch, const } else { // if we already have a list of img tags for this text // we only want to update the positions of these tags. - QDeclarativeStyledTextImgTag *image = imgTags->value(nbImages); + QQuickStyledTextImgTag *image = imgTags->value(nbImages); image->position = textOut.length() + 1; imgWidth = image->size.width(); QPair attr; @@ -695,7 +695,7 @@ void QDeclarativeStyledTextPrivate::parseImageAttributes(const QChar *&ch, const textOut += QLatin1Char(' '); } -QPair QDeclarativeStyledTextPrivate::parseAttribute(const QChar *&ch, const QString &textIn) +QPair QQuickStyledTextPrivate::parseAttribute(const QChar *&ch, const QString &textIn) { skipSpace(ch); @@ -728,7 +728,7 @@ QPair QDeclarativeStyledTextPrivate::parseAttribute(const return QPair(); } -QStringRef QDeclarativeStyledTextPrivate::parseValue(const QChar *&ch, const QString &textIn) +QStringRef QQuickStyledTextPrivate::parseValue(const QChar *&ch, const QString &textIn) { int valStart = ch - textIn.constData(); int valLength = 0; @@ -743,7 +743,7 @@ QStringRef QDeclarativeStyledTextPrivate::parseValue(const QChar *&ch, const QSt return QStringRef(&textIn, valStart, valLength); } -QString QDeclarativeStyledTextPrivate::toAlpha(int value, bool upper) +QString QQuickStyledTextPrivate::toAlpha(int value, bool upper) { const char baseChar = upper ? 'A' : 'a'; @@ -757,7 +757,7 @@ QString QDeclarativeStyledTextPrivate::toAlpha(int value, bool upper) return result; } -QString QDeclarativeStyledTextPrivate::toRoman(int value, bool upper) +QString QQuickStyledTextPrivate::toRoman(int value, bool upper) { QString result = QLatin1String("?"); // works for up to 4999 items diff --git a/src/quick/util/qdeclarativestyledtext_p.h b/src/quick/util/qquickstyledtext_p.h similarity index 69% rename from src/quick/util/qdeclarativestyledtext_p.h rename to src/quick/util/qquickstyledtext_p.h index aa6ae3f869..bfc7ffe7ed 100644 --- a/src/quick/util/qdeclarativestyledtext_p.h +++ b/src/quick/util/qquickstyledtext_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,30 +39,30 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESTYLEDTEXT_H -#define QDECLARATIVESTYLEDTEXT_H +#ifndef QQUICKSTYLEDTEXT_H +#define QQUICKSTYLEDTEXT_H #include #include #include #include -#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeStyledTextImgTag; -class QDeclarativeStyledTextPrivate; +class QQuickStyledTextImgTag; +class QQuickStyledTextPrivate; class QString; -class QDeclarativeContext; +class QQmlContext; -class Q_AUTOTEST_EXPORT QDeclarativeStyledTextImgTag +class Q_AUTOTEST_EXPORT QQuickStyledTextImgTag { public: - QDeclarativeStyledTextImgTag() - : position(0), align(QDeclarativeStyledTextImgTag::Bottom), pix(0) + QQuickStyledTextImgTag() + : position(0), align(QQuickStyledTextImgTag::Bottom), pix(0) { } - ~QDeclarativeStyledTextImgTag() { delete pix; } + ~QQuickStyledTextImgTag() { delete pix; } enum Align { Bottom, @@ -75,27 +75,27 @@ class Q_AUTOTEST_EXPORT QDeclarativeStyledTextImgTag QSize size; int position; Align align; - QDeclarativePixmap *pix; + QQuickPixmap *pix; }; -class Q_AUTOTEST_EXPORT QDeclarativeStyledText +class Q_AUTOTEST_EXPORT QQuickStyledText { public: static void parse(const QString &string, QTextLayout &layout, - QList &imgTags, + QList &imgTags, const QUrl &baseUrl, - QDeclarativeContext *context, + QQmlContext *context, bool preloadImages); private: - QDeclarativeStyledText(const QString &string, QTextLayout &layout, - QList &imgTags, + QQuickStyledText(const QString &string, QTextLayout &layout, + QList &imgTags, const QUrl &baseUrl, - QDeclarativeContext *context, + QQmlContext *context, bool preloadImages); - ~QDeclarativeStyledText(); + ~QQuickStyledText(); - QDeclarativeStyledTextPrivate *d; + QQuickStyledTextPrivate *d; }; QT_END_NAMESPACE diff --git a/src/quick/util/qdeclarativesvgparser.cpp b/src/quick/util/qquicksvgparser.cpp similarity index 99% rename from src/quick/util/qdeclarativesvgparser.cpp rename to src/quick/util/qquicksvgparser.cpp index 41f12150d6..6a1b743160 100644 --- a/src/quick/util/qdeclarativesvgparser.cpp +++ b/src/quick/util/qquicksvgparser.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativesvgparser_p.h" +#include "qquicksvgparser_p.h" #include #include @@ -196,7 +196,7 @@ static void pathArcSegment(QPainterPath &path, a00 * x3 + a01 * y3, a10 * x3 + a11 * y3); } -void QDeclarativeSvgParser::pathArc(QPainterPath &path, +void QQuickSvgParser::pathArc(QPainterPath &path, qreal rx, qreal ry, qreal x_axis_rotation, @@ -277,7 +277,7 @@ void QDeclarativeSvgParser::pathArc(QPainterPath &path, } -bool QDeclarativeSvgParser::parsePathDataFast(const QString &dataStr, QPainterPath &path) +bool QQuickSvgParser::parsePathDataFast(const QString &dataStr, QPainterPath &path) { qreal x0 = 0, y0 = 0; // starting point qreal x = 0, y = 0; // current point diff --git a/src/quick/util/qdeclarativesvgparser_p.h b/src/quick/util/qquicksvgparser_p.h similarity index 93% rename from src/quick/util/qdeclarativesvgparser_p.h rename to src/quick/util/qquicksvgparser_p.h index d1ecf2574c..ed8234dc0f 100644 --- a/src/quick/util/qdeclarativesvgparser_p.h +++ b/src/quick/util/qquicksvgparser_p.h @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESVGPARSER_P_H -#define QDECLARATIVESVGPARSER_P_H +#ifndef QQUICKSVGPARSER_P_H +#define QQUICKSVGPARSER_P_H #include #include QT_BEGIN_NAMESPACE -namespace QDeclarativeSvgParser +namespace QQuickSvgParser { bool parsePathDataFast(const QString &dataStr, QPainterPath &path); void pathArc(QPainterPath &path, qreal rx, qreal ry, qreal x_axis_rotation, @@ -57,4 +57,4 @@ namespace QDeclarativeSvgParser QT_END_NAMESPACE -#endif // QDECLARATIVESVGPARSER_P_H +#endif // QQUICKSVGPARSER_P_H diff --git a/src/quick/util/qdeclarativesystempalette.cpp b/src/quick/util/qquicksystempalette.cpp similarity index 74% rename from src/quick/util/qdeclarativesystempalette.cpp rename to src/quick/util/qquicksystempalette.cpp index ab090e718e..735d18abf5 100644 --- a/src/quick/util/qdeclarativesystempalette.cpp +++ b/src/quick/util/qquicksystempalette.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativesystempalette_p.h" +#include "qquicksystempalette_p.h" #include @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE -class QDeclarativeSystemPalettePrivate : public QObjectPrivate +class QQuickSystemPalettePrivate : public QObjectPrivate { public: QPalette palette; @@ -57,7 +57,7 @@ class QDeclarativeSystemPalettePrivate : public QObjectPrivate /*! - \qmlclass SystemPalette QDeclarativeSystemPalette + \qmlclass SystemPalette QQuickSystemPalette \inqmlmodule QtQuick 2 \ingroup qml-utility-elements \brief The SystemPalette element provides access to the Qt palettes. @@ -76,20 +76,20 @@ class QDeclarativeSystemPalettePrivate : public QObjectPrivate group and uses this to color the window and text items appropriately: - \snippet doc/src/snippets/declarative/systempalette.qml 0 + \snippet doc/src/snippets/qml/systempalette.qml 0 \sa QPalette */ -QDeclarativeSystemPalette::QDeclarativeSystemPalette(QObject *parent) - : QObject(*(new QDeclarativeSystemPalettePrivate), parent) +QQuickSystemPalette::QQuickSystemPalette(QObject *parent) + : QObject(*(new QQuickSystemPalettePrivate), parent) { - Q_D(QDeclarativeSystemPalette); + Q_D(QQuickSystemPalette); d->palette = QGuiApplication::palette(); d->group = QPalette::Active; qApp->installEventFilter(this); } -QDeclarativeSystemPalette::~QDeclarativeSystemPalette() +QQuickSystemPalette::~QQuickSystemPalette() { } @@ -99,9 +99,9 @@ QDeclarativeSystemPalette::~QDeclarativeSystemPalette() \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::window() const +QColor QQuickSystemPalette::window() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::Window); } @@ -111,9 +111,9 @@ QColor QDeclarativeSystemPalette::window() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::windowText() const +QColor QQuickSystemPalette::windowText() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::WindowText); } @@ -123,9 +123,9 @@ QColor QDeclarativeSystemPalette::windowText() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::base() const +QColor QQuickSystemPalette::base() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::Base); } @@ -135,9 +135,9 @@ QColor QDeclarativeSystemPalette::base() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::text() const +QColor QQuickSystemPalette::text() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::Text); } @@ -147,9 +147,9 @@ QColor QDeclarativeSystemPalette::text() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::alternateBase() const +QColor QQuickSystemPalette::alternateBase() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::AlternateBase); } @@ -159,9 +159,9 @@ QColor QDeclarativeSystemPalette::alternateBase() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::button() const +QColor QQuickSystemPalette::button() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::Button); } @@ -171,9 +171,9 @@ QColor QDeclarativeSystemPalette::button() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::buttonText() const +QColor QQuickSystemPalette::buttonText() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::ButtonText); } @@ -183,9 +183,9 @@ QColor QDeclarativeSystemPalette::buttonText() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::light() const +QColor QQuickSystemPalette::light() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::Light); } @@ -195,9 +195,9 @@ QColor QDeclarativeSystemPalette::light() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::midlight() const +QColor QQuickSystemPalette::midlight() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::Midlight); } @@ -207,9 +207,9 @@ QColor QDeclarativeSystemPalette::midlight() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::dark() const +QColor QQuickSystemPalette::dark() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::Dark); } @@ -219,9 +219,9 @@ QColor QDeclarativeSystemPalette::dark() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::mid() const +QColor QQuickSystemPalette::mid() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::Mid); } @@ -231,9 +231,9 @@ QColor QDeclarativeSystemPalette::mid() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::shadow() const +QColor QQuickSystemPalette::shadow() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::Shadow); } @@ -243,9 +243,9 @@ QColor QDeclarativeSystemPalette::shadow() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::highlight() const +QColor QQuickSystemPalette::highlight() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::Highlight); } @@ -255,9 +255,9 @@ QColor QDeclarativeSystemPalette::highlight() const \sa QPalette::ColorRole */ -QColor QDeclarativeSystemPalette::highlightedText() const +QColor QQuickSystemPalette::highlightedText() const { - Q_D(const QDeclarativeSystemPalette); + Q_D(const QQuickSystemPalette); return d->palette.color(d->group, QPalette::HighlightedText); } @@ -274,20 +274,20 @@ QColor QDeclarativeSystemPalette::highlightedText() const \sa QPalette::ColorGroup */ -QDeclarativeSystemPalette::ColorGroup QDeclarativeSystemPalette::colorGroup() const +QQuickSystemPalette::ColorGroup QQuickSystemPalette::colorGroup() const { - Q_D(const QDeclarativeSystemPalette); - return (QDeclarativeSystemPalette::ColorGroup)d->group; + Q_D(const QQuickSystemPalette); + return (QQuickSystemPalette::ColorGroup)d->group; } -void QDeclarativeSystemPalette::setColorGroup(QDeclarativeSystemPalette::ColorGroup colorGroup) +void QQuickSystemPalette::setColorGroup(QQuickSystemPalette::ColorGroup colorGroup) { - Q_D(QDeclarativeSystemPalette); + Q_D(QQuickSystemPalette); d->group = (QPalette::ColorGroup)colorGroup; emit paletteChanged(); } -bool QDeclarativeSystemPalette::eventFilter(QObject *watched, QEvent *event) +bool QQuickSystemPalette::eventFilter(QObject *watched, QEvent *event) { if (watched == qApp) { if (event->type() == QEvent::ApplicationPaletteChange) { @@ -298,9 +298,9 @@ bool QDeclarativeSystemPalette::eventFilter(QObject *watched, QEvent *event) return QObject::eventFilter(watched, event); } -bool QDeclarativeSystemPalette::event(QEvent *event) +bool QQuickSystemPalette::event(QEvent *event) { - Q_D(QDeclarativeSystemPalette); + Q_D(QQuickSystemPalette); if (event->type() == QEvent::ApplicationPaletteChange) { d->palette = QGuiApplication::palette(); emit paletteChanged(); diff --git a/src/quick/util/qdeclarativesystempalette_p.h b/src/quick/util/qquicksystempalette_p.h similarity index 82% rename from src/quick/util/qdeclarativesystempalette_p.h rename to src/quick/util/qquicksystempalette_p.h index 84813e3030..e7b8f8a418 100644 --- a/src/quick/util/qdeclarativesystempalette_p.h +++ b/src/quick/util/qquicksystempalette_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVESYSTEMPALETTE_H -#define QDECLARATIVESYSTEMPALETTE_H +#ifndef QQUICKSYSTEMPALETTE_H +#define QQUICKSYSTEMPALETTE_H -#include +#include #include #include @@ -51,14 +51,14 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeSystemPalettePrivate; -class Q_AUTOTEST_EXPORT QDeclarativeSystemPalette : public QObject +class QQuickSystemPalettePrivate; +class Q_AUTOTEST_EXPORT QQuickSystemPalette : public QObject { Q_OBJECT Q_ENUMS(ColorGroup) - Q_DECLARE_PRIVATE(QDeclarativeSystemPalette) + Q_DECLARE_PRIVATE(QQuickSystemPalette) - Q_PROPERTY(QDeclarativeSystemPalette::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY paletteChanged) + Q_PROPERTY(QQuickSystemPalette::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY paletteChanged) Q_PROPERTY(QColor window READ window NOTIFY paletteChanged) Q_PROPERTY(QColor windowText READ windowText NOTIFY paletteChanged) Q_PROPERTY(QColor base READ base NOTIFY paletteChanged) @@ -75,8 +75,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeSystemPalette : public QObject Q_PROPERTY(QColor highlightedText READ highlightedText NOTIFY paletteChanged) public: - QDeclarativeSystemPalette(QObject *parent=0); - ~QDeclarativeSystemPalette(); + QQuickSystemPalette(QObject *parent=0); + ~QQuickSystemPalette(); enum ColorGroup { Active = QPalette::Active, Inactive = QPalette::Inactive, Disabled = QPalette::Disabled }; @@ -99,8 +99,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeSystemPalette : public QObject QColor highlight() const; QColor highlightedText() const; - QDeclarativeSystemPalette::ColorGroup colorGroup() const; - void setColorGroup(QDeclarativeSystemPalette::ColorGroup); + QQuickSystemPalette::ColorGroup colorGroup() const; + void setColorGroup(QQuickSystemPalette::ColorGroup); Q_SIGNALS: void paletteChanged(); @@ -113,8 +113,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeSystemPalette : public QObject QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeSystemPalette) +QML_DECLARE_TYPE(QQuickSystemPalette) QT_END_HEADER -#endif // QDECLARATIVESYSTEMPALETTE_H +#endif // QQUICKSYSTEMPALETTE_H diff --git a/src/quick/util/qdeclarativetimeline.cpp b/src/quick/util/qquicktimeline.cpp similarity index 69% rename from src/quick/util/qdeclarativetimeline.cpp rename to src/quick/util/qquicktimeline.cpp index a33fdd5104..3e8b36714a 100644 --- a/src/quick/util/qdeclarativetimeline.cpp +++ b/src/quick/util/qquicktimeline.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativetimeline_p_p.h" +#include "qquicktimeline_p_p.h" #include #include @@ -53,19 +53,19 @@ QT_BEGIN_NAMESPACE struct Update { - Update(QDeclarativeTimeLineValue *_g, qreal _v) + Update(QQuickTimeLineValue *_g, qreal _v) : g(_g), v(_v) {} - Update(const QDeclarativeTimeLineCallback &_e) + Update(const QQuickTimeLineCallback &_e) : g(0), v(0), e(_e) {} - QDeclarativeTimeLineValue *g; + QQuickTimeLineValue *g; qreal v; - QDeclarativeTimeLineCallback e; + QQuickTimeLineCallback e; }; -struct QDeclarativeTimeLinePrivate +struct QQuickTimeLinePrivate { - QDeclarativeTimeLinePrivate(QDeclarativeTimeLine *); + QQuickTimeLinePrivate(QQuickTimeLine *); struct Op { enum Type { @@ -79,7 +79,7 @@ struct QDeclarativeTimeLinePrivate }; Op() {} Op(Type t, int l, qreal v, qreal v2, int o, - const QDeclarativeTimeLineCallback &ev = QDeclarativeTimeLineCallback(), const QEasingCurve &es = QEasingCurve()) + const QQuickTimeLineCallback &ev = QQuickTimeLineCallback(), const QEasingCurve &es = QEasingCurve()) : type(t), length(l), value(v), value2(v2), order(o), event(ev), easing(es) {} Op(const Op &o) @@ -98,7 +98,7 @@ struct QDeclarativeTimeLinePrivate qreal value2; int order; - QDeclarativeTimeLineCallback event; + QQuickTimeLineCallback event; QEasingCurve easing; }; struct TimeLine @@ -112,11 +112,11 @@ struct QDeclarativeTimeLinePrivate int length; int syncPoint; - typedef QHash Ops; + typedef QHash Ops; Ops ops; - QDeclarativeTimeLine *q; + QQuickTimeLine *q; - void add(QDeclarativeTimeLineObject &, const Op &); + void add(QQuickTimeLineObject &, const Op &); qreal value(const Op &op, int time, qreal base, bool *) const; int advance(int); @@ -126,20 +126,20 @@ struct QDeclarativeTimeLinePrivate int order; - QDeclarativeTimeLine::SyncMode syncMode; + QQuickTimeLine::SyncMode syncMode; int syncAdj; QList > *updateQueue; }; -QDeclarativeTimeLinePrivate::QDeclarativeTimeLinePrivate(QDeclarativeTimeLine *parent) -: length(0), syncPoint(0), q(parent), clockRunning(false), prevTime(0), order(0), syncMode(QDeclarativeTimeLine::LocalSync), syncAdj(0), updateQueue(0) +QQuickTimeLinePrivate::QQuickTimeLinePrivate(QQuickTimeLine *parent) +: length(0), syncPoint(0), q(parent), clockRunning(false), prevTime(0), order(0), syncMode(QQuickTimeLine::LocalSync), syncAdj(0), updateQueue(0) { } -void QDeclarativeTimeLinePrivate::add(QDeclarativeTimeLineObject &g, const Op &o) +void QQuickTimeLinePrivate::add(QQuickTimeLineObject &g, const Op &o) { if (g._t && g._t != q) { - qWarning() << "QDeclarativeTimeLine: Cannot modify a QDeclarativeTimeLineValue owned by" + qWarning() << "QQuickTimeLine: Cannot modify a QQuickTimeLineValue owned by" << "another timeline."; return; } @@ -169,14 +169,14 @@ void QDeclarativeTimeLinePrivate::add(QDeclarativeTimeLineObject &g, const Op &o prevTime = 0; clockRunning = true; - if (syncMode == QDeclarativeTimeLine::LocalSync) { + if (syncMode == QQuickTimeLine::LocalSync) { syncAdj = -1; } else { syncAdj = 0; } q->start(); /* q->tick(0); - if (syncMode == QDeclarativeTimeLine::LocalSync) { + if (syncMode == QQuickTimeLine::LocalSync) { syncAdj = -1; } else { syncAdj = 0; @@ -185,7 +185,7 @@ void QDeclarativeTimeLinePrivate::add(QDeclarativeTimeLineObject &g, const Op &o } } -qreal QDeclarativeTimeLinePrivate::value(const Op &op, int time, qreal base, bool *changed) const +qreal QQuickTimeLinePrivate::value(const Op &op, int time, qreal base, bool *changed) const { Q_ASSERT(time >= 0); Q_ASSERT(time <= op.length); @@ -254,27 +254,27 @@ qreal QDeclarativeTimeLinePrivate::value(const Op &op, int time, qreal base, boo /*! \internal - \class QDeclarativeTimeLine - \brief The QDeclarativeTimeLine class provides a timeline for controlling animations. + \class QQuickTimeLine + \brief The QQuickTimeLine class provides a timeline for controlling animations. - QDeclarativeTimeLine is similar to QTimeLine except: + QQuickTimeLine is similar to QTimeLine except: \list - \i It updates QDeclarativeTimeLineValue instances directly, rather than maintaining a single + \i It updates QQuickTimeLineValue instances directly, rather than maintaining a single current value. For example, the following animates a simple value over 200 milliseconds: \code - QDeclarativeTimeLineValue v(); - QDeclarativeTimeLine tl; + QQuickTimeLineValue v(); + QQuickTimeLine tl; tl.move(v, 100., 200); tl.start() \endcode If your program needs to know when values are changed, it can either - connect to the QDeclarativeTimeLine's updated() signal, or inherit from QDeclarativeTimeLineValue - and reimplement the QDeclarativeTimeLineValue::setValue() method. + connect to the QQuickTimeLine's updated() signal, or inherit from QQuickTimeLineValue + and reimplement the QQuickTimeLineValue::setValue() method. - \i Supports multiple QDeclarativeTimeLineValue, arbitrary start and end values and allows + \i Supports multiple QQuickTimeLineValue, arbitrary start and end values and allows animations to be strung together for more complex effects. For example, the following animation moves the x and y coordinates of @@ -283,10 +283,10 @@ qreal QDeclarativeTimeLinePrivate::value(const Op &op, int time, qreal base, boo milliseconds: \code - QDeclarativeTimeLineValue x(); - QDeclarativeTimeLineValue y(); + QQuickTimeLineValue x(); + QQuickTimeLineValue y(); - QDeclarativeTimeLine tl; + QQuickTimeLine tl; tl.start(); tl.move(x, 100., 50); @@ -294,12 +294,12 @@ qreal QDeclarativeTimeLinePrivate::value(const Op &op, int time, qreal base, boo tl.move(y, 200., 50); \endcode - \i All QDeclarativeTimeLine instances share a single, synchronized clock. + \i All QQuickTimeLine instances share a single, synchronized clock. Actions scheduled within the same event loop tick are scheduled synchronously against each other, regardless of the wall time between the scheduling. Synchronized scheduling applies both to within the same - QDeclarativeTimeLine and across separate QDeclarativeTimeLine's within the same process. + QQuickTimeLine and across separate QQuickTimeLine's within the same process. \endlist @@ -308,21 +308,21 @@ qreal QDeclarativeTimeLinePrivate::value(const Op &op, int time, qreal base, boo /*! - Construct a new QDeclarativeTimeLine with the specified \a parent. + Construct a new QQuickTimeLine with the specified \a parent. */ -QDeclarativeTimeLine::QDeclarativeTimeLine(QObject *parent) +QQuickTimeLine::QQuickTimeLine(QObject *parent) : QObject(parent) { - d = new QDeclarativeTimeLinePrivate(this); + d = new QQuickTimeLinePrivate(this); } /*! Destroys the time line. Any inprogress animations are canceled, but not completed. */ -QDeclarativeTimeLine::~QDeclarativeTimeLine() +QQuickTimeLine::~QQuickTimeLine() { - for (QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.begin(); + for (QQuickTimeLinePrivate::Ops::Iterator iter = d->ops.begin(); iter != d->ops.end(); ++iter) iter.key()->_t = 0; @@ -331,13 +331,13 @@ QDeclarativeTimeLine::~QDeclarativeTimeLine() } /*! - \enum QDeclarativeTimeLine::SyncMode + \enum QQuickTimeLine::SyncMode */ /*! Return the timeline's synchronization mode. */ -QDeclarativeTimeLine::SyncMode QDeclarativeTimeLine::syncMode() const +QQuickTimeLine::SyncMode QQuickTimeLine::syncMode() const { return d->syncMode; } @@ -345,7 +345,7 @@ QDeclarativeTimeLine::SyncMode QDeclarativeTimeLine::syncMode() const /*! Set the timeline's synchronization mode to \a syncMode. */ -void QDeclarativeTimeLine::setSyncMode(SyncMode syncMode) +void QQuickTimeLine::setSyncMode(SyncMode syncMode) { d->syncMode = syncMode; } @@ -353,38 +353,38 @@ void QDeclarativeTimeLine::setSyncMode(SyncMode syncMode) /*! Pause \a obj for \a time milliseconds. */ -void QDeclarativeTimeLine::pause(QDeclarativeTimeLineObject &obj, int time) +void QQuickTimeLine::pause(QQuickTimeLineObject &obj, int time) { if (time <= 0) return; - QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Pause, time, 0., 0., d->order++); + QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::Pause, time, 0., 0., d->order++); d->add(obj, op); } /*! Execute the \a event. */ -void QDeclarativeTimeLine::callback(const QDeclarativeTimeLineCallback &callback) +void QQuickTimeLine::callback(const QQuickTimeLineCallback &callback) { - QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Execute, 0, 0, 0., d->order++, callback); + QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::Execute, 0, 0, 0., d->order++, callback); d->add(*callback.callbackObject(), op); } /*! Set the \a value of \a timeLineValue. */ -void QDeclarativeTimeLine::set(QDeclarativeTimeLineValue &timeLineValue, qreal value) +void QQuickTimeLine::set(QQuickTimeLineValue &timeLineValue, qreal value) { - QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Set, 0, value, 0., d->order++); + QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::Set, 0, value, 0., d->order++); d->add(timeLineValue, op); } /*! Decelerate \a timeLineValue from the starting \a velocity to zero at the given \a acceleration rate. Although the \a acceleration is technically - a deceleration, it should always be positive. The QDeclarativeTimeLine will ensure + a deceleration, it should always be positive. The QQuickTimeLine will ensure that the deceleration is in the opposite direction to the initial velocity. */ -int QDeclarativeTimeLine::accel(QDeclarativeTimeLineValue &timeLineValue, qreal velocity, qreal acceleration) +int QQuickTimeLine::accel(QQuickTimeLineValue &timeLineValue, qreal velocity, qreal acceleration) { if (acceleration == 0.0f) return -1; @@ -394,7 +394,7 @@ int QDeclarativeTimeLine::accel(QDeclarativeTimeLineValue &timeLineValue, qreal int time = static_cast(-1000 * velocity / acceleration); - QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Accel, time, velocity, acceleration, d->order++); + QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::Accel, time, velocity, acceleration, d->order++); d->add(timeLineValue, op); return time; @@ -406,11 +406,11 @@ int QDeclarativeTimeLine::accel(QDeclarativeTimeLineValue &timeLineValue, qreal Decelerate \a timeLineValue from the starting \a velocity to zero at the given \a acceleration rate over a maximum distance of maxDistance. - If necessary, QDeclarativeTimeLine will reduce the acceleration to ensure that the + If necessary, QQuickTimeLine will reduce the acceleration to ensure that the entire operation does not require a move of more than \a maxDistance. \a maxDistance should always be positive. */ -int QDeclarativeTimeLine::accel(QDeclarativeTimeLineValue &timeLineValue, qreal velocity, qreal acceleration, qreal maxDistance) +int QQuickTimeLine::accel(QQuickTimeLineValue &timeLineValue, qreal velocity, qreal acceleration, qreal maxDistance) { if (maxDistance == 0.0f || acceleration == 0.0f) return -1; @@ -426,7 +426,7 @@ int QDeclarativeTimeLine::accel(QDeclarativeTimeLineValue &timeLineValue, qreal int time = static_cast(-1000 * velocity / acceleration); - QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Accel, time, velocity, acceleration, d->order++); + QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::Accel, time, velocity, acceleration, d->order++); d->add(timeLineValue, op); return time; @@ -434,12 +434,12 @@ int QDeclarativeTimeLine::accel(QDeclarativeTimeLineValue &timeLineValue, qreal /*! Decelerate \a timeLineValue from the starting \a velocity to zero over the given - \a distance. This is like accel(), but the QDeclarativeTimeLine calculates the exact + \a distance. This is like accel(), but the QQuickTimeLine calculates the exact deceleration to use. \a distance should be positive. */ -int QDeclarativeTimeLine::accelDistance(QDeclarativeTimeLineValue &timeLineValue, qreal velocity, qreal distance) +int QQuickTimeLine::accelDistance(QQuickTimeLineValue &timeLineValue, qreal velocity, qreal distance) { if (distance == 0.0f || velocity == 0.0f) return -1; @@ -448,7 +448,7 @@ int QDeclarativeTimeLine::accelDistance(QDeclarativeTimeLineValue &timeLineValue int time = static_cast(1000 * (2.0f * distance) / velocity); - QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::AccelDistance, time, velocity, distance, d->order++); + QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::AccelDistance, time, velocity, distance, d->order++); d->add(timeLineValue, op); return time; @@ -458,10 +458,10 @@ int QDeclarativeTimeLine::accelDistance(QDeclarativeTimeLineValue &timeLineValue Linearly change the \a timeLineValue from its current value to the given \a destination value over \a time milliseconds. */ -void QDeclarativeTimeLine::move(QDeclarativeTimeLineValue &timeLineValue, qreal destination, int time) +void QQuickTimeLine::move(QQuickTimeLineValue &timeLineValue, qreal destination, int time) { if (time <= 0) return; - QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Move, time, destination, 0.0f, d->order++); + QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::Move, time, destination, 0.0f, d->order++); d->add(timeLineValue, op); } @@ -469,10 +469,10 @@ void QDeclarativeTimeLine::move(QDeclarativeTimeLineValue &timeLineValue, qreal Change the \a timeLineValue from its current value to the given \a destination value over \a time milliseconds using the \a easing curve. */ -void QDeclarativeTimeLine::move(QDeclarativeTimeLineValue &timeLineValue, qreal destination, const QEasingCurve &easing, int time) +void QQuickTimeLine::move(QQuickTimeLineValue &timeLineValue, qreal destination, const QEasingCurve &easing, int time) { if (time <= 0) return; - QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Move, time, destination, 0.0f, d->order++, QDeclarativeTimeLineCallback(), easing); + QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::Move, time, destination, 0.0f, d->order++, QQuickTimeLineCallback(), easing); d->add(timeLineValue, op); } @@ -480,10 +480,10 @@ void QDeclarativeTimeLine::move(QDeclarativeTimeLineValue &timeLineValue, qreal Linearly change the \a timeLineValue from its current value by the \a change amount over \a time milliseconds. */ -void QDeclarativeTimeLine::moveBy(QDeclarativeTimeLineValue &timeLineValue, qreal change, int time) +void QQuickTimeLine::moveBy(QQuickTimeLineValue &timeLineValue, qreal change, int time) { if (time <= 0) return; - QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::MoveBy, time, change, 0.0f, d->order++); + QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::MoveBy, time, change, 0.0f, d->order++); d->add(timeLineValue, op); } @@ -491,29 +491,29 @@ void QDeclarativeTimeLine::moveBy(QDeclarativeTimeLineValue &timeLineValue, qrea Change the \a timeLineValue from its current value by the \a change amount over \a time milliseconds using the \a easing curve. */ -void QDeclarativeTimeLine::moveBy(QDeclarativeTimeLineValue &timeLineValue, qreal change, const QEasingCurve &easing, int time) +void QQuickTimeLine::moveBy(QQuickTimeLineValue &timeLineValue, qreal change, const QEasingCurve &easing, int time) { if (time <= 0) return; - QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::MoveBy, time, change, 0.0f, d->order++, QDeclarativeTimeLineCallback(), easing); + QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::MoveBy, time, change, 0.0f, d->order++, QQuickTimeLineCallback(), easing); d->add(timeLineValue, op); } /*! Cancel (but don't complete) all scheduled actions for \a timeLineValue. */ -void QDeclarativeTimeLine::reset(QDeclarativeTimeLineValue &timeLineValue) +void QQuickTimeLine::reset(QQuickTimeLineValue &timeLineValue) { if (!timeLineValue._t) return; if (timeLineValue._t != this) { - qWarning() << "QDeclarativeTimeLine: Cannot reset a QDeclarativeTimeLineValue owned by another timeline."; + qWarning() << "QQuickTimeLine: Cannot reset a QQuickTimeLineValue owned by another timeline."; return; } remove(&timeLineValue); timeLineValue._t = 0; } -int QDeclarativeTimeLine::duration() const +int QQuickTimeLine::duration() const { return -1; } @@ -526,12 +526,12 @@ int QDeclarativeTimeLine::duration() const all the currently scheduled actions on \a syncTo are complete. In pseudo-code this is equivalent to: \code - QDeclarativeTimeLine::pause(timeLineValue, min(0, length_of(syncTo) - length_of(timeLineValue))) + QQuickTimeLine::pause(timeLineValue, min(0, length_of(syncTo) - length_of(timeLineValue))) \endcode */ -void QDeclarativeTimeLine::sync(QDeclarativeTimeLineValue &timeLineValue, QDeclarativeTimeLineValue &syncTo) +void QQuickTimeLine::sync(QQuickTimeLineValue &timeLineValue, QQuickTimeLineValue &syncTo) { - QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.find(&syncTo); + QQuickTimeLinePrivate::Ops::Iterator iter = d->ops.find(&syncTo); if (iter == d->ops.end()) return; int length = iter->length; @@ -551,12 +551,12 @@ void QDeclarativeTimeLine::sync(QDeclarativeTimeLineValue &timeLineValue, QDecla In pseudo-code, this is equivalent to: \code - QDeclarativeTimeLine::pause(timeLineValue, length_of(timeline) - length_of(timeLineValue)) + QQuickTimeLine::pause(timeLineValue, length_of(timeline) - length_of(timeLineValue)) \endcode */ -void QDeclarativeTimeLine::sync(QDeclarativeTimeLineValue &timeLineValue) +void QQuickTimeLine::sync(QQuickTimeLineValue &timeLineValue) { - QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.find(&timeLineValue); + QQuickTimeLinePrivate::Ops::Iterator iter = d->ops.find(&timeLineValue); if (iter == d->ops.end()) { pause(timeLineValue, d->length); } else { @@ -573,7 +573,7 @@ void QDeclarativeTimeLine::sync(QDeclarativeTimeLineValue &timeLineValue) value1->setValue(0.); value2->setValue(0.); value3->setValue(0.); - QDeclarativeTimeLine tl; + QQuickTimeLine tl; ... tl.move(value1, 10, 200); tl.move(value2, 10, 100); @@ -592,9 +592,9 @@ void QDeclarativeTimeLine::sync(QDeclarativeTimeLineValue &timeLineValue) \endtable */ -/*void QDeclarativeTimeLine::sync() +/*void QQuickTimeLine::sync() { - for (QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.begin(); + for (QQuickTimeLinePrivate::Ops::Iterator iter = d->ops.begin(); iter != d->ops.end(); ++iter) pause(*iter.key(), d->length - iter->length); @@ -606,7 +606,7 @@ void QDeclarativeTimeLine::sync(QDeclarativeTimeLineValue &timeLineValue) Temporary hack. */ -void QDeclarativeTimeLine::setSyncPoint(int sp) +void QQuickTimeLine::setSyncPoint(int sp) { d->syncPoint = sp; } @@ -616,16 +616,16 @@ void QDeclarativeTimeLine::setSyncPoint(int sp) Temporary hack. */ -int QDeclarativeTimeLine::syncPoint() const +int QQuickTimeLine::syncPoint() const { return d->syncPoint; } /*! Returns true if the timeline is active. An active timeline is one where - QDeclarativeTimeLineValue actions are still pending. + QQuickTimeLineValue actions are still pending. */ -bool QDeclarativeTimeLine::isActive() const +bool QQuickTimeLine::isActive() const { return !d->ops.isEmpty(); } @@ -633,8 +633,8 @@ bool QDeclarativeTimeLine::isActive() const /*! Completes the timeline. All queued actions are played to completion, and then discarded. For example, \code - QDeclarativeTimeLineValue v(0.); - QDeclarativeTimeLine tl; + QQuickTimeLineValue v(0.); + QQuickTimeLine tl; tl.move(v, 100., 1000.); // 500 ms passes // v.value() == 50. @@ -642,16 +642,16 @@ bool QDeclarativeTimeLine::isActive() const // v.value() == 100. \endcode */ -void QDeclarativeTimeLine::complete() +void QQuickTimeLine::complete() { d->advance(d->length); } /*! - Resets the timeline. All queued actions are discarded and QDeclarativeTimeLineValue's retain their current value. For example, + Resets the timeline. All queued actions are discarded and QQuickTimeLineValue's retain their current value. For example, \code - QDeclarativeTimeLineValue v(0.); - QDeclarativeTimeLine tl; + QQuickTimeLineValue v(0.); + QQuickTimeLine tl; tl.move(v, 100., 1000.); // 500 ms passes // v.value() == 50. @@ -659,9 +659,9 @@ void QDeclarativeTimeLine::complete() // v.value() == 50. \endcode */ -void QDeclarativeTimeLine::clear() +void QQuickTimeLine::clear() { - for (QDeclarativeTimeLinePrivate::Ops::ConstIterator iter = d->ops.begin(); iter != d->ops.end(); ++iter) + for (QQuickTimeLinePrivate::Ops::ConstIterator iter = d->ops.begin(); iter != d->ops.end(); ++iter) iter.key()->_t = 0; d->ops.clear(); d->length = 0; @@ -669,19 +669,19 @@ void QDeclarativeTimeLine::clear() //XXX need stop here? } -int QDeclarativeTimeLine::time() const +int QQuickTimeLine::time() const { return d->prevTime; } /*! - \fn void QDeclarativeTimeLine::updated() + \fn void QQuickTimeLine::updated() - Emitted each time the timeline modifies QDeclarativeTimeLineValues. Even if multiple - QDeclarativeTimeLineValues are changed, this signal is only emitted once for each clock tick. + Emitted each time the timeline modifies QQuickTimeLineValues. Even if multiple + QQuickTimeLineValues are changed, this signal is only emitted once for each clock tick. */ -void QDeclarativeTimeLine::updateCurrentTime(int v) +void QQuickTimeLine::updateCurrentTime(int v) { if (d->syncAdj == -1) d->syncAdj = v; @@ -723,7 +723,7 @@ bool operator<(const QPair &lhs, return lhs.first < rhs.first; } -int QDeclarativeTimeLinePrivate::advance(int t) +int QQuickTimeLinePrivate::advance(int t) { int pauseTime = -1; @@ -750,7 +750,7 @@ int QDeclarativeTimeLinePrivate::advance(int t) QList > updates; for (Ops::Iterator iter = ops.begin(); iter != ops.end(); ) { - QDeclarativeTimeLineValue *v = static_cast(iter.key()); + QQuickTimeLineValue *v = static_cast(iter.key()); TimeLine &tl = *iter; Q_ASSERT(!tl.ops.isEmpty()); @@ -823,9 +823,9 @@ int QDeclarativeTimeLinePrivate::advance(int t) return pauseTime; } -void QDeclarativeTimeLine::remove(QDeclarativeTimeLineObject *v) +void QQuickTimeLine::remove(QQuickTimeLineObject *v) { - QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.find(v); + QQuickTimeLinePrivate::Ops::Iterator iter = d->ops.find(v); Q_ASSERT(iter != d->ops.end()); int len = iter->length; @@ -833,7 +833,7 @@ void QDeclarativeTimeLine::remove(QDeclarativeTimeLineObject *v) if (len == d->length) { // We need to recalculate the length d->length = 0; - for (QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.begin(); + for (QQuickTimeLinePrivate::Ops::Iterator iter = d->ops.begin(); iter != d->ops.end(); ++iter) { @@ -850,7 +850,7 @@ void QDeclarativeTimeLine::remove(QDeclarativeTimeLineObject *v) d->prevTime = 0; d->clockRunning = true; - if (d->syncMode == QDeclarativeTimeLine::LocalSync) { + if (d->syncMode == QQuickTimeLine::LocalSync) { d->syncAdj = -1; } else { d->syncAdj = 0; @@ -873,42 +873,42 @@ void QDeclarativeTimeLine::remove(QDeclarativeTimeLineObject *v) /*! \internal - \class QDeclarativeTimeLineValue - \brief The QDeclarativeTimeLineValue class provides a value that can be modified by QDeclarativeTimeLine. + \class QQuickTimeLineValue + \brief The QQuickTimeLineValue class provides a value that can be modified by QQuickTimeLine. */ /*! - \fn QDeclarativeTimeLineValue::QDeclarativeTimeLineValue(qreal value = 0) + \fn QQuickTimeLineValue::QQuickTimeLineValue(qreal value = 0) - Construct a new QDeclarativeTimeLineValue with an initial \a value. + Construct a new QQuickTimeLineValue with an initial \a value. */ /*! - \fn qreal QDeclarativeTimeLineValue::value() const + \fn qreal QQuickTimeLineValue::value() const Return the current value. */ /*! - \fn void QDeclarativeTimeLineValue::setValue(qreal value) + \fn void QQuickTimeLineValue::setValue(qreal value) Set the current \a value. */ /*! - \fn QDeclarativeTimeLine *QDeclarativeTimeLineValue::timeLine() const + \fn QQuickTimeLine *QQuickTimeLineValue::timeLine() const - If a QDeclarativeTimeLine is operating on this value, return a pointer to it, + If a QQuickTimeLine is operating on this value, return a pointer to it, otherwise return null. */ -QDeclarativeTimeLineObject::QDeclarativeTimeLineObject() +QQuickTimeLineObject::QQuickTimeLineObject() : _t(0) { } -QDeclarativeTimeLineObject::~QDeclarativeTimeLineObject() +QQuickTimeLineObject::~QQuickTimeLineObject() { if (_t) { _t->remove(this); @@ -916,22 +916,22 @@ QDeclarativeTimeLineObject::~QDeclarativeTimeLineObject() } } -QDeclarativeTimeLineCallback::QDeclarativeTimeLineCallback() +QQuickTimeLineCallback::QQuickTimeLineCallback() : d0(0), d1(0), d2(0) { } -QDeclarativeTimeLineCallback::QDeclarativeTimeLineCallback(QDeclarativeTimeLineObject *b, Callback f, void *d) +QQuickTimeLineCallback::QQuickTimeLineCallback(QQuickTimeLineObject *b, Callback f, void *d) : d0(f), d1(d), d2(b) { } -QDeclarativeTimeLineCallback::QDeclarativeTimeLineCallback(const QDeclarativeTimeLineCallback &o) +QQuickTimeLineCallback::QQuickTimeLineCallback(const QQuickTimeLineCallback &o) : d0(o.d0), d1(o.d1), d2(o.d2) { } -QDeclarativeTimeLineCallback &QDeclarativeTimeLineCallback::operator=(const QDeclarativeTimeLineCallback &o) +QQuickTimeLineCallback &QQuickTimeLineCallback::operator=(const QQuickTimeLineCallback &o) { d0 = o.d0; d1 = o.d1; @@ -939,7 +939,7 @@ QDeclarativeTimeLineCallback &QDeclarativeTimeLineCallback::operator=(const QDec return *this; } -QDeclarativeTimeLineObject *QDeclarativeTimeLineCallback::callbackObject() const +QQuickTimeLineObject *QQuickTimeLineCallback::callbackObject() const { return d2; } diff --git a/src/quick/util/qdeclarativetimeline_p_p.h b/src/quick/util/qquicktimeline_p_p.h similarity index 50% rename from src/quick/util/qdeclarativetimeline_p_p.h rename to src/quick/util/qquicktimeline_p_p.h index 421e2e5976..88ee3dafd2 100644 --- a/src/quick/util/qdeclarativetimeline_p_p.h +++ b/src/quick/util/qquicktimeline_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVETIMELINE_H -#define QDECLARATIVETIMELINE_H +#ifndef QQUICKTIMELINE_H +#define QQUICKTIMELINE_H // // W A R N I N G @@ -59,42 +59,42 @@ QT_BEGIN_NAMESPACE class QEasingCurve; -class QDeclarativeTimeLineValue; -class QDeclarativeTimeLineCallback; -struct QDeclarativeTimeLinePrivate; -class QDeclarativeTimeLineObject; -class Q_AUTOTEST_EXPORT QDeclarativeTimeLine : public QObject, QAbstractAnimationJob +class QQuickTimeLineValue; +class QQuickTimeLineCallback; +struct QQuickTimeLinePrivate; +class QQuickTimeLineObject; +class Q_AUTOTEST_EXPORT QQuickTimeLine : public QObject, QAbstractAnimationJob { Q_OBJECT public: - QDeclarativeTimeLine(QObject *parent = 0); - ~QDeclarativeTimeLine(); + QQuickTimeLine(QObject *parent = 0); + ~QQuickTimeLine(); enum SyncMode { LocalSync, GlobalSync }; SyncMode syncMode() const; void setSyncMode(SyncMode); - void pause(QDeclarativeTimeLineObject &, int); - void callback(const QDeclarativeTimeLineCallback &); - void set(QDeclarativeTimeLineValue &, qreal); + void pause(QQuickTimeLineObject &, int); + void callback(const QQuickTimeLineCallback &); + void set(QQuickTimeLineValue &, qreal); - int accel(QDeclarativeTimeLineValue &, qreal velocity, qreal accel); - int accel(QDeclarativeTimeLineValue &, qreal velocity, qreal accel, qreal maxDistance); - int accelDistance(QDeclarativeTimeLineValue &, qreal velocity, qreal distance); + int accel(QQuickTimeLineValue &, qreal velocity, qreal accel); + int accel(QQuickTimeLineValue &, qreal velocity, qreal accel, qreal maxDistance); + int accelDistance(QQuickTimeLineValue &, qreal velocity, qreal distance); - void move(QDeclarativeTimeLineValue &, qreal destination, int time = 500); - void move(QDeclarativeTimeLineValue &, qreal destination, const QEasingCurve &, int time = 500); - void moveBy(QDeclarativeTimeLineValue &, qreal change, int time = 500); - void moveBy(QDeclarativeTimeLineValue &, qreal change, const QEasingCurve &, int time = 500); + void move(QQuickTimeLineValue &, qreal destination, int time = 500); + void move(QQuickTimeLineValue &, qreal destination, const QEasingCurve &, int time = 500); + void moveBy(QQuickTimeLineValue &, qreal change, int time = 500); + void moveBy(QQuickTimeLineValue &, qreal change, const QEasingCurve &, int time = 500); void sync(); void setSyncPoint(int); int syncPoint() const; - void sync(QDeclarativeTimeLineValue &); - void sync(QDeclarativeTimeLineValue &, QDeclarativeTimeLineValue &); + void sync(QQuickTimeLineValue &); + void sync(QQuickTimeLineValue &, QQuickTimeLineValue &); - void reset(QDeclarativeTimeLineValue &); + void reset(QQuickTimeLineValue &); void complete(); void clear(); @@ -111,80 +111,80 @@ Q_OBJECT virtual void updateCurrentTime(int); private: - void remove(QDeclarativeTimeLineObject *); - friend class QDeclarativeTimeLineObject; - friend struct QDeclarativeTimeLinePrivate; - QDeclarativeTimeLinePrivate *d; + void remove(QQuickTimeLineObject *); + friend class QQuickTimeLineObject; + friend struct QQuickTimeLinePrivate; + QQuickTimeLinePrivate *d; }; -class Q_AUTOTEST_EXPORT QDeclarativeTimeLineObject +class Q_AUTOTEST_EXPORT QQuickTimeLineObject { public: - QDeclarativeTimeLineObject(); - virtual ~QDeclarativeTimeLineObject(); + QQuickTimeLineObject(); + virtual ~QQuickTimeLineObject(); protected: - friend class QDeclarativeTimeLine; - friend struct QDeclarativeTimeLinePrivate; - QDeclarativeTimeLine *_t; + friend class QQuickTimeLine; + friend struct QQuickTimeLinePrivate; + QQuickTimeLine *_t; }; -class Q_AUTOTEST_EXPORT QDeclarativeTimeLineValue : public QDeclarativeTimeLineObject +class Q_AUTOTEST_EXPORT QQuickTimeLineValue : public QQuickTimeLineObject { public: - QDeclarativeTimeLineValue(qreal v = 0.) : _v(v) {} + QQuickTimeLineValue(qreal v = 0.) : _v(v) {} virtual qreal value() const { return _v; } virtual void setValue(qreal v) { _v = v; } - QDeclarativeTimeLine *timeLine() const { return _t; } + QQuickTimeLine *timeLine() const { return _t; } operator qreal() const { return _v; } - QDeclarativeTimeLineValue &operator=(qreal v) { setValue(v); return *this; } + QQuickTimeLineValue &operator=(qreal v) { setValue(v); return *this; } private: - friend class QDeclarativeTimeLine; - friend struct QDeclarativeTimeLinePrivate; + friend class QQuickTimeLine; + friend struct QQuickTimeLinePrivate; qreal _v; }; -class Q_AUTOTEST_EXPORT QDeclarativeTimeLineCallback +class Q_AUTOTEST_EXPORT QQuickTimeLineCallback { public: typedef void (*Callback)(void *); - QDeclarativeTimeLineCallback(); - QDeclarativeTimeLineCallback(QDeclarativeTimeLineObject *b, Callback, void * = 0); - QDeclarativeTimeLineCallback(const QDeclarativeTimeLineCallback &o); + QQuickTimeLineCallback(); + QQuickTimeLineCallback(QQuickTimeLineObject *b, Callback, void * = 0); + QQuickTimeLineCallback(const QQuickTimeLineCallback &o); - QDeclarativeTimeLineCallback &operator=(const QDeclarativeTimeLineCallback &o); - QDeclarativeTimeLineObject *callbackObject() const; + QQuickTimeLineCallback &operator=(const QQuickTimeLineCallback &o); + QQuickTimeLineObject *callbackObject() const; private: - friend struct QDeclarativeTimeLinePrivate; + friend struct QQuickTimeLinePrivate; Callback d0; void *d1; - QDeclarativeTimeLineObject *d2; + QQuickTimeLineObject *d2; }; template -class QDeclarativeTimeLineValueProxy : public QDeclarativeTimeLineValue +class QQuickTimeLineValueProxy : public QQuickTimeLineValue { public: - QDeclarativeTimeLineValueProxy(T *cls, void (T::*func)(qreal), qreal v = 0.) - : QDeclarativeTimeLineValue(v), _class(cls), _setFunctionReal(func), _setFunctionInt(0) + QQuickTimeLineValueProxy(T *cls, void (T::*func)(qreal), qreal v = 0.) + : QQuickTimeLineValue(v), _class(cls), _setFunctionReal(func), _setFunctionInt(0) { Q_ASSERT(_class); } - QDeclarativeTimeLineValueProxy(T *cls, void (T::*func)(int), qreal v = 0.) - : QDeclarativeTimeLineValue(v), _class(cls), _setFunctionReal(0), _setFunctionInt(func) + QQuickTimeLineValueProxy(T *cls, void (T::*func)(int), qreal v = 0.) + : QQuickTimeLineValue(v), _class(cls), _setFunctionReal(0), _setFunctionInt(func) { Q_ASSERT(_class); } virtual void setValue(qreal v) { - QDeclarativeTimeLineValue::setValue(v); + QQuickTimeLineValue::setValue(v); if (_setFunctionReal) (_class->*_setFunctionReal)(v); else if (_setFunctionInt) (_class->*_setFunctionInt)((int)v); } diff --git a/src/quick/util/qdeclarativetimer.cpp b/src/quick/util/qquicktimer.cpp similarity index 82% rename from src/quick/util/qdeclarativetimer.cpp rename to src/quick/util/qquicktimer.cpp index 3c57f22c58..151f1f8b48 100644 --- a/src/quick/util/qdeclarativetimer.cpp +++ b/src/quick/util/qquicktimer.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qdeclarativetimer_p.h" +#include "qquicktimer_p.h" #include #include "private/qpauseanimationjob_p.h" @@ -51,16 +51,16 @@ QT_BEGIN_NAMESPACE -class QDeclarativeTimerPrivate : public QObjectPrivate, public QAnimationJobChangeListener +class QQuickTimerPrivate : public QObjectPrivate, public QAnimationJobChangeListener { - Q_DECLARE_PUBLIC(QDeclarativeTimer) + Q_DECLARE_PUBLIC(QQuickTimer) public: - QDeclarativeTimerPrivate() + QQuickTimerPrivate() : interval(1000), running(false), repeating(false), triggeredOnStart(false) , classBegun(false), componentComplete(false), firstTick(true) {} virtual void animationFinished(QAbstractAnimationJob *); - virtual void animationCurrentLoopChanged(QAbstractAnimationJob *) { Q_Q(QDeclarativeTimer); q->ticked(); } + virtual void animationCurrentLoopChanged(QAbstractAnimationJob *) { Q_Q(QQuickTimer); q->ticked(); } int interval; QPauseAnimationJob pause; @@ -73,7 +73,7 @@ class QDeclarativeTimerPrivate : public QObjectPrivate, public QAnimationJobChan }; /*! - \qmlclass Timer QDeclarativeTimer + \qmlclass Timer QQuickTimer \inqmlmodule QtQuick 2 \ingroup qml-utility-elements \brief The Timer item triggers a handler at a specified interval. @@ -111,10 +111,10 @@ class QDeclarativeTimerPrivate : public QObjectPrivate, public QAnimationJobChan \sa {declarative/toys/clocks}{Clocks example} */ -QDeclarativeTimer::QDeclarativeTimer(QObject *parent) - : QObject(*(new QDeclarativeTimerPrivate), parent) +QQuickTimer::QQuickTimer(QObject *parent) + : QObject(*(new QQuickTimerPrivate), parent) { - Q_D(QDeclarativeTimer); + Q_D(QQuickTimer); d->pause.addAnimationChangeListener(d, QAbstractAnimationJob::Completion | QAbstractAnimationJob::CurrentLoop); d->pause.setLoopCount(1); d->pause.setDuration(d->interval); @@ -127,9 +127,9 @@ QDeclarativeTimer::QDeclarativeTimer(QObject *parent) The default interval is 1000 milliseconds. */ -void QDeclarativeTimer::setInterval(int interval) +void QQuickTimer::setInterval(int interval) { - Q_D(QDeclarativeTimer); + Q_D(QQuickTimer); if (interval != d->interval) { d->interval = interval; update(); @@ -137,9 +137,9 @@ void QDeclarativeTimer::setInterval(int interval) } } -int QDeclarativeTimer::interval() const +int QQuickTimer::interval() const { - Q_D(const QDeclarativeTimer); + Q_D(const QQuickTimer); return d->interval; } @@ -154,15 +154,15 @@ int QDeclarativeTimer::interval() const \sa repeat */ -bool QDeclarativeTimer::isRunning() const +bool QQuickTimer::isRunning() const { - Q_D(const QDeclarativeTimer); + Q_D(const QQuickTimer); return d->running; } -void QDeclarativeTimer::setRunning(bool running) +void QQuickTimer::setRunning(bool running) { - Q_D(QDeclarativeTimer); + Q_D(QQuickTimer); if (d->running != running) { d->running = running; d->firstTick = true; @@ -182,15 +182,15 @@ void QDeclarativeTimer::setRunning(bool running) \sa running */ -bool QDeclarativeTimer::isRepeating() const +bool QQuickTimer::isRepeating() const { - Q_D(const QDeclarativeTimer); + Q_D(const QQuickTimer); return d->repeating; } -void QDeclarativeTimer::setRepeating(bool repeating) +void QQuickTimer::setRepeating(bool repeating) { - Q_D(QDeclarativeTimer); + Q_D(QQuickTimer); if (repeating != d->repeating) { d->repeating = repeating; update(); @@ -215,15 +215,15 @@ void QDeclarativeTimer::setRepeating(bool repeating) \sa running */ -bool QDeclarativeTimer::triggeredOnStart() const +bool QQuickTimer::triggeredOnStart() const { - Q_D(const QDeclarativeTimer); + Q_D(const QQuickTimer); return d->triggeredOnStart; } -void QDeclarativeTimer::setTriggeredOnStart(bool triggeredOnStart) +void QQuickTimer::setTriggeredOnStart(bool triggeredOnStart) { - Q_D(QDeclarativeTimer); + Q_D(QQuickTimer); if (d->triggeredOnStart != triggeredOnStart) { d->triggeredOnStart = triggeredOnStart; update(); @@ -238,7 +238,7 @@ void QDeclarativeTimer::setTriggeredOnStart(bool triggeredOnStart) If the timer is already running, calling this method has no effect. The \c running property will be true following a call to \c start(). */ -void QDeclarativeTimer::start() +void QQuickTimer::start() { setRunning(true); } @@ -250,7 +250,7 @@ void QDeclarativeTimer::start() If the timer is not running, calling this method has no effect. The \c running property will be false following a call to \c stop(). */ -void QDeclarativeTimer::stop() +void QQuickTimer::stop() { setRunning(false); } @@ -263,15 +263,15 @@ void QDeclarativeTimer::stop() stopped, reset to initial state and started. The \c running property will be true following a call to \c restart(). */ -void QDeclarativeTimer::restart() +void QQuickTimer::restart() { setRunning(false); setRunning(true); } -void QDeclarativeTimer::update() +void QQuickTimer::update() { - Q_D(QDeclarativeTimer); + Q_D(QQuickTimer); if (d->classBegun && !d->componentComplete) return; d->pause.stop(); @@ -287,15 +287,15 @@ void QDeclarativeTimer::update() } } -void QDeclarativeTimer::classBegin() +void QQuickTimer::classBegin() { - Q_D(QDeclarativeTimer); + Q_D(QQuickTimer); d->classBegun = true; } -void QDeclarativeTimer::componentComplete() +void QQuickTimer::componentComplete() { - Q_D(QDeclarativeTimer); + Q_D(QQuickTimer); d->componentComplete = true; update(); } @@ -305,17 +305,17 @@ void QDeclarativeTimer::componentComplete() This handler is called when the Timer is triggered. */ -void QDeclarativeTimer::ticked() +void QQuickTimer::ticked() { - Q_D(QDeclarativeTimer); + Q_D(QQuickTimer); if (d->running && (d->pause.currentTime() > 0 || (d->triggeredOnStart && d->firstTick))) emit triggered(); d->firstTick = false; } -void QDeclarativeTimerPrivate::animationFinished(QAbstractAnimationJob *) +void QQuickTimerPrivate::animationFinished(QAbstractAnimationJob *) { - Q_Q(QDeclarativeTimer); + Q_Q(QQuickTimer); if (repeating || !running) return; running = false; diff --git a/src/quick/util/qdeclarativetimer_p.h b/src/quick/util/qquicktimer_p.h similarity index 86% rename from src/quick/util/qdeclarativetimer_p.h rename to src/quick/util/qquicktimer_p.h index e400b3dda3..b0354e4874 100644 --- a/src/quick/util/qdeclarativetimer_p.h +++ b/src/quick/util/qquicktimer_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVETIMER_H -#define QDECLARATIVETIMER_H +#ifndef QQUICKTIMER_H +#define QQUICKTIMER_H -#include +#include #include @@ -52,12 +52,12 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeTimerPrivate; -class Q_QUICK_PRIVATE_EXPORT QDeclarativeTimer : public QObject, public QDeclarativeParserStatus +class QQuickTimerPrivate; +class Q_QUICK_PRIVATE_EXPORT QQuickTimer : public QObject, public QQmlParserStatus { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeTimer) - Q_INTERFACES(QDeclarativeParserStatus) + Q_DECLARE_PRIVATE(QQuickTimer) + Q_INTERFACES(QQmlParserStatus) Q_PROPERTY(int interval READ interval WRITE setInterval NOTIFY intervalChanged) Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged) Q_PROPERTY(bool repeat READ isRepeating WRITE setRepeating NOTIFY repeatChanged) @@ -65,7 +65,7 @@ class Q_QUICK_PRIVATE_EXPORT QDeclarativeTimer : public QObject, public QDeclara Q_PROPERTY(QObject *parent READ parent CONSTANT) public: - QDeclarativeTimer(QObject *parent=0); + QQuickTimer(QObject *parent=0); void setInterval(int interval); int interval() const; @@ -104,7 +104,7 @@ private Q_SLOTS: QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeTimer) +QML_DECLARE_TYPE(QQuickTimer) QT_END_HEADER diff --git a/src/quick/util/qdeclarativetransition.cpp b/src/quick/util/qquicktransition.cpp similarity index 67% rename from src/quick/util/qdeclarativetransition.cpp rename to src/quick/util/qquicktransition.cpp index 96e870df82..5d9a2880d2 100644 --- a/src/quick/util/qdeclarativetransition.cpp +++ b/src/quick/util/qquicktransition.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,21 +39,21 @@ ** ****************************************************************************/ -#include "qdeclarativetransition_p.h" +#include "qquicktransition_p.h" -#include "qdeclarativestate_p.h" -#include "qdeclarativestate_p_p.h" -#include "qdeclarativestateoperations_p.h" -#include "qdeclarativeanimation_p.h" -#include "qdeclarativeanimation_p_p.h" -#include "qdeclarativetransitionmanager_p_p.h" +#include "qquickstate_p.h" +#include "qquickstate_p_p.h" +#include "qquickstatechangescript_p.h" +#include "qquickanimation_p.h" +#include "qquickanimation_p_p.h" +#include "qquicktransitionmanager_p_p.h" #include "private/qparallelanimationgroupjob_p.h" QT_BEGIN_NAMESPACE /*! - \qmlclass Transition QDeclarativeTransition + \qmlclass Transition QQuickTransition \inqmlmodule QtQuick 2 \ingroup qml-animation-transition \brief The Transition element defines animated transitions that occur on state changes. @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE changes between the default and the "moved" state, any changes to the \c x and \c y properties should be animated, using an \c Easing.InOutQuad. - \snippet doc/src/snippets/declarative/transition.qml 0 + \snippet doc/src/snippets/qml/transition.qml 0 Notice the example does not require \l{PropertyAnimation::}{to} and \l{PropertyAnimation::}{from} values for the NumberAnimation. As a convenience, @@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE To define multiple transitions, specify \l Item::transitions as a list: - \snippet doc/src/snippets/declarative/transitions-list.qml list of transitions + \snippet doc/src/snippets/qml/transitions-list.qml list of transitions If multiple Transitions are specified, only a single (best-matching) Transition will be applied for any particular state change. In the example above, when changing to \c state1, the first transition will be used, rather @@ -93,32 +93,32 @@ QT_BEGIN_NAMESPACE \l Behavior, the Transition animation overrides the \l Behavior for that state change. - \sa {QML Animation and Transitions}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtDeclarative} + \sa {QML Animation and Transitions}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtQml} */ -QDeclarativeTransitionInstance::QDeclarativeTransitionInstance() +QQuickTransitionInstance::QQuickTransitionInstance() : m_anim(0) { } -QDeclarativeTransitionInstance::~QDeclarativeTransitionInstance() +QQuickTransitionInstance::~QQuickTransitionInstance() { delete m_anim; } -void QDeclarativeTransitionInstance::start() +void QQuickTransitionInstance::start() { if (m_anim) m_anim->start(); } -void QDeclarativeTransitionInstance::stop() +void QQuickTransitionInstance::stop() { if (m_anim) m_anim->stop(); } -bool QDeclarativeTransitionInstance::isRunning() const +bool QQuickTransitionInstance::isRunning() const { return m_anim && m_anim->state() == QAbstractAnimationJob::Running; } @@ -130,17 +130,17 @@ class ParallelAnimationWrapper : public QParallelAnimationGroupJob { public: ParallelAnimationWrapper() : QParallelAnimationGroupJob() {} - QDeclarativeTransitionManager *manager; + QQuickTransitionManager *manager; protected: virtual void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState); }; -class QDeclarativeTransitionPrivate : public QObjectPrivate +class QQuickTransitionPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QDeclarativeTransition) + Q_DECLARE_PUBLIC(QQuickTransition) public: - QDeclarativeTransitionPrivate() + QQuickTransitionPrivate() : fromState(QLatin1String("*")), toState(QLatin1String("*")), reversed(false), reversible(false), enabled(true) { @@ -152,37 +152,37 @@ class QDeclarativeTransitionPrivate : public QObjectPrivate bool reversible; bool enabled; - static void append_animation(QDeclarativeListProperty *list, QDeclarativeAbstractAnimation *a); - static int animation_count(QDeclarativeListProperty *list); - static QDeclarativeAbstractAnimation* animation_at(QDeclarativeListProperty *list, int pos); - static void clear_animations(QDeclarativeListProperty *list); - QList animations; + static void append_animation(QQmlListProperty *list, QQuickAbstractAnimation *a); + static int animation_count(QQmlListProperty *list); + static QQuickAbstractAnimation* animation_at(QQmlListProperty *list, int pos); + static void clear_animations(QQmlListProperty *list); + QList animations; }; -void QDeclarativeTransitionPrivate::append_animation(QDeclarativeListProperty *list, QDeclarativeAbstractAnimation *a) +void QQuickTransitionPrivate::append_animation(QQmlListProperty *list, QQuickAbstractAnimation *a) { - QDeclarativeTransition *q = static_cast(list->object); + QQuickTransition *q = static_cast(list->object); q->d_func()->animations.append(a); a->setDisableUserControl(); } -int QDeclarativeTransitionPrivate::animation_count(QDeclarativeListProperty *list) +int QQuickTransitionPrivate::animation_count(QQmlListProperty *list) { - QDeclarativeTransition *q = static_cast(list->object); + QQuickTransition *q = static_cast(list->object); return q->d_func()->animations.count(); } -QDeclarativeAbstractAnimation* QDeclarativeTransitionPrivate::animation_at(QDeclarativeListProperty *list, int pos) +QQuickAbstractAnimation* QQuickTransitionPrivate::animation_at(QQmlListProperty *list, int pos) { - QDeclarativeTransition *q = static_cast(list->object); + QQuickTransition *q = static_cast(list->object); return q->d_func()->animations.at(pos); } -void QDeclarativeTransitionPrivate::clear_animations(QDeclarativeListProperty *list) +void QQuickTransitionPrivate::clear_animations(QQmlListProperty *list) { - QDeclarativeTransition *q = static_cast(list->object); + QQuickTransition *q = static_cast(list->object); while (q->d_func()->animations.count()) { - QDeclarativeAbstractAnimation *firstAnim = q->d_func()->animations.at(0); + QQuickAbstractAnimation *firstAnim = q->d_func()->animations.at(0); q->d_func()->animations.removeAll(firstAnim); } } @@ -199,34 +199,34 @@ void ParallelAnimationWrapper::updateState(QAbstractAnimationJob::State newState } -QDeclarativeTransition::QDeclarativeTransition(QObject *parent) - : QObject(*(new QDeclarativeTransitionPrivate), parent) +QQuickTransition::QQuickTransition(QObject *parent) + : QObject(*(new QQuickTransitionPrivate), parent) { } -QDeclarativeTransition::~QDeclarativeTransition() +QQuickTransition::~QQuickTransition() { } -void QDeclarativeTransition::setReversed(bool r) +void QQuickTransition::setReversed(bool r) { - Q_D(QDeclarativeTransition); + Q_D(QQuickTransition); d->reversed = r; } -QDeclarativeTransitionInstance *QDeclarativeTransition::prepare(QDeclarativeStateOperation::ActionList &actions, - QList &after, - QDeclarativeTransitionManager *manager, +QQuickTransitionInstance *QQuickTransition::prepare(QQuickStateOperation::ActionList &actions, + QList &after, + QQuickTransitionManager *manager, QObject *defaultTarget) { - Q_D(QDeclarativeTransition); + Q_D(QQuickTransition); qmlExecuteDeferred(this); ParallelAnimationWrapper *group = new ParallelAnimationWrapper(); group->manager = manager; - QDeclarativeAbstractAnimation::TransitionDirection direction = d->reversed ? QDeclarativeAbstractAnimation::Backward : QDeclarativeAbstractAnimation::Forward; + QQuickAbstractAnimation::TransitionDirection direction = d->reversed ? QQuickAbstractAnimation::Backward : QQuickAbstractAnimation::Forward; int start = d->reversed ? d->animations.count() - 1 : 0; int end = d->reversed ? -1 : d->animations.count(); @@ -240,7 +240,7 @@ QDeclarativeTransitionInstance *QDeclarativeTransition::prepare(QDeclarativeStat group->setDirection(d->reversed ? QAbstractAnimationJob::Backward : QAbstractAnimationJob::Forward); - QDeclarativeTransitionInstance *wrapper = new QDeclarativeTransitionInstance; + QQuickTransitionInstance *wrapper = new QQuickTransitionInstance; wrapper->m_anim = group; return wrapper; } @@ -257,11 +257,11 @@ QDeclarativeTransitionInstance *QDeclarativeTransition::prepare(QDeclarativeStat properties, so the animation is always applied when changing between the two states (i.e. when the mouse is pressed and released). - \snippet doc/src/snippets/declarative/transition-from-to.qml 0 + \snippet doc/src/snippets/qml/transition-from-to.qml 0 If the transition was changed to this: - \snippet doc/src/snippets/declarative/transition-from-to-modified.qml modified transition + \snippet doc/src/snippets/qml/transition-from-to-modified.qml modified transition The animation would only be applied when changing from the default state to the "brighter" state (i.e. when the mouse is pressed, but not on release). @@ -270,15 +270,15 @@ QDeclarativeTransitionInstance *QDeclarativeTransition::prepare(QDeclarativeStat \sa reversible */ -QString QDeclarativeTransition::fromState() const +QString QQuickTransition::fromState() const { - Q_D(const QDeclarativeTransition); + Q_D(const QQuickTransition); return d->fromState; } -void QDeclarativeTransition::setFromState(const QString &f) +void QQuickTransition::setFromState(const QString &f) { - Q_D(QDeclarativeTransition); + Q_D(QQuickTransition); if (f == d->fromState) return; @@ -304,21 +304,21 @@ void QDeclarativeTransition::setFromState(const QString &f) transition applies a sequential animation when the mouse is pressed, and reverses the sequence of the animation when the mouse is released: - \snippet doc/src/snippets/declarative/transition-reversible.qml 0 + \snippet doc/src/snippets/qml/transition-reversible.qml 0 If the transition did not set the \c to and \c reversible values, then on the mouse release, the transition would play the PropertyAnimation before the ColorAnimation instead of reversing the sequence. */ -bool QDeclarativeTransition::reversible() const +bool QQuickTransition::reversible() const { - Q_D(const QDeclarativeTransition); + Q_D(const QQuickTransition); return d->reversible; } -void QDeclarativeTransition::setReversible(bool r) +void QQuickTransition::setReversible(bool r) { - Q_D(QDeclarativeTransition); + Q_D(QQuickTransition); if (r == d->reversible) return; @@ -326,15 +326,15 @@ void QDeclarativeTransition::setReversible(bool r) emit reversibleChanged(); } -QString QDeclarativeTransition::toState() const +QString QQuickTransition::toState() const { - Q_D(const QDeclarativeTransition); + Q_D(const QQuickTransition); return d->toState; } -void QDeclarativeTransition::setToState(const QString &t) +void QQuickTransition::setToState(const QString &t) { - Q_D(QDeclarativeTransition); + Q_D(QQuickTransition); if (t == d->toState) return; @@ -370,15 +370,15 @@ void QDeclarativeTransition::setToState(const QString &t) \endqml */ -bool QDeclarativeTransition::enabled() const +bool QQuickTransition::enabled() const { - Q_D(const QDeclarativeTransition); + Q_D(const QQuickTransition); return d->enabled; } -void QDeclarativeTransition::setEnabled(bool enabled) +void QQuickTransition::setEnabled(bool enabled) { - Q_D(QDeclarativeTransition); + Q_D(QQuickTransition); if (d->enabled == enabled) return; d->enabled = enabled; @@ -396,17 +396,17 @@ void QDeclarativeTransition::setEnabled(bool enabled) The top-level animations are run in parallel. To run them sequentially, define them within a SequentialAnimation: - \snippet doc/src/snippets/declarative/transition-reversible.qml sequential animations + \snippet doc/src/snippets/qml/transition-reversible.qml sequential animations */ -QDeclarativeListProperty QDeclarativeTransition::animations() +QQmlListProperty QQuickTransition::animations() { - Q_D(QDeclarativeTransition); - return QDeclarativeListProperty(this, &d->animations, QDeclarativeTransitionPrivate::append_animation, - QDeclarativeTransitionPrivate::animation_count, - QDeclarativeTransitionPrivate::animation_at, - QDeclarativeTransitionPrivate::clear_animations); + Q_D(QQuickTransition); + return QQmlListProperty(this, &d->animations, QQuickTransitionPrivate::append_animation, + QQuickTransitionPrivate::animation_count, + QQuickTransitionPrivate::animation_at, + QQuickTransitionPrivate::clear_animations); } QT_END_NAMESPACE -//#include +//#include diff --git a/src/quick/util/qdeclarativetransition_p.h b/src/quick/util/qquicktransition_p.h similarity index 71% rename from src/quick/util/qdeclarativetransition_p.h rename to src/quick/util/qquicktransition_p.h index 839a626014..ebd82fde2c 100644 --- a/src/quick/util/qdeclarativetransition_p.h +++ b/src/quick/util/qquicktransition_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVETRANSITION_H -#define QDECLARATIVETRANSITION_H +#ifndef QQUICKTRANSITION_H +#define QQUICKTRANSITION_H -#include "qdeclarativestate_p.h" -#include +#include "qquickstate_p.h" +#include #include @@ -51,17 +51,17 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeAbstractAnimation; -class QDeclarativeTransitionPrivate; -class QDeclarativeTransitionManager; -class QDeclarativeTransition; +class QQuickAbstractAnimation; +class QQuickTransitionPrivate; +class QQuickTransitionManager; +class QQuickTransition; class QAbstractAnimationJob; -class Q_QUICK_EXPORT QDeclarativeTransitionInstance +class Q_QUICK_EXPORT QQuickTransitionInstance { public: - QDeclarativeTransitionInstance(); - ~QDeclarativeTransitionInstance(); + QQuickTransitionInstance(); + ~QQuickTransitionInstance(); void start(); void stop(); @@ -70,25 +70,25 @@ class Q_QUICK_EXPORT QDeclarativeTransitionInstance private: QAbstractAnimationJob *m_anim; - friend class QDeclarativeTransition; + friend class QQuickTransition; }; -class Q_QUICK_EXPORT QDeclarativeTransition : public QObject +class Q_QUICK_EXPORT QQuickTransition : public QObject { Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeTransition) + Q_DECLARE_PRIVATE(QQuickTransition) Q_PROPERTY(QString from READ fromState WRITE setFromState NOTIFY fromChanged) Q_PROPERTY(QString to READ toState WRITE setToState NOTIFY toChanged) Q_PROPERTY(bool reversible READ reversible WRITE setReversible NOTIFY reversibleChanged) - Q_PROPERTY(QDeclarativeListProperty animations READ animations) + Q_PROPERTY(QQmlListProperty animations READ animations) Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) Q_CLASSINFO("DefaultProperty", "animations") Q_CLASSINFO("DeferredPropertyNames", "animations") public: - QDeclarativeTransition(QObject *parent=0); - ~QDeclarativeTransition(); + QQuickTransition(QObject *parent=0); + ~QQuickTransition(); QString fromState() const; void setFromState(const QString &); @@ -102,11 +102,11 @@ class Q_QUICK_EXPORT QDeclarativeTransition : public QObject bool enabled() const; void setEnabled(bool enabled); - QDeclarativeListProperty animations(); + QQmlListProperty animations(); - QDeclarativeTransitionInstance *prepare(QDeclarativeStateOperation::ActionList &actions, - QList &after, - QDeclarativeTransitionManager *end, + QQuickTransitionInstance *prepare(QQuickStateOperation::ActionList &actions, + QList &after, + QQuickTransitionManager *end, QObject *defaultTarget); void setReversed(bool r); @@ -120,8 +120,8 @@ class Q_QUICK_EXPORT QDeclarativeTransition : public QObject QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeTransition) +QML_DECLARE_TYPE(QQuickTransition) QT_END_HEADER -#endif // QDECLARATIVETRANSITION_H +#endif // QQUICKTRANSITION_H diff --git a/src/quick/util/qdeclarativetransitionmanager.cpp b/src/quick/util/qquicktransitionmanager.cpp similarity index 67% rename from src/quick/util/qdeclarativetransitionmanager.cpp rename to src/quick/util/qquicktransitionmanager.cpp index ebe7805c62..910043e251 100644 --- a/src/quick/util/qdeclarativetransitionmanager.cpp +++ b/src/quick/util/qquicktransitionmanager.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,14 +39,14 @@ ** ****************************************************************************/ -#include "qdeclarativetransitionmanager_p_p.h" +#include "qquicktransitionmanager_p_p.h" -#include "qdeclarativetransition_p.h" -#include "qdeclarativestate_p_p.h" +#include "qquicktransition_p.h" +#include "qquickstate_p_p.h" -#include -#include -#include +#include +#include +#include #include @@ -54,63 +54,63 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG); -class QDeclarativeTransitionManagerPrivate +class QQuickTransitionManagerPrivate { public: - QDeclarativeTransitionManagerPrivate() + QQuickTransitionManagerPrivate() : state(0), transitionInstance(0) {} void applyBindings(); - typedef QList SimpleActionList; - QDeclarativeState *state; - QDeclarativeTransitionInstance *transitionInstance; - QDeclarativeStateOperation::ActionList bindingsList; + typedef QList SimpleActionList; + QQuickState *state; + QQuickTransitionInstance *transitionInstance; + QQuickStateOperation::ActionList bindingsList; SimpleActionList completeList; }; -QDeclarativeTransitionManager::QDeclarativeTransitionManager() -: d(new QDeclarativeTransitionManagerPrivate) +QQuickTransitionManager::QQuickTransitionManager() +: d(new QQuickTransitionManagerPrivate) { } -void QDeclarativeTransitionManager::setState(QDeclarativeState *s) +void QQuickTransitionManager::setState(QQuickState *s) { d->state = s; } -QDeclarativeTransitionManager::~QDeclarativeTransitionManager() +QQuickTransitionManager::~QQuickTransitionManager() { delete d->transitionInstance; delete d; d = 0; } -bool QDeclarativeTransitionManager::isRunning() const +bool QQuickTransitionManager::isRunning() const { return d->transitionInstance && d->transitionInstance->isRunning(); } -void QDeclarativeTransitionManager::complete() +void QQuickTransitionManager::complete() { d->applyBindings(); for (int ii = 0; ii < d->completeList.count(); ++ii) { - const QDeclarativeProperty &prop = d->completeList.at(ii).property(); + const QQmlProperty &prop = d->completeList.at(ii).property(); prop.write(d->completeList.at(ii).value()); } d->completeList.clear(); if (d->state) - static_cast(QObjectPrivate::get(d->state))->complete(); + static_cast(QObjectPrivate::get(d->state))->complete(); finished(); } -void QDeclarativeTransitionManagerPrivate::applyBindings() +void QQuickTransitionManagerPrivate::applyBindings() { - foreach(const QDeclarativeAction &action, bindingsList) { + foreach(const QQuickAction &action, bindingsList) { if (!action.toBinding.isNull()) { - QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding.data()); + QQmlPropertyPrivate::setBinding(action.property, action.toBinding.data()); } else if (action.event) { if (action.reverseEvent) action.event->reverse(); @@ -123,23 +123,23 @@ void QDeclarativeTransitionManagerPrivate::applyBindings() bindingsList.clear(); } -void QDeclarativeTransitionManager::finished() +void QQuickTransitionManager::finished() { } -void QDeclarativeTransitionManager::transition(const QList &list, - QDeclarativeTransition *transition, +void QQuickTransitionManager::transition(const QList &list, + QQuickTransition *transition, QObject *defaultTarget) { cancel(); - QDeclarativeStateOperation::ActionList applyList = list; + QQuickStateOperation::ActionList applyList = list; // Determine which actions are binding changes and disable any current bindings - foreach(const QDeclarativeAction &action, applyList) { + foreach(const QQuickAction &action, applyList) { if (action.toBinding) d->bindingsList << action; if (action.fromBinding) - QDeclarativePropertyPrivate::setBinding(action.property, 0); // Disable current binding + QQmlPropertyPrivate::setBinding(action.property, 0); // Disable current binding if (action.event && action.event->changesBindings()) { //### assume isReversable()? d->bindingsList << action; action.event->clearBindings(); @@ -162,34 +162,34 @@ void QDeclarativeTransitionManager::transition(const QList & // Apply all the property and binding changes for (int ii = 0; ii < applyList.size(); ++ii) { - const QDeclarativeAction &action = applyList.at(ii); + const QQuickAction &action = applyList.at(ii); if (!action.toBinding.isNull()) { - QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding.data(), QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + QQmlPropertyPrivate::setBinding(action.property, action.toBinding.data(), QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); } else if (!action.event) { - QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + QQmlPropertyPrivate::write(action.property, action.toValue, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); } else if (action.event->isReversable()) { if (action.reverseEvent) - action.event->reverse(QDeclarativeActionEvent::FastForward); + action.event->reverse(QQuickActionEvent::FastForward); else - action.event->execute(QDeclarativeActionEvent::FastForward); + action.event->execute(QQuickActionEvent::FastForward); } } // Read all the end values for binding changes for (int ii = 0; ii < applyList.size(); ++ii) { - QDeclarativeAction *action = &applyList[ii]; + QQuickAction *action = &applyList[ii]; if (action->event) { action->event->saveTargetValues(); continue; } - const QDeclarativeProperty &prop = action->property; + const QQmlProperty &prop = action->property; if (!action->toBinding.isNull() || !action->toValue.isValid()) { action->toValue = prop.read(); } } // Revert back to the original values - foreach(const QDeclarativeAction &action, applyList) { + foreach(const QQuickAction &action, applyList) { if (action.event) { if (action.event->isReversable()) { action.event->clearBindings(); @@ -200,15 +200,15 @@ void QDeclarativeTransitionManager::transition(const QList & } if (action.toBinding) - QDeclarativePropertyPrivate::setBinding(action.property, 0); // Make sure this is disabled during the transition + QQmlPropertyPrivate::setBinding(action.property, 0); // Make sure this is disabled during the transition - QDeclarativePropertyPrivate::write(action.property, action.fromValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + QQmlPropertyPrivate::write(action.property, action.fromValue, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); } } if (transition) { - QList touched; - QDeclarativeTransitionInstance *oldInstance = d->transitionInstance; + QList touched; + QQuickTransitionInstance *oldInstance = d->transitionInstance; d->transitionInstance = transition->prepare(applyList, touched, this, defaultTarget); d->transitionInstance->start(); if (oldInstance && oldInstance != d->transitionInstance) @@ -216,7 +216,7 @@ void QDeclarativeTransitionManager::transition(const QList & // Modify the action list to remove actions handled in the transition for (int ii = 0; ii < applyList.count(); ++ii) { - const QDeclarativeAction &action = applyList.at(ii); + const QQuickAction &action = applyList.at(ii); if (action.event) { @@ -230,7 +230,7 @@ void QDeclarativeTransitionManager::transition(const QList & if (touched.contains(action.property)) { if (action.toValue != action.fromValue) d->completeList << - QDeclarativeSimpleAction(action, QDeclarativeSimpleAction::EndState); + QQuickSimpleAction(action, QQuickSimpleAction::EndState); applyList.removeAt(ii); --ii; @@ -244,7 +244,7 @@ void QDeclarativeTransitionManager::transition(const QList & // be applied immediately. We skip applying bindings, as they are all // applied at the end in applyBindings() to avoid any nastiness mid // transition - foreach(const QDeclarativeAction &action, applyList) { + foreach(const QQuickAction &action, applyList) { if (action.event && !action.event->changesBindings()) { if (action.event->isReversable() && action.reverseEvent) action.event->reverse(); @@ -256,7 +256,7 @@ void QDeclarativeTransitionManager::transition(const QList & } #ifndef QT_NO_DEBUG_STREAM if (stateChangeDebug()) { - foreach(const QDeclarativeAction &action, applyList) { + foreach(const QQuickAction &action, applyList) { if (action.event) qWarning() << " No transition for event:" << action.event->type(); else @@ -270,15 +270,15 @@ void QDeclarativeTransitionManager::transition(const QList & complete(); } -void QDeclarativeTransitionManager::cancel() +void QQuickTransitionManager::cancel() { if (d->transitionInstance && d->transitionInstance->isRunning()) d->transitionInstance->stop(); for(int i = 0; i < d->bindingsList.count(); ++i) { - QDeclarativeAction action = d->bindingsList[i]; + QQuickAction action = d->bindingsList[i]; if (!action.toBinding.isNull() && action.deletableToBinding) { - QDeclarativePropertyPrivate::setBinding(action.property, 0); + QQmlPropertyPrivate::setBinding(action.property, 0); action.toBinding.data()->destroy(); action.toBinding.clear(); action.deletableToBinding = false; diff --git a/src/quick/util/qdeclarativetransitionmanager_p_p.h b/src/quick/util/qquicktransitionmanager_p_p.h similarity index 73% rename from src/quick/util/qdeclarativetransitionmanager_p_p.h rename to src/quick/util/qquicktransitionmanager_p_p.h index d548c05f3a..4270ed61a8 100644 --- a/src/quick/util/qdeclarativetransitionmanager_p_p.h +++ b/src/quick/util/qquicktransitionmanager_p_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVETRANSITIONMANAGER_P_H -#define QDECLARATIVETRANSITIONMANAGER_P_H +#ifndef QQUICKTRANSITIONMANAGER_P_H +#define QQUICKTRANSITIONMANAGER_P_H // // W A R N I N G @@ -53,22 +53,22 @@ // We mean it. // -#include "qdeclarativestateoperations_p.h" -#include "qdeclarativeanimation_p.h" +#include "qquickstatechangescript_p.h" +#include "qquickanimation_p.h" QT_BEGIN_NAMESPACE -class QDeclarativeStatePrivate; -class QDeclarativeTransitionManagerPrivate; -class Q_AUTOTEST_EXPORT QDeclarativeTransitionManager +class QQuickStatePrivate; +class QQuickTransitionManagerPrivate; +class Q_AUTOTEST_EXPORT QQuickTransitionManager { public: - QDeclarativeTransitionManager(); - ~QDeclarativeTransitionManager(); + QQuickTransitionManager(); + ~QQuickTransitionManager(); bool isRunning() const; - void transition(const QList &, QDeclarativeTransition *transition, QObject *defaultTarget = 0); + void transition(const QList &, QQuickTransition *transition, QObject *defaultTarget = 0); void cancel(); @@ -76,16 +76,16 @@ class Q_AUTOTEST_EXPORT QDeclarativeTransitionManager virtual void finished(); private: - Q_DISABLE_COPY(QDeclarativeTransitionManager) - QDeclarativeTransitionManagerPrivate *d; + Q_DISABLE_COPY(QQuickTransitionManager) + QQuickTransitionManagerPrivate *d; void complete(); - void setState(QDeclarativeState *); + void setState(QQuickState *); - friend class QDeclarativeState; + friend class QQuickState; friend class ParallelAnimationWrapper; }; QT_END_NAMESPACE -#endif // QDECLARATIVETRANSITIONMANAGER_P_H +#endif // QQUICKTRANSITIONMANAGER_P_H diff --git a/src/quick/util/qquickutilmodule.cpp b/src/quick/util/qquickutilmodule.cpp new file mode 100644 index 0000000000..4abbfe591d --- /dev/null +++ b/src/quick/util/qquickutilmodule.cpp @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qquickutilmodule_p.h" +#include "qquickanimation_p.h" +#include "qquickanimation_p_p.h" +#include "qquickbehavior_p.h" +#include "qquickbind_p.h" +#include "qquickconnections_p.h" +#include "qquicksmoothedanimation_p.h" +#include "qquickfontloader_p.h" +#include "qquickpackage_p.h" +#include "qquickpropertychanges_p.h" +#include "qquickspringanimation_p.h" +#include "qquickstategroup_p.h" +#include "qquickstatechangescript_p.h" +#include "qquickstate_p.h" +#include "qquickstate_p_p.h" +#include "qquicksystempalette_p.h" +#include "qquicktimer_p.h" +#include "qquicktransition_p.h" +#include +#include +#include +#include +#include + +void QQuickUtilModule::defineModule() +{ + qmlRegisterUncreatableType("QtQuick",2,0,"InputPanel", + QInputMethod::tr("InputPanel is an abstract class")); // deprecated + qmlRegisterUncreatableType("QtQuick",2,0,"InputMethod", + QInputMethod::tr("InputMethod is an abstract class")); + qmlRegisterUncreatableType("QtQuick",2,0,"Animation",QQuickAbstractAnimation::tr("Animation is an abstract class")); + + qmlRegisterType("QtQuick",2,0,"Behavior"); + qmlRegisterType("QtQuick",2,0,"Binding"); + qmlRegisterType("QtQuick",2,0,"ColorAnimation"); + qmlRegisterType("QtQuick",2,0,"Connections"); + qmlRegisterType("QtQuick",2,0,"SmoothedAnimation"); + qmlRegisterType("QtQuick",2,0,"FontLoader"); + qmlRegisterType("QtQuick",2,0,"NumberAnimation"); + qmlRegisterType("QtQuick",2,0,"Package"); + qmlRegisterType("QtQuick",2,0,"ParallelAnimation"); + qmlRegisterType("QtQuick",2,0,"PauseAnimation"); + qmlRegisterType("QtQuick",2,0,"PropertyAction"); + qmlRegisterType("QtQuick",2,0,"PropertyAnimation"); + qmlRegisterType("QtQuick",2,0,"RotationAnimation"); + qmlRegisterType("QtQuick",2,0,"ScriptAction"); + qmlRegisterType("QtQuick",2,0,"SequentialAnimation"); + qmlRegisterType("QtQuick",2,0,"SpringAnimation"); + qmlRegisterType("QtQuick",2,0,"AnimationController"); + qmlRegisterType("QtQuick",2,0,"StateChangeScript"); + qmlRegisterType("QtQuick",2,0,"StateGroup"); + qmlRegisterType("QtQuick",2,0,"State"); + qmlRegisterType("QtQuick",2,0,"SystemPalette"); + qmlRegisterType("QtQuick",2,0,"Timer"); + qmlRegisterType("QtQuick",2,0,"Transition"); + qmlRegisterType("QtQuick",2,0,"Vector3dAnimation"); + + qmlRegisterType(); + + qmlRegisterCustomType("QtQuick",2,0,"PropertyChanges", new QQuickPropertyChangesParser); + qmlRegisterCustomType("QtQuick",2,0,"Connections", new QQmlConnectionsParser); +} diff --git a/src/quick/util/qdeclarativeutilmodule_p.h b/src/quick/util/qquickutilmodule_p.h similarity index 88% rename from src/quick/util/qdeclarativeutilmodule_p.h rename to src/quick/util/qquickutilmodule_p.h index 9d20077554..dc0254370e 100644 --- a/src/quick/util/qdeclarativeutilmodule_p.h +++ b/src/quick/util/qquickutilmodule_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,16 +39,16 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEUTILMODULE_H -#define QDECLARATIVEUTILMODULE_H +#ifndef QQUICKUTILMODULE_H +#define QQUICKUTILMODULE_H -#include +#include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QDeclarativeUtilModule +class QQuickUtilModule { public: static void defineModule(); @@ -58,4 +58,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QDECLARATIVEUTILMODULE_H +#endif // QQUICKUTILMODULE_H diff --git a/src/quick/util/util.pri b/src/quick/util/util.pri index d933459596..c3cec91404 100644 --- a/src/quick/util/util.pri +++ b/src/quick/util/util.pri @@ -1,61 +1,61 @@ SOURCES += \ - $$PWD/qdeclarativeutilmodule.cpp\ - $$PWD/qdeclarativeconnections.cpp \ - $$PWD/qdeclarativepackage.cpp \ - $$PWD/qdeclarativeanimation.cpp \ - $$PWD/qdeclarativesystempalette.cpp \ - $$PWD/qdeclarativespringanimation.cpp \ - $$PWD/qdeclarativesmoothedanimation.cpp \ - $$PWD/qdeclarativeanimationcontroller.cpp \ - $$PWD/qdeclarativestate.cpp\ - $$PWD/qdeclarativetransitionmanager.cpp \ - $$PWD/qdeclarativestateoperations.cpp \ - $$PWD/qdeclarativepropertychanges.cpp \ - $$PWD/qdeclarativestategroup.cpp \ - $$PWD/qdeclarativetransition.cpp \ - $$PWD/qdeclarativelistaccessor.cpp \ - $$PWD/qdeclarativetimeline.cpp \ - $$PWD/qdeclarativetimer.cpp \ - $$PWD/qdeclarativebind.cpp \ - $$PWD/qdeclarativepixmapcache.cpp \ - $$PWD/qdeclarativebehavior.cpp \ - $$PWD/qdeclarativefontloader.cpp \ - $$PWD/qdeclarativestyledtext.cpp \ - $$PWD/qdeclarativepath.cpp \ - $$PWD/qdeclarativechangeset.cpp \ - $$PWD/qdeclarativelistcompositor.cpp \ - $$PWD/qdeclarativepathinterpolator.cpp \ - $$PWD/qdeclarativesvgparser.cpp + $$PWD/qquickutilmodule.cpp\ + $$PWD/qquickconnections.cpp \ + $$PWD/qquickpackage.cpp \ + $$PWD/qquickanimation.cpp \ + $$PWD/qquicksystempalette.cpp \ + $$PWD/qquickspringanimation.cpp \ + $$PWD/qquicksmoothedanimation.cpp \ + $$PWD/qquickanimationcontroller.cpp \ + $$PWD/qquickstate.cpp\ + $$PWD/qquicktransitionmanager.cpp \ + $$PWD/qquickstatechangescript.cpp \ + $$PWD/qquickpropertychanges.cpp \ + $$PWD/qquickstategroup.cpp \ + $$PWD/qquicktransition.cpp \ + $$PWD/qquicklistaccessor.cpp \ + $$PWD/qquicktimeline.cpp \ + $$PWD/qquicktimer.cpp \ + $$PWD/qquickbind.cpp \ + $$PWD/qquickpixmapcache.cpp \ + $$PWD/qquickbehavior.cpp \ + $$PWD/qquickfontloader.cpp \ + $$PWD/qquickstyledtext.cpp \ + $$PWD/qquickpath.cpp \ + $$PWD/qquickchangeset.cpp \ + $$PWD/qquicklistcompositor.cpp \ + $$PWD/qquickpathinterpolator.cpp \ + $$PWD/qquicksvgparser.cpp HEADERS += \ - $$PWD/qdeclarativeutilmodule_p.h\ - $$PWD/qdeclarativeconnections_p.h \ - $$PWD/qdeclarativepackage_p.h \ - $$PWD/qdeclarativeanimation_p.h \ - $$PWD/qdeclarativeanimation_p_p.h \ - $$PWD/qdeclarativesystempalette_p.h \ - $$PWD/qdeclarativespringanimation_p.h \ - $$PWD/qdeclarativeanimationcontroller_p.h \ - $$PWD/qdeclarativesmoothedanimation_p.h \ - $$PWD/qdeclarativesmoothedanimation_p_p.h \ - $$PWD/qdeclarativestate_p.h\ - $$PWD/qdeclarativestateoperations_p.h \ - $$PWD/qdeclarativepropertychanges_p.h \ - $$PWD/qdeclarativestate_p_p.h\ - $$PWD/qdeclarativetransitionmanager_p_p.h \ - $$PWD/qdeclarativestategroup_p.h \ - $$PWD/qdeclarativetransition_p.h \ - $$PWD/qdeclarativelistaccessor_p.h \ - $$PWD/qdeclarativetimeline_p_p.h \ - $$PWD/qdeclarativetimer_p.h \ - $$PWD/qdeclarativebind_p.h \ - $$PWD/qdeclarativepixmapcache_p.h \ - $$PWD/qdeclarativebehavior_p.h \ - $$PWD/qdeclarativefontloader_p.h \ - $$PWD/qdeclarativestyledtext_p.h \ - $$PWD/qdeclarativepath_p.h \ - $$PWD/qdeclarativepath_p_p.h \ - $$PWD/qdeclarativechangeset_p.h \ - $$PWD/qdeclarativelistcompositor_p.h \ - $$PWD/qdeclarativepathinterpolator_p.h \ - $$PWD/qdeclarativesvgparser_p.h \ No newline at end of file + $$PWD/qquickutilmodule_p.h\ + $$PWD/qquickconnections_p.h \ + $$PWD/qquickpackage_p.h \ + $$PWD/qquickanimation_p.h \ + $$PWD/qquickanimation_p_p.h \ + $$PWD/qquicksystempalette_p.h \ + $$PWD/qquickspringanimation_p.h \ + $$PWD/qquickanimationcontroller_p.h \ + $$PWD/qquicksmoothedanimation_p.h \ + $$PWD/qquicksmoothedanimation_p_p.h \ + $$PWD/qquickstate_p.h\ + $$PWD/qquickstatechangescript_p.h \ + $$PWD/qquickpropertychanges_p.h \ + $$PWD/qquickstate_p_p.h\ + $$PWD/qquicktransitionmanager_p_p.h \ + $$PWD/qquickstategroup_p.h \ + $$PWD/qquicktransition_p.h \ + $$PWD/qquicklistaccessor_p.h \ + $$PWD/qquicktimeline_p_p.h \ + $$PWD/qquicktimer_p.h \ + $$PWD/qquickbind_p.h \ + $$PWD/qquickpixmapcache_p.h \ + $$PWD/qquickbehavior_p.h \ + $$PWD/qquickfontloader_p.h \ + $$PWD/qquickstyledtext_p.h \ + $$PWD/qquickpath_p.h \ + $$PWD/qquickpath_p_p.h \ + $$PWD/qquickchangeset_p.h \ + $$PWD/qquicklistcompositor_p.h \ + $$PWD/qquickpathinterpolator_p.h \ + $$PWD/qquicksvgparser_p.h diff --git a/src/src.pro b/src/src.pro index f8ef168260..5ea4194260 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs CONFIG += ordered -SUBDIRS += declarative quick plugins +SUBDIRS += qml quick plugins contains(QT_CONFIG, qmltest): SUBDIRS += qmltest diff --git a/sync.profile b/sync.profile index efde01d952..a62dc4fa69 100644 --- a/sync.profile +++ b/sync.profile @@ -1,14 +1,14 @@ %modules = ( # path to module name map - "QtDeclarative" => "$basedir/src/declarative", + "QtQml" => "$basedir/src/qml", "QtQuick" => "$basedir/src/quick", "QtQuickTest" => "$basedir/src/qmltest", "QtQmlDevTools" => "$basedir/src/qmldevtools", ); %moduleheaders = ( # restrict the module headers to those found in relative path - "QtQmlDevTools" => "../declarative/qml/parser", + "QtQmlDevTools" => "../qml/qml/parser", ); %classnames = ( - "qtdeclarativeversion.h" => "QtDeclarativeVersion", + "qtqmlversion.h" => "QtQmlVersion", ); %mastercontent = ( "gui" => "#include \n", @@ -17,7 +17,7 @@ "testlib" => "#include \n", ); %modulepris = ( - "QtDeclarative" => "$basedir/modules/qt_declarative.pri", + "QtQml" => "$basedir/modules/qt_qml.pri", "QtQuick" => "$basedir/modules/qt_quick.pri", "QtQuickTest" => "$basedir/modules/qt_qmltest.pri", "QtQmlDevTools" => "$basedir/modules/qt_qmldevtools.pri", diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 367b2e724b..5012b5cdec 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -1,7 +1,7 @@ TEMPLATE=subdirs SUBDIRS=\ - declarative \ - qtquick2 \ + qml \ + quick \ particles \ qmldevtools diff --git a/tests/auto/compilerwarnings/data/test_cpp.txt b/tests/auto/compilerwarnings/data/test_cpp.txt index c74bb20fdb..01b3bf9980 100644 --- a/tests/auto/compilerwarnings/data/test_cpp.txt +++ b/tests/auto/compilerwarnings/data/test_cpp.txt @@ -40,7 +40,7 @@ ****************************************************************************/ #ifndef QT_NO_DECLARATIVE -#include +#include #endif #ifndef Q_OS_MAC diff --git a/tests/auto/declarative/debugger/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/debugger/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp deleted file mode 100644 index c38b7854e0..0000000000 --- a/tests/auto/declarative/debugger/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include "../../../shared/util.h" -#include "../shared/debugutil_p.h" - -#define PORT 13769 -#define STR_PORT "13769" - -class tst_QDeclarativeDebugService : public QObject -{ - Q_OBJECT -private: - QDeclarativeDebugConnection *m_conn; - -private slots: - void initTestCase(); - - void name(); - void version(); - void state(); - void sendMessage(); - void idForObject(); - void objectForId(); - void objectToString(); -}; - -void tst_QDeclarativeDebugService::initTestCase() -{ - const QString waitingMsg = QString("QDeclarativeDebugServer: Waiting for connection on port %1...").arg(PORT); - QTest::ignoreMessage(QtWarningMsg, waitingMsg.toAscii().constData()); - new QDeclarativeEngine(this); - - m_conn = new QDeclarativeDebugConnection(this); - - - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established"); - for (int i = 0; i < 50; ++i) { - // try for 5 seconds ... - m_conn->connectToHost("127.0.0.1", PORT); - if (m_conn->waitForConnected()) - break; - QTest::qSleep(100); - } - QVERIFY(m_conn->isConnected()); - - QTRY_VERIFY(QDeclarativeDebugService::hasDebuggingClient()); -} - -void tst_QDeclarativeDebugService::name() -{ - QString name = "tst_QDeclarativeDebugService::name()"; - - QDeclarativeDebugService service(name, 1); - QCOMPARE(service.name(), name); -} - -void tst_QDeclarativeDebugService::version() -{ - QString name = "tst_QDeclarativeDebugService::name()"; - - QDeclarativeDebugService service(name, 2); - QCOMPARE(service.version(), 2.0f); -} - -void tst_QDeclarativeDebugService::state() -{ - QDeclarativeDebugTestService service("tst_QDeclarativeDebugService::state()"); - QCOMPARE(service.state(), QDeclarativeDebugService::Unavailable); - - { - QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::state()", m_conn); - QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Enabled); - QTRY_COMPARE(service.state(), QDeclarativeDebugService::Enabled); - } - - - QTRY_COMPARE(service.state(), QDeclarativeDebugService::Unavailable); - - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugService: Conflicting plugin name \"tst_QDeclarativeDebugService::state()\" "); - QDeclarativeDebugTestService duplicate("tst_QDeclarativeDebugService::state()"); - QCOMPARE(duplicate.state(), QDeclarativeDebugService::NotConnected); -} - -void tst_QDeclarativeDebugService::sendMessage() -{ - QDeclarativeDebugTestService service("tst_QDeclarativeDebugService::sendMessage()"); - QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::sendMessage()", m_conn); - - QByteArray msg = "hello!"; - - QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Enabled); - QTRY_COMPARE(service.state(), QDeclarativeDebugService::Enabled); - - client.sendMessage(msg); - QByteArray resp = client.waitForResponse(); - QCOMPARE(resp, msg); - - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugService: Conflicting plugin name \"tst_QDeclarativeDebugService::sendMessage()\" "); - QDeclarativeDebugTestService duplicate("tst_QDeclarativeDebugService::sendMessage()"); - duplicate.sendMessage("msg"); -} - -void tst_QDeclarativeDebugService::idForObject() -{ - QCOMPARE(QDeclarativeDebugService::idForObject(0), -1); - - QObject *objA = new QObject; - - int idA = QDeclarativeDebugService::idForObject(objA); - QVERIFY(idA >= 0); - QCOMPARE(QDeclarativeDebugService::objectForId(idA), objA); - - int idAA = QDeclarativeDebugService::idForObject(objA); - QCOMPARE(idAA, idA); - - QObject *objB = new QObject; - int idB = QDeclarativeDebugService::idForObject(objB); - QVERIFY(idB != idA); - QCOMPARE(QDeclarativeDebugService::objectForId(idB), objB); - - delete objA; - delete objB; -} - -void tst_QDeclarativeDebugService::objectForId() -{ - QCOMPARE(QDeclarativeDebugService::objectForId(-1), static_cast(0)); - QCOMPARE(QDeclarativeDebugService::objectForId(1), static_cast(0)); - - QObject *obj = new QObject; - int id = QDeclarativeDebugService::idForObject(obj); - QCOMPARE(QDeclarativeDebugService::objectForId(id), obj); - - delete obj; - QCOMPARE(QDeclarativeDebugService::objectForId(id), static_cast(0)); -} - -void tst_QDeclarativeDebugService::objectToString() -{ - QCOMPARE(QDeclarativeDebugService::objectToString(0), QString("NULL")); - - QObject *obj = new QObject; - QCOMPARE(QDeclarativeDebugService::objectToString(obj), QString("QObject: ")); - - obj->setObjectName("Hello"); - QCOMPARE(QDeclarativeDebugService::objectToString(obj), QString("QObject: Hello")); - delete obj; -} - - -int main(int argc, char *argv[]) -{ - int _argc = argc + 1; - char **_argv = new char*[_argc]; - for (int i = 0; i < argc; ++i) - _argv[i] = argv[i]; - char arg[] = "-qmljsdebugger=port:" STR_PORT; - _argv[_argc - 1] = arg; - - QGuiApplication app(_argc, _argv); - tst_QDeclarativeDebugService tc; - return QTest::qExec(&tc, _argc, _argv); - delete _argv; -} - -#include "tst_qdeclarativedebugservice.moc" diff --git a/tests/auto/declarative/debugger/qdeclarativeinspector/qdeclarativeinspector.pro b/tests/auto/declarative/debugger/qdeclarativeinspector/qdeclarativeinspector.pro deleted file mode 100644 index 28d16a5029..0000000000 --- a/tests/auto/declarative/debugger/qdeclarativeinspector/qdeclarativeinspector.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += tst_qdeclarativeinspector.pro app diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro deleted file mode 100644 index 7288da27ba..0000000000 --- a/tests/auto/declarative/declarative.pro +++ /dev/null @@ -1,55 +0,0 @@ -TEMPLATE = subdirs - -METATYPETESTS += \ - qdeclarativemetatype - -PUBLICTESTS += \ - parserstress \ - qdeclarativecomponent \ - qdeclarativeconsole \ - qdeclarativecontext \ - qdeclarativeengine \ - qdeclarativeerror \ - qdeclarativefolderlistmodel \ - qdeclarativeincubator \ - qdeclarativeinfo \ - qdeclarativelistreference \ - qdeclarativelocale \ - qdeclarativemoduleplugin \ - qdeclarativeqt \ - qdeclarativetranslation \ - qdeclarativexmlhttprequest \ - qdeclarativeparser \ - qjsengine \ - qjsvalue \ - qjsvalueiterator \ - qmlmin \ - qmlplugindump - -PRIVATETESTS += \ - animation \ - qdeclarativebinding \ - qdeclarativechangeset \ - qdeclarativeconnection \ - qdeclarativecpputils \ - qdeclarativeecmascript \ - qdeclarativeexpression \ - qdeclarativeimageprovider \ - qdeclarativeinstruction \ - qdeclarativelanguage \ - qdeclarativelistcompositor \ - qdeclarativelistmodel \ - qdeclarativeproperty \ - qdeclarativepropertymap \ - qdeclarativesqldatabase \ - qdeclarativevaluetypes \ - qdeclarativeworkerscript \ - v4 - -SUBDIRS += $$PUBLICTESTS -SUBDIRS += $$METATYPETESTS -SUBDIRS += debugger - -contains(QT_CONFIG, private_tests) { - SUBDIRS += $$PRIVATETESTS -} diff --git a/tests/auto/declarative/qdeclarativechangeset/qdeclarativechangeset.pro b/tests/auto/declarative/qdeclarativechangeset/qdeclarativechangeset.pro deleted file mode 100644 index 7c52ef5dfd..0000000000 --- a/tests/auto/declarative/qdeclarativechangeset/qdeclarativechangeset.pro +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativechangeset -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativechangeset.cpp - -CONFIG += parallel_test - -QT += core-private gui-private declarative-private quick-private testlib diff --git a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro deleted file mode 100644 index bb863c5262..0000000000 --- a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativeconnection -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativeconnection.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib diff --git a/tests/auto/declarative/qdeclarativecpputils/qdeclarativecpputils.pro b/tests/auto/declarative/qdeclarativecpputils/qdeclarativecpputils.pro deleted file mode 100644 index 3cae5c25f3..0000000000 --- a/tests/auto/declarative/qdeclarativecpputils/qdeclarativecpputils.pro +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativecpputils -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativecpputils.cpp - -CONFIG += parallel_test - -QT += core-private gui-private declarative-private testlib diff --git a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro deleted file mode 100644 index 547d56b3ad..0000000000 --- a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativeengine -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativeengine.cpp - -CONFIG += parallel_test - -QT += core-private gui-private declarative-private network testlib diff --git a/tests/auto/declarative/qdeclarativeexpression/qdeclarativeexpression.pro b/tests/auto/declarative/qdeclarativeexpression/qdeclarativeexpression.pro deleted file mode 100644 index bd32e6a9ac..0000000000 --- a/tests/auto/declarative/qdeclarativeexpression/qdeclarativeexpression.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativeexpression -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativeexpression.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private declarative-private testlib diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro deleted file mode 100644 index 045d48a710..0000000000 --- a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro +++ /dev/null @@ -1,14 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativefolderlistmodel -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativefolderlistmodel.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test -QT += core-private gui-private declarative-private testlib diff --git a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro deleted file mode 100644 index 70b9a406b3..0000000000 --- a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativeimageprovider -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativeimageprovider.cpp - -CONFIG += parallel_test - -QT += core-private gui-private declarative-private quick-private network testlib diff --git a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro deleted file mode 100644 index 437b0869d1..0000000000 --- a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativeinstruction -SOURCES += tst_qdeclarativeinstruction.cpp -macx:CONFIG -= app_bundle - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private testlib diff --git a/tests/auto/declarative/qdeclarativelistcompositor/qdeclarativelistcompositor.pro b/tests/auto/declarative/qdeclarativelistcompositor/qdeclarativelistcompositor.pro deleted file mode 100644 index 3936f4beff..0000000000 --- a/tests/auto/declarative/qdeclarativelistcompositor/qdeclarativelistcompositor.pro +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativelistcompositor -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativelistcompositor.cpp - -CONFIG += parallel_test - -QT += core-private gui-private declarative-private quick-private testlib diff --git a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro deleted file mode 100644 index 25db0f9415..0000000000 --- a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativelistmodel -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativelistmodel.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib diff --git a/tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro b/tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro deleted file mode 100644 index 7900f3c554..0000000000 --- a/tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativelistreference -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativelistreference.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private declarative-private testlib diff --git a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro deleted file mode 100644 index 8261f6d930..0000000000 --- a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativemetatype -SOURCES += tst_qdeclarativemetatype.cpp -macx:CONFIG -= app_bundle - -CONFIG += parallel_test -QT += core-private gui-private declarative-private widgets testlib diff --git a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp deleted file mode 100644 index e8748ee56a..0000000000 --- a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp +++ /dev/null @@ -1,202 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -#include -#include - -class tst_qdeclarativemetatype : public QObject -{ - Q_OBJECT -public: - tst_qdeclarativemetatype() {} - -private slots: - void initTestCase(); - - void qmlParserStatusCast(); - void qmlPropertyValueSourceCast(); - void qmlPropertyValueInterceptorCast(); - - void isList(); - - void defaultObject(); -}; - -class TestType : public QObject -{ - Q_OBJECT - Q_PROPERTY(int foo READ foo) - - Q_CLASSINFO("DefaultProperty", "foo") -public: - int foo() { return 0; } -}; -QML_DECLARE_TYPE(TestType); - -class ParserStatusTestType : public QObject, public QDeclarativeParserStatus -{ - Q_OBJECT - void classBegin(){} - void componentComplete(){} - Q_CLASSINFO("DefaultProperty", "foo") // Missing default property - Q_INTERFACES(QDeclarativeParserStatus) -}; -QML_DECLARE_TYPE(ParserStatusTestType); - -class ValueSourceTestType : public QObject, public QDeclarativePropertyValueSource -{ - Q_OBJECT - Q_INTERFACES(QDeclarativePropertyValueSource) -public: - virtual void setTarget(const QDeclarativeProperty &) {} -}; -QML_DECLARE_TYPE(ValueSourceTestType); - -class ValueInterceptorTestType : public QObject, public QDeclarativePropertyValueInterceptor -{ - Q_OBJECT - Q_INTERFACES(QDeclarativePropertyValueInterceptor) -public: - virtual void setTarget(const QDeclarativeProperty &) {} - virtual void write(const QVariant &) {} -}; -QML_DECLARE_TYPE(ValueInterceptorTestType); - -void tst_qdeclarativemetatype::initTestCase() -{ - qmlRegisterType("Test", 1, 0, "TestType"); - qmlRegisterType("Test", 1, 0, "ParserStatusTestType"); - qmlRegisterType("Test", 1, 0, "ValueSourceTestType"); - qmlRegisterType("Test", 1, 0, "ValueInterceptorTestType"); -} - -void tst_qdeclarativemetatype::qmlParserStatusCast() -{ - QVERIFY(QDeclarativeMetaType::qmlType(QVariant::Int) == 0); - QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId()) != 0); - QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId())->parserStatusCast(), -1); - QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId()) != 0); - QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId())->parserStatusCast(), -1); - - QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId()) != 0); - int cast = QDeclarativeMetaType::qmlType(qMetaTypeId())->parserStatusCast(); - QVERIFY(cast != -1); - QVERIFY(cast != 0); - - ParserStatusTestType t; - QVERIFY(reinterpret_cast((QObject *)&t) != reinterpret_cast((QDeclarativeParserStatus *)&t)); - - QDeclarativeParserStatus *status = reinterpret_cast(reinterpret_cast((QObject *)&t) + cast); - QCOMPARE(status, (QDeclarativeParserStatus*)&t); -} - -void tst_qdeclarativemetatype::qmlPropertyValueSourceCast() -{ - QVERIFY(QDeclarativeMetaType::qmlType(QVariant::Int) == 0); - QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId()) != 0); - QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId())->propertyValueSourceCast(), -1); - QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId()) != 0); - QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId())->propertyValueSourceCast(), -1); - - QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId()) != 0); - int cast = QDeclarativeMetaType::qmlType(qMetaTypeId())->propertyValueSourceCast(); - QVERIFY(cast != -1); - QVERIFY(cast != 0); - - ValueSourceTestType t; - QVERIFY(reinterpret_cast((QObject *)&t) != reinterpret_cast((QDeclarativePropertyValueSource *)&t)); - - QDeclarativePropertyValueSource *source = reinterpret_cast(reinterpret_cast((QObject *)&t) + cast); - QCOMPARE(source, (QDeclarativePropertyValueSource*)&t); -} - -void tst_qdeclarativemetatype::qmlPropertyValueInterceptorCast() -{ - QVERIFY(QDeclarativeMetaType::qmlType(QVariant::Int) == 0); - QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId()) != 0); - QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId())->propertyValueInterceptorCast(), -1); - QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId()) != 0); - QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId())->propertyValueInterceptorCast(), -1); - - QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId()) != 0); - int cast = QDeclarativeMetaType::qmlType(qMetaTypeId())->propertyValueInterceptorCast(); - QVERIFY(cast != -1); - QVERIFY(cast != 0); - - ValueInterceptorTestType t; - QVERIFY(reinterpret_cast((QObject *)&t) != reinterpret_cast((QDeclarativePropertyValueInterceptor *)&t)); - - QDeclarativePropertyValueInterceptor *interceptor = reinterpret_cast(reinterpret_cast((QObject *)&t) + cast); - QCOMPARE(interceptor, (QDeclarativePropertyValueInterceptor*)&t); -} - -void tst_qdeclarativemetatype::isList() -{ - QCOMPARE(QDeclarativeMetaType::isList(QVariant::Invalid), false); - QCOMPARE(QDeclarativeMetaType::isList(QVariant::Int), false); - - QDeclarativeListProperty list; - - QCOMPARE(QDeclarativeMetaType::isList(qMetaTypeId >()), true); -} - -void tst_qdeclarativemetatype::defaultObject() -{ - QVERIFY(QDeclarativeMetaType::defaultProperty(&QObject::staticMetaObject).name() == 0); - QVERIFY(QDeclarativeMetaType::defaultProperty(&ParserStatusTestType::staticMetaObject).name() == 0); - QCOMPARE(QString(QDeclarativeMetaType::defaultProperty(&TestType::staticMetaObject).name()), QString("foo")); - - QObject o; - TestType t; - ParserStatusTestType p; - - QVERIFY(QDeclarativeMetaType::defaultProperty((QObject *)0).name() == 0); - QVERIFY(QDeclarativeMetaType::defaultProperty(&o).name() == 0); - QVERIFY(QDeclarativeMetaType::defaultProperty(&p).name() == 0); - QCOMPARE(QString(QDeclarativeMetaType::defaultProperty(&t).name()), QString("foo")); -} - -QTEST_MAIN(tst_qdeclarativemetatype) - -#include "tst_qdeclarativemetatype.moc" diff --git a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro deleted file mode 100644 index 45b240b9bd..0000000000 --- a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativeproperty -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativeproperty.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private widgets testlib diff --git a/tests/auto/declarative/qdeclarativepropertycache/qdeclarativepropertycache.pro b/tests/auto/declarative/qdeclarativepropertycache/qdeclarativepropertycache.pro deleted file mode 100644 index 4b47a2cae9..0000000000 --- a/tests/auto/declarative/qdeclarativepropertycache/qdeclarativepropertycache.pro +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativepropertycache -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativepropertycache.cpp - -CONFIG += parallel_test -QT += core-private gui-private declarative-private testlib v8-private diff --git a/tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro b/tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro deleted file mode 100644 index f94405c770..0000000000 --- a/tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativepropertymap -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativepropertymap.cpp - -CONFIG += parallel_test - -QT += core-private gui-private declarative-private quick-private testlib diff --git a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro deleted file mode 100644 index 5ed808831c..0000000000 --- a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativeqt -SOURCES += tst_qdeclarativeqt.cpp - -include (../../shared/util.pri) - -macx:CONFIG -= app_bundle - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private quick-private testlib diff --git a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro deleted file mode 100644 index cc27d173ab..0000000000 --- a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativesqldatabase -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativesqldatabase.cpp - -include (../../shared/util.pri) - -CONFIG += parallel_test - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -QT += core-private gui-private v8-private declarative-private quick-private sql testlib diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro deleted file mode 100644 index 9e5cc43f20..0000000000 --- a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativeworkerscript -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativeworkerscript.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private testlib diff --git a/tests/auto/headersclean/headersclean.pro b/tests/auto/headersclean/headersclean.pro index 16802b7e06..4ce05fe512 100644 --- a/tests/auto/headersclean/headersclean.pro +++ b/tests/auto/headersclean/headersclean.pro @@ -3,4 +3,4 @@ TARGET = tst_headersclean SOURCES += tst_headersclean.cpp QT = core testlib -contains(QT_CONFIG,declarative): QT += declarative declarative-private +contains(QT_CONFIG,qml): QT += qml qml-private diff --git a/tests/auto/headersclean/tst_headersclean.cpp b/tests/auto/headersclean/tst_headersclean.cpp index 132eb90231..d5131f96cd 100644 --- a/tests/auto/headersclean/tst_headersclean.cpp +++ b/tests/auto/headersclean/tst_headersclean.cpp @@ -49,7 +49,7 @@ #include #include -#include +#include class tst_HeadersClean: public QObject { diff --git a/tests/auto/particles/qquickage/qquickage.pro b/tests/auto/particles/qquickage/qquickage.pro index 99c52dfdae..6616ec45ee 100644 --- a/tests/auto/particles/qquickage/qquickage.pro +++ b/tests/auto/particles/qquickage/qquickage.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickangleddirection/qquickangleddirection.pro b/tests/auto/particles/qquickangleddirection/qquickangleddirection.pro index 235f0d81b0..ac37973695 100644 --- a/tests/auto/particles/qquickangleddirection/qquickangleddirection.pro +++ b/tests/auto/particles/qquickangleddirection/qquickangleddirection.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickcumulativedirection/qquickcumulativedirection.pro b/tests/auto/particles/qquickcumulativedirection/qquickcumulativedirection.pro index 09fe1aa06a..42029ce721 100644 --- a/tests/auto/particles/qquickcumulativedirection/qquickcumulativedirection.pro +++ b/tests/auto/particles/qquickcumulativedirection/qquickcumulativedirection.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickcustomaffector/qquickcustomaffector.pro b/tests/auto/particles/qquickcustomaffector/qquickcustomaffector.pro index 6d3ecaa6f4..fdc2445bd1 100644 --- a/tests/auto/particles/qquickcustomaffector/qquickcustomaffector.pro +++ b/tests/auto/particles/qquickcustomaffector/qquickcustomaffector.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickcustomparticle/qquickcustomparticle.pro b/tests/auto/particles/qquickcustomparticle/qquickcustomparticle.pro index e9bcc1e373..a12c1af62c 100644 --- a/tests/auto/particles/qquickcustomparticle/qquickcustomparticle.pro +++ b/tests/auto/particles/qquickcustomparticle/qquickcustomparticle.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickellipseextruder/qquickellipseextruder.pro b/tests/auto/particles/qquickellipseextruder/qquickellipseextruder.pro index 803a366429..48d01201ce 100644 --- a/tests/auto/particles/qquickellipseextruder/qquickellipseextruder.pro +++ b/tests/auto/particles/qquickellipseextruder/qquickellipseextruder.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickfriction/qquickfriction.pro b/tests/auto/particles/qquickfriction/qquickfriction.pro index 889b2d9505..85b5263d36 100644 --- a/tests/auto/particles/qquickfriction/qquickfriction.pro +++ b/tests/auto/particles/qquickfriction/qquickfriction.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickgravity/qquickgravity.pro b/tests/auto/particles/qquickgravity/qquickgravity.pro index 3bdd8c1efa..5340b32cab 100644 --- a/tests/auto/particles/qquickgravity/qquickgravity.pro +++ b/tests/auto/particles/qquickgravity/qquickgravity.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickgroupgoal/qquickgroupgoal.pro b/tests/auto/particles/qquickgroupgoal/qquickgroupgoal.pro index 8e7d5ae021..623993c2de 100644 --- a/tests/auto/particles/qquickgroupgoal/qquickgroupgoal.pro +++ b/tests/auto/particles/qquickgroupgoal/qquickgroupgoal.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private opengl-private testlib +QT += core-private gui-private v8-private qml-private opengl-private testlib diff --git a/tests/auto/particles/qquickimageparticle/qquickimageparticle.pro b/tests/auto/particles/qquickimageparticle/qquickimageparticle.pro index fa43b28407..1241467ba1 100644 --- a/tests/auto/particles/qquickimageparticle/qquickimageparticle.pro +++ b/tests/auto/particles/qquickimageparticle/qquickimageparticle.pro @@ -7,4 +7,4 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickitemparticle/qquickitemparticle.pro b/tests/auto/particles/qquickitemparticle/qquickitemparticle.pro index c36dabbc14..262ebdd5b2 100644 --- a/tests/auto/particles/qquickitemparticle/qquickitemparticle.pro +++ b/tests/auto/particles/qquickitemparticle/qquickitemparticle.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquicklineextruder/qquicklineextruder.pro b/tests/auto/particles/qquicklineextruder/qquicklineextruder.pro index fae5203961..3b87f00320 100644 --- a/tests/auto/particles/qquicklineextruder/qquicklineextruder.pro +++ b/tests/auto/particles/qquicklineextruder/qquicklineextruder.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickmaskextruder/qquickmaskextruder.pro b/tests/auto/particles/qquickmaskextruder/qquickmaskextruder.pro index d82adf8b4a..33d6f2e41e 100644 --- a/tests/auto/particles/qquickmaskextruder/qquickmaskextruder.pro +++ b/tests/auto/particles/qquickmaskextruder/qquickmaskextruder.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickparticlegroup/qquickparticlegroup.pro b/tests/auto/particles/qquickparticlegroup/qquickparticlegroup.pro index 27547c16b1..594b704bd5 100644 --- a/tests/auto/particles/qquickparticlegroup/qquickparticlegroup.pro +++ b/tests/auto/particles/qquickparticlegroup/qquickparticlegroup.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickparticlesystem/qquickparticlesystem.pro b/tests/auto/particles/qquickparticlesystem/qquickparticlesystem.pro index 6fd13ec01e..ea5642aaa9 100644 --- a/tests/auto/particles/qquickparticlesystem/qquickparticlesystem.pro +++ b/tests/auto/particles/qquickparticlesystem/qquickparticlesystem.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickpointattractor/qquickpointattractor.pro b/tests/auto/particles/qquickpointattractor/qquickpointattractor.pro index a9d390aab8..4a93555f5c 100644 --- a/tests/auto/particles/qquickpointattractor/qquickpointattractor.pro +++ b/tests/auto/particles/qquickpointattractor/qquickpointattractor.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickpointdirection/qquickpointdirection.pro b/tests/auto/particles/qquickpointdirection/qquickpointdirection.pro index 04fe1617de..093e7a743f 100644 --- a/tests/auto/particles/qquickpointdirection/qquickpointdirection.pro +++ b/tests/auto/particles/qquickpointdirection/qquickpointdirection.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro b/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro index e45c43a587..1b5da6165c 100644 --- a/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro +++ b/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickspritegoal/qquickspritegoal.pro b/tests/auto/particles/qquickspritegoal/qquickspritegoal.pro index d335a91537..9908f220d2 100644 --- a/tests/auto/particles/qquickspritegoal/qquickspritegoal.pro +++ b/tests/auto/particles/qquickspritegoal/qquickspritegoal.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private opengl-private testlib +QT += core-private gui-private v8-private qml-private opengl-private testlib diff --git a/tests/auto/particles/qquicktargetdirection/qquicktargetdirection.pro b/tests/auto/particles/qquicktargetdirection/qquicktargetdirection.pro index 0a887d1fb3..226cd9d139 100644 --- a/tests/auto/particles/qquicktargetdirection/qquicktargetdirection.pro +++ b/tests/auto/particles/qquicktargetdirection/qquicktargetdirection.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquicktrailemitter/qquicktrailemitter.pro b/tests/auto/particles/qquicktrailemitter/qquicktrailemitter.pro index 9139dd39fb..67b14c86c3 100644 --- a/tests/auto/particles/qquicktrailemitter/qquicktrailemitter.pro +++ b/tests/auto/particles/qquicktrailemitter/qquicktrailemitter.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickturbulence/qquickturbulence.pro b/tests/auto/particles/qquickturbulence/qquickturbulence.pro index 16d85445f5..d8de625b9c 100644 --- a/tests/auto/particles/qquickturbulence/qquickturbulence.pro +++ b/tests/auto/particles/qquickturbulence/qquickturbulence.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickwander/qquickwander.pro b/tests/auto/particles/qquickwander/qquickwander.pro index a9c48ece78..ceb1d9f2c2 100644 --- a/tests/auto/particles/qquickwander/qquickwander.pro +++ b/tests/auto/particles/qquickwander/qquickwander.pro @@ -7,5 +7,5 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/declarative/animation/animation.pro b/tests/auto/qml/animation/animation.pro similarity index 100% rename from tests/auto/declarative/animation/animation.pro rename to tests/auto/qml/animation/animation.pro diff --git a/tests/auto/declarative/animation/qabstractanimationjob/qabstractanimationjob.pro b/tests/auto/qml/animation/qabstractanimationjob/qabstractanimationjob.pro similarity index 74% rename from tests/auto/declarative/animation/qabstractanimationjob/qabstractanimationjob.pro rename to tests/auto/qml/animation/qabstractanimationjob/qabstractanimationjob.pro index db8649bbb9..6d3a05e923 100644 --- a/tests/auto/declarative/animation/qabstractanimationjob/qabstractanimationjob.pro +++ b/tests/auto/qml/animation/qabstractanimationjob/qabstractanimationjob.pro @@ -1,5 +1,5 @@ CONFIG += testcase parallel_test macx:CONFIG -= app_bundle TARGET = tst_qabstractanimationjob -QT = core-private declarative-private testlib +QT = core-private qml-private testlib SOURCES = tst_qabstractanimationjob.cpp diff --git a/tests/auto/declarative/animation/qabstractanimationjob/tst_qabstractanimationjob.cpp b/tests/auto/qml/animation/qabstractanimationjob/tst_qabstractanimationjob.cpp similarity index 98% rename from tests/auto/declarative/animation/qabstractanimationjob/tst_qabstractanimationjob.cpp rename to tests/auto/qml/animation/qabstractanimationjob/tst_qabstractanimationjob.cpp index 772605d494..ea347ab2bd 100644 --- a/tests/auto/declarative/animation/qabstractanimationjob/tst_qabstractanimationjob.cpp +++ b/tests/auto/qml/animation/qabstractanimationjob/tst_qabstractanimationjob.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ -#include -#include +#include +#include #include class tst_QAbstractAnimationJob : public QObject diff --git a/tests/auto/declarative/animation/qanimationgroupjob/qanimationgroupjob.pro b/tests/auto/qml/animation/qanimationgroupjob/qanimationgroupjob.pro similarity index 73% rename from tests/auto/declarative/animation/qanimationgroupjob/qanimationgroupjob.pro rename to tests/auto/qml/animation/qanimationgroupjob/qanimationgroupjob.pro index b9c9d2921d..96081d0116 100644 --- a/tests/auto/declarative/animation/qanimationgroupjob/qanimationgroupjob.pro +++ b/tests/auto/qml/animation/qanimationgroupjob/qanimationgroupjob.pro @@ -1,5 +1,5 @@ CONFIG += testcase parallel_test macx:CONFIG -= app_bundle TARGET = tst_qanimationgroupjob -QT = core-private declarative-private testlib +QT = core-private qml-private testlib SOURCES = tst_qanimationgroupjob.cpp diff --git a/tests/auto/declarative/animation/qanimationgroupjob/tst_qanimationgroupjob.cpp b/tests/auto/qml/animation/qanimationgroupjob/tst_qanimationgroupjob.cpp similarity index 98% rename from tests/auto/declarative/animation/qanimationgroupjob/tst_qanimationgroupjob.cpp rename to tests/auto/qml/animation/qanimationgroupjob/tst_qanimationgroupjob.cpp index 2bb974af7d..f3fd3b4cfb 100644 --- a/tests/auto/declarative/animation/qanimationgroupjob/tst_qanimationgroupjob.cpp +++ b/tests/auto/qml/animation/qanimationgroupjob/tst_qanimationgroupjob.cpp @@ -41,9 +41,9 @@ #include -#include -#include -#include +#include +#include +#include Q_DECLARE_METATYPE(QAbstractAnimationJob::State) diff --git a/tests/auto/declarative/animation/qparallelanimationgroupjob/qparallelanimationgroupjob.pro b/tests/auto/qml/animation/qparallelanimationgroupjob/qparallelanimationgroupjob.pro similarity index 72% rename from tests/auto/declarative/animation/qparallelanimationgroupjob/qparallelanimationgroupjob.pro rename to tests/auto/qml/animation/qparallelanimationgroupjob/qparallelanimationgroupjob.pro index 332fa4554b..f76548183e 100644 --- a/tests/auto/declarative/animation/qparallelanimationgroupjob/qparallelanimationgroupjob.pro +++ b/tests/auto/qml/animation/qparallelanimationgroupjob/qparallelanimationgroupjob.pro @@ -1,5 +1,5 @@ CONFIG += testcase macx:CONFIG -= app_bundle TARGET = tst_qparallelanimationgroupjob -QT = core-private gui declarative-private testlib +QT = core-private gui qml-private testlib SOURCES = tst_qparallelanimationgroupjob.cpp diff --git a/tests/auto/declarative/animation/qparallelanimationgroupjob/tst_qparallelanimationgroupjob.cpp b/tests/auto/qml/animation/qparallelanimationgroupjob/tst_qparallelanimationgroupjob.cpp similarity index 99% rename from tests/auto/declarative/animation/qparallelanimationgroupjob/tst_qparallelanimationgroupjob.cpp rename to tests/auto/qml/animation/qparallelanimationgroupjob/tst_qparallelanimationgroupjob.cpp index ef24182115..b6b3fac039 100644 --- a/tests/auto/declarative/animation/qparallelanimationgroupjob/tst_qparallelanimationgroupjob.cpp +++ b/tests/auto/qml/animation/qparallelanimationgroupjob/tst_qparallelanimationgroupjob.cpp @@ -41,7 +41,7 @@ #include -#include +#include Q_DECLARE_METATYPE(QAbstractAnimationJob::State) diff --git a/tests/auto/declarative/animation/qpauseanimationjob/qpauseanimationjob.pro b/tests/auto/qml/animation/qpauseanimationjob/qpauseanimationjob.pro similarity index 66% rename from tests/auto/declarative/animation/qpauseanimationjob/qpauseanimationjob.pro rename to tests/auto/qml/animation/qpauseanimationjob/qpauseanimationjob.pro index d2b48a6c74..b80bb0c55c 100644 --- a/tests/auto/declarative/animation/qpauseanimationjob/qpauseanimationjob.pro +++ b/tests/auto/qml/animation/qpauseanimationjob/qpauseanimationjob.pro @@ -1,5 +1,5 @@ CONFIG += testcase macx:CONFIG -= app_bundle TARGET = tst_qpauseanimationjob -QT = core-private gui-private declarative-private testlib +QT = core-private gui-private qml-private testlib SOURCES = tst_qpauseanimationjob.cpp diff --git a/tests/auto/declarative/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp b/tests/auto/qml/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp similarity index 98% rename from tests/auto/declarative/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp rename to tests/auto/qml/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp index 97be325017..247d7791bf 100644 --- a/tests/auto/declarative/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp +++ b/tests/auto/qml/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp @@ -41,9 +41,9 @@ #include -#include -#include -#include +#include +#include +#include #ifdef Q_OS_WIN static const char winTimerError[] = "On windows, consistent timing is not working properly due to bad timer resolution"; diff --git a/tests/auto/declarative/animation/qsequentialanimationgroupjob/qsequentialanimationgroupjob.pro b/tests/auto/qml/animation/qsequentialanimationgroupjob/qsequentialanimationgroupjob.pro similarity index 76% rename from tests/auto/declarative/animation/qsequentialanimationgroupjob/qsequentialanimationgroupjob.pro rename to tests/auto/qml/animation/qsequentialanimationgroupjob/qsequentialanimationgroupjob.pro index 914fc3ca62..fe4dc9ce82 100644 --- a/tests/auto/declarative/animation/qsequentialanimationgroupjob/qsequentialanimationgroupjob.pro +++ b/tests/auto/qml/animation/qsequentialanimationgroupjob/qsequentialanimationgroupjob.pro @@ -1,5 +1,5 @@ CONFIG += testcase parallel_test macx:CONFIG -= app_bundle TARGET = tst_qsequentialanimationgroupjob -QT = core-private declarative-private testlib +QT = core-private qml-private testlib SOURCES = tst_qsequentialanimationgroupjob.cpp diff --git a/tests/auto/declarative/animation/qsequentialanimationgroupjob/tst_qsequentialanimationgroupjob.cpp b/tests/auto/qml/animation/qsequentialanimationgroupjob/tst_qsequentialanimationgroupjob.cpp similarity index 99% rename from tests/auto/declarative/animation/qsequentialanimationgroupjob/tst_qsequentialanimationgroupjob.cpp rename to tests/auto/qml/animation/qsequentialanimationgroupjob/tst_qsequentialanimationgroupjob.cpp index d5a9b07f8f..caa43cf9cb 100644 --- a/tests/auto/declarative/animation/qsequentialanimationgroupjob/tst_qsequentialanimationgroupjob.cpp +++ b/tests/auto/qml/animation/qsequentialanimationgroupjob/tst_qsequentialanimationgroupjob.cpp @@ -40,9 +40,9 @@ ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include Q_DECLARE_METATYPE(QAbstractAnimationJob::State) Q_DECLARE_METATYPE(QAbstractAnimationJob*) diff --git a/tests/auto/declarative/debugger/debugger.pro b/tests/auto/qml/debugger/debugger.pro similarity index 50% rename from tests/auto/declarative/debugger/debugger.pro rename to tests/auto/qml/debugger/debugger.pro index 314f0d1b78..4f9ebbc350 100644 --- a/tests/auto/declarative/debugger/debugger.pro +++ b/tests/auto/qml/debugger/debugger.pro @@ -1,12 +1,12 @@ TEMPLATE = subdirs PRIVATETESTS += \ - qdeclarativeenginedebug \ - qdeclarativedebugclient \ - qdeclarativedebugservice \ - qdeclarativedebugjs \ - qdeclarativeinspector \ - qdeclarativeprofilerservice \ + qqmlenginedebug \ + qqmldebugclient \ + qqmldebugservice \ + qqmldebugjs \ + qqmlinspector \ + qqmlprofilerservice \ qpacketprotocol \ qv8profilerservice \ qdebugmessageservice diff --git a/tests/auto/declarative/debugger/qdebugmessageservice/data/test.qml b/tests/auto/qml/debugger/qdebugmessageservice/data/test.qml similarity index 100% rename from tests/auto/declarative/debugger/qdebugmessageservice/data/test.qml rename to tests/auto/qml/debugger/qdebugmessageservice/data/test.qml diff --git a/tests/auto/declarative/debugger/qdebugmessageservice/qdebugmessageservice.pro b/tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro similarity index 90% rename from tests/auto/declarative/debugger/qdebugmessageservice/qdebugmessageservice.pro rename to tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro index 698e9604f0..afda4b23bd 100644 --- a/tests/auto/declarative/debugger/qdebugmessageservice/qdebugmessageservice.pro +++ b/tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qdebugmessageservice -QT += network declarative-private testlib +QT += network qml-private testlib macx:CONFIG -= app_bundle HEADERS += ../shared/debugutil_p.h diff --git a/tests/auto/declarative/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp similarity index 80% rename from tests/auto/declarative/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp rename to tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp index 94738dc083..a19fd4b766 100644 --- a/tests/auto/declarative/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp +++ b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include +#include -//QDeclarativeDebugTest +//QQmlDebugTest #include "../shared/debugutil_p.h" #include "../../../shared/util.h" @@ -51,8 +51,8 @@ const char *NORMALMODE = "-qmljsdebugger=port:3777,block"; const char *QMLFILE = "test.qml"; -class QDeclarativeDebugMsgClient; -class tst_QDebugMessageService : public QDeclarativeDataTest +class QQmlDebugMsgClient; +class tst_QDebugMessageService : public QQmlDataTest { Q_OBJECT @@ -70,9 +70,9 @@ private slots: void retrieveDebugOutput(); private: - QDeclarativeDebugProcess *m_process; - QDeclarativeDebugMsgClient *m_client; - QDeclarativeDebugConnection *m_connection; + QQmlDebugProcess *m_process; + QQmlDebugMsgClient *m_client; + QQmlDebugConnection *m_connection; }; struct LogEntry { @@ -95,19 +95,19 @@ bool operator==(const LogEntry &t1, const LogEntry &t2) && t1.function == t2.function; } -class QDeclarativeDebugMsgClient : public QDeclarativeDebugClient +class QQmlDebugMsgClient : public QQmlDebugClient { Q_OBJECT public: - QDeclarativeDebugMsgClient(QDeclarativeDebugConnection *connection) - : QDeclarativeDebugClient(QLatin1String("DebugMessages"), connection) + QQmlDebugMsgClient(QQmlDebugConnection *connection) + : QQmlDebugClient(QLatin1String("DebugMessages"), connection) { } QList logBuffer; protected: - //inherited from QDeclarativeDebugClient + //inherited from QQmlDebugClient void stateChanged(State state); void messageReceived(const QByteArray &data); @@ -116,14 +116,14 @@ class QDeclarativeDebugMsgClient : public QDeclarativeDebugClient void debugOutput(); }; -void QDeclarativeDebugMsgClient::stateChanged(State state) +void QQmlDebugMsgClient::stateChanged(State state) { if (state == Enabled) { emit enabled(); } } -void QDeclarativeDebugMsgClient::messageReceived(const QByteArray &data) +void QQmlDebugMsgClient::messageReceived(const QByteArray &data) { QDataStream ds(data); QByteArray command; @@ -158,7 +158,7 @@ tst_QDebugMessageService::tst_QDebugMessageService() void tst_QDebugMessageService::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); m_process = 0; m_client = 0; m_connection = 0; @@ -178,11 +178,11 @@ void tst_QDebugMessageService::cleanupTestCase() void tst_QDebugMessageService::init() { - m_connection = new QDeclarativeDebugConnection(); - m_process = new QDeclarativeDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene"); - m_client = new QDeclarativeDebugMsgClient(m_connection); + m_connection = new QQmlDebugConnection(); + m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene"); + m_client = new QQmlDebugMsgClient(m_connection); - m_process->start(QStringList() << QLatin1String(NORMALMODE) << QDeclarativeDataTest::instance()->testFile(QMLFILE)); + m_process->start(QStringList() << QLatin1String(NORMALMODE) << QQmlDataTest::instance()->testFile(QMLFILE)); if (!m_process->waitForSessionStart()) { QFAIL(QString("Could not launch app. Application output: \n%1").arg(m_process->output()).toAscii()); } @@ -190,7 +190,7 @@ void tst_QDebugMessageService::init() m_connection->connectToHost("127.0.0.1", 3777); QVERIFY(m_connection->waitForConnected()); - QVERIFY(QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(enabled()))); + QVERIFY(QQmlDebugTest::waitForSignal(m_client, SIGNAL(enabled()))); } void tst_QDebugMessageService::cleanup() @@ -218,12 +218,12 @@ void tst_QDebugMessageService::retrieveDebugOutput() int maxTries = 2; while ((m_client->logBuffer.size() < 2) || (maxTries-- > 0)) - QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(debugOutput()), 1000); + QQmlDebugTest::waitForSignal(m_client, SIGNAL(debugOutput()), 1000); QVERIFY(m_client->logBuffer.size() >= 2); const QString path = - QUrl::fromLocalFile(QDeclarativeDataTest::instance()->testFile(QMLFILE)).toString(); + QUrl::fromLocalFile(QQmlDataTest::instance()->testFile(QMLFILE)).toString(); LogEntry entry1(QtDebugMsg, QLatin1String("console.log")); entry1.line = 48; entry1.file = path; diff --git a/tests/auto/declarative/debugger/qpacketprotocol/qpacketprotocol.pro b/tests/auto/qml/debugger/qpacketprotocol/qpacketprotocol.pro similarity index 83% rename from tests/auto/declarative/debugger/qpacketprotocol/qpacketprotocol.pro rename to tests/auto/qml/debugger/qpacketprotocol/qpacketprotocol.pro index 949132feff..88439196a7 100644 --- a/tests/auto/declarative/debugger/qpacketprotocol/qpacketprotocol.pro +++ b/tests/auto/qml/debugger/qpacketprotocol/qpacketprotocol.pro @@ -7,4 +7,4 @@ SOURCES += tst_qpacketprotocol.cpp \ ../shared/debugutil.cpp CONFIG += parallel_test -QT += declarative-private network testlib +QT += qml-private network testlib diff --git a/tests/auto/declarative/debugger/qpacketprotocol/tst_qpacketprotocol.cpp b/tests/auto/qml/debugger/qpacketprotocol/tst_qpacketprotocol.cpp similarity index 94% rename from tests/auto/declarative/debugger/qpacketprotocol/tst_qpacketprotocol.cpp rename to tests/auto/qml/debugger/qpacketprotocol/tst_qpacketprotocol.cpp index ac664730cb..c02dd2d8fa 100644 --- a/tests/auto/declarative/debugger/qpacketprotocol/tst_qpacketprotocol.cpp +++ b/tests/auto/qml/debugger/qpacketprotocol/tst_qpacketprotocol.cpp @@ -141,7 +141,7 @@ void tst_QPacketProtocol::send() out.send(packet); } - QVERIFY(QDeclarativeDebugTest::waitForSignal(&in, SIGNAL(readyRead()))); + QVERIFY(QQmlDebugTest::waitForSignal(&in, SIGNAL(readyRead()))); QPacket p = in.read(); p >> ba >> num; @@ -170,7 +170,7 @@ void tst_QPacketProtocol::packetsAvailable() for (int i=0; i> ba >> num; diff --git a/tests/auto/declarative/debugger/qdeclarativedebugclient/qdeclarativedebugclient.pro b/tests/auto/qml/debugger/qqmldebugclient/qqmldebugclient.pro similarity index 55% rename from tests/auto/declarative/debugger/qdeclarativedebugclient/qdeclarativedebugclient.pro rename to tests/auto/qml/debugger/qqmldebugclient/qqmldebugclient.pro index 8eb33fb81d..d298b5c087 100644 --- a/tests/auto/declarative/debugger/qdeclarativedebugclient/qdeclarativedebugclient.pro +++ b/tests/auto/qml/debugger/qqmldebugclient/qqmldebugclient.pro @@ -1,11 +1,11 @@ CONFIG += testcase -TARGET = tst_qdeclarativedebugclient +TARGET = tst_qqmldebugclient macx:CONFIG -= app_bundle HEADERS += ../shared/debugutil_p.h -SOURCES += tst_qdeclarativedebugclient.cpp \ +SOURCES += tst_qqmldebugclient.cpp \ ../shared/debugutil.cpp CONFIG += declarative_debug -QT += declarative-private testlib +QT += qml-private testlib diff --git a/tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp similarity index 54% rename from tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp rename to tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp index e059c7617b..2891076af6 100644 --- a/tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp @@ -45,19 +45,19 @@ #include #include -#include +#include #include "../shared/debugutil_p.h" #define PORT 13770 #define STR_PORT "13770" -class tst_QDeclarativeDebugClient : public QObject +class tst_QQmlDebugClient : public QObject { Q_OBJECT private: - QDeclarativeDebugConnection *m_conn; + QQmlDebugConnection *m_conn; private slots: void initTestCase(); @@ -69,18 +69,18 @@ private slots: void sequentialConnect(); }; -void tst_QDeclarativeDebugClient::initTestCase() +void tst_QQmlDebugClient::initTestCase() { - const QString waitingMsg = QString("QDeclarativeDebugServer: Waiting for connection on port %1...").arg(PORT); + const QString waitingMsg = QString("QQmlDebugServer: Waiting for connection on port %1...").arg(PORT); QTest::ignoreMessage(QtWarningMsg, waitingMsg.toAscii().constData()); - new QDeclarativeEngine(this); + new QQmlEngine(this); - m_conn = new QDeclarativeDebugConnection(this); + m_conn = new QQmlDebugConnection(this); - QDeclarativeDebugTestClient client("tst_QDeclarativeDebugClient::handshake()", m_conn); - QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::handshake()"); + QQmlDebugTestClient client("tst_QQmlDebugClient::handshake()", m_conn); + QQmlDebugTestService service("tst_QQmlDebugClient::handshake()"); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established"); + QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); for (int i = 0; i < 50; ++i) { // try for 5 seconds ... m_conn->connectToHost("127.0.0.1", PORT); @@ -91,66 +91,66 @@ void tst_QDeclarativeDebugClient::initTestCase() QVERIFY(m_conn->isConnected()); - QTRY_VERIFY(QDeclarativeDebugService::hasDebuggingClient()); - QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Enabled); + QTRY_VERIFY(QQmlDebugService::hasDebuggingClient()); + QTRY_COMPARE(client.state(), QQmlDebugClient::Enabled); } -void tst_QDeclarativeDebugClient::name() +void tst_QQmlDebugClient::name() { - QString name = "tst_QDeclarativeDebugClient::name()"; + QString name = "tst_QQmlDebugClient::name()"; - QDeclarativeDebugClient client(name, m_conn); + QQmlDebugClient client(name, m_conn); QCOMPARE(client.name(), name); } -void tst_QDeclarativeDebugClient::state() +void tst_QQmlDebugClient::state() { { - QDeclarativeDebugConnection dummyConn; - QDeclarativeDebugClient client("tst_QDeclarativeDebugClient::state()", &dummyConn); - QCOMPARE(client.state(), QDeclarativeDebugClient::NotConnected); + QQmlDebugConnection dummyConn; + QQmlDebugClient client("tst_QQmlDebugClient::state()", &dummyConn); + QCOMPARE(client.state(), QQmlDebugClient::NotConnected); QCOMPARE(client.serviceVersion(), -1.0f); } - QDeclarativeDebugTestClient client("tst_QDeclarativeDebugClient::state()", m_conn); - QCOMPARE(client.state(), QDeclarativeDebugClient::Unavailable); + QQmlDebugTestClient client("tst_QQmlDebugClient::state()", m_conn); + QCOMPARE(client.state(), QQmlDebugClient::Unavailable); { - QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::state()", 2); - QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Enabled); + QQmlDebugTestService service("tst_QQmlDebugClient::state()", 2); + QTRY_COMPARE(client.state(), QQmlDebugClient::Enabled); QCOMPARE(client.serviceVersion(), 2.0f); } - QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Unavailable); + QTRY_COMPARE(client.state(), QQmlDebugClient::Unavailable); // duplicate plugin name - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugClient: Conflicting plugin name \"tst_QDeclarativeDebugClient::state()\" "); - QDeclarativeDebugClient client2("tst_QDeclarativeDebugClient::state()", m_conn); - QCOMPARE(client2.state(), QDeclarativeDebugClient::NotConnected); + QTest::ignoreMessage(QtWarningMsg, "QQmlDebugClient: Conflicting plugin name \"tst_QQmlDebugClient::state()\" "); + QQmlDebugClient client2("tst_QQmlDebugClient::state()", m_conn); + QCOMPARE(client2.state(), QQmlDebugClient::NotConnected); - QDeclarativeDebugClient client3("tst_QDeclarativeDebugClient::state3()", 0); - QCOMPARE(client3.state(), QDeclarativeDebugClient::NotConnected); + QQmlDebugClient client3("tst_QQmlDebugClient::state3()", 0); + QCOMPARE(client3.state(), QQmlDebugClient::NotConnected); } -void tst_QDeclarativeDebugClient::sendMessage() +void tst_QQmlDebugClient::sendMessage() { - QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::sendMessage()"); - QDeclarativeDebugTestClient client("tst_QDeclarativeDebugClient::sendMessage()", m_conn); + QQmlDebugTestService service("tst_QQmlDebugClient::sendMessage()"); + QQmlDebugTestClient client("tst_QQmlDebugClient::sendMessage()", m_conn); QByteArray msg = "hello!"; - QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(client.state(), QQmlDebugClient::Enabled); client.sendMessage(msg); QByteArray resp = client.waitForResponse(); QCOMPARE(resp, msg); } -void tst_QDeclarativeDebugClient::parallelConnect() +void tst_QQmlDebugClient::parallelConnect() { - QDeclarativeDebugConnection connection2; + QQmlDebugConnection connection2; - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Another client is already connected"); + QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Another client is already connected"); // will connect & immediately disconnect connection2.connectToHost("127.0.0.1", PORT); QVERIFY(connection2.waitForConnected()); @@ -158,11 +158,11 @@ void tst_QDeclarativeDebugClient::parallelConnect() QVERIFY(m_conn->isConnected()); } -void tst_QDeclarativeDebugClient::sequentialConnect() +void tst_QQmlDebugClient::sequentialConnect() { - QDeclarativeDebugConnection connection2; - QDeclarativeDebugTestClient client2("tst_QDeclarativeDebugClient::handshake()", &connection2); - QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::handshake()"); + QQmlDebugConnection connection2; + QQmlDebugTestClient client2("tst_QQmlDebugClient::handshake()", &connection2); + QQmlDebugTestService service("tst_QQmlDebugClient::handshake()"); m_conn->close(); QVERIFY(!m_conn->isConnected()); @@ -172,10 +172,10 @@ void tst_QDeclarativeDebugClient::sequentialConnect() QTest::qWait(100); connection2.connectToHost("127.0.0.1", PORT); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established"); + QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); QVERIFY(connection2.waitForConnected()); QVERIFY(connection2.isConnected()); - QTRY_VERIFY(client2.state() == QDeclarativeDebugClient::Enabled); + QTRY_VERIFY(client2.state() == QQmlDebugClient::Enabled); } int main(int argc, char *argv[]) @@ -188,10 +188,10 @@ int main(int argc, char *argv[]) _argv[_argc - 1] = arg; QGuiApplication app(_argc, _argv); - tst_QDeclarativeDebugClient tc; + tst_QQmlDebugClient tc; return QTest::qExec(&tc, _argc, _argv); delete _argv; } -#include "tst_qdeclarativedebugclient.moc" +#include "tst_qqmldebugclient.moc" diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/data/breakpointRelocation.qml b/tests/auto/qml/debugger/qqmldebugjs/data/breakpointRelocation.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/data/breakpointRelocation.qml rename to tests/auto/qml/debugger/qqmldebugjs/data/breakpointRelocation.qml diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/data/changeBreakpoint.qml b/tests/auto/qml/debugger/qqmldebugjs/data/changeBreakpoint.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/data/changeBreakpoint.qml rename to tests/auto/qml/debugger/qqmldebugjs/data/changeBreakpoint.qml diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/data/condition.qml b/tests/auto/qml/debugger/qqmldebugjs/data/condition.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/data/condition.qml rename to tests/auto/qml/debugger/qqmldebugjs/data/condition.qml diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/data/createComponent.qml b/tests/auto/qml/debugger/qqmldebugjs/data/createComponent.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/data/createComponent.qml rename to tests/auto/qml/debugger/qqmldebugjs/data/createComponent.qml diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/data/exception.qml b/tests/auto/qml/debugger/qqmldebugjs/data/exception.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/data/exception.qml rename to tests/auto/qml/debugger/qqmldebugjs/data/exception.qml diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/data/loadjsfile.qml b/tests/auto/qml/debugger/qqmldebugjs/data/loadjsfile.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/data/loadjsfile.qml rename to tests/auto/qml/debugger/qqmldebugjs/data/loadjsfile.qml diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/data/oncompleted.qml b/tests/auto/qml/debugger/qqmldebugjs/data/oncompleted.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/data/oncompleted.qml rename to tests/auto/qml/debugger/qqmldebugjs/data/oncompleted.qml diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/data/stepAction.qml b/tests/auto/qml/debugger/qqmldebugjs/data/stepAction.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/data/stepAction.qml rename to tests/auto/qml/debugger/qqmldebugjs/data/stepAction.qml diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/data/test.js b/tests/auto/qml/debugger/qqmldebugjs/data/test.js similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/data/test.js rename to tests/auto/qml/debugger/qqmldebugjs/data/test.js diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/data/test.qml b/tests/auto/qml/debugger/qqmldebugjs/data/test.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/data/test.qml rename to tests/auto/qml/debugger/qqmldebugjs/data/test.qml diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/data/timer.qml b/tests/auto/qml/debugger/qqmldebugjs/data/timer.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/data/timer.qml rename to tests/auto/qml/debugger/qqmldebugjs/data/timer.qml diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/qdeclarativedebugjs.pro b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs.pro similarity index 83% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/qdeclarativedebugjs.pro rename to tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs.pro index 5618995b4d..72b0e77f71 100644 --- a/tests/auto/declarative/debugger/qdeclarativedebugjs/qdeclarativedebugjs.pro +++ b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs.pro @@ -1,10 +1,10 @@ CONFIG += testcase -TARGET = tst_qdeclarativedebugjs -QT += declarative-private testlib +TARGET = tst_qqmldebugjs +QT += qml-private testlib macx:CONFIG -= app_bundle HEADERS += ../shared/debugutil_p.h -SOURCES += tst_qdeclarativedebugjs.cpp \ +SOURCES += tst_qqmldebugjs.cpp \ ../shared/debugutil.cpp INCLUDEPATH += ../shared diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp similarity index 87% rename from tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp rename to tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp index 7d57c8eda2..9a8b00bb6c 100644 --- a/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp +++ b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp @@ -46,10 +46,10 @@ #include #include #include -#include -#include +#include +#include -//QDeclarativeDebugTest +//QQmlDebugTest #include "../shared/debugutil_p.h" #include "../../../shared/util.h" @@ -159,7 +159,7 @@ do {\ class QJSDebugClient; -class tst_QDeclarativeDebugJS : public QDeclarativeDataTest +class tst_QQmlDebugJS : public QQmlDataTest { Q_OBJECT @@ -229,13 +229,13 @@ private slots: // void verifyQMLOptimizerDisabled(); private: - QDeclarativeDebugProcess *process; + QQmlDebugProcess *process; QJSDebugClient *client; - QDeclarativeDebugConnection *connection; + QQmlDebugConnection *connection; QTime t; }; -class QJSDebugClient : public QDeclarativeDebugClient +class QJSDebugClient : public QQmlDebugClient { Q_OBJECT public: @@ -259,8 +259,8 @@ class QJSDebugClient : public QDeclarativeDebugClient // Resume // }; - QJSDebugClient(QDeclarativeDebugConnection *connection) - : QDeclarativeDebugClient(QLatin1String("V8Debugger"), connection), + QJSDebugClient(QQmlDebugConnection *connection) + : QQmlDebugClient(QLatin1String("V8Debugger"), connection), seq(0) { parser = jsEngine.evaluate(QLatin1String("JSON.parse")); @@ -292,7 +292,7 @@ class QJSDebugClient : public QDeclarativeDebugClient void listBreakpoints(); protected: - //inherited from QDeclarativeDebugClient + //inherited from QQmlDebugClient void stateChanged(State state); void messageReceived(const QByteArray &data); @@ -958,7 +958,7 @@ void QJSDebugClient::messageReceived(const QByteArray &data) void QJSDebugClient::sendMessage(const QByteArray &msg) { if (state() == Enabled) { - QDeclarativeDebugClient::sendMessage(msg); + QQmlDebugClient::sendMessage(msg); } else { sendBuffer.append(msg); } @@ -967,7 +967,7 @@ void QJSDebugClient::sendMessage(const QByteArray &msg) void QJSDebugClient::flushSendBuffer() { foreach (const QByteArray &msg, sendBuffer) - QDeclarativeDebugClient::sendMessage(msg); + QQmlDebugClient::sendMessage(msg); sendBuffer.clear(); } @@ -980,16 +980,16 @@ QByteArray QJSDebugClient::packMessage(const QByteArray &type, const QByteArray return reply; } -void tst_QDeclarativeDebugJS::initTestCase() +void tst_QQmlDebugJS::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); t.start(); process = 0; client = 0; connection = 0; } -void tst_QDeclarativeDebugJS::cleanupTestCase() +void tst_QQmlDebugJS::cleanupTestCase() { if (process) { process->stop(); @@ -1005,10 +1005,10 @@ void tst_QDeclarativeDebugJS::cleanupTestCase() // qDebug() << "Time Elapsed:" << t.elapsed(); } -bool tst_QDeclarativeDebugJS::init(const QString &qmlFile, bool blockMode) +bool tst_QQmlDebugJS::init(const QString &qmlFile, bool blockMode) { - connection = new QDeclarativeDebugConnection(); - process = new QDeclarativeDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene"); + connection = new QQmlDebugConnection(); + process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene"); client = new QJSDebugClient(connection); QStringList systemEnvironment = QProcess::systemEnvironment(); @@ -1027,10 +1027,10 @@ bool tst_QDeclarativeDebugJS::init(const QString &qmlFile, bool blockMode) if (!connection->waitForConnected()) return false; - return QDeclarativeDebugTest::waitForSignal(client, SIGNAL(enabled())); + return QQmlDebugTest::waitForSignal(client, SIGNAL(enabled())); } -void tst_QDeclarativeDebugJS::cleanup() +void tst_QQmlDebugJS::cleanup() { if (process) { process->stop(); @@ -1048,16 +1048,16 @@ void tst_QDeclarativeDebugJS::cleanup() connection = 0; } -void tst_QDeclarativeDebugJS::connect() +void tst_QQmlDebugJS::connect() { //void connect() QVERIFY(init()); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(connected()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(connected()))); } -void tst_QDeclarativeDebugJS::interrupt() +void tst_QQmlDebugJS::interrupt() { //void connect() @@ -1065,10 +1065,10 @@ void tst_QDeclarativeDebugJS::interrupt() client->connect(); client->interrupt(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(interruptRequested()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(interruptRequested()))); } -void tst_QDeclarativeDebugJS::breakAfterCompile() +void tst_QQmlDebugJS::breakAfterCompile() { //void breakAfterCompile(bool enabled) @@ -1076,23 +1076,23 @@ void tst_QDeclarativeDebugJS::breakAfterCompile() client->breakAfterCompile(true); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(breakAfterCompileRequested()))); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(breakAfterCompileRequested()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); } -void tst_QDeclarativeDebugJS::getVersion() +void tst_QQmlDebugJS::getVersion() { //void version() QVERIFY(init()); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(connected()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(connected()))); client->version(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); } -void tst_QDeclarativeDebugJS::getVersionWhenAttaching() +void tst_QQmlDebugJS::getVersionWhenAttaching() { //void version() @@ -1100,10 +1100,10 @@ void tst_QDeclarativeDebugJS::getVersionWhenAttaching() client->connect(); client->version(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); } -void tst_QDeclarativeDebugJS::applyV8Flags() +void tst_QQmlDebugJS::applyV8Flags() { //void v8flags(QString flags) @@ -1111,10 +1111,10 @@ void tst_QDeclarativeDebugJS::applyV8Flags() client->connect(); client->v8flags(QString()); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); } -void tst_QDeclarativeDebugJS::disconnect() +void tst_QQmlDebugJS::disconnect() { //void disconnect() @@ -1122,10 +1122,10 @@ void tst_QDeclarativeDebugJS::disconnect() client->connect(); client->disconnect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); } -void tst_QDeclarativeDebugJS::gc() +void tst_QQmlDebugJS::gc() { //void gc() @@ -1133,10 +1133,10 @@ void tst_QDeclarativeDebugJS::gc() client->connect(); client->gc(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); } -void tst_QDeclarativeDebugJS::listBreakpoints() +void tst_QQmlDebugJS::listBreakpoints() { //void listBreakpoints() @@ -1148,13 +1148,13 @@ void tst_QDeclarativeDebugJS::listBreakpoints() client->connect(); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(TEST_QMLFILE), sourceLine1, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(TEST_QMLFILE), sourceLine2, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(TEST_QMLFILE), sourceLine3, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); client->listBreakpoints(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1164,7 +1164,7 @@ void tst_QDeclarativeDebugJS::listBreakpoints() QCOMPARE(breakpoints.count(), 3); } -void tst_QDeclarativeDebugJS::setBreakpointInScriptOnCompleted() +void tst_QQmlDebugJS::setBreakpointInScriptOnCompleted() { //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) @@ -1173,7 +1173,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptOnCompleted() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1184,7 +1184,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptOnCompleted() QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(ONCOMPLETED_QMLFILE)); } -void tst_QDeclarativeDebugJS::setBreakpointInScriptOnComponentCreated() +void tst_QQmlDebugJS::setBreakpointInScriptOnComponentCreated() { //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) @@ -1193,7 +1193,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptOnComponentCreated() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1204,7 +1204,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptOnComponentCreated() QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(ONCOMPLETED_QMLFILE)); } -void tst_QDeclarativeDebugJS::setBreakpointInScriptOnTimerCallback() +void tst_QQmlDebugJS::setBreakpointInScriptOnTimerCallback() { int sourceLine = 48; QVERIFY(init(TIMER_QMLFILE)); @@ -1212,7 +1212,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptOnTimerCallback() client->connect(); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(TIMER_QMLFILE), sourceLine, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1223,7 +1223,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptOnTimerCallback() QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(TIMER_QMLFILE)); } -void tst_QDeclarativeDebugJS::setBreakpointInScriptInDifferentFile() +void tst_QQmlDebugJS::setBreakpointInScriptInDifferentFile() { //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) @@ -1232,7 +1232,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptInDifferentFile() client->connect(); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(TEST_JSFILE), sourceLine, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1243,7 +1243,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptInDifferentFile() QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(TEST_JSFILE)); } -void tst_QDeclarativeDebugJS::setBreakpointInScriptOnComment() +void tst_QQmlDebugJS::setBreakpointInScriptOnComment() { //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) @@ -1254,7 +1254,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptOnComment() client->connect(); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(BREAKPOINTRELOCATION_QMLFILE), sourceLine, -1, true); QEXPECT_FAIL("", "Relocation of breakpoints is disabled right now", Abort); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()), 1)); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()), 1)); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1265,7 +1265,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptOnComment() QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(BREAKPOINTRELOCATION_QMLFILE)); } -void tst_QDeclarativeDebugJS::setBreakpointInScriptOnEmptyLine() +void tst_QQmlDebugJS::setBreakpointInScriptOnEmptyLine() { //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) @@ -1276,7 +1276,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptOnEmptyLine() client->connect(); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(BREAKPOINTRELOCATION_QMLFILE), sourceLine, -1, true); QEXPECT_FAIL("", "Relocation of breakpoints is disabled right now", Abort); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()), 1)); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()), 1)); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1287,7 +1287,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptOnEmptyLine() QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(BREAKPOINTRELOCATION_QMLFILE)); } -void tst_QDeclarativeDebugJS::setBreakpointInScriptWithCondition() +void tst_QQmlDebugJS::setBreakpointInScriptWithCondition() { //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) @@ -1297,7 +1297,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptWithCondition() client->connect(); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(CONDITION_QMLFILE), sourceLine, 1, true, QLatin1String("a > 10")); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); //Get the frame index QString jsonString = client->response; @@ -1310,7 +1310,7 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptWithCondition() //Verify the value of 'result' client->evaluate(QLatin1String("a"),frameIndex); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); jsonString = client->response; value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1320,17 +1320,17 @@ void tst_QDeclarativeDebugJS::setBreakpointInScriptWithCondition() QVERIFY(body.value("value").toInt() > out); } -void tst_QDeclarativeDebugJS::setBreakpointWhenAttaching() +void tst_QQmlDebugJS::setBreakpointWhenAttaching() { int sourceLine = 49; QVERIFY(init(QLatin1String(TIMER_QMLFILE), false)); client->connect(); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(TIMER_QMLFILE), sourceLine); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); } -//void tst_QDeclarativeDebugJS::setBreakpointInFunction() +//void tst_QQmlDebugJS::setBreakpointInFunction() //{ // //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) @@ -1339,7 +1339,7 @@ void tst_QDeclarativeDebugJS::setBreakpointWhenAttaching() // client->connect(); // client->setBreakpoint(QLatin1String(FUNCTION), QLatin1String("doSomethingElse"), -1, -1, true); -// QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); +// QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); // QString jsonString(client->response); // QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1350,7 +1350,7 @@ void tst_QDeclarativeDebugJS::setBreakpointWhenAttaching() // QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(QMLFILE)); //} -void tst_QDeclarativeDebugJS::setBreakpointOnEvent() +void tst_QQmlDebugJS::setBreakpointOnEvent() { //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) @@ -1359,7 +1359,7 @@ void tst_QDeclarativeDebugJS::setBreakpointOnEvent() client->connect(); client->setBreakpoint(QLatin1String(EVENT), QLatin1String("triggered"), -1, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1370,7 +1370,7 @@ void tst_QDeclarativeDebugJS::setBreakpointOnEvent() } -void tst_QDeclarativeDebugJS::changeBreakpoint() +void tst_QQmlDebugJS::changeBreakpoint() { //void changeBreakpoint(int breakpoint, bool enabled = false, QString condition = QString(), int ignoreCount = -1) @@ -1382,7 +1382,7 @@ void tst_QDeclarativeDebugJS::changeBreakpoint() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(CHANGEBREAKPOINT_QMLFILE), sourceLine2, -1, true); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(CHANGEBREAKPOINT_QMLFILE), sourceLine1, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); //Will hit 1st brakpoint, change this breakpoint enable = false QString jsonString(client->response); @@ -1394,17 +1394,17 @@ void tst_QDeclarativeDebugJS::changeBreakpoint() int breakpoint = breakpointsHit.at(0).toInt(); client->changeBreakpoint(breakpoint,false); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); //Continue with debugging client->continueDebugging(QJSDebugClient::Continue); //Hit 2nd breakpoint - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); //Continue with debugging client->continueDebugging(QJSDebugClient::Continue); //Should stop at 2nd breakpoint - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); jsonString = client->response; value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1414,7 +1414,7 @@ void tst_QDeclarativeDebugJS::changeBreakpoint() QCOMPARE(body.value("sourceLine").toInt(), sourceLine2); } -void tst_QDeclarativeDebugJS::changeBreakpointOnCondition() +void tst_QQmlDebugJS::changeBreakpointOnCondition() { //void changeBreakpoint(int breakpoint, bool enabled = false, QString condition = QString(), int ignoreCount = -1) @@ -1427,7 +1427,7 @@ void tst_QDeclarativeDebugJS::changeBreakpointOnCondition() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(CHANGEBREAKPOINT_QMLFILE), sourceLine1, -1, true); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(CHANGEBREAKPOINT_QMLFILE), sourceLine2, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); //Will hit 1st brakpoint, change this breakpoint enable = false QString jsonString(client->response); @@ -1439,17 +1439,17 @@ void tst_QDeclarativeDebugJS::changeBreakpointOnCondition() int breakpoint = breakpointsHit.at(0).toInt(); client->changeBreakpoint(breakpoint, false, QLatin1String("d == 0")); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); //Continue with debugging client->continueDebugging(QJSDebugClient::Continue); //Hit 2nd breakpoint - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); //Continue with debugging client->continueDebugging(QJSDebugClient::Continue); //Should stop at 2nd breakpoint - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); jsonString = client->response; value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1460,7 +1460,7 @@ void tst_QDeclarativeDebugJS::changeBreakpointOnCondition() } -void tst_QDeclarativeDebugJS::clearBreakpoint() +void tst_QQmlDebugJS::clearBreakpoint() { //void clearBreakpoint(int breakpoint); @@ -1472,7 +1472,7 @@ void tst_QDeclarativeDebugJS::clearBreakpoint() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(CHANGEBREAKPOINT_QMLFILE), sourceLine1, -1, true); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(CHANGEBREAKPOINT_QMLFILE), sourceLine2, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); //Will hit 1st brakpoint, change this breakpoint enable = false QString jsonString(client->response); @@ -1484,17 +1484,17 @@ void tst_QDeclarativeDebugJS::clearBreakpoint() int breakpoint = breakpointsHit.at(0).toInt(); client->clearBreakpoint(breakpoint); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); //Continue with debugging client->continueDebugging(QJSDebugClient::Continue); //Hit 2nd breakpoint - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); //Continue with debugging client->continueDebugging(QJSDebugClient::Continue); //Should stop at 2nd breakpoint - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); jsonString = client->response; value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1504,17 +1504,17 @@ void tst_QDeclarativeDebugJS::clearBreakpoint() QCOMPARE(body.value("sourceLine").toInt(), sourceLine2); } -void tst_QDeclarativeDebugJS::setExceptionBreak() +void tst_QQmlDebugJS::setExceptionBreak() { //void setExceptionBreak(QString type, bool enabled = false); QVERIFY(init(EXCEPTION_QMLFILE)); client->setExceptionBreak(QJSDebugClient::All,true); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); } -void tst_QDeclarativeDebugJS::stepNext() +void tst_QQmlDebugJS::stepNext() { //void continueDebugging(StepAction stepAction, int stepCount = 1); @@ -1523,10 +1523,10 @@ void tst_QDeclarativeDebugJS::stepNext() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(STEPACTION_QMLFILE), sourceLine, -1, true); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); client->continueDebugging(QJSDebugClient::Next); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1537,7 +1537,7 @@ void tst_QDeclarativeDebugJS::stepNext() QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(STEPACTION_QMLFILE)); } -void tst_QDeclarativeDebugJS::stepNextWithCount() +void tst_QQmlDebugJS::stepNextWithCount() { //void continueDebugging(StepAction stepAction, int stepCount = 1); @@ -1546,10 +1546,10 @@ void tst_QDeclarativeDebugJS::stepNextWithCount() client->connect(); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(STEPACTION_QMLFILE), sourceLine, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); client->continueDebugging(QJSDebugClient::Next, 2); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1560,7 +1560,7 @@ void tst_QDeclarativeDebugJS::stepNextWithCount() QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(STEPACTION_QMLFILE)); } -void tst_QDeclarativeDebugJS::stepIn() +void tst_QQmlDebugJS::stepIn() { //void continueDebugging(StepAction stepAction, int stepCount = 1); @@ -1570,10 +1570,10 @@ void tst_QDeclarativeDebugJS::stepIn() client->connect(); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(STEPACTION_QMLFILE), sourceLine, 1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); client->continueDebugging(QJSDebugClient::In); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1584,7 +1584,7 @@ void tst_QDeclarativeDebugJS::stepIn() QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(STEPACTION_QMLFILE)); } -void tst_QDeclarativeDebugJS::stepOut() +void tst_QQmlDebugJS::stepOut() { //void continueDebugging(StepAction stepAction, int stepCount = 1); @@ -1594,10 +1594,10 @@ void tst_QDeclarativeDebugJS::stepOut() client->connect(); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(STEPACTION_QMLFILE), sourceLine, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); client->continueDebugging(QJSDebugClient::Out); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1608,7 +1608,7 @@ void tst_QDeclarativeDebugJS::stepOut() QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(STEPACTION_QMLFILE)); } -void tst_QDeclarativeDebugJS::continueDebugging() +void tst_QQmlDebugJS::continueDebugging() { //void continueDebugging(StepAction stepAction, int stepCount = 1); @@ -1619,10 +1619,10 @@ void tst_QDeclarativeDebugJS::continueDebugging() client->connect(); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(STEPACTION_QMLFILE), sourceLine1, -1, true); client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(STEPACTION_QMLFILE), sourceLine2, -1, true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); client->continueDebugging(QJSDebugClient::Continue); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1633,7 +1633,7 @@ void tst_QDeclarativeDebugJS::continueDebugging() QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(STEPACTION_QMLFILE)); } -void tst_QDeclarativeDebugJS::backtrace() +void tst_QQmlDebugJS::backtrace() { //void backtrace(int fromFrame = -1, int toFrame = -1, bool bottom = false); @@ -1642,13 +1642,13 @@ void tst_QDeclarativeDebugJS::backtrace() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); client->backtrace(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); } -void tst_QDeclarativeDebugJS::getFrameDetails() +void tst_QQmlDebugJS::getFrameDetails() { //void frame(int number = -1); @@ -1657,13 +1657,13 @@ void tst_QDeclarativeDebugJS::getFrameDetails() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); client->frame(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); } -void tst_QDeclarativeDebugJS::getScopeDetails() +void tst_QQmlDebugJS::getScopeDetails() { //void scope(int number = -1, int frameNumber = -1); @@ -1672,13 +1672,13 @@ void tst_QDeclarativeDebugJS::getScopeDetails() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); client->scope(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); } -void tst_QDeclarativeDebugJS::evaluateInGlobalScope() +void tst_QQmlDebugJS::evaluateInGlobalScope() { //void evaluate(QString expr, bool global = false, bool disableBreak = false, int frame = -1, const QVariantMap &addContext = QVariantMap()); @@ -1686,7 +1686,7 @@ void tst_QDeclarativeDebugJS::evaluateInGlobalScope() client->connect(); client->evaluate(QLatin1String("print('Hello World')"), true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); //Verify the value of 'print' QString jsonString(client->response); @@ -1697,7 +1697,7 @@ void tst_QDeclarativeDebugJS::evaluateInGlobalScope() QCOMPARE(body.value("text").toString(),QLatin1String("undefined")); } -void tst_QDeclarativeDebugJS::evaluateInLocalScope() +void tst_QQmlDebugJS::evaluateInLocalScope() { //void evaluate(QString expr, bool global = false, bool disableBreak = false, int frame = -1, const QVariantMap &addContext = QVariantMap()); @@ -1706,10 +1706,10 @@ void tst_QDeclarativeDebugJS::evaluateInLocalScope() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); client->frame(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); //Get the frame index QString jsonString(client->response); @@ -1720,7 +1720,7 @@ void tst_QDeclarativeDebugJS::evaluateInLocalScope() int frameIndex = body.value("index").toInt(); client->evaluate(QLatin1String("root.a"), frameIndex); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); //Verify the value of 'timer.interval' jsonString = client->response; @@ -1731,7 +1731,7 @@ void tst_QDeclarativeDebugJS::evaluateInLocalScope() QCOMPARE(body.value("value").toInt(),10); } -void tst_QDeclarativeDebugJS::getScopes() +void tst_QQmlDebugJS::getScopes() { //void scopes(int frameNumber = -1); @@ -1740,13 +1740,13 @@ void tst_QDeclarativeDebugJS::getScopes() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); client->scopes(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); } -void tst_QDeclarativeDebugJS::getScripts() +void tst_QQmlDebugJS::getScripts() { //void scripts(int types = -1, QList ids = QList(), bool includeSource = false, QVariant filter = QVariant()); @@ -1759,7 +1759,7 @@ void tst_QDeclarativeDebugJS::getScripts() client->connect(); client->scripts(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); QString jsonString(client->response); QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap(); @@ -1769,7 +1769,7 @@ void tst_QDeclarativeDebugJS::getScripts() QCOMPARE(scripts.count(), 2); } -void tst_QDeclarativeDebugJS::getSource() +void tst_QQmlDebugJS::getSource() { //void source(int frame = -1, int fromLine = -1, int toLine = -1); @@ -1778,13 +1778,13 @@ void tst_QDeclarativeDebugJS::getSource() client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); client->connect(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); client->source(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(result()))); + QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result()))); } -QTEST_MAIN(tst_QDeclarativeDebugJS) +QTEST_MAIN(tst_QQmlDebugJS) -#include "tst_qdeclarativedebugjs.moc" +#include "tst_qqmldebugjs.moc" diff --git a/tests/auto/declarative/debugger/qdeclarativedebugservice/qdeclarativedebugservice.pro b/tests/auto/qml/debugger/qqmldebugservice/qqmldebugservice.pro similarity index 57% rename from tests/auto/declarative/debugger/qdeclarativedebugservice/qdeclarativedebugservice.pro rename to tests/auto/qml/debugger/qqmldebugservice/qqmldebugservice.pro index 015a7232f6..ecb3b2ca2c 100644 --- a/tests/auto/declarative/debugger/qdeclarativedebugservice/qdeclarativedebugservice.pro +++ b/tests/auto/qml/debugger/qqmldebugservice/qqmldebugservice.pro @@ -1,11 +1,11 @@ CONFIG += testcase -TARGET = tst_qdeclarativedebugservice +TARGET = tst_qqmldebugservice macx:CONFIG -= app_bundle HEADERS += ../shared/debugutil_p.h -SOURCES += tst_qdeclarativedebugservice.cpp \ +SOURCES += tst_qqmldebugservice.cpp \ ../shared/debugutil.cpp CONFIG += parallel_test declarative_debug -QT += declarative-private testlib +QT += qml-private testlib diff --git a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp new file mode 100644 index 0000000000..5af38c2af0 --- /dev/null +++ b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp @@ -0,0 +1,216 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include "../../../shared/util.h" +#include "../shared/debugutil_p.h" + +#define PORT 13769 +#define STR_PORT "13769" + +class tst_QQmlDebugService : public QObject +{ + Q_OBJECT +private: + QQmlDebugConnection *m_conn; + +private slots: + void initTestCase(); + + void name(); + void version(); + void state(); + void sendMessage(); + void idForObject(); + void objectForId(); + void objectToString(); +}; + +void tst_QQmlDebugService::initTestCase() +{ + const QString waitingMsg = QString("QQmlDebugServer: Waiting for connection on port %1...").arg(PORT); + QTest::ignoreMessage(QtWarningMsg, waitingMsg.toAscii().constData()); + new QQmlEngine(this); + + m_conn = new QQmlDebugConnection(this); + + + QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); + for (int i = 0; i < 50; ++i) { + // try for 5 seconds ... + m_conn->connectToHost("127.0.0.1", PORT); + if (m_conn->waitForConnected()) + break; + QTest::qSleep(100); + } + QVERIFY(m_conn->isConnected()); + + QTRY_VERIFY(QQmlDebugService::hasDebuggingClient()); +} + +void tst_QQmlDebugService::name() +{ + QString name = "tst_QQmlDebugService::name()"; + + QQmlDebugService service(name, 1); + QCOMPARE(service.name(), name); +} + +void tst_QQmlDebugService::version() +{ + QString name = "tst_QQmlDebugService::name()"; + + QQmlDebugService service(name, 2); + QCOMPARE(service.version(), 2.0f); +} + +void tst_QQmlDebugService::state() +{ + QQmlDebugTestService service("tst_QQmlDebugService::state()"); + QCOMPARE(service.state(), QQmlDebugService::Unavailable); + + { + QQmlDebugTestClient client("tst_QQmlDebugService::state()", m_conn); + QTRY_COMPARE(client.state(), QQmlDebugClient::Enabled); + QTRY_COMPARE(service.state(), QQmlDebugService::Enabled); + } + + + QTRY_COMPARE(service.state(), QQmlDebugService::Unavailable); + + QTest::ignoreMessage(QtWarningMsg, "QQmlDebugService: Conflicting plugin name \"tst_QQmlDebugService::state()\" "); + QQmlDebugTestService duplicate("tst_QQmlDebugService::state()"); + QCOMPARE(duplicate.state(), QQmlDebugService::NotConnected); +} + +void tst_QQmlDebugService::sendMessage() +{ + QQmlDebugTestService service("tst_QQmlDebugService::sendMessage()"); + QQmlDebugTestClient client("tst_QQmlDebugService::sendMessage()", m_conn); + + QByteArray msg = "hello!"; + + QTRY_COMPARE(client.state(), QQmlDebugClient::Enabled); + QTRY_COMPARE(service.state(), QQmlDebugService::Enabled); + + client.sendMessage(msg); + QByteArray resp = client.waitForResponse(); + QCOMPARE(resp, msg); + + QTest::ignoreMessage(QtWarningMsg, "QQmlDebugService: Conflicting plugin name \"tst_QQmlDebugService::sendMessage()\" "); + QQmlDebugTestService duplicate("tst_QQmlDebugService::sendMessage()"); + duplicate.sendMessage("msg"); +} + +void tst_QQmlDebugService::idForObject() +{ + QCOMPARE(QQmlDebugService::idForObject(0), -1); + + QObject *objA = new QObject; + + int idA = QQmlDebugService::idForObject(objA); + QVERIFY(idA >= 0); + QCOMPARE(QQmlDebugService::objectForId(idA), objA); + + int idAA = QQmlDebugService::idForObject(objA); + QCOMPARE(idAA, idA); + + QObject *objB = new QObject; + int idB = QQmlDebugService::idForObject(objB); + QVERIFY(idB != idA); + QCOMPARE(QQmlDebugService::objectForId(idB), objB); + + delete objA; + delete objB; +} + +void tst_QQmlDebugService::objectForId() +{ + QCOMPARE(QQmlDebugService::objectForId(-1), static_cast(0)); + QCOMPARE(QQmlDebugService::objectForId(1), static_cast(0)); + + QObject *obj = new QObject; + int id = QQmlDebugService::idForObject(obj); + QCOMPARE(QQmlDebugService::objectForId(id), obj); + + delete obj; + QCOMPARE(QQmlDebugService::objectForId(id), static_cast(0)); +} + +void tst_QQmlDebugService::objectToString() +{ + QCOMPARE(QQmlDebugService::objectToString(0), QString("NULL")); + + QObject *obj = new QObject; + QCOMPARE(QQmlDebugService::objectToString(obj), QString("QObject: ")); + + obj->setObjectName("Hello"); + QCOMPARE(QQmlDebugService::objectToString(obj), QString("QObject: Hello")); + delete obj; +} + + +int main(int argc, char *argv[]) +{ + int _argc = argc + 1; + char **_argv = new char*[_argc]; + for (int i = 0; i < argc; ++i) + _argv[i] = argv[i]; + char arg[] = "-qmljsdebugger=port:" STR_PORT; + _argv[_argc - 1] = arg; + + QGuiApplication app(_argc, _argv); + tst_QQmlDebugService tc; + return QTest::qExec(&tc, _argc, _argv); + delete _argv; +} + +#include "tst_qqmldebugservice.moc" diff --git a/tests/auto/declarative/debugger/qdeclarativeenginedebug/qdeclarativeenginedebug.pro b/tests/auto/qml/debugger/qqmlenginedebug/qqmlenginedebug.pro similarity index 50% rename from tests/auto/declarative/debugger/qdeclarativeenginedebug/qdeclarativeenginedebug.pro rename to tests/auto/qml/debugger/qqmlenginedebug/qqmlenginedebug.pro index 6b414d3c32..529c4667cf 100644 --- a/tests/auto/declarative/debugger/qdeclarativeenginedebug/qdeclarativeenginedebug.pro +++ b/tests/auto/qml/debugger/qqmlenginedebug/qqmlenginedebug.pro @@ -1,11 +1,11 @@ CONFIG += testcase -TARGET = tst_qdeclarativeenginedebug +TARGET = tst_qqmlenginedebug macx:CONFIG -= app_bundle HEADERS += ../shared/debugutil_p.h -SOURCES += tst_qdeclarativeenginedebug.cpp \ +SOURCES += tst_qqmlenginedebug.cpp \ ../shared/debugutil.cpp CONFIG += parallel_test declarative_debug -QT += core-private declarative-private quick-private v8-private testlib +QT += core-private qml-private quick-private v8-private testlib diff --git a/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp b/tests/auto/qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp similarity index 63% rename from tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp rename to tests/auto/qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp index 246ba6080a..21ed2f40ff 100644 --- a/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp +++ b/tests/auto/qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp @@ -45,42 +45,42 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "../shared/debugutil_p.h" -Q_DECLARE_METATYPE(QDeclarativeDebugWatch::State) +Q_DECLARE_METATYPE(QQmlDebugWatch::State) -class tst_QDeclarativeEngineDebug : public QObject +class tst_QQmlEngineDebug : public QObject { Q_OBJECT private: - QDeclarativeDebugObjectReference findRootObject(int context = 0, bool recursive = false); - QDeclarativeDebugPropertyReference findProperty(const QList &props, const QString &name) const; - void waitForQuery(QDeclarativeDebugQuery *query); + QQmlDebugObjectReference findRootObject(int context = 0, bool recursive = false); + QQmlDebugPropertyReference findProperty(const QList &props, const QString &name) const; + void waitForQuery(QQmlDebugQuery *query); - void recursiveObjectTest(QObject *o, const QDeclarativeDebugObjectReference &oref, bool recursive) const; + void recursiveObjectTest(QObject *o, const QQmlDebugObjectReference &oref, bool recursive) const; - void recursiveCompareObjects(const QDeclarativeDebugObjectReference &a, const QDeclarativeDebugObjectReference &b) const; - void recursiveCompareContexts(const QDeclarativeDebugContextReference &a, const QDeclarativeDebugContextReference &b) const; - void compareProperties(const QDeclarativeDebugPropertyReference &a, const QDeclarativeDebugPropertyReference &b) const; + void recursiveCompareObjects(const QQmlDebugObjectReference &a, const QQmlDebugObjectReference &b) const; + void recursiveCompareContexts(const QQmlDebugContextReference &a, const QQmlDebugContextReference &b) const; + void compareProperties(const QQmlDebugPropertyReference &a, const QQmlDebugPropertyReference &b) const; - QDeclarativeDebugConnection *m_conn; - QDeclarativeEngineDebug *m_dbg; - QDeclarativeEngine *m_engine; + QQmlDebugConnection *m_conn; + QQmlEngineDebug *m_dbg; + QQmlEngine *m_engine; QQuickItem *m_rootItem; QObjectList m_components; @@ -103,11 +103,11 @@ private slots: void queryExpressionResult(); void queryExpressionResult_data(); - void tst_QDeclarativeDebugFileReference(); - void tst_QDeclarativeDebugEngineReference(); - void tst_QDeclarativeDebugObjectReference(); - void tst_QDeclarativeDebugContextReference(); - void tst_QDeclarativeDebugPropertyReference(); + void tst_QQmlDebugFileReference(); + void tst_QQmlDebugEngineReference(); + void tst_QQmlDebugObjectReference(); + void tst_QQmlDebugContextReference(); + void tst_QQmlDebugPropertyReference(); void setBindingForObject(); void setMethodBody(); @@ -127,24 +127,24 @@ class NonScriptProperty : public QObject { QML_DECLARE_TYPE(NonScriptProperty) -QDeclarativeDebugObjectReference tst_QDeclarativeEngineDebug::findRootObject(int context, bool recursive) +QQmlDebugObjectReference tst_QQmlEngineDebug::findRootObject(int context, bool recursive) { - QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); + QQmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); waitForQuery(q_engines); if (q_engines->engines().count() == 0) - return QDeclarativeDebugObjectReference(); - QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); + return QQmlDebugObjectReference(); + QQmlDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); waitForQuery(q_context); if (q_context->rootContext().objects().count() == 0) - return QDeclarativeDebugObjectReference(); - QDeclarativeDebugObjectQuery *q_obj = recursive ? + return QQmlDebugObjectReference(); + QQmlDebugObjectQuery *q_obj = recursive ? m_dbg->queryObjectRecursive(q_context->rootContext().objects()[context], this) : m_dbg->queryObject(q_context->rootContext().objects()[context], this); waitForQuery(q_obj); - QDeclarativeDebugObjectReference result = q_obj->object(); + QQmlDebugObjectReference result = q_obj->object(); delete q_engines; delete q_context; @@ -153,47 +153,47 @@ QDeclarativeDebugObjectReference tst_QDeclarativeEngineDebug::findRootObject(int return result; } -QDeclarativeDebugPropertyReference tst_QDeclarativeEngineDebug::findProperty(const QList &props, const QString &name) const +QQmlDebugPropertyReference tst_QQmlEngineDebug::findProperty(const QList &props, const QString &name) const { - foreach(const QDeclarativeDebugPropertyReference &p, props) { + foreach(const QQmlDebugPropertyReference &p, props) { if (p.name() == name) return p; } - return QDeclarativeDebugPropertyReference(); + return QQmlDebugPropertyReference(); } -void tst_QDeclarativeEngineDebug::waitForQuery(QDeclarativeDebugQuery *query) +void tst_QQmlEngineDebug::waitForQuery(QQmlDebugQuery *query) { QVERIFY(query); QCOMPARE(query->parent(), qobject_cast(this)); - QVERIFY(query->state() == QDeclarativeDebugQuery::Waiting); - if (!QDeclarativeDebugTest::waitForSignal(query, SIGNAL(stateChanged(QDeclarativeDebugQuery::State)))) + QVERIFY(query->state() == QQmlDebugQuery::Waiting); + if (!QQmlDebugTest::waitForSignal(query, SIGNAL(stateChanged(QQmlDebugQuery::State)))) QFAIL("query timed out"); } -void tst_QDeclarativeEngineDebug::recursiveObjectTest(QObject *o, const QDeclarativeDebugObjectReference &oref, bool recursive) const +void tst_QQmlEngineDebug::recursiveObjectTest(QObject *o, const QQmlDebugObjectReference &oref, bool recursive) const { const QMetaObject *meta = o->metaObject(); - QDeclarativeType *type = QDeclarativeMetaType::qmlType(meta); + QQmlType *type = QQmlMetaType::qmlType(meta); QString className = type ? QString(type->qmlTypeName()) : QString(meta->className()); className = className.mid(className.lastIndexOf(QLatin1Char('/'))+1); - QCOMPARE(oref.debugId(), QDeclarativeDebugService::idForObject(o)); + QCOMPARE(oref.debugId(), QQmlDebugService::idForObject(o)); QCOMPARE(oref.name(), o->objectName()); QCOMPARE(oref.className(), className); - QCOMPARE(oref.contextDebugId(), QDeclarativeDebugService::idForObject(qmlContext(o))); + QCOMPARE(oref.contextDebugId(), QQmlDebugService::idForObject(qmlContext(o))); const QObjectList &children = o->children(); for (int i=0; i= 0); - QDeclarativeDebugObjectReference cref; - foreach (const QDeclarativeDebugObjectReference &ref, oref.children()) { + QQmlDebugObjectReference cref; + foreach (const QQmlDebugObjectReference &ref, oref.children()) { if (ref.debugId() == debugId) { cref = ref; break; @@ -205,12 +205,12 @@ void tst_QDeclarativeEngineDebug::recursiveObjectTest(QObject *o, const QDeclara recursiveObjectTest(child, cref, true); } - foreach (const QDeclarativeDebugPropertyReference &p, oref.properties()) { - QCOMPARE(p.objectDebugId(), QDeclarativeDebugService::idForObject(o)); + foreach (const QQmlDebugPropertyReference &p, oref.properties()) { + QCOMPARE(p.objectDebugId(), QQmlDebugService::idForObject(o)); - // signal properties are fake - they are generated from QDeclarativeBoundSignal children + // signal properties are fake - they are generated from QQmlBoundSignal children if (p.name().startsWith("on") && p.name().length() > 2 && p.name()[2].isUpper()) { - QList signalHandlers = o->findChildren(); + QList signalHandlers = o->findChildren(); QString signal = p.value().toString(); bool found = false; for (int i = 0; i < signalHandlers.count(); ++i) @@ -237,8 +237,8 @@ void tst_QDeclarativeEngineDebug::recursiveObjectTest(QObject *o, const QDeclara else QCOMPARE(p.valueTypeName(), QString::fromUtf8(pmeta.typeName())); - QDeclarativeAbstractBinding *binding = - QDeclarativePropertyPrivate::binding(QDeclarativeProperty(o, p.name())); + QQmlAbstractBinding *binding = + QQmlPropertyPrivate::binding(QQmlProperty(o, p.name())); if (binding) QCOMPARE(binding->expression(), p.binding()); @@ -248,7 +248,7 @@ void tst_QDeclarativeEngineDebug::recursiveObjectTest(QObject *o, const QDeclara } } -void tst_QDeclarativeEngineDebug::recursiveCompareObjects(const QDeclarativeDebugObjectReference &a, const QDeclarativeDebugObjectReference &b) const +void tst_QQmlEngineDebug::recursiveCompareObjects(const QQmlDebugObjectReference &a, const QQmlDebugObjectReference &b) const { QCOMPARE(a.debugId(), b.debugId()); QCOMPARE(a.className(), b.className()); @@ -262,8 +262,8 @@ void tst_QDeclarativeEngineDebug::recursiveCompareObjects(const QDeclarativeDebu QCOMPARE(a.properties().count(), b.properties().count()); QCOMPARE(a.children().count(), b.children().count()); - QList aprops = a.properties(); - QList bprops = b.properties(); + QList aprops = a.properties(); + QList bprops = b.properties(); for (int i=0; i(); + qRegisterMetaType(); qmlRegisterType("Test", 1, 0, "NonScriptPropertyElement"); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3768..."); - m_engine = new QDeclarativeEngine(this); + QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Waiting for connection on port 3768..."); + m_engine = new QQmlEngine(this); QList qml; qml << "import QtQuick 2.0\n" @@ -372,7 +372,7 @@ void tst_QDeclarativeEngineDebug::initTestCase() ; for (int i=0; i(component.create()); @@ -380,21 +380,21 @@ void tst_QDeclarativeEngineDebug::initTestCase() m_rootItem = qobject_cast(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"); + QQmlContext *context = new QQmlContext(m_engine->rootContext(), this); + context->setObjectName("tst_QQmlDebug_childContext"); - m_conn = new QDeclarativeDebugConnection(this); + m_conn = new QQmlDebugConnection(this); m_conn->connectToHost("127.0.0.1", 3768); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established"); + QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); bool ok = m_conn->waitForConnected(); QVERIFY(ok); - QTRY_VERIFY(QDeclarativeDebugService::hasDebuggingClient()); - m_dbg = new QDeclarativeEngineDebug(m_conn, this); - QTRY_VERIFY(m_dbg->state() == QDeclarativeEngineDebug::Enabled); + QTRY_VERIFY(QQmlDebugService::hasDebuggingClient()); + m_dbg = new QQmlEngineDebug(m_conn, this); + QTRY_VERIFY(m_dbg->state() == QQmlEngineDebug::Enabled); } -void tst_QDeclarativeEngineDebug::cleanupTestCase() +void tst_QQmlEngineDebug::cleanupTestCase() { delete m_dbg; delete m_conn; @@ -402,9 +402,9 @@ void tst_QDeclarativeEngineDebug::cleanupTestCase() delete m_engine; } -void tst_QDeclarativeEngineDebug::setMethodBody() +void tst_QQmlEngineDebug::setMethodBody() { - QDeclarativeDebugObjectReference obj = findRootObject(2); + QQmlDebugObjectReference obj = findRootObject(2); QObject *root = m_components.at(2); // Without args @@ -439,26 +439,26 @@ void tst_QDeclarativeEngineDebug::setMethodBody() } } -void tst_QDeclarativeEngineDebug::watch_property() +void tst_QQmlEngineDebug::watch_property() { - QDeclarativeDebugObjectReference obj = findRootObject(); - QDeclarativeDebugPropertyReference prop = findProperty(obj.properties(), "width"); + QQmlDebugObjectReference obj = findRootObject(); + QQmlDebugPropertyReference prop = findProperty(obj.properties(), "width"); - QDeclarativeDebugPropertyWatch *watch; + QQmlDebugPropertyWatch *watch; - QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0); + QQmlEngineDebug *unconnected = new QQmlEngineDebug(0); watch = unconnected->addWatch(prop, this); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Dead); + QCOMPARE(watch->state(), QQmlDebugWatch::Dead); delete watch; delete unconnected; - watch = m_dbg->addWatch(QDeclarativeDebugPropertyReference(), this); - QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State)))); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Inactive); + watch = m_dbg->addWatch(QQmlDebugPropertyReference(), this); + QVERIFY(QQmlDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QQmlDebugWatch::State)))); + QCOMPARE(watch->state(), QQmlDebugWatch::Inactive); delete watch; watch = m_dbg->addWatch(prop, this); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Waiting); + QCOMPARE(watch->state(), QQmlDebugWatch::Waiting); QCOMPARE(watch->objectDebugId(), obj.debugId()); QCOMPARE(watch->name(), prop.name()); @@ -468,8 +468,8 @@ void tst_QDeclarativeEngineDebug::watch_property() m_rootItem->setProperty("width", origWidth*2); // stateChanged() is received before valueChanged() - QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State)))); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Active); + QVERIFY(QQmlDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QQmlDebugWatch::State)))); + QCOMPARE(watch->state(), QQmlDebugWatch::Active); QCOMPARE(spy.count(), 1); m_dbg->removeWatch(watch); @@ -484,40 +484,40 @@ void tst_QDeclarativeEngineDebug::watch_property() QCOMPARE(spy.at(0).at(1).value(), qVariantFromValue(origWidth*2)); } -void tst_QDeclarativeEngineDebug::watch_object() +void tst_QQmlEngineDebug::watch_object() { - QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); + QQmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); waitForQuery(q_engines); QVERIFY(q_engines->engines().count() > 0); - QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); + QQmlDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); waitForQuery(q_context); QVERIFY(q_context->rootContext().objects().count() > 0); - QDeclarativeDebugObjectQuery *q_obj = m_dbg->queryObject(q_context->rootContext().objects()[0], this); + QQmlDebugObjectQuery *q_obj = m_dbg->queryObject(q_context->rootContext().objects()[0], this); waitForQuery(q_obj); - QDeclarativeDebugObjectReference obj = q_obj->object(); + QQmlDebugObjectReference obj = q_obj->object(); delete q_engines; delete q_context; delete q_obj; - QDeclarativeDebugWatch *watch; + QQmlDebugWatch *watch; - QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0); + QQmlEngineDebug *unconnected = new QQmlEngineDebug(0); watch = unconnected->addWatch(obj, this); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Dead); + QCOMPARE(watch->state(), QQmlDebugWatch::Dead); delete watch; delete unconnected; - watch = m_dbg->addWatch(QDeclarativeDebugObjectReference(), this); - QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State)))); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Inactive); + watch = m_dbg->addWatch(QQmlDebugObjectReference(), this); + QVERIFY(QQmlDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QQmlDebugWatch::State)))); + QCOMPARE(watch->state(), QQmlDebugWatch::Inactive); delete watch; watch = m_dbg->addWatch(obj, this); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Waiting); + QCOMPARE(watch->state(), QQmlDebugWatch::Waiting); QCOMPARE(watch->objectDebugId(), obj.debugId()); QSignalSpy spy(watch, SIGNAL(valueChanged(QByteArray,QVariant))); @@ -528,8 +528,8 @@ void tst_QDeclarativeEngineDebug::watch_object() m_rootItem->setProperty("height", origHeight*2); // stateChanged() is received before any valueChanged() signals - QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State)))); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Active); + QVERIFY(QQmlDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QQmlDebugWatch::State)))); + QCOMPARE(watch->state(), QQmlDebugWatch::Active); QVERIFY(spy.count() > 0); int newWidth = -1; @@ -557,7 +557,7 @@ void tst_QDeclarativeEngineDebug::watch_object() QCOMPARE(newHeight, origHeight * 2); } -void tst_QDeclarativeEngineDebug::watch_expression() +void tst_QQmlEngineDebug::watch_expression() { QFETCH(QString, expr); QFETCH(int, increment); @@ -565,27 +565,27 @@ void tst_QDeclarativeEngineDebug::watch_expression() int origWidth = m_rootItem->property("width").toInt(); - QDeclarativeDebugObjectReference obj = findRootObject(); + QQmlDebugObjectReference obj = findRootObject(); - QDeclarativeDebugObjectExpressionWatch *watch; + QQmlDebugObjectExpressionWatch *watch; - QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0); + QQmlEngineDebug *unconnected = new QQmlEngineDebug(0); watch = unconnected->addWatch(obj, expr, this); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Dead); + QCOMPARE(watch->state(), QQmlDebugWatch::Dead); delete watch; delete unconnected; - watch = m_dbg->addWatch(QDeclarativeDebugObjectReference(), expr, this); - QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State)))); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Inactive); + watch = m_dbg->addWatch(QQmlDebugObjectReference(), expr, this); + QVERIFY(QQmlDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QQmlDebugWatch::State)))); + QCOMPARE(watch->state(), QQmlDebugWatch::Inactive); delete watch; watch = m_dbg->addWatch(obj, expr, this); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Waiting); + QCOMPARE(watch->state(), QQmlDebugWatch::Waiting); QCOMPARE(watch->objectDebugId(), obj.debugId()); QCOMPARE(watch->expression(), expr); - QSignalSpy spyState(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State))); + QSignalSpy spyState(watch, SIGNAL(stateChanged(QQmlDebugWatch::State))); QSignalSpy spy(watch, SIGNAL(valueChanged(QByteArray,QVariant))); int expectedSpyCount = incrementCount + 1; // should also get signal with expression's initial value @@ -596,14 +596,14 @@ void tst_QDeclarativeEngineDebug::watch_expression() width += increment; m_rootItem->setProperty("width", width); } - if (!QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(valueChanged(QByteArray,QVariant)))) + if (!QQmlDebugTest::waitForSignal(watch, SIGNAL(valueChanged(QByteArray,QVariant)))) QFAIL("Did not receive valueChanged() for expression"); } if (spyState.count() == 0) - QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State)))); + QVERIFY(QQmlDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QQmlDebugWatch::State)))); QCOMPARE(spyState.count(), 1); - QCOMPARE(watch->state(), QDeclarativeDebugWatch::Active); + QCOMPARE(watch->state(), QQmlDebugWatch::Active); m_dbg->removeWatch(watch); delete watch; @@ -620,7 +620,7 @@ void tst_QDeclarativeEngineDebug::watch_expression() } } -void tst_QDeclarativeEngineDebug::watch_expression_data() +void tst_QQmlEngineDebug::watch_expression_data() { QTest::addColumn("expr"); QTest::addColumn("increment"); @@ -630,27 +630,27 @@ void tst_QDeclarativeEngineDebug::watch_expression_data() QTest::newRow("width+10") << "width + 10" << 10 << 5; } -void tst_QDeclarativeEngineDebug::watch_context() +void tst_QQmlEngineDebug::watch_context() { - QDeclarativeDebugContextReference c; - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeEngineDebug::addWatch(): Not implemented"); + QQmlDebugContextReference c; + QTest::ignoreMessage(QtWarningMsg, "QQmlEngineDebug::addWatch(): Not implemented"); QVERIFY(!m_dbg->addWatch(c, QString(), this)); } -void tst_QDeclarativeEngineDebug::watch_file() +void tst_QQmlEngineDebug::watch_file() { - QDeclarativeDebugFileReference f; - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeEngineDebug::addWatch(): Not implemented"); + QQmlDebugFileReference f; + QTest::ignoreMessage(QtWarningMsg, "QQmlEngineDebug::addWatch(): Not implemented"); QVERIFY(!m_dbg->addWatch(f, this)); } -void tst_QDeclarativeEngineDebug::queryAvailableEngines() +void tst_QQmlEngineDebug::queryAvailableEngines() { - QDeclarativeDebugEnginesQuery *q_engines; + QQmlDebugEnginesQuery *q_engines; - QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0); + QQmlEngineDebug *unconnected = new QQmlEngineDebug(0); q_engines = unconnected->queryAvailableEngines(0); - QCOMPARE(q_engines->state(), QDeclarativeDebugQuery::Error); + QCOMPARE(q_engines->state(), QQmlDebugQuery::Error); delete q_engines; delete unconnected; @@ -662,35 +662,35 @@ void tst_QDeclarativeEngineDebug::queryAvailableEngines() waitForQuery(q_engines); // TODO test multiple engines - QList engines = q_engines->engines(); + QList engines = q_engines->engines(); QCOMPARE(engines.count(), 1); - foreach(const QDeclarativeDebugEngineReference &e, engines) { - QCOMPARE(e.debugId(), QDeclarativeDebugService::idForObject(m_engine)); + foreach(const QQmlDebugEngineReference &e, engines) { + QCOMPARE(e.debugId(), QQmlDebugService::idForObject(m_engine)); QCOMPARE(e.name(), m_engine->objectName()); } // Make query invalid by deleting client q_engines = m_dbg->queryAvailableEngines(this); - QCOMPARE(q_engines->state(), QDeclarativeDebugQuery::Waiting); + QCOMPARE(q_engines->state(), QQmlDebugQuery::Waiting); delete m_dbg; - QCOMPARE(q_engines->state(), QDeclarativeDebugQuery::Error); + QCOMPARE(q_engines->state(), QQmlDebugQuery::Error); delete q_engines; - m_dbg = new QDeclarativeEngineDebug(m_conn, this); + m_dbg = new QQmlEngineDebug(m_conn, this); } -void tst_QDeclarativeEngineDebug::queryRootContexts() +void tst_QQmlEngineDebug::queryRootContexts() { - QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); + QQmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); waitForQuery(q_engines); int engineId = q_engines->engines()[0].debugId(); delete q_engines; - QDeclarativeDebugRootContextQuery *q_context; + QQmlDebugRootContextQuery *q_context; - QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0); + QQmlEngineDebug *unconnected = new QQmlEngineDebug(0); q_context = unconnected->queryRootContexts(engineId, this); - QCOMPARE(q_context->state(), QDeclarativeDebugQuery::Error); + QCOMPARE(q_context->state(), QQmlDebugQuery::Error); delete q_context; delete unconnected; @@ -700,9 +700,9 @@ void tst_QDeclarativeEngineDebug::queryRootContexts() q_context = m_dbg->queryRootContexts(engineId, this); waitForQuery(q_context); - QDeclarativeContext *actualContext = m_engine->rootContext(); - QDeclarativeDebugContextReference context = q_context->rootContext(); - QCOMPARE(context.debugId(), QDeclarativeDebugService::idForObject(actualContext)); + QQmlContext *actualContext = m_engine->rootContext(); + QQmlDebugContextReference context = q_context->rootContext(); + QCOMPARE(context.debugId(), QQmlDebugService::idForObject(actualContext)); QCOMPARE(context.name(), actualContext->objectName()); QCOMPARE(context.objects().count(), 4); // 4 qml component objects created for context in main() @@ -714,33 +714,33 @@ void tst_QDeclarativeEngineDebug::queryRootContexts() QCOMPARE(context.contexts().count(), 5); QVERIFY(context.contexts()[0].debugId() >= 0); - QCOMPARE(context.contexts()[0].name(), QString("tst_QDeclarativeDebug_childContext")); + QCOMPARE(context.contexts()[0].name(), QString("tst_QQmlDebug_childContext")); // Make query invalid by deleting client q_context = m_dbg->queryRootContexts(engineId, this); - QCOMPARE(q_context->state(), QDeclarativeDebugQuery::Waiting); + QCOMPARE(q_context->state(), QQmlDebugQuery::Waiting); delete m_dbg; - QCOMPARE(q_context->state(), QDeclarativeDebugQuery::Error); + QCOMPARE(q_context->state(), QQmlDebugQuery::Error); delete q_context; - m_dbg = new QDeclarativeEngineDebug(m_conn, this); + m_dbg = new QQmlEngineDebug(m_conn, this); } -void tst_QDeclarativeEngineDebug::queryObject() +void tst_QQmlEngineDebug::queryObject() { QFETCH(bool, recursive); - QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); + QQmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); waitForQuery(q_engines); - QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); + QQmlDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); waitForQuery(q_context); - QDeclarativeDebugObjectReference rootObject = q_context->rootContext().objects()[0]; + QQmlDebugObjectReference rootObject = q_context->rootContext().objects()[0]; - QDeclarativeDebugObjectQuery *q_obj = 0; + QQmlDebugObjectQuery *q_obj = 0; - QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0); + QQmlEngineDebug *unconnected = new QQmlEngineDebug(0); q_obj = recursive ? unconnected->queryObjectRecursive(rootObject, this) : unconnected->queryObject(rootObject, this); - QCOMPARE(q_obj->state(), QDeclarativeDebugQuery::Error); + QCOMPARE(q_obj->state(), QQmlDebugQuery::Error); delete q_obj; delete unconnected; @@ -750,21 +750,21 @@ void tst_QDeclarativeEngineDebug::queryObject() q_obj = recursive ? m_dbg->queryObjectRecursive(rootObject, this) : m_dbg->queryObject(rootObject, this); waitForQuery(q_obj); - QDeclarativeDebugObjectReference obj = q_obj->object(); + QQmlDebugObjectReference obj = q_obj->object(); delete q_engines; delete q_context; // Make query invalid by deleting client q_obj = recursive ? m_dbg->queryObjectRecursive(rootObject, this) : m_dbg->queryObject(rootObject, this); - QCOMPARE(q_obj->state(), QDeclarativeDebugQuery::Waiting); + QCOMPARE(q_obj->state(), QQmlDebugQuery::Waiting); delete m_dbg; - QCOMPARE(q_obj->state(), QDeclarativeDebugQuery::Error); + QCOMPARE(q_obj->state(), QQmlDebugQuery::Error); delete q_obj; - m_dbg = new QDeclarativeEngineDebug(m_conn, this); + m_dbg = new QQmlEngineDebug(m_conn, this); // check source as defined in main() - QDeclarativeDebugFileReference source = obj.source(); + QQmlDebugFileReference source = obj.source(); QCOMPARE(source.url(), QUrl::fromLocalFile("")); QCOMPARE(source.lineNumber(), 3); QCOMPARE(source.columnNumber(), 1); @@ -773,12 +773,12 @@ void tst_QDeclarativeEngineDebug::queryObject() recursiveObjectTest(m_rootItem, obj, recursive); if (recursive) { - foreach(const QDeclarativeDebugObjectReference &child, obj.children()) + foreach(const QQmlDebugObjectReference &child, obj.children()) QVERIFY(child.properties().count() > 0); - QDeclarativeDebugObjectReference rect; - QDeclarativeDebugObjectReference text; - foreach (const QDeclarativeDebugObjectReference &child, obj.children()) { + QQmlDebugObjectReference rect; + QQmlDebugObjectReference text; + foreach (const QQmlDebugObjectReference &child, obj.children()) { if (child.className() == "Rectangle") rect = child; else if (child.className() == "Text") @@ -792,12 +792,12 @@ void tst_QDeclarativeEngineDebug::queryObject() QCOMPARE(findProperty(text.properties(), "color").value(), qVariantFromValue(QColor("blue"))); } else { - foreach(const QDeclarativeDebugObjectReference &child, obj.children()) + foreach(const QQmlDebugObjectReference &child, obj.children()) QCOMPARE(child.properties().count(), 0); } } -void tst_QDeclarativeEngineDebug::queryObject_data() +void tst_QQmlEngineDebug::queryObject_data() { QTest::addColumn("recursive"); @@ -805,23 +805,23 @@ void tst_QDeclarativeEngineDebug::queryObject_data() QTest::newRow("recursive") << true; } -void tst_QDeclarativeEngineDebug::queryExpressionResult() +void tst_QQmlEngineDebug::queryExpressionResult() { QFETCH(QString, expr); QFETCH(QVariant, result); - QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); + QQmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); waitForQuery(q_engines); // check immediate deletion is ok - QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); + QQmlDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); waitForQuery(q_context); int objectId = q_context->rootContext().objects()[0].debugId(); - QDeclarativeDebugExpressionQuery *q_expr; + QQmlDebugExpressionQuery *q_expr; - QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0); + QQmlEngineDebug *unconnected = new QQmlEngineDebug(0); q_expr = unconnected->queryExpressionResult(objectId, expr, this); - QCOMPARE(q_expr->state(), QDeclarativeDebugQuery::Error); + QCOMPARE(q_expr->state(), QQmlDebugQuery::Error); delete q_expr; delete unconnected; @@ -839,14 +839,14 @@ void tst_QDeclarativeEngineDebug::queryExpressionResult() // Make query invalid by deleting client q_expr = m_dbg->queryExpressionResult(objectId, expr, this); - QCOMPARE(q_expr->state(), QDeclarativeDebugQuery::Waiting); + QCOMPARE(q_expr->state(), QQmlDebugQuery::Waiting); delete m_dbg; - QCOMPARE(q_expr->state(), QDeclarativeDebugQuery::Error); + QCOMPARE(q_expr->state(), QQmlDebugQuery::Error); delete q_expr; - m_dbg = new QDeclarativeEngineDebug(m_conn, this); + m_dbg = new QQmlEngineDebug(m_conn, this); } -void tst_QDeclarativeEngineDebug::queryExpressionResult_data() +void tst_QQmlEngineDebug::queryExpressionResult_data() { QTest::addColumn("expr"); QTest::addColumn("result"); @@ -861,9 +861,9 @@ void tst_QDeclarativeEngineDebug::queryExpressionResult_data() QTest::newRow("varObjMap") << "varObjMap" << qVariantFromValue(map); } -void tst_QDeclarativeEngineDebug::tst_QDeclarativeDebugFileReference() +void tst_QQmlEngineDebug::tst_QQmlDebugFileReference() { - QDeclarativeDebugFileReference ref; + QQmlDebugFileReference ref; QVERIFY(ref.url().isEmpty()); QCOMPARE(ref.lineNumber(), -1); QCOMPARE(ref.columnNumber(), -1); @@ -875,43 +875,43 @@ void tst_QDeclarativeEngineDebug::tst_QDeclarativeDebugFileReference() ref.setColumnNumber(1); QCOMPARE(ref.columnNumber(), 1); - QDeclarativeDebugFileReference copy(ref); - QDeclarativeDebugFileReference copyAssign; + QQmlDebugFileReference copy(ref); + QQmlDebugFileReference copyAssign; copyAssign = ref; - foreach (const QDeclarativeDebugFileReference &r, (QList() << copy << copyAssign)) { + foreach (const QQmlDebugFileReference &r, (QList() << copy << copyAssign)) { QCOMPARE(r.url(), ref.url()); QCOMPARE(r.lineNumber(), ref.lineNumber()); QCOMPARE(r.columnNumber(), ref.columnNumber()); } } -void tst_QDeclarativeEngineDebug::tst_QDeclarativeDebugEngineReference() +void tst_QQmlEngineDebug::tst_QQmlDebugEngineReference() { - QDeclarativeDebugEngineReference ref; + QQmlDebugEngineReference ref; QCOMPARE(ref.debugId(), -1); QVERIFY(ref.name().isEmpty()); - ref = QDeclarativeDebugEngineReference(1); + ref = QQmlDebugEngineReference(1); QCOMPARE(ref.debugId(), 1); QVERIFY(ref.name().isEmpty()); - QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); + QQmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); waitForQuery(q_engines); ref = q_engines->engines()[0]; delete q_engines; - QDeclarativeDebugEngineReference copy(ref); - QDeclarativeDebugEngineReference copyAssign; + QQmlDebugEngineReference copy(ref); + QQmlDebugEngineReference copyAssign; copyAssign = ref; - foreach (const QDeclarativeDebugEngineReference &r, (QList() << copy << copyAssign)) { + foreach (const QQmlDebugEngineReference &r, (QList() << copy << copyAssign)) { QCOMPARE(r.debugId(), ref.debugId()); QCOMPARE(r.name(), ref.name()); } } -void tst_QDeclarativeEngineDebug::tst_QDeclarativeDebugObjectReference() +void tst_QQmlEngineDebug::tst_QQmlDebugObjectReference() { - QDeclarativeDebugObjectReference ref; + QQmlDebugObjectReference ref; QCOMPARE(ref.debugId(), -1); QCOMPARE(ref.className(), QString()); QCOMPARE(ref.name(), QString()); @@ -919,40 +919,40 @@ void tst_QDeclarativeEngineDebug::tst_QDeclarativeDebugObjectReference() QVERIFY(ref.properties().isEmpty()); QVERIFY(ref.children().isEmpty()); - QDeclarativeDebugFileReference source = ref.source(); + QQmlDebugFileReference source = ref.source(); QVERIFY(source.url().isEmpty()); QVERIFY(source.lineNumber() < 0); QVERIFY(source.columnNumber() < 0); - ref = QDeclarativeDebugObjectReference(1); + ref = QQmlDebugObjectReference(1); QCOMPARE(ref.debugId(), 1); - QDeclarativeDebugObjectReference rootObject = findRootObject(); - QDeclarativeDebugObjectQuery *query = m_dbg->queryObjectRecursive(rootObject, this); + QQmlDebugObjectReference rootObject = findRootObject(); + QQmlDebugObjectQuery *query = m_dbg->queryObjectRecursive(rootObject, this); waitForQuery(query); ref = query->object(); delete query; QVERIFY(ref.debugId() >= 0); - QDeclarativeDebugObjectReference copy(ref); - QDeclarativeDebugObjectReference copyAssign; + QQmlDebugObjectReference copy(ref); + QQmlDebugObjectReference copyAssign; copyAssign = ref; - foreach (const QDeclarativeDebugObjectReference &r, (QList() << copy << copyAssign)) + foreach (const QQmlDebugObjectReference &r, (QList() << copy << copyAssign)) recursiveCompareObjects(r, ref); } -void tst_QDeclarativeEngineDebug::tst_QDeclarativeDebugContextReference() +void tst_QQmlEngineDebug::tst_QQmlDebugContextReference() { - QDeclarativeDebugContextReference ref; + QQmlDebugContextReference ref; QCOMPARE(ref.debugId(), -1); QVERIFY(ref.name().isEmpty()); QVERIFY(ref.objects().isEmpty()); QVERIFY(ref.contexts().isEmpty()); - QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); + QQmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); waitForQuery(q_engines); - QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); + QQmlDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); waitForQuery(q_context); ref = q_context->rootContext(); @@ -960,22 +960,22 @@ void tst_QDeclarativeEngineDebug::tst_QDeclarativeDebugContextReference() delete q_context; QVERIFY(ref.debugId() >= 0); - QDeclarativeDebugContextReference copy(ref); - QDeclarativeDebugContextReference copyAssign; + QQmlDebugContextReference copy(ref); + QQmlDebugContextReference copyAssign; copyAssign = ref; - foreach (const QDeclarativeDebugContextReference &r, (QList() << copy << copyAssign)) + foreach (const QQmlDebugContextReference &r, (QList() << copy << copyAssign)) recursiveCompareContexts(r, ref); } -void tst_QDeclarativeEngineDebug::tst_QDeclarativeDebugPropertyReference() +void tst_QQmlEngineDebug::tst_QQmlDebugPropertyReference() { - QDeclarativeDebugObjectReference rootObject = findRootObject(); - QDeclarativeDebugObjectQuery *query = m_dbg->queryObject(rootObject, this); + QQmlDebugObjectReference rootObject = findRootObject(); + QQmlDebugObjectQuery *query = m_dbg->queryObject(rootObject, this); waitForQuery(query); - QDeclarativeDebugObjectReference obj = query->object(); + QQmlDebugObjectReference obj = query->object(); delete query; - QDeclarativeDebugPropertyReference ref = findProperty(obj.properties(), "scale"); + QQmlDebugPropertyReference ref = findProperty(obj.properties(), "scale"); QVERIFY(ref.objectDebugId() > 0); QVERIFY(!ref.name().isEmpty()); QVERIFY(!ref.value().isNull()); @@ -983,18 +983,18 @@ void tst_QDeclarativeEngineDebug::tst_QDeclarativeDebugPropertyReference() QVERIFY(!ref.binding().isEmpty()); QVERIFY(ref.hasNotifySignal()); - QDeclarativeDebugPropertyReference copy(ref); - QDeclarativeDebugPropertyReference copyAssign; + QQmlDebugPropertyReference copy(ref); + QQmlDebugPropertyReference copyAssign; copyAssign = ref; - foreach (const QDeclarativeDebugPropertyReference &r, (QList() << copy << copyAssign)) + foreach (const QQmlDebugPropertyReference &r, (QList() << copy << copyAssign)) compareProperties(r, ref); } -void tst_QDeclarativeEngineDebug::setBindingForObject() +void tst_QQmlEngineDebug::setBindingForObject() { - QDeclarativeDebugObjectReference rootObject = findRootObject(); + QQmlDebugObjectReference rootObject = findRootObject(); QVERIFY(rootObject.debugId() != -1); - QDeclarativeDebugPropertyReference widthPropertyRef = findProperty(rootObject.properties(), "width"); + QQmlDebugPropertyReference widthPropertyRef = findProperty(rootObject.properties(), "width"); QCOMPARE(widthPropertyRef.value(), QVariant(10)); QCOMPARE(widthPropertyRef.binding(), QString()); @@ -1037,14 +1037,14 @@ void tst_QDeclarativeEngineDebug::setBindingForObject() // rootObject = findRootObject(); QCOMPARE(rootObject.children().size(), 5); // Rectangle, Text, MouseArea, Component.onCompleted, NonScriptPropertyElement - QDeclarativeDebugObjectReference mouseAreaObject = rootObject.children().at(2); - QDeclarativeDebugObjectQuery *q_obj = m_dbg->queryObjectRecursive(mouseAreaObject, this); + QQmlDebugObjectReference mouseAreaObject = rootObject.children().at(2); + QQmlDebugObjectQuery *q_obj = m_dbg->queryObjectRecursive(mouseAreaObject, this); waitForQuery(q_obj); mouseAreaObject = q_obj->object(); QCOMPARE(mouseAreaObject.className(), QString("MouseArea")); - QDeclarativeDebugPropertyReference onEnteredRef = findProperty(mouseAreaObject.properties(), "onEntered"); + QQmlDebugPropertyReference onEnteredRef = findProperty(mouseAreaObject.properties(), "onEntered"); QCOMPARE(onEnteredRef.name(), QString("onEntered")); QCOMPARE(onEnteredRef.value(), QVariant("(function onEntered() { { console.log('hello') } })")); @@ -1061,25 +1061,25 @@ void tst_QDeclarativeEngineDebug::setBindingForObject() QCOMPARE(onEnteredRef.value(), QVariant("{console.log('hello, world') }")); } -void tst_QDeclarativeEngineDebug::setBindingInStates() +void tst_QQmlEngineDebug::setBindingInStates() { // Check if changing bindings of propertychanges works const int sourceIndex = 3; - QDeclarativeDebugObjectReference obj = findRootObject(sourceIndex); + QQmlDebugObjectReference obj = findRootObject(sourceIndex); QVERIFY(obj.debugId() != -1); QVERIFY(obj.children().count() >= 2); // We are going to switch state a couple of times, we need to get rid of the transition before - QDeclarativeDebugExpressionQuery *q_deleteTransition = m_dbg->queryExpressionResult(obj.debugId(),QString("transitions = []"),this); + QQmlDebugExpressionQuery *q_deleteTransition = m_dbg->queryExpressionResult(obj.debugId(),QString("transitions = []"),this); waitForQuery(q_deleteTransition); delete q_deleteTransition; // check initial value of the property that is changing - QDeclarativeDebugExpressionQuery *q_setState; + QQmlDebugExpressionQuery *q_setState; q_setState = m_dbg->queryExpressionResult(obj.debugId(),QString("state=\"state1\""),this); waitForQuery(q_setState); delete q_setState; @@ -1098,11 +1098,11 @@ void tst_QDeclarativeEngineDebug::setBindingInStates() // change the binding - QDeclarativeDebugObjectReference state = obj.children()[1]; + QQmlDebugObjectReference state = obj.children()[1]; QCOMPARE(state.className(), QString("State")); QVERIFY(state.children().count() > 0); - QDeclarativeDebugObjectReference propertyChange = state.children()[0]; + QQmlDebugObjectReference propertyChange = state.children()[0]; QVERIFY(propertyChange.debugId() != -1); QVERIFY( m_dbg->setBindingForObject(propertyChange.debugId(), "width",QVariant(300),true) ); @@ -1153,24 +1153,24 @@ void tst_QDeclarativeEngineDebug::setBindingInStates() QCOMPARE(findProperty(obj.properties(),"width").value().toInt(), 300); } -void tst_QDeclarativeEngineDebug::queryObjectTree() +void tst_QQmlEngineDebug::queryObjectTree() { const int sourceIndex = 3; // Check if states/transitions are initialized when fetching root item - QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); + QQmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); waitForQuery(q_engines); - QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); + QQmlDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); waitForQuery(q_context); QVERIFY(q_context->rootContext().objects().count() > sourceIndex); - QDeclarativeDebugObjectReference rootObject = q_context->rootContext().objects()[sourceIndex]; + QQmlDebugObjectReference rootObject = q_context->rootContext().objects()[sourceIndex]; - QDeclarativeDebugObjectQuery *q_obj = m_dbg->queryObjectRecursive(rootObject, this); + QQmlDebugObjectQuery *q_obj = m_dbg->queryObjectRecursive(rootObject, this); waitForQuery(q_obj); - QDeclarativeDebugObjectReference obj = q_obj->object(); + QQmlDebugObjectReference obj = q_obj->object(); delete q_engines; delete q_context; @@ -1182,35 +1182,35 @@ void tst_QDeclarativeEngineDebug::queryObjectTree() // check state - QDeclarativeDebugObjectReference state = obj.children()[1]; + QQmlDebugObjectReference state = obj.children()[1]; QCOMPARE(state.className(), QString("State")); QVERIFY(state.children().count() > 0); - QDeclarativeDebugObjectReference propertyChange = state.children()[0]; + QQmlDebugObjectReference propertyChange = state.children()[0]; QVERIFY(propertyChange.debugId() != -1); - QDeclarativeDebugPropertyReference propertyChangeTarget = findProperty(propertyChange.properties(),"target"); + QQmlDebugPropertyReference propertyChangeTarget = findProperty(propertyChange.properties(),"target"); QCOMPARE(propertyChangeTarget.objectDebugId(), propertyChange.debugId()); - QDeclarativeDebugObjectReference targetReference = qvariant_cast(propertyChangeTarget.value()); + QQmlDebugObjectReference targetReference = qvariant_cast(propertyChangeTarget.value()); QVERIFY(targetReference.debugId() != -1); // check transition - QDeclarativeDebugObjectReference transition = obj.children()[0]; + QQmlDebugObjectReference transition = obj.children()[0]; QCOMPARE(transition.className(), QString("Transition")); QCOMPARE(findProperty(transition.properties(),"from").value().toString(), QString("*")); QCOMPARE(findProperty(transition.properties(),"to").value(), findProperty(state.properties(),"name").value()); QVERIFY(transition.children().count() > 0); - QDeclarativeDebugObjectReference animation = transition.children()[0]; + QQmlDebugObjectReference animation = transition.children()[0]; QVERIFY(animation.debugId() != -1); - QDeclarativeDebugPropertyReference animationTarget = findProperty(animation.properties(),"target"); + QQmlDebugPropertyReference animationTarget = findProperty(animation.properties(),"target"); QCOMPARE(animationTarget.objectDebugId(), animation.debugId()); - targetReference = qvariant_cast(animationTarget.value()); + targetReference = qvariant_cast(animationTarget.value()); QVERIFY(targetReference.debugId() != -1); QCOMPARE(findProperty(animation.properties(),"property").value().toString(), QString("width")); @@ -1227,9 +1227,9 @@ int main(int argc, char *argv[]) _argv[_argc - 1] = arg; QGuiApplication app(_argc, _argv); - tst_QDeclarativeEngineDebug tc; + tst_QQmlEngineDebug tc; return QTest::qExec(&tc, _argc, _argv); delete _argv; } -#include "tst_qdeclarativeenginedebug.moc" +#include "tst_qqmlenginedebug.moc" diff --git a/tests/auto/declarative/debugger/qdeclarativeinspector/app/app.pro b/tests/auto/qml/debugger/qqmlinspector/app/app.pro similarity index 80% rename from tests/auto/declarative/debugger/qdeclarativeinspector/app/app.pro rename to tests/auto/qml/debugger/qqmlinspector/app/app.pro index 6433631c4b..f6ef983735 100644 --- a/tests/auto/declarative/debugger/qdeclarativeinspector/app/app.pro +++ b/tests/auto/qml/debugger/qqmlinspector/app/app.pro @@ -1,5 +1,5 @@ TARGET = app -QT += declarative quick widgets +QT += qml quick widgets CONFIG += declarative_debug macx:CONFIG -= app_bundle diff --git a/tests/auto/declarative/debugger/qdeclarativeinspector/app/main.cpp b/tests/auto/qml/debugger/qqmlinspector/app/main.cpp similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativeinspector/app/main.cpp rename to tests/auto/qml/debugger/qqmlinspector/app/main.cpp diff --git a/tests/auto/declarative/debugger/qdeclarativeinspector/app/qtquick2.qml b/tests/auto/qml/debugger/qqmlinspector/app/qtquick2.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativeinspector/app/qtquick2.qml rename to tests/auto/qml/debugger/qqmlinspector/app/qtquick2.qml diff --git a/tests/auto/qml/debugger/qqmlinspector/qqmlinspector.pro b/tests/auto/qml/debugger/qqmlinspector/qqmlinspector.pro new file mode 100644 index 0000000000..5544f76581 --- /dev/null +++ b/tests/auto/qml/debugger/qqmlinspector/qqmlinspector.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs + +SUBDIRS += tst_qqmlinspector.pro app diff --git a/tests/auto/declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.cpp b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp similarity index 70% rename from tests/auto/declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.cpp rename to tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp index 4d7e57f4d4..4f74a036d6 100644 --- a/tests/auto/declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.cpp +++ b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp @@ -45,7 +45,7 @@ #include #include -#include "../../../../../src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h" +#include "../../../../../src/plugins/qmltooling/shared/qqmlinspectorprotocol.h" #include "../shared/debugutil_p.h" using namespace QmlJSDebugger; @@ -53,13 +53,13 @@ using namespace QmlJSDebugger; #define PORT 13772 #define STR_PORT "13772" -class QDeclarativeInspectorClient : public QDeclarativeDebugClient +class QQmlInspectorClient : public QQmlDebugClient { Q_OBJECT public: - QDeclarativeInspectorClient(QDeclarativeDebugConnection *connection) - : QDeclarativeDebugClient(QLatin1String("QDeclarativeObserverMode"), connection) + QQmlInspectorClient(QQmlDebugConnection *connection) + : QQmlDebugClient(QLatin1String("QQmlObserverMode"), connection) , m_showAppOnTop(false) { } @@ -77,12 +77,12 @@ class QDeclarativeInspectorClient : public QDeclarativeDebugClient bool m_showAppOnTop; }; -class tst_QDeclarativeInspector : public QObject +class tst_QQmlInspector : public QObject { Q_OBJECT public: - tst_QDeclarativeInspector() + tst_QQmlInspector() : m_process(0) , m_connection(0) , m_client(0) @@ -91,9 +91,9 @@ class tst_QDeclarativeInspector : public QObject private: - QDeclarativeDebugProcess *m_process; - QDeclarativeDebugConnection *m_connection; - QDeclarativeInspectorClient *m_client; + QQmlDebugProcess *m_process; + QQmlDebugConnection *m_connection; + QQmlInspectorClient *m_client; private slots: void initTestCase(); @@ -106,7 +106,7 @@ private slots: }; -void QDeclarativeInspectorClient::setShowAppOnTop(bool showOnTop) +void QQmlInspectorClient::setShowAppOnTop(bool showOnTop) { QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); @@ -115,7 +115,7 @@ void QDeclarativeInspectorClient::setShowAppOnTop(bool showOnTop) sendMessage(message); } -void QDeclarativeInspectorClient::messageReceived(const QByteArray &message) +void QQmlInspectorClient::messageReceived(const QByteArray &message) { QDataStream ds(message); InspectorProtocol::Message type; @@ -131,56 +131,56 @@ void QDeclarativeInspectorClient::messageReceived(const QByteArray &message) } } -void tst_QDeclarativeInspector::initTestCase() +void tst_QQmlInspector::initTestCase() { } -void tst_QDeclarativeInspector::cleanupTestCase() +void tst_QQmlInspector::cleanupTestCase() { } -void tst_QDeclarativeInspector::init() +void tst_QQmlInspector::init() { const QString executable = SRCDIR"/app/app"; const QString argument = "-qmljsdebugger=port:"STR_PORT",block"; - m_process = new QDeclarativeDebugProcess(executable); + m_process = new QQmlDebugProcess(executable); m_process->start(QStringList() << argument); if (!m_process->waitForSessionStart()) { QFAIL(QString("Could not launch app '%1'.\nApplication output:\n%2").arg(executable, m_process->output()).toAscii()); } - QDeclarativeDebugConnection *m_connection = new QDeclarativeDebugConnection(); - m_client = new QDeclarativeInspectorClient(m_connection); + QQmlDebugConnection *m_connection = new QQmlDebugConnection(); + m_client = new QQmlInspectorClient(m_connection); m_connection->connectToHost(QLatin1String("127.0.0.1"), PORT); } -void tst_QDeclarativeInspector::cleanup() +void tst_QQmlInspector::cleanup() { delete m_process; delete m_connection; delete m_client; } -void tst_QDeclarativeInspector::connect() +void tst_QQmlInspector::connect() { - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); } -void tst_QDeclarativeInspector::showAppOnTop() +void tst_QQmlInspector::showAppOnTop() { - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); m_client->setShowAppOnTop(true); - QVERIFY(QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(showAppOnTopChanged()))); + QVERIFY(QQmlDebugTest::waitForSignal(m_client, SIGNAL(showAppOnTopChanged()))); QCOMPARE(m_client->showAppOnTop(), true); m_client->setShowAppOnTop(false); - QVERIFY(QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(showAppOnTopChanged()))); + QVERIFY(QQmlDebugTest::waitForSignal(m_client, SIGNAL(showAppOnTopChanged()))); QCOMPARE(m_client->showAppOnTop(), false); } -QTEST_MAIN(tst_QDeclarativeInspector) +QTEST_MAIN(tst_QQmlInspector) -#include "tst_qdeclarativeinspector.moc" +#include "tst_qqmlinspector.moc" diff --git a/tests/auto/declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.pro b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.pro similarity index 63% rename from tests/auto/declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.pro rename to tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.pro index 6ea6010a32..010e97cef7 100644 --- a/tests/auto/declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.pro +++ b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.pro @@ -1,12 +1,12 @@ CONFIG += testcase -TARGET = tst_qdeclarativeinspector +TARGET = tst_qqmlinspector macx:CONFIG -= app_bundle HEADERS += ../shared/debugutil_p.h -SOURCES += tst_qdeclarativeinspector.cpp \ +SOURCES += tst_qqmlinspector.cpp \ ../shared/debugutil.cpp DEFINES += SRCDIR=\\\"$$PWD\\\" CONFIG += parallel_test declarative_debug -QT += declarative-private testlib +QT += qml-private testlib diff --git a/tests/auto/declarative/debugger/qdeclarativeprofilerservice/data/exit.qml b/tests/auto/qml/debugger/qqmlprofilerservice/data/exit.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativeprofilerservice/data/exit.qml rename to tests/auto/qml/debugger/qqmlprofilerservice/data/exit.qml diff --git a/tests/auto/declarative/debugger/qdeclarativeprofilerservice/data/test.qml b/tests/auto/qml/debugger/qqmlprofilerservice/data/test.qml similarity index 100% rename from tests/auto/declarative/debugger/qdeclarativeprofilerservice/data/test.qml rename to tests/auto/qml/debugger/qqmlprofilerservice/data/test.qml diff --git a/tests/auto/declarative/debugger/qdeclarativeprofilerservice/qdeclarativeprofilerservice.pro b/tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro similarity index 64% rename from tests/auto/declarative/debugger/qdeclarativeprofilerservice/qdeclarativeprofilerservice.pro rename to tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro index 564945faf7..0d11213cb4 100644 --- a/tests/auto/declarative/debugger/qdeclarativeprofilerservice/qdeclarativeprofilerservice.pro +++ b/tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro @@ -1,10 +1,10 @@ CONFIG += testcase -TARGET = tst_qdeclarativeprofilerservice +TARGET = tst_qqmlprofilerservice macx:CONFIG -= app_bundle HEADERS += ../shared/debugutil_p.h -SOURCES += tst_qdeclarativeprofilerservice.cpp \ +SOURCES += tst_qqmlprofilerservice.cpp \ ../shared/debugutil.cpp OTHER_FILES += data/test.qml @@ -12,4 +12,4 @@ include (../../../shared/util.pri) CONFIG += parallel_test declarative_debug -QT += declarative-private testlib +QT += qml-private testlib diff --git a/tests/auto/declarative/debugger/qdeclarativeprofilerservice/tst_qdeclarativeprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp similarity index 59% rename from tests/auto/declarative/debugger/qdeclarativeprofilerservice/tst_qdeclarativeprofilerservice.cpp rename to tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp index 5de7b8621d..edc120ba85 100644 --- a/tests/auto/declarative/debugger/qdeclarativeprofilerservice/tst_qdeclarativeprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -42,24 +42,24 @@ #include #include -#include "QtDeclarative/private/qdeclarativeprofilerservice_p.h" +#include "QtQml/private/qqmlprofilerservice_p.h" #include "../shared/debugutil_p.h" #include "../../../shared/util.h" #define PORT 13773 #define STR_PORT "13773" -class QDeclarativeProfilerClient : public QDeclarativeDebugClient +class QQmlProfilerClient : public QQmlDebugClient { Q_OBJECT public: - QDeclarativeProfilerClient(QDeclarativeDebugConnection *connection) - : QDeclarativeDebugClient(QLatin1String("CanvasFrameRate"), connection) + QQmlProfilerClient(QQmlDebugConnection *connection) + : QQmlDebugClient(QLatin1String("CanvasFrameRate"), connection) { } - QList traceMessages; + QList traceMessages; void setTraceState(bool enabled) { QByteArray message; @@ -75,12 +75,12 @@ class QDeclarativeProfilerClient : public QDeclarativeDebugClient void messageReceived(const QByteArray &message); }; -class tst_QDeclarativeProfilerService : public QDeclarativeDataTest +class tst_QQmlProfilerService : public QQmlDataTest { Q_OBJECT public: - tst_QDeclarativeProfilerService() + tst_QQmlProfilerService() : m_process(0) , m_connection(0) , m_client(0) @@ -88,9 +88,9 @@ class tst_QDeclarativeProfilerService : public QDeclarativeDataTest } private: - QDeclarativeDebugProcess *m_process; - QDeclarativeDebugConnection *m_connection; - QDeclarativeProfilerClient *m_client; + QQmlDebugProcess *m_process; + QQmlDebugConnection *m_connection; + QQmlProfilerClient *m_client; void connect(bool block, const QString &testFile); @@ -103,13 +103,13 @@ private slots: void profileOnExit(); }; -void QDeclarativeProfilerClient::messageReceived(const QByteArray &message) +void QQmlProfilerClient::messageReceived(const QByteArray &message) { QByteArray msg = message; QDataStream stream(&msg, QIODevice::ReadOnly); - QDeclarativeProfilerData data; + QQmlProfilerData data; data.time = -2; data.messageType = -1; data.detailType = -1; @@ -122,21 +122,21 @@ void QDeclarativeProfilerClient::messageReceived(const QByteArray &message) QVERIFY(data.time >= -1); switch (data.messageType) { - case (QDeclarativeProfilerService::Event): { + case (QQmlProfilerService::Event): { stream >> data.detailType; switch (data.detailType) { - case QDeclarativeProfilerService::AnimationFrame: { + case QQmlProfilerService::AnimationFrame: { stream >> data.framerate >> data.animationcount; QVERIFY(data.framerate != -1); QVERIFY(data.animationcount != -1); break; } - case QDeclarativeProfilerService::FramePaint: - case QDeclarativeProfilerService::Mouse: - case QDeclarativeProfilerService::Key: - case QDeclarativeProfilerService::StartTrace: - case QDeclarativeProfilerService::EndTrace: + case QQmlProfilerService::FramePaint: + case QQmlProfilerService::Mouse: + case QQmlProfilerService::Key: + case QQmlProfilerService::StartTrace: + case QQmlProfilerService::EndTrace: break; default: { QString failMsg = QString("Unknown event type:") + data.detailType; @@ -146,28 +146,28 @@ void QDeclarativeProfilerClient::messageReceived(const QByteArray &message) } break; } - case QDeclarativeProfilerService::Complete: { + case QQmlProfilerService::Complete: { emit complete(); return; } - case QDeclarativeProfilerService::RangeStart: { + case QQmlProfilerService::RangeStart: { stream >> data.detailType; - QVERIFY(data.detailType >= 0 && data.detailType < QDeclarativeProfilerService::MaximumRangeType); + QVERIFY(data.detailType >= 0 && data.detailType < QQmlProfilerService::MaximumRangeType); break; } - case QDeclarativeProfilerService::RangeEnd: { + case QQmlProfilerService::RangeEnd: { stream >> data.detailType; - QVERIFY(data.detailType >= 0 && data.detailType < QDeclarativeProfilerService::MaximumRangeType); + QVERIFY(data.detailType >= 0 && data.detailType < QQmlProfilerService::MaximumRangeType); break; } - case QDeclarativeProfilerService::RangeData: { + case QQmlProfilerService::RangeData: { stream >> data.detailType >> data.detailData; - QVERIFY(data.detailType >= 0 && data.detailType < QDeclarativeProfilerService::MaximumRangeType); + QVERIFY(data.detailType >= 0 && data.detailType < QQmlProfilerService::MaximumRangeType); break; } - case QDeclarativeProfilerService::RangeLocation: { + case QQmlProfilerService::RangeLocation: { stream >> data.detailType >> data.detailData >> data.line >> data.column; - QVERIFY(data.detailType >= 0 && data.detailType < QDeclarativeProfilerService::MaximumRangeType); + QVERIFY(data.detailType >= 0 && data.detailType < QQmlProfilerService::MaximumRangeType); QVERIFY(data.line >= -2); break; } @@ -180,7 +180,7 @@ void QDeclarativeProfilerClient::messageReceived(const QByteArray &message) traceMessages.append(data); } -void tst_QDeclarativeProfilerService::connect(bool block, const QString &testFile) +void tst_QQmlProfilerService::connect(bool block, const QString &testFile) { const QString executable = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene"; QStringList arguments; @@ -190,9 +190,9 @@ void tst_QDeclarativeProfilerService::connect(bool block, const QString &testFil else arguments << QString("-qmljsdebugger=port:"STR_PORT); - arguments << QDeclarativeDataTest::instance()->testFile(testFile); + arguments << QQmlDataTest::instance()->testFile(testFile); - m_process = new QDeclarativeDebugProcess(executable); + m_process = new QQmlDebugProcess(executable); m_process->start(QStringList() << arguments); if (!m_process->waitForSessionStart()) { QString failMsg = QString("Could not launch app '%1'.\nApplication output:\n%2").arg( @@ -200,27 +200,27 @@ void tst_QDeclarativeProfilerService::connect(bool block, const QString &testFil QFAIL(qPrintable(failMsg)); } - QDeclarativeDebugConnection *m_connection = new QDeclarativeDebugConnection(); - m_client = new QDeclarativeProfilerClient(m_connection); + QQmlDebugConnection *m_connection = new QQmlDebugConnection(); + m_client = new QQmlProfilerClient(m_connection); m_connection->connectToHost(QLatin1String("127.0.0.1"), PORT); } -void tst_QDeclarativeProfilerService::cleanup() +void tst_QQmlProfilerService::cleanup() { delete m_process; delete m_connection; delete m_client; } -void tst_QDeclarativeProfilerService::blockingConnectWithTraceEnabled() +void tst_QQmlProfilerService::blockingConnectWithTraceEnabled() { connect(true, "test.qml"); - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); m_client->setTraceState(true); m_client->setTraceState(false); - if (!QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete()))) { + if (!QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete()))) { QString failMsg = QString("No trace received in time. App output: \n%1\n").arg(m_process->output()); QFAIL(qPrintable(failMsg)); @@ -228,23 +228,23 @@ void tst_QDeclarativeProfilerService::blockingConnectWithTraceEnabled() QVERIFY(m_client->traceMessages.count()); // must start with "StartTrace" - QCOMPARE(m_client->traceMessages.first().messageType, (int)QDeclarativeProfilerService::Event); - QCOMPARE(m_client->traceMessages.first().detailType, (int)QDeclarativeProfilerService::StartTrace); + QCOMPARE(m_client->traceMessages.first().messageType, (int)QQmlProfilerService::Event); + QCOMPARE(m_client->traceMessages.first().detailType, (int)QQmlProfilerService::StartTrace); // must end with "EndTrace" - QCOMPARE(m_client->traceMessages.last().messageType, (int)QDeclarativeProfilerService::Event); - QCOMPARE(m_client->traceMessages.last().detailType, (int)QDeclarativeProfilerService::EndTrace); + QCOMPARE(m_client->traceMessages.last().messageType, (int)QQmlProfilerService::Event); + QCOMPARE(m_client->traceMessages.last().detailType, (int)QQmlProfilerService::EndTrace); } -void tst_QDeclarativeProfilerService::blockingConnectWithTraceDisabled() +void tst_QQmlProfilerService::blockingConnectWithTraceDisabled() { connect(true, "test.qml"); - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); m_client->setTraceState(false); m_client->setTraceState(true); m_client->setTraceState(false); - if (!QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete()))) { + if (!QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete()))) { QString failMsg = QString("No trace received in time. App output: \n%1\n").arg(m_process->output()); QFAIL(qPrintable(failMsg)); @@ -253,58 +253,58 @@ void tst_QDeclarativeProfilerService::blockingConnectWithTraceDisabled() QVERIFY(m_client->traceMessages.count()); // must start with "StartTrace" - QCOMPARE(m_client->traceMessages.first().messageType, (int)QDeclarativeProfilerService::Event); - QCOMPARE(m_client->traceMessages.first().detailType, (int)QDeclarativeProfilerService::StartTrace); + QCOMPARE(m_client->traceMessages.first().messageType, (int)QQmlProfilerService::Event); + QCOMPARE(m_client->traceMessages.first().detailType, (int)QQmlProfilerService::StartTrace); // must end with "EndTrace" - QCOMPARE(m_client->traceMessages.last().messageType, (int)QDeclarativeProfilerService::Event); - QCOMPARE(m_client->traceMessages.last().detailType, (int)QDeclarativeProfilerService::EndTrace); + QCOMPARE(m_client->traceMessages.last().messageType, (int)QQmlProfilerService::Event); + QCOMPARE(m_client->traceMessages.last().detailType, (int)QQmlProfilerService::EndTrace); } -void tst_QDeclarativeProfilerService::nonBlockingConnect() +void tst_QQmlProfilerService::nonBlockingConnect() { connect(false, "test.qml"); - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); m_client->setTraceState(true); m_client->setTraceState(false); - if (!QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete()))) { + if (!QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete()))) { QString failMsg = QString("No trace received in time. App output: \n%1\n").arg(m_process->output()); QFAIL(qPrintable(failMsg)); } // must start with "StartTrace" - QCOMPARE(m_client->traceMessages.first().messageType, (int)QDeclarativeProfilerService::Event); - QCOMPARE(m_client->traceMessages.first().detailType, (int)QDeclarativeProfilerService::StartTrace); + QCOMPARE(m_client->traceMessages.first().messageType, (int)QQmlProfilerService::Event); + QCOMPARE(m_client->traceMessages.first().detailType, (int)QQmlProfilerService::StartTrace); // must end with "EndTrace" - QCOMPARE(m_client->traceMessages.last().messageType, (int)QDeclarativeProfilerService::Event); - QCOMPARE(m_client->traceMessages.last().detailType, (int)QDeclarativeProfilerService::EndTrace); + QCOMPARE(m_client->traceMessages.last().messageType, (int)QQmlProfilerService::Event); + QCOMPARE(m_client->traceMessages.last().detailType, (int)QQmlProfilerService::EndTrace); } -void tst_QDeclarativeProfilerService::profileOnExit() +void tst_QQmlProfilerService::profileOnExit() { connect(true, "exit.qml"); - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); m_client->setTraceState(true); - if (!QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete()))) { + if (!QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete()))) { QString failMsg = QString("No trace received in time. App output: \n%1\n").arg(m_process->output()); QFAIL(qPrintable(failMsg)); } // must start with "StartTrace" - QCOMPARE(m_client->traceMessages.first().messageType, (int)QDeclarativeProfilerService::Event); - QCOMPARE(m_client->traceMessages.first().detailType, (int)QDeclarativeProfilerService::StartTrace); + QCOMPARE(m_client->traceMessages.first().messageType, (int)QQmlProfilerService::Event); + QCOMPARE(m_client->traceMessages.first().detailType, (int)QQmlProfilerService::StartTrace); // must end with "EndTrace" - QCOMPARE(m_client->traceMessages.last().messageType, (int)QDeclarativeProfilerService::Event); - QCOMPARE(m_client->traceMessages.last().detailType, (int)QDeclarativeProfilerService::EndTrace); + QCOMPARE(m_client->traceMessages.last().messageType, (int)QQmlProfilerService::Event); + QCOMPARE(m_client->traceMessages.last().detailType, (int)QQmlProfilerService::EndTrace); } -QTEST_MAIN(tst_QDeclarativeProfilerService) +QTEST_MAIN(tst_QQmlProfilerService) -#include "tst_qdeclarativeprofilerservice.moc" +#include "tst_qqmlprofilerservice.moc" diff --git a/tests/auto/declarative/debugger/qv8profilerservice/data/console.qml b/tests/auto/qml/debugger/qv8profilerservice/data/console.qml similarity index 100% rename from tests/auto/declarative/debugger/qv8profilerservice/data/console.qml rename to tests/auto/qml/debugger/qv8profilerservice/data/console.qml diff --git a/tests/auto/declarative/debugger/qv8profilerservice/data/exit.qml b/tests/auto/qml/debugger/qv8profilerservice/data/exit.qml similarity index 100% rename from tests/auto/declarative/debugger/qv8profilerservice/data/exit.qml rename to tests/auto/qml/debugger/qv8profilerservice/data/exit.qml diff --git a/tests/auto/declarative/debugger/qv8profilerservice/data/test.qml b/tests/auto/qml/debugger/qv8profilerservice/data/test.qml similarity index 100% rename from tests/auto/declarative/debugger/qv8profilerservice/data/test.qml rename to tests/auto/qml/debugger/qv8profilerservice/data/test.qml diff --git a/tests/auto/declarative/debugger/qv8profilerservice/qv8profilerservice.pro b/tests/auto/qml/debugger/qv8profilerservice/qv8profilerservice.pro similarity index 89% rename from tests/auto/declarative/debugger/qv8profilerservice/qv8profilerservice.pro rename to tests/auto/qml/debugger/qv8profilerservice/qv8profilerservice.pro index eb57dff2fe..e980d6594d 100644 --- a/tests/auto/declarative/debugger/qv8profilerservice/qv8profilerservice.pro +++ b/tests/auto/qml/debugger/qv8profilerservice/qv8profilerservice.pro @@ -13,4 +13,4 @@ OTHER_FILES += data/test.qml CONFIG += parallel_test declarative_debug -QT += declarative-private testlib +QT += qml-private testlib diff --git a/tests/auto/declarative/debugger/qv8profilerservice/tst_qv8profilerservice.cpp b/tests/auto/qml/debugger/qv8profilerservice/tst_qv8profilerservice.cpp similarity index 81% rename from tests/auto/declarative/debugger/qv8profilerservice/tst_qv8profilerservice.cpp rename to tests/auto/qml/debugger/qv8profilerservice/tst_qv8profilerservice.cpp index 92b893afc6..a2cac08a21 100644 --- a/tests/auto/declarative/debugger/qv8profilerservice/tst_qv8profilerservice.cpp +++ b/tests/auto/qml/debugger/qv8profilerservice/tst_qv8profilerservice.cpp @@ -42,20 +42,20 @@ #include #include -#include "QtDeclarative/private/qv8profilerservice_p.h" +#include "QtQml/private/qv8profilerservice_p.h" #include "../shared/debugutil_p.h" #include "../../../shared/util.h" #define PORT 13774 #define STR_PORT "13774" -class QV8ProfilerClient : public QDeclarativeDebugClient +class QV8ProfilerClient : public QQmlDebugClient { Q_OBJECT public: - QV8ProfilerClient(QDeclarativeDebugConnection *connection) - : QDeclarativeDebugClient(QLatin1String("V8Profiler"), connection) + QV8ProfilerClient(QQmlDebugConnection *connection) + : QQmlDebugClient(QLatin1String("V8Profiler"), connection) { } @@ -98,7 +98,7 @@ class QV8ProfilerClient : public QDeclarativeDebugClient void messageReceived(const QByteArray &message); }; -class tst_QV8ProfilerService : public QDeclarativeDataTest +class tst_QV8ProfilerService : public QQmlDataTest { Q_OBJECT @@ -111,8 +111,8 @@ class tst_QV8ProfilerService : public QDeclarativeDataTest } private: - QDeclarativeDebugProcess *m_process; - QDeclarativeDebugConnection *m_connection; + QQmlDebugProcess *m_process; + QQmlDebugConnection *m_connection; QV8ProfilerClient *m_client; void connect(bool block, const QString &testFile); @@ -176,9 +176,9 @@ void tst_QV8ProfilerService::connect(bool block, const QString &testFile) else arguments << QString("-qmljsdebugger=port:"STR_PORT); - arguments << QDeclarativeDataTest::instance()->testFile(testFile); + arguments << QQmlDataTest::instance()->testFile(testFile); - m_process = new QDeclarativeDebugProcess(executable); + m_process = new QQmlDebugProcess(executable); m_process->start(QStringList() << arguments); if (!m_process->waitForSessionStart()) { QString failMsg = QString("Could not launch app '%1'.\nApplication output:\n%2").arg( @@ -186,7 +186,7 @@ void tst_QV8ProfilerService::connect(bool block, const QString &testFile) QFAIL(qPrintable(failMsg)); } - QDeclarativeDebugConnection *m_connection = new QDeclarativeDebugConnection(); + QQmlDebugConnection *m_connection = new QQmlDebugConnection(); m_client = new QV8ProfilerClient(m_connection); m_connection->connectToHost(QLatin1String("127.0.0.1"), PORT); @@ -205,60 +205,60 @@ void tst_QV8ProfilerService::cleanup() void tst_QV8ProfilerService::blockingConnectWithTraceEnabled() { connect(true, "test.qml"); - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); m_client->startProfiling(""); m_client->stopProfiling(""); - QVERIFY2(QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete())), + QVERIFY2(QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete())), "No trace received in time."); } void tst_QV8ProfilerService::blockingConnectWithTraceDisabled() { connect(true, "test.qml"); - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); m_client->stopProfiling(""); - if (QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete()), 1000)) { + if (QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete()), 1000)) { QString failMsg = QString("Unexpected trace received! App output: %1\n\n").arg(m_process->output()); QFAIL(qPrintable(failMsg)); } m_client->startProfiling(""); m_client->stopProfiling(""); - QVERIFY2(QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete())), + QVERIFY2(QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete())), "No trace received in time."); } void tst_QV8ProfilerService::nonBlockingConnect() { connect(false, "test.qml"); - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); m_client->startProfiling(""); m_client->stopProfiling(""); - QVERIFY2(QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete())), + QVERIFY2(QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete())), "No trace received in time."); } void tst_QV8ProfilerService::snapshot() { connect(false, "test.qml"); - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); m_client->takeSnapshot(); - QVERIFY2(QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(snapshot())), + QVERIFY2(QQmlDebugTest::waitForSignal(m_client, SIGNAL(snapshot())), "No trace received in time."); } void tst_QV8ProfilerService::profileOnExit() { connect(true, "exit.qml"); - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); m_client->startProfiling(""); - QVERIFY2(QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete())), + QVERIFY2(QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete())), "No trace received in time."); //QVERIFY(!m_client->traceMessages.isEmpty()); } @@ -266,11 +266,11 @@ void tst_QV8ProfilerService::profileOnExit() void tst_QV8ProfilerService::console() { connect(true, "console.qml"); - QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled); m_client->stopProfiling(""); - QVERIFY2(QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete())), + QVERIFY2(QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete())), "No trace received in time."); QVERIFY(!m_client->traceMessages.isEmpty()); } diff --git a/tests/auto/declarative/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp similarity index 73% rename from tests/auto/declarative/debugger/shared/debugutil.cpp rename to tests/auto/qml/debugger/shared/debugutil.cpp index fcac1bc61d..8ed64d3a5d 100644 --- a/tests/auto/declarative/debugger/shared/debugutil.cpp +++ b/tests/auto/qml/debugger/shared/debugutil.cpp @@ -44,10 +44,10 @@ #include #include -#include -#include +#include +#include -bool QDeclarativeDebugTest::waitForSignal(QObject *receiver, const char *member, int timeout) { +bool QQmlDebugTest::waitForSignal(QObject *receiver, const char *member, int timeout) { QEventLoop loop; QTimer timer; timer.setSingleShot(true); @@ -58,52 +58,52 @@ bool QDeclarativeDebugTest::waitForSignal(QObject *receiver, const char *member, return timer.isActive(); } -QDeclarativeDebugTestService::QDeclarativeDebugTestService(const QString &s, float version, QObject *parent) - : QDeclarativeDebugService(s, version, parent) +QQmlDebugTestService::QQmlDebugTestService(const QString &s, float version, QObject *parent) + : QQmlDebugService(s, version, parent) { registerService(); } -void QDeclarativeDebugTestService::messageReceived(const QByteArray &ba) +void QQmlDebugTestService::messageReceived(const QByteArray &ba) { sendMessage(ba); } -void QDeclarativeDebugTestService::stateChanged(State) +void QQmlDebugTestService::stateChanged(State) { emit stateHasChanged(); } -QDeclarativeDebugTestClient::QDeclarativeDebugTestClient(const QString &s, QDeclarativeDebugConnection *c) - : QDeclarativeDebugClient(s, c) +QQmlDebugTestClient::QQmlDebugTestClient(const QString &s, QQmlDebugConnection *c) + : QQmlDebugClient(s, c) { } -QByteArray QDeclarativeDebugTestClient::waitForResponse() +QByteArray QQmlDebugTestClient::waitForResponse() { lastMsg.clear(); - QDeclarativeDebugTest::waitForSignal(this, SIGNAL(serverMessage(QByteArray))); + QQmlDebugTest::waitForSignal(this, SIGNAL(serverMessage(QByteArray))); if (lastMsg.isEmpty()) { - qWarning() << "tst_QDeclarativeDebugClient: no response from server!"; + qWarning() << "tst_QQmlDebugTestClient: no response from server!"; return QByteArray(); } return lastMsg; } -void QDeclarativeDebugTestClient::stateChanged(State stat) +void QQmlDebugTestClient::stateChanged(State stat) { QCOMPARE(stat, state()); emit stateHasChanged(); } -void QDeclarativeDebugTestClient::messageReceived(const QByteArray &ba) +void QQmlDebugTestClient::messageReceived(const QByteArray &ba) { lastMsg = ba; emit serverMessage(ba); } -QDeclarativeDebugProcess::QDeclarativeDebugProcess(const QString &executable) +QQmlDebugProcess::QQmlDebugProcess(const QString &executable) : m_executable(executable) , m_started(false) { @@ -114,12 +114,12 @@ QDeclarativeDebugProcess::QDeclarativeDebugProcess(const QString &executable) connect(&m_timer, SIGNAL(timeout()), &m_eventLoop, SLOT(quit())); } -QDeclarativeDebugProcess::~QDeclarativeDebugProcess() +QQmlDebugProcess::~QQmlDebugProcess() { stop(); } -void QDeclarativeDebugProcess::start(const QStringList &arguments) +void QQmlDebugProcess::start(const QStringList &arguments) { m_mutex.lock(); m_process.setEnvironment(m_environment); @@ -129,7 +129,7 @@ void QDeclarativeDebugProcess::start(const QStringList &arguments) m_mutex.unlock(); } -void QDeclarativeDebugProcess::stop() +void QQmlDebugProcess::stop() { if (m_process.state() != QProcess::NotRunning) { m_process.kill(); @@ -137,7 +137,7 @@ void QDeclarativeDebugProcess::stop() } } -bool QDeclarativeDebugProcess::waitForSessionStart() +bool QQmlDebugProcess::waitForSessionStart() { if (m_process.state() != QProcess::Running) { qWarning() << "Could not start up " << m_executable; @@ -148,17 +148,17 @@ bool QDeclarativeDebugProcess::waitForSessionStart() return m_started; } -void QDeclarativeDebugProcess::setEnvironment(const QStringList &environment) +void QQmlDebugProcess::setEnvironment(const QStringList &environment) { m_environment = environment; } -QString QDeclarativeDebugProcess::output() const +QString QQmlDebugProcess::output() const { return m_output; } -void QDeclarativeDebugProcess::processAppOutput() +void QQmlDebugProcess::processAppOutput() { m_mutex.lock(); @@ -175,7 +175,7 @@ void QDeclarativeDebugProcess::processAppOutput() if (line.startsWith("Qml debugging is enabled")) // ignore continue; - if (line.startsWith("QDeclarativeDebugServer:")) { + if (line.startsWith("QQmlDebugServer:")) { if (line.contains("Waiting for connection ")) { m_started = true; m_eventLoop.quit(); diff --git a/tests/auto/declarative/debugger/shared/debugutil_p.h b/tests/auto/qml/debugger/shared/debugutil_p.h similarity index 82% rename from tests/auto/declarative/debugger/shared/debugutil_p.h rename to tests/auto/qml/debugger/shared/debugutil_p.h index 520cb11a5a..194f8fa14c 100644 --- a/tests/auto/declarative/debugger/shared/debugutil_p.h +++ b/tests/auto/qml/debugger/shared/debugutil_p.h @@ -49,22 +49,22 @@ #include #include -#include +#include -#include -#include +#include +#include -class QDeclarativeDebugTest +class QQmlDebugTest { public: static bool waitForSignal(QObject *receiver, const char *member, int timeout = 5000); }; -class QDeclarativeDebugTestService : public QDeclarativeDebugService +class QQmlDebugTestService : public QQmlDebugService { Q_OBJECT public: - QDeclarativeDebugTestService(const QString &s, float version = 1, QObject *parent = 0); + QQmlDebugTestService(const QString &s, float version = 1, QObject *parent = 0); signals: void stateHasChanged(); @@ -74,11 +74,11 @@ class QDeclarativeDebugTestService : public QDeclarativeDebugService virtual void stateChanged(State state); }; -class QDeclarativeDebugTestClient : public QDeclarativeDebugClient +class QQmlDebugTestClient : public QQmlDebugClient { Q_OBJECT public: - QDeclarativeDebugTestClient(const QString &s, QDeclarativeDebugConnection *c); + QQmlDebugTestClient(const QString &s, QQmlDebugConnection *c); QByteArray waitForResponse(); @@ -94,12 +94,12 @@ class QDeclarativeDebugTestClient : public QDeclarativeDebugClient QByteArray lastMsg; }; -class QDeclarativeDebugProcess : public QObject +class QQmlDebugProcess : public QObject { Q_OBJECT public: - QDeclarativeDebugProcess(const QString &executable); - ~QDeclarativeDebugProcess(); + QQmlDebugProcess(const QString &executable); + ~QQmlDebugProcess(); void setEnvironment(const QStringList &environment); diff --git a/tests/auto/declarative/parserstress/parserstress.pro b/tests/auto/qml/parserstress/parserstress.pro similarity index 77% rename from tests/auto/declarative/parserstress/parserstress.pro rename to tests/auto/qml/parserstress/parserstress.pro index 021b1de9cc..3cf3e02e4e 100644 --- a/tests/auto/declarative/parserstress/parserstress.pro +++ b/tests/auto/qml/parserstress/parserstress.pro @@ -9,4 +9,4 @@ DEFINES += TESTDATADIR=\\\"$$PWD/tests\\\" CONFIG += parallel_test -QT += core-private gui-private declarative-private testlib +QT += core-private gui-private qml-private testlib diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4-1.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4-1.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4-2.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4-2.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.1.1.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.1.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.1.1.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.1.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.1.2.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.1.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.1.2.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.1.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.1.3.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.1.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.1.3.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.1.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.1.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.1.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.1-1.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.1-2.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.1-3.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.2-2.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.3.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.2.3.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.2.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.3.1-2.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.3.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.3.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.3.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.3.2.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.3.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.3.2.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.3.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.1.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.1.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.2.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.2.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.3-1.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.4-1.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.4-1.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.4-2.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.4-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.4-2.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.4-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.5-1.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.5-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.5-1.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.5-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.5-2.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.5-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.5-2.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.5-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.5-3.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.5-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.5-3.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.5-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.4.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.5.1-1.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.5.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.5.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.5.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.5.1-2.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.5.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.5.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.5.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.5.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.5.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.5.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.5.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/15.4.5.2-2.js b/tests/auto/qml/parserstress/tests/ecma/Array/15.4.5.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/15.4.5.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/Array/15.4.5.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/browser.js b/tests/auto/qml/parserstress/tests/ecma/Array/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/browser.js rename to tests/auto/qml/parserstress/tests/ecma/Array/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Array/shell.js b/tests/auto/qml/parserstress/tests/ecma/Array/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Array/shell.js rename to tests/auto/qml/parserstress/tests/ecma/Array/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.1.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.1.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.2.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.2.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.3.1-1.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.3.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.3.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.3.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.3.1-2.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.3.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.3.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.3.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.3.1-3.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.3.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.3.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.3.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.3.1-4.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.3.1-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.3.1-4.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.3.1-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.3.1.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.3.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.3.1.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.3.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4-1.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4-1.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.1.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.1.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.2-2.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.2-3.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.2-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.2-3.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.2-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.2-4-n.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.2-4-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.2-4-n.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.2-4-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.3-1.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.3-2.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.3-3.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.3-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.3-3.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.3-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.3-4-n.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.3-4-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.3-4-n.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.3-4-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.3.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.3.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/15.6.4.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/15.6.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/browser.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/browser.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Boolean/shell.js b/tests/auto/qml/parserstress/tests/ecma/Boolean/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Boolean/shell.js rename to tests/auto/qml/parserstress/tests/ecma/Boolean/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.1.1-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.1.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.1.1-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.1.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.1.13-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.1.13-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-6.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.2.2-6.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.2.2-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.1-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.1-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.1-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.1-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.1-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.1-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.1-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.1-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.1-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.1-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.1-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.2-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.2-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.2-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.2-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.2-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.2-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.2-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.2-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.2-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.2-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.2-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.2-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.2-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.8-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.8-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.8-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.8-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.8-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.8-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.8-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.8-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.8-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.8-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.8-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.8-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.8-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.8-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.8-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.8-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.8-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.8-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.3.8-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.3.8-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.4.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.4.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.4.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.4.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.4.2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.4.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.4.2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.4.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.4.3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.4.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.4.3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.4.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-10.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-10.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-10.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-10.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-11.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-11.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-11.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-11.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-12.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-12.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-12.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-12.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-13.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-13.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-13.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-13.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-6.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-6.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-7.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-7.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-8.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-8.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-9.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-9.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.10-9.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.10-9.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-6.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-6.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-7.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.11-7.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.11-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-6.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-6.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-7.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-7.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-8.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.12-8.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.12-8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-6.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-6.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-7.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-7.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-8.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.13-8.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.13-8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.14.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.14.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.14.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.14.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.15.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.15.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.15.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.15.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.16.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.16.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.16.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.16.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.17.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.17.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.17.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.17.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.18.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.18.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.18.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.18.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.19.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.19.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.19.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.19.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.2-2-n.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.2-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.2-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.2-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.20.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.20.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.20.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.20.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-6.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-6.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-7.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-7.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-8.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.21-8.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.21-8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-6.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-6.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-7.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-7.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-8.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.22-8.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.22-8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-10.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-10.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-10.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-10.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-11.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-11.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-11.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-11.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-12.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-12.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-12.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-12.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-13.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-13.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-13.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-13.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-14.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-14.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-14.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-14.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-15.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-15.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-15.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-15.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-16.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-16.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-16.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-16.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-17.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-17.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-17.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-17.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-18.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-18.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-18.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-18.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-3-n.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-6.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-6.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-7.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-7.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-8.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-8.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-9.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-9.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.23-9.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.23-9.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-6.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-6.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-7.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-7.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-8.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.24-8.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.24-8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.25-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.25-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.25-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.25-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.26-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.26-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.26-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.26-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.27-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.27-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.27-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.27-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.28-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.28-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.28-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.28-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.29-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.29-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.29-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.29-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.3-1-n.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.3-1-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.3-1-n.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.3-1-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.3-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.30-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.30-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.30-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.30-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.31-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.31-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.31-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.31-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.32-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.32-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.32-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.32-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.33-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.33-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.33-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.33-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.34-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.34-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.34-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.34-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.35-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.35-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.35-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.35-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-6.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-6.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-7.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.36-7.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.36-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.37-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.37-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.37-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.37-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.37-2.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.37-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.37-2.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.37-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.37-3.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.37-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.37-3.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.37-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.37-4.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.37-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.37-4.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.37-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.37-5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.37-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.37-5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.37-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.4-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.4-1.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.4-2-n.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.4-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.4-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.4-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.6.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.6.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.7.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.7.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.8.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.8.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.9.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.9.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.9.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.9.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/15.9.5.js rename to tests/auto/qml/parserstress/tests/ecma/Date/15.9.5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/browser.js b/tests/auto/qml/parserstress/tests/ecma/Date/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/browser.js rename to tests/auto/qml/parserstress/tests/ecma/Date/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Date/shell.js b/tests/auto/qml/parserstress/tests/ecma/Date/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Date/shell.js rename to tests/auto/qml/parserstress/tests/ecma/Date/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.3-1.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.3.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.3.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-1.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-1.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-10.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-10.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-10.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-10.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-2.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-2.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-3.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-3.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-4.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-4.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-5.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-5.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-6.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-6.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-7.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-7.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-8.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.4-8.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.4-8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.5-1.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.5-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.5-1.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.5-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.5-2.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.5-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.5-2.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.5-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.5-3.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.5-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.5-3.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.5-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.5-4.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.5-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.5-4.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.5-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.8-2.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.8-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.8-2.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.8-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.8-3.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.8-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.1.8-3.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.8-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.2.1.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.2.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.2.1.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.2.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.2.2-1.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.2.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.2.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.2.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.2.2-2.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.2.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.2.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.2.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.2.3-1.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.2.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.2.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.2.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.2.3-2.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.2.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/10.2.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.2.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/browser.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/browser.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/shell.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ExecutionContexts/shell.js rename to tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.1.1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.1.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.1.1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.1.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.10-1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.10-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.10-1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.10-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.10-2.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.10-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.10-2.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.10-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.10-3.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.10-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.10-3.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.10-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.12-1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.12-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.12-1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.12-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.12-2-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.12-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.12-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.12-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.12-3.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.12-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.12-3.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.12-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.12-4.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.12-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.12-4.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.12-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.2-2.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.2-3.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.2-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.2-3.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.2-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.2-4.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.2-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.2-4.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.2-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.2-5.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.2-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.2-5.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.2-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.13.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.13.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.14-1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.14-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.14-1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.14-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.1-1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.1-2.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.1-3-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.1-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.1-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.1-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.1-4-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.1-4-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.1-4-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.1-4-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.1-5.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.1-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.1-5.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.1-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-1-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-1-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-1-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-1-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-10-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-10-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-10-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-10-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-11.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-11.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-11.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-11.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-2-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-3-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-4-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-4-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-4-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-4-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-5-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-5-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-5-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-5-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-6-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-6-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-6-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-6-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-7-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-7-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-7-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-7-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-8-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-8-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-8-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-8-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-9-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-9-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.2-9-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.2-9-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.3-1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.3-2-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.3-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.3-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.3-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.3-3-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.3-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.3-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.3-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.3-4-n.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.3-4-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.3-4-n.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.3-4-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.3-5.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.3-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.2.3-5.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.2.3-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.3.1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.3.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.3.1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.3.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.3.2.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.3.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.3.2.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.3.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.2.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.2.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.3.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.3.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.4.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.4.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.5.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.5.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.6.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.6.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.7-01.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.7-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.7-01.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.7-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.7-02.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.7-02.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.7-02.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.7-02.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.8.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.8.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.9.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.9.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.4.9.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.4.9.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.5.1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.5.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.5.1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.5.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.5.2.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.5.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.5.2.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.5.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.5.3.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.5.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.5.3.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.5.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.6.1-1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.6.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.6.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.6.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.6.1-2.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.6.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.6.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.6.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.6.1-3.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.6.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.6.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.6.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.6.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.6.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.6.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.6.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.6.3.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.6.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.6.3.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.6.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.7.1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.7.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.7.1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.7.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.7.2.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.7.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.7.2.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.7.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.7.3.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.7.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.7.3.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.7.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.8.1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.8.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.8.1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.8.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.8.2.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.8.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.8.2.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.8.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.8.3.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.8.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.8.3.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.8.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.8.4.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.8.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.8.4.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.8.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.9.1.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.9.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.9.1.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.9.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.9.2.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.9.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.9.2.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.9.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/11.9.3.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/11.9.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/11.9.3.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/11.9.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/browser.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/browser.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Expressions/shell.js b/tests/auto/qml/parserstress/tests/ecma/Expressions/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Expressions/shell.js rename to tests/auto/qml/parserstress/tests/ecma/Expressions/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.1.1-1.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.1.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.1.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.1.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.1.1-2.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.1.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.1.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.1.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.1.1-3.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.1.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.1.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.1.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.2.1-1.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.2.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.2.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.2.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.2.1-2.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.2.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.2.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.2.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.2.1-3.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.2.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.2.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.2.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.3.1-2.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.3.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.3.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.3.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.3.1-3.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.3.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.3.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.3.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.3.1-4.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.3.1-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.3.1-4.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.3.1-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.3.2.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.3.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.3.2.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.3.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.4-1.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.4-1.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.4.1.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.4.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.4.1.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.4.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.4.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.4.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.5-1.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.5-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.5-1.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.5-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.5-2.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.5-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.5-2.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.5-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.5.1.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.5.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.5.1.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.5.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.5.3.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.5.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/15.3.5.3.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/15.3.5.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/browser.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/browser.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/shell.js b/tests/auto/qml/parserstress/tests/ecma/FunctionObjects/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/FunctionObjects/shell.js rename to tests/auto/qml/parserstress/tests/ecma/FunctionObjects/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1-1-n.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1-1-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1-1-n.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1-1-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1-2-n.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.1.1.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.1.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.1.1.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.1.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.1.2.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.1.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.1.2.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.1.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.1-2.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.2-1.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.2-2.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.3-1.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.3-2.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.4.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.4.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.5-1.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.5-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.5-1.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.5-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.5-2.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.5-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.5-2.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.5-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.5-3.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.5-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.5-3.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.5-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.6.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.6.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.7.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/15.1.2.7.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/browser.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/browser.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/GlobalObject/shell.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/GlobalObject/shell.js rename to tests/auto/qml/parserstress/tests/ecma/GlobalObject/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.1-1.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.1-2.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.1-3.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-1.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-2-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-3-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-4-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-4-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-4-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-4-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-5-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-5-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-5-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-5-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-6.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.2-6.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.2-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-1.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-10.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-10.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-10.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-10.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-11.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-11.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-11.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-11.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-12.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-12.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-12.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-12.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-13-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-13-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-13-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-13-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-2.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-3.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-3.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-4.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-4.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-5.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-5.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-6.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-6.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-7.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-7.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-8.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-8.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-9.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-9.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.3-9.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.3-9.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.1-1-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.1-1-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.1-1-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.1-1-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.1-2-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.1-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.1-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.1-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.1-3-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.1-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.1-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.1-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-1-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-1-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-1-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-1-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-10-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-10-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-10-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-10-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-11-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-11-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-11-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-11-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-12-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-12-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-12-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-12-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-13-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-13-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-13-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-13-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-14-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-14-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-14-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-14-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-15-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-15-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-15-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-15-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-16-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-16-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-16-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-16-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-2-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-3-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-4-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-4-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-4-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-4-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-5-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-5-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-5-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-5-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-6-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-6-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-6-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-6-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-7-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-7-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-7-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-7-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-8-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-8-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-8-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-8-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-9-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-9-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.2-9-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.2-9-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-1-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-1-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-1-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-1-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-10-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-10-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-10-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-10-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-11-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-11-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-11-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-11-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-12-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-12-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-12-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-12-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-13-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-13-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-13-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-13-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-14-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-14-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-14-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-14-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-15-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-15-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-15-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-15-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-16-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-16-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-16-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-16-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-2-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-3-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-4-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-4-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-4-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-4-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-5-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-5-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-5-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-5-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-6-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-6-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-6-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-6-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-7-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-7-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-7-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-7-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-8-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-8-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-8-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-8-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-9-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-9-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.4.3-9-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.4.3-9-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-1.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-1.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-10-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-10-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-10-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-10-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-2-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-3-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-4-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-4-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-4-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-4-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-5-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-5-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-5-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-5-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-6.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-6.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-7.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-7.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-8-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-8-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-8-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-8-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-9-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-9-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.5-9-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.5-9-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.6.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.6.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.1.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.1.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.2.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.2.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.3-1.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.3-2.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.3.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.3.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.4.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.7.4.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.8.2-n.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.8.2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/7.8.2-n.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.8.2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/browser.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/browser.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/shell.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/LexicalConventions/shell.js rename to tests/auto/qml/parserstress/tests/ecma/LexicalConventions/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8-2-n.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8-3-n.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.1-1.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.1-2.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.2-2.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.3-1.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.3-2.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.4-1.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.4-1.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.4-2.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.4-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.4-2.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.4-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.5-1.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.5-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.5-1.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.5-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.5-2.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.5-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.5-2.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.5-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.6-1.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.6-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.6-1.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.6-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.6-2.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.6-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.6-2.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.6-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.7-1.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.7-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.7-1.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.7-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.7-2.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.7-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.7-2.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.7-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.8-1.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.8-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.8-1.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.8-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.8-2.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.8-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.8-2.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.8-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.8-3.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.8-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.8-3.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.8-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.1.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.1.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.1.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.10.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.10.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.10.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.10.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.11.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.11.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.11.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.11.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.12.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.12.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.12.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.12.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.13.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.13.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.13.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.13.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.14.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.14.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.14.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.14.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.15.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.15.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.15.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.15.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.16.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.16.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.16.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.16.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.17.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.17.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.17.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.17.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.18.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.18.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.18.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.18.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.2.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.2.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.3.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.3.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.4.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.4.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.5.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.5.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.6.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.6.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.7.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.7.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.8.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.8.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.9.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.9.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/15.8.2.9.js rename to tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.9.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/browser.js b/tests/auto/qml/parserstress/tests/ecma/Math/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/browser.js rename to tests/auto/qml/parserstress/tests/ecma/Math/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Math/shell.js b/tests/auto/qml/parserstress/tests/ecma/Math/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Math/shell.js rename to tests/auto/qml/parserstress/tests/ecma/Math/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/NativeObjects/browser.js b/tests/auto/qml/parserstress/tests/ecma/NativeObjects/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/NativeObjects/browser.js rename to tests/auto/qml/parserstress/tests/ecma/NativeObjects/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/NativeObjects/shell.js b/tests/auto/qml/parserstress/tests/ecma/NativeObjects/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/NativeObjects/shell.js rename to tests/auto/qml/parserstress/tests/ecma/NativeObjects/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.1.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.1.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.2.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.2.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.1-1.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.1-2.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.1-3.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.2-2.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.2-3.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.2-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.2-3.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.2-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.2-4.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.2-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.2-4.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.2-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.3-1.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.3-2.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.3-3.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.3-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.3-3.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.3-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.3-4.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.3-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.3-4.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.3-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.4-1.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.4-1.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.4-2.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.4-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.4-2.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.4-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.4-3.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.4-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.4-3.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.4-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.4-4.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.4-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.4-4.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.4-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.5-1.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.5-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.5-1.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.5-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.5-2.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.5-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.5-2.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.5-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.5-3.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.5-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.5-3.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.5-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.5-4.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.5-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.5-4.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.5-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.6-1.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.6-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.6-1.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.6-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.6-2.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.6-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.6-2.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.6-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.6-3.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.6-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.6-3.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.6-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.6-4.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.6-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.6-4.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.6-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.3.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4-1.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4-1.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.1.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.1.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.2-2-n.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.2-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.2-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.2-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.2-3-n.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.2-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.2-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.2-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.2-4.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.2-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.2-4.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.2-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.3-1.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.3-2.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.3-3-n.js b/tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.3-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/15.7.4.3-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/Number/15.7.4.3-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/browser.js b/tests/auto/qml/parserstress/tests/ecma/Number/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/browser.js rename to tests/auto/qml/parserstress/tests/ecma/Number/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Number/shell.js b/tests/auto/qml/parserstress/tests/ecma/Number/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Number/shell.js rename to tests/auto/qml/parserstress/tests/ecma/Number/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.1.1.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.1.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.1.1.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.1.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.1.2.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.1.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.1.2.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.1.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.2.1.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.2.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.2.1.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.2.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.2.2.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.2.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.2.2.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.2.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3-1.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3.1-1.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3.1-2.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3.1-3.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3.1-4.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3.1-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3.1-4.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3.1-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.3.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.4.1.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.4.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.4.1.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.4.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.4.2.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.4.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.4.2.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.4.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.4.3.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.4.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/15.2.4.3.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/15.2.4.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/browser.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/browser.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/shell.js b/tests/auto/qml/parserstress/tests/ecma/ObjectObjects/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/ObjectObjects/shell.js rename to tests/auto/qml/parserstress/tests/ecma/ObjectObjects/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/README b/tests/auto/qml/parserstress/tests/ecma/README similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/README rename to tests/auto/qml/parserstress/tests/ecma/README diff --git a/tests/auto/declarative/parserstress/tests/ecma/SourceText/6-1.js b/tests/auto/qml/parserstress/tests/ecma/SourceText/6-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/SourceText/6-1.js rename to tests/auto/qml/parserstress/tests/ecma/SourceText/6-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/SourceText/6-2.js b/tests/auto/qml/parserstress/tests/ecma/SourceText/6-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/SourceText/6-2.js rename to tests/auto/qml/parserstress/tests/ecma/SourceText/6-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/SourceText/browser.js b/tests/auto/qml/parserstress/tests/ecma/SourceText/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/SourceText/browser.js rename to tests/auto/qml/parserstress/tests/ecma/SourceText/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/SourceText/shell.js b/tests/auto/qml/parserstress/tests/ecma/SourceText/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/SourceText/shell.js rename to tests/auto/qml/parserstress/tests/ecma/SourceText/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.10-1.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.10-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.10-1.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.10-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.10.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.10.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.10.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.10.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.5-1.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.5-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.5-1.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.5-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.5-2.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.5-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.5-2.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.5-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.1-1.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-1.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-2.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-3.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-3.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-4.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-4.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-5.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-5.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-6.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-6.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-7.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-7.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-8.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-8.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-8.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-8.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-9-n.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-9-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.2-9-n.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.2-9-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-1.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-10.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-10.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-10.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-10.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-11.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-11.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-11.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-11.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-12.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-12.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-12.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-12.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-19.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-19.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-19.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-19.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-2.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-3.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-3.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-4.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-4.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-5-n.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-5-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-5-n.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-5-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-6-n.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-6-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-6-n.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-6-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-7-n.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-7-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-7-n.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-7-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-8-n.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-8-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-8-n.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-8-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-9-n.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-9-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.6.3-9-n.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.6.3-9-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.7-1-n.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.7-1-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.7-1-n.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.7-1-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.8-1-n.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.8-1-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.8-1-n.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.8-1-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/12.9-1-n.js b/tests/auto/qml/parserstress/tests/ecma/Statements/12.9-1-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/12.9-1-n.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/12.9-1-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/browser.js b/tests/auto/qml/parserstress/tests/ecma/Statements/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/browser.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Statements/shell.js b/tests/auto/qml/parserstress/tests/ecma/Statements/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Statements/shell.js rename to tests/auto/qml/parserstress/tests/ecma/Statements/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.1-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.3.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.3.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.1-2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.3.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.3.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.1-3.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.3.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.3.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.1-4.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.3.1-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.1-4.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.3.1-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.2-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.3.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.3.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.2-2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.3.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.2-2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.3.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.2-3.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.3.2-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.2-3.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.3.2-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.3.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.10-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.10-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.10-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.10-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-3.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-3.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-4.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-4.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-5.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-5.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-6.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.11-6.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.11-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.12-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.12-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.12-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.12-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.12-2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.12-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.12-2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.12-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.12-3.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.12-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.12-3.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.12-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.12-4.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.12-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.12-4.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.12-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.12-5.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.12-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.12-5.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.12-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.2-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.2-2-n.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.2-2-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.2-2-n.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.2-2-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.2-3.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.2-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.2-3.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.2-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.3-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.3-2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.3-2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.3-3-n.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.3-3-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.3-3-n.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.3-3-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.4-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.4-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.4-2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.4-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.4-2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.4-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.4-3.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.4-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.4-3.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.4-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.4-4.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.4-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.4-4.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.4-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.5-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.5-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.5-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.5-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.5-2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.5-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.5-2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.5-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.5-3.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.5-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.5-3.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.5-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.5-4.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.5-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.5-4.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.5-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.5-5.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.5-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.5-5.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.5-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.6-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.6-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.6-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.6-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.6-2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.6-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.6-2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.6-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.7-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.7-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.7-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.7-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.7-2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.7-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.7-2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.7-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.8-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.8-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.8-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.8-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.8-2.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.8-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.8-2.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.8-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.8-3.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.8-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.8-3.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.8-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.9-1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.9-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.9-1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.9-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.4.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/15.5.5.1.js b/tests/auto/qml/parserstress/tests/ecma/String/15.5.5.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/15.5.5.1.js rename to tests/auto/qml/parserstress/tests/ecma/String/15.5.5.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/browser.js b/tests/auto/qml/parserstress/tests/ecma/String/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/browser.js rename to tests/auto/qml/parserstress/tests/ecma/String/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/String/shell.js b/tests/auto/qml/parserstress/tests/ecma/String/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/String/shell.js rename to tests/auto/qml/parserstress/tests/ecma/String/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.2.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.2.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.3-1.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.3.1-1.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.3.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.3.1-2.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.3.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.3.1-3.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.3.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.3.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.3.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.4-1.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.4-1.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.4-2.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.4-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.4-2.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.4-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.5-2.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.5-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.5-2.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.5-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.6.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.6.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.7.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.7.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.8.1.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.8.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.8.1.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.8.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.9-1.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.9-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/9.9-1.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.9-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/browser.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/browser.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/TypeConversion/shell.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/TypeConversion/shell.js rename to tests/auto/qml/parserstress/tests/ecma/TypeConversion/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Types/8.1.js b/tests/auto/qml/parserstress/tests/ecma/Types/8.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Types/8.1.js rename to tests/auto/qml/parserstress/tests/ecma/Types/8.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Types/8.4.js b/tests/auto/qml/parserstress/tests/ecma/Types/8.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Types/8.4.js rename to tests/auto/qml/parserstress/tests/ecma/Types/8.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Types/8.6.2.1-1.js b/tests/auto/qml/parserstress/tests/ecma/Types/8.6.2.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Types/8.6.2.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/Types/8.6.2.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Types/browser.js b/tests/auto/qml/parserstress/tests/ecma/Types/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Types/browser.js rename to tests/auto/qml/parserstress/tests/ecma/Types/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/Types/shell.js b/tests/auto/qml/parserstress/tests/ecma/Types/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/Types/shell.js rename to tests/auto/qml/parserstress/tests/ecma/Types/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/browser.js b/tests/auto/qml/parserstress/tests/ecma/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/browser.js rename to tests/auto/qml/parserstress/tests/ecma/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/10.1.4-9.js b/tests/auto/qml/parserstress/tests/ecma/extensions/10.1.4-9.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/10.1.4-9.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/10.1.4-9.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/10.1.6.js b/tests/auto/qml/parserstress/tests/ecma/extensions/10.1.6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/10.1.6.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/10.1.6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/10.1.8-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/10.1.8-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/10.1.8-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/10.1.8-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/11.6.1-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/11.6.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/11.6.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/11.6.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/11.6.1-2.js b/tests/auto/qml/parserstress/tests/ecma/extensions/11.6.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/11.6.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/11.6.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/11.6.1-3.js b/tests/auto/qml/parserstress/tests/ecma/extensions/11.6.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/11.6.1-3.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/11.6.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/11.6.2-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/11.6.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/11.6.2-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/11.6.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15-2.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15-2.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.1.2.1-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.1.2.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.1.2.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.1.2.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.2.1.1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.2.1.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.2.1.1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.2.1.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.2.3-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.2.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.2.3-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.2.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.2.4.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.2.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.2.4.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.2.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.3.1.1-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.3.1.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.3.1.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.3.1.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.3.1.1-2.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.3.1.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.3.1.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.3.1.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.3.2.1-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.3.2.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.3.2.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.3.2.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.3.2.1-2.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.3.2.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.3.2.1-2.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.3.2.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.3.3.1-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.3.3.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.3.3.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.3.3.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.4.3.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.4.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.4.3.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.4.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.5.3.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.5.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.5.3.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.5.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.5.4.2.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.5.4.2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.5.4.2.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.5.4.2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.5.4.4-4.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.5.4.4-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.5.4.4-4.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.5.4.4-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.5.4.5-6.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.5.4.5-6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.5.4.5-6.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.5.4.5-6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.5.4.7-3.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.5.4.7-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.5.4.7-3.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.5.4.7-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.6.3.1-5.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.6.3.1-5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.6.3.1-5.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.6.3.1-5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.6.3.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.6.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.6.3.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.6.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.6.4-2.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.6.4-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.6.4-2.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.6.4-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.7.3.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.7.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.7.3.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.7.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.7.4.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.7.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.7.4.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.7.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.8-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.8-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.8-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.8-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/15.9.5.js b/tests/auto/qml/parserstress/tests/ecma/extensions/15.9.5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/15.9.5.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/15.9.5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/8.6.2.1-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/8.6.2.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/8.6.2.1-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/8.6.2.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/9.9-1.js b/tests/auto/qml/parserstress/tests/ecma/extensions/9.9-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/9.9-1.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/9.9-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/browser.js b/tests/auto/qml/parserstress/tests/ecma/extensions/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/browser.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/extensions/shell.js b/tests/auto/qml/parserstress/tests/ecma/extensions/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/extensions/shell.js rename to tests/auto/qml/parserstress/tests/ecma/extensions/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/jsref.js b/tests/auto/qml/parserstress/tests/ecma/jsref.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/jsref.js rename to tests/auto/qml/parserstress/tests/ecma/jsref.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/shell.js b/tests/auto/qml/parserstress/tests/ecma/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/shell.js rename to tests/auto/qml/parserstress/tests/ecma/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma/template.js b/tests/auto/qml/parserstress/tests/ecma/template.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma/template.js rename to tests/auto/qml/parserstress/tests/ecma/template.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/boolean-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/boolean-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/boolean-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/boolean-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/boolean-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/boolean-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/boolean-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/boolean-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/browser.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/browser.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/date-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/date-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/date-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/date-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/date-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/date-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/date-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/date-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/date-003.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/date-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/date-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/date-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/date-004.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/date-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/date-004.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/date-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-003.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-004.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-004.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-005.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-005.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-005.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-005.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-006.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-006.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-006.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-006.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-007.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-007.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-007.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-007.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-008.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-008.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-008.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-008.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-009.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-009.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-009.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-009.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-010-n.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-010-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-010-n.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-010-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-011-n.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-011-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/exception-011-n.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/exception-011-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-003.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-004.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-004.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-005.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-005.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-005.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-005.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-006.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-006.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-006.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-006.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-007.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-007.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-007.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-007.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-008.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-008.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-008.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-008.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-009.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-009.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-009.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-009.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-010.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-010.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-010.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-010.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-011.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-011.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-011.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-011.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-012.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-012.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-012.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-012.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-013.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-013.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-013.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-013.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-014.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-014.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-014.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-014.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-015.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-015.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-015.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-015.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-016.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-016.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-016.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-016.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-017.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-017.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-017.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-017.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-019.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-019.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/expression-019.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/expression-019.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/function-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/function-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/function-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/function-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/global-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/global-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/global-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/global-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/global-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/global-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/global-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/global-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-003.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-004.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-004.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-005.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-005.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-005.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-005.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-006.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-006.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-006.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-006.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-007.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-007.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-007.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-007.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-008.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-008.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-008.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-008.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-009.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-009.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-009.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-009.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-010.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-010.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-010.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-010.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-011.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-011.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-011.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-011.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-012.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-012.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-012.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-012.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-013.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-013.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-013.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-013.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-014.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-014.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-014.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-014.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-015.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-015.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-015.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-015.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-016.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-016.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-016.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-016.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-017.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-017.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-017.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-017.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-018.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-018.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-018.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-018.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-019.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-019.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-019.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-019.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-020.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-020.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-020.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-020.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-021.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-021.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-021.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-021.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-022.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-022.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-022.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-022.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-023.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-023.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-023.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-023.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-024.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-024.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-024.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-024.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-025.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-025.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-025.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-025.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-026.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-026.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-026.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-026.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-027.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-027.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-027.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-027.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-028.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-028.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-028.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-028.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-029.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-029.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-029.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-029.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-030.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-030.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-030.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-030.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-031.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-031.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-031.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-031.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-032.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-032.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-032.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-032.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-033.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-033.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-033.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-033.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-034.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-034.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-034.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-034.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-035.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-035.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-035.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-035.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-036.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-036.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-036.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-036.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-037.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-037.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-037.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-037.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-038.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-038.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-038.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-038.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-039.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-039.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-039.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-039.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-040.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-040.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-040.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-040.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-041.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-041.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-041.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-041.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-042.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-042.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-042.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-042.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-047.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-047.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-047.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-047.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-048.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-048.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-048.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-048.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-049.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-049.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-049.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-049.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-050.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-050.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-050.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-050.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-051.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-051.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-051.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-051.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-052.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-052.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-052.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-052.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-053.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-053.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-053.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-053.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-054.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-054.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/lexical-054.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/lexical-054.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/number-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/number-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/number-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/number-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/number-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/number-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/number-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/number-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/number-003.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/number-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/number-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/number-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/shell.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/shell.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-003.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-004.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-004.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-005.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-005.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-005.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-005.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-006.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-006.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-006.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-006.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-007.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-007.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-007.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-007.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-008.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-008.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-008.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-008.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-009.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-009.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/statement-009.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/statement-009.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/string-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/string-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/string-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/string-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/string-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Exceptions/string-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Exceptions/string-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Exceptions/string-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Expressions/StrictEquality-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Expressions/StrictEquality-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Expressions/StrictEquality-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Expressions/StrictEquality-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Expressions/browser.js b/tests/auto/qml/parserstress/tests/ecma_2/Expressions/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Expressions/browser.js rename to tests/auto/qml/parserstress/tests/ecma_2/Expressions/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Expressions/shell.js b/tests/auto/qml/parserstress/tests/ecma_2/Expressions/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Expressions/shell.js rename to tests/auto/qml/parserstress/tests/ecma_2/Expressions/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/FunctionObjects/apply-001-n.js b/tests/auto/qml/parserstress/tests/ecma_2/FunctionObjects/apply-001-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/FunctionObjects/apply-001-n.js rename to tests/auto/qml/parserstress/tests/ecma_2/FunctionObjects/apply-001-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/FunctionObjects/browser.js b/tests/auto/qml/parserstress/tests/ecma_2/FunctionObjects/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/FunctionObjects/browser.js rename to tests/auto/qml/parserstress/tests/ecma_2/FunctionObjects/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/FunctionObjects/call-1.js b/tests/auto/qml/parserstress/tests/ecma_2/FunctionObjects/call-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/FunctionObjects/call-1.js rename to tests/auto/qml/parserstress/tests/ecma_2/FunctionObjects/call-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/FunctionObjects/shell.js b/tests/auto/qml/parserstress/tests/ecma_2/FunctionObjects/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/FunctionObjects/shell.js rename to tests/auto/qml/parserstress/tests/ecma_2/FunctionObjects/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/LexicalConventions/browser.js b/tests/auto/qml/parserstress/tests/ecma_2/LexicalConventions/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/LexicalConventions/browser.js rename to tests/auto/qml/parserstress/tests/ecma_2/LexicalConventions/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/LexicalConventions/keywords-001.js b/tests/auto/qml/parserstress/tests/ecma_2/LexicalConventions/keywords-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/LexicalConventions/keywords-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/LexicalConventions/keywords-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/LexicalConventions/regexp-literals-001.js b/tests/auto/qml/parserstress/tests/ecma_2/LexicalConventions/regexp-literals-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/LexicalConventions/regexp-literals-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/LexicalConventions/regexp-literals-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/LexicalConventions/regexp-literals-002.js b/tests/auto/qml/parserstress/tests/ecma_2/LexicalConventions/regexp-literals-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/LexicalConventions/regexp-literals-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/LexicalConventions/regexp-literals-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/LexicalConventions/shell.js b/tests/auto/qml/parserstress/tests/ecma_2/LexicalConventions/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/LexicalConventions/shell.js rename to tests/auto/qml/parserstress/tests/ecma_2/LexicalConventions/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/README b/tests/auto/qml/parserstress/tests/ecma_2/README similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/README rename to tests/auto/qml/parserstress/tests/ecma_2/README diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/browser.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/browser.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/constructor-001.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/constructor-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/constructor-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/constructor-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/exec-001.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/exec-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/exec-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/exec-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/exec-002.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/exec-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/exec-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/exec-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/function-001.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/function-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/function-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/function-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/hex-001.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/hex-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/hex-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/hex-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/multiline-001.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/multiline-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/multiline-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/multiline-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/octal-001.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/octal-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/octal-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/octal-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/octal-002.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/octal-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/octal-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/octal-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/octal-003.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/octal-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/octal-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/octal-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/properties-001.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/properties-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/properties-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/properties-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/properties-002.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/properties-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/properties-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/properties-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/regexp-enumerate-001.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/regexp-enumerate-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/regexp-enumerate-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/regexp-enumerate-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/regress-001.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/regress-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/regress-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/regress-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/shell.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/shell.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/RegExp/unicode-001.js b/tests/auto/qml/parserstress/tests/ecma_2/RegExp/unicode-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/RegExp/unicode-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/RegExp/unicode-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/browser.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/browser.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-003.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-004.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-004.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-005.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-005.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-005.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-005.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-006.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-006.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-006.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-006.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-007.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-007.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/dowhile-007.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/dowhile-007.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/forin-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/forin-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/forin-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/forin-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/forin-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/forin-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/forin-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/forin-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/if-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/if-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/if-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/if-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/label-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/label-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/label-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/label-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/label-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/label-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/label-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/label-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/shell.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/shell.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/switch-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/switch-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/switch-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/switch-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/switch-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/switch-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/switch-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/switch-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/switch-003.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/switch-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/switch-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/switch-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/switch-004.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/switch-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/switch-004.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/switch-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/try-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/try-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-003.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/try-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/try-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-004.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/try-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-004.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/try-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-005.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/try-005.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-005.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/try-005.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-006.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/try-006.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-006.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/try-006.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-007.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/try-007.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-007.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/try-007.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-008.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/try-008.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-008.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/try-008.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-009.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/try-009.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-009.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/try-009.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-010.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/try-010.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-010.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/try-010.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-012.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/try-012.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/try-012.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/try-012.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/while-001.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/while-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/while-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/while-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/while-002.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/while-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/while-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/while-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/while-003.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/while-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/while-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/while-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/Statements/while-004.js b/tests/auto/qml/parserstress/tests/ecma_2/Statements/while-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/Statements/while-004.js rename to tests/auto/qml/parserstress/tests/ecma_2/Statements/while-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/String/browser.js b/tests/auto/qml/parserstress/tests/ecma_2/String/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/String/browser.js rename to tests/auto/qml/parserstress/tests/ecma_2/String/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/String/match-001.js b/tests/auto/qml/parserstress/tests/ecma_2/String/match-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/String/match-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/String/match-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/String/match-002.js b/tests/auto/qml/parserstress/tests/ecma_2/String/match-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/String/match-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/String/match-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/String/match-003.js b/tests/auto/qml/parserstress/tests/ecma_2/String/match-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/String/match-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/String/match-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/String/match-004.js b/tests/auto/qml/parserstress/tests/ecma_2/String/match-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/String/match-004.js rename to tests/auto/qml/parserstress/tests/ecma_2/String/match-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/String/replace-001.js b/tests/auto/qml/parserstress/tests/ecma_2/String/replace-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/String/replace-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/String/replace-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/String/shell.js b/tests/auto/qml/parserstress/tests/ecma_2/String/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/String/shell.js rename to tests/auto/qml/parserstress/tests/ecma_2/String/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/String/split-001.js b/tests/auto/qml/parserstress/tests/ecma_2/String/split-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/String/split-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/String/split-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/String/split-002.js b/tests/auto/qml/parserstress/tests/ecma_2/String/split-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/String/split-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/String/split-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/String/split-003.js b/tests/auto/qml/parserstress/tests/ecma_2/String/split-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/String/split-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/String/split-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/browser.js b/tests/auto/qml/parserstress/tests/ecma_2/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/browser.js rename to tests/auto/qml/parserstress/tests/ecma_2/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/extensions/browser.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/extensions/browser.js rename to tests/auto/qml/parserstress/tests/ecma_2/extensions/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/extensions/constructor-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/extensions/constructor-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/extensions/function-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/extensions/function-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-002.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-003-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-003-n.js rename to tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-004-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-004-n.js rename to tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-005-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-005-n.js rename to tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-006.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/extensions/instanceof-006.js rename to tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/extensions/shell.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/extensions/shell.js rename to tests/auto/qml/parserstress/tests/ecma_2/extensions/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/instanceof/browser.js b/tests/auto/qml/parserstress/tests/ecma_2/instanceof/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/instanceof/browser.js rename to tests/auto/qml/parserstress/tests/ecma_2/instanceof/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/instanceof/instanceof-001.js b/tests/auto/qml/parserstress/tests/ecma_2/instanceof/instanceof-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/instanceof/instanceof-001.js rename to tests/auto/qml/parserstress/tests/ecma_2/instanceof/instanceof-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/instanceof/instanceof-002.js b/tests/auto/qml/parserstress/tests/ecma_2/instanceof/instanceof-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/instanceof/instanceof-002.js rename to tests/auto/qml/parserstress/tests/ecma_2/instanceof/instanceof-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/instanceof/instanceof-003.js b/tests/auto/qml/parserstress/tests/ecma_2/instanceof/instanceof-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/instanceof/instanceof-003.js rename to tests/auto/qml/parserstress/tests/ecma_2/instanceof/instanceof-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/instanceof/regress-7635.js b/tests/auto/qml/parserstress/tests/ecma_2/instanceof/regress-7635.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/instanceof/regress-7635.js rename to tests/auto/qml/parserstress/tests/ecma_2/instanceof/regress-7635.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/instanceof/shell.js b/tests/auto/qml/parserstress/tests/ecma_2/instanceof/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/instanceof/shell.js rename to tests/auto/qml/parserstress/tests/ecma_2/instanceof/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/jsref.js b/tests/auto/qml/parserstress/tests/ecma_2/jsref.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/jsref.js rename to tests/auto/qml/parserstress/tests/ecma_2/jsref.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/shell.js b/tests/auto/qml/parserstress/tests/ecma_2/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/shell.js rename to tests/auto/qml/parserstress/tests/ecma_2/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_2/template.js b/tests/auto/qml/parserstress/tests/ecma_2/template.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_2/template.js rename to tests/auto/qml/parserstress/tests/ecma_2/template.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/15.4.4.11-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/15.4.4.11-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/15.4.4.3-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/15.4.4.3-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/15.4.4.4-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.4-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/15.4.4.4-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.4-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/15.4.5.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/15.4.5.1-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-101488.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-101488.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-101488.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/regress-101488.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-130451.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-130451.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-130451.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/regress-130451.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-322135-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-322135-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-322135-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-322135-02.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-322135-03.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-322135-03.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-322135-04.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-322135-04.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-387501.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-387501.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-421325.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-421325.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-430717.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/regress-430717.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Array/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Array/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/Array/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.1.2-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.1.2-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.3.2-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.3.2-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.4.3.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.4.3.js rename to tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.3.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.3.js rename to tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.4.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.4.js rename to tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.5-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.5-02.js rename to tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.5.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.5.js rename to tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.6.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.6.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.6.js rename to tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.6.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.7.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.7.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Date/15.9.5.7.js rename to tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.7.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Date/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Date/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/Date/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Date/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Date/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/Date/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/15.11.1.1.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/15.11.1.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/15.11.1.1.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/15.11.1.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/15.11.4.4-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/15.11.4.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/15.11.4.4-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/15.11.4.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/15.11.7.6-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/15.11.7.6-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/15.11.7.6-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/15.11.7.6-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/15.11.7.6-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/15.11.7.6-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/15.11.7.6-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/15.11.7.6-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/15.11.7.6-003.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/15.11.7.6-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/15.11.7.6-003.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/15.11.7.6-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/binding-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/binding-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/binding-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/binding-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/regress-181654.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/regress-181654.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/regress-181654.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/regress-181654.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/regress-181914.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/regress-181914.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/regress-181914.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/regress-181914.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/regress-58946.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/regress-58946.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/regress-58946.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/regress-58946.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/regress-95101.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/regress-95101.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/regress-95101.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/regress-95101.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/Exceptions/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Exceptions/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/Exceptions/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/10.1.3-1.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.1.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/10.1.3-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.1.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/10.1.3-2.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.1.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/10.1.3-2.js rename to tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.1.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/10.1.3.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.1.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/10.1.3.js rename to tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.1.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/10.1.4-1.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.1.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/10.1.4-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.1.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/regress-23346.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-23346.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/regress-23346.js rename to tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-23346.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/ExecutionContexts/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.10-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.10-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.10-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.10-02.js rename to tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.10-03.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.10-03.js rename to tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.6.1-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.6.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.6.1-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.6.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.7.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.7.1-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.7.2-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.7.2-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.7.3-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.7.3-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.9.6-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.9.6-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Expressions/11.9.6-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.9.6-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Expressions/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Expressions/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/Expressions/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Expressions/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Expressions/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/Expressions/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/FunExpr/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/FunExpr/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/FunExpr/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/FunExpr/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/FunExpr/fe-001-n.js b/tests/auto/qml/parserstress/tests/ecma_3/FunExpr/fe-001-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/FunExpr/fe-001-n.js rename to tests/auto/qml/parserstress/tests/ecma_3/FunExpr/fe-001-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/FunExpr/fe-001.js b/tests/auto/qml/parserstress/tests/ecma_3/FunExpr/fe-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/FunExpr/fe-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/FunExpr/fe-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/FunExpr/fe-002.js b/tests/auto/qml/parserstress/tests/ecma_3/FunExpr/fe-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/FunExpr/fe-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/FunExpr/fe-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/FunExpr/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/FunExpr/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/FunExpr/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/FunExpr/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/15.3.4.3-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/15.3.4.3-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/15.3.4.3-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/15.3.4.3-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/15.3.4.4-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/15.3.4.4-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/15.3.4.4-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/15.3.4.4-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/arguments-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/arguments-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/arguments-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/arguments-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/call-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/call-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/call-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/call-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-131964.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-131964.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-131964.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/regress-131964.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-137181.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-137181.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-137181.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/regress-137181.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-193555.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-193555.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-193555.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/regress-193555.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-313570.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-313570.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-49286.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-49286.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-49286.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/regress-49286.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-58274.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-58274.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-58274.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/regress-58274.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-85880.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-85880.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-85880.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/regress-85880.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-94506.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-94506.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-94506.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/regress-94506.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-97921.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-97921.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/regress-97921.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/regress-97921.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/scope-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/scope-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/scope-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/scope-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/scope-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/scope-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/scope-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/scope-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Function/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Function/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/Function/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js b/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js rename to tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/LexicalConventions/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/LexicalConventions/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/LexicalConventions/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/LexicalConventions/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.2-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.2-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.2-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.2-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.3-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.3-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.3-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.3-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.3-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.3-02.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.3-02.js rename to tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.3-02.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.5-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.5-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.5-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.5-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.6-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.6-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.6-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.6-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.7-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.7-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.7-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.7-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.7-2.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.7-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Number/15.7.4.7-2.js rename to tests/auto/qml/parserstress/tests/ecma_3/Number/15.7.4.7-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Number/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Number/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/Number/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Number/regress-442242-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Number/regress-442242-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Number/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Number/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/Number/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/NumberFormatting/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/NumberFormatting/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/NumberFormatting/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/NumberFormatting/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/NumberFormatting/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/NumberFormatting/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/NumberFormatting/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/NumberFormatting/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/NumberFormatting/tostring-001.js b/tests/auto/qml/parserstress/tests/ecma_3/NumberFormatting/tostring-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/NumberFormatting/tostring-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/NumberFormatting/tostring-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/8.6.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/8.6.1-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/8.6.2.6-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.2.6-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/8.6.2.6-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.2.6-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/class-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/class-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/class-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/class-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/class-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/class-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/class-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/class-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/class-003.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/class-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/class-003.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/class-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/class-004.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/class-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/class-004.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/class-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/class-005.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/class-005.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/class-005.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/class-005.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/regress-361274.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/regress-361274.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/regress-385393-07.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/regress-385393-07.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/regress-72773.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-72773.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/regress-72773.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/regress-72773.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/regress-79129-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-79129-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/regress-79129-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/regress-79129-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Object/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Object/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/Object/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Operators/11.13.1-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Operators/11.13.1-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Operators/11.13.1-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Operators/11.13.1-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Operators/11.4.1-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Operators/11.4.1-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Operators/11.4.1-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Operators/11.4.1-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Operators/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Operators/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/Operators/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Operators/order-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Operators/order-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Operators/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Operators/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/Operators/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/README b/tests/auto/qml/parserstress/tests/ecma_3/README similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/README rename to tests/auto/qml/parserstress/tests/ecma_3/README diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.2-1.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.2-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.2.12.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.2.12.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.3.1-1.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.3.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.3.1-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.3.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.3.1-2.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.3.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.3.1-2.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.3.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.4.1-1.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.4.1-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.4.1-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.4.1-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.4.1-2.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.4.1-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.4.1-2.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.4.1-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.4.1-3.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.4.1-3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.4.1-3.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.4.1-3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.4.1-4.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.4.1-4.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.4.1-4.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.4.1-4.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.4.1-5-n.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.4.1-5-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.4.1-5-n.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.4.1-5-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.6.2-1.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.6.2-1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.6.2-1.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.6.2-1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.6.2-2.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.6.2-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/15.10.6.2-2.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.6.2-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/octal-001.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/octal-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/octal-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/octal-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/octal-002.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/octal-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/octal-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/octal-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/perlstress-001.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/perlstress-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/perlstress-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/perlstress-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/perlstress-002.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/perlstress-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/perlstress-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/perlstress-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-100199.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-100199.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-100199.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-100199.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-105972.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-105972.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-105972.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-105972.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-119909.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-119909.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-119909.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-119909.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-122076.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-122076.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-122076.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-122076.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-123437.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-123437.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-123437.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-123437.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-165353.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-165353.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-165353.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-165353.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-169497.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-169497.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-169497.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-169497.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-169534.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-169534.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-169534.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-169534.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-187133.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-187133.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-187133.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-187133.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-188206.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-188206.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-188206.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-188206.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-191479.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-191479.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-191479.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-191479.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-202564.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-202564.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-202564.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-202564.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-209067.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-209067.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-209067.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-209067.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-209919.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-209919.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-209919.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-209919.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-216591.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-216591.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-216591.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-216591.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-220367-001.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-220367-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-220367-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-220367-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-223273.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-223273.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-223273.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-223273.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-223535.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-223535.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-223535.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-223535.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-224676.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-224676.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-224676.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-224676.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-225289.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-225289.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-225289.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-225289.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-225343.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-225343.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-225343.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-225343.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-24712.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-24712.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-24712.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-24712.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-285219.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-285219.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-28686.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-28686.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-28686.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-28686.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-289669.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-289669.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-307456.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-307456.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-309840.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-309840.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-311414.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-311414.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-312351.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-312351.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-31316.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-31316.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-31316.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-31316.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-330684.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-330684.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-334158.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-334158.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-346090.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-346090.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-367888.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-367888.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375642.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375642.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375711.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375711.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375715-02.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375715-02.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375715-03.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375715-03.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375715-04.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-375715-04.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-57572.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-57572.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-57572.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-57572.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-57631.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-57631.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-57631.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-57631.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-67773.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-67773.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-67773.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-67773.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-72964.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-72964.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-72964.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-72964.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-76683.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-76683.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-76683.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-76683.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-78156.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-78156.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-78156.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-78156.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-85721.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-85721.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-85721.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-85721.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-87231.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-87231.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-87231.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-87231.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-98306.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-98306.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/regress-98306.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-98306.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/RegExp/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/RegExp/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/RegExp/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Regress/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Regress/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/Regress/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Regress/regress-385393-04.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Regress/regress-385393-04.js rename to tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Regress/regress-419152.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Regress/regress-419152.js rename to tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Regress/regress-420087.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Regress/regress-420087.js rename to tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Regress/regress-420610.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Regress/regress-420610.js rename to tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Regress/regress-441477-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Regress/regress-441477-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Regress/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Regress/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/Regress/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/12.6.3.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/12.6.3.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-121744.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-121744.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-121744.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-121744.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-131348.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-131348.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-131348.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-131348.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-157509.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-157509.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-157509.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-157509.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-194364.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-194364.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-194364.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-194364.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-226517.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-226517.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-226517.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-226517.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-302439.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-302439.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-324650.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-324650.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-74474-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-74474-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-74474-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-74474-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-74474-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-74474-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-74474-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-74474-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-74474-003.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-74474-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-74474-003.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-74474-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-83532-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-83532-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-83532-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-83532-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-83532-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-83532-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/regress-83532-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-83532-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Statements/switch-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/switch-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Statements/switch-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Statements/switch-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/String/15.5.4.11.js b/tests/auto/qml/parserstress/tests/ecma_3/String/15.5.4.11.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/String/15.5.4.11.js rename to tests/auto/qml/parserstress/tests/ecma_3/String/15.5.4.11.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/String/15.5.4.14.js b/tests/auto/qml/parserstress/tests/ecma_3/String/15.5.4.14.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/String/15.5.4.14.js rename to tests/auto/qml/parserstress/tests/ecma_3/String/15.5.4.14.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/String/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/String/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/String/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/String/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/String/regress-104375.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-104375.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/String/regress-104375.js rename to tests/auto/qml/parserstress/tests/ecma_3/String/regress-104375.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/String/regress-189898.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-189898.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/String/regress-189898.js rename to tests/auto/qml/parserstress/tests/ecma_3/String/regress-189898.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/String/regress-304376.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/String/regress-304376.js rename to tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/String/regress-313567.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/String/regress-313567.js rename to tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/String/regress-392378.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/String/regress-392378.js rename to tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/String/regress-83293.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-83293.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/String/regress-83293.js rename to tests/auto/qml/parserstress/tests/ecma_3/String/regress-83293.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/String/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/String/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/String/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/String/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Unicode/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Unicode/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/Unicode/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Unicode/regress-352044-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Unicode/regress-352044-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Unicode/regress-352044-02-n.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-02-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Unicode/regress-352044-02-n.js rename to tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-02-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Unicode/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Unicode/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/Unicode/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-001-n.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-001-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-001-n.js rename to tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-001-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-001.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-001.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-001.js rename to tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-001.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-002-n.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-002-n.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-002-n.js rename to tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-002-n.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-003.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-003.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-003.js rename to tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-003.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-004.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-004.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-004.js rename to tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-004.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-005.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-005.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/Unicode/uc-005.js rename to tests/auto/qml/parserstress/tests/ecma_3/Unicode/uc-005.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/10.1.3-2.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/10.1.3-2.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/7.9.1.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/7.9.1.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/browser.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/browser.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/browser.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-103087.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-103087.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-103087.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-103087.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-188206-01.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-188206-01.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-188206-01.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-188206-01.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-188206-02.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-188206-02.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-188206-02.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-188206-02.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-220367-002.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-220367-002.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-220367-002.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-220367-002.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-228087.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-228087.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-228087.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-228087.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-274152.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-274152.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-320854.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-320854.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-327170.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-327170.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-368516.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-368516.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-385393-03.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-385393-03.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-429248.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-429248.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-430740.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/regress-430740.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/extensions/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/extensions/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/extensions/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/shell.js b/tests/auto/qml/parserstress/tests/ecma_3/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/shell.js rename to tests/auto/qml/parserstress/tests/ecma_3/shell.js diff --git a/tests/auto/declarative/parserstress/tests/ecma_3/template.js b/tests/auto/qml/parserstress/tests/ecma_3/template.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/ecma_3/template.js rename to tests/auto/qml/parserstress/tests/ecma_3/template.js diff --git a/tests/auto/declarative/parserstress/tests/shell.js b/tests/auto/qml/parserstress/tests/shell.js similarity index 100% rename from tests/auto/declarative/parserstress/tests/shell.js rename to tests/auto/qml/parserstress/tests/shell.js diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/qml/parserstress/tst_parserstress.cpp similarity index 96% rename from tests/auto/declarative/parserstress/tst_parserstress.cpp rename to tests/auto/qml/parserstress/tst_parserstress.cpp index 25ecef15f6..c7f4840a11 100644 --- a/tests/auto/declarative/parserstress/tst_parserstress.cpp +++ b/tests/auto/qml/parserstress/tst_parserstress.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include -#include -#include +#include +#include #include #include #include @@ -58,7 +58,7 @@ private slots: private: static QStringList findJSFiles(const QDir &); - QDeclarativeEngine engine; + QQmlEngine engine; }; QStringList tst_parserstress::findJSFiles(const QDir &d) @@ -125,7 +125,7 @@ void tst_parserstress::ecmascript() QByteArray qmlData = qml.toUtf8(); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(qmlData, QUrl::fromLocalFile(SRCDIR + QString("/dummy.qml"))); diff --git a/tests/auto/declarative/qjsengine/qjsengine.pro b/tests/auto/qml/qjsengine/qjsengine.pro similarity index 88% rename from tests/auto/declarative/qjsengine/qjsengine.pro rename to tests/auto/qml/qjsengine/qjsengine.pro index dd6234acd8..3451157dbb 100644 --- a/tests/auto/declarative/qjsengine/qjsengine.pro +++ b/tests/auto/qml/qjsengine/qjsengine.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qjsengine -QT += declarative widgets testlib +QT += qml widgets testlib macx:CONFIG -= app_bundle SOURCES += tst_qjsengine.cpp wince* { diff --git a/tests/auto/declarative/qjsengine/script/com/__init__.js b/tests/auto/qml/qjsengine/script/com/__init__.js similarity index 100% rename from tests/auto/declarative/qjsengine/script/com/__init__.js rename to tests/auto/qml/qjsengine/script/com/__init__.js diff --git a/tests/auto/declarative/qjsengine/script/com/trolltech/__init__.js b/tests/auto/qml/qjsengine/script/com/trolltech/__init__.js similarity index 100% rename from tests/auto/declarative/qjsengine/script/com/trolltech/__init__.js rename to tests/auto/qml/qjsengine/script/com/trolltech/__init__.js diff --git a/tests/auto/declarative/qjsengine/script/com/trolltech/recursive/__init__.js b/tests/auto/qml/qjsengine/script/com/trolltech/recursive/__init__.js similarity index 100% rename from tests/auto/declarative/qjsengine/script/com/trolltech/recursive/__init__.js rename to tests/auto/qml/qjsengine/script/com/trolltech/recursive/__init__.js diff --git a/tests/auto/declarative/qjsengine/script/com/trolltech/syntaxerror/__init__.js b/tests/auto/qml/qjsengine/script/com/trolltech/syntaxerror/__init__.js similarity index 100% rename from tests/auto/declarative/qjsengine/script/com/trolltech/syntaxerror/__init__.js rename to tests/auto/qml/qjsengine/script/com/trolltech/syntaxerror/__init__.js diff --git a/tests/auto/declarative/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp similarity index 100% rename from tests/auto/declarative/qjsengine/tst_qjsengine.cpp rename to tests/auto/qml/qjsengine/tst_qjsengine.cpp diff --git a/tests/auto/declarative/qjsvalue/qjsvalue.pro b/tests/auto/qml/qjsvalue/qjsvalue.pro similarity index 78% rename from tests/auto/declarative/qjsvalue/qjsvalue.pro rename to tests/auto/qml/qjsvalue/qjsvalue.pro index 3b40e92e67..19b983e549 100644 --- a/tests/auto/declarative/qjsvalue/qjsvalue.pro +++ b/tests/auto/qml/qjsvalue/qjsvalue.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qjsvalue macx:CONFIG -= app_bundle -QT += declarative widgets testlib +QT += qml widgets testlib SOURCES += tst_qjsvalue.cpp HEADERS += tst_qjsvalue.h diff --git a/tests/auto/declarative/qjsvalue/tst_qjsvalue.cpp b/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp similarity index 100% rename from tests/auto/declarative/qjsvalue/tst_qjsvalue.cpp rename to tests/auto/qml/qjsvalue/tst_qjsvalue.cpp diff --git a/tests/auto/declarative/qjsvalue/tst_qjsvalue.h b/tests/auto/qml/qjsvalue/tst_qjsvalue.h similarity index 100% rename from tests/auto/declarative/qjsvalue/tst_qjsvalue.h rename to tests/auto/qml/qjsvalue/tst_qjsvalue.h diff --git a/tests/auto/declarative/qjsvalueiterator/qjsvalueiterator.pro b/tests/auto/qml/qjsvalueiterator/qjsvalueiterator.pro similarity index 79% rename from tests/auto/declarative/qjsvalueiterator/qjsvalueiterator.pro rename to tests/auto/qml/qjsvalueiterator/qjsvalueiterator.pro index 9f991c0ab6..4ee1693ad8 100644 --- a/tests/auto/declarative/qjsvalueiterator/qjsvalueiterator.pro +++ b/tests/auto/qml/qjsvalueiterator/qjsvalueiterator.pro @@ -1,7 +1,7 @@ CONFIG += testcase TARGET = tst_qjsvalueiterator macx:CONFIG -= app_bundle -QT = core declarative testlib +QT = core qml testlib SOURCES += tst_qjsvalueiterator.cpp diff --git a/tests/auto/declarative/qjsvalueiterator/tst_qjsvalueiterator.cpp b/tests/auto/qml/qjsvalueiterator/tst_qjsvalueiterator.cpp similarity index 100% rename from tests/auto/declarative/qjsvalueiterator/tst_qjsvalueiterator.cpp rename to tests/auto/qml/qjsvalueiterator/tst_qjsvalueiterator.cpp diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro new file mode 100644 index 0000000000..7a62a71df1 --- /dev/null +++ b/tests/auto/qml/qml.pro @@ -0,0 +1,55 @@ +TEMPLATE = subdirs + +METATYPETESTS += \ + qqmlmetatype + +PUBLICTESTS += \ + parserstress \ + qjsengine \ + qjsvalue \ + qjsvalueiterator \ + qmlmin \ + qmlplugindump \ + qqmlcomponent \ + qqmlconsole \ + qqmlcontext \ + qqmlengine \ + qqmlerror \ + qqmlincubator \ + qqmlinfo \ + qqmllistreference \ + qqmllocale \ + qqmlmoduleplugin \ + qqmlqt \ + qqmltranslation \ + qqmlxmlhttprequest \ + qqmlparser \ + qquickfolderlistmodel + +PRIVATETESTS += \ + animation \ + qqmlcpputils \ + qqmlecmascript \ + qqmlexpression \ + qqmlimageprovider \ + qqmlinstruction \ + qqmllanguage \ + qqmlproperty \ + qqmlpropertymap \ + qqmlsqldatabase \ + qqmlvaluetypes \ + qquickbinding \ + qquickchangeset \ + qquickconnection \ + qquicklistcompositor \ + qquicklistmodel \ + qquickworkerscript \ + v4 + +SUBDIRS += $$PUBLICTESTS +SUBDIRS += $$METATYPETESTS +SUBDIRS += debugger + +contains(QT_CONFIG, private_tests) { + SUBDIRS += $$PRIVATETESTS +} diff --git a/tests/auto/declarative/qmlmin/qmlmin.pro b/tests/auto/qml/qmlmin/qmlmin.pro similarity index 85% rename from tests/auto/declarative/qmlmin/qmlmin.pro rename to tests/auto/qml/qmlmin/qmlmin.pro index 61d2330b06..49a4e7ff58 100644 --- a/tests/auto/declarative/qmlmin/qmlmin.pro +++ b/tests/auto/qml/qmlmin/qmlmin.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qmlmin -QT += declarative testlib +QT += qml testlib macx:CONFIG -= app_bundle SOURCES += tst_qmlmin.cpp diff --git a/tests/auto/declarative/qmlmin/tst_qmlmin.cpp b/tests/auto/qml/qmlmin/tst_qmlmin.cpp similarity index 74% rename from tests/auto/declarative/qmlmin/tst_qmlmin.cpp rename to tests/auto/qml/qmlmin/tst_qmlmin.cpp index c6b019071e..2d764317c5 100644 --- a/tests/auto/declarative/qmlmin/tst_qmlmin.cpp +++ b/tests/auto/qml/qmlmin/tst_qmlmin.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include class tst_qmlmin : public QObject @@ -86,29 +86,29 @@ void tst_qmlmin::initTestCase() // Add directories you want excluded here // These snippets are not expected to run on their own. - excludedDirs << "doc/src/snippets/declarative/visualdatamodel_rootindex"; - excludedDirs << "doc/src/snippets/declarative/qtbinding"; - excludedDirs << "doc/src/snippets/declarative/imports"; + excludedDirs << "doc/src/snippets/qml/visualdatamodel_rootindex"; + excludedDirs << "doc/src/snippets/qml/qtbinding"; + excludedDirs << "doc/src/snippets/qml/imports"; excludedDirs << "doc/src/snippets/qtquick1/visualdatamodel_rootindex"; excludedDirs << "doc/src/snippets/qtquick1/qtbinding"; excludedDirs << "doc/src/snippets/qtquick1/imports"; // Add invalid files (i.e. files with syntax errors) - invalidFiles << "tests/auto/qtquick2/qquickloader/data/InvalidSourceComponent.qml"; - invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml"; - invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml"; - invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/property.4.qml"; - invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/empty.qml"; - invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml"; - invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/missingObject.qml"; - invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/insertedSemicolon.1.qml"; - invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.qml"; - invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.1.qml"; - invalidFiles << "tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml"; - invalidFiles << "tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22843.js"; - invalidFiles << "tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22843.library.js"; - invalidFiles << "tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onLoad.js"; - invalidFiles << "tests/auto/declarative/parserstress/tests/ecma_3/Unicode/regress-352044-02-n.js"; + invalidFiles << "tests/auto/quick/qquickloader/data/InvalidSourceComponent.qml"; + invalidFiles << "tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.2.qml"; + invalidFiles << "tests/auto/qml/qqmllanguage/data/signal.3.qml"; + invalidFiles << "tests/auto/qml/qqmllanguage/data/property.4.qml"; + invalidFiles << "tests/auto/qml/qqmllanguage/data/empty.qml"; + invalidFiles << "tests/auto/qml/qqmllanguage/data/signal.2.qml"; + invalidFiles << "tests/auto/qml/qqmllanguage/data/missingObject.qml"; + invalidFiles << "tests/auto/qml/qqmllanguage/data/insertedSemicolon.1.qml"; + invalidFiles << "tests/auto/qml/qqmllanguage/data/nonexistantProperty.5.qml"; + invalidFiles << "tests/auto/qml/qqmllanguage/data/invalidRoot.1.qml"; + invalidFiles << "tests/auto/qml/qquickfolderlistmodel/data/dummy.qml"; + invalidFiles << "tests/auto/qml/qqmlecmascript/data/qtbug_22843.js"; + invalidFiles << "tests/auto/qml/qqmlecmascript/data/qtbug_22843.library.js"; + invalidFiles << "tests/auto/qml/qquickworkerscript/data/script_error_onLoad.js"; + invalidFiles << "tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-02-n.js"; } QStringList tst_qmlmin::findFiles(const QDir &d) @@ -148,7 +148,7 @@ bool tst_qmlmin::isInvalidFile(const QFileInfo &fileName) const } /* -This test runs all the examples in the declarative UI source tree and ensures +This test runs all the examples in the QtQml UI source tree and ensures that they start and exit cleanly. Examples are any .qml files under the examples/ directory that start diff --git a/tests/auto/declarative/qmlplugindump/qmlplugindump.pro b/tests/auto/qml/qmlplugindump/qmlplugindump.pro similarity index 100% rename from tests/auto/declarative/qmlplugindump/qmlplugindump.pro rename to tests/auto/qml/qmlplugindump/qmlplugindump.pro diff --git a/tests/auto/declarative/qmlplugindump/tst_qmlplugindump.cpp b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp similarity index 100% rename from tests/auto/declarative/qmlplugindump/tst_qmlplugindump.cpp rename to tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp diff --git a/tests/auto/declarative/qdeclarativecomponent/data/createObject.qml b/tests/auto/qml/qqmlcomponent/data/createObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativecomponent/data/createObject.qml rename to tests/auto/qml/qqmlcomponent/data/createObject.qml diff --git a/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml b/tests/auto/qml/qqmlcomponent/data/createObjectWithScript.qml similarity index 100% rename from tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml rename to tests/auto/qml/qqmlcomponent/data/createObjectWithScript.qml diff --git a/tests/auto/declarative/qdeclarativecomponent/data/incubateObject.qml b/tests/auto/qml/qqmlcomponent/data/incubateObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativecomponent/data/incubateObject.qml rename to tests/auto/qml/qqmlcomponent/data/incubateObject.qml diff --git a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro b/tests/auto/qml/qqmlcomponent/qqmlcomponent.pro similarity index 59% rename from tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro rename to tests/auto/qml/qqmlcomponent/qqmlcomponent.pro index 8acf46f7bc..7cef181a4a 100644 --- a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro +++ b/tests/auto/qml/qqmlcomponent/qqmlcomponent.pro @@ -1,15 +1,15 @@ CONFIG += testcase -TARGET = tst_qdeclarativeerror -SOURCES += tst_qdeclarativeerror.cpp - -include (../../shared/util.pri) - +TARGET = tst_qqmlcomponent macx:CONFIG -= app_bundle -CONFIG += parallel_test +SOURCES += tst_qqmlcomponent.cpp + +include (../../shared/util.pri) testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private declarative-private testlib +CONFIG += parallel_test + +QT += core-private gui-private qml-private network testlib diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp similarity index 78% rename from tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp rename to tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp index c529649fc0..d277952f22 100644 --- a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp +++ b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp @@ -41,14 +41,14 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include "../../shared/util.h" -class MyIC : public QObject, public QDeclarativeIncubationController +class MyIC : public QObject, public QQmlIncubationController { Q_OBJECT public: @@ -59,11 +59,11 @@ class MyIC : public QObject, public QDeclarativeIncubationController } }; -class tst_qdeclarativecomponent : public QDeclarativeDataTest +class tst_qqmlcomponent : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativecomponent() { engine.setIncubationController(&ic); } + tst_qqmlcomponent() { engine.setIncubationController(&ic); } private slots: void null(); @@ -73,41 +73,41 @@ private slots: void qmlIncubateObject(); private: - QDeclarativeEngine engine; + QQmlEngine engine; MyIC ic; }; -void tst_qdeclarativecomponent::null() +void tst_qqmlcomponent::null() { { - QDeclarativeComponent c; + QQmlComponent c; QVERIFY(c.isNull()); } { - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); QVERIFY(c.isNull()); } } -void tst_qdeclarativecomponent::loadEmptyUrl() +void tst_qqmlcomponent::loadEmptyUrl() { - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.loadUrl(QUrl()); QVERIFY(c.isError()); QCOMPARE(c.errors().count(), 1); - QDeclarativeError error = c.errors().first(); + QQmlError error = c.errors().first(); QCOMPARE(error.url(), QUrl()); QCOMPARE(error.line(), -1); QCOMPARE(error.column(), -1); QCOMPARE(error.description(), QLatin1String("Invalid empty URL")); } -void tst_qdeclarativecomponent::qmlIncubateObject() +void tst_qqmlcomponent::qmlIncubateObject() { - QDeclarativeComponent component(&engine, testFileUrl("incubateObject.qml")); + QQmlComponent component(&engine, testFileUrl("incubateObject.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("test1").toBool(), true); @@ -118,10 +118,10 @@ void tst_qdeclarativecomponent::qmlIncubateObject() delete object; } -void tst_qdeclarativecomponent::qmlCreateObject() +void tst_qqmlcomponent::qmlCreateObject() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("createObject.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("createObject.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -135,10 +135,10 @@ void tst_qdeclarativecomponent::qmlCreateObject() QCOMPARE(testObject2->metaObject()->className(), "QQuickItem"); } -void tst_qdeclarativecomponent::qmlCreateObjectWithProperties() +void tst_qqmlcomponent::qmlCreateObjectWithProperties() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("createObjectWithScript.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("createObjectWithScript.qml")); QVERIFY2(component.errorString().isEmpty(), component.errorString().toUtf8()); QObject *object = component.create(); QVERIFY(object != 0); @@ -149,8 +149,8 @@ void tst_qdeclarativecomponent::qmlCreateObjectWithProperties() QCOMPARE(testObject1->property("x").value(), 17); QCOMPARE(testObject1->property("y").value(), 17); QCOMPARE(testObject1->property("color").value(), QColor(255,255,255)); - QCOMPARE(QDeclarativeProperty::read(testObject1,"border.width").toInt(), 3); - QCOMPARE(QDeclarativeProperty::read(testObject1,"innerRect.border.width").toInt(), 20); + QCOMPARE(QQmlProperty::read(testObject1,"border.width").toInt(), 3); + QCOMPARE(QQmlProperty::read(testObject1,"innerRect.border.width").toInt(), 20); delete testObject1; QObject *testObject2 = object->property("declarativeitem").value(); @@ -181,6 +181,6 @@ void tst_qdeclarativecomponent::qmlCreateObjectWithProperties() delete testBindingThisObj; } -QTEST_MAIN(tst_qdeclarativecomponent) +QTEST_MAIN(tst_qqmlcomponent) -#include "tst_qdeclarativecomponent.moc" +#include "tst_qqmlcomponent.moc" diff --git a/tests/auto/declarative/qdeclarativeconsole/data/assert.qml b/tests/auto/qml/qqmlconsole/data/assert.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconsole/data/assert.qml rename to tests/auto/qml/qqmlconsole/data/assert.qml diff --git a/tests/auto/declarative/qdeclarativeconsole/data/exception.qml b/tests/auto/qml/qqmlconsole/data/exception.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconsole/data/exception.qml rename to tests/auto/qml/qqmlconsole/data/exception.qml diff --git a/tests/auto/declarative/qdeclarativeconsole/data/logging.qml b/tests/auto/qml/qqmlconsole/data/logging.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconsole/data/logging.qml rename to tests/auto/qml/qqmlconsole/data/logging.qml diff --git a/tests/auto/declarative/qdeclarativeconsole/data/profiling.qml b/tests/auto/qml/qqmlconsole/data/profiling.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconsole/data/profiling.qml rename to tests/auto/qml/qqmlconsole/data/profiling.qml diff --git a/tests/auto/declarative/qdeclarativeconsole/data/tracing.qml b/tests/auto/qml/qqmlconsole/data/tracing.qml similarity index 96% rename from tests/auto/declarative/qdeclarativeconsole/data/tracing.qml rename to tests/auto/qml/qqmlconsole/data/tracing.qml index 0d1b76359e..9586829f8f 100644 --- a/tests/auto/declarative/qdeclarativeconsole/data/tracing.qml +++ b/tests/auto/qml/qqmlconsole/data/tracing.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 -// moving lines in here requires fixing tst_qdeclarativeconsole.cpp +// moving lines in here requires fixing tst_qqmlconsole.cpp QtObject { id: root diff --git a/tests/auto/declarative/qdeclarativelocale/qdeclarativelocale.pro b/tests/auto/qml/qqmlconsole/qqmlconsole.pro similarity index 65% rename from tests/auto/declarative/qdeclarativelocale/qdeclarativelocale.pro rename to tests/auto/qml/qqmlconsole/qqmlconsole.pro index 75ff0e9504..9ae23316a1 100644 --- a/tests/auto/declarative/qdeclarativelocale/qdeclarativelocale.pro +++ b/tests/auto/qml/qqmlconsole/qqmlconsole.pro @@ -1,15 +1,15 @@ CONFIG += testcase -TARGET = tst_qdeclarativelocale -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativelocale.cpp +TARGET = tst_qqmlconsole +SOURCES += tst_qqmlconsole.cpp include (../../shared/util.pri) +macx:CONFIG -= app_bundle + testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += declarative testlib +QT += qml testlib diff --git a/tests/auto/declarative/qdeclarativeconsole/tst_qdeclarativeconsole.cpp b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp similarity index 87% rename from tests/auto/declarative/qdeclarativeconsole/tst_qdeclarativeconsole.cpp rename to tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp index f5788dcf55..d96da678e2 100644 --- a/tests/auto/declarative/qdeclarativeconsole/tst_qdeclarativeconsole.cpp +++ b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp @@ -40,15 +40,15 @@ ****************************************************************************/ #include #include -#include -#include +#include +#include #include "../../shared/util.h" -class tst_qdeclarativeconsole : public QDeclarativeDataTest +class tst_qqmlconsole : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativeconsole() {} + tst_qqmlconsole() {} private slots: void logging(); @@ -58,10 +58,10 @@ private slots: void exception(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -void tst_qdeclarativeconsole::logging() +void tst_qqmlconsole::logging() { QUrl testUrl = testFileUrl("logging.qml"); @@ -87,13 +87,13 @@ void tst_qdeclarativeconsole::logging() QTest::ignoreMessage(QtDebugMsg, "1 pong! Object"); QTest::ignoreMessage(QtDebugMsg, "1 [ping,pong] Object 2"); - QDeclarativeComponent component(&engine, testUrl); + QQmlComponent component(&engine, testUrl); QObject *object = component.create(); QVERIFY(object != 0); delete object; } -void tst_qdeclarativeconsole::tracing() +void tst_qqmlconsole::tracing() { QUrl testUrl = testFileUrl("tracing.qml"); @@ -103,13 +103,13 @@ void tst_qdeclarativeconsole::tracing() QTest::ignoreMessage(QtDebugMsg, qPrintable(traceText)); - QDeclarativeComponent component(&engine, testUrl); + QQmlComponent component(&engine, testUrl); QObject *object = component.create(); QVERIFY(object != 0); delete object; } -void tst_qdeclarativeconsole::profiling() +void tst_qqmlconsole::profiling() { QUrl testUrl = testFileUrl("profiling.qml"); @@ -117,13 +117,13 @@ void tst_qdeclarativeconsole::profiling() QTest::ignoreMessage(QtDebugMsg, "Profiling started."); QTest::ignoreMessage(QtDebugMsg, "Profiling ended."); - QDeclarativeComponent component(&engine, testUrl); + QQmlComponent component(&engine, testUrl); QObject *object = component.create(); QVERIFY(object != 0); delete object; } -void tst_qdeclarativeconsole::assert() +void tst_qqmlconsole::assert() { QUrl testUrl = testFileUrl("assert.qml"); @@ -138,13 +138,13 @@ void tst_qdeclarativeconsole::assert() QTest::ignoreMessage(QtCriticalMsg, qPrintable(assert1)); QTest::ignoreMessage(QtCriticalMsg, qPrintable(assert2)); - QDeclarativeComponent component(&engine, testUrl); + QQmlComponent component(&engine, testUrl); QObject *object = component.create(); QVERIFY(object != 0); delete object; } -void tst_qdeclarativeconsole::exception() +void tst_qqmlconsole::exception() { QUrl testUrl = testFileUrl("exception.qml"); @@ -159,12 +159,12 @@ void tst_qdeclarativeconsole::exception() QTest::ignoreMessage(QtCriticalMsg, qPrintable(exception1)); QTest::ignoreMessage(QtCriticalMsg, qPrintable(exception2)); - QDeclarativeComponent component(&engine, testUrl); + QQmlComponent component(&engine, testUrl); QObject *object = component.create(); QVERIFY(object != 0); delete object; } -QTEST_MAIN(tst_qdeclarativeconsole) +QTEST_MAIN(tst_qqmlconsole) -#include "tst_qdeclarativeconsole.moc" +#include "tst_qqmlconsole.moc" diff --git a/tests/auto/declarative/qdeclarativecontext/data/Object_22535.qml b/tests/auto/qml/qqmlcontext/data/Object_22535.qml similarity index 100% rename from tests/auto/declarative/qdeclarativecontext/data/Object_22535.qml rename to tests/auto/qml/qqmlcontext/data/Object_22535.qml diff --git a/tests/auto/declarative/qdeclarativecontext/data/RefreshExpressionsType.qml b/tests/auto/qml/qqmlcontext/data/RefreshExpressionsType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativecontext/data/RefreshExpressionsType.qml rename to tests/auto/qml/qqmlcontext/data/RefreshExpressionsType.qml diff --git a/tests/auto/declarative/qdeclarativecontext/data/qtbug_22535.qml b/tests/auto/qml/qqmlcontext/data/qtbug_22535.qml similarity index 100% rename from tests/auto/declarative/qdeclarativecontext/data/qtbug_22535.qml rename to tests/auto/qml/qqmlcontext/data/qtbug_22535.qml diff --git a/tests/auto/declarative/qdeclarativecontext/data/refreshExpressions.qml b/tests/auto/qml/qqmlcontext/data/refreshExpressions.qml similarity index 100% rename from tests/auto/declarative/qdeclarativecontext/data/refreshExpressions.qml rename to tests/auto/qml/qqmlcontext/data/refreshExpressions.qml diff --git a/tests/auto/declarative/qdeclarativecontext/data/refreshExpressionsRootContext.qml b/tests/auto/qml/qqmlcontext/data/refreshExpressionsRootContext.qml similarity index 100% rename from tests/auto/declarative/qdeclarativecontext/data/refreshExpressionsRootContext.qml rename to tests/auto/qml/qqmlcontext/data/refreshExpressionsRootContext.qml diff --git a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro b/tests/auto/qml/qqmlcontext/qqmlcontext.pro similarity index 57% rename from tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro rename to tests/auto/qml/qqmlcontext/qqmlcontext.pro index af4667184f..9920766d61 100644 --- a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro +++ b/tests/auto/qml/qqmlcontext/qqmlcontext.pro @@ -1,14 +1,15 @@ CONFIG += testcase -TARGET = tst_qdeclarativeinfo -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativeinfo.cpp +TARGET = tst_qqmlcontext +SOURCES += tst_qqmlcontext.cpp include (../../shared/util.pri) +macx:CONFIG -= app_bundle + testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private widgets testlib + +QT += core-private gui-private qml-private testlib v8-private diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp similarity index 73% rename from tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp rename to tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp index 05db898045..6125362365 100644 --- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp +++ b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp @@ -41,18 +41,18 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "../../shared/util.h" -class tst_qdeclarativecontext : public QDeclarativeDataTest +class tst_qqmlcontext : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativecontext() {} + tst_qqmlcontext() {} private slots: void baseUrl(); @@ -72,12 +72,12 @@ private slots: void qtbug_22535(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -void tst_qdeclarativecontext::baseUrl() +void tst_qqmlcontext::baseUrl() { - QDeclarativeContext ctxt(&engine); + QQmlContext ctxt(&engine); QCOMPARE(ctxt.baseUrl(), QUrl()); @@ -86,11 +86,11 @@ void tst_qdeclarativecontext::baseUrl() QCOMPARE(ctxt.baseUrl(), QUrl("http://www.nokia.com/")); } -void tst_qdeclarativecontext::resolvedUrl() +void tst_qqmlcontext::resolvedUrl() { // Relative to the component { - QDeclarativeContext ctxt(&engine); + QQmlContext ctxt(&engine); ctxt.setBaseUrl(QUrl("http://www.nokia.com/")); QCOMPARE(ctxt.resolvedUrl(QUrl("main.qml")), QUrl("http://www.nokia.com/main.qml")); @@ -98,25 +98,25 @@ void tst_qdeclarativecontext::resolvedUrl() // Relative to a parent { - QDeclarativeContext ctxt(&engine); + QQmlContext ctxt(&engine); ctxt.setBaseUrl(QUrl("http://www.nokia.com/")); - QDeclarativeContext ctxt2(&ctxt); + QQmlContext ctxt2(&ctxt); QCOMPARE(ctxt2.resolvedUrl(QUrl("main2.qml")), QUrl("http://www.nokia.com/main2.qml")); } // Relative to the engine { - QDeclarativeContext ctxt(&engine); + QQmlContext ctxt(&engine); QCOMPARE(ctxt.resolvedUrl(QUrl("main.qml")), engine.baseUrl().resolved(QUrl("main.qml"))); } // Relative to a deleted parent { - QDeclarativeContext *ctxt = new QDeclarativeContext(&engine); + QQmlContext *ctxt = new QQmlContext(&engine); ctxt->setBaseUrl(QUrl("http://www.nokia.com/")); - QDeclarativeContext ctxt2(ctxt); + QQmlContext ctxt2(ctxt); QCOMPARE(ctxt2.resolvedUrl(QUrl("main2.qml")), QUrl("http://www.nokia.com/main2.qml")); delete ctxt; ctxt = 0; @@ -126,21 +126,21 @@ void tst_qdeclarativecontext::resolvedUrl() // Absolute { - QDeclarativeContext ctxt(&engine); + QQmlContext ctxt(&engine); QCOMPARE(ctxt.resolvedUrl(QUrl("http://www.nokia.com/main2.qml")), QUrl("http://www.nokia.com/main2.qml")); QCOMPARE(ctxt.resolvedUrl(QUrl("file:///main2.qml")), QUrl("file:///main2.qml")); } } -void tst_qdeclarativecontext::engineMethod() +void tst_qqmlcontext::engineMethod() { - QDeclarativeEngine *engine = new QDeclarativeEngine; + QQmlEngine *engine = new QQmlEngine; - QDeclarativeContext ctxt(engine); - QDeclarativeContext ctxt2(&ctxt); - QDeclarativeContext ctxt3(&ctxt2); - QDeclarativeContext ctxt4(&ctxt2); + QQmlContext ctxt(engine); + QQmlContext ctxt2(&ctxt); + QQmlContext ctxt3(&ctxt2); + QQmlContext ctxt4(&ctxt2); QCOMPARE(ctxt.engine(), engine); QCOMPARE(ctxt2.engine(), engine); @@ -155,19 +155,19 @@ void tst_qdeclarativecontext::engineMethod() QCOMPARE(ctxt4.engine(), engine); } -void tst_qdeclarativecontext::parentContext() +void tst_qqmlcontext::parentContext() { - QDeclarativeEngine *engine = new QDeclarativeEngine; + QQmlEngine *engine = new QQmlEngine; - QCOMPARE(engine->rootContext()->parentContext(), (QDeclarativeContext *)0); + QCOMPARE(engine->rootContext()->parentContext(), (QQmlContext *)0); - QDeclarativeContext *ctxt = new QDeclarativeContext(engine); - QDeclarativeContext *ctxt2 = new QDeclarativeContext(ctxt); - QDeclarativeContext *ctxt3 = new QDeclarativeContext(ctxt2); - QDeclarativeContext *ctxt4 = new QDeclarativeContext(ctxt2); - QDeclarativeContext *ctxt5 = new QDeclarativeContext(ctxt); - QDeclarativeContext *ctxt6 = new QDeclarativeContext(engine); - QDeclarativeContext *ctxt7 = new QDeclarativeContext(engine->rootContext()); + QQmlContext *ctxt = new QQmlContext(engine); + QQmlContext *ctxt2 = new QQmlContext(ctxt); + QQmlContext *ctxt3 = new QQmlContext(ctxt2); + QQmlContext *ctxt4 = new QQmlContext(ctxt2); + QQmlContext *ctxt5 = new QQmlContext(ctxt); + QQmlContext *ctxt6 = new QQmlContext(engine); + QQmlContext *ctxt7 = new QQmlContext(engine->rootContext()); QCOMPARE(ctxt->parentContext(), engine->rootContext()); QCOMPARE(ctxt2->parentContext(), ctxt); @@ -180,20 +180,20 @@ void tst_qdeclarativecontext::parentContext() delete ctxt2; ctxt2 = 0; QCOMPARE(ctxt->parentContext(), engine->rootContext()); - QCOMPARE(ctxt3->parentContext(), (QDeclarativeContext *)0); - QCOMPARE(ctxt4->parentContext(), (QDeclarativeContext *)0); + QCOMPARE(ctxt3->parentContext(), (QQmlContext *)0); + QCOMPARE(ctxt4->parentContext(), (QQmlContext *)0); QCOMPARE(ctxt5->parentContext(), ctxt); QCOMPARE(ctxt6->parentContext(), engine->rootContext()); QCOMPARE(ctxt7->parentContext(), engine->rootContext()); delete engine; engine = 0; - QCOMPARE(ctxt->parentContext(), (QDeclarativeContext *)0); - QCOMPARE(ctxt3->parentContext(), (QDeclarativeContext *)0); - QCOMPARE(ctxt4->parentContext(), (QDeclarativeContext *)0); - QCOMPARE(ctxt5->parentContext(), (QDeclarativeContext *)0); - QCOMPARE(ctxt6->parentContext(), (QDeclarativeContext *)0); - QCOMPARE(ctxt7->parentContext(), (QDeclarativeContext *)0); + QCOMPARE(ctxt->parentContext(), (QQmlContext *)0); + QCOMPARE(ctxt3->parentContext(), (QQmlContext *)0); + QCOMPARE(ctxt4->parentContext(), (QQmlContext *)0); + QCOMPARE(ctxt5->parentContext(), (QQmlContext *)0); + QCOMPARE(ctxt6->parentContext(), (QQmlContext *)0); + QCOMPARE(ctxt7->parentContext(), (QQmlContext *)0); delete ctxt7; delete ctxt6; @@ -235,7 +235,7 @@ class TestObject : public QObject #define TEST_CONTEXT_PROPERTY(ctxt, name, value) \ { \ - QDeclarativeComponent component(&engine); \ + QQmlComponent component(&engine); \ component.setData("import QtQuick 2.0; QtObject { property variant test: " #name " }", QUrl()); \ \ QObject *obj = component.create(ctxt); \ @@ -245,10 +245,10 @@ class TestObject : public QObject delete obj; \ } -void tst_qdeclarativecontext::setContextProperty() +void tst_qqmlcontext::setContextProperty() { - QDeclarativeContext ctxt(&engine); - QDeclarativeContext ctxt2(&ctxt); + QQmlContext ctxt(&engine); + QQmlContext ctxt2(&ctxt); TestObject obj1; obj1.setA(3345); @@ -285,7 +285,7 @@ void tst_qdeclarativecontext::setContextProperty() // Changes in context properties { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { property variant test: a }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -297,7 +297,7 @@ void tst_qdeclarativecontext::setContextProperty() delete obj; } { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { property variant test: b }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -311,7 +311,7 @@ void tst_qdeclarativecontext::setContextProperty() delete obj; } { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { property variant test: e.a }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -325,7 +325,7 @@ void tst_qdeclarativecontext::setContextProperty() // New context properties { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { property variant test: a }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -339,10 +339,10 @@ void tst_qdeclarativecontext::setContextProperty() // Setting an object-variant context property { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { id: root; property int a: 10; property int test: ctxtProp.a; property variant obj: root; }", QUrl()); - QDeclarativeContext ctxt(engine.rootContext()); + QQmlContext ctxt(engine.rootContext()); ctxt.setContextProperty("ctxtProp", QVariant()); QTest::ignoreMessage(QtWarningMsg, ":1: TypeError: Cannot read property 'a' of undefined"); @@ -358,9 +358,9 @@ void tst_qdeclarativecontext::setContextProperty() } } -void tst_qdeclarativecontext::setContextObject() +void tst_qqmlcontext::setContextObject() { - QDeclarativeContext ctxt(&engine); + QQmlContext ctxt(&engine); TestObject to; @@ -387,7 +387,7 @@ void tst_qdeclarativecontext::setContextObject() // Changes in context properties { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { property variant test: a }", QUrl()); QObject *obj = component.create(&ctxt); @@ -400,26 +400,26 @@ void tst_qdeclarativecontext::setContextObject() } } -void tst_qdeclarativecontext::destruction() +void tst_qqmlcontext::destruction() { - QDeclarativeContext *ctxt = new QDeclarativeContext(&engine); + QQmlContext *ctxt = new QQmlContext(&engine); QObject obj; - QDeclarativeEngine::setContextForObject(&obj, ctxt); - QDeclarativeExpression expr(ctxt, 0, "a"); + QQmlEngine::setContextForObject(&obj, ctxt); + QQmlExpression expr(ctxt, 0, "a"); - QCOMPARE(ctxt, QDeclarativeEngine::contextForObject(&obj)); + QCOMPARE(ctxt, QQmlEngine::contextForObject(&obj)); QCOMPARE(ctxt, expr.context()); delete ctxt; ctxt = 0; - QCOMPARE(ctxt, QDeclarativeEngine::contextForObject(&obj)); + QCOMPARE(ctxt, QQmlEngine::contextForObject(&obj)); QCOMPARE(ctxt, expr.context()); } -void tst_qdeclarativecontext::idAsContextProperty() +void tst_qqmlcontext::idAsContextProperty() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { property variant a; a: QtObject { id: myObject } }", QUrl()); QObject *obj = component.create(); @@ -437,42 +437,42 @@ void tst_qdeclarativecontext::idAsContextProperty() } // Internal contexts should be read-only -void tst_qdeclarativecontext::readOnlyContexts() +void tst_qqmlcontext::readOnlyContexts() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { id: me }", QUrl()); QObject *obj = component.create(); QVERIFY(obj); - QDeclarativeContext *context = qmlContext(obj); + QQmlContext *context = qmlContext(obj); QVERIFY(context); QVERIFY(qvariant_cast(context->contextProperty("me")) == obj); QVERIFY(context->contextObject() == obj); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeContext: Cannot set property on internal context."); + QTest::ignoreMessage(QtWarningMsg, "QQmlContext: Cannot set property on internal context."); context->setContextProperty("hello", 12); QVERIFY(context->contextProperty("hello") == QVariant()); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeContext: Cannot set property on internal context."); + QTest::ignoreMessage(QtWarningMsg, "QQmlContext: Cannot set property on internal context."); context->setContextProperty("hello", obj); QVERIFY(context->contextProperty("hello") == QVariant()); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeContext: Cannot set context object for internal context."); + QTest::ignoreMessage(QtWarningMsg, "QQmlContext: Cannot set context object for internal context."); context->setContextObject(0); QVERIFY(context->contextObject() == obj); delete obj; } -void tst_qdeclarativecontext::nameForObject() +void tst_qqmlcontext::nameForObject() { QObject o1; QObject o2; QObject o3; - QDeclarativeEngine engine; + QQmlEngine engine; // As a context property engine.rootContext()->setContextProperty("o1", &o1); @@ -484,7 +484,7 @@ void tst_qdeclarativecontext::nameForObject() QCOMPARE(engine.rootContext()->nameForObject(&o3), QString()); // As an id - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { id: root; property QtObject o: QtObject { id: nested } }", QUrl()); QObject *o = component.create(); @@ -511,18 +511,18 @@ public slots: // Calling refresh expressions would crash if an expression or context was deleted during // the refreshing -void tst_qdeclarativecontext::refreshExpressionsCrash() +void tst_qqmlcontext::refreshExpressionsCrash() { { - QDeclarativeEngine engine; + QQmlEngine engine; DeleteCommand command; engine.rootContext()->setContextProperty("deleteCommand", &command); // We use a fresh context here to bypass any root-context optimizations in // the engine - QDeclarativeContext ctxt(engine.rootContext()); + QQmlContext ctxt(engine.rootContext()); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { property var binding: deleteCommand.doCommand() }", QUrl()); QVERIFY(component.isReady()); @@ -531,20 +531,20 @@ void tst_qdeclarativecontext::refreshExpressionsCrash() command.object = o2; - QDeclarativeContextData::get(&ctxt)->refreshExpressions(); + QQmlContextData::get(&ctxt)->refreshExpressions(); delete o1; } { - QDeclarativeEngine engine; + QQmlEngine engine; DeleteCommand command; engine.rootContext()->setContextProperty("deleteCommand", &command); // We use a fresh context here to bypass any root-context optimizations in // the engine - QDeclarativeContext ctxt(engine.rootContext()); + QQmlContext ctxt(engine.rootContext()); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { property var binding: deleteCommand.doCommand() }", QUrl()); QVERIFY(component.isReady()); @@ -553,7 +553,7 @@ void tst_qdeclarativecontext::refreshExpressionsCrash() command.object = o1; - QDeclarativeContextData::get(&ctxt)->refreshExpressions(); + QQmlContextData::get(&ctxt)->refreshExpressions(); delete o2; } @@ -573,19 +573,19 @@ public slots: // Test that calling refresh expressions causes all the expressions to refresh -void tst_qdeclarativecontext::refreshExpressions() +void tst_qqmlcontext::refreshExpressions() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("refreshExpressions.qml")); - QDeclarativeComponent component2(&engine, testFileUrl("RefreshExpressionsType.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("refreshExpressions.qml")); + QQmlComponent component2(&engine, testFileUrl("RefreshExpressionsType.qml")); CountCommand command; engine.rootContext()->setContextProperty("countCommand", &command); // We use a fresh context here to bypass any root-context optimizations in // the engine - QDeclarativeContext context(engine.rootContext()); - QDeclarativeContext context2(&context); + QQmlContext context(engine.rootContext()); + QQmlContext context2(&context); QObject *o1 = component.create(&context); QObject *o2 = component.create(&context2); @@ -593,7 +593,7 @@ void tst_qdeclarativecontext::refreshExpressions() QCOMPARE(command.count, 5); - QDeclarativeContextData::get(&context)->refreshExpressions(); + QQmlContextData::get(&context)->refreshExpressions(); QCOMPARE(command.count, 10); @@ -604,18 +604,18 @@ void tst_qdeclarativecontext::refreshExpressions() // Test that updating the root context, only causes expressions in contexts with an // unresolved name to reevaluate -void tst_qdeclarativecontext::refreshExpressionsRootContext() +void tst_qqmlcontext::refreshExpressionsRootContext() { - QDeclarativeEngine engine; + QQmlEngine engine; CountCommand command; engine.rootContext()->setContextProperty("countCommand", &command); - QDeclarativeComponent component(&engine, testFileUrl("refreshExpressions.qml")); - QDeclarativeComponent component2(&engine, testFileUrl("refreshExpressionsRootContext.qml")); + QQmlComponent component(&engine, testFileUrl("refreshExpressions.qml")); + QQmlComponent component2(&engine, testFileUrl("refreshExpressionsRootContext.qml")); - QDeclarativeContext context(engine.rootContext()); - QDeclarativeContext context2(engine.rootContext()); + QQmlContext context(engine.rootContext()); + QQmlContext context2(engine.rootContext()); QString warning = component2.url().toString() + QLatin1String(":4: ReferenceError: Can't find variable: unresolvedName"); @@ -627,7 +627,7 @@ void tst_qdeclarativecontext::refreshExpressionsRootContext() QCOMPARE(command.count, 3); QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); - QDeclarativeContextData::get(engine.rootContext())->refreshExpressions(); + QQmlContextData::get(engine.rootContext())->refreshExpressions(); QCOMPARE(command.count, 4); @@ -635,11 +635,11 @@ void tst_qdeclarativecontext::refreshExpressionsRootContext() delete o1; } -void tst_qdeclarativecontext::qtbug_22535() +void tst_qqmlcontext::qtbug_22535() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("qtbug_22535.qml")); - QDeclarativeContext context(engine.rootContext()); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("qtbug_22535.qml")); + QQmlContext context(engine.rootContext()); QObject *o = component.create(&context); @@ -647,6 +647,6 @@ void tst_qdeclarativecontext::qtbug_22535() delete o; } -QTEST_MAIN(tst_qdeclarativecontext) +QTEST_MAIN(tst_qqmlcontext) -#include "tst_qdeclarativecontext.moc" +#include "tst_qqmlcontext.moc" diff --git a/tests/auto/qml/qqmlcpputils/qqmlcpputils.pro b/tests/auto/qml/qqmlcpputils/qqmlcpputils.pro new file mode 100644 index 0000000000..1c088860e5 --- /dev/null +++ b/tests/auto/qml/qqmlcpputils/qqmlcpputils.pro @@ -0,0 +1,9 @@ +CONFIG += testcase +TARGET = tst_qqmlcpputils +macx:CONFIG -= app_bundle + +SOURCES += tst_qqmlcpputils.cpp + +CONFIG += parallel_test + +QT += core-private gui-private qml-private testlib diff --git a/tests/auto/declarative/qdeclarativecpputils/tst_qdeclarativecpputils.cpp b/tests/auto/qml/qqmlcpputils/tst_qqmlcpputils.cpp similarity index 90% rename from tests/auto/declarative/qdeclarativecpputils/tst_qdeclarativecpputils.cpp rename to tests/auto/qml/qqmlcpputils/tst_qqmlcpputils.cpp index dbd877b2d5..186b82a0a8 100644 --- a/tests/auto/declarative/qdeclarativecpputils/tst_qdeclarativecpputils.cpp +++ b/tests/auto/qml/qqmlcpputils/tst_qqmlcpputils.cpp @@ -41,13 +41,13 @@ #include #include -#include +#include -class tst_qdeclarativecpputils : public QObject +class tst_qqmlcpputils : public QObject { Q_OBJECT public: - tst_qdeclarativecpputils() {} + tst_qqmlcpputils() {} private slots: void fastConnect(); @@ -57,7 +57,7 @@ class MyObject : public QObject { Q_OBJECT public: MyObject() : slotCount(0) {} - friend class tst_qdeclarativecpputils; + friend class tst_qqmlcpputils; int slotCount; @@ -69,7 +69,7 @@ public slots: void slot1() { slotCount++; } }; -void tst_qdeclarativecpputils::fastConnect() +void tst_qqmlcpputils::fastConnect() { { MyObject *obj = new MyObject; @@ -101,6 +101,6 @@ void tst_qdeclarativecpputils::fastConnect() } } -QTEST_MAIN(tst_qdeclarativecpputils) +QTEST_MAIN(tst_qqmlcpputils) -#include "tst_qdeclarativecpputils.moc" +#include "tst_qqmlcpputils.moc" diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/AliasBindingsAssignCorrectlyType.qml b/tests/auto/qml/qqmlecmascript/data/AliasBindingsAssignCorrectlyType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/AliasBindingsAssignCorrectlyType.qml rename to tests/auto/qml/qqmlecmascript/data/AliasBindingsAssignCorrectlyType.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/AliasBindingsOverrideTargetType.qml b/tests/auto/qml/qqmlecmascript/data/AliasBindingsOverrideTargetType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/AliasBindingsOverrideTargetType.qml rename to tests/auto/qml/qqmlecmascript/data/AliasBindingsOverrideTargetType.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/AliasBindingsOverrideTargetType3.qml b/tests/auto/qml/qqmlecmascript/data/AliasBindingsOverrideTargetType3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/AliasBindingsOverrideTargetType3.qml rename to tests/auto/qml/qqmlecmascript/data/AliasBindingsOverrideTargetType3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/AliasToCompositeElementType1.qml b/tests/auto/qml/qqmlecmascript/data/AliasToCompositeElementType1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/AliasToCompositeElementType1.qml rename to tests/auto/qml/qqmlecmascript/data/AliasToCompositeElementType1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/AliasToCompositeElementType2.qml b/tests/auto/qml/qqmlecmascript/data/AliasToCompositeElementType2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/AliasToCompositeElementType2.qml rename to tests/auto/qml/qqmlecmascript/data/AliasToCompositeElementType2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ConstantsOverrideBindings.qml b/tests/auto/qml/qqmlecmascript/data/ConstantsOverrideBindings.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/ConstantsOverrideBindings.qml rename to tests/auto/qml/qqmlecmascript/data/ConstantsOverrideBindings.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml b/tests/auto/qml/qqmlecmascript/data/CustomObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml rename to tests/auto/qml/qqmlecmascript/data/CustomObject.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ElementAssignType.qml b/tests/auto/qml/qqmlecmascript/data/ElementAssignType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/ElementAssignType.qml rename to tests/auto/qml/qqmlecmascript/data/ElementAssignType.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml b/tests/auto/qml/qqmlecmascript/data/MethodsObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml rename to tests/auto/qml/qqmlecmascript/data/MethodsObject.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml b/tests/auto/qml/qqmlecmascript/data/NestedTypeTransientErrors.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml rename to tests/auto/qml/qqmlecmascript/data/NestedTypeTransientErrors.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarBaseItem.qml b/tests/auto/qml/qqmlecmascript/data/PropertyVarBaseItem.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarBaseItem.qml rename to tests/auto/qml/qqmlecmascript/data/PropertyVarBaseItem.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarCircularComponent.qml b/tests/auto/qml/qqmlecmascript/data/PropertyVarCircularComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarCircularComponent.qml rename to tests/auto/qml/qqmlecmascript/data/PropertyVarCircularComponent.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarCircularComponent2.qml b/tests/auto/qml/qqmlecmascript/data/PropertyVarCircularComponent2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarCircularComponent2.qml rename to tests/auto/qml/qqmlecmascript/data/PropertyVarCircularComponent2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarCircularComponent3.qml b/tests/auto/qml/qqmlecmascript/data/PropertyVarCircularComponent3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarCircularComponent3.qml rename to tests/auto/qml/qqmlecmascript/data/PropertyVarCircularComponent3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarCircularComponent4.qml b/tests/auto/qml/qqmlecmascript/data/PropertyVarCircularComponent4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarCircularComponent4.qml rename to tests/auto/qml/qqmlecmascript/data/PropertyVarCircularComponent4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarCircularComponent5.qml b/tests/auto/qml/qqmlecmascript/data/PropertyVarCircularComponent5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarCircularComponent5.qml rename to tests/auto/qml/qqmlecmascript/data/PropertyVarCircularComponent5.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarInheritanceComponent.qml b/tests/auto/qml/qqmlecmascript/data/PropertyVarInheritanceComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarInheritanceComponent.qml rename to tests/auto/qml/qqmlecmascript/data/PropertyVarInheritanceComponent.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarOwnershipComponent.qml b/tests/auto/qml/qqmlecmascript/data/PropertyVarOwnershipComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/PropertyVarOwnershipComponent.qml rename to tests/auto/qml/qqmlecmascript/data/PropertyVarOwnershipComponent.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ScarceResourceSignalComponentVar.qml b/tests/auto/qml/qqmlecmascript/data/ScarceResourceSignalComponentVar.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/ScarceResourceSignalComponentVar.qml rename to tests/auto/qml/qqmlecmascript/data/ScarceResourceSignalComponentVar.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ScarceResourceSignalComponentVariant.qml b/tests/auto/qml/qqmlecmascript/data/ScarceResourceSignalComponentVariant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/ScarceResourceSignalComponentVariant.qml rename to tests/auto/qml/qqmlecmascript/data/ScarceResourceSignalComponentVariant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ScarceResourceVarComponent.qml b/tests/auto/qml/qqmlecmascript/data/ScarceResourceVarComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/ScarceResourceVarComponent.qml rename to tests/auto/qml/qqmlecmascript/data/ScarceResourceVarComponent.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/Scope6Nested.qml b/tests/auto/qml/qqmlecmascript/data/Scope6Nested.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/Scope6Nested.qml rename to tests/auto/qml/qqmlecmascript/data/Scope6Nested.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml b/tests/auto/qml/qqmlecmascript/data/ScopeObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml rename to tests/auto/qml/qqmlecmascript/data/ScopeObject.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/SequenceConversionComponent.qml b/tests/auto/qml/qqmlecmascript/data/SequenceConversionComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/SequenceConversionComponent.qml rename to tests/auto/qml/qqmlecmascript/data/SequenceConversionComponent.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml b/tests/auto/qml/qqmlecmascript/data/SpuriousWarning.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml rename to tests/auto/qml/qqmlecmascript/data/SpuriousWarning.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/TypeForDynamicCreation.qml b/tests/auto/qml/qqmlecmascript/data/TypeForDynamicCreation.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/TypeForDynamicCreation.qml rename to tests/auto/qml/qqmlecmascript/data/TypeForDynamicCreation.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasBindingsAssignCorrectly.qml b/tests/auto/qml/qqmlecmascript/data/aliasBindingsAssignCorrectly.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasBindingsAssignCorrectly.qml rename to tests/auto/qml/qqmlecmascript/data/aliasBindingsAssignCorrectly.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasBindingsOverrideTarget.2.qml b/tests/auto/qml/qqmlecmascript/data/aliasBindingsOverrideTarget.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasBindingsOverrideTarget.2.qml rename to tests/auto/qml/qqmlecmascript/data/aliasBindingsOverrideTarget.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasBindingsOverrideTarget.3.qml b/tests/auto/qml/qqmlecmascript/data/aliasBindingsOverrideTarget.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasBindingsOverrideTarget.3.qml rename to tests/auto/qml/qqmlecmascript/data/aliasBindingsOverrideTarget.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasBindingsOverrideTarget.qml b/tests/auto/qml/qqmlecmascript/data/aliasBindingsOverrideTarget.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasBindingsOverrideTarget.qml rename to tests/auto/qml/qqmlecmascript/data/aliasBindingsOverrideTarget.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml b/tests/auto/qml/qqmlecmascript/data/aliasPropertyAndBinding.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml rename to tests/auto/qml/qqmlecmascript/data/aliasPropertyAndBinding.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasToCompositeElement.qml b/tests/auto/qml/qqmlecmascript/data/aliasToCompositeElement.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasToCompositeElement.qml rename to tests/auto/qml/qqmlecmascript/data/aliasToCompositeElement.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasWritesOverrideBindings.2.qml b/tests/auto/qml/qqmlecmascript/data/aliasWritesOverrideBindings.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasWritesOverrideBindings.2.qml rename to tests/auto/qml/qqmlecmascript/data/aliasWritesOverrideBindings.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasWritesOverrideBindings.3.qml b/tests/auto/qml/qqmlecmascript/data/aliasWritesOverrideBindings.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasWritesOverrideBindings.3.qml rename to tests/auto/qml/qqmlecmascript/data/aliasWritesOverrideBindings.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasWritesOverrideBindings.qml b/tests/auto/qml/qqmlecmascript/data/aliasWritesOverrideBindings.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasWritesOverrideBindings.qml rename to tests/auto/qml/qqmlecmascript/data/aliasWritesOverrideBindings.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/AliasPropertyComponent.qml b/tests/auto/qml/qqmlecmascript/data/aliasreset/AliasPropertyComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/AliasPropertyComponent.qml rename to tests/auto/qml/qqmlecmascript/data/aliasreset/AliasPropertyComponent.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.1.qml b/tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.1.qml rename to tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.2.qml b/tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.2.qml rename to tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.3.qml b/tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.3.qml rename to tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.4.qml b/tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.4.qml rename to tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.5.qml b/tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.5.qml rename to tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.5.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.error.1.qml b/tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.error.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/aliasreset/aliasPropertyReset.error.1.qml rename to tests/auto/qml/qqmlecmascript/data/aliasreset/aliasPropertyReset.error.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.2.qml b/tests/auto/qml/qqmlecmascript/data/assignBasicTypes.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.2.qml rename to tests/auto/qml/qqmlecmascript/data/assignBasicTypes.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml b/tests/auto/qml/qqmlecmascript/data/assignBasicTypes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml rename to tests/auto/qml/qqmlecmascript/data/assignBasicTypes.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.1.qml b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.1.qml rename to tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.2.qml b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.2.qml rename to tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.3.qml b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.3.qml rename to tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.4.qml b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.4.qml rename to tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.5.qml b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.5.qml rename to tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.5.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.6.qml b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.6.qml rename to tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.6.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.7.qml b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.7.qml rename to tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.7.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.2.qml b/tests/auto/qml/qqmlecmascript/data/attachedProperty.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.2.qml rename to tests/auto/qml/qqmlecmascript/data/attachedProperty.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.qml b/tests/auto/qml/qqmlecmascript/data/attachedProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.qml rename to tests/auto/qml/qqmlecmascript/data/attachedProperty.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml b/tests/auto/qml/qqmlecmascript/data/attachedPropertyScope.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml rename to tests/auto/qml/qqmlecmascript/data/attachedPropertyScope.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/automaticSemicolon.qml b/tests/auto/qml/qqmlecmascript/data/automaticSemicolon.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/automaticSemicolon.qml rename to tests/auto/qml/qqmlecmascript/data/automaticSemicolon.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/bindingLoop.qml b/tests/auto/qml/qqmlecmascript/data/bindingLoop.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/bindingLoop.qml rename to tests/auto/qml/qqmlecmascript/data/bindingLoop.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/blank.js b/tests/auto/qml/qqmlecmascript/data/blank.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/blank.js rename to tests/auto/qml/qqmlecmascript/data/blank.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.1.qml b/tests/auto/qml/qqmlecmascript/data/boolPropertiesEvaluateAsBool.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.1.qml rename to tests/auto/qml/qqmlecmascript/data/boolPropertiesEvaluateAsBool.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.2.qml b/tests/auto/qml/qqmlecmascript/data/boolPropertiesEvaluateAsBool.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.2.qml rename to tests/auto/qml/qqmlecmascript/data/boolPropertiesEvaluateAsBool.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/booleanConversion.qml b/tests/auto/qml/qqmlecmascript/data/booleanConversion.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/booleanConversion.qml rename to tests/auto/qml/qqmlecmascript/data/booleanConversion.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml b/tests/auto/qml/qqmlecmascript/data/bug.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml rename to tests/auto/qml/qqmlecmascript/data/bug.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.1.qml b/tests/auto/qml/qqmlecmascript/data/canAssignNullToQObject.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.1.qml rename to tests/auto/qml/qqmlecmascript/data/canAssignNullToQObject.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml b/tests/auto/qml/qqmlecmascript/data/canAssignNullToQObject.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml rename to tests/auto/qml/qqmlecmascript/data/canAssignNullToQObject.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/changeslots/propertyChangeSlotErrors.1.qml b/tests/auto/qml/qqmlecmascript/data/changeslots/propertyChangeSlotErrors.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/changeslots/propertyChangeSlotErrors.1.qml rename to tests/auto/qml/qqmlecmascript/data/changeslots/propertyChangeSlotErrors.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/changeslots/propertyChangeSlotErrors.2.qml b/tests/auto/qml/qqmlecmascript/data/changeslots/propertyChangeSlotErrors.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/changeslots/propertyChangeSlotErrors.2.qml rename to tests/auto/qml/qqmlecmascript/data/changeslots/propertyChangeSlotErrors.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/changeslots/propertyChangeSlotErrors.3.qml b/tests/auto/qml/qqmlecmascript/data/changeslots/propertyChangeSlotErrors.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/changeslots/propertyChangeSlotErrors.3.qml rename to tests/auto/qml/qqmlecmascript/data/changeslots/propertyChangeSlotErrors.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/changeslots/propertyChangeSlotErrors.4.qml b/tests/auto/qml/qqmlecmascript/data/changeslots/propertyChangeSlotErrors.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/changeslots/propertyChangeSlotErrors.4.qml rename to tests/auto/qml/qqmlecmascript/data/changeslots/propertyChangeSlotErrors.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/changeslots/propertyChangeSlots.qml b/tests/auto/qml/qqmlecmascript/data/changeslots/propertyChangeSlots.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/changeslots/propertyChangeSlots.qml rename to tests/auto/qml/qqmlecmascript/data/changeslots/propertyChangeSlots.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml b/tests/auto/qml/qqmlecmascript/data/compiled.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml rename to tests/auto/qml/qqmlecmascript/data/compiled.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml b/tests/auto/qml/qqmlecmascript/data/compositePropertyType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml rename to tests/auto/qml/qqmlecmascript/data/compositePropertyType.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.1.qml b/tests/auto/qml/qqmlecmascript/data/constantsOverrideBindings.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.1.qml rename to tests/auto/qml/qqmlecmascript/data/constantsOverrideBindings.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.2.qml b/tests/auto/qml/qqmlecmascript/data/constantsOverrideBindings.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.2.qml rename to tests/auto/qml/qqmlecmascript/data/constantsOverrideBindings.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.3.qml b/tests/auto/qml/qqmlecmascript/data/constantsOverrideBindings.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.3.qml rename to tests/auto/qml/qqmlecmascript/data/constantsOverrideBindings.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.4.qml b/tests/auto/qml/qqmlecmascript/data/constantsOverrideBindings.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.4.qml rename to tests/auto/qml/qqmlecmascript/data/constantsOverrideBindings.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deferredProperties.qml b/tests/auto/qml/qqmlecmascript/data/deferredProperties.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/deferredProperties.qml rename to tests/auto/qml/qqmlecmascript/data/deferredProperties.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deferredPropertiesErrors.qml b/tests/auto/qml/qqmlecmascript/data/deferredPropertiesErrors.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/deferredPropertiesErrors.qml rename to tests/auto/qml/qqmlecmascript/data/deferredPropertiesErrors.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deleteLater.qml b/tests/auto/qml/qqmlecmascript/data/deleteLater.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/deleteLater.qml rename to tests/auto/qml/qqmlecmascript/data/deleteLater.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deleteWhileBindingRunning.qml b/tests/auto/qml/qqmlecmascript/data/deleteWhileBindingRunning.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/deleteWhileBindingRunning.qml rename to tests/auto/qml/qqmlecmascript/data/deleteWhileBindingRunning.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml b/tests/auto/qml/qqmlecmascript/data/deletedEngine.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml rename to tests/auto/qml/qqmlecmascript/data/deletedEngine.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml b/tests/auto/qml/qqmlecmascript/data/deletedObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml rename to tests/auto/qml/qqmlecmascript/data/deletedObject.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/doubleEvaluate.qml b/tests/auto/qml/qqmlecmascript/data/doubleEvaluate.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/doubleEvaluate.qml rename to tests/auto/qml/qqmlecmascript/data/doubleEvaluate.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.helper.qml b/tests/auto/qml/qqmlecmascript/data/dynamicCreation.helper.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.helper.qml rename to tests/auto/qml/qqmlecmascript/data/dynamicCreation.helper.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml b/tests/auto/qml/qqmlecmascript/data/dynamicCreation.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml rename to tests/auto/qml/qqmlecmascript/data/dynamicCreation.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreationOwnership.qml b/tests/auto/qml/qqmlecmascript/data/dynamicCreationOwnership.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreationOwnership.qml rename to tests/auto/qml/qqmlecmascript/data/dynamicCreationOwnership.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.2.qml b/tests/auto/qml/qqmlecmascript/data/dynamicDeletion.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.2.qml rename to tests/auto/qml/qqmlecmascript/data/dynamicDeletion.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.qml b/tests/auto/qml/qqmlecmascript/data/dynamicDeletion.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.qml rename to tests/auto/qml/qqmlecmascript/data/dynamicDeletion.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicString.qml b/tests/auto/qml/qqmlecmascript/data/dynamicString.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/dynamicString.qml rename to tests/auto/qml/qqmlecmascript/data/dynamicString.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/elementAssign.qml b/tests/auto/qml/qqmlecmascript/data/elementAssign.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/elementAssign.qml rename to tests/auto/qml/qqmlecmascript/data/elementAssign.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/enums.1.qml b/tests/auto/qml/qqmlecmascript/data/enums.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/enums.1.qml rename to tests/auto/qml/qqmlecmascript/data/enums.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/enums.2.qml b/tests/auto/qml/qqmlecmascript/data/enums.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/enums.2.qml rename to tests/auto/qml/qqmlecmascript/data/enums.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/eval.qml b/tests/auto/qml/qqmlecmascript/data/eval.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/eval.qml rename to tests/auto/qml/qqmlecmascript/data/eval.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exception.js b/tests/auto/qml/qqmlecmascript/data/exception.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/exception.js rename to tests/auto/qml/qqmlecmascript/data/exception.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionClearsOnReeval.qml b/tests/auto/qml/qqmlecmascript/data/exceptionClearsOnReeval.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/exceptionClearsOnReeval.qml rename to tests/auto/qml/qqmlecmascript/data/exceptionClearsOnReeval.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml b/tests/auto/qml/qqmlecmascript/data/exceptionProducesWarning.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml rename to tests/auto/qml/qqmlecmascript/data/exceptionProducesWarning.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml b/tests/auto/qml/qqmlecmascript/data/exceptionProducesWarning2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml rename to tests/auto/qml/qqmlecmascript/data/exceptionProducesWarning2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml b/tests/auto/qml/qqmlecmascript/data/extendedObjectPropertyLookup.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml rename to tests/auto/qml/qqmlecmascript/data/extendedObjectPropertyLookup.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup2.qml b/tests/auto/qml/qqmlecmascript/data/extendedObjectPropertyLookup2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup2.qml rename to tests/auto/qml/qqmlecmascript/data/extendedObjectPropertyLookup2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml b/tests/auto/qml/qqmlecmascript/data/extensionObjects.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml rename to tests/auto/qml/qqmlecmascript/data/extensionObjects.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjectsPropertyOverride.qml b/tests/auto/qml/qqmlecmascript/data/extensionObjectsPropertyOverride.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/extensionObjectsPropertyOverride.qml rename to tests/auto/qml/qqmlecmascript/data/extensionObjectsPropertyOverride.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/forInLoop.qml b/tests/auto/qml/qqmlecmascript/data/forInLoop.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/forInLoop.qml rename to tests/auto/qml/qqmlecmascript/data/forInLoop.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/function.qml b/tests/auto/qml/qqmlecmascript/data/function.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/function.qml rename to tests/auto/qml/qqmlecmascript/data/function.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.1.qml b/tests/auto/qml/qqmlecmascript/data/functionAssignment.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.1.qml rename to tests/auto/qml/qqmlecmascript/data/functionAssignment.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.2.qml b/tests/auto/qml/qqmlecmascript/data/functionAssignment.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.2.qml rename to tests/auto/qml/qqmlecmascript/data/functionAssignment.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.js b/tests/auto/qml/qqmlecmascript/data/functionAssignment.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.js rename to tests/auto/qml/qqmlecmascript/data/functionAssignment.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml b/tests/auto/qml/qqmlecmascript/data/functionErrors.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml rename to tests/auto/qml/qqmlecmascript/data/functionErrors.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/handleReferenceManagement.handle.1.qml b/tests/auto/qml/qqmlecmascript/data/handleReferenceManagement.handle.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/handleReferenceManagement.handle.1.qml rename to tests/auto/qml/qqmlecmascript/data/handleReferenceManagement.handle.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/handleReferenceManagement.handle.2.qml b/tests/auto/qml/qqmlecmascript/data/handleReferenceManagement.handle.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/handleReferenceManagement.handle.2.qml rename to tests/auto/qml/qqmlecmascript/data/handleReferenceManagement.handle.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/handleReferenceManagement.object.1.qml b/tests/auto/qml/qqmlecmascript/data/handleReferenceManagement.object.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/handleReferenceManagement.object.1.qml rename to tests/auto/qml/qqmlecmascript/data/handleReferenceManagement.object.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/handleReferenceManagement.object.2.qml b/tests/auto/qml/qqmlecmascript/data/handleReferenceManagement.object.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/handleReferenceManagement.object.2.qml rename to tests/auto/qml/qqmlecmascript/data/handleReferenceManagement.object.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml b/tests/auto/qml/qqmlecmascript/data/idShortcutInvalidates.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml rename to tests/auto/qml/qqmlecmascript/data/idShortcutInvalidates.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml b/tests/auto/qml/qqmlecmascript/data/idShortcutInvalidates.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml rename to tests/auto/qml/qqmlecmascript/data/idShortcutInvalidates.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/importScope.1.js b/tests/auto/qml/qqmlecmascript/data/importScope.1.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/importScope.1.js rename to tests/auto/qml/qqmlecmascript/data/importScope.1.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/importScope.2.js b/tests/auto/qml/qqmlecmascript/data/importScope.2.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/importScope.2.js rename to tests/auto/qml/qqmlecmascript/data/importScope.2.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/importScope.qml b/tests/auto/qml/qqmlecmascript/data/importScope.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/importScope.qml rename to tests/auto/qml/qqmlecmascript/data/importScope.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/in.qml b/tests/auto/qml/qqmlecmascript/data/in.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/in.qml rename to tests/auto/qml/qqmlecmascript/data/in.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include.js b/tests/auto/qml/qqmlecmascript/data/include.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include.js rename to tests/auto/qml/qqmlecmascript/data/include.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include.qml b/tests/auto/qml/qqmlecmascript/data/include.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include.qml rename to tests/auto/qml/qqmlecmascript/data/include.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.js b/tests/auto/qml/qqmlecmascript/data/include_callback.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include_callback.js rename to tests/auto/qml/qqmlecmascript/data/include_callback.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.qml b/tests/auto/qml/qqmlecmascript/data/include_callback.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include_callback.qml rename to tests/auto/qml/qqmlecmascript/data/include_callback.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma.qml b/tests/auto/qml/qqmlecmascript/data/include_pragma.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include_pragma.qml rename to tests/auto/qml/qqmlecmascript/data/include_pragma.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_inner.js b/tests/auto/qml/qqmlecmascript/data/include_pragma_inner.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_inner.js rename to tests/auto/qml/qqmlecmascript/data/include_pragma_inner.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_outer.js b/tests/auto/qml/qqmlecmascript/data/include_pragma_outer.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_outer.js rename to tests/auto/qml/qqmlecmascript/data/include_pragma_outer.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.js b/tests/auto/qml/qqmlecmascript/data/include_remote.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include_remote.js rename to tests/auto/qml/qqmlecmascript/data/include_remote.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.qml b/tests/auto/qml/qqmlecmascript/data/include_remote.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include_remote.qml rename to tests/auto/qml/qqmlecmascript/data/include_remote.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.js b/tests/auto/qml/qqmlecmascript/data/include_remote_missing.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.js rename to tests/auto/qml/qqmlecmascript/data/include_remote_missing.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.qml b/tests/auto/qml/qqmlecmascript/data/include_remote_missing.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.qml rename to tests/auto/qml/qqmlecmascript/data/include_remote_missing.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.js b/tests/auto/qml/qqmlecmascript/data/include_shared.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include_shared.js rename to tests/auto/qml/qqmlecmascript/data/include_shared.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.qml b/tests/auto/qml/qqmlecmascript/data/include_shared.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/include_shared.qml rename to tests/auto/qml/qqmlecmascript/data/include_shared.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectArg.qml b/tests/auto/qml/qqmlecmascript/data/invokableObjectArg.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectArg.qml rename to tests/auto/qml/qqmlecmascript/data/invokableObjectArg.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectRet.qml b/tests/auto/qml/qqmlecmascript/data/invokableObjectRet.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectRet.qml rename to tests/auto/qml/qqmlecmascript/data/invokableObjectRet.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/js/include2.js b/tests/auto/qml/qqmlecmascript/data/js/include2.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/js/include2.js rename to tests/auto/qml/qqmlecmascript/data/js/include2.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/js/include3.js b/tests/auto/qml/qqmlecmascript/data/js/include3.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/js/include3.js rename to tests/auto/qml/qqmlecmascript/data/js/include3.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml b/tests/auto/qml/qqmlecmascript/data/jsObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml rename to tests/auto/qml/qqmlecmascript/data/jsObject.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/SpecialRectangleOne.qml b/tests/auto/qml/qqmlecmascript/data/jsimport/SpecialRectangleOne.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/SpecialRectangleOne.qml rename to tests/auto/qml/qqmlecmascript/data/jsimport/SpecialRectangleOne.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/SpecialRectangleTwo.qml b/tests/auto/qml/qqmlecmascript/data/jsimport/SpecialRectangleTwo.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/SpecialRectangleTwo.qml rename to tests/auto/qml/qqmlecmascript/data/jsimport/SpecialRectangleTwo.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importFive.js b/tests/auto/qml/qqmlecmascript/data/jsimport/importFive.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importFive.js rename to tests/auto/qml/qqmlecmascript/data/jsimport/importFive.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importFour.js b/tests/auto/qml/qqmlecmascript/data/jsimport/importFour.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importFour.js rename to tests/auto/qml/qqmlecmascript/data/jsimport/importFour.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importOne.js b/tests/auto/qml/qqmlecmascript/data/jsimport/importOne.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importOne.js rename to tests/auto/qml/qqmlecmascript/data/jsimport/importOne.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importPragmaLibrary.js b/tests/auto/qml/qqmlecmascript/data/jsimport/importPragmaLibrary.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importPragmaLibrary.js rename to tests/auto/qml/qqmlecmascript/data/jsimport/importPragmaLibrary.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importPragmaLibraryWithImports.js b/tests/auto/qml/qqmlecmascript/data/jsimport/importPragmaLibraryWithImports.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importPragmaLibraryWithImports.js rename to tests/auto/qml/qqmlecmascript/data/jsimport/importPragmaLibraryWithImports.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importPragmaLibraryWithPragmaLibraryImports.js b/tests/auto/qml/qqmlecmascript/data/jsimport/importPragmaLibraryWithPragmaLibraryImports.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importPragmaLibraryWithPragmaLibraryImports.js rename to tests/auto/qml/qqmlecmascript/data/jsimport/importPragmaLibraryWithPragmaLibraryImports.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importThree.js b/tests/auto/qml/qqmlecmascript/data/jsimport/importThree.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importThree.js rename to tests/auto/qml/qqmlecmascript/data/jsimport/importThree.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importTwo.js b/tests/auto/qml/qqmlecmascript/data/jsimport/importTwo.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importTwo.js rename to tests/auto/qml/qqmlecmascript/data/jsimport/importTwo.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importWithNoImports.js b/tests/auto/qml/qqmlecmascript/data/jsimport/importWithNoImports.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importWithNoImports.js rename to tests/auto/qml/qqmlecmascript/data/jsimport/importWithNoImports.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testImport.qml b/tests/auto/qml/qqmlecmascript/data/jsimport/testImport.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testImport.qml rename to tests/auto/qml/qqmlecmascript/data/jsimport/testImport.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testImportPragmaLibrary.qml b/tests/auto/qml/qqmlecmascript/data/jsimport/testImportPragmaLibrary.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testImportPragmaLibrary.qml rename to tests/auto/qml/qqmlecmascript/data/jsimport/testImportPragmaLibrary.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testImportPragmaLibraryWithImports.qml b/tests/auto/qml/qqmlecmascript/data/jsimport/testImportPragmaLibraryWithImports.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testImportPragmaLibraryWithImports.qml rename to tests/auto/qml/qqmlecmascript/data/jsimport/testImportPragmaLibraryWithImports.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testImportPragmaLibraryWithPragmaLibraryImports.qml b/tests/auto/qml/qqmlecmascript/data/jsimport/testImportPragmaLibraryWithPragmaLibraryImports.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testImportPragmaLibraryWithPragmaLibraryImports.qml rename to tests/auto/qml/qqmlecmascript/data/jsimport/testImportPragmaLibraryWithPragmaLibraryImports.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testImportScoping.qml b/tests/auto/qml/qqmlecmascript/data/jsimport/testImportScoping.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testImportScoping.qml rename to tests/auto/qml/qqmlecmascript/data/jsimport/testImportScoping.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testModuleImport.js b/tests/auto/qml/qqmlecmascript/data/jsimport/testModuleImport.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testModuleImport.js rename to tests/auto/qml/qqmlecmascript/data/jsimport/testModuleImport.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testScriptImport.js b/tests/auto/qml/qqmlecmascript/data/jsimport/testScriptImport.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimport/testScriptImport.js rename to tests/auto/qml/qqmlecmascript/data/jsimport/testScriptImport.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/failFive.qml b/tests/auto/qml/qqmlecmascript/data/jsimportfail/failFive.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/failFive.qml rename to tests/auto/qml/qqmlecmascript/data/jsimportfail/failFive.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/failFour.qml b/tests/auto/qml/qqmlecmascript/data/jsimportfail/failFour.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/failFour.qml rename to tests/auto/qml/qqmlecmascript/data/jsimportfail/failFour.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/failOne.qml b/tests/auto/qml/qqmlecmascript/data/jsimportfail/failOne.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/failOne.qml rename to tests/auto/qml/qqmlecmascript/data/jsimportfail/failOne.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/failThree.qml b/tests/auto/qml/qqmlecmascript/data/jsimportfail/failThree.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/failThree.qml rename to tests/auto/qml/qqmlecmascript/data/jsimportfail/failThree.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/failTwo.qml b/tests/auto/qml/qqmlecmascript/data/jsimportfail/failTwo.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/failTwo.qml rename to tests/auto/qml/qqmlecmascript/data/jsimportfail/failTwo.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/importOne.js b/tests/auto/qml/qqmlecmascript/data/jsimportfail/importOne.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/importOne.js rename to tests/auto/qml/qqmlecmascript/data/jsimportfail/importOne.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/importPragmaLibrary.js b/tests/auto/qml/qqmlecmascript/data/jsimportfail/importPragmaLibrary.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/importPragmaLibrary.js rename to tests/auto/qml/qqmlecmascript/data/jsimportfail/importPragmaLibrary.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/importWithImports.js b/tests/auto/qml/qqmlecmascript/data/jsimportfail/importWithImports.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/importWithImports.js rename to tests/auto/qml/qqmlecmascript/data/jsimportfail/importWithImports.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testImportPragmaLibrary.qml b/tests/auto/qml/qqmlecmascript/data/jsimportfail/testImportPragmaLibrary.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testImportPragmaLibrary.qml rename to tests/auto/qml/qqmlecmascript/data/jsimportfail/testImportPragmaLibrary.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testModuleImport.js b/tests/auto/qml/qqmlecmascript/data/jsimportfail/testModuleImport.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testModuleImport.js rename to tests/auto/qml/qqmlecmascript/data/jsimportfail/testModuleImport.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testScriptImport.js b/tests/auto/qml/qqmlecmascript/data/jsimportfail/testScriptImport.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/jsimportfail/testScriptImport.js rename to tests/auto/qml/qqmlecmascript/data/jsimportfail/testScriptImport.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.js b/tests/auto/qml/qqmlecmascript/data/libraryScriptAssert.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.js rename to tests/auto/qml/qqmlecmascript/data/libraryScriptAssert.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml b/tests/auto/qml/qqmlecmascript/data/libraryScriptAssert.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml rename to tests/auto/qml/qqmlecmascript/data/libraryScriptAssert.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listAssignment.qml b/tests/auto/qml/qqmlecmascript/data/listAssignment.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/listAssignment.qml rename to tests/auto/qml/qqmlecmascript/data/listAssignment.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml b/tests/auto/qml/qqmlecmascript/data/listProperties.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml rename to tests/auto/qml/qqmlecmascript/data/listProperties.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml b/tests/auto/qml/qqmlecmascript/data/listToVariant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml rename to tests/auto/qml/qqmlecmascript/data/listToVariant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision.qml b/tests/auto/qml/qqmlecmascript/data/metaobjectRevision.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision.qml rename to tests/auto/qml/qqmlecmascript/data/metaobjectRevision.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision2.qml b/tests/auto/qml/qqmlecmascript/data/metaobjectRevision2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision2.qml rename to tests/auto/qml/qqmlecmascript/data/metaobjectRevision2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision3.qml b/tests/auto/qml/qqmlecmascript/data/metaobjectRevision3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision3.qml rename to tests/auto/qml/qqmlecmascript/data/metaobjectRevision3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision4.qml b/tests/auto/qml/qqmlecmascript/data/metaobjectRevision4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision4.qml rename to tests/auto/qml/qqmlecmascript/data/metaobjectRevision4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors.qml b/tests/auto/qml/qqmlecmascript/data/metaobjectRevisionErrors.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors.qml rename to tests/auto/qml/qqmlecmascript/data/metaobjectRevisionErrors.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors2.qml b/tests/auto/qml/qqmlecmascript/data/metaobjectRevisionErrors2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors2.qml rename to tests/auto/qml/qqmlecmascript/data/metaobjectRevisionErrors2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors3.qml b/tests/auto/qml/qqmlecmascript/data/metaobjectRevisionErrors3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors3.qml rename to tests/auto/qml/qqmlecmascript/data/metaobjectRevisionErrors3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.1.qml b/tests/auto/qml/qqmlecmascript/data/methods.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/methods.1.qml rename to tests/auto/qml/qqmlecmascript/data/methods.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.2.qml b/tests/auto/qml/qqmlecmascript/data/methods.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/methods.2.qml rename to tests/auto/qml/qqmlecmascript/data/methods.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml b/tests/auto/qml/qqmlecmascript/data/methods.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml rename to tests/auto/qml/qqmlecmascript/data/methods.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml b/tests/auto/qml/qqmlecmascript/data/methods.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml rename to tests/auto/qml/qqmlecmascript/data/methods.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml b/tests/auto/qml/qqmlecmascript/data/methods.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml rename to tests/auto/qml/qqmlecmascript/data/methods.5.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/moduleApiMajorVersionFail.qml b/tests/auto/qml/qqmlecmascript/data/moduleapi/moduleApiMajorVersionFail.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/moduleApiMajorVersionFail.qml rename to tests/auto/qml/qqmlecmascript/data/moduleapi/moduleApiMajorVersionFail.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/moduleApiMinorVersionFail.qml b/tests/auto/qml/qqmlecmascript/data/moduleapi/moduleApiMinorVersionFail.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/moduleApiMinorVersionFail.qml rename to tests/auto/qml/qqmlecmascript/data/moduleapi/moduleApiMinorVersionFail.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/qobjectModuleApi.qml b/tests/auto/qml/qqmlecmascript/data/moduleapi/qobjectModuleApi.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/qobjectModuleApi.qml rename to tests/auto/qml/qqmlecmascript/data/moduleapi/qobjectModuleApi.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/qobjectModuleApiCaching.qml b/tests/auto/qml/qqmlecmascript/data/moduleapi/qobjectModuleApiCaching.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/qobjectModuleApiCaching.qml rename to tests/auto/qml/qqmlecmascript/data/moduleapi/qobjectModuleApiCaching.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/qobjectModuleApiEnums.qml b/tests/auto/qml/qqmlecmascript/data/moduleapi/qobjectModuleApiEnums.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/qobjectModuleApiEnums.qml rename to tests/auto/qml/qqmlecmascript/data/moduleapi/qobjectModuleApiEnums.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/qobjectModuleApiWriting.qml b/tests/auto/qml/qqmlecmascript/data/moduleapi/qobjectModuleApiWriting.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/qobjectModuleApiWriting.qml rename to tests/auto/qml/qqmlecmascript/data/moduleapi/qobjectModuleApiWriting.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/scriptModuleApi.qml b/tests/auto/qml/qqmlecmascript/data/moduleapi/scriptModuleApi.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/scriptModuleApi.qml rename to tests/auto/qml/qqmlecmascript/data/moduleapi/scriptModuleApi.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/scriptModuleApiCaching.qml b/tests/auto/qml/qqmlecmascript/data/moduleapi/scriptModuleApiCaching.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/scriptModuleApiCaching.qml rename to tests/auto/qml/qqmlecmascript/data/moduleapi/scriptModuleApiCaching.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/scriptModuleApiWriting.qml b/tests/auto/qml/qqmlecmascript/data/moduleapi/scriptModuleApiWriting.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/moduleapi/scriptModuleApiWriting.qml rename to tests/auto/qml/qqmlecmascript/data/moduleapi/scriptModuleApiWriting.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml b/tests/auto/qml/qqmlecmascript/data/multiEngineObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml rename to tests/auto/qml/qqmlecmascript/data/multiEngineObject.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml b/tests/auto/qml/qqmlecmascript/data/noSpuriousWarningsAtShutdown.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml rename to tests/auto/qml/qqmlecmascript/data/noSpuriousWarningsAtShutdown.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml b/tests/auto/qml/qqmlecmascript/data/noSpuriousWarningsAtShutdown.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml rename to tests/auto/qml/qqmlecmascript/data/noSpuriousWarningsAtShutdown.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nonExistentAttachedObject.qml b/tests/auto/qml/qqmlecmascript/data/nonExistentAttachedObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/nonExistentAttachedObject.qml rename to tests/auto/qml/qqmlecmascript/data/nonExistentAttachedObject.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nonNotifyable.qml b/tests/auto/qml/qqmlecmascript/data/nonNotifyable.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/nonNotifyable.qml rename to tests/auto/qml/qqmlecmascript/data/nonNotifyable.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nonscriptable.qml b/tests/auto/qml/qqmlecmascript/data/nonscriptable.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/nonscriptable.qml rename to tests/auto/qml/qqmlecmascript/data/nonscriptable.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml b/tests/auto/qml/qqmlecmascript/data/nullObjectBinding.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml rename to tests/auto/qml/qqmlecmascript/data/nullObjectBinding.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/numberAssignment.qml b/tests/auto/qml/qqmlecmascript/data/numberAssignment.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/numberAssignment.qml rename to tests/auto/qml/qqmlecmascript/data/numberAssignment.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/objectConversion.qml b/tests/auto/qml/qqmlecmascript/data/objectConversion.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/objectConversion.qml rename to tests/auto/qml/qqmlecmascript/data/objectConversion.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/objectName.qml b/tests/auto/qml/qqmlecmascript/data/objectName.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/objectName.qml rename to tests/auto/qml/qqmlecmascript/data/objectName.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml b/tests/auto/qml/qqmlecmascript/data/objectsCompareAsEqual.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml rename to tests/auto/qml/qqmlecmascript/data/objectsCompareAsEqual.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/objectsPassThroughSignals.qml b/tests/auto/qml/qqmlecmascript/data/objectsPassThroughSignals.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/objectsPassThroughSignals.qml rename to tests/auto/qml/qqmlecmascript/data/objectsPassThroughSignals.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/outerBindingOverridesInnerBinding.qml b/tests/auto/qml/qqmlecmascript/data/outerBindingOverridesInnerBinding.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/outerBindingOverridesInnerBinding.qml rename to tests/auto/qml/qqmlecmascript/data/outerBindingOverridesInnerBinding.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ownership.qml b/tests/auto/qml/qqmlecmascript/data/ownership.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/ownership.qml rename to tests/auto/qml/qqmlecmascript/data/ownership.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml b/tests/auto/qml/qqmlecmascript/data/propertyAssignmentErrors.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml rename to tests/auto/qml/qqmlecmascript/data/propertyAssignmentErrors.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertySplicing.qml b/tests/auto/qml/qqmlecmascript/data/propertySplicing.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertySplicing.qml rename to tests/auto/qml/qqmlecmascript/data/propertySplicing.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.1.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.1.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.10.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.10.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.10.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.10.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.2.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.2.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.3.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.3.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.4.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.4.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.5.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.5.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.5.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.6.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.6.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.6.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.7.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.7.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.7.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.8.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.8.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.8.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.8.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.9.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.9.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.9.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.9.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.circular.2.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.circular.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.circular.2.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.circular.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.circular.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.circular.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.circular.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.circular.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.inherit.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.inherit.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.inherit.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.inherit.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.reparent.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.reparent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVar.reparent.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVar.reparent.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVarCpp.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarCpp.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVarCpp.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVarCpp.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVarImplicitOwnership.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarImplicitOwnership.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVarImplicitOwnership.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVarImplicitOwnership.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.2.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.2.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.3.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.3.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.3.type.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.3.type.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.3.type.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.3.type.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.4.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.4.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.4.type1.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.4.type1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.4.type1.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.4.type1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.4.type2.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.4.type2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.4.type2.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.4.type2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.qml rename to tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qlistqobjectMethods.qml b/tests/auto/qml/qqmlecmascript/data/qlistqobjectMethods.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qlistqobjectMethods.qml rename to tests/auto/qml/qqmlecmascript/data/qlistqobjectMethods.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/declarativeHasOwnProperty.qml b/tests/auto/qml/qqmlecmascript/data/qmlHasOwnProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/declarativeHasOwnProperty.qml rename to tests/auto/qml/qqmlecmascript/data/qmlHasOwnProperty.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/declarativeToString.qml b/tests/auto/qml/qqmlecmascript/data/qmlToString.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/declarativeToString.qml rename to tests/auto/qml/qqmlecmascript/data/qmlToString.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qobjectConnectionListExceptionHandling.qml b/tests/auto/qml/qqmlecmascript/data/qobjectConnectionListExceptionHandling.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qobjectConnectionListExceptionHandling.qml rename to tests/auto/qml/qqmlecmascript/data/qobjectConnectionListExceptionHandling.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qobjectDerivedArgument.qml b/tests/auto/qml/qqmlecmascript/data/qobjectDerivedArgument.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qobjectDerivedArgument.qml rename to tests/auto/qml/qqmlecmascript/data/qobjectDerivedArgument.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_10696.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_10696.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_10696.qml rename to tests/auto/qml/qqmlecmascript/data/qtbug_10696.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.js b/tests/auto/qml/qqmlecmascript/data/qtbug_11600.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.js rename to tests/auto/qml/qqmlecmascript/data/qtbug_11600.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_11600.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml rename to tests/auto/qml/qqmlecmascript/data/qtbug_11600.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11606.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_11606.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11606.qml rename to tests/auto/qml/qqmlecmascript/data/qtbug_11606.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_20344.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_20344.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_20344.qml rename to tests/auto/qml/qqmlecmascript/data/qtbug_20344.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_21580.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_21580.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_21580.qml rename to tests/auto/qml/qqmlecmascript/data/qtbug_21580.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_21864.js b/tests/auto/qml/qqmlecmascript/data/qtbug_21864.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_21864.js rename to tests/auto/qml/qqmlecmascript/data/qtbug_21864.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_21864.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_21864.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_21864.qml rename to tests/auto/qml/qqmlecmascript/data/qtbug_21864.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22464.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_22464.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22464.qml rename to tests/auto/qml/qqmlecmascript/data/qtbug_22464.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22679.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_22679.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22679.qml rename to tests/auto/qml/qqmlecmascript/data/qtbug_22679.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22843.js b/tests/auto/qml/qqmlecmascript/data/qtbug_22843.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22843.js rename to tests/auto/qml/qqmlecmascript/data/qtbug_22843.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22843.library.js b/tests/auto/qml/qqmlecmascript/data/qtbug_22843.library.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22843.library.js rename to tests/auto/qml/qqmlecmascript/data/qtbug_22843.library.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22843.library.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_22843.library.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22843.library.qml rename to tests/auto/qml/qqmlecmascript/data/qtbug_22843.library.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22843.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_22843.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22843.qml rename to tests/auto/qml/qqmlecmascript/data/qtbug_22843.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_9792.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_9792.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtbug_9792.qml rename to tests/auto/qml/qqmlecmascript/data/qtbug_9792.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtcreatorbug_1289.qml b/tests/auto/qml/qqmlecmascript/data/qtcreatorbug_1289.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/qtcreatorbug_1289.qml rename to tests/auto/qml/qqmlecmascript/data/qtcreatorbug_1289.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/readonlyDeclaration.qml b/tests/auto/qml/qqmlecmascript/data/readonlyDeclaration.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/readonlyDeclaration.qml rename to tests/auto/qml/qqmlecmascript/data/readonlyDeclaration.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/realToInt.qml b/tests/auto/qml/qqmlecmascript/data/realToInt.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/realToInt.qml rename to tests/auto/qml/qqmlecmascript/data/realToInt.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/regExp.2.qml b/tests/auto/qml/qqmlecmascript/data/regExp.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/regExp.2.qml rename to tests/auto/qml/qqmlecmascript/data/regExp.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/regExp.qml b/tests/auto/qml/qqmlecmascript/data/regExp.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/regExp.qml rename to tests/auto/qml/qqmlecmascript/data/regExp.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/remote_file.js b/tests/auto/qml/qqmlecmascript/data/remote_file.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/remote_file.js rename to tests/auto/qml/qqmlecmascript/data/remote_file.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/rewriteMultiLineStrings.qml b/tests/auto/qml/qqmlecmascript/data/rewriteMultiLineStrings.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/rewriteMultiLineStrings.qml rename to tests/auto/qml/qqmlecmascript/data/rewriteMultiLineStrings.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopy.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopy.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopy.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopy.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopy.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopy.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopy.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopy.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyFromJs.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyFromJs.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyFromJs.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyFromJs.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyFromJs.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyFromJs.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyFromJs.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyFromJs.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImport.var.js b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImport.var.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImport.var.js rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImport.var.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImport.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImport.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImport.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImport.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImport.variant.js b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImport.variant.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImport.variant.js rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImport.variant.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImport.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImport.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImport.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImport.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportDifferent.var.js b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportDifferent.var.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportDifferent.var.js rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportDifferent.var.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportDifferent.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportDifferent.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportDifferent.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportDifferent.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportFail.var.js b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportFail.var.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportFail.var.js rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportFail.var.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportFail.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportFail.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportFail.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportFail.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportFail.variant.js b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportFail.variant.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportFail.variant.js rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportFail.variant.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportFail.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportFail.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportFail.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportFail.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportNoBinding.var.js b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportNoBinding.var.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportNoBinding.var.js rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportNoBinding.var.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportNoBinding.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportNoBinding.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportNoBinding.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportNoBinding.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportNoBinding.variant.js b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportNoBinding.variant.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportNoBinding.variant.js rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportNoBinding.variant.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportNoBinding.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportNoBinding.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyImportNoBinding.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyImportNoBinding.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyNoBinding.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyNoBinding.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyNoBinding.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyNoBinding.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyNoBinding.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyNoBinding.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceCopyNoBinding.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceCopyNoBinding.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceDestroyedCopy.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceDestroyedCopy.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceDestroyedCopy.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceDestroyedCopy.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceDestroyedCopy.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceDestroyedCopy.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceDestroyedCopy.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceDestroyedCopy.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceFunction.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceFunction.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceFunction.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceFunction.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceFunction.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceFunction.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceFunction.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceFunction.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceFunctionFail.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceFunctionFail.var.qml similarity index 91% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceFunctionFail.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceFunctionFail.var.qml index 7b4463773c..9b4b1e6fd9 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceFunctionFail.var.qml +++ b/tests/auto/qml/qqmlecmascript/data/scarceResourceFunctionFail.var.qml @@ -3,7 +3,7 @@ import Qt.test 1.0 // In this example, a common syntax error will only be "caught" // when the function is called via: -// QDeclarativeVMEMetaObject::metaCall->invokeMetaMethod() +// QQmlVMEMetaObject::metaCall->invokeMetaMethod() // We would like to ensure that a useful error message is printed. QtObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceFunctionFail.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceFunctionFail.variant.qml similarity index 91% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceFunctionFail.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceFunctionFail.variant.qml index 45acc53e63..57673de3f3 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceFunctionFail.variant.qml +++ b/tests/auto/qml/qqmlecmascript/data/scarceResourceFunctionFail.variant.qml @@ -3,7 +3,7 @@ import Qt.test 1.0 // In this example, a common syntax error will only be "caught" // when the function is called via: -// QDeclarativeVMEMetaObject::metaCall->invokeMetaMethod() +// QQmlVMEMetaObject::metaCall->invokeMetaMethod() // We would like to ensure that a useful error message is printed. QtObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceMultipleDifferentNoBinding.var.js b/tests/auto/qml/qqmlecmascript/data/scarceResourceMultipleDifferentNoBinding.var.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceMultipleDifferentNoBinding.var.js rename to tests/auto/qml/qqmlecmascript/data/scarceResourceMultipleDifferentNoBinding.var.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceMultipleDifferentNoBinding.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceMultipleDifferentNoBinding.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceMultipleDifferentNoBinding.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceMultipleDifferentNoBinding.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceMultipleSameNoBinding.var.js b/tests/auto/qml/qqmlecmascript/data/scarceResourceMultipleSameNoBinding.var.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceMultipleSameNoBinding.var.js rename to tests/auto/qml/qqmlecmascript/data/scarceResourceMultipleSameNoBinding.var.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceMultipleSameNoBinding.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceMultipleSameNoBinding.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceMultipleSameNoBinding.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceMultipleSameNoBinding.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceMultipleSameWithBinding.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceMultipleSameWithBinding.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceMultipleSameWithBinding.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceMultipleSameWithBinding.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceObjectGc.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceObjectGc.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceObjectGc.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceObjectGc.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceSignal.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceSignal.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceSignal.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceSignal.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceSignal.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceSignal.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceSignal.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceSignal.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTest.var.js b/tests/auto/qml/qqmlecmascript/data/scarceResourceTest.var.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTest.var.js rename to tests/auto/qml/qqmlecmascript/data/scarceResourceTest.var.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTest.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceTest.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTest.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceTest.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTest.variant.js b/tests/auto/qml/qqmlecmascript/data/scarceResourceTest.variant.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTest.variant.js rename to tests/auto/qml/qqmlecmascript/data/scarceResourceTest.variant.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTest.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceTest.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTest.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceTest.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTestMultiple.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceTestMultiple.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTestMultiple.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceTestMultiple.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTestMultiple.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceTestMultiple.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTestMultiple.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceTestMultiple.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTestPreserve.var.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceTestPreserve.var.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTestPreserve.var.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceTestPreserve.var.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTestPreserve.variant.qml b/tests/auto/qml/qqmlecmascript/data/scarceResourceTestPreserve.variant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scarceResourceTestPreserve.variant.qml rename to tests/auto/qml/qqmlecmascript/data/scarceResourceTestPreserve.variant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml b/tests/auto/qml/qqmlecmascript/data/scope.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml rename to tests/auto/qml/qqmlecmascript/data/scope.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml b/tests/auto/qml/qqmlecmascript/data/scope.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml rename to tests/auto/qml/qqmlecmascript/data/scope.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.4.qml b/tests/auto/qml/qqmlecmascript/data/scope.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scope.4.qml rename to tests/auto/qml/qqmlecmascript/data/scope.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.5.qml b/tests/auto/qml/qqmlecmascript/data/scope.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scope.5.qml rename to tests/auto/qml/qqmlecmascript/data/scope.5.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.6.qml b/tests/auto/qml/qqmlecmascript/data/scope.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scope.6.qml rename to tests/auto/qml/qqmlecmascript/data/scope.6.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml b/tests/auto/qml/qqmlecmascript/data/scope.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scope.qml rename to tests/auto/qml/qqmlecmascript/data/scope.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.js b/tests/auto/qml/qqmlecmascript/data/scriptConnect.1.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.js rename to tests/auto/qml/qqmlecmascript/data/scriptConnect.1.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml b/tests/auto/qml/qqmlecmascript/data/scriptConnect.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml rename to tests/auto/qml/qqmlecmascript/data/scriptConnect.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.js b/tests/auto/qml/qqmlecmascript/data/scriptConnect.2.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.js rename to tests/auto/qml/qqmlecmascript/data/scriptConnect.2.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml b/tests/auto/qml/qqmlecmascript/data/scriptConnect.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml rename to tests/auto/qml/qqmlecmascript/data/scriptConnect.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml b/tests/auto/qml/qqmlecmascript/data/scriptConnect.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml rename to tests/auto/qml/qqmlecmascript/data/scriptConnect.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml b/tests/auto/qml/qqmlecmascript/data/scriptConnect.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml rename to tests/auto/qml/qqmlecmascript/data/scriptConnect.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml b/tests/auto/qml/qqmlecmascript/data/scriptConnect.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml rename to tests/auto/qml/qqmlecmascript/data/scriptConnect.5.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.js b/tests/auto/qml/qqmlecmascript/data/scriptConnect.6.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.js rename to tests/auto/qml/qqmlecmascript/data/scriptConnect.6.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml b/tests/auto/qml/qqmlecmascript/data/scriptConnect.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml rename to tests/auto/qml/qqmlecmascript/data/scriptConnect.6.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.js b/tests/auto/qml/qqmlecmascript/data/scriptDisconnect.1.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.js rename to tests/auto/qml/qqmlecmascript/data/scriptDisconnect.1.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml b/tests/auto/qml/qqmlecmascript/data/scriptDisconnect.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml rename to tests/auto/qml/qqmlecmascript/data/scriptDisconnect.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml b/tests/auto/qml/qqmlecmascript/data/scriptDisconnect.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml rename to tests/auto/qml/qqmlecmascript/data/scriptDisconnect.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml b/tests/auto/qml/qqmlecmascript/data/scriptDisconnect.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml rename to tests/auto/qml/qqmlecmascript/data/scriptDisconnect.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml b/tests/auto/qml/qqmlecmascript/data/scriptDisconnect.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml rename to tests/auto/qml/qqmlecmascript/data/scriptDisconnect.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.js b/tests/auto/qml/qqmlecmascript/data/scriptErrors.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.js rename to tests/auto/qml/qqmlecmascript/data/scriptErrors.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.qml b/tests/auto/qml/qqmlecmascript/data/scriptErrors.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.qml rename to tests/auto/qml/qqmlecmascript/data/scriptErrors.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.2.qml b/tests/auto/qml/qqmlecmascript/data/selfDeletingBinding.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.2.qml rename to tests/auto/qml/qqmlecmascript/data/selfDeletingBinding.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml b/tests/auto/qml/qqmlecmascript/data/selfDeletingBinding.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml rename to tests/auto/qml/qqmlecmascript/data/selfDeletingBinding.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.array.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.array.qml rename to tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.bindings.error.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.bindings.error.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.bindings.error.qml rename to tests/auto/qml/qqmlecmascript/data/sequenceConversion.bindings.error.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.bindings.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.bindings.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.bindings.qml rename to tests/auto/qml/qqmlecmascript/data/sequenceConversion.bindings.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.copy.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.copy.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.copy.qml rename to tests/auto/qml/qqmlecmascript/data/sequenceConversion.copy.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.indexes.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.indexes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.indexes.qml rename to tests/auto/qml/qqmlecmascript/data/sequenceConversion.indexes.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.read.error.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.read.error.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.read.error.qml rename to tests/auto/qml/qqmlecmascript/data/sequenceConversion.read.error.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.read.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.read.qml rename to tests/auto/qml/qqmlecmascript/data/sequenceConversion.read.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.threads.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.threads.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.threads.qml rename to tests/auto/qml/qqmlecmascript/data/sequenceConversion.threads.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.write.error.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.write.error.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.write.error.qml rename to tests/auto/qml/qqmlecmascript/data/sequenceConversion.write.error.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.write.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.write.qml rename to tests/auto/qml/qqmlecmascript/data/sequenceConversion.write.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sharedAttachedObject.qml b/tests/auto/qml/qqmlecmascript/data/sharedAttachedObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/sharedAttachedObject.qml rename to tests/auto/qml/qqmlecmascript/data/sharedAttachedObject.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml b/tests/auto/qml/qqmlecmascript/data/shutdownErrors.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml rename to tests/auto/qml/qqmlecmascript/data/shutdownErrors.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.1.qml b/tests/auto/qml/qqmlecmascript/data/signalAssignment.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.1.qml rename to tests/auto/qml/qqmlecmascript/data/signalAssignment.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.2.qml b/tests/auto/qml/qqmlecmascript/data/signalAssignment.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.2.qml rename to tests/auto/qml/qqmlecmascript/data/signalAssignment.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalHandlers.qml b/tests/auto/qml/qqmlecmascript/data/signalHandlers.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/signalHandlers.qml rename to tests/auto/qml/qqmlecmascript/data/signalHandlers.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalParameterTypes.qml b/tests/auto/qml/qqmlecmascript/data/signalParameterTypes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/signalParameterTypes.qml rename to tests/auto/qml/qqmlecmascript/data/signalParameterTypes.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml b/tests/auto/qml/qqmlecmascript/data/signalTriggeredBindings.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml rename to tests/auto/qml/qqmlecmascript/data/signalTriggeredBindings.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalWithJSValueInVariant.qml b/tests/auto/qml/qqmlecmascript/data/signalWithJSValueInVariant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/signalWithJSValueInVariant.qml rename to tests/auto/qml/qqmlecmascript/data/signalWithJSValueInVariant.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalWithQJSValue.qml b/tests/auto/qml/qqmlecmascript/data/signalWithQJSValue.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/signalWithQJSValue.qml rename to tests/auto/qml/qqmlecmascript/data/signalWithQJSValue.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalWithUnknownTypes.qml b/tests/auto/qml/qqmlecmascript/data/signalWithUnknownTypes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/signalWithUnknownTypes.qml rename to tests/auto/qml/qqmlecmascript/data/signalWithUnknownTypes.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/strictlyEquals.qml b/tests/auto/qml/qqmlecmascript/data/strictlyEquals.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/strictlyEquals.qml rename to tests/auto/qml/qqmlecmascript/data/strictlyEquals.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/stringArg.qml b/tests/auto/qml/qqmlecmascript/data/stringArg.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/stringArg.qml rename to tests/auto/qml/qqmlecmascript/data/stringArg.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.1.qml b/tests/auto/qml/qqmlecmascript/data/switchStatement.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.1.qml rename to tests/auto/qml/qqmlecmascript/data/switchStatement.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.2.qml b/tests/auto/qml/qqmlecmascript/data/switchStatement.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.2.qml rename to tests/auto/qml/qqmlecmascript/data/switchStatement.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.3.qml b/tests/auto/qml/qqmlecmascript/data/switchStatement.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.3.qml rename to tests/auto/qml/qqmlecmascript/data/switchStatement.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.4.qml b/tests/auto/qml/qqmlecmascript/data/switchStatement.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.4.qml rename to tests/auto/qml/qqmlecmascript/data/switchStatement.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.5.qml b/tests/auto/qml/qqmlecmascript/data/switchStatement.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.5.qml rename to tests/auto/qml/qqmlecmascript/data/switchStatement.5.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.6.qml b/tests/auto/qml/qqmlecmascript/data/switchStatement.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/switchStatement.6.qml rename to tests/auto/qml/qqmlecmascript/data/switchStatement.6.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/threadScript.js b/tests/auto/qml/qqmlecmascript/data/threadScript.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/threadScript.js rename to tests/auto/qml/qqmlecmascript/data/threadScript.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.2.qml b/tests/auto/qml/qqmlecmascript/data/transientErrors.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.2.qml rename to tests/auto/qml/qqmlecmascript/data/transientErrors.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml b/tests/auto/qml/qqmlecmascript/data/transientErrors.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml rename to tests/auto/qml/qqmlecmascript/data/transientErrors.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.1.qml b/tests/auto/qml/qqmlecmascript/data/tryStatement.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.1.qml rename to tests/auto/qml/qqmlecmascript/data/tryStatement.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.2.qml b/tests/auto/qml/qqmlecmascript/data/tryStatement.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.2.qml rename to tests/auto/qml/qqmlecmascript/data/tryStatement.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.3.qml b/tests/auto/qml/qqmlecmascript/data/tryStatement.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.3.qml rename to tests/auto/qml/qqmlecmascript/data/tryStatement.3.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.4.qml b/tests/auto/qml/qqmlecmascript/data/tryStatement.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.4.qml rename to tests/auto/qml/qqmlecmascript/data/tryStatement.4.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/typeOf.js b/tests/auto/qml/qqmlecmascript/data/typeOf.js similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/typeOf.js rename to tests/auto/qml/qqmlecmascript/data/typeOf.js diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/typeOf.qml b/tests/auto/qml/qqmlecmascript/data/typeOf.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/typeOf.qml rename to tests/auto/qml/qqmlecmascript/data/typeOf.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/unaryExpression.qml b/tests/auto/qml/qqmlecmascript/data/unaryExpression.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/unaryExpression.qml rename to tests/auto/qml/qqmlecmascript/data/unaryExpression.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.2.qml b/tests/auto/qml/qqmlecmascript/data/undefinedResetsProperty.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.2.qml rename to tests/auto/qml/qqmlecmascript/data/undefinedResetsProperty.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.qml b/tests/auto/qml/qqmlecmascript/data/undefinedResetsProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.qml rename to tests/auto/qml/qqmlecmascript/data/undefinedResetsProperty.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/urlListProperty.qml b/tests/auto/qml/qqmlecmascript/data/urlListProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/urlListProperty.qml rename to tests/auto/qml/qqmlecmascript/data/urlListProperty.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/urlProperty.1.qml b/tests/auto/qml/qqmlecmascript/data/urlProperty.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/urlProperty.1.qml rename to tests/auto/qml/qqmlecmascript/data/urlProperty.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/urlProperty.2.qml b/tests/auto/qml/qqmlecmascript/data/urlProperty.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/urlProperty.2.qml rename to tests/auto/qml/qqmlecmascript/data/urlProperty.2.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/v8bindingException.qml b/tests/auto/qml/qqmlecmascript/data/v8bindingException.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/v8bindingException.qml rename to tests/auto/qml/qqmlecmascript/data/v8bindingException.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/v8functionException.qml b/tests/auto/qml/qqmlecmascript/data/v8functionException.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/v8functionException.qml rename to tests/auto/qml/qqmlecmascript/data/v8functionException.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/valueTypeFunctions.qml b/tests/auto/qml/qqmlecmascript/data/valueTypeFunctions.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/valueTypeFunctions.qml rename to tests/auto/qml/qqmlecmascript/data/valueTypeFunctions.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml b/tests/auto/qml/qqmlecmascript/data/variantsAssignedUndefined.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml rename to tests/auto/qml/qqmlecmascript/data/variantsAssignedUndefined.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/withStatement.1.qml b/tests/auto/qml/qqmlecmascript/data/withStatement.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/withStatement.1.qml rename to tests/auto/qml/qqmlecmascript/data/withStatement.1.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/writeAttachedProperty.qml b/tests/auto/qml/qqmlecmascript/data/writeAttachedProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/writeAttachedProperty.qml rename to tests/auto/qml/qqmlecmascript/data/writeAttachedProperty.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/writeRemovesBinding.qml b/tests/auto/qml/qqmlecmascript/data/writeRemovesBinding.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeecmascript/data/writeRemovesBinding.qml rename to tests/auto/qml/qqmlecmascript/data/writeRemovesBinding.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro b/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro similarity index 71% rename from tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro rename to tests/auto/qml/qqmlecmascript/qqmlecmascript.pro index f4c2638f95..b07e4393a9 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro +++ b/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qdeclarativeecmascript +TARGET = tst_qqmlecmascript macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativeecmascript.cpp \ +SOURCES += tst_qqmlecmascript.cpp \ testtypes.cpp \ ../../shared/testhttpserver.cpp HEADERS += testtypes.h \ @@ -19,4 +19,4 @@ testDataFiles.path = . DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private network widgets testlib +QT += core-private gui-private v8-private qml-private network widgets testlib diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp b/tests/auto/qml/qqmlecmascript/testtypes.cpp similarity index 95% rename from tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp rename to tests/auto/qml/qqmlecmascript/testtypes.cpp index c8f50535ef..78119cb776 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp +++ b/tests/auto/qml/qqmlecmascript/testtypes.cpp @@ -41,7 +41,7 @@ #include "testtypes.h" #include #include -#include +#include #include class BaseExtensionObject : public QObject @@ -101,13 +101,13 @@ class QWidgetDeclarativeUI : public QObject void setWidth(int) { } }; -void MyQmlObject::v8function(QDeclarativeV8Function *args) +void MyQmlObject::v8function(QQmlV8Function *args) { const char *error = "Exception thrown from within QObject slot"; v8::ThrowException(v8::Exception::Error(v8::String::New(error))); } -static QJSValue script_api(QDeclarativeEngine *engine, QJSEngine *scriptEngine) +static QJSValue script_api(QQmlEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(engine) @@ -117,7 +117,7 @@ static QJSValue script_api(QDeclarativeEngine *engine, QJSEngine *scriptEngine) return v; } -static QJSValue readonly_script_api(QDeclarativeEngine *engine, QJSEngine *scriptEngine) +static QJSValue readonly_script_api(QQmlEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(engine) @@ -132,7 +132,7 @@ static QJSValue readonly_script_api(QDeclarativeEngine *engine, QJSEngine *scrip return v; } -static QObject *qobject_api(QDeclarativeEngine *engine, QJSEngine *scriptEngine) +static QObject *qobject_api(QQmlEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(engine) Q_UNUSED(scriptEngine) @@ -143,7 +143,7 @@ static QObject *qobject_api(QDeclarativeEngine *engine, QJSEngine *scriptEngine) return o; } -static QObject *qobject_api_engine_parent(QDeclarativeEngine *engine, QJSEngine *scriptEngine) +static QObject *qobject_api_engine_parent(QQmlEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(scriptEngine) diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h similarity index 95% rename from tests/auto/declarative/qdeclarativeecmascript/testtypes.h rename to tests/auto/qml/qqmlecmascript/testtypes.h index a463d3f64a..154e6f019c 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h +++ b/tests/auto/qml/qqmlecmascript/testtypes.h @@ -42,22 +42,22 @@ #define TESTTYPES_H #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include #include #include #include -#include -#include -#include +#include +#include +#include -#include +#include #include class MyQmlAttachedObject : public QObject @@ -95,7 +95,7 @@ class MyQmlObject : public QObject Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty NOTIFY stringChanged) Q_PROPERTY(QUrl urlProperty READ urlProperty WRITE setUrlProperty NOTIFY urlChanged) Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty NOTIFY objectChanged) - Q_PROPERTY(QDeclarativeListProperty objectListProperty READ objectListProperty CONSTANT) + Q_PROPERTY(QQmlListProperty objectListProperty READ objectListProperty CONSTANT) Q_PROPERTY(int resettableProperty READ resettableProperty WRITE setResettableProperty RESET resetProperty) Q_PROPERTY(QRegExp regExp READ regExp WRITE setRegExp) Q_PROPERTY(int nonscriptable READ nonscriptable WRITE setNonscriptable SCRIPTABLE false) @@ -136,7 +136,7 @@ class MyQmlObject : public QObject emit objectChanged(); } - QDeclarativeListProperty objectListProperty() { return QDeclarativeListProperty(this, m_objectQList); } + QQmlListProperty objectListProperty() { return QQmlListProperty(this, m_objectQList); } bool methodCalled() const { return m_methodCalled; } bool methodIntCalled() const { return m_methodIntCalled; } @@ -198,10 +198,10 @@ public slots: void myinvokable(MyQmlObject *o) { myinvokableObject = o; } void variantMethod(const QVariant &v) { m_variant = v; } void qjsvalueMethod(const QJSValue &v) { m_qjsvalue = v; } - void v8function(QDeclarativeV8Function*); + void v8function(QQmlV8Function*); private: - friend class tst_qdeclarativeecmascript; + friend class tst_qqmlecmascript; bool m_methodCalled; bool m_methodIntCalled; @@ -222,23 +222,23 @@ QML_DECLARE_TYPEINFO(MyQmlObject, QML_HAS_ATTACHED_PROPERTIES) class MyQmlContainer : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty children READ children CONSTANT) + Q_PROPERTY(QQmlListProperty children READ children CONSTANT) public: MyQmlContainer() {} - QDeclarativeListProperty children() { return QDeclarativeListProperty(this, m_children); } + QQmlListProperty children() { return QQmlListProperty(this, m_children); } private: QList m_children; }; -class MyExpression : public QDeclarativeExpression +class MyExpression : public QQmlExpression { Q_OBJECT public: - MyExpression(QDeclarativeContext *ctxt, const QString &expr) - : QDeclarativeExpression(ctxt, 0, expr), changed(false) + MyExpression(QQmlContext *ctxt, const QString &expr) + : QQmlExpression(ctxt, 0, expr), changed(false) { QObject::connect(this, SIGNAL(valueChanged()), this, SLOT(expressionValueChanged())); setNotifyOnValueChanged(true); @@ -341,7 +341,7 @@ class MyTypeObject : public QObject Q_PROPERTY(QString id READ id WRITE setId) Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty) - Q_PROPERTY(QDeclarativeComponent *componentProperty READ componentProperty WRITE setComponentProperty) + Q_PROPERTY(QQmlComponent *componentProperty READ componentProperty WRITE setComponentProperty) Q_PROPERTY(MyFlags flagProperty READ flagProperty WRITE setFlagProperty) Q_PROPERTY(MyEnum enumProperty READ enumProperty WRITE setEnumProperty) Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty) @@ -366,7 +366,7 @@ class MyTypeObject : public QObject Q_PROPERTY(QVector3D vectorProperty READ vectorProperty WRITE setVectorProperty) Q_PROPERTY(QUrl urlProperty READ urlProperty WRITE setUrlProperty) - Q_PROPERTY(QDeclarativeScriptString scriptProperty READ scriptProperty WRITE setScriptProperty) + Q_PROPERTY(QQmlScriptString scriptProperty READ scriptProperty WRITE setScriptProperty) public: MyTypeObject() @@ -388,11 +388,11 @@ class MyTypeObject : public QObject objectPropertyValue = v; } - QDeclarativeComponent *componentPropertyValue; - QDeclarativeComponent *componentProperty() const { + QQmlComponent *componentPropertyValue; + QQmlComponent *componentProperty() const { return componentPropertyValue; } - void setComponentProperty(QDeclarativeComponent *v) { + void setComponentProperty(QQmlComponent *v) { componentPropertyValue = v; } @@ -584,11 +584,11 @@ class MyTypeObject : public QObject urlPropertyValue = v; } - QDeclarativeScriptString scriptPropertyValue; - QDeclarativeScriptString scriptProperty() const { + QQmlScriptString scriptPropertyValue; + QQmlScriptString scriptProperty() const { return scriptPropertyValue; } - void setScriptProperty(const QDeclarativeScriptString &v) { + void setScriptProperty(const QQmlScriptString &v) { scriptPropertyValue = v; } @@ -1048,9 +1048,9 @@ class CircularReferenceObject : public QObject, } } - void setEngine(QDeclarativeEngine* declarativeEngine) + void setEngine(QQmlEngine* declarativeEngine) { - m_engine = QDeclarativeEnginePrivate::get(declarativeEngine)->v8engine(); + m_engine = QQmlEnginePrivate::get(declarativeEngine)->v8engine(); } private: @@ -1109,9 +1109,9 @@ class CircularReferenceHandle : public QObject, crh->m_engine->addRelationshipForGC(crh, crh->m_referenced); } - void setEngine(QDeclarativeEngine* declarativeEngine) + void setEngine(QQmlEngine* declarativeEngine) { - m_engine = QDeclarativeEnginePrivate::get(declarativeEngine)->v8engine(); + m_engine = QQmlEnginePrivate::get(declarativeEngine)->v8engine(); } private: diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp similarity index 83% rename from tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp rename to tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index d30766f982..af219c8826 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -39,17 +39,17 @@ ** ****************************************************************************/ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include "testtypes.h" #include "testhttpserver.h" @@ -62,11 +62,11 @@ QML. This does not include static QML language issues. Static QML language issues are covered in qmllanguage */ -class tst_qdeclarativeecmascript : public QDeclarativeDataTest +class tst_qqmlecmascript : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativeecmascript() {} + tst_qqmlecmascript() {} private slots: void initTestCase(); @@ -245,19 +245,19 @@ private slots: private: static void propertyVarWeakRefCallback(v8::Persistent object, void* parameter); - QDeclarativeEngine engine; + QQmlEngine engine; }; -void tst_qdeclarativeecmascript::initTestCase() +void tst_qqmlecmascript::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); registerTypes(); } -void tst_qdeclarativeecmascript::assignBasicTypes() +void tst_qqmlecmascript::assignBasicTypes() { { - QDeclarativeComponent component(&engine, testFileUrl("assignBasicTypes.qml")); + QQmlComponent component(&engine, testFileUrl("assignBasicTypes.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->flagProperty(), MyTypeObject::FlagVal1 | MyTypeObject::FlagVal3); @@ -285,7 +285,7 @@ void tst_qdeclarativeecmascript::assignBasicTypes() delete object; } { - QDeclarativeComponent component(&engine, testFileUrl("assignBasicTypes.2.qml")); + QQmlComponent component(&engine, testFileUrl("assignBasicTypes.2.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->flagProperty(), MyTypeObject::FlagVal1 | MyTypeObject::FlagVal3); @@ -314,10 +314,10 @@ void tst_qdeclarativeecmascript::assignBasicTypes() } } -void tst_qdeclarativeecmascript::idShortcutInvalidates() +void tst_qqmlecmascript::idShortcutInvalidates() { { - QDeclarativeComponent component(&engine, testFileUrl("idShortcutInvalidates.qml")); + QQmlComponent component(&engine, testFileUrl("idShortcutInvalidates.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QVERIFY(object->objectProperty() != 0); @@ -327,7 +327,7 @@ void tst_qdeclarativeecmascript::idShortcutInvalidates() } { - QDeclarativeComponent component(&engine, testFileUrl("idShortcutInvalidates.1.qml")); + QQmlComponent component(&engine, testFileUrl("idShortcutInvalidates.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QVERIFY(object->objectProperty() != 0); @@ -337,17 +337,17 @@ void tst_qdeclarativeecmascript::idShortcutInvalidates() } } -void tst_qdeclarativeecmascript::boolPropertiesEvaluateAsBool() +void tst_qqmlecmascript::boolPropertiesEvaluateAsBool() { { - QDeclarativeComponent component(&engine, testFileUrl("boolPropertiesEvaluateAsBool.1.qml")); + QQmlComponent component(&engine, testFileUrl("boolPropertiesEvaluateAsBool.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->stringProperty(), QLatin1String("pass")); delete object; } { - QDeclarativeComponent component(&engine, testFileUrl("boolPropertiesEvaluateAsBool.2.qml")); + QQmlComponent component(&engine, testFileUrl("boolPropertiesEvaluateAsBool.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->stringProperty(), QLatin1String("pass")); @@ -355,10 +355,10 @@ void tst_qdeclarativeecmascript::boolPropertiesEvaluateAsBool() } } -void tst_qdeclarativeecmascript::signalAssignment() +void tst_qqmlecmascript::signalAssignment() { { - QDeclarativeComponent component(&engine, testFileUrl("signalAssignment.1.qml")); + QQmlComponent component(&engine, testFileUrl("signalAssignment.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->string(), QString()); @@ -368,7 +368,7 @@ void tst_qdeclarativeecmascript::signalAssignment() } { - QDeclarativeComponent component(&engine, testFileUrl("signalAssignment.2.qml")); + QQmlComponent component(&engine, testFileUrl("signalAssignment.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->string(), QString()); @@ -378,10 +378,10 @@ void tst_qdeclarativeecmascript::signalAssignment() } } -void tst_qdeclarativeecmascript::methods() +void tst_qqmlecmascript::methods() { { - QDeclarativeComponent component(&engine, testFileUrl("methods.1.qml")); + QQmlComponent component(&engine, testFileUrl("methods.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->methodCalled(), false); @@ -393,7 +393,7 @@ void tst_qdeclarativeecmascript::methods() } { - QDeclarativeComponent component(&engine, testFileUrl("methods.2.qml")); + QQmlComponent component(&engine, testFileUrl("methods.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->methodCalled(), false); @@ -405,7 +405,7 @@ void tst_qdeclarativeecmascript::methods() } { - QDeclarativeComponent component(&engine, testFileUrl("methods.3.qml")); + QQmlComponent component(&engine, testFileUrl("methods.3.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("test").toInt(), 19); @@ -413,7 +413,7 @@ void tst_qdeclarativeecmascript::methods() } { - QDeclarativeComponent component(&engine, testFileUrl("methods.4.qml")); + QQmlComponent component(&engine, testFileUrl("methods.4.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("test").toInt(), 19); @@ -423,7 +423,7 @@ void tst_qdeclarativeecmascript::methods() } { - QDeclarativeComponent component(&engine, testFileUrl("methods.5.qml")); + QQmlComponent component(&engine, testFileUrl("methods.5.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("test").toInt(), 9); @@ -431,9 +431,9 @@ void tst_qdeclarativeecmascript::methods() } } -void tst_qdeclarativeecmascript::bindingLoop() +void tst_qqmlecmascript::bindingLoop() { - QDeclarativeComponent component(&engine, testFileUrl("bindingLoop.qml")); + QQmlComponent component(&engine, testFileUrl("bindingLoop.qml")); QString warning = component.url().toString() + ":5:9: QML MyQmlObject: Binding loop detected for property \"stringProperty\""; QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); QObject *object = component.create(); @@ -441,7 +441,7 @@ void tst_qdeclarativeecmascript::bindingLoop() delete object; } -void tst_qdeclarativeecmascript::basicExpressions_data() +void tst_qqmlecmascript::basicExpressions_data() { QTest::addColumn("expression"); QTest::addColumn("result"); @@ -468,7 +468,7 @@ void tst_qdeclarativeecmascript::basicExpressions_data() QTest::newRow("Context property override default object property") << "millipedeLegs" << QVariant(100) << true; } -void tst_qdeclarativeecmascript::basicExpressions() +void tst_qqmlecmascript::basicExpressions() { QFETCH(QString, expression); QFETCH(QVariant, result); @@ -483,8 +483,8 @@ void tst_qdeclarativeecmascript::basicExpressions() object2.setStringProperty("Object2"); object3.setStringProperty("Object3"); - QDeclarativeContext context(engine.rootContext()); - QDeclarativeContext nestedContext(&context); + QQmlContext context(engine.rootContext()); + QQmlContext nestedContext(&context); context.setContextObject(&default1); context.setContextProperty("a", QVariant(1944)); @@ -500,13 +500,13 @@ void tst_qdeclarativeecmascript::basicExpressions() QCOMPARE(expr.evaluate(), result); } -void tst_qdeclarativeecmascript::arrayExpressions() +void tst_qqmlecmascript::arrayExpressions() { QObject obj1; QObject obj2; QObject obj3; - QDeclarativeContext context(engine.rootContext()); + QQmlContext context(engine.rootContext()); context.setContextProperty("a", &obj1); context.setContextProperty("b", &obj2); context.setContextProperty("c", &obj3); @@ -523,9 +523,9 @@ void tst_qdeclarativeecmascript::arrayExpressions() } // Tests that modifying a context property will reevaluate expressions -void tst_qdeclarativeecmascript::contextPropertiesTriggerReeval() +void tst_qqmlecmascript::contextPropertiesTriggerReeval() { - QDeclarativeContext context(engine.rootContext()); + QQmlContext context(engine.rootContext()); MyQmlObject object1; MyQmlObject object2; MyQmlObject *object3 = new MyQmlObject; @@ -586,9 +586,9 @@ void tst_qdeclarativeecmascript::contextPropertiesTriggerReeval() delete object3; } -void tst_qdeclarativeecmascript::objectPropertiesTriggerReeval() +void tst_qqmlecmascript::objectPropertiesTriggerReeval() { - QDeclarativeContext context(engine.rootContext()); + QQmlContext context(engine.rootContext()); MyQmlObject object1; MyQmlObject object2; MyQmlObject object3; @@ -640,9 +640,9 @@ void tst_qdeclarativeecmascript::objectPropertiesTriggerReeval() } } -void tst_qdeclarativeecmascript::deferredProperties() +void tst_qqmlecmascript::deferredProperties() { - QDeclarativeComponent component(&engine, testFileUrl("deferredProperties.qml")); + QQmlComponent component(&engine, testFileUrl("deferredProperties.qml")); MyDeferredObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -663,9 +663,9 @@ void tst_qdeclarativeecmascript::deferredProperties() } // Check errors on deferred properties are correctly emitted -void tst_qdeclarativeecmascript::deferredPropertiesErrors() +void tst_qqmlecmascript::deferredPropertiesErrors() { - QDeclarativeComponent component(&engine, testFileUrl("deferredPropertiesErrors.qml")); + QQmlComponent component(&engine, testFileUrl("deferredPropertiesErrors.qml")); MyDeferredObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -681,9 +681,9 @@ void tst_qdeclarativeecmascript::deferredPropertiesErrors() delete object; } -void tst_qdeclarativeecmascript::extensionObjects() +void tst_qqmlecmascript::extensionObjects() { - QDeclarativeComponent component(&engine, testFileUrl("extensionObjects.qml")); + QQmlComponent component(&engine, testFileUrl("extensionObjects.qml")); MyExtendedObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -706,9 +706,9 @@ void tst_qdeclarativeecmascript::extensionObjects() delete object; } -void tst_qdeclarativeecmascript::overrideExtensionProperties() +void tst_qqmlecmascript::overrideExtensionProperties() { - QDeclarativeComponent component(&engine, testFileUrl("extensionObjectsPropertyOverride.qml")); + QQmlComponent component(&engine, testFileUrl("extensionObjectsPropertyOverride.qml")); OverrideDefaultPropertyObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -718,10 +718,10 @@ void tst_qdeclarativeecmascript::overrideExtensionProperties() delete object; } -void tst_qdeclarativeecmascript::attachedProperties() +void tst_qqmlecmascript::attachedProperties() { { - QDeclarativeComponent component(&engine, testFileUrl("attachedProperty.qml")); + QQmlComponent component(&engine, testFileUrl("attachedProperty.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("a").toInt(), 19); @@ -732,7 +732,7 @@ void tst_qdeclarativeecmascript::attachedProperties() } { - QDeclarativeComponent component(&engine, testFileUrl("attachedProperty.2.qml")); + QQmlComponent component(&engine, testFileUrl("attachedProperty.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("a").toInt(), 26); @@ -744,7 +744,7 @@ void tst_qdeclarativeecmascript::attachedProperties() } { - QDeclarativeComponent component(&engine, testFileUrl("writeAttachedProperty.qml")); + QQmlComponent component(&engine, testFileUrl("writeAttachedProperty.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -759,11 +759,11 @@ void tst_qdeclarativeecmascript::attachedProperties() } } -void tst_qdeclarativeecmascript::enums() +void tst_qqmlecmascript::enums() { // Existent enums { - QDeclarativeComponent component(&engine, testFileUrl("enums.1.qml")); + QQmlComponent component(&engine, testFileUrl("enums.1.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -782,7 +782,7 @@ void tst_qdeclarativeecmascript::enums() } // Non-existent enums { - QDeclarativeComponent component(&engine, testFileUrl("enums.2.qml")); + QQmlComponent component(&engine, testFileUrl("enums.2.qml")); QString warning1 = component.url().toString() + ":5: Unable to assign [undefined] to int"; QString warning2 = component.url().toString() + ":6: Unable to assign [undefined] to int"; @@ -798,9 +798,9 @@ void tst_qdeclarativeecmascript::enums() } } -void tst_qdeclarativeecmascript::valueTypeFunctions() +void tst_qqmlecmascript::valueTypeFunctions() { - QDeclarativeComponent component(&engine, testFileUrl("valueTypeFunctions.qml")); + QQmlComponent component(&engine, testFileUrl("valueTypeFunctions.qml")); MyTypeObject *obj = qobject_cast(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->rectProperty(), QRect(0,0,100,100)); @@ -813,11 +813,11 @@ void tst_qdeclarativeecmascript::valueTypeFunctions() Tests that writing a constant to a property with a binding on it disables the binding. */ -void tst_qdeclarativeecmascript::constantsOverrideBindings() +void tst_qqmlecmascript::constantsOverrideBindings() { // From ECMAScript { - QDeclarativeComponent component(&engine, testFileUrl("constantsOverrideBindings.1.qml")); + QQmlComponent component(&engine, testFileUrl("constantsOverrideBindings.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -836,7 +836,7 @@ void tst_qdeclarativeecmascript::constantsOverrideBindings() // During construction { - QDeclarativeComponent component(&engine, testFileUrl("constantsOverrideBindings.2.qml")); + QQmlComponent component(&engine, testFileUrl("constantsOverrideBindings.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -852,7 +852,7 @@ void tst_qdeclarativeecmascript::constantsOverrideBindings() #if 0 // From C++ { - QDeclarativeComponent component(&engine, testFileUrl("constantsOverrideBindings.3.qml")); + QQmlComponent component(&engine, testFileUrl("constantsOverrideBindings.3.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -872,7 +872,7 @@ void tst_qdeclarativeecmascript::constantsOverrideBindings() // Using an alias { - QDeclarativeComponent component(&engine, testFileUrl("constantsOverrideBindings.4.qml")); + QQmlComponent component(&engine, testFileUrl("constantsOverrideBindings.4.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -890,9 +890,9 @@ void tst_qdeclarativeecmascript::constantsOverrideBindings() Tests that assigning a binding to a property that already has a binding causes the original binding to be disabled. */ -void tst_qdeclarativeecmascript::outerBindingOverridesInnerBinding() +void tst_qqmlecmascript::outerBindingOverridesInnerBinding() { - QDeclarativeComponent component(&engine, + QQmlComponent component(&engine, testFileUrl("outerBindingOverridesInnerBinding.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -919,9 +919,9 @@ Access a non-existent attached object. Tests for a regression where this used to crash. */ -void tst_qdeclarativeecmascript::nonExistentAttachedObject() +void tst_qqmlecmascript::nonExistentAttachedObject() { - QDeclarativeComponent component(&engine, testFileUrl("nonExistentAttachedObject.qml")); + QQmlComponent component(&engine, testFileUrl("nonExistentAttachedObject.qml")); QString warning = component.url().toString() + ":4: Unable to assign [undefined] to QString"; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); @@ -932,10 +932,10 @@ void tst_qdeclarativeecmascript::nonExistentAttachedObject() delete object; } -void tst_qdeclarativeecmascript::scope() +void tst_qqmlecmascript::scope() { { - QDeclarativeComponent component(&engine, testFileUrl("scope.qml")); + QQmlComponent component(&engine, testFileUrl("scope.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -954,7 +954,7 @@ void tst_qdeclarativeecmascript::scope() } { - QDeclarativeComponent component(&engine, testFileUrl("scope.2.qml")); + QQmlComponent component(&engine, testFileUrl("scope.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -969,7 +969,7 @@ void tst_qdeclarativeecmascript::scope() } { - QDeclarativeComponent component(&engine, testFileUrl("scope.3.qml")); + QQmlComponent component(&engine, testFileUrl("scope.3.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -982,7 +982,7 @@ void tst_qdeclarativeecmascript::scope() // Signal argument scope { - QDeclarativeComponent component(&engine, testFileUrl("scope.4.qml")); + QQmlComponent component(&engine, testFileUrl("scope.4.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -998,7 +998,7 @@ void tst_qdeclarativeecmascript::scope() } { - QDeclarativeComponent component(&engine, testFileUrl("scope.5.qml")); + QQmlComponent component(&engine, testFileUrl("scope.5.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1009,7 +1009,7 @@ void tst_qdeclarativeecmascript::scope() } { - QDeclarativeComponent component(&engine, testFileUrl("scope.6.qml")); + QQmlComponent component(&engine, testFileUrl("scope.6.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1021,9 +1021,9 @@ void tst_qdeclarativeecmascript::scope() // In 4.7, non-library javascript files that had no imports shared the imports of their // importing context -void tst_qdeclarativeecmascript::importScope() +void tst_qqmlecmascript::importScope() { - QDeclarativeComponent component(&engine, testFileUrl("importScope.qml")); + QQmlComponent component(&engine, testFileUrl("importScope.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -1034,11 +1034,11 @@ void tst_qdeclarativeecmascript::importScope() /* Tests that "any" type passes through a synthesized signal parameter. This -is essentially a test of QDeclarativeMetaType::copy() +is essentially a test of QQmlMetaType::copy() */ -void tst_qdeclarativeecmascript::signalParameterTypes() +void tst_qqmlecmascript::signalParameterTypes() { - QDeclarativeComponent component(&engine, testFileUrl("signalParameterTypes.qml")); + QQmlComponent component(&engine, testFileUrl("signalParameterTypes.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -1057,9 +1057,9 @@ void tst_qdeclarativeecmascript::signalParameterTypes() /* Test that two JS objects for the same QObject compare as equal. */ -void tst_qdeclarativeecmascript::objectsCompareAsEqual() +void tst_qqmlecmascript::objectsCompareAsEqual() { - QDeclarativeComponent component(&engine, testFileUrl("objectsCompareAsEqual.qml")); + QQmlComponent component(&engine, testFileUrl("objectsCompareAsEqual.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1077,9 +1077,9 @@ Confirm bindings and alias properties can coexist. Tests for a regression where the binding would not reevaluate. */ -void tst_qdeclarativeecmascript::aliasPropertyAndBinding() +void tst_qqmlecmascript::aliasPropertyAndBinding() { - QDeclarativeComponent component(&engine, testFileUrl("aliasPropertyAndBinding.qml")); + QQmlComponent component(&engine, testFileUrl("aliasPropertyAndBinding.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1098,72 +1098,72 @@ void tst_qdeclarativeecmascript::aliasPropertyAndBinding() Ensure that we can write undefined value to an alias property, and that the aliased property is reset correctly if possible. */ -void tst_qdeclarativeecmascript::aliasPropertyReset() +void tst_qqmlecmascript::aliasPropertyReset() { QObject *object = 0; // test that a manual write (of undefined) to a resettable aliased property succeeds - QDeclarativeComponent c1(&engine, testFileUrl("aliasreset/aliasPropertyReset.1.qml")); + QQmlComponent c1(&engine, testFileUrl("aliasreset/aliasPropertyReset.1.qml")); object = c1.create(); QVERIFY(object != 0); - QVERIFY(object->property("sourceComponentAlias").value() != 0); + QVERIFY(object->property("sourceComponentAlias").value() != 0); QCOMPARE(object->property("aliasIsUndefined"), QVariant(false)); QMetaObject::invokeMethod(object, "resetAliased"); - QVERIFY(object->property("sourceComponentAlias").value() == 0); + QVERIFY(object->property("sourceComponentAlias").value() == 0); QCOMPARE(object->property("aliasIsUndefined"), QVariant(true)); delete object; // test that a manual write (of undefined) to a resettable alias property succeeds - QDeclarativeComponent c2(&engine, testFileUrl("aliasreset/aliasPropertyReset.2.qml")); + QQmlComponent c2(&engine, testFileUrl("aliasreset/aliasPropertyReset.2.qml")); object = c2.create(); QVERIFY(object != 0); - QVERIFY(object->property("sourceComponentAlias").value() != 0); + QVERIFY(object->property("sourceComponentAlias").value() != 0); QCOMPARE(object->property("loaderSourceComponentIsUndefined"), QVariant(false)); QMetaObject::invokeMethod(object, "resetAlias"); - QVERIFY(object->property("sourceComponentAlias").value() == 0); + QVERIFY(object->property("sourceComponentAlias").value() == 0); QCOMPARE(object->property("loaderSourceComponentIsUndefined"), QVariant(true)); delete object; // test that an alias to a bound property works correctly - QDeclarativeComponent c3(&engine, testFileUrl("aliasreset/aliasPropertyReset.3.qml")); + QQmlComponent c3(&engine, testFileUrl("aliasreset/aliasPropertyReset.3.qml")); object = c3.create(); QVERIFY(object != 0); - QVERIFY(object->property("sourceComponentAlias").value() != 0); + QVERIFY(object->property("sourceComponentAlias").value() != 0); QCOMPARE(object->property("loaderOneSourceComponentIsUndefined"), QVariant(false)); QCOMPARE(object->property("loaderTwoSourceComponentIsUndefined"), QVariant(false)); QMetaObject::invokeMethod(object, "resetAlias"); - QVERIFY(object->property("sourceComponentAlias").value() == 0); + QVERIFY(object->property("sourceComponentAlias").value() == 0); QCOMPARE(object->property("loaderOneSourceComponentIsUndefined"), QVariant(true)); QCOMPARE(object->property("loaderTwoSourceComponentIsUndefined"), QVariant(false)); delete object; // test that a manual write (of undefined) to a resettable alias property // whose aliased property's object has been deleted, does not crash. - QDeclarativeComponent c4(&engine, testFileUrl("aliasreset/aliasPropertyReset.4.qml")); + QQmlComponent c4(&engine, testFileUrl("aliasreset/aliasPropertyReset.4.qml")); object = c4.create(); QVERIFY(object != 0); - QVERIFY(object->property("sourceComponentAlias").value() != 0); + QVERIFY(object->property("sourceComponentAlias").value() != 0); QObject *loader = object->findChild("loader"); QVERIFY(loader != 0); delete loader; - QVERIFY(object->property("sourceComponentAlias").value() == 0); // deletion should have caused value unset. + QVERIFY(object->property("sourceComponentAlias").value() == 0); // deletion should have caused value unset. QMetaObject::invokeMethod(object, "resetAlias"); // shouldn't crash. - QVERIFY(object->property("sourceComponentAlias").value() == 0); + QVERIFY(object->property("sourceComponentAlias").value() == 0); QMetaObject::invokeMethod(object, "setAlias"); // shouldn't crash, and shouldn't change value (since it's no longer referencing anything). - QVERIFY(object->property("sourceComponentAlias").value() == 0); + QVERIFY(object->property("sourceComponentAlias").value() == 0); delete object; // test that binding an alias property to an undefined value works correctly - QDeclarativeComponent c5(&engine, testFileUrl("aliasreset/aliasPropertyReset.5.qml")); + QQmlComponent c5(&engine, testFileUrl("aliasreset/aliasPropertyReset.5.qml")); object = c5.create(); QVERIFY(object != 0); - QVERIFY(object->property("sourceComponentAlias").value() == 0); // bound to undefined value. + QVERIFY(object->property("sourceComponentAlias").value() == 0); // bound to undefined value. delete object; // test that a manual write (of undefined) to a non-resettable property fails properly QUrl url = testFileUrl("aliasreset/aliasPropertyReset.error.1.qml"); QString warning1 = url.toString() + QLatin1String(":15: Error: Cannot assign [undefined] to int"); - QDeclarativeComponent e1(&engine, url); + QQmlComponent e1(&engine, url); object = e1.create(); QVERIFY(object != 0); QCOMPARE(object->property("intAlias").value(), 12); @@ -1175,7 +1175,7 @@ void tst_qdeclarativeecmascript::aliasPropertyReset() delete object; } -void tst_qdeclarativeecmascript::dynamicCreation_data() +void tst_qqmlecmascript::dynamicCreation_data() { QTest::addColumn("method"); QTest::addColumn("createdName"); @@ -1189,12 +1189,12 @@ void tst_qdeclarativeecmascript::dynamicCreation_data() Test using createQmlObject to dynamically generate an item Also using createComponent is tested. */ -void tst_qdeclarativeecmascript::dynamicCreation() +void tst_qqmlecmascript::dynamicCreation() { QFETCH(QString, method); QFETCH(QString, createdName); - QDeclarativeComponent component(&engine, testFileUrl("dynamicCreation.qml")); + QQmlComponent component(&engine, testFileUrl("dynamicCreation.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -1209,13 +1209,13 @@ void tst_qdeclarativeecmascript::dynamicCreation() /* Tests the destroy function */ -void tst_qdeclarativeecmascript::dynamicDestruction() +void tst_qqmlecmascript::dynamicDestruction() { { - QDeclarativeComponent component(&engine, testFileUrl("dynamicDeletion.qml")); - QDeclarativeGuard object = qobject_cast(component.create()); + QQmlComponent component(&engine, testFileUrl("dynamicDeletion.qml")); + QQmlGuard object = qobject_cast(component.create()); QVERIFY(object != 0); - QDeclarativeGuard createdQmlObject = 0; + QQmlGuard createdQmlObject = 0; QMetaObject::invokeMethod(object, "create"); createdQmlObject = object->objectProperty(); @@ -1237,7 +1237,7 @@ void tst_qdeclarativeecmascript::dynamicDestruction() } QVERIFY(!createdQmlObject); - QDeclarativeEngine::setObjectOwnership(object, QDeclarativeEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(object, QQmlEngine::JavaScriptOwnership); QMetaObject::invokeMethod(object, "killMe"); QVERIFY(object); QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); @@ -1246,7 +1246,7 @@ void tst_qdeclarativeecmascript::dynamicDestruction() } { - QDeclarativeComponent component(&engine, testFileUrl("dynamicDeletion.2.qml")); + QQmlComponent component(&engine, testFileUrl("dynamicDeletion.2.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -1270,9 +1270,9 @@ void tst_qdeclarativeecmascript::dynamicDestruction() /* tests that id.toString() works */ -void tst_qdeclarativeecmascript::objectToString() +void tst_qqmlecmascript::objectToString() { - QDeclarativeComponent component(&engine, testFileUrl("declarativeToString.qml")); + QQmlComponent component(&engine, testFileUrl("qmlToString.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "testToString"); @@ -1285,14 +1285,14 @@ void tst_qdeclarativeecmascript::objectToString() /* tests that id.hasOwnProperty() works */ -void tst_qdeclarativeecmascript::objectHasOwnProperty() +void tst_qqmlecmascript::objectHasOwnProperty() { - QUrl url = testFileUrl("declarativeHasOwnProperty.qml"); + QUrl url = testFileUrl("qmlHasOwnProperty.qml"); QString warning1 = url.toString() + ":59: TypeError: Cannot call method 'hasOwnProperty' of undefined"; QString warning2 = url.toString() + ":64: TypeError: Cannot call method 'hasOwnProperty' of undefined"; QString warning3 = url.toString() + ":69: TypeError: Cannot call method 'hasOwnProperty' of undefined"; - QDeclarativeComponent component(&engine, url); + QQmlComponent component(&engine, url); QObject *object = component.create(); QVERIFY(object != 0); @@ -1336,10 +1336,10 @@ Tests bindings that indirectly cause their own deletion work. This test is best run under valgrind to ensure no invalid memory access occur. */ -void tst_qdeclarativeecmascript::selfDeletingBinding() +void tst_qqmlecmascript::selfDeletingBinding() { { - QDeclarativeComponent component(&engine, testFileUrl("selfDeletingBinding.qml")); + QQmlComponent component(&engine, testFileUrl("selfDeletingBinding.qml")); QObject *object = component.create(); QVERIFY(object != 0); object->setProperty("triggerDelete", true); @@ -1347,7 +1347,7 @@ void tst_qdeclarativeecmascript::selfDeletingBinding() } { - QDeclarativeComponent component(&engine, testFileUrl("selfDeletingBinding.2.qml")); + QQmlComponent component(&engine, testFileUrl("selfDeletingBinding.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); object->setProperty("triggerDelete", true); @@ -1362,9 +1362,9 @@ This test a regression where this used to crash. The issue was specificially for extended objects that did not include a synthesized meta object (so non-root and no synthesiszed properties). */ -void tst_qdeclarativeecmascript::extendedObjectPropertyLookup() +void tst_qqmlecmascript::extendedObjectPropertyLookup() { - QDeclarativeComponent component(&engine, testFileUrl("extendedObjectPropertyLookup.qml")); + QQmlComponent component(&engine, testFileUrl("extendedObjectPropertyLookup.qml")); QObject *object = component.create(); QVERIFY(object != 0); delete object; @@ -1373,9 +1373,9 @@ void tst_qdeclarativeecmascript::extendedObjectPropertyLookup() /* Test that extended object properties can be accessed correctly. */ -void tst_qdeclarativeecmascript::extendedObjectPropertyLookup2() +void tst_qqmlecmascript::extendedObjectPropertyLookup2() { - QDeclarativeComponent component(&engine, testFileUrl("extendedObjectPropertyLookup2.qml")); + QQmlComponent component(&engine, testFileUrl("extendedObjectPropertyLookup2.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1388,9 +1388,9 @@ void tst_qdeclarativeecmascript::extendedObjectPropertyLookup2() /* Test file/lineNumbers for binding/Script errors. */ -void tst_qdeclarativeecmascript::scriptErrors() +void tst_qqmlecmascript::scriptErrors() { - QDeclarativeComponent component(&engine, testFileUrl("scriptErrors.qml")); + QQmlComponent component(&engine, testFileUrl("scriptErrors.qml")); QString url = component.url().toString(); QString warning1 = url.left(url.length() - 3) + "js:2: Error: Invalid write to global property \"a\""; @@ -1425,9 +1425,9 @@ void tst_qdeclarativeecmascript::scriptErrors() /* Test file/lineNumbers for inline functions. */ -void tst_qdeclarativeecmascript::functionErrors() +void tst_qqmlecmascript::functionErrors() { - QDeclarativeComponent component(&engine, testFileUrl("functionErrors.qml")); + QQmlComponent component(&engine, testFileUrl("functionErrors.qml")); QString url = component.url().toString(); QString warning = url + ":5: Error: Invalid write to global property \"a\""; @@ -1439,7 +1439,7 @@ void tst_qdeclarativeecmascript::functionErrors() delete object; // test that if an exception occurs while invoking js function from cpp, it is reported as expected. - QDeclarativeComponent componentTwo(&engine, testFileUrl("scarceResourceFunctionFail.var.qml")); + QQmlComponent componentTwo(&engine, testFileUrl("scarceResourceFunctionFail.var.qml")); url = componentTwo.url().toString(); object = componentTwo.create(); QVERIFY(object != 0); @@ -1456,9 +1456,9 @@ void tst_qdeclarativeecmascript::functionErrors() /* Test various errors that can occur when assigning a property from script */ -void tst_qdeclarativeecmascript::propertyAssignmentErrors() +void tst_qqmlecmascript::propertyAssignmentErrors() { - QDeclarativeComponent component(&engine, testFileUrl("propertyAssignmentErrors.qml")); + QQmlComponent component(&engine, testFileUrl("propertyAssignmentErrors.qml")); QString url = component.url().toString(); @@ -1475,9 +1475,9 @@ void tst_qdeclarativeecmascript::propertyAssignmentErrors() Test bindings still work when the reeval is triggered from within a signal script. */ -void tst_qdeclarativeecmascript::signalTriggeredBindings() +void tst_qqmlecmascript::signalTriggeredBindings() { - QDeclarativeComponent component(&engine, testFileUrl("signalTriggeredBindings.qml")); + QQmlComponent component(&engine, testFileUrl("signalTriggeredBindings.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -1503,9 +1503,9 @@ void tst_qdeclarativeecmascript::signalTriggeredBindings() /* Test that list properties can be iterated from ECMAScript */ -void tst_qdeclarativeecmascript::listProperties() +void tst_qqmlecmascript::listProperties() { - QDeclarativeComponent component(&engine, testFileUrl("listProperties.qml")); + QQmlComponent component(&engine, testFileUrl("listProperties.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -1517,9 +1517,9 @@ void tst_qdeclarativeecmascript::listProperties() delete object; } -void tst_qdeclarativeecmascript::exceptionClearsOnReeval() +void tst_qqmlecmascript::exceptionClearsOnReeval() { - QDeclarativeComponent component(&engine, testFileUrl("exceptionClearsOnReeval.qml")); + QQmlComponent component(&engine, testFileUrl("exceptionClearsOnReeval.qml")); QString url = component.url().toString(); QString warning = url + ":4: TypeError: Cannot read property 'objectProperty' of null"; @@ -1540,9 +1540,9 @@ void tst_qdeclarativeecmascript::exceptionClearsOnReeval() delete object; } -void tst_qdeclarativeecmascript::exceptionSlotProducesWarning() +void tst_qqmlecmascript::exceptionSlotProducesWarning() { - QDeclarativeComponent component(&engine, testFileUrl("exceptionProducesWarning.qml")); + QQmlComponent component(&engine, testFileUrl("exceptionProducesWarning.qml")); QString url = component.url().toString(); QString warning = component.url().toString() + ":6: Error: JS exception"; @@ -1553,9 +1553,9 @@ void tst_qdeclarativeecmascript::exceptionSlotProducesWarning() delete object; } -void tst_qdeclarativeecmascript::exceptionBindingProducesWarning() +void tst_qqmlecmascript::exceptionBindingProducesWarning() { - QDeclarativeComponent component(&engine, testFileUrl("exceptionProducesWarning2.qml")); + QQmlComponent component(&engine, testFileUrl("exceptionProducesWarning2.qml")); QString url = component.url().toString(); QString warning = component.url().toString() + ":5: Error: JS exception"; @@ -1566,10 +1566,10 @@ void tst_qdeclarativeecmascript::exceptionBindingProducesWarning() delete object; } -void tst_qdeclarativeecmascript::compileInvalidBinding() +void tst_qqmlecmascript::compileInvalidBinding() { // QTBUG-23387: ensure that invalid bindings don't cause a crash. - QDeclarativeComponent component(&engine, testFileUrl("v8bindingException.qml")); + QQmlComponent component(&engine, testFileUrl("v8bindingException.qml")); QString warning = component.url().toString() + ":16: SyntaxError: Unexpected token ILLEGAL"; QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); QObject *object = component.create(); @@ -1584,10 +1584,10 @@ static void transientErrorsMsgHandler(QtMsgType, const char *) } // Check that transient binding errors are not displayed -void tst_qdeclarativeecmascript::transientErrors() +void tst_qqmlecmascript::transientErrors() { { - QDeclarativeComponent component(&engine, testFileUrl("transientErrors.qml")); + QQmlComponent component(&engine, testFileUrl("transientErrors.qml")); transientErrorsMsgCount = 0; QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler); @@ -1604,7 +1604,7 @@ void tst_qdeclarativeecmascript::transientErrors() // One binding erroring multiple times, but then resolving { - QDeclarativeComponent component(&engine, testFileUrl("transientErrors.2.qml")); + QQmlComponent component(&engine, testFileUrl("transientErrors.2.qml")); transientErrorsMsgCount = 0; QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler); @@ -1621,9 +1621,9 @@ void tst_qdeclarativeecmascript::transientErrors() } // Check that errors during shutdown are minimized -void tst_qdeclarativeecmascript::shutdownErrors() +void tst_qqmlecmascript::shutdownErrors() { - QDeclarativeComponent component(&engine, testFileUrl("shutdownErrors.qml")); + QQmlComponent component(&engine, testFileUrl("shutdownErrors.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1636,9 +1636,9 @@ void tst_qdeclarativeecmascript::shutdownErrors() QCOMPARE(transientErrorsMsgCount, 0); } -void tst_qdeclarativeecmascript::compositePropertyType() +void tst_qqmlecmascript::compositePropertyType() { - QDeclarativeComponent component(&engine, testFileUrl("compositePropertyType.qml")); + QQmlComponent component(&engine, testFileUrl("compositePropertyType.qml")); QTest::ignoreMessage(QtDebugMsg, "hello world"); QObject *object = qobject_cast(component.create()); @@ -1646,9 +1646,9 @@ void tst_qdeclarativeecmascript::compositePropertyType() } // QTBUG-5759 -void tst_qdeclarativeecmascript::jsObject() +void tst_qqmlecmascript::jsObject() { - QDeclarativeComponent component(&engine, testFileUrl("jsObject.qml")); + QQmlComponent component(&engine, testFileUrl("jsObject.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1657,10 +1657,10 @@ void tst_qdeclarativeecmascript::jsObject() delete object; } -void tst_qdeclarativeecmascript::undefinedResetsProperty() +void tst_qqmlecmascript::undefinedResetsProperty() { { - QDeclarativeComponent component(&engine, testFileUrl("undefinedResetsProperty.qml")); + QQmlComponent component(&engine, testFileUrl("undefinedResetsProperty.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1677,7 +1677,7 @@ void tst_qdeclarativeecmascript::undefinedResetsProperty() delete object; } { - QDeclarativeComponent component(&engine, testFileUrl("undefinedResetsProperty.2.qml")); + QQmlComponent component(&engine, testFileUrl("undefinedResetsProperty.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1692,9 +1692,9 @@ void tst_qdeclarativeecmascript::undefinedResetsProperty() } // Aliases to variant properties should work -void tst_qdeclarativeecmascript::qtbug_22464() +void tst_qqmlecmascript::qtbug_22464() { - QDeclarativeComponent component(&engine, testFileUrl("qtbug_22464.qml")); + QQmlComponent component(&engine, testFileUrl("qtbug_22464.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1703,9 +1703,9 @@ void tst_qdeclarativeecmascript::qtbug_22464() delete object; } -void tst_qdeclarativeecmascript::qtbug_21580() +void tst_qqmlecmascript::qtbug_21580() { - QDeclarativeComponent component(&engine, testFileUrl("qtbug_21580.qml")); + QQmlComponent component(&engine, testFileUrl("qtbug_21580.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1716,9 +1716,9 @@ void tst_qdeclarativeecmascript::qtbug_21580() } // QTBUG-6781 -void tst_qdeclarativeecmascript::bug1() +void tst_qqmlecmascript::bug1() { - QDeclarativeComponent component(&engine, testFileUrl("bug.1.qml")); + QQmlComponent component(&engine, testFileUrl("bug.1.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1735,9 +1735,9 @@ void tst_qdeclarativeecmascript::bug1() delete object; } -void tst_qdeclarativeecmascript::bug2() +void tst_qqmlecmascript::bug2() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import Qt.test 1.0;\nQPlainTextEdit { width: 100 }", QUrl()); QObject *object = component.create(); @@ -1747,13 +1747,13 @@ void tst_qdeclarativeecmascript::bug2() } // Don't crash in createObject when the component has errors. -void tst_qdeclarativeecmascript::dynamicCreationCrash() +void tst_qqmlecmascript::dynamicCreationCrash() { - QDeclarativeComponent component(&engine, testFileUrl("dynamicCreation.qml")); + QQmlComponent component(&engine, testFileUrl("dynamicCreation.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); + QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); QMetaObject::invokeMethod(object, "dontCrash"); QObject *created = object->objectProperty(); QVERIFY(created == 0); @@ -1762,15 +1762,15 @@ void tst_qdeclarativeecmascript::dynamicCreationCrash() } // ownership transferred to JS, ensure that GC runs the dtor -void tst_qdeclarativeecmascript::dynamicCreationOwnership() +void tst_qqmlecmascript::dynamicCreationOwnership() { int dtorCount = 0; int expectedDtorCount = 1; // start at 1 since we expect mdcdo to dtor too. // allow the engine to go out of scope too. { - QDeclarativeEngine dcoEngine; - QDeclarativeComponent component(&dcoEngine, testFileUrl("dynamicCreationOwnership.qml")); + QQmlEngine dcoEngine; + QQmlComponent component(&dcoEngine, testFileUrl("dynamicCreationOwnership.qml")); QObject *object = component.create(); QVERIFY(object != 0); MyDynamicCreationDestructionObject *mdcdo = object->findChild("mdcdo"); @@ -1797,11 +1797,11 @@ void tst_qdeclarativeecmascript::dynamicCreationOwnership() QCOMPARE(dtorCount, expectedDtorCount); } -void tst_qdeclarativeecmascript::regExpBug() +void tst_qqmlecmascript::regExpBug() { //QTBUG-9367 { - QDeclarativeComponent component(&engine, testFileUrl("regExp.qml")); + QQmlComponent component(&engine, testFileUrl("regExp.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->regExp().pattern(), QLatin1String("[a-zA-z]")); @@ -1811,8 +1811,8 @@ void tst_qdeclarativeecmascript::regExpBug() //QTBUG-23068 { QString err = QString(QLatin1String("%1:6 Invalid property assignment: regular expression expected; use /pattern/ syntax\n")).arg(testFileUrl("regExp.2.qml").toString()); - QDeclarativeComponent component(&engine, testFileUrl("regExp.2.qml")); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); + QQmlComponent component(&engine, testFileUrl("regExp.2.qml")); + QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(!object); QCOMPARE(component.errorString(), err); @@ -1882,12 +1882,12 @@ static inline v8::Handle evaluate(QV8Engine *engine, v8::Handlev8engine(); @@ -2342,9 +2342,9 @@ void tst_qdeclarativeecmascript::callQtInvokables() } // QTBUG-13047 (check that you can pass registered object types as args) -void tst_qdeclarativeecmascript::invokableObjectArg() +void tst_qqmlecmascript::invokableObjectArg() { - QDeclarativeComponent component(&engine, testFileUrl("invokableObjectArg.qml")); + QQmlComponent component(&engine, testFileUrl("invokableObjectArg.qml")); QObject *o = component.create(); QVERIFY(o); @@ -2356,9 +2356,9 @@ void tst_qdeclarativeecmascript::invokableObjectArg() } // QTBUG-13047 (check that you can return registered object types from methods) -void tst_qdeclarativeecmascript::invokableObjectRet() +void tst_qqmlecmascript::invokableObjectRet() { - QDeclarativeComponent component(&engine, testFileUrl("invokableObjectRet.qml")); + QQmlComponent component(&engine, testFileUrl("invokableObjectRet.qml")); QObject *o = component.create(); QVERIFY(o); @@ -2367,34 +2367,34 @@ void tst_qdeclarativeecmascript::invokableObjectRet() } // QTBUG-5675 -void tst_qdeclarativeecmascript::listToVariant() +void tst_qqmlecmascript::listToVariant() { - QDeclarativeComponent component(&engine, testFileUrl("listToVariant.qml")); + QQmlComponent component(&engine, testFileUrl("listToVariant.qml")); MyQmlContainer container; - QDeclarativeContext context(engine.rootContext()); + QQmlContext context(engine.rootContext()); context.setContextObject(&container); QObject *object = component.create(&context); QVERIFY(object != 0); QVariant v = object->property("test"); - QCOMPARE(v.userType(), qMetaTypeId()); - QVERIFY(qvariant_cast(v).object() == &container); + QCOMPARE(v.userType(), qMetaTypeId()); + QVERIFY(qvariant_cast(v).object() == &container); delete object; } // QTBUG-16316 -Q_DECLARE_METATYPE(QDeclarativeListProperty) -void tst_qdeclarativeecmascript::listAssignment() +Q_DECLARE_METATYPE(QQmlListProperty) +void tst_qqmlecmascript::listAssignment() { - QDeclarativeComponent component(&engine, testFileUrl("listAssignment.qml")); + QQmlComponent component(&engine, testFileUrl("listAssignment.qml")); QObject *obj = component.create(); QCOMPARE(obj->property("list1length").toInt(), 2); - QDeclarativeListProperty list1 = obj->property("list1").value >(); - QDeclarativeListProperty list2 = obj->property("list2").value >(); + QQmlListProperty list1 = obj->property("list1").value >(); + QQmlListProperty list2 = obj->property("list2").value >(); QCOMPARE(list1.count(&list1), list2.count(&list2)); QCOMPARE(list1.at(&list1, 0), list2.at(&list2, 0)); QCOMPARE(list1.at(&list1, 1), list2.at(&list2, 1)); @@ -2402,18 +2402,18 @@ void tst_qdeclarativeecmascript::listAssignment() } // QTBUG-7957 -void tst_qdeclarativeecmascript::multiEngineObject() +void tst_qqmlecmascript::multiEngineObject() { MyQmlObject obj; obj.setStringProperty("Howdy planet"); - QDeclarativeEngine e1; + QQmlEngine e1; e1.rootContext()->setContextProperty("thing", &obj); - QDeclarativeComponent c1(&e1, testFileUrl("multiEngineObject.qml")); + QQmlComponent c1(&e1, testFileUrl("multiEngineObject.qml")); - QDeclarativeEngine e2; + QQmlEngine e2; e2.rootContext()->setContextProperty("thing", &obj); - QDeclarativeComponent c2(&e2, testFileUrl("multiEngineObject.qml")); + QQmlComponent c2(&e2, testFileUrl("multiEngineObject.qml")); QObject *o1 = c1.create(); QObject *o2 = c2.create(); @@ -2426,9 +2426,9 @@ void tst_qdeclarativeecmascript::multiEngineObject() } // Test that references to QObjects are cleanup when the object is destroyed -void tst_qdeclarativeecmascript::deletedObject() +void tst_qqmlecmascript::deletedObject() { - QDeclarativeComponent component(&engine, testFileUrl("deletedObject.qml")); + QQmlComponent component(&engine, testFileUrl("deletedObject.qml")); QObject *object = component.create(); @@ -2440,9 +2440,9 @@ void tst_qdeclarativeecmascript::deletedObject() delete object; } -void tst_qdeclarativeecmascript::attachedPropertyScope() +void tst_qqmlecmascript::attachedPropertyScope() { - QDeclarativeComponent component(&engine, testFileUrl("attachedPropertyScope.qml")); + QQmlComponent component(&engine, testFileUrl("attachedPropertyScope.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -2460,10 +2460,10 @@ void tst_qdeclarativeecmascript::attachedPropertyScope() delete object; } -void tst_qdeclarativeecmascript::scriptConnect() +void tst_qqmlecmascript::scriptConnect() { { - QDeclarativeComponent component(&engine, testFileUrl("scriptConnect.1.qml")); + QQmlComponent component(&engine, testFileUrl("scriptConnect.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2476,7 +2476,7 @@ void tst_qdeclarativeecmascript::scriptConnect() } { - QDeclarativeComponent component(&engine, testFileUrl("scriptConnect.2.qml")); + QQmlComponent component(&engine, testFileUrl("scriptConnect.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2489,7 +2489,7 @@ void tst_qdeclarativeecmascript::scriptConnect() } { - QDeclarativeComponent component(&engine, testFileUrl("scriptConnect.3.qml")); + QQmlComponent component(&engine, testFileUrl("scriptConnect.3.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2502,7 +2502,7 @@ void tst_qdeclarativeecmascript::scriptConnect() } { - QDeclarativeComponent component(&engine, testFileUrl("scriptConnect.4.qml")); + QQmlComponent component(&engine, testFileUrl("scriptConnect.4.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2515,7 +2515,7 @@ void tst_qdeclarativeecmascript::scriptConnect() } { - QDeclarativeComponent component(&engine, testFileUrl("scriptConnect.5.qml")); + QQmlComponent component(&engine, testFileUrl("scriptConnect.5.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2528,7 +2528,7 @@ void tst_qdeclarativeecmascript::scriptConnect() } { - QDeclarativeComponent component(&engine, testFileUrl("scriptConnect.6.qml")); + QQmlComponent component(&engine, testFileUrl("scriptConnect.6.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2541,10 +2541,10 @@ void tst_qdeclarativeecmascript::scriptConnect() } } -void tst_qdeclarativeecmascript::scriptDisconnect() +void tst_qqmlecmascript::scriptDisconnect() { { - QDeclarativeComponent component(&engine, testFileUrl("scriptDisconnect.1.qml")); + QQmlComponent component(&engine, testFileUrl("scriptDisconnect.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2563,7 +2563,7 @@ void tst_qdeclarativeecmascript::scriptDisconnect() } { - QDeclarativeComponent component(&engine, testFileUrl("scriptDisconnect.2.qml")); + QQmlComponent component(&engine, testFileUrl("scriptDisconnect.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2582,7 +2582,7 @@ void tst_qdeclarativeecmascript::scriptDisconnect() } { - QDeclarativeComponent component(&engine, testFileUrl("scriptDisconnect.3.qml")); + QQmlComponent component(&engine, testFileUrl("scriptDisconnect.3.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2600,7 +2600,7 @@ void tst_qdeclarativeecmascript::scriptDisconnect() delete object; } { - QDeclarativeComponent component(&engine, testFileUrl("scriptDisconnect.4.qml")); + QQmlComponent component(&engine, testFileUrl("scriptDisconnect.4.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2631,14 +2631,14 @@ public slots: QObject *getObject() { return object; } }; -void tst_qdeclarativeecmascript::ownership() +void tst_qqmlecmascript::ownership() { OwnershipObject own; - QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext()); + QQmlContext *context = new QQmlContext(engine.rootContext()); context->setContextObject(&own); { - QDeclarativeComponent component(&engine, testFileUrl("ownership.qml")); + QQmlComponent component(&engine, testFileUrl("ownership.qml")); QVERIFY(own.object != 0); @@ -2657,7 +2657,7 @@ void tst_qdeclarativeecmascript::ownership() own.object = new QObject(&own); { - QDeclarativeComponent component(&engine, testFileUrl("ownership.qml")); + QQmlComponent component(&engine, testFileUrl("ownership.qml")); QVERIFY(own.object != 0); @@ -2685,7 +2685,7 @@ class CppOwnershipReturnValue : public QObject Q_INVOKABLE QObject *create() { value = new QObject; - QDeclarativeEngine::setObjectOwnership(value, QDeclarativeEngine::CppOwnership); + QQmlEngine::setObjectOwnership(value, QQmlEngine::CppOwnership); return value; } @@ -2699,18 +2699,18 @@ class CppOwnershipReturnValue : public QObject }; // QTBUG-15695. -// Test setObjectOwnership(CppOwnership) works even when there is no QDeclarativeData -void tst_qdeclarativeecmascript::cppOwnershipReturnValue() +// Test setObjectOwnership(CppOwnership) works even when there is no QQmlData +void tst_qqmlecmascript::cppOwnershipReturnValue() { CppOwnershipReturnValue source; { - QDeclarativeEngine engine; + QQmlEngine engine; engine.rootContext()->setContextProperty("source", &source); QVERIFY(source.value == 0); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nQtObject {\nComponent.onCompleted: { var a = source.create(); }\n}\n", QUrl()); QObject *object = component.create(); @@ -2728,17 +2728,17 @@ void tst_qdeclarativeecmascript::cppOwnershipReturnValue() } // QTBUG-15697 -void tst_qdeclarativeecmascript::ownershipCustomReturnValue() +void tst_qqmlecmascript::ownershipCustomReturnValue() { CppOwnershipReturnValue source; { - QDeclarativeEngine engine; + QQmlEngine engine; engine.rootContext()->setContextProperty("source", &source); QVERIFY(source.value == 0); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nQtObject {\nComponent.onCompleted: { var a = source.createQmlObject(); }\n}\n", QUrl()); QObject *object = component.create(); @@ -2777,13 +2777,13 @@ public slots: }; // Tests that returning a QList from a method works -void tst_qdeclarativeecmascript::qlistqobjectMethods() +void tst_qqmlecmascript::qlistqobjectMethods() { QListQObjectMethodsObject obj; - QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext()); + QQmlContext *context = new QQmlContext(engine.rootContext()); context->setContextObject(&obj); - QDeclarativeComponent component(&engine, testFileUrl("qlistqobjectMethods.qml")); + QQmlComponent component(&engine, testFileUrl("qlistqobjectMethods.qml")); QObject *object = component.create(context); @@ -2795,9 +2795,9 @@ void tst_qdeclarativeecmascript::qlistqobjectMethods() } // QTBUG-9205 -void tst_qdeclarativeecmascript::strictlyEquals() +void tst_qqmlecmascript::strictlyEquals() { - QDeclarativeComponent component(&engine, testFileUrl("strictlyEquals.qml")); + QQmlComponent component(&engine, testFileUrl("strictlyEquals.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -2814,9 +2814,9 @@ void tst_qdeclarativeecmascript::strictlyEquals() delete object; } -void tst_qdeclarativeecmascript::compiled() +void tst_qqmlecmascript::compiled() { - QDeclarativeComponent component(&engine, testFileUrl("compiled.qml")); + QQmlComponent component(&engine, testFileUrl("compiled.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -2854,9 +2854,9 @@ void tst_qdeclarativeecmascript::compiled() } // Test that numbers assigned in bindings as strings work consistently -void tst_qdeclarativeecmascript::numberAssignment() +void tst_qqmlecmascript::numberAssignment() { - QDeclarativeComponent component(&engine, testFileUrl("numberAssignment.qml")); + QQmlComponent component(&engine, testFileUrl("numberAssignment.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -2880,9 +2880,9 @@ void tst_qdeclarativeecmascript::numberAssignment() delete object; } -void tst_qdeclarativeecmascript::propertySplicing() +void tst_qqmlecmascript::propertySplicing() { - QDeclarativeComponent component(&engine, testFileUrl("propertySplicing.qml")); + QQmlComponent component(&engine, testFileUrl("propertySplicing.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -2893,9 +2893,9 @@ void tst_qdeclarativeecmascript::propertySplicing() } // QTBUG-16683 -void tst_qdeclarativeecmascript::signalWithUnknownTypes() +void tst_qqmlecmascript::signalWithUnknownTypes() { - QDeclarativeComponent component(&engine, testFileUrl("signalWithUnknownTypes.qml")); + QQmlComponent component(&engine, testFileUrl("signalWithUnknownTypes.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2912,7 +2912,7 @@ void tst_qdeclarativeecmascript::signalWithUnknownTypes() delete object; } -void tst_qdeclarativeecmascript::signalWithJSValueInVariant_data() +void tst_qqmlecmascript::signalWithJSValueInVariant_data() { QTest::addColumn("expression"); QTest::addColumn("compare"); @@ -2938,12 +2938,12 @@ void tst_qdeclarativeecmascript::signalWithJSValueInVariant_data() QTest::newRow("[10,20,30]") << "[10,20,30]" << comparePropertiesStrict; } -void tst_qdeclarativeecmascript::signalWithJSValueInVariant() +void tst_qqmlecmascript::signalWithJSValueInVariant() { QFETCH(QString, expression); QFETCH(QString, compare); - QDeclarativeComponent component(&engine, testFileUrl("signalWithJSValueInVariant.qml")); + QQmlComponent component(&engine, testFileUrl("signalWithJSValueInVariant.qml")); QScopedPointer object(qobject_cast(component.create())); QVERIFY(object != 0); @@ -2957,17 +2957,17 @@ void tst_qdeclarativeecmascript::signalWithJSValueInVariant() QVERIFY(object->property("pass").toBool()); } -void tst_qdeclarativeecmascript::signalWithJSValueInVariant_twoEngines_data() +void tst_qqmlecmascript::signalWithJSValueInVariant_twoEngines_data() { signalWithJSValueInVariant_data(); } -void tst_qdeclarativeecmascript::signalWithJSValueInVariant_twoEngines() +void tst_qqmlecmascript::signalWithJSValueInVariant_twoEngines() { QFETCH(QString, expression); QFETCH(QString, compare); - QDeclarativeComponent component(&engine, testFileUrl("signalWithJSValueInVariant.qml")); + QQmlComponent component(&engine, testFileUrl("signalWithJSValueInVariant.qml")); QScopedPointer object(qobject_cast(component.create())); QVERIFY(object != 0); @@ -2983,17 +2983,17 @@ void tst_qdeclarativeecmascript::signalWithJSValueInVariant_twoEngines() QVERIFY(!object->property("pass").toBool()); } -void tst_qdeclarativeecmascript::signalWithQJSValue_data() +void tst_qqmlecmascript::signalWithQJSValue_data() { signalWithJSValueInVariant_data(); } -void tst_qdeclarativeecmascript::signalWithQJSValue() +void tst_qqmlecmascript::signalWithQJSValue() { QFETCH(QString, expression); QFETCH(QString, compare); - QDeclarativeComponent component(&engine, testFileUrl("signalWithQJSValue.qml")); + QQmlComponent component(&engine, testFileUrl("signalWithQJSValue.qml")); QScopedPointer object(qobject_cast(component.create())); QVERIFY(object != 0); @@ -3009,7 +3009,7 @@ void tst_qdeclarativeecmascript::signalWithQJSValue() QVERIFY(object->qjsvalue().strictlyEquals(value)); } -void tst_qdeclarativeecmascript::moduleApi_data() +void tst_qqmlecmascript::moduleApi_data() { QTest::addColumn("testfile"); QTest::addColumn("errorMessage"); @@ -3101,7 +3101,7 @@ void tst_qdeclarativeecmascript::moduleApi_data() QTest::newRow("qobject, invalid major version fail") << testFileUrl("moduleapi/moduleApiMajorVersionFail.qml") - << QString("QDeclarativeComponent: Component is not ready") + << QString("QQmlComponent: Component is not ready") << QStringList() << QStringList() << QVariantList() @@ -3112,7 +3112,7 @@ void tst_qdeclarativeecmascript::moduleApi_data() QTest::newRow("qobject, invalid minor version fail") << testFileUrl("moduleapi/moduleApiMinorVersionFail.qml") - << QString("QDeclarativeComponent: Component is not ready") + << QString("QQmlComponent: Component is not ready") << QStringList() << QStringList() << QVariantList() @@ -3122,7 +3122,7 @@ void tst_qdeclarativeecmascript::moduleApi_data() << QVariantList(); } -void tst_qdeclarativeecmascript::moduleApi() +void tst_qqmlecmascript::moduleApi() { QFETCH(QUrl, testfile); QFETCH(QString, errorMessage); @@ -3134,7 +3134,7 @@ void tst_qdeclarativeecmascript::moduleApi() QFETCH(QStringList, readBackProperties); QFETCH(QVariantList, readBackExpectedValues); - QDeclarativeComponent component(&engine, testfile); + QQmlComponent component(&engine, testfile); if (!errorMessage.isEmpty()) QTest::ignoreMessage(QtWarningMsg, errorMessage.toAscii().constData()); @@ -3158,7 +3158,7 @@ void tst_qdeclarativeecmascript::moduleApi() } } -void tst_qdeclarativeecmascript::importScripts_data() +void tst_qqmlecmascript::importScripts_data() { QTest::addColumn("testfile"); QTest::addColumn("errorMessage"); @@ -3250,7 +3250,7 @@ void tst_qdeclarativeecmascript::importScripts_data() << (QVariantList() << QVariant(18)); } -void tst_qdeclarativeecmascript::importScripts() +void tst_qqmlecmascript::importScripts() { QFETCH(QUrl, testfile); QFETCH(QString, errorMessage); @@ -3258,7 +3258,7 @@ void tst_qdeclarativeecmascript::importScripts() QFETCH(QStringList, propertyNames); QFETCH(QVariantList, propertyValues); - QDeclarativeComponent component(&engine, testfile); + QQmlComponent component(&engine, testfile); if (!errorMessage.isEmpty()) QTest::ignoreMessage(QtWarningMsg, errorMessage.toAscii().constData()); @@ -3278,7 +3278,7 @@ void tst_qdeclarativeecmascript::importScripts() } } -void tst_qdeclarativeecmascript::scarceResources_other() +void tst_qqmlecmascript::scarceResources_other() { /* These tests require knowledge of state, since we test values after performing signal or function invocation. */ @@ -3286,7 +3286,7 @@ void tst_qdeclarativeecmascript::scarceResources_other() QPixmap origPixmap(100, 100); origPixmap.fill(Qt::blue); QString srp_name, expectedWarning; - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(&engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(&engine); ScarceResourceObject *eo = 0; QObject *srsc = 0; QObject *object = 0; @@ -3294,66 +3294,66 @@ void tst_qdeclarativeecmascript::scarceResources_other() /* property var semantics */ // test that scarce resources are handled properly in signal invocation - QDeclarativeComponent varComponentTen(&engine, testFileUrl("scarceResourceSignal.var.qml")); + QQmlComponent varComponentTen(&engine, testFileUrl("scarceResourceSignal.var.qml")); object = varComponentTen.create(); srsc = object->findChild("srsc"); QVERIFY(srsc); QVERIFY(!srsc->property("scarceResourceCopy").isValid()); // hasn't been instantiated yet. QCOMPARE(srsc->property("width"), QVariant(5)); // default value is 5. - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. QMetaObject::invokeMethod(srsc, "testSignal"); QVERIFY(!srsc->property("scarceResourceCopy").isValid()); // still hasn't been instantiated QCOMPARE(srsc->property("width"), QVariant(10)); // but width was assigned to 10. - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should still be no other copies of it at this stage. QMetaObject::invokeMethod(srsc, "testSignal2"); // assigns scarceResourceCopy to the scarce pixmap. QVERIFY(srsc->property("scarceResourceCopy").isValid()); QCOMPARE(srsc->property("scarceResourceCopy").value(), origPixmap); - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(!(eo->scarceResourceIsDetached())); // should be another copy of the resource now. QVERIFY(ep->scarceResources.isEmpty()); // should have been released by this point. delete object; // test that scarce resources are handled properly from js functions in qml files - QDeclarativeComponent varComponentEleven(&engine, testFileUrl("scarceResourceFunction.var.qml")); + QQmlComponent varComponentEleven(&engine, testFileUrl("scarceResourceFunction.var.qml")); object = varComponentEleven.create(); QVERIFY(object != 0); QVERIFY(!object->property("scarceResourceCopy").isValid()); // not yet assigned, so should not be valid - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. QMetaObject::invokeMethod(object, "retrieveScarceResource"); QVERIFY(object->property("scarceResourceCopy").isValid()); // assigned, so should be valid. QCOMPARE(object->property("scarceResourceCopy").value(), origPixmap); - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(!eo->scarceResourceIsDetached()); // should be a copy of the resource at this stage. QMetaObject::invokeMethod(object, "releaseScarceResource"); QVERIFY(!object->property("scarceResourceCopy").isValid()); // just released, so should not be valid - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. QVERIFY(ep->scarceResources.isEmpty()); // should have been released by this point. delete object; // test that if an exception occurs while invoking js function from cpp, that the resources are released. - QDeclarativeComponent varComponentTwelve(&engine, testFileUrl("scarceResourceFunctionFail.var.qml")); + QQmlComponent varComponentTwelve(&engine, testFileUrl("scarceResourceFunctionFail.var.qml")); object = varComponentTwelve.create(); QVERIFY(object != 0); QVERIFY(!object->property("scarceResourceCopy").isValid()); // not yet assigned, so should not be valid - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. srp_name = object->property("srp_name").toString(); expectedWarning = varComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object ") + srp_name + QLatin1String(" is not a function"); QTest::ignoreMessage(QtWarningMsg, qPrintable(expectedWarning)); // we expect a meaningful warning to be printed. QMetaObject::invokeMethod(object, "retrieveScarceResource"); QVERIFY(!object->property("scarceResourceCopy").isValid()); // due to exception, assignment will NOT have occurred. - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. QVERIFY(ep->scarceResources.isEmpty()); // should have been released by this point. delete object; // test that if an Item which has JS ownership but has a scarce resource property is garbage collected, // that the scarce resource is removed from the engine's list of scarce resources to clean up. - QDeclarativeComponent varComponentThirteen(&engine, testFileUrl("scarceResourceObjectGc.var.qml")); + QQmlComponent varComponentThirteen(&engine, testFileUrl("scarceResourceObjectGc.var.qml")); object = varComponentThirteen.create(); QVERIFY(object != 0); QVERIFY(!object->property("varProperty").isValid()); // not assigned yet @@ -3366,66 +3366,66 @@ void tst_qdeclarativeecmascript::scarceResources_other() /* property variant semantics */ // test that scarce resources are handled properly in signal invocation - QDeclarativeComponent variantComponentTen(&engine, testFileUrl("scarceResourceSignal.variant.qml")); + QQmlComponent variantComponentTen(&engine, testFileUrl("scarceResourceSignal.variant.qml")); object = variantComponentTen.create(); QVERIFY(object != 0); srsc = object->findChild("srsc"); QVERIFY(srsc); QVERIFY(!srsc->property("scarceResourceCopy").isValid()); // hasn't been instantiated yet. QCOMPARE(srsc->property("width"), QVariant(5)); // default value is 5. - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. QMetaObject::invokeMethod(srsc, "testSignal"); QVERIFY(!srsc->property("scarceResourceCopy").isValid()); // still hasn't been instantiated QCOMPARE(srsc->property("width"), QVariant(10)); // but width was assigned to 10. - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should still be no other copies of it at this stage. QMetaObject::invokeMethod(srsc, "testSignal2"); // assigns scarceResourceCopy to the scarce pixmap. QVERIFY(srsc->property("scarceResourceCopy").isValid()); QCOMPARE(srsc->property("scarceResourceCopy").value(), origPixmap); - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(!(eo->scarceResourceIsDetached())); // should be another copy of the resource now. QVERIFY(ep->scarceResources.isEmpty()); // should have been released by this point. delete object; // test that scarce resources are handled properly from js functions in qml files - QDeclarativeComponent variantComponentEleven(&engine, testFileUrl("scarceResourceFunction.variant.qml")); + QQmlComponent variantComponentEleven(&engine, testFileUrl("scarceResourceFunction.variant.qml")); object = variantComponentEleven.create(); QVERIFY(object != 0); QVERIFY(!object->property("scarceResourceCopy").isValid()); // not yet assigned, so should not be valid - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. QMetaObject::invokeMethod(object, "retrieveScarceResource"); QVERIFY(object->property("scarceResourceCopy").isValid()); // assigned, so should be valid. QCOMPARE(object->property("scarceResourceCopy").value(), origPixmap); - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(!eo->scarceResourceIsDetached()); // should be a copy of the resource at this stage. QMetaObject::invokeMethod(object, "releaseScarceResource"); QVERIFY(!object->property("scarceResourceCopy").isValid()); // just released, so should not be valid - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. QVERIFY(ep->scarceResources.isEmpty()); // should have been released by this point. delete object; // test that if an exception occurs while invoking js function from cpp, that the resources are released. - QDeclarativeComponent variantComponentTwelve(&engine, testFileUrl("scarceResourceFunctionFail.variant.qml")); + QQmlComponent variantComponentTwelve(&engine, testFileUrl("scarceResourceFunctionFail.variant.qml")); object = variantComponentTwelve.create(); QVERIFY(object != 0); QVERIFY(!object->property("scarceResourceCopy").isValid()); // not yet assigned, so should not be valid - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. srp_name = object->property("srp_name").toString(); expectedWarning = variantComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object ") + srp_name + QLatin1String(" is not a function"); QTest::ignoreMessage(QtWarningMsg, qPrintable(expectedWarning)); // we expect a meaningful warning to be printed. QMetaObject::invokeMethod(object, "retrieveScarceResource"); QVERIFY(!object->property("scarceResourceCopy").isValid()); // due to exception, assignment will NOT have occurred. - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. QVERIFY(ep->scarceResources.isEmpty()); // should have been released by this point. delete object; } -void tst_qdeclarativeecmascript::scarceResources_data() +void tst_qqmlecmascript::scarceResources_data() { QTest::addColumn("qmlFile"); QTest::addColumn("readDetachStatus"); @@ -3646,7 +3646,7 @@ void tst_qdeclarativeecmascript::scarceResources_data() << QStringList(); } -void tst_qdeclarativeecmascript::scarceResources() +void tst_qqmlecmascript::scarceResources() { QFETCH(QUrl, qmlFile); QFETCH(bool, readDetachStatus); @@ -3656,11 +3656,11 @@ void tst_qdeclarativeecmascript::scarceResources() QFETCH(QVariantList, expectedValues); QFETCH(QStringList, expectedErrors); - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(&engine); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(&engine); ScarceResourceObject *eo = 0; QObject *object = 0; - QDeclarativeComponent c(&engine, qmlFile); + QQmlComponent c(&engine, qmlFile); object = c.create(); QVERIFY(object != 0); for (int i = 0; i < propertyNames.size(); ++i) { @@ -3677,7 +3677,7 @@ void tst_qdeclarativeecmascript::scarceResources() } if (readDetachStatus) { - eo = qobject_cast(QDeclarativeProperty::read(object, "a").value()); + eo = qobject_cast(QQmlProperty::read(object, "a").value()); QCOMPARE(eo->scarceResourceIsDetached(), expectedDetachStatus); } @@ -3685,41 +3685,41 @@ void tst_qdeclarativeecmascript::scarceResources() delete object; } -void tst_qdeclarativeecmascript::propertyChangeSlots() +void tst_qqmlecmascript::propertyChangeSlots() { // ensure that allowable property names are allowed and onPropertyNameChanged slots are generated correctly. - QDeclarativeComponent component(&engine, testFileUrl("changeslots/propertyChangeSlots.qml")); + QQmlComponent component(&engine, testFileUrl("changeslots/propertyChangeSlots.qml")); QObject *object = component.create(); QVERIFY(object != 0); delete object; // ensure that invalid property names fail properly. - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); - QDeclarativeComponent e1(&engine, testFileUrl("changeslots/propertyChangeSlotErrors.1.qml")); + QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); + QQmlComponent e1(&engine, testFileUrl("changeslots/propertyChangeSlotErrors.1.qml")); QString expectedErrorString = e1.url().toString() + QLatin1String(":9:5: Cannot assign to non-existent property \"on_nameWithUnderscoreChanged\""); QCOMPARE(e1.errors().at(0).toString(), expectedErrorString); object = e1.create(); QVERIFY(object == 0); delete object; - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); - QDeclarativeComponent e2(&engine, testFileUrl("changeslots/propertyChangeSlotErrors.2.qml")); + QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); + QQmlComponent e2(&engine, testFileUrl("changeslots/propertyChangeSlotErrors.2.qml")); expectedErrorString = e2.url().toString() + QLatin1String(":9:5: Cannot assign to non-existent property \"on____nameWithUnderscoresChanged\""); QCOMPARE(e2.errors().at(0).toString(), expectedErrorString); object = e2.create(); QVERIFY(object == 0); delete object; - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); - QDeclarativeComponent e3(&engine, testFileUrl("changeslots/propertyChangeSlotErrors.3.qml")); + QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); + QQmlComponent e3(&engine, testFileUrl("changeslots/propertyChangeSlotErrors.3.qml")); expectedErrorString = e3.url().toString() + QLatin1String(":9:5: Cannot assign to non-existent property \"on$NameWithDollarsignChanged\""); QCOMPARE(e3.errors().at(0).toString(), expectedErrorString); object = e3.create(); QVERIFY(object == 0); delete object; - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); - QDeclarativeComponent e4(&engine, testFileUrl("changeslots/propertyChangeSlotErrors.4.qml")); + QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); + QQmlComponent e4(&engine, testFileUrl("changeslots/propertyChangeSlotErrors.4.qml")); expectedErrorString = e4.url().toString() + QLatin1String(":9:5: Cannot assign to non-existent property \"on_6NameWithUnderscoreNumberChanged\""); QCOMPARE(e4.errors().at(0).toString(), expectedErrorString); object = e4.create(); @@ -3727,7 +3727,7 @@ void tst_qdeclarativeecmascript::propertyChangeSlots() delete object; } -void tst_qdeclarativeecmascript::propertyVar_data() +void tst_qqmlecmascript::propertyVar_data() { QTest::addColumn("qmlFile"); @@ -3744,11 +3744,11 @@ void tst_qdeclarativeecmascript::propertyVar_data() QTest::newRow("base class var property assignment") << testFileUrl("propertyVar.10.qml"); } -void tst_qdeclarativeecmascript::propertyVar() +void tst_qqmlecmascript::propertyVar() { QFETCH(QUrl, qmlFile); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); @@ -3758,14 +3758,14 @@ void tst_qdeclarativeecmascript::propertyVar() } // Tests that we can write QVariant values to var properties from C++ -void tst_qdeclarativeecmascript::propertyVarCpp() +void tst_qqmlecmascript::propertyVarCpp() { QObject *object = 0; // ensure that writing to and reading from a var property from cpp works as required. // Literal values stored in var properties can be read and written as QVariants // of a specific type, whereas object values are read as QVariantMaps. - QDeclarativeComponent component(&engine, testFileUrl("propertyVarCpp.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVarCpp.qml")); object = component.create(); QVERIFY(object != 0); // assign int to property var that currently has int assigned @@ -3784,18 +3784,18 @@ void tst_qdeclarativeecmascript::propertyVarCpp() delete object; } -static void gc(QDeclarativeEngine &engine) +static void gc(QQmlEngine &engine) { engine.collectGarbage(); QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); QCoreApplication::processEvents(); } -void tst_qdeclarativeecmascript::propertyVarOwnership() +void tst_qqmlecmascript::propertyVarOwnership() { // Referenced JS objects are not collected { - QDeclarativeComponent component(&engine, testFileUrl("propertyVarOwnership.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVarOwnership.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("test").toBool(), false); @@ -3805,7 +3805,7 @@ void tst_qdeclarativeecmascript::propertyVarOwnership() } // Referenced JS objects are not collected { - QDeclarativeComponent component(&engine, testFileUrl("propertyVarOwnership.2.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVarOwnership.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("test").toBool(), false); @@ -3815,7 +3815,7 @@ void tst_qdeclarativeecmascript::propertyVarOwnership() } // Qt objects are not collected until they've been dereferenced { - QDeclarativeComponent component(&engine, testFileUrl("propertyVarOwnership.3.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVarOwnership.3.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -3839,7 +3839,7 @@ void tst_qdeclarativeecmascript::propertyVarOwnership() } // Self reference does not prevent Qt object collection { - QDeclarativeComponent component(&engine, testFileUrl("propertyVarOwnership.4.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVarOwnership.4.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -3858,12 +3858,12 @@ void tst_qdeclarativeecmascript::propertyVarOwnership() } } -void tst_qdeclarativeecmascript::propertyVarImplicitOwnership() +void tst_qqmlecmascript::propertyVarImplicitOwnership() { // The childObject has a reference to a different QObject. We want to ensure // that the different item will not be cleaned up until required. IE, the childObject // has implicit ownership of the constructed QObject. - QDeclarativeComponent component(&engine, testFileUrl("propertyVarImplicitOwnership.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVarImplicitOwnership.qml")); QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "assignCircular"); @@ -3888,10 +3888,10 @@ void tst_qdeclarativeecmascript::propertyVarImplicitOwnership() delete object; } -void tst_qdeclarativeecmascript::propertyVarReparent() +void tst_qqmlecmascript::propertyVarReparent() { // ensure that nothing breaks if we re-parent objects - QDeclarativeComponent component(&engine, testFileUrl("propertyVar.reparent.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVar.reparent.qml")); QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "assignVarProp"); @@ -3930,12 +3930,12 @@ void tst_qdeclarativeecmascript::propertyVarReparent() delete object; } -void tst_qdeclarativeecmascript::propertyVarReparentNullContext() +void tst_qqmlecmascript::propertyVarReparentNullContext() { // sometimes reparenting can cause problems // (eg, if the ctxt is collected, varproperties are no longer available) // this test ensures that no crash occurs in that situation. - QDeclarativeComponent component(&engine, testFileUrl("propertyVar.reparent.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVar.reparent.qml")); QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "assignVarProp"); @@ -3969,10 +3969,10 @@ void tst_qdeclarativeecmascript::propertyVarReparentNullContext() QVERIFY(imageGuard.isNull()); // should now be dead. } -void tst_qdeclarativeecmascript::propertyVarCircular() +void tst_qqmlecmascript::propertyVarCircular() { // enforce behaviour regarding circular references - ensure qdvmemo deletion. - QDeclarativeComponent component(&engine, testFileUrl("propertyVar.circular.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVar.circular.qml")); QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "assignCircular"); // cause assignment and gc @@ -3996,11 +3996,11 @@ void tst_qdeclarativeecmascript::propertyVarCircular() delete object; } -void tst_qdeclarativeecmascript::propertyVarCircular2() +void tst_qqmlecmascript::propertyVarCircular2() { // track deletion of JS-owned parent item with Cpp-owned child // where the child has a var property referencing its parent. - QDeclarativeComponent component(&engine, testFileUrl("propertyVar.circular.2.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVar.circular.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "assignCircular"); @@ -4025,19 +4025,19 @@ void tst_qdeclarativeecmascript::propertyVarCircular2() delete object; } -void tst_qdeclarativeecmascript::propertyVarWeakRefCallback(v8::Persistent object, void* parameter) +void tst_qqmlecmascript::propertyVarWeakRefCallback(v8::Persistent object, void* parameter) { *(int*)(parameter) += 1; qPersistentDispose(object); } -void tst_qdeclarativeecmascript::propertyVarInheritance() +void tst_qqmlecmascript::propertyVarInheritance() { int propertyVarWeakRefCallbackCount = 0; // enforce behaviour regarding element inheritance - ensure handle disposal. // The particular component under test here has a chain of references. - QDeclarativeComponent component(&engine, testFileUrl("propertyVar.inherit.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVar.inherit.qml")); QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "assignCircular"); // cause assignment and gc @@ -4046,8 +4046,8 @@ void tst_qdeclarativeecmascript::propertyVarInheritance() // we want to be able to track when the varProperties array of the last metaobject is disposed QObject *cco5 = object->property("varProperty").value()->property("vp").value()->property("vp").value()->property("vp").value()->property("vp").value(); QObject *ico5 = object->property("varProperty").value()->property("inheritanceVarProperty").value()->property("vp").value()->property("vp").value()->property("vp").value()->property("vp").value(); - QDeclarativeVMEMetaObject *icovmemo = ((QDeclarativeVMEMetaObject *)(ico5->metaObject())); - QDeclarativeVMEMetaObject *ccovmemo = ((QDeclarativeVMEMetaObject *)(cco5->metaObject())); + QQmlVMEMetaObject *icovmemo = ((QQmlVMEMetaObject *)(ico5->metaObject())); + QQmlVMEMetaObject *ccovmemo = ((QQmlVMEMetaObject *)(cco5->metaObject())); v8::Persistent icoCanaryHandle; v8::Persistent ccoCanaryHandle; { @@ -4075,13 +4075,13 @@ void tst_qdeclarativeecmascript::propertyVarInheritance() // to what remains are weak, all varProperties arrays must have been collected. } -void tst_qdeclarativeecmascript::propertyVarInheritance2() +void tst_qqmlecmascript::propertyVarInheritance2() { int propertyVarWeakRefCallbackCount = 0; // The particular component under test here does NOT have a chain of references; the // only link between rootObject and childObject is that rootObject is the parent of childObject. - QDeclarativeComponent component(&engine, testFileUrl("propertyVar.circular.2.qml")); + QQmlComponent component(&engine, testFileUrl("propertyVar.circular.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "assignCircular"); @@ -4097,7 +4097,7 @@ void tst_qdeclarativeecmascript::propertyVarInheritance2() { v8::HandleScope hs; propertyVarWeakRefCallbackCount = 0; // reset callback count. - childObjectVarArrayValueHandle = qPersistentNew(((QDeclarativeVMEMetaObject *)(childObject->metaObject()))->vmeProperty(childObject->metaObject()->indexOfProperty("vp"))); + childObjectVarArrayValueHandle = qPersistentNew(((QQmlVMEMetaObject *)(childObject->metaObject()))->vmeProperty(childObject->metaObject()->indexOfProperty("vp"))); childObjectVarArrayValueHandle.MakeWeak(&propertyVarWeakRefCallbackCount, propertyVarWeakRefCallback); gc(engine); QVERIFY(propertyVarWeakRefCallbackCount == 0); // should not have been collected yet. @@ -4112,9 +4112,9 @@ void tst_qdeclarativeecmascript::propertyVarInheritance2() } // Ensure that QObject type conversion works on binding assignment -void tst_qdeclarativeecmascript::elementAssign() +void tst_qqmlecmascript::elementAssign() { - QDeclarativeComponent component(&engine, testFileUrl("elementAssign.qml")); + QQmlComponent component(&engine, testFileUrl("elementAssign.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -4125,9 +4125,9 @@ void tst_qdeclarativeecmascript::elementAssign() } // QTBUG-12457 -void tst_qdeclarativeecmascript::objectPassThroughSignals() +void tst_qqmlecmascript::objectPassThroughSignals() { - QDeclarativeComponent component(&engine, testFileUrl("objectsPassThroughSignals.qml")); + QQmlComponent component(&engine, testFileUrl("objectsPassThroughSignals.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -4138,9 +4138,9 @@ void tst_qdeclarativeecmascript::objectPassThroughSignals() } // QTBUG-21626 -void tst_qdeclarativeecmascript::objectConversion() +void tst_qqmlecmascript::objectConversion() { - QDeclarativeComponent component(&engine, testFileUrl("objectConversion.qml")); + QQmlComponent component(&engine, testFileUrl("objectConversion.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -4153,9 +4153,9 @@ void tst_qdeclarativeecmascript::objectConversion() // QTBUG-20242 -void tst_qdeclarativeecmascript::booleanConversion() +void tst_qqmlecmascript::booleanConversion() { - QDeclarativeComponent component(&engine, testFileUrl("booleanConversion.qml")); + QQmlComponent component(&engine, testFileUrl("booleanConversion.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -4173,14 +4173,14 @@ void tst_qdeclarativeecmascript::booleanConversion() delete object; } -void tst_qdeclarativeecmascript::handleReferenceManagement() +void tst_qqmlecmascript::handleReferenceManagement() { int dtorCount = 0; { // Linear QObject reference - QDeclarativeEngine hrmEngine; - QDeclarativeComponent component(&hrmEngine, testFileUrl("handleReferenceManagement.object.1.qml")); + QQmlEngine hrmEngine; + QQmlComponent component(&hrmEngine, testFileUrl("handleReferenceManagement.object.1.qml")); QObject *object = component.create(); QVERIFY(object != 0); CircularReferenceObject *cro = object->findChild("cro"); @@ -4199,8 +4199,8 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() dtorCount = 0; { // Circular QObject reference - QDeclarativeEngine hrmEngine; - QDeclarativeComponent component(&hrmEngine, testFileUrl("handleReferenceManagement.object.2.qml")); + QQmlEngine hrmEngine; + QQmlComponent component(&hrmEngine, testFileUrl("handleReferenceManagement.object.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); CircularReferenceObject *cro = object->findChild("cro"); @@ -4219,8 +4219,8 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() dtorCount = 0; { // Linear handle reference - QDeclarativeEngine hrmEngine; - QDeclarativeComponent component(&hrmEngine, testFileUrl("handleReferenceManagement.handle.1.qml")); + QQmlEngine hrmEngine; + QQmlComponent component(&hrmEngine, testFileUrl("handleReferenceManagement.handle.1.qml")); QObject *object = component.create(); QVERIFY(object != 0); CircularReferenceHandle *crh = object->findChild("crh"); @@ -4232,10 +4232,10 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() CircularReferenceHandle *second = object->property("second").value(); QVERIFY(first != 0); QVERIFY(second != 0); - first->addReference(QDeclarativeData::get(second)->v8object); // create reference + first->addReference(QQmlData::get(second)->v8object); // create reference // now we have to reparent second and make second owned by JS. second->setParent(0); - QDeclarativeEngine::setObjectOwnership(second, QDeclarativeEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(second, QQmlEngine::JavaScriptOwnership); gc(engine); QCOMPARE(dtorCount, 0); // due to reference from first to second, second shouldn't be collected. delete object; @@ -4248,8 +4248,8 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() dtorCount = 0; { // Circular handle reference - QDeclarativeEngine hrmEngine; - QDeclarativeComponent component(&hrmEngine, testFileUrl("handleReferenceManagement.handle.2.qml")); + QQmlEngine hrmEngine; + QQmlComponent component(&hrmEngine, testFileUrl("handleReferenceManagement.handle.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); CircularReferenceHandle *crh = object->findChild("crh"); @@ -4261,13 +4261,13 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() CircularReferenceHandle *second = object->property("second").value(); QVERIFY(first != 0); QVERIFY(second != 0); - first->addReference(QDeclarativeData::get(second)->v8object); // create circular reference - second->addReference(QDeclarativeData::get(first)->v8object); // note: must be weak. + first->addReference(QQmlData::get(second)->v8object); // create circular reference + second->addReference(QQmlData::get(first)->v8object); // note: must be weak. // now we have to reparent and change ownership. first->setParent(0); second->setParent(0); - QDeclarativeEngine::setObjectOwnership(first, QDeclarativeEngine::JavaScriptOwnership); - QDeclarativeEngine::setObjectOwnership(second, QDeclarativeEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(first, QQmlEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(second, QQmlEngine::JavaScriptOwnership); gc(engine); QCOMPARE(dtorCount, 2); // despite circular references, both will be collected. delete object; @@ -4280,10 +4280,10 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() dtorCount = 0; { // multiple engine interaction - linear reference - QDeclarativeEngine hrmEngine1; - QDeclarativeEngine hrmEngine2; - QDeclarativeComponent component1(&hrmEngine1, testFileUrl("handleReferenceManagement.handle.1.qml")); - QDeclarativeComponent component2(&hrmEngine2, testFileUrl("handleReferenceManagement.handle.1.qml")); + QQmlEngine hrmEngine1; + QQmlEngine hrmEngine2; + QQmlComponent component1(&hrmEngine1, testFileUrl("handleReferenceManagement.handle.1.qml")); + QQmlComponent component2(&hrmEngine2, testFileUrl("handleReferenceManagement.handle.1.qml")); QObject *object1 = component1.create(); QObject *object2 = component2.create(); QVERIFY(object1 != 0); @@ -4306,10 +4306,10 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() QVERIFY(second1 != 0); QVERIFY(first2 != 0); QVERIFY(second2 != 0); - first1->addReference(QDeclarativeData::get(second2)->v8object); // create reference across engines + first1->addReference(QQmlData::get(second2)->v8object); // create reference across engines // now we have to reparent second2 and make second2 owned by JS. second2->setParent(0); - QDeclarativeEngine::setObjectOwnership(second2, QDeclarativeEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(second2, QQmlEngine::JavaScriptOwnership); gc(engine); QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); QCoreApplication::processEvents(); @@ -4326,10 +4326,10 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() dtorCount = 0; { // multiple engine interaction - circular reference - QDeclarativeEngine hrmEngine1; - QDeclarativeEngine hrmEngine2; - QDeclarativeComponent component1(&hrmEngine1, testFileUrl("handleReferenceManagement.handle.1.qml")); - QDeclarativeComponent component2(&hrmEngine2, testFileUrl("handleReferenceManagement.handle.1.qml")); + QQmlEngine hrmEngine1; + QQmlEngine hrmEngine2; + QQmlComponent component1(&hrmEngine1, testFileUrl("handleReferenceManagement.handle.1.qml")); + QQmlComponent component2(&hrmEngine2, testFileUrl("handleReferenceManagement.handle.1.qml")); QObject *object1 = component1.create(); QObject *object2 = component2.create(); QVERIFY(object1 != 0); @@ -4352,19 +4352,19 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() QVERIFY(second1 != 0); QVERIFY(first2 != 0); QVERIFY(second2 != 0); - first1->addReference(QDeclarativeData::get(second1)->v8object); // create linear reference within engine1 - second1->addReference(QDeclarativeData::get(second2)->v8object); // create linear reference across engines - second2->addReference(QDeclarativeData::get(first2)->v8object); // create linear reference within engine2 - first2->addReference(QDeclarativeData::get(first1)->v8object); // close the loop - circular ref across engines + first1->addReference(QQmlData::get(second1)->v8object); // create linear reference within engine1 + second1->addReference(QQmlData::get(second2)->v8object); // create linear reference across engines + second2->addReference(QQmlData::get(first2)->v8object); // create linear reference within engine2 + first2->addReference(QQmlData::get(first1)->v8object); // close the loop - circular ref across engines // now we have to reparent and change ownership to JS. first1->setParent(0); second1->setParent(0); first2->setParent(0); second2->setParent(0); - QDeclarativeEngine::setObjectOwnership(first1, QDeclarativeEngine::JavaScriptOwnership); - QDeclarativeEngine::setObjectOwnership(second1, QDeclarativeEngine::JavaScriptOwnership); - QDeclarativeEngine::setObjectOwnership(first2, QDeclarativeEngine::JavaScriptOwnership); - QDeclarativeEngine::setObjectOwnership(second2, QDeclarativeEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(first1, QQmlEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(second1, QQmlEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(first2, QQmlEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(second2, QQmlEngine::JavaScriptOwnership); gc(engine); QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); QCoreApplication::processEvents(); @@ -4381,10 +4381,10 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() dtorCount = 0; { // multiple engine interaction - linear reference with engine deletion - QDeclarativeEngine *hrmEngine1 = new QDeclarativeEngine; - QDeclarativeEngine *hrmEngine2 = new QDeclarativeEngine; - QDeclarativeComponent component1(hrmEngine1, testFileUrl("handleReferenceManagement.handle.1.qml")); - QDeclarativeComponent component2(hrmEngine2, testFileUrl("handleReferenceManagement.handle.1.qml")); + QQmlEngine *hrmEngine1 = new QQmlEngine; + QQmlEngine *hrmEngine2 = new QQmlEngine; + QQmlComponent component1(hrmEngine1, testFileUrl("handleReferenceManagement.handle.1.qml")); + QQmlComponent component2(hrmEngine2, testFileUrl("handleReferenceManagement.handle.1.qml")); QObject *object1 = component1.create(); QObject *object2 = component2.create(); QVERIFY(object1 != 0); @@ -4407,17 +4407,17 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() QVERIFY(second1 != 0); QVERIFY(first2 != 0); QVERIFY(second2 != 0); - first1->addReference(QDeclarativeData::get(second1)->v8object); // create linear reference within engine1 - second1->addReference(QDeclarativeData::get(second2)->v8object); // create linear reference across engines - second2->addReference(QDeclarativeData::get(first2)->v8object); // create linear reference within engine2 + first1->addReference(QQmlData::get(second1)->v8object); // create linear reference within engine1 + second1->addReference(QQmlData::get(second2)->v8object); // create linear reference across engines + second2->addReference(QQmlData::get(first2)->v8object); // create linear reference within engine2 // now we have to reparent and change ownership to JS. first1->setParent(crh1); second1->setParent(0); first2->setParent(0); second2->setParent(0); - QDeclarativeEngine::setObjectOwnership(second1, QDeclarativeEngine::JavaScriptOwnership); - QDeclarativeEngine::setObjectOwnership(first2, QDeclarativeEngine::JavaScriptOwnership); - QDeclarativeEngine::setObjectOwnership(second2, QDeclarativeEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(second1, QQmlEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(first2, QQmlEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(second2, QQmlEngine::JavaScriptOwnership); gc(engine); QCOMPARE(dtorCount, 0); delete hrmEngine2; @@ -4433,9 +4433,9 @@ void tst_qdeclarativeecmascript::handleReferenceManagement() } } -void tst_qdeclarativeecmascript::stringArg() +void tst_qqmlecmascript::stringArg() { - QDeclarativeComponent component(&engine, testFileUrl("stringArg.qml")); + QQmlComponent component(&engine, testFileUrl("stringArg.qml")); QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "success"); @@ -4449,9 +4449,9 @@ void tst_qdeclarativeecmascript::stringArg() delete object; } -void tst_qdeclarativeecmascript::readonlyDeclaration() +void tst_qqmlecmascript::readonlyDeclaration() { - QDeclarativeComponent component(&engine, testFileUrl("readonlyDeclaration.qml")); + QQmlComponent component(&engine, testFileUrl("readonlyDeclaration.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -4466,11 +4466,11 @@ Q_DECLARE_METATYPE(QList) Q_DECLARE_METATYPE(QList) Q_DECLARE_METATYPE(QList) Q_DECLARE_METATYPE(QList) -void tst_qdeclarativeecmascript::sequenceConversionRead() +void tst_qqmlecmascript::sequenceConversionRead() { { QUrl qmlFile = testFileUrl("sequenceConversion.read.qml"); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); MySequenceConversionObject *seq = object->findChild("msco"); @@ -4508,9 +4508,9 @@ void tst_qdeclarativeecmascript::sequenceConversionRead() QCOMPARE(object->property("enumerationMatches").toBool(), true); intList.clear(); intList << 1 << 2 << 3 << 4 << 5; // set by the enumerateSequenceElements test. - QDeclarativeProperty seqProp(seq, "intListProperty"); + QQmlProperty seqProp(seq, "intListProperty"); QCOMPARE(seqProp.read().value >(), intList); - QDeclarativeProperty seqProp2(seq, "intListProperty", &engine); + QQmlProperty seqProp2(seq, "intListProperty", &engine); QCOMPARE(seqProp2.read().value >(), intList); QMetaObject::invokeMethod(object, "testReferenceDeletion"); @@ -4521,7 +4521,7 @@ void tst_qdeclarativeecmascript::sequenceConversionRead() { QUrl qmlFile = testFileUrl("sequenceConversion.read.error.qml"); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); MySequenceConversionObject *seq = object->findChild("msco"); @@ -4539,18 +4539,18 @@ void tst_qdeclarativeecmascript::sequenceConversionRead() QCOMPARE(object->property("pointListLength").toInt(), 0); QVERIFY(!object->property("pointList").isValid()); QTest::ignoreMessage(QtWarningMsg, "QMetaProperty::read: Unable to handle unregistered datatype 'QList' for property 'MySequenceConversionObject::pointListProperty'"); - QDeclarativeProperty seqProp(seq, "pointListProperty", &engine); + QQmlProperty seqProp(seq, "pointListProperty", &engine); QVERIFY(!seqProp.read().isValid()); // not a valid/known sequence type delete object; } } -void tst_qdeclarativeecmascript::sequenceConversionWrite() +void tst_qqmlecmascript::sequenceConversionWrite() { { QUrl qmlFile = testFileUrl("sequenceConversion.write.qml"); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); MySequenceConversionObject *seq = object->findChild("msco"); @@ -4573,7 +4573,7 @@ void tst_qdeclarativeecmascript::sequenceConversionWrite() { QUrl qmlFile = testFileUrl("sequenceConversion.write.error.qml"); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); MySequenceConversionObject *seq = object->findChild("msco"); @@ -4592,11 +4592,11 @@ void tst_qdeclarativeecmascript::sequenceConversionWrite() } } -void tst_qdeclarativeecmascript::sequenceConversionArray() +void tst_qqmlecmascript::sequenceConversionArray() { // ensure that in JS the returned sequences act just like normal JS Arrays. QUrl qmlFile = testFileUrl("sequenceConversion.array.qml"); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "indexedAccess"); @@ -4611,12 +4611,12 @@ void tst_qdeclarativeecmascript::sequenceConversionArray() } -void tst_qdeclarativeecmascript::sequenceConversionIndexes() +void tst_qqmlecmascript::sequenceConversionIndexes() { // ensure that we gracefully fail if unsupported index values are specified. // Qt container classes only support non-negative, signed integer index values. QUrl qmlFile = testFileUrl("sequenceConversion.indexes.qml"); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); QString w1 = qmlFile.toString() + QLatin1String(":34: Index out of range during length set"); @@ -4634,12 +4634,12 @@ void tst_qdeclarativeecmascript::sequenceConversionIndexes() delete object; } -void tst_qdeclarativeecmascript::sequenceConversionThreads() +void tst_qqmlecmascript::sequenceConversionThreads() { // ensure that sequence conversion operations work correctly in a worker thread // and that serialisation between the main and worker thread succeeds. QUrl qmlFile = testFileUrl("sequenceConversion.threads.qml"); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); @@ -4674,11 +4674,11 @@ void tst_qdeclarativeecmascript::sequenceConversionThreads() delete object; } -void tst_qdeclarativeecmascript::sequenceConversionBindings() +void tst_qqmlecmascript::sequenceConversionBindings() { { QUrl qmlFile = testFileUrl("sequenceConversion.bindings.qml"); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); QList intList; intList << 1 << 2 << 3 << 12 << 7; @@ -4693,17 +4693,17 @@ void tst_qdeclarativeecmascript::sequenceConversionBindings() QUrl qmlFile = testFileUrl("sequenceConversion.bindings.error.qml"); QString warning = QString(QLatin1String("%1:17: Unable to assign QList to QList")).arg(qmlFile.toString()); QTest::ignoreMessage(QtWarningMsg, warning.toAscii().constData()); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); delete object; } } -void tst_qdeclarativeecmascript::sequenceConversionCopy() +void tst_qqmlecmascript::sequenceConversionCopy() { QUrl qmlFile = testFileUrl("sequenceConversion.copy.qml"); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "testCopySequences"); @@ -4715,11 +4715,11 @@ void tst_qdeclarativeecmascript::sequenceConversionCopy() delete object; } -void tst_qdeclarativeecmascript::assignSequenceTypes() +void tst_qqmlecmascript::assignSequenceTypes() { // test binding array to sequence type property { - QDeclarativeComponent component(&engine, testFileUrl("assignSequenceTypes.1.qml")); + QQmlComponent component(&engine, testFileUrl("assignSequenceTypes.1.qml")); MySequenceConversionObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->intListProperty(), (QList() << 1 << 2)); @@ -4733,7 +4733,7 @@ void tst_qdeclarativeecmascript::assignSequenceTypes() // test binding literal to sequence type property { - QDeclarativeComponent component(&engine, testFileUrl("assignSequenceTypes.2.qml")); + QQmlComponent component(&engine, testFileUrl("assignSequenceTypes.2.qml")); MySequenceConversionObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->intListProperty(), (QList() << 1)); @@ -4747,7 +4747,7 @@ void tst_qdeclarativeecmascript::assignSequenceTypes() // test binding single value to sequence type property { - QDeclarativeComponent component(&engine, testFileUrl("assignSequenceTypes.3.qml")); + QQmlComponent component(&engine, testFileUrl("assignSequenceTypes.3.qml")); MySequenceConversionObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->intListProperty(), (QList() << 1)); @@ -4759,7 +4759,7 @@ void tst_qdeclarativeecmascript::assignSequenceTypes() // test assigning array to sequence type property in js function { - QDeclarativeComponent component(&engine, testFileUrl("assignSequenceTypes.4.qml")); + QQmlComponent component(&engine, testFileUrl("assignSequenceTypes.4.qml")); MySequenceConversionObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->intListProperty(), (QList() << 1 << 2)); @@ -4773,7 +4773,7 @@ void tst_qdeclarativeecmascript::assignSequenceTypes() // test assigning literal to sequence type property in js function { - QDeclarativeComponent component(&engine, testFileUrl("assignSequenceTypes.5.qml")); + QQmlComponent component(&engine, testFileUrl("assignSequenceTypes.5.qml")); MySequenceConversionObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->intListProperty(), (QList() << 1)); @@ -4787,7 +4787,7 @@ void tst_qdeclarativeecmascript::assignSequenceTypes() // test assigning single value to sequence type property in js function { - QDeclarativeComponent component(&engine, testFileUrl("assignSequenceTypes.6.qml")); + QQmlComponent component(&engine, testFileUrl("assignSequenceTypes.6.qml")); MySequenceConversionObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->intListProperty(), (QList() << 1)); @@ -4799,7 +4799,7 @@ void tst_qdeclarativeecmascript::assignSequenceTypes() // test QList literal assignment and binding assignment causes url resolution when required { - QDeclarativeComponent component(&engine, testFileUrl("assignSequenceTypes.7.qml")); + QQmlComponent component(&engine, testFileUrl("assignSequenceTypes.7.qml")); QObject *object = component.create(); QVERIFY(object != 0); MySequenceConversionObject *msco1 = object->findChild(QLatin1String("msco1")); @@ -4819,9 +4819,9 @@ void tst_qdeclarativeecmascript::assignSequenceTypes() // Test that assigning a null object works // Regressed with: df1788b4dbbb2826ae63f26bdf166342595343f4 -void tst_qdeclarativeecmascript::nullObjectBinding() +void tst_qqmlecmascript::nullObjectBinding() { - QDeclarativeComponent component(&engine, testFileUrl("nullObjectBinding.qml")); + QQmlComponent component(&engine, testFileUrl("nullObjectBinding.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -4832,10 +4832,10 @@ void tst_qdeclarativeecmascript::nullObjectBinding() } // Test that bindings don't evaluate once the engine has been destroyed -void tst_qdeclarativeecmascript::deletedEngine() +void tst_qqmlecmascript::deletedEngine() { - QDeclarativeEngine *engine = new QDeclarativeEngine; - QDeclarativeComponent component(engine, testFileUrl("deletedEngine.qml")); + QQmlEngine *engine = new QQmlEngine; + QQmlComponent component(engine, testFileUrl("deletedEngine.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -4854,9 +4854,9 @@ void tst_qdeclarativeecmascript::deletedEngine() } // Test the crashing part of QTBUG-9705 -void tst_qdeclarativeecmascript::libraryScriptAssert() +void tst_qqmlecmascript::libraryScriptAssert() { - QDeclarativeComponent component(&engine, testFileUrl("libraryScriptAssert.qml")); + QQmlComponent component(&engine, testFileUrl("libraryScriptAssert.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -4864,9 +4864,9 @@ void tst_qdeclarativeecmascript::libraryScriptAssert() delete object; } -void tst_qdeclarativeecmascript::variantsAssignedUndefined() +void tst_qqmlecmascript::variantsAssignedUndefined() { - QDeclarativeComponent component(&engine, testFileUrl("variantsAssignedUndefined.qml")); + QQmlComponent component(&engine, testFileUrl("variantsAssignedUndefined.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -4883,11 +4883,11 @@ void tst_qdeclarativeecmascript::variantsAssignedUndefined() delete object; } -void tst_qdeclarativeecmascript::qtbug_9792() +void tst_qqmlecmascript::qtbug_9792() { - QDeclarativeComponent component(&engine, testFileUrl("qtbug_9792.qml")); + QQmlComponent component(&engine, testFileUrl("qtbug_9792.qml")); - QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext()); + QQmlContext *context = new QQmlContext(engine.rootContext()); MyQmlObject *object = qobject_cast(component.create(context)); QVERIFY(object != 0); @@ -4909,10 +4909,10 @@ void tst_qdeclarativeecmascript::qtbug_9792() delete object; } -// Verifies that QDeclarativeGuard<>s used in the vmemetaobject are cleaned correctly -void tst_qdeclarativeecmascript::qtcreatorbug_1289() +// Verifies that QQmlGuard<>s used in the vmemetaobject are cleaned correctly +void tst_qqmlecmascript::qtcreatorbug_1289() { - QDeclarativeComponent component(&engine, testFileUrl("qtcreatorbug_1289.qml")); + QQmlComponent component(&engine, testFileUrl("qtcreatorbug_1289.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -4931,10 +4931,10 @@ void tst_qdeclarativeecmascript::qtcreatorbug_1289() } // Test that we shut down without stupid warnings -void tst_qdeclarativeecmascript::noSpuriousWarningsAtShutdown() +void tst_qqmlecmascript::noSpuriousWarningsAtShutdown() { { - QDeclarativeComponent component(&engine, testFileUrl("noSpuriousWarningsAtShutdown.qml")); + QQmlComponent component(&engine, testFileUrl("noSpuriousWarningsAtShutdown.qml")); QObject *o = component.create(); @@ -4950,7 +4950,7 @@ void tst_qdeclarativeecmascript::noSpuriousWarningsAtShutdown() { - QDeclarativeComponent component(&engine, testFileUrl("noSpuriousWarningsAtShutdown.2.qml")); + QQmlComponent component(&engine, testFileUrl("noSpuriousWarningsAtShutdown.2.qml")); QObject *o = component.create(); @@ -4965,10 +4965,10 @@ void tst_qdeclarativeecmascript::noSpuriousWarningsAtShutdown() } } -void tst_qdeclarativeecmascript::canAssignNullToQObject() +void tst_qqmlecmascript::canAssignNullToQObject() { { - QDeclarativeComponent component(&engine, testFileUrl("canAssignNullToQObject.1.qml")); + QQmlComponent component(&engine, testFileUrl("canAssignNullToQObject.1.qml")); MyQmlObject *o = qobject_cast(component.create()); QVERIFY(o != 0); @@ -4983,7 +4983,7 @@ void tst_qdeclarativeecmascript::canAssignNullToQObject() } { - QDeclarativeComponent component(&engine, testFileUrl("canAssignNullToQObject.2.qml")); + QQmlComponent component(&engine, testFileUrl("canAssignNullToQObject.2.qml")); MyQmlObject *o = qobject_cast(component.create()); QVERIFY(o != 0); @@ -4994,9 +4994,9 @@ void tst_qdeclarativeecmascript::canAssignNullToQObject() } } -void tst_qdeclarativeecmascript::functionAssignment_fromBinding() +void tst_qqmlecmascript::functionAssignment_fromBinding() { - QDeclarativeComponent component(&engine, testFileUrl("functionAssignment.1.qml")); + QQmlComponent component(&engine, testFileUrl("functionAssignment.1.qml")); QString url = component.url().toString(); QString warning = url + ":4: Unable to assign a function to a property."; @@ -5010,11 +5010,11 @@ void tst_qdeclarativeecmascript::functionAssignment_fromBinding() delete o; } -void tst_qdeclarativeecmascript::functionAssignment_fromJS() +void tst_qqmlecmascript::functionAssignment_fromJS() { QFETCH(QString, triggerProperty); - QDeclarativeComponent component(&engine, testFileUrl("functionAssignment.2.qml")); + QQmlComponent component(&engine, testFileUrl("functionAssignment.2.qml")); QVERIFY2(component.errorString().isEmpty(), qPrintable(component.errorString())); MyQmlObject *o = qobject_cast(component.create()); @@ -5031,7 +5031,7 @@ void tst_qdeclarativeecmascript::functionAssignment_fromJS() delete o; } -void tst_qdeclarativeecmascript::functionAssignment_fromJS_data() +void tst_qqmlecmascript::functionAssignment_fromJS_data() { QTest::addColumn("triggerProperty"); @@ -5044,9 +5044,9 @@ void tst_qdeclarativeecmascript::functionAssignment_fromJS_data() QTest::newRow("use 'this' from JS file") << "assignWithThisFromJsFile"; } -void tst_qdeclarativeecmascript::functionAssignmentfromJS_invalid() +void tst_qqmlecmascript::functionAssignmentfromJS_invalid() { - QDeclarativeComponent component(&engine, testFileUrl("functionAssignment.2.qml")); + QQmlComponent component(&engine, testFileUrl("functionAssignment.2.qml")); QVERIFY2(component.errorString().isEmpty(), qPrintable(component.errorString())); MyQmlObject *o = qobject_cast(component.create()); @@ -5068,9 +5068,9 @@ void tst_qdeclarativeecmascript::functionAssignmentfromJS_invalid() delete o; } -void tst_qdeclarativeecmascript::eval() +void tst_qqmlecmascript::eval() { - QDeclarativeComponent component(&engine, testFileUrl("eval.qml")); + QQmlComponent component(&engine, testFileUrl("eval.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5084,9 +5084,9 @@ void tst_qdeclarativeecmascript::eval() delete o; } -void tst_qdeclarativeecmascript::function() +void tst_qqmlecmascript::function() { - QDeclarativeComponent component(&engine, testFileUrl("function.qml")); + QQmlComponent component(&engine, testFileUrl("function.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5098,13 +5098,13 @@ void tst_qdeclarativeecmascript::function() delete o; } -void tst_qdeclarativeecmascript::functionException() +void tst_qqmlecmascript::functionException() { // QTBUG-24037 - shouldn't crash. QString errstr = testFileUrl("v8functionException.qml").toString() + QLatin1String(":13: SyntaxError: Unexpected token ILLEGAL"); QTest::ignoreMessage(QtWarningMsg, qPrintable(errstr)); QTest::ignoreMessage(QtWarningMsg, ": Exception occurred during compilation of function: dynamicSlot()"); - QDeclarativeComponent component(&engine, testFileUrl("v8functionException.qml")); + QQmlComponent component(&engine, testFileUrl("v8functionException.qml")); QObject *o = component.create(); QVERIFY(o != 0); QMetaObject::invokeMethod(o, "dynamicSlot"); @@ -5112,11 +5112,11 @@ void tst_qdeclarativeecmascript::functionException() } // Test the "Qt.include" method -void tst_qdeclarativeecmascript::include() +void tst_qqmlecmascript::include() { // Non-library relative include { - QDeclarativeComponent component(&engine, testFileUrl("include.qml")); + QQmlComponent component(&engine, testFileUrl("include.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5132,7 +5132,7 @@ void tst_qdeclarativeecmascript::include() // Library relative include { - QDeclarativeComponent component(&engine, testFileUrl("include_shared.qml")); + QQmlComponent component(&engine, testFileUrl("include_shared.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5148,7 +5148,7 @@ void tst_qdeclarativeecmascript::include() // Callback { - QDeclarativeComponent component(&engine, testFileUrl("include_callback.qml")); + QQmlComponent component(&engine, testFileUrl("include_callback.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5164,7 +5164,7 @@ void tst_qdeclarativeecmascript::include() // Including file with ".pragma library" { - QDeclarativeComponent component(&engine, testFileUrl("include_pragma.qml")); + QQmlComponent component(&engine, testFileUrl("include_pragma.qml")); QObject *o = component.create(); QVERIFY(o != 0); QCOMPARE(o->property("test1").toInt(), 100); @@ -5178,7 +5178,7 @@ void tst_qdeclarativeecmascript::include() QVERIFY(server.isValid()); server.serveDirectory(dataDirectory()); - QDeclarativeComponent component(&engine, testFileUrl("include_remote.qml")); + QQmlComponent component(&engine, testFileUrl("include_remote.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5206,7 +5206,7 @@ void tst_qdeclarativeecmascript::include() QVERIFY(server.isValid()); server.serveDirectory(dataDirectory()); - QDeclarativeComponent component(&engine, testFileUrl("include_remote_missing.qml")); + QQmlComponent component(&engine, testFileUrl("include_remote_missing.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5220,9 +5220,9 @@ void tst_qdeclarativeecmascript::include() } } -void tst_qdeclarativeecmascript::signalHandlers() +void tst_qqmlecmascript::signalHandlers() { - QDeclarativeComponent component(&engine, testFileUrl("signalHandlers.qml")); + QQmlComponent component(&engine, testFileUrl("signalHandlers.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5250,55 +5250,55 @@ void tst_qdeclarativeecmascript::signalHandlers() delete o; } -void tst_qdeclarativeecmascript::qtbug_10696() +void tst_qqmlecmascript::qtbug_10696() { - QDeclarativeComponent component(&engine, testFileUrl("qtbug_10696.qml")); + QQmlComponent component(&engine, testFileUrl("qtbug_10696.qml")); QObject *o = component.create(); QVERIFY(o != 0); delete o; } -void tst_qdeclarativeecmascript::qtbug_11606() +void tst_qqmlecmascript::qtbug_11606() { - QDeclarativeComponent component(&engine, testFileUrl("qtbug_11606.qml")); + QQmlComponent component(&engine, testFileUrl("qtbug_11606.qml")); QObject *o = component.create(); QVERIFY(o != 0); QCOMPARE(o->property("test").toBool(), true); delete o; } -void tst_qdeclarativeecmascript::qtbug_11600() +void tst_qqmlecmascript::qtbug_11600() { - QDeclarativeComponent component(&engine, testFileUrl("qtbug_11600.qml")); + QQmlComponent component(&engine, testFileUrl("qtbug_11600.qml")); QObject *o = component.create(); QVERIFY(o != 0); QCOMPARE(o->property("test").toBool(), true); delete o; } -void tst_qdeclarativeecmascript::qtbug_21864() +void tst_qqmlecmascript::qtbug_21864() { - QDeclarativeComponent component(&engine, testFileUrl("qtbug_21864.qml")); + QQmlComponent component(&engine, testFileUrl("qtbug_21864.qml")); QObject *o = component.create(); QVERIFY(o != 0); QCOMPARE(o->property("test").toBool(), true); delete o; } -void tst_qdeclarativeecmascript::rewriteMultiLineStrings() +void tst_qqmlecmascript::rewriteMultiLineStrings() { // QTBUG-23387 - QDeclarativeComponent component(&engine, testFileUrl("rewriteMultiLineStrings.qml")); + QQmlComponent component(&engine, testFileUrl("rewriteMultiLineStrings.qml")); QObject *o = component.create(); QVERIFY(o != 0); QTRY_COMPARE(o->property("test").toBool(), true); delete o; } -void tst_qdeclarativeecmascript::qobjectConnectionListExceptionHandling() +void tst_qqmlecmascript::qobjectConnectionListExceptionHandling() { // QTBUG-23375 - QDeclarativeComponent component(&engine, testFileUrl("qobjectConnectionListExceptionHandling.qml")); + QQmlComponent component(&engine, testFileUrl("qobjectConnectionListExceptionHandling.qml")); QString warning = component.url().toString() + QLatin1String(":13: TypeError: Cannot read property 'undefined' of undefined"); QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); @@ -5310,9 +5310,9 @@ void tst_qdeclarativeecmascript::qobjectConnectionListExceptionHandling() } // Reading and writing non-scriptable properties should fail -void tst_qdeclarativeecmascript::nonscriptable() +void tst_qqmlecmascript::nonscriptable() { - QDeclarativeComponent component(&engine, testFileUrl("nonscriptable.qml")); + QQmlComponent component(&engine, testFileUrl("nonscriptable.qml")); QObject *o = component.create(); QVERIFY(o != 0); QCOMPARE(o->property("readOk").toBool(), true); @@ -5321,18 +5321,18 @@ void tst_qdeclarativeecmascript::nonscriptable() } // deleteLater() should not be callable from QML -void tst_qdeclarativeecmascript::deleteLater() +void tst_qqmlecmascript::deleteLater() { - QDeclarativeComponent component(&engine, testFileUrl("deleteLater.qml")); + QQmlComponent component(&engine, testFileUrl("deleteLater.qml")); QObject *o = component.create(); QVERIFY(o != 0); QCOMPARE(o->property("test").toBool(), true); delete o; } -void tst_qdeclarativeecmascript::in() +void tst_qqmlecmascript::in() { - QDeclarativeComponent component(&engine, testFileUrl("in.qml")); + QQmlComponent component(&engine, testFileUrl("in.qml")); QObject *o = component.create(); QVERIFY(o != 0); QCOMPARE(o->property("test1").toBool(), true); @@ -5340,9 +5340,9 @@ void tst_qdeclarativeecmascript::in() delete o; } -void tst_qdeclarativeecmascript::typeOf() +void tst_qqmlecmascript::typeOf() { - QDeclarativeComponent component(&engine, testFileUrl("typeOf.qml")); + QQmlComponent component(&engine, testFileUrl("typeOf.qml")); // These warnings should not happen once QTBUG-21864 is fixed QString warning1 = component.url().toString() + QLatin1String(":16: Error: Cannot assign [undefined] to QString"); @@ -5368,9 +5368,9 @@ void tst_qdeclarativeecmascript::typeOf() delete o; } -void tst_qdeclarativeecmascript::sharedAttachedObject() +void tst_qqmlecmascript::sharedAttachedObject() { - QDeclarativeComponent component(&engine, testFileUrl("sharedAttachedObject.qml")); + QQmlComponent component(&engine, testFileUrl("sharedAttachedObject.qml")); QObject *o = component.create(); QVERIFY(o != 0); QCOMPARE(o->property("test1").toBool(), true); @@ -5379,9 +5379,9 @@ void tst_qdeclarativeecmascript::sharedAttachedObject() } // QTBUG-13999 -void tst_qdeclarativeecmascript::objectName() +void tst_qqmlecmascript::objectName() { - QDeclarativeComponent component(&engine, testFileUrl("objectName.qml")); + QQmlComponent component(&engine, testFileUrl("objectName.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5396,9 +5396,9 @@ void tst_qdeclarativeecmascript::objectName() delete o; } -void tst_qdeclarativeecmascript::writeRemovesBinding() +void tst_qqmlecmascript::writeRemovesBinding() { - QDeclarativeComponent component(&engine, testFileUrl("writeRemovesBinding.qml")); + QQmlComponent component(&engine, testFileUrl("writeRemovesBinding.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5408,9 +5408,9 @@ void tst_qdeclarativeecmascript::writeRemovesBinding() } // Test bindings assigned to alias properties actually assign to the alias' target -void tst_qdeclarativeecmascript::aliasBindingsAssignCorrectly() +void tst_qqmlecmascript::aliasBindingsAssignCorrectly() { - QDeclarativeComponent component(&engine, testFileUrl("aliasBindingsAssignCorrectly.qml")); + QQmlComponent component(&engine, testFileUrl("aliasBindingsAssignCorrectly.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5420,10 +5420,10 @@ void tst_qdeclarativeecmascript::aliasBindingsAssignCorrectly() } // Test bindings assigned to alias properties override a binding on the target (QTBUG-13719) -void tst_qdeclarativeecmascript::aliasBindingsOverrideTarget() +void tst_qqmlecmascript::aliasBindingsOverrideTarget() { { - QDeclarativeComponent component(&engine, testFileUrl("aliasBindingsOverrideTarget.qml")); + QQmlComponent component(&engine, testFileUrl("aliasBindingsOverrideTarget.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5433,7 +5433,7 @@ void tst_qdeclarativeecmascript::aliasBindingsOverrideTarget() } { - QDeclarativeComponent component(&engine, testFileUrl("aliasBindingsOverrideTarget.2.qml")); + QQmlComponent component(&engine, testFileUrl("aliasBindingsOverrideTarget.2.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5443,7 +5443,7 @@ void tst_qdeclarativeecmascript::aliasBindingsOverrideTarget() } { - QDeclarativeComponent component(&engine, testFileUrl("aliasBindingsOverrideTarget.3.qml")); + QQmlComponent component(&engine, testFileUrl("aliasBindingsOverrideTarget.3.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5454,10 +5454,10 @@ void tst_qdeclarativeecmascript::aliasBindingsOverrideTarget() } // Test that writes to alias properties override bindings on the alias target (QTBUG-13719) -void tst_qdeclarativeecmascript::aliasWritesOverrideBindings() +void tst_qqmlecmascript::aliasWritesOverrideBindings() { { - QDeclarativeComponent component(&engine, testFileUrl("aliasWritesOverrideBindings.qml")); + QQmlComponent component(&engine, testFileUrl("aliasWritesOverrideBindings.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5467,7 +5467,7 @@ void tst_qdeclarativeecmascript::aliasWritesOverrideBindings() } { - QDeclarativeComponent component(&engine, testFileUrl("aliasWritesOverrideBindings.2.qml")); + QQmlComponent component(&engine, testFileUrl("aliasWritesOverrideBindings.2.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5477,7 +5477,7 @@ void tst_qdeclarativeecmascript::aliasWritesOverrideBindings() } { - QDeclarativeComponent component(&engine, testFileUrl("aliasWritesOverrideBindings.3.qml")); + QQmlComponent component(&engine, testFileUrl("aliasWritesOverrideBindings.3.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -5489,9 +5489,9 @@ void tst_qdeclarativeecmascript::aliasWritesOverrideBindings() // Allow an alais to a composite element // QTBUG-20200 -void tst_qdeclarativeecmascript::aliasToCompositeElement() +void tst_qqmlecmascript::aliasToCompositeElement() { - QDeclarativeComponent component(&engine, testFileUrl("aliasToCompositeElement.qml")); + QQmlComponent component(&engine, testFileUrl("aliasToCompositeElement.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -5499,9 +5499,9 @@ void tst_qdeclarativeecmascript::aliasToCompositeElement() delete object; } -void tst_qdeclarativeecmascript::qtbug_20344() +void tst_qqmlecmascript::qtbug_20344() { - QDeclarativeComponent component(&engine, testFileUrl("qtbug_20344.qml")); + QQmlComponent component(&engine, testFileUrl("qtbug_20344.qml")); QString warning = component.url().toString() + ":5: Error: Exception thrown from within QObject slot"; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); @@ -5512,10 +5512,10 @@ void tst_qdeclarativeecmascript::qtbug_20344() delete object; } -void tst_qdeclarativeecmascript::revisionErrors() +void tst_qqmlecmascript::revisionErrors() { { - QDeclarativeComponent component(&engine, testFileUrl("metaobjectRevisionErrors.qml")); + QQmlComponent component(&engine, testFileUrl("metaobjectRevisionErrors.qml")); QString url = component.url().toString(); QString warning1 = url + ":8: ReferenceError: Can't find variable: prop2"; @@ -5530,7 +5530,7 @@ void tst_qdeclarativeecmascript::revisionErrors() delete object; } { - QDeclarativeComponent component(&engine, testFileUrl("metaobjectRevisionErrors2.qml")); + QQmlComponent component(&engine, testFileUrl("metaobjectRevisionErrors2.qml")); QString url = component.url().toString(); // MyRevisionedSubclass 1.0 uses MyRevisionedClass revision 0 @@ -5552,7 +5552,7 @@ void tst_qdeclarativeecmascript::revisionErrors() delete object; } { - QDeclarativeComponent component(&engine, testFileUrl("metaobjectRevisionErrors3.qml")); + QQmlComponent component(&engine, testFileUrl("metaobjectRevisionErrors3.qml")); QString url = component.url().toString(); // MyRevisionedSubclass 1.1 uses MyRevisionedClass revision 1 @@ -5569,10 +5569,10 @@ void tst_qdeclarativeecmascript::revisionErrors() } } -void tst_qdeclarativeecmascript::revision() +void tst_qqmlecmascript::revision() { { - QDeclarativeComponent component(&engine, testFileUrl("metaobjectRevision.qml")); + QQmlComponent component(&engine, testFileUrl("metaobjectRevision.qml")); QString url = component.url().toString(); MyRevisionedClass *object = qobject_cast(component.create()); @@ -5580,7 +5580,7 @@ void tst_qdeclarativeecmascript::revision() delete object; } { - QDeclarativeComponent component(&engine, testFileUrl("metaobjectRevision2.qml")); + QQmlComponent component(&engine, testFileUrl("metaobjectRevision2.qml")); QString url = component.url().toString(); MyRevisionedClass *object = qobject_cast(component.create()); @@ -5588,7 +5588,7 @@ void tst_qdeclarativeecmascript::revision() delete object; } { - QDeclarativeComponent component(&engine, testFileUrl("metaobjectRevision3.qml")); + QQmlComponent component(&engine, testFileUrl("metaobjectRevision3.qml")); QString url = component.url().toString(); MyRevisionedClass *object = qobject_cast(component.create()); @@ -5597,7 +5597,7 @@ void tst_qdeclarativeecmascript::revision() } // Test that non-root classes can resolve revisioned methods { - QDeclarativeComponent component(&engine, testFileUrl("metaobjectRevision4.qml")); + QQmlComponent component(&engine, testFileUrl("metaobjectRevision4.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -5606,9 +5606,9 @@ void tst_qdeclarativeecmascript::revision() } } -void tst_qdeclarativeecmascript::realToInt() +void tst_qqmlecmascript::realToInt() { - QDeclarativeComponent component(&engine, testFileUrl("realToInt.qml")); + QQmlComponent component(&engine, testFileUrl("realToInt.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -5618,10 +5618,10 @@ void tst_qdeclarativeecmascript::realToInt() QCOMPARE(object->value(), int(8)); } -void tst_qdeclarativeecmascript::urlProperty() +void tst_qqmlecmascript::urlProperty() { { - QDeclarativeComponent component(&engine, testFileUrl("urlProperty.1.qml")); + QQmlComponent component(&engine, testFileUrl("urlProperty.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); object->setStringProperty("http://qt-project.org"); @@ -5632,10 +5632,10 @@ void tst_qdeclarativeecmascript::urlProperty() } } -void tst_qdeclarativeecmascript::urlPropertyWithEncoding() +void tst_qqmlecmascript::urlPropertyWithEncoding() { { - QDeclarativeComponent component(&engine, testFileUrl("urlProperty.2.qml")); + QQmlComponent component(&engine, testFileUrl("urlProperty.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); object->setStringProperty("http://qt-project.org"); @@ -5647,10 +5647,10 @@ void tst_qdeclarativeecmascript::urlPropertyWithEncoding() } } -void tst_qdeclarativeecmascript::urlListPropertyWithEncoding() +void tst_qqmlecmascript::urlListPropertyWithEncoding() { { - QDeclarativeComponent component(&engine, testFileUrl("urlListProperty.qml")); + QQmlComponent component(&engine, testFileUrl("urlListProperty.qml")); QObject *object = component.create(); QVERIFY(object != 0); MySequenceConversionObject *msco1 = object->findChild(QLatin1String("msco1")); @@ -5668,33 +5668,33 @@ void tst_qdeclarativeecmascript::urlListPropertyWithEncoding() } } -void tst_qdeclarativeecmascript::dynamicString() +void tst_qqmlecmascript::dynamicString() { - QDeclarativeComponent component(&engine, testFileUrl("dynamicString.qml")); + QQmlComponent component(&engine, testFileUrl("dynamicString.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("stringProperty").toString(), QString::fromLatin1("string:Hello World false:0 true:1 uint32:100 int32:-100 double:3.14159 date:2011-02-11 05::30:50!")); } -void tst_qdeclarativeecmascript::automaticSemicolon() +void tst_qqmlecmascript::automaticSemicolon() { - QDeclarativeComponent component(&engine, testFileUrl("automaticSemicolon.qml")); + QQmlComponent component(&engine, testFileUrl("automaticSemicolon.qml")); QObject *object = component.create(); QVERIFY(object != 0); } -void tst_qdeclarativeecmascript::unaryExpression() +void tst_qqmlecmascript::unaryExpression() { - QDeclarativeComponent component(&engine, testFileUrl("unaryExpression.qml")); + QQmlComponent component(&engine, testFileUrl("unaryExpression.qml")); QObject *object = component.create(); QVERIFY(object != 0); } // Makes sure that a binding isn't double re-evaluated when it depends on the same variable twice -void tst_qdeclarativeecmascript::doubleEvaluate() +void tst_qqmlecmascript::doubleEvaluate() { - QDeclarativeComponent component(&engine, testFileUrl("doubleEvaluate.qml")); + QQmlComponent component(&engine, testFileUrl("doubleEvaluate.qml")); QObject *object = component.create(); QVERIFY(object != 0); WriteCounter *wc = qobject_cast(object); @@ -5714,10 +5714,10 @@ static void captureMsgHandler(QtMsgType, const char *msg) messages.append(QLatin1String(msg)); } -void tst_qdeclarativeecmascript::nonNotifyable() +void tst_qqmlecmascript::nonNotifyable() { QV4Compiler::enableV4(false); - QDeclarativeComponent component(&engine, testFileUrl("nonNotifyable.qml")); + QQmlComponent component(&engine, testFileUrl("nonNotifyable.qml")); QV4Compiler::enableV4(true); QtMsgHandler old = qInstallMsgHandler(captureMsgHandler); @@ -5727,7 +5727,7 @@ void tst_qdeclarativeecmascript::nonNotifyable() QVERIFY(object != 0); - QString expected1 = QLatin1String("QDeclarativeExpression: Expression ") + + QString expected1 = QLatin1String("QQmlExpression: Expression ") + component.url().toString() + QLatin1String(":5 depends on non-NOTIFYable properties:"); QString expected2 = QLatin1String(" ") + @@ -5741,9 +5741,9 @@ void tst_qdeclarativeecmascript::nonNotifyable() delete object; } -void tst_qdeclarativeecmascript::forInLoop() +void tst_qqmlecmascript::forInLoop() { - QDeclarativeComponent component(&engine, testFileUrl("forInLoop.qml")); + QQmlComponent component(&engine, testFileUrl("forInLoop.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -5761,23 +5761,23 @@ void tst_qdeclarativeecmascript::forInLoop() } // An object the binding depends on is deleted while the binding is still running -void tst_qdeclarativeecmascript::deleteWhileBindingRunning() +void tst_qqmlecmascript::deleteWhileBindingRunning() { - QDeclarativeComponent component(&engine, testFileUrl("deleteWhileBindingRunning.qml")); + QQmlComponent component(&engine, testFileUrl("deleteWhileBindingRunning.qml")); QObject *object = component.create(); QVERIFY(object != 0); delete object; } -void tst_qdeclarativeecmascript::qtbug_22679() +void tst_qqmlecmascript::qtbug_22679() { MyQmlObject object; object.setStringProperty(QLatin1String("Please work correctly")); engine.rootContext()->setContextProperty("contextProp", &object); - QDeclarativeComponent component(&engine, testFileUrl("qtbug_22679.qml")); - qRegisterMetaType >("QList"); - QSignalSpy warningsSpy(&engine, SIGNAL(warnings(QList))); + QQmlComponent component(&engine, testFileUrl("qtbug_22679.qml")); + qRegisterMetaType >("QList"); + QSignalSpy warningsSpy(&engine, SIGNAL(warnings(QList))); QObject *o = component.create(); QVERIFY(o != 0); @@ -5785,7 +5785,7 @@ void tst_qdeclarativeecmascript::qtbug_22679() delete o; } -void tst_qdeclarativeecmascript::qtbug_22843_data() +void tst_qqmlecmascript::qtbug_22843_data() { QTest::addColumn("library"); @@ -5793,7 +5793,7 @@ void tst_qdeclarativeecmascript::qtbug_22843_data() QTest::newRow("with .pragma library") << true; } -void tst_qdeclarativeecmascript::qtbug_22843() +void tst_qqmlecmascript::qtbug_22843() { QFETCH(bool, library); @@ -5802,13 +5802,13 @@ void tst_qdeclarativeecmascript::qtbug_22843() fileName += QLatin1String(".library"); fileName += QLatin1String(".qml"); - QDeclarativeComponent component(&engine, testFileUrl(fileName)); + QQmlComponent component(&engine, testFileUrl(fileName)); QString url = component.url().toString(); QString warning1 = url.left(url.length()-3) + QLatin1String("js:4: SyntaxError: Unexpected token )"); QString warning2 = url + QLatin1String(":5: TypeError: Object [object Object] has no method 'func'"); - qRegisterMetaType >("QList"); - QSignalSpy warningsSpy(&engine, SIGNAL(warnings(QList))); + qRegisterMetaType >("QList"); + QSignalSpy warningsSpy(&engine, SIGNAL(warnings(QList))); for (int x = 0; x < 3; ++x) { warningsSpy.clear(); // For libraries, only the first import attempt should produce a @@ -5826,10 +5826,10 @@ void tst_qdeclarativeecmascript::qtbug_22843() } -void tst_qdeclarativeecmascript::switchStatement() +void tst_qqmlecmascript::switchStatement() { { - QDeclarativeComponent component(&engine, testFileUrl("switchStatement.1.qml")); + QQmlComponent component(&engine, testFileUrl("switchStatement.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -5852,7 +5852,7 @@ void tst_qdeclarativeecmascript::switchStatement() } { - QDeclarativeComponent component(&engine, testFileUrl("switchStatement.2.qml")); + QQmlComponent component(&engine, testFileUrl("switchStatement.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -5875,7 +5875,7 @@ void tst_qdeclarativeecmascript::switchStatement() } { - QDeclarativeComponent component(&engine, testFileUrl("switchStatement.3.qml")); + QQmlComponent component(&engine, testFileUrl("switchStatement.3.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -5898,7 +5898,7 @@ void tst_qdeclarativeecmascript::switchStatement() } { - QDeclarativeComponent component(&engine, testFileUrl("switchStatement.4.qml")); + QQmlComponent component(&engine, testFileUrl("switchStatement.4.qml")); QString warning = component.url().toString() + ":4: Unable to assign [undefined] to int"; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); @@ -5926,7 +5926,7 @@ void tst_qdeclarativeecmascript::switchStatement() } { - QDeclarativeComponent component(&engine, testFileUrl("switchStatement.5.qml")); + QQmlComponent component(&engine, testFileUrl("switchStatement.5.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -5949,7 +5949,7 @@ void tst_qdeclarativeecmascript::switchStatement() } { - QDeclarativeComponent component(&engine, testFileUrl("switchStatement.6.qml")); + QQmlComponent component(&engine, testFileUrl("switchStatement.6.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -5972,10 +5972,10 @@ void tst_qdeclarativeecmascript::switchStatement() } } -void tst_qdeclarativeecmascript::withStatement() +void tst_qqmlecmascript::withStatement() { { - QDeclarativeComponent component(&engine, testFileUrl("withStatement.1.qml")); + QQmlComponent component(&engine, testFileUrl("withStatement.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -5983,10 +5983,10 @@ void tst_qdeclarativeecmascript::withStatement() } } -void tst_qdeclarativeecmascript::tryStatement() +void tst_qqmlecmascript::tryStatement() { { - QDeclarativeComponent component(&engine, testFileUrl("tryStatement.1.qml")); + QQmlComponent component(&engine, testFileUrl("tryStatement.1.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -5994,7 +5994,7 @@ void tst_qdeclarativeecmascript::tryStatement() } { - QDeclarativeComponent component(&engine, testFileUrl("tryStatement.2.qml")); + QQmlComponent component(&engine, testFileUrl("tryStatement.2.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -6002,7 +6002,7 @@ void tst_qdeclarativeecmascript::tryStatement() } { - QDeclarativeComponent component(&engine, testFileUrl("tryStatement.3.qml")); + QQmlComponent component(&engine, testFileUrl("tryStatement.3.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -6010,7 +6010,7 @@ void tst_qdeclarativeecmascript::tryStatement() } { - QDeclarativeComponent component(&engine, testFileUrl("tryStatement.4.qml")); + QQmlComponent component(&engine, testFileUrl("tryStatement.4.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -6038,15 +6038,15 @@ class CppInvokableWithQObjectDerived : public QObject } }; -void tst_qdeclarativeecmascript::invokableWithQObjectDerived() +void tst_qqmlecmascript::invokableWithQObjectDerived() { CppInvokableWithQObjectDerived invokable; { - QDeclarativeEngine engine; + QQmlEngine engine; engine.rootContext()->setContextProperty("invokable", &invokable); - QDeclarativeComponent component(&engine, testFileUrl("qobjectDerivedArgument.qml")); + QQmlComponent component(&engine, testFileUrl("qobjectDerivedArgument.qml")); QObject *object = component.create(); @@ -6057,6 +6057,6 @@ void tst_qdeclarativeecmascript::invokableWithQObjectDerived() } } -QTEST_MAIN(tst_qdeclarativeecmascript) +QTEST_MAIN(tst_qqmlecmascript) -#include "tst_qdeclarativeecmascript.moc" +#include "tst_qqmlecmascript.moc" diff --git a/tests/auto/qml/qqmlengine/qqmlengine.pro b/tests/auto/qml/qqmlengine/qqmlengine.pro new file mode 100644 index 0000000000..e87b4e30aa --- /dev/null +++ b/tests/auto/qml/qqmlengine/qqmlengine.pro @@ -0,0 +1,9 @@ +CONFIG += testcase +TARGET = tst_qqmlengine +macx:CONFIG -= app_bundle + +SOURCES += tst_qqmlengine.cpp + +CONFIG += parallel_test + +QT += core-private gui-private qml-private network testlib diff --git a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp similarity index 65% rename from tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp rename to tests/auto/qml/qqmlengine/tst_qqmlengine.cpp index 1de738f81f..af2c897d7a 100644 --- a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp +++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp @@ -40,22 +40,22 @@ ****************************************************************************/ #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include -#include +#include +#include +#include -class tst_qdeclarativeengine : public QObject +class tst_qqmlengine : public QObject { Q_OBJECT public: - tst_qdeclarativeengine() {} + tst_qqmlengine() {} private slots: void rootContext(); @@ -69,9 +69,9 @@ private slots: void multipleEngines(); }; -void tst_qdeclarativeengine::rootContext() +void tst_qqmlengine::rootContext() { - QDeclarativeEngine engine; + QQmlEngine engine; QVERIFY(engine.rootContext()); @@ -79,7 +79,7 @@ void tst_qdeclarativeengine::rootContext() QVERIFY(engine.rootContext()->parentContext() == 0); } -class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory +class NetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory { public: NetworkAccessManagerFactory() : manager(0) {} @@ -92,17 +92,17 @@ class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFacto QNetworkAccessManager *manager; }; -void tst_qdeclarativeengine::networkAccessManager() +void tst_qqmlengine::networkAccessManager() { - QDeclarativeEngine *engine = new QDeclarativeEngine; + QQmlEngine *engine = new QQmlEngine; - // Test QDeclarativeEngine created manager + // Test QQmlEngine created manager QPointer manager = engine->networkAccessManager(); QVERIFY(manager != 0); delete engine; // Test factory created manager - engine = new QDeclarativeEngine; + engine = new QQmlEngine; NetworkAccessManagerFactory factory; engine->setNetworkAccessManagerFactory(&factory); QVERIFY(engine->networkAccessManagerFactory() == &factory); @@ -110,9 +110,9 @@ void tst_qdeclarativeengine::networkAccessManager() delete engine; } -void tst_qdeclarativeengine::baseUrl() +void tst_qqmlengine::baseUrl() { - QDeclarativeEngine engine; + QQmlEngine engine; QUrl cwd = QUrl::fromLocalFile(QDir::currentPath() + QDir::separator()); @@ -134,48 +134,48 @@ void tst_qdeclarativeengine::baseUrl() QCOMPARE(engine.rootContext()->resolvedUrl(QUrl("main.qml")), cwd.resolved(QUrl("main.qml"))); } -void tst_qdeclarativeengine::contextForObject() +void tst_qqmlengine::contextForObject() { - QDeclarativeEngine *engine = new QDeclarativeEngine; + QQmlEngine *engine = new QQmlEngine; // Test null-object - QVERIFY(QDeclarativeEngine::contextForObject(0) == 0); + QVERIFY(QQmlEngine::contextForObject(0) == 0); // Test an object with no context QObject object; - QVERIFY(QDeclarativeEngine::contextForObject(&object) == 0); + QVERIFY(QQmlEngine::contextForObject(&object) == 0); // Test setting null-object - QDeclarativeEngine::setContextForObject(0, engine->rootContext()); + QQmlEngine::setContextForObject(0, engine->rootContext()); // Test setting null-context - QDeclarativeEngine::setContextForObject(&object, 0); + QQmlEngine::setContextForObject(&object, 0); // Test setting context - QDeclarativeEngine::setContextForObject(&object, engine->rootContext()); - QVERIFY(QDeclarativeEngine::contextForObject(&object) == engine->rootContext()); + QQmlEngine::setContextForObject(&object, engine->rootContext()); + QVERIFY(QQmlEngine::contextForObject(&object) == engine->rootContext()); - QDeclarativeContext context(engine->rootContext()); + QQmlContext context(engine->rootContext()); // Try changing context - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeEngine::setContextForObject(): Object already has a QDeclarativeContext"); - QDeclarativeEngine::setContextForObject(&object, &context); - QVERIFY(QDeclarativeEngine::contextForObject(&object) == engine->rootContext()); + QTest::ignoreMessage(QtWarningMsg, "QQmlEngine::setContextForObject(): Object already has a QQmlContext"); + QQmlEngine::setContextForObject(&object, &context); + QVERIFY(QQmlEngine::contextForObject(&object) == engine->rootContext()); // Delete context delete engine; engine = 0; - QVERIFY(QDeclarativeEngine::contextForObject(&object) == 0); + QVERIFY(QQmlEngine::contextForObject(&object) == 0); } -void tst_qdeclarativeengine::offlineStoragePath() +void tst_qqmlengine::offlineStoragePath() { // Without these set, QDesktopServices::storageLocation returns // strings with extra "//" at the end. We set them to ignore this problem. - qApp->setApplicationName("tst_qdeclarativeengine"); + qApp->setApplicationName("tst_qqmlengine"); qApp->setOrganizationName("Nokia"); qApp->setOrganizationDomain("nokia.com"); - QDeclarativeEngine engine; + QQmlEngine engine; QDir dir(QStandardPaths::writableLocation(QStandardPaths::DataLocation)); dir.mkpath("QML"); @@ -189,9 +189,9 @@ void tst_qdeclarativeengine::offlineStoragePath() QCOMPARE(engine.offlineStoragePath(), QDir::homePath()); } -void tst_qdeclarativeengine::clearComponentCache() +void tst_qqmlengine::clearComponentCache() { - QDeclarativeEngine engine; + QQmlEngine engine; // Create original qml file { @@ -203,7 +203,7 @@ void tst_qdeclarativeengine::clearComponentCache() // Test "test" property { - QDeclarativeComponent component(&engine, "temp.qml"); + QQmlComponent component(&engine, "temp.qml"); QObject *obj = component.create(); QVERIFY(obj != 0); QCOMPARE(obj->property("test").toInt(), 10); @@ -220,7 +220,7 @@ void tst_qdeclarativeengine::clearComponentCache() // Test cache hit { - QDeclarativeComponent component(&engine, "temp.qml"); + QQmlComponent component(&engine, "temp.qml"); QObject *obj = component.create(); QVERIFY(obj != 0); QCOMPARE(obj->property("test").toInt(), 10); @@ -232,7 +232,7 @@ void tst_qdeclarativeengine::clearComponentCache() // Test cache refresh { - QDeclarativeComponent component(&engine, "temp.qml"); + QQmlComponent component(&engine, "temp.qml"); QObject *obj = component.create(); QVERIFY(obj != 0); QCOMPARE(obj->property("test").toInt(), 11); @@ -246,13 +246,13 @@ static void msgHandler(QtMsgType, const char *warning) warnings << QString::fromUtf8(warning); } -void tst_qdeclarativeengine::outputWarningsToStandardError() +void tst_qqmlengine::outputWarningsToStandardError() { - QDeclarativeEngine engine; + QQmlEngine engine; QCOMPARE(engine.outputWarningsToStandardError(), true); - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData("import QtQuick 2.0; QtObject { property int a: undefined }", QUrl()); QVERIFY(c.isReady() == true); @@ -288,37 +288,37 @@ void tst_qdeclarativeengine::outputWarningsToStandardError() QCOMPARE(warnings.count(), 0); } -void tst_qdeclarativeengine::objectOwnership() +void tst_qqmlengine::objectOwnership() { { - QCOMPARE(QDeclarativeEngine::objectOwnership(0), QDeclarativeEngine::CppOwnership); - QDeclarativeEngine::setObjectOwnership(0, QDeclarativeEngine::JavaScriptOwnership); - QCOMPARE(QDeclarativeEngine::objectOwnership(0), QDeclarativeEngine::CppOwnership); + QCOMPARE(QQmlEngine::objectOwnership(0), QQmlEngine::CppOwnership); + QQmlEngine::setObjectOwnership(0, QQmlEngine::JavaScriptOwnership); + QCOMPARE(QQmlEngine::objectOwnership(0), QQmlEngine::CppOwnership); } { QObject o; - QCOMPARE(QDeclarativeEngine::objectOwnership(&o), QDeclarativeEngine::CppOwnership); - QDeclarativeEngine::setObjectOwnership(&o, QDeclarativeEngine::CppOwnership); - 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); + QCOMPARE(QQmlEngine::objectOwnership(&o), QQmlEngine::CppOwnership); + QQmlEngine::setObjectOwnership(&o, QQmlEngine::CppOwnership); + QCOMPARE(QQmlEngine::objectOwnership(&o), QQmlEngine::CppOwnership); + QQmlEngine::setObjectOwnership(&o, QQmlEngine::JavaScriptOwnership); + QCOMPARE(QQmlEngine::objectOwnership(&o), QQmlEngine::JavaScriptOwnership); + QQmlEngine::setObjectOwnership(&o, QQmlEngine::CppOwnership); + QCOMPARE(QQmlEngine::objectOwnership(&o), QQmlEngine::CppOwnership); } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine); + QQmlEngine engine; + QQmlComponent c(&engine); c.setData("import QtQuick 2.0; QtObject { property QtObject object: QtObject {} }", QUrl()); QObject *o = c.create(); QVERIFY(o != 0); - QCOMPARE(QDeclarativeEngine::objectOwnership(o), QDeclarativeEngine::CppOwnership); + QCOMPARE(QQmlEngine::objectOwnership(o), QQmlEngine::CppOwnership); QObject *o2 = qvariant_cast(o->property("object")); - QCOMPARE(QDeclarativeEngine::objectOwnership(o2), QDeclarativeEngine::JavaScriptOwnership); + QCOMPARE(QQmlEngine::objectOwnership(o2), QQmlEngine::JavaScriptOwnership); delete o; } @@ -326,20 +326,20 @@ void tst_qdeclarativeengine::objectOwnership() } // Test an object can be accessed by multiple engines -void tst_qdeclarativeengine::multipleEngines() +void tst_qqmlengine::multipleEngines() { QObject o; o.setObjectName("TestName"); // Simultaneous engines { - QDeclarativeEngine engine1; - QDeclarativeEngine engine2; + QQmlEngine engine1; + QQmlEngine engine2; engine1.rootContext()->setContextProperty("object", &o); engine2.rootContext()->setContextProperty("object", &o); - QDeclarativeExpression expr1(engine1.rootContext(), 0, QString("object.objectName")); - QDeclarativeExpression expr2(engine2.rootContext(), 0, QString("object.objectName")); + QQmlExpression expr1(engine1.rootContext(), 0, QString("object.objectName")); + QQmlExpression expr2(engine2.rootContext(), 0, QString("object.objectName")); QCOMPARE(expr1.evaluate().toString(), QString("TestName")); QCOMPARE(expr2.evaluate().toString(), QString("TestName")); @@ -347,19 +347,19 @@ void tst_qdeclarativeengine::multipleEngines() // Serial engines { - QDeclarativeEngine engine1; + QQmlEngine engine1; engine1.rootContext()->setContextProperty("object", &o); - QDeclarativeExpression expr1(engine1.rootContext(), 0, QString("object.objectName")); + QQmlExpression expr1(engine1.rootContext(), 0, QString("object.objectName")); QCOMPARE(expr1.evaluate().toString(), QString("TestName")); } { - QDeclarativeEngine engine1; + QQmlEngine engine1; engine1.rootContext()->setContextProperty("object", &o); - QDeclarativeExpression expr1(engine1.rootContext(), 0, QString("object.objectName")); + QQmlExpression expr1(engine1.rootContext(), 0, QString("object.objectName")); QCOMPARE(expr1.evaluate().toString(), QString("TestName")); } } -QTEST_MAIN(tst_qdeclarativeengine) +QTEST_MAIN(tst_qqmlengine) -#include "tst_qdeclarativeengine.moc" +#include "tst_qqmlengine.moc" diff --git a/tests/auto/declarative/qdeclarativeerror/data/test.txt b/tests/auto/qml/qqmlerror/data/test.txt similarity index 100% rename from tests/auto/declarative/qdeclarativeerror/data/test.txt rename to tests/auto/qml/qqmlerror/data/test.txt diff --git a/tests/auto/qml/qqmlerror/qqmlerror.pro b/tests/auto/qml/qqmlerror/qqmlerror.pro new file mode 100644 index 0000000000..be2b9ab24f --- /dev/null +++ b/tests/auto/qml/qqmlerror/qqmlerror.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qqmlerror +SOURCES += tst_qqmlerror.cpp + +include (../../shared/util.pri) + +macx:CONFIG -= app_bundle + +CONFIG += parallel_test + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +QT += core-private gui-private qml-private testlib diff --git a/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp b/tests/auto/qml/qqmlerror/tst_qqmlerror.cpp similarity index 85% rename from tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp rename to tests/auto/qml/qqmlerror/tst_qqmlerror.cpp index 14aaa06106..b0e9f50a17 100644 --- a/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp +++ b/tests/auto/qml/qqmlerror/tst_qqmlerror.cpp @@ -40,11 +40,11 @@ ****************************************************************************/ #include -#include +#include #include #include "../../shared/util.h" -class tst_qdeclarativeerror : public QDeclarativeDataTest +class tst_qqmlerror : public QQmlDataTest { Q_OBJECT private slots: @@ -58,9 +58,9 @@ private slots: void debug(); }; -void tst_qdeclarativeerror::url() +void tst_qqmlerror::url() { - QDeclarativeError error; + QQmlError error; QCOMPARE(error.url(), QUrl()); @@ -68,7 +68,7 @@ void tst_qdeclarativeerror::url() QCOMPARE(error.url(), QUrl("http://www.nokia.com/main.qml")); - QDeclarativeError error2 = error; + QQmlError error2 = error; QCOMPARE(error2.url(), QUrl("http://www.nokia.com/main.qml")); @@ -78,9 +78,9 @@ void tst_qdeclarativeerror::url() QCOMPARE(error2.url(), QUrl("http://www.nokia.com/main.qml")); } -void tst_qdeclarativeerror::description() +void tst_qqmlerror::description() { - QDeclarativeError error; + QQmlError error; QCOMPARE(error.description(), QString()); @@ -88,7 +88,7 @@ void tst_qdeclarativeerror::description() QCOMPARE(error.description(), QString("An Error")); - QDeclarativeError error2 = error; + QQmlError error2 = error; QCOMPARE(error2.description(), QString("An Error")); @@ -98,9 +98,9 @@ void tst_qdeclarativeerror::description() QCOMPARE(error2.description(), QString("An Error")); } -void tst_qdeclarativeerror::line() +void tst_qqmlerror::line() { - QDeclarativeError error; + QQmlError error; QCOMPARE(error.line(), -1); @@ -108,7 +108,7 @@ void tst_qdeclarativeerror::line() QCOMPARE(error.line(), 102); - QDeclarativeError error2 = error; + QQmlError error2 = error; QCOMPARE(error2.line(), 102); @@ -118,9 +118,9 @@ void tst_qdeclarativeerror::line() QCOMPARE(error2.line(), 102); } -void tst_qdeclarativeerror::column() +void tst_qqmlerror::column() { - QDeclarativeError error; + QQmlError error; QCOMPARE(error.column(), -1); @@ -128,7 +128,7 @@ void tst_qdeclarativeerror::column() QCOMPARE(error.column(), 16); - QDeclarativeError error2 = error; + QQmlError error2 = error; QCOMPARE(error2.column(), 16); @@ -138,10 +138,10 @@ void tst_qdeclarativeerror::column() QCOMPARE(error2.column(), 16); } -void tst_qdeclarativeerror::toString() +void tst_qqmlerror::toString() { { - QDeclarativeError error; + QQmlError error; error.setUrl(QUrl("http://www.nokia.com/main.qml")); error.setDescription("An Error"); error.setLine(92); @@ -151,7 +151,7 @@ void tst_qdeclarativeerror::toString() } { - QDeclarativeError error; + QQmlError error; error.setUrl(QUrl("http://www.nokia.com/main.qml")); error.setDescription("An Error"); error.setLine(92); @@ -160,16 +160,16 @@ void tst_qdeclarativeerror::toString() } } -void tst_qdeclarativeerror::copy() +void tst_qqmlerror::copy() { - QDeclarativeError error; + QQmlError error; error.setUrl(QUrl("http://www.nokia.com/main.qml")); error.setDescription("An Error"); error.setLine(92); error.setColumn(13); - QDeclarativeError error2(error); - QDeclarativeError error3; + QQmlError error2(error); + QQmlError error3; error3 = error; error.setUrl(QUrl("http://qt.nokia.com/main.qml")); @@ -194,10 +194,10 @@ void tst_qdeclarativeerror::copy() } -void tst_qdeclarativeerror::debug() +void tst_qqmlerror::debug() { { - QDeclarativeError error; + QQmlError error; error.setUrl(QUrl("http://www.nokia.com/main.qml")); error.setDescription("An Error"); error.setLine(92); @@ -209,7 +209,7 @@ void tst_qdeclarativeerror::debug() { QUrl url(dataDirectoryUrl().resolved(QUrl("test.txt"))); - QDeclarativeError error; + QQmlError error; error.setUrl(url); error.setDescription("An Error"); error.setLine(2); @@ -223,7 +223,7 @@ void tst_qdeclarativeerror::debug() { QUrl url(dataDirectoryUrl().resolved(QUrl("foo.txt"))); - QDeclarativeError error; + QQmlError error; error.setUrl(url); error.setDescription("An Error"); error.setLine(2); @@ -238,6 +238,6 @@ void tst_qdeclarativeerror::debug() -QTEST_MAIN(tst_qdeclarativeerror) +QTEST_MAIN(tst_qqmlerror) -#include "tst_qdeclarativeerror.moc" +#include "tst_qqmlerror.moc" diff --git a/tests/auto/declarative/qdeclarativeexpression/data/scriptString.qml b/tests/auto/qml/qqmlexpression/data/scriptString.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeexpression/data/scriptString.qml rename to tests/auto/qml/qqmlexpression/data/scriptString.qml diff --git a/tests/auto/qml/qqmlexpression/qqmlexpression.pro b/tests/auto/qml/qqmlexpression/qqmlexpression.pro new file mode 100644 index 0000000000..c2c1aa86e3 --- /dev/null +++ b/tests/auto/qml/qqmlexpression/qqmlexpression.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qqmlexpression +macx:CONFIG -= app_bundle + +SOURCES += tst_qqmlexpression.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private qml-private testlib diff --git a/tests/auto/declarative/qdeclarativeexpression/tst_qdeclarativeexpression.cpp b/tests/auto/qml/qqmlexpression/tst_qqmlexpression.cpp similarity index 62% rename from tests/auto/declarative/qdeclarativeexpression/tst_qdeclarativeexpression.cpp rename to tests/auto/qml/qqmlexpression/tst_qqmlexpression.cpp index 10ddf8abad..5cc6289212 100644 --- a/tests/auto/declarative/qdeclarativeexpression/tst_qdeclarativeexpression.cpp +++ b/tests/auto/qml/qqmlexpression/tst_qqmlexpression.cpp @@ -40,17 +40,17 @@ ****************************************************************************/ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "../../shared/util.h" -class tst_qdeclarativeexpression : public QDeclarativeDataTest +class tst_qqmlexpression : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativeexpression() {} + tst_qqmlexpression() {} private slots: void scriptString(); @@ -60,62 +60,62 @@ private slots: class TestObject : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeScriptString scriptString READ scriptString WRITE setScriptString) - Q_PROPERTY(QDeclarativeScriptString scriptStringError READ scriptStringError WRITE setScriptStringError) + Q_PROPERTY(QQmlScriptString scriptString READ scriptString WRITE setScriptString) + Q_PROPERTY(QQmlScriptString scriptStringError READ scriptStringError WRITE setScriptStringError) public: TestObject(QObject *parent = 0) : QObject(parent) {} - QDeclarativeScriptString scriptString() const { return m_scriptString; } - void setScriptString(QDeclarativeScriptString scriptString) { m_scriptString = scriptString; } + QQmlScriptString scriptString() const { return m_scriptString; } + void setScriptString(QQmlScriptString scriptString) { m_scriptString = scriptString; } - QDeclarativeScriptString scriptStringError() const { return m_scriptStringError; } - void setScriptStringError(QDeclarativeScriptString scriptString) { m_scriptStringError = scriptString; } + QQmlScriptString scriptStringError() const { return m_scriptStringError; } + void setScriptStringError(QQmlScriptString scriptString) { m_scriptStringError = scriptString; } private: - QDeclarativeScriptString m_scriptString; - QDeclarativeScriptString m_scriptStringError; + QQmlScriptString m_scriptString; + QQmlScriptString m_scriptStringError; }; QML_DECLARE_TYPE(TestObject) -void tst_qdeclarativeexpression::scriptString() +void tst_qqmlexpression::scriptString() { qmlRegisterType("Test", 1, 0, "TestObject"); - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("scriptString.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("scriptString.qml")); TestObject *testObj = qobject_cast(c.create()); QVERIFY(testObj != 0); - QDeclarativeScriptString script = testObj->scriptString(); + QQmlScriptString script = testObj->scriptString(); QCOMPARE(script.script(), QLatin1String("value1 + value2")); - QDeclarativeExpression expression(script); + QQmlExpression expression(script); QVariant value = expression.evaluate(); QCOMPARE(value.toInt(), 15); - QDeclarativeScriptString scriptError = testObj->scriptStringError(); + QQmlScriptString scriptError = testObj->scriptStringError(); QCOMPARE(scriptError.script(), QLatin1String("value3 * 5")); //verify that the expression has the correct error location information - QDeclarativeExpression expressionError(scriptError); + QQmlExpression expressionError(scriptError); QVariant valueError = expressionError.evaluate(); QVERIFY(!valueError.isValid()); QVERIFY(expressionError.hasError()); - QDeclarativeError error = expressionError.error(); + QQmlError error = expressionError.error(); QCOMPARE(error.url(), c.url()); QCOMPARE(error.line(), 8); } // QTBUG-21310 - crash test -void tst_qdeclarativeexpression::syntaxError() +void tst_qqmlexpression::syntaxError() { - QDeclarativeEngine engine; - QDeclarativeExpression expression(engine.rootContext(), 0, "asd asd"); + QQmlEngine engine; + QQmlExpression expression(engine.rootContext(), 0, "asd asd"); QVariant v = expression.evaluate(); QCOMPARE(v, QVariant()); } -QTEST_MAIN(tst_qdeclarativeexpression) +QTEST_MAIN(tst_qqmlexpression) -#include "tst_qdeclarativeexpression.moc" +#include "tst_qqmlexpression.moc" diff --git a/tests/auto/qml/qqmlimageprovider/qqmlimageprovider.pro b/tests/auto/qml/qqmlimageprovider/qqmlimageprovider.pro new file mode 100644 index 0000000000..9feeee15fd --- /dev/null +++ b/tests/auto/qml/qqmlimageprovider/qqmlimageprovider.pro @@ -0,0 +1,9 @@ +CONFIG += testcase +TARGET = tst_qqmlimageprovider +macx:CONFIG -= app_bundle + +SOURCES += tst_qqmlimageprovider.cpp + +CONFIG += parallel_test + +QT += core-private gui-private qml-private quick-private network testlib diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/qml/qqmlimageprovider/tst_qqmlimageprovider.cpp similarity index 83% rename from tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp rename to tests/auto/qml/qqmlimageprovider/tst_qqmlimageprovider.cpp index 14da99374b..bc53544566 100644 --- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp +++ b/tests/auto/qml/qqmlimageprovider/tst_qqmlimageprovider.cpp @@ -40,19 +40,19 @@ ****************************************************************************/ #include #include -#include -#include +#include +#include #include #include #include -Q_DECLARE_METATYPE(QDeclarativeImageProvider*); +Q_DECLARE_METATYPE(QQmlImageProvider*); -class tst_qdeclarativeimageprovider : public QObject +class tst_qqmlimageprovider : public QObject { Q_OBJECT public: - tst_qdeclarativeimageprovider() + tst_qqmlimageprovider() { } @@ -74,15 +74,15 @@ private slots: private: QString newImageFileName() const; void fillRequestTestsData(const QString &id); - void runTest(bool async, QDeclarativeImageProvider *provider); + void runTest(bool async, QQmlImageProvider *provider); }; -class TestQImageProvider : public QDeclarativeImageProvider +class TestQImageProvider : public QQmlImageProvider { public: TestQImageProvider(bool *deleteWatch = 0) - : QDeclarativeImageProvider(Image), deleteWatch(deleteWatch) + : QQmlImageProvider(Image), deleteWatch(deleteWatch) { } @@ -115,11 +115,11 @@ class TestQImageProvider : public QDeclarativeImageProvider Q_DECLARE_METATYPE(TestQImageProvider*); -class TestQPixmapProvider : public QDeclarativeImageProvider +class TestQPixmapProvider : public QQmlImageProvider { public: TestQPixmapProvider(bool *deleteWatch = 0) - : QDeclarativeImageProvider(Pixmap), deleteWatch(deleteWatch) + : QQmlImageProvider(Pixmap), deleteWatch(deleteWatch) { } @@ -152,7 +152,7 @@ class TestQPixmapProvider : public QDeclarativeImageProvider Q_DECLARE_METATYPE(TestQPixmapProvider*); -QString tst_qdeclarativeimageprovider::newImageFileName() const +QString tst_qqmlimageprovider::newImageFileName() const { // need to generate new filenames each time or else images are loaded // from cache and we won't get loading status changes when testing @@ -161,7 +161,7 @@ QString tst_qdeclarativeimageprovider::newImageFileName() const return QString("image://test/image-%1.png").arg(count++); } -void tst_qdeclarativeimageprovider::fillRequestTestsData(const QString &id) +void tst_qqmlimageprovider::fillRequestTestsData(const QString &id) { QTest::addColumn("source"); QTest::addColumn("imageId"); @@ -207,7 +207,7 @@ void tst_qdeclarativeimageprovider::fillRequestTestsData(const QString &id) << "file::2:1: QML Image: Invalid image provider: image://bogus/exists.png"; } -void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvider *provider) +void tst_qqmlimageprovider::runTest(bool async, QQmlImageProvider *provider) { QFETCH(QString, source); QFETCH(QString, imageId); @@ -218,7 +218,7 @@ void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvide if (!error.isEmpty()) QTest::ignoreMessage(QtWarningMsg, error.toUtf8()); - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImageProvider("test", provider); QVERIFY(engine.imageProvider("test") != 0); @@ -226,7 +226,7 @@ void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvide QString componentStr = "import QtQuick 2.0\nImage { source: \"" + source + "\"; " + (async ? "asynchronous: true; " : "") + properties + " }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -260,53 +260,53 @@ void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvide delete obj; } -void tst_qdeclarativeimageprovider::requestImage_sync_data() +void tst_qqmlimageprovider::requestImage_sync_data() { fillRequestTestsData("qimage|sync"); } -void tst_qdeclarativeimageprovider::requestImage_sync() +void tst_qqmlimageprovider::requestImage_sync() { bool deleteWatch = false; runTest(false, new TestQImageProvider(&deleteWatch)); QVERIFY(deleteWatch); } -void tst_qdeclarativeimageprovider::requestImage_async_data() +void tst_qqmlimageprovider::requestImage_async_data() { fillRequestTestsData("qimage|async"); } -void tst_qdeclarativeimageprovider::requestImage_async() +void tst_qqmlimageprovider::requestImage_async() { bool deleteWatch = false; runTest(true, new TestQImageProvider(&deleteWatch)); QVERIFY(deleteWatch); } -void tst_qdeclarativeimageprovider::requestPixmap_sync_data() +void tst_qqmlimageprovider::requestPixmap_sync_data() { fillRequestTestsData("qpixmap"); } -void tst_qdeclarativeimageprovider::requestPixmap_sync() +void tst_qqmlimageprovider::requestPixmap_sync() { bool deleteWatch = false; runTest(false, new TestQPixmapProvider(&deleteWatch)); QVERIFY(deleteWatch); } -void tst_qdeclarativeimageprovider::requestPixmap_async() +void tst_qqmlimageprovider::requestPixmap_async() { - QDeclarativeEngine engine; - QDeclarativeImageProvider *provider = new TestQPixmapProvider(); + QQmlEngine engine; + QQmlImageProvider *provider = new TestQPixmapProvider(); engine.addImageProvider("test", provider); QVERIFY(engine.imageProvider("test") != 0); // pixmaps are loaded synchronously regardless of 'asynchronous' value QString componentStr = "import QtQuick 2.0\nImage { asynchronous: true; source: \"image://test/pixmap-async-test.png\" }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -314,26 +314,26 @@ void tst_qdeclarativeimageprovider::requestPixmap_async() delete obj; } -void tst_qdeclarativeimageprovider::removeProvider_data() +void tst_qqmlimageprovider::removeProvider_data() { - QTest::addColumn("provider"); + QTest::addColumn("provider"); - QTest::newRow("qimage") << static_cast(new TestQImageProvider); - QTest::newRow("qpixmap") << static_cast(new TestQPixmapProvider); + QTest::newRow("qimage") << static_cast(new TestQImageProvider); + QTest::newRow("qpixmap") << static_cast(new TestQPixmapProvider); } -void tst_qdeclarativeimageprovider::removeProvider() +void tst_qqmlimageprovider::removeProvider() { - QFETCH(QDeclarativeImageProvider*, provider); + QFETCH(QQmlImageProvider*, provider); - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImageProvider("test", provider); QVERIFY(engine.imageProvider("test") != 0); // add provider, confirm it works QString componentStr = "import QtQuick 2.0\nImage { source: \"" + newImageFileName() + "\" }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -353,10 +353,10 @@ void tst_qdeclarativeimageprovider::removeProvider() delete obj; } -class TestThreadProvider : public QDeclarativeImageProvider +class TestThreadProvider : public QQmlImageProvider { public: - TestThreadProvider() : QDeclarativeImageProvider(Image), ok(false) {} + TestThreadProvider() : QQmlImageProvider(Image), ok(false) {} ~TestThreadProvider() {} @@ -384,9 +384,9 @@ class TestThreadProvider : public QDeclarativeImageProvider }; -void tst_qdeclarativeimageprovider::threadTest() +void tst_qqmlimageprovider::threadTest() { - QDeclarativeEngine engine; + QQmlEngine engine; TestThreadProvider *provider = new TestThreadProvider; @@ -399,7 +399,7 @@ void tst_qdeclarativeimageprovider::threadTest() "Image { source: \"image://test_thread/green\"; asynchronous: true; }\n" "Image { source: \"image://test_thread/yellow\"; asynchronous: true; }\n" " }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QObject *obj = component.create(); //MUST not deadlock @@ -419,6 +419,6 @@ void tst_qdeclarativeimageprovider::threadTest() } -QTEST_MAIN(tst_qdeclarativeimageprovider) +QTEST_MAIN(tst_qqmlimageprovider) -#include "tst_qdeclarativeimageprovider.moc" +#include "tst_qqmlimageprovider.moc" diff --git a/tests/auto/declarative/qdeclarativeincubator/data/AsynchronousIfNestedType.qml b/tests/auto/qml/qqmlincubator/data/AsynchronousIfNestedType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/AsynchronousIfNestedType.qml rename to tests/auto/qml/qqmlincubator/data/AsynchronousIfNestedType.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/asynchronousIfNested.1.qml b/tests/auto/qml/qqmlincubator/data/asynchronousIfNested.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/asynchronousIfNested.1.qml rename to tests/auto/qml/qqmlincubator/data/asynchronousIfNested.1.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/asynchronousIfNested.2.qml b/tests/auto/qml/qqmlincubator/data/asynchronousIfNested.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/asynchronousIfNested.2.qml rename to tests/auto/qml/qqmlincubator/data/asynchronousIfNested.2.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/asynchronousIfNested.3.qml b/tests/auto/qml/qqmlincubator/data/asynchronousIfNested.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/asynchronousIfNested.3.qml rename to tests/auto/qml/qqmlincubator/data/asynchronousIfNested.3.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/chainInCompletion.qml b/tests/auto/qml/qqmlincubator/data/chainInCompletion.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/chainInCompletion.qml rename to tests/auto/qml/qqmlincubator/data/chainInCompletion.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/chainedAsynchronousIfNested.qml b/tests/auto/qml/qqmlincubator/data/chainedAsynchronousIfNested.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/chainedAsynchronousIfNested.qml rename to tests/auto/qml/qqmlincubator/data/chainedAsynchronousIfNested.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/clear.qml b/tests/auto/qml/qqmlincubator/data/clear.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/clear.qml rename to tests/auto/qml/qqmlincubator/data/clear.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/clearDuringCompletion.qml b/tests/auto/qml/qqmlincubator/data/clearDuringCompletion.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/clearDuringCompletion.qml rename to tests/auto/qml/qqmlincubator/data/clearDuringCompletion.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/contextDelete.qml b/tests/auto/qml/qqmlincubator/data/contextDelete.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/contextDelete.qml rename to tests/auto/qml/qqmlincubator/data/contextDelete.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/forceCompletion.qml b/tests/auto/qml/qqmlincubator/data/forceCompletion.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/forceCompletion.qml rename to tests/auto/qml/qqmlincubator/data/forceCompletion.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/nestedComponent.js b/tests/auto/qml/qqmlincubator/data/nestedComponent.js similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/nestedComponent.js rename to tests/auto/qml/qqmlincubator/data/nestedComponent.js diff --git a/tests/auto/declarative/qdeclarativeincubator/data/nestedComponent.qml b/tests/auto/qml/qqmlincubator/data/nestedComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/nestedComponent.qml rename to tests/auto/qml/qqmlincubator/data/nestedComponent.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/noIncubationController.qml b/tests/auto/qml/qqmlincubator/data/noIncubationController.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/noIncubationController.qml rename to tests/auto/qml/qqmlincubator/data/noIncubationController.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/objectDeleted.errors.txt b/tests/auto/qml/qqmlincubator/data/objectDeleted.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/objectDeleted.errors.txt rename to tests/auto/qml/qqmlincubator/data/objectDeleted.errors.txt diff --git a/tests/auto/declarative/qdeclarativeincubator/data/objectDeleted.qml b/tests/auto/qml/qqmlincubator/data/objectDeleted.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/objectDeleted.qml rename to tests/auto/qml/qqmlincubator/data/objectDeleted.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/recursiveClear.1.qml b/tests/auto/qml/qqmlincubator/data/recursiveClear.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/recursiveClear.1.qml rename to tests/auto/qml/qqmlincubator/data/recursiveClear.1.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/recursiveClear.2.qml b/tests/auto/qml/qqmlincubator/data/recursiveClear.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/recursiveClear.2.qml rename to tests/auto/qml/qqmlincubator/data/recursiveClear.2.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/selfDelete.qml b/tests/auto/qml/qqmlincubator/data/selfDelete.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/selfDelete.qml rename to tests/auto/qml/qqmlincubator/data/selfDelete.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/setInitialState.qml b/tests/auto/qml/qqmlincubator/data/setInitialState.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/setInitialState.qml rename to tests/auto/qml/qqmlincubator/data/setInitialState.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/statusChanged.nested.qml b/tests/auto/qml/qqmlincubator/data/statusChanged.nested.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/statusChanged.nested.qml rename to tests/auto/qml/qqmlincubator/data/statusChanged.nested.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/data/statusChanged.qml b/tests/auto/qml/qqmlincubator/data/statusChanged.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeincubator/data/statusChanged.qml rename to tests/auto/qml/qqmlincubator/data/statusChanged.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro b/tests/auto/qml/qqmlincubator/qqmlincubator.pro similarity index 60% rename from tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro rename to tests/auto/qml/qqmlincubator/qqmlincubator.pro index 2968c8812b..956d72402c 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro +++ b/tests/auto/qml/qqmlincubator/qqmlincubator.pro @@ -1,12 +1,12 @@ CONFIG += testcase -TARGET = tst_qdeclarativevaluetypes +TARGET = tst_qqmlincubator macx:CONFIG -= app_bundle -HEADERS += testtypes.h - -SOURCES += tst_qdeclarativevaluetypes.cpp \ +SOURCES += tst_qqmlincubator.cpp \ testtypes.cpp +HEADERS += testtypes.h + include (../../shared/util.pri) testDataFiles.files = data @@ -15,4 +15,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private testlib +QT += core-private gui-private v8-private qml-private network widgets testlib diff --git a/tests/auto/declarative/qdeclarativeincubator/testtypes.cpp b/tests/auto/qml/qqmlincubator/testtypes.cpp similarity index 98% rename from tests/auto/declarative/qdeclarativeincubator/testtypes.cpp rename to tests/auto/qml/qqmlincubator/testtypes.cpp index 784c727cb7..7936fc146c 100644 --- a/tests/auto/declarative/qdeclarativeincubator/testtypes.cpp +++ b/tests/auto/qml/qqmlincubator/testtypes.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ #include "testtypes.h" -#include +#include SelfRegisteringType *SelfRegisteringType::m_me = 0; SelfRegisteringType::SelfRegisteringType() diff --git a/tests/auto/declarative/qdeclarativeincubator/testtypes.h b/tests/auto/qml/qqmlincubator/testtypes.h similarity index 91% rename from tests/auto/declarative/qdeclarativeincubator/testtypes.h rename to tests/auto/qml/qqmlincubator/testtypes.h index 3e679d3119..8ca7ee34ee 100644 --- a/tests/auto/declarative/qdeclarativeincubator/testtypes.h +++ b/tests/auto/qml/qqmlincubator/testtypes.h @@ -42,7 +42,7 @@ #define TESTTYPES_H #include -#include +#include class SelfRegisteringType : public QObject { @@ -84,10 +84,10 @@ Q_PROPERTY(int value READ value WRITE setValue) int m_v; }; -class CompletionRegisteringType : public QObject, public QDeclarativeParserStatus +class CompletionRegisteringType : public QObject, public QQmlParserStatus { Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) public: CompletionRegisteringType(); @@ -101,10 +101,10 @@ class CompletionRegisteringType : public QObject, public QDeclarativeParserStatu static CompletionRegisteringType *m_me; }; -class CompletionCallbackType : public QObject, public QDeclarativeParserStatus +class CompletionCallbackType : public QObject, public QQmlParserStatus { Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) public: CompletionCallbackType(); diff --git a/tests/auto/declarative/qdeclarativeincubator/tst_qdeclarativeincubator.cpp b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp similarity index 69% rename from tests/auto/declarative/qdeclarativeincubator/tst_qdeclarativeincubator.cpp rename to tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp index 7f68b9af95..fc54f715c9 100644 --- a/tests/auto/declarative/qdeclarativeincubator/tst_qdeclarativeincubator.cpp +++ b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp @@ -46,18 +46,18 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "../../shared/util.h" -class tst_qdeclarativeincubator : public QDeclarativeDataTest +class tst_qqmlincubator : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativeincubator() {} + tst_qqmlincubator() {} private slots: void initTestCase(); @@ -80,8 +80,8 @@ private slots: void contextDelete(); private: - QDeclarativeIncubationController controller; - QDeclarativeEngine engine; + QQmlIncubationController controller; + QQmlEngine engine; }; #define VERIFY_ERRORS(component, errorfile) \ @@ -91,16 +91,16 @@ private slots: QVERIFY(!component.isError()); \ QVERIFY(component.errors().isEmpty()); \ } else { \ - QFile file(QDeclarativeDataTest::instance()->testFile(errorfile)); \ + QFile file(QQmlDataTest::instance()->testFile(errorfile)); \ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); \ QByteArray data = file.readAll(); \ file.close(); \ QList expected = data.split('\n'); \ expected.removeAll(QByteArray("")); \ - QList errors = component.errors(); \ + QList errors = component.errors(); \ QList actual; \ for (int ii = 0; ii < errors.count(); ++ii) { \ - const QDeclarativeError &error = errors.at(ii); \ + const QQmlError &error = errors.at(ii); \ QByteArray errorStr = QByteArray::number(error.line()) + ":" + \ QByteArray::number(error.column()) + ":" + \ error.description().toUtf8(); \ @@ -111,44 +111,44 @@ private slots: QCOMPARE(expected, actual); \ } -void tst_qdeclarativeincubator::initTestCase() +void tst_qqmlincubator::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); registerTypes(); engine.setIncubationController(&controller); } -void tst_qdeclarativeincubator::incubationMode() +void tst_qqmlincubator::incubationMode() { { - QDeclarativeIncubator incubator; - QCOMPARE(incubator.incubationMode(), QDeclarativeIncubator::Asynchronous); + QQmlIncubator incubator; + QCOMPARE(incubator.incubationMode(), QQmlIncubator::Asynchronous); } { - QDeclarativeIncubator incubator(QDeclarativeIncubator::Asynchronous); - QCOMPARE(incubator.incubationMode(), QDeclarativeIncubator::Asynchronous); + QQmlIncubator incubator(QQmlIncubator::Asynchronous); + QCOMPARE(incubator.incubationMode(), QQmlIncubator::Asynchronous); } { - QDeclarativeIncubator incubator(QDeclarativeIncubator::Synchronous); - QCOMPARE(incubator.incubationMode(), QDeclarativeIncubator::Synchronous); + QQmlIncubator incubator(QQmlIncubator::Synchronous); + QCOMPARE(incubator.incubationMode(), QQmlIncubator::Synchronous); } { - QDeclarativeIncubator incubator(QDeclarativeIncubator::AsynchronousIfNested); - QCOMPARE(incubator.incubationMode(), QDeclarativeIncubator::AsynchronousIfNested); + QQmlIncubator incubator(QQmlIncubator::AsynchronousIfNested); + QCOMPARE(incubator.incubationMode(), QQmlIncubator::AsynchronousIfNested); } } -void tst_qdeclarativeincubator::objectDeleted() +void tst_qqmlincubator::objectDeleted() { SelfRegisteringType::clearMe(); - QDeclarativeComponent component(&engine, testFileUrl("objectDeleted.qml")); + QQmlComponent component(&engine, testFileUrl("objectDeleted.qml")); QVERIFY(component.isReady()); - QDeclarativeIncubator incubator; + QQmlIncubator incubator; component.create(incubator); - QCOMPARE(incubator.status(), QDeclarativeIncubator::Loading); + QCOMPARE(incubator.status(), QQmlIncubator::Loading); QVERIFY(SelfRegisteringType::me() == 0); while (SelfRegisteringType::me() == 0 && incubator.isLoading()) { @@ -171,16 +171,16 @@ void tst_qdeclarativeincubator::objectDeleted() QVERIFY(incubator.object() == 0); } -void tst_qdeclarativeincubator::clear() +void tst_qqmlincubator::clear() { SelfRegisteringType::clearMe(); - QDeclarativeComponent component(&engine, testFileUrl("clear.qml")); + QQmlComponent component(&engine, testFileUrl("clear.qml")); QVERIFY(component.isReady()); // Clear in null state { - QDeclarativeIncubator incubator; + QQmlIncubator incubator; QVERIFY(incubator.isNull()); incubator.clear(); // no effect QVERIFY(incubator.isNull()); @@ -188,7 +188,7 @@ void tst_qdeclarativeincubator::clear() // Clear in loading state { - QDeclarativeIncubator incubator; + QQmlIncubator incubator; component.create(incubator); QVERIFY(incubator.isLoading()); incubator.clear(); @@ -197,7 +197,7 @@ void tst_qdeclarativeincubator::clear() // Clear mid load { - QDeclarativeIncubator incubator; + QQmlIncubator incubator; component.create(incubator); while (SelfRegisteringType::me() == 0 && incubator.isLoading()) { @@ -216,7 +216,7 @@ void tst_qdeclarativeincubator::clear() // Clear in ready state { - QDeclarativeIncubator incubator; + QQmlIncubator incubator; component.create(incubator); { @@ -238,17 +238,17 @@ void tst_qdeclarativeincubator::clear() } } -void tst_qdeclarativeincubator::noIncubationController() +void tst_qqmlincubator::noIncubationController() { // All incubators should behave synchronously when there is no controller - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("noIncubationController.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("noIncubationController.qml")); QVERIFY(component.isReady()); { - QDeclarativeIncubator incubator(QDeclarativeIncubator::Asynchronous); + QQmlIncubator incubator(QQmlIncubator::Asynchronous); component.create(incubator); QVERIFY(incubator.isReady()); QVERIFY(incubator.object()); @@ -257,7 +257,7 @@ void tst_qdeclarativeincubator::noIncubationController() } { - QDeclarativeIncubator incubator(QDeclarativeIncubator::AsynchronousIfNested); + QQmlIncubator incubator(QQmlIncubator::AsynchronousIfNested); component.create(incubator); QVERIFY(incubator.isReady()); QVERIFY(incubator.object()); @@ -266,7 +266,7 @@ void tst_qdeclarativeincubator::noIncubationController() } { - QDeclarativeIncubator incubator(QDeclarativeIncubator::Synchronous); + QQmlIncubator incubator(QQmlIncubator::Synchronous); component.create(incubator); QVERIFY(incubator.isReady()); QVERIFY(incubator.object()); @@ -275,14 +275,14 @@ void tst_qdeclarativeincubator::noIncubationController() } } -void tst_qdeclarativeincubator::forceCompletion() +void tst_qqmlincubator::forceCompletion() { - QDeclarativeComponent component(&engine, testFileUrl("forceCompletion.qml")); + QQmlComponent component(&engine, testFileUrl("forceCompletion.qml")); QVERIFY(component.isReady()); { // forceCompletion on a null incubator does nothing - QDeclarativeIncubator incubator; + QQmlIncubator incubator; QVERIFY(incubator.isNull()); incubator.forceCompletion(); QVERIFY(incubator.isNull()); @@ -290,7 +290,7 @@ void tst_qdeclarativeincubator::forceCompletion() { // forceCompletion immediately after creating an asynchronous object completes it - QDeclarativeIncubator incubator; + QQmlIncubator incubator; QVERIFY(incubator.isNull()); component.create(incubator); QVERIFY(incubator.isLoading()); @@ -308,7 +308,7 @@ void tst_qdeclarativeincubator::forceCompletion() // forceCompletion during creation completes it SelfRegisteringType::clearMe(); - QDeclarativeIncubator incubator; + QQmlIncubator incubator; QVERIFY(incubator.isNull()); component.create(incubator); QVERIFY(incubator.isLoading()); @@ -332,7 +332,7 @@ void tst_qdeclarativeincubator::forceCompletion() { // forceCompletion on a ready incubator has no effect - QDeclarativeIncubator incubator; + QQmlIncubator incubator; QVERIFY(incubator.isNull()); component.create(incubator); QVERIFY(incubator.isLoading()); @@ -353,24 +353,24 @@ void tst_qdeclarativeincubator::forceCompletion() } } -void tst_qdeclarativeincubator::setInitialState() +void tst_qqmlincubator::setInitialState() { - QDeclarativeComponent component(&engine, testFileUrl("setInitialState.qml")); + QQmlComponent component(&engine, testFileUrl("setInitialState.qml")); QVERIFY(component.isReady()); - struct MyIncubator : public QDeclarativeIncubator + struct MyIncubator : public QQmlIncubator { - MyIncubator(QDeclarativeIncubator::IncubationMode mode) - : QDeclarativeIncubator(mode) {} + MyIncubator(QQmlIncubator::IncubationMode mode) + : QQmlIncubator(mode) {} virtual void setInitialState(QObject *o) { - QDeclarativeProperty::write(o, "test2", 19); - QDeclarativeProperty::write(o, "testData1", 201); + QQmlProperty::write(o, "test2", 19); + QQmlProperty::write(o, "testData1", 201); } }; { - MyIncubator incubator(QDeclarativeIncubator::Asynchronous); + MyIncubator incubator(QQmlIncubator::Asynchronous); component.create(incubator); QVERIFY(incubator.isLoading()); bool b = true; @@ -384,7 +384,7 @@ void tst_qdeclarativeincubator::setInitialState() } { - MyIncubator incubator(QDeclarativeIncubator::Synchronous); + MyIncubator incubator(QQmlIncubator::Synchronous); component.create(incubator); QVERIFY(incubator.isReady()); QVERIFY(incubator.object()); @@ -395,18 +395,18 @@ void tst_qdeclarativeincubator::setInitialState() } } -void tst_qdeclarativeincubator::clearDuringCompletion() +void tst_qqmlincubator::clearDuringCompletion() { CompletionRegisteringType::clearMe(); SelfRegisteringType::clearMe(); - QDeclarativeComponent component(&engine, testFileUrl("clearDuringCompletion.qml")); + QQmlComponent component(&engine, testFileUrl("clearDuringCompletion.qml")); QVERIFY(component.isReady()); - QDeclarativeIncubator incubator; + QQmlIncubator incubator; component.create(incubator); - QCOMPARE(incubator.status(), QDeclarativeIncubator::Loading); + QCOMPARE(incubator.status(), QQmlIncubator::Loading); QVERIFY(CompletionRegisteringType::me() == 0); while (CompletionRegisteringType::me() == 0 && incubator.isLoading()) { @@ -427,15 +427,15 @@ void tst_qdeclarativeincubator::clearDuringCompletion() QVERIFY(srt.isNull()); } -void tst_qdeclarativeincubator::objectDeletionAfterInit() +void tst_qqmlincubator::objectDeletionAfterInit() { - QDeclarativeComponent component(&engine, testFileUrl("clear.qml")); + QQmlComponent component(&engine, testFileUrl("clear.qml")); QVERIFY(component.isReady()); - struct MyIncubator : public QDeclarativeIncubator + struct MyIncubator : public QQmlIncubator { - MyIncubator(QDeclarativeIncubator::IncubationMode mode) - : QDeclarativeIncubator(mode), obj(0) {} + MyIncubator(QQmlIncubator::IncubationMode mode) + : QQmlIncubator(mode), obj(0) {} virtual void setInitialState(QObject *o) { obj = o; @@ -445,7 +445,7 @@ void tst_qdeclarativeincubator::objectDeletionAfterInit() }; SelfRegisteringType::clearMe(); - MyIncubator incubator(QDeclarativeIncubator::Asynchronous); + MyIncubator incubator(QQmlIncubator::Asynchronous); component.create(incubator); while (!incubator.obj && incubator.isLoading()) { @@ -468,12 +468,12 @@ class Switcher : public QObject { Q_OBJECT public: - Switcher(QDeclarativeEngine *e) : QObject(), engine(e) { } + Switcher(QQmlEngine *e) : QObject(), engine(e) { } - struct MyIncubator : public QDeclarativeIncubator + struct MyIncubator : public QQmlIncubator { - MyIncubator(QDeclarativeIncubator::IncubationMode mode, QObject *s) - : QDeclarativeIncubator(mode), switcher(s) {} + MyIncubator(QQmlIncubator::IncubationMode mode, QObject *s) + : QQmlIncubator(mode), switcher(s) {} virtual void setInitialState(QObject *o) { if (o->objectName() == "switchMe") @@ -485,37 +485,37 @@ class Switcher : public QObject void start() { - incubator = new MyIncubator(QDeclarativeIncubator::Synchronous, this); - component = new QDeclarativeComponent(engine, QDeclarativeDataTest::instance()->testFileUrl("recursiveClear.1.qml")); + incubator = new MyIncubator(QQmlIncubator::Synchronous, this); + component = new QQmlComponent(engine, QQmlDataTest::instance()->testFileUrl("recursiveClear.1.qml")); component->create(*incubator); } - QDeclarativeEngine *engine; + QQmlEngine *engine; MyIncubator *incubator; - QDeclarativeComponent *component; + QQmlComponent *component; public slots: void switchIt() { component->deleteLater(); incubator->clear(); - component = new QDeclarativeComponent(engine, QDeclarativeDataTest::instance()->testFileUrl("recursiveClear.2.qml")); + component = new QQmlComponent(engine, QQmlDataTest::instance()->testFileUrl("recursiveClear.2.qml")); component->create(*incubator); } }; -void tst_qdeclarativeincubator::recursiveClear() +void tst_qqmlincubator::recursiveClear() { Switcher switcher(&engine); switcher.start(); } -void tst_qdeclarativeincubator::statusChanged() +void tst_qqmlincubator::statusChanged() { - class MyIncubator : public QDeclarativeIncubator + class MyIncubator : public QQmlIncubator { public: - MyIncubator(QDeclarativeIncubator::IncubationMode mode = QDeclarativeIncubator::Asynchronous) - : QDeclarativeIncubator(mode) {} + MyIncubator(QQmlIncubator::IncubationMode mode = QQmlIncubator::Asynchronous) + : QQmlIncubator(mode) {} QList statuses; protected: @@ -524,28 +524,28 @@ void tst_qdeclarativeincubator::statusChanged() }; { - QDeclarativeComponent component(&engine, testFileUrl("statusChanged.qml")); + QQmlComponent component(&engine, testFileUrl("statusChanged.qml")); QVERIFY(component.isReady()); - MyIncubator incubator(QDeclarativeIncubator::Synchronous); + MyIncubator incubator(QQmlIncubator::Synchronous); component.create(incubator); QVERIFY(incubator.isReady()); QCOMPARE(incubator.statuses.count(), 3); - QCOMPARE(incubator.statuses.at(0), int(QDeclarativeIncubator::Loading)); + QCOMPARE(incubator.statuses.at(0), int(QQmlIncubator::Loading)); QCOMPARE(incubator.statuses.at(1), -1); - QCOMPARE(incubator.statuses.at(2), int(QDeclarativeIncubator::Ready)); + QCOMPARE(incubator.statuses.at(2), int(QQmlIncubator::Ready)); delete incubator.object(); } { - QDeclarativeComponent component(&engine, testFileUrl("statusChanged.qml")); + QQmlComponent component(&engine, testFileUrl("statusChanged.qml")); QVERIFY(component.isReady()); - MyIncubator incubator(QDeclarativeIncubator::Asynchronous); + MyIncubator incubator(QQmlIncubator::Asynchronous); component.create(incubator); QVERIFY(incubator.isLoading()); QCOMPARE(incubator.statuses.count(), 1); - QCOMPARE(incubator.statuses.at(0), int(QDeclarativeIncubator::Loading)); + QCOMPARE(incubator.statuses.at(0), int(QQmlIncubator::Loading)); { bool b = true; @@ -553,21 +553,21 @@ void tst_qdeclarativeincubator::statusChanged() } QCOMPARE(incubator.statuses.count(), 3); - QCOMPARE(incubator.statuses.at(0), int(QDeclarativeIncubator::Loading)); + QCOMPARE(incubator.statuses.at(0), int(QQmlIncubator::Loading)); QCOMPARE(incubator.statuses.at(1), -1); - QCOMPARE(incubator.statuses.at(2), int(QDeclarativeIncubator::Ready)); + QCOMPARE(incubator.statuses.at(2), int(QQmlIncubator::Ready)); delete incubator.object(); } { - QDeclarativeComponent component2(&engine, testFileUrl("statusChanged.nested.qml")); + QQmlComponent component2(&engine, testFileUrl("statusChanged.nested.qml")); QVERIFY(component2.isReady()); - MyIncubator incubator(QDeclarativeIncubator::Asynchronous); + MyIncubator incubator(QQmlIncubator::Asynchronous); component2.create(incubator); QVERIFY(incubator.isLoading()); QCOMPARE(incubator.statuses.count(), 1); - QCOMPARE(incubator.statuses.at(0), int(QDeclarativeIncubator::Loading)); + QCOMPARE(incubator.statuses.at(0), int(QQmlIncubator::Loading)); { bool b = true; @@ -576,25 +576,25 @@ void tst_qdeclarativeincubator::statusChanged() QVERIFY(incubator.isReady()); QCOMPARE(incubator.statuses.count(), 3); - QCOMPARE(incubator.statuses.at(0), int(QDeclarativeIncubator::Loading)); + QCOMPARE(incubator.statuses.at(0), int(QQmlIncubator::Loading)); QCOMPARE(incubator.statuses.at(1), -1); - QCOMPARE(incubator.statuses.at(2), int(QDeclarativeIncubator::Ready)); + QCOMPARE(incubator.statuses.at(2), int(QQmlIncubator::Ready)); delete incubator.object(); } } -void tst_qdeclarativeincubator::asynchronousIfNested() +void tst_qqmlincubator::asynchronousIfNested() { // Asynchronous if nested within a finalized context behaves synchronously { - QDeclarativeComponent component(&engine, testFileUrl("asynchronousIfNested.1.qml")); + QQmlComponent component(&engine, testFileUrl("asynchronousIfNested.1.qml")); QVERIFY(component.isReady()); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("a").toInt(), 10); - QDeclarativeIncubator incubator(QDeclarativeIncubator::AsynchronousIfNested); + QQmlIncubator incubator(QQmlIncubator::AsynchronousIfNested); component.create(incubator, 0, qmlContext(object)); QVERIFY(incubator.isReady()); @@ -609,10 +609,10 @@ void tst_qdeclarativeincubator::asynchronousIfNested() { SelfRegisteringType::clearMe(); - QDeclarativeComponent component(&engine, testFileUrl("asynchronousIfNested.2.qml")); + QQmlComponent component(&engine, testFileUrl("asynchronousIfNested.2.qml")); QVERIFY(component.isReady()); - QDeclarativeIncubator incubator; + QQmlIncubator incubator; component.create(incubator); QVERIFY(incubator.isLoading()); @@ -625,7 +625,7 @@ void tst_qdeclarativeincubator::asynchronousIfNested() QVERIFY(SelfRegisteringType::me() != 0); QVERIFY(incubator.isLoading()); - QDeclarativeIncubator nested(QDeclarativeIncubator::AsynchronousIfNested); + QQmlIncubator nested(QQmlIncubator::AsynchronousIfNested); component.create(nested, 0, qmlContext(SelfRegisteringType::me())); QVERIFY(nested.isLoading()); @@ -654,20 +654,20 @@ void tst_qdeclarativeincubator::asynchronousIfNested() { SelfRegisteringType::clearMe(); - QDeclarativeComponent component(&engine, testFileUrl("asynchronousIfNested.3.qml")); + QQmlComponent component(&engine, testFileUrl("asynchronousIfNested.3.qml")); QVERIFY(component.isReady()); struct CallbackData { - CallbackData(QDeclarativeEngine *e) : engine(e), pass(false) {} - QDeclarativeEngine *engine; + CallbackData(QQmlEngine *e) : engine(e), pass(false) {} + QQmlEngine *engine; bool pass; static void callback(CallbackRegisteringType *o, void *data) { CallbackData *d = (CallbackData *)data; - QDeclarativeComponent c(d->engine, QDeclarativeDataTest::instance()->testFileUrl("asynchronousIfNested.1.qml")); + QQmlComponent c(d->engine, QQmlDataTest::instance()->testFileUrl("asynchronousIfNested.1.qml")); if (!c.isReady()) return; - QDeclarativeIncubator incubator(QDeclarativeIncubator::AsynchronousIfNested); + QQmlIncubator incubator(QQmlIncubator::AsynchronousIfNested); c.create(incubator, 0, qmlContext(o)); if (!incubator.isReady()) return; @@ -681,7 +681,7 @@ void tst_qdeclarativeincubator::asynchronousIfNested() CallbackData cd(&engine); CallbackRegisteringType::registerCallback(&CallbackData::callback, &cd); - QDeclarativeIncubator incubator(QDeclarativeIncubator::AsynchronousIfNested); + QQmlIncubator incubator(QQmlIncubator::AsynchronousIfNested); component.create(incubator); QVERIFY(incubator.isReady()); @@ -691,14 +691,14 @@ void tst_qdeclarativeincubator::asynchronousIfNested() } } -void tst_qdeclarativeincubator::nestedComponent() +void tst_qqmlincubator::nestedComponent() { - QDeclarativeComponent component(&engine, testFileUrl("nestedComponent.qml")); + QQmlComponent component(&engine, testFileUrl("nestedComponent.qml")); QVERIFY(component.isReady()); QObject *object = component.create(); - QDeclarativeComponent *nested = object->property("c").value(); + QQmlComponent *nested = object->property("c").value(); QVERIFY(nested); QVERIFY(nested->isReady()); @@ -711,7 +711,7 @@ void tst_qdeclarativeincubator::nestedComponent() // Test with incubator { - QDeclarativeIncubator incubator(QDeclarativeIncubator::Synchronous); + QQmlIncubator incubator(QQmlIncubator::Synchronous); nested->create(incubator); QVERIFY(incubator.isReady()); QVERIFY(incubator.object()); @@ -724,14 +724,14 @@ void tst_qdeclarativeincubator::nestedComponent() // Checks that a new AsynchronousIfNested incubator can be correctly started in the // statusChanged() callback of another. -void tst_qdeclarativeincubator::chainedAsynchronousIfNested() +void tst_qqmlincubator::chainedAsynchronousIfNested() { SelfRegisteringType::clearMe(); - QDeclarativeComponent component(&engine, testFileUrl("chainedAsynchronousIfNested.qml")); + QQmlComponent component(&engine, testFileUrl("chainedAsynchronousIfNested.qml")); QVERIFY(component.isReady()); - QDeclarativeIncubator incubator(QDeclarativeIncubator::Asynchronous); + QQmlIncubator incubator(QQmlIncubator::Asynchronous); component.create(incubator); QVERIFY(incubator.isLoading()); @@ -745,9 +745,9 @@ void tst_qdeclarativeincubator::chainedAsynchronousIfNested() QVERIFY(SelfRegisteringType::me() != 0); QVERIFY(incubator.isLoading()); - struct MyIncubator : public QDeclarativeIncubator { - MyIncubator(MyIncubator *next, QDeclarativeComponent *component, QDeclarativeContext *ctxt) - : QDeclarativeIncubator(AsynchronousIfNested), next(next), component(component), ctxt(ctxt) {} + struct MyIncubator : public QQmlIncubator { + MyIncubator(MyIncubator *next, QQmlComponent *component, QQmlContext *ctxt) + : QQmlIncubator(AsynchronousIfNested), next(next), component(component), ctxt(ctxt) {} protected: virtual void statusChanged(Status s) { @@ -757,8 +757,8 @@ void tst_qdeclarativeincubator::chainedAsynchronousIfNested() private: MyIncubator *next; - QDeclarativeComponent *component; - QDeclarativeContext *ctxt; + QQmlComponent *component; + QQmlContext *ctxt; }; MyIncubator incubator2(0, &component, 0); @@ -808,19 +808,19 @@ void tst_qdeclarativeincubator::chainedAsynchronousIfNested() // Checks that new AsynchronousIfNested incubators can be correctly chained if started in // componentCompleted(). -void tst_qdeclarativeincubator::chainedAsynchronousIfNestedOnCompleted() +void tst_qqmlincubator::chainedAsynchronousIfNestedOnCompleted() { SelfRegisteringType::clearMe(); - QDeclarativeComponent component(&engine, testFileUrl("chainInCompletion.qml")); + QQmlComponent component(&engine, testFileUrl("chainInCompletion.qml")); QVERIFY(component.isReady()); - QDeclarativeComponent c1(&engine, testFileUrl("chainedAsynchronousIfNested.qml")); + QQmlComponent c1(&engine, testFileUrl("chainedAsynchronousIfNested.qml")); QVERIFY(c1.isReady()); - struct MyIncubator : public QDeclarativeIncubator { - MyIncubator(MyIncubator *next, QDeclarativeComponent *component, QDeclarativeContext *ctxt) - : QDeclarativeIncubator(AsynchronousIfNested), next(next), component(component), ctxt(ctxt) {} + struct MyIncubator : public QQmlIncubator { + MyIncubator(MyIncubator *next, QQmlComponent *component, QQmlContext *ctxt) + : QQmlIncubator(AsynchronousIfNested), next(next), component(component), ctxt(ctxt) {} protected: virtual void statusChanged(Status s) { @@ -831,23 +831,23 @@ void tst_qdeclarativeincubator::chainedAsynchronousIfNestedOnCompleted() private: MyIncubator *next; - QDeclarativeComponent *component; - QDeclarativeContext *ctxt; + QQmlComponent *component; + QQmlContext *ctxt; }; struct CallbackData { - CallbackData(QDeclarativeComponent *c, MyIncubator *i, QDeclarativeContext *ct) + CallbackData(QQmlComponent *c, MyIncubator *i, QQmlContext *ct) : component(c), incubator(i), ctxt(ct) {} - QDeclarativeComponent *component; + QQmlComponent *component; MyIncubator *incubator; - QDeclarativeContext *ctxt; + QQmlContext *ctxt; static void callback(CompletionCallbackType *, void *data) { CallbackData *d = (CallbackData *)data; d->component->create(*d->incubator, 0, d->ctxt); } }; - QDeclarativeIncubator incubator(QDeclarativeIncubator::Asynchronous); + QQmlIncubator incubator(QQmlIncubator::Asynchronous); component.create(incubator); QVERIFY(incubator.isLoading()); @@ -934,11 +934,11 @@ void tst_qdeclarativeincubator::chainedAsynchronousIfNestedOnCompleted() QVERIFY(incubator3.isReady()); } -void tst_qdeclarativeincubator::selfDelete() +void tst_qqmlincubator::selfDelete() { - struct MyIncubator : public QDeclarativeIncubator { + struct MyIncubator : public QQmlIncubator { MyIncubator(bool *done, Status status, IncubationMode mode) - : QDeclarativeIncubator(mode), done(done), status(status) {} + : QQmlIncubator(mode), done(done), status(status) {} protected: virtual void statusChanged(Status s) { @@ -955,7 +955,7 @@ void tst_qdeclarativeincubator::selfDelete() }; { - QDeclarativeComponent component(&engine, testFileUrl("selfDelete.qml")); + QQmlComponent component(&engine, testFileUrl("selfDelete.qml")); #define DELETE_TEST(status, mode) { \ bool done = false; \ @@ -965,10 +965,10 @@ void tst_qdeclarativeincubator::selfDelete() QVERIFY(done == true); \ } - DELETE_TEST(QDeclarativeIncubator::Loading, QDeclarativeIncubator::Synchronous); - DELETE_TEST(QDeclarativeIncubator::Ready, QDeclarativeIncubator::Synchronous); - DELETE_TEST(QDeclarativeIncubator::Loading, QDeclarativeIncubator::Asynchronous); - DELETE_TEST(QDeclarativeIncubator::Ready, QDeclarativeIncubator::Asynchronous); + DELETE_TEST(QQmlIncubator::Loading, QQmlIncubator::Synchronous); + DELETE_TEST(QQmlIncubator::Ready, QQmlIncubator::Synchronous); + DELETE_TEST(QQmlIncubator::Loading, QQmlIncubator::Asynchronous); + DELETE_TEST(QQmlIncubator::Ready, QQmlIncubator::Asynchronous); #undef DELETE_TEST } @@ -977,15 +977,15 @@ void tst_qdeclarativeincubator::selfDelete() { SelfRegisteringType::clearMe(); - QDeclarativeComponent component(&engine, testFileUrl("objectDeleted.qml")); + QQmlComponent component(&engine, testFileUrl("objectDeleted.qml")); QVERIFY(component.isReady()); bool done = false; - MyIncubator *incubator = new MyIncubator(&done, QDeclarativeIncubator::Error, - QDeclarativeIncubator::Asynchronous); + MyIncubator *incubator = new MyIncubator(&done, QQmlIncubator::Error, + QQmlIncubator::Asynchronous); component.create(*incubator); - QCOMPARE(incubator->QDeclarativeIncubator::status(), QDeclarativeIncubator::Loading); + QCOMPARE(incubator->QQmlIncubator::status(), QQmlIncubator::Loading); QVERIFY(SelfRegisteringType::me() == 0); while (SelfRegisteringType::me() == 0 && incubator->isLoading()) { @@ -1009,12 +1009,12 @@ void tst_qdeclarativeincubator::selfDelete() // Test that QML doesn't crash if the context is deleted prior to the incubator // first executing. -void tst_qdeclarativeincubator::contextDelete() +void tst_qqmlincubator::contextDelete() { - QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext()); - QDeclarativeComponent component(&engine, testFileUrl("contextDelete.qml")); + QQmlContext *context = new QQmlContext(engine.rootContext()); + QQmlComponent component(&engine, testFileUrl("contextDelete.qml")); - QDeclarativeIncubator incubator; + QQmlIncubator incubator; component.create(incubator, context); delete context; @@ -1025,6 +1025,6 @@ void tst_qdeclarativeincubator::contextDelete() } } -QTEST_MAIN(tst_qdeclarativeincubator) +QTEST_MAIN(tst_qqmlincubator) -#include "tst_qdeclarativeincubator.moc" +#include "tst_qqmlincubator.moc" diff --git a/tests/auto/declarative/qdeclarativeinfo/data/NestedComponent.qml b/tests/auto/qml/qqmlinfo/data/NestedComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeinfo/data/NestedComponent.qml rename to tests/auto/qml/qqmlinfo/data/NestedComponent.qml diff --git a/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml b/tests/auto/qml/qqmlinfo/data/NestedObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml rename to tests/auto/qml/qqmlinfo/data/NestedObject.qml diff --git a/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml b/tests/auto/qml/qqmlinfo/data/nestedQmlObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml rename to tests/auto/qml/qqmlinfo/data/nestedQmlObject.qml diff --git a/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml b/tests/auto/qml/qqmlinfo/data/qmlObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml rename to tests/auto/qml/qqmlinfo/data/qmlObject.qml diff --git a/tests/auto/qml/qqmlinfo/qqmlinfo.pro b/tests/auto/qml/qqmlinfo/qqmlinfo.pro new file mode 100644 index 0000000000..21dc2c76a6 --- /dev/null +++ b/tests/auto/qml/qqmlinfo/qqmlinfo.pro @@ -0,0 +1,14 @@ +CONFIG += testcase +TARGET = tst_qqmlinfo +macx:CONFIG -= app_bundle + +SOURCES += tst_qqmlinfo.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test +QT += core-private gui-private qml-private widgets testlib diff --git a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp b/tests/auto/qml/qqmlinfo/tst_qqmlinfo.cpp similarity index 86% rename from tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp rename to tests/auto/qml/qqmlinfo/tst_qqmlinfo.cpp index 868cd901c0..ed53cbd1aa 100644 --- a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp +++ b/tests/auto/qml/qqmlinfo/tst_qqmlinfo.cpp @@ -40,18 +40,18 @@ ****************************************************************************/ #include -#include -#include +#include +#include #include -#include -#include +#include +#include #include "../../shared/util.h" -class tst_qdeclarativeinfo : public QDeclarativeDataTest +class tst_qqmlinfo : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativeinfo() {} + tst_qqmlinfo() {} private slots: void qmlObject(); @@ -64,12 +64,12 @@ private slots: void chaining(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -void tst_qdeclarativeinfo::qmlObject() +void tst_qqmlinfo::qmlObject() { - QDeclarativeComponent component(&engine, testFileUrl("qmlObject.qml")); + QQmlComponent component(&engine, testFileUrl("qmlObject.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -86,9 +86,9 @@ void tst_qdeclarativeinfo::qmlObject() qmlInfo(nested) << "Second Test Message"; } -void tst_qdeclarativeinfo::nestedQmlObject() +void tst_qqmlinfo::nestedQmlObject() { - QDeclarativeComponent component(&engine, testFileUrl("nestedQmlObject.qml")); + QQmlComponent component(&engine, testFileUrl("nestedQmlObject.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -107,9 +107,9 @@ void tst_qdeclarativeinfo::nestedQmlObject() qmlInfo(nested2) << "Inner Object"; } -void tst_qdeclarativeinfo::nestedComponent() +void tst_qqmlinfo::nestedComponent() { - QDeclarativeComponent component(&engine, testFileUrl("NestedComponent.qml")); + QQmlComponent component(&engine, testFileUrl("NestedComponent.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -128,7 +128,7 @@ void tst_qdeclarativeinfo::nestedComponent() qmlInfo(nested2) << "Simple Object"; } -void tst_qdeclarativeinfo::nonQmlObject() +void tst_qqmlinfo::nonQmlObject() { QObject object; QTest::ignoreMessage(QtWarningMsg, ": QML QtObject: Test Message"); @@ -139,22 +139,22 @@ void tst_qdeclarativeinfo::nonQmlObject() qmlInfo(&nonQmlObject) << "Test Message"; } -void tst_qdeclarativeinfo::nullObject() +void tst_qqmlinfo::nullObject() { QTest::ignoreMessage(QtWarningMsg, ": Null Object Test Message"); qmlInfo(0) << "Null Object Test Message"; } -void tst_qdeclarativeinfo::nonQmlContextedObject() +void tst_qqmlinfo::nonQmlContextedObject() { QObject object; - QDeclarativeContext context(&engine); - QDeclarativeEngine::setContextForObject(&object, &context); + QQmlContext context(&engine); + QQmlEngine::setContextForObject(&object, &context); QTest::ignoreMessage(QtWarningMsg, ": QML QtObject: Test Message"); qmlInfo(&object) << "Test Message"; } -void tst_qdeclarativeinfo::types() +void tst_qqmlinfo::types() { QTest::ignoreMessage(QtWarningMsg, ": false"); qmlInfo(0) << false; @@ -197,7 +197,7 @@ void tst_qdeclarativeinfo::types() qmlInfo(0) << QString ("Quick"); } -void tst_qdeclarativeinfo::chaining() +void tst_qqmlinfo::chaining() { //### should more of these be automatically inserting spaces? QString str("Hello World"); @@ -216,6 +216,6 @@ void tst_qdeclarativeinfo::chaining() << QString ("Quick"); } -QTEST_MAIN(tst_qdeclarativeinfo) +QTEST_MAIN(tst_qqmlinfo) -#include "tst_qdeclarativeinfo.moc" +#include "tst_qqmlinfo.moc" diff --git a/tests/auto/qml/qqmlinstruction/qqmlinstruction.pro b/tests/auto/qml/qqmlinstruction/qqmlinstruction.pro new file mode 100644 index 0000000000..093b190bbf --- /dev/null +++ b/tests/auto/qml/qqmlinstruction/qqmlinstruction.pro @@ -0,0 +1,8 @@ +CONFIG += testcase +TARGET = tst_qqmlinstruction +SOURCES += tst_qqmlinstruction.cpp +macx:CONFIG -= app_bundle + +CONFIG += parallel_test + +QT += core-private gui-private v8-private qml-private testlib diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp similarity index 68% rename from tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp rename to tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp index 072718a95c..07b89af0a3 100644 --- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp +++ b/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp @@ -40,13 +40,13 @@ ****************************************************************************/ #include -#include +#include -class tst_qdeclarativeinstruction : public QObject +class tst_qqmlinstruction : public QObject { Q_OBJECT public: - tst_qdeclarativeinstruction() {} + tst_qqmlinstruction() {} private slots: void dump(); @@ -68,13 +68,13 @@ static void msgHandler(QtMsgType, const char *msg) messages << QLatin1String(msg); } -void tst_qdeclarativeinstruction::dump() +void tst_qqmlinstruction::dump() { - QDeclarativeEngine engine; - QDeclarativeCompiledData *data = new QDeclarativeCompiledData(&engine); + QQmlEngine engine; + QQmlCompiledData *data = new QQmlCompiledData(&engine); { - QDeclarativeCompiledData::Instruction::Init i; + QQmlCompiledData::Instruction::Init i; i.bindingsSize = 0; i.parserStatusSize = 3; i.contextCache = -1; @@ -83,11 +83,11 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::TypeReference ref; + QQmlCompiledData::TypeReference ref; ref.className = "Test"; data->types << ref; - QDeclarativeCompiledData::Instruction::CreateCppObject i; + QQmlCompiledData::Instruction::CreateCppObject i; i.type = 0; i.data = -1; i.column = 10; @@ -97,19 +97,19 @@ void tst_qdeclarativeinstruction::dump() { data->primitives << "testId"; - QDeclarativeCompiledData::Instruction::SetId i; + QQmlCompiledData::Instruction::SetId i; i.value = data->primitives.count() - 1; i.index = 0; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::SetDefault i; + QQmlCompiledData::Instruction::SetDefault i; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::CreateComponent i; + QQmlCompiledData::Instruction::CreateComponent i; i.count = 3; i.column = 4; i.endLine = 14; @@ -119,7 +119,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreMetaObject i; + QQmlCompiledData::Instruction::StoreMetaObject i; i.data = 3; i.aliasData = 6; i.propertyCache = 7; @@ -128,28 +128,28 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreFloat i; + QQmlCompiledData::Instruction::StoreFloat i; i.propertyIndex = 3; i.value = 11.3; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreDouble i; + QQmlCompiledData::Instruction::StoreDouble i; i.propertyIndex = 4; i.value = 14.8; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreInteger i; + QQmlCompiledData::Instruction::StoreInteger i; i.propertyIndex = 5; i.value = 9; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreBool i; + QQmlCompiledData::Instruction::StoreBool i; i.propertyIndex = 6; i.value = true; @@ -158,7 +158,7 @@ void tst_qdeclarativeinstruction::dump() { data->primitives << "Test String"; - QDeclarativeCompiledData::Instruction::StoreString i; + QQmlCompiledData::Instruction::StoreString i; i.propertyIndex = 7; i.value = data->primitives.count() - 1; data->addInstruction(i); @@ -166,40 +166,40 @@ void tst_qdeclarativeinstruction::dump() { data->urls << QUrl("http://www.nokia.com"); - QDeclarativeCompiledData::Instruction::StoreUrl i; + QQmlCompiledData::Instruction::StoreUrl i; i.propertyIndex = 8; i.value = data->urls.count() - 1; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreColor i; + QQmlCompiledData::Instruction::StoreColor i; i.propertyIndex = 9; i.value = 0xFF00FF00; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreDate i; + QQmlCompiledData::Instruction::StoreDate i; i.propertyIndex = 10; i.value = 9; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreTime i; + QQmlCompiledData::Instruction::StoreTime i; i.propertyIndex = 11; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreDateTime i; + QQmlCompiledData::Instruction::StoreDateTime i; i.propertyIndex = 12; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StorePoint i; + QQmlCompiledData::Instruction::StorePoint i; i.propertyIndex = 13; i.point.xp = 3; i.point.yp = 7; @@ -207,7 +207,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StorePointF i; + QQmlCompiledData::Instruction::StorePointF i; i.propertyIndex = 13; i.point.xp = 3; i.point.yp = 7; @@ -215,7 +215,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreSize i; + QQmlCompiledData::Instruction::StoreSize i; i.propertyIndex = 15; i.size.wd = 8; i.size.ht = 11; @@ -223,7 +223,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreSizeF i; + QQmlCompiledData::Instruction::StoreSizeF i; i.propertyIndex = 15; i.size.wd = 8; i.size.ht = 11; @@ -231,7 +231,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreRect i; + QQmlCompiledData::Instruction::StoreRect i; i.propertyIndex = 17; i.rect.x1 = 7; i.rect.y1 = 9; @@ -241,7 +241,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreRectF i; + QQmlCompiledData::Instruction::StoreRectF i; i.propertyIndex = 18; i.rect.xp = 11.3; i.rect.yp = 9.8; @@ -251,7 +251,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreVector3D i; + QQmlCompiledData::Instruction::StoreVector3D i; i.propertyIndex = 19; i.vector.xp = 9; i.vector.yp = 3; @@ -261,7 +261,7 @@ void tst_qdeclarativeinstruction::dump() { data->primitives << "color(1, 1, 1, 1)"; - QDeclarativeCompiledData::Instruction::StoreVariant i; + QQmlCompiledData::Instruction::StoreVariant i; i.propertyIndex = 20; i.value = data->primitives.count() - 1; @@ -269,19 +269,19 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreObject i; + QQmlCompiledData::Instruction::StoreObject i; i.propertyIndex = 21; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreVariantObject i; + QQmlCompiledData::Instruction::StoreVariantObject i; i.propertyIndex = 22; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreInterface i; + QQmlCompiledData::Instruction::StoreInterface i; i.propertyIndex = 23; data->addInstruction(i); } @@ -289,14 +289,14 @@ void tst_qdeclarativeinstruction::dump() { data->primitives << "console.log(1921)"; - QDeclarativeCompiledData::Instruction::StoreSignal i; + QQmlCompiledData::Instruction::StoreSignal i; i.signalIndex = 2; i.value = data->primitives.count() - 1; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreScriptString i; + QQmlCompiledData::Instruction::StoreScriptString i; i.propertyIndex = 24; i.value = 3; i.scope = 1; @@ -307,13 +307,13 @@ void tst_qdeclarativeinstruction::dump() { data->primitives << "mySignal"; - QDeclarativeCompiledData::Instruction::AssignSignalObject i; + QQmlCompiledData::Instruction::AssignSignalObject i; i.signal = data->primitives.count() - 1; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::AssignCustomType i; + QQmlCompiledData::Instruction::AssignCustomType i; i.propertyIndex = 25; i.primitive = 6; i.type = 9; @@ -321,7 +321,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreBinding i; + QQmlCompiledData::Instruction::StoreBinding i; i.property.coreIndex = 26; i.value = 3; i.context = 2; @@ -330,7 +330,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreV4Binding i; + QQmlCompiledData::Instruction::StoreV4Binding i; i.property = 27; i.value = 2; i.context = 4; @@ -339,7 +339,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreValueSource i; + QQmlCompiledData::Instruction::StoreValueSource i; i.property.coreIndex = 29; i.owner = 1; i.castValue = 4; @@ -347,7 +347,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreValueInterceptor i; + QQmlCompiledData::Instruction::StoreValueInterceptor i; i.property.coreIndex = 30; i.owner = 2; i.castValue = -4; @@ -355,41 +355,41 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::BeginObject i; + QQmlCompiledData::Instruction::BeginObject i; i.castValue = 4; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreObjectQList i; + QQmlCompiledData::Instruction::StoreObjectQList i; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::AssignObjectList i; + QQmlCompiledData::Instruction::AssignObjectList i; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::FetchAttached i; + QQmlCompiledData::Instruction::FetchAttached i; i.id = 23; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::FetchQList i; + QQmlCompiledData::Instruction::FetchQList i; i.property = 32; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::FetchObject i; + QQmlCompiledData::Instruction::FetchObject i; i.property = 33; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::FetchValueType i; + QQmlCompiledData::Instruction::FetchValueType i; i.property = 34; i.type = 6; i.bindingSkipList = 7; @@ -397,61 +397,61 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::PopFetchedObject i; + QQmlCompiledData::Instruction::PopFetchedObject i; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::PopQList i; + QQmlCompiledData::Instruction::PopQList i; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::PopValueType i; + QQmlCompiledData::Instruction::PopValueType i; i.property = 35; i.type = 8; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::Defer i; + QQmlCompiledData::Instruction::Defer i; i.deferCount = 7; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::Defer i; + QQmlCompiledData::Instruction::Defer i; i.deferCount = 7; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreImportedScript i; + QQmlCompiledData::Instruction::StoreImportedScript i; i.value = 2; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreVariantInteger i; + QQmlCompiledData::Instruction::StoreVariantInteger i; i.value = 11; i.propertyIndex = 32; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreVariantDouble i; + QQmlCompiledData::Instruction::StoreVariantDouble i; i.value = 33.7; i.propertyIndex = 19; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::Done i; + QQmlCompiledData::Instruction::Done i; data->addInstruction(i); } { - QDeclarativeCompiledData::Instruction::StoreTrString i; + QQmlCompiledData::Instruction::StoreTrString i; i.propertyIndex = 99; i.context = 3; i.text = 14; @@ -461,7 +461,7 @@ void tst_qdeclarativeinstruction::dump() } { - QDeclarativeCompiledData::Instruction::StoreTrIdString i; + QQmlCompiledData::Instruction::StoreTrIdString i; i.propertyIndex = 78; i.text = 7; i.n = -1; @@ -541,12 +541,12 @@ void tst_qdeclarativeinstruction::dump() data->release(); } -void tst_qdeclarativeinstruction::point() +void tst_qqmlinstruction::point() { - QCOMPARE(sizeof(QDeclarativeInstruction::instr_storePoint::QPoint), sizeof(QPoint)); - QCOMPARE(Q_ALIGNOF(QDeclarativeInstruction::instr_storePoint::QPoint), Q_ALIGNOF(QPoint)); + QCOMPARE(sizeof(QQmlInstruction::instr_storePoint::QPoint), sizeof(QPoint)); + QCOMPARE(Q_ALIGNOF(QQmlInstruction::instr_storePoint::QPoint), Q_ALIGNOF(QPoint)); - QDeclarativeInstruction i; + QQmlInstruction i; i.storePoint.point.xp = 8; i.storePoint.point.yp = 11; @@ -555,12 +555,12 @@ void tst_qdeclarativeinstruction::point() QCOMPARE(point.y(), 11); } -void tst_qdeclarativeinstruction::pointf() +void tst_qqmlinstruction::pointf() { - QCOMPARE(sizeof(QDeclarativeInstruction::instr_storePointF::QPointF), sizeof(QPointF)); - QCOMPARE(Q_ALIGNOF(QDeclarativeInstruction::instr_storePointF::QPointF), Q_ALIGNOF(QPointF)); + QCOMPARE(sizeof(QQmlInstruction::instr_storePointF::QPointF), sizeof(QPointF)); + QCOMPARE(Q_ALIGNOF(QQmlInstruction::instr_storePointF::QPointF), Q_ALIGNOF(QPointF)); - QDeclarativeInstruction i; + QQmlInstruction i; i.storePointF.point.xp = 8.7; i.storePointF.point.yp = 11.3; @@ -569,12 +569,12 @@ void tst_qdeclarativeinstruction::pointf() QCOMPARE(point.y(), 11.3); } -void tst_qdeclarativeinstruction::size() +void tst_qqmlinstruction::size() { - QCOMPARE(sizeof(QDeclarativeInstruction::instr_storeSize::QSize), sizeof(QSize)); - QCOMPARE(Q_ALIGNOF(QDeclarativeInstruction::instr_storeSize::QSize), Q_ALIGNOF(QSize)); + QCOMPARE(sizeof(QQmlInstruction::instr_storeSize::QSize), sizeof(QSize)); + QCOMPARE(Q_ALIGNOF(QQmlInstruction::instr_storeSize::QSize), Q_ALIGNOF(QSize)); - QDeclarativeInstruction i; + QQmlInstruction i; i.storeSize.size.wd = 8; i.storeSize.size.ht = 11; @@ -583,12 +583,12 @@ void tst_qdeclarativeinstruction::size() QCOMPARE(size.height(), 11); } -void tst_qdeclarativeinstruction::sizef() +void tst_qqmlinstruction::sizef() { - QCOMPARE(sizeof(QDeclarativeInstruction::instr_storeSizeF::QSizeF), sizeof(QSizeF)); - QCOMPARE(Q_ALIGNOF(QDeclarativeInstruction::instr_storeSizeF::QSizeF), Q_ALIGNOF(QSizeF)); + QCOMPARE(sizeof(QQmlInstruction::instr_storeSizeF::QSizeF), sizeof(QSizeF)); + QCOMPARE(Q_ALIGNOF(QQmlInstruction::instr_storeSizeF::QSizeF), Q_ALIGNOF(QSizeF)); - QDeclarativeInstruction i; + QQmlInstruction i; i.storeSizeF.size.wd = 8; i.storeSizeF.size.ht = 11; @@ -597,12 +597,12 @@ void tst_qdeclarativeinstruction::sizef() QCOMPARE(size.height(), (qreal)11); } -void tst_qdeclarativeinstruction::rect() +void tst_qqmlinstruction::rect() { - QCOMPARE(sizeof(QDeclarativeInstruction::instr_storeRect::QRect), sizeof(QRect)); - QCOMPARE(Q_ALIGNOF(QDeclarativeInstruction::instr_storeRect::QRect), Q_ALIGNOF(QRect)); + QCOMPARE(sizeof(QQmlInstruction::instr_storeRect::QRect), sizeof(QRect)); + QCOMPARE(Q_ALIGNOF(QQmlInstruction::instr_storeRect::QRect), Q_ALIGNOF(QRect)); - QDeclarativeInstruction i; + QQmlInstruction i; i.storeRect.rect.x1 = 8; i.storeRect.rect.y1 = 11; i.storeRect.rect.x2 = 13; @@ -615,12 +615,12 @@ void tst_qdeclarativeinstruction::rect() QCOMPARE(rect.bottom(), 19); } -void tst_qdeclarativeinstruction::rectf() +void tst_qqmlinstruction::rectf() { - QCOMPARE(sizeof(QDeclarativeInstruction::instr_storeRectF::QRectF), sizeof(QRectF)); - QCOMPARE(Q_ALIGNOF(QDeclarativeInstruction::instr_storeRectF::QRectF), Q_ALIGNOF(QRectF)); + QCOMPARE(sizeof(QQmlInstruction::instr_storeRectF::QRectF), sizeof(QRectF)); + QCOMPARE(Q_ALIGNOF(QQmlInstruction::instr_storeRectF::QRectF), Q_ALIGNOF(QRectF)); - QDeclarativeInstruction i; + QQmlInstruction i; i.storeRectF.rect.xp = 8; i.storeRectF.rect.yp = 11; i.storeRectF.rect.w = 13; @@ -633,12 +633,12 @@ void tst_qdeclarativeinstruction::rectf() QCOMPARE(rect.height(), (qreal)19); } -void tst_qdeclarativeinstruction::vector3d() +void tst_qqmlinstruction::vector3d() { - QCOMPARE(sizeof(QDeclarativeInstruction::instr_storeVector3D::QVector3D), sizeof(QVector3D)); - QCOMPARE(Q_ALIGNOF(QDeclarativeInstruction::instr_storeVector3D::QVector3D), Q_ALIGNOF(QVector3D)); + QCOMPARE(sizeof(QQmlInstruction::instr_storeVector3D::QVector3D), sizeof(QVector3D)); + QCOMPARE(Q_ALIGNOF(QQmlInstruction::instr_storeVector3D::QVector3D), Q_ALIGNOF(QVector3D)); - QDeclarativeInstruction i; + QQmlInstruction i; i.storeVector3D.vector.xp = 8.2; i.storeVector3D.vector.yp = 99.3; i.storeVector3D.vector.zp = 12.0; @@ -649,12 +649,12 @@ void tst_qdeclarativeinstruction::vector3d() QCOMPARE(vector.z(), (qreal)(float)12.0); } -void tst_qdeclarativeinstruction::vector4d() +void tst_qqmlinstruction::vector4d() { - QCOMPARE(sizeof(QDeclarativeInstruction::instr_storeVector4D::QVector4D), sizeof(QVector4D)); - QCOMPARE(Q_ALIGNOF(QDeclarativeInstruction::instr_storeVector4D::QVector4D), Q_ALIGNOF(QVector4D)); + QCOMPARE(sizeof(QQmlInstruction::instr_storeVector4D::QVector4D), sizeof(QVector4D)); + QCOMPARE(Q_ALIGNOF(QQmlInstruction::instr_storeVector4D::QVector4D), Q_ALIGNOF(QVector4D)); - QDeclarativeInstruction i; + QQmlInstruction i; i.storeVector4D.vector.xp = 8.2; i.storeVector4D.vector.yp = 99.3; i.storeVector4D.vector.zp = 12.0; @@ -667,12 +667,12 @@ void tst_qdeclarativeinstruction::vector4d() QCOMPARE(vector.w(), (qreal)(float)121.1); } -void tst_qdeclarativeinstruction::time() +void tst_qqmlinstruction::time() { - QCOMPARE(sizeof(QDeclarativeInstruction::instr_storeTime::QTime), sizeof(QTime)); - QCOMPARE(Q_ALIGNOF(QDeclarativeInstruction::instr_storeTime::QTime), Q_ALIGNOF(QTime)); + QCOMPARE(sizeof(QQmlInstruction::instr_storeTime::QTime), sizeof(QTime)); + QCOMPARE(Q_ALIGNOF(QQmlInstruction::instr_storeTime::QTime), Q_ALIGNOF(QTime)); } -QTEST_MAIN(tst_qdeclarativeinstruction) +QTEST_MAIN(tst_qqmlinstruction) -#include "tst_qdeclarativeinstruction.moc" +#include "tst_qqmlinstruction.moc" diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml b/tests/auto/qml/qqmllanguage/data/Alias.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/Alias.qml rename to tests/auto/qml/qqmllanguage/data/Alias.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml b/tests/auto/qml/qqmllanguage/data/Alias2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml rename to tests/auto/qml/qqmllanguage/data/Alias2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml b/tests/auto/qml/qqmllanguage/data/Alias3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml rename to tests/auto/qml/qqmllanguage/data/Alias3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml b/tests/auto/qml/qqmllanguage/data/Alias4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml rename to tests/auto/qml/qqmllanguage/data/Alias4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/AliasPropertyChangeSignalsType.qml b/tests/auto/qml/qqmllanguage/data/AliasPropertyChangeSignalsType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/AliasPropertyChangeSignalsType.qml rename to tests/auto/qml/qqmllanguage/data/AliasPropertyChangeSignalsType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml b/tests/auto/qml/qqmllanguage/data/ComponentComposite.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml rename to tests/auto/qml/qqmllanguage/data/ComponentComposite.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml b/tests/auto/qml/qqmllanguage/data/CompositeType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml rename to tests/auto/qml/qqmllanguage/data/CompositeType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType2.qml b/tests/auto/qml/qqmllanguage/data/CompositeType2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/CompositeType2.qml rename to tests/auto/qml/qqmllanguage/data/CompositeType2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml b/tests/auto/qml/qqmllanguage/data/CompositeType3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml rename to tests/auto/qml/qqmllanguage/data/CompositeType3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType4.qml b/tests/auto/qml/qqmllanguage/data/CompositeType4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/CompositeType4.qml rename to tests/auto/qml/qqmllanguage/data/CompositeType4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/DontDoubleCallClassBeginItem.qml b/tests/auto/qml/qqmllanguage/data/DontDoubleCallClassBeginItem.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/DontDoubleCallClassBeginItem.qml rename to tests/auto/qml/qqmllanguage/data/DontDoubleCallClassBeginItem.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml b/tests/auto/qml/qqmllanguage/data/DynamicPropertiesNestedType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml rename to tests/auto/qml/qqmllanguage/data/DynamicPropertiesNestedType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml b/tests/auto/qml/qqmllanguage/data/HelperAlias.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml rename to tests/auto/qml/qqmllanguage/data/HelperAlias.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/I18n.qml b/tests/auto/qml/qqmllanguage/data/I18n.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/I18n.qml rename to tests/auto/qml/qqmllanguage/data/I18n.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/I18nType30.qml b/tests/auto/qml/qqmllanguage/data/I18nType30.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/I18nType30.qml rename to tests/auto/qml/qqmllanguage/data/I18nType30.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/InlineAssignmentsOverrideBindingsType.qml b/tests/auto/qml/qqmllanguage/data/InlineAssignmentsOverrideBindingsType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/InlineAssignmentsOverrideBindingsType.qml rename to tests/auto/qml/qqmllanguage/data/InlineAssignmentsOverrideBindingsType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/InlineAssignmentsOverrideBindingsType2.qml b/tests/auto/qml/qqmllanguage/data/InlineAssignmentsOverrideBindingsType2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/InlineAssignmentsOverrideBindingsType2.qml rename to tests/auto/qml/qqmllanguage/data/InlineAssignmentsOverrideBindingsType2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/LocalLast.qml b/tests/auto/qml/qqmllanguage/data/LocalLast.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/LocalLast.qml rename to tests/auto/qml/qqmllanguage/data/LocalLast.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/MyComponent.qml b/tests/auto/qml/qqmllanguage/data/MyComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/MyComponent.qml rename to tests/auto/qml/qqmllanguage/data/MyComponent.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/MyCompositeValueSource.qml b/tests/auto/qml/qqmllanguage/data/MyCompositeValueSource.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/MyCompositeValueSource.qml rename to tests/auto/qml/qqmllanguage/data/MyCompositeValueSource.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/MyContainerComponent.qml b/tests/auto/qml/qqmllanguage/data/MyContainerComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/MyContainerComponent.qml rename to tests/auto/qml/qqmllanguage/data/MyContainerComponent.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml b/tests/auto/qml/qqmllanguage/data/NestedAlias.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml rename to tests/auto/qml/qqmllanguage/data/NestedAlias.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/NestedComponentRoot.qml b/tests/auto/qml/qqmllanguage/data/NestedComponentRoot.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/NestedComponentRoot.qml rename to tests/auto/qml/qqmllanguage/data/NestedComponentRoot.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml b/tests/auto/qml/qqmllanguage/data/NestedErrorsType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml rename to tests/auto/qml/qqmllanguage/data/NestedErrorsType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml b/tests/auto/qml/qqmllanguage/data/OnCompletedType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml rename to tests/auto/qml/qqmllanguage/data/OnCompletedType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml b/tests/auto/qml/qqmllanguage/data/OnDestructionType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml rename to tests/auto/qml/qqmllanguage/data/OnDestructionType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/ReadOnlyType.qml b/tests/auto/qml/qqmllanguage/data/ReadOnlyType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/ReadOnlyType.qml rename to tests/auto/qml/qqmllanguage/data/ReadOnlyType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml b/tests/auto/qml/qqmllanguage/data/alias.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml rename to tests/auto/qml/qqmllanguage/data/alias.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.10.qml b/tests/auto/qml/qqmllanguage/data/alias.10.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/alias.10.qml rename to tests/auto/qml/qqmllanguage/data/alias.10.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.11.qml b/tests/auto/qml/qqmllanguage/data/alias.11.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/alias.11.qml rename to tests/auto/qml/qqmllanguage/data/alias.11.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.2.qml b/tests/auto/qml/qqmllanguage/data/alias.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/alias.2.qml rename to tests/auto/qml/qqmllanguage/data/alias.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml b/tests/auto/qml/qqmllanguage/data/alias.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml rename to tests/auto/qml/qqmllanguage/data/alias.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.4.qml b/tests/auto/qml/qqmllanguage/data/alias.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/alias.4.qml rename to tests/auto/qml/qqmllanguage/data/alias.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml b/tests/auto/qml/qqmllanguage/data/alias.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml rename to tests/auto/qml/qqmllanguage/data/alias.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml b/tests/auto/qml/qqmllanguage/data/alias.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml rename to tests/auto/qml/qqmllanguage/data/alias.6.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml b/tests/auto/qml/qqmllanguage/data/alias.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml rename to tests/auto/qml/qqmllanguage/data/alias.7.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml b/tests/auto/qml/qqmllanguage/data/alias.8.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml rename to tests/auto/qml/qqmllanguage/data/alias.8.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml b/tests/auto/qml/qqmllanguage/data/alias.9.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml rename to tests/auto/qml/qqmllanguage/data/alias.9.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertiesAndSignals.qml b/tests/auto/qml/qqmllanguage/data/aliasPropertiesAndSignals.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/aliasPropertiesAndSignals.qml rename to tests/auto/qml/qqmllanguage/data/aliasPropertiesAndSignals.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.2.qml b/tests/auto/qml/qqmllanguage/data/aliasPropertyChangeSignals.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.2.qml rename to tests/auto/qml/qqmllanguage/data/aliasPropertyChangeSignals.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.qml b/tests/auto/qml/qqmllanguage/data/aliasPropertyChangeSignals.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.qml rename to tests/auto/qml/qqmllanguage/data/aliasPropertyChangeSignals.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/allowedRevisionOverloads.qml b/tests/auto/qml/qqmllanguage/data/allowedRevisionOverloads.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/allowedRevisionOverloads.qml rename to tests/auto/qml/qqmllanguage/data/allowedRevisionOverloads.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignBasicTypes.qml b/tests/auto/qml/qqmllanguage/data/assignBasicTypes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignBasicTypes.qml rename to tests/auto/qml/qqmllanguage/data/assignBasicTypes.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml b/tests/auto/qml/qqmllanguage/data/assignCompositeToType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml rename to tests/auto/qml/qqmllanguage/data/assignCompositeToType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralSignalProperty.qml b/tests/auto/qml/qqmllanguage/data/assignLiteralSignalProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignLiteralSignalProperty.qml rename to tests/auto/qml/qqmllanguage/data/assignLiteralSignalProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVar.qml b/tests/auto/qml/qqmllanguage/data/assignLiteralToVar.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVar.qml rename to tests/auto/qml/qqmllanguage/data/assignLiteralToVar.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml b/tests/auto/qml/qqmllanguage/data/assignLiteralToVariant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml rename to tests/auto/qml/qqmllanguage/data/assignLiteralToVariant.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToSignal.qml b/tests/auto/qml/qqmllanguage/data/assignObjectToSignal.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignObjectToSignal.qml rename to tests/auto/qml/qqmllanguage/data/assignObjectToSignal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml b/tests/auto/qml/qqmllanguage/data/assignObjectToVariant.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml rename to tests/auto/qml/qqmllanguage/data/assignObjectToVariant.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignQmlComponent.qml b/tests/auto/qml/qqmllanguage/data/assignQmlComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignQmlComponent.qml rename to tests/auto/qml/qqmllanguage/data/assignQmlComponent.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignSignal.qml b/tests/auto/qml/qqmllanguage/data/assignSignal.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignSignal.qml rename to tests/auto/qml/qqmllanguage/data/assignSignal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.errors.txt b/tests/auto/qml/qqmllanguage/data/assignToNamespace.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.errors.txt rename to tests/auto/qml/qqmllanguage/data/assignToNamespace.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.qml b/tests/auto/qml/qqmllanguage/data/assignToNamespace.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.qml rename to tests/auto/qml/qqmllanguage/data/assignToNamespace.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignTypeExtremes.qml b/tests/auto/qml/qqmllanguage/data/assignTypeExtremes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignTypeExtremes.qml rename to tests/auto/qml/qqmllanguage/data/assignTypeExtremes.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.errors.txt b/tests/auto/qml/qqmllanguage/data/assignValueToSignal.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.errors.txt rename to tests/auto/qml/qqmllanguage/data/assignValueToSignal.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.qml b/tests/auto/qml/qqmllanguage/data/assignValueToSignal.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.qml rename to tests/auto/qml/qqmllanguage/data/assignValueToSignal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml b/tests/auto/qml/qqmllanguage/data/attachedProperties.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml rename to tests/auto/qml/qqmllanguage/data/attachedProperties.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/autoComponentCreation.qml b/tests/auto/qml/qqmllanguage/data/autoComponentCreation.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/autoComponentCreation.qml rename to tests/auto/qml/qqmllanguage/data/autoComponentCreation.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/autoNotifyConnection.qml b/tests/auto/qml/qqmllanguage/data/autoNotifyConnection.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/autoNotifyConnection.qml rename to tests/auto/qml/qqmllanguage/data/autoNotifyConnection.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.1.errors.txt b/tests/auto/qml/qqmllanguage/data/component.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/component.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml b/tests/auto/qml/qqmllanguage/data/component.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.1.qml rename to tests/auto/qml/qqmllanguage/data/component.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.2.errors.txt b/tests/auto/qml/qqmllanguage/data/component.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/component.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml b/tests/auto/qml/qqmllanguage/data/component.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.2.qml rename to tests/auto/qml/qqmllanguage/data/component.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.3.errors.txt b/tests/auto/qml/qqmllanguage/data/component.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/component.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml b/tests/auto/qml/qqmllanguage/data/component.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.3.qml rename to tests/auto/qml/qqmllanguage/data/component.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.4.errors.txt b/tests/auto/qml/qqmllanguage/data/component.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/component.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml b/tests/auto/qml/qqmllanguage/data/component.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.4.qml rename to tests/auto/qml/qqmllanguage/data/component.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.5.errors.txt b/tests/auto/qml/qqmllanguage/data/component.5.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.5.errors.txt rename to tests/auto/qml/qqmllanguage/data/component.5.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml b/tests/auto/qml/qqmllanguage/data/component.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.5.qml rename to tests/auto/qml/qqmllanguage/data/component.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.6.errors.txt b/tests/auto/qml/qqmllanguage/data/component.6.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.6.errors.txt rename to tests/auto/qml/qqmllanguage/data/component.6.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml b/tests/auto/qml/qqmllanguage/data/component.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.6.qml rename to tests/auto/qml/qqmllanguage/data/component.6.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.7.errors.txt b/tests/auto/qml/qqmllanguage/data/component.7.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.7.errors.txt rename to tests/auto/qml/qqmllanguage/data/component.7.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.7.qml b/tests/auto/qml/qqmllanguage/data/component.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.7.qml rename to tests/auto/qml/qqmllanguage/data/component.7.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.8.errors.txt b/tests/auto/qml/qqmllanguage/data/component.8.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.8.errors.txt rename to tests/auto/qml/qqmllanguage/data/component.8.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.8.qml b/tests/auto/qml/qqmllanguage/data/component.8.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.8.qml rename to tests/auto/qml/qqmllanguage/data/component.8.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.9.errors.txt b/tests/auto/qml/qqmllanguage/data/component.9.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.9.errors.txt rename to tests/auto/qml/qqmllanguage/data/component.9.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.9.qml b/tests/auto/qml/qqmllanguage/data/component.9.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/component.9.qml rename to tests/auto/qml/qqmllanguage/data/component.9.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml b/tests/auto/qml/qqmllanguage/data/componentCompositeType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml rename to tests/auto/qml/qqmllanguage/data/componentCompositeType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.2.qml b/tests/auto/qml/qqmllanguage/data/cppnamespace.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.2.qml rename to tests/auto/qml/qqmllanguage/data/cppnamespace.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.qml b/tests/auto/qml/qqmllanguage/data/cppnamespace.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.qml rename to tests/auto/qml/qqmllanguage/data/cppnamespace.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml b/tests/auto/qml/qqmllanguage/data/crash2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/crash2.qml rename to tests/auto/qml/qqmllanguage/data/crash2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml b/tests/auto/qml/qqmllanguage/data/customOnProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml rename to tests/auto/qml/qqmllanguage/data/customOnProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.errors.txt b/tests/auto/qml/qqmllanguage/data/customParserIdNotAllowed.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.errors.txt rename to tests/auto/qml/qqmllanguage/data/customParserIdNotAllowed.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml b/tests/auto/qml/qqmllanguage/data/customParserIdNotAllowed.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml rename to tests/auto/qml/qqmllanguage/data/customParserIdNotAllowed.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml b/tests/auto/qml/qqmllanguage/data/customParserTypes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml rename to tests/auto/qml/qqmllanguage/data/customParserTypes.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customVariantTypes.qml b/tests/auto/qml/qqmllanguage/data/customVariantTypes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/customVariantTypes.qml rename to tests/auto/qml/qqmllanguage/data/customVariantTypes.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml b/tests/auto/qml/qqmllanguage/data/declaredPropertyValues.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml rename to tests/auto/qml/qqmllanguage/data/declaredPropertyValues.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.errors.txt b/tests/auto/qml/qqmllanguage/data/defaultGrouped.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.errors.txt rename to tests/auto/qml/qqmllanguage/data/defaultGrouped.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml b/tests/auto/qml/qqmllanguage/data/defaultGrouped.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml rename to tests/auto/qml/qqmllanguage/data/defaultGrouped.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml b/tests/auto/qml/qqmllanguage/data/defaultPropertyListOrder.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml rename to tests/auto/qml/qqmllanguage/data/defaultPropertyListOrder.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.errors.txt b/tests/auto/qml/qqmllanguage/data/destroyedSignal.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.errors.txt rename to tests/auto/qml/qqmllanguage/data/destroyedSignal.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml b/tests/auto/qml/qqmllanguage/data/destroyedSignal.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml rename to tests/auto/qml/qqmllanguage/data/destroyedSignal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.errors.txt b/tests/auto/qml/qqmllanguage/data/disallowedRevisionOverloads.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.errors.txt rename to tests/auto/qml/qqmllanguage/data/disallowedRevisionOverloads.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.qml b/tests/auto/qml/qqmllanguage/data/disallowedRevisionOverloads.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.qml rename to tests/auto/qml/qqmllanguage/data/disallowedRevisionOverloads.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dontDoubleCallClassBegin.qml b/tests/auto/qml/qqmllanguage/data/dontDoubleCallClassBegin.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dontDoubleCallClassBegin.qml rename to tests/auto/qml/qqmllanguage/data/dontDoubleCallClassBegin.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.errors.txt b/tests/auto/qml/qqmllanguage/data/doubleSignal.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.errors.txt rename to tests/auto/qml/qqmllanguage/data/doubleSignal.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.qml b/tests/auto/qml/qqmllanguage/data/doubleSignal.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.qml rename to tests/auto/qml/qqmllanguage/data/doubleSignal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.errors.txt b/tests/auto/qml/qqmllanguage/data/duplicateIDs.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.errors.txt rename to tests/auto/qml/qqmllanguage/data/duplicateIDs.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.qml b/tests/auto/qml/qqmllanguage/data/duplicateIDs.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.qml rename to tests/auto/qml/qqmllanguage/data/duplicateIDs.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.errors.txt b/tests/auto/qml/qqmllanguage/data/dynamicMeta.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/dynamicMeta.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.qml b/tests/auto/qml/qqmllanguage/data/dynamicMeta.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.qml rename to tests/auto/qml/qqmllanguage/data/dynamicMeta.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.errors.txt b/tests/auto/qml/qqmllanguage/data/dynamicMeta.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/dynamicMeta.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.qml b/tests/auto/qml/qqmllanguage/data/dynamicMeta.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.qml rename to tests/auto/qml/qqmllanguage/data/dynamicMeta.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.errors.txt b/tests/auto/qml/qqmllanguage/data/dynamicMeta.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/dynamicMeta.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.qml b/tests/auto/qml/qqmllanguage/data/dynamicMeta.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.qml rename to tests/auto/qml/qqmllanguage/data/dynamicMeta.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.errors.txt b/tests/auto/qml/qqmllanguage/data/dynamicMeta.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/dynamicMeta.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.qml b/tests/auto/qml/qqmllanguage/data/dynamicMeta.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.qml rename to tests/auto/qml/qqmllanguage/data/dynamicMeta.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.errors.txt b/tests/auto/qml/qqmllanguage/data/dynamicMeta.5.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.errors.txt rename to tests/auto/qml/qqmllanguage/data/dynamicMeta.5.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.qml b/tests/auto/qml/qqmllanguage/data/dynamicMeta.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.qml rename to tests/auto/qml/qqmllanguage/data/dynamicMeta.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml b/tests/auto/qml/qqmllanguage/data/dynamicObject.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml rename to tests/auto/qml/qqmllanguage/data/dynamicObject.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml b/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml rename to tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml b/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml rename to tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml b/tests/auto/qml/qqmllanguage/data/dynamicProperties.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml rename to tests/auto/qml/qqmllanguage/data/dynamicProperties.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml b/tests/auto/qml/qqmllanguage/data/dynamicPropertiesNested.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml rename to tests/auto/qml/qqmllanguage/data/dynamicPropertiesNested.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml b/tests/auto/qml/qqmllanguage/data/dynamicSignalsAndSlots.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml rename to tests/auto/qml/qqmllanguage/data/dynamicSignalsAndSlots.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/empty.errors.txt b/tests/auto/qml/qqmllanguage/data/empty.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/empty.errors.txt rename to tests/auto/qml/qqmllanguage/data/empty.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/empty.qml b/tests/auto/qml/qqmllanguage/data/empty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/empty.qml rename to tests/auto/qml/qqmllanguage/data/empty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.errors.txt b/tests/auto/qml/qqmllanguage/data/emptySignal.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/emptySignal.errors.txt rename to tests/auto/qml/qqmllanguage/data/emptySignal.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml b/tests/auto/qml/qqmllanguage/data/emptySignal.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml rename to tests/auto/qml/qqmllanguage/data/emptySignal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.errors.txt b/tests/auto/qml/qqmllanguage/data/enumTypes.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/enumTypes.errors.txt rename to tests/auto/qml/qqmllanguage/data/enumTypes.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml b/tests/auto/qml/qqmllanguage/data/enumTypes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml rename to tests/auto/qml/qqmllanguage/data/enumTypes.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/failingComponent.errors.txt b/tests/auto/qml/qqmllanguage/data/failingComponent.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/failingComponent.errors.txt rename to tests/auto/qml/qqmllanguage/data/failingComponent.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/failingComponentTest.qml b/tests/auto/qml/qqmllanguage/data/failingComponentTest.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/failingComponentTest.qml rename to tests/auto/qml/qqmllanguage/data/failingComponentTest.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/fakeDotProperty.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.errors.txt rename to tests/auto/qml/qqmllanguage/data/fakeDotProperty.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.qml b/tests/auto/qml/qqmllanguage/data/fakeDotProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.qml rename to tests/auto/qml/qqmllanguage/data/fakeDotProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/finalOverride.errors.txt b/tests/auto/qml/qqmllanguage/data/finalOverride.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/finalOverride.errors.txt rename to tests/auto/qml/qqmllanguage/data/finalOverride.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/finalOverride.qml b/tests/auto/qml/qqmllanguage/data/finalOverride.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/finalOverride.qml rename to tests/auto/qml/qqmllanguage/data/finalOverride.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyNames.qml b/tests/auto/qml/qqmllanguage/data/i18nDeclaredPropertyNames.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyNames.qml rename to tests/auto/qml/qqmllanguage/data/i18nDeclaredPropertyNames.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyUse.qml b/tests/auto/qml/qqmllanguage/data/i18nDeclaredPropertyUse.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyUse.qml rename to tests/auto/qml/qqmllanguage/data/i18nDeclaredPropertyUse.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nNameSpace.qml b/tests/auto/qml/qqmllanguage/data/i18nNameSpace.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/i18nNameSpace.qml rename to tests/auto/qml/qqmllanguage/data/i18nNameSpace.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nScript.qml b/tests/auto/qml/qqmllanguage/data/i18nScript.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/i18nScript.qml rename to tests/auto/qml/qqmllanguage/data/i18nScript.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nStrings.qml b/tests/auto/qml/qqmllanguage/data/i18nStrings.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/i18nStrings.qml rename to tests/auto/qml/qqmllanguage/data/i18nStrings.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nType.qml b/tests/auto/qml/qqmllanguage/data/i18nType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/i18nType.qml rename to tests/auto/qml/qqmllanguage/data/i18nType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/idProperty.qml b/tests/auto/qml/qqmllanguage/data/idProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/idProperty.qml rename to tests/auto/qml/qqmllanguage/data/idProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importFile.errors.txt b/tests/auto/qml/qqmllanguage/data/importFile.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importFile.errors.txt rename to tests/auto/qml/qqmllanguage/data/importFile.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importFile.qml b/tests/auto/qml/qqmllanguage/data/importFile.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importFile.qml rename to tests/auto/qml/qqmllanguage/data/importFile.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importIncorrectCase.qml b/tests/auto/qml/qqmllanguage/data/importIncorrectCase.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importIncorrectCase.qml rename to tests/auto/qml/qqmllanguage/data/importIncorrectCase.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.1.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/importJs.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.1.qml b/tests/auto/qml/qqmllanguage/data/importJs.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.1.qml rename to tests/auto/qml/qqmllanguage/data/importJs.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.10.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.10.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.10.errors.txt rename to tests/auto/qml/qqmllanguage/data/importJs.10.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.10.qml b/tests/auto/qml/qqmllanguage/data/importJs.10.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.10.qml rename to tests/auto/qml/qqmllanguage/data/importJs.10.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.2.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/importJs.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.2.qml b/tests/auto/qml/qqmllanguage/data/importJs.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.2.qml rename to tests/auto/qml/qqmllanguage/data/importJs.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.3.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/importJs.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.3.qml b/tests/auto/qml/qqmllanguage/data/importJs.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.3.qml rename to tests/auto/qml/qqmllanguage/data/importJs.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.4.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/importJs.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.4.qml b/tests/auto/qml/qqmllanguage/data/importJs.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.4.qml rename to tests/auto/qml/qqmllanguage/data/importJs.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.5.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.5.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.5.errors.txt rename to tests/auto/qml/qqmllanguage/data/importJs.5.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.5.qml b/tests/auto/qml/qqmllanguage/data/importJs.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.5.qml rename to tests/auto/qml/qqmllanguage/data/importJs.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.6.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.6.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.6.errors.txt rename to tests/auto/qml/qqmllanguage/data/importJs.6.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.6.qml b/tests/auto/qml/qqmllanguage/data/importJs.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.6.qml rename to tests/auto/qml/qqmllanguage/data/importJs.6.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.7.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.7.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.7.errors.txt rename to tests/auto/qml/qqmllanguage/data/importJs.7.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.7.qml b/tests/auto/qml/qqmllanguage/data/importJs.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.7.qml rename to tests/auto/qml/qqmllanguage/data/importJs.7.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.8.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.8.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.8.errors.txt rename to tests/auto/qml/qqmllanguage/data/importJs.8.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.8.qml b/tests/auto/qml/qqmllanguage/data/importJs.8.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.8.qml rename to tests/auto/qml/qqmllanguage/data/importJs.8.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.9.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.9.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.9.errors.txt rename to tests/auto/qml/qqmllanguage/data/importJs.9.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.9.qml b/tests/auto/qml/qqmllanguage/data/importJs.9.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importJs.9.qml rename to tests/auto/qml/qqmllanguage/data/importJs.9.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.errors.txt b/tests/auto/qml/qqmllanguage/data/importNamespaceConflict.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.errors.txt rename to tests/auto/qml/qqmllanguage/data/importNamespaceConflict.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml b/tests/auto/qml/qqmllanguage/data/importNamespaceConflict.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml rename to tests/auto/qml/qqmllanguage/data/importNamespaceConflict.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.errors.txt b/tests/auto/qml/qqmllanguage/data/importNewerVersion.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.errors.txt rename to tests/auto/qml/qqmllanguage/data/importNewerVersion.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.qml b/tests/auto/qml/qqmllanguage/data/importNewerVersion.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.qml rename to tests/auto/qml/qqmllanguage/data/importNewerVersion.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.errors.txt b/tests/auto/qml/qqmllanguage/data/importNonExist.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importNonExist.errors.txt rename to tests/auto/qml/qqmllanguage/data/importNonExist.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml b/tests/auto/qml/qqmllanguage/data/importNonExist.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml rename to tests/auto/qml/qqmllanguage/data/importNonExist.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.errors.txt b/tests/auto/qml/qqmllanguage/data/importNonExistOlder.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.errors.txt rename to tests/auto/qml/qqmllanguage/data/importNonExistOlder.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.qml b/tests/auto/qml/qqmllanguage/data/importNonExistOlder.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.qml rename to tests/auto/qml/qqmllanguage/data/importNonExistOlder.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.errors.txt b/tests/auto/qml/qqmllanguage/data/importVersionMissingBuiltIn.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.errors.txt rename to tests/auto/qml/qqmllanguage/data/importVersionMissingBuiltIn.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.qml b/tests/auto/qml/qqmllanguage/data/importVersionMissingBuiltIn.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.qml rename to tests/auto/qml/qqmllanguage/data/importVersionMissingBuiltIn.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.errors.txt b/tests/auto/qml/qqmllanguage/data/importVersionMissingInstalled.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.errors.txt rename to tests/auto/qml/qqmllanguage/data/importVersionMissingInstalled.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.qml b/tests/auto/qml/qqmllanguage/data/importVersionMissingInstalled.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.qml rename to tests/auto/qml/qqmllanguage/data/importVersionMissingInstalled.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importscript.1.errors.txt b/tests/auto/qml/qqmllanguage/data/importscript.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importscript.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/importscript.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importscript.1.qml b/tests/auto/qml/qqmllanguage/data/importscript.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/importscript.1.qml rename to tests/auto/qml/qqmllanguage/data/importscript.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/incorrectCase.errors.insensitive.txt b/tests/auto/qml/qqmllanguage/data/incorrectCase.errors.insensitive.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/incorrectCase.errors.insensitive.txt rename to tests/auto/qml/qqmllanguage/data/incorrectCase.errors.insensitive.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/incorrectCase.errors.sensitive.txt b/tests/auto/qml/qqmllanguage/data/incorrectCase.errors.sensitive.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/incorrectCase.errors.sensitive.txt rename to tests/auto/qml/qqmllanguage/data/incorrectCase.errors.sensitive.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/incorrectCase.qml b/tests/auto/qml/qqmllanguage/data/incorrectCase.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/incorrectCase.qml rename to tests/auto/qml/qqmllanguage/data/incorrectCase.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/incorrectCaseType.qml b/tests/auto/qml/qqmllanguage/data/incorrectCaseType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/incorrectCaseType.qml rename to tests/auto/qml/qqmllanguage/data/incorrectCaseType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/inlineAssignmentsOverrideBindings.qml b/tests/auto/qml/qqmllanguage/data/inlineAssignmentsOverrideBindings.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/inlineAssignmentsOverrideBindings.qml rename to tests/auto/qml/qqmllanguage/data/inlineAssignmentsOverrideBindings.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml b/tests/auto/qml/qqmllanguage/data/inlineQmlComponents.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml rename to tests/auto/qml/qqmllanguage/data/inlineQmlComponents.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/insertedSemicolon.1.errors.txt b/tests/auto/qml/qqmllanguage/data/insertedSemicolon.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/insertedSemicolon.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/insertedSemicolon.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/insertedSemicolon.1.qml b/tests/auto/qml/qqmllanguage/data/insertedSemicolon.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/insertedSemicolon.1.qml rename to tests/auto/qml/qqmllanguage/data/insertedSemicolon.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml b/tests/auto/qml/qqmllanguage/data/interfaceProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml rename to tests/auto/qml/qqmllanguage/data/interfaceProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/interfaceQList.qml b/tests/auto/qml/qqmllanguage/data/interfaceQList.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/interfaceQList.qml rename to tests/auto/qml/qqmllanguage/data/interfaceQList.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAlias.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.qml rename to tests/auto/qml/qqmllanguage/data/invalidAlias.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.10.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.10.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.10.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAlias.10.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.10.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.10.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.10.qml rename to tests/auto/qml/qqmllanguage/data/invalidAlias.10.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAlias.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.qml rename to tests/auto/qml/qqmllanguage/data/invalidAlias.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAlias.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.qml rename to tests/auto/qml/qqmllanguage/data/invalidAlias.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAlias.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.qml rename to tests/auto/qml/qqmllanguage/data/invalidAlias.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.5.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAlias.5.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.qml rename to tests/auto/qml/qqmllanguage/data/invalidAlias.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.6.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAlias.6.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.qml rename to tests/auto/qml/qqmllanguage/data/invalidAlias.6.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.7.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.7.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.7.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAlias.7.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.7.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.7.qml rename to tests/auto/qml/qqmllanguage/data/invalidAlias.7.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.8.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.8.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.8.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAlias.8.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.8.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.8.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.8.qml rename to tests/auto/qml/qqmllanguage/data/invalidAlias.8.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.9.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.9.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.9.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAlias.9.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.9.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.9.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.9.qml rename to tests/auto/qml/qqmllanguage/data/invalidAlias.9.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.10.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.10.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.10.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.10.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.11.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.11.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.11.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.11.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.12.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.12.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.12.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.12.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.13.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.13.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.13.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.13.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.5.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.5.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.6.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.6.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.6.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.7.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.7.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.7.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.8.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.8.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.8.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.8.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.9.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.9.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.9.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml rename to tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.9.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.10.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.10.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.10.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.qml rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.10.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.qml rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.qml rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.5.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.5.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.qml rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.6.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.6.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.qml rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.6.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.7.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.7.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.qml rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.7.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.8.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.8.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.8.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.qml rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.8.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.9.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.9.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.9.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.qml rename to tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.9.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidID.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.qml b/tests/auto/qml/qqmllanguage/data/invalidID.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.qml rename to tests/auto/qml/qqmllanguage/data/invalidID.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidID.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.qml b/tests/auto/qml/qqmllanguage/data/invalidID.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.qml rename to tests/auto/qml/qqmllanguage/data/invalidID.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidID.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.qml b/tests/auto/qml/qqmllanguage/data/invalidID.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.qml rename to tests/auto/qml/qqmllanguage/data/invalidID.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.5.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidID.5.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.qml b/tests/auto/qml/qqmllanguage/data/invalidID.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.qml rename to tests/auto/qml/qqmllanguage/data/invalidID.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.6.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidID.6.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.qml b/tests/auto/qml/qqmllanguage/data/invalidID.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.qml rename to tests/auto/qml/qqmllanguage/data/invalidID.6.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.7.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidID.7.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.qml b/tests/auto/qml/qqmllanguage/data/invalidID.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.qml rename to tests/auto/qml/qqmllanguage/data/invalidID.7.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.8.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidID.8.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.qml b/tests/auto/qml/qqmllanguage/data/invalidID.8.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.qml rename to tests/auto/qml/qqmllanguage/data/invalidID.8.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.9.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidID.9.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.qml b/tests/auto/qml/qqmllanguage/data/invalidID.9.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.qml rename to tests/auto/qml/qqmllanguage/data/invalidID.9.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidID.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.qml b/tests/auto/qml/qqmllanguage/data/invalidID.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidID.qml rename to tests/auto/qml/qqmllanguage/data/invalidID.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidImportID.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidImportID.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml b/tests/auto/qml/qqmllanguage/data/invalidImportID.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml rename to tests/auto/qml/qqmllanguage/data/invalidImportID.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidOn.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidOn.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidOn.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidOn.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidOn.qml b/tests/auto/qml/qqmllanguage/data/invalidOn.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidOn.qml rename to tests/auto/qml/qqmllanguage/data/invalidOn.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidProperty.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidProperty.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.qml b/tests/auto/qml/qqmllanguage/data/invalidProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.qml rename to tests/auto/qml/qqmllanguage/data/invalidProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.1.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidRoot.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidRoot.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.1.qml b/tests/auto/qml/qqmllanguage/data/invalidRoot.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.1.qml rename to tests/auto/qml/qqmllanguage/data/invalidRoot.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidRoot.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidRoot.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.2.qml b/tests/auto/qml/qqmllanguage/data/invalidRoot.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.2.qml rename to tests/auto/qml/qqmllanguage/data/invalidRoot.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidRoot.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidRoot.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.3.qml b/tests/auto/qml/qqmllanguage/data/invalidRoot.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.3.qml rename to tests/auto/qml/qqmllanguage/data/invalidRoot.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidRoot.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidRoot.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.4.qml b/tests/auto/qml/qqmllanguage/data/invalidRoot.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.4.qml rename to tests/auto/qml/qqmllanguage/data/invalidRoot.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.1.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidTypeName.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidTypeName.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.1.qml b/tests/auto/qml/qqmllanguage/data/invalidTypeName.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.1.qml rename to tests/auto/qml/qqmllanguage/data/invalidTypeName.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidTypeName.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidTypeName.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.2.qml b/tests/auto/qml/qqmllanguage/data/invalidTypeName.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.2.qml rename to tests/auto/qml/qqmllanguage/data/invalidTypeName.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidTypeName.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidTypeName.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.3.qml b/tests/auto/qml/qqmllanguage/data/invalidTypeName.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.3.qml rename to tests/auto/qml/qqmllanguage/data/invalidTypeName.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidTypeName.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/invalidTypeName.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.4.qml b/tests/auto/qml/qqmllanguage/data/invalidTypeName.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/invalidTypeName.4.qml rename to tests/auto/qml/qqmllanguage/data/invalidTypeName.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.1.6.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.1.6.js similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.1.6.js rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.1.6.js diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.js similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.js rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.js diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule.1.6/SecondAPI.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/SecondAPI.js similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule.1.6/SecondAPI.js rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/SecondAPI.js diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule.1.6/qmldir b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule.1.6/qmldir rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/qmldir diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule/FirstAPI.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/FirstAPI.js similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule/FirstAPI.js rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/FirstAPI.js diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule/SecondAPI.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/SecondAPI.js similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule/SecondAPI.js rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/SecondAPI.js diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule/qmldir b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/PureJsModule/qmldir rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/qmldir diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/SomeAPI.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/SomeAPI.js similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/SomeAPI.js rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/SomeAPI.js diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/qmldir b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/qmldir rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/qmldir diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/InstalledTest.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/InstalledTest.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/LocalLast.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/LocalLast.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/LocalLast.qml rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/LocalLast.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/PrivateType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/PrivateType.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/qmldir b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/qmldir rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/qmldir diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/qmldir b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/qmldir rename to tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/qmldir diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.errors.txt b/tests/auto/qml/qqmllanguage/data/listAssignment.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/listAssignment.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.qml b/tests/auto/qml/qqmllanguage/data/listAssignment.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.qml rename to tests/auto/qml/qqmllanguage/data/listAssignment.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.errors.txt b/tests/auto/qml/qqmllanguage/data/listAssignment.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/listAssignment.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.qml b/tests/auto/qml/qqmllanguage/data/listAssignment.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.qml rename to tests/auto/qml/qqmllanguage/data/listAssignment.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.errors.txt b/tests/auto/qml/qqmllanguage/data/listAssignment.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/listAssignment.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.qml b/tests/auto/qml/qqmllanguage/data/listAssignment.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.qml rename to tests/auto/qml/qqmllanguage/data/listAssignment.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml b/tests/auto/qml/qqmllanguage/data/listItemDeleteSelf.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml rename to tests/auto/qml/qqmllanguage/data/listItemDeleteSelf.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml b/tests/auto/qml/qqmllanguage/data/listProperties.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml rename to tests/auto/qml/qqmllanguage/data/listProperties.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/majorVersionIsolation.errors.txt b/tests/auto/qml/qqmllanguage/data/majorVersionIsolation.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/majorVersionIsolation.errors.txt rename to tests/auto/qml/qqmllanguage/data/majorVersionIsolation.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/majorVersionIsolation.qml b/tests/auto/qml/qqmllanguage/data/majorVersionIsolation.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/majorVersionIsolation.qml rename to tests/auto/qml/qqmllanguage/data/majorVersionIsolation.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/metaobjectRevision.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml rename to tests/auto/qml/qqmllanguage/data/metaobjectRevision.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/metaobjectRevision.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml rename to tests/auto/qml/qqmllanguage/data/metaobjectRevision.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/metaobjectRevision.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml rename to tests/auto/qml/qqmllanguage/data/metaobjectRevision.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/method.1.errors.txt b/tests/auto/qml/qqmllanguage/data/method.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/method.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/method.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml b/tests/auto/qml/qqmllanguage/data/method.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/method.1.qml rename to tests/auto/qml/qqmllanguage/data/method.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingObject.errors.txt b/tests/auto/qml/qqmllanguage/data/missingObject.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/missingObject.errors.txt rename to tests/auto/qml/qqmllanguage/data/missingObject.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingObject.qml b/tests/auto/qml/qqmllanguage/data/missingObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/missingObject.qml rename to tests/auto/qml/qqmllanguage/data/missingObject.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.errors.txt b/tests/auto/qml/qqmllanguage/data/missingSignal.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/missingSignal.errors.txt rename to tests/auto/qml/qqmllanguage/data/missingSignal.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml b/tests/auto/qml/qqmllanguage/data/missingSignal.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml rename to tests/auto/qml/qqmllanguage/data/missingSignal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/missingValueTypeProperty.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.errors.txt rename to tests/auto/qml/qqmllanguage/data/missingValueTypeProperty.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.qml b/tests/auto/qml/qqmllanguage/data/missingValueTypeProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.qml rename to tests/auto/qml/qqmllanguage/data/missingValueTypeProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/multiSet.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.qml b/tests/auto/qml/qqmllanguage/data/multiSet.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.qml rename to tests/auto/qml/qqmllanguage/data/multiSet.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.10.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.errors.txt rename to tests/auto/qml/qqmllanguage/data/multiSet.10.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.qml b/tests/auto/qml/qqmllanguage/data/multiSet.10.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.qml rename to tests/auto/qml/qqmllanguage/data/multiSet.10.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.11.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.errors.txt rename to tests/auto/qml/qqmllanguage/data/multiSet.11.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.qml b/tests/auto/qml/qqmllanguage/data/multiSet.11.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.qml rename to tests/auto/qml/qqmllanguage/data/multiSet.11.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/multiSet.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.qml b/tests/auto/qml/qqmllanguage/data/multiSet.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.qml rename to tests/auto/qml/qqmllanguage/data/multiSet.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/multiSet.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.qml b/tests/auto/qml/qqmllanguage/data/multiSet.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.qml rename to tests/auto/qml/qqmllanguage/data/multiSet.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/multiSet.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.qml b/tests/auto/qml/qqmllanguage/data/multiSet.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.qml rename to tests/auto/qml/qqmllanguage/data/multiSet.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.5.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.errors.txt rename to tests/auto/qml/qqmllanguage/data/multiSet.5.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.qml b/tests/auto/qml/qqmllanguage/data/multiSet.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.qml rename to tests/auto/qml/qqmllanguage/data/multiSet.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.6.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.errors.txt rename to tests/auto/qml/qqmllanguage/data/multiSet.6.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.qml b/tests/auto/qml/qqmllanguage/data/multiSet.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.qml rename to tests/auto/qml/qqmllanguage/data/multiSet.6.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.7.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.errors.txt rename to tests/auto/qml/qqmllanguage/data/multiSet.7.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.qml b/tests/auto/qml/qqmllanguage/data/multiSet.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.qml rename to tests/auto/qml/qqmllanguage/data/multiSet.7.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.8.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.errors.txt rename to tests/auto/qml/qqmllanguage/data/multiSet.8.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.qml b/tests/auto/qml/qqmllanguage/data/multiSet.8.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.qml rename to tests/auto/qml/qqmllanguage/data/multiSet.8.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.9.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.errors.txt rename to tests/auto/qml/qqmllanguage/data/multiSet.9.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.qml b/tests/auto/qml/qqmllanguage/data/multiSet.9.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.qml rename to tests/auto/qml/qqmllanguage/data/multiSet.9.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nestedComponentRoots.qml b/tests/auto/qml/qqmllanguage/data/nestedComponentRoots.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nestedComponentRoots.qml rename to tests/auto/qml/qqmllanguage/data/nestedComponentRoots.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.errors.txt b/tests/auto/qml/qqmllanguage/data/nestedErrors.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.errors.txt rename to tests/auto/qml/qqmllanguage/data/nestedErrors.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml b/tests/auto/qml/qqmllanguage/data/nestedErrors.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml rename to tests/auto/qml/qqmllanguage/data/nestedErrors.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/noCreation.errors.txt b/tests/auto/qml/qqmllanguage/data/noCreation.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/noCreation.errors.txt rename to tests/auto/qml/qqmllanguage/data/noCreation.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml b/tests/auto/qml/qqmllanguage/data/noCreation.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml rename to tests/auto/qml/qqmllanguage/data/noCreation.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonScriptableProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/nonScriptableProperty.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonScriptableProperty.errors.txt rename to tests/auto/qml/qqmllanguage/data/nonScriptableProperty.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonScriptableProperty.qml b/tests/auto/qml/qqmllanguage/data/nonScriptableProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonScriptableProperty.qml rename to tests/auto/qml/qqmllanguage/data/nonScriptableProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.qml rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.qml rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.qml rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.qml rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.5.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.errors.txt rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.5.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.qml rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.6.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.errors.txt rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.6.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.qml rename to tests/auto/qml/qqmllanguage/data/nonexistantProperty.6.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/notAvailable.errors.txt b/tests/auto/qml/qqmllanguage/data/notAvailable.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/notAvailable.errors.txt rename to tests/auto/qml/qqmllanguage/data/notAvailable.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/notAvailable.qml b/tests/auto/qml/qqmllanguage/data/notAvailable.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/notAvailable.qml rename to tests/auto/qml/qqmllanguage/data/notAvailable.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/nullDotProperty.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.errors.txt rename to tests/auto/qml/qqmllanguage/data/nullDotProperty.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.qml b/tests/auto/qml/qqmllanguage/data/nullDotProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.qml rename to tests/auto/qml/qqmllanguage/data/nullDotProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/objectValueTypeProperty.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.errors.txt rename to tests/auto/qml/qqmllanguage/data/objectValueTypeProperty.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.qml b/tests/auto/qml/qqmllanguage/data/objectValueTypeProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.qml rename to tests/auto/qml/qqmllanguage/data/objectValueTypeProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml b/tests/auto/qml/qqmllanguage/data/onCompleted.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml rename to tests/auto/qml/qqmllanguage/data/onCompleted.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml b/tests/auto/qml/qqmllanguage/data/onDestruction.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml rename to tests/auto/qml/qqmllanguage/data/onDestruction.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.1.errors.txt b/tests/auto/qml/qqmllanguage/data/property.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/property.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml b/tests/auto/qml/qqmllanguage/data/property.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.1.qml rename to tests/auto/qml/qqmllanguage/data/property.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.2.errors.txt b/tests/auto/qml/qqmllanguage/data/property.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/property.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml b/tests/auto/qml/qqmllanguage/data/property.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.2.qml rename to tests/auto/qml/qqmllanguage/data/property.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.3.errors.txt b/tests/auto/qml/qqmllanguage/data/property.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/property.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml b/tests/auto/qml/qqmllanguage/data/property.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.3.qml rename to tests/auto/qml/qqmllanguage/data/property.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.4.errors.txt b/tests/auto/qml/qqmllanguage/data/property.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/property.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml b/tests/auto/qml/qqmllanguage/data/property.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.4.qml rename to tests/auto/qml/qqmllanguage/data/property.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.6.errors.txt b/tests/auto/qml/qqmllanguage/data/property.6.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.6.errors.txt rename to tests/auto/qml/qqmllanguage/data/property.6.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml b/tests/auto/qml/qqmllanguage/data/property.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.6.qml rename to tests/auto/qml/qqmllanguage/data/property.6.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.7.errors.txt b/tests/auto/qml/qqmllanguage/data/property.7.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.7.errors.txt rename to tests/auto/qml/qqmllanguage/data/property.7.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml b/tests/auto/qml/qqmllanguage/data/property.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/property.7.qml rename to tests/auto/qml/qqmllanguage/data/property.7.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/propertyInit.1.qml b/tests/auto/qml/qqmllanguage/data/propertyInit.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/propertyInit.1.qml rename to tests/auto/qml/qqmllanguage/data/propertyInit.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/propertyInit.2.qml b/tests/auto/qml/qqmllanguage/data/propertyInit.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/propertyInit.2.qml rename to tests/auto/qml/qqmllanguage/data/propertyInit.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.2.qml b/tests/auto/qml/qqmllanguage/data/propertyValueSource.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.2.qml rename to tests/auto/qml/qqmllanguage/data/propertyValueSource.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.qml b/tests/auto/qml/qqmllanguage/data/propertyValueSource.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.qml rename to tests/auto/qml/qqmllanguage/data/propertyValueSource.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml b/tests/auto/qml/qqmllanguage/data/qmlAttachedPropertiesObjectMethod.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml rename to tests/auto/qml/qqmllanguage/data/qmlAttachedPropertiesObjectMethod.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml b/tests/auto/qml/qqmllanguage/data/qmlAttachedPropertiesObjectMethod.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml rename to tests/auto/qml/qqmllanguage/data/qmlAttachedPropertiesObjectMethod.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/LocalInternal.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/LocalInternal.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/LocalInternal.qml rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/LocalInternal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/Test.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/Test.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/Test.qml rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/Test.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/TestLocal.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestLocal.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/TestLocal.qml rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestLocal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/TestNamed.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestNamed.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/TestNamed.qml rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestNamed.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/TestSubDir.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestSubDir.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/TestSubDir.qml rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestSubDir.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/UndeclaredLocal.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/UndeclaredLocal.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/UndeclaredLocal.qml rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/UndeclaredLocal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/WrongTestLocal.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/WrongTestLocal.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/WrongTestLocal.qml rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/WrongTestLocal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/noqmldir/Test.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/noqmldir/Test.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/noqmldir/Test.qml rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/noqmldir/Test.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/pics/blue.png b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/pics/blue.png similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/pics/blue.png rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/pics/blue.png diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/qmldir b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/qmldir rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/qmldir diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/subdir/SubTest.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/subdir/SubTest.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/subdir/SubTest.qml rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/subdir/SubTest.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/subdir/qmldir b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/subdir/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/qtest/declarative/qmllanguage/subdir/qmldir rename to tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/subdir/qmldir diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.errors.txt b/tests/auto/qml/qqmllanguage/data/readOnly.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/readOnly.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.qml b/tests/auto/qml/qqmllanguage/data/readOnly.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.qml rename to tests/auto/qml/qqmllanguage/data/readOnly.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.errors.txt b/tests/auto/qml/qqmllanguage/data/readOnly.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/readOnly.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.qml b/tests/auto/qml/qqmllanguage/data/readOnly.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.qml rename to tests/auto/qml/qqmllanguage/data/readOnly.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.errors.txt b/tests/auto/qml/qqmllanguage/data/readOnly.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/readOnly.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml b/tests/auto/qml/qqmllanguage/data/readOnly.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml rename to tests/auto/qml/qqmllanguage/data/readOnly.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.errors.txt b/tests/auto/qml/qqmllanguage/data/readOnly.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/readOnly.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.qml b/tests/auto/qml/qqmllanguage/data/readOnly.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.qml rename to tests/auto/qml/qqmllanguage/data/readOnly.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.errors.txt b/tests/auto/qml/qqmllanguage/data/readOnly.5.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.errors.txt rename to tests/auto/qml/qqmllanguage/data/readOnly.5.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.qml b/tests/auto/qml/qqmllanguage/data/readOnly.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.qml rename to tests/auto/qml/qqmllanguage/data/readOnly.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readonly.qml b/tests/auto/qml/qqmllanguage/data/readonly.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/readonly.qml rename to tests/auto/qml/qqmllanguage/data/readonly.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/registrationOrder.qml b/tests/auto/qml/qqmllanguage/data/registrationOrder.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/registrationOrder.qml rename to tests/auto/qml/qqmllanguage/data/registrationOrder.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/remoteLoadCrash.qml b/tests/auto/qml/qqmllanguage/data/remoteLoadCrash.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/remoteLoadCrash.qml rename to tests/auto/qml/qqmllanguage/data/remoteLoadCrash.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml b/tests/auto/qml/qqmllanguage/data/revisions11.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml rename to tests/auto/qml/qqmllanguage/data/revisions11.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml b/tests/auto/qml/qqmllanguage/data/revisionsbasesub11.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml rename to tests/auto/qml/qqmllanguage/data/revisionsbasesub11.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml b/tests/auto/qml/qqmllanguage/data/revisionssub11.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml rename to tests/auto/qml/qqmllanguage/data/revisionssub11.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/rootAsQmlComponent.qml b/tests/auto/qml/qqmllanguage/data/rootAsQmlComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/rootAsQmlComponent.qml rename to tests/auto/qml/qqmllanguage/data/rootAsQmlComponent.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.errors.txt b/tests/auto/qml/qqmllanguage/data/scriptString.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/scriptString.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.qml b/tests/auto/qml/qqmllanguage/data/scriptString.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.qml rename to tests/auto/qml/qqmllanguage/data/scriptString.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.errors.txt b/tests/auto/qml/qqmllanguage/data/scriptString.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/scriptString.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.qml b/tests/auto/qml/qqmllanguage/data/scriptString.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.qml rename to tests/auto/qml/qqmllanguage/data/scriptString.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.qml b/tests/auto/qml/qqmllanguage/data/scriptString.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/scriptString.qml rename to tests/auto/qml/qqmllanguage/data/scriptString.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml b/tests/auto/qml/qqmllanguage/data/scriptString2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml rename to tests/auto/qml/qqmllanguage/data/scriptString2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString3.qml b/tests/auto/qml/qqmllanguage/data/scriptString3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/scriptString3.qml rename to tests/auto/qml/qqmllanguage/data/scriptString3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString4.qml b/tests/auto/qml/qqmllanguage/data/scriptString4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/scriptString4.qml rename to tests/auto/qml/qqmllanguage/data/scriptString4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.1.errors.txt b/tests/auto/qml/qqmllanguage/data/signal.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/signal.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/signal.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml b/tests/auto/qml/qqmllanguage/data/signal.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml rename to tests/auto/qml/qqmllanguage/data/signal.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.2.errors.txt b/tests/auto/qml/qqmllanguage/data/signal.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/signal.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/signal.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml b/tests/auto/qml/qqmllanguage/data/signal.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml rename to tests/auto/qml/qqmllanguage/data/signal.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.3.errors.txt b/tests/auto/qml/qqmllanguage/data/signal.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/signal.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/signal.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml b/tests/auto/qml/qqmllanguage/data/signal.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml rename to tests/auto/qml/qqmllanguage/data/signal.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.4.errors.txt b/tests/auto/qml/qqmllanguage/data/signal.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/signal.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/signal.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml b/tests/auto/qml/qqmllanguage/data/signal.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml rename to tests/auto/qml/qqmllanguage/data/signal.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/simpleBindings.qml b/tests/auto/qml/qqmllanguage/data/simpleBindings.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/simpleBindings.qml rename to tests/auto/qml/qqmllanguage/data/simpleBindings.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/simpleContainer.qml b/tests/auto/qml/qqmllanguage/data/simpleContainer.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/simpleContainer.qml rename to tests/auto/qml/qqmllanguage/data/simpleContainer.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/simpleObject.qml b/tests/auto/qml/qqmllanguage/data/simpleObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/simpleObject.qml rename to tests/auto/qml/qqmllanguage/data/simpleObject.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/singularProperty.2.errors.txt b/tests/auto/qml/qqmllanguage/data/singularProperty.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/singularProperty.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/singularProperty.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/singularProperty.2.qml b/tests/auto/qml/qqmllanguage/data/singularProperty.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/singularProperty.2.qml rename to tests/auto/qml/qqmllanguage/data/singularProperty.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/singularProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/singularProperty.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/singularProperty.errors.txt rename to tests/auto/qml/qqmllanguage/data/singularProperty.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/singularProperty.qml b/tests/auto/qml/qqmllanguage/data/singularProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/singularProperty.qml rename to tests/auto/qml/qqmllanguage/data/singularProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml b/tests/auto/qml/qqmllanguage/data/subdir/Test.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml rename to tests/auto/qml/qqmllanguage/data/subdir/Test.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml b/tests/auto/qml/qqmllanguage/data/subdir/subsubdir/SubTest.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml rename to tests/auto/qml/qqmllanguage/data/subdir/subsubdir/SubTest.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/test.js b/tests/auto/qml/qqmllanguage/data/test.js similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/test.js rename to tests/auto/qml/qqmllanguage/data/test.js diff --git a/tests/auto/declarative/qdeclarativelanguage/data/test2.js b/tests/auto/qml/qqmllanguage/data/test2.js similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/test2.js rename to tests/auto/qml/qqmllanguage/data/test2.js diff --git a/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.errors.txt b/tests/auto/qml/qqmllanguage/data/unregisteredObject.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.errors.txt rename to tests/auto/qml/qqmllanguage/data/unregisteredObject.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.qml b/tests/auto/qml/qqmllanguage/data/unregisteredObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.qml rename to tests/auto/qml/qqmllanguage/data/unregisteredObject.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/unsupportedProperty.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.errors.txt rename to tests/auto/qml/qqmllanguage/data/unsupportedProperty.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.qml b/tests/auto/qml/qqmllanguage/data/unsupportedProperty.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.qml rename to tests/auto/qml/qqmllanguage/data/unsupportedProperty.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/valueTypes.qml b/tests/auto/qml/qqmllanguage/data/valueTypes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/valueTypes.qml rename to tests/auto/qml/qqmllanguage/data/valueTypes.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/variantNotify.qml b/tests/auto/qml/qqmllanguage/data/variantNotify.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/variantNotify.qml rename to tests/auto/qml/qqmllanguage/data/variantNotify.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/versionedbase.qml b/tests/auto/qml/qqmllanguage/data/versionedbase.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/versionedbase.qml rename to tests/auto/qml/qqmllanguage/data/versionedbase.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.1.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.1.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.qml b/tests/auto/qml/qqmllanguage/data/wrongType.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.1.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.10.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.10.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.qml b/tests/auto/qml/qqmllanguage/data/wrongType.10.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.10.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.11.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.11.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.qml b/tests/auto/qml/qqmllanguage/data/wrongType.11.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.11.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.12.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.12.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.qml b/tests/auto/qml/qqmllanguage/data/wrongType.12.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.12.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.13.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.13.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.qml b/tests/auto/qml/qqmllanguage/data/wrongType.13.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.13.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.14.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.14.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.qml b/tests/auto/qml/qqmllanguage/data/wrongType.14.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.14.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.15.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.15.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.qml b/tests/auto/qml/qqmllanguage/data/wrongType.15.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.15.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.16.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.16.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.qml b/tests/auto/qml/qqmllanguage/data/wrongType.16.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.16.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.17.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.17.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.17.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.17.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.17.qml b/tests/auto/qml/qqmllanguage/data/wrongType.17.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.17.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.17.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.qml b/tests/auto/qml/qqmllanguage/data/wrongType.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.2.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.3.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.3.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.qml b/tests/auto/qml/qqmllanguage/data/wrongType.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.3.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.4.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.4.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.qml b/tests/auto/qml/qqmllanguage/data/wrongType.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.4.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.5.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.5.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.qml b/tests/auto/qml/qqmllanguage/data/wrongType.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.5.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.6.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.6.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.qml b/tests/auto/qml/qqmllanguage/data/wrongType.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.6.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.7.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.7.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.qml b/tests/auto/qml/qqmllanguage/data/wrongType.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.7.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.8.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.8.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.qml b/tests/auto/qml/qqmllanguage/data/wrongType.8.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.8.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.9.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.errors.txt rename to tests/auto/qml/qqmllanguage/data/wrongType.9.errors.txt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.qml b/tests/auto/qml/qqmllanguage/data/wrongType.9.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.qml rename to tests/auto/qml/qqmllanguage/data/wrongType.9.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro b/tests/auto/qml/qqmllanguage/qqmllanguage.pro similarity index 66% rename from tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro rename to tests/auto/qml/qqmllanguage/qqmllanguage.pro index f79d1c99c9..41b1d11764 100644 --- a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro +++ b/tests/auto/qml/qqmllanguage/qqmllanguage.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qdeclarativelanguage +TARGET = tst_qqmllanguage macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativelanguage.cpp \ +SOURCES += tst_qqmllanguage.cpp \ testtypes.cpp HEADERS += testtypes.h @@ -15,4 +15,4 @@ importFiles.path = . DEPLOYMENT += importFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private network testlib +QT += core-private gui-private v8-private qml-private network testlib diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp b/tests/auto/qml/qqmllanguage/testtypes.cpp similarity index 100% rename from tests/auto/declarative/qdeclarativelanguage/testtypes.cpp rename to tests/auto/qml/qqmllanguage/testtypes.cpp diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h similarity index 88% rename from tests/auto/declarative/qdeclarativelanguage/testtypes.h rename to tests/auto/qml/qqmllanguage/testtypes.h index 4a37139056..e9898bd039 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h +++ b/tests/auto/qml/qqmllanguage/testtypes.h @@ -48,14 +48,14 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#include +#include QVariant myCustomVariantTypeConverter(const QString &data); @@ -165,7 +165,7 @@ public slots: void oddlyNamedNotifySignal(); private: - friend class tst_qdeclarativelanguage; + friend class tst_qqmllanguage; int m_value; MyInterface *m_interface; MyQmlObject *m_qmlobject; @@ -178,18 +178,18 @@ QML_DECLARE_TYPEINFO(MyQmlObject, QML_HAS_ATTACHED_PROPERTIES) class MyGroupedObject : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeScriptString script READ script WRITE setScript) + Q_PROPERTY(QQmlScriptString script READ script WRITE setScript) Q_PROPERTY(int value READ value WRITE setValue) public: - QDeclarativeScriptString script() const { return m_script; } - void setScript(const QDeclarativeScriptString &s) { m_script = s; } + QQmlScriptString script() const { return m_script; } + void setScript(const QQmlScriptString &s) { m_script = s; } int value() const { return m_value; } void setValue(int v) { m_value = v; } private: int m_value; - QDeclarativeScriptString m_script; + QQmlScriptString m_script; }; @@ -201,7 +201,7 @@ class MyTypeObject : public QObject Q_PROPERTY(QString id READ id WRITE setId) Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty) - Q_PROPERTY(QDeclarativeComponent *componentProperty READ componentProperty WRITE setComponentProperty) + Q_PROPERTY(QQmlComponent *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) @@ -228,7 +228,7 @@ class MyTypeObject : public QObject Q_PROPERTY(QVector4D vector4Property READ vector4Property WRITE setVector4Property) Q_PROPERTY(QUrl urlProperty READ urlProperty WRITE setUrlProperty) - Q_PROPERTY(QDeclarativeScriptString scriptProperty READ scriptProperty WRITE setScriptProperty) + Q_PROPERTY(QQmlScriptString scriptProperty READ scriptProperty WRITE setScriptProperty) Q_PROPERTY(MyGroupedObject *grouped READ grouped CONSTANT) Q_PROPERTY(MyGroupedObject *nullGrouped READ nullGrouped CONSTANT) @@ -252,11 +252,11 @@ class MyTypeObject : public QObject objectPropertyValue = v; } - QDeclarativeComponent *componentPropertyValue; - QDeclarativeComponent *componentProperty() const { + QQmlComponent *componentPropertyValue; + QQmlComponent *componentProperty() const { return componentPropertyValue; } - void setComponentProperty(QDeclarativeComponent *v) { + void setComponentProperty(QQmlComponent *v) { componentPropertyValue = v; } @@ -460,11 +460,11 @@ class MyTypeObject : public QObject urlPropertyValue = v; } - QDeclarativeScriptString scriptPropertyValue; - QDeclarativeScriptString scriptProperty() const { + QQmlScriptString scriptPropertyValue; + QQmlScriptString scriptProperty() const { return scriptPropertyValue; } - void setScriptProperty(const QDeclarativeScriptString &v) { + void setScriptProperty(const QQmlScriptString &v) { scriptPropertyValue = v; } @@ -484,17 +484,17 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(MyTypeObject::MyFlags) class MyContainer : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty children READ children) - Q_PROPERTY(QDeclarativeListProperty containerChildren READ containerChildren) - Q_PROPERTY(QDeclarativeListProperty qlistInterfaces READ qlistInterfaces) + Q_PROPERTY(QQmlListProperty children READ children) + Q_PROPERTY(QQmlListProperty containerChildren READ containerChildren) + Q_PROPERTY(QQmlListProperty qlistInterfaces READ qlistInterfaces) Q_CLASSINFO("DefaultProperty", "children") public: MyContainer() {} - QDeclarativeListProperty children() { return QDeclarativeListProperty(this, m_children); } - QDeclarativeListProperty containerChildren() { return QDeclarativeListProperty(this, m_containerChildren); } + QQmlListProperty children() { return QQmlListProperty(this, m_children); } + QQmlListProperty containerChildren() { return QQmlListProperty(this, m_containerChildren); } QList *getChildren() { return &m_children; } - QDeclarativeListProperty qlistInterfaces() { return QDeclarativeListProperty(this, m_interfaces); } + QQmlListProperty qlistInterfaces() { return QQmlListProperty(this, m_interfaces); } QList *getQListInterfaces() { return &m_interfaces; } QList m_containerChildren; @@ -503,16 +503,16 @@ class MyContainer : public QObject }; -class MyPropertyValueSource : public QObject, public QDeclarativePropertyValueSource +class MyPropertyValueSource : public QObject, public QQmlPropertyValueSource { Q_OBJECT - Q_INTERFACES(QDeclarativePropertyValueSource) + Q_INTERFACES(QQmlPropertyValueSource) public: MyPropertyValueSource() - : QDeclarativePropertyValueSource() {} + : QQmlPropertyValueSource() {} - QDeclarativeProperty prop; - virtual void setTarget(const QDeclarativeProperty &p) + QQmlProperty prop; + virtual void setTarget(const QQmlProperty &p) { prop = p; } @@ -574,9 +574,9 @@ namespace MyNamespace { class MySecondNamespacedType : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty list READ list) + Q_PROPERTY(QQmlListProperty list READ list) public: - QDeclarativeListProperty list() { return QDeclarativeListProperty(this, m_list); } + QQmlListProperty list() { return QQmlListProperty(this, m_list); } private: QList m_list; @@ -588,16 +588,16 @@ class MyCustomParserType : public QObject Q_OBJECT }; -class MyCustomParserTypeParser : public QDeclarativeCustomParser +class MyCustomParserTypeParser : public QQmlCustomParser { public: - QByteArray compile(const QList &) { return QByteArray(); } + QByteArray compile(const QList &) { return QByteArray(); } void setCustomData(QObject *, const QByteArray &) {} }; -class MyParserStatus : public QObject, public QDeclarativeParserStatus +class MyParserStatus : public QObject, public QQmlParserStatus { - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) Q_OBJECT public: MyParserStatus() : m_cbc(0), m_ccc(0) {} diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp similarity index 86% rename from tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp rename to tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 480a898ff0..379c32d4b8 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -39,17 +39,17 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include -#include +#include +#include +#include #include "testtypes.h" #include "testhttpserver.h" @@ -76,12 +76,12 @@ involve evaluating ECMAScript expressions and bindings. Evaluation of expressions and bindings is covered in qmlecmascript */ -class tst_qdeclarativelanguage : public QObject +class tst_qqmllanguage : public QObject { Q_OBJECT public: - tst_qdeclarativelanguage() { - QDeclarativeMetaType::registerCustomStringConverter(qMetaTypeId(), myCustomVariantTypeConverter); + tst_qqmllanguage() { + QQmlMetaType::registerCustomStringConverter(qMetaTypeId(), myCustomVariantTypeConverter); engine.addImportPath(testdata("lib")); } @@ -177,7 +177,7 @@ private slots: void crash2(); private: - QDeclarativeEngine engine; + QQmlEngine engine; void testType(const QString& qml, const QString& type, const QString& error); }; @@ -191,9 +191,9 @@ private slots: file.close(); \ expected = data.split('\n'); \ expected.removeAll(QByteArray("")); \ - QList errors = component.errors(); \ + QList errors = component.errors(); \ for (int ii = 0; ii < errors.count(); ++ii) { \ - const QDeclarativeError &error = errors.at(ii); \ + const QQmlError &error = errors.at(ii); \ QByteArray errorStr = QByteArray::number(error.line()) + ":" + \ QByteArray::number(error.column()) + ":" + \ error.description().toUtf8(); \ @@ -233,12 +233,12 @@ inline QUrl TEST_FILE(const char *filename) return TEST_FILE(QLatin1String(filename)); } -void tst_qdeclarativelanguage::cleanupTestCase() +void tst_qqmllanguage::cleanupTestCase() { QVERIFY(QFile::remove(TEST_FILE(QString::fromUtf8("I18nType\303\201\303\242\303\243\303\244\303\245.qml")).toLocalFile())); } -void tst_qdeclarativelanguage::insertedSemicolon_data() +void tst_qqmllanguage::insertedSemicolon_data() { QTest::addColumn("file"); QTest::addColumn("errorFile"); @@ -247,13 +247,13 @@ void tst_qdeclarativelanguage::insertedSemicolon_data() QTest::newRow("insertedSemicolon.1") << "insertedSemicolon.1.qml" << "insertedSemicolon.1.errors.txt" << false; } -void tst_qdeclarativelanguage::insertedSemicolon() +void tst_qqmllanguage::insertedSemicolon() { QFETCH(QString, file); QFETCH(QString, errorFile); QFETCH(bool, create); - QDeclarativeComponent component(&engine, TEST_FILE(file)); + QQmlComponent component(&engine, TEST_FILE(file)); if(create) { QObject *object = component.create(); @@ -263,7 +263,7 @@ void tst_qdeclarativelanguage::insertedSemicolon() VERIFY_ERRORS(errorFile.toLatin1().constData()); } -void tst_qdeclarativelanguage::errors_data() +void tst_qqmllanguage::errors_data() { QTest::addColumn("file"); QTest::addColumn("errorFile"); @@ -463,13 +463,13 @@ void tst_qdeclarativelanguage::errors_data() } -void tst_qdeclarativelanguage::errors() +void tst_qqmllanguage::errors() { QFETCH(QString, file); QFETCH(QString, errorFile); QFETCH(bool, create); - QDeclarativeComponent component(&engine, TEST_FILE(file)); + QQmlComponent component(&engine, TEST_FILE(file)); if(create) { QObject *object = component.create(); @@ -479,26 +479,26 @@ void tst_qdeclarativelanguage::errors() VERIFY_ERRORS(errorFile.toLatin1().constData()); } -void tst_qdeclarativelanguage::simpleObject() +void tst_qqmllanguage::simpleObject() { - QDeclarativeComponent component(&engine, TEST_FILE("simpleObject.qml")); + QQmlComponent component(&engine, TEST_FILE("simpleObject.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); } -void tst_qdeclarativelanguage::simpleContainer() +void tst_qqmllanguage::simpleContainer() { - QDeclarativeComponent component(&engine, TEST_FILE("simpleContainer.qml")); + QQmlComponent component(&engine, TEST_FILE("simpleContainer.qml")); VERIFY_ERRORS(0); MyContainer *container= qobject_cast(component.create()); QVERIFY(container != 0); QCOMPARE(container->getChildren()->count(),2); } -void tst_qdeclarativelanguage::interfaceProperty() +void tst_qqmllanguage::interfaceProperty() { - QDeclarativeComponent component(&engine, TEST_FILE("interfaceProperty.qml")); + QQmlComponent component(&engine, TEST_FILE("interfaceProperty.qml")); VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -506,9 +506,9 @@ void tst_qdeclarativelanguage::interfaceProperty() QVERIFY(object->interface()->id == 913); } -void tst_qdeclarativelanguage::interfaceQList() +void tst_qqmllanguage::interfaceQList() { - QDeclarativeComponent component(&engine, TEST_FILE("interfaceQList.qml")); + QQmlComponent component(&engine, TEST_FILE("interfaceQList.qml")); VERIFY_ERRORS(0); MyContainer *container= qobject_cast(component.create()); QVERIFY(container != 0); @@ -517,9 +517,9 @@ void tst_qdeclarativelanguage::interfaceQList() QVERIFY(container->getQListInterfaces()->at(ii)->id == 913); } -void tst_qdeclarativelanguage::assignObjectToSignal() +void tst_qqmllanguage::assignObjectToSignal() { - QDeclarativeComponent component(&engine, TEST_FILE("assignObjectToSignal.qml")); + QQmlComponent component(&engine, TEST_FILE("assignObjectToSignal.qml")); VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -527,9 +527,9 @@ void tst_qdeclarativelanguage::assignObjectToSignal() emit object->basicSignal(); } -void tst_qdeclarativelanguage::assignObjectToVariant() +void tst_qqmllanguage::assignObjectToVariant() { - QDeclarativeComponent component(&engine, TEST_FILE("assignObjectToVariant.qml")); + QQmlComponent component(&engine, TEST_FILE("assignObjectToVariant.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -537,9 +537,9 @@ void tst_qdeclarativelanguage::assignObjectToVariant() QVERIFY(v.userType() == qMetaTypeId()); } -void tst_qdeclarativelanguage::assignLiteralSignalProperty() +void tst_qqmllanguage::assignLiteralSignalProperty() { - QDeclarativeComponent component(&engine, TEST_FILE("assignLiteralSignalProperty.qml")); + QQmlComponent component(&engine, TEST_FILE("assignLiteralSignalProperty.qml")); VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -547,9 +547,9 @@ void tst_qdeclarativelanguage::assignLiteralSignalProperty() } // Test is an external component can be loaded and assigned (to a qlist) -void tst_qdeclarativelanguage::assignQmlComponent() +void tst_qqmllanguage::assignQmlComponent() { - QDeclarativeComponent component(&engine, TEST_FILE("assignQmlComponent.qml")); + QQmlComponent component(&engine, TEST_FILE("assignQmlComponent.qml")); VERIFY_ERRORS(0); MyContainer *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -560,9 +560,9 @@ void tst_qdeclarativelanguage::assignQmlComponent() } // Test literal assignment to all the basic types -void tst_qdeclarativelanguage::assignBasicTypes() +void tst_qqmllanguage::assignBasicTypes() { - QDeclarativeComponent component(&engine, TEST_FILE("assignBasicTypes.qml")); + QQmlComponent component(&engine, TEST_FILE("assignBasicTypes.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -598,9 +598,9 @@ void tst_qdeclarativelanguage::assignBasicTypes() } // Test edge case type assignments -void tst_qdeclarativelanguage::assignTypeExtremes() +void tst_qqmllanguage::assignTypeExtremes() { - QDeclarativeComponent component(&engine, TEST_FILE("assignTypeExtremes.qml")); + QQmlComponent component(&engine, TEST_FILE("assignTypeExtremes.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -609,18 +609,18 @@ void tst_qdeclarativelanguage::assignTypeExtremes() } // Test that a composite type can assign to a property of its base type -void tst_qdeclarativelanguage::assignCompositeToType() +void tst_qqmllanguage::assignCompositeToType() { - QDeclarativeComponent component(&engine, TEST_FILE("assignCompositeToType.qml")); + QQmlComponent component(&engine, TEST_FILE("assignCompositeToType.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); } // Test that literals are stored correctly in variant properties -void tst_qdeclarativelanguage::assignLiteralToVariant() +void tst_qqmllanguage::assignLiteralToVariant() { - QDeclarativeComponent component(&engine, TEST_FILE("assignLiteralToVariant.qml")); + QQmlComponent component(&engine, TEST_FILE("assignLiteralToVariant.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -657,9 +657,9 @@ void tst_qdeclarativelanguage::assignLiteralToVariant() // Test that literals are stored correctly in "var" properties // Note that behaviour differs from "variant" properties in that // no conversion from "special strings" to QVariants is performed. -void tst_qdeclarativelanguage::assignLiteralToVar() +void tst_qqmllanguage::assignLiteralToVar() { - QDeclarativeComponent component(&engine, TEST_FILE("assignLiteralToVar.qml")); + QQmlComponent component(&engine, TEST_FILE("assignLiteralToVar.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -706,9 +706,9 @@ void tst_qdeclarativelanguage::assignLiteralToVar() } // Tests that custom parser types can be instantiated -void tst_qdeclarativelanguage::customParserTypes() +void tst_qqmllanguage::customParserTypes() { - QDeclarativeComponent component(&engine, TEST_FILE("customParserTypes.qml")); + QQmlComponent component(&engine, TEST_FILE("customParserTypes.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -716,9 +716,9 @@ void tst_qdeclarativelanguage::customParserTypes() } // Tests that the root item can be a custom component -void tst_qdeclarativelanguage::rootAsQmlComponent() +void tst_qqmllanguage::rootAsQmlComponent() { - QDeclarativeComponent component(&engine, TEST_FILE("rootAsQmlComponent.qml")); + QQmlComponent component(&engine, TEST_FILE("rootAsQmlComponent.qml")); VERIFY_ERRORS(0); MyContainer *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -727,14 +727,14 @@ void tst_qdeclarativelanguage::rootAsQmlComponent() } // Tests that components can be specified inline -void tst_qdeclarativelanguage::inlineQmlComponents() +void tst_qqmllanguage::inlineQmlComponents() { - QDeclarativeComponent component(&engine, TEST_FILE("inlineQmlComponents.qml")); + QQmlComponent component(&engine, TEST_FILE("inlineQmlComponents.qml")); VERIFY_ERRORS(0); MyContainer *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->getChildren()->count(), 1); - QDeclarativeComponent *comp = qobject_cast(object->getChildren()->at(0)); + QQmlComponent *comp = qobject_cast(object->getChildren()->at(0)); QVERIFY(comp != 0); MyQmlObject *compObject = qobject_cast(comp->create()); QVERIFY(compObject != 0); @@ -742,9 +742,9 @@ void tst_qdeclarativelanguage::inlineQmlComponents() } // Tests that types that have an id property have it set -void tst_qdeclarativelanguage::idProperty() +void tst_qqmllanguage::idProperty() { - QDeclarativeComponent component(&engine, TEST_FILE("idProperty.qml")); + QQmlComponent component(&engine, TEST_FILE("idProperty.qml")); VERIFY_ERRORS(0); MyContainer *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -758,9 +758,9 @@ void tst_qdeclarativelanguage::idProperty() // Tests automatic connection to notify signals if "onBlahChanged" syntax is used // even if the notify signal for "blah" is not called "blahChanged" -void tst_qdeclarativelanguage::autoNotifyConnection() +void tst_qqmllanguage::autoNotifyConnection() { - QDeclarativeComponent component(&engine, TEST_FILE("autoNotifyConnection.qml")); + QQmlComponent component(&engine, TEST_FILE("autoNotifyConnection.qml")); VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -773,9 +773,9 @@ void tst_qdeclarativelanguage::autoNotifyConnection() } // Tests that signals can be assigned to -void tst_qdeclarativelanguage::assignSignal() +void tst_qqmllanguage::assignSignal() { - QDeclarativeComponent component(&engine, TEST_FILE("assignSignal.qml")); + QQmlComponent component(&engine, TEST_FILE("assignSignal.qml")); VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -786,9 +786,9 @@ void tst_qdeclarativelanguage::assignSignal() } // Tests the creation and assignment of dynamic properties -void tst_qdeclarativelanguage::dynamicProperties() +void tst_qqmllanguage::dynamicProperties() { - QDeclarativeComponent component(&engine, TEST_FILE("dynamicProperties.qml")); + QQmlComponent component(&engine, TEST_FILE("dynamicProperties.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -804,9 +804,9 @@ void tst_qdeclarativelanguage::dynamicProperties() } // Test that nested types can use dynamic properties -void tst_qdeclarativelanguage::dynamicPropertiesNested() +void tst_qqmllanguage::dynamicPropertiesNested() { - QDeclarativeComponent component(&engine, TEST_FILE("dynamicPropertiesNested.qml")); + QQmlComponent component(&engine, TEST_FILE("dynamicPropertiesNested.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -820,9 +820,9 @@ void tst_qdeclarativelanguage::dynamicPropertiesNested() } // Tests the creation and assignment to dynamic list properties -void tst_qdeclarativelanguage::listProperties() +void tst_qqmllanguage::listProperties() { - QDeclarativeComponent component(&engine, TEST_FILE("listProperties.qml")); + QQmlComponent component(&engine, TEST_FILE("listProperties.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -832,10 +832,10 @@ void tst_qdeclarativelanguage::listProperties() // Tests the creation and assignment of dynamic object properties // ### Not complete -void tst_qdeclarativelanguage::dynamicObjectProperties() +void tst_qqmllanguage::dynamicObjectProperties() { { - QDeclarativeComponent component(&engine, TEST_FILE("dynamicObjectProperties.qml")); + QQmlComponent component(&engine, TEST_FILE("dynamicObjectProperties.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -844,7 +844,7 @@ void tst_qdeclarativelanguage::dynamicObjectProperties() QVERIFY(object->property("objectProperty2") != qVariantFromValue((QObject*)0)); } { - QDeclarativeComponent component(&engine, TEST_FILE("dynamicObjectProperties.2.qml")); + QQmlComponent component(&engine, TEST_FILE("dynamicObjectProperties.2.qml")); QEXPECT_FAIL("", "QTBUG-10822", Abort); VERIFY_ERRORS(0); QObject *object = component.create(); @@ -855,11 +855,11 @@ void tst_qdeclarativelanguage::dynamicObjectProperties() } // Tests the declaration of dynamic signals and slots -void tst_qdeclarativelanguage::dynamicSignalsAndSlots() +void tst_qqmllanguage::dynamicSignalsAndSlots() { QTest::ignoreMessage(QtDebugMsg, "1921"); - QDeclarativeComponent component(&engine, TEST_FILE("dynamicSignalsAndSlots.qml")); + QQmlComponent component(&engine, TEST_FILE("dynamicSignalsAndSlots.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -873,9 +873,9 @@ void tst_qdeclarativelanguage::dynamicSignalsAndSlots() QCOMPARE(object->property("test").toInt(), 10); } -void tst_qdeclarativelanguage::simpleBindings() +void tst_qqmllanguage::simpleBindings() { - QDeclarativeComponent component(&engine, TEST_FILE("simpleBindings.qml")); + QQmlComponent component(&engine, TEST_FILE("simpleBindings.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -886,9 +886,9 @@ void tst_qdeclarativelanguage::simpleBindings() QCOMPARE(object->property("objectProperty"), QVariant::fromValue(object)); } -void tst_qdeclarativelanguage::autoComponentCreation() +void tst_qqmllanguage::autoComponentCreation() { - QDeclarativeComponent component(&engine, TEST_FILE("autoComponentCreation.qml")); + QQmlComponent component(&engine, TEST_FILE("autoComponentCreation.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -898,10 +898,10 @@ void tst_qdeclarativelanguage::autoComponentCreation() QCOMPARE(child->realProperty(), qreal(9)); } -void tst_qdeclarativelanguage::propertyValueSource() +void tst_qqmllanguage::propertyValueSource() { { - QDeclarativeComponent component(&engine, TEST_FILE("propertyValueSource.qml")); + QQmlComponent component(&engine, TEST_FILE("propertyValueSource.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -909,7 +909,7 @@ void tst_qdeclarativelanguage::propertyValueSource() QList valueSources; QObjectList allChildren = object->findChildren(); foreach (QObject *child, allChildren) { - if (qobject_cast(child)) + if (qobject_cast(child)) valueSources.append(child); } @@ -922,7 +922,7 @@ void tst_qdeclarativelanguage::propertyValueSource() } { - QDeclarativeComponent component(&engine, TEST_FILE("propertyValueSource.2.qml")); + QQmlComponent component(&engine, TEST_FILE("propertyValueSource.2.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -930,7 +930,7 @@ void tst_qdeclarativelanguage::propertyValueSource() QList valueSources; QObjectList allChildren = object->findChildren(); foreach (QObject *child, allChildren) { - if (qobject_cast(child)) + if (qobject_cast(child)) valueSources.append(child); } @@ -943,9 +943,9 @@ void tst_qdeclarativelanguage::propertyValueSource() } } -void tst_qdeclarativelanguage::attachedProperties() +void tst_qqmllanguage::attachedProperties() { - QDeclarativeComponent component(&engine, TEST_FILE("attachedProperties.qml")); + QQmlComponent component(&engine, TEST_FILE("attachedProperties.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -956,27 +956,27 @@ void tst_qdeclarativelanguage::attachedProperties() } // Tests non-static object properties -void tst_qdeclarativelanguage::dynamicObjects() +void tst_qqmllanguage::dynamicObjects() { - QDeclarativeComponent component(&engine, TEST_FILE("dynamicObject.1.qml")); + QQmlComponent component(&engine, TEST_FILE("dynamicObject.1.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); } // Tests the registration of custom variant string converters -void tst_qdeclarativelanguage::customVariantTypes() +void tst_qqmllanguage::customVariantTypes() { - QDeclarativeComponent component(&engine, TEST_FILE("customVariantTypes.qml")); + QQmlComponent component(&engine, TEST_FILE("customVariantTypes.qml")); VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->customType().a, 10); } -void tst_qdeclarativelanguage::valueTypes() +void tst_qqmllanguage::valueTypes() { - QDeclarativeComponent component(&engine, TEST_FILE("valueTypes.qml")); + QQmlComponent component(&engine, TEST_FILE("valueTypes.qml")); VERIFY_ERRORS(0); QString message = component.url().toString() + ":2:1: QML MyTypeObject: Binding loop detected for property \"rectProperty.width\""; @@ -997,22 +997,22 @@ void tst_qdeclarativelanguage::valueTypes() // ### #if 0 - QDeclarativeProperty p(object, "rectProperty.x"); + QQmlProperty p(object, "rectProperty.x"); QCOMPARE(p.read(), QVariant(12)); p.write(13); QCOMPARE(p.read(), QVariant(13)); - quint32 r = QDeclarativePropertyPrivate::saveValueType(p.coreIndex(), p.valueTypeCoreIndex()); - QDeclarativeProperty p2; - QDeclarativePropertyPrivate::restore(p2, r, object); + quint32 r = QQmlPropertyPrivate::saveValueType(p.coreIndex(), p.valueTypeCoreIndex()); + QQmlProperty p2; + QQmlPropertyPrivate::restore(p2, r, object); QCOMPARE(p2.read(), QVariant(13)); #endif } -void tst_qdeclarativelanguage::cppnamespace() +void tst_qqmllanguage::cppnamespace() { { - QDeclarativeComponent component(&engine, TEST_FILE("cppnamespace.qml")); + QQmlComponent component(&engine, TEST_FILE("cppnamespace.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1020,7 +1020,7 @@ void tst_qdeclarativelanguage::cppnamespace() } { - QDeclarativeComponent component(&engine, TEST_FILE("cppnamespace.2.qml")); + QQmlComponent component(&engine, TEST_FILE("cppnamespace.2.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1028,11 +1028,11 @@ void tst_qdeclarativelanguage::cppnamespace() } } -void tst_qdeclarativelanguage::aliasProperties() +void tst_qqmllanguage::aliasProperties() { // Simple "int" alias { - QDeclarativeComponent component(&engine, TEST_FILE("alias.1.qml")); + QQmlComponent component(&engine, TEST_FILE("alias.1.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1052,7 +1052,7 @@ void tst_qdeclarativelanguage::aliasProperties() // Complex object alias { - QDeclarativeComponent component(&engine, TEST_FILE("alias.2.qml")); + QQmlComponent component(&engine, TEST_FILE("alias.2.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1077,7 +1077,7 @@ void tst_qdeclarativelanguage::aliasProperties() // Nested aliases { - QDeclarativeComponent component(&engine, TEST_FILE("alias.3.qml")); + QQmlComponent component(&engine, TEST_FILE("alias.3.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1098,7 +1098,7 @@ void tst_qdeclarativelanguage::aliasProperties() // Enum aliases { - QDeclarativeComponent component(&engine, TEST_FILE("alias.4.qml")); + QQmlComponent component(&engine, TEST_FILE("alias.4.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1110,7 +1110,7 @@ void tst_qdeclarativelanguage::aliasProperties() // Id aliases { - QDeclarativeComponent component(&engine, TEST_FILE("alias.5.qml")); + QQmlComponent component(&engine, TEST_FILE("alias.5.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1132,7 +1132,7 @@ void tst_qdeclarativelanguage::aliasProperties() // Nested aliases - this used to cause a crash { - QDeclarativeComponent component(&engine, TEST_FILE("alias.6.qml")); + QQmlComponent component(&engine, TEST_FILE("alias.6.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1143,7 +1143,7 @@ void tst_qdeclarativelanguage::aliasProperties() // Ptr Alias Cleanup - check that aliases to ptr types return 0 // if the object aliased to is removed { - QDeclarativeComponent component(&engine, TEST_FILE("alias.7.qml")); + QQmlComponent component(&engine, TEST_FILE("alias.7.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); @@ -1169,7 +1169,7 @@ void tst_qdeclarativelanguage::aliasProperties() // Simple composite type { - QDeclarativeComponent component(&engine, TEST_FILE("alias.8.qml")); + QQmlComponent component(&engine, TEST_FILE("alias.8.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1181,7 +1181,7 @@ void tst_qdeclarativelanguage::aliasProperties() // Complex composite type { - QDeclarativeComponent component(&engine, TEST_FILE("alias.9.qml")); + QQmlComponent component(&engine, TEST_FILE("alias.9.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1194,7 +1194,7 @@ void tst_qdeclarativelanguage::aliasProperties() // Valuetype alias // Simple "int" alias { - QDeclarativeComponent component(&engine, TEST_FILE("alias.10.qml")); + QQmlComponent component(&engine, TEST_FILE("alias.10.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1214,7 +1214,7 @@ void tst_qdeclarativelanguage::aliasProperties() // Valuetype sub-alias { - QDeclarativeComponent component(&engine, TEST_FILE("alias.11.qml")); + QQmlComponent component(&engine, TEST_FILE("alias.11.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1234,9 +1234,9 @@ void tst_qdeclarativelanguage::aliasProperties() } // QTBUG-13374 Test that alias properties and signals can coexist -void tst_qdeclarativelanguage::aliasPropertiesAndSignals() +void tst_qqmllanguage::aliasPropertiesAndSignals() { - QDeclarativeComponent component(&engine, TEST_FILE("aliasPropertiesAndSignals.qml")); + QQmlComponent component(&engine, TEST_FILE("aliasPropertiesAndSignals.qml")); VERIFY_ERRORS(0); QObject *o = component.create(); QVERIFY(o); @@ -1245,9 +1245,9 @@ void tst_qdeclarativelanguage::aliasPropertiesAndSignals() } // Test that the root element in a composite type can be a Component -void tst_qdeclarativelanguage::componentCompositeType() +void tst_qqmllanguage::componentCompositeType() { - QDeclarativeComponent component(&engine, TEST_FILE("componentCompositeType.qml")); + QQmlComponent component(&engine, TEST_FILE("componentCompositeType.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1265,7 +1265,7 @@ class TestType2 : public QObject { TestType2(QObject *p=0) : QObject(p) {} }; -void tst_qdeclarativelanguage::i18n_data() +void tst_qqmllanguage::i18n_data() { QTest::addColumn("file"); QTest::addColumn("stringProperty"); @@ -1277,11 +1277,11 @@ void tst_qdeclarativelanguage::i18n_data() QTest::newRow("i18nNameSpace") << "i18nNameSpace.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 40"); } -void tst_qdeclarativelanguage::i18n() +void tst_qqmllanguage::i18n() { QFETCH(QString, file); QFETCH(QString, stringProperty); - QDeclarativeComponent component(&engine, TEST_FILE(file)); + QQmlComponent component(&engine, TEST_FILE(file)); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -1291,9 +1291,9 @@ void tst_qdeclarativelanguage::i18n() } // Check that the Component::onCompleted attached property works -void tst_qdeclarativelanguage::onCompleted() +void tst_qqmllanguage::onCompleted() { - QDeclarativeComponent component(&engine, TEST_FILE("onCompleted.qml")); + QQmlComponent component(&engine, TEST_FILE("onCompleted.qml")); VERIFY_ERRORS(0); QTest::ignoreMessage(QtDebugMsg, "Completed 6 10"); QTest::ignoreMessage(QtDebugMsg, "Completed 6 10"); @@ -1303,9 +1303,9 @@ void tst_qdeclarativelanguage::onCompleted() } // Check that the Component::onDestruction attached property works -void tst_qdeclarativelanguage::onDestruction() +void tst_qqmllanguage::onDestruction() { - QDeclarativeComponent component(&engine, TEST_FILE("onDestruction.qml")); + QQmlComponent component(&engine, TEST_FILE("onDestruction.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -1315,11 +1315,11 @@ void tst_qdeclarativelanguage::onDestruction() delete object; } -// Check that assignments to QDeclarativeScriptString properties work -void tst_qdeclarativelanguage::scriptString() +// Check that assignments to QQmlScriptString properties work +void tst_qqmllanguage::scriptString() { { - QDeclarativeComponent component(&engine, TEST_FILE("scriptString.qml")); + QQmlComponent component(&engine, TEST_FILE("scriptString.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); @@ -1335,7 +1335,7 @@ void tst_qdeclarativelanguage::scriptString() } { - QDeclarativeComponent component(&engine, TEST_FILE("scriptString2.qml")); + QQmlComponent component(&engine, TEST_FILE("scriptString2.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); @@ -1344,7 +1344,7 @@ void tst_qdeclarativelanguage::scriptString() } { - QDeclarativeComponent component(&engine, TEST_FILE("scriptString3.qml")); + QQmlComponent component(&engine, TEST_FILE("scriptString3.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); @@ -1353,7 +1353,7 @@ void tst_qdeclarativelanguage::scriptString() } { - QDeclarativeComponent component(&engine, TEST_FILE("scriptString4.qml")); + QQmlComponent component(&engine, TEST_FILE("scriptString4.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); @@ -1364,9 +1364,9 @@ void tst_qdeclarativelanguage::scriptString() // Check that default property assignments are correctly spliced into explicit // property assignments -void tst_qdeclarativelanguage::defaultPropertyListOrder() +void tst_qqmllanguage::defaultPropertyListOrder() { - QDeclarativeComponent component(&engine, TEST_FILE("defaultPropertyListOrder.qml")); + QQmlComponent component(&engine, TEST_FILE("defaultPropertyListOrder.qml")); VERIFY_ERRORS(0); MyContainer *container = qobject_cast(component.create()); @@ -1381,15 +1381,15 @@ void tst_qdeclarativelanguage::defaultPropertyListOrder() QCOMPARE(container->getChildren()->at(5)->property("index"), QVariant(5)); } -void tst_qdeclarativelanguage::declaredPropertyValues() +void tst_qqmllanguage::declaredPropertyValues() { - QDeclarativeComponent component(&engine, TEST_FILE("declaredPropertyValues.qml")); + QQmlComponent component(&engine, TEST_FILE("declaredPropertyValues.qml")); VERIFY_ERRORS(0); } -void tst_qdeclarativelanguage::dontDoubleCallClassBegin() +void tst_qqmllanguage::dontDoubleCallClassBegin() { - QDeclarativeComponent component(&engine, TEST_FILE("dontDoubleCallClassBegin.qml")); + QQmlComponent component(&engine, TEST_FILE("dontDoubleCallClassBegin.qml")); QObject *o = component.create(); QVERIFY(o); @@ -1401,7 +1401,7 @@ void tst_qdeclarativelanguage::dontDoubleCallClassBegin() delete o; } -void tst_qdeclarativelanguage::reservedWords_data() +void tst_qqmllanguage::reservedWords_data() { QTest::addColumn("word"); @@ -1467,18 +1467,18 @@ void tst_qdeclarativelanguage::reservedWords_data() QTest::newRow("with") << QByteArray("with"); } -void tst_qdeclarativelanguage::reservedWords() +void tst_qqmllanguage::reservedWords() { QFETCH(QByteArray, word); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nQtObject { property string " + word + " }", QUrl()); QCOMPARE(component.errorString(), QLatin1String(":2 Expected token `identifier'\n")); } // Check that first child of qml is of given type. Empty type insists on error. -void tst_qdeclarativelanguage::testType(const QString& qml, const QString& type, const QString& expectederror) +void tst_qqmllanguage::testType(const QString& qml, const QString& type, const QString& expectederror) { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(qml.toUtf8(), TEST_FILE("empty.qml")); // just a file for relative local imports QTRY_VERIFY(!component.isLoading()); @@ -1486,7 +1486,7 @@ void tst_qdeclarativelanguage::testType(const QString& qml, const QString& type, if (type.isEmpty()) { QVERIFY(component.isError()); QString actualerror; - foreach (const QDeclarativeError e, component.errors()) { + foreach (const QQmlError e, component.errors()) { if (!actualerror.isEmpty()) actualerror.append("; "); actualerror.append(e.description()); @@ -1502,9 +1502,9 @@ void tst_qdeclarativelanguage::testType(const QString& qml, const QString& type, } // QTBUG-17276 -void tst_qdeclarativelanguage::inlineAssignmentsOverrideBindings() +void tst_qqmllanguage::inlineAssignmentsOverrideBindings() { - QDeclarativeComponent component(&engine, TEST_FILE("inlineAssignmentsOverrideBindings.qml")); + QQmlComponent component(&engine, TEST_FILE("inlineAssignmentsOverrideBindings.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -1513,13 +1513,13 @@ void tst_qdeclarativelanguage::inlineAssignmentsOverrideBindings() } // QTBUG-19354 -void tst_qdeclarativelanguage::nestedComponentRoots() +void tst_qqmllanguage::nestedComponentRoots() { - QDeclarativeComponent component(&engine, TEST_FILE("nestedComponentRoots.qml")); + QQmlComponent component(&engine, TEST_FILE("nestedComponentRoots.qml")); } // Import tests (QT-558) -void tst_qdeclarativelanguage::importsBuiltin_data() +void tst_qqmllanguage::importsBuiltin_data() { // QT-610 @@ -1633,7 +1633,7 @@ void tst_qdeclarativelanguage::importsBuiltin_data() << ""; } -void tst_qdeclarativelanguage::importsBuiltin() +void tst_qqmllanguage::importsBuiltin() { QFETCH(QString, qml); QFETCH(QString, type); @@ -1641,7 +1641,7 @@ void tst_qdeclarativelanguage::importsBuiltin() testType(qml,type,error); } -void tst_qdeclarativelanguage::importsLocal_data() +void tst_qqmllanguage::importsLocal_data() { QTest::addColumn("qml"); QTest::addColumn("type"); @@ -1690,7 +1690,7 @@ void tst_qdeclarativelanguage::importsLocal_data() << (!qmlCheckTypes()?"":"Test is ambiguous. Found in com/nokia/Test and in subdir"); } -void tst_qdeclarativelanguage::importsLocal() +void tst_qqmllanguage::importsLocal() { QFETCH(QString, qml); QFETCH(QString, type); @@ -1698,20 +1698,20 @@ void tst_qdeclarativelanguage::importsLocal() testType(qml,type,error); } -void tst_qdeclarativelanguage::basicRemote_data() +void tst_qqmllanguage::basicRemote_data() { QTest::addColumn("url"); QTest::addColumn("type"); QTest::addColumn("error"); - QString serverdir = "http://127.0.0.1:14447/qtest/declarative/qmllanguage/"; + QString serverdir = "http://127.0.0.1:14447/qtest/qml/qqmllanguage/"; QTest::newRow("no need for qmldir") << QUrl(serverdir+"Test.qml") << "" << ""; QTest::newRow("absent qmldir") << QUrl(serverdir+"/noqmldir/Test.qml") << "" << ""; QTest::newRow("need qmldir") << QUrl(serverdir+"TestLocal.qml") << "" << ""; } -void tst_qdeclarativelanguage::basicRemote() +void tst_qqmllanguage::basicRemote() { QFETCH(QUrl, url); QFETCH(QString, type); @@ -1720,7 +1720,7 @@ void tst_qdeclarativelanguage::basicRemote() TestHTTPServer server(14447); server.serveDirectory(testdata()); - QDeclarativeComponent component(&engine, url); + QQmlComponent component(&engine, url); QTRY_VERIFY(!component.isLoading()); @@ -1733,13 +1733,13 @@ void tst_qdeclarativelanguage::basicRemote() } } -void tst_qdeclarativelanguage::importsRemote_data() +void tst_qqmllanguage::importsRemote_data() { QTest::addColumn("qml"); QTest::addColumn("type"); QTest::addColumn("error"); - QString serverdir = "http://127.0.0.1:14447/qtest/declarative/qmllanguage"; + QString serverdir = "http://127.0.0.1:14447/qtest/qml/qqmllanguage"; QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QQuickRectangle" << ""; @@ -1755,7 +1755,7 @@ void tst_qdeclarativelanguage::importsRemote_data() << "UndeclaredLocal is not a type"; } -void tst_qdeclarativelanguage::importsRemote() +void tst_qqmllanguage::importsRemote() { QFETCH(QString, qml); QFETCH(QString, type); @@ -1767,7 +1767,7 @@ void tst_qdeclarativelanguage::importsRemote() testType(qml,type,error); } -void tst_qdeclarativelanguage::importsInstalled_data() +void tst_qqmllanguage::importsInstalled_data() { // QT-610 @@ -1823,7 +1823,7 @@ void tst_qdeclarativelanguage::importsInstalled_data() << "PrivateType is not a type"; } -void tst_qdeclarativelanguage::importsInstalled() +void tst_qqmllanguage::importsInstalled() { QFETCH(QString, qml); QFETCH(QString, type); @@ -1832,7 +1832,7 @@ void tst_qdeclarativelanguage::importsInstalled() } -void tst_qdeclarativelanguage::importsOrder_data() +void tst_qqmllanguage::importsOrder_data() { QTest::addColumn("qml"); QTest::addColumn("type"); @@ -1907,7 +1907,7 @@ void tst_qdeclarativelanguage::importsOrder_data() << (!qmlCheckTypes()?"":"LocalLast is ambiguous. Found in lib/com/nokia/installedtest and in local directory"); } -void tst_qdeclarativelanguage::importsOrder() +void tst_qqmllanguage::importsOrder() { QFETCH(QString, qml); QFETCH(QString, type); @@ -1915,11 +1915,11 @@ void tst_qdeclarativelanguage::importsOrder() testType(qml,type,error); } -void tst_qdeclarativelanguage::importIncorrectCase() +void tst_qqmllanguage::importIncorrectCase() { - QDeclarativeComponent component(&engine, TEST_FILE("importIncorrectCase.qml")); + QQmlComponent component(&engine, TEST_FILE("importIncorrectCase.qml")); - QList errors = component.errors(); + QList errors = component.errors(); QCOMPARE(errors.count(), 1); #if defined(Q_OS_MAC) || defined(Q_OS_WIN32) @@ -1931,7 +1931,7 @@ void tst_qdeclarativelanguage::importIncorrectCase() QCOMPARE(errors.at(0).description(), expectedError); } -void tst_qdeclarativelanguage::importJs_data() +void tst_qqmllanguage::importJs_data() { QTest::addColumn("file"); QTest::addColumn("errorFile"); @@ -1988,13 +1988,13 @@ void tst_qdeclarativelanguage::importJs_data() << true; } -void tst_qdeclarativelanguage::importJs() +void tst_qqmllanguage::importJs() { QFETCH(QString, file); QFETCH(QString, errorFile); QFETCH(bool, performTest); - QDeclarativeComponent component(&engine, TEST_FILE(file)); + QQmlComponent component(&engine, TEST_FILE(file)); { DETERMINE_ERRORS(errorFile.toLatin1().constData(),expected,actual); @@ -2014,7 +2014,7 @@ void tst_qdeclarativelanguage::importJs() } } -void tst_qdeclarativelanguage::qmlAttachedPropertiesObjectMethod() +void tst_qqmllanguage::qmlAttachedPropertiesObjectMethod() { QObject object; @@ -2022,7 +2022,7 @@ void tst_qdeclarativelanguage::qmlAttachedPropertiesObjectMethod() QCOMPARE(qmlAttachedPropertiesObject(&object, true), (QObject *)0); { - QDeclarativeComponent component(&engine, TEST_FILE("qmlAttachedPropertiesObjectMethod.1.qml")); + QQmlComponent component(&engine, TEST_FILE("qmlAttachedPropertiesObjectMethod.1.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -2032,7 +2032,7 @@ void tst_qdeclarativelanguage::qmlAttachedPropertiesObjectMethod() } { - QDeclarativeComponent component(&engine, TEST_FILE("qmlAttachedPropertiesObjectMethod.2.qml")); + QQmlComponent component(&engine, TEST_FILE("qmlAttachedPropertiesObjectMethod.2.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -2042,21 +2042,21 @@ void tst_qdeclarativelanguage::qmlAttachedPropertiesObjectMethod() } } -void tst_qdeclarativelanguage::crash1() +void tst_qqmllanguage::crash1() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nComponent {}", QUrl()); } -void tst_qdeclarativelanguage::crash2() +void tst_qqmllanguage::crash2() { - QDeclarativeComponent component(&engine, TEST_FILE("crash2.qml")); + QQmlComponent component(&engine, TEST_FILE("crash2.qml")); } // QTBUG-8676 -void tst_qdeclarativelanguage::customOnProperty() +void tst_qqmllanguage::customOnProperty() { - QDeclarativeComponent component(&engine, TEST_FILE("customOnProperty.qml")); + QQmlComponent component(&engine, TEST_FILE("customOnProperty.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); @@ -2068,9 +2068,9 @@ void tst_qdeclarativelanguage::customOnProperty() } // QTBUG-12601 -void tst_qdeclarativelanguage::variantNotify() +void tst_qqmllanguage::variantNotify() { - QDeclarativeComponent component(&engine, TEST_FILE("variantNotify.qml")); + QQmlComponent component(&engine, TEST_FILE("variantNotify.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); @@ -2081,10 +2081,10 @@ void tst_qdeclarativelanguage::variantNotify() delete object; } -void tst_qdeclarativelanguage::revisions() +void tst_qqmllanguage::revisions() { { - QDeclarativeComponent component(&engine, TEST_FILE("revisions11.qml")); + QQmlComponent component(&engine, TEST_FILE("revisions11.qml")); VERIFY_ERRORS(0); MyRevisionedClass *object = qobject_cast(component.create()); @@ -2095,8 +2095,8 @@ void tst_qdeclarativelanguage::revisions() delete object; } { - QDeclarativeEngine myEngine; - QDeclarativeComponent component(&myEngine, TEST_FILE("revisionssub11.qml")); + QQmlEngine myEngine; + QQmlComponent component(&myEngine, TEST_FILE("revisionssub11.qml")); VERIFY_ERRORS(0); MyRevisionedSubclass *object = qobject_cast(component.create()); @@ -2110,7 +2110,7 @@ void tst_qdeclarativelanguage::revisions() delete object; } { - QDeclarativeComponent component(&engine, TEST_FILE("versionedbase.qml")); + QQmlComponent component(&engine, TEST_FILE("versionedbase.qml")); VERIFY_ERRORS(0); MySubclass *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -2122,21 +2122,21 @@ void tst_qdeclarativelanguage::revisions() } } -void tst_qdeclarativelanguage::revisionOverloads() +void tst_qqmllanguage::revisionOverloads() { { - QDeclarativeComponent component(&engine, TEST_FILE("allowedRevisionOverloads.qml")); + QQmlComponent component(&engine, TEST_FILE("allowedRevisionOverloads.qml")); VERIFY_ERRORS(0); } { - QDeclarativeComponent component(&engine, TEST_FILE("disallowedRevisionOverloads.qml")); + QQmlComponent component(&engine, TEST_FILE("disallowedRevisionOverloads.qml")); QEXPECT_FAIL("", "QTBUG-13849", Abort); QVERIFY(0); VERIFY_ERRORS("disallowedRevisionOverloads.errors.txt"); } } -void tst_qdeclarativelanguage::initTestCase() +void tst_qqmllanguage::initTestCase() { QString testdataDir = QFileInfo(QFINDTESTDATA("data")).absolutePath(); QVERIFY2(QDir::setCurrent(testdataDir), qPrintable("Could not chdir to " + testdataDir)); @@ -2167,10 +2167,10 @@ void tst_qdeclarativelanguage::initTestCase() out.write(in.readAll()); } -void tst_qdeclarativelanguage::aliasPropertyChangeSignals() +void tst_qqmllanguage::aliasPropertyChangeSignals() { { - QDeclarativeComponent component(&engine, TEST_FILE("aliasPropertyChangeSignals.qml")); + QQmlComponent component(&engine, TEST_FILE("aliasPropertyChangeSignals.qml")); VERIFY_ERRORS(0); QObject *o = component.create(); @@ -2183,7 +2183,7 @@ void tst_qdeclarativelanguage::aliasPropertyChangeSignals() // QTCREATORBUG-2769 { - QDeclarativeComponent component(&engine, TEST_FILE("aliasPropertyChangeSignals.2.qml")); + QQmlComponent component(&engine, TEST_FILE("aliasPropertyChangeSignals.2.qml")); VERIFY_ERRORS(0); QObject *o = component.create(); @@ -2196,10 +2196,10 @@ void tst_qdeclarativelanguage::aliasPropertyChangeSignals() } // Tests property initializers -void tst_qdeclarativelanguage::propertyInit() +void tst_qqmllanguage::propertyInit() { { - QDeclarativeComponent component(&engine, TEST_FILE("propertyInit.1.qml")); + QQmlComponent component(&engine, TEST_FILE("propertyInit.1.qml")); VERIFY_ERRORS(0); QObject *o = component.create(); @@ -2211,7 +2211,7 @@ void tst_qdeclarativelanguage::propertyInit() } { - QDeclarativeComponent component(&engine, TEST_FILE("propertyInit.2.qml")); + QQmlComponent component(&engine, TEST_FILE("propertyInit.2.qml")); VERIFY_ERRORS(0); QObject *o = component.create(); @@ -2225,9 +2225,9 @@ void tst_qdeclarativelanguage::propertyInit() // Test that registration order doesn't break type availability // QTBUG-16878 -void tst_qdeclarativelanguage::registrationOrder() +void tst_qqmllanguage::registrationOrder() { - QDeclarativeComponent component(&engine, TEST_FILE("registrationOrder.qml")); + QQmlComponent component(&engine, TEST_FILE("registrationOrder.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -2235,9 +2235,9 @@ void tst_qdeclarativelanguage::registrationOrder() delete o; } -void tst_qdeclarativelanguage::readonly() +void tst_qqmllanguage::readonly() { - QDeclarativeComponent component(&engine, TEST_FILE("readonly.qml")); + QQmlComponent component(&engine, TEST_FILE("readonly.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -2270,12 +2270,12 @@ void tst_qdeclarativelanguage::readonly() } // QTBUG-18268 -void tst_qdeclarativelanguage::remoteLoadCrash() +void tst_qqmllanguage::remoteLoadCrash() { TestHTTPServer server(14448); server.serveDirectory(testdata()); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Text {}", QUrl("http://127.0.0.1:14448/remoteLoadCrash.qml")); while (component.isLoading()) QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents | QEventLoop::WaitForMoreEvents, 50); @@ -2284,6 +2284,6 @@ void tst_qdeclarativelanguage::remoteLoadCrash() delete o; } -QTEST_MAIN(tst_qdeclarativelanguage) +QTEST_MAIN(tst_qqmllanguage) -#include "tst_qdeclarativelanguage.moc" +#include "tst_qqmllanguage.moc" diff --git a/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml b/tests/auto/qml/qqmllistreference/data/MyType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelistreference/data/MyType.qml rename to tests/auto/qml/qqmllistreference/data/MyType.qml diff --git a/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml b/tests/auto/qml/qqmllistreference/data/engineTypes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml rename to tests/auto/qml/qqmllistreference/data/engineTypes.qml diff --git a/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml b/tests/auto/qml/qqmllistreference/data/variantToList.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml rename to tests/auto/qml/qqmllistreference/data/variantToList.qml diff --git a/tests/auto/qml/qqmllistreference/qqmllistreference.pro b/tests/auto/qml/qqmllistreference/qqmllistreference.pro new file mode 100644 index 0000000000..baca1e7c71 --- /dev/null +++ b/tests/auto/qml/qqmllistreference/qqmllistreference.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qqmllistreference +macx:CONFIG -= app_bundle + +SOURCES += tst_qqmllistreference.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private qml-private testlib diff --git a/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp b/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp similarity index 65% rename from tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp rename to tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp index bfd2ea2f42..bcb8ee8963 100644 --- a/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp +++ b/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp @@ -43,19 +43,19 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include "../../shared/util.h" -class tst_qdeclarativelistreference : public QDeclarativeDataTest +class tst_qqmllistreference : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativelistreference() {} + tst_qqmllistreference() {} private slots: void initTestCase(); @@ -81,29 +81,29 @@ private slots: class TestType : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty data READ dataProperty) + Q_PROPERTY(QQmlListProperty data READ dataProperty) Q_PROPERTY(int intProperty READ intProperty) public: TestType() : property(this, data) {} - QDeclarativeListProperty dataProperty() { return property; } + QQmlListProperty dataProperty() { return property; } int intProperty() const { return 10; } QList data; - QDeclarativeListProperty property; + QQmlListProperty property; }; -void tst_qdeclarativelistreference::initTestCase() +void tst_qqmllistreference::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); qmlRegisterType(); } -void tst_qdeclarativelistreference::qmllistreference() +void tst_qqmllistreference::qmllistreference() { TestType tt; - QDeclarativeListReference r(&tt, "data"); + QQmlListReference r(&tt, "data"); QVERIFY(r.isValid() == true); QCOMPARE(r.count(), 0); @@ -111,13 +111,13 @@ void tst_qdeclarativelistreference::qmllistreference() QCOMPARE(r.count(), 1); } -void tst_qdeclarativelistreference::qmllistreference_invalid() +void tst_qqmllistreference::qmllistreference_invalid() { TestType tt; // Invalid { - QDeclarativeListReference r; + QQmlListReference r; QVERIFY(r.isValid() == false); QVERIFY(r.object() == 0); QVERIFY(r.listElementType() == 0); @@ -132,7 +132,7 @@ void tst_qdeclarativelistreference::qmllistreference_invalid() // Non-property { - QDeclarativeListReference r(&tt, "blah"); + QQmlListReference r(&tt, "blah"); QVERIFY(r.isValid() == false); QVERIFY(r.object() == 0); QVERIFY(r.listElementType() == 0); @@ -147,7 +147,7 @@ void tst_qdeclarativelistreference::qmllistreference_invalid() // Non-list property { - QDeclarativeListReference r(&tt, "intProperty"); + QQmlListReference r(&tt, "intProperty"); QVERIFY(r.isValid() == false); QVERIFY(r.object() == 0); QVERIFY(r.listElementType() == 0); @@ -161,88 +161,88 @@ void tst_qdeclarativelistreference::qmllistreference_invalid() } } -void tst_qdeclarativelistreference::isValid() +void tst_qqmllistreference::isValid() { TestType *tt = new TestType; { - QDeclarativeListReference ref; + QQmlListReference ref; QVERIFY(ref.isValid() == false); } { - QDeclarativeListReference ref(tt, "blah"); + QQmlListReference ref(tt, "blah"); QVERIFY(ref.isValid() == false); } { - QDeclarativeListReference ref(tt, "data"); + QQmlListReference ref(tt, "data"); QVERIFY(ref.isValid() == true); delete tt; QVERIFY(ref.isValid() == false); } } -void tst_qdeclarativelistreference::object() +void tst_qqmllistreference::object() { TestType *tt = new TestType; { - QDeclarativeListReference ref; + QQmlListReference ref; QVERIFY(ref.object() == 0); } { - QDeclarativeListReference ref(tt, "blah"); + QQmlListReference ref(tt, "blah"); QVERIFY(ref.object() == 0); } { - QDeclarativeListReference ref(tt, "data"); + QQmlListReference ref(tt, "data"); QVERIFY(ref.object() == tt); delete tt; QVERIFY(ref.object() == 0); } } -void tst_qdeclarativelistreference::listElementType() +void tst_qqmllistreference::listElementType() { TestType *tt = new TestType; { - QDeclarativeListReference ref; + QQmlListReference ref; QVERIFY(ref.listElementType() == 0); } { - QDeclarativeListReference ref(tt, "blah"); + QQmlListReference ref(tt, "blah"); QVERIFY(ref.listElementType() == 0); } { - QDeclarativeListReference ref(tt, "data"); + QQmlListReference ref(tt, "data"); QVERIFY(ref.listElementType() == &TestType::staticMetaObject); delete tt; QVERIFY(ref.listElementType() == 0); } } -void tst_qdeclarativelistreference::canAppend() +void tst_qqmllistreference::canAppend() { TestType *tt = new TestType; { - QDeclarativeListReference ref; + QQmlListReference ref; QVERIFY(ref.canAppend() == false); } { - QDeclarativeListReference ref(tt, "blah"); + QQmlListReference ref(tt, "blah"); QVERIFY(ref.canAppend() == false); } { - QDeclarativeListReference ref(tt, "data"); + QQmlListReference ref(tt, "data"); QVERIFY(ref.canAppend() == true); delete tt; QVERIFY(ref.canAppend() == false); @@ -251,27 +251,27 @@ void tst_qdeclarativelistreference::canAppend() { TestType tt; tt.property.append = 0; - QDeclarativeListReference ref(&tt, "data"); + QQmlListReference ref(&tt, "data"); QVERIFY(ref.canAppend() == false); } } -void tst_qdeclarativelistreference::canAt() +void tst_qqmllistreference::canAt() { TestType *tt = new TestType; { - QDeclarativeListReference ref; + QQmlListReference ref; QVERIFY(ref.canAt() == false); } { - QDeclarativeListReference ref(tt, "blah"); + QQmlListReference ref(tt, "blah"); QVERIFY(ref.canAt() == false); } { - QDeclarativeListReference ref(tt, "data"); + QQmlListReference ref(tt, "data"); QVERIFY(ref.canAt() == true); delete tt; QVERIFY(ref.canAt() == false); @@ -280,27 +280,27 @@ void tst_qdeclarativelistreference::canAt() { TestType tt; tt.property.at = 0; - QDeclarativeListReference ref(&tt, "data"); + QQmlListReference ref(&tt, "data"); QVERIFY(ref.canAt() == false); } } -void tst_qdeclarativelistreference::canClear() +void tst_qqmllistreference::canClear() { TestType *tt = new TestType; { - QDeclarativeListReference ref; + QQmlListReference ref; QVERIFY(ref.canClear() == false); } { - QDeclarativeListReference ref(tt, "blah"); + QQmlListReference ref(tt, "blah"); QVERIFY(ref.canClear() == false); } { - QDeclarativeListReference ref(tt, "data"); + QQmlListReference ref(tt, "data"); QVERIFY(ref.canClear() == true); delete tt; QVERIFY(ref.canClear() == false); @@ -309,27 +309,27 @@ void tst_qdeclarativelistreference::canClear() { TestType tt; tt.property.clear = 0; - QDeclarativeListReference ref(&tt, "data"); + QQmlListReference ref(&tt, "data"); QVERIFY(ref.canClear() == false); } } -void tst_qdeclarativelistreference::canCount() +void tst_qqmllistreference::canCount() { TestType *tt = new TestType; { - QDeclarativeListReference ref; + QQmlListReference ref; QVERIFY(ref.canCount() == false); } { - QDeclarativeListReference ref(tt, "blah"); + QQmlListReference ref(tt, "blah"); QVERIFY(ref.canCount() == false); } { - QDeclarativeListReference ref(tt, "data"); + QQmlListReference ref(tt, "data"); QVERIFY(ref.canCount() == true); delete tt; QVERIFY(ref.canCount() == false); @@ -338,28 +338,28 @@ void tst_qdeclarativelistreference::canCount() { TestType tt; tt.property.count = 0; - QDeclarativeListReference ref(&tt, "data"); + QQmlListReference ref(&tt, "data"); QVERIFY(ref.canCount() == false); } } -void tst_qdeclarativelistreference::append() +void tst_qqmllistreference::append() { TestType *tt = new TestType; QObject object; { - QDeclarativeListReference ref; + QQmlListReference ref; QVERIFY(ref.append(tt) == false); } { - QDeclarativeListReference ref(tt, "blah"); + QQmlListReference ref(tt, "blah"); QVERIFY(ref.append(tt) == false); } { - QDeclarativeListReference ref(tt, "data"); + QQmlListReference ref(tt, "data"); QVERIFY(ref.append(tt) == true); QVERIFY(tt->data.count() == 1); QVERIFY(tt->data.at(0) == tt); @@ -377,12 +377,12 @@ void tst_qdeclarativelistreference::append() { TestType tt; tt.property.append = 0; - QDeclarativeListReference ref(&tt, "data"); + QQmlListReference ref(&tt, "data"); QVERIFY(ref.append(&tt) == false); } } -void tst_qdeclarativelistreference::at() +void tst_qqmllistreference::at() { TestType *tt = new TestType; tt->data.append(tt); @@ -390,17 +390,17 @@ void tst_qdeclarativelistreference::at() tt->data.append(tt); { - QDeclarativeListReference ref; + QQmlListReference ref; QVERIFY(ref.at(0) == 0); } { - QDeclarativeListReference ref(tt, "blah"); + QQmlListReference ref(tt, "blah"); QVERIFY(ref.at(0) == 0); } { - QDeclarativeListReference ref(tt, "data"); + QQmlListReference ref(tt, "data"); QVERIFY(ref.at(0) == tt); QVERIFY(ref.at(1) == 0); QVERIFY(ref.at(2) == tt); @@ -412,12 +412,12 @@ void tst_qdeclarativelistreference::at() TestType tt; tt.data.append(&tt); tt.property.at = 0; - QDeclarativeListReference ref(&tt, "data"); + QQmlListReference ref(&tt, "data"); QVERIFY(ref.at(0) == 0); } } -void tst_qdeclarativelistreference::clear() +void tst_qqmllistreference::clear() { TestType *tt = new TestType; tt->data.append(tt); @@ -425,17 +425,17 @@ void tst_qdeclarativelistreference::clear() tt->data.append(tt); { - QDeclarativeListReference ref; + QQmlListReference ref; QVERIFY(ref.clear() == false); } { - QDeclarativeListReference ref(tt, "blah"); + QQmlListReference ref(tt, "blah"); QVERIFY(ref.clear() == false); } { - QDeclarativeListReference ref(tt, "data"); + QQmlListReference ref(tt, "data"); QVERIFY(ref.clear() == true); QVERIFY(tt->data.count() == 0); delete tt; @@ -445,12 +445,12 @@ void tst_qdeclarativelistreference::clear() { TestType tt; tt.property.clear = 0; - QDeclarativeListReference ref(&tt, "data"); + QQmlListReference ref(&tt, "data"); QVERIFY(ref.clear() == false); } } -void tst_qdeclarativelistreference::count() +void tst_qqmllistreference::count() { TestType *tt = new TestType; tt->data.append(tt); @@ -458,17 +458,17 @@ void tst_qdeclarativelistreference::count() tt->data.append(tt); { - QDeclarativeListReference ref; + QQmlListReference ref; QVERIFY(ref.count() == 0); } { - QDeclarativeListReference ref(tt, "blah"); + QQmlListReference ref(tt, "blah"); QVERIFY(ref.count() == 0); } { - QDeclarativeListReference ref(tt, "data"); + QQmlListReference ref(tt, "data"); QVERIFY(ref.count() == 3); tt->data.removeAt(1); QVERIFY(ref.count() == 2); @@ -480,23 +480,23 @@ void tst_qdeclarativelistreference::count() TestType tt; tt.data.append(&tt); tt.property.count = 0; - QDeclarativeListReference ref(&tt, "data"); + QQmlListReference ref(&tt, "data"); QVERIFY(ref.count() == 0); } } -void tst_qdeclarativelistreference::copy() +void tst_qqmllistreference::copy() { TestType tt; tt.data.append(&tt); tt.data.append(0); tt.data.append(&tt); - QDeclarativeListReference *r1 = new QDeclarativeListReference(&tt, "data"); + QQmlListReference *r1 = new QQmlListReference(&tt, "data"); QVERIFY(r1->count() == 3); - QDeclarativeListReference r2(*r1); - QDeclarativeListReference r3; + QQmlListReference r2(*r1); + QQmlListReference r3; r3 = *r1; QVERIFY(r2.count() == 3); @@ -513,37 +513,37 @@ void tst_qdeclarativelistreference::copy() QVERIFY(r3.count() == 2); } -void tst_qdeclarativelistreference::qmlmetaproperty() +void tst_qqmllistreference::qmlmetaproperty() { TestType tt; tt.data.append(&tt); tt.data.append(0); tt.data.append(&tt); - QDeclarativeProperty prop(&tt, QLatin1String("data")); + QQmlProperty prop(&tt, QLatin1String("data")); QVariant v = prop.read(); - QVERIFY(v.userType() == qMetaTypeId()); - QDeclarativeListReference ref = qvariant_cast(v); + QVERIFY(v.userType() == qMetaTypeId()); + QQmlListReference ref = qvariant_cast(v); QVERIFY(ref.count() == 3); QVERIFY(ref.listElementType() == &TestType::staticMetaObject); } -void tst_qdeclarativelistreference::engineTypes() +void tst_qqmllistreference::engineTypes() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("engineTypes.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("engineTypes.qml")); QObject *o = component.create(); QVERIFY(o); - QDeclarativeProperty p1(o, QLatin1String("myList")); - QVERIFY(p1.propertyTypeCategory() == QDeclarativeProperty::Normal); + QQmlProperty p1(o, QLatin1String("myList")); + QVERIFY(p1.propertyTypeCategory() == QQmlProperty::Normal); - QDeclarativeProperty p2(o, QLatin1String("myList"), engine.rootContext()); - QVERIFY(p2.propertyTypeCategory() == QDeclarativeProperty::List); + QQmlProperty p2(o, QLatin1String("myList"), engine.rootContext()); + QVERIFY(p2.propertyTypeCategory() == QQmlProperty::List); QVariant v = p2.read(); - QVERIFY(v.userType() == qMetaTypeId()); - QDeclarativeListReference ref = qvariant_cast(v); + QVERIFY(v.userType() == qMetaTypeId()); + QQmlListReference ref = qvariant_cast(v); QVERIFY(ref.count() == 2); QVERIFY(ref.listElementType()); QVERIFY(ref.listElementType() != &QObject::staticMetaObject); @@ -551,20 +551,20 @@ void tst_qdeclarativelistreference::engineTypes() delete o; } -void tst_qdeclarativelistreference::variantToList() +void tst_qqmllistreference::variantToList() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("variantToList.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("variantToList.qml")); QObject *o = component.create(); QVERIFY(o); - QVERIFY(o->property("value").userType() == qMetaTypeId()); + QVERIFY(o->property("value").userType() == qMetaTypeId()); QCOMPARE(o->property("test").toInt(), 1); delete o; } -QTEST_MAIN(tst_qdeclarativelistreference) +QTEST_MAIN(tst_qqmllistreference) -#include "tst_qdeclarativelistreference.moc" +#include "tst_qqmllistreference.moc" diff --git a/tests/auto/declarative/qdeclarativelocale/data/date.qml b/tests/auto/qml/qqmllocale/data/date.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelocale/data/date.qml rename to tests/auto/qml/qqmllocale/data/date.qml diff --git a/tests/auto/declarative/qdeclarativelocale/data/functions.qml b/tests/auto/qml/qqmllocale/data/functions.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelocale/data/functions.qml rename to tests/auto/qml/qqmllocale/data/functions.qml diff --git a/tests/auto/declarative/qdeclarativelocale/data/localeCompare.qml b/tests/auto/qml/qqmllocale/data/localeCompare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelocale/data/localeCompare.qml rename to tests/auto/qml/qqmllocale/data/localeCompare.qml diff --git a/tests/auto/declarative/qdeclarativelocale/data/number.qml b/tests/auto/qml/qqmllocale/data/number.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelocale/data/number.qml rename to tests/auto/qml/qqmllocale/data/number.qml diff --git a/tests/auto/declarative/qdeclarativelocale/data/properties.qml b/tests/auto/qml/qqmllocale/data/properties.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelocale/data/properties.qml rename to tests/auto/qml/qqmllocale/data/properties.qml diff --git a/tests/auto/declarative/qdeclarativeconsole/qdeclarativeconsole.pro b/tests/auto/qml/qqmllocale/qqmllocale.pro similarity index 65% rename from tests/auto/declarative/qdeclarativeconsole/qdeclarativeconsole.pro rename to tests/auto/qml/qqmllocale/qqmllocale.pro index 0563491c1e..1773f83f91 100644 --- a/tests/auto/declarative/qdeclarativeconsole/qdeclarativeconsole.pro +++ b/tests/auto/qml/qqmllocale/qqmllocale.pro @@ -1,10 +1,10 @@ CONFIG += testcase -TARGET = tst_qdeclarativeconsole -SOURCES += tst_qdeclarativeconsole.cpp +TARGET = tst_qqmllocale +macx:CONFIG -= app_bundle -include (../../shared/util.pri) +SOURCES += tst_qqmllocale.cpp -macx:CONFIG -= app_bundle +include (../../shared/util.pri) testDataFiles.files = data testDataFiles.path = . @@ -12,4 +12,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += declarative testlib +QT += qml testlib diff --git a/tests/auto/declarative/qdeclarativelocale/tst_qdeclarativelocale.cpp b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp similarity index 85% rename from tests/auto/declarative/qdeclarativelocale/tst_qdeclarativelocale.cpp rename to tests/auto/qml/qqmllocale/tst_qqmllocale.cpp index bf5c8c7af4..af1a81847b 100644 --- a/tests/auto/declarative/qdeclarativelocale/tst_qdeclarativelocale.cpp +++ b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp @@ -41,17 +41,17 @@ #include #include -#include -#include +#include +#include #include #include #include "../../shared/util.h" -class tst_qdeclarativelocale : public QDeclarativeDataTest +class tst_qqmllocale : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativelocale() { } + tst_qqmllocale() { } private slots: void defaultLocale(); @@ -118,12 +118,12 @@ private slots: void addDateTimeFormatData(const QString &l); void addDateFormatData(const QString &l); void addTimeFormatData(const QString &l); - QDeclarativeEngine engine; + QQmlEngine engine; }; -void tst_qdeclarativelocale::defaultLocale() +void tst_qqmllocale::defaultLocale() { - QDeclarativeComponent c(&engine, testFileUrl("properties.qml")); + QQmlComponent c(&engine, testFileUrl("properties.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -133,7 +133,7 @@ void tst_qdeclarativelocale::defaultLocale() #define LOCALE_PROP(type,prop) { #prop, QVariant(type(qlocale.prop())) } -void tst_qdeclarativelocale::addPropertyData(const QString &l) +void tst_qqmllocale::addPropertyData(const QString &l) { QLocale qlocale(l); @@ -168,7 +168,7 @@ void tst_qdeclarativelocale::addPropertyData(const QString &l) } } -void tst_qdeclarativelocale::properties_data() +void tst_qqmllocale::properties_data() { QTest::addColumn("locale"); QTest::addColumn("property"); @@ -182,13 +182,13 @@ void tst_qdeclarativelocale::properties_data() addPropertyData("th_TH"); } -void tst_qdeclarativelocale::properties() +void tst_qqmllocale::properties() { QFETCH(QString, locale); QFETCH(QByteArray, property); QFETCH(QVariant, value); - QDeclarativeComponent c(&engine, testFileUrl("properties.qml")); + QQmlComponent c(&engine, testFileUrl("properties.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -201,7 +201,7 @@ void tst_qdeclarativelocale::properties() delete obj; } -void tst_qdeclarativelocale::addCurrencySymbolData(const QString &l) +void tst_qqmllocale::addCurrencySymbolData(const QString &l) { QByteArray locale = l.toLatin1(); QTest::newRow(locale.constData()) << l << -1; @@ -214,7 +214,7 @@ void tst_qdeclarativelocale::addCurrencySymbolData(const QString &l) QTest::newRow(t.constData()) << l << (int)QLocale::CurrencyDisplayName; } -void tst_qdeclarativelocale::currencySymbol_data() +void tst_qqmllocale::currencySymbol_data() { QTest::addColumn("locale"); QTest::addColumn("param"); @@ -227,12 +227,12 @@ void tst_qdeclarativelocale::currencySymbol_data() addCurrencySymbolData("th_TH"); } -void tst_qdeclarativelocale::currencySymbol() +void tst_qqmllocale::currencySymbol() { QFETCH(QString, locale); QFETCH(int, param); - QDeclarativeComponent c(&engine, testFileUrl("functions.qml")); + QQmlComponent c(&engine, testFileUrl("functions.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -256,7 +256,7 @@ void tst_qdeclarativelocale::currencySymbol() delete obj; } -void tst_qdeclarativelocale::addFormatNameData(const QString &l) +void tst_qqmllocale::addFormatNameData(const QString &l) { QByteArray locale = l.toLatin1(); QTest::newRow(locale.constData()) << l << -1; @@ -269,7 +269,7 @@ void tst_qdeclarativelocale::addFormatNameData(const QString &l) QTest::newRow(t.constData()) << l << (int)QLocale::NarrowFormat; } -void tst_qdeclarativelocale::addStandardFormatData() +void tst_qqmllocale::addStandardFormatData() { QTest::addColumn("locale"); QTest::addColumn("param"); @@ -282,17 +282,17 @@ void tst_qdeclarativelocale::addStandardFormatData() addFormatNameData("th_TH"); } -void tst_qdeclarativelocale::monthName_data() +void tst_qqmllocale::monthName_data() { addStandardFormatData(); } -void tst_qdeclarativelocale::monthName() +void tst_qqmllocale::monthName() { QFETCH(QString, locale); QFETCH(int, param); - QDeclarativeComponent c(&engine, testFileUrl("functions.qml")); + QQmlComponent c(&engine, testFileUrl("functions.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -319,17 +319,17 @@ void tst_qdeclarativelocale::monthName() delete obj; } -void tst_qdeclarativelocale::standaloneMonthName_data() +void tst_qqmllocale::standaloneMonthName_data() { addStandardFormatData(); } -void tst_qdeclarativelocale::standaloneMonthName() +void tst_qqmllocale::standaloneMonthName() { QFETCH(QString, locale); QFETCH(int, param); - QDeclarativeComponent c(&engine, testFileUrl("functions.qml")); + QQmlComponent c(&engine, testFileUrl("functions.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -356,17 +356,17 @@ void tst_qdeclarativelocale::standaloneMonthName() delete obj; } -void tst_qdeclarativelocale::dayName_data() +void tst_qqmllocale::dayName_data() { addStandardFormatData(); } -void tst_qdeclarativelocale::dayName() +void tst_qqmllocale::dayName() { QFETCH(QString, locale); QFETCH(int, param); - QDeclarativeComponent c(&engine, testFileUrl("functions.qml")); + QQmlComponent c(&engine, testFileUrl("functions.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -392,17 +392,17 @@ void tst_qdeclarativelocale::dayName() delete obj; } -void tst_qdeclarativelocale::standaloneDayName_data() +void tst_qqmllocale::standaloneDayName_data() { addStandardFormatData(); } -void tst_qdeclarativelocale::standaloneDayName() +void tst_qqmllocale::standaloneDayName() { QFETCH(QString, locale); QFETCH(int, param); - QDeclarativeComponent c(&engine, testFileUrl("functions.qml")); + QQmlComponent c(&engine, testFileUrl("functions.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -426,7 +426,7 @@ void tst_qdeclarativelocale::standaloneDayName() delete obj; } -void tst_qdeclarativelocale::weekDays_data() +void tst_qqmllocale::weekDays_data() { QTest::addColumn("locale"); @@ -438,11 +438,11 @@ void tst_qdeclarativelocale::weekDays_data() QTest::newRow("th_TH") << "th_TH"; } -void tst_qdeclarativelocale::weekDays() +void tst_qqmllocale::weekDays() { QFETCH(QString, locale); - QDeclarativeComponent c(&engine, testFileUrl("properties.qml")); + QQmlComponent c(&engine, testFileUrl("properties.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -468,7 +468,7 @@ void tst_qdeclarativelocale::weekDays() delete obj; } -void tst_qdeclarativelocale::uiLanguages_data() +void tst_qqmllocale::uiLanguages_data() { QTest::addColumn("locale"); @@ -480,11 +480,11 @@ void tst_qdeclarativelocale::uiLanguages_data() QTest::newRow("th_TH") << "th_TH"; } -void tst_qdeclarativelocale::uiLanguages() +void tst_qqmllocale::uiLanguages() { QFETCH(QString, locale); - QDeclarativeComponent c(&engine, testFileUrl("properties.qml")); + QQmlComponent c(&engine, testFileUrl("properties.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -508,17 +508,17 @@ void tst_qdeclarativelocale::uiLanguages() } -void tst_qdeclarativelocale::dateTimeFormat_data() +void tst_qqmllocale::dateTimeFormat_data() { addStandardFormatData(); } -void tst_qdeclarativelocale::dateTimeFormat() +void tst_qqmllocale::dateTimeFormat() { QFETCH(QString, locale); QFETCH(int, param); - QDeclarativeComponent c(&engine, testFileUrl("functions.qml")); + QQmlComponent c(&engine, testFileUrl("functions.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -537,17 +537,17 @@ void tst_qdeclarativelocale::dateTimeFormat() QCOMPARE(val.toString(), l.dateTimeFormat(format)); } -void tst_qdeclarativelocale::dateFormat_data() +void tst_qqmllocale::dateFormat_data() { addStandardFormatData(); } -void tst_qdeclarativelocale::dateFormat() +void tst_qqmllocale::dateFormat() { QFETCH(QString, locale); QFETCH(int, param); - QDeclarativeComponent c(&engine, testFileUrl("functions.qml")); + QQmlComponent c(&engine, testFileUrl("functions.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -566,17 +566,17 @@ void tst_qdeclarativelocale::dateFormat() QCOMPARE(val.toString(), l.dateFormat(format)); } -void tst_qdeclarativelocale::timeFormat_data() +void tst_qqmllocale::timeFormat_data() { addStandardFormatData(); } -void tst_qdeclarativelocale::timeFormat() +void tst_qqmllocale::timeFormat() { QFETCH(QString, locale); QFETCH(int, param); - QDeclarativeComponent c(&engine, testFileUrl("functions.qml")); + QQmlComponent c(&engine, testFileUrl("functions.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -595,17 +595,17 @@ void tst_qdeclarativelocale::timeFormat() QCOMPARE(val.toString(), l.timeFormat(format)); } -void tst_qdeclarativelocale::dateToLocaleString_data() +void tst_qqmllocale::dateToLocaleString_data() { addStandardFormatData(); } -void tst_qdeclarativelocale::dateToLocaleString() +void tst_qqmllocale::dateToLocaleString() { QFETCH(QString, locale); QFETCH(int, param); - QDeclarativeComponent c(&engine, testFileUrl("date.qml")); + QQmlComponent c(&engine, testFileUrl("date.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -628,7 +628,7 @@ void tst_qdeclarativelocale::dateToLocaleString() QCOMPARE(val.toString(), l.toString(dt, format)); } -void tst_qdeclarativelocale::addDateTimeFormatData(const QString &l) +void tst_qqmllocale::addDateTimeFormatData(const QString &l) { const char *formats[] = { "hh:mm dd.MM.yyyy", @@ -648,7 +648,7 @@ void tst_qdeclarativelocale::addDateTimeFormatData(const QString &l) } } -void tst_qdeclarativelocale::dateToLocaleStringFormatted_data() +void tst_qqmllocale::dateToLocaleStringFormatted_data() { QTest::addColumn("locale"); QTest::addColumn("format"); @@ -661,12 +661,12 @@ void tst_qdeclarativelocale::dateToLocaleStringFormatted_data() addDateTimeFormatData("th_TH"); } -void tst_qdeclarativelocale::dateToLocaleStringFormatted() +void tst_qqmllocale::dateToLocaleStringFormatted() { QFETCH(QString, locale); QFETCH(QString, format); - QDeclarativeComponent c(&engine, testFileUrl("date.qml")); + QQmlComponent c(&engine, testFileUrl("date.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -687,17 +687,17 @@ void tst_qdeclarativelocale::dateToLocaleStringFormatted() QCOMPARE(val.toString(), l.toString(dt, format)); } -void tst_qdeclarativelocale::dateToLocaleDateString_data() +void tst_qqmllocale::dateToLocaleDateString_data() { addStandardFormatData(); } -void tst_qdeclarativelocale::dateToLocaleDateString() +void tst_qqmllocale::dateToLocaleDateString() { QFETCH(QString, locale); QFETCH(int, param); - QDeclarativeComponent c(&engine, testFileUrl("date.qml")); + QQmlComponent c(&engine, testFileUrl("date.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -720,7 +720,7 @@ void tst_qdeclarativelocale::dateToLocaleDateString() QCOMPARE(val.toString(), l.toString(dt.date(), format)); } -void tst_qdeclarativelocale::addDateFormatData(const QString &l) +void tst_qqmllocale::addDateFormatData(const QString &l) { const char *formats[] = { "dd.MM.yyyy", @@ -740,7 +740,7 @@ void tst_qdeclarativelocale::addDateFormatData(const QString &l) } } -void tst_qdeclarativelocale::dateToLocaleDateStringFormatted_data() +void tst_qqmllocale::dateToLocaleDateStringFormatted_data() { QTest::addColumn("locale"); QTest::addColumn("format"); @@ -753,12 +753,12 @@ void tst_qdeclarativelocale::dateToLocaleDateStringFormatted_data() addDateFormatData("th_TH"); } -void tst_qdeclarativelocale::dateToLocaleDateStringFormatted() +void tst_qqmllocale::dateToLocaleDateStringFormatted() { QFETCH(QString, locale); QFETCH(QString, format); - QDeclarativeComponent c(&engine, testFileUrl("date.qml")); + QQmlComponent c(&engine, testFileUrl("date.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -779,17 +779,17 @@ void tst_qdeclarativelocale::dateToLocaleDateStringFormatted() QCOMPARE(val.toString(), l.toString(dt.date(), format)); } -void tst_qdeclarativelocale::dateToLocaleTimeString_data() +void tst_qqmllocale::dateToLocaleTimeString_data() { addStandardFormatData(); } -void tst_qdeclarativelocale::dateToLocaleTimeString() +void tst_qqmllocale::dateToLocaleTimeString() { QFETCH(QString, locale); QFETCH(int, param); - QDeclarativeComponent c(&engine, testFileUrl("date.qml")); + QQmlComponent c(&engine, testFileUrl("date.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -812,7 +812,7 @@ void tst_qdeclarativelocale::dateToLocaleTimeString() QCOMPARE(val.toString(), l.toString(dt.time(), format)); } -void tst_qdeclarativelocale::addTimeFormatData(const QString &l) +void tst_qqmllocale::addTimeFormatData(const QString &l) { const char *formats[] = { "hh:mm", @@ -832,7 +832,7 @@ void tst_qdeclarativelocale::addTimeFormatData(const QString &l) } } -void tst_qdeclarativelocale::dateToLocaleTimeStringFormatted_data() +void tst_qqmllocale::dateToLocaleTimeStringFormatted_data() { QTest::addColumn("locale"); QTest::addColumn("format"); @@ -845,12 +845,12 @@ void tst_qdeclarativelocale::dateToLocaleTimeStringFormatted_data() addTimeFormatData("th_TH"); } -void tst_qdeclarativelocale::dateToLocaleTimeStringFormatted() +void tst_qqmllocale::dateToLocaleTimeStringFormatted() { QFETCH(QString, locale); QFETCH(QString, format); - QDeclarativeComponent c(&engine, testFileUrl("date.qml")); + QQmlComponent c(&engine, testFileUrl("date.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -871,7 +871,7 @@ void tst_qdeclarativelocale::dateToLocaleTimeStringFormatted() QCOMPARE(val.toString(), l.toString(dt.time(), format)); } -void tst_qdeclarativelocale::dateFromLocaleString_data() +void tst_qqmllocale::dateFromLocaleString_data() { QTest::addColumn("locale"); QTest::addColumn("format"); @@ -887,12 +887,12 @@ void tst_qdeclarativelocale::dateFromLocaleString_data() QTest::newRow("zh_CN short") << "zh_CN" << QLocale("zh_CN").dateTimeFormat(QLocale::ShortFormat); } -void tst_qdeclarativelocale::dateFromLocaleString() +void tst_qqmllocale::dateFromLocaleString() { QFETCH(QString, locale); QFETCH(QString, format); - QDeclarativeComponent c(&engine, testFileUrl("date.qml")); + QQmlComponent c(&engine, testFileUrl("date.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -915,7 +915,7 @@ void tst_qdeclarativelocale::dateFromLocaleString() QCOMPARE(val.toDateTime(), pd); } -void tst_qdeclarativelocale::dateFromLocaleDateString_data() +void tst_qqmllocale::dateFromLocaleDateString_data() { QTest::addColumn("locale"); QTest::addColumn("format"); @@ -931,12 +931,12 @@ void tst_qdeclarativelocale::dateFromLocaleDateString_data() QTest::newRow("zh_CN short") << "zh_CN" << QLocale("zh_CN").dateTimeFormat(QLocale::ShortFormat); } -void tst_qdeclarativelocale::dateFromLocaleDateString() +void tst_qqmllocale::dateFromLocaleDateString() { QFETCH(QString, locale); QFETCH(QString, format); - QDeclarativeComponent c(&engine, testFileUrl("date.qml")); + QQmlComponent c(&engine, testFileUrl("date.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -959,7 +959,7 @@ void tst_qdeclarativelocale::dateFromLocaleDateString() QCOMPARE(val.toDate(), pd); } -void tst_qdeclarativelocale::dateFromLocaleTimeString_data() +void tst_qqmllocale::dateFromLocaleTimeString_data() { QTest::addColumn("locale"); QTest::addColumn("format"); @@ -975,12 +975,12 @@ void tst_qdeclarativelocale::dateFromLocaleTimeString_data() QTest::newRow("zh_CN short") << "zh_CN" << QLocale("zh_CN").dateTimeFormat(QLocale::ShortFormat); } -void tst_qdeclarativelocale::dateFromLocaleTimeString() +void tst_qqmllocale::dateFromLocaleTimeString() { QFETCH(QString, locale); QFETCH(QString, format); - QDeclarativeComponent c(&engine, testFileUrl("date.qml")); + QQmlComponent c(&engine, testFileUrl("date.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -1003,7 +1003,7 @@ void tst_qdeclarativelocale::dateFromLocaleTimeString() QCOMPARE(val.toTime(), pd); } -void tst_qdeclarativelocale::numberToLocaleString_data() +void tst_qqmllocale::numberToLocaleString_data() { QTest::addColumn("locale"); QTest::addColumn("format"); @@ -1019,13 +1019,13 @@ void tst_qdeclarativelocale::numberToLocaleString_data() QTest::newRow("ar_SA 2") << "ar_SA" << 'g' << 3; } -void tst_qdeclarativelocale::numberToLocaleString() +void tst_qqmllocale::numberToLocaleString() { QFETCH(QString, locale); QFETCH(char, format); QFETCH(int, prec); - QDeclarativeComponent c(&engine, testFileUrl("number.qml")); + QQmlComponent c(&engine, testFileUrl("number.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -1047,7 +1047,7 @@ void tst_qdeclarativelocale::numberToLocaleString() QCOMPARE(val.toString(), l.toString(number, format, prec)); } -void tst_qdeclarativelocale::numberToLocaleCurrencyString_data() +void tst_qqmllocale::numberToLocaleCurrencyString_data() { QTest::addColumn("locale"); QTest::addColumn("symbol"); @@ -1061,12 +1061,12 @@ void tst_qdeclarativelocale::numberToLocaleCurrencyString_data() QTest::newRow("th_TH") << "th_TH" << QString(); } -void tst_qdeclarativelocale::numberToLocaleCurrencyString() +void tst_qqmllocale::numberToLocaleCurrencyString() { QFETCH(QString, locale); QFETCH(QString, symbol); - QDeclarativeComponent c(&engine, testFileUrl("number.qml")); + QQmlComponent c(&engine, testFileUrl("number.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -1086,7 +1086,7 @@ void tst_qdeclarativelocale::numberToLocaleCurrencyString() QCOMPARE(val.toString(), l.toCurrencyString(number, symbol)); } -void tst_qdeclarativelocale::numberFromLocaleString_data() +void tst_qqmllocale::numberFromLocaleString_data() { QTest::addColumn("locale"); QTest::addColumn("number"); @@ -1101,12 +1101,12 @@ void tst_qdeclarativelocale::numberFromLocaleString_data() QTest::newRow("th_TH") << "th_TH" << 1234567.2345; } -void tst_qdeclarativelocale::numberFromLocaleString() +void tst_qqmllocale::numberFromLocaleString() { QFETCH(QString, locale); QFETCH(double, number); - QDeclarativeComponent c(&engine, testFileUrl("number.qml")); + QQmlComponent c(&engine, testFileUrl("number.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -1125,9 +1125,9 @@ void tst_qdeclarativelocale::numberFromLocaleString() QCOMPARE(val.toDouble(), l.toDouble(strNumber)); } -void tst_qdeclarativelocale::numberConstToLocaleString() +void tst_qqmllocale::numberConstToLocaleString() { - QDeclarativeComponent c(&engine, testFileUrl("number.qml")); + QQmlComponent c(&engine, testFileUrl("number.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -1140,7 +1140,7 @@ void tst_qdeclarativelocale::numberConstToLocaleString() QCOMPARE(obj->property("const2").toString(), l.toString(1234., 'f', 2)); } -void tst_qdeclarativelocale::stringLocaleCompare_data() +void tst_qqmllocale::stringLocaleCompare_data() { QTest::addColumn("string1"); QTest::addColumn("string2"); @@ -1162,12 +1162,12 @@ void tst_qdeclarativelocale::stringLocaleCompare_data() QTest::newRow("german3") << QString("z") << QString("\xf6"); } -void tst_qdeclarativelocale::stringLocaleCompare() +void tst_qqmllocale::stringLocaleCompare() { QFETCH(QString, string1); QFETCH(QString, string2); - QDeclarativeComponent c(&engine, testFileUrl("localeCompare.qml")); + QQmlComponent c(&engine, testFileUrl("localeCompare.qml")); QObject *obj = c.create(); QVERIFY(obj); @@ -1178,6 +1178,6 @@ void tst_qdeclarativelocale::stringLocaleCompare() QCOMPARE(obj->property("comparison").toInt(), QString::localeAwareCompare(string1, string2)); } -QTEST_MAIN(tst_qdeclarativelocale) +QTEST_MAIN(tst_qqmllocale) -#include "tst_qdeclarativelocale.moc" +#include "tst_qqmllocale.moc" diff --git a/tests/auto/qml/qqmlmetatype/qqmlmetatype.pro b/tests/auto/qml/qqmlmetatype/qqmlmetatype.pro new file mode 100644 index 0000000000..7c781dd9db --- /dev/null +++ b/tests/auto/qml/qqmlmetatype/qqmlmetatype.pro @@ -0,0 +1,7 @@ +CONFIG += testcase +TARGET = tst_qqmlmetatype +SOURCES += tst_qqmlmetatype.cpp +macx:CONFIG -= app_bundle + +CONFIG += parallel_test +QT += core-private gui-private qml-private widgets testlib diff --git a/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp b/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp new file mode 100644 index 0000000000..6e577ec095 --- /dev/null +++ b/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp @@ -0,0 +1,202 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#include +#include + +class tst_qqmlmetatype : public QObject +{ + Q_OBJECT +public: + tst_qqmlmetatype() {} + +private slots: + void initTestCase(); + + void qmlParserStatusCast(); + void qmlPropertyValueSourceCast(); + void qmlPropertyValueInterceptorCast(); + + void isList(); + + void defaultObject(); +}; + +class TestType : public QObject +{ + Q_OBJECT + Q_PROPERTY(int foo READ foo) + + Q_CLASSINFO("DefaultProperty", "foo") +public: + int foo() { return 0; } +}; +QML_DECLARE_TYPE(TestType); + +class ParserStatusTestType : public QObject, public QQmlParserStatus +{ + Q_OBJECT + void classBegin(){} + void componentComplete(){} + Q_CLASSINFO("DefaultProperty", "foo") // Missing default property + Q_INTERFACES(QQmlParserStatus) +}; +QML_DECLARE_TYPE(ParserStatusTestType); + +class ValueSourceTestType : public QObject, public QQmlPropertyValueSource +{ + Q_OBJECT + Q_INTERFACES(QQmlPropertyValueSource) +public: + virtual void setTarget(const QQmlProperty &) {} +}; +QML_DECLARE_TYPE(ValueSourceTestType); + +class ValueInterceptorTestType : public QObject, public QQmlPropertyValueInterceptor +{ + Q_OBJECT + Q_INTERFACES(QQmlPropertyValueInterceptor) +public: + virtual void setTarget(const QQmlProperty &) {} + virtual void write(const QVariant &) {} +}; +QML_DECLARE_TYPE(ValueInterceptorTestType); + +void tst_qqmlmetatype::initTestCase() +{ + qmlRegisterType("Test", 1, 0, "TestType"); + qmlRegisterType("Test", 1, 0, "ParserStatusTestType"); + qmlRegisterType("Test", 1, 0, "ValueSourceTestType"); + qmlRegisterType("Test", 1, 0, "ValueInterceptorTestType"); +} + +void tst_qqmlmetatype::qmlParserStatusCast() +{ + QVERIFY(QQmlMetaType::qmlType(QVariant::Int) == 0); + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); + QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->parserStatusCast(), -1); + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); + QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->parserStatusCast(), -1); + + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); + int cast = QQmlMetaType::qmlType(qMetaTypeId())->parserStatusCast(); + QVERIFY(cast != -1); + QVERIFY(cast != 0); + + ParserStatusTestType t; + QVERIFY(reinterpret_cast((QObject *)&t) != reinterpret_cast((QQmlParserStatus *)&t)); + + QQmlParserStatus *status = reinterpret_cast(reinterpret_cast((QObject *)&t) + cast); + QCOMPARE(status, (QQmlParserStatus*)&t); +} + +void tst_qqmlmetatype::qmlPropertyValueSourceCast() +{ + QVERIFY(QQmlMetaType::qmlType(QVariant::Int) == 0); + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); + QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->propertyValueSourceCast(), -1); + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); + QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->propertyValueSourceCast(), -1); + + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); + int cast = QQmlMetaType::qmlType(qMetaTypeId())->propertyValueSourceCast(); + QVERIFY(cast != -1); + QVERIFY(cast != 0); + + ValueSourceTestType t; + QVERIFY(reinterpret_cast((QObject *)&t) != reinterpret_cast((QQmlPropertyValueSource *)&t)); + + QQmlPropertyValueSource *source = reinterpret_cast(reinterpret_cast((QObject *)&t) + cast); + QCOMPARE(source, (QQmlPropertyValueSource*)&t); +} + +void tst_qqmlmetatype::qmlPropertyValueInterceptorCast() +{ + QVERIFY(QQmlMetaType::qmlType(QVariant::Int) == 0); + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); + QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->propertyValueInterceptorCast(), -1); + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); + QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->propertyValueInterceptorCast(), -1); + + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); + int cast = QQmlMetaType::qmlType(qMetaTypeId())->propertyValueInterceptorCast(); + QVERIFY(cast != -1); + QVERIFY(cast != 0); + + ValueInterceptorTestType t; + QVERIFY(reinterpret_cast((QObject *)&t) != reinterpret_cast((QQmlPropertyValueInterceptor *)&t)); + + QQmlPropertyValueInterceptor *interceptor = reinterpret_cast(reinterpret_cast((QObject *)&t) + cast); + QCOMPARE(interceptor, (QQmlPropertyValueInterceptor*)&t); +} + +void tst_qqmlmetatype::isList() +{ + QCOMPARE(QQmlMetaType::isList(QVariant::Invalid), false); + QCOMPARE(QQmlMetaType::isList(QVariant::Int), false); + + QQmlListProperty list; + + QCOMPARE(QQmlMetaType::isList(qMetaTypeId >()), true); +} + +void tst_qqmlmetatype::defaultObject() +{ + QVERIFY(QQmlMetaType::defaultProperty(&QObject::staticMetaObject).name() == 0); + QVERIFY(QQmlMetaType::defaultProperty(&ParserStatusTestType::staticMetaObject).name() == 0); + QCOMPARE(QString(QQmlMetaType::defaultProperty(&TestType::staticMetaObject).name()), QString("foo")); + + QObject o; + TestType t; + ParserStatusTestType p; + + QVERIFY(QQmlMetaType::defaultProperty((QObject *)0).name() == 0); + QVERIFY(QQmlMetaType::defaultProperty(&o).name() == 0); + QVERIFY(QQmlMetaType::defaultProperty(&p).name() == 0); + QCOMPARE(QString(QQmlMetaType::defaultProperty(&t).name()), QString("foo")); +} + +QTEST_MAIN(tst_qqmlmetatype) + +#include "tst_qqmlmetatype.moc" diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/implicit1/implicitQmldir.errors.txt b/tests/auto/qml/qqmlmoduleplugin/data/implicit1/implicitQmldir.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/implicit1/implicitQmldir.errors.txt rename to tests/auto/qml/qqmlmoduleplugin/data/implicit1/implicitQmldir.errors.txt diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/implicit1/qmldir b/tests/auto/qml/qqmlmoduleplugin/data/implicit1/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/implicit1/qmldir rename to tests/auto/qml/qqmlmoduleplugin/data/implicit1/qmldir diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/implicit1/temptest.qml b/tests/auto/qml/qqmlmoduleplugin/data/implicit1/temptest.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/implicit1/temptest.qml rename to tests/auto/qml/qqmlmoduleplugin/data/implicit1/temptest.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/implicit2/Test.qml b/tests/auto/qml/qqmlmoduleplugin/data/implicit2/Test.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/implicit2/Test.qml rename to tests/auto/qml/qqmlmoduleplugin/data/implicit2/Test.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/implicit2/implicitQmldir.2.errors.txt b/tests/auto/qml/qqmlmoduleplugin/data/implicit2/implicitQmldir.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/implicit2/implicitQmldir.2.errors.txt rename to tests/auto/qml/qqmlmoduleplugin/data/implicit2/implicitQmldir.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/implicit2/qmldir b/tests/auto/qml/qqmlmoduleplugin/data/implicit2/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/implicit2/qmldir rename to tests/auto/qml/qqmlmoduleplugin/data/implicit2/qmldir diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/implicit2/temptest2.qml b/tests/auto/qml/qqmlmoduleplugin/data/implicit2/temptest2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/implicit2/temptest2.qml rename to tests/auto/qml/qqmlmoduleplugin/data/implicit2/temptest2.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.2.qml b/tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.2.qml rename to tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.2.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.qml b/tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.qml rename to tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/incorrectCase.qml b/tests/auto/qml/qqmlmoduleplugin/data/incorrectCase.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/incorrectCase.qml rename to tests/auto/qml/qqmlmoduleplugin/data/incorrectCase.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/pluginWithQmlFile.qml b/tests/auto/qml/qqmlmoduleplugin/data/pluginWithQmlFile.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/pluginWithQmlFile.qml rename to tests/auto/qml/qqmlmoduleplugin/data/pluginWithQmlFile.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.errors.txt b/tests/auto/qml/qqmlmoduleplugin/data/versionNotInstalled.2.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.errors.txt rename to tests/auto/qml/qqmlmoduleplugin/data/versionNotInstalled.2.errors.txt diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.qml b/tests/auto/qml/qqmlmoduleplugin/data/versionNotInstalled.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.qml rename to tests/auto/qml/qqmlmoduleplugin/data/versionNotInstalled.2.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.errors.txt b/tests/auto/qml/qqmlmoduleplugin/data/versionNotInstalled.errors.txt similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.errors.txt rename to tests/auto/qml/qqmlmoduleplugin/data/versionNotInstalled.errors.txt diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.qml b/tests/auto/qml/qqmlmoduleplugin/data/versionNotInstalled.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.qml rename to tests/auto/qml/qqmlmoduleplugin/data/versionNotInstalled.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/works.qml b/tests/auto/qml/qqmlmoduleplugin/data/works.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/works.qml rename to tests/auto/qml/qqmlmoduleplugin/data/works.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/works2.qml b/tests/auto/qml/qqmlmoduleplugin/data/works2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/works2.qml rename to tests/auto/qml/qqmlmoduleplugin/data/works2.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/works21.qml b/tests/auto/qml/qqmlmoduleplugin/data/works21.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/data/works21.qml rename to tests/auto/qml/qqmlmoduleplugin/data/works21.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestPluginWithQmlFile/MyQmlFile.qml b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestPluginWithQmlFile/MyQmlFile.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestPluginWithQmlFile/MyQmlFile.qml rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestPluginWithQmlFile/MyQmlFile.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestPluginWithQmlFile/qmldir b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestPluginWithQmlFile/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestPluginWithQmlFile/qmldir rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestPluginWithQmlFile/qmldir diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/Foo.qml b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/Foo.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/Foo.qml rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/Foo.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/qmldir b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/qmldir rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/qmldir diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType.2.1/qmldir b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType.2.1/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType.2.1/qmldir rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType.2.1/qmldir diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType.2/qmldir b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType.2/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType.2/qmldir rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType.2/qmldir diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlVersionPluginType/qmldir b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlVersionPluginType/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlVersionPluginType/qmldir rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlVersionPluginType/qmldir diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/PureQmlModule/ComponentA.qml b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/PureQmlModule/ComponentA.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/PureQmlModule/ComponentA.qml rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/PureQmlModule/ComponentA.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/PureQmlModule/ComponentB.qml b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/PureQmlModule/ComponentB.qml similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/PureQmlModule/ComponentB.qml rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/PureQmlModule/ComponentB.qml diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/PureQmlModule/qmldir b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/PureQmlModule/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/PureQmlModule/qmldir rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/PureQmlModule/qmldir diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/WrongCase/qmldir b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/WrongCase/qmldir similarity index 100% rename from tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/WrongCase/qmldir rename to tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/WrongCase/qmldir diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2.1/plugin.2.1.pro b/tests/auto/qml/qqmlmoduleplugin/plugin.2.1/plugin.2.1.pro similarity index 60% rename from tests/auto/declarative/qdeclarativemoduleplugin/plugin.2.1/plugin.2.1.pro rename to tests/auto/qml/qqmlmoduleplugin/plugin.2.1/plugin.2.1.pro index 21835613af..ccb66abe0e 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2.1/plugin.2.1.pro +++ b/tests/auto/qml/qqmlmoduleplugin/plugin.2.1/plugin.2.1.pro @@ -1,7 +1,7 @@ TEMPLATE = lib CONFIG += plugin SOURCES = plugin.cpp -QT = core declarative +QT = core qml DESTDIR = ../imports/com/nokia/AutoTestQmlPluginType.2.1 -QT += core-private gui-private declarative-private +QT += core-private gui-private qml-private diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2.1/plugin.cpp b/tests/auto/qml/qqmlmoduleplugin/plugin.2.1/plugin.cpp similarity index 94% rename from tests/auto/declarative/qdeclarativemoduleplugin/plugin.2.1/plugin.cpp rename to tests/auto/qml/qqmlmoduleplugin/plugin.2.1/plugin.cpp index 27e0beb4be..53696b3598 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2.1/plugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/plugin.2.1/plugin.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include class MyPluginType : public QObject @@ -63,7 +63,7 @@ class MyPluginType : public QObject }; -class MyPlugin : public QDeclarativeExtensionPlugin +class MyPlugin : public QQmlExtensionPlugin { Q_OBJECT public: diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2/plugin.2.pro b/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro similarity index 59% rename from tests/auto/declarative/qdeclarativemoduleplugin/plugin.2/plugin.2.pro rename to tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro index 6d4f5fb301..7f3904f695 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2/plugin.2.pro +++ b/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro @@ -1,7 +1,7 @@ TEMPLATE = lib CONFIG += plugin SOURCES = plugin.cpp -QT = core declarative +QT = core qml DESTDIR = ../imports/com/nokia/AutoTestQmlPluginType.2 -QT += core-private gui-private declarative-private +QT += core-private gui-private qml-private diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2/plugin.cpp b/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.cpp similarity index 94% rename from tests/auto/declarative/qdeclarativemoduleplugin/plugin.2/plugin.cpp rename to tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.cpp index 904664ee0e..f62b8addd4 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2/plugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include class MyPluginType : public QObject @@ -63,7 +63,7 @@ class MyPluginType : public QObject }; -class MyPlugin : public QDeclarativeExtensionPlugin +class MyPlugin : public QQmlExtensionPlugin { Q_OBJECT public: diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp b/tests/auto/qml/qqmlmoduleplugin/plugin/plugin.cpp similarity index 94% rename from tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp rename to tests/auto/qml/qqmlmoduleplugin/plugin/plugin.cpp index 267535dd74..470aa7a37c 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/plugin/plugin.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include class MyPluginType : public QObject @@ -62,7 +62,7 @@ class MyPluginType : public QObject }; -class MyPlugin : public QDeclarativeExtensionPlugin +class MyPlugin : public QQmlExtensionPlugin { Q_OBJECT public: diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro b/tests/auto/qml/qqmlmoduleplugin/plugin/plugin.pro similarity index 59% rename from tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro rename to tests/auto/qml/qqmlmoduleplugin/plugin/plugin.pro index 61fab02109..dae8696cc8 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro +++ b/tests/auto/qml/qqmlmoduleplugin/plugin/plugin.pro @@ -1,7 +1,7 @@ TEMPLATE = lib CONFIG += plugin SOURCES = plugin.cpp -QT = core declarative +QT = core qml DESTDIR = ../imports/com/nokia/AutoTestQmlPluginType -QT += core-private gui-private declarative-private +QT += core-private gui-private qml-private diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp b/tests/auto/qml/qqmlmoduleplugin/pluginMixed/plugin.cpp similarity index 93% rename from tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp rename to tests/auto/qml/qqmlmoduleplugin/pluginMixed/plugin.cpp index 0052c6ee53..eec8e3f3af 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/pluginMixed/plugin.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include class BarPluginType : public QObject @@ -53,7 +53,7 @@ class BarPluginType : public QObject }; -class MyMixedPlugin : public QDeclarativeExtensionPlugin +class MyMixedPlugin : public QQmlExtensionPlugin { Q_OBJECT public: diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/pluginMixed.pro b/tests/auto/qml/qqmlmoduleplugin/pluginMixed/pluginMixed.pro similarity index 60% rename from tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/pluginMixed.pro rename to tests/auto/qml/qqmlmoduleplugin/pluginMixed/pluginMixed.pro index f8b279cbf6..c0f314ab5e 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/pluginMixed.pro +++ b/tests/auto/qml/qqmlmoduleplugin/pluginMixed/pluginMixed.pro @@ -1,7 +1,7 @@ TEMPLATE = lib CONFIG += plugin SOURCES = plugin.cpp -QT = core declarative +QT = core qml DESTDIR = ../imports/com/nokia/AutoTestQmlMixedPluginType -QT += core-private gui-private declarative-private +QT += core-private gui-private qml-private diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp b/tests/auto/qml/qqmlmoduleplugin/pluginVersion/plugin.cpp similarity index 93% rename from tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp rename to tests/auto/qml/qqmlmoduleplugin/pluginVersion/plugin.cpp index 6fc6eee1c7..8645028317 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/pluginVersion/plugin.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include class FloorPluginType : public QObject @@ -53,7 +53,7 @@ class FloorPluginType : public QObject }; -class MyMixedPlugin : public QDeclarativeExtensionPlugin +class MyMixedPlugin : public QQmlExtensionPlugin { Q_OBJECT public: diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/pluginVersion.pro b/tests/auto/qml/qqmlmoduleplugin/pluginVersion/pluginVersion.pro similarity index 60% rename from tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/pluginVersion.pro rename to tests/auto/qml/qqmlmoduleplugin/pluginVersion/pluginVersion.pro index 32e017e79d..ba9e4846ea 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/pluginVersion.pro +++ b/tests/auto/qml/qqmlmoduleplugin/pluginVersion/pluginVersion.pro @@ -1,7 +1,7 @@ TEMPLATE = lib CONFIG += plugin SOURCES = plugin.cpp -QT = core declarative +QT = core qml DESTDIR = ../imports/com/nokia/AutoTestQmlVersionPluginType -QT += core-private gui-private declarative-private +QT += core-private gui-private qml-private diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWithQmlFile/plugin.cpp b/tests/auto/qml/qqmlmoduleplugin/pluginWithQmlFile/plugin.cpp similarity index 92% rename from tests/auto/declarative/qdeclarativemoduleplugin/pluginWithQmlFile/plugin.cpp rename to tests/auto/qml/qqmlmoduleplugin/pluginWithQmlFile/plugin.cpp index 7cb0365abe..1217df4d0e 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWithQmlFile/plugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/pluginWithQmlFile/plugin.cpp @@ -39,11 +39,11 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include -class MyPlugin : public QDeclarativeExtensionPlugin +class MyPlugin : public QQmlExtensionPlugin { Q_OBJECT public: diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWithQmlFile/pluginWithQmlFile.pro b/tests/auto/qml/qqmlmoduleplugin/pluginWithQmlFile/pluginWithQmlFile.pro similarity index 60% rename from tests/auto/declarative/qdeclarativemoduleplugin/pluginWithQmlFile/pluginWithQmlFile.pro rename to tests/auto/qml/qqmlmoduleplugin/pluginWithQmlFile/pluginWithQmlFile.pro index 1b496d689a..15fe8d2f3e 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWithQmlFile/pluginWithQmlFile.pro +++ b/tests/auto/qml/qqmlmoduleplugin/pluginWithQmlFile/pluginWithQmlFile.pro @@ -1,7 +1,7 @@ TEMPLATE = lib CONFIG += plugin SOURCES = plugin.cpp -QT = core declarative +QT = core qml DESTDIR = ../imports/com/nokia/AutoTestPluginWithQmlFile -QT += core-private gui-private declarative-private +QT += core-private gui-private qml-private diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/plugin.cpp b/tests/auto/qml/qqmlmoduleplugin/pluginWrongCase/plugin.cpp similarity index 94% rename from tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/plugin.cpp rename to tests/auto/qml/qqmlmoduleplugin/pluginWrongCase/plugin.cpp index 2446c93bf9..e0257fe249 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/plugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/pluginWrongCase/plugin.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include class MyPluginType : public QObject @@ -62,7 +62,7 @@ class MyPluginType : public QObject }; -class MyPlugin : public QDeclarativeExtensionPlugin +class MyPlugin : public QQmlExtensionPlugin { Q_OBJECT public: diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/pluginWrongCase.pro b/tests/auto/qml/qqmlmoduleplugin/pluginWrongCase/pluginWrongCase.pro similarity index 60% rename from tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/pluginWrongCase.pro rename to tests/auto/qml/qqmlmoduleplugin/pluginWrongCase/pluginWrongCase.pro index 5d21114a2f..d604613300 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/pluginWrongCase.pro +++ b/tests/auto/qml/qqmlmoduleplugin/pluginWrongCase/pluginWrongCase.pro @@ -1,8 +1,8 @@ TEMPLATE = lib CONFIG += plugin SOURCES = plugin.cpp -QT = core declarative +QT = core qml TARGET = Plugin DESTDIR = ../imports/com/nokia/WrongCase -QT += core-private gui-private declarative-private +QT += core-private gui-private qml-private diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro b/tests/auto/qml/qqmlmoduleplugin/qqmlmoduleplugin.pro similarity index 51% rename from tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro rename to tests/auto/qml/qqmlmoduleplugin/qqmlmoduleplugin.pro index 25c6c6ad56..42eedc20f2 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro +++ b/tests/auto/qml/qqmlmoduleplugin/qqmlmoduleplugin.pro @@ -1,9 +1,9 @@ QT = core TEMPLATE = subdirs SUBDIRS = plugin plugin.2 plugin.2.1 pluginWrongCase pluginWithQmlFile pluginMixed pluginVersion -tst_qdeclarativemoduleplugin_pro.depends += plugin -SUBDIRS += tst_qdeclarativemoduleplugin.pro +tst_qqmlmoduleplugin_pro.depends += plugin +SUBDIRS += tst_qqmlmoduleplugin.pro CONFIG += parallel_test -QT += core-private gui-private declarative-private +QT += core-private gui-private qml-private diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp similarity index 74% rename from tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp rename to tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp index 46e5358fab..b574bad595 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include #include -#include -#include +#include +#include #include #include "../../shared/testhttpserver.h" @@ -51,7 +51,7 @@ #define SERVER_PORT 14450 -class tst_qdeclarativemoduleplugin : public QDeclarativeDataTest +class tst_qqmlmoduleplugin : public QQmlDataTest { Q_OBJECT public: @@ -75,9 +75,9 @@ private slots: QString m_importsDirectory; }; -void tst_qdeclarativemoduleplugin::initTestCase() +void tst_qqmlmoduleplugin::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); m_importsDirectory = directory() + QStringLiteral("/imports"); QVERIFY2(QFileInfo(m_importsDirectory).isDir(), qPrintable(QString::fromLatin1("Imports directory '%1' does not exist.").arg(m_importsDirectory))); @@ -97,10 +97,10 @@ void tst_qdeclarativemoduleplugin::initTestCase() file.close(); \ QList expected = data.split('\n'); \ expected.removeAll(QByteArray("")); \ - QList errors = component.errors(); \ + QList errors = component.errors(); \ QList actual; \ for (int ii = 0; ii < errors.count(); ++ii) { \ - const QDeclarativeError &error = errors.at(ii); \ + const QQmlError &error = errors.at(ii); \ QByteArray errorStr = QByteArray::number(error.line()) + ":" + \ QByteArray::number(error.column()) + ":" + \ error.description().toUtf8(); \ @@ -121,14 +121,14 @@ void tst_qdeclarativemoduleplugin::initTestCase() } \ } -void tst_qdeclarativemoduleplugin::importsPlugin() +void tst_qqmlmoduleplugin::importsPlugin() { - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImportPath(m_importsDirectory); QTest::ignoreMessage(QtWarningMsg, "plugin created"); QTest::ignoreMessage(QtWarningMsg, "import worked"); - QDeclarativeComponent component(&engine, testFileUrl(QStringLiteral("works.qml"))); - foreach (QDeclarativeError err, component.errors()) + QQmlComponent component(&engine, testFileUrl(QStringLiteral("works.qml"))); + foreach (QQmlError err, component.errors()) qWarning() << err; VERIFY_ERRORS(0); QObject *object = component.create(); @@ -137,14 +137,14 @@ void tst_qdeclarativemoduleplugin::importsPlugin() delete object; } -void tst_qdeclarativemoduleplugin::importsPlugin2() +void tst_qqmlmoduleplugin::importsPlugin2() { - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImportPath(m_importsDirectory); QTest::ignoreMessage(QtWarningMsg, "plugin2 created"); QTest::ignoreMessage(QtWarningMsg, "import2 worked"); - QDeclarativeComponent component(&engine, testFileUrl(QStringLiteral("works2.qml"))); - foreach (QDeclarativeError err, component.errors()) + QQmlComponent component(&engine, testFileUrl(QStringLiteral("works2.qml"))); + foreach (QQmlError err, component.errors()) qWarning() << err; VERIFY_ERRORS(0); QObject *object = component.create(); @@ -153,14 +153,14 @@ void tst_qdeclarativemoduleplugin::importsPlugin2() delete object; } -void tst_qdeclarativemoduleplugin::importsPlugin21() +void tst_qqmlmoduleplugin::importsPlugin21() { - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImportPath(m_importsDirectory); QTest::ignoreMessage(QtWarningMsg, "plugin2.1 created"); QTest::ignoreMessage(QtWarningMsg, "import2.1 worked"); - QDeclarativeComponent component(&engine, testFileUrl(QStringLiteral("works21.qml"))); - foreach (QDeclarativeError err, component.errors()) + QQmlComponent component(&engine, testFileUrl(QStringLiteral("works21.qml"))); + foreach (QQmlError err, component.errors()) qWarning() << err; VERIFY_ERRORS(0); QObject *object = component.create(); @@ -169,14 +169,14 @@ void tst_qdeclarativemoduleplugin::importsPlugin21() delete object; } -void tst_qdeclarativemoduleplugin::incorrectPluginCase() +void tst_qqmlmoduleplugin::incorrectPluginCase() { - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImportPath(m_importsDirectory); - QDeclarativeComponent component(&engine, testFileUrl(QStringLiteral("incorrectCase.qml"))); + QQmlComponent component(&engine, testFileUrl(QStringLiteral("incorrectCase.qml"))); - QList errors = component.errors(); + QList errors = component.errors(); QCOMPARE(errors.count(), 1); #if defined(Q_OS_MAC) || defined(Q_OS_WIN32) @@ -193,7 +193,7 @@ void tst_qdeclarativemoduleplugin::incorrectPluginCase() QCOMPARE(errors.at(0).description(), expectedError); } -void tst_qdeclarativemoduleplugin::importPluginWithQmlFile() +void tst_qqmlmoduleplugin::importPluginWithQmlFile() { QString path = m_importsDirectory; @@ -204,11 +204,11 @@ void tst_qdeclarativemoduleplugin::importPluginWithQmlFile() path = path.at(0).toLower() + path.mid(1); #endif - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImportPath(path); - QDeclarativeComponent component(&engine, testFileUrl(QStringLiteral("pluginWithQmlFile.qml"))); - foreach (QDeclarativeError err, component.errors()) + QQmlComponent component(&engine, testFileUrl(QStringLiteral("pluginWithQmlFile.qml"))); + foreach (QQmlError err, component.errors()) qWarning() << err; VERIFY_ERRORS(0); QObject *object = component.create(); @@ -216,71 +216,71 @@ void tst_qdeclarativemoduleplugin::importPluginWithQmlFile() delete object; } -void tst_qdeclarativemoduleplugin::remoteImportWithQuotedUrl() +void tst_qqmlmoduleplugin::remoteImportWithQuotedUrl() { TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); server.serveDirectory(m_importsDirectory); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData("import \"http://127.0.0.1:14450/com/nokia/PureQmlModule\" \nComponentA { width: 300; ComponentB{} }", QUrl()); - QTRY_COMPARE(component.status(), QDeclarativeComponent::Ready); + QTRY_COMPARE(component.status(), QQmlComponent::Ready); QObject *object = component.create(); QCOMPARE(object->property("width").toInt(), 300); QVERIFY(object != 0); delete object; - foreach (QDeclarativeError err, component.errors()) + foreach (QQmlError err, component.errors()) qWarning() << err; VERIFY_ERRORS(0); } -void tst_qdeclarativemoduleplugin::remoteImportWithUnquotedUri() +void tst_qqmlmoduleplugin::remoteImportWithUnquotedUri() { TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); server.serveDirectory(m_importsDirectory); - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImportPath(m_importsDirectory); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import com.nokia.PureQmlModule 1.0 \nComponentA { width: 300; ComponentB{} }", QUrl()); - QTRY_COMPARE(component.status(), QDeclarativeComponent::Ready); + QTRY_COMPARE(component.status(), QQmlComponent::Ready); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("width").toInt(), 300); delete object; - foreach (QDeclarativeError err, component.errors()) + foreach (QQmlError err, component.errors()) qWarning() << err; VERIFY_ERRORS(0); } // QTBUG-17324 -void tst_qdeclarativemoduleplugin::importsMixedQmlCppPlugin() +void tst_qqmlmoduleplugin::importsMixedQmlCppPlugin() { - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImportPath(m_importsDirectory); { - QDeclarativeComponent component(&engine, testFileUrl(QStringLiteral("importsMixedQmlCppPlugin.qml"))); + QQmlComponent component(&engine, testFileUrl(QStringLiteral("importsMixedQmlCppPlugin.qml"))); QObject *o = component.create(); - QVERIFY2(o != 0, QDeclarativeDataTest::msgComponentError(component, &engine)); + QVERIFY2(o != 0, QQmlDataTest::msgComponentError(component, &engine)); QCOMPARE(o->property("test").toBool(), true); delete o; } { - QDeclarativeComponent component(&engine, testFileUrl(QStringLiteral("importsMixedQmlCppPlugin.2.qml"))); + QQmlComponent component(&engine, testFileUrl(QStringLiteral("importsMixedQmlCppPlugin.2.qml"))); QObject *o = component.create(); - QVERIFY2(o != 0, QDeclarativeDataTest::msgComponentError(component, &engine)); + QVERIFY2(o != 0, QQmlDataTest::msgComponentError(component, &engine)); QCOMPARE(o->property("test").toBool(), true); QCOMPARE(o->property("test2").toBool(), true); delete o; @@ -289,7 +289,7 @@ void tst_qdeclarativemoduleplugin::importsMixedQmlCppPlugin() } -void tst_qdeclarativemoduleplugin::versionNotInstalled_data() +void tst_qqmlmoduleplugin::versionNotInstalled_data() { QTest::addColumn("file"); QTest::addColumn("errorFile"); @@ -298,21 +298,21 @@ void tst_qdeclarativemoduleplugin::versionNotInstalled_data() QTest::newRow("versionNotInstalled") << "versionNotInstalled.2.qml" << "versionNotInstalled.2.errors.txt"; } -void tst_qdeclarativemoduleplugin::versionNotInstalled() +void tst_qqmlmoduleplugin::versionNotInstalled() { QFETCH(QString, file); QFETCH(QString, errorFile); - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImportPath(m_importsDirectory); - QDeclarativeComponent component(&engine, testFileUrl(file)); + QQmlComponent component(&engine, testFileUrl(file)); VERIFY_ERRORS(errorFile.toLatin1().constData()); } // test that errors are reporting correctly for plugin loading and qmldir parsing -void tst_qdeclarativemoduleplugin::implicitQmldir_data() +void tst_qqmlmoduleplugin::implicitQmldir_data() { QTest::addColumn("directory"); QTest::addColumn("file"); @@ -324,7 +324,7 @@ void tst_qdeclarativemoduleplugin::implicitQmldir_data() // parsing qmldir fails due to syntax errors, etc. QTest::newRow("implicitQmldir2") << "implicit2" << "temptest2.qml" << "implicitQmldir.2.errors.txt"; } -void tst_qdeclarativemoduleplugin::implicitQmldir() +void tst_qqmlmoduleplugin::implicitQmldir() { QFETCH(QString, directory); QFETCH(QString, file); @@ -335,19 +335,19 @@ void tst_qdeclarativemoduleplugin::implicitQmldir() QString errorFileName = directory + QDir::separator() + errorFile; QUrl testUrl = testFileUrl(fileName); - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImportPath(importPath); - QDeclarativeComponent component(&engine, testUrl); - QList errors = component.errors(); + QQmlComponent component(&engine, testUrl); + QList errors = component.errors(); VERIFY_ERRORS(errorFileName.toLatin1().constData()); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); + QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); QObject *obj = component.create(); QVERIFY(!obj); delete obj; } -QTEST_MAIN(tst_qdeclarativemoduleplugin) +QTEST_MAIN(tst_qqmlmoduleplugin) -#include "tst_qdeclarativemoduleplugin.moc" +#include "tst_qqmlmoduleplugin.moc" diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.pro similarity index 68% rename from tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro rename to tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.pro index 58f329d095..3d5fe7d6ae 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro +++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qdeclarativemoduleplugin +TARGET = tst_qqmlmoduleplugin HEADERS = ../../shared/testhttpserver.h -SOURCES = tst_qdeclarativemoduleplugin.cpp \ +SOURCES = tst_qqmlmoduleplugin.cpp \ ../../shared/testhttpserver.cpp CONFIG -= app_bundle @@ -16,4 +16,4 @@ testImportFiles.files = imports testImportFiles.path = . DEPLOYMENT += testImportFiles -QT += core-private gui-private declarative-private network testlib +QT += core-private gui-private qml-private network testlib diff --git a/tests/auto/declarative/qdeclarativeparser/qdeclarativeparser.pro b/tests/auto/qml/qqmlparser/qqmlparser.pro similarity index 66% rename from tests/auto/declarative/qdeclarativeparser/qdeclarativeparser.pro rename to tests/auto/qml/qqmlparser/qqmlparser.pro index f864337fa7..e1b7b39402 100644 --- a/tests/auto/declarative/qdeclarativeparser/qdeclarativeparser.pro +++ b/tests/auto/qml/qqmlparser/qqmlparser.pro @@ -1,9 +1,9 @@ CONFIG += testcase -TARGET = tst_qdeclarativeparser +TARGET = tst_qqmlparser QT += qmldevtools-private testlib macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativeparser.cpp +SOURCES += tst_qqmlparser.cpp DEFINES += SRCDIR=\\\"$$PWD\\\" CONFIG += parallel_test diff --git a/tests/auto/declarative/qdeclarativeparser/tst_qdeclarativeparser.cpp b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp similarity index 83% rename from tests/auto/declarative/qdeclarativeparser/tst_qdeclarativeparser.cpp rename to tests/auto/qml/qqmlparser/tst_qqmlparser.cpp index 8c3b93615d..5fb5b71533 100644 --- a/tests/auto/declarative/qdeclarativeparser/tst_qdeclarativeparser.cpp +++ b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp @@ -39,22 +39,22 @@ ** ****************************************************************************/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include -class tst_qdeclarativeparser : public QObject +class tst_qqmlparser : public QObject { Q_OBJECT public: - tst_qdeclarativeparser(); + tst_qqmlparser(); private slots: void initTestCase(); @@ -69,7 +69,7 @@ private slots: namespace check { -using namespace QDeclarativeJS; +using namespace QQmlJS; class Check: public AST::Visitor { @@ -114,24 +114,24 @@ class Check: public AST::Visitor } -tst_qdeclarativeparser::tst_qdeclarativeparser() +tst_qqmlparser::tst_qqmlparser() { } -void tst_qdeclarativeparser::initTestCase() +void tst_qqmlparser::initTestCase() { // Add directories you want excluded here // These snippets are not expected to run on their own. - excludedDirs << "doc/src/snippets/declarative/visualdatamodel_rootindex"; - excludedDirs << "doc/src/snippets/declarative/qtbinding"; - excludedDirs << "doc/src/snippets/declarative/imports"; + excludedDirs << "doc/src/snippets/qml/visualdatamodel_rootindex"; + excludedDirs << "doc/src/snippets/qml/qtbinding"; + excludedDirs << "doc/src/snippets/qml/imports"; excludedDirs << "doc/src/snippets/qtquick1/visualdatamodel_rootindex"; excludedDirs << "doc/src/snippets/qtquick1/qtbinding"; excludedDirs << "doc/src/snippets/qtquick1/imports"; } -QStringList tst_qdeclarativeparser::findFiles(const QDir &d) +QStringList tst_qqmlparser::findFiles(const QDir &d) { for (int ii = 0; ii < excludedDirs.count(); ++ii) { QString s = excludedDirs.at(ii); @@ -159,11 +159,11 @@ QStringList tst_qdeclarativeparser::findFiles(const QDir &d) } /* -This test checks all the qml and js files in the declarative UI source tree +This test checks all the qml and js files in the QtQml UI source tree and ensures that the subnode's source locations are inside parent node's source locations */ -void tst_qdeclarativeparser::qmlParser_data() +void tst_qqmlparser::qmlParser_data() { QTest::addColumn("file"); @@ -178,11 +178,11 @@ void tst_qdeclarativeparser::qmlParser_data() QTest::newRow(qPrintable(file)) << file; } -void tst_qdeclarativeparser::qmlParser() +void tst_qqmlparser::qmlParser() { QFETCH(QString, file); - using namespace QDeclarativeJS; + using namespace QQmlJS; QString code; @@ -205,6 +205,6 @@ void tst_qdeclarativeparser::qmlParser() chk(parser.rootNode()); } -QTEST_MAIN(tst_qdeclarativeparser) +QTEST_MAIN(tst_qqmlparser) -#include "tst_qdeclarativeparser.moc" +#include "tst_qqmlparser.moc" diff --git a/tests/auto/declarative/qdeclarativepixmapcache/data/dataLeak.qml b/tests/auto/qml/qqmlpixmapcache/data/dataLeak.qml similarity index 100% rename from tests/auto/declarative/qdeclarativepixmapcache/data/dataLeak.qml rename to tests/auto/qml/qqmlpixmapcache/data/dataLeak.qml diff --git a/tests/auto/declarative/qdeclarativeproperty/data/NoContextTypeA.qml b/tests/auto/qml/qqmlproperty/data/NoContextTypeA.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeproperty/data/NoContextTypeA.qml rename to tests/auto/qml/qqmlproperty/data/NoContextTypeA.qml diff --git a/tests/auto/declarative/qdeclarativeproperty/data/NoContextTypeB.qml b/tests/auto/qml/qqmlproperty/data/NoContextTypeB.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeproperty/data/NoContextTypeB.qml rename to tests/auto/qml/qqmlproperty/data/NoContextTypeB.qml diff --git a/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml b/tests/auto/qml/qqmlproperty/data/TestType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeproperty/data/TestType.qml rename to tests/auto/qml/qqmlproperty/data/TestType.qml diff --git a/tests/auto/declarative/qdeclarativeproperty/data/aliasPropertyBindings.qml b/tests/auto/qml/qqmlproperty/data/aliasPropertyBindings.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeproperty/data/aliasPropertyBindings.qml rename to tests/auto/qml/qqmlproperty/data/aliasPropertyBindings.qml diff --git a/tests/auto/declarative/qdeclarativeproperty/data/assignEmptyVariantMap.qml b/tests/auto/qml/qqmlproperty/data/assignEmptyVariantMap.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeproperty/data/assignEmptyVariantMap.qml rename to tests/auto/qml/qqmlproperty/data/assignEmptyVariantMap.qml diff --git a/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml b/tests/auto/qml/qqmlproperty/data/readSynthesizedObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml rename to tests/auto/qml/qqmlproperty/data/readSynthesizedObject.qml diff --git a/tests/auto/qml/qqmlproperty/qqmlproperty.pro b/tests/auto/qml/qqmlproperty/qqmlproperty.pro new file mode 100644 index 0000000000..689db4d7cf --- /dev/null +++ b/tests/auto/qml/qqmlproperty/qqmlproperty.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qqmlproperty +macx:CONFIG -= app_bundle + +SOURCES += tst_qqmlproperty.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private v8-private qml-private widgets testlib diff --git a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp similarity index 67% rename from tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp rename to tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp index 9dfe8db09b..ae300900c9 100644 --- a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp +++ b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp @@ -39,12 +39,12 @@ ** ****************************************************************************/ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -77,11 +77,11 @@ class MyAttached : public QObject class MyContainer : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty children READ children) + Q_PROPERTY(QQmlListProperty children READ children) public: MyContainer() {} - QDeclarativeListProperty children() { return QDeclarativeListProperty(this, m_children); } + QQmlListProperty children() { return QQmlListProperty(this, m_children); } static MyAttached *qmlAttachedProperties(QObject *o) { return new MyAttached(o); @@ -94,11 +94,11 @@ class MyContainer : public QObject QML_DECLARE_TYPE(MyContainer); QML_DECLARE_TYPEINFO(MyContainer, QML_HAS_ATTACHED_PROPERTIES) -class tst_qdeclarativeproperty : public QDeclarativeDataTest +class tst_qqmlproperty : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativeproperty() {} + tst_qqmlproperty() {} private slots: void initTestCase(); @@ -136,16 +136,16 @@ private slots: void copy(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -void tst_qdeclarativeproperty::qmlmetaproperty() +void tst_qqmlproperty::qmlmetaproperty() { - QDeclarativeProperty prop; + QQmlProperty prop; - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -162,7 +162,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QVERIFY(prop.method().signature() == 0); - QCOMPARE(prop.type(), QDeclarativeProperty::Invalid); + QCOMPARE(prop.type(), QQmlProperty::Invalid); QCOMPARE(prop.isProperty(), false); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); @@ -170,18 +170,18 @@ void tst_qdeclarativeproperty::qmlmetaproperty() QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), false); QCOMPARE(prop.object(), (QObject *)0); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); QVERIFY(prop.property().name() == 0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding == 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression == 0); QCOMPARE(prop.index(), -1); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } @@ -238,17 +238,17 @@ class PropertyObject : public QObject QML_DECLARE_TYPE(PropertyObject); -void tst_qdeclarativeproperty::qmlmetaproperty_object() +void tst_qqmlproperty::qmlmetaproperty_object() { QObject object; // Has no default property PropertyObject dobject; // Has default property { - QDeclarativeProperty prop(&object); + QQmlProperty prop(&object); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -265,7 +265,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QVERIFY(prop.method().signature() == 0); - QCOMPARE(prop.type(), QDeclarativeProperty::Invalid); + QCOMPARE(prop.type(), QQmlProperty::Invalid); QCOMPARE(prop.isProperty(), false); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); @@ -273,29 +273,29 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object() QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), false); QCOMPARE(prop.object(), (QObject *)0); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); QVERIFY(prop.property().name() == 0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding == 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression == 0); QCOMPARE(prop.index(), -1); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } { - QDeclarativeProperty prop(&dobject); + QQmlProperty prop(&dobject); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); binding.data()->setTarget(prop); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -312,7 +312,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QVERIFY(prop.method().signature() == 0); - QCOMPARE(prop.type(), QDeclarativeProperty::Property); + QCOMPARE(prop.type(), QQmlProperty::Property); QCOMPARE(prop.isProperty(), true); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), true); @@ -320,36 +320,36 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object() QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::Normal); QCOMPARE(prop.propertyType(), (int)QVariant::Int); QCOMPARE(prop.propertyTypeName(), "int"); QCOMPARE(QString(prop.property().name()), QString("defaultProperty")); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); QTest::ignoreMessage(QtWarningMsg, ": Unable to assign null to int"); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding != 0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding.data()); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == binding.data()); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression == 0); QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty")); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } } -void tst_qdeclarativeproperty::qmlmetaproperty_object_string() +void tst_qqmlproperty::qmlmetaproperty_object_string() { QObject object; PropertyObject dobject; { - QDeclarativeProperty prop(&object, QString("defaultProperty")); + QQmlProperty prop(&object, QString("defaultProperty")); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -366,7 +366,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QVERIFY(prop.method().signature() == 0); - QCOMPARE(prop.type(), QDeclarativeProperty::Invalid); + QCOMPARE(prop.type(), QQmlProperty::Invalid); QCOMPARE(prop.isProperty(), false); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); @@ -374,29 +374,29 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), false); QCOMPARE(prop.object(), (QObject *)0); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); QVERIFY(prop.property().name() == 0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding == 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression == 0); QCOMPARE(prop.index(), -1); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } { - QDeclarativeProperty prop(&dobject, QString("defaultProperty")); + QQmlProperty prop(&dobject, QString("defaultProperty")); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); binding.data()->setTarget(prop); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -413,7 +413,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QVERIFY(prop.method().signature() == 0); - QCOMPARE(prop.type(), QDeclarativeProperty::Property); + QCOMPARE(prop.type(), QQmlProperty::Property); QCOMPARE(prop.isProperty(), true); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), true); @@ -421,31 +421,31 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::Normal); QCOMPARE(prop.propertyType(), (int)QVariant::Int); QCOMPARE(prop.propertyTypeName(), "int"); QCOMPARE(QString(prop.property().name()), QString("defaultProperty")); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); QTest::ignoreMessage(QtWarningMsg, ": Unable to assign null to int"); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding != 0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding.data()); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == binding.data()); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression == 0); QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty")); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } { - QDeclarativeProperty prop(&dobject, QString("onClicked")); + QQmlProperty prop(&dobject, QString("onClicked")); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); binding.data()->setTarget(prop); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -462,7 +462,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QCOMPARE(QString(prop.method().signature()), QString("clicked()")); - QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty); + QCOMPARE(prop.type(), QQmlProperty::SignalProperty); QCOMPARE(prop.isProperty(), false); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); @@ -470,30 +470,30 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.isSignalProperty(), true); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); QCOMPARE(prop.property().name(), (const char *)0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding == 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression != 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression.data()); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == expression.data()); QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("clicked()")); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } { - QDeclarativeProperty prop(&dobject, QString("onPropertyWithNotifyChanged")); + QQmlProperty prop(&dobject, QString("onPropertyWithNotifyChanged")); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); binding.data()->setTarget(prop); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -510,7 +510,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QCOMPARE(QString(prop.method().signature()), QString("oddlyNamedNotifySignal()")); - QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty); + QCOMPARE(prop.type(), QQmlProperty::SignalProperty); QCOMPARE(prop.isProperty(), false); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); @@ -518,35 +518,35 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.isSignalProperty(), true); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); QCOMPARE(prop.property().name(), (const char *)0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding == 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression != 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression.data()); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == expression.data()); QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("oddlyNamedNotifySignal()")); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } } -void tst_qdeclarativeproperty::qmlmetaproperty_object_context() +void tst_qqmlproperty::qmlmetaproperty_object_context() { QObject object; // Has no default property PropertyObject dobject; // Has default property { - QDeclarativeProperty prop(&object, engine.rootContext()); + QQmlProperty prop(&object, engine.rootContext()); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -563,7 +563,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QVERIFY(prop.method().signature() == 0); - QCOMPARE(prop.type(), QDeclarativeProperty::Invalid); + QCOMPARE(prop.type(), QQmlProperty::Invalid); QCOMPARE(prop.isProperty(), false); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); @@ -571,29 +571,29 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context() QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), false); QCOMPARE(prop.object(), (QObject *)0); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); QVERIFY(prop.property().name() == 0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding == 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression == 0); QCOMPARE(prop.index(), -1); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } { - QDeclarativeProperty prop(&dobject, engine.rootContext()); + QQmlProperty prop(&dobject, engine.rootContext()); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); binding.data()->setTarget(prop); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -610,7 +610,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QVERIFY(prop.method().signature() == 0); - QCOMPARE(prop.type(), QDeclarativeProperty::Property); + QCOMPARE(prop.type(), QQmlProperty::Property); QCOMPARE(prop.isProperty(), true); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), true); @@ -618,36 +618,36 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context() QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::Normal); QCOMPARE(prop.propertyType(), (int)QVariant::Int); QCOMPARE(prop.propertyTypeName(), "int"); QCOMPARE(QString(prop.property().name()), QString("defaultProperty")); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); QTest::ignoreMessage(QtWarningMsg, ": Unable to assign null to int"); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding != 0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding.data()); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == binding.data()); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression == 0); QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty")); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } } -void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() +void tst_qqmlproperty::qmlmetaproperty_object_string_context() { QObject object; PropertyObject dobject; { - QDeclarativeProperty prop(&object, QString("defaultProperty"), engine.rootContext()); + QQmlProperty prop(&object, QString("defaultProperty"), engine.rootContext()); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -664,7 +664,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QVERIFY(prop.method().signature() == 0); - QCOMPARE(prop.type(), QDeclarativeProperty::Invalid); + QCOMPARE(prop.type(), QQmlProperty::Invalid); QCOMPARE(prop.isProperty(), false); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); @@ -672,29 +672,29 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), false); QCOMPARE(prop.object(), (QObject *)0); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); QVERIFY(prop.property().name() == 0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding == 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression == 0); QCOMPARE(prop.index(), -1); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } { - QDeclarativeProperty prop(&dobject, QString("defaultProperty"), engine.rootContext()); + QQmlProperty prop(&dobject, QString("defaultProperty"), engine.rootContext()); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); binding.data()->setTarget(prop); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -711,7 +711,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QVERIFY(prop.method().signature() == 0); - QCOMPARE(prop.type(), QDeclarativeProperty::Property); + QCOMPARE(prop.type(), QQmlProperty::Property); QCOMPARE(prop.isProperty(), true); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), true); @@ -719,31 +719,31 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::Normal); QCOMPARE(prop.propertyType(), (int)QVariant::Int); QCOMPARE(prop.propertyTypeName(), "int"); QCOMPARE(QString(prop.property().name()), QString("defaultProperty")); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); QTest::ignoreMessage(QtWarningMsg, ": Unable to assign null to int"); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding != 0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding.data()); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == binding.data()); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression == 0); QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty")); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } { - QDeclarativeProperty prop(&dobject, QString("onClicked"), engine.rootContext()); + QQmlProperty prop(&dobject, QString("onClicked"), engine.rootContext()); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); binding.data()->setTarget(prop); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -760,7 +760,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QCOMPARE(QString(prop.method().signature()), QString("clicked()")); - QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty); + QCOMPARE(prop.type(), QQmlProperty::SignalProperty); QCOMPARE(prop.isProperty(), false); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); @@ -768,30 +768,30 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.isSignalProperty(), true); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); QCOMPARE(prop.property().name(), (const char *)0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding == 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression != 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression.data()); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == expression.data()); QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("clicked()")); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } { - QDeclarativeProperty prop(&dobject, QString("onPropertyWithNotifyChanged"), engine.rootContext()); + QQmlProperty prop(&dobject, QString("onPropertyWithNotifyChanged"), engine.rootContext()); - QWeakPointer binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext())); + QWeakPointer binding(new QQmlBinding(QLatin1String("null"), 0, engine.rootContext())); binding.data()->setTarget(prop); QVERIFY(binding != 0); - QWeakPointer expression(new QDeclarativeExpression()); + QWeakPointer expression(new QQmlExpression()); QVERIFY(expression != 0); QObject *obj = new QObject; @@ -808,7 +808,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false); QCOMPARE(prop.connectNotifySignal(obj, -1), false); QCOMPARE(QString(prop.method().signature()), QString("oddlyNamedNotifySignal()")); - QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty); + QCOMPARE(prop.type(), QQmlProperty::SignalProperty); QCOMPARE(prop.isProperty(), false); QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); @@ -816,116 +816,116 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.isSignalProperty(), true); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); - QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); + QCOMPARE(prop.propertyTypeCategory(), QQmlProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); QCOMPARE(prop.property().name(), (const char *)0); - QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0); + QVERIFY(QQmlPropertyPrivate::binding(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setBinding(prop, binding.data()) == 0); QVERIFY(binding == 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0); - QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression.data()) == 0); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == 0); + QVERIFY(QQmlPropertyPrivate::setSignalExpression(prop, expression.data()) == 0); QVERIFY(expression != 0); - QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression.data()); + QVERIFY(QQmlPropertyPrivate::signalExpression(prop) == expression.data()); QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("oddlyNamedNotifySignal()")); - QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1); + QCOMPARE(QQmlPropertyPrivate::valueTypeCoreIndex(prop), -1); delete obj; } } -void tst_qdeclarativeproperty::name() +void tst_qqmlproperty::name() { { - QDeclarativeProperty p; + QQmlProperty p; QCOMPARE(p.name(), QString()); } { PropertyObject o; - QDeclarativeProperty p(&o); + QQmlProperty p(&o); QCOMPARE(p.name(), QString("defaultProperty")); } { QObject o; - QDeclarativeProperty p(&o, QString("objectName")); + QQmlProperty p(&o, QString("objectName")); QCOMPARE(p.name(), QString("objectName")); } { PropertyObject o; - QDeclarativeProperty p(&o, "onClicked"); + QQmlProperty p(&o, "onClicked"); QCOMPARE(p.name(), QString("onClicked")); } { QObject o; - QDeclarativeProperty p(&o, "onClicked"); + QQmlProperty p(&o, "onClicked"); QCOMPARE(p.name(), QString()); } { PropertyObject o; - QDeclarativeProperty p(&o, "onPropertyWithNotifyChanged"); + QQmlProperty p(&o, "onPropertyWithNotifyChanged"); QCOMPARE(p.name(), QString("onOddlyNamedNotifySignal")); } { QObject o; - QDeclarativeProperty p(&o, "onPropertyWithNotifyChanged"); + QQmlProperty p(&o, "onPropertyWithNotifyChanged"); QCOMPARE(p.name(), QString()); } { QObject o; - QDeclarativeProperty p(&o, "foo"); + QQmlProperty p(&o, "foo"); QCOMPARE(p.name(), QString()); } { - QDeclarativeProperty p(0, "foo"); + QQmlProperty p(0, "foo"); QCOMPARE(p.name(), QString()); } { PropertyObject o; - QDeclarativeProperty p(&o, "rectProperty"); + QQmlProperty p(&o, "rectProperty"); QCOMPARE(p.name(), QString("rectProperty")); } { PropertyObject o; - QDeclarativeProperty p(&o, "rectProperty.x"); + QQmlProperty p(&o, "rectProperty.x"); QCOMPARE(p.name(), QString("rectProperty.x")); } { PropertyObject o; - QDeclarativeProperty p(&o, "rectProperty.foo"); + QQmlProperty p(&o, "rectProperty.foo"); QCOMPARE(p.name(), QString()); } } -void tst_qdeclarativeproperty::read() +void tst_qqmlproperty::read() { // Invalid { - QDeclarativeProperty p; + QQmlProperty p; QCOMPARE(p.read(), QVariant()); } // Default prop { PropertyObject o; - QDeclarativeProperty p(&o); + QQmlProperty p(&o); QCOMPARE(p.read(), QVariant(10)); } // Invalid default prop { QObject o; - QDeclarativeProperty p(&o); + QQmlProperty p(&o); QCOMPARE(p.read(), QVariant()); } @@ -933,7 +933,7 @@ void tst_qdeclarativeproperty::read() { QObject o; - QDeclarativeProperty p(&o, "objectName"); + QQmlProperty p(&o, "objectName"); QCOMPARE(p.read(), QVariant(QString())); o.setObjectName("myName"); @@ -945,35 +945,35 @@ void tst_qdeclarativeproperty::read() { QObject o; - QCOMPARE(QDeclarativeProperty::read(&o, "objectName"), QVariant(QString())); + QCOMPARE(QQmlProperty::read(&o, "objectName"), QVariant(QString())); o.setObjectName("myName"); - QCOMPARE(QDeclarativeProperty::read(&o, "objectName"), QVariant("myName")); + QCOMPARE(QQmlProperty::read(&o, "objectName"), QVariant("myName")); } // Value-type prop { PropertyObject o; - QDeclarativeProperty p(&o, "rectProperty.x"); + QQmlProperty p(&o, "rectProperty.x"); QCOMPARE(p.read(), QVariant(10)); } // Invalid value-type prop { PropertyObject o; - QDeclarativeProperty p(&o, "rectProperty.foo"); + QQmlProperty p(&o, "rectProperty.foo"); QCOMPARE(p.read(), QVariant()); } // Signal property { PropertyObject o; - QDeclarativeProperty p(&o, "onClicked"); + QQmlProperty p(&o, "onClicked"); QCOMPARE(p.read(), QVariant()); - QVERIFY(0 == QDeclarativePropertyPrivate::setSignalExpression(p, new QDeclarativeExpression())); - QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p)); + QVERIFY(0 == QQmlPropertyPrivate::setSignalExpression(p, new QQmlExpression())); + QVERIFY(0 != QQmlPropertyPrivate::signalExpression(p)); QCOMPARE(p.read(), QVariant()); } @@ -981,11 +981,11 @@ void tst_qdeclarativeproperty::read() // Automatic signal property { PropertyObject o; - QDeclarativeProperty p(&o, "onPropertyWithNotifyChanged"); + QQmlProperty p(&o, "onPropertyWithNotifyChanged"); QCOMPARE(p.read(), QVariant()); - QVERIFY(0 == QDeclarativePropertyPrivate::setSignalExpression(p, new QDeclarativeExpression())); - QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p)); + QVERIFY(0 == QQmlPropertyPrivate::setSignalExpression(p, new QQmlExpression())); + QVERIFY(0 != QQmlPropertyPrivate::signalExpression(p)); QCOMPARE(p.read(), QVariant()); } @@ -993,7 +993,7 @@ void tst_qdeclarativeproperty::read() // Deleted object { PropertyObject *o = new PropertyObject; - QDeclarativeProperty p(o, "rectProperty.x"); + QQmlProperty p(o, "rectProperty.x"); QCOMPARE(p.read(), QVariant(10)); delete o; QCOMPARE(p.read(), QVariant()); @@ -1002,21 +1002,21 @@ void tst_qdeclarativeproperty::read() // Object property { PropertyObject o; - QDeclarativeProperty p(&o, "qmlObject"); - QCOMPARE(p.propertyTypeCategory(), QDeclarativeProperty::Object); + QQmlProperty p(&o, "qmlObject"); + QCOMPARE(p.propertyTypeCategory(), QQmlProperty::Object); QCOMPARE(p.propertyType(), qMetaTypeId()); QVariant v = p.read(); QVERIFY(v.userType() == QMetaType::QObjectStar); QVERIFY(qvariant_cast(v) == o.qmlObject()); } { - QDeclarativeComponent component(&engine, testFileUrl("readSynthesizedObject.qml")); + QQmlComponent component(&engine, testFileUrl("readSynthesizedObject.qml")); QObject *object = component.create(); QVERIFY(object != 0); - QDeclarativeProperty p(object, "test", &engine); + QQmlProperty p(object, "test", &engine); - QCOMPARE(p.propertyTypeCategory(), QDeclarativeProperty::Object); + QCOMPARE(p.propertyTypeCategory(), QQmlProperty::Object); QVERIFY(p.propertyType() != QMetaType::QObjectStar); QVariant v = p.read(); @@ -1025,11 +1025,11 @@ void tst_qdeclarativeproperty::read() QCOMPARE(qvariant_cast(v)->property("b").toInt(), 19); } { // static - QDeclarativeComponent component(&engine, testFileUrl("readSynthesizedObject.qml")); + QQmlComponent component(&engine, testFileUrl("readSynthesizedObject.qml")); QObject *object = component.create(); QVERIFY(object != 0); - QVariant v = QDeclarativeProperty::read(object, "test", &engine); + QVariant v = QQmlProperty::read(object, "test", &engine); QVERIFY(v.userType() == QMetaType::QObjectStar); QCOMPARE(qvariant_cast(v)->property("a").toInt(), 10); QCOMPARE(qvariant_cast(v)->property("b").toInt(), 19); @@ -1037,79 +1037,79 @@ void tst_qdeclarativeproperty::read() // Attached property { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import Test 1.0\nMyContainer { }", QUrl()); QObject *object = component.create(); QVERIFY(object != 0); - QDeclarativeProperty p(object, "MyContainer.foo", qmlContext(object)); + QQmlProperty p(object, "MyContainer.foo", qmlContext(object)); QCOMPARE(p.read(), QVariant(13)); delete object; } { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import Test 1.0\nMyContainer { MyContainer.foo: 10 }", QUrl()); QObject *object = component.create(); QVERIFY(object != 0); - QDeclarativeProperty p(object, "MyContainer.foo", qmlContext(object)); + QQmlProperty p(object, "MyContainer.foo", qmlContext(object)); QCOMPARE(p.read(), QVariant(10)); delete object; } { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import Test 1.0 as Foo\nFoo.MyContainer { Foo.MyContainer.foo: 10 }", QUrl()); QObject *object = component.create(); QVERIFY(object != 0); - QDeclarativeProperty p(object, "Foo.MyContainer.foo", qmlContext(object)); + QQmlProperty p(object, "Foo.MyContainer.foo", qmlContext(object)); QCOMPARE(p.read(), QVariant(10)); delete object; } { // static - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import Test 1.0 as Foo\nFoo.MyContainer { Foo.MyContainer.foo: 10 }", QUrl()); QObject *object = component.create(); QVERIFY(object != 0); - QCOMPARE(QDeclarativeProperty::read(object, "Foo.MyContainer.foo", qmlContext(object)), QVariant(10)); + QCOMPARE(QQmlProperty::read(object, "Foo.MyContainer.foo", qmlContext(object)), QVariant(10)); delete object; } } -void tst_qdeclarativeproperty::write() +void tst_qqmlproperty::write() { // Invalid { - QDeclarativeProperty p; + QQmlProperty p; QCOMPARE(p.write(QVariant(10)), false); } // Read-only default prop { PropertyObject o; - QDeclarativeProperty p(&o); + QQmlProperty p(&o); QCOMPARE(p.write(QVariant(10)), false); } // Invalid default prop { QObject o; - QDeclarativeProperty p(&o); + QQmlProperty p(&o); QCOMPARE(p.write(QVariant(10)), false); } // Read-only prop by name { PropertyObject o; - QDeclarativeProperty p(&o, QString("defaultProperty")); + QQmlProperty p(&o, QString("defaultProperty")); QCOMPARE(p.write(QVariant(10)), false); } // Writable prop by name { PropertyObject o; - QDeclarativeProperty p(&o, QString("objectName")); + QQmlProperty p(&o, QString("objectName")); QCOMPARE(o.objectName(), QString()); QCOMPARE(p.write(QVariant(QString("myName"))), true); QCOMPARE(o.objectName(), QString("myName")); @@ -1118,14 +1118,14 @@ void tst_qdeclarativeproperty::write() // Writable prop by name (static) { PropertyObject o; - QCOMPARE(QDeclarativeProperty::write(&o, QString("objectName"), QVariant(QString("myName"))), true); + QCOMPARE(QQmlProperty::write(&o, QString("objectName"), QVariant(QString("myName"))), true); QCOMPARE(o.objectName(), QString("myName")); } // Deleted object { PropertyObject *o = new PropertyObject; - QDeclarativeProperty p(o, QString("objectName")); + QQmlProperty p(o, QString("objectName")); QCOMPARE(p.write(QVariant(QString("myName"))), true); QCOMPARE(o->objectName(), QString("myName")); @@ -1137,41 +1137,41 @@ void tst_qdeclarativeproperty::write() // Signal property { PropertyObject o; - QDeclarativeProperty p(&o, "onClicked"); + QQmlProperty p(&o, "onClicked"); QCOMPARE(p.write(QVariant("console.log(1921)")), false); - QVERIFY(0 == QDeclarativePropertyPrivate::setSignalExpression(p, new QDeclarativeExpression())); - QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p)); + QVERIFY(0 == QQmlPropertyPrivate::setSignalExpression(p, new QQmlExpression())); + QVERIFY(0 != QQmlPropertyPrivate::signalExpression(p)); QCOMPARE(p.write(QVariant("console.log(1921)")), false); - QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p)); + QVERIFY(0 != QQmlPropertyPrivate::signalExpression(p)); } // Automatic signal property { PropertyObject o; - QDeclarativeProperty p(&o, "onPropertyWithNotifyChanged"); + QQmlProperty p(&o, "onPropertyWithNotifyChanged"); QCOMPARE(p.write(QVariant("console.log(1921)")), false); - QVERIFY(0 == QDeclarativePropertyPrivate::setSignalExpression(p, new QDeclarativeExpression())); - QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p)); + QVERIFY(0 == QQmlPropertyPrivate::setSignalExpression(p, new QQmlExpression())); + QVERIFY(0 != QQmlPropertyPrivate::signalExpression(p)); QCOMPARE(p.write(QVariant("console.log(1921)")), false); - QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p)); + QVERIFY(0 != QQmlPropertyPrivate::signalExpression(p)); } // Value-type property { PropertyObject o; - QDeclarativeProperty p(&o, "wrectProperty"); + QQmlProperty p(&o, "wrectProperty"); QCOMPARE(o.wrectProperty(), QRect()); QCOMPARE(p.write(QRect(1, 13, 99, 8)), true); QCOMPARE(o.wrectProperty(), QRect(1, 13, 99, 8)); - QDeclarativeProperty p2(&o, "wrectProperty.x"); + QQmlProperty p2(&o, "wrectProperty.x"); QCOMPARE(p2.read(), QVariant(1)); QCOMPARE(p2.write(QVariant(6)), true); QCOMPARE(p2.read(), QVariant(6)); @@ -1181,12 +1181,12 @@ void tst_qdeclarativeproperty::write() // URL-property { PropertyObject o; - QDeclarativeProperty p(&o, "url"); + QQmlProperty p(&o, "url"); QCOMPARE(p.write(QUrl("main.qml")), true); QCOMPARE(o.url(), QUrl("main.qml")); - QDeclarativeProperty p2(&o, "url", engine.rootContext()); + QQmlProperty p2(&o, "url", engine.rootContext()); QUrl result = engine.baseUrl().resolved(QUrl("main.qml")); QVERIFY(result != QUrl("main.qml")); @@ -1197,13 +1197,13 @@ void tst_qdeclarativeproperty::write() { // static PropertyObject o; - QCOMPARE(QDeclarativeProperty::write(&o, "url", QUrl("main.qml")), true); + QCOMPARE(QQmlProperty::write(&o, "url", QUrl("main.qml")), true); QCOMPARE(o.url(), QUrl("main.qml")); QUrl result = engine.baseUrl().resolved(QUrl("main.qml")); QVERIFY(result != QUrl("main.qml")); - QCOMPARE(QDeclarativeProperty::write(&o, "url", QUrl("main.qml"), engine.rootContext()), true); + QCOMPARE(QQmlProperty::write(&o, "url", QUrl("main.qml"), engine.rootContext()), true); QCOMPARE(o.url(), result); } @@ -1213,12 +1213,12 @@ void tst_qdeclarativeproperty::write() { PropertyObject o; - QDeclarativeProperty p(&o, "variantMap"); + QQmlProperty p(&o, "variantMap"); QCOMPARE(p.write(vm), true); QCOMPARE(o.variantMap(), vm); - QDeclarativeProperty p2(&o, "variantMap", engine.rootContext()); + QQmlProperty p2(&o, "variantMap", engine.rootContext()); QCOMPARE(p2.write(vm), true); QCOMPARE(o.variantMap(), vm); @@ -1226,43 +1226,43 @@ void tst_qdeclarativeproperty::write() { // static PropertyObject o; - QCOMPARE(QDeclarativeProperty::write(&o, "variantMap", vm), true); + QCOMPARE(QQmlProperty::write(&o, "variantMap", vm), true); QCOMPARE(o.variantMap(), vm); - QCOMPARE(QDeclarativeProperty::write(&o, "variantMap", vm, engine.rootContext()), true); + QCOMPARE(QQmlProperty::write(&o, "variantMap", vm, engine.rootContext()), true); QCOMPARE(o.variantMap(), vm); } // Attached property { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import Test 1.0\nMyContainer { }", QUrl()); QObject *object = component.create(); QVERIFY(object != 0); - QDeclarativeProperty p(object, "MyContainer.foo", qmlContext(object)); + QQmlProperty p(object, "MyContainer.foo", qmlContext(object)); p.write(QVariant(99)); QCOMPARE(p.read(), QVariant(99)); delete object; } { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import Test 1.0 as Foo\nFoo.MyContainer { Foo.MyContainer.foo: 10 }", QUrl()); QObject *object = component.create(); QVERIFY(object != 0); - QDeclarativeProperty p(object, "Foo.MyContainer.foo", qmlContext(object)); + QQmlProperty p(object, "Foo.MyContainer.foo", qmlContext(object)); p.write(QVariant(99)); QCOMPARE(p.read(), QVariant(99)); delete object; } } -void tst_qdeclarativeproperty::reset() +void tst_qqmlproperty::reset() { // Invalid { - QDeclarativeProperty p; + QQmlProperty p; QCOMPARE(p.isResettable(), false); QCOMPARE(p.reset(), false); } @@ -1270,7 +1270,7 @@ void tst_qdeclarativeproperty::reset() // Read-only default prop { PropertyObject o; - QDeclarativeProperty p(&o); + QQmlProperty p(&o); QCOMPARE(p.isResettable(), false); QCOMPARE(p.reset(), false); } @@ -1278,7 +1278,7 @@ void tst_qdeclarativeproperty::reset() // Invalid default prop { QObject o; - QDeclarativeProperty p(&o); + QQmlProperty p(&o); QCOMPARE(p.isResettable(), false); QCOMPARE(p.reset(), false); } @@ -1286,7 +1286,7 @@ void tst_qdeclarativeproperty::reset() // Non-resettable-only prop by name { PropertyObject o; - QDeclarativeProperty p(&o, QString("defaultProperty")); + QQmlProperty p(&o, QString("defaultProperty")); QCOMPARE(p.isResettable(), false); QCOMPARE(p.reset(), false); } @@ -1294,7 +1294,7 @@ void tst_qdeclarativeproperty::reset() // Resettable prop by name { PropertyObject o; - QDeclarativeProperty p(&o, QString("resettableProperty")); + QQmlProperty p(&o, QString("resettableProperty")); QCOMPARE(p.read(), QVariant(9)); QCOMPARE(p.write(QVariant(11)), true); @@ -1310,7 +1310,7 @@ void tst_qdeclarativeproperty::reset() { PropertyObject *o = new PropertyObject; - QDeclarativeProperty p(o, QString("resettableProperty")); + QQmlProperty p(o, QString("resettableProperty")); QCOMPARE(p.isResettable(), true); QCOMPARE(p.reset(), true); @@ -1324,7 +1324,7 @@ void tst_qdeclarativeproperty::reset() // Signal property { PropertyObject o; - QDeclarativeProperty p(&o, "onClicked"); + QQmlProperty p(&o, "onClicked"); QCOMPARE(p.isResettable(), false); QCOMPARE(p.reset(), false); @@ -1333,41 +1333,41 @@ void tst_qdeclarativeproperty::reset() // Automatic signal property { PropertyObject o; - QDeclarativeProperty p(&o, "onPropertyWithNotifyChanged"); + QQmlProperty p(&o, "onPropertyWithNotifyChanged"); QCOMPARE(p.isResettable(), false); QCOMPARE(p.reset(), false); } } -void tst_qdeclarativeproperty::writeObjectToList() +void tst_qqmlproperty::writeObjectToList() { - QDeclarativeComponent containerComponent(&engine); + QQmlComponent containerComponent(&engine); containerComponent.setData("import Test 1.0\nMyContainer { children: MyQmlObject {} }", QUrl()); MyContainer *container = qobject_cast(containerComponent.create()); QVERIFY(container != 0); - QDeclarativeListReference list(container, "children"); + QQmlListReference list(container, "children"); QVERIFY(list.count() == 1); MyQmlObject *object = new MyQmlObject; - QDeclarativeProperty prop(container, "children"); + QQmlProperty prop(container, "children"); prop.write(qVariantFromValue(object)); QCOMPARE(list.count(), 1); QCOMPARE(list.at(0), qobject_cast(object)); } -void tst_qdeclarativeproperty::writeListToList() +void tst_qqmlproperty::writeListToList() { - QDeclarativeComponent containerComponent(&engine); + QQmlComponent containerComponent(&engine); containerComponent.setData("import Test 1.0\nMyContainer { children: MyQmlObject {} }", QUrl()); MyContainer *container = qobject_cast(containerComponent.create()); QVERIFY(container != 0); - QDeclarativeListReference list(container, "children"); + QQmlListReference list(container, "children"); QVERIFY(list.count() == 1); QList objList; objList << new MyQmlObject() << new MyQmlObject() << new MyQmlObject() << new MyQmlObject(); - QDeclarativeProperty prop(container, "children"); + QQmlProperty prop(container, "children"); prop.write(qVariantFromValue(objList)); QCOMPARE(list.count(), 4); @@ -1378,7 +1378,7 @@ void tst_qdeclarativeproperty::writeListToList() QCOMPARE(container->children()->size(), 1);*/ } -void tst_qdeclarativeproperty::urlHandling_data() +void tst_qqmlproperty::urlHandling_data() { QTest::addColumn("input"); QTest::addColumn("scheme"); @@ -1446,7 +1446,7 @@ void tst_qdeclarativeproperty::urlHandling_data() << QByteArray("http://www.example.com/main.qml?type=text/qml#start+30000%7cvolume%2b50%25"); } -void tst_qdeclarativeproperty::urlHandling() +void tst_qqmlproperty::urlHandling() { QFETCH(QByteArray, input); QFETCH(QString, scheme); @@ -1457,7 +1457,7 @@ void tst_qdeclarativeproperty::urlHandling() { PropertyObject o; - QDeclarativeProperty p(&o, "url"); + QQmlProperty p(&o, "url"); // Test url written as QByteArray QCOMPARE(p.write(input), true); @@ -1470,7 +1470,7 @@ void tst_qdeclarativeproperty::urlHandling() { PropertyObject o; - QDeclarativeProperty p(&o, "url"); + QQmlProperty p(&o, "url"); // Test url written as QString QCOMPARE(p.write(inputString), true); @@ -1482,7 +1482,7 @@ void tst_qdeclarativeproperty::urlHandling() } } -void tst_qdeclarativeproperty::variantMapHandling_data() +void tst_qqmlproperty::variantMapHandling_data() { QTest::addColumn("vm"); @@ -1524,27 +1524,27 @@ void tst_qdeclarativeproperty::variantMapHandling_data() } } -void tst_qdeclarativeproperty::variantMapHandling() +void tst_qqmlproperty::variantMapHandling() { QFETCH(QVariantMap, vm); PropertyObject o; - QDeclarativeProperty p(&o, "variantMap"); + QQmlProperty p(&o, "variantMap"); QCOMPARE(p.write(vm), true); QCOMPARE(o.variantMap(), vm); } -void tst_qdeclarativeproperty::crashOnValueProperty() +void tst_qqmlproperty::crashOnValueProperty() { - QDeclarativeEngine *engine = new QDeclarativeEngine; - QDeclarativeComponent component(engine); + QQmlEngine *engine = new QQmlEngine; + QQmlComponent component(engine); component.setData("import Test 1.0\nPropertyObject { wrectProperty.x: 10 }", QUrl()); PropertyObject *obj = qobject_cast(component.create()); QVERIFY(obj != 0); - QDeclarativeProperty p(obj, "wrectProperty.x", qmlContext(obj)); + QQmlProperty p(obj, "wrectProperty.x", qmlContext(obj)); QCOMPARE(p.name(), QString("wrectProperty.x")); QCOMPARE(p.read(), QVariant(10)); @@ -1560,9 +1560,9 @@ void tst_qdeclarativeproperty::crashOnValueProperty() } // QTBUG-13719 -void tst_qdeclarativeproperty::aliasPropertyBindings() +void tst_qqmlproperty::aliasPropertyBindings() { - QDeclarativeComponent component(&engine, testFileUrl("aliasPropertyBindings.qml")); + QQmlComponent component(&engine, testFileUrl("aliasPropertyBindings.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1575,24 +1575,24 @@ void tst_qdeclarativeproperty::aliasPropertyBindings() QCOMPARE(object->property("realProperty").toReal(), 110.); QCOMPARE(object->property("aliasProperty").toReal(), 110.); - QDeclarativeProperty realProperty(object, QLatin1String("realProperty")); - QDeclarativeProperty aliasProperty(object, QLatin1String("aliasProperty")); + QQmlProperty realProperty(object, QLatin1String("realProperty")); + QQmlProperty aliasProperty(object, QLatin1String("aliasProperty")); // Check there is a binding on these two properties - QVERIFY(QDeclarativePropertyPrivate::binding(realProperty) != 0); - QVERIFY(QDeclarativePropertyPrivate::binding(aliasProperty) != 0); + QVERIFY(QQmlPropertyPrivate::binding(realProperty) != 0); + QVERIFY(QQmlPropertyPrivate::binding(aliasProperty) != 0); // Check that its the same binding on these two properties - QCOMPARE(QDeclarativePropertyPrivate::binding(realProperty), - QDeclarativePropertyPrivate::binding(aliasProperty)); + QCOMPARE(QQmlPropertyPrivate::binding(realProperty), + QQmlPropertyPrivate::binding(aliasProperty)); // Change the binding object->setProperty("state", QString("switch")); - QVERIFY(QDeclarativePropertyPrivate::binding(realProperty) != 0); - QVERIFY(QDeclarativePropertyPrivate::binding(aliasProperty) != 0); - QCOMPARE(QDeclarativePropertyPrivate::binding(realProperty), - QDeclarativePropertyPrivate::binding(aliasProperty)); + QVERIFY(QQmlPropertyPrivate::binding(realProperty) != 0); + QVERIFY(QQmlPropertyPrivate::binding(aliasProperty) != 0); + QCOMPARE(QQmlPropertyPrivate::binding(realProperty), + QQmlPropertyPrivate::binding(aliasProperty)); QCOMPARE(object->property("realProperty").toReal(), 96.); QCOMPARE(object->property("aliasProperty").toReal(), 96.); @@ -1611,10 +1611,10 @@ void tst_qdeclarativeproperty::aliasPropertyBindings() // Revert object->setProperty("state", QString("")); - QVERIFY(QDeclarativePropertyPrivate::binding(realProperty) != 0); - QVERIFY(QDeclarativePropertyPrivate::binding(aliasProperty) != 0); - QCOMPARE(QDeclarativePropertyPrivate::binding(realProperty), - QDeclarativePropertyPrivate::binding(aliasProperty)); + QVERIFY(QQmlPropertyPrivate::binding(realProperty) != 0); + QVERIFY(QQmlPropertyPrivate::binding(aliasProperty) != 0); + QCOMPARE(QQmlPropertyPrivate::binding(realProperty), + QQmlPropertyPrivate::binding(aliasProperty)); QCOMPARE(object->property("realProperty").toReal(), 20.); QCOMPARE(object->property("aliasProperty").toReal(), 20.); @@ -1627,65 +1627,65 @@ void tst_qdeclarativeproperty::aliasPropertyBindings() delete object; } -void tst_qdeclarativeproperty::copy() +void tst_qqmlproperty::copy() { PropertyObject object; - QDeclarativeProperty *property = new QDeclarativeProperty(&object, QLatin1String("defaultProperty")); + QQmlProperty *property = new QQmlProperty(&object, QLatin1String("defaultProperty")); QCOMPARE(property->name(), QString("defaultProperty")); QCOMPARE(property->read(), QVariant(10)); - QCOMPARE(property->type(), QDeclarativeProperty::Property); - QCOMPARE(property->propertyTypeCategory(), QDeclarativeProperty::Normal); + QCOMPARE(property->type(), QQmlProperty::Property); + QCOMPARE(property->propertyTypeCategory(), QQmlProperty::Normal); QCOMPARE(property->propertyType(), (int)QVariant::Int); - QDeclarativeProperty p1(*property); + QQmlProperty p1(*property); QCOMPARE(p1.name(), QString("defaultProperty")); QCOMPARE(p1.read(), QVariant(10)); - QCOMPARE(p1.type(), QDeclarativeProperty::Property); - QCOMPARE(p1.propertyTypeCategory(), QDeclarativeProperty::Normal); + QCOMPARE(p1.type(), QQmlProperty::Property); + QCOMPARE(p1.propertyTypeCategory(), QQmlProperty::Normal); QCOMPARE(p1.propertyType(), (int)QVariant::Int); - QDeclarativeProperty p2(&object, QLatin1String("url")); + QQmlProperty p2(&object, QLatin1String("url")); QCOMPARE(p2.name(), QString("url")); p2 = *property; QCOMPARE(p2.name(), QString("defaultProperty")); QCOMPARE(p2.read(), QVariant(10)); - QCOMPARE(p2.type(), QDeclarativeProperty::Property); - QCOMPARE(p2.propertyTypeCategory(), QDeclarativeProperty::Normal); + QCOMPARE(p2.type(), QQmlProperty::Property); + QCOMPARE(p2.propertyTypeCategory(), QQmlProperty::Normal); QCOMPARE(p2.propertyType(), (int)QVariant::Int); delete property; property = 0; QCOMPARE(p1.name(), QString("defaultProperty")); QCOMPARE(p1.read(), QVariant(10)); - QCOMPARE(p1.type(), QDeclarativeProperty::Property); - QCOMPARE(p1.propertyTypeCategory(), QDeclarativeProperty::Normal); + QCOMPARE(p1.type(), QQmlProperty::Property); + QCOMPARE(p1.propertyTypeCategory(), QQmlProperty::Normal); QCOMPARE(p1.propertyType(), (int)QVariant::Int); QCOMPARE(p2.name(), QString("defaultProperty")); QCOMPARE(p2.read(), QVariant(10)); - QCOMPARE(p2.type(), QDeclarativeProperty::Property); - QCOMPARE(p2.propertyTypeCategory(), QDeclarativeProperty::Normal); + QCOMPARE(p2.type(), QQmlProperty::Property); + QCOMPARE(p2.propertyTypeCategory(), QQmlProperty::Normal); QCOMPARE(p2.propertyType(), (int)QVariant::Int); } -void tst_qdeclarativeproperty::noContext() +void tst_qqmlproperty::noContext() { - QDeclarativeComponent compA(&engine, testFileUrl("NoContextTypeA.qml")); - QDeclarativeComponent compB(&engine, testFileUrl("NoContextTypeB.qml")); + QQmlComponent compA(&engine, testFileUrl("NoContextTypeA.qml")); + QQmlComponent compB(&engine, testFileUrl("NoContextTypeB.qml")); QObject *a = compA.create(); QVERIFY(a != 0); QObject *b = compB.create(); QVERIFY(b != 0); - QVERIFY(QDeclarativeProperty::write(b, "myTypeA", QVariant::fromValue(a), &engine)); + QVERIFY(QQmlProperty::write(b, "myTypeA", QVariant::fromValue(a), &engine)); delete a; delete b; } -void tst_qdeclarativeproperty::assignEmptyVariantMap() +void tst_qqmlproperty::assignEmptyVariantMap() { PropertyObject o; @@ -1695,10 +1695,10 @@ void tst_qdeclarativeproperty::assignEmptyVariantMap() QCOMPARE(o.variantMap().count(), 1); QCOMPARE(o.variantMap().isEmpty(), false); - QDeclarativeContext context(&engine); + QQmlContext context(&engine); context.setContextProperty("o", &o); - QDeclarativeComponent component(&engine, testFileUrl("assignEmptyVariantMap.qml")); + QQmlComponent component(&engine, testFileUrl("assignEmptyVariantMap.qml")); QObject *obj = component.create(&context); QVERIFY(obj); @@ -1708,14 +1708,14 @@ void tst_qdeclarativeproperty::assignEmptyVariantMap() delete obj; } -void tst_qdeclarativeproperty::initTestCase() +void tst_qqmlproperty::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); qmlRegisterType("Test",1,0,"MyQmlObject"); qmlRegisterType("Test",1,0,"PropertyObject"); qmlRegisterType("Test",1,0,"MyContainer"); } -QTEST_MAIN(tst_qdeclarativeproperty) +QTEST_MAIN(tst_qqmlproperty) -#include "tst_qdeclarativeproperty.moc" +#include "tst_qqmlproperty.moc" diff --git a/tests/auto/qml/qqmlpropertycache/qqmlpropertycache.pro b/tests/auto/qml/qqmlpropertycache/qqmlpropertycache.pro new file mode 100644 index 0000000000..4beb961895 --- /dev/null +++ b/tests/auto/qml/qqmlpropertycache/qqmlpropertycache.pro @@ -0,0 +1,8 @@ +CONFIG += testcase +TARGET = tst_qqmlpropertycache +macx:CONFIG -= app_bundle + +SOURCES += tst_qqmlpropertycache.cpp + +CONFIG += parallel_test +QT += core-private gui-private qml-private testlib v8-private diff --git a/tests/auto/declarative/qdeclarativepropertycache/tst_qdeclarativepropertycache.cpp b/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp similarity index 81% rename from tests/auto/declarative/qdeclarativepropertycache/tst_qdeclarativepropertycache.cpp rename to tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp index 495f8a5f20..b702623fee 100644 --- a/tests/auto/declarative/qdeclarativepropertycache/tst_qdeclarativepropertycache.cpp +++ b/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp @@ -40,15 +40,15 @@ ****************************************************************************/ #include -#include -#include +#include +#include #include "../../shared/util.h" -class tst_qdeclarativepropertycache : public QObject +class tst_qqmlpropertycache : public QObject { Q_OBJECT public: - tst_qdeclarativepropertycache() {} + tst_qqmlpropertycache() {} private slots: void properties(); @@ -59,7 +59,7 @@ private slots: void signalHandlersDerived(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; class BaseObject : public QObject @@ -102,14 +102,14 @@ public Q_SLOTS: void signalB(); }; -void tst_qdeclarativepropertycache::properties() +void tst_qqmlpropertycache::properties() { - QDeclarativeEngine engine; + QQmlEngine engine; DerivedObject object; const QMetaObject *metaObject = object.metaObject(); - QDeclarativeRefPointer cache(new QDeclarativePropertyCache(&engine, metaObject)); - QDeclarativePropertyData *data; + QQmlRefPointer cache(new QQmlPropertyCache(&engine, metaObject)); + QQmlPropertyData *data; QVERIFY(data = cache->property(QLatin1String("propertyA"))); QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyA")); @@ -124,16 +124,16 @@ void tst_qdeclarativepropertycache::properties() QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyD")); } -void tst_qdeclarativepropertycache::propertiesDerived() +void tst_qqmlpropertycache::propertiesDerived() { - QDeclarativeEngine engine; + QQmlEngine engine; DerivedObject object; const QMetaObject *metaObject = object.metaObject(); - QDeclarativeRefPointer parentCache(new QDeclarativePropertyCache(&engine, &BaseObject::staticMetaObject)); - QDeclarativeRefPointer cache(parentCache->copy()); + QQmlRefPointer parentCache(new QQmlPropertyCache(&engine, &BaseObject::staticMetaObject)); + QQmlRefPointer cache(parentCache->copy()); cache->append(&engine, object.metaObject()); - QDeclarativePropertyData *data; + QQmlPropertyData *data; QVERIFY(data = cache->property(QLatin1String("propertyA"))); QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyA")); @@ -148,14 +148,14 @@ void tst_qdeclarativepropertycache::propertiesDerived() QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyD")); } -void tst_qdeclarativepropertycache::methods() +void tst_qqmlpropertycache::methods() { - QDeclarativeEngine engine; + QQmlEngine engine; DerivedObject object; const QMetaObject *metaObject = object.metaObject(); - QDeclarativeRefPointer cache(new QDeclarativePropertyCache(&engine, metaObject)); - QDeclarativePropertyData *data; + QQmlRefPointer cache(new QQmlPropertyCache(&engine, metaObject)); + QQmlPropertyData *data; QVERIFY(data = cache->property(QLatin1String("slotA"))); QCOMPARE(data->coreIndex, metaObject->indexOfMethod("slotA()")); @@ -182,16 +182,16 @@ void tst_qdeclarativepropertycache::methods() QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyDChanged()")); } -void tst_qdeclarativepropertycache::methodsDerived() +void tst_qqmlpropertycache::methodsDerived() { - QDeclarativeEngine engine; + QQmlEngine engine; DerivedObject object; const QMetaObject *metaObject = object.metaObject(); - QDeclarativeRefPointer parentCache(new QDeclarativePropertyCache(&engine, &BaseObject::staticMetaObject)); - QDeclarativeRefPointer cache(parentCache->copy()); + QQmlRefPointer parentCache(new QQmlPropertyCache(&engine, &BaseObject::staticMetaObject)); + QQmlRefPointer cache(parentCache->copy()); cache->append(&engine, object.metaObject()); - QDeclarativePropertyData *data; + QQmlPropertyData *data; QVERIFY(data = cache->property(QLatin1String("slotA"))); QCOMPARE(data->coreIndex, metaObject->indexOfMethod("slotA()")); @@ -218,14 +218,14 @@ void tst_qdeclarativepropertycache::methodsDerived() QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyDChanged()")); } -void tst_qdeclarativepropertycache::signalHandlers() +void tst_qqmlpropertycache::signalHandlers() { - QDeclarativeEngine engine; + QQmlEngine engine; DerivedObject object; const QMetaObject *metaObject = object.metaObject(); - QDeclarativeRefPointer cache(new QDeclarativePropertyCache(&engine, metaObject)); - QDeclarativePropertyData *data; + QQmlRefPointer cache(new QQmlPropertyCache(&engine, metaObject)); + QQmlPropertyData *data; QVERIFY(data = cache->property(QLatin1String("onSignalA"))); QCOMPARE(data->coreIndex, metaObject->indexOfMethod("signalA()")); @@ -246,16 +246,16 @@ void tst_qdeclarativepropertycache::signalHandlers() QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyDChanged()")); } -void tst_qdeclarativepropertycache::signalHandlersDerived() +void tst_qqmlpropertycache::signalHandlersDerived() { - QDeclarativeEngine engine; + QQmlEngine engine; DerivedObject object; const QMetaObject *metaObject = object.metaObject(); - QDeclarativeRefPointer parentCache(new QDeclarativePropertyCache(&engine, &BaseObject::staticMetaObject)); - QDeclarativeRefPointer cache(parentCache->copy()); + QQmlRefPointer parentCache(new QQmlPropertyCache(&engine, &BaseObject::staticMetaObject)); + QQmlRefPointer cache(parentCache->copy()); cache->append(&engine, object.metaObject()); - QDeclarativePropertyData *data; + QQmlPropertyData *data; QVERIFY(data = cache->property(QLatin1String("onSignalA"))); QCOMPARE(data->coreIndex, metaObject->indexOfMethod("signalA()")); @@ -276,6 +276,6 @@ void tst_qdeclarativepropertycache::signalHandlersDerived() QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyDChanged()")); } -QTEST_MAIN(tst_qdeclarativepropertycache) +QTEST_MAIN(tst_qqmlpropertycache) -#include "tst_qdeclarativepropertycache.moc" +#include "tst_qqmlpropertycache.moc" diff --git a/tests/auto/qml/qqmlpropertymap/qqmlpropertymap.pro b/tests/auto/qml/qqmlpropertymap/qqmlpropertymap.pro new file mode 100644 index 0000000000..f67de8cea9 --- /dev/null +++ b/tests/auto/qml/qqmlpropertymap/qqmlpropertymap.pro @@ -0,0 +1,9 @@ +CONFIG += testcase +TARGET = tst_qqmlpropertymap +macx:CONFIG -= app_bundle + +SOURCES += tst_qqmlpropertymap.cpp + +CONFIG += parallel_test + +QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp b/tests/auto/qml/qqmlpropertymap/tst_qqmlpropertymap.cpp similarity index 82% rename from tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp rename to tests/auto/qml/qqmlpropertymap/tst_qqmlpropertymap.cpp index 32c2e79b8b..0ae05ce138 100644 --- a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp +++ b/tests/auto/qml/qqmlpropertymap/tst_qqmlpropertymap.cpp @@ -39,18 +39,18 @@ ** ****************************************************************************/ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -class tst_QDeclarativePropertyMap : public QObject +class tst_QQmlPropertyMap : public QObject { Q_OBJECT public: - tst_QDeclarativePropertyMap() {} + tst_QQmlPropertyMap() {} private slots: void insert(); @@ -64,9 +64,9 @@ private slots: void QTBUG_17868(); }; -void tst_QDeclarativePropertyMap::insert() +void tst_QQmlPropertyMap::insert() { - QDeclarativePropertyMap map; + QQmlPropertyMap map; map.insert(QLatin1String("key1"),100); map.insert(QLatin1String("key2"),200); QVERIFY(map.keys().count() == 2); @@ -79,21 +79,21 @@ void tst_QDeclarativePropertyMap::insert() QCOMPARE(map.value(QLatin1String("key1")), QVariant("Hello World")); //inserting property names same with existing method(signal, slot, method) names is not allowed - //QDeclarativePropertyMap has an invokable keys() method + //QQmlPropertyMap has an invokable keys() method QTest::ignoreMessage(QtWarningMsg, "Creating property with name \"keys\" is not permitted, conflicts with internal symbols. "); map.insert(QLatin1String("keys"), 1); QVERIFY(map.keys().count() == 2); QVERIFY(!map.contains(QLatin1String("keys"))); QVERIFY(map.value(QLatin1String("keys")).isNull()); - //QDeclarativePropertyMap has a deleteLater() slot + //QQmlPropertyMap has a deleteLater() slot QTest::ignoreMessage(QtWarningMsg, "Creating property with name \"deleteLater\" is not permitted, conflicts with internal symbols. "); map.insert(QLatin1String("deleteLater"), 1); QVERIFY(map.keys().count() == 2); QVERIFY(!map.contains(QLatin1String("deleteLater"))); QVERIFY(map.value(QLatin1String("deleteLater")).isNull()); - //QDeclarativePropertyMap has an valueChanged() signal + //QQmlPropertyMap has an valueChanged() signal QTest::ignoreMessage(QtWarningMsg, "Creating property with name \"valueChanged\" is not permitted, conflicts with internal symbols. "); map.insert(QLatin1String("valueChanged"), 1); QVERIFY(map.keys().count() == 2); @@ -113,9 +113,9 @@ void tst_QDeclarativePropertyMap::insert() QCOMPARE(map.value(QLatin1String("valueCHANGED")), QVariant(1)); } -void tst_QDeclarativePropertyMap::operatorInsert() +void tst_QQmlPropertyMap::operatorInsert() { - QDeclarativePropertyMap map; + QQmlPropertyMap map; map[QLatin1String("key1")] = 100; map[QLatin1String("key2")] = 200; QVERIFY(map.keys().count() == 2); @@ -127,15 +127,15 @@ void tst_QDeclarativePropertyMap::operatorInsert() QCOMPARE(map.value(QLatin1String("key1")), QVariant("Hello World")); } -void tst_QDeclarativePropertyMap::operatorValue() +void tst_QQmlPropertyMap::operatorValue() { - QDeclarativePropertyMap map; + QQmlPropertyMap map; map.insert(QLatin1String("key1"),100); map.insert(QLatin1String("key2"),200); QVERIFY(map.count() == 2); QVERIFY(map.contains(QLatin1String("key1"))); - const QDeclarativePropertyMap &constMap = map; + const QQmlPropertyMap &constMap = map; QCOMPARE(constMap.value(QLatin1String("key1")), QVariant(100)); QCOMPARE(constMap.value(QLatin1String("key2")), QVariant(200)); @@ -143,9 +143,9 @@ void tst_QDeclarativePropertyMap::operatorValue() QCOMPARE(constMap[QLatin1String("key2")], constMap.value(QLatin1String("key2"))); } -void tst_QDeclarativePropertyMap::clear() +void tst_QQmlPropertyMap::clear() { - QDeclarativePropertyMap map; + QQmlPropertyMap map; map.insert(QLatin1String("key1"),100); QVERIFY(map.keys().count() == 1); @@ -157,9 +157,9 @@ void tst_QDeclarativePropertyMap::clear() QCOMPARE(map.value(QLatin1String("key1")), QVariant()); } -void tst_QDeclarativePropertyMap::changed() +void tst_QQmlPropertyMap::changed() { - QDeclarativePropertyMap map; + QQmlPropertyMap map; QSignalSpy spy(&map, SIGNAL(valueChanged(const QString&, const QVariant&))); map.insert(QLatin1String("key1"),100); map.insert(QLatin1String("key2"),200); @@ -169,10 +169,10 @@ void tst_QDeclarativePropertyMap::changed() QCOMPARE(spy.count(), 0); //make changes in QML - QDeclarativeEngine engine; - QDeclarativeContext *ctxt = engine.rootContext(); + QQmlEngine engine; + QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty(QLatin1String("testdata"), &map); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nText { text: { testdata.key1 = 'Hello World'; 'X' } }", QUrl::fromLocalFile("")); QVERIFY(component.isReady()); @@ -187,9 +187,9 @@ void tst_QDeclarativePropertyMap::changed() QCOMPARE(map.value(QLatin1String("key1")), QVariant("Hello World")); } -void tst_QDeclarativePropertyMap::count() +void tst_QQmlPropertyMap::count() { - QDeclarativePropertyMap map; + QQmlPropertyMap map; QCOMPARE(map.isEmpty(), true); map.insert(QLatin1String("key1"),100); map.insert(QLatin1String("key2"),200); @@ -205,29 +205,29 @@ void tst_QDeclarativePropertyMap::count() QCOMPARE(map.size(), map.count()); } -void tst_QDeclarativePropertyMap::crashBug() +void tst_QQmlPropertyMap::crashBug() { - QDeclarativePropertyMap map; + QQmlPropertyMap map; - QDeclarativeEngine engine; - QDeclarativeContext context(&engine); + QQmlEngine engine; + QQmlContext context(&engine); context.setContextProperty("map", &map); - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData("import QtQuick 2.0\nBinding { target: map; property: \"myProp\"; value: 10 + 23 }",QUrl()); QObject *obj = c.create(&context); delete obj; } -void tst_QDeclarativePropertyMap::QTBUG_17868() +void tst_QQmlPropertyMap::QTBUG_17868() { - QDeclarativePropertyMap map; + QQmlPropertyMap map; - QDeclarativeEngine engine; - QDeclarativeContext context(&engine); + QQmlEngine engine; + QQmlContext context(&engine); context.setContextProperty("map", &map); map.insert("key", 1); - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData("import QtQuick 2.0\nItem {property bool error:false; Component.onCompleted: {try{ map.keys(); }catch(e) {error=true;}}}",QUrl()); QObject *obj = c.create(&context); QVERIFY(obj); @@ -236,6 +236,6 @@ void tst_QDeclarativePropertyMap::QTBUG_17868() } -QTEST_MAIN(tst_QDeclarativePropertyMap) +QTEST_MAIN(tst_QQmlPropertyMap) -#include "tst_qdeclarativepropertymap.moc" +#include "tst_qqmlpropertymap.moc" diff --git a/tests/auto/declarative/qdeclarativeqt/data/atob.qml b/tests/auto/qml/qqmlqt/data/atob.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/atob.qml rename to tests/auto/qml/qqmlqt/data/atob.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/btoa.qml b/tests/auto/qml/qqmlqt/data/btoa.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/btoa.qml rename to tests/auto/qml/qqmlqt/data/btoa.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml b/tests/auto/qml/qqmlqt/data/createComponent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/createComponent.qml rename to tests/auto/qml/qqmlqt/data/createComponent.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml b/tests/auto/qml/qqmlqt/data/createComponentData.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml rename to tests/auto/qml/qqmlqt/data/createComponentData.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.js b/tests/auto/qml/qqmlqt/data/createComponent_lib.js similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.js rename to tests/auto/qml/qqmlqt/data/createComponent_lib.js diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.qml b/tests/auto/qml/qqmlqt/data/createComponent_lib.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.qml rename to tests/auto/qml/qqmlqt/data/createComponent_lib.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml b/tests/auto/qml/qqmlqt/data/createQmlObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml rename to tests/auto/qml/qqmlqt/data/createQmlObject.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/darker.qml b/tests/auto/qml/qqmlqt/data/darker.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/darker.qml rename to tests/auto/qml/qqmlqt/data/darker.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/dateTimeConversion.qml b/tests/auto/qml/qqmlqt/data/dateTimeConversion.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/dateTimeConversion.qml rename to tests/auto/qml/qqmlqt/data/dateTimeConversion.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/enums.qml b/tests/auto/qml/qqmlqt/data/enums.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/enums.qml rename to tests/auto/qml/qqmlqt/data/enums.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/fontFamilies.qml b/tests/auto/qml/qqmlqt/data/fontFamilies.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/fontFamilies.qml rename to tests/auto/qml/qqmlqt/data/fontFamilies.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/formatting.qml b/tests/auto/qml/qqmlqt/data/formatting.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/formatting.qml rename to tests/auto/qml/qqmlqt/data/formatting.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/hsla.qml b/tests/auto/qml/qqmlqt/data/hsla.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/hsla.qml rename to tests/auto/qml/qqmlqt/data/hsla.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml b/tests/auto/qml/qqmlqt/data/isQtObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml rename to tests/auto/qml/qqmlqt/data/isQtObject.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/lighter.qml b/tests/auto/qml/qqmlqt/data/lighter.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/lighter.qml rename to tests/auto/qml/qqmlqt/data/lighter.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/md5.qml b/tests/auto/qml/qqmlqt/data/md5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/md5.qml rename to tests/auto/qml/qqmlqt/data/md5.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml b/tests/auto/qml/qqmlqt/data/openUrlExternally.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml rename to tests/auto/qml/qqmlqt/data/openUrlExternally.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally_lib.js b/tests/auto/qml/qqmlqt/data/openUrlExternally_lib.js similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/openUrlExternally_lib.js rename to tests/auto/qml/qqmlqt/data/openUrlExternally_lib.js diff --git a/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally_lib.qml b/tests/auto/qml/qqmlqt/data/openUrlExternally_lib.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/openUrlExternally_lib.qml rename to tests/auto/qml/qqmlqt/data/openUrlExternally_lib.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/point.qml b/tests/auto/qml/qqmlqt/data/point.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/point.qml rename to tests/auto/qml/qqmlqt/data/point.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/quit.qml b/tests/auto/qml/qqmlqt/data/quit.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/quit.qml rename to tests/auto/qml/qqmlqt/data/quit.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/rect.qml b/tests/auto/qml/qqmlqt/data/rect.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/rect.qml rename to tests/auto/qml/qqmlqt/data/rect.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/resolvedUrl.qml b/tests/auto/qml/qqmlqt/data/resolvedUrl.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/resolvedUrl.qml rename to tests/auto/qml/qqmlqt/data/resolvedUrl.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/rgba.qml b/tests/auto/qml/qqmlqt/data/rgba.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/rgba.qml rename to tests/auto/qml/qqmlqt/data/rgba.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/size.qml b/tests/auto/qml/qqmlqt/data/size.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/size.qml rename to tests/auto/qml/qqmlqt/data/size.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/tint.qml b/tests/auto/qml/qqmlqt/data/tint.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/tint.qml rename to tests/auto/qml/qqmlqt/data/tint.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/vector.qml b/tests/auto/qml/qqmlqt/data/vector.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/vector.qml rename to tests/auto/qml/qqmlqt/data/vector.qml diff --git a/tests/auto/declarative/qdeclarativeqt/data/vector4.qml b/tests/auto/qml/qqmlqt/data/vector4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeqt/data/vector4.qml rename to tests/auto/qml/qqmlqt/data/vector4.qml diff --git a/tests/auto/qml/qqmlqt/qqmlqt.pro b/tests/auto/qml/qqmlqt/qqmlqt.pro new file mode 100644 index 0000000000..890a7e7636 --- /dev/null +++ b/tests/auto/qml/qqmlqt/qqmlqt.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qqmlqt +SOURCES += tst_qqmlqt.cpp + +include (../../shared/util.pri) + +macx:CONFIG -= app_bundle + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private v8-private qml-private quick-private testlib diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp similarity index 89% rename from tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp rename to tests/auto/qml/qqmlqt/tst_qqmlqt.cpp index c88e56476e..a679188cb7 100644 --- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp +++ b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp @@ -38,14 +38,14 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include +#include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -54,11 +54,11 @@ #include #include "../../shared/util.h" -class tst_qdeclarativeqt : public QDeclarativeDataTest +class tst_qqmlqt : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativeqt() {} + tst_qqmlqt() {} private slots: void enums(); @@ -91,12 +91,12 @@ private slots: void resolvedUrl(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -void tst_qdeclarativeqt::enums() +void tst_qqmlqt::enums() { - QDeclarativeComponent component(&engine, testFileUrl("enums.qml")); + QQmlComponent component(&engine, testFileUrl("enums.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -108,9 +108,9 @@ void tst_qdeclarativeqt::enums() delete object; } -void tst_qdeclarativeqt::rgba() +void tst_qqmlqt::rgba() { - QDeclarativeComponent component(&engine, testFileUrl("rgba.qml")); + QQmlComponent component(&engine, testFileUrl("rgba.qml")); QString warning1 = component.url().toString() + ":6: Error: Qt.rgba(): Invalid arguments"; QString warning2 = component.url().toString() + ":7: Error: Qt.rgba(): Invalid arguments"; @@ -131,9 +131,9 @@ void tst_qdeclarativeqt::rgba() delete object; } -void tst_qdeclarativeqt::hsla() +void tst_qqmlqt::hsla() { - QDeclarativeComponent component(&engine, testFileUrl("hsla.qml")); + QQmlComponent component(&engine, testFileUrl("hsla.qml")); QString warning1 = component.url().toString() + ":6: Error: Qt.hsla(): Invalid arguments"; QString warning2 = component.url().toString() + ":7: Error: Qt.hsla(): Invalid arguments"; @@ -153,9 +153,9 @@ void tst_qdeclarativeqt::hsla() delete object; } -void tst_qdeclarativeqt::rect() +void tst_qqmlqt::rect() { - QDeclarativeComponent component(&engine, testFileUrl("rect.qml")); + QQmlComponent component(&engine, testFileUrl("rect.qml")); QString warning1 = component.url().toString() + ":6: Error: Qt.rect(): Invalid arguments"; QString warning2 = component.url().toString() + ":7: Error: Qt.rect(): Invalid arguments"; @@ -174,9 +174,9 @@ void tst_qdeclarativeqt::rect() delete object; } -void tst_qdeclarativeqt::point() +void tst_qqmlqt::point() { - QDeclarativeComponent component(&engine, testFileUrl("point.qml")); + QQmlComponent component(&engine, testFileUrl("point.qml")); QString warning1 = component.url().toString() + ":6: Error: Qt.point(): Invalid arguments"; QString warning2 = component.url().toString() + ":7: Error: Qt.point(): Invalid arguments"; @@ -194,9 +194,9 @@ void tst_qdeclarativeqt::point() delete object; } -void tst_qdeclarativeqt::size() +void tst_qqmlqt::size() { - QDeclarativeComponent component(&engine, testFileUrl("size.qml")); + QQmlComponent component(&engine, testFileUrl("size.qml")); QString warning1 = component.url().toString() + ":7: Error: Qt.size(): Invalid arguments"; QString warning2 = component.url().toString() + ":8: Error: Qt.size(): Invalid arguments"; @@ -215,9 +215,9 @@ void tst_qdeclarativeqt::size() delete object; } -void tst_qdeclarativeqt::vector() +void tst_qqmlqt::vector() { - QDeclarativeComponent component(&engine, testFileUrl("vector.qml")); + QQmlComponent component(&engine, testFileUrl("vector.qml")); QString warning1 = component.url().toString() + ":6: Error: Qt.vector(): Invalid arguments"; QString warning2 = component.url().toString() + ":7: Error: Qt.vector(): Invalid arguments"; @@ -235,9 +235,9 @@ void tst_qdeclarativeqt::vector() delete object; } -void tst_qdeclarativeqt::vector4d() +void tst_qqmlqt::vector4d() { - QDeclarativeComponent component(&engine, testFileUrl("vector4.qml")); + QQmlComponent component(&engine, testFileUrl("vector4.qml")); QString warning1 = component.url().toString() + ":6: Error: Qt.vector4d(): Invalid arguments"; QString warning2 = component.url().toString() + ":7: Error: Qt.vector4d(): Invalid arguments"; @@ -255,9 +255,9 @@ void tst_qdeclarativeqt::vector4d() delete object; } -void tst_qdeclarativeqt::lighter() +void tst_qqmlqt::lighter() { - QDeclarativeComponent component(&engine, testFileUrl("lighter.qml")); + QQmlComponent component(&engine, testFileUrl("lighter.qml")); QString warning1 = component.url().toString() + ":5: Error: Qt.lighter(): Invalid arguments"; QString warning2 = component.url().toString() + ":10: Error: Qt.lighter(): Invalid arguments"; @@ -277,9 +277,9 @@ void tst_qdeclarativeqt::lighter() delete object; } -void tst_qdeclarativeqt::darker() +void tst_qqmlqt::darker() { - QDeclarativeComponent component(&engine, testFileUrl("darker.qml")); + QQmlComponent component(&engine, testFileUrl("darker.qml")); QString warning1 = component.url().toString() + ":5: Error: Qt.darker(): Invalid arguments"; QString warning2 = component.url().toString() + ":10: Error: Qt.darker(): Invalid arguments"; @@ -299,9 +299,9 @@ void tst_qdeclarativeqt::darker() delete object; } -void tst_qdeclarativeqt::tint() +void tst_qqmlqt::tint() { - QDeclarativeComponent component(&engine, testFileUrl("tint.qml")); + QQmlComponent component(&engine, testFileUrl("tint.qml")); QString warning1 = component.url().toString() + ":7: Error: Qt.tint(): Invalid arguments"; QString warning2 = component.url().toString() + ":8: Error: Qt.tint(): Invalid arguments"; @@ -334,14 +334,14 @@ public slots: void noteCall(const QUrl &url) { called++; last = url; } }; -void tst_qdeclarativeqt::openUrlExternally() +void tst_qqmlqt::openUrlExternally() { MyUrlHandler handler; QDesktopServices::setUrlHandler("test", &handler, "noteCall"); QDesktopServices::setUrlHandler("file", &handler, "noteCall"); - QDeclarativeComponent component(&engine, testFileUrl("openUrlExternally.qml")); + QQmlComponent component(&engine, testFileUrl("openUrlExternally.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(handler.called,1); @@ -356,14 +356,14 @@ void tst_qdeclarativeqt::openUrlExternally() QDesktopServices::unsetUrlHandler("file"); } -void tst_qdeclarativeqt::openUrlExternally_pragmaLibrary() +void tst_qqmlqt::openUrlExternally_pragmaLibrary() { MyUrlHandler handler; QDesktopServices::setUrlHandler("test", &handler, "noteCall"); QDesktopServices::setUrlHandler("file", &handler, "noteCall"); - QDeclarativeComponent component(&engine, testFileUrl("openUrlExternally_lib.qml")); + QQmlComponent component(&engine, testFileUrl("openUrlExternally_lib.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(handler.called,1); @@ -378,9 +378,9 @@ void tst_qdeclarativeqt::openUrlExternally_pragmaLibrary() QDesktopServices::unsetUrlHandler("file"); } -void tst_qdeclarativeqt::md5() +void tst_qqmlqt::md5() { - QDeclarativeComponent component(&engine, testFileUrl("md5.qml")); + QQmlComponent component(&engine, testFileUrl("md5.qml")); QString warning1 = component.url().toString() + ":4: Error: Qt.md5(): Invalid arguments"; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1)); @@ -393,9 +393,9 @@ void tst_qdeclarativeqt::md5() delete object; } -void tst_qdeclarativeqt::createComponent() +void tst_qqmlqt::createComponent() { - QDeclarativeComponent component(&engine, testFileUrl("createComponent.qml")); + QQmlComponent component(&engine, testFileUrl("createComponent.qml")); QString warning1 = component.url().toString() + ":9: Error: Qt.createComponent(): Invalid arguments"; QString warning2 = component.url().toString() + ":10: Error: Qt.createComponent(): Invalid arguments"; @@ -411,20 +411,20 @@ void tst_qdeclarativeqt::createComponent() delete object; } -void tst_qdeclarativeqt::createComponent_pragmaLibrary() +void tst_qqmlqt::createComponent_pragmaLibrary() { // Currently, just loading createComponent_lib.qml causes crash on some platforms - QDeclarativeComponent component(&engine, testFileUrl("createComponent_lib.qml")); + QQmlComponent component(&engine, testFileUrl("createComponent_lib.qml")); QObject *object = component.create(); QVERIFY(object != 0); - QCOMPARE(object->property("status").toInt(), int(QDeclarativeComponent::Ready)); + QCOMPARE(object->property("status").toInt(), int(QQmlComponent::Ready)); QCOMPARE(object->property("readValue").toInt(), int(1913)); delete object; } -void tst_qdeclarativeqt::createQmlObject() +void tst_qqmlqt::createQmlObject() { - QDeclarativeComponent component(&engine, testFileUrl("createQmlObject.qml")); + QQmlComponent component(&engine, testFileUrl("createQmlObject.qml")); QString warning1 = component.url().toString() + ":7: Error: Qt.createQmlObject(): Invalid arguments"; QString warning2 = component.url().toString()+ ":10: Error: Qt.createQmlObject(): failed to create object: \n " + testFileUrl("inline").toString() + ":2:10: Blah is not a type"; @@ -453,7 +453,7 @@ void tst_qdeclarativeqt::createQmlObject() } -void tst_qdeclarativeqt::dateTimeConversion() +void tst_qqmlqt::dateTimeConversion() { QDate date(2008,12,24); QTime time(14,15,38,200); @@ -466,8 +466,8 @@ void tst_qdeclarativeqt::dateTimeConversion() QDateTime dateTime5(QDate(1999,1,1), QTime(2,3,4,0)); QDateTime dateTime6(QDate(2008,2,24), QTime(14,15,38,200)); - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("dateTimeConversion.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("dateTimeConversion.qml")); QObject *obj = component.create(); QCOMPARE(obj->property("qdate").toDate(), date); @@ -480,7 +480,7 @@ void tst_qdeclarativeqt::dateTimeConversion() QCOMPARE(obj->property("qdatetime6").toDateTime(), dateTime6); } -void tst_qdeclarativeqt::dateTimeFormatting() +void tst_qqmlqt::dateTimeFormatting() { QFETCH(QString, method); QFETCH(QStringList, inputProperties); @@ -490,13 +490,13 @@ void tst_qdeclarativeqt::dateTimeFormatting() QTime time(14,15,38,200); QDateTime dateTime(date, time); - QDeclarativeEngine eng; + QQmlEngine eng; eng.rootContext()->setContextProperty("qdate", date); eng.rootContext()->setContextProperty("qtime", time); eng.rootContext()->setContextProperty("qdatetime", dateTime); - QDeclarativeComponent component(&eng, testFileUrl("formatting.qml")); + QQmlComponent component(&eng, testFileUrl("formatting.qml")); QStringList warnings; warnings << component.url().toString() + ":37: Error: Qt.formatDate(): Invalid date format" @@ -528,7 +528,7 @@ void tst_qdeclarativeqt::dateTimeFormatting() delete object; } -void tst_qdeclarativeqt::dateTimeFormatting_data() +void tst_qqmlqt::dateTimeFormatting_data() { QTest::addColumn("method"); QTest::addColumn("inputProperties"); @@ -561,15 +561,15 @@ void tst_qdeclarativeqt::dateTimeFormatting_data() << dateTime.toString("M/d/yy H:m:s a")); } -void tst_qdeclarativeqt::dateTimeFormattingVariants() +void tst_qqmlqt::dateTimeFormattingVariants() { QFETCH(QString, method); QFETCH(QVariant, variant); QFETCH(QStringList, expectedResults); - QDeclarativeEngine eng; + QQmlEngine eng; eng.rootContext()->setContextProperty("qvariant", variant); - QDeclarativeComponent component(&eng, testFileUrl("formatting.qml")); + QQmlComponent component(&eng, testFileUrl("formatting.qml")); QStringList warnings; warnings << component.url().toString() + ":37: Error: Qt.formatDate(): Invalid date format" @@ -596,7 +596,7 @@ void tst_qdeclarativeqt::dateTimeFormattingVariants() delete object; } -void tst_qdeclarativeqt::dateTimeFormattingVariants_data() +void tst_qqmlqt::dateTimeFormattingVariants_data() { QTest::addColumn("method"); QTest::addColumn("variant"); @@ -641,9 +641,9 @@ void tst_qdeclarativeqt::dateTimeFormattingVariants_data() QTest::newRow("formatTime, int") << "formatTime" << QVariant::fromValue(integer) << (QStringList() << temporary.time().toString(Qt::DefaultLocaleShortDate) << temporary.time().toString(Qt::DefaultLocaleLongDate) << temporary.time().toString("H:m:s a") << temporary.time().toString("hh:mm:ss.zzz")); } -void tst_qdeclarativeqt::isQtObject() +void tst_qqmlqt::isQtObject() { - QDeclarativeComponent component(&engine, testFileUrl("isQtObject.qml")); + QQmlComponent component(&engine, testFileUrl("isQtObject.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -656,9 +656,9 @@ void tst_qdeclarativeqt::isQtObject() delete object; } -void tst_qdeclarativeqt::btoa() +void tst_qqmlqt::btoa() { - QDeclarativeComponent component(&engine, testFileUrl("btoa.qml")); + QQmlComponent component(&engine, testFileUrl("btoa.qml")); QString warning1 = component.url().toString() + ":4: Error: Qt.btoa(): Invalid arguments"; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1)); @@ -671,9 +671,9 @@ void tst_qdeclarativeqt::btoa() delete object; } -void tst_qdeclarativeqt::atob() +void tst_qqmlqt::atob() { - QDeclarativeComponent component(&engine, testFileUrl("atob.qml")); + QQmlComponent component(&engine, testFileUrl("atob.qml")); QString warning1 = component.url().toString() + ":4: Error: Qt.atob(): Invalid arguments"; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1)); @@ -686,9 +686,9 @@ void tst_qdeclarativeqt::atob() delete object; } -void tst_qdeclarativeqt::fontFamilies() +void tst_qqmlqt::fontFamilies() { - QDeclarativeComponent component(&engine, testFileUrl("fontFamilies.qml")); + QQmlComponent component(&engine, testFileUrl("fontFamilies.qml")); QString warning1 = component.url().toString() + ":4: Error: Qt.fontFamilies(): Invalid arguments"; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1)); @@ -702,9 +702,9 @@ void tst_qdeclarativeqt::fontFamilies() delete object; } -void tst_qdeclarativeqt::quit() +void tst_qqmlqt::quit() { - QDeclarativeComponent component(&engine, testFileUrl("quit.qml")); + QQmlComponent component(&engine, testFileUrl("quit.qml")); QSignalSpy spy(&engine, SIGNAL(quit())); QObject *object = component.create(); @@ -714,9 +714,9 @@ void tst_qdeclarativeqt::quit() delete object; } -void tst_qdeclarativeqt::resolvedUrl() +void tst_qqmlqt::resolvedUrl() { - QDeclarativeComponent component(&engine, testFileUrl("resolvedUrl.qml")); + QQmlComponent component(&engine, testFileUrl("resolvedUrl.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -727,6 +727,6 @@ void tst_qdeclarativeqt::resolvedUrl() delete object; } -QTEST_MAIN(tst_qdeclarativeqt) +QTEST_MAIN(tst_qqmlqt) -#include "tst_qdeclarativeqt.moc" +#include "tst_qqmlqt.moc" diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/README b/tests/auto/qml/qqmlsqldatabase/data/README similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/README rename to tests/auto/qml/qqmlsqldatabase/data/README diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/changeversion.js b/tests/auto/qml/qqmlsqldatabase/data/changeversion.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/changeversion.js rename to tests/auto/qml/qqmlsqldatabase/data/changeversion.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/creation-a.js b/tests/auto/qml/qqmlsqldatabase/data/creation-a.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/creation-a.js rename to tests/auto/qml/qqmlsqldatabase/data/creation-a.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/creation.js b/tests/auto/qml/qqmlsqldatabase/data/creation.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/creation.js rename to tests/auto/qml/qqmlsqldatabase/data/creation.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/error-a.js b/tests/auto/qml/qqmlsqldatabase/data/error-a.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/error-a.js rename to tests/auto/qml/qqmlsqldatabase/data/error-a.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/error-b.js b/tests/auto/qml/qqmlsqldatabase/data/error-b.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/error-b.js rename to tests/auto/qml/qqmlsqldatabase/data/error-b.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/error-creation.js b/tests/auto/qml/qqmlsqldatabase/data/error-creation.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/error-creation.js rename to tests/auto/qml/qqmlsqldatabase/data/error-creation.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/error-notransaction.js b/tests/auto/qml/qqmlsqldatabase/data/error-notransaction.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/error-notransaction.js rename to tests/auto/qml/qqmlsqldatabase/data/error-notransaction.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/error-outsidetransaction.js b/tests/auto/qml/qqmlsqldatabase/data/error-outsidetransaction.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/error-outsidetransaction.js rename to tests/auto/qml/qqmlsqldatabase/data/error-outsidetransaction.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/iteration-forwardonly.js b/tests/auto/qml/qqmlsqldatabase/data/iteration-forwardonly.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/iteration-forwardonly.js rename to tests/auto/qml/qqmlsqldatabase/data/iteration-forwardonly.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/iteration.js b/tests/auto/qml/qqmlsqldatabase/data/iteration.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/iteration.js rename to tests/auto/qml/qqmlsqldatabase/data/iteration.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/readonly-error.js b/tests/auto/qml/qqmlsqldatabase/data/readonly-error.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/readonly-error.js rename to tests/auto/qml/qqmlsqldatabase/data/readonly-error.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/readonly.js b/tests/auto/qml/qqmlsqldatabase/data/readonly.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/readonly.js rename to tests/auto/qml/qqmlsqldatabase/data/readonly.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/reopen1.js b/tests/auto/qml/qqmlsqldatabase/data/reopen1.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/reopen1.js rename to tests/auto/qml/qqmlsqldatabase/data/reopen1.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/reopen2.js b/tests/auto/qml/qqmlsqldatabase/data/reopen2.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/reopen2.js rename to tests/auto/qml/qqmlsqldatabase/data/reopen2.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/selection-bindnames.js b/tests/auto/qml/qqmlsqldatabase/data/selection-bindnames.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/selection-bindnames.js rename to tests/auto/qml/qqmlsqldatabase/data/selection-bindnames.js diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/selection.js b/tests/auto/qml/qqmlsqldatabase/data/selection.js similarity index 100% rename from tests/auto/declarative/qdeclarativesqldatabase/data/selection.js rename to tests/auto/qml/qqmlsqldatabase/data/selection.js diff --git a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/auto/qml/qqmlsqldatabase/qqmlsqldatabase.pro similarity index 56% rename from tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro rename to tests/auto/qml/qqmlsqldatabase/qqmlsqldatabase.pro index 2389ca4a20..c17e16bfdd 100644 --- a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro +++ b/tests/auto/qml/qqmlsqldatabase/qqmlsqldatabase.pro @@ -1,15 +1,15 @@ CONFIG += testcase -TARGET = tst_qdeclarativecomponent +TARGET = tst_qqmlsqldatabase macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativecomponent.cpp +SOURCES += tst_qqmlsqldatabase.cpp include (../../shared/util.pri) +CONFIG += parallel_test + testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -CONFIG += parallel_test - -QT += core-private gui-private declarative-private network testlib +QT += core-private gui-private v8-private qml-private quick-private sql testlib diff --git a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp b/tests/auto/qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp similarity index 84% rename from tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp rename to tests/auto/qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp index cf4daed2f9..c1a8a63a4d 100644 --- a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp +++ b/tests/auto/qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp @@ -39,10 +39,10 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include -#include +#include #include /* #include @@ -55,19 +55,19 @@ #include #include "../../shared/util.h" -class tst_qdeclarativesqldatabase : public QDeclarativeDataTest +class tst_qqmlsqldatabase : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativesqldatabase() + tst_qqmlsqldatabase() { - qApp->setApplicationName("tst_qdeclarativesqldatabase"); + qApp->setApplicationName("tst_qqmlsqldatabase"); qApp->setOrganizationName("Nokia"); qApp->setOrganizationDomain("nokia.com"); - engine = new QDeclarativeEngine; + engine = new QQmlEngine; } - ~tst_qdeclarativesqldatabase() + ~tst_qqmlsqldatabase() { delete engine; } @@ -87,7 +87,7 @@ private slots: private: QString dbDir() const; - QDeclarativeEngine *engine; + QQmlEngine *engine; }; void removeRecursive(const QString& dirname) @@ -102,34 +102,34 @@ void removeRecursive(const QString& dirname) QDir().rmdir(dirname); } -void tst_qdeclarativesqldatabase::initTestCase() +void tst_qqmlsqldatabase::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); removeRecursive(dbDir()); QDir().mkpath(dbDir()); } -void tst_qdeclarativesqldatabase::cleanupTestCase() +void tst_qqmlsqldatabase::cleanupTestCase() { removeRecursive(dbDir()); } -QString tst_qdeclarativesqldatabase::dbDir() const +QString tst_qqmlsqldatabase::dbDir() const { - static QString tmpd = QDir::tempPath()+"/tst_qdeclarativesqldatabase_output-" + static QString tmpd = QDir::tempPath()+"/tst_qqmlsqldatabase_output-" + QDateTime::currentDateTime().toString(QLatin1String("yyyyMMddhhmmss")); return tmpd; } -void tst_qdeclarativesqldatabase::checkDatabasePath() +void tst_qqmlsqldatabase::checkDatabasePath() { // Check default storage path (we can't use it since we don't want to mess with user's data) - QVERIFY(engine->offlineStoragePath().contains("tst_qdeclarativesqldatabase")); + QVERIFY(engine->offlineStoragePath().contains("tst_qqmlsqldatabase")); QVERIFY(engine->offlineStoragePath().contains("OfflineStorage")); } static const int total_databases_created_by_tests = 12; -void tst_qdeclarativesqldatabase::testQml_data() +void tst_qqmlsqldatabase::testQml_data() { QTest::addColumn("jsfile"); // The input file @@ -164,7 +164,7 @@ class QWebPageWithJavaScriptConsoleMessages : public QWebPage { } }; -void tst_qdeclarativesqldatabase::validateAgainstWebkit() +void tst_qqmlsqldatabase::validateAgainstWebkit() { // Validates tests against WebKit (HTML5) support. // @@ -191,7 +191,7 @@ void tst_qdeclarativesqldatabase::validateAgainstWebkit() } */ -void tst_qdeclarativesqldatabase::testQml() +void tst_qqmlsqldatabase::testQml() { // Tests QML SQL Database support with tests // that have been validated against Webkit. @@ -204,7 +204,7 @@ void tst_qdeclarativesqldatabase::testQml() "Text { text: JS.test() }"; engine->setOfflineStoragePath(dbDir()); - QDeclarativeComponent component(engine); + QQmlComponent component(engine); component.setData(qml.toUtf8(), testFileUrl("empty.qml")); // just a file for relative local imports QVERIFY(!component.isError()); QQuickText *text = qobject_cast(component.create()); @@ -212,7 +212,7 @@ void tst_qdeclarativesqldatabase::testQml() QCOMPARE(text->text(),QString("passed")); } -void tst_qdeclarativesqldatabase::testQml_cleanopen_data() +void tst_qqmlsqldatabase::testQml_cleanopen_data() { QTest::addColumn("jsfile"); // The input file QTest::newRow("reopen1") << "reopen1.js"; @@ -220,7 +220,7 @@ void tst_qdeclarativesqldatabase::testQml_cleanopen_data() QTest::newRow("error-creation") << "error-creation.js"; // re-uses creation DB } -void tst_qdeclarativesqldatabase::testQml_cleanopen() +void tst_qqmlsqldatabase::testQml_cleanopen() { // Same as testQml, but clean connections between tests, // making it more like the tests are running in new processes. @@ -233,11 +233,11 @@ void tst_qdeclarativesqldatabase::testQml_cleanopen() } } -void tst_qdeclarativesqldatabase::totalDatabases() +void tst_qqmlsqldatabase::totalDatabases() { QCOMPARE(QDir(dbDir()+"/Databases").entryInfoList(QDir::Files|QDir::NoDotAndDotDot).count(), total_databases_created_by_tests*2); } -QTEST_MAIN(tst_qdeclarativesqldatabase) +QTEST_MAIN(tst_qqmlsqldatabase) -#include "tst_qdeclarativesqldatabase.moc" +#include "tst_qqmlsqldatabase.moc" diff --git a/tests/auto/declarative/qdeclarativetranslation/data/idtranslation.qml b/tests/auto/qml/qqmltranslation/data/idtranslation.qml similarity index 100% rename from tests/auto/declarative/qdeclarativetranslation/data/idtranslation.qml rename to tests/auto/qml/qqmltranslation/data/idtranslation.qml diff --git a/tests/auto/declarative/qdeclarativetranslation/data/qml_fr.qm b/tests/auto/qml/qqmltranslation/data/qml_fr.qm similarity index 100% rename from tests/auto/declarative/qdeclarativetranslation/data/qml_fr.qm rename to tests/auto/qml/qqmltranslation/data/qml_fr.qm diff --git a/tests/auto/declarative/qdeclarativetranslation/data/qml_fr.ts b/tests/auto/qml/qqmltranslation/data/qml_fr.ts similarity index 100% rename from tests/auto/declarative/qdeclarativetranslation/data/qml_fr.ts rename to tests/auto/qml/qqmltranslation/data/qml_fr.ts diff --git a/tests/auto/declarative/qdeclarativetranslation/data/qmlid_fr.qm b/tests/auto/qml/qqmltranslation/data/qmlid_fr.qm similarity index 100% rename from tests/auto/declarative/qdeclarativetranslation/data/qmlid_fr.qm rename to tests/auto/qml/qqmltranslation/data/qmlid_fr.qm diff --git a/tests/auto/declarative/qdeclarativetranslation/data/qmlid_fr.ts b/tests/auto/qml/qqmltranslation/data/qmlid_fr.ts similarity index 100% rename from tests/auto/declarative/qdeclarativetranslation/data/qmlid_fr.ts rename to tests/auto/qml/qqmltranslation/data/qmlid_fr.ts diff --git a/tests/auto/declarative/qdeclarativetranslation/data/translation.qml b/tests/auto/qml/qqmltranslation/data/translation.qml similarity index 100% rename from tests/auto/declarative/qdeclarativetranslation/data/translation.qml rename to tests/auto/qml/qqmltranslation/data/translation.qml diff --git a/tests/auto/declarative/qdeclarativetranslation/data/translation.qrc b/tests/auto/qml/qqmltranslation/data/translation.qrc similarity index 100% rename from tests/auto/declarative/qdeclarativetranslation/data/translation.qrc rename to tests/auto/qml/qqmltranslation/data/translation.qrc diff --git a/tests/auto/declarative/qdeclarativetranslation/qdeclarativetranslation.pro b/tests/auto/qml/qqmltranslation/qqmltranslation.pro similarity index 61% rename from tests/auto/declarative/qdeclarativetranslation/qdeclarativetranslation.pro rename to tests/auto/qml/qqmltranslation/qqmltranslation.pro index d6f067e440..d3f98e181f 100644 --- a/tests/auto/declarative/qdeclarativetranslation/qdeclarativetranslation.pro +++ b/tests/auto/qml/qqmltranslation/qqmltranslation.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qdeclarativetranslation +TARGET = tst_qqmltranslation macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativetranslation.cpp +SOURCES += tst_qqmltranslation.cpp RESOURCES += data/translation.qrc include (../../shared/util.pri) @@ -13,4 +13,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private testlib +QT += core-private gui-private qml-private testlib diff --git a/tests/auto/declarative/qdeclarativetranslation/tst_qdeclarativetranslation.cpp b/tests/auto/qml/qqmltranslation/tst_qqmltranslation.cpp similarity index 87% rename from tests/auto/declarative/qdeclarativetranslation/tst_qdeclarativetranslation.cpp rename to tests/auto/qml/qqmltranslation/tst_qqmltranslation.cpp index ced1478649..077fa18f5f 100644 --- a/tests/auto/declarative/qdeclarativetranslation/tst_qdeclarativetranslation.cpp +++ b/tests/auto/qml/qqmltranslation/tst_qqmltranslation.cpp @@ -40,16 +40,16 @@ ****************************************************************************/ #include -#include -#include +#include +#include #include #include "../../shared/util.h" -class tst_qdeclarativetranslation : public QDeclarativeDataTest +class tst_qqmltranslation : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativetranslation() {} + tst_qqmltranslation() {} private slots: void translation(); @@ -57,14 +57,14 @@ private slots: void translationInQrc(); }; -void tst_qdeclarativetranslation::translation() +void tst_qqmltranslation::translation() { QTranslator translator; translator.load(QLatin1String("qml_fr"), dataDirectory()); QCoreApplication::installTranslator(&translator); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("translation.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("translation.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -85,14 +85,14 @@ void tst_qdeclarativetranslation::translation() delete object; } -void tst_qdeclarativetranslation::idTranslation() +void tst_qqmltranslation::idTranslation() { QTranslator translator; translator.load(QLatin1String("qmlid_fr"), dataDirectory()); QCoreApplication::installTranslator(&translator); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("idtranslation.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("idtranslation.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -104,14 +104,14 @@ void tst_qdeclarativetranslation::idTranslation() delete object; } -void tst_qdeclarativetranslation::translationInQrc() +void tst_qqmltranslation::translationInQrc() { QTranslator translator; translator.load(":/qml_fr.qm"); QCoreApplication::installTranslator(&translator); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:/translation.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:/translation.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -132,6 +132,6 @@ void tst_qdeclarativetranslation::translationInQrc() delete object; } -QTEST_MAIN(tst_qdeclarativetranslation) +QTEST_MAIN(tst_qqmltranslation) -#include "tst_qdeclarativetranslation.moc" +#include "tst_qqmltranslation.moc" diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/BindingsSpliceCorrectlyType.qml b/tests/auto/qml/qqmlvaluetypes/data/BindingsSpliceCorrectlyType.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/BindingsSpliceCorrectlyType.qml rename to tests/auto/qml/qqmlvaluetypes/data/BindingsSpliceCorrectlyType.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/BindingsSpliceCorrectlyType4.qml b/tests/auto/qml/qqmlvaluetypes/data/BindingsSpliceCorrectlyType4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/BindingsSpliceCorrectlyType4.qml rename to tests/auto/qml/qqmlvaluetypes/data/BindingsSpliceCorrectlyType4.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/BindingsSpliceCorrectlyType5.qml b/tests/auto/qml/qqmlvaluetypes/data/BindingsSpliceCorrectlyType5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/BindingsSpliceCorrectlyType5.qml rename to tests/auto/qml/qqmlvaluetypes/data/BindingsSpliceCorrectlyType5.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.2.qml b/tests/auto/qml/qqmlvaluetypes/data/autoBindingRemoval.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.2.qml rename to tests/auto/qml/qqmlvaluetypes/data/autoBindingRemoval.2.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.3.qml b/tests/auto/qml/qqmlvaluetypes/data/autoBindingRemoval.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.3.qml rename to tests/auto/qml/qqmlvaluetypes/data/autoBindingRemoval.3.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.qml b/tests/auto/qml/qqmlvaluetypes/data/autoBindingRemoval.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.qml rename to tests/auto/qml/qqmlvaluetypes/data/autoBindingRemoval.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingAssignment.qml b/tests/auto/qml/qqmlvaluetypes/data/bindingAssignment.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/bindingAssignment.qml rename to tests/auto/qml/qqmlvaluetypes/data/bindingAssignment.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingConflict.qml b/tests/auto/qml/qqmlvaluetypes/data/bindingConflict.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/bindingConflict.qml rename to tests/auto/qml/qqmlvaluetypes/data/bindingConflict.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingRead.qml b/tests/auto/qml/qqmlvaluetypes/data/bindingRead.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/bindingRead.qml rename to tests/auto/qml/qqmlvaluetypes/data/bindingRead.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingVariantCopy.qml b/tests/auto/qml/qqmlvaluetypes/data/bindingVariantCopy.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/bindingVariantCopy.qml rename to tests/auto/qml/qqmlvaluetypes/data/bindingVariantCopy.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingsSpliceCorrectly.1.qml b/tests/auto/qml/qqmlvaluetypes/data/bindingsSpliceCorrectly.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/bindingsSpliceCorrectly.1.qml rename to tests/auto/qml/qqmlvaluetypes/data/bindingsSpliceCorrectly.1.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingsSpliceCorrectly.2.qml b/tests/auto/qml/qqmlvaluetypes/data/bindingsSpliceCorrectly.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/bindingsSpliceCorrectly.2.qml rename to tests/auto/qml/qqmlvaluetypes/data/bindingsSpliceCorrectly.2.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingsSpliceCorrectly.3.qml b/tests/auto/qml/qqmlvaluetypes/data/bindingsSpliceCorrectly.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/bindingsSpliceCorrectly.3.qml rename to tests/auto/qml/qqmlvaluetypes/data/bindingsSpliceCorrectly.3.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingsSpliceCorrectly.4.qml b/tests/auto/qml/qqmlvaluetypes/data/bindingsSpliceCorrectly.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/bindingsSpliceCorrectly.4.qml rename to tests/auto/qml/qqmlvaluetypes/data/bindingsSpliceCorrectly.4.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingsSpliceCorrectly.5.qml b/tests/auto/qml/qqmlvaluetypes/data/bindingsSpliceCorrectly.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/bindingsSpliceCorrectly.5.qml rename to tests/auto/qml/qqmlvaluetypes/data/bindingsSpliceCorrectly.5.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/color_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/color_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/color_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/color_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/color_read.qml b/tests/auto/qml/qqmlvaluetypes/data/color_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/color_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/color_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/color_write.qml b/tests/auto/qml/qqmlvaluetypes/data/color_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/color_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/color_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.1.qml b/tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.1.qml rename to tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.2.qml b/tests/auto/qml/qqmlvaluetypes/data/conflicting.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.2.qml rename to tests/auto/qml/qqmlvaluetypes/data/conflicting.2.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.3.qml b/tests/auto/qml/qqmlvaluetypes/data/conflicting.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.3.qml rename to tests/auto/qml/qqmlvaluetypes/data/conflicting.3.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.js b/tests/auto/qml/qqmlvaluetypes/data/deletedObject.js similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.js rename to tests/auto/qml/qqmlvaluetypes/data/deletedObject.js diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml b/tests/auto/qml/qqmlvaluetypes/data/deletedObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml rename to tests/auto/qml/qqmlvaluetypes/data/deletedObject.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.1.qml b/tests/auto/qml/qqmlvaluetypes/data/enums.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/enums.1.qml rename to tests/auto/qml/qqmlvaluetypes/data/enums.1.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.2.qml b/tests/auto/qml/qqmlvaluetypes/data/enums.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/enums.2.qml rename to tests/auto/qml/qqmlvaluetypes/data/enums.2.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml b/tests/auto/qml/qqmlvaluetypes/data/enums.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml rename to tests/auto/qml/qqmlvaluetypes/data/enums.3.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml b/tests/auto/qml/qqmlvaluetypes/data/enums.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml rename to tests/auto/qml/qqmlvaluetypes/data/enums.4.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.5.qml b/tests/auto/qml/qqmlvaluetypes/data/enums.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/enums.5.qml rename to tests/auto/qml/qqmlvaluetypes/data/enums.5.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/font_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/font_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/font_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_read.qml b/tests/auto/qml/qqmlvaluetypes/data/font_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/font_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/font_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.2.qml b/tests/auto/qml/qqmlvaluetypes/data/font_write.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/font_write.2.qml rename to tests/auto/qml/qqmlvaluetypes/data/font_write.2.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.3.qml b/tests/auto/qml/qqmlvaluetypes/data/font_write.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/font_write.3.qml rename to tests/auto/qml/qqmlvaluetypes/data/font_write.3.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.4.qml b/tests/auto/qml/qqmlvaluetypes/data/font_write.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/font_write.4.qml rename to tests/auto/qml/qqmlvaluetypes/data/font_write.4.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml b/tests/auto/qml/qqmlvaluetypes/data/font_write.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml rename to tests/auto/qml/qqmlvaluetypes/data/font_write.5.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.qml b/tests/auto/qml/qqmlvaluetypes/data/font_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/font_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/font_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/matrix4x4_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/matrix4x4_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_read.qml b/tests/auto/qml/qqmlvaluetypes/data/matrix4x4_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/matrix4x4_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_write.qml b/tests/auto/qml/qqmlvaluetypes/data/matrix4x4_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/matrix4x4_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/point_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/point_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/point_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/point_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/point_read.qml b/tests/auto/qml/qqmlvaluetypes/data/point_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/point_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/point_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/point_write.qml b/tests/auto/qml/qqmlvaluetypes/data/point_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/point_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/point_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/pointf_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/pointf_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/pointf_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_read.qml b/tests/auto/qml/qqmlvaluetypes/data/pointf_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/pointf_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/pointf_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_write.qml b/tests/auto/qml/qqmlvaluetypes/data/pointf_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/pointf_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/pointf_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/quaternion_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/quaternion_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_read.qml b/tests/auto/qml/qqmlvaluetypes/data/quaternion_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/quaternion_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_write.qml b/tests/auto/qml/qqmlvaluetypes/data/quaternion_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/quaternion_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rect_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/rect_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/rect_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/rect_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rect_read.qml b/tests/auto/qml/qqmlvaluetypes/data/rect_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/rect_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/rect_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rect_write.qml b/tests/auto/qml/qqmlvaluetypes/data/rect_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/rect_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/rect_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/rectf_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/rectf_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/rectf_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_read.qml b/tests/auto/qml/qqmlvaluetypes/data/rectf_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/rectf_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/rectf_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_write.qml b/tests/auto/qml/qqmlvaluetypes/data/rectf_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/rectf_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/rectf_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml b/tests/auto/qml/qqmlvaluetypes/data/returnValues.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml rename to tests/auto/qml/qqmlvaluetypes/data/returnValues.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml b/tests/auto/qml/qqmlvaluetypes/data/scriptAccess.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml rename to tests/auto/qml/qqmlvaluetypes/data/scriptAccess.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/scriptVariantCopy.qml b/tests/auto/qml/qqmlvaluetypes/data/scriptVariantCopy.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/scriptVariantCopy.qml rename to tests/auto/qml/qqmlvaluetypes/data/scriptVariantCopy.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/size_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/size_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/size_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/size_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/size_read.qml b/tests/auto/qml/qqmlvaluetypes/data/size_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/size_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/size_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/size_write.qml b/tests/auto/qml/qqmlvaluetypes/data/size_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/size_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/size_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/sizef_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/sizef_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/sizef_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_read.qml b/tests/auto/qml/qqmlvaluetypes/data/sizef_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/sizef_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/sizef_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_write.qml b/tests/auto/qml/qqmlvaluetypes/data/sizef_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/sizef_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/sizef_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_read.qml b/tests/auto/qml/qqmlvaluetypes/data/sizereadonly_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/sizereadonly_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror.qml b/tests/auto/qml/qqmlvaluetypes/data/sizereadonly_writeerror.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror.qml rename to tests/auto/qml/qqmlvaluetypes/data/sizereadonly_writeerror.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror2.qml b/tests/auto/qml/qqmlvaluetypes/data/sizereadonly_writeerror2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror2.qml rename to tests/auto/qml/qqmlvaluetypes/data/sizereadonly_writeerror2.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror3.qml b/tests/auto/qml/qqmlvaluetypes/data/sizereadonly_writeerror3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror3.qml rename to tests/auto/qml/qqmlvaluetypes/data/sizereadonly_writeerror3.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml b/tests/auto/qml/qqmlvaluetypes/data/sizereadonly_writeerror4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml rename to tests/auto/qml/qqmlvaluetypes/data/sizereadonly_writeerror4.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/staticAssignment.qml b/tests/auto/qml/qqmlvaluetypes/data/staticAssignment.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/staticAssignment.qml rename to tests/auto/qml/qqmlvaluetypes/data/staticAssignment.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/valueInterceptors.qml b/tests/auto/qml/qqmlvaluetypes/data/valueInterceptors.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/valueInterceptors.qml rename to tests/auto/qml/qqmlvaluetypes/data/valueInterceptors.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/valueSources.qml b/tests/auto/qml/qqmlvaluetypes/data/valueSources.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/valueSources.qml rename to tests/auto/qml/qqmlvaluetypes/data/valueSources.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/varAssignment.qml b/tests/auto/qml/qqmlvaluetypes/data/varAssignment.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/varAssignment.qml rename to tests/auto/qml/qqmlvaluetypes/data/varAssignment.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/variant_read.qml b/tests/auto/qml/qqmlvaluetypes/data/variant_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/variant_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/variant_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/vector2d_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/vector2d_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_read.qml b/tests/auto/qml/qqmlvaluetypes/data/vector2d_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/vector2d_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_write.qml b/tests/auto/qml/qqmlvaluetypes/data/vector2d_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/vector2d_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/vector3d_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/vector3d_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_read.qml b/tests/auto/qml/qqmlvaluetypes/data/vector3d_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/vector3d_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_write.qml b/tests/auto/qml/qqmlvaluetypes/data/vector3d_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/vector3d_write.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/vector4d_compare.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_compare.qml rename to tests/auto/qml/qqmlvaluetypes/data/vector4d_compare.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_read.qml b/tests/auto/qml/qqmlvaluetypes/data/vector4d_read.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_read.qml rename to tests/auto/qml/qqmlvaluetypes/data/vector4d_read.qml diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_write.qml b/tests/auto/qml/qqmlvaluetypes/data/vector4d_write.qml similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_write.qml rename to tests/auto/qml/qqmlvaluetypes/data/vector4d_write.qml diff --git a/tests/auto/declarative/qdeclarativeincubator/qdeclarativeincubator.pro b/tests/auto/qml/qqmlvaluetypes/qqmlvaluetypes.pro similarity index 58% rename from tests/auto/declarative/qdeclarativeincubator/qdeclarativeincubator.pro rename to tests/auto/qml/qqmlvaluetypes/qqmlvaluetypes.pro index 90a6720bd7..6051f65936 100644 --- a/tests/auto/declarative/qdeclarativeincubator/qdeclarativeincubator.pro +++ b/tests/auto/qml/qqmlvaluetypes/qqmlvaluetypes.pro @@ -1,12 +1,12 @@ CONFIG += testcase -TARGET = tst_qdeclarativeincubator +TARGET = tst_qqmlvaluetypes macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativeincubator.cpp \ - testtypes.cpp - HEADERS += testtypes.h +SOURCES += tst_qqmlvaluetypes.cpp \ + testtypes.cpp + include (../../shared/util.pri) testDataFiles.files = data @@ -15,4 +15,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private network widgets testlib +QT += core-private gui-private v8-private qml-private testlib diff --git a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.cpp b/tests/auto/qml/qqmlvaluetypes/testtypes.cpp similarity index 100% rename from tests/auto/declarative/qdeclarativevaluetypes/testtypes.cpp rename to tests/auto/qml/qqmlvaluetypes/testtypes.cpp diff --git a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h b/tests/auto/qml/qqmlvaluetypes/testtypes.h similarity index 89% rename from tests/auto/declarative/qdeclarativevaluetypes/testtypes.h rename to tests/auto/qml/qqmlvaluetypes/testtypes.h index ff0e84ceaf..813c58567f 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h +++ b/tests/auto/qml/qqmlvaluetypes/testtypes.h @@ -55,11 +55,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class MyTypeObject : public QObject { @@ -194,24 +194,24 @@ public slots: QSize method() { return QSize(13, 14); } }; -class MyConstantValueSource : public QObject, public QDeclarativePropertyValueSource +class MyConstantValueSource : public QObject, public QQmlPropertyValueSource { Q_OBJECT - Q_INTERFACES(QDeclarativePropertyValueSource) + Q_INTERFACES(QQmlPropertyValueSource) public: - virtual void setTarget(const QDeclarativeProperty &p) { p.write(3345); } + virtual void setTarget(const QQmlProperty &p) { p.write(3345); } }; -class MyOffsetValueInterceptor : public QObject, public QDeclarativePropertyValueInterceptor +class MyOffsetValueInterceptor : public QObject, public QQmlPropertyValueInterceptor { Q_OBJECT - Q_INTERFACES(QDeclarativePropertyValueInterceptor) + Q_INTERFACES(QQmlPropertyValueInterceptor) public: - virtual void setTarget(const QDeclarativeProperty &p) { prop = p; } - virtual void write(const QVariant &value) { QDeclarativePropertyPrivate::write(prop, value.toInt() + 13, QDeclarativePropertyPrivate::BypassInterceptor); } + virtual void setTarget(const QQmlProperty &p) { prop = p; } + virtual void write(const QVariant &value) { QQmlPropertyPrivate::write(prop, value.toInt() + 13, QQmlPropertyPrivate::BypassInterceptor); } private: - QDeclarativeProperty prop; + QQmlProperty prop; }; void registerTypes(); diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp similarity index 80% rename from tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp rename to tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp index 72ec7a5abf..695dbe4147 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp +++ b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp @@ -40,10 +40,10 @@ ****************************************************************************/ #include -#include -#include +#include +#include #include -#include +#include #include "../../shared/util.h" #include "testtypes.h" @@ -51,11 +51,11 @@ QT_BEGIN_NAMESPACE extern int qt_defaultDpi(); QT_END_NAMESPACE -class tst_qdeclarativevaluetypes : public QDeclarativeDataTest +class tst_qqmlvaluetypes : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativevaluetypes() {} + tst_qqmlvaluetypes() {} private slots: void initTestCase(); @@ -95,19 +95,19 @@ private slots: void bindingsSpliceCorrectly(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -void tst_qdeclarativevaluetypes::initTestCase() +void tst_qqmlvaluetypes::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); registerTypes(); } -void tst_qdeclarativevaluetypes::point() +void tst_qqmlvaluetypes::point() { { - QDeclarativeComponent component(&engine, testFileUrl("point_read.qml")); + QQmlComponent component(&engine, testFileUrl("point_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -119,7 +119,7 @@ void tst_qdeclarativevaluetypes::point() } { - QDeclarativeComponent component(&engine, testFileUrl("point_write.qml")); + QQmlComponent component(&engine, testFileUrl("point_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -129,7 +129,7 @@ void tst_qdeclarativevaluetypes::point() } { - QDeclarativeComponent component(&engine, testFileUrl("point_compare.qml")); + QQmlComponent component(&engine, testFileUrl("point_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -149,10 +149,10 @@ void tst_qdeclarativevaluetypes::point() } } -void tst_qdeclarativevaluetypes::pointf() +void tst_qqmlvaluetypes::pointf() { { - QDeclarativeComponent component(&engine, testFileUrl("pointf_read.qml")); + QQmlComponent component(&engine, testFileUrl("pointf_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -164,7 +164,7 @@ void tst_qdeclarativevaluetypes::pointf() } { - QDeclarativeComponent component(&engine, testFileUrl("pointf_write.qml")); + QQmlComponent component(&engine, testFileUrl("pointf_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -174,7 +174,7 @@ void tst_qdeclarativevaluetypes::pointf() } { - QDeclarativeComponent component(&engine, testFileUrl("pointf_compare.qml")); + QQmlComponent component(&engine, testFileUrl("pointf_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -194,10 +194,10 @@ void tst_qdeclarativevaluetypes::pointf() } } -void tst_qdeclarativevaluetypes::size() +void tst_qqmlvaluetypes::size() { { - QDeclarativeComponent component(&engine, testFileUrl("size_read.qml")); + QQmlComponent component(&engine, testFileUrl("size_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -209,7 +209,7 @@ void tst_qdeclarativevaluetypes::size() } { - QDeclarativeComponent component(&engine, testFileUrl("size_write.qml")); + QQmlComponent component(&engine, testFileUrl("size_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -219,7 +219,7 @@ void tst_qdeclarativevaluetypes::size() } { - QDeclarativeComponent component(&engine, testFileUrl("size_compare.qml")); + QQmlComponent component(&engine, testFileUrl("size_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -239,10 +239,10 @@ void tst_qdeclarativevaluetypes::size() } } -void tst_qdeclarativevaluetypes::sizef() +void tst_qqmlvaluetypes::sizef() { { - QDeclarativeComponent component(&engine, testFileUrl("sizef_read.qml")); + QQmlComponent component(&engine, testFileUrl("sizef_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -254,7 +254,7 @@ void tst_qdeclarativevaluetypes::sizef() } { - QDeclarativeComponent component(&engine, testFileUrl("sizef_write.qml")); + QQmlComponent component(&engine, testFileUrl("sizef_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -264,7 +264,7 @@ void tst_qdeclarativevaluetypes::sizef() } { - QDeclarativeComponent component(&engine, testFileUrl("sizef_compare.qml")); + QQmlComponent component(&engine, testFileUrl("sizef_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -284,9 +284,9 @@ void tst_qdeclarativevaluetypes::sizef() } } -void tst_qdeclarativevaluetypes::variant() +void tst_qqmlvaluetypes::variant() { - QDeclarativeComponent component(&engine, testFileUrl("variant_read.qml")); + QQmlComponent component(&engine, testFileUrl("variant_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -297,10 +297,10 @@ void tst_qdeclarativevaluetypes::variant() delete object; } -void tst_qdeclarativevaluetypes::sizereadonly() +void tst_qqmlvaluetypes::sizereadonly() { { - QDeclarativeComponent component(&engine, testFileUrl("sizereadonly_read.qml")); + QQmlComponent component(&engine, testFileUrl("sizereadonly_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -312,25 +312,25 @@ void tst_qdeclarativevaluetypes::sizereadonly() } { - QDeclarativeComponent component(&engine, testFileUrl("sizereadonly_writeerror.qml")); + QQmlComponent component(&engine, testFileUrl("sizereadonly_writeerror.qml")); QVERIFY(component.isError()); QCOMPARE(component.errors().at(0).description(), QLatin1String("Invalid property assignment: \"sizereadonly\" is a read-only property")); } { - QDeclarativeComponent component(&engine, testFileUrl("sizereadonly_writeerror2.qml")); + QQmlComponent component(&engine, testFileUrl("sizereadonly_writeerror2.qml")); QVERIFY(component.isError()); QCOMPARE(component.errors().at(0).description(), QLatin1String("Invalid property assignment: \"sizereadonly\" is a read-only property")); } { - QDeclarativeComponent component(&engine, testFileUrl("sizereadonly_writeerror3.qml")); + QQmlComponent component(&engine, testFileUrl("sizereadonly_writeerror3.qml")); QVERIFY(component.isError()); QCOMPARE(component.errors().at(0).description(), QLatin1String("Invalid property assignment: \"sizereadonly\" is a read-only property")); } { - QDeclarativeComponent component(&engine, testFileUrl("sizereadonly_writeerror4.qml")); + QQmlComponent component(&engine, testFileUrl("sizereadonly_writeerror4.qml")); QObject *object = component.create(); QVERIFY(object); @@ -341,10 +341,10 @@ void tst_qdeclarativevaluetypes::sizereadonly() } } -void tst_qdeclarativevaluetypes::rect() +void tst_qqmlvaluetypes::rect() { { - QDeclarativeComponent component(&engine, testFileUrl("rect_read.qml")); + QQmlComponent component(&engine, testFileUrl("rect_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -358,7 +358,7 @@ void tst_qdeclarativevaluetypes::rect() } { - QDeclarativeComponent component(&engine, testFileUrl("rect_write.qml")); + QQmlComponent component(&engine, testFileUrl("rect_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -368,7 +368,7 @@ void tst_qdeclarativevaluetypes::rect() } { - QDeclarativeComponent component(&engine, testFileUrl("rect_compare.qml")); + QQmlComponent component(&engine, testFileUrl("rect_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -388,10 +388,10 @@ void tst_qdeclarativevaluetypes::rect() } } -void tst_qdeclarativevaluetypes::rectf() +void tst_qqmlvaluetypes::rectf() { { - QDeclarativeComponent component(&engine, testFileUrl("rectf_read.qml")); + QQmlComponent component(&engine, testFileUrl("rectf_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -405,7 +405,7 @@ void tst_qdeclarativevaluetypes::rectf() } { - QDeclarativeComponent component(&engine, testFileUrl("rectf_write.qml")); + QQmlComponent component(&engine, testFileUrl("rectf_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -415,7 +415,7 @@ void tst_qdeclarativevaluetypes::rectf() } { - QDeclarativeComponent component(&engine, testFileUrl("rectf_compare.qml")); + QQmlComponent component(&engine, testFileUrl("rectf_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -435,10 +435,10 @@ void tst_qdeclarativevaluetypes::rectf() } } -void tst_qdeclarativevaluetypes::vector2d() +void tst_qqmlvaluetypes::vector2d() { { - QDeclarativeComponent component(&engine, testFileUrl("vector2d_read.qml")); + QQmlComponent component(&engine, testFileUrl("vector2d_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -450,7 +450,7 @@ void tst_qdeclarativevaluetypes::vector2d() } { - QDeclarativeComponent component(&engine, testFileUrl("vector2d_write.qml")); + QQmlComponent component(&engine, testFileUrl("vector2d_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -460,7 +460,7 @@ void tst_qdeclarativevaluetypes::vector2d() } { - QDeclarativeComponent component(&engine, testFileUrl("vector2d_compare.qml")); + QQmlComponent component(&engine, testFileUrl("vector2d_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -478,10 +478,10 @@ void tst_qdeclarativevaluetypes::vector2d() } } -void tst_qdeclarativevaluetypes::vector3d() +void tst_qqmlvaluetypes::vector3d() { { - QDeclarativeComponent component(&engine, testFileUrl("vector3d_read.qml")); + QQmlComponent component(&engine, testFileUrl("vector3d_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -494,7 +494,7 @@ void tst_qdeclarativevaluetypes::vector3d() } { - QDeclarativeComponent component(&engine, testFileUrl("vector3d_write.qml")); + QQmlComponent component(&engine, testFileUrl("vector3d_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -504,7 +504,7 @@ void tst_qdeclarativevaluetypes::vector3d() } { - QDeclarativeComponent component(&engine, testFileUrl("vector3d_compare.qml")); + QQmlComponent component(&engine, testFileUrl("vector3d_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -523,10 +523,10 @@ void tst_qdeclarativevaluetypes::vector3d() } } -void tst_qdeclarativevaluetypes::vector4d() +void tst_qqmlvaluetypes::vector4d() { { - QDeclarativeComponent component(&engine, testFileUrl("vector4d_read.qml")); + QQmlComponent component(&engine, testFileUrl("vector4d_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -540,7 +540,7 @@ void tst_qdeclarativevaluetypes::vector4d() } { - QDeclarativeComponent component(&engine, testFileUrl("vector4d_write.qml")); + QQmlComponent component(&engine, testFileUrl("vector4d_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -550,7 +550,7 @@ void tst_qdeclarativevaluetypes::vector4d() } { - QDeclarativeComponent component(&engine, testFileUrl("vector4d_compare.qml")); + QQmlComponent component(&engine, testFileUrl("vector4d_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -568,10 +568,10 @@ void tst_qdeclarativevaluetypes::vector4d() } } -void tst_qdeclarativevaluetypes::quaternion() +void tst_qqmlvaluetypes::quaternion() { { - QDeclarativeComponent component(&engine, testFileUrl("quaternion_read.qml")); + QQmlComponent component(&engine, testFileUrl("quaternion_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -585,7 +585,7 @@ void tst_qdeclarativevaluetypes::quaternion() } { - QDeclarativeComponent component(&engine, testFileUrl("quaternion_write.qml")); + QQmlComponent component(&engine, testFileUrl("quaternion_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -595,7 +595,7 @@ void tst_qdeclarativevaluetypes::quaternion() } { - QDeclarativeComponent component(&engine, testFileUrl("quaternion_compare.qml")); + QQmlComponent component(&engine, testFileUrl("quaternion_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -613,10 +613,10 @@ void tst_qdeclarativevaluetypes::quaternion() } } -void tst_qdeclarativevaluetypes::matrix4x4() +void tst_qqmlvaluetypes::matrix4x4() { { - QDeclarativeComponent component(&engine, testFileUrl("matrix4x4_read.qml")); + QQmlComponent component(&engine, testFileUrl("matrix4x4_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -646,7 +646,7 @@ void tst_qdeclarativevaluetypes::matrix4x4() } { - QDeclarativeComponent component(&engine, testFileUrl("matrix4x4_write.qml")); + QQmlComponent component(&engine, testFileUrl("matrix4x4_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -659,7 +659,7 @@ void tst_qdeclarativevaluetypes::matrix4x4() } { - QDeclarativeComponent component(&engine, testFileUrl("matrix4x4_compare.qml")); + QQmlComponent component(&engine, testFileUrl("matrix4x4_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -677,10 +677,10 @@ void tst_qdeclarativevaluetypes::matrix4x4() } } -void tst_qdeclarativevaluetypes::font() +void tst_qqmlvaluetypes::font() { { - QDeclarativeComponent component(&engine, testFileUrl("font_read.qml")); + QQmlComponent component(&engine, testFileUrl("font_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -703,7 +703,7 @@ void tst_qdeclarativevaluetypes::font() } { - QDeclarativeComponent component(&engine, testFileUrl("font_write.qml")); + QQmlComponent component(&engine, testFileUrl("font_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -736,7 +736,7 @@ void tst_qdeclarativevaluetypes::font() // Test pixelSize { - QDeclarativeComponent component(&engine, testFileUrl("font_write.2.qml")); + QQmlComponent component(&engine, testFileUrl("font_write.2.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -747,7 +747,7 @@ void tst_qdeclarativevaluetypes::font() // Test pixelSize and pointSize { - QDeclarativeComponent component(&engine, testFileUrl("font_write.3.qml")); + QQmlComponent component(&engine, testFileUrl("font_write.3.qml")); QTest::ignoreMessage(QtWarningMsg, "Both point size and pixel size set. Using pixel size. "); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -757,7 +757,7 @@ void tst_qdeclarativevaluetypes::font() delete object; } { - QDeclarativeComponent component(&engine, testFileUrl("font_write.4.qml")); + QQmlComponent component(&engine, testFileUrl("font_write.4.qml")); QTest::ignoreMessage(QtWarningMsg, "Both point size and pixel size set. Using pixel size. "); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -767,7 +767,7 @@ void tst_qdeclarativevaluetypes::font() delete object; } { - QDeclarativeComponent component(&engine, testFileUrl("font_write.5.qml")); + QQmlComponent component(&engine, testFileUrl("font_write.5.qml")); QObject *object = qobject_cast(component.create()); QVERIFY(object != 0); MyTypeObject *object1 = object->findChild("object1"); @@ -782,7 +782,7 @@ void tst_qdeclarativevaluetypes::font() } { - QDeclarativeComponent component(&engine, testFileUrl("font_compare.qml")); + QQmlComponent component(&engine, testFileUrl("font_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -800,10 +800,10 @@ void tst_qdeclarativevaluetypes::font() } } -void tst_qdeclarativevaluetypes::color() +void tst_qqmlvaluetypes::color() { { - QDeclarativeComponent component(&engine, testFileUrl("color_read.qml")); + QQmlComponent component(&engine, testFileUrl("color_read.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -822,7 +822,7 @@ void tst_qdeclarativevaluetypes::color() } { - QDeclarativeComponent component(&engine, testFileUrl("color_write.qml")); + QQmlComponent component(&engine, testFileUrl("color_write.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -837,7 +837,7 @@ void tst_qdeclarativevaluetypes::color() } { - QDeclarativeComponent component(&engine, testFileUrl("color_compare.qml")); + QQmlComponent component(&engine, testFileUrl("color_compare.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QString colorString("#33e199"); @@ -868,9 +868,9 @@ void tst_qdeclarativevaluetypes::color() } // Test bindings can write to value types -void tst_qdeclarativevaluetypes::bindingAssignment() +void tst_qqmlvaluetypes::bindingAssignment() { - QDeclarativeComponent component(&engine, testFileUrl("bindingAssignment.qml")); + QQmlComponent component(&engine, testFileUrl("bindingAssignment.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -884,9 +884,9 @@ void tst_qdeclarativevaluetypes::bindingAssignment() } // Test bindings can read from value types -void tst_qdeclarativevaluetypes::bindingRead() +void tst_qqmlvaluetypes::bindingRead() { - QDeclarativeComponent component(&engine, testFileUrl("bindingRead.qml")); + QQmlComponent component(&engine, testFileUrl("bindingRead.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -900,9 +900,9 @@ void tst_qdeclarativevaluetypes::bindingRead() } // Test static values can assign to value types -void tst_qdeclarativevaluetypes::staticAssignment() +void tst_qqmlvaluetypes::staticAssignment() { - QDeclarativeComponent component(&engine, testFileUrl("staticAssignment.qml")); + QQmlComponent component(&engine, testFileUrl("staticAssignment.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -912,9 +912,9 @@ void tst_qdeclarativevaluetypes::staticAssignment() } // Test scripts can read/write value types -void tst_qdeclarativevaluetypes::scriptAccess() +void tst_qqmlvaluetypes::scriptAccess() { - QDeclarativeComponent component(&engine, testFileUrl("scriptAccess.qml")); + QQmlComponent component(&engine, testFileUrl("scriptAccess.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -926,10 +926,10 @@ void tst_qdeclarativevaluetypes::scriptAccess() } // Test that assigning a constant from script removes any binding -void tst_qdeclarativevaluetypes::autoBindingRemoval() +void tst_qqmlvaluetypes::autoBindingRemoval() { { - QDeclarativeComponent component(&engine, testFileUrl("autoBindingRemoval.qml")); + QQmlComponent component(&engine, testFileUrl("autoBindingRemoval.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -952,7 +952,7 @@ void tst_qdeclarativevaluetypes::autoBindingRemoval() /* { - QDeclarativeComponent component(&engine, testFileUrl("autoBindingRemoval.2.qml")); + QQmlComponent component(&engine, testFileUrl("autoBindingRemoval.2.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -974,7 +974,7 @@ void tst_qdeclarativevaluetypes::autoBindingRemoval() } { - QDeclarativeComponent component(&engine, testFileUrl("autoBindingRemoval.3.qml")); + QQmlComponent component(&engine, testFileUrl("autoBindingRemoval.3.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -996,9 +996,9 @@ void tst_qdeclarativevaluetypes::autoBindingRemoval() } // Test that property value sources assign to value types -void tst_qdeclarativevaluetypes::valueSources() +void tst_qqmlvaluetypes::valueSources() { - QDeclarativeComponent component(&engine, testFileUrl("valueSources.qml")); + QQmlComponent component(&engine, testFileUrl("valueSources.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -1007,21 +1007,21 @@ void tst_qdeclarativevaluetypes::valueSources() delete object; } -static void checkNoErrors(QDeclarativeComponent& component) +static void checkNoErrors(QQmlComponent& component) { - QList errors = component.errors(); + QList errors = component.errors(); if (errors.isEmpty()) return; for (int ii = 0; ii < errors.count(); ++ii) { - const QDeclarativeError &error = errors.at(ii); + const QQmlError &error = errors.at(ii); qWarning("%d:%d:%s",error.line(),error.column(),error.description().toUtf8().constData()); } } // Test that property value interceptors can be applied to value types -void tst_qdeclarativevaluetypes::valueInterceptors() +void tst_qqmlvaluetypes::valueInterceptors() { - QDeclarativeComponent component(&engine, testFileUrl("valueInterceptors.qml")); + QQmlComponent component(&engine, testFileUrl("valueInterceptors.qml")); MyTypeObject *object = qobject_cast(component.create()); checkNoErrors(component); QVERIFY(object != 0); @@ -1036,9 +1036,9 @@ void tst_qdeclarativevaluetypes::valueInterceptors() } // Test that you can't assign a binding to the "root" value type, and a sub-property -void tst_qdeclarativevaluetypes::bindingConflict() +void tst_qqmlvaluetypes::bindingConflict() { - QDeclarativeComponent component(&engine, testFileUrl("bindingConflict.qml")); + QQmlComponent component(&engine, testFileUrl("bindingConflict.qml")); QCOMPARE(component.isError(), true); } @@ -1053,9 +1053,9 @@ void tst_qdeclarativevaluetypes::bindingConflict() // Test that accessing a reference to a valuetype after the owning object is deleted // doesn't crash -void tst_qdeclarativevaluetypes::deletedObject() +void tst_qqmlvaluetypes::deletedObject() { - QDeclarativeComponent component(&engine, testFileUrl("deletedObject.qml")); + QQmlComponent component(&engine, testFileUrl("deletedObject.qml")); QTest::ignoreMessage(QtDebugMsg, "Test: 2"); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -1071,9 +1071,9 @@ void tst_qdeclarativevaluetypes::deletedObject() } // Test that value types can be assigned to another value type property in a binding -void tst_qdeclarativevaluetypes::bindingVariantCopy() +void tst_qqmlvaluetypes::bindingVariantCopy() { - QDeclarativeComponent component(&engine, testFileUrl("bindingVariantCopy.qml")); + QQmlComponent component(&engine, testFileUrl("bindingVariantCopy.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -1083,9 +1083,9 @@ void tst_qdeclarativevaluetypes::bindingVariantCopy() } // Test that value types can be assigned to another value type property in script -void tst_qdeclarativevaluetypes::scriptVariantCopy() +void tst_qqmlvaluetypes::scriptVariantCopy() { - QDeclarativeComponent component(&engine, testFileUrl("scriptVariantCopy.qml")); + QQmlComponent component(&engine, testFileUrl("scriptVariantCopy.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -1100,28 +1100,28 @@ void tst_qdeclarativevaluetypes::scriptVariantCopy() // Test that the value type classes can be used manually -void tst_qdeclarativevaluetypes::cppClasses() +void tst_qqmlvaluetypes::cppClasses() { - CPP_TEST(QDeclarativePointValueType, QPoint(19, 33)); - CPP_TEST(QDeclarativePointFValueType, QPointF(33.6, -23)); - CPP_TEST(QDeclarativeSizeValueType, QSize(-100, 18)); - CPP_TEST(QDeclarativeSizeFValueType, QSizeF(-100.7, 18.2)); - CPP_TEST(QDeclarativeRectValueType, QRect(13, 39, 10928, 88)); - CPP_TEST(QDeclarativeRectFValueType, QRectF(88.2, -90.1, 103.2, 118)); - CPP_TEST(QDeclarativeVector2DValueType, QVector2D(19.7, 1002)); - CPP_TEST(QDeclarativeVector3DValueType, QVector3D(18.2, 19.7, 1002)); - CPP_TEST(QDeclarativeVector4DValueType, QVector4D(18.2, 19.7, 1002, 54)); - CPP_TEST(QDeclarativeQuaternionValueType, QQuaternion(18.2, 19.7, 1002, 54)); - CPP_TEST(QDeclarativeMatrix4x4ValueType, + CPP_TEST(QQmlPointValueType, QPoint(19, 33)); + CPP_TEST(QQmlPointFValueType, QPointF(33.6, -23)); + CPP_TEST(QQmlSizeValueType, QSize(-100, 18)); + CPP_TEST(QQmlSizeFValueType, QSizeF(-100.7, 18.2)); + CPP_TEST(QQmlRectValueType, QRect(13, 39, 10928, 88)); + CPP_TEST(QQmlRectFValueType, QRectF(88.2, -90.1, 103.2, 118)); + CPP_TEST(QQmlVector2DValueType, QVector2D(19.7, 1002)); + CPP_TEST(QQmlVector3DValueType, QVector3D(18.2, 19.7, 1002)); + CPP_TEST(QQmlVector4DValueType, QVector4D(18.2, 19.7, 1002, 54)); + CPP_TEST(QQmlQuaternionValueType, QQuaternion(18.2, 19.7, 1002, 54)); + CPP_TEST(QQmlMatrix4x4ValueType, QMatrix4x4(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)); - CPP_TEST(QDeclarativeFontValueType, QFont("Helvetica")); + CPP_TEST(QQmlFontValueType, QFont("Helvetica")); } -void tst_qdeclarativevaluetypes::enums() +void tst_qqmlvaluetypes::enums() { { - QDeclarativeComponent component(&engine, testFileUrl("enums.1.qml")); + QQmlComponent component(&engine, testFileUrl("enums.1.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QVERIFY(object->font().capitalization() == QFont::AllUppercase); @@ -1129,7 +1129,7 @@ void tst_qdeclarativevaluetypes::enums() } { - QDeclarativeComponent component(&engine, testFileUrl("enums.2.qml")); + QQmlComponent component(&engine, testFileUrl("enums.2.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QVERIFY(object->font().capitalization() == QFont::AllUppercase); @@ -1137,7 +1137,7 @@ void tst_qdeclarativevaluetypes::enums() } { - QDeclarativeComponent component(&engine, testFileUrl("enums.3.qml")); + QQmlComponent component(&engine, testFileUrl("enums.3.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QVERIFY(object->font().capitalization() == QFont::AllUppercase); @@ -1145,7 +1145,7 @@ void tst_qdeclarativevaluetypes::enums() } { - QDeclarativeComponent component(&engine, testFileUrl("enums.4.qml")); + QQmlComponent component(&engine, testFileUrl("enums.4.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QVERIFY(object->font().capitalization() == QFont::AllUppercase); @@ -1153,7 +1153,7 @@ void tst_qdeclarativevaluetypes::enums() } { - QDeclarativeComponent component(&engine, testFileUrl("enums.5.qml")); + QQmlComponent component(&engine, testFileUrl("enums.5.qml")); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QVERIFY(object->font().capitalization() == QFont::AllUppercase); @@ -1163,10 +1163,10 @@ void tst_qdeclarativevaluetypes::enums() // Tests switching between "conflicting" bindings (eg. a binding on the core // property, to a binding on the value-type sub-property) -void tst_qdeclarativevaluetypes::conflictingBindings() +void tst_qqmlvaluetypes::conflictingBindings() { { - QDeclarativeComponent component(&engine, testFileUrl("conflicting.1.qml")); + QQmlComponent component(&engine, testFileUrl("conflicting.1.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1184,7 +1184,7 @@ void tst_qdeclarativevaluetypes::conflictingBindings() } { - QDeclarativeComponent component(&engine, testFileUrl("conflicting.2.qml")); + QQmlComponent component(&engine, testFileUrl("conflicting.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1202,7 +1202,7 @@ void tst_qdeclarativevaluetypes::conflictingBindings() } { - QDeclarativeComponent component(&engine, testFileUrl("conflicting.3.qml")); + QQmlComponent component(&engine, testFileUrl("conflicting.3.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1220,9 +1220,9 @@ void tst_qdeclarativevaluetypes::conflictingBindings() } } -void tst_qdeclarativevaluetypes::returnValues() +void tst_qqmlvaluetypes::returnValues() { - QDeclarativeComponent component(&engine, testFileUrl("returnValues.qml")); + QQmlComponent component(&engine, testFileUrl("returnValues.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1233,9 +1233,9 @@ void tst_qdeclarativevaluetypes::returnValues() delete object; } -void tst_qdeclarativevaluetypes::varAssignment() +void tst_qqmlvaluetypes::varAssignment() { - QDeclarativeComponent component(&engine, testFileUrl("varAssignment.qml")); + QQmlComponent component(&engine, testFileUrl("varAssignment.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1247,10 +1247,10 @@ void tst_qdeclarativevaluetypes::varAssignment() } // Test bindings splice together correctly -void tst_qdeclarativevaluetypes::bindingsSpliceCorrectly() +void tst_qqmlvaluetypes::bindingsSpliceCorrectly() { { - QDeclarativeComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.1.qml")); + QQmlComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.1.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1260,7 +1260,7 @@ void tst_qdeclarativevaluetypes::bindingsSpliceCorrectly() } { - QDeclarativeComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.2.qml")); + QQmlComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1271,7 +1271,7 @@ void tst_qdeclarativevaluetypes::bindingsSpliceCorrectly() { - QDeclarativeComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.3.qml")); + QQmlComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.3.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1281,7 +1281,7 @@ void tst_qdeclarativevaluetypes::bindingsSpliceCorrectly() } { - QDeclarativeComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.4.qml")); + QQmlComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.4.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1291,7 +1291,7 @@ void tst_qdeclarativevaluetypes::bindingsSpliceCorrectly() } { - QDeclarativeComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.5.qml")); + QQmlComponent component(&engine, testFileUrl("bindingsSpliceCorrectly.5.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1301,6 +1301,6 @@ void tst_qdeclarativevaluetypes::bindingsSpliceCorrectly() } } -QTEST_MAIN(tst_qdeclarativevaluetypes) +QTEST_MAIN(tst_qqmlvaluetypes) -#include "tst_qdeclarativevaluetypes.moc" +#include "tst_qqmlvaluetypes.moc" diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect b/tests/auto/qml/qqmlxmlhttprequest/data/abort.expect similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect rename to tests/auto/qml/qqmlxmlhttprequest/data/abort.expect diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml b/tests/auto/qml/qqmlxmlhttprequest/data/abort.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/abort.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.reply b/tests/auto/qml/qqmlxmlhttprequest/data/abort.reply similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.reply rename to tests/auto/qml/qqmlxmlhttprequest/data/abort.reply diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml b/tests/auto/qml/qqmlxmlhttprequest/data/abort_opened.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/abort_opened.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml b/tests/auto/qml/qqmlxmlhttprequest/data/abort_unsent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/abort_unsent.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml b/tests/auto/qml/qqmlxmlhttprequest/data/attr.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/attr.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.xml b/tests/auto/qml/qqmlxmlhttprequest/data/attr.xml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.xml rename to tests/auto/qml/qqmlxmlhttprequest/data/attr.xml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml b/tests/auto/qml/qqmlxmlhttprequest/data/callbackException.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/callbackException.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml b/tests/auto/qml/qqmlxmlhttprequest/data/cdata.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/cdata.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.xml b/tests/auto/qml/qqmlxmlhttprequest/data/cdata.xml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.xml rename to tests/auto/qml/qqmlxmlhttprequest/data/cdata.xml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml b/tests/auto/qml/qqmlxmlhttprequest/data/constructor.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/constructor.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml b/tests/auto/qml/qqmlxmlhttprequest/data/defaultState.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/defaultState.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml b/tests/auto/qml/qqmlxmlhttprequest/data/document.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/document.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.xml b/tests/auto/qml/qqmlxmlhttprequest/data/document.xml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/document.xml rename to tests/auto/qml/qqmlxmlhttprequest/data/document.xml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml b/tests/auto/qml/qqmlxmlhttprequest/data/domExceptionCodes.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/domExceptionCodes.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml b/tests/auto/qml/qqmlxmlhttprequest/data/element.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/element.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.xml b/tests/auto/qml/qqmlxmlhttprequest/data/element.xml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/element.xml rename to tests/auto/qml/qqmlxmlhttprequest/data/element.xml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml b/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml b/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_args.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_args.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml b/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_sent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_sent.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml b/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_unsent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_unsent.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect b/tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader.expect similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect rename to tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader.expect diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml b/tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.reply b/tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader.reply similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.reply rename to tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader.reply diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml b/tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader_args.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader_args.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml b/tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader_sent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader_sent.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml b/tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader_unsent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader_unsent.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml b/tests/auto/qml/qqmlxmlhttprequest/data/instanceStateValues.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/instanceStateValues.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml b/tests/auto/qml/qqmlxmlhttprequest/data/invalidMethodUsage.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/invalidMethodUsage.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml b/tests/auto/qml/qqmlxmlhttprequest/data/open.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/open.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml b/tests/auto/qml/qqmlxmlhttprequest/data/open_arg_count.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/open_arg_count.1.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml b/tests/auto/qml/qqmlxmlhttprequest/data/open_arg_count.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/open_arg_count.2.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml b/tests/auto/qml/qqmlxmlhttprequest/data/open_invalid_method.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/open_invalid_method.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect b/tests/auto/qml/qqmlxmlhttprequest/data/open_network.expect similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect rename to tests/auto/qml/qqmlxmlhttprequest/data/open_network.expect diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.reply b/tests/auto/qml/qqmlxmlhttprequest/data/open_network.reply similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.reply rename to tests/auto/qml/qqmlxmlhttprequest/data/open_network.reply diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.wait b/tests/auto/qml/qqmlxmlhttprequest/data/open_network.wait similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.wait rename to tests/auto/qml/qqmlxmlhttprequest/data/open_network.wait diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml b/tests/auto/qml/qqmlxmlhttprequest/data/open_sync.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/open_sync.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml b/tests/auto/qml/qqmlxmlhttprequest/data/open_user.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/open_user.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml b/tests/auto/qml/qqmlxmlhttprequest/data/open_username.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/open_username.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml b/tests/auto/qml/qqmlxmlhttprequest/data/redirectError.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/redirectError.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml b/tests/auto/qml/qqmlxmlhttprequest/data/redirectRecur.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/redirectRecur.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml b/tests/auto/qml/qqmlxmlhttprequest/data/redirects.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/redirects.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirecttarget.html b/tests/auto/qml/qqmlxmlhttprequest/data/redirecttarget.html similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/redirecttarget.html rename to tests/auto/qml/qqmlxmlhttprequest/data/redirecttarget.html diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml b/tests/auto/qml/qqmlxmlhttprequest/data/responseText.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/responseText.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml b/tests/auto/qml/qqmlxmlhttprequest/data/responseXML_invalid.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/responseXML_invalid.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/seconddocument.html b/tests/auto/qml/qqmlxmlhttprequest/data/seconddocument.html similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/seconddocument.html rename to tests/auto/qml/qqmlxmlhttprequest/data/seconddocument.html diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml b/tests/auto/qml/qqmlxmlhttprequest/data/send_alreadySent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/send_alreadySent.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect b/tests/auto/qml/qqmlxmlhttprequest/data/send_data.1.expect similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect rename to tests/auto/qml/qqmlxmlhttprequest/data/send_data.1.expect diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml b/tests/auto/qml/qqmlxmlhttprequest/data/send_data.1.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/send_data.1.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml b/tests/auto/qml/qqmlxmlhttprequest/data/send_data.2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/send_data.2.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml b/tests/auto/qml/qqmlxmlhttprequest/data/send_data.3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/send_data.3.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect b/tests/auto/qml/qqmlxmlhttprequest/data/send_data.4.expect similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect rename to tests/auto/qml/qqmlxmlhttprequest/data/send_data.4.expect diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml b/tests/auto/qml/qqmlxmlhttprequest/data/send_data.4.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/send_data.4.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml b/tests/auto/qml/qqmlxmlhttprequest/data/send_data.5.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/send_data.5.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect b/tests/auto/qml/qqmlxmlhttprequest/data/send_data.6.expect similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect rename to tests/auto/qml/qqmlxmlhttprequest/data/send_data.6.expect diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml b/tests/auto/qml/qqmlxmlhttprequest/data/send_data.6.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/send_data.6.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml b/tests/auto/qml/qqmlxmlhttprequest/data/send_data.7.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/send_data.7.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.reply b/tests/auto/qml/qqmlxmlhttprequest/data/send_data.reply similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.reply rename to tests/auto/qml/qqmlxmlhttprequest/data/send_data.reply diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml b/tests/auto/qml/qqmlxmlhttprequest/data/send_ignoreData.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/send_ignoreData.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.reply b/tests/auto/qml/qqmlxmlhttprequest/data/send_ignoreData.reply similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.reply rename to tests/auto/qml/qqmlxmlhttprequest/data/send_ignoreData.reply diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_DELETE.expect b/tests/auto/qml/qqmlxmlhttprequest/data/send_ignoreData_DELETE.expect similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_DELETE.expect rename to tests/auto/qml/qqmlxmlhttprequest/data/send_ignoreData_DELETE.expect diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect b/tests/auto/qml/qqmlxmlhttprequest/data/send_ignoreData_GET.expect similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect rename to tests/auto/qml/qqmlxmlhttprequest/data/send_ignoreData_GET.expect diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_HEAD.expect b/tests/auto/qml/qqmlxmlhttprequest/data/send_ignoreData_HEAD.expect similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_HEAD.expect rename to tests/auto/qml/qqmlxmlhttprequest/data/send_ignoreData_HEAD.expect diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml b/tests/auto/qml/qqmlxmlhttprequest/data/send_unsent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/send_unsent.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect b/tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader.expect similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect rename to tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader.expect diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml b/tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.reply b/tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader.reply similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.reply rename to tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader.reply diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml b/tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader_args.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader_args.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_caseInsensitive.qml b/tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader_caseInsensitive.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_caseInsensitive.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader_caseInsensitive.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml b/tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader_illegalName.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader_illegalName.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml b/tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader_sent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader_sent.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml b/tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader_unsent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/setRequestHeader_unsent.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml b/tests/auto/qml/qqmlxmlhttprequest/data/staticStateValues.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/staticStateValues.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.200.reply b/tests/auto/qml/qqmlxmlhttprequest/data/status.200.reply similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/status.200.reply rename to tests/auto/qml/qqmlxmlhttprequest/data/status.200.reply diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.400.reply b/tests/auto/qml/qqmlxmlhttprequest/data/status.400.reply similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/status.400.reply rename to tests/auto/qml/qqmlxmlhttprequest/data/status.400.reply diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.404.reply b/tests/auto/qml/qqmlxmlhttprequest/data/status.404.reply similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/status.404.reply rename to tests/auto/qml/qqmlxmlhttprequest/data/status.404.reply diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect b/tests/auto/qml/qqmlxmlhttprequest/data/status.expect similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect rename to tests/auto/qml/qqmlxmlhttprequest/data/status.expect diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml b/tests/auto/qml/qqmlxmlhttprequest/data/status.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/status.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml b/tests/auto/qml/qqmlxmlhttprequest/data/statusText.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/statusText.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/testdocument.html b/tests/auto/qml/qqmlxmlhttprequest/data/testdocument.html similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/testdocument.html rename to tests/auto/qml/qqmlxmlhttprequest/data/testdocument.html diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml b/tests/auto/qml/qqmlxmlhttprequest/data/text.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/text.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.xml b/tests/auto/qml/qqmlxmlhttprequest/data/text.xml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/text.xml rename to tests/auto/qml/qqmlxmlhttprequest/data/text.xml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.html b/tests/auto/qml/qqmlxmlhttprequest/data/utf16.html similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.html rename to tests/auto/qml/qqmlxmlhttprequest/data/utf16.html diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml b/tests/auto/qml/qqmlxmlhttprequest/data/utf16.qml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml rename to tests/auto/qml/qqmlxmlhttprequest/data/utf16.qml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml b/tests/auto/qml/qqmlxmlhttprequest/data/utf16.xml similarity index 100% rename from tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml rename to tests/auto/qml/qqmlxmlhttprequest/data/utf16.xml diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro b/tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro similarity index 65% rename from tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro rename to tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro index b8f09f8722..ed016fd9b6 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro +++ b/tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro @@ -1,11 +1,11 @@ CONFIG += testcase -TARGET = tst_qdeclarativexmlhttprequest +TARGET = tst_qqmlxmlhttprequest macx:CONFIG -= app_bundle INCLUDEPATH += ../../shared/ HEADERS += ../../shared/testhttpserver.h -SOURCES += tst_qdeclarativexmlhttprequest.cpp \ +SOURCES += tst_qqmlxmlhttprequest.cpp \ ../../shared/testhttpserver.cpp include (../../shared/util.pri) @@ -16,4 +16,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private network testlib +QT += core-private gui-private qml-private network testlib diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp similarity index 82% rename from tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp rename to tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp index f3c3b57725..f8d74c3cde 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp +++ b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include -#include -#include +#include +#include #include #include #include @@ -50,11 +50,11 @@ #define SERVER_PORT 14445 -class tst_qdeclarativexmlhttprequest : public QDeclarativeDataTest +class tst_qqmlxmlhttprequest : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativexmlhttprequest() {} + tst_qqmlxmlhttprequest() {} private slots: void domExceptionCodes(); @@ -118,13 +118,13 @@ private slots: // void readyState() private: - QDeclarativeEngine engine; + QQmlEngine engine; }; // Test that the dom exception codes are correct -void tst_qdeclarativexmlhttprequest::domExceptionCodes() +void tst_qqmlxmlhttprequest::domExceptionCodes() { - QDeclarativeComponent component(&engine, testFileUrl("domExceptionCodes.qml")); + QQmlComponent component(&engine, testFileUrl("domExceptionCodes.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -149,7 +149,7 @@ void tst_qdeclarativexmlhttprequest::domExceptionCodes() delete object; } -void tst_qdeclarativexmlhttprequest::callbackException_data() +void tst_qqmlxmlhttprequest::callbackException_data() { QTest::addColumn("which"); QTest::addColumn("line"); @@ -159,7 +159,7 @@ void tst_qdeclarativexmlhttprequest::callbackException_data() QTest::newRow("on-done") << "4" << 15; } -void tst_qdeclarativexmlhttprequest::callbackException() +void tst_qqmlxmlhttprequest::callbackException() { // Test exception reporting for exceptions thrown at various points. @@ -169,7 +169,7 @@ void tst_qdeclarativexmlhttprequest::callbackException() QString expect = testFileUrl("callbackException.qml").toString() + ":"+QString::number(line)+": Error: Exception from Callback"; QTest::ignoreMessage(QtWarningMsg, expect.toLatin1()); - QDeclarativeComponent component(&engine, testFileUrl("callbackException.qml")); + QQmlComponent component(&engine, testFileUrl("callbackException.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "testdocument.html"); @@ -183,9 +183,9 @@ void tst_qdeclarativexmlhttprequest::callbackException() // Test that the state value properties on the XMLHttpRequest constructor have the correct values. // ### WebKit does not do this, but it seems to fit the standard and QML better -void tst_qdeclarativexmlhttprequest::staticStateValues() +void tst_qqmlxmlhttprequest::staticStateValues() { - QDeclarativeComponent component(&engine, testFileUrl("staticStateValues.qml")); + QQmlComponent component(&engine, testFileUrl("staticStateValues.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -199,9 +199,9 @@ void tst_qdeclarativexmlhttprequest::staticStateValues() } // Test that the state value properties on instances have the correct values. -void tst_qdeclarativexmlhttprequest::instanceStateValues() +void tst_qqmlxmlhttprequest::instanceStateValues() { - QDeclarativeComponent component(&engine, testFileUrl("instanceStateValues.qml")); + QQmlComponent component(&engine, testFileUrl("instanceStateValues.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -215,9 +215,9 @@ void tst_qdeclarativexmlhttprequest::instanceStateValues() } // Test calling constructor -void tst_qdeclarativexmlhttprequest::constructor() +void tst_qqmlxmlhttprequest::constructor() { - QDeclarativeComponent component(&engine, testFileUrl("constructor.qml")); + QQmlComponent component(&engine, testFileUrl("constructor.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -228,9 +228,9 @@ void tst_qdeclarativexmlhttprequest::constructor() } // Test that all the properties are set correctly before any request is sent -void tst_qdeclarativexmlhttprequest::defaultState() +void tst_qqmlxmlhttprequest::defaultState() { - QDeclarativeComponent component(&engine, testFileUrl("defaultState.qml")); + QQmlComponent component(&engine, testFileUrl("defaultState.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -244,7 +244,7 @@ void tst_qdeclarativexmlhttprequest::defaultState() } // Test valid XMLHttpRequest.open() calls -void tst_qdeclarativexmlhttprequest::open() +void tst_qqmlxmlhttprequest::open() { QFETCH(QUrl, qmlFile); QFETCH(QString, url); @@ -259,7 +259,7 @@ void tst_qdeclarativexmlhttprequest::open() testFileUrl("testdocument.html"))); } - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", url); @@ -277,7 +277,7 @@ void tst_qdeclarativexmlhttprequest::open() delete object; } -void tst_qdeclarativexmlhttprequest::open_data() +void tst_qqmlxmlhttprequest::open_data() { QTest::addColumn("qmlFile"); QTest::addColumn("url"); @@ -292,9 +292,9 @@ void tst_qdeclarativexmlhttprequest::open_data() } // Test that calling XMLHttpRequest.open() with an invalid method raises an exception -void tst_qdeclarativexmlhttprequest::open_invalid_method() +void tst_qqmlxmlhttprequest::open_invalid_method() { - QDeclarativeComponent component(&engine, testFileUrl("open_invalid_method.qml")); + QQmlComponent component(&engine, testFileUrl("open_invalid_method.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -304,9 +304,9 @@ void tst_qdeclarativexmlhttprequest::open_invalid_method() } // Test that calling XMLHttpRequest.open() with sync raises an exception -void tst_qdeclarativexmlhttprequest::open_sync() +void tst_qqmlxmlhttprequest::open_sync() { - QDeclarativeComponent component(&engine, testFileUrl("open_sync.qml")); + QQmlComponent component(&engine, testFileUrl("open_sync.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -316,10 +316,10 @@ void tst_qdeclarativexmlhttprequest::open_sync() } // Calling with incorrect arg count raises an exception -void tst_qdeclarativexmlhttprequest::open_arg_count() +void tst_qqmlxmlhttprequest::open_arg_count() { { - QDeclarativeComponent component(&engine, testFileUrl("open_arg_count.1.qml")); + QQmlComponent component(&engine, testFileUrl("open_arg_count.1.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -329,7 +329,7 @@ void tst_qdeclarativexmlhttprequest::open_arg_count() } { - QDeclarativeComponent component(&engine, testFileUrl("open_arg_count.2.qml")); + QQmlComponent component(&engine, testFileUrl("open_arg_count.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -340,7 +340,7 @@ void tst_qdeclarativexmlhttprequest::open_arg_count() } // Test valid setRequestHeader() calls -void tst_qdeclarativexmlhttprequest::setRequestHeader() +void tst_qqmlxmlhttprequest::setRequestHeader() { TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); @@ -348,7 +348,7 @@ void tst_qdeclarativexmlhttprequest::setRequestHeader() testFileUrl("setRequestHeader.reply"), testFileUrl("testdocument.html"))); - QDeclarativeComponent component(&engine, testFileUrl("setRequestHeader.qml")); + QQmlComponent component(&engine, testFileUrl("setRequestHeader.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/testdocument.html"); @@ -360,7 +360,7 @@ void tst_qdeclarativexmlhttprequest::setRequestHeader() } // Test valid setRequestHeader() calls with different header cases -void tst_qdeclarativexmlhttprequest::setRequestHeader_caseInsensitive() +void tst_qqmlxmlhttprequest::setRequestHeader_caseInsensitive() { TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); @@ -368,7 +368,7 @@ void tst_qdeclarativexmlhttprequest::setRequestHeader_caseInsensitive() testFileUrl("setRequestHeader.reply"), testFileUrl("testdocument.html"))); - QDeclarativeComponent component(&engine, testFileUrl("setRequestHeader_caseInsensitive.qml")); + QQmlComponent component(&engine, testFileUrl("setRequestHeader_caseInsensitive.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/testdocument.html"); @@ -379,9 +379,9 @@ void tst_qdeclarativexmlhttprequest::setRequestHeader_caseInsensitive() delete object; } // Test setting headers before open() throws exception -void tst_qdeclarativexmlhttprequest::setRequestHeader_unsent() +void tst_qqmlxmlhttprequest::setRequestHeader_unsent() { - QDeclarativeComponent component(&engine, testFileUrl("setRequestHeader_unsent.qml")); + QQmlComponent component(&engine, testFileUrl("setRequestHeader_unsent.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -390,7 +390,7 @@ void tst_qdeclarativexmlhttprequest::setRequestHeader_unsent() delete object; } -void tst_qdeclarativexmlhttprequest::setRequestHeader_illegalName_data() +void tst_qqmlxmlhttprequest::setRequestHeader_illegalName_data() { QTest::addColumn("name"); @@ -419,7 +419,7 @@ void tst_qdeclarativexmlhttprequest::setRequestHeader_illegalName_data() } // Tests that using illegal header names has no effect -void tst_qdeclarativexmlhttprequest::setRequestHeader_illegalName() +void tst_qqmlxmlhttprequest::setRequestHeader_illegalName() { QFETCH(QString, name); @@ -429,7 +429,7 @@ void tst_qdeclarativexmlhttprequest::setRequestHeader_illegalName() testFileUrl("open_network.reply"), testFileUrl("testdocument.html"))); - QDeclarativeComponent component(&engine, testFileUrl("setRequestHeader_illegalName.qml")); + QQmlComponent component(&engine, testFileUrl("setRequestHeader_illegalName.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/testdocument.html"); @@ -449,7 +449,7 @@ void tst_qdeclarativexmlhttprequest::setRequestHeader_illegalName() } // Test that attempting to set a header after a request is sent throws an exception -void tst_qdeclarativexmlhttprequest::setRequestHeader_sent() +void tst_qqmlxmlhttprequest::setRequestHeader_sent() { TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); @@ -457,7 +457,7 @@ void tst_qdeclarativexmlhttprequest::setRequestHeader_sent() testFileUrl("open_network.reply"), testFileUrl("testdocument.html"))); - QDeclarativeComponent component(&engine, testFileUrl("setRequestHeader_sent.qml")); + QQmlComponent component(&engine, testFileUrl("setRequestHeader_sent.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/testdocument.html"); @@ -471,9 +471,9 @@ void tst_qdeclarativexmlhttprequest::setRequestHeader_sent() } // Invalid arg count throws exception -void tst_qdeclarativexmlhttprequest::setRequestHeader_args() +void tst_qqmlxmlhttprequest::setRequestHeader_args() { - QDeclarativeComponent component(&engine, testFileUrl("setRequestHeader_args.qml")); + QQmlComponent component(&engine, testFileUrl("setRequestHeader_args.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -483,9 +483,9 @@ void tst_qdeclarativexmlhttprequest::setRequestHeader_args() } // Test that calling send() in UNSENT state throws an exception -void tst_qdeclarativexmlhttprequest::send_unsent() +void tst_qqmlxmlhttprequest::send_unsent() { - QDeclarativeComponent component(&engine, testFileUrl("send_unsent.qml")); + QQmlComponent component(&engine, testFileUrl("send_unsent.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -495,9 +495,9 @@ void tst_qdeclarativexmlhttprequest::send_unsent() } // Test attempting to resend a sent request throws an exception -void tst_qdeclarativexmlhttprequest::send_alreadySent() +void tst_qqmlxmlhttprequest::send_alreadySent() { - QDeclarativeComponent component(&engine, testFileUrl("send_alreadySent.qml")); + QQmlComponent component(&engine, testFileUrl("send_alreadySent.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -508,7 +508,7 @@ void tst_qdeclarativexmlhttprequest::send_alreadySent() } // Test that sends for GET, HEAD and DELETE ignore data -void tst_qdeclarativexmlhttprequest::send_ignoreData() +void tst_qqmlxmlhttprequest::send_ignoreData() { { TestHTTPServer server(SERVER_PORT); @@ -517,7 +517,7 @@ void tst_qdeclarativexmlhttprequest::send_ignoreData() testFileUrl("send_ignoreData.reply"), testFileUrl("testdocument.html"))); - QDeclarativeComponent component(&engine, testFileUrl("send_ignoreData.qml")); + QQmlComponent component(&engine, testFileUrl("send_ignoreData.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("reqType", "GET"); @@ -536,7 +536,7 @@ void tst_qdeclarativexmlhttprequest::send_ignoreData() testFileUrl("send_ignoreData.reply"), QUrl())); - QDeclarativeComponent component(&engine, testFileUrl("send_ignoreData.qml")); + QQmlComponent component(&engine, testFileUrl("send_ignoreData.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("reqType", "HEAD"); @@ -555,7 +555,7 @@ void tst_qdeclarativexmlhttprequest::send_ignoreData() testFileUrl("send_ignoreData.reply"), QUrl())); - QDeclarativeComponent component(&engine, testFileUrl("send_ignoreData.qml")); + QQmlComponent component(&engine, testFileUrl("send_ignoreData.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("reqType", "DELETE"); @@ -569,7 +569,7 @@ void tst_qdeclarativexmlhttprequest::send_ignoreData() } // Test that send()'ing data works -void tst_qdeclarativexmlhttprequest::send_withdata() +void tst_qqmlxmlhttprequest::send_withdata() { QFETCH(QString, file_expected); QFETCH(QString, file_qml); @@ -580,7 +580,7 @@ void tst_qdeclarativexmlhttprequest::send_withdata() testFileUrl("send_data.reply"), testFileUrl("testdocument.html"))); - QDeclarativeComponent component(&engine, testFileUrl(file_qml)); + QQmlComponent component(&engine, testFileUrl(file_qml)); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/testdocument.html"); @@ -591,7 +591,7 @@ void tst_qdeclarativexmlhttprequest::send_withdata() delete object; } -void tst_qdeclarativexmlhttprequest::send_withdata_data() +void tst_qqmlxmlhttprequest::send_withdata_data() { QTest::addColumn("file_expected"); QTest::addColumn("file_qml"); @@ -606,9 +606,9 @@ void tst_qdeclarativexmlhttprequest::send_withdata_data() } // Test abort() has no effect in unsent state -void tst_qdeclarativexmlhttprequest::abort_unsent() +void tst_qqmlxmlhttprequest::abort_unsent() { - QDeclarativeComponent component(&engine, testFileUrl("abort_unsent.qml")); + QQmlComponent component(&engine, testFileUrl("abort_unsent.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "testdocument.html"); @@ -627,9 +627,9 @@ void tst_qdeclarativexmlhttprequest::abort_unsent() } // Test abort() cancels an open (but unsent) request -void tst_qdeclarativexmlhttprequest::abort_opened() +void tst_qqmlxmlhttprequest::abort_opened() { - QDeclarativeComponent component(&engine, testFileUrl("abort_opened.qml")); + QQmlComponent component(&engine, testFileUrl("abort_opened.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "testdocument.html"); @@ -648,7 +648,7 @@ void tst_qdeclarativexmlhttprequest::abort_opened() } // Test abort() aborts in progress send -void tst_qdeclarativexmlhttprequest::abort() +void tst_qqmlxmlhttprequest::abort() { TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); @@ -656,7 +656,7 @@ void tst_qdeclarativexmlhttprequest::abort() testFileUrl("abort.reply"), testFileUrl("testdocument.html"))); - QDeclarativeComponent component(&engine, testFileUrl("abort.qml")); + QQmlComponent component(&engine, testFileUrl("abort.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("urlDummy", "http://127.0.0.1:14449/testdocument.html"); @@ -672,9 +672,9 @@ void tst_qdeclarativexmlhttprequest::abort() delete object; } -void tst_qdeclarativexmlhttprequest::getResponseHeader() +void tst_qqmlxmlhttprequest::getResponseHeader() { - QDeclarativeEngine engine; // Avoid cookie contamination + QQmlEngine engine; // Avoid cookie contamination TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); @@ -683,7 +683,7 @@ void tst_qdeclarativexmlhttprequest::getResponseHeader() testFileUrl("testdocument.html"))); - QDeclarativeComponent component(&engine, testFileUrl("getResponseHeader.qml")); + QQmlComponent component(&engine, testFileUrl("getResponseHeader.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/testdocument.html"); @@ -712,9 +712,9 @@ void tst_qdeclarativexmlhttprequest::getResponseHeader() } // Test getResponseHeader throws an exception in an invalid state -void tst_qdeclarativexmlhttprequest::getResponseHeader_unsent() +void tst_qqmlxmlhttprequest::getResponseHeader_unsent() { - QDeclarativeComponent component(&engine, testFileUrl("getResponseHeader_unsent.qml")); + QQmlComponent component(&engine, testFileUrl("getResponseHeader_unsent.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -724,9 +724,9 @@ void tst_qdeclarativexmlhttprequest::getResponseHeader_unsent() } // Test getResponseHeader throws an exception in an invalid state -void tst_qdeclarativexmlhttprequest::getResponseHeader_sent() +void tst_qqmlxmlhttprequest::getResponseHeader_sent() { - QDeclarativeComponent component(&engine, testFileUrl("getResponseHeader_sent.qml")); + QQmlComponent component(&engine, testFileUrl("getResponseHeader_sent.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -736,9 +736,9 @@ void tst_qdeclarativexmlhttprequest::getResponseHeader_sent() } // Invalid arg count throws exception -void tst_qdeclarativexmlhttprequest::getResponseHeader_args() +void tst_qqmlxmlhttprequest::getResponseHeader_args() { - QDeclarativeComponent component(&engine, testFileUrl("getResponseHeader_args.qml")); + QQmlComponent component(&engine, testFileUrl("getResponseHeader_args.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -747,9 +747,9 @@ void tst_qdeclarativexmlhttprequest::getResponseHeader_args() delete object; } -void tst_qdeclarativexmlhttprequest::getAllResponseHeaders() +void tst_qqmlxmlhttprequest::getAllResponseHeaders() { - QDeclarativeEngine engine; // Avoid cookie contamination + QQmlEngine engine; // Avoid cookie contamination TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); @@ -757,7 +757,7 @@ void tst_qdeclarativexmlhttprequest::getAllResponseHeaders() testFileUrl("getResponseHeader.reply"), testFileUrl("testdocument.html"))); - QDeclarativeComponent component(&engine, testFileUrl("getAllResponseHeaders.qml")); + QQmlComponent component(&engine, testFileUrl("getAllResponseHeaders.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/testdocument.html"); @@ -780,9 +780,9 @@ void tst_qdeclarativexmlhttprequest::getAllResponseHeaders() } // Test getAllResponseHeaders throws an exception in an invalid state -void tst_qdeclarativexmlhttprequest::getAllResponseHeaders_unsent() +void tst_qqmlxmlhttprequest::getAllResponseHeaders_unsent() { - QDeclarativeComponent component(&engine, testFileUrl("getAllResponseHeaders_unsent.qml")); + QQmlComponent component(&engine, testFileUrl("getAllResponseHeaders_unsent.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -792,9 +792,9 @@ void tst_qdeclarativexmlhttprequest::getAllResponseHeaders_unsent() } // Test getAllResponseHeaders throws an exception in an invalid state -void tst_qdeclarativexmlhttprequest::getAllResponseHeaders_sent() +void tst_qqmlxmlhttprequest::getAllResponseHeaders_sent() { - QDeclarativeComponent component(&engine, testFileUrl("getAllResponseHeaders_sent.qml")); + QQmlComponent component(&engine, testFileUrl("getAllResponseHeaders_sent.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -804,9 +804,9 @@ void tst_qdeclarativexmlhttprequest::getAllResponseHeaders_sent() } // Invalid arg count throws exception -void tst_qdeclarativexmlhttprequest::getAllResponseHeaders_args() +void tst_qqmlxmlhttprequest::getAllResponseHeaders_args() { - QDeclarativeComponent component(&engine, testFileUrl("getAllResponseHeaders_args.qml")); + QQmlComponent component(&engine, testFileUrl("getAllResponseHeaders_args.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -815,7 +815,7 @@ void tst_qdeclarativexmlhttprequest::getAllResponseHeaders_args() delete object; } -void tst_qdeclarativexmlhttprequest::status() +void tst_qqmlxmlhttprequest::status() { QFETCH(QUrl, replyUrl); QFETCH(int, status); @@ -826,7 +826,7 @@ void tst_qdeclarativexmlhttprequest::status() replyUrl, testFileUrl("testdocument.html"))); - QDeclarativeComponent component(&engine, testFileUrl("status.qml")); + QQmlComponent component(&engine, testFileUrl("status.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/testdocument.html"); @@ -846,7 +846,7 @@ void tst_qdeclarativexmlhttprequest::status() delete object; } -void tst_qdeclarativexmlhttprequest::status_data() +void tst_qqmlxmlhttprequest::status_data() { QTest::addColumn("replyUrl"); QTest::addColumn("status"); @@ -856,7 +856,7 @@ void tst_qdeclarativexmlhttprequest::status_data() QTest::newRow("Bad Request") << testFileUrl("status.400.reply") << 400; } -void tst_qdeclarativexmlhttprequest::statusText() +void tst_qqmlxmlhttprequest::statusText() { QFETCH(QUrl, replyUrl); QFETCH(QString, statusText); @@ -867,7 +867,7 @@ void tst_qdeclarativexmlhttprequest::statusText() replyUrl, testFileUrl("testdocument.html"))); - QDeclarativeComponent component(&engine, testFileUrl("statusText.qml")); + QQmlComponent component(&engine, testFileUrl("statusText.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/testdocument.html"); @@ -887,7 +887,7 @@ void tst_qdeclarativexmlhttprequest::statusText() delete object; } -void tst_qdeclarativexmlhttprequest::statusText_data() +void tst_qqmlxmlhttprequest::statusText_data() { QTest::addColumn("replyUrl"); QTest::addColumn("statusText"); @@ -897,7 +897,7 @@ void tst_qdeclarativexmlhttprequest::statusText_data() QTest::newRow("Bad Request") << testFileUrl("status.400.reply") << "Bad request"; } -void tst_qdeclarativexmlhttprequest::responseText() +void tst_qqmlxmlhttprequest::responseText() { QFETCH(QUrl, replyUrl); QFETCH(QUrl, bodyUrl); @@ -909,7 +909,7 @@ void tst_qdeclarativexmlhttprequest::responseText() replyUrl, bodyUrl)); - QDeclarativeComponent component(&engine, testFileUrl("responseText.qml")); + QQmlComponent component(&engine, testFileUrl("responseText.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/testdocument.html"); @@ -929,7 +929,7 @@ void tst_qdeclarativexmlhttprequest::responseText() delete object; } -void tst_qdeclarativexmlhttprequest::responseText_data() +void tst_qqmlxmlhttprequest::responseText_data() { QTest::addColumn("replyUrl"); QTest::addColumn("bodyUrl"); @@ -941,13 +941,13 @@ void tst_qdeclarativexmlhttprequest::responseText_data() QTest::newRow("Bad Request") << testFileUrl("status.404.reply") << testFileUrl("testdocument.html") << ""; } -void tst_qdeclarativexmlhttprequest::nonUtf8() +void tst_qqmlxmlhttprequest::nonUtf8() { QFETCH(QString, fileName); QFETCH(QString, responseText); QFETCH(QString, xmlRootNodeValue); - QDeclarativeComponent component(&engine, testFileUrl("utf16.qml")); + QQmlComponent component(&engine, testFileUrl("utf16.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -966,7 +966,7 @@ void tst_qdeclarativexmlhttprequest::nonUtf8() delete object; } -void tst_qdeclarativexmlhttprequest::nonUtf8_data() +void tst_qqmlxmlhttprequest::nonUtf8_data() { QTest::addColumn("fileName"); QTest::addColumn("responseText"); @@ -984,9 +984,9 @@ void tst_qdeclarativexmlhttprequest::nonUtf8_data() // Test that calling hte XMLHttpRequest methods on a non-XMLHttpRequest object // throws an exception -void tst_qdeclarativexmlhttprequest::invalidMethodUsage() +void tst_qqmlxmlhttprequest::invalidMethodUsage() { - QDeclarativeComponent component(&engine, testFileUrl("invalidMethodUsage.qml")); + QQmlComponent component(&engine, testFileUrl("invalidMethodUsage.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1007,7 +1007,7 @@ void tst_qdeclarativexmlhttprequest::invalidMethodUsage() } // Test that XMLHttpRequest transparently redirects -void tst_qdeclarativexmlhttprequest::redirects() +void tst_qqmlxmlhttprequest::redirects() { { TestHTTPServer server(SERVER_PORT); @@ -1015,7 +1015,7 @@ void tst_qdeclarativexmlhttprequest::redirects() server.addRedirect("redirect.html", "http://127.0.0.1:14445/redirecttarget.html"); server.serveDirectory(dataDirectory()); - QDeclarativeComponent component(&engine, testFileUrl("redirects.qml")); + QQmlComponent component(&engine, testFileUrl("redirects.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/redirect.html"); @@ -1034,7 +1034,7 @@ void tst_qdeclarativexmlhttprequest::redirects() server.addRedirect("redirect.html", "http://127.0.0.1:14445/redirectmissing.html"); server.serveDirectory(dataDirectory()); - QDeclarativeComponent component(&engine, testFileUrl("redirectError.qml")); + QQmlComponent component(&engine, testFileUrl("redirectError.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/redirect.html"); @@ -1053,7 +1053,7 @@ void tst_qdeclarativexmlhttprequest::redirects() server.addRedirect("redirect.html", "http://127.0.0.1:14445/redirect.html"); server.serveDirectory(dataDirectory()); - QDeclarativeComponent component(&engine, testFileUrl("redirectRecur.qml")); + QQmlComponent component(&engine, testFileUrl("redirectRecur.qml")); QObject *object = component.beginCreate(engine.rootContext()); QVERIFY(object != 0); object->setProperty("url", "http://127.0.0.1:14445/redirect.html"); @@ -1072,9 +1072,9 @@ void tst_qdeclarativexmlhttprequest::redirects() } } -void tst_qdeclarativexmlhttprequest::responseXML_invalid() +void tst_qqmlxmlhttprequest::responseXML_invalid() { - QDeclarativeComponent component(&engine, testFileUrl("responseXML_invalid.qml")); + QQmlComponent component(&engine, testFileUrl("responseXML_invalid.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1086,9 +1086,9 @@ void tst_qdeclarativexmlhttprequest::responseXML_invalid() } // Test the Document DOM element -void tst_qdeclarativexmlhttprequest::document() +void tst_qqmlxmlhttprequest::document() { - QDeclarativeComponent component(&engine, testFileUrl("document.qml")); + QQmlComponent component(&engine, testFileUrl("document.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1100,9 +1100,9 @@ void tst_qdeclarativexmlhttprequest::document() } // Test the Element DOM element -void tst_qdeclarativexmlhttprequest::element() +void tst_qqmlxmlhttprequest::element() { - QDeclarativeComponent component(&engine, testFileUrl("element.qml")); + QQmlComponent component(&engine, testFileUrl("element.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1114,9 +1114,9 @@ void tst_qdeclarativexmlhttprequest::element() } // Test the Attr DOM element -void tst_qdeclarativexmlhttprequest::attr() +void tst_qqmlxmlhttprequest::attr() { - QDeclarativeComponent component(&engine, testFileUrl("attr.qml")); + QQmlComponent component(&engine, testFileUrl("attr.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1128,9 +1128,9 @@ void tst_qdeclarativexmlhttprequest::attr() } // Test the Text DOM element -void tst_qdeclarativexmlhttprequest::text() +void tst_qqmlxmlhttprequest::text() { - QDeclarativeComponent component(&engine, testFileUrl("text.qml")); + QQmlComponent component(&engine, testFileUrl("text.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1142,9 +1142,9 @@ void tst_qdeclarativexmlhttprequest::text() } // Test the CDataSection DOM element -void tst_qdeclarativexmlhttprequest::cdata() +void tst_qqmlxmlhttprequest::cdata() { - QDeclarativeComponent component(&engine, testFileUrl("cdata.qml")); + QQmlComponent component(&engine, testFileUrl("cdata.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -1155,6 +1155,6 @@ void tst_qdeclarativexmlhttprequest::cdata() delete object; } -QTEST_MAIN(tst_qdeclarativexmlhttprequest) +QTEST_MAIN(tst_qqmlxmlhttprequest) -#include "tst_qdeclarativexmlhttprequest.moc" +#include "tst_qqmlxmlhttprequest.moc" diff --git a/tests/auto/declarative/qdeclarativebinding/data/deletedObject.qml b/tests/auto/qml/qquickbinding/data/deletedObject.qml similarity index 100% rename from tests/auto/declarative/qdeclarativebinding/data/deletedObject.qml rename to tests/auto/qml/qquickbinding/data/deletedObject.qml diff --git a/tests/auto/declarative/qdeclarativebinding/data/restoreBinding.qml b/tests/auto/qml/qquickbinding/data/restoreBinding.qml similarity index 100% rename from tests/auto/declarative/qdeclarativebinding/data/restoreBinding.qml rename to tests/auto/qml/qquickbinding/data/restoreBinding.qml diff --git a/tests/auto/declarative/qdeclarativebinding/data/restoreBindingWithLoop.qml b/tests/auto/qml/qquickbinding/data/restoreBindingWithLoop.qml similarity index 100% rename from tests/auto/declarative/qdeclarativebinding/data/restoreBindingWithLoop.qml rename to tests/auto/qml/qquickbinding/data/restoreBindingWithLoop.qml diff --git a/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml b/tests/auto/qml/qquickbinding/data/test-binding.qml similarity index 100% rename from tests/auto/declarative/qdeclarativebinding/data/test-binding.qml rename to tests/auto/qml/qquickbinding/data/test-binding.qml diff --git a/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml b/tests/auto/qml/qquickbinding/data/test-binding2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml rename to tests/auto/qml/qquickbinding/data/test-binding2.qml diff --git a/tests/auto/qml/qquickbinding/qquickbinding.pro b/tests/auto/qml/qquickbinding/qquickbinding.pro new file mode 100644 index 0000000000..b87e93495d --- /dev/null +++ b/tests/auto/qml/qquickbinding/qquickbinding.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qquickbinding +macx:CONFIG -= app_bundle + +SOURCES += tst_qquickbinding.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/qml/qquickbinding/tst_qquickbinding.cpp similarity index 78% rename from tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp rename to tests/auto/qml/qquickbinding/tst_qquickbinding.cpp index 7dc861c02b..939c4a9e3d 100644 --- a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp +++ b/tests/auto/qml/qquickbinding/tst_qquickbinding.cpp @@ -39,17 +39,17 @@ ** ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include #include #include "../../shared/util.h" -class tst_qdeclarativebinding : public QDeclarativeDataTest +class tst_qquickbinding : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativebinding(); + tst_qquickbinding(); private slots: void binding(); @@ -59,21 +59,21 @@ private slots: void deletedObject(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -tst_qdeclarativebinding::tst_qdeclarativebinding() +tst_qquickbinding::tst_qquickbinding() { } -void tst_qdeclarativebinding::binding() +void tst_qquickbinding::binding() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("test-binding.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("test-binding.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); - QDeclarativeBind *binding3 = qobject_cast(rect->findChild("binding3")); + QQuickBind *binding3 = qobject_cast(rect->findChild("binding3")); QVERIFY(binding3 != 0); QCOMPARE(rect->color(), QColor("yellow")); @@ -85,7 +85,7 @@ void tst_qdeclarativebinding::binding() QCOMPARE(binding3->when(), true); - QDeclarativeBind *binding = qobject_cast(rect->findChild("binding1")); + QQuickBind *binding = qobject_cast(rect->findChild("binding1")); QVERIFY(binding != 0); QCOMPARE(binding->object(), qobject_cast(rect)); QCOMPARE(binding->property(), QLatin1String("text")); @@ -94,10 +94,10 @@ void tst_qdeclarativebinding::binding() delete rect; } -void tst_qdeclarativebinding::whenAfterValue() +void tst_qquickbinding::whenAfterValue() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("test-binding2.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("test-binding2.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); @@ -110,10 +110,10 @@ void tst_qdeclarativebinding::whenAfterValue() delete rect; } -void tst_qdeclarativebinding::restoreBinding() +void tst_qquickbinding::restoreBinding() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("restoreBinding.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("restoreBinding.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); @@ -140,10 +140,10 @@ void tst_qdeclarativebinding::restoreBinding() delete rect; } -void tst_qdeclarativebinding::restoreBindingWithLoop() +void tst_qquickbinding::restoreBindingWithLoop() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("restoreBindingWithLoop.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("restoreBindingWithLoop.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); @@ -177,10 +177,10 @@ void tst_qdeclarativebinding::restoreBindingWithLoop() } //QTBUG-20692 -void tst_qdeclarativebinding::deletedObject() +void tst_qquickbinding::deletedObject() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("deletedObject.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("deletedObject.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); @@ -192,6 +192,6 @@ void tst_qdeclarativebinding::deletedObject() delete rect; } -QTEST_MAIN(tst_qdeclarativebinding) +QTEST_MAIN(tst_qquickbinding) -#include "tst_qdeclarativebinding.moc" +#include "tst_qquickbinding.moc" diff --git a/tests/auto/qml/qquickchangeset/qquickchangeset.pro b/tests/auto/qml/qquickchangeset/qquickchangeset.pro new file mode 100644 index 0000000000..726b18665b --- /dev/null +++ b/tests/auto/qml/qquickchangeset/qquickchangeset.pro @@ -0,0 +1,9 @@ +CONFIG += testcase +TARGET = tst_qquickchangeset +macx:CONFIG -= app_bundle + +SOURCES += tst_qquickchangeset.cpp + +CONFIG += parallel_test + +QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp b/tests/auto/qml/qquickchangeset/tst_qquickchangeset.cpp similarity index 98% rename from tests/auto/declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp rename to tests/auto/qml/qquickchangeset/tst_qquickchangeset.cpp index 254996e4db..4bd3df90ac 100644 --- a/tests/auto/declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp +++ b/tests/auto/qml/qquickchangeset/tst_qquickchangeset.cpp @@ -39,11 +39,11 @@ ** ****************************************************************************/ #include -#include +#include #define VERIFY_EXPECTED_OUTPUT -class tst_qdeclarativemodelchange : public QObject +class tst_qquickchangeset : public QObject { Q_OBJECT public: @@ -132,7 +132,7 @@ private slots: void sequence(); }; -bool operator ==(const tst_qdeclarativemodelchange::Signal &left, const tst_qdeclarativemodelchange::Signal &right) +bool operator ==(const tst_qquickchangeset::Signal &left, const tst_qquickchangeset::Signal &right) { return left.index == right.index && left.count == right.count @@ -141,7 +141,7 @@ bool operator ==(const tst_qdeclarativemodelchange::Signal &left, const tst_qdec } -QDebug operator <<(QDebug debug, const tst_qdeclarativemodelchange::Signal &signal) +QDebug operator <<(QDebug debug, const tst_qquickchangeset::Signal &signal) { if (signal.isInsert()) debug.nospace() << "Insert(" << signal.index << "," << signal.count << "," << signal.moveId << ")"; @@ -154,9 +154,9 @@ QDebug operator <<(QDebug debug, const tst_qdeclarativemodelchange::Signal &sign return debug; } -Q_DECLARE_METATYPE(tst_qdeclarativemodelchange::SignalList) +Q_DECLARE_METATYPE(tst_qquickchangeset::SignalList) -void tst_qdeclarativemodelchange::sequence_data() +void tst_qquickchangeset::sequence_data() { QTest::addColumn("input"); QTest::addColumn("output"); @@ -751,12 +751,12 @@ void tst_qdeclarativemodelchange::sequence_data() } -void tst_qdeclarativemodelchange::sequence() +void tst_qquickchangeset::sequence() { QFETCH(SignalList, input); QFETCH(SignalList, output); - QDeclarativeChangeSet set; + QQuickChangeSet set; foreach (const Signal &signal, input) { if (signal.isRemove()) @@ -770,11 +770,11 @@ void tst_qdeclarativemodelchange::sequence() } SignalList changes; - foreach (const QDeclarativeChangeSet::Remove &remove, set.removes()) + foreach (const QQuickChangeSet::Remove &remove, set.removes()) changes << Remove(remove.index, remove.count, remove.moveId); - foreach (const QDeclarativeChangeSet::Insert &insert, set.inserts()) + foreach (const QQuickChangeSet::Insert &insert, set.inserts()) changes << Insert(insert.index, insert.count, insert.moveId); - foreach (const QDeclarativeChangeSet::Change &change, set.changes()) + foreach (const QQuickChangeSet::Change &change, set.changes()) changes << Change(change.index, change.count); #ifdef VERIFY_EXPECTED_OUTPUT @@ -807,6 +807,6 @@ void tst_qdeclarativemodelchange::sequence() } -QTEST_MAIN(tst_qdeclarativemodelchange) +QTEST_MAIN(tst_qquickchangeset) -#include "tst_qdeclarativechangeset.moc" +#include "tst_qquickchangeset.moc" diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml b/tests/auto/qml/qquickconnection/data/connection-targetchange.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml rename to tests/auto/qml/qquickconnection/data/connection-targetchange.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-ignored.qml b/tests/auto/qml/qquickconnection/data/connection-unknownsignals-ignored.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-ignored.qml rename to tests/auto/qml/qquickconnection/data/connection-unknownsignals-ignored.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-notarget.qml b/tests/auto/qml/qquickconnection/data/connection-unknownsignals-notarget.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-notarget.qml rename to tests/auto/qml/qquickconnection/data/connection-unknownsignals-notarget.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-parent.qml b/tests/auto/qml/qquickconnection/data/connection-unknownsignals-parent.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-parent.qml rename to tests/auto/qml/qquickconnection/data/connection-unknownsignals-parent.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals.qml b/tests/auto/qml/qquickconnection/data/connection-unknownsignals.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals.qml rename to tests/auto/qml/qquickconnection/data/connection-unknownsignals.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/error-object.qml b/tests/auto/qml/qquickconnection/data/error-object.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/error-object.qml rename to tests/auto/qml/qquickconnection/data/error-object.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/error-property.qml b/tests/auto/qml/qquickconnection/data/error-property.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/error-property.qml rename to tests/auto/qml/qquickconnection/data/error-property.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/error-property2.qml b/tests/auto/qml/qquickconnection/data/error-property2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/error-property2.qml rename to tests/auto/qml/qquickconnection/data/error-property2.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/error-syntax.qml b/tests/auto/qml/qquickconnection/data/error-syntax.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/error-syntax.qml rename to tests/auto/qml/qquickconnection/data/error-syntax.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/moduleapi-target.qml b/tests/auto/qml/qquickconnection/data/moduleapi-target.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/moduleapi-target.qml rename to tests/auto/qml/qquickconnection/data/moduleapi-target.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml b/tests/auto/qml/qquickconnection/data/test-connection.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml rename to tests/auto/qml/qquickconnection/data/test-connection.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml b/tests/auto/qml/qquickconnection/data/test-connection2.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml rename to tests/auto/qml/qquickconnection/data/test-connection2.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml b/tests/auto/qml/qquickconnection/data/test-connection3.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml rename to tests/auto/qml/qquickconnection/data/test-connection3.qml diff --git a/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml b/tests/auto/qml/qquickconnection/data/trimming.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeconnection/data/trimming.qml rename to tests/auto/qml/qquickconnection/data/trimming.qml diff --git a/tests/auto/qml/qquickconnection/qquickconnection.pro b/tests/auto/qml/qquickconnection/qquickconnection.pro new file mode 100644 index 0000000000..bea1f1df00 --- /dev/null +++ b/tests/auto/qml/qquickconnection/qquickconnection.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qquickconnection +macx:CONFIG -= app_bundle + +SOURCES += tst_qquickconnection.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp b/tests/auto/qml/qquickconnection/tst_qquickconnection.cpp similarity index 76% rename from tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp rename to tests/auto/qml/qquickconnection/tst_qquickconnection.cpp index 0474b4388e..ad687dd085 100644 --- a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp +++ b/tests/auto/qml/qquickconnection/tst_qquickconnection.cpp @@ -39,18 +39,18 @@ ** ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include #include #include "../../shared/util.h" -#include +#include -class tst_qdeclarativeconnection : public QDeclarativeDataTest +class tst_qquickconnection : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativeconnection(); + tst_qquickconnection(); private slots: void defaultValues(); @@ -65,18 +65,18 @@ private slots: void moduleApiTarget(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -tst_qdeclarativeconnection::tst_qdeclarativeconnection() +tst_qquickconnection::tst_qquickconnection() { } -void tst_qdeclarativeconnection::defaultValues() +void tst_qquickconnection::defaultValues() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("test-connection3.qml")); - QDeclarativeConnections *item = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("test-connection3.qml")); + QQuickConnections *item = qobject_cast(c.create()); QVERIFY(item != 0); QVERIFY(item->target() == 0); @@ -84,11 +84,11 @@ void tst_qdeclarativeconnection::defaultValues() delete item; } -void tst_qdeclarativeconnection::properties() +void tst_qquickconnection::properties() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("test-connection2.qml")); - QDeclarativeConnections *item = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("test-connection2.qml")); + QQuickConnections *item = qobject_cast(c.create()); QVERIFY(item != 0); @@ -98,10 +98,10 @@ void tst_qdeclarativeconnection::properties() delete item; } -void tst_qdeclarativeconnection::connection() +void tst_qquickconnection::connection() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("test-connection.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("test-connection.qml")); QQuickItem *item = qobject_cast(c.create()); QVERIFY(item != 0); @@ -115,10 +115,10 @@ void tst_qdeclarativeconnection::connection() delete item; } -void tst_qdeclarativeconnection::trimming() +void tst_qquickconnection::trimming() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("trimming.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("trimming.qml")); QQuickItem *item = qobject_cast(c.create()); QVERIFY(item != 0); @@ -136,14 +136,14 @@ void tst_qdeclarativeconnection::trimming() } // Confirm that target can be changed by one of our signal handlers -void tst_qdeclarativeconnection::targetChanged() +void tst_qquickconnection::targetChanged() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("connection-targetchange.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("connection-targetchange.qml")); QQuickItem *item = qobject_cast(c.create()); QVERIFY(item != 0); - QDeclarativeConnections *connections = item->findChild("connections"); + QQuickConnections *connections = item->findChild("connections"); QVERIFY(connections); QQuickItem *item1 = item->findChild("item1"); @@ -160,7 +160,7 @@ void tst_qdeclarativeconnection::targetChanged() delete item; } -void tst_qdeclarativeconnection::unknownSignals_data() +void tst_qquickconnection::unknownSignals_data() { QTest::addColumn("file"); QTest::addColumn("error"); @@ -171,7 +171,7 @@ void tst_qdeclarativeconnection::unknownSignals_data() QTest::newRow("notarget") << "connection-unknownsignals-notarget.qml" << ""; // should be NO error } -void tst_qdeclarativeconnection::unknownSignals() +void tst_qquickconnection::unknownSignals() { QFETCH(QString, file); QFETCH(QString, error); @@ -183,13 +183,13 @@ void tst_qdeclarativeconnection::unknownSignals() // QTest has no way to insist no message (i.e. fail) } - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, url); + QQmlEngine engine; + QQmlComponent c(&engine, url); QQuickItem *item = qobject_cast(c.create()); QVERIFY(item != 0); // check that connection is created (they are all runtime errors) - QDeclarativeConnections *connections = item->findChild("connections"); + QQuickConnections *connections = item->findChild("connections"); QVERIFY(connections); if (file == "connection-unknownsignals-ignored.qml") @@ -198,7 +198,7 @@ void tst_qdeclarativeconnection::unknownSignals() delete item; } -void tst_qdeclarativeconnection::errors_data() +void tst_qquickconnection::errors_data() { QTest::addColumn("file"); QTest::addColumn("error"); @@ -209,17 +209,17 @@ void tst_qdeclarativeconnection::errors_data() QTest::newRow("grouped object") << "error-syntax.qml" << "Connections: syntax error"; } -void tst_qdeclarativeconnection::errors() +void tst_qquickconnection::errors() { QFETCH(QString, file); QFETCH(QString, error); QUrl url = testFileUrl(file); - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, url); + QQmlEngine engine; + QQmlComponent c(&engine, url); QVERIFY(c.isError() == true); - QList errors = c.errors(); + QList errors = c.errors(); QVERIFY(errors.count() == 1); QCOMPARE(errors.at(0).description(), error); } @@ -252,7 +252,7 @@ Q_PROPERTY(int intProp READ intProp WRITE setIntProp NOTIFY intPropChanged) int m_changeCount; }; -static QObject *module_api_factory(QDeclarativeEngine *engine, QJSEngine *scriptEngine) +static QObject *module_api_factory(QQmlEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(engine) Q_UNUSED(scriptEngine) @@ -261,10 +261,10 @@ static QObject *module_api_factory(QDeclarativeEngine *engine, QJSEngine *script } // QTBUG-20937 -void tst_qdeclarativeconnection::moduleApiTarget() +void tst_qquickconnection::moduleApiTarget() { qmlRegisterModuleApi("MyTestModuleApi", 1, 0, module_api_factory); - QDeclarativeComponent component(&engine, testFileUrl("moduleapi-target.qml")); + QQmlComponent component(&engine, testFileUrl("moduleapi-target.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -287,6 +287,6 @@ void tst_qdeclarativeconnection::moduleApiTarget() delete object; } -QTEST_MAIN(tst_qdeclarativeconnection) +QTEST_MAIN(tst_qquickconnection) -#include "tst_qdeclarativeconnection.moc" +#include "tst_qquickconnection.moc" diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/data/basic.qml b/tests/auto/qml/qquickfolderlistmodel/data/basic.qml similarity index 100% rename from tests/auto/declarative/qdeclarativefolderlistmodel/data/basic.qml rename to tests/auto/qml/qquickfolderlistmodel/data/basic.qml diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml b/tests/auto/qml/qquickfolderlistmodel/data/dummy.qml similarity index 100% rename from tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml rename to tests/auto/qml/qquickfolderlistmodel/data/dummy.qml diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/data/resetFiltering.qml b/tests/auto/qml/qquickfolderlistmodel/data/resetFiltering.qml similarity index 100% rename from tests/auto/declarative/qdeclarativefolderlistmodel/data/resetFiltering.qml rename to tests/auto/qml/qquickfolderlistmodel/data/resetFiltering.qml diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/data/resetfiltering/innerdir/test2.txt b/tests/auto/qml/qquickfolderlistmodel/data/resetfiltering/innerdir/test2.txt similarity index 100% rename from tests/auto/declarative/qdeclarativefolderlistmodel/data/resetfiltering/innerdir/test2.txt rename to tests/auto/qml/qquickfolderlistmodel/data/resetfiltering/innerdir/test2.txt diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/data/resetfiltering/test.txt b/tests/auto/qml/qquickfolderlistmodel/data/resetfiltering/test.txt similarity index 100% rename from tests/auto/declarative/qdeclarativefolderlistmodel/data/resetfiltering/test.txt rename to tests/auto/qml/qquickfolderlistmodel/data/resetfiltering/test.txt diff --git a/tests/auto/qml/qquickfolderlistmodel/qquickfolderlistmodel.pro b/tests/auto/qml/qquickfolderlistmodel/qquickfolderlistmodel.pro new file mode 100644 index 0000000000..bdf4a45865 --- /dev/null +++ b/tests/auto/qml/qquickfolderlistmodel/qquickfolderlistmodel.pro @@ -0,0 +1,14 @@ +CONFIG += testcase +TARGET = tst_qquickfolderlistmodel +macx:CONFIG -= app_bundle + +SOURCES += tst_qquickfolderlistmodel.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test +QT += core-private gui-private qml-private testlib diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp similarity index 84% rename from tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp rename to tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp index 07eb6e87e1..a6d90cf688 100644 --- a/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp +++ b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp @@ -40,24 +40,24 @@ ****************************************************************************/ #include #include -#include -#include +#include +#include #include #include #include #include #include "../../shared/util.h" -// From qdeclarastivefolderlistmodel.h +// From qquickfolderlistmodel.h const int FileNameRole = Qt::UserRole+1; const int FilePathRole = Qt::UserRole+2; enum SortField { Unsorted, Name, Time, Size, Type }; -class tst_qdeclarativefolderlistmodel : public QDeclarativeDataTest +class tst_qquickfolderlistmodel : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativefolderlistmodel() : removeStart(0), removeEnd(0) {} + tst_qquickfolderlistmodel() : removeStart(0), removeEnd(0) {} public slots: void removed(const QModelIndex &, int start, int end) { @@ -71,22 +71,22 @@ private slots: void refresh(); private: - void checkNoErrors(const QDeclarativeComponent& component); - QDeclarativeEngine engine; + void checkNoErrors(const QQmlComponent& component); + QQmlEngine engine; int removeStart; int removeEnd; }; -void tst_qdeclarativefolderlistmodel::checkNoErrors(const QDeclarativeComponent& component) +void tst_qquickfolderlistmodel::checkNoErrors(const QQmlComponent& component) { // Wait until the component is ready QTRY_VERIFY(component.isReady() || component.isError()); if (component.isError()) { - QList errors = component.errors(); + QList errors = component.errors(); for (int ii = 0; ii < errors.count(); ++ii) { - const QDeclarativeError &error = errors.at(ii); + const QQmlError &error = errors.at(ii); QByteArray errorStr = QByteArray::number(error.line()) + ":" + QByteArray::number(error.column()) + ":" + error.description().toUtf8(); @@ -96,9 +96,9 @@ void tst_qdeclarativefolderlistmodel::checkNoErrors(const QDeclarativeComponent& QVERIFY(!component.isError()); } -void tst_qdeclarativefolderlistmodel::basicProperties() +void tst_qquickfolderlistmodel::basicProperties() { - QDeclarativeComponent component(&engine, testFileUrl("basic.qml")); + QQmlComponent component(&engine, testFileUrl("basic.qml")); checkNoErrors(component); QAbstractListModel *flm = qobject_cast(component.create()); @@ -121,10 +121,10 @@ void tst_qdeclarativefolderlistmodel::basicProperties() QCOMPARE(flm->property("folder").toUrl(), QUrl::fromLocalFile("")); } -void tst_qdeclarativefolderlistmodel::resetFiltering() +void tst_qquickfolderlistmodel::resetFiltering() { // see QTBUG-17837 - QDeclarativeComponent component(&engine, testFileUrl("resetFiltering.qml")); + QQmlComponent component(&engine, testFileUrl("resetFiltering.qml")); checkNoErrors(component); QAbstractListModel *flm = qobject_cast(component.create()); @@ -152,9 +152,9 @@ void tst_qdeclarativefolderlistmodel::resetFiltering() QCOMPARE(removeEnd, count-1); } -void tst_qdeclarativefolderlistmodel::refresh() +void tst_qquickfolderlistmodel::refresh() { - QDeclarativeComponent component(&engine, testFileUrl("basic.qml")); + QQmlComponent component(&engine, testFileUrl("basic.qml")); checkNoErrors(component); QAbstractListModel *flm = qobject_cast(component.create()); @@ -174,6 +174,6 @@ void tst_qdeclarativefolderlistmodel::refresh() QCOMPARE(removeEnd, count-1); } -QTEST_MAIN(tst_qdeclarativefolderlistmodel) +QTEST_MAIN(tst_qquickfolderlistmodel) -#include "tst_qdeclarativefolderlistmodel.moc" +#include "tst_qquickfolderlistmodel.moc" diff --git a/tests/auto/qml/qquicklistcompositor/qquicklistcompositor.pro b/tests/auto/qml/qquicklistcompositor/qquicklistcompositor.pro new file mode 100644 index 0000000000..0e7a1af4c5 --- /dev/null +++ b/tests/auto/qml/qquicklistcompositor/qquicklistcompositor.pro @@ -0,0 +1,9 @@ +CONFIG += testcase +TARGET = tst_qquicklistcompositor +macx:CONFIG -= app_bundle + +SOURCES += tst_qquicklistcompositor.cpp + +CONFIG += parallel_test + +QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/declarative/qdeclarativelistcompositor/tst_qdeclarativelistcompositor.cpp b/tests/auto/qml/qquicklistcompositor/tst_qquicklistcompositor.cpp similarity index 97% rename from tests/auto/declarative/qdeclarativelistcompositor/tst_qdeclarativelistcompositor.cpp rename to tests/auto/qml/qquicklistcompositor/tst_qquicklistcompositor.cpp index 1716bfe2c7..a5d66661f0 100644 --- a/tests/auto/declarative/qdeclarativelistcompositor/tst_qdeclarativelistcompositor.cpp +++ b/tests/auto/qml/qquicklistcompositor/tst_qquicklistcompositor.cpp @@ -39,11 +39,11 @@ ** ****************************************************************************/ #include -#include +#include template int lengthOf(const T (&)[N]) { return N; } -typedef QDeclarativeListCompositor C; +typedef QQuickListCompositor C; struct Range { @@ -70,9 +70,9 @@ template struct Array typedef Array IndexArray; typedef Array ListArray; -typedef QVector RemoveList; -typedef QVector InsertList; -typedef QVector ChangeList; +typedef QVector RemoveList; +typedef QVector InsertList; +typedef QVector ChangeList; typedef QVector RangeList; @@ -102,7 +102,7 @@ QT_END_NAMESPACE static const C::Group Visible = C::Group(2); static const C::Group Selection = C::Group(3); -class tst_qdeclarativelistcompositor : public QObject +class tst_qquicklistcompositor : public QObject { Q_OBJECT @@ -171,7 +171,7 @@ private slots: void listItemsChanged(); }; -void tst_qdeclarativelistcompositor::find_data() +void tst_qquicklistcompositor::find_data() { QTest::addColumn("ranges"); QTest::addColumn("startGroup"); @@ -198,7 +198,7 @@ void tst_qdeclarativelistcompositor::find_data() << uint(C::PrependFlag | SelectionFlag | C::DefaultFlag | C::CacheFlag) << 0; } -void tst_qdeclarativelistcompositor::find() +void tst_qquicklistcompositor::find() { QFETCH(RangeList, ranges); QFETCH(C::Group, startGroup); @@ -212,7 +212,7 @@ void tst_qdeclarativelistcompositor::find() QFETCH(uint, rangeFlags); QFETCH(int, rangeIndex); - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.setGroupCount(4); compositor.setDefaultGroups(VisibleFlag | C::DefaultFlag); @@ -221,7 +221,7 @@ void tst_qdeclarativelistcompositor::find() compositor.find(startGroup, startIndex); - QDeclarativeListCompositor::iterator it = compositor.find(group, index); + QQuickListCompositor::iterator it = compositor.find(group, index); QCOMPARE(it.index[C::Cache], cacheIndex); QCOMPARE(it.index[C::Default], defaultIndex); QCOMPARE(it.index[Visible], visibleIndex); @@ -230,7 +230,7 @@ void tst_qdeclarativelistcompositor::find() QCOMPARE(it->index, rangeIndex); } -void tst_qdeclarativelistcompositor::findInsertPosition_data() +void tst_qquicklistcompositor::findInsertPosition_data() { QTest::addColumn("ranges"); QTest::addColumn("group"); @@ -262,7 +262,7 @@ void tst_qdeclarativelistcompositor::findInsertPosition_data() << uint(C::AppendFlag | C::PrependFlag | C::CacheFlag) << 1; } -void tst_qdeclarativelistcompositor::findInsertPosition() +void tst_qquicklistcompositor::findInsertPosition() { QFETCH(RangeList, ranges); QFETCH(C::Group, group); @@ -274,14 +274,14 @@ void tst_qdeclarativelistcompositor::findInsertPosition() QFETCH(uint, rangeFlags); QFETCH(int, rangeIndex); - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.setGroupCount(4); compositor.setDefaultGroups(VisibleFlag | C::DefaultFlag); foreach (const Range &range, ranges) compositor.append(range.list, range.index, range.count, range.flags); - QDeclarativeListCompositor::insert_iterator it = compositor.findInsertPosition(group, index); + QQuickListCompositor::insert_iterator it = compositor.findInsertPosition(group, index); QCOMPARE(it.index[C::Cache], cacheIndex); QCOMPARE(it.index[C::Default], defaultIndex); QCOMPARE(it.index[Visible], visibleIndex); @@ -290,9 +290,9 @@ void tst_qdeclarativelistcompositor::findInsertPosition() QCOMPARE(it->index, rangeIndex); } -void tst_qdeclarativelistcompositor::insert() +void tst_qquicklistcompositor::insert() { - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.setGroupCount(4); compositor.setDefaultGroups(VisibleFlag | C::DefaultFlag); @@ -380,7 +380,7 @@ void tst_qdeclarativelistcompositor::insert() } } -void tst_qdeclarativelistcompositor::clearFlags_data() +void tst_qquicklistcompositor::clearFlags_data() { QTest::addColumn("ranges"); QTest::addColumn("group"); @@ -515,7 +515,7 @@ void tst_qdeclarativelistcompositor::clearFlags_data() } } -void tst_qdeclarativelistcompositor::clearFlags() +void tst_qquicklistcompositor::clearFlags() { QFETCH(RangeList, ranges); QFETCH(C::Group, group); @@ -532,7 +532,7 @@ void tst_qdeclarativelistcompositor::clearFlags() QFETCH(IndexArray, selectionIndexes); QFETCH(ListArray, selectionLists); - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.setGroupCount(4); compositor.setDefaultGroups(VisibleFlag | C::DefaultFlag); @@ -574,7 +574,7 @@ void tst_qdeclarativelistcompositor::clearFlags() } } -void tst_qdeclarativelistcompositor::setFlags_data() +void tst_qquicklistcompositor::setFlags_data() { QTest::addColumn("ranges"); QTest::addColumn("group"); @@ -697,7 +697,7 @@ void tst_qdeclarativelistcompositor::setFlags_data() } } -void tst_qdeclarativelistcompositor::setFlags() +void tst_qquicklistcompositor::setFlags() { QFETCH(RangeList, ranges); QFETCH(C::Group, group); @@ -714,7 +714,7 @@ void tst_qdeclarativelistcompositor::setFlags() QFETCH(IndexArray, selectionIndexes); QFETCH(ListArray, selectionLists); - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.setGroupCount(4); compositor.setDefaultGroups(VisibleFlag | C::DefaultFlag); @@ -756,7 +756,7 @@ void tst_qdeclarativelistcompositor::setFlags() } } -void tst_qdeclarativelistcompositor::move_data() +void tst_qquicklistcompositor::move_data() { QTest::addColumn("ranges"); QTest::addColumn("fromGroup"); @@ -954,7 +954,7 @@ void tst_qdeclarativelistcompositor::move_data() } } -void tst_qdeclarativelistcompositor::move() +void tst_qquicklistcompositor::move() { QFETCH(RangeList, ranges); QFETCH(C::Group, fromGroup); @@ -973,7 +973,7 @@ void tst_qdeclarativelistcompositor::move() QFETCH(IndexArray, selectionIndexes); QFETCH(ListArray, selectionLists); - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.setGroupCount(4); compositor.setDefaultGroups(VisibleFlag | C::DefaultFlag); @@ -1017,11 +1017,11 @@ void tst_qdeclarativelistcompositor::move() } } -void tst_qdeclarativelistcompositor::moveFromEnd() +void tst_qquicklistcompositor::moveFromEnd() { int listA; void *a = &listA; - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.append(a, 0, 1, C::AppendFlag | C::PrependFlag | C::DefaultFlag); // Moving an item anchors it to that position. @@ -1043,9 +1043,9 @@ void tst_qdeclarativelistcompositor::moveFromEnd() QCOMPARE(it.modelIndex(), 0); } -void tst_qdeclarativelistcompositor::clear() +void tst_qquicklistcompositor::clear() { - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.setGroupCount(4); compositor.setDefaultGroups(VisibleFlag | C::DefaultFlag); @@ -1066,7 +1066,7 @@ void tst_qdeclarativelistcompositor::clear() QCOMPARE(compositor.count(C::Cache), 0); } -void tst_qdeclarativelistcompositor::listItemsInserted_data() +void tst_qquicklistcompositor::listItemsInserted_data() { QTest::addColumn("ranges"); QTest::addColumn("list"); @@ -1195,7 +1195,7 @@ void tst_qdeclarativelistcompositor::listItemsInserted_data() } } -void tst_qdeclarativelistcompositor::listItemsInserted() +void tst_qquicklistcompositor::listItemsInserted() { QFETCH(RangeList, ranges); QFETCH(void *, list); @@ -1207,7 +1207,7 @@ void tst_qdeclarativelistcompositor::listItemsInserted() QFETCH(IndexArray, visibleIndexes); QFETCH(IndexArray, selectionIndexes); - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.setGroupCount(4); compositor.setDefaultGroups(VisibleFlag | C::DefaultFlag); @@ -1245,7 +1245,7 @@ void tst_qdeclarativelistcompositor::listItemsInserted() } } -void tst_qdeclarativelistcompositor::listItemsRemoved_data() +void tst_qquicklistcompositor::listItemsRemoved_data() { QTest::addColumn("ranges"); QTest::addColumn("list"); @@ -1331,7 +1331,7 @@ void tst_qdeclarativelistcompositor::listItemsRemoved_data() } } -void tst_qdeclarativelistcompositor::listItemsRemoved() +void tst_qquicklistcompositor::listItemsRemoved() { QFETCH(RangeList, ranges); QFETCH(void *, list); @@ -1343,7 +1343,7 @@ void tst_qdeclarativelistcompositor::listItemsRemoved() QFETCH(IndexArray, visibleIndexes); QFETCH(IndexArray, selectionIndexes); - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.setGroupCount(4); compositor.setDefaultGroups(VisibleFlag | C::DefaultFlag); @@ -1381,7 +1381,7 @@ void tst_qdeclarativelistcompositor::listItemsRemoved() } } -void tst_qdeclarativelistcompositor::listItemsMoved_data() +void tst_qquicklistcompositor::listItemsMoved_data() { QTest::addColumn("ranges"); QTest::addColumn("list"); @@ -1523,7 +1523,7 @@ void tst_qdeclarativelistcompositor::listItemsMoved_data() } } -void tst_qdeclarativelistcompositor::listItemsMoved() +void tst_qquicklistcompositor::listItemsMoved() { QFETCH(RangeList, ranges); QFETCH(void *, list); @@ -1537,7 +1537,7 @@ void tst_qdeclarativelistcompositor::listItemsMoved() QFETCH(IndexArray, visibleIndexes); QFETCH(IndexArray, selectionIndexes); - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.setGroupCount(4); compositor.setDefaultGroups(VisibleFlag | C::DefaultFlag); @@ -1577,7 +1577,7 @@ void tst_qdeclarativelistcompositor::listItemsMoved() } } -void tst_qdeclarativelistcompositor::listItemsChanged_data() +void tst_qquicklistcompositor::listItemsChanged_data() { QTest::addColumn("ranges"); QTest::addColumn("list"); @@ -1609,7 +1609,7 @@ void tst_qdeclarativelistcompositor::listItemsChanged_data() << Change(0, 0, 3, 6, 2, C::DefaultFlag | C::CacheFlag)); } -void tst_qdeclarativelistcompositor::listItemsChanged() +void tst_qquicklistcompositor::listItemsChanged() { QFETCH(RangeList, ranges); QFETCH(void *, list); @@ -1617,7 +1617,7 @@ void tst_qdeclarativelistcompositor::listItemsChanged() QFETCH(int, count); QFETCH(ChangeList, expectedChanges); - QDeclarativeListCompositor compositor; + QQuickListCompositor compositor; compositor.setGroupCount(4); compositor.setDefaultGroups(VisibleFlag | C::DefaultFlag); @@ -1630,8 +1630,8 @@ void tst_qdeclarativelistcompositor::listItemsChanged() QCOMPARE(changes, expectedChanges); } -QTEST_MAIN(tst_qdeclarativelistcompositor) +QTEST_MAIN(tst_qquicklistcompositor) -#include "tst_qdeclarativelistcompositor.moc" +#include "tst_qquicklistcompositor.moc" diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml b/tests/auto/qml/qquicklistmodel/data/enumerate.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml rename to tests/auto/qml/qquicklistmodel/data/enumerate.qml diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/model.qml b/tests/auto/qml/qquicklistmodel/data/model.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/model.qml rename to tests/auto/qml/qquicklistmodel/data/model.qml diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/multipleroles.qml b/tests/auto/qml/qquicklistmodel/data/multipleroles.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/multipleroles.qml rename to tests/auto/qml/qquicklistmodel/data/multipleroles.qml diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/script.js b/tests/auto/qml/qquicklistmodel/data/script.js similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/script.js rename to tests/auto/qml/qquicklistmodel/data/script.js diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/setmodelcachelist.qml b/tests/auto/qml/qquicklistmodel/data/setmodelcachelist.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/setmodelcachelist.qml rename to tests/auto/qml/qquicklistmodel/data/setmodelcachelist.qml diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/signalhandlers.qml b/tests/auto/qml/qquicklistmodel/data/signalhandlers.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/signalhandlers.qml rename to tests/auto/qml/qquicklistmodel/data/signalhandlers.qml diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/workerremoveelement.js b/tests/auto/qml/qquicklistmodel/data/workerremoveelement.js similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/workerremoveelement.js rename to tests/auto/qml/qquicklistmodel/data/workerremoveelement.js diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/workerremoveelement.qml b/tests/auto/qml/qquicklistmodel/data/workerremoveelement.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/workerremoveelement.qml rename to tests/auto/qml/qquicklistmodel/data/workerremoveelement.qml diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/workerremovelist.js b/tests/auto/qml/qquicklistmodel/data/workerremovelist.js similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/workerremovelist.js rename to tests/auto/qml/qquicklistmodel/data/workerremovelist.js diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/workerremovelist.qml b/tests/auto/qml/qquicklistmodel/data/workerremovelist.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/workerremovelist.qml rename to tests/auto/qml/qquicklistmodel/data/workerremovelist.qml diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/workersync.js b/tests/auto/qml/qquicklistmodel/data/workersync.js similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/workersync.js rename to tests/auto/qml/qquicklistmodel/data/workersync.js diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/workersync.qml b/tests/auto/qml/qquicklistmodel/data/workersync.qml similarity index 100% rename from tests/auto/declarative/qdeclarativelistmodel/data/workersync.qml rename to tests/auto/qml/qquicklistmodel/data/workersync.qml diff --git a/tests/auto/qml/qquicklistmodel/qquicklistmodel.pro b/tests/auto/qml/qquicklistmodel/qquicklistmodel.pro new file mode 100644 index 0000000000..9b96fa0659 --- /dev/null +++ b/tests/auto/qml/qquicklistmodel/qquicklistmodel.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qquicklistmodel +macx:CONFIG -= app_bundle + +SOURCES += tst_qquicklistmodel.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/qml/qquicklistmodel/tst_qquicklistmodel.cpp similarity index 87% rename from tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp rename to tests/auto/qml/qquicklistmodel/tst_qquicklistmodel.cpp index 4eb723bf8e..3fcce60bfb 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp +++ b/tests/auto/qml/qquicklistmodel/tst_qquicklistmodel.cpp @@ -41,10 +41,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -59,9 +59,9 @@ Q_DECLARE_METATYPE(QList) #define RUNEVAL(object, string) \ QVERIFY(QMetaObject::invokeMethod(object, "runEval", Q_ARG(QVariant, QString(string)))); -inline QVariant runexpr(QDeclarativeEngine *engine, const QString &str) +inline QVariant runexpr(QQmlEngine *engine, const QString &str) { - QDeclarativeExpression expr(engine->rootContext(), 0, str); + QQmlExpression expr(engine->rootContext(), 0, str); return expr.evaluate(); } @@ -81,15 +81,15 @@ static bool isValidErrorMessage(const QString &msg, bool dynamicRoleTest) return valid; } -class tst_qdeclarativelistmodel : public QDeclarativeDataTest +class tst_qquicklistmodel : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativelistmodel() {} + tst_qquicklistmodel() {} private: - int roleFromName(const QDeclarativeListModel *model, const QString &roleName); - QQuickItem *createWorkerTest(QDeclarativeEngine *eng, QDeclarativeComponent *component, QDeclarativeListModel *model); + int roleFromName(const QQuickListModel *model, const QString &roleName); + QQuickItem *createWorkerTest(QQmlEngine *eng, QQmlComponent *component, QQuickListModel *model); void waitForWorker(QQuickItem *item); static bool compareVariantList(const QVariantList &testList, QVariant object); @@ -141,11 +141,11 @@ private slots: void dynamic_role_data(); }; -bool tst_qdeclarativelistmodel::compareVariantList(const QVariantList &testList, QVariant object) +bool tst_qquicklistmodel::compareVariantList(const QVariantList &testList, QVariant object) { bool allOk = true; - QDeclarativeListModel *model = qobject_cast(object.value()); + QQuickListModel *model = qobject_cast(object.value()); if (model == 0) return false; @@ -194,7 +194,7 @@ bool tst_qdeclarativelistmodel::compareVariantList(const QVariantList &testList, return allOk; } -int tst_qdeclarativelistmodel::roleFromName(const QDeclarativeListModel *model, const QString &roleName) +int tst_qquicklistmodel::roleFromName(const QQuickListModel *model, const QString &roleName) { QList roles = model->roles(); for (int i=0; i(component->create()); - QDeclarativeEngine::setContextForObject(model, eng->rootContext()); + QQmlEngine::setContextForObject(model, eng->rootContext()); if (item) item->setProperty("model", qVariantFromValue(model)); return item; } -void tst_qdeclarativelistmodel::waitForWorker(QQuickItem *item) +void tst_qquicklistmodel::waitForWorker(QQuickItem *item) { QEventLoop loop; QTimer timer; timer.setSingleShot(true); connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); - QDeclarativeProperty prop(item, "done"); + QQmlProperty prop(item, "done"); QVERIFY(prop.isValid()); QVERIFY(prop.connectNotifySignal(&loop, SLOT(quit()))); timer.start(10000); @@ -228,7 +228,7 @@ void tst_qdeclarativelistmodel::waitForWorker(QQuickItem *item) QVERIFY(timer.isActive()); } -void tst_qdeclarativelistmodel::static_types_data() +void tst_qquicklistmodel::static_types_data() { QTest::addColumn("qml"); QTest::addColumn("value"); @@ -280,7 +280,7 @@ void tst_qdeclarativelistmodel::static_types_data() << QString(": Can't assign to existing role 'foo' of different type [List -> Number]"); } -void tst_qdeclarativelistmodel::static_types() +void tst_qquicklistmodel::static_types() { QFETCH(QString, qml); QFETCH(QVariant, value); @@ -292,8 +292,8 @@ void tst_qdeclarativelistmodel::static_types() QTest::ignoreMessage(QtWarningMsg, error.toLatin1()); } - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(qml.toUtf8(), QUrl::fromLocalFile(QString("dummy.qml"))); @@ -312,7 +312,7 @@ void tst_qdeclarativelistmodel::static_types() delete obj; } -void tst_qdeclarativelistmodel::static_i18n_data() +void tst_qquicklistmodel::static_i18n_data() { QTest::addColumn("qml"); QTest::addColumn("value"); @@ -349,7 +349,7 @@ void tst_qdeclarativelistmodel::static_i18n_data() << QString("ListElement: improperly specified QT_TRID_NOOP"); } -void tst_qdeclarativelistmodel::static_i18n() +void tst_qquicklistmodel::static_i18n() { QFETCH(QString, qml); QFETCH(QVariant, value); @@ -357,8 +357,8 @@ void tst_qdeclarativelistmodel::static_i18n() qml = "import QtQuick 2.0\nItem { property variant test: model.get(0).foo; ListModel { id: model; " + qml + " } }"; - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(qml.toUtf8(), QUrl::fromLocalFile(QString("dummy.qml"))); @@ -381,7 +381,7 @@ void tst_qdeclarativelistmodel::static_i18n() delete obj; } -void tst_qdeclarativelistmodel::static_nestedElements() +void tst_qquicklistmodel::static_nestedElements() { QFETCH(int, elementCount); @@ -405,8 +405,8 @@ void tst_qdeclarativelistmodel::static_nestedElements() " }\n" "}"; - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(componentStr.toUtf8(), QUrl::fromLocalFile("")); QObject *obj = component.create(); @@ -419,7 +419,7 @@ void tst_qdeclarativelistmodel::static_nestedElements() delete obj; } -void tst_qdeclarativelistmodel::static_nestedElements_data() +void tst_qquicklistmodel::static_nestedElements_data() { QTest::addColumn("elementCount"); @@ -429,7 +429,7 @@ void tst_qdeclarativelistmodel::static_nestedElements_data() QTest::newRow("many items") << 5; } -void tst_qdeclarativelistmodel::dynamic_data() +void tst_qquicklistmodel::dynamic_data() { QTest::addColumn("script"); QTest::addColumn("result"); @@ -570,7 +570,7 @@ void tst_qdeclarativelistmodel::dynamic_data() } } -void tst_qdeclarativelistmodel::dynamic() +void tst_qquicklistmodel::dynamic() { QFETCH(QString, script); QFETCH(int, result); @@ -578,14 +578,14 @@ void tst_qdeclarativelistmodel::dynamic() QFETCH(bool, dynamicRoles); QQuickItem dummyItem0, dummyItem1; - QDeclarativeEngine engine; - QDeclarativeListModel model; + QQmlEngine engine; + QQuickListModel model; model.setDynamicRoles(dynamicRoles); - QDeclarativeEngine::setContextForObject(&model,engine.rootContext()); + QQmlEngine::setContextForObject(&model,engine.rootContext()); engine.rootContext()->setContextObject(&model); engine.rootContext()->setContextProperty("dummyItem0", QVariant::fromValue(&dummyItem0)); engine.rootContext()->setContextProperty("dummyItem1", QVariant::fromValue(&dummyItem1)); - QDeclarativeExpression e(engine.rootContext(), &model, script); + QQmlExpression e(engine.rootContext(), &model, script); if (isValidErrorMessage(warning, dynamicRoles)) QTest::ignoreMessage(QtWarningMsg, warning.toLatin1()); @@ -601,12 +601,12 @@ void tst_qdeclarativelistmodel::dynamic() QVERIFY(spyCount.count() > 0); } -void tst_qdeclarativelistmodel::dynamic_worker_data() +void tst_qquicklistmodel::dynamic_worker_data() { dynamic_data(); } -void tst_qdeclarativelistmodel::dynamic_worker() +void tst_qquicklistmodel::dynamic_worker() { QFETCH(QString, script); QFETCH(int, result); @@ -619,10 +619,10 @@ void tst_qdeclarativelistmodel::dynamic_worker() // This is same as dynamic() except it applies the test to a ListModel called // from a WorkerScript. - QDeclarativeListModel model; + QQuickListModel model; model.setDynamicRoles(dynamicRoles); - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("model.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("model.qml")); QQuickItem *item = createWorkerTest(&eng, &component, &model); QVERIFY(item != 0); @@ -642,7 +642,7 @@ void tst_qdeclarativelistmodel::dynamic_worker() QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", Q_ARG(QVariant, operations))); waitForWorker(item); - QCOMPARE(QDeclarativeProperty(item, "result").read().toInt(), result); + QCOMPARE(QQmlProperty(item, "result").read().toInt(), result); if (model.count() > 0) QVERIFY(spyCount.count() > 0); @@ -651,12 +651,12 @@ void tst_qdeclarativelistmodel::dynamic_worker() qApp->processEvents(); } -void tst_qdeclarativelistmodel::dynamic_worker_sync_data() +void tst_qquicklistmodel::dynamic_worker_sync_data() { dynamic_data(); } -void tst_qdeclarativelistmodel::dynamic_worker_sync() +void tst_qquicklistmodel::dynamic_worker_sync() { QFETCH(QString, script); QFETCH(int, result); @@ -670,10 +670,10 @@ void tst_qdeclarativelistmodel::dynamic_worker_sync() // from the worker script, calls sync(), and tests the changes are reflected in the // list in the main thread - QDeclarativeListModel model; + QQuickListModel model; model.setDynamicRoles(dynamicRoles); - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("model.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("model.qml")); QQuickItem *item = createWorkerTest(&eng, &component, &model); QVERIFY(item != 0); @@ -694,17 +694,17 @@ void tst_qdeclarativelistmodel::dynamic_worker_sync() Q_ARG(QVariant, operations.mid(0, operations.length()-1)))); waitForWorker(item); - QDeclarativeExpression e(eng.rootContext(), &model, operations.last().toString()); + QQmlExpression e(eng.rootContext(), &model, operations.last().toString()); QCOMPARE(e.evaluate().toInt(), result); delete item; qApp->processEvents(); } -void tst_qdeclarativelistmodel::enumerate() +void tst_qquicklistmodel::enumerate() { - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("enumerate.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("enumerate.qml")); QVERIFY(!component.isError()); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item != 0); @@ -742,7 +742,7 @@ void tst_qdeclarativelistmodel::enumerate() delete item; } -void tst_qdeclarativelistmodel::error_data() +void tst_qquicklistmodel::error_data() { QTest::addColumn("qml"); QTest::addColumn("error"); @@ -792,32 +792,32 @@ void tst_qdeclarativelistmodel::error_data() << "Foo.ListElement - Foo is not a namespace"; } -void tst_qdeclarativelistmodel::error() +void tst_qquicklistmodel::error() { QFETCH(QString, qml); QFETCH(QString, error); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(qml.toUtf8(), QUrl::fromLocalFile(QString("dummy.qml"))); if (error.isEmpty()) { QVERIFY(!component.isError()); } else { QVERIFY(component.isError()); - QList errors = component.errors(); + QList errors = component.errors(); QCOMPARE(errors.count(),1); QCOMPARE(errors.at(0).description(),error); } } -void tst_qdeclarativelistmodel::syncError() +void tst_qquicklistmodel::syncError() { QString qml = "import QtQuick 2.0\nListModel { id: lm; Component.onCompleted: lm.sync() }"; QString error = "file:dummy.qml:2:1: QML ListModel: List sync() can only be called from a WorkerScript"; - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(qml.toUtf8(), QUrl::fromLocalFile(QString("dummy.qml"))); QTest::ignoreMessage(QtWarningMsg,error.toUtf8()); @@ -829,7 +829,7 @@ void tst_qdeclarativelistmodel::syncError() /* Test model changes from set() are available to the view */ -void tst_qdeclarativelistmodel::set_data() +void tst_qquicklistmodel::set_data() { QTest::addColumn("dynamicRoles"); @@ -837,14 +837,14 @@ void tst_qdeclarativelistmodel::set_data() QTest::newRow("dynamicRoles") << true; } -void tst_qdeclarativelistmodel::set() +void tst_qquicklistmodel::set() { QFETCH(bool, dynamicRoles); - QDeclarativeEngine engine; - QDeclarativeListModel model; + QQmlEngine engine; + QQuickListModel model; model.setDynamicRoles(dynamicRoles); - QDeclarativeEngine::setContextForObject(&model,engine.rootContext()); + QQmlEngine::setContextForObject(&model,engine.rootContext()); engine.rootContext()->setContextProperty("model", &model); RUNEXPR("model.append({test:false})"); @@ -867,7 +867,7 @@ void tst_qdeclarativelistmodel::set() /* Test model changes on values returned by get() are available to the view */ -void tst_qdeclarativelistmodel::get() +void tst_qquicklistmodel::get() { QFETCH(QString, expression); QFETCH(int, index); @@ -875,12 +875,12 @@ void tst_qdeclarativelistmodel::get() QFETCH(QVariant, roleValue); QFETCH(bool, dynamicRoles); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "ListModel {}\n", QUrl()); - QDeclarativeListModel *model = qobject_cast(component.create()); + QQuickListModel *model = qobject_cast(component.create()); model->setDynamicRoles(dynamicRoles); engine.rootContext()->setContextProperty("model", model); @@ -891,7 +891,7 @@ void tst_qdeclarativelistmodel::get() RUNEXPR("model.append({roleD: [ { a:1, b:2 }, { c: 3 } ] })"); QSignalSpy spy(model, SIGNAL(itemsChanged(int, int, QList))); - QDeclarativeExpression expr(engine.rootContext(), model, expression); + QQmlExpression expr(engine.rootContext(), model, expression); expr.evaluate(); QVERIFY(!expr.hasError()); @@ -915,7 +915,7 @@ void tst_qdeclarativelistmodel::get() delete model; } -void tst_qdeclarativelistmodel::get_data() +void tst_qquicklistmodel::get_data() { QTest::addColumn("expression"); QTest::addColumn("index"); @@ -939,7 +939,7 @@ void tst_qdeclarativelistmodel::get_data() } } -void tst_qdeclarativelistmodel::get_worker() +void tst_qquicklistmodel::get_worker() { QFETCH(QString, expression); QFETCH(int, index); @@ -947,10 +947,10 @@ void tst_qdeclarativelistmodel::get_worker() QFETCH(QVariant, roleValue); QFETCH(bool, dynamicRoles); - QDeclarativeListModel model; + QQuickListModel model; model.setDynamicRoles(dynamicRoles); - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("model.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("model.qml")); QQuickItem *item = createWorkerTest(&eng, &component, &model); QVERIFY(item != 0); @@ -987,7 +987,7 @@ void tst_qdeclarativelistmodel::get_worker() QVERIFY(spyResult.at(2).value >().contains(role)); } -void tst_qdeclarativelistmodel::get_worker_data() +void tst_qquicklistmodel::get_worker_data() { get_data(); } @@ -995,7 +995,7 @@ void tst_qdeclarativelistmodel::get_worker_data() /* Test that the tests run in get() also work for nested list data */ -void tst_qdeclarativelistmodel::get_nested() +void tst_qquicklistmodel::get_nested() { QFETCH(QString, expression); QFETCH(int, index); @@ -1006,15 +1006,15 @@ void tst_qdeclarativelistmodel::get_nested() if (roleValue.type() == QVariant::Map) return; - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "ListModel {}", QUrl()); - QDeclarativeListModel *model = qobject_cast(component.create()); + QQuickListModel *model = qobject_cast(component.create()); model->setDynamicRoles(dynamicRoles); QVERIFY(component.errorString().isEmpty()); - QDeclarativeListModel *childModel; + QQuickListModel *childModel; engine.rootContext()->setContextProperty("model", model); RUNEXPR("model.append({ listRoleA: [\n" @@ -1065,11 +1065,11 @@ void tst_qdeclarativelistmodel::get_nested() int outerListRole = roleFromName(model, outerListRoleName); QVERIFY(outerListRole >= 0); - childModel = qobject_cast(model->data(outerListIndex, outerListRole).value()); + childModel = qobject_cast(model->data(outerListIndex, outerListRole).value()); QVERIFY(childModel); QString extendedExpression = QString("get(%1).%2.%3").arg(outerListIndex).arg(outerListRoleName).arg(expression); - QDeclarativeExpression expr(engine.rootContext(), model, extendedExpression); + QQmlExpression expr(engine.rootContext(), model, extendedExpression); QSignalSpy spy(childModel, SIGNAL(itemsChanged(int, int, QList))); expr.evaluate(); @@ -1093,33 +1093,33 @@ void tst_qdeclarativelistmodel::get_nested() delete model; } -void tst_qdeclarativelistmodel::get_nested_data() +void tst_qquicklistmodel::get_nested_data() { get_data(); } //QTBUG-13754 -void tst_qdeclarativelistmodel::crash_model_with_multiple_roles() +void tst_qquicklistmodel::crash_model_with_multiple_roles() { - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("multipleroles.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("multipleroles.qml")); QObject *rootItem = component.create(); QVERIFY(component.errorString().isEmpty()); QVERIFY(rootItem != 0); - QDeclarativeListModel *model = rootItem->findChild("listModel"); + QQuickListModel *model = rootItem->findChild("listModel"); QVERIFY(model != 0); - // used to cause a crash in QDeclarativeVisualDataModel + // used to cause a crash model->setProperty(0, "black", true); delete rootItem; } //QTBUG-15190 -void tst_qdeclarativelistmodel::set_model_cache() +void tst_qquicklistmodel::set_model_cache() { - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("setmodelcachelist.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("setmodelcachelist.qml")); QObject *model = component.create(); QVERIFY2(component.errorString().isEmpty(), QTest::toString(component.errorString())); QVERIFY(model != 0); @@ -1128,7 +1128,7 @@ void tst_qdeclarativelistmodel::set_model_cache() delete model; } -void tst_qdeclarativelistmodel::property_changes() +void tst_qquicklistmodel::property_changes() { QFETCH(QString, script_setup); QFETCH(QString, script_change); @@ -1138,13 +1138,13 @@ void tst_qdeclarativelistmodel::property_changes() QFETCH(QString, testExpression); QFETCH(bool, dynamicRoles); - QDeclarativeEngine engine; - QDeclarativeListModel model; + QQmlEngine engine; + QQuickListModel model; model.setDynamicRoles(dynamicRoles); - QDeclarativeEngine::setContextForObject(&model, engine.rootContext()); + QQmlEngine::setContextForObject(&model, engine.rootContext()); engine.rootContext()->setContextObject(&model); - QDeclarativeExpression expr(engine.rootContext(), &model, script_setup); + QQmlExpression expr(engine.rootContext(), &model, script_setup); expr.evaluate(); QVERIFY2(!expr.hasError(), QTest::toString(expr.error().toString())); @@ -1156,7 +1156,7 @@ void tst_qdeclarativelistmodel::property_changes() + signalHandler + " gotSignal = true\n" "}\n"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(qml.toUtf8(), QUrl::fromLocalFile("")); engine.rootContext()->setContextProperty("model", &model); QObject *connectionsObject = component.create(); @@ -1186,7 +1186,7 @@ void tst_qdeclarativelistmodel::property_changes() delete connectionsObject; } -void tst_qdeclarativelistmodel::property_changes_data() +void tst_qquicklistmodel::property_changes_data() { QTest::addColumn("script_setup"); QTest::addColumn("script_change"); @@ -1259,7 +1259,7 @@ void tst_qdeclarativelistmodel::property_changes_data() } } -void tst_qdeclarativelistmodel::property_changes_worker() +void tst_qquicklistmodel::property_changes_worker() { QFETCH(QString, script_setup); QFETCH(QString, script_change); @@ -1268,15 +1268,15 @@ void tst_qdeclarativelistmodel::property_changes_worker() QFETCH(bool, itemsChanged); QFETCH(bool, dynamicRoles); - QDeclarativeListModel model; + QQuickListModel model; model.setDynamicRoles(dynamicRoles); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("model.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("model.qml")); QVERIFY2(component.errorString().isEmpty(), component.errorString().toUtf8()); QQuickItem *item = createWorkerTest(&engine, &component, &model); QVERIFY(item != 0); - QDeclarativeExpression expr(engine.rootContext(), &model, script_setup); + QQmlExpression expr(engine.rootContext(), &model, script_setup); expr.evaluate(); QVERIFY2(!expr.hasError(), QTest::toString(expr.error().toString())); @@ -1299,12 +1299,12 @@ void tst_qdeclarativelistmodel::property_changes_worker() qApp->processEvents(); } -void tst_qdeclarativelistmodel::property_changes_worker_data() +void tst_qquicklistmodel::property_changes_worker_data() { property_changes_data(); } -void tst_qdeclarativelistmodel::clear_data() +void tst_qquicklistmodel::clear_data() { QTest::addColumn("dynamicRoles"); @@ -1312,14 +1312,14 @@ void tst_qdeclarativelistmodel::clear_data() QTest::newRow("dynamicRoles") << true; } -void tst_qdeclarativelistmodel::clear() +void tst_qquicklistmodel::clear() { QFETCH(bool, dynamicRoles); - QDeclarativeEngine engine; - QDeclarativeListModel model; + QQmlEngine engine; + QQuickListModel model; model.setDynamicRoles(dynamicRoles); - QDeclarativeEngine::setContextForObject(&model, engine.rootContext()); + QQmlEngine::setContextForObject(&model, engine.rootContext()); engine.rootContext()->setContextProperty("model", &model); model.clear(); @@ -1349,7 +1349,7 @@ void tst_qdeclarativelistmodel::clear() QCOMPARE(model.toString(roles[2]), QString("propertyC")); } -void tst_qdeclarativelistmodel::signal_handlers_data() +void tst_qquicklistmodel::signal_handlers_data() { QTest::addColumn("dynamicRoles"); @@ -1357,14 +1357,14 @@ void tst_qdeclarativelistmodel::signal_handlers_data() QTest::newRow("dynamicRoles") << true; } -void tst_qdeclarativelistmodel::signal_handlers() +void tst_qquicklistmodel::signal_handlers() { QFETCH(bool, dynamicRoles); - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("signalhandlers.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("signalhandlers.qml")); QObject *model = component.create(); - QDeclarativeListModel *lm = qobject_cast(model); + QQuickListModel *lm = qobject_cast(model); QVERIFY(lm != 0); lm->setDynamicRoles(dynamicRoles); QVERIFY2(component.errorString().isEmpty(), QTest::toString(component.errorString())); @@ -1374,7 +1374,7 @@ void tst_qdeclarativelistmodel::signal_handlers() delete model; } -void tst_qdeclarativelistmodel::worker_sync_data() +void tst_qquicklistmodel::worker_sync_data() { QTest::addColumn("dynamicRoles"); @@ -1382,14 +1382,14 @@ void tst_qdeclarativelistmodel::worker_sync_data() QTest::newRow("dynamicRoles") << true; } -void tst_qdeclarativelistmodel::worker_sync() +void tst_qquicklistmodel::worker_sync() { QFETCH(bool, dynamicRoles); - QDeclarativeListModel model; + QQuickListModel model; model.setDynamicRoles(dynamicRoles); - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("workersync.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("workersync.qml")); QQuickItem *item = createWorkerTest(&eng, &component, &model); QVERIFY(item != 0); @@ -1399,7 +1399,7 @@ void tst_qdeclarativelistmodel::worker_sync() QVERIFY(model.count() == 2); QVariant childData = model.data(0, 0); - QDeclarativeListModel *childModel = qobject_cast(childData.value()); + QQuickListModel *childModel = qobject_cast(childData.value()); QVERIFY(childModel); QVERIFY(childModel->count() == 1); @@ -1442,19 +1442,19 @@ void tst_qdeclarativelistmodel::worker_sync() qApp->processEvents(); } -void tst_qdeclarativelistmodel::worker_remove_element_data() +void tst_qquicklistmodel::worker_remove_element_data() { worker_sync_data(); } -void tst_qdeclarativelistmodel::worker_remove_element() +void tst_qquicklistmodel::worker_remove_element() { QFETCH(bool, dynamicRoles); - QDeclarativeListModel model; + QQuickListModel model; model.setDynamicRoles(dynamicRoles); - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("workerremoveelement.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("workerremoveelement.qml")); QQuickItem *item = createWorkerTest(&eng, &component, &model); QVERIFY(item != 0); @@ -1484,10 +1484,10 @@ void tst_qdeclarativelistmodel::worker_remove_element() { //don't crash if model was deleted earlier - QDeclarativeListModel* model = new QDeclarativeListModel; + QQuickListModel* model = new QQuickListModel; model->setDynamicRoles(dynamicRoles); - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("workerremoveelement.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("workerremoveelement.qml")); QQuickItem *item = createWorkerTest(&eng, &component, model); QVERIFY(item != 0); @@ -1505,19 +1505,19 @@ void tst_qdeclarativelistmodel::worker_remove_element() } } -void tst_qdeclarativelistmodel::worker_remove_list_data() +void tst_qquicklistmodel::worker_remove_list_data() { worker_sync_data(); } -void tst_qdeclarativelistmodel::worker_remove_list() +void tst_qquicklistmodel::worker_remove_list() { QFETCH(bool, dynamicRoles); - QDeclarativeListModel model; + QQuickListModel model; model.setDynamicRoles(dynamicRoles); - QDeclarativeEngine eng; - QDeclarativeComponent component(&eng, testFileUrl("workerremovelist.qml")); + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("workerremovelist.qml")); QQuickItem *item = createWorkerTest(&eng, &component, &model); QVERIFY(item != 0); @@ -1546,7 +1546,7 @@ void tst_qdeclarativelistmodel::worker_remove_list() qApp->processEvents(); } -void tst_qdeclarativelistmodel::role_mode_data() +void tst_qquicklistmodel::role_mode_data() { QTest::addColumn("script"); QTest::addColumn("result"); @@ -1560,17 +1560,17 @@ void tst_qdeclarativelistmodel::role_mode_data() QTest::newRow("enableDynamic2") << "{dynamicRoles=true;append({'a':1});dynamicRoles=false;dynamicRoles}" << 1 << ": QML ListModel: unable to enable static roles as this model is not empty!"; } -void tst_qdeclarativelistmodel::role_mode() +void tst_qquicklistmodel::role_mode() { QFETCH(QString, script); QFETCH(int, result); QFETCH(QString, warning); - QDeclarativeEngine engine; - QDeclarativeListModel model; - QDeclarativeEngine::setContextForObject(&model,engine.rootContext()); + QQmlEngine engine; + QQuickListModel model; + QQmlEngine::setContextForObject(&model,engine.rootContext()); engine.rootContext()->setContextObject(&model); - QDeclarativeExpression e(engine.rootContext(), &model, script); + QQmlExpression e(engine.rootContext(), &model, script); if (!warning.isEmpty()) QTest::ignoreMessage(QtWarningMsg, warning.toLatin1()); @@ -1581,7 +1581,7 @@ void tst_qdeclarativelistmodel::role_mode() QCOMPARE(actual,result); } -void tst_qdeclarativelistmodel::dynamic_role_data() +void tst_qquicklistmodel::dynamic_role_data() { QTest::addColumn("preamble"); QTest::addColumn("script"); @@ -1590,20 +1590,20 @@ void tst_qdeclarativelistmodel::dynamic_role_data() QTest::newRow("sync1") << "{append({'a':[{'b':1},{'b':2}]})}" << "{get(0).a = 'string';count}" << 1; } -void tst_qdeclarativelistmodel::dynamic_role() +void tst_qquicklistmodel::dynamic_role() { QFETCH(QString, preamble); QFETCH(QString, script); QFETCH(int, result); - QDeclarativeListModel model; + QQuickListModel model; model.setDynamicRoles(true); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("model.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("model.qml")); QQuickItem *item = createWorkerTest(&engine, &component, &model); QVERIFY(item != 0); - QDeclarativeExpression preExp(engine.rootContext(), &model, preamble); + QQmlExpression preExp(engine.rootContext(), &model, preamble); QCOMPARE(preExp.evaluate().toInt(), 0); if (script[0] == QLatin1Char('{') && script[script.length()-1] == QLatin1Char('}')) @@ -1620,13 +1620,13 @@ void tst_qdeclarativelistmodel::dynamic_role() Q_ARG(QVariant, operations.mid(0, operations.length()-1)))); waitForWorker(item); - QDeclarativeExpression e(engine.rootContext(), &model, operations.last().toString()); + QQmlExpression e(engine.rootContext(), &model, operations.last().toString()); QCOMPARE(e.evaluate().toInt(), result); delete item; qApp->processEvents(); } -QTEST_MAIN(tst_qdeclarativelistmodel) +QTEST_MAIN(tst_qquicklistmodel) -#include "tst_qdeclarativelistmodel.moc" +#include "tst_qquicklistmodel.moc" diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml b/tests/auto/qml/qquickworkerscript/data/BaseWorker.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml rename to tests/auto/qml/qquickworkerscript/data/BaseWorker.qml diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/Global.js b/tests/auto/qml/qquickworkerscript/data/Global.js similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/Global.js rename to tests/auto/qml/qquickworkerscript/data/Global.js diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/externalObjectWorker.qml b/tests/auto/qml/qquickworkerscript/data/externalObjectWorker.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/externalObjectWorker.qml rename to tests/auto/qml/qquickworkerscript/data/externalObjectWorker.qml diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/script.js b/tests/auto/qml/qquickworkerscript/data/script.js similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/script.js rename to tests/auto/qml/qquickworkerscript/data/script.js diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onCall.js b/tests/auto/qml/qquickworkerscript/data/script_error_onCall.js similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onCall.js rename to tests/auto/qml/qquickworkerscript/data/script_error_onCall.js diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onLoad.js b/tests/auto/qml/qquickworkerscript/data/script_error_onLoad.js similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onLoad.js rename to tests/auto/qml/qquickworkerscript/data/script_error_onLoad.js diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/script_fixed_return.js b/tests/auto/qml/qquickworkerscript/data/script_fixed_return.js similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/script_fixed_return.js rename to tests/auto/qml/qquickworkerscript/data/script_fixed_return.js diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/script_include.js b/tests/auto/qml/qquickworkerscript/data/script_include.js similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/script_include.js rename to tests/auto/qml/qquickworkerscript/data/script_include.js diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/script_pragma.js b/tests/auto/qml/qquickworkerscript/data/script_pragma.js similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/script_pragma.js rename to tests/auto/qml/qquickworkerscript/data/script_pragma.js diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/stressDispose.js b/tests/auto/qml/qquickworkerscript/data/stressDispose.js similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/stressDispose.js rename to tests/auto/qml/qquickworkerscript/data/stressDispose.js diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/stressDispose.qml b/tests/auto/qml/qquickworkerscript/data/stressDispose.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/stressDispose.qml rename to tests/auto/qml/qquickworkerscript/data/stressDispose.qml diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml b/tests/auto/qml/qquickworkerscript/data/worker.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml rename to tests/auto/qml/qquickworkerscript/data/worker.qml diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onCall.qml b/tests/auto/qml/qquickworkerscript/data/worker_error_onCall.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onCall.qml rename to tests/auto/qml/qquickworkerscript/data/worker_error_onCall.qml diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onLoad.qml b/tests/auto/qml/qquickworkerscript/data/worker_error_onLoad.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onLoad.qml rename to tests/auto/qml/qquickworkerscript/data/worker_error_onLoad.qml diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker_include.qml b/tests/auto/qml/qquickworkerscript/data/worker_include.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/worker_include.qml rename to tests/auto/qml/qquickworkerscript/data/worker_include.qml diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker_pragma.qml b/tests/auto/qml/qquickworkerscript/data/worker_pragma.qml similarity index 100% rename from tests/auto/declarative/qdeclarativeworkerscript/data/worker_pragma.qml rename to tests/auto/qml/qquickworkerscript/data/worker_pragma.qml diff --git a/tests/auto/qml/qquickworkerscript/qquickworkerscript.pro b/tests/auto/qml/qquickworkerscript/qquickworkerscript.pro new file mode 100644 index 0000000000..e9c358c3cc --- /dev/null +++ b/tests/auto/qml/qquickworkerscript/qquickworkerscript.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qquickworkerscript +macx:CONFIG -= app_bundle + +SOURCES += tst_qquickworkerscript.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private v8-private qml-private testlib diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp similarity index 69% rename from tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp rename to tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp index 92e5df127a..6569b877fe 100644 --- a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp +++ b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp @@ -43,20 +43,20 @@ #include #include #include -#include +#include -#include -#include +#include +#include -#include -#include +#include +#include #include "../../shared/util.h" -class tst_QDeclarativeWorkerScript : public QDeclarativeDataTest +class tst_QQuickWorkerScript : public QQmlDataTest { Q_OBJECT public: - tst_QDeclarativeWorkerScript() {} + tst_QQuickWorkerScript() {} private slots: void source(); void messaging(); @@ -71,7 +71,7 @@ private slots: void stressDispose(); private: - void waitForEchoMessage(QDeclarativeWorkerScript *worker) { + void waitForEchoMessage(QQuickWorkerScript *worker) { QEventLoop loop; QVERIFY(connect(worker, SIGNAL(done()), &loop, SLOT(quit()))); QTimer timer; @@ -82,13 +82,13 @@ private slots: QVERIFY(timer.isActive()); } - QDeclarativeEngine m_engine; + QQmlEngine m_engine; }; -void tst_QDeclarativeWorkerScript::source() +void tst_QQuickWorkerScript::source() { - QDeclarativeComponent component(&m_engine, testFileUrl("worker.qml")); - QDeclarativeWorkerScript *worker = qobject_cast(component.create()); + QQmlComponent component(&m_engine, testFileUrl("worker.qml")); + QQuickWorkerScript *worker = qobject_cast(component.create()); QVERIFY(worker != 0); const QMetaObject *mo = worker->metaObject(); @@ -108,12 +108,12 @@ void tst_QDeclarativeWorkerScript::source() delete worker; } -void tst_QDeclarativeWorkerScript::messaging() +void tst_QQuickWorkerScript::messaging() { QFETCH(QVariant, value); - QDeclarativeComponent component(&m_engine, testFileUrl("worker.qml")); - QDeclarativeWorkerScript *worker = qobject_cast(component.create()); + QQmlComponent component(&m_engine, testFileUrl("worker.qml")); + QQuickWorkerScript *worker = qobject_cast(component.create()); QVERIFY(worker != 0); QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, value))); @@ -126,7 +126,7 @@ void tst_QDeclarativeWorkerScript::messaging() delete worker; } -void tst_QDeclarativeWorkerScript::messaging_data() +void tst_QQuickWorkerScript::messaging_data() { QTest::addColumn("value"); @@ -143,14 +143,14 @@ void tst_QDeclarativeWorkerScript::messaging_data() #endif } -void tst_QDeclarativeWorkerScript::messaging_sendQObjectList() +void tst_QQuickWorkerScript::messaging_sendQObjectList() { - // Not allowed to send QObjects other than QDeclarativeWorkerListModelAgent + // Not allowed to send QObjects other than QQuickListModelWorkerAgent // instances. If objects are sent in a list, they will be sent as 'undefined' // js values. - QDeclarativeComponent component(&m_engine, testFileUrl("worker.qml")); - QDeclarativeWorkerScript *worker = qobject_cast(component.create()); + QQmlComponent component(&m_engine, testFileUrl("worker.qml")); + QQuickWorkerScript *worker = qobject_cast(component.create()); QVERIFY(worker != 0); QVariantList objects; @@ -168,10 +168,10 @@ void tst_QDeclarativeWorkerScript::messaging_sendQObjectList() delete worker; } -void tst_QDeclarativeWorkerScript::messaging_sendJsObject() +void tst_QQuickWorkerScript::messaging_sendJsObject() { - QDeclarativeComponent component(&m_engine, testFileUrl("worker.qml")); - QDeclarativeWorkerScript *worker = qobject_cast(component.create()); + QQmlComponent component(&m_engine, testFileUrl("worker.qml")); + QQuickWorkerScript *worker = qobject_cast(component.create()); QVERIFY(worker != 0); // Properties are in alphabetical order to enable string-based comparison after @@ -195,9 +195,9 @@ void tst_QDeclarativeWorkerScript::messaging_sendJsObject() delete worker; } -void tst_QDeclarativeWorkerScript::messaging_sendExternalObject() +void tst_QQuickWorkerScript::messaging_sendExternalObject() { - QDeclarativeComponent component(&m_engine, testFileUrl("externalObjectWorker.qml")); + QQmlComponent component(&m_engine, testFileUrl("externalObjectWorker.qml")); QObject *obj = component.create(); QVERIFY(obj); QMetaObject::invokeMethod(obj, "testExternalObject"); @@ -205,12 +205,12 @@ void tst_QDeclarativeWorkerScript::messaging_sendExternalObject() delete obj; } -void tst_QDeclarativeWorkerScript::script_with_pragma() +void tst_QQuickWorkerScript::script_with_pragma() { QVariant value(100); - QDeclarativeComponent component(&m_engine, testFileUrl("worker_pragma.qml")); - QDeclarativeWorkerScript *worker = qobject_cast(component.create()); + QQmlComponent component(&m_engine, testFileUrl("worker_pragma.qml")); + QQuickWorkerScript *worker = qobject_cast(component.create()); QVERIFY(worker != 0); QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, value))); @@ -223,10 +223,10 @@ void tst_QDeclarativeWorkerScript::script_with_pragma() delete worker; } -void tst_QDeclarativeWorkerScript::script_included() +void tst_QQuickWorkerScript::script_included() { - QDeclarativeComponent component(&m_engine, testFileUrl("worker_include.qml")); - QDeclarativeWorkerScript *worker = qobject_cast(component.create()); + QQmlComponent component(&m_engine, testFileUrl("worker_include.qml")); + QQuickWorkerScript *worker = qobject_cast(component.create()); QVERIFY(worker != 0); QString value("Hello"); @@ -241,22 +241,22 @@ void tst_QDeclarativeWorkerScript::script_included() delete worker; } -static QString qdeclarativeworkerscript_lastWarning; -static void qdeclarativeworkerscript_warningsHandler(QtMsgType type, const char *msg) +static QString qquickworkerscript_lastWarning; +static void qquickworkerscript_warningsHandler(QtMsgType type, const char *msg) { if (type == QtWarningMsg) - qdeclarativeworkerscript_lastWarning = QString::fromUtf8(msg); + qquickworkerscript_lastWarning = QString::fromUtf8(msg); } -void tst_QDeclarativeWorkerScript::scriptError_onLoad() +void tst_QQuickWorkerScript::scriptError_onLoad() { - QDeclarativeComponent component(&m_engine, testFileUrl("worker_error_onLoad.qml")); + QQmlComponent component(&m_engine, testFileUrl("worker_error_onLoad.qml")); - QtMsgHandler previousMsgHandler = qInstallMsgHandler(qdeclarativeworkerscript_warningsHandler); - QDeclarativeWorkerScript *worker = qobject_cast(component.create()); + QtMsgHandler previousMsgHandler = qInstallMsgHandler(qquickworkerscript_warningsHandler); + QQuickWorkerScript *worker = qobject_cast(component.create()); QVERIFY(worker != 0); - QTRY_COMPARE(qdeclarativeworkerscript_lastWarning, + QTRY_COMPARE(qquickworkerscript_lastWarning, testFileUrl("script_error_onLoad.js").toString() + QLatin1String(":3: SyntaxError: Unexpected identifier")); qInstallMsgHandler(previousMsgHandler); @@ -264,17 +264,17 @@ void tst_QDeclarativeWorkerScript::scriptError_onLoad() delete worker; } -void tst_QDeclarativeWorkerScript::scriptError_onCall() +void tst_QQuickWorkerScript::scriptError_onCall() { - QDeclarativeComponent component(&m_engine, testFileUrl("worker_error_onCall.qml")); - QDeclarativeWorkerScript *worker = qobject_cast(component.create()); + QQmlComponent component(&m_engine, testFileUrl("worker_error_onCall.qml")); + QQuickWorkerScript *worker = qobject_cast(component.create()); QVERIFY(worker != 0); - QtMsgHandler previousMsgHandler = qInstallMsgHandler(qdeclarativeworkerscript_warningsHandler); + QtMsgHandler previousMsgHandler = qInstallMsgHandler(qquickworkerscript_warningsHandler); QVariant value; QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, value))); - QTRY_COMPARE(qdeclarativeworkerscript_lastWarning, + QTRY_COMPARE(qquickworkerscript_lastWarning, testFileUrl("script_error_onCall.js").toString() + QLatin1String(":4: ReferenceError: Can't find variable: getData")); qInstallMsgHandler(previousMsgHandler); @@ -284,17 +284,17 @@ void tst_QDeclarativeWorkerScript::scriptError_onCall() // Rapidly create and destroy worker scripts to test resources are being disposed // in the correct isolate -void tst_QDeclarativeWorkerScript::stressDispose() +void tst_QQuickWorkerScript::stressDispose() { for (int ii = 0; ii < 100; ++ii) { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("stressDispose.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("stressDispose.qml")); QObject *o = component.create(); QVERIFY(o); delete o; } } -QTEST_MAIN(tst_QDeclarativeWorkerScript) +QTEST_MAIN(tst_QQuickWorkerScript) -#include "tst_qdeclarativeworkerscript.moc" +#include "tst_qquickworkerscript.moc" diff --git a/tests/auto/declarative/runall.sh b/tests/auto/qml/runall.sh old mode 100755 new mode 100644 similarity index 96% rename from tests/auto/declarative/runall.sh rename to tests/auto/qml/runall.sh index 621791b6ab..9580d8445e --- a/tests/auto/declarative/runall.sh +++ b/tests/auto/qml/runall.sh @@ -68,8 +68,8 @@ function filter /*/bin/make*) ;; make*) ;; install*) ;; - QDeclarativeDebugServer:*Waiting*) ;; - QDeclarativeDebugServer:*Connection*) ;; + QQmlDebugServer:*Waiting*) ;; + QQmlDebugServer:*Connection*) ;; */qmake*) ;; */bin/moc*) ;; *targ.debug*) ;; diff --git a/tests/auto/declarative/v4/data/conditionalExpr.qml b/tests/auto/qml/v4/data/conditionalExpr.qml similarity index 100% rename from tests/auto/declarative/v4/data/conditionalExpr.qml rename to tests/auto/qml/v4/data/conditionalExpr.qml diff --git a/tests/auto/declarative/v4/data/doubleBoolJump.qml b/tests/auto/qml/v4/data/doubleBoolJump.qml similarity index 100% rename from tests/auto/declarative/v4/data/doubleBoolJump.qml rename to tests/auto/qml/v4/data/doubleBoolJump.qml diff --git a/tests/auto/declarative/v4/data/fetchException.qml b/tests/auto/qml/v4/data/fetchException.qml similarity index 100% rename from tests/auto/declarative/v4/data/fetchException.qml rename to tests/auto/qml/v4/data/fetchException.qml diff --git a/tests/auto/declarative/v4/data/logicalOr.2.qml b/tests/auto/qml/v4/data/logicalOr.2.qml similarity index 100% rename from tests/auto/declarative/v4/data/logicalOr.2.qml rename to tests/auto/qml/v4/data/logicalOr.2.qml diff --git a/tests/auto/declarative/v4/data/logicalOr.qml b/tests/auto/qml/v4/data/logicalOr.qml similarity index 100% rename from tests/auto/declarative/v4/data/logicalOr.qml rename to tests/auto/qml/v4/data/logicalOr.qml diff --git a/tests/auto/declarative/v4/data/nestedLogicalOr.qml b/tests/auto/qml/v4/data/nestedLogicalOr.qml similarity index 100% rename from tests/auto/declarative/v4/data/nestedLogicalOr.qml rename to tests/auto/qml/v4/data/nestedLogicalOr.qml diff --git a/tests/auto/declarative/v4/data/nestedObjectAccess.qml b/tests/auto/qml/v4/data/nestedObjectAccess.qml similarity index 100% rename from tests/auto/declarative/v4/data/nestedObjectAccess.qml rename to tests/auto/qml/v4/data/nestedObjectAccess.qml diff --git a/tests/auto/declarative/v4/data/nullQObject.qml b/tests/auto/qml/v4/data/nullQObject.qml similarity index 100% rename from tests/auto/declarative/v4/data/nullQObject.qml rename to tests/auto/qml/v4/data/nullQObject.qml diff --git a/tests/auto/declarative/v4/data/qrealToIntRounding.qml b/tests/auto/qml/v4/data/qrealToIntRounding.qml similarity index 100% rename from tests/auto/declarative/v4/data/qrealToIntRounding.qml rename to tests/auto/qml/v4/data/qrealToIntRounding.qml diff --git a/tests/auto/declarative/v4/data/qtbug_21883.qml b/tests/auto/qml/v4/data/qtbug_21883.qml similarity index 100% rename from tests/auto/declarative/v4/data/qtbug_21883.qml rename to tests/auto/qml/v4/data/qtbug_21883.qml diff --git a/tests/auto/declarative/v4/data/qtbug_22816.qml b/tests/auto/qml/v4/data/qtbug_22816.qml similarity index 100% rename from tests/auto/declarative/v4/data/qtbug_22816.qml rename to tests/auto/qml/v4/data/qtbug_22816.qml diff --git a/tests/auto/declarative/v4/data/stringComparison.qml b/tests/auto/qml/v4/data/stringComparison.qml similarity index 100% rename from tests/auto/declarative/v4/data/stringComparison.qml rename to tests/auto/qml/v4/data/stringComparison.qml diff --git a/tests/auto/declarative/v4/data/subscriptionsInConditionalExpressions.qml b/tests/auto/qml/v4/data/subscriptionsInConditionalExpressions.qml similarity index 100% rename from tests/auto/declarative/v4/data/subscriptionsInConditionalExpressions.qml rename to tests/auto/qml/v4/data/subscriptionsInConditionalExpressions.qml diff --git a/tests/auto/declarative/v4/data/unaryMinus.qml b/tests/auto/qml/v4/data/unaryMinus.qml similarity index 100% rename from tests/auto/declarative/v4/data/unaryMinus.qml rename to tests/auto/qml/v4/data/unaryMinus.qml diff --git a/tests/auto/declarative/v4/data/unaryPlus.qml b/tests/auto/qml/v4/data/unaryPlus.qml similarity index 100% rename from tests/auto/declarative/v4/data/unaryPlus.qml rename to tests/auto/qml/v4/data/unaryPlus.qml diff --git a/tests/auto/declarative/v4/data/unnecessaryReeval.qml b/tests/auto/qml/v4/data/unnecessaryReeval.qml similarity index 100% rename from tests/auto/declarative/v4/data/unnecessaryReeval.qml rename to tests/auto/qml/v4/data/unnecessaryReeval.qml diff --git a/tests/auto/declarative/v4/testtypes.cpp b/tests/auto/qml/v4/testtypes.cpp similarity index 97% rename from tests/auto/declarative/v4/testtypes.cpp rename to tests/auto/qml/v4/testtypes.cpp index 6bfd5dc43e..c879cf2226 100644 --- a/tests/auto/declarative/v4/testtypes.cpp +++ b/tests/auto/qml/v4/testtypes.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "testtypes.h" -#include +#include void registerTypes() { diff --git a/tests/auto/declarative/v4/testtypes.h b/tests/auto/qml/v4/testtypes.h similarity index 100% rename from tests/auto/declarative/v4/testtypes.h rename to tests/auto/qml/v4/testtypes.h diff --git a/tests/auto/declarative/v4/tst_v4.cpp b/tests/auto/qml/v4/tst_v4.cpp similarity index 87% rename from tests/auto/declarative/v4/tst_v4.cpp rename to tests/auto/qml/v4/tst_v4.cpp index 927dc0f082..559abf7388 100644 --- a/tests/auto/declarative/v4/tst_v4.cpp +++ b/tests/auto/qml/v4/tst_v4.cpp @@ -42,8 +42,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -51,7 +51,7 @@ #include "../../shared/util.h" #include "testtypes.h" -class tst_v4 : public QDeclarativeDataTest +class tst_v4 : public QQmlDataTest { Q_OBJECT public: @@ -75,12 +75,12 @@ private slots: void unaryPlus(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; void tst_v4::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); registerTypes(); } @@ -97,7 +97,7 @@ void tst_v4::qtscript() QFETCH(QString, file); QV4Compiler::enableBindingsTest(true); - QDeclarativeComponent component(&engine, testFileUrl(file)); + QQmlComponent component(&engine, testFileUrl(file)); v4ErrorsMsgCount = 0; QtMsgHandler old = qInstallMsgHandler(v4ErrorsMsgHandler); @@ -127,7 +127,7 @@ void tst_v4::qtscript_data() void tst_v4::unnecessaryReeval() { - QDeclarativeComponent component(&engine, testFileUrl("unnecessaryReeval.qml")); + QQmlComponent component(&engine, testFileUrl("unnecessaryReeval.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -161,7 +161,7 @@ void tst_v4::unnecessaryReeval() void tst_v4::logicalOr() { { - QDeclarativeComponent component(&engine, testFileUrl("logicalOr.qml")); + QQmlComponent component(&engine, testFileUrl("logicalOr.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -174,7 +174,7 @@ void tst_v4::logicalOr() } { - QDeclarativeComponent component(&engine, testFileUrl("logicalOr.2.qml")); + QQmlComponent component(&engine, testFileUrl("logicalOr.2.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -190,7 +190,7 @@ void tst_v4::logicalOr() void tst_v4::nestedLogicalOr() { //we are primarily testing that v4 does not get caught in a loop (QTBUG-24038) - QDeclarativeComponent component(&engine, testFileUrl("nestedLogicalOr.qml")); + QQmlComponent component(&engine, testFileUrl("nestedLogicalOr.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -205,7 +205,7 @@ void tst_v4::nestedLogicalOr() void tst_v4::conditionalExpr() { { - QDeclarativeComponent component(&engine, testFileUrl("conditionalExpr.qml")); + QQmlComponent component(&engine, testFileUrl("conditionalExpr.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -223,7 +223,7 @@ void tst_v4::conditionalExpr() // NestedObject::result. void tst_v4::nestedObjectAccess() { - QDeclarativeComponent component(&engine, testFileUrl("nestedObjectAccess.qml")); + QQmlComponent component(&engine, testFileUrl("nestedObjectAccess.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -238,7 +238,7 @@ void tst_v4::nestedObjectAccess() void tst_v4::subscriptionsInConditionalExpressions() { - QDeclarativeComponent component(&engine, testFileUrl("subscriptionsInConditionalExpressions.qml")); + QQmlComponent component(&engine, testFileUrl("subscriptionsInConditionalExpressions.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -254,7 +254,7 @@ void tst_v4::subscriptionsInConditionalExpressions() // Crash test void tst_v4::qtbug_21883() { - QDeclarativeComponent component(&engine, testFileUrl("qtbug_21883.qml")); + QQmlComponent component(&engine, testFileUrl("qtbug_21883.qml")); QString warning = component.url().toString() + ":4: Unable to assign null to ResultObject*"; QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); @@ -266,7 +266,7 @@ void tst_v4::qtbug_21883() void tst_v4::qtbug_22816() { - QDeclarativeComponent component(&engine, testFileUrl("qtbug_22816.qml")); + QQmlComponent component(&engine, testFileUrl("qtbug_22816.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -277,7 +277,7 @@ void tst_v4::qtbug_22816() void tst_v4::stringComparison() { - QDeclarativeComponent component(&engine, testFileUrl("stringComparison.qml")); + QQmlComponent component(&engine, testFileUrl("stringComparison.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -308,7 +308,7 @@ void tst_v4::stringComparison() void tst_v4::unaryMinus() { - QDeclarativeComponent component(&engine, testFileUrl("unaryMinus.qml")); + QQmlComponent component(&engine, testFileUrl("unaryMinus.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -329,7 +329,7 @@ void tst_v4::unaryMinus() void tst_v4::unaryPlus() { - QDeclarativeComponent component(&engine, testFileUrl("unaryPlus.qml")); + QQmlComponent component(&engine, testFileUrl("unaryPlus.qml")); QObject *o = component.create(); QVERIFY(o != 0); diff --git a/tests/auto/declarative/v4/v4.pro b/tests/auto/qml/v4/v4.pro similarity index 70% rename from tests/auto/declarative/v4/v4.pro rename to tests/auto/qml/v4/v4.pro index 81d12f89be..df8e7b1c3c 100644 --- a/tests/auto/declarative/v4/v4.pro +++ b/tests/auto/qml/v4/v4.pro @@ -1,5 +1,5 @@ CONFIG += testcase -TARGET = tst_qdeclarativev4 +TARGET = tst_qqmlv4 macx:CONFIG -= app_bundle SOURCES += tst_v4.cpp \ @@ -14,4 +14,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private network testlib +QT += core-private gui-private v8-private qml-private network testlib diff --git a/tests/auto/qmldevtools/compile/tst_compile.cpp b/tests/auto/qmldevtools/compile/tst_compile.cpp index bcd602b8bc..0955eb4a8e 100644 --- a/tests/auto/qmldevtools/compile/tst_compile.cpp +++ b/tests/auto/qmldevtools/compile/tst_compile.cpp @@ -40,11 +40,11 @@ ****************************************************************************/ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class tst_compile : public QObject { diff --git a/tests/auto/qmltest/createbenchmark/item.qml b/tests/auto/qmltest/createbenchmark/item.qml index ebc50ceb13..af6c2f3f59 100644 --- a/tests/auto/qmltest/createbenchmark/item.qml +++ b/tests/auto/qmltest/createbenchmark/item.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/auto/qmltest/qmltest.pro b/tests/auto/qmltest/qmltest.pro index d0bc8a89cd..b1b2ee2228 100644 --- a/tests/auto/qmltest/qmltest.pro +++ b/tests/auto/qmltest/qmltest.pro @@ -4,7 +4,7 @@ CONFIG += warn_on qmltestcase SOURCES += tst_qmltest.cpp -importFiles.files = borderimage buttonclick createbenchmark events qdeclarativebinding selftests +importFiles.files = borderimage buttonclick createbenchmark events qqmlbinding selftests importFiles.path = . DEPLOYMENT += importFiles diff --git a/tests/auto/qmltest/qdeclarativebinding/tst_binding.qml b/tests/auto/qmltest/qqmlbinding/tst_binding.qml similarity index 100% rename from tests/auto/qmltest/qdeclarativebinding/tst_binding.qml rename to tests/auto/qmltest/qqmlbinding/tst_binding.qml diff --git a/tests/auto/qmltest/qdeclarativebinding/tst_binding2.qml b/tests/auto/qmltest/qqmlbinding/tst_binding2.qml similarity index 100% rename from tests/auto/qmltest/qdeclarativebinding/tst_binding2.qml rename to tests/auto/qmltest/qqmlbinding/tst_binding2.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimationcontroller/qdeclarativeanimationcontroller.pro b/tests/auto/qtquick2/qdeclarativeanimationcontroller/qdeclarativeanimationcontroller.pro deleted file mode 100644 index 52cafc33a6..0000000000 --- a/tests/auto/qtquick2/qdeclarativeanimationcontroller/qdeclarativeanimationcontroller.pro +++ /dev/null @@ -1,10 +0,0 @@ -QT += core-private gui-private declarative-private -TEMPLATE=app -TARGET=tst_qdeclarativeanimationcontroller - -CONFIG += warn_on qmltestcase -SOURCES += tst_qdeclarativeanimationcontroller.cpp - -importFiles.files = data -importFiles.path = . -DEPLOYMENT += importFiles diff --git a/tests/auto/qtquick2/qdeclarativeapplication/qdeclarativeapplication.pro b/tests/auto/qtquick2/qdeclarativeapplication/qdeclarativeapplication.pro deleted file mode 100644 index b86f431d31..0000000000 --- a/tests/auto/qtquick2/qdeclarativeapplication/qdeclarativeapplication.pro +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativeapplication -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativeapplication.cpp -QT += core-private gui-private declarative-private quick-private testlib - diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/qdeclarativebehaviors.pro b/tests/auto/qtquick2/qdeclarativebehaviors/qdeclarativebehaviors.pro deleted file mode 100644 index 7089f1ce57..0000000000 --- a/tests/auto/qtquick2/qdeclarativebehaviors/qdeclarativebehaviors.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativebehaviors -SOURCES += tst_qdeclarativebehaviors.cpp - -include (../../shared/util.pri) - -macx:CONFIG -= app_bundle - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib diff --git a/tests/auto/qtquick2/qdeclarativepath/qdeclarativepath.pro b/tests/auto/qtquick2/qdeclarativepath/qdeclarativepath.pro deleted file mode 100644 index 1936d53050..0000000000 --- a/tests/auto/qtquick2/qdeclarativepath/qdeclarativepath.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativepath -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativepath.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private quick-private testlib diff --git a/tests/auto/qtquick2/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro b/tests/auto/qtquick2/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro deleted file mode 100644 index 41650c523f..0000000000 --- a/tests/auto/qtquick2/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativesmoothedanimation -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativesmoothedanimation.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private quick-private testlib diff --git a/tests/auto/qtquick2/qdeclarativespringanimation/qdeclarativespringanimation.pro b/tests/auto/qtquick2/qdeclarativespringanimation/qdeclarativespringanimation.pro deleted file mode 100644 index d90cf3dca3..0000000000 --- a/tests/auto/qtquick2/qdeclarativespringanimation/qdeclarativespringanimation.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativespringanimation -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativespringanimation.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private quick-private testlib diff --git a/tests/auto/qtquick2/qdeclarativestates/qdeclarativestates.pro b/tests/auto/qtquick2/qdeclarativestates/qdeclarativestates.pro deleted file mode 100644 index 74f5bef417..0000000000 --- a/tests/auto/qtquick2/qdeclarativestates/qdeclarativestates.pro +++ /dev/null @@ -1,14 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativestates -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativestates.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib diff --git a/tests/auto/qtquick2/qdeclarativestyledtext/qdeclarativestyledtext.pro b/tests/auto/qtquick2/qdeclarativestyledtext/qdeclarativestyledtext.pro deleted file mode 100644 index 84532f611e..0000000000 --- a/tests/auto/qtquick2/qdeclarativestyledtext/qdeclarativestyledtext.pro +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativestyledtext -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativestyledtext.cpp - -CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private network testlib diff --git a/tests/auto/qtquick2/qdeclarativesystempalette/qdeclarativesystempalette.pro b/tests/auto/qtquick2/qdeclarativesystempalette/qdeclarativesystempalette.pro deleted file mode 100644 index 87c2af2190..0000000000 --- a/tests/auto/qtquick2/qdeclarativesystempalette/qdeclarativesystempalette.pro +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativesystempalette -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativesystempalette.cpp - -CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private widgets testlib diff --git a/tests/auto/qtquick2/qdeclarativetimer/qdeclarativetimer.pro b/tests/auto/qtquick2/qdeclarativetimer/qdeclarativetimer.pro deleted file mode 100644 index d990dc449f..0000000000 --- a/tests/auto/qtquick2/qdeclarativetimer/qdeclarativetimer.pro +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativetimer -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativetimer.cpp - -CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private gui testlib diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/qtquick2/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro deleted file mode 100644 index 37f1c65c92..0000000000 --- a/tests/auto/qtquick2/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG += testcase -TARGET = tst_qdeclarativexmllistmodel -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativexmllistmodel.cpp - -include (../../shared/util.pri) - -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -CONFIG += parallel_test - -QT += core-private gui-private v8-private declarative-private network testlib xmlpatterns diff --git a/tests/auto/qtquick2/examples/data/dummytest.qml b/tests/auto/quick/examples/data/dummytest.qml similarity index 100% rename from tests/auto/qtquick2/examples/data/dummytest.qml rename to tests/auto/quick/examples/data/dummytest.qml diff --git a/tests/auto/qtquick2/examples/data/webbrowser/webbrowser.qml b/tests/auto/quick/examples/data/webbrowser/webbrowser.qml similarity index 100% rename from tests/auto/qtquick2/examples/data/webbrowser/webbrowser.qml rename to tests/auto/quick/examples/data/webbrowser/webbrowser.qml diff --git a/tests/auto/qtquick2/examples/examples.pro b/tests/auto/quick/examples/examples.pro similarity index 62% rename from tests/auto/qtquick2/examples/examples.pro rename to tests/auto/quick/examples/examples.pro index 577c145e77..e67120d7c2 100644 --- a/tests/auto/qtquick2/examples/examples.pro +++ b/tests/auto/quick/examples/examples.pro @@ -7,4 +7,4 @@ DEFINES += SRCDIR=\\\"$$PWD\\\" CONFIG += parallel_test #temporary -QT += core-private gui-private declarative-private quick-private widgets-private v8-private testlib +QT += core-private gui-private qml-private quick-private widgets-private v8-private testlib diff --git a/tests/auto/qtquick2/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp similarity index 82% rename from tests/auto/qtquick2/examples/tst_examples.cpp rename to tests/auto/quick/examples/tst_examples.cpp index 0e420f7277..24a60cb08a 100644 --- a/tests/auto/qtquick2/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -46,9 +46,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include static QtMsgHandler testlibMsgHandler = 0; void msgHandlerFilter(QtMsgType type, const char *msg) @@ -80,41 +80,41 @@ private slots: void namingConvention(const QDir &); QStringList findQmlFiles(const QDir &); - QDeclarativeEngine engine; + QQmlEngine engine; }; tst_examples::tst_examples() { // Add files to exclude here - excludedFiles << "doc/src/snippets/declarative/listmodel.qml"; //Just a ListModel, no root QQuickItem + excludedFiles << "doc/src/snippets/qml/listmodel.qml"; //Just a ListModel, no root QQuickItem // Add directories you want excluded here - excludedDirs << "examples/declarative/text/fonts"; // QTBUG-21415 - excludedDirs << "doc/src/snippets/declarative/path"; //No root QQuickItem + excludedDirs << "examples/qml/text/fonts"; // QTBUG-21415 + excludedDirs << "doc/src/snippets/qml/path"; //No root QQuickItem // Not run in QQuickView - excludedDirs << "examples/declarative/qtquick1"; + excludedDirs << "examples/qml/qtquick1"; // These snippets are not expected to run on their own. - excludedDirs << "doc/src/snippets/declarative/visualdatamodel_rootindex"; - excludedDirs << "doc/src/snippets/declarative/qtbinding"; - excludedDirs << "doc/src/snippets/declarative/imports"; + excludedDirs << "doc/src/snippets/qml/visualdatamodel_rootindex"; + excludedDirs << "doc/src/snippets/qml/qtbinding"; + excludedDirs << "doc/src/snippets/qml/imports"; excludedDirs << "doc/src/snippets/qtquick1/visualdatamodel_rootindex"; excludedDirs << "doc/src/snippets/qtquick1/qtbinding"; excludedDirs << "doc/src/snippets/qtquick1/imports"; #ifdef QT_NO_WEBKIT - excludedDirs << "examples/declarative/modelviews/webview"; - excludedDirs << "examples/declarative/webbrowser"; - excludedDirs << "doc/src/snippets/declarative/webview"; + excludedDirs << "examples/qml/modelviews/webview"; + excludedDirs << "examples/qml/webbrowser"; + excludedDirs << "doc/src/snippets/qml/webview"; excludedDirs << "doc/src/snippets/qtquick1/webview"; #endif #ifdef QT_NO_XMLPATTERNS - excludedDirs << "examples/declarative/xml/xmldata"; - excludedDirs << "examples/declarative/twitter"; - excludedDirs << "examples/declarative/flickr"; - excludedDirs << "examples/declarative/photoviewer"; + excludedDirs << "examples/qml/xml/xmldata"; + excludedDirs << "examples/qml/twitter"; + excludedDirs << "examples/qml/flickr"; + excludedDirs << "examples/qml/photoviewer"; #endif } @@ -220,7 +220,7 @@ QStringList tst_examples::findQmlFiles(const QDir &d) } /* -This test runs all the examples in the declarative UI source tree and ensures +This test runs all the examples in the QtQml UI source tree and ensures that they start and exit cleanly. Examples are any .qml files under the examples/ directory that start @@ -230,8 +230,8 @@ void tst_examples::sgexamples_data() { QTest::addColumn("file"); - QString examples = QLatin1String(SRCDIR) + "/../../../../examples/declarative/"; - QString tutorials = QLatin1String(SRCDIR) + "/../../../../examples/tutorials/"; //Only declarative tutorials since modularization + QString examples = QLatin1String(SRCDIR) + "/../../../../examples/qml/"; + QString tutorials = QLatin1String(SRCDIR) + "/../../../../examples/tutorials/"; //Only qml tutorials since modularization QStringList files; files << findQmlFiles(QDir(examples)); @@ -245,10 +245,10 @@ void tst_examples::sgexamples() { QFETCH(QString, file); - QDeclarativeComponent component(&engine, QUrl::fromLocalFile(file)); - if (component.status() == QDeclarativeComponent::Error) + QQmlComponent component(&engine, QUrl::fromLocalFile(file)); + if (component.status() == QQmlComponent::Error) qWarning() << component.errors(); - QCOMPARE(component.status(), QDeclarativeComponent::Ready); + QCOMPARE(component.status(), QQmlComponent::Ready); QScopedPointer object(component.beginCreate(engine.rootContext())); QQuickItem *root = qobject_cast(object.data()); @@ -269,7 +269,7 @@ void tst_examples::sgsnippets_data() { QTest::addColumn("file"); - QString snippets = QLatin1String(SRCDIR) + "/../../../../doc/src/snippets/declarative"; + QString snippets = QLatin1String(SRCDIR) + "/../../../../doc/src/snippets/qml"; QStringList files; files << findQmlFiles(QDir(snippets)); @@ -282,10 +282,10 @@ void tst_examples::sgsnippets() { QFETCH(QString, file); - QDeclarativeComponent component(&engine, QUrl::fromLocalFile(file)); - if (component.status() == QDeclarativeComponent::Error) + QQmlComponent component(&engine, QUrl::fromLocalFile(file)); + if (component.status() == QQmlComponent::Error) qWarning() << component.errors(); - QCOMPARE(component.status(), QDeclarativeComponent::Ready); + QCOMPARE(component.status(), QQmlComponent::Ready); QScopedPointer object(component.beginCreate(engine.rootContext())); QQuickItem *root = qobject_cast(object.data()); diff --git a/tests/auto/qtquick2/geometry/geometry.pro b/tests/auto/quick/geometry/geometry.pro similarity index 60% rename from tests/auto/qtquick2/geometry/geometry.pro rename to tests/auto/quick/geometry/geometry.pro index 04d529cfb8..41fcab7c8f 100644 --- a/tests/auto/qtquick2/geometry/geometry.pro +++ b/tests/auto/quick/geometry/geometry.pro @@ -6,4 +6,4 @@ SOURCES += tst_geometry.cpp CONFIG+=parallel_test -QT += core-private gui-private declarative-private quick-private opengl testlib +QT += core-private gui-private qml-private quick-private opengl testlib diff --git a/tests/auto/qtquick2/geometry/tst_geometry.cpp b/tests/auto/quick/geometry/tst_geometry.cpp similarity index 100% rename from tests/auto/qtquick2/geometry/tst_geometry.cpp rename to tests/auto/quick/geometry/tst_geometry.cpp diff --git a/tests/auto/qtquick2/nodes/nodes.pro b/tests/auto/quick/nodes/nodes.pro similarity index 58% rename from tests/auto/qtquick2/nodes/nodes.pro rename to tests/auto/quick/nodes/nodes.pro index 40eeb2ab78..51e3e2a156 100644 --- a/tests/auto/qtquick2/nodes/nodes.pro +++ b/tests/auto/quick/nodes/nodes.pro @@ -6,4 +6,4 @@ SOURCES += tst_nodestest.cpp CONFIG+=parallel_test -QT += core-private gui-private declarative-private quick-private opengl widgets testlib +QT += core-private gui-private qml-private quick-private opengl widgets testlib diff --git a/tests/auto/qtquick2/nodes/tst_nodestest.cpp b/tests/auto/quick/nodes/tst_nodestest.cpp similarity index 100% rename from tests/auto/qtquick2/nodes/tst_nodestest.cpp rename to tests/auto/quick/nodes/tst_nodestest.cpp diff --git a/tests/auto/qtquick2/qquickaccessible/data/checkbuttons.qml b/tests/auto/quick/qquickaccessible/data/checkbuttons.qml similarity index 100% rename from tests/auto/qtquick2/qquickaccessible/data/checkbuttons.qml rename to tests/auto/quick/qquickaccessible/data/checkbuttons.qml diff --git a/tests/auto/qtquick2/qquickaccessible/data/hittest.qml b/tests/auto/quick/qquickaccessible/data/hittest.qml similarity index 98% rename from tests/auto/qtquick2/qquickaccessible/data/hittest.qml rename to tests/auto/quick/qquickaccessible/data/hittest.qml index 23d3b95157..e8003e648a 100644 --- a/tests/auto/qtquick2/qquickaccessible/data/hittest.qml +++ b/tests/auto/quick/qquickaccessible/data/hittest.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/auto/qtquick2/qquickaccessible/data/pushbutton.qml b/tests/auto/quick/qquickaccessible/data/pushbutton.qml similarity index 100% rename from tests/auto/qtquick2/qquickaccessible/data/pushbutton.qml rename to tests/auto/quick/qquickaccessible/data/pushbutton.qml diff --git a/tests/auto/qtquick2/qquickaccessible/data/statictext.qml b/tests/auto/quick/qquickaccessible/data/statictext.qml similarity index 100% rename from tests/auto/qtquick2/qquickaccessible/data/statictext.qml rename to tests/auto/quick/qquickaccessible/data/statictext.qml diff --git a/tests/auto/qtquick2/qquickaccessible/data/widgets/TextRect.qml b/tests/auto/quick/qquickaccessible/data/widgets/TextRect.qml similarity index 100% rename from tests/auto/qtquick2/qquickaccessible/data/widgets/TextRect.qml rename to tests/auto/quick/qquickaccessible/data/widgets/TextRect.qml diff --git a/tests/auto/qtquick2/qquickaccessible/qquickaccessible.pro b/tests/auto/quick/qquickaccessible/qquickaccessible.pro similarity index 89% rename from tests/auto/qtquick2/qquickaccessible/qquickaccessible.pro rename to tests/auto/quick/qquickaccessible/qquickaccessible.pro index dc32316e28..ca50f5d8af 100644 --- a/tests/auto/qtquick2/qquickaccessible/qquickaccessible.pro +++ b/tests/auto/quick/qquickaccessible/qquickaccessible.pro @@ -1,7 +1,7 @@ CONFIG += testcase TARGET = tst_qquickaccessible -QT += declarative-private network quick-private testlib +QT += qml-private network quick-private testlib macx:CONFIG -= app_bundle SOURCES += tst_qquickaccessible.cpp diff --git a/tests/auto/qtquick2/qquickaccessible/tst_qquickaccessible.cpp b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp similarity index 95% rename from tests/auto/qtquick2/qquickaccessible/tst_qquickaccessible.cpp rename to tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp index 2e1c2b883c..d65666162d 100644 --- a/tests/auto/qtquick2/qquickaccessible/tst_qquickaccessible.cpp +++ b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -48,8 +48,8 @@ #include #include -#include -#include +#include +#include #include #include "../../shared/util.h" @@ -98,7 +98,7 @@ static int verifyHierarchy(QAccessibleInterface *iface) //TESTED_FILES= -class tst_QQuickAccessible : public QDeclarativeDataTest +class tst_QQuickAccessible : public QQmlDataTest { Q_OBJECT public: @@ -109,7 +109,7 @@ private slots: void commonTests_data(); void commonTests(); - void declarativeAttachedProperties(); + void quickAttachedProperties(); void basicPropertiesTest(); void hitTest(); void checkableTest(); @@ -197,11 +197,11 @@ QString eventName(const int ev) } } -void tst_QQuickAccessible::declarativeAttachedProperties() +void tst_QQuickAccessible::quickAttachedProperties() { { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nItem {\n" "}", QUrl()); QObject *object = component.create(); @@ -220,8 +220,8 @@ void tst_QQuickAccessible::declarativeAttachedProperties() attachedObj->name(); QVariant pp = attachedObj->property("name"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nItem {\n" "Accessible.role: Accessible.Button\n" "}", QUrl()); @@ -244,8 +244,8 @@ void tst_QQuickAccessible::declarativeAttachedProperties() // Attached property { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nItem {\n" "Accessible.role: Accessible.Button\n" "Accessible.name: \"Donald\"\n" diff --git a/tests/auto/qtquick2/qquickanchors/data/anchors.qml b/tests/auto/quick/qquickanchors/data/anchors.qml similarity index 100% rename from tests/auto/qtquick2/qquickanchors/data/anchors.qml rename to tests/auto/quick/qquickanchors/data/anchors.qml diff --git a/tests/auto/qtquick2/qquickanchors/data/centerin.qml b/tests/auto/quick/qquickanchors/data/centerin.qml similarity index 100% rename from tests/auto/qtquick2/qquickanchors/data/centerin.qml rename to tests/auto/quick/qquickanchors/data/centerin.qml diff --git a/tests/auto/qtquick2/qquickanchors/data/centerinRotation.qml b/tests/auto/quick/qquickanchors/data/centerinRotation.qml similarity index 100% rename from tests/auto/qtquick2/qquickanchors/data/centerinRotation.qml rename to tests/auto/quick/qquickanchors/data/centerinRotation.qml diff --git a/tests/auto/qtquick2/qquickanchors/data/crash1.qml b/tests/auto/quick/qquickanchors/data/crash1.qml similarity index 100% rename from tests/auto/qtquick2/qquickanchors/data/crash1.qml rename to tests/auto/quick/qquickanchors/data/crash1.qml diff --git a/tests/auto/qtquick2/qquickanchors/data/fill.qml b/tests/auto/quick/qquickanchors/data/fill.qml similarity index 100% rename from tests/auto/qtquick2/qquickanchors/data/fill.qml rename to tests/auto/quick/qquickanchors/data/fill.qml diff --git a/tests/auto/qtquick2/qquickanchors/data/hvCenter.qml b/tests/auto/quick/qquickanchors/data/hvCenter.qml similarity index 100% rename from tests/auto/qtquick2/qquickanchors/data/hvCenter.qml rename to tests/auto/quick/qquickanchors/data/hvCenter.qml diff --git a/tests/auto/qtquick2/qquickanchors/data/loop1.qml b/tests/auto/quick/qquickanchors/data/loop1.qml similarity index 100% rename from tests/auto/qtquick2/qquickanchors/data/loop1.qml rename to tests/auto/quick/qquickanchors/data/loop1.qml diff --git a/tests/auto/qtquick2/qquickanchors/data/loop2.qml b/tests/auto/quick/qquickanchors/data/loop2.qml similarity index 100% rename from tests/auto/qtquick2/qquickanchors/data/loop2.qml rename to tests/auto/quick/qquickanchors/data/loop2.qml diff --git a/tests/auto/qtquick2/qquickanchors/data/margins.qml b/tests/auto/quick/qquickanchors/data/margins.qml similarity index 100% rename from tests/auto/qtquick2/qquickanchors/data/margins.qml rename to tests/auto/quick/qquickanchors/data/margins.qml diff --git a/tests/auto/qtquick2/qquickanchors/qquickanchors.pro b/tests/auto/quick/qquickanchors/qquickanchors.pro similarity index 76% rename from tests/auto/qtquick2/qquickanchors/qquickanchors.pro rename to tests/auto/quick/qquickanchors/qquickanchors.pro index bd94f9cceb..30e6e6dcf8 100644 --- a/tests/auto/qtquick2/qquickanchors/qquickanchors.pro +++ b/tests/auto/quick/qquickanchors/qquickanchors.pro @@ -13,4 +13,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private v8-private testlib +QT += core-private gui-private qml-private quick-private v8-private testlib diff --git a/tests/auto/qtquick2/qquickanchors/tst_qquickanchors.cpp b/tests/auto/quick/qquickanchors/tst_qquickanchors.cpp similarity index 99% rename from tests/auto/qtquick2/qquickanchors/tst_qquickanchors.cpp rename to tests/auto/quick/qquickanchors/tst_qquickanchors.cpp index 8d82abc53b..749b11f919 100644 --- a/tests/auto/qtquick2/qquickanchors/tst_qquickanchors.cpp +++ b/tests/auto/quick/qquickanchors/tst_qquickanchors.cpp @@ -41,8 +41,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -56,7 +56,7 @@ Q_DECLARE_METATYPE(QQuickAnchorLine::AnchorLine) using namespace QQuickVisualTestUtil; -class tst_qquickanchors : public QDeclarativeDataTest +class tst_qquickanchors : public QQmlDataTest { Q_OBJECT public: @@ -289,8 +289,8 @@ void tst_qquickanchors::illegalSets() QTest::ignoreMessage(QtWarningMsg, warning.toLatin1()); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\n" + qml.toUtf8()), QUrl::fromLocalFile("")); if (!component.isReady()) qWarning() << "Test errors:" << component.errors(); diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/colors.gif b/tests/auto/quick/qquickanimatedimage/data/colors.gif similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/colors.gif rename to tests/auto/quick/qquickanimatedimage/data/colors.gif diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/colors.qml b/tests/auto/quick/qquickanimatedimage/data/colors.qml similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/colors.qml rename to tests/auto/quick/qquickanimatedimage/data/colors.qml diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/hearts.gif b/tests/auto/quick/qquickanimatedimage/data/hearts.gif similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/hearts.gif rename to tests/auto/quick/qquickanimatedimage/data/hearts.gif diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/hearts.qml b/tests/auto/quick/qquickanimatedimage/data/hearts.qml similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/hearts.qml rename to tests/auto/quick/qquickanimatedimage/data/hearts.qml diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/qmldir b/tests/auto/quick/qquickanimatedimage/data/qmldir similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/qmldir rename to tests/auto/quick/qquickanimatedimage/data/qmldir diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/qtbug-16520.qml b/tests/auto/quick/qquickanimatedimage/data/qtbug-16520.qml similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/qtbug-16520.qml rename to tests/auto/quick/qquickanimatedimage/data/qtbug-16520.qml diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/stickman.gif b/tests/auto/quick/qquickanimatedimage/data/stickman.gif similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/stickman.gif rename to tests/auto/quick/qquickanimatedimage/data/stickman.gif diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/stickman.qml b/tests/auto/quick/qquickanimatedimage/data/stickman.qml similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/stickman.qml rename to tests/auto/quick/qquickanimatedimage/data/stickman.qml diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/stickmanerror1.qml b/tests/auto/quick/qquickanimatedimage/data/stickmanerror1.qml similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/stickmanerror1.qml rename to tests/auto/quick/qquickanimatedimage/data/stickmanerror1.qml diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/stickmanpause.qml b/tests/auto/quick/qquickanimatedimage/data/stickmanpause.qml similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/stickmanpause.qml rename to tests/auto/quick/qquickanimatedimage/data/stickmanpause.qml diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/stickmanscaled.qml b/tests/auto/quick/qquickanimatedimage/data/stickmanscaled.qml similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/stickmanscaled.qml rename to tests/auto/quick/qquickanimatedimage/data/stickmanscaled.qml diff --git a/tests/auto/qtquick2/qquickanimatedimage/data/stickmanstopped.qml b/tests/auto/quick/qquickanimatedimage/data/stickmanstopped.qml similarity index 100% rename from tests/auto/qtquick2/qquickanimatedimage/data/stickmanstopped.qml rename to tests/auto/quick/qquickanimatedimage/data/stickmanstopped.qml diff --git a/tests/auto/qtquick2/qquickanimatedimage/qquickanimatedimage.pro b/tests/auto/quick/qquickanimatedimage/qquickanimatedimage.pro similarity index 80% rename from tests/auto/qtquick2/qquickanimatedimage/qquickanimatedimage.pro rename to tests/auto/quick/qquickanimatedimage/qquickanimatedimage.pro index d776a73b21..468a3253f8 100644 --- a/tests/auto/qtquick2/qquickanimatedimage/qquickanimatedimage.pro +++ b/tests/auto/quick/qquickanimatedimage/qquickanimatedimage.pro @@ -14,4 +14,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private network testlib +QT += core-private gui-private qml-private quick-private network testlib diff --git a/tests/auto/qtquick2/qquickanimatedimage/tst_qquickanimatedimage.cpp b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp similarity index 88% rename from tests/auto/qtquick2/qquickanimatedimage/tst_qquickanimatedimage.cpp rename to tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp index c124e4f62b..7775e395cb 100644 --- a/tests/auto/qtquick2/qquickanimatedimage/tst_qquickanimatedimage.cpp +++ b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp @@ -39,21 +39,21 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include #include #include #include -#include +#include #include "../../shared/testhttpserver.h" #include "../../shared/util.h" Q_DECLARE_METATYPE(QQuickImageBase::Status) -class tst_qquickanimatedimage : public QDeclarativeDataTest +class tst_qquickanimatedimage : public QQmlDataTest { Q_OBJECT public: @@ -80,8 +80,8 @@ private slots: void tst_qquickanimatedimage::play() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("stickman.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("stickman.qml")); QQuickAnimatedImage *anim = qobject_cast(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); @@ -91,8 +91,8 @@ void tst_qquickanimatedimage::play() void tst_qquickanimatedimage::pause() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("stickmanpause.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("stickmanpause.qml")); QQuickAnimatedImage *anim = qobject_cast(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); @@ -103,8 +103,8 @@ void tst_qquickanimatedimage::pause() void tst_qquickanimatedimage::stopped() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("stickmanstopped.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("stickmanstopped.qml")); QQuickAnimatedImage *anim = qobject_cast(component.create()); QVERIFY(anim); QVERIFY(!anim->isPlaying()); @@ -115,8 +115,8 @@ void tst_qquickanimatedimage::stopped() void tst_qquickanimatedimage::setFrame() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("stickmanpause.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("stickmanpause.qml")); QQuickAnimatedImage *anim = qobject_cast(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); @@ -127,8 +127,8 @@ void tst_qquickanimatedimage::setFrame() void tst_qquickanimatedimage::frameCount() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("colors.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("colors.qml")); QQuickAnimatedImage *anim = qobject_cast(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); @@ -233,8 +233,8 @@ void tst_qquickanimatedimage::remote() QVERIFY(server.isValid()); server.serveDirectory(dataDirectory()); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("http://127.0.0.1:14449/" + fileName)); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("http://127.0.0.1:14449/" + fileName)); QTRY_VERIFY(component.isReady()); QQuickAnimatedImage *anim = qobject_cast(component.create()); @@ -252,8 +252,8 @@ void tst_qquickanimatedimage::remote() void tst_qquickanimatedimage::sourceSize() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("stickmanscaled.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("stickmanscaled.qml")); QQuickAnimatedImage *anim = qobject_cast(component.create()); QVERIFY(anim); QCOMPARE(anim->width(),240.0); @@ -265,8 +265,8 @@ void tst_qquickanimatedimage::sourceSize() void tst_qquickanimatedimage::sourceSizeReadOnly() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("stickmanerror1.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("stickmanerror1.qml")); QVERIFY(component.isError()); QCOMPARE(component.errors().at(0).description(), QString("Invalid property assignment: \"sourceSize\" is a read-only property")); } @@ -282,8 +282,8 @@ void tst_qquickanimatedimage::remote_data() void tst_qquickanimatedimage::invalidSource() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\n AnimatedImage { source: \"no-such-file.gif\" }", QUrl::fromLocalFile("")); QVERIFY(component.isReady()); @@ -305,8 +305,8 @@ void tst_qquickanimatedimage::qtbug_16520() QVERIFY(server.isValid()); server.serveDirectory(dataDirectory()); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("qtbug-16520.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("qtbug-16520.qml")); QTRY_VERIFY(component.isReady()); QQuickRectangle *root = qobject_cast(component.create()); @@ -327,11 +327,11 @@ void tst_qquickanimatedimage::progressAndStatusChanges() QVERIFY(server.isValid()); server.serveDirectory(dataDirectory()); - QDeclarativeEngine engine; + QQmlEngine engine; QString componentStr = "import QtQuick 2.0\nAnimatedImage { source: srcImage }"; - QDeclarativeContext *ctxt = engine.rootContext(); + QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty("srcImage", testFileUrl("stickman.gif")); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); diff --git a/tests/auto/qtquick2/qdeclarativeanimationcontroller/data/tst_numberanimation.qml b/tests/auto/quick/qquickanimationcontroller/data/tst_numberanimation.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimationcontroller/data/tst_numberanimation.qml rename to tests/auto/quick/qquickanimationcontroller/data/tst_numberanimation.qml diff --git a/tests/auto/quick/qquickanimationcontroller/qquickanimationcontroller.pro b/tests/auto/quick/qquickanimationcontroller/qquickanimationcontroller.pro new file mode 100644 index 0000000000..72a09fcb9c --- /dev/null +++ b/tests/auto/quick/qquickanimationcontroller/qquickanimationcontroller.pro @@ -0,0 +1,10 @@ +QT += core-private gui-private qml-private +TEMPLATE=app +TARGET=tst_qquickanimationcontroller + +CONFIG += warn_on qmltestcase +SOURCES += tst_qquickanimationcontroller.cpp + +importFiles.files = data +importFiles.path = . +DEPLOYMENT += importFiles diff --git a/tests/auto/qtquick2/qdeclarativeanimationcontroller/tst_qdeclarativeanimationcontroller.cpp b/tests/auto/quick/qquickanimationcontroller/tst_qquickanimationcontroller.cpp similarity index 97% rename from tests/auto/qtquick2/qdeclarativeanimationcontroller/tst_qdeclarativeanimationcontroller.cpp rename to tests/auto/quick/qquickanimationcontroller/tst_qquickanimationcontroller.cpp index 744f92b99d..8c851bcf65 100644 --- a/tests/auto/qtquick2/qdeclarativeanimationcontroller/tst_qdeclarativeanimationcontroller.cpp +++ b/tests/auto/quick/qquickanimationcontroller/tst_qquickanimationcontroller.cpp @@ -39,4 +39,4 @@ ** ****************************************************************************/ #include -QUICK_TEST_MAIN(qdeclarativeanimationcontroller) +QUICK_TEST_MAIN(qquickanimationcontroller) diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/Double.qml b/tests/auto/quick/qquickanimations/data/Double.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/Double.qml rename to tests/auto/quick/qquickanimations/data/Double.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/attached.qml b/tests/auto/quick/qquickanimations/data/attached.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/attached.qml rename to tests/auto/quick/qquickanimations/data/attached.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/badproperty1.qml b/tests/auto/quick/qquickanimations/data/badproperty1.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/badproperty1.qml rename to tests/auto/quick/qquickanimations/data/badproperty1.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/badproperty2.qml b/tests/auto/quick/qquickanimations/data/badproperty2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/badproperty2.qml rename to tests/auto/quick/qquickanimations/data/badproperty2.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/badtype1.qml b/tests/auto/quick/qquickanimations/data/badtype1.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/badtype1.qml rename to tests/auto/quick/qquickanimations/data/badtype1.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/badtype2.qml b/tests/auto/quick/qquickanimations/data/badtype2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/badtype2.qml rename to tests/auto/quick/qquickanimations/data/badtype2.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/badtype3.qml b/tests/auto/quick/qquickanimations/data/badtype3.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/badtype3.qml rename to tests/auto/quick/qquickanimations/data/badtype3.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/badtype4.qml b/tests/auto/quick/qquickanimations/data/badtype4.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/badtype4.qml rename to tests/auto/quick/qquickanimations/data/badtype4.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/disabledTransition.qml b/tests/auto/quick/qquickanimations/data/disabledTransition.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/disabledTransition.qml rename to tests/auto/quick/qquickanimations/data/disabledTransition.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/dontAutoStart.qml b/tests/auto/quick/qquickanimations/data/dontAutoStart.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/dontAutoStart.qml rename to tests/auto/quick/qquickanimations/data/dontAutoStart.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/dontStart.qml b/tests/auto/quick/qquickanimations/data/dontStart.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/dontStart.qml rename to tests/auto/quick/qquickanimations/data/dontStart.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/dontStart2.qml b/tests/auto/quick/qquickanimations/data/dontStart2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/dontStart2.qml rename to tests/auto/quick/qquickanimations/data/dontStart2.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/dotproperty.qml b/tests/auto/quick/qquickanimations/data/dotproperty.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/dotproperty.qml rename to tests/auto/quick/qquickanimations/data/dotproperty.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/doubleRegistrationBug.qml b/tests/auto/quick/qquickanimations/data/doubleRegistrationBug.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/doubleRegistrationBug.qml rename to tests/auto/quick/qquickanimations/data/doubleRegistrationBug.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/looping.qml b/tests/auto/quick/qquickanimations/data/looping.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/looping.qml rename to tests/auto/quick/qquickanimations/data/looping.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype1.qml b/tests/auto/quick/qquickanimations/data/mixedtype1.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype1.qml rename to tests/auto/quick/qquickanimations/data/mixedtype1.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype2.qml b/tests/auto/quick/qquickanimations/data/mixedtype2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype2.qml rename to tests/auto/quick/qquickanimations/data/mixedtype2.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/nonTransitionBug.qml b/tests/auto/quick/qquickanimations/data/nonTransitionBug.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/nonTransitionBug.qml rename to tests/auto/quick/qquickanimations/data/nonTransitionBug.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation.qml b/tests/auto/quick/qquickanimations/data/pathAnimation.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation.qml rename to tests/auto/quick/qquickanimations/data/pathAnimation.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation2.qml b/tests/auto/quick/qquickanimations/data/pathAnimation2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation2.qml rename to tests/auto/quick/qquickanimations/data/pathAnimation2.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimationNoStart.qml b/tests/auto/quick/qquickanimations/data/pathAnimationNoStart.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimationNoStart.qml rename to tests/auto/quick/qquickanimations/data/pathAnimationNoStart.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolator.qml b/tests/auto/quick/qquickanimations/data/pathInterpolator.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolator.qml rename to tests/auto/quick/qquickanimations/data/pathInterpolator.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolatorBack.qml b/tests/auto/quick/qquickanimations/data/pathInterpolatorBack.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolatorBack.qml rename to tests/auto/quick/qquickanimations/data/pathInterpolatorBack.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolatorBack2.qml b/tests/auto/quick/qquickanimations/data/pathInterpolatorBack2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolatorBack2.qml rename to tests/auto/quick/qquickanimations/data/pathInterpolatorBack2.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathTransition.qml b/tests/auto/quick/qquickanimations/data/pathTransition.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/pathTransition.qml rename to tests/auto/quick/qquickanimations/data/pathTransition.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pauseBindingBug.qml b/tests/auto/quick/qquickanimations/data/pauseBindingBug.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/pauseBindingBug.qml rename to tests/auto/quick/qquickanimations/data/pauseBindingBug.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pauseBug.qml b/tests/auto/quick/qquickanimations/data/pauseBug.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/pauseBug.qml rename to tests/auto/quick/qquickanimations/data/pauseBug.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/properties.qml b/tests/auto/quick/qquickanimations/data/properties.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/properties.qml rename to tests/auto/quick/qquickanimations/data/properties.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/properties2.qml b/tests/auto/quick/qquickanimations/data/properties2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/properties2.qml rename to tests/auto/quick/qquickanimations/data/properties2.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/properties3.qml b/tests/auto/quick/qquickanimations/data/properties3.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/properties3.qml rename to tests/auto/quick/qquickanimations/data/properties3.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/properties4.qml b/tests/auto/quick/qquickanimations/data/properties4.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/properties4.qml rename to tests/auto/quick/qquickanimations/data/properties4.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/properties5.qml b/tests/auto/quick/qquickanimations/data/properties5.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/properties5.qml rename to tests/auto/quick/qquickanimations/data/properties5.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition.qml b/tests/auto/quick/qquickanimations/data/propertiesTransition.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition.qml rename to tests/auto/quick/qquickanimations/data/propertiesTransition.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition2.qml b/tests/auto/quick/qquickanimations/data/propertiesTransition2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition2.qml rename to tests/auto/quick/qquickanimations/data/propertiesTransition2.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition3.qml b/tests/auto/quick/qquickanimations/data/propertiesTransition3.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition3.qml rename to tests/auto/quick/qquickanimations/data/propertiesTransition3.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition4.qml b/tests/auto/quick/qquickanimations/data/propertiesTransition4.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition4.qml rename to tests/auto/quick/qquickanimations/data/propertiesTransition4.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition5.qml b/tests/auto/quick/qquickanimations/data/propertiesTransition5.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition5.qml rename to tests/auto/quick/qquickanimations/data/propertiesTransition5.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition6.qml b/tests/auto/quick/qquickanimations/data/propertiesTransition6.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition6.qml rename to tests/auto/quick/qquickanimations/data/propertiesTransition6.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition7.qml b/tests/auto/quick/qquickanimations/data/propertiesTransition7.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition7.qml rename to tests/auto/quick/qquickanimations/data/propertiesTransition7.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/reanchor.qml b/tests/auto/quick/qquickanimations/data/reanchor.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/reanchor.qml rename to tests/auto/quick/qquickanimations/data/reanchor.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/registrationBug.qml b/tests/auto/quick/qquickanimations/data/registrationBug.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/registrationBug.qml rename to tests/auto/quick/qquickanimations/data/registrationBug.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/reparent.qml b/tests/auto/quick/qquickanimations/data/reparent.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/reparent.qml rename to tests/auto/quick/qquickanimations/data/reparent.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/rotation.qml b/tests/auto/quick/qquickanimations/data/rotation.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/rotation.qml rename to tests/auto/quick/qquickanimations/data/rotation.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/runningTrueBug.qml b/tests/auto/quick/qquickanimations/data/runningTrueBug.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/runningTrueBug.qml rename to tests/auto/quick/qquickanimations/data/runningTrueBug.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/transitionAssignmentBug.qml b/tests/auto/quick/qquickanimations/data/transitionAssignmentBug.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/transitionAssignmentBug.qml rename to tests/auto/quick/qquickanimations/data/transitionAssignmentBug.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/valuesource.qml b/tests/auto/quick/qquickanimations/data/valuesource.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/valuesource.qml rename to tests/auto/quick/qquickanimations/data/valuesource.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/valuesource2.qml b/tests/auto/quick/qquickanimations/data/valuesource2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativeanimations/data/valuesource2.qml rename to tests/auto/quick/qquickanimations/data/valuesource2.qml diff --git a/tests/auto/qtquick2/qdeclarativeanimations/qdeclarativeanimations.pro b/tests/auto/quick/qquickanimations/qquickanimations.pro similarity index 66% rename from tests/auto/qtquick2/qdeclarativeanimations/qdeclarativeanimations.pro rename to tests/auto/quick/qquickanimations/qquickanimations.pro index e13dbb974e..0e432ab9f1 100644 --- a/tests/auto/qtquick2/qdeclarativeanimations/qdeclarativeanimations.pro +++ b/tests/auto/quick/qquickanimations/qquickanimations.pro @@ -1,6 +1,6 @@ CONFIG += testcase -TARGET = tst_qdeclarativeanimations -SOURCES += tst_qdeclarativeanimations.cpp +TARGET = tst_qquickanimations +SOURCES += tst_qquickanimations.cpp include (../../shared/util.pri) @@ -12,7 +12,7 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib # QTBUG-23385 - color mixing tests failing on Ubuntu 11.10 x64 linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):DEFINES+=UBUNTU_ONEIRIC diff --git a/tests/auto/qtquick2/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp similarity index 77% rename from tests/auto/qtquick2/qdeclarativeanimations/tst_qdeclarativeanimations.cpp rename to tests/auto/quick/qquickanimations/tst_qquickanimations.cpp index c7a0717dd3..108bce64f9 100644 --- a/tests/auto/qtquick2/qdeclarativeanimations/tst_qdeclarativeanimations.cpp +++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp @@ -39,15 +39,15 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include -#include +#include #include -#include -#include #include -#include +#include +#include +#include #include #include @@ -56,17 +56,17 @@ #include "../../shared/util.h" -class tst_qdeclarativeanimations : public QDeclarativeDataTest +class tst_qquickanimations : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativeanimations() {} + tst_qquickanimations() {} private slots: void initTestCase() { - QDeclarativeEngine engine; // ensure types are registered - QDeclarativeDataTest::initTestCase(); + QQmlEngine engine; // ensure types are registered + QQmlDataTest::initTestCase(); } void simpleProperty(); @@ -116,10 +116,10 @@ private slots: QCOMPARE(lhs, rhs); \ } while (false) -void tst_qdeclarativeanimations::simpleProperty() +void tst_qquickanimations::simpleProperty() { QQuickRectangle rect; - QDeclarativePropertyAnimation animation; + QQuickPropertyAnimation animation; animation.setTargetObject(&rect); animation.setProperty("x"); animation.setTo(200); @@ -141,10 +141,10 @@ void tst_qdeclarativeanimations::simpleProperty() QCOMPARE(rect.x(),100.0); } -void tst_qdeclarativeanimations::simpleNumber() +void tst_qquickanimations::simpleNumber() { QQuickRectangle rect; - QDeclarativeNumberAnimation animation; + QQuickNumberAnimation animation; animation.setTargetObject(&rect); animation.setProperty("x"); animation.setTo(200); @@ -166,10 +166,10 @@ void tst_qdeclarativeanimations::simpleNumber() QCOMPARE(rect.x(), qreal(100)); } -void tst_qdeclarativeanimations::simpleColor() +void tst_qquickanimations::simpleColor() { QQuickRectangle rect; - QDeclarativeColorAnimation animation; + QQuickColorAnimation animation; animation.setTargetObject(&rect); animation.setProperty("color"); animation.setTo(QColor("red")); @@ -203,17 +203,17 @@ void tst_qdeclarativeanimations::simpleColor() QCOMPARE(rect.color(), QColor::fromRgbF(0.498039, 0, 0.498039, 1)); } -void tst_qdeclarativeanimations::simpleRotation() +void tst_qquickanimations::simpleRotation() { QQuickRectangle rect; - QDeclarativeRotationAnimation animation; + QQuickRotationAnimation animation; animation.setTargetObject(&rect); animation.setProperty("rotation"); animation.setTo(270); QVERIFY(animation.target() == &rect); QVERIFY(animation.property() == "rotation"); QVERIFY(animation.to() == 270); - QVERIFY(animation.direction() == QDeclarativeRotationAnimation::Numerical); + QVERIFY(animation.direction() == QQuickRotationAnimation::Numerical); animation.start(); QVERIFY(animation.isRunning()); QTest::qWait(animation.duration()); @@ -229,11 +229,11 @@ void tst_qdeclarativeanimations::simpleRotation() QCOMPARE(rect.rotation(), qreal(135)); } -void tst_qdeclarativeanimations::simplePath() +void tst_qquickanimations::simplePath() { { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pathAnimation.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("pathAnimation.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -273,8 +273,8 @@ void tst_qdeclarativeanimations::simplePath() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pathAnimation2.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("pathAnimation2.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -308,10 +308,10 @@ void tst_qdeclarativeanimations::simplePath() } } -void tst_qdeclarativeanimations::simpleAnchor() +void tst_qquickanimations::simpleAnchor() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("reanchor.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("reanchor.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -384,10 +384,10 @@ void tst_qdeclarativeanimations::simpleAnchor() delete rect; } -void tst_qdeclarativeanimations::reparent() +void tst_qquickanimations::reparent() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("reparent.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("reparent.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -433,11 +433,11 @@ void tst_qdeclarativeanimations::reparent() delete rect; } -void tst_qdeclarativeanimations::pathInterpolator() +void tst_qquickanimations::pathInterpolator() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pathInterpolator.qml")); - QDeclarativePathInterpolator *interpolator = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("pathInterpolator.qml")); + QQuickPathInterpolator *interpolator = qobject_cast(c.create()); QVERIFY(interpolator); QCOMPARE(interpolator->progress(), qreal(0)); @@ -458,12 +458,12 @@ void tst_qdeclarativeanimations::pathInterpolator() QCOMPARE(interpolator->angle(), qreal(0)); } -void tst_qdeclarativeanimations::pathInterpolatorBackwardJump() +void tst_qquickanimations::pathInterpolatorBackwardJump() { { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pathInterpolatorBack.qml")); - QDeclarativePathInterpolator *interpolator = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("pathInterpolatorBack.qml")); + QQuickPathInterpolator *interpolator = qobject_cast(c.create()); QVERIFY(interpolator); QCOMPARE(interpolator->progress(), qreal(0)); @@ -492,9 +492,9 @@ void tst_qdeclarativeanimations::pathInterpolatorBackwardJump() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pathInterpolatorBack2.qml")); - QDeclarativePathInterpolator *interpolator = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("pathInterpolatorBack2.qml")); + QQuickPathInterpolator *interpolator = qobject_cast(c.create()); QVERIFY(interpolator); QCOMPARE(interpolator->progress(), qreal(0)); @@ -517,10 +517,10 @@ void tst_qdeclarativeanimations::pathInterpolatorBackwardJump() } } -void tst_qdeclarativeanimations::pathWithNoStart() +void tst_qquickanimations::pathWithNoStart() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pathAnimationNoStart.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("pathAnimationNoStart.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -551,10 +551,10 @@ void tst_qdeclarativeanimations::pathWithNoStart() QCOMPARE(redRect->y(), qreal(300)); } -void tst_qdeclarativeanimations::alwaysRunToEnd() +void tst_qquickanimations::alwaysRunToEnd() { QQuickRectangle rect; - QDeclarativePropertyAnimation animation; + QQuickPropertyAnimation animation; animation.setTargetObject(&rect); animation.setProperty("x"); animation.setTo(200); @@ -571,10 +571,10 @@ void tst_qdeclarativeanimations::alwaysRunToEnd() QTIMED_COMPARE(rect.x(), qreal(200)); } -void tst_qdeclarativeanimations::complete() +void tst_qquickanimations::complete() { QQuickRectangle rect; - QDeclarativePropertyAnimation animation; + QQuickPropertyAnimation animation; animation.setTargetObject(&rect); animation.setProperty("x"); animation.setFrom(1); @@ -592,10 +592,10 @@ void tst_qdeclarativeanimations::complete() QCOMPARE(rect.x(), qreal(200)); } -void tst_qdeclarativeanimations::resume() +void tst_qquickanimations::resume() { QQuickRectangle rect; - QDeclarativePropertyAnimation animation; + QQuickPropertyAnimation animation; animation.setTargetObject(&rect); animation.setProperty("x"); animation.setFrom(10); @@ -619,10 +619,10 @@ void tst_qdeclarativeanimations::resume() QVERIFY(rect.x() > x); } -void tst_qdeclarativeanimations::dotProperty() +void tst_qquickanimations::dotProperty() { QQuickRectangle rect; - QDeclarativeNumberAnimation animation; + QQuickNumberAnimation animation; animation.setTargetObject(&rect); animation.setProperty("border.width"); animation.setTo(10); @@ -638,7 +638,7 @@ void tst_qdeclarativeanimations::dotProperty() QCOMPARE(rect.border()->width(), 5.0); } -void tst_qdeclarativeanimations::badTypes() +void tst_qquickanimations::badTypes() { //don't crash { @@ -652,9 +652,9 @@ void tst_qdeclarativeanimations::badTypes() //make sure we get a compiler error { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("badtype2.qml")); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("badtype2.qml")); + QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); c.create(); QVERIFY(c.errors().count() == 1); @@ -663,9 +663,9 @@ void tst_qdeclarativeanimations::badTypes() //make sure we get a compiler error { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("badtype3.qml")); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("badtype3.qml")); + QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); c.create(); QVERIFY(c.errors().count() == 1); @@ -674,8 +674,8 @@ void tst_qdeclarativeanimations::badTypes() //don't crash { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("badtype4.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("badtype4.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -687,19 +687,19 @@ void tst_qdeclarativeanimations::badTypes() } } -void tst_qdeclarativeanimations::badProperties() +void tst_qquickanimations::badProperties() { //make sure we get a runtime error { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c1(&engine, testFileUrl("badproperty1.qml")); + QQmlComponent c1(&engine, testFileUrl("badproperty1.qml")); QByteArray message = testFileUrl("badproperty1.qml").toString().toUtf8() + ":18:9: QML ColorAnimation: Cannot animate non-existent property \"border.colr\""; QTest::ignoreMessage(QtWarningMsg, message); QQuickRectangle *rect = qobject_cast(c1.create()); QVERIFY(rect); - QDeclarativeComponent c2(&engine, testFileUrl("badproperty2.qml")); + QQmlComponent c2(&engine, testFileUrl("badproperty2.qml")); message = testFileUrl("badproperty2.qml").toString().toUtf8() + ":18:9: QML ColorAnimation: Cannot animate read-only property \"border\""; QTest::ignoreMessage(QtWarningMsg, message); rect = qobject_cast(c2.create()); @@ -712,12 +712,12 @@ void tst_qdeclarativeanimations::badProperties() //test animating mixed types with property animation in a transition //for example, int + real; color + real; etc -void tst_qdeclarativeanimations::mixedTypes() +void tst_qquickanimations::mixedTypes() { //assumes border.width stays a real -- not real robust { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("mixedtype1.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("mixedtype1.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -732,8 +732,8 @@ void tst_qdeclarativeanimations::mixedTypes() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("mixedtype2.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("mixedtype2.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -751,12 +751,12 @@ void tst_qdeclarativeanimations::mixedTypes() } } -void tst_qdeclarativeanimations::properties() +void tst_qquickanimations::properties() { const int waitDuration = 300; { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("properties.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("properties.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -767,8 +767,8 @@ void tst_qdeclarativeanimations::properties() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("properties2.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("properties2.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -779,8 +779,8 @@ void tst_qdeclarativeanimations::properties() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("properties3.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("properties3.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -791,8 +791,8 @@ void tst_qdeclarativeanimations::properties() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("properties4.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("properties4.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -804,8 +804,8 @@ void tst_qdeclarativeanimations::properties() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("properties5.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("properties5.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -817,12 +817,12 @@ void tst_qdeclarativeanimations::properties() } } -void tst_qdeclarativeanimations::propertiesTransition() +void tst_qquickanimations::propertiesTransition() { const int waitDuration = 300; { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("propertiesTransition.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("propertiesTransition.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -834,8 +834,8 @@ void tst_qdeclarativeanimations::propertiesTransition() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("propertiesTransition2.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("propertiesTransition2.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -849,8 +849,8 @@ void tst_qdeclarativeanimations::propertiesTransition() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("propertiesTransition3.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("propertiesTransition3.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -862,8 +862,8 @@ void tst_qdeclarativeanimations::propertiesTransition() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("propertiesTransition4.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("propertiesTransition4.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -876,8 +876,8 @@ void tst_qdeclarativeanimations::propertiesTransition() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("propertiesTransition5.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("propertiesTransition5.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -890,8 +890,8 @@ void tst_qdeclarativeanimations::propertiesTransition() } /*{ - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("propertiesTransition6.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("propertiesTransition6.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -904,8 +904,8 @@ void tst_qdeclarativeanimations::propertiesTransition() }*/ { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("propertiesTransition7.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("propertiesTransition7.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -918,10 +918,10 @@ void tst_qdeclarativeanimations::propertiesTransition() } -void tst_qdeclarativeanimations::pathTransition() +void tst_qquickanimations::pathTransition() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pathTransition.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("pathTransition.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -938,17 +938,17 @@ void tst_qdeclarativeanimations::pathTransition() QTRY_VERIFY(qFuzzyCompare(myRect->x(), qreal(500)) && qFuzzyCompare(myRect->y(), qreal(50))); } -void tst_qdeclarativeanimations::disabledTransition() +void tst_qquickanimations::disabledTransition() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("disabledTransition.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("disabledTransition.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); QQuickRectangle *myRect = rect->findChild("TheRect"); QVERIFY(myRect); - QDeclarativeTransition *trans = rect->findChild(); + QQuickTransition *trans = rect->findChild(); QVERIFY(trans); QCOMPARE(trans->enabled(), false); @@ -964,125 +964,125 @@ void tst_qdeclarativeanimations::disabledTransition() QTIMED_COMPARE(myRect->x(),qreal(100)); } -void tst_qdeclarativeanimations::invalidDuration() +void tst_qquickanimations::invalidDuration() { - QDeclarativePropertyAnimation *animation = new QDeclarativePropertyAnimation; + QQuickPropertyAnimation *animation = new QQuickPropertyAnimation; QTest::ignoreMessage(QtWarningMsg, ": QML PropertyAnimation: Cannot set a duration of < 0"); animation->setDuration(-1); QCOMPARE(animation->duration(), 250); - QDeclarativePauseAnimation *pauseAnimation = new QDeclarativePauseAnimation; + QQuickPauseAnimation *pauseAnimation = new QQuickPauseAnimation; QTest::ignoreMessage(QtWarningMsg, ": QML PauseAnimation: Cannot set a duration of < 0"); pauseAnimation->setDuration(-1); QCOMPARE(pauseAnimation->duration(), 250); } -void tst_qdeclarativeanimations::attached() +void tst_qquickanimations::attached() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("attached.qml")); + QQmlComponent c(&engine, testFileUrl("attached.qml")); QTest::ignoreMessage(QtDebugMsg, "off"); QTest::ignoreMessage(QtDebugMsg, "on"); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); } -void tst_qdeclarativeanimations::propertyValueSourceDefaultStart() +void tst_qquickanimations::propertyValueSourceDefaultStart() { { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("valuesource.qml")); + QQmlComponent c(&engine, testFileUrl("valuesource.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); - QDeclarativeAbstractAnimation *myAnim = rect->findChild("MyAnim"); + QQuickAbstractAnimation *myAnim = rect->findChild("MyAnim"); QVERIFY(myAnim); QVERIFY(myAnim->isRunning()); } { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("valuesource2.qml")); + QQmlComponent c(&engine, testFileUrl("valuesource2.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); - QDeclarativeAbstractAnimation *myAnim = rect->findChild("MyAnim"); + QQuickAbstractAnimation *myAnim = rect->findChild("MyAnim"); QVERIFY(myAnim); QVERIFY(myAnim->isRunning() == false); } { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("dontAutoStart.qml")); + QQmlComponent c(&engine, testFileUrl("dontAutoStart.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); - QDeclarativeAbstractAnimation *myAnim = rect->findChild("MyAnim"); + QQuickAbstractAnimation *myAnim = rect->findChild("MyAnim"); QVERIFY(myAnim && !myAnim->qtAnimation()); //QVERIFY(myAnim->qtAnimation()->state() == QAbstractAnimationJob::Stopped); } } -void tst_qdeclarativeanimations::dontStart() +void tst_qquickanimations::dontStart() { { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("dontStart.qml")); + QQmlComponent c(&engine, testFileUrl("dontStart.qml")); QString warning = c.url().toString() + ":14:13: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes."; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); - QDeclarativeAbstractAnimation *myAnim = rect->findChild("MyAnim"); + QQuickAbstractAnimation *myAnim = rect->findChild("MyAnim"); QVERIFY(myAnim && !myAnim->qtAnimation()); //QVERIFY(myAnim->qtAnimation()->state() == QAbstractAnimationJob::Stopped); } { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("dontStart2.qml")); + QQmlComponent c(&engine, testFileUrl("dontStart2.qml")); QString warning = c.url().toString() + ":15:17: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes."; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); - QDeclarativeAbstractAnimation *myAnim = rect->findChild("MyAnim"); + QQuickAbstractAnimation *myAnim = rect->findChild("MyAnim"); QVERIFY(myAnim && !myAnim->qtAnimation()); //QVERIFY(myAnim->qtAnimation()->state() == QAbstractAnimationJob::Stopped); } } -void tst_qdeclarativeanimations::easingProperties() +void tst_qquickanimations::easingProperties() { { - QDeclarativeEngine engine; + QQmlEngine engine; QString componentStr = "import QtQuick 2.0\nNumberAnimation { easing.type: \"InOutQuad\" }"; - QDeclarativeComponent animationComponent(&engine); + QQmlComponent animationComponent(&engine); animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativePropertyAnimation *animObject = qobject_cast(animationComponent.create()); + QQuickPropertyAnimation *animObject = qobject_cast(animationComponent.create()); QVERIFY(animObject != 0); QCOMPARE(animObject->easing().type(), QEasingCurve::InOutQuad); } { - QDeclarativeEngine engine; + QQmlEngine engine; QString componentStr = "import QtQuick 2.0\nPropertyAnimation { easing.type: \"OutBounce\"; easing.amplitude: 5.0 }"; - QDeclarativeComponent animationComponent(&engine); + QQmlComponent animationComponent(&engine); animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativePropertyAnimation *animObject = qobject_cast(animationComponent.create()); + QQuickPropertyAnimation *animObject = qobject_cast(animationComponent.create()); QVERIFY(animObject != 0); QCOMPARE(animObject->easing().type(), QEasingCurve::OutBounce); @@ -1090,11 +1090,11 @@ void tst_qdeclarativeanimations::easingProperties() } { - QDeclarativeEngine engine; + QQmlEngine engine; QString componentStr = "import QtQuick 2.0\nPropertyAnimation { easing.type: \"OutElastic\"; easing.amplitude: 5.0; easing.period: 3.0}"; - QDeclarativeComponent animationComponent(&engine); + QQmlComponent animationComponent(&engine); animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativePropertyAnimation *animObject = qobject_cast(animationComponent.create()); + QQuickPropertyAnimation *animObject = qobject_cast(animationComponent.create()); QVERIFY(animObject != 0); QCOMPARE(animObject->easing().type(), QEasingCurve::OutElastic); @@ -1103,11 +1103,11 @@ void tst_qdeclarativeanimations::easingProperties() } { - QDeclarativeEngine engine; + QQmlEngine engine; QString componentStr = "import QtQuick 2.0\nPropertyAnimation { easing.type: \"InOutBack\"; easing.overshoot: 2 }"; - QDeclarativeComponent animationComponent(&engine); + QQmlComponent animationComponent(&engine); animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativePropertyAnimation *animObject = qobject_cast(animationComponent.create()); + QQuickPropertyAnimation *animObject = qobject_cast(animationComponent.create()); QVERIFY(animObject != 0); QCOMPARE(animObject->easing().type(), QEasingCurve::InOutBack); @@ -1115,11 +1115,11 @@ void tst_qdeclarativeanimations::easingProperties() } { - QDeclarativeEngine engine; + QQmlEngine engine; QString componentStr = "import QtQuick 2.0\nPropertyAnimation { easing.type: \"Bezier\"; easing.bezierCurve: [0.5, 0.2, 0.13, 0.65, 1.0, 1.0] }"; - QDeclarativeComponent animationComponent(&engine); + QQmlComponent animationComponent(&engine); animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativePropertyAnimation *animObject = qobject_cast(animationComponent.create()); + QQuickPropertyAnimation *animObject = qobject_cast(animationComponent.create()); QVERIFY(animObject != 0); QCOMPARE(animObject->easing().type(), QEasingCurve::BezierSpline); @@ -1131,10 +1131,10 @@ void tst_qdeclarativeanimations::easingProperties() } } -void tst_qdeclarativeanimations::rotation() +void tst_qquickanimations::rotation() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("rotation.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("rotation.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -1161,11 +1161,11 @@ void tst_qdeclarativeanimations::rotation() QTIMED_COMPARE(rr->rotation() + rr2->rotation() + rr3->rotation() + rr4->rotation(), qreal(370*4)); } -void tst_qdeclarativeanimations::runningTrueBug() +void tst_qquickanimations::runningTrueBug() { //ensure we start correctly when "running: true" is explicitly set - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("runningTrueBug.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("runningTrueBug.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -1176,13 +1176,13 @@ void tst_qdeclarativeanimations::runningTrueBug() } //QTBUG-12805 -void tst_qdeclarativeanimations::nonTransitionBug() +void tst_qquickanimations::nonTransitionBug() { //tests that the animation values from the previous transition are properly cleared //in the case where an animation in the transition doesn't match anything (but previously did) - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("nonTransitionBug.qml")); + QQmlComponent c(&engine, testFileUrl("nonTransitionBug.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1204,34 +1204,34 @@ void tst_qdeclarativeanimations::nonTransitionBug() } //QTBUG-14042 -void tst_qdeclarativeanimations::registrationBug() +void tst_qquickanimations::registrationBug() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("registrationBug.qml")); + QQmlComponent c(&engine, testFileUrl("registrationBug.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); QTRY_COMPARE(rect->property("value"), QVariant(int(100))); } -void tst_qdeclarativeanimations::doubleRegistrationBug() +void tst_qquickanimations::doubleRegistrationBug() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("doubleRegistrationBug.qml")); + QQmlComponent c(&engine, testFileUrl("doubleRegistrationBug.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); - QDeclarativeAbstractAnimation *anim = rect->findChild("animation"); + QQuickAbstractAnimation *anim = rect->findChild("animation"); QVERIFY(anim != 0); QTRY_COMPARE(anim->qtAnimation()->state(), QAbstractAnimationJob::Stopped); } //QTBUG-16736 -void tst_qdeclarativeanimations::alwaysRunToEndRestartBug() +void tst_qquickanimations::alwaysRunToEndRestartBug() { QQuickRectangle rect; - QDeclarativePropertyAnimation animation; + QQuickPropertyAnimation animation; animation.setTargetObject(&rect); animation.setProperty("x"); animation.setTo(200); @@ -1248,15 +1248,15 @@ void tst_qdeclarativeanimations::alwaysRunToEndRestartBug() QVERIFY(rect.x() != qreal(200)); QTest::qWait(800); QTIMED_COMPARE(rect.x(), qreal(200)); - QCOMPARE(static_cast(&animation)->qtAnimation()->state(), QAbstractAnimationJob::Stopped); + QCOMPARE(static_cast(&animation)->qtAnimation()->state(), QAbstractAnimationJob::Stopped); } //QTBUG-20227 -void tst_qdeclarativeanimations::transitionAssignmentBug() +void tst_qquickanimations::transitionAssignmentBug() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("transitionAssignmentBug.qml")); + QQmlComponent c(&engine, testFileUrl("transitionAssignmentBug.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); @@ -1264,26 +1264,26 @@ void tst_qdeclarativeanimations::transitionAssignmentBug() } //QTBUG-19080 -void tst_qdeclarativeanimations::pauseBindingBug() +void tst_qquickanimations::pauseBindingBug() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pauseBindingBug.qml")); + QQmlComponent c(&engine, testFileUrl("pauseBindingBug.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); - QDeclarativeAbstractAnimation *anim = rect->findChild("animation"); + QQuickAbstractAnimation *anim = rect->findChild("animation"); QVERIFY(anim->qtAnimation()->state() == QAbstractAnimationJob::Paused); delete rect; } //QTBUG-13598 -void tst_qdeclarativeanimations::pauseBug() +void tst_qquickanimations::pauseBug() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pauseBug.qml")); - QDeclarativeAbstractAnimation *anim = qobject_cast(c.create()); + QQmlComponent c(&engine, testFileUrl("pauseBug.qml")); + QQuickAbstractAnimation *anim = qobject_cast(c.create()); QVERIFY(anim != 0); QCOMPARE(anim->qtAnimation()->state(), QAbstractAnimationJob::Paused); QCOMPARE(anim->isPaused(), true); @@ -1293,14 +1293,14 @@ void tst_qdeclarativeanimations::pauseBug() } //QTBUG-23092 -void tst_qdeclarativeanimations::loopingBug() +void tst_qquickanimations::loopingBug() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("looping.qml")); + QQmlComponent c(&engine, testFileUrl("looping.qml")); QObject *obj = c.create(); - QDeclarativeAbstractAnimation *anim = obj->findChild(); + QQuickAbstractAnimation *anim = obj->findChild(); QVERIFY(anim != 0); QCOMPARE(anim->qtAnimation()->totalDuration(), 300); QCOMPARE(anim->isRunning(), true); @@ -1314,6 +1314,6 @@ void tst_qdeclarativeanimations::loopingBug() delete obj; } -QTEST_MAIN(tst_qdeclarativeanimations) +QTEST_MAIN(tst_qquickanimations) -#include "tst_qdeclarativeanimations.moc" +#include "tst_qquickanimations.moc" diff --git a/tests/auto/quick/qquickapplication/qquickapplication.pro b/tests/auto/quick/qquickapplication/qquickapplication.pro new file mode 100644 index 0000000000..96cfe82a82 --- /dev/null +++ b/tests/auto/quick/qquickapplication/qquickapplication.pro @@ -0,0 +1,7 @@ +CONFIG += testcase +TARGET = tst_qquickapplication +macx:CONFIG -= app_bundle + +SOURCES += tst_qquickapplication.cpp +QT += core-private gui-private qml-private quick-private testlib + diff --git a/tests/auto/qtquick2/qdeclarativeapplication/tst_qdeclarativeapplication.cpp b/tests/auto/quick/qquickapplication/tst_qquickapplication.cpp similarity index 86% rename from tests/auto/qtquick2/qdeclarativeapplication/tst_qdeclarativeapplication.cpp rename to tests/auto/quick/qquickapplication/tst_qquickapplication.cpp index 6b921a7356..61675d980d 100644 --- a/tests/auto/qtquick2/qdeclarativeapplication/tst_qdeclarativeapplication.cpp +++ b/tests/auto/quick/qquickapplication/tst_qquickapplication.cpp @@ -40,17 +40,17 @@ ****************************************************************************/ #include -#include -#include +#include +#include #include #include #include -class tst_qdeclarativeapplication : public QObject +class tst_qquickapplication : public QObject { Q_OBJECT public: - tst_qdeclarativeapplication(); + tst_qquickapplication(); private slots: void active(); @@ -59,16 +59,16 @@ private slots: void inputMethod(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -tst_qdeclarativeapplication::tst_qdeclarativeapplication() +tst_qquickapplication::tst_qquickapplication() { } -void tst_qdeclarativeapplication::active() +void tst_qquickapplication::active() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Item { property bool active: Qt.application.active }", QUrl::fromLocalFile("")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -103,10 +103,10 @@ void tst_qdeclarativeapplication::active() } -void tst_qdeclarativeapplication::layoutDirection() +void tst_qquickapplication::layoutDirection() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Item { property bool layoutDirection: Qt.application.layoutDirection }", QUrl::fromLocalFile("")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -126,9 +126,9 @@ void tst_qdeclarativeapplication::layoutDirection() QCOMPARE(Qt::LayoutDirection(item->property("layoutDirection").toInt()), Qt::LeftToRight); } -void tst_qdeclarativeapplication::inputPanel() +void tst_qquickapplication::inputPanel() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Item { property variant inputPanel: Qt.application.inputPanel }", QUrl::fromLocalFile("")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -139,10 +139,10 @@ void tst_qdeclarativeapplication::inputPanel() QCOMPARE(qvariant_cast(item->property("inputPanel")), qApp->inputMethod()); } -void tst_qdeclarativeapplication::inputMethod() +void tst_qquickapplication::inputMethod() { - // technically not in QDeclarativeApplication, but testing anyway here - QDeclarativeComponent component(&engine); + // technically not in QQuickApplication, but testing anyway here + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Item { property variant inputMethod: Qt.inputMethod }", QUrl::fromLocalFile("")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -154,6 +154,6 @@ void tst_qdeclarativeapplication::inputMethod() } -QTEST_MAIN(tst_qdeclarativeapplication) +QTEST_MAIN(tst_qquickapplication) -#include "tst_qdeclarativeapplication.moc" +#include "tst_qquickapplication.moc" diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/binding.qml b/tests/auto/quick/qquickbehaviors/data/binding.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/binding.qml rename to tests/auto/quick/qquickbehaviors/data/binding.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/color.qml b/tests/auto/quick/qquickbehaviors/data/color.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/color.qml rename to tests/auto/quick/qquickbehaviors/data/color.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/cpptrigger.qml b/tests/auto/quick/qquickbehaviors/data/cpptrigger.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/cpptrigger.qml rename to tests/auto/quick/qquickbehaviors/data/cpptrigger.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/delayedRegistration.qml b/tests/auto/quick/qquickbehaviors/data/delayedRegistration.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/delayedRegistration.qml rename to tests/auto/quick/qquickbehaviors/data/delayedRegistration.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/disabled.qml b/tests/auto/quick/qquickbehaviors/data/disabled.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/disabled.qml rename to tests/auto/quick/qquickbehaviors/data/disabled.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/dontStart.qml b/tests/auto/quick/qquickbehaviors/data/dontStart.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/dontStart.qml rename to tests/auto/quick/qquickbehaviors/data/dontStart.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/empty.qml b/tests/auto/quick/qquickbehaviors/data/empty.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/empty.qml rename to tests/auto/quick/qquickbehaviors/data/empty.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/explicit.qml b/tests/auto/quick/qquickbehaviors/data/explicit.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/explicit.qml rename to tests/auto/quick/qquickbehaviors/data/explicit.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/groupProperty.qml b/tests/auto/quick/qquickbehaviors/data/groupProperty.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/groupProperty.qml rename to tests/auto/quick/qquickbehaviors/data/groupProperty.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/groupProperty2.qml b/tests/auto/quick/qquickbehaviors/data/groupProperty2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/groupProperty2.qml rename to tests/auto/quick/qquickbehaviors/data/groupProperty2.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/groupedPropertyCrash.qml b/tests/auto/quick/qquickbehaviors/data/groupedPropertyCrash.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/groupedPropertyCrash.qml rename to tests/auto/quick/qquickbehaviors/data/groupedPropertyCrash.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/loop.qml b/tests/auto/quick/qquickbehaviors/data/loop.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/loop.qml rename to tests/auto/quick/qquickbehaviors/data/loop.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/nonSelecting2.qml b/tests/auto/quick/qquickbehaviors/data/nonSelecting2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/nonSelecting2.qml rename to tests/auto/quick/qquickbehaviors/data/nonSelecting2.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/parent.qml b/tests/auto/quick/qquickbehaviors/data/parent.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/parent.qml rename to tests/auto/quick/qquickbehaviors/data/parent.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/qtbug12295.qml b/tests/auto/quick/qquickbehaviors/data/qtbug12295.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/qtbug12295.qml rename to tests/auto/quick/qquickbehaviors/data/qtbug12295.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/reassignedAnimation.qml b/tests/auto/quick/qquickbehaviors/data/reassignedAnimation.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/reassignedAnimation.qml rename to tests/auto/quick/qquickbehaviors/data/reassignedAnimation.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/runningTrue.qml b/tests/auto/quick/qquickbehaviors/data/runningTrue.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/runningTrue.qml rename to tests/auto/quick/qquickbehaviors/data/runningTrue.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/scripttrigger.qml b/tests/auto/quick/qquickbehaviors/data/scripttrigger.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/scripttrigger.qml rename to tests/auto/quick/qquickbehaviors/data/scripttrigger.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/simple.qml b/tests/auto/quick/qquickbehaviors/data/simple.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/simple.qml rename to tests/auto/quick/qquickbehaviors/data/simple.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/startOnCompleted.qml b/tests/auto/quick/qquickbehaviors/data/startOnCompleted.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/startOnCompleted.qml rename to tests/auto/quick/qquickbehaviors/data/startOnCompleted.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/startup.qml b/tests/auto/quick/qquickbehaviors/data/startup.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/startup.qml rename to tests/auto/quick/qquickbehaviors/data/startup.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/startup2.qml b/tests/auto/quick/qquickbehaviors/data/startup2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/startup2.qml rename to tests/auto/quick/qquickbehaviors/data/startup2.qml diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/data/valueType.qml b/tests/auto/quick/qquickbehaviors/data/valueType.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativebehaviors/data/valueType.qml rename to tests/auto/quick/qquickbehaviors/data/valueType.qml diff --git a/tests/auto/quick/qquickbehaviors/qquickbehaviors.pro b/tests/auto/quick/qquickbehaviors/qquickbehaviors.pro new file mode 100644 index 0000000000..fc103ed4c2 --- /dev/null +++ b/tests/auto/quick/qquickbehaviors/qquickbehaviors.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qquickbehaviors +SOURCES += tst_qquickbehaviors.cpp + +include (../../shared/util.pri) + +macx:CONFIG -= app_bundle + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/qtquick2/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/quick/qquickbehaviors/tst_qquickbehaviors.cpp similarity index 73% rename from tests/auto/qtquick2/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp rename to tests/auto/quick/qquickbehaviors/tst_qquickbehaviors.cpp index c1e60f1560..bd17bf4143 100644 --- a/tests/auto/qtquick2/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp +++ b/tests/auto/quick/qquickbehaviors/tst_qquickbehaviors.cpp @@ -40,21 +40,21 @@ ****************************************************************************/ #include #include -#include -#include +#include +#include #include #include #include -#include -#include +#include +#include #include #include "../../shared/util.h" -class tst_qdeclarativebehaviors : public QDeclarativeDataTest +class tst_qquickbehaviors : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativebehaviors() {} + tst_qquickbehaviors() {} private slots: void init() { qApp->processEvents(); } //work around animation timer bug (QTBUG-22865) @@ -82,13 +82,13 @@ private slots: void startOnCompleted(); }; -void tst_qdeclarativebehaviors::simpleBehavior() +void tst_qquickbehaviors::simpleBehavior() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("simple.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("simple.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QTRY_VERIFY(rect); - QTRY_VERIFY(qobject_cast(rect->findChild("MyBehavior"))->animation()); + QTRY_VERIFY(qobject_cast(rect->findChild("MyBehavior"))->animation()); QQuickItemPrivate::get(rect)->setState("moved"); QTRY_VERIFY(qobject_cast(rect->findChild("MyRect"))->x() > 0); @@ -98,10 +98,10 @@ void tst_qdeclarativebehaviors::simpleBehavior() delete rect; } -void tst_qdeclarativebehaviors::scriptTriggered() +void tst_qquickbehaviors::scriptTriggered() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("scripttrigger.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("scripttrigger.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QTRY_VERIFY(rect); @@ -113,10 +113,10 @@ void tst_qdeclarativebehaviors::scriptTriggered() delete rect; } -void tst_qdeclarativebehaviors::cppTriggered() +void tst_qquickbehaviors::cppTriggered() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("cpptrigger.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("cpptrigger.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QTRY_VERIFY(rect); @@ -130,10 +130,10 @@ void tst_qdeclarativebehaviors::cppTriggered() delete rect; } -void tst_qdeclarativebehaviors::loop() +void tst_qquickbehaviors::loop() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("loop.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("loop.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QTRY_VERIFY(rect); @@ -143,10 +143,10 @@ void tst_qdeclarativebehaviors::loop() delete rect; } -void tst_qdeclarativebehaviors::colorBehavior() +void tst_qquickbehaviors::colorBehavior() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("color.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("color.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QTRY_VERIFY(rect); @@ -158,10 +158,10 @@ void tst_qdeclarativebehaviors::colorBehavior() delete rect; } -void tst_qdeclarativebehaviors::parentBehavior() +void tst_qquickbehaviors::parentBehavior() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("parent.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("parent.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QTRY_VERIFY(rect); @@ -172,10 +172,10 @@ void tst_qdeclarativebehaviors::parentBehavior() delete rect; } -void tst_qdeclarativebehaviors::replaceBinding() +void tst_qquickbehaviors::replaceBinding() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("binding.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("binding.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QTRY_VERIFY(rect); @@ -203,12 +203,12 @@ void tst_qdeclarativebehaviors::replaceBinding() delete rect; } -void tst_qdeclarativebehaviors::group() +void tst_qquickbehaviors::group() { /* XXX TODO Create a test element for this case. { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("groupProperty.qml"))); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("groupProperty.qml"))); QQuickRectangle *rect = qobject_cast(c.create()); qDebug() << c.errorString(); QTRY_VERIFY(rect); @@ -224,8 +224,8 @@ void tst_qdeclarativebehaviors::group() */ { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("groupProperty2.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("groupProperty2.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QTRY_VERIFY(rect); @@ -238,10 +238,10 @@ void tst_qdeclarativebehaviors::group() } } -void tst_qdeclarativebehaviors::valueType() +void tst_qquickbehaviors::valueType() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("valueType.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("valueType.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -251,10 +251,10 @@ void tst_qdeclarativebehaviors::valueType() delete rect; } -void tst_qdeclarativebehaviors::emptyBehavior() +void tst_qquickbehaviors::emptyBehavior() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("empty.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("empty.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -265,10 +265,10 @@ void tst_qdeclarativebehaviors::emptyBehavior() delete rect; } -void tst_qdeclarativebehaviors::explicitSelection() +void tst_qquickbehaviors::explicitSelection() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("explicit.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("explicit.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -280,10 +280,10 @@ void tst_qdeclarativebehaviors::explicitSelection() delete rect; } -void tst_qdeclarativebehaviors::nonSelectingBehavior() +void tst_qquickbehaviors::nonSelectingBehavior() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("nonSelecting2.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("nonSelecting2.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -294,27 +294,27 @@ void tst_qdeclarativebehaviors::nonSelectingBehavior() delete rect; } -void tst_qdeclarativebehaviors::reassignedAnimation() +void tst_qquickbehaviors::reassignedAnimation() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("reassignedAnimation.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("reassignedAnimation.qml")); QString warning = testFileUrl("reassignedAnimation.qml").toString() + ":9:9: QML Behavior: Cannot change the animation assigned to a Behavior."; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); - QCOMPARE(qobject_cast( - rect->findChild("MyBehavior")->animation())->duration(), 200); + QCOMPARE(qobject_cast( + rect->findChild("MyBehavior")->animation())->duration(), 200); delete rect; } -void tst_qdeclarativebehaviors::disabled() +void tst_qquickbehaviors::disabled() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("disabled.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("disabled.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); - QCOMPARE(rect->findChild("MyBehavior")->enabled(), false); + QCOMPARE(rect->findChild("MyBehavior")->enabled(), false); QQuickItemPrivate::get(rect)->setState("moved"); qreal x = qobject_cast(rect->findChild("MyRect"))->x(); @@ -323,28 +323,28 @@ void tst_qdeclarativebehaviors::disabled() delete rect; } -void tst_qdeclarativebehaviors::dontStart() +void tst_qquickbehaviors::dontStart() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("dontStart.qml")); + QQmlComponent c(&engine, testFileUrl("dontStart.qml")); QString warning = c.url().toString() + ":13:13: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes."; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); - QDeclarativeAbstractAnimation *myAnim = rect->findChild("MyAnim"); + QQuickAbstractAnimation *myAnim = rect->findChild("MyAnim"); QVERIFY(myAnim && !myAnim->qtAnimation()); delete rect; } -void tst_qdeclarativebehaviors::startup() +void tst_qquickbehaviors::startup() { { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("startup.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("startup.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -357,8 +357,8 @@ void tst_qdeclarativebehaviors::startup() } { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("startup2.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("startup2.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -375,10 +375,10 @@ void tst_qdeclarativebehaviors::startup() } //QTBUG-10799 -void tst_qdeclarativebehaviors::groupedPropertyCrash() +void tst_qquickbehaviors::groupedPropertyCrash() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("groupedPropertyCrash.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("groupedPropertyCrash.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); //don't crash @@ -386,14 +386,14 @@ void tst_qdeclarativebehaviors::groupedPropertyCrash() } //QTBUG-5491 -void tst_qdeclarativebehaviors::runningTrue() +void tst_qquickbehaviors::runningTrue() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("runningTrue.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("runningTrue.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); - QDeclarativeAbstractAnimation *animation = rect->findChild("rotAnim"); + QQuickAbstractAnimation *animation = rect->findChild("rotAnim"); QVERIFY(animation); QSignalSpy runningSpy(animation, SIGNAL(runningChanged(bool))); @@ -404,10 +404,10 @@ void tst_qdeclarativebehaviors::runningTrue() } //QTBUG-12295 -void tst_qdeclarativebehaviors::sameValue() +void tst_qquickbehaviors::sameValue() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("qtbug12295.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("qtbug12295.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -433,11 +433,11 @@ void tst_qdeclarativebehaviors::sameValue() } //QTBUG-18362 -void tst_qdeclarativebehaviors::delayedRegistration() +void tst_qquickbehaviors::delayedRegistration() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("delayedRegistration.qml")); + QQmlComponent c(&engine, testFileUrl("delayedRegistration.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); @@ -450,11 +450,11 @@ void tst_qdeclarativebehaviors::delayedRegistration() } //QTBUG-22555 -void tst_qdeclarativebehaviors::startOnCompleted() +void tst_qquickbehaviors::startOnCompleted() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("startOnCompleted.qml")); + QQmlComponent c(&engine, testFileUrl("startOnCompleted.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); @@ -468,6 +468,6 @@ void tst_qdeclarativebehaviors::startOnCompleted() delete rect; } -QTEST_MAIN(tst_qdeclarativebehaviors) +QTEST_MAIN(tst_qquickbehaviors) -#include "tst_qdeclarativebehaviors.moc" +#include "tst_qquickbehaviors.moc" diff --git a/tests/auto/qtquick2/qquickborderimage/data/colors-mirror.png b/tests/auto/quick/qquickborderimage/data/colors-mirror.png similarity index 100% rename from tests/auto/qtquick2/qquickborderimage/data/colors-mirror.png rename to tests/auto/quick/qquickborderimage/data/colors-mirror.png diff --git a/tests/auto/qtquick2/qquickborderimage/data/colors-round-quotes.sci b/tests/auto/quick/qquickborderimage/data/colors-round-quotes.sci similarity index 100% rename from tests/auto/qtquick2/qquickborderimage/data/colors-round-quotes.sci rename to tests/auto/quick/qquickborderimage/data/colors-round-quotes.sci diff --git a/tests/auto/qtquick2/qquickborderimage/data/colors-round-remote.sci b/tests/auto/quick/qquickborderimage/data/colors-round-remote.sci similarity index 100% rename from tests/auto/qtquick2/qquickborderimage/data/colors-round-remote.sci rename to tests/auto/quick/qquickborderimage/data/colors-round-remote.sci diff --git a/tests/auto/qtquick2/qquickborderimage/data/colors-round.sci b/tests/auto/quick/qquickborderimage/data/colors-round.sci similarity index 100% rename from tests/auto/qtquick2/qquickborderimage/data/colors-round.sci rename to tests/auto/quick/qquickborderimage/data/colors-round.sci diff --git a/tests/auto/qtquick2/qquickborderimage/data/colors.png b/tests/auto/quick/qquickborderimage/data/colors.png similarity index 100% rename from tests/auto/qtquick2/qquickborderimage/data/colors.png rename to tests/auto/quick/qquickborderimage/data/colors.png diff --git a/tests/auto/qtquick2/qquickborderimage/data/heart200.png b/tests/auto/quick/qquickborderimage/data/heart200.png similarity index 100% rename from tests/auto/qtquick2/qquickborderimage/data/heart200.png rename to tests/auto/quick/qquickborderimage/data/heart200.png diff --git a/tests/auto/qtquick2/qquickborderimage/data/invalid.sci b/tests/auto/quick/qquickborderimage/data/invalid.sci similarity index 100% rename from tests/auto/qtquick2/qquickborderimage/data/invalid.sci rename to tests/auto/quick/qquickborderimage/data/invalid.sci diff --git a/tests/auto/qtquick2/qquickborderimage/data/mirror.qml b/tests/auto/quick/qquickborderimage/data/mirror.qml similarity index 100% rename from tests/auto/qtquick2/qquickborderimage/data/mirror.qml rename to tests/auto/quick/qquickborderimage/data/mirror.qml diff --git a/tests/auto/qtquick2/qquickborderimage/qquickborderimage.pro b/tests/auto/quick/qquickborderimage/qquickborderimage.pro similarity index 79% rename from tests/auto/qtquick2/qquickborderimage/qquickborderimage.pro rename to tests/auto/quick/qquickborderimage/qquickborderimage.pro index 2073b4492f..f50149aead 100644 --- a/tests/auto/qtquick2/qquickborderimage/qquickborderimage.pro +++ b/tests/auto/quick/qquickborderimage/qquickborderimage.pro @@ -14,4 +14,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private network widgets testlib +QT += core-private gui-private qml-private quick-private network widgets testlib diff --git a/tests/auto/qtquick2/qquickborderimage/tst_qquickborderimage.cpp b/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp similarity index 94% rename from tests/auto/qtquick2/qquickborderimage/tst_qquickborderimage.cpp rename to tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp index dad44d6ee7..13b12f6020 100644 --- a/tests/auto/qtquick2/qquickborderimage/tst_qquickborderimage.cpp +++ b/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp @@ -46,14 +46,14 @@ #include #include -#include -#include +#include +#include #include #include #include #include #include -#include +#include #include "../../shared/testhttpserver.h" #include "../../shared/util.h" @@ -61,7 +61,7 @@ #define SERVER_PORT 14446 #define SERVER_ADDR "http://127.0.0.1:14446" -class tst_qquickborderimage : public QDeclarativeDataTest +class tst_qquickborderimage : public QQmlDataTest { Q_OBJECT @@ -84,7 +84,7 @@ private slots: void pendingRemoteRequest_data(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; tst_qquickborderimage::tst_qquickborderimage() @@ -94,7 +94,7 @@ tst_qquickborderimage::tst_qquickborderimage() void tst_qquickborderimage::noSource() { QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"\" }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickBorderImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -138,7 +138,7 @@ void tst_qquickborderimage::imageSource() QTest::ignoreMessage(QtWarningMsg, error.toUtf8()); QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + source + "\" }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickBorderImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -167,9 +167,9 @@ void tst_qquickborderimage::imageSource() void tst_qquickborderimage::clearSource() { QString componentStr = "import QtQuick 2.0\nBorderImage { source: srcImage }"; - QDeclarativeContext *ctxt = engine.rootContext(); + QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty("srcImage", testFileUrl("colors.png")); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickBorderImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -187,7 +187,7 @@ void tst_qquickborderimage::clearSource() void tst_qquickborderimage::resized() { QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + testFileUrl("colors.png").toString() + "\"; width: 300; height: 300 }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickBorderImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -204,7 +204,7 @@ void tst_qquickborderimage::resized() void tst_qquickborderimage::smooth() { QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + testFile("colors.png") + "\"; smooth: true; width: 300; height: 300 }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickBorderImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -242,7 +242,7 @@ void tst_qquickborderimage::tileModes() { { QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + testFile("colors.png") + "\"; width: 100; height: 300; horizontalTileMode: BorderImage.Repeat; verticalTileMode: BorderImage.Repeat }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickBorderImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -255,7 +255,7 @@ void tst_qquickborderimage::tileModes() } { QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + testFile("colors.png") + "\"; width: 300; height: 150; horizontalTileMode: BorderImage.Round; verticalTileMode: BorderImage.Round }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickBorderImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -282,7 +282,7 @@ void tst_qquickborderimage::sciSource() } QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + source + "\"; width: 300; height: 300 }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickBorderImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -330,7 +330,7 @@ void tst_qquickborderimage::invalidSciFile() QTest::ignoreMessage(QtWarningMsg, "QQuickGridScaledImage: Invalid tile rule specified. Using Stretch."); // for "Repea" QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + testFileUrl("invalid.sci").toString() +"\"; width: 300; height: 300 }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickBorderImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -348,7 +348,7 @@ void tst_qquickborderimage::pendingRemoteRequest() QFETCH(QString, source); QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + source + "\" }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickBorderImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); diff --git a/tests/auto/qtquick2/qquickcanvas/data/AnimationsWhileHidden.qml b/tests/auto/quick/qquickcanvas/data/AnimationsWhileHidden.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvas/data/AnimationsWhileHidden.qml rename to tests/auto/quick/qquickcanvas/data/AnimationsWhileHidden.qml diff --git a/tests/auto/qtquick2/qquickcanvas/data/Headless.qml b/tests/auto/quick/qquickcanvas/data/Headless.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvas/data/Headless.qml rename to tests/auto/quick/qquickcanvas/data/Headless.qml diff --git a/tests/auto/qtquick2/qquickcanvas/data/colors.png b/tests/auto/quick/qquickcanvas/data/colors.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvas/data/colors.png rename to tests/auto/quick/qquickcanvas/data/colors.png diff --git a/tests/auto/qtquick2/qquickcanvas/data/focus.qml b/tests/auto/quick/qquickcanvas/data/focus.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvas/data/focus.qml rename to tests/auto/quick/qquickcanvas/data/focus.qml diff --git a/tests/auto/qtquick2/qquickcanvas/data/window.qml b/tests/auto/quick/qquickcanvas/data/window.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvas/data/window.qml rename to tests/auto/quick/qquickcanvas/data/window.qml diff --git a/tests/auto/qtquick2/qquickcanvas/qquickcanvas.pro b/tests/auto/quick/qquickcanvas/qquickcanvas.pro similarity index 80% rename from tests/auto/qtquick2/qquickcanvas/qquickcanvas.pro rename to tests/auto/quick/qquickcanvas/qquickcanvas.pro index b21b492e0b..7f27a05243 100644 --- a/tests/auto/qtquick2/qquickcanvas/qquickcanvas.pro +++ b/tests/auto/quick/qquickcanvas/qquickcanvas.pro @@ -7,7 +7,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private testlib +QT += core-private gui-private qml-private quick-private testlib testData.files = data testData.path = . diff --git a/tests/auto/qtquick2/qquickcanvas/tst_qquickcanvas.cpp b/tests/auto/quick/qquickcanvas/tst_qquickcanvas.cpp similarity index 98% rename from tests/auto/qtquick2/qquickcanvas/tst_qquickcanvas.cpp rename to tests/auto/quick/qquickcanvas/tst_qquickcanvas.cpp index 8f0c4e6fce..3a27d179c5 100644 --- a/tests/auto/qtquick2/qquickcanvas/tst_qquickcanvas.cpp +++ b/tests/auto/quick/qquickcanvas/tst_qquickcanvas.cpp @@ -44,8 +44,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include "../../shared/util.h" @@ -176,7 +176,7 @@ Q_OBJECT } }; -class tst_qquickcanvas : public QDeclarativeDataTest +class tst_qquickcanvas : public QQmlDataTest { Q_OBJECT public: @@ -184,7 +184,7 @@ class tst_qquickcanvas : public QDeclarativeDataTest private slots: void initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); touchDevice = new QTouchDevice(); touchDevice->setType(QTouchDevice::TouchScreen); QWindowSystemInterface::registerTouchDevice(touchDevice); @@ -564,8 +564,8 @@ void tst_qquickcanvas::mouseFiltering() void tst_qquickcanvas::qmlCreation() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.loadUrl(testFileUrl("window.qml")); QObject* created = component.create(); QVERIFY(created); @@ -640,8 +640,8 @@ void tst_qquickcanvas::multipleWindows() void tst_qquickcanvas::animationsWhileHidden() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.loadUrl(testFileUrl("AnimationsWhileHidden.qml")); QObject* created = component.create(); @@ -663,8 +663,8 @@ void tst_qquickcanvas::animationsWhileHidden() void tst_qquickcanvas::headless() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.loadUrl(testFileUrl("Headless.qml")); QObject* created = component.create(); @@ -711,8 +711,8 @@ void tst_qquickcanvas::headless() void tst_qquickcanvas::focusObject() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.loadUrl(testFileUrl("focus.qml")); QObject *created = component.create(); QVERIFY(created); diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/anim-gr.gif b/tests/auto/quick/qquickcanvasitem/data/anim-gr.gif similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/anim-gr.gif rename to tests/auto/quick/qquickcanvasitem/data/anim-gr.gif diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/anim-gr.png b/tests/auto/quick/qquickcanvasitem/data/anim-gr.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/anim-gr.png rename to tests/auto/quick/qquickcanvasitem/data/anim-gr.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/anim-poster-gr.png b/tests/auto/quick/qquickcanvasitem/data/anim-poster-gr.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/anim-poster-gr.png rename to tests/auto/quick/qquickcanvasitem/data/anim-poster-gr.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/background.png b/tests/auto/quick/qquickcanvasitem/data/background.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/background.png rename to tests/auto/quick/qquickcanvasitem/data/background.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/broken.png b/tests/auto/quick/qquickcanvasitem/data/broken.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/broken.png rename to tests/auto/quick/qquickcanvasitem/data/broken.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/ggrr-256x256.png b/tests/auto/quick/qquickcanvasitem/data/ggrr-256x256.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/ggrr-256x256.png rename to tests/auto/quick/qquickcanvasitem/data/ggrr-256x256.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/green-16x16.png b/tests/auto/quick/qquickcanvasitem/data/green-16x16.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/green-16x16.png rename to tests/auto/quick/qquickcanvasitem/data/green-16x16.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/green-1x1.png b/tests/auto/quick/qquickcanvasitem/data/green-1x1.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/green-1x1.png rename to tests/auto/quick/qquickcanvasitem/data/green-1x1.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/green-256x256.png b/tests/auto/quick/qquickcanvasitem/data/green-256x256.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/green-256x256.png rename to tests/auto/quick/qquickcanvasitem/data/green-256x256.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/green-2x2.png b/tests/auto/quick/qquickcanvasitem/data/green-2x2.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/green-2x2.png rename to tests/auto/quick/qquickcanvasitem/data/green-2x2.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/green.png b/tests/auto/quick/qquickcanvasitem/data/green.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/green.png rename to tests/auto/quick/qquickcanvasitem/data/green.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/grgr-256x256.png b/tests/auto/quick/qquickcanvasitem/data/grgr-256x256.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/grgr-256x256.png rename to tests/auto/quick/qquickcanvasitem/data/grgr-256x256.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/red-16x16.png b/tests/auto/quick/qquickcanvasitem/data/red-16x16.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/red-16x16.png rename to tests/auto/quick/qquickcanvasitem/data/red-16x16.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/red.png b/tests/auto/quick/qquickcanvasitem/data/red.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/red.png rename to tests/auto/quick/qquickcanvasitem/data/red.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/redtransparent.png b/tests/auto/quick/qquickcanvasitem/data/redtransparent.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/redtransparent.png rename to tests/auto/quick/qquickcanvasitem/data/redtransparent.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/rgrg-256x256.png b/tests/auto/quick/qquickcanvasitem/data/rgrg-256x256.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/rgrg-256x256.png rename to tests/auto/quick/qquickcanvasitem/data/rgrg-256x256.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/rrgg-256x256.png b/tests/auto/quick/qquickcanvasitem/data/rrgg-256x256.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/rrgg-256x256.png rename to tests/auto/quick/qquickcanvasitem/data/rrgg-256x256.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/testhelper.js b/tests/auto/quick/qquickcanvasitem/data/testhelper.js similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/testhelper.js rename to tests/auto/quick/qquickcanvasitem/data/testhelper.js diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/transparent.png b/tests/auto/quick/qquickcanvasitem/data/transparent.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/transparent.png rename to tests/auto/quick/qquickcanvasitem/data/transparent.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/transparent50.png b/tests/auto/quick/qquickcanvasitem/data/transparent50.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/transparent50.png rename to tests/auto/quick/qquickcanvasitem/data/transparent50.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_arc.qml b/tests/auto/quick/qquickcanvasitem/data/tst_arc.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_arc.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_arc.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_arcto.qml b/tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_arcto.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_canvas.qml b/tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_canvas.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_composite.qml b/tests/auto/quick/qquickcanvasitem/data/tst_composite.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_composite.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_composite.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_context.qml b/tests/auto/quick/qquickcanvasitem/data/tst_context.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_context.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_context.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_drawimage.qml b/tests/auto/quick/qquickcanvasitem/data/tst_drawimage.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_drawimage.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_drawimage.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_fillStyle.qml b/tests/auto/quick/qquickcanvasitem/data/tst_fillStyle.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_fillStyle.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_fillStyle.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_fillrect.qml b/tests/auto/quick/qquickcanvasitem/data/tst_fillrect.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_fillrect.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_fillrect.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_gradient.qml b/tests/auto/quick/qquickcanvasitem/data/tst_gradient.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_gradient.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_gradient.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_line.qml b/tests/auto/quick/qquickcanvasitem/data/tst_line.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_line.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_line.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_path.qml b/tests/auto/quick/qquickcanvasitem/data/tst_path.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_path.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_path.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_pattern.qml b/tests/auto/quick/qquickcanvasitem/data/tst_pattern.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_pattern.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_pattern.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_pixel.qml b/tests/auto/quick/qquickcanvasitem/data/tst_pixel.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_pixel.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_pixel.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_shadow.qml b/tests/auto/quick/qquickcanvasitem/data/tst_shadow.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_shadow.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_shadow.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_state.qml b/tests/auto/quick/qquickcanvasitem/data/tst_state.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_state.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_state.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_strokeStyle.qml b/tests/auto/quick/qquickcanvasitem/data/tst_strokeStyle.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_strokeStyle.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_strokeStyle.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_text.qml b/tests/auto/quick/qquickcanvasitem/data/tst_text.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_text.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_text.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_transform.qml b/tests/auto/quick/qquickcanvasitem/data/tst_transform.qml similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/tst_transform.qml rename to tests/auto/quick/qquickcanvasitem/data/tst_transform.qml diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/yellow.png b/tests/auto/quick/qquickcanvasitem/data/yellow.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/yellow.png rename to tests/auto/quick/qquickcanvasitem/data/yellow.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/yellow75.png b/tests/auto/quick/qquickcanvasitem/data/yellow75.png similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/data/yellow75.png rename to tests/auto/quick/qquickcanvasitem/data/yellow75.png diff --git a/tests/auto/qtquick2/qquickcanvasitem/qquickcanvasitem.pro b/tests/auto/quick/qquickcanvasitem/qquickcanvasitem.pro similarity index 92% rename from tests/auto/qtquick2/qquickcanvasitem/qquickcanvasitem.pro rename to tests/auto/quick/qquickcanvasitem/qquickcanvasitem.pro index 93539dab15..ccf894715f 100644 --- a/tests/auto/qtquick2/qquickcanvasitem/qquickcanvasitem.pro +++ b/tests/auto/quick/qquickcanvasitem/qquickcanvasitem.pro @@ -1,4 +1,4 @@ -QT += core-private gui-private declarative-private widgets +QT += core-private gui-private qml-private widgets TEMPLATE=app TARGET=tst_qquickcanvasitem diff --git a/tests/auto/qtquick2/qquickcanvasitem/tst_qquickcanvasitem.cpp b/tests/auto/quick/qquickcanvasitem/tst_qquickcanvasitem.cpp similarity index 100% rename from tests/auto/qtquick2/qquickcanvasitem/tst_qquickcanvasitem.cpp rename to tests/auto/quick/qquickcanvasitem/tst_qquickcanvasitem.cpp diff --git a/tests/auto/qtquick2/qquickdrag/qquickdrag.pro b/tests/auto/quick/qquickdrag/qquickdrag.pro similarity index 60% rename from tests/auto/qtquick2/qquickdrag/qquickdrag.pro rename to tests/auto/quick/qquickdrag/qquickdrag.pro index 4fdfa7b355..820661ac23 100644 --- a/tests/auto/qtquick2/qquickdrag/qquickdrag.pro +++ b/tests/auto/quick/qquickdrag/qquickdrag.pro @@ -6,4 +6,4 @@ SOURCES += tst_qquickdrag.cpp CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private network testlib +QT += core-private gui-private qml-private quick-private network testlib diff --git a/tests/auto/qtquick2/qquickdrag/tst_qquickdrag.cpp b/tests/auto/quick/qquickdrag/tst_qquickdrag.cpp similarity index 98% rename from tests/auto/qtquick2/qquickdrag/tst_qquickdrag.cpp rename to tests/auto/quick/qquickdrag/tst_qquickdrag.cpp index 91edf8c7b6..37fb6d2d1f 100644 --- a/tests/auto/qtquick2/qquickdrag/tst_qquickdrag.cpp +++ b/tests/auto/quick/qquickdrag/tst_qquickdrag.cpp @@ -43,13 +43,13 @@ #include #include #include -#include -#include -#include +#include +#include +#include template static T evaluate(QObject *scope, const QString &expression) { - QDeclarativeExpression expr(qmlContext(scope), scope, expression); + QQmlExpression expr(qmlContext(scope), scope, expression); QVariant result = expr.evaluate(); if (expr.hasError()) qWarning() << expr.error().toString(); @@ -58,7 +58,7 @@ template static T evaluate(QObject *scope, const QString &expressio template <> void evaluate(QObject *scope, const QString &expression) { - QDeclarativeExpression expr(qmlContext(scope), scope, expression); + QQmlExpression expr(qmlContext(scope), scope, expression); expr.evaluate(); if (expr.hasError()) qWarning() << expr.error().toString(); @@ -163,7 +163,7 @@ private slots: void recursion(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; void tst_QQuickDrag::initTestCase() @@ -181,7 +181,7 @@ void tst_QQuickDrag::active() QQuickCanvas canvas; TestDropTarget dropTarget(canvas.rootItem()); dropTarget.setSize(QSizeF(100, 100)); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "Item {\n" @@ -370,7 +370,7 @@ void tst_QQuickDrag::drop() TestDropTarget innerTarget(&outerTarget); innerTarget.setSize(QSizeF(100, 100)); innerTarget.acceptAction = Qt::MoveAction; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "Item {\n" @@ -491,7 +491,7 @@ void tst_QQuickDrag::move() TestDropTarget rightTarget(&outerTarget); rightTarget.setPos(QPointF(70, 35)); rightTarget.setSize(QSizeF(30, 30)); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "Item {\n" @@ -622,7 +622,7 @@ void tst_QQuickDrag::hotSpot() QQuickCanvas canvas; TestDropTarget dropTarget(canvas.rootItem()); dropTarget.setSize(QSizeF(100, 100)); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "Item {\n" @@ -678,7 +678,7 @@ void tst_QQuickDrag::supportedActions() QQuickCanvas canvas; TestDropTarget dropTarget(canvas.rootItem()); dropTarget.setSize(QSizeF(100, 100)); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "Item {\n" @@ -726,7 +726,7 @@ void tst_QQuickDrag::proposedAction() QQuickCanvas canvas; TestDropTarget dropTarget(canvas.rootItem()); dropTarget.setSize(QSizeF(100, 100)); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "Item {\n" @@ -771,7 +771,7 @@ void tst_QQuickDrag::proposedAction() void tst_QQuickDrag::keys() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "Item {\n" @@ -796,7 +796,7 @@ void tst_QQuickDrag::keys() void tst_QQuickDrag::source() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "Item {\n" @@ -987,7 +987,7 @@ void tst_QQuickDrag::recursion() QQuickCanvas canvas; RecursingDropTarget dropTarget(script, type, canvas.rootItem()); dropTarget.setSize(QSizeF(100, 100)); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "Item {\n" diff --git a/tests/auto/qtquick2/qquickdroparea/qquickdroparea.pro b/tests/auto/quick/qquickdroparea/qquickdroparea.pro similarity index 62% rename from tests/auto/qtquick2/qquickdroparea/qquickdroparea.pro rename to tests/auto/quick/qquickdroparea/qquickdroparea.pro index 46fe08c145..5ae8d222c4 100644 --- a/tests/auto/qtquick2/qquickdroparea/qquickdroparea.pro +++ b/tests/auto/quick/qquickdroparea/qquickdroparea.pro @@ -6,4 +6,4 @@ SOURCES += tst_qquickdroparea.cpp CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private network testlib +QT += core-private gui-private qml-private quick-private network testlib diff --git a/tests/auto/qtquick2/qquickdroparea/tst_qquickdroparea.cpp b/tests/auto/quick/qquickdroparea/tst_qquickdroparea.cpp similarity index 98% rename from tests/auto/qtquick2/qquickdroparea/tst_qquickdroparea.cpp rename to tests/auto/quick/qquickdroparea/tst_qquickdroparea.cpp index 0cd3fa9416..ed7a0aa0fa 100644 --- a/tests/auto/qtquick2/qquickdroparea/tst_qquickdroparea.cpp +++ b/tests/auto/quick/qquickdroparea/tst_qquickdroparea.cpp @@ -43,15 +43,15 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include template static T evaluate(QObject *scope, const QString &expression) { - QDeclarativeExpression expr(qmlContext(scope), scope, expression); + QQmlExpression expr(qmlContext(scope), scope, expression); QVariant result = expr.evaluate(); if (expr.hasError()) qWarning() << expr.error().toString(); @@ -60,7 +60,7 @@ template static T evaluate(QObject *scope, const QString &expressio template <> void evaluate(QObject *scope, const QString &expression) { - QDeclarativeExpression expr(qmlContext(scope), scope, expression); + QQmlExpression expr(qmlContext(scope), scope, expression); expr.evaluate(); if (expr.hasError()) qWarning() << expr.error().toString(); @@ -86,7 +86,7 @@ private slots: void simultaneousDrags(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; void tst_QQuickDropArea::initTestCase() @@ -102,7 +102,7 @@ void tst_QQuickDropArea::cleanupTestCase() void tst_QQuickDropArea::containsDrag_internal() { QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "DropArea {\n" @@ -171,7 +171,7 @@ void tst_QQuickDropArea::containsDrag_internal() void tst_QQuickDropArea::containsDrag_external() { QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "DropArea {\n" @@ -234,7 +234,7 @@ void tst_QQuickDropArea::containsDrag_external() void tst_QQuickDropArea::keys_internal() { QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "DropArea {\n" @@ -341,7 +341,7 @@ void tst_QQuickDropArea::keys_internal() void tst_QQuickDropArea::keys_external() { QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "DropArea {\n" @@ -442,7 +442,7 @@ void tst_QQuickDropArea::keys_external() void tst_QQuickDropArea::source_internal() { QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "DropArea {\n" @@ -503,7 +503,7 @@ void tst_QQuickDropArea::source_internal() void tst_QQuickDropArea::position_internal() { QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "DropArea {\n" @@ -568,7 +568,7 @@ void tst_QQuickDropArea::position_internal() void tst_QQuickDropArea::position_external() { QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "DropArea {\n" @@ -627,7 +627,7 @@ void tst_QQuickDropArea::position_external() void tst_QQuickDropArea::drop_internal() { QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "DropArea {\n" @@ -765,7 +765,7 @@ void tst_QQuickDropArea::drop_internal() void tst_QQuickDropArea::simultaneousDrags() { QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData( "import QtQuick 2.0\n" "DropArea {\n" diff --git a/tests/auto/qtquick2/qquickflickable/data/disabled.qml b/tests/auto/quick/qquickflickable/data/disabled.qml similarity index 100% rename from tests/auto/qtquick2/qquickflickable/data/disabled.qml rename to tests/auto/quick/qquickflickable/data/disabled.qml diff --git a/tests/auto/qtquick2/qquickflickable/data/flickable01.qml b/tests/auto/quick/qquickflickable/data/flickable01.qml similarity index 100% rename from tests/auto/qtquick2/qquickflickable/data/flickable01.qml rename to tests/auto/quick/qquickflickable/data/flickable01.qml diff --git a/tests/auto/qtquick2/qquickflickable/data/flickable02.qml b/tests/auto/quick/qquickflickable/data/flickable02.qml similarity index 100% rename from tests/auto/qtquick2/qquickflickable/data/flickable02.qml rename to tests/auto/quick/qquickflickable/data/flickable02.qml diff --git a/tests/auto/qtquick2/qquickflickable/data/flickable03.qml b/tests/auto/quick/qquickflickable/data/flickable03.qml similarity index 100% rename from tests/auto/qtquick2/qquickflickable/data/flickable03.qml rename to tests/auto/quick/qquickflickable/data/flickable03.qml diff --git a/tests/auto/qtquick2/qquickflickable/data/flickable04.qml b/tests/auto/quick/qquickflickable/data/flickable04.qml similarity index 100% rename from tests/auto/qtquick2/qquickflickable/data/flickable04.qml rename to tests/auto/quick/qquickflickable/data/flickable04.qml diff --git a/tests/auto/qtquick2/qquickflickable/data/flickableqgraphicswidget.qml b/tests/auto/quick/qquickflickable/data/flickableqgraphicswidget.qml similarity index 100% rename from tests/auto/qtquick2/qquickflickable/data/flickableqgraphicswidget.qml rename to tests/auto/quick/qquickflickable/data/flickableqgraphicswidget.qml diff --git a/tests/auto/qtquick2/qquickflickable/data/margins.qml b/tests/auto/quick/qquickflickable/data/margins.qml similarity index 100% rename from tests/auto/qtquick2/qquickflickable/data/margins.qml rename to tests/auto/quick/qquickflickable/data/margins.qml diff --git a/tests/auto/qtquick2/qquickflickable/data/nestedPressDelay.qml b/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml similarity index 100% rename from tests/auto/qtquick2/qquickflickable/data/nestedPressDelay.qml rename to tests/auto/quick/qquickflickable/data/nestedPressDelay.qml diff --git a/tests/auto/qtquick2/qquickflickable/data/resize.qml b/tests/auto/quick/qquickflickable/data/resize.qml similarity index 100% rename from tests/auto/qtquick2/qquickflickable/data/resize.qml rename to tests/auto/quick/qquickflickable/data/resize.qml diff --git a/tests/auto/qtquick2/qquickflickable/data/wheel.qml b/tests/auto/quick/qquickflickable/data/wheel.qml similarity index 100% rename from tests/auto/qtquick2/qquickflickable/data/wheel.qml rename to tests/auto/quick/qquickflickable/data/wheel.qml diff --git a/tests/auto/qtquick2/qquickflickable/qquickflickable.pro b/tests/auto/quick/qquickflickable/qquickflickable.pro similarity index 76% rename from tests/auto/qtquick2/qquickflickable/qquickflickable.pro rename to tests/auto/quick/qquickflickable/qquickflickable.pro index d1b8b6948f..0ca03b2497 100644 --- a/tests/auto/qtquick2/qquickflickable/qquickflickable.pro +++ b/tests/auto/quick/qquickflickable/qquickflickable.pro @@ -12,4 +12,4 @@ testDataFiles.path = . DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private testlib +QT += core-private gui-private v8-private qml-private quick-private testlib diff --git a/tests/auto/qtquick2/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp similarity index 94% rename from tests/auto/qtquick2/qquickflickable/tst_qquickflickable.cpp rename to tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index d357877ed5..e46659e6d0 100644 --- a/tests/auto/qtquick2/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -40,12 +40,12 @@ ****************************************************************************/ #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include "../../shared/util.h" #include "../shared/viewtestutil.h" @@ -55,7 +55,7 @@ using namespace QQuickViewTestUtil; using namespace QQuickVisualTestUtil; -class tst_qquickflickable : public QDeclarativeDataTest +class tst_qquickflickable : public QQmlDataTest { Q_OBJECT public: @@ -80,13 +80,13 @@ private slots: void margins(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; void tst_qquickflickable::create() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("flickable01.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("flickable01.qml")); QQuickFlickable *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -110,8 +110,8 @@ void tst_qquickflickable::create() void tst_qquickflickable::horizontalViewportSize() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("flickable02.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("flickable02.qml")); QQuickFlickable *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -127,8 +127,8 @@ void tst_qquickflickable::horizontalViewportSize() void tst_qquickflickable::verticalViewportSize() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("flickable03.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("flickable03.qml")); QQuickFlickable *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -144,8 +144,8 @@ void tst_qquickflickable::verticalViewportSize() void tst_qquickflickable::properties() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("flickable04.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("flickable04.qml")); QQuickFlickable *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -163,7 +163,7 @@ void tst_qquickflickable::properties() void tst_qquickflickable::boundsBehavior() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Flickable { boundsBehavior: Flickable.StopAtBounds }", QUrl::fromLocalFile("")); QQuickFlickable *flickable = qobject_cast(component.create()); QSignalSpy spy(flickable, SIGNAL(boundsBehaviorChanged())); @@ -192,7 +192,7 @@ void tst_qquickflickable::boundsBehavior() void tst_qquickflickable::maximumFlickVelocity() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Flickable { maximumFlickVelocity: 1.0; }", QUrl::fromLocalFile("")); QQuickFlickable *flickable = qobject_cast(component.create()); QSignalSpy spy(flickable, SIGNAL(maximumFlickVelocityChanged())); @@ -209,7 +209,7 @@ void tst_qquickflickable::maximumFlickVelocity() void tst_qquickflickable::flickDeceleration() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Flickable { flickDeceleration: 1.0; }", QUrl::fromLocalFile("")); QQuickFlickable *flickable = qobject_cast(component.create()); QSignalSpy spy(flickable, SIGNAL(flickDecelerationChanged())); @@ -226,7 +226,7 @@ void tst_qquickflickable::flickDeceleration() void tst_qquickflickable::pressDelay() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Flickable { pressDelay: 100; }", QUrl::fromLocalFile("")); QQuickFlickable *flickable = qobject_cast(component.create()); QSignalSpy spy(flickable, SIGNAL(pressDelayChanged())); @@ -271,7 +271,7 @@ void tst_qquickflickable::nestedPressDelay() void tst_qquickflickable::flickableDirection() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Flickable { flickableDirection: Flickable.VerticalFlick; }", QUrl::fromLocalFile("")); QQuickFlickable *flickable = qobject_cast(component.create()); QSignalSpy spy(flickable, SIGNAL(flickableDirectionChanged())); @@ -299,8 +299,8 @@ void tst_qquickflickable::flickableDirection() // QtQuick 1.1 void tst_qquickflickable::resizeContent() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("resize.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("resize.qml")); QQuickItem *root = qobject_cast(c.create()); QQuickFlickable *obj = findItem(root, "flick"); @@ -323,8 +323,8 @@ void tst_qquickflickable::resizeContent() // QtQuick 1.1 void tst_qquickflickable::returnToBounds() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("resize.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("resize.qml")); QQuickItem *root = qobject_cast(c.create()); QQuickFlickable *obj = findItem(root, "flick"); @@ -601,8 +601,8 @@ void tst_qquickflickable::flickVelocity() void tst_qquickflickable::margins() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("margins.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("margins.qml")); QQuickItem *root = qobject_cast(c.create()); QQuickFlickable *obj = qobject_cast(root); QVERIFY(obj != 0); diff --git a/tests/auto/qtquick2/qquickflipable/data/crash.qml b/tests/auto/quick/qquickflipable/data/crash.qml similarity index 100% rename from tests/auto/qtquick2/qquickflipable/data/crash.qml rename to tests/auto/quick/qquickflipable/data/crash.qml diff --git a/tests/auto/qtquick2/qquickflipable/data/flipable-abort.qml b/tests/auto/quick/qquickflipable/data/flipable-abort.qml similarity index 100% rename from tests/auto/qtquick2/qquickflipable/data/flipable-abort.qml rename to tests/auto/quick/qquickflipable/data/flipable-abort.qml diff --git a/tests/auto/qtquick2/qquickflipable/data/test-flipable.qml b/tests/auto/quick/qquickflipable/data/test-flipable.qml similarity index 100% rename from tests/auto/qtquick2/qquickflipable/data/test-flipable.qml rename to tests/auto/quick/qquickflipable/data/test-flipable.qml diff --git a/tests/auto/qtquick2/qquickflipable/qquickflipable.pro b/tests/auto/quick/qquickflipable/qquickflipable.pro similarity index 74% rename from tests/auto/qtquick2/qquickflipable/qquickflipable.pro rename to tests/auto/quick/qquickflipable/qquickflipable.pro index 3afad837fe..ca98cbe279 100644 --- a/tests/auto/qtquick2/qquickflipable/qquickflipable.pro +++ b/tests/auto/quick/qquickflipable/qquickflipable.pro @@ -12,4 +12,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private testlib +QT += core-private gui-private v8-private qml-private quick-private testlib diff --git a/tests/auto/qtquick2/qquickflipable/tst_qquickflipable.cpp b/tests/auto/quick/qquickflipable/tst_qquickflipable.cpp similarity index 87% rename from tests/auto/qtquick2/qquickflipable/tst_qquickflipable.cpp rename to tests/auto/quick/qquickflipable/tst_qquickflipable.cpp index c2c40c9746..2f399359ef 100644 --- a/tests/auto/qtquick2/qquickflipable/tst_qquickflipable.cpp +++ b/tests/auto/quick/qquickflipable/tst_qquickflipable.cpp @@ -39,18 +39,18 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include #include #include "../../shared/util.h" -class tst_qquickflipable : public QDeclarativeDataTest +class tst_qquickflipable : public QQmlDataTest { Q_OBJECT public: @@ -65,13 +65,13 @@ private slots: void QTBUG_8474_qgv_abort(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; void tst_qquickflipable::create() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("test-flipable.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("test-flipable.qml")); QQuickFlipable *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -80,8 +80,8 @@ void tst_qquickflipable::create() void tst_qquickflipable::checkFrontAndBack() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("test-flipable.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("test-flipable.qml")); QQuickFlipable *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -92,8 +92,8 @@ void tst_qquickflipable::checkFrontAndBack() void tst_qquickflipable::setFrontAndBack() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("test-flipable.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("test-flipable.qml")); QQuickFlipable *obj = qobject_cast(c.create()); QVERIFY(obj != 0); diff --git a/tests/auto/qtquick2/qquickfocusscope/data/canvasFocus.qml b/tests/auto/quick/qquickfocusscope/data/canvasFocus.qml similarity index 100% rename from tests/auto/qtquick2/qquickfocusscope/data/canvasFocus.qml rename to tests/auto/quick/qquickfocusscope/data/canvasFocus.qml diff --git a/tests/auto/qtquick2/qquickfocusscope/data/chain.qml b/tests/auto/quick/qquickfocusscope/data/chain.qml similarity index 100% rename from tests/auto/qtquick2/qquickfocusscope/data/chain.qml rename to tests/auto/quick/qquickfocusscope/data/chain.qml diff --git a/tests/auto/qtquick2/qquickfocusscope/data/forceActiveFocus.qml b/tests/auto/quick/qquickfocusscope/data/forceActiveFocus.qml similarity index 100% rename from tests/auto/qtquick2/qquickfocusscope/data/forceActiveFocus.qml rename to tests/auto/quick/qquickfocusscope/data/forceActiveFocus.qml diff --git a/tests/auto/qtquick2/qquickfocusscope/data/forcefocus.qml b/tests/auto/quick/qquickfocusscope/data/forcefocus.qml similarity index 100% rename from tests/auto/qtquick2/qquickfocusscope/data/forcefocus.qml rename to tests/auto/quick/qquickfocusscope/data/forcefocus.qml diff --git a/tests/auto/qtquick2/qquickfocusscope/data/qtBug13380.qml b/tests/auto/quick/qquickfocusscope/data/qtBug13380.qml similarity index 100% rename from tests/auto/qtquick2/qquickfocusscope/data/qtBug13380.qml rename to tests/auto/quick/qquickfocusscope/data/qtBug13380.qml diff --git a/tests/auto/qtquick2/qquickfocusscope/data/signalEmission.qml b/tests/auto/quick/qquickfocusscope/data/signalEmission.qml similarity index 100% rename from tests/auto/qtquick2/qquickfocusscope/data/signalEmission.qml rename to tests/auto/quick/qquickfocusscope/data/signalEmission.qml diff --git a/tests/auto/qtquick2/qquickfocusscope/data/test.qml b/tests/auto/quick/qquickfocusscope/data/test.qml similarity index 100% rename from tests/auto/qtquick2/qquickfocusscope/data/test.qml rename to tests/auto/quick/qquickfocusscope/data/test.qml diff --git a/tests/auto/qtquick2/qquickfocusscope/data/test2.qml b/tests/auto/quick/qquickfocusscope/data/test2.qml similarity index 100% rename from tests/auto/qtquick2/qquickfocusscope/data/test2.qml rename to tests/auto/quick/qquickfocusscope/data/test2.qml diff --git a/tests/auto/qtquick2/qquickfocusscope/data/test3.qml b/tests/auto/quick/qquickfocusscope/data/test3.qml similarity index 100% rename from tests/auto/qtquick2/qquickfocusscope/data/test3.qml rename to tests/auto/quick/qquickfocusscope/data/test3.qml diff --git a/tests/auto/qtquick2/qquickfocusscope/data/test4.qml b/tests/auto/quick/qquickfocusscope/data/test4.qml similarity index 100% rename from tests/auto/qtquick2/qquickfocusscope/data/test4.qml rename to tests/auto/quick/qquickfocusscope/data/test4.qml diff --git a/tests/auto/qtquick2/qquickfocusscope/data/test5.qml b/tests/auto/quick/qquickfocusscope/data/test5.qml similarity index 100% rename from tests/auto/qtquick2/qquickfocusscope/data/test5.qml rename to tests/auto/quick/qquickfocusscope/data/test5.qml diff --git a/tests/auto/qtquick2/qquickfocusscope/qquickfocusscope.pro b/tests/auto/quick/qquickfocusscope/qquickfocusscope.pro similarity index 77% rename from tests/auto/qtquick2/qquickfocusscope/qquickfocusscope.pro rename to tests/auto/quick/qquickfocusscope/qquickfocusscope.pro index d83f6ca7a3..34de32b173 100644 --- a/tests/auto/qtquick2/qquickfocusscope/qquickfocusscope.pro +++ b/tests/auto/quick/qquickfocusscope/qquickfocusscope.pro @@ -11,4 +11,4 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private declarative-private quick-private testlib +QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/qtquick2/qquickfocusscope/tst_qquickfocusscope.cpp b/tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp similarity index 99% rename from tests/auto/qtquick2/qquickfocusscope/tst_qquickfocusscope.cpp rename to tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp index 4264c68d92..3571392b17 100644 --- a/tests/auto/qtquick2/qquickfocusscope/tst_qquickfocusscope.cpp +++ b/tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include #include -#include -#include +#include +#include #include #include #include @@ -52,7 +52,7 @@ using namespace QQuickVisualTestUtil; -class tst_qquickfocusscope : public QDeclarativeDataTest +class tst_qquickfocusscope : public QQmlDataTest { Q_OBJECT public: diff --git a/tests/auto/qtquick2/qdeclarativefontloader/data/daniel.ttf b/tests/auto/quick/qquickfontloader/data/daniel.ttf similarity index 100% rename from tests/auto/qtquick2/qdeclarativefontloader/data/daniel.ttf rename to tests/auto/quick/qquickfontloader/data/daniel.ttf diff --git a/tests/auto/qtquick2/qdeclarativefontloader/data/dummy.ttf b/tests/auto/quick/qquickfontloader/data/dummy.ttf similarity index 100% rename from tests/auto/qtquick2/qdeclarativefontloader/data/dummy.ttf rename to tests/auto/quick/qquickfontloader/data/dummy.ttf diff --git a/tests/auto/qtquick2/qdeclarativefontloader/data/qtbug-20268.qml b/tests/auto/quick/qquickfontloader/data/qtbug-20268.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativefontloader/data/qtbug-20268.qml rename to tests/auto/quick/qquickfontloader/data/qtbug-20268.qml diff --git a/tests/auto/qtquick2/qdeclarativefontloader/data/tarzeau_ocr_a.ttf b/tests/auto/quick/qquickfontloader/data/tarzeau_ocr_a.ttf similarity index 100% rename from tests/auto/qtquick2/qdeclarativefontloader/data/tarzeau_ocr_a.ttf rename to tests/auto/quick/qquickfontloader/data/tarzeau_ocr_a.ttf diff --git a/tests/auto/qtquick2/qdeclarativefontloader/qdeclarativefontloader.pro b/tests/auto/quick/qquickfontloader/qquickfontloader.pro similarity index 62% rename from tests/auto/qtquick2/qdeclarativefontloader/qdeclarativefontloader.pro rename to tests/auto/quick/qquickfontloader/qquickfontloader.pro index 0e84fc9dce..7c34c43d04 100644 --- a/tests/auto/qtquick2/qdeclarativefontloader/qdeclarativefontloader.pro +++ b/tests/auto/quick/qquickfontloader/qquickfontloader.pro @@ -1,9 +1,9 @@ CONFIG += testcase -TARGET = tst_qdeclarativefontloader +TARGET = tst_qquickfontloader macx:CONFIG -= app_bundle HEADERS += ../../shared/testhttpserver.h -SOURCES += tst_qdeclarativefontloader.cpp \ +SOURCES += tst_qquickfontloader.cpp \ ../../shared/testhttpserver.cpp include (../../shared/util.pri) @@ -14,4 +14,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private network testlib +QT += core-private gui-private qml-private quick-private network testlib diff --git a/tests/auto/qtquick2/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp similarity index 67% rename from tests/auto/qtquick2/qdeclarativefontloader/tst_qdeclarativefontloader.cpp rename to tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp index e3571a411c..d8f368cf3e 100644 --- a/tests/auto/qtquick2/qdeclarativefontloader/tst_qdeclarativefontloader.cpp +++ b/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp @@ -40,10 +40,10 @@ ****************************************************************************/ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "../../shared/util.h" #include "../../shared/testhttpserver.h" #include @@ -51,11 +51,11 @@ #define SERVER_PORT 14448 -class tst_qdeclarativefontloader : public QDeclarativeDataTest +class tst_qquickfontloader : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativefontloader(); + tst_qquickfontloader(); private slots: void initTestCase(); @@ -70,161 +70,161 @@ private slots: void changeFontSourceViaState(); private: - QDeclarativeEngine engine; + QQmlEngine engine; TestHTTPServer server; }; -tst_qdeclarativefontloader::tst_qdeclarativefontloader() : +tst_qquickfontloader::tst_qquickfontloader() : server(SERVER_PORT) { } -void tst_qdeclarativefontloader::initTestCase() +void tst_qquickfontloader::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); server.serveDirectory(dataDirectory()); QVERIFY(server.isValid()); } -void tst_qdeclarativefontloader::noFont() +void tst_qquickfontloader::noFont() { QString componentStr = "import QtQuick 2.0\nFontLoader { }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); + QQuickFontLoader *fontObject = qobject_cast(component.create()); QVERIFY(fontObject != 0); QCOMPARE(fontObject->name(), QString("")); QCOMPARE(fontObject->source(), QUrl("")); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Null); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Null); delete fontObject; } -void tst_qdeclarativefontloader::namedFont() +void tst_qquickfontloader::namedFont() { QString componentStr = "import QtQuick 2.0\nFontLoader { name: \"Helvetica\" }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); + QQuickFontLoader *fontObject = qobject_cast(component.create()); QVERIFY(fontObject != 0); QCOMPARE(fontObject->source(), QUrl("")); QCOMPARE(fontObject->name(), QString("Helvetica")); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Ready); } -void tst_qdeclarativefontloader::localFont() +void tst_qquickfontloader::localFont() { QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"" + testFile("tarzeau_ocr_a.ttf") + "\" }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); + QQuickFontLoader *fontObject = qobject_cast(component.create()); QVERIFY(fontObject != 0); QVERIFY(fontObject->source() != QUrl("")); QTRY_COMPARE(fontObject->name(), QString("OCRA")); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Ready); } -void tst_qdeclarativefontloader::failLocalFont() +void tst_qquickfontloader::failLocalFont() { QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"" + testFileUrl("dummy.ttf").toString() + "\" }"; QTest::ignoreMessage(QtWarningMsg, QString("file::2:1: QML FontLoader: Cannot load font: \"" + testFileUrl("dummy.ttf").toString() + "\"").toUtf8().constData()); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); + QQuickFontLoader *fontObject = qobject_cast(component.create()); QVERIFY(fontObject != 0); QVERIFY(fontObject->source() != QUrl("")); QTRY_COMPARE(fontObject->name(), QString("")); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Error); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Error); } -void tst_qdeclarativefontloader::webFont() +void tst_qquickfontloader::webFont() { QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"http://localhost:14448/tarzeau_ocr_a.ttf\" }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); + QQuickFontLoader *fontObject = qobject_cast(component.create()); QVERIFY(fontObject != 0); QVERIFY(fontObject->source() != QUrl("")); QTRY_COMPARE(fontObject->name(), QString("OCRA")); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Ready); } -void tst_qdeclarativefontloader::redirWebFont() +void tst_qquickfontloader::redirWebFont() { server.addRedirect("olddir/oldname.ttf","../tarzeau_ocr_a.ttf"); QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"http://localhost:14448/olddir/oldname.ttf\" }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); + QQuickFontLoader *fontObject = qobject_cast(component.create()); QVERIFY(fontObject != 0); QVERIFY(fontObject->source() != QUrl("")); QTRY_COMPARE(fontObject->name(), QString("OCRA")); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Ready); } -void tst_qdeclarativefontloader::failWebFont() +void tst_qquickfontloader::failWebFont() { QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"http://localhost:14448/nonexist.ttf\" }"; QTest::ignoreMessage(QtWarningMsg, "file::2:1: QML FontLoader: Cannot load font: \"http://localhost:14448/nonexist.ttf\""); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); + QQuickFontLoader *fontObject = qobject_cast(component.create()); QVERIFY(fontObject != 0); QVERIFY(fontObject->source() != QUrl("")); QTRY_COMPARE(fontObject->name(), QString("")); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Error); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Error); } -void tst_qdeclarativefontloader::changeFont() +void tst_qquickfontloader::changeFont() { QString componentStr = "import QtQuick 2.0\nFontLoader { source: font }"; - QDeclarativeContext *ctxt = engine.rootContext(); + QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty("font", testFileUrl("tarzeau_ocr_a.ttf")); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); + QQuickFontLoader *fontObject = qobject_cast(component.create()); QVERIFY(fontObject != 0); QSignalSpy nameSpy(fontObject, SIGNAL(nameChanged())); QSignalSpy statusSpy(fontObject, SIGNAL(statusChanged())); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Ready); QCOMPARE(nameSpy.count(), 0); QCOMPARE(statusSpy.count(), 0); QTRY_COMPARE(fontObject->name(), QString("OCRA")); ctxt->setContextProperty("font", "http://localhost:14448/daniel.ttf"); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Loading); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Loading); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Ready); QCOMPARE(nameSpy.count(), 1); QCOMPARE(statusSpy.count(), 2); QTRY_COMPARE(fontObject->name(), QString("Daniel")); ctxt->setContextProperty("font", testFileUrl("tarzeau_ocr_a.ttf")); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Ready); QCOMPARE(nameSpy.count(), 2); QCOMPARE(statusSpy.count(), 2); QTRY_COMPARE(fontObject->name(), QString("OCRA")); ctxt->setContextProperty("font", "http://localhost:14448/daniel.ttf"); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Ready); QCOMPARE(nameSpy.count(), 3); QCOMPARE(statusSpy.count(), 2); QTRY_COMPARE(fontObject->name(), QString("Daniel")); } -void tst_qdeclarativefontloader::changeFontSourceViaState() +void tst_qquickfontloader::changeFontSourceViaState() { QQuickView canvas(testFileUrl("qtbug-20268.qml")); canvas.show(); @@ -232,9 +232,9 @@ void tst_qdeclarativefontloader::changeFontSourceViaState() QTest::qWaitForWindowShown(&canvas); QTRY_COMPARE(&canvas, qGuiApp->focusWindow()); - QDeclarativeFontLoader *fontObject = qobject_cast(qvariant_cast(canvas.rootObject()->property("fontloader"))); + QQuickFontLoader *fontObject = qobject_cast(qvariant_cast(canvas.rootObject()->property("fontloader"))); QVERIFY(fontObject != 0); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Ready); QVERIFY(fontObject->source() != QUrl("")); QTRY_COMPARE(fontObject->name(), QString("OCRA")); @@ -246,10 +246,10 @@ void tst_qdeclarativefontloader::changeFontSourceViaState() QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); QEXPECT_FAIL("", "QTBUG-20268", Abort); - QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QTRY_VERIFY(fontObject->status() == QQuickFontLoader::Ready); QCOMPARE(canvas.rootObject()->property("name").toString(), QString("Tahoma")); } -QTEST_MAIN(tst_qdeclarativefontloader) +QTEST_MAIN(tst_qquickfontloader) -#include "tst_qdeclarativefontloader.moc" +#include "tst_qquickfontloader.moc" diff --git a/tests/auto/qtquick2/qquickgridview/data/ComponentView.qml b/tests/auto/quick/qquickgridview/data/ComponentView.qml similarity index 100% rename from tests/auto/qtquick2/qquickgridview/data/ComponentView.qml rename to tests/auto/quick/qquickgridview/data/ComponentView.qml diff --git a/tests/auto/qtquick2/qquickgridview/data/addTransitions.qml b/tests/auto/quick/qquickgridview/data/addTransitions.qml similarity index 98% rename from tests/auto/qtquick2/qquickgridview/data/addTransitions.qml rename to tests/auto/quick/qquickgridview/data/addTransitions.qml index faea02a50d..3f47cbd7b7 100644 --- a/tests/auto/qtquick2/qquickgridview/data/addTransitions.qml +++ b/tests/auto/quick/qquickgridview/data/addTransitions.qml @@ -68,7 +68,7 @@ Rectangle { model: testModel delegate: myDelegate - // for QDeclarativeListProperty types + // for QQmlListProperty types function copyList(propList) { var temp = new Array() for (var i=0; i #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include "../../shared/util.h" #include "../shared/viewtestutil.h" #include "../shared/visualtestutil.h" @@ -64,7 +64,7 @@ Q_DECLARE_METATYPE(QQuickGridView::Flow) using namespace QQuickViewTestUtil; using namespace QQuickVisualTestUtil; -class tst_QQuickGridView : public QDeclarativeDataTest +class tst_QQuickGridView : public QQmlDataTest { Q_OBJECT public: @@ -165,7 +165,7 @@ void tst_QQuickGridView::items() model.addItem("Ben", "04321"); model.addItem("Jim", "0780"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -215,7 +215,7 @@ void tst_QQuickGridView::changed() model.addItem("Ben", "04321"); model.addItem("Jim", "0780"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -250,7 +250,7 @@ void tst_QQuickGridView::inserted() model.addItem("John", "2345"); model.addItem("Bob", "54321"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -332,7 +332,7 @@ void tst_QQuickGridView::inserted_more() model.addItem("Item" + QString::number(i), ""); QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -364,7 +364,7 @@ void tst_QQuickGridView::inserted_more() int firstVisibleIndex = -1; for (int i=0; iy() >= contentY) { - QDeclarativeExpression e(qmlContext(items[i]), items[i], "index"); + QQmlExpression e(qmlContext(items[i]), items[i], "index"); firstVisibleIndex = e.evaluate().toInt(); break; } @@ -505,7 +505,7 @@ void tst_QQuickGridView::insertBeforeVisible() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -592,7 +592,7 @@ void tst_QQuickGridView::removed() for (int i = 0; i < 40; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -745,7 +745,7 @@ void tst_QQuickGridView::removed_more() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -769,9 +769,9 @@ void tst_QQuickGridView::removed_more() QList items = findItems(contentItem, "wrapper"); for (int i=0; iy() >= contentY) { - QDeclarativeExpression e(qmlContext(items[i]), items[i], "index"); + QQmlExpression e(qmlContext(items[i]), items[i], "index"); firstVisibleIndex = e.evaluate().toInt(); - QDeclarativeExpression en(qmlContext(items[i]), items[i], "name"); + QQmlExpression en(qmlContext(items[i]), items[i], "name"); firstName = en.evaluate().toString(); break; } @@ -939,7 +939,7 @@ void tst_QQuickGridView::addOrRemoveBeforeVisible() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -1018,7 +1018,7 @@ void tst_QQuickGridView::clear() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -1065,7 +1065,7 @@ void tst_QQuickGridView::moved() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -1283,7 +1283,7 @@ void tst_QQuickGridView::multipleChanges() for (int i = 0; i < startCount; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -1508,7 +1508,7 @@ void tst_QQuickGridView::swapWithFirstItem() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -1538,7 +1538,7 @@ void tst_QQuickGridView::currentIndex() canvas->setGeometry(0,0,240,320); canvas->show(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); QString filename(testFile("gridview-initCurrent.qml")); @@ -1783,7 +1783,7 @@ void tst_QQuickGridView::noCurrentIndex() QQuickView *canvas = new QQuickView(0); canvas->setGeometry(0,0,240,320); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); QString filename(testFile("gridview-noCurrent.qml")); @@ -1819,7 +1819,7 @@ void tst_QQuickGridView::changeFlow() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), QString::number(i)); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -1910,8 +1910,8 @@ void tst_QQuickGridView::changeFlow() void tst_QQuickGridView::defaultValues() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("gridview3.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("gridview3.qml")); QQuickGridView *obj = qobject_cast(c.create()); QTRY_VERIFY(obj != 0); @@ -1933,8 +1933,8 @@ void tst_QQuickGridView::defaultValues() void tst_QQuickGridView::properties() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("gridview2.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("gridview2.qml")); QQuickGridView *obj = qobject_cast(c.create()); QTRY_VERIFY(obj != 0); @@ -2036,11 +2036,11 @@ void tst_QQuickGridView::componentChanges() QQuickGridView *gridView = canvas->rootObject()->findChild("gridView"); QTRY_VERIFY(gridView); - QDeclarativeComponent component(canvas->engine()); - component.setData("import QtQuick 1.0; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile("")); + QQmlComponent component(canvas->engine()); + component.setData("import QtQuick 2.0; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile("")); - QDeclarativeComponent delegateComponent(canvas->engine()); - delegateComponent.setData("import QtQuick 1.0; Text { text: 'Name: ' + name }", QUrl::fromLocalFile("")); + QQmlComponent delegateComponent(canvas->engine()); + delegateComponent.setData("import QtQuick 2.0; Text { text: 'Name: ' + name }", QUrl::fromLocalFile("")); QSignalSpy highlightSpy(gridView, SIGNAL(highlightChanged())); QSignalSpy delegateSpy(gridView, SIGNAL(delegateChanged())); @@ -2084,7 +2084,7 @@ void tst_QQuickGridView::modelChanges() QQuickGridView *gridView = canvas->rootObject()->findChild("gridView"); QTRY_VERIFY(gridView); - QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild("alternateModel"); + QQuickListModel *alternateModel = canvas->rootObject()->findChild("alternateModel"); QTRY_VERIFY(alternateModel); QVariant modelVariant = QVariant::fromValue(alternateModel); QSignalSpy modelSpy(gridView, SIGNAL(modelChanged())); @@ -2109,7 +2109,7 @@ void tst_QQuickGridView::positionViewAtIndex() for (int i = 0; i < 40; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -2311,7 +2311,7 @@ void tst_QQuickGridView::snapping() for (int i = 0; i < 40; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testTopToBottom", QVariant(false)); ctxt->setContextProperty("testRightToLeft", QVariant(false)); @@ -2413,7 +2413,7 @@ void tst_QQuickGridView::positionViewAtIndex_rightToLeft() for (int i = 0; i < 40; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testTopToBottom", QVariant(true)); ctxt->setContextProperty("testRightToLeft", QVariant(true)); @@ -2545,7 +2545,7 @@ void tst_QQuickGridView::resetModel() strings << "one" << "two" << "three"; QStringListModel model(strings); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("displaygrid.qml")); @@ -2589,7 +2589,7 @@ void tst_QQuickGridView::enforceRange() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -2647,7 +2647,7 @@ void tst_QQuickGridView::enforceRange_rightToLeft() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(true)); ctxt->setContextProperty("testTopToBottom", QVariant(true)); @@ -2777,7 +2777,7 @@ void tst_QQuickGridView::footer() for (int i = 0; i < 7; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("footer.qml")); @@ -3087,7 +3087,7 @@ void tst_QQuickGridView::resizeViewAndRepaint() for (int i = 0; i < 40; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("initialWidth", 240); ctxt->setContextProperty("initialHeight", 100); @@ -3156,7 +3156,7 @@ void tst_QQuickGridView::changeColumnCount() model.addItem("Item" + QString::number(i), ""); QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("initialWidth", 100); ctxt->setContextProperty("initialHeight", 320); @@ -3237,7 +3237,7 @@ void tst_QQuickGridView::indexAt_itemAt() model.addItem("Ben", "04321"); model.addItem("Jim", "0780"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -3279,7 +3279,7 @@ void tst_QQuickGridView::onAdd() for (int i=0; irootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("delegateWidth", delegateWidth); ctxt->setContextProperty("delegateHeight", delegateHeight); @@ -3337,7 +3337,7 @@ void tst_QQuickGridView::onRemove() model.addItem(QString("value %1").arg(i), "dummy value"); QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("delegateWidth", delegateWidth); ctxt->setContextProperty("delegateHeight", delegateHeight); @@ -3402,7 +3402,7 @@ void tst_QQuickGridView::margins() for (int i = 0; i < 40; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); @@ -3466,7 +3466,7 @@ void tst_QQuickGridView::margins() for (int i = 0; i < 40; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(true)); @@ -3760,7 +3760,7 @@ void tst_QQuickGridView::unaligned() for (int i = 0; i < 10; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("unaligned.qml")); @@ -3967,7 +3967,7 @@ void tst_QQuickGridView::addTransitions() QaimModel model_displacedItems_transitionVia; QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("model_targetItems_transitionFrom", &model_targetItems_transitionFrom); ctxt->setContextProperty("model_displacedItems_transitionVia", &model_displacedItems_transitionVia); @@ -4043,7 +4043,7 @@ void tst_QQuickGridView::addTransitions() int firstVisibleIndex = -1; for (int i=0; iy() >= contentY) { - QDeclarativeExpression e(qmlContext(items[i]), items[i], "index"); + QQmlExpression e(qmlContext(items[i]), items[i], "index"); firstVisibleIndex = e.evaluate().toInt(); break; } @@ -4172,7 +4172,7 @@ void tst_QQuickGridView::moveTransitions() QaimModel model_displacedItems_transitionVia; QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("model_targetItems_transitionVia", &model_targetItems_transitionVia); ctxt->setContextProperty("model_displacedItems_transitionVia", &model_displacedItems_transitionVia); @@ -4240,7 +4240,7 @@ void tst_QQuickGridView::moveTransitions() int firstVisibleIndex = -1; for (int i=0; iy() >= contentY) { - QDeclarativeExpression e(qmlContext(items[i]), items[i], "index"); + QQmlExpression e(qmlContext(items[i]), items[i], "index"); firstVisibleIndex = e.evaluate().toInt(); break; } @@ -4378,7 +4378,7 @@ void tst_QQuickGridView::removeTransitions() QaimModel model_displacedItems_transitionVia; QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("model_targetItems_transitionTo", &model_targetItems_transitionTo); ctxt->setContextProperty("model_displacedItems_transitionVia", &model_displacedItems_transitionVia); @@ -4454,7 +4454,7 @@ void tst_QQuickGridView::removeTransitions() int itemCount = items.count(); int firstVisibleIndex = -1; for (int i=0; iy() >= contentY) firstVisibleIndex = index; @@ -4575,7 +4575,7 @@ void tst_QQuickGridView::multipleTransitions() model.addItem("Original item" + QString::number(i), ""); QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("addTargets_transitionFrom", addTargets_transitionFrom); ctxt->setContextProperty("addDisplaced_transitionFrom", addDisplaced_transitionFrom); @@ -4654,7 +4654,7 @@ void tst_QQuickGridView::multipleTransitions() int firstVisibleIndex = -1; for (int i=0; iy() >= contentY) { - QDeclarativeExpression e(qmlContext(items[i]), items[i], "index"); + QQmlExpression e(qmlContext(items[i]), items[i], "index"); firstVisibleIndex = e.evaluate().toInt(); break; } @@ -4711,7 +4711,7 @@ void tst_QQuickGridView::cacheBuffer() for (int i = 0; i < 90; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testRightToLeft", QVariant(false)); ctxt->setContextProperty("testTopToBottom", QVariant(false)); @@ -4736,7 +4736,7 @@ void tst_QQuickGridView::cacheBuffer() QTRY_COMPARE(item->y(), (i/3)*60.0); } - QDeclarativeIncubationController controller; + QQmlIncubationController controller; canvas->engine()->setIncubationController(&controller); canvas->rootObject()->setProperty("cacheBuffer", 200); @@ -4804,7 +4804,7 @@ void tst_QQuickGridView::asynchronous() { QQuickView *canvas = createView(); canvas->show(); - QDeclarativeIncubationController controller; + QQmlIncubationController controller; canvas->engine()->setIncubationController(&controller); canvas->setSource(testFile("asyncloader.qml")); @@ -4856,7 +4856,7 @@ void tst_QQuickGridView::unrequestedVisibility() QQuickView *canvas = new QQuickView(0); canvas->setGeometry(0,0,240,320); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testWrap", QVariant(false)); diff --git a/tests/auto/qtquick2/qquickimage/data/aspectratio.qml b/tests/auto/quick/qquickimage/data/aspectratio.qml similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/aspectratio.qml rename to tests/auto/quick/qquickimage/data/aspectratio.qml diff --git a/tests/auto/qtquick2/qquickimage/data/big.jpeg b/tests/auto/quick/qquickimage/data/big.jpeg similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/big.jpeg rename to tests/auto/quick/qquickimage/data/big.jpeg diff --git a/tests/auto/qtquick2/qquickimage/data/big256.png b/tests/auto/quick/qquickimage/data/big256.png similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/big256.png rename to tests/auto/quick/qquickimage/data/big256.png diff --git a/tests/auto/qtquick2/qquickimage/data/colors.png b/tests/auto/quick/qquickimage/data/colors.png similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/colors.png rename to tests/auto/quick/qquickimage/data/colors.png diff --git a/tests/auto/qtquick2/qquickimage/data/colors1.png b/tests/auto/quick/qquickimage/data/colors1.png similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/colors1.png rename to tests/auto/quick/qquickimage/data/colors1.png diff --git a/tests/auto/qtquick2/qquickimage/data/green.png b/tests/auto/quick/qquickimage/data/green.png similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/green.png rename to tests/auto/quick/qquickimage/data/green.png diff --git a/tests/auto/qtquick2/qquickimage/data/heart-win32.png b/tests/auto/quick/qquickimage/data/heart-win32.png similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/heart-win32.png rename to tests/auto/quick/qquickimage/data/heart-win32.png diff --git a/tests/auto/qtquick2/qquickimage/data/heart.png b/tests/auto/quick/qquickimage/data/heart.png similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/heart.png rename to tests/auto/quick/qquickimage/data/heart.png diff --git a/tests/auto/qtquick2/qquickimage/data/heart.svg b/tests/auto/quick/qquickimage/data/heart.svg similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/heart.svg rename to tests/auto/quick/qquickimage/data/heart.svg diff --git a/tests/auto/qtquick2/qquickimage/data/heart200-win32.png b/tests/auto/quick/qquickimage/data/heart200-win32.png similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/heart200-win32.png rename to tests/auto/quick/qquickimage/data/heart200-win32.png diff --git a/tests/auto/qtquick2/qquickimage/data/heart200.png b/tests/auto/quick/qquickimage/data/heart200.png similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/heart200.png rename to tests/auto/quick/qquickimage/data/heart200.png diff --git a/tests/auto/qtquick2/qquickimage/data/htiling.qml b/tests/auto/quick/qquickimage/data/htiling.qml similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/htiling.qml rename to tests/auto/quick/qquickimage/data/htiling.qml diff --git a/tests/auto/qtquick2/qquickimage/data/mirror.qml b/tests/auto/quick/qquickimage/data/mirror.qml similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/mirror.qml rename to tests/auto/quick/qquickimage/data/mirror.qml diff --git a/tests/auto/qtquick2/qquickimage/data/nullpixmap.qml b/tests/auto/quick/qquickimage/data/nullpixmap.qml similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/nullpixmap.qml rename to tests/auto/quick/qquickimage/data/nullpixmap.qml diff --git a/tests/auto/qtquick2/qquickimage/data/pattern.png b/tests/auto/quick/qquickimage/data/pattern.png similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/pattern.png rename to tests/auto/quick/qquickimage/data/pattern.png diff --git a/tests/auto/qtquick2/qquickimage/data/qtbug_16389.qml b/tests/auto/quick/qquickimage/data/qtbug_16389.qml similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/qtbug_16389.qml rename to tests/auto/quick/qquickimage/data/qtbug_16389.qml diff --git a/tests/auto/qtquick2/qquickimage/data/qtbug_22125.qml b/tests/auto/quick/qquickimage/data/qtbug_22125.qml similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/qtbug_22125.qml rename to tests/auto/quick/qquickimage/data/qtbug_22125.qml diff --git a/tests/auto/qtquick2/qquickimage/data/rect.png b/tests/auto/quick/qquickimage/data/rect.png similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/rect.png rename to tests/auto/quick/qquickimage/data/rect.png diff --git a/tests/auto/qtquick2/qquickimage/data/sourceSize.qml b/tests/auto/quick/qquickimage/data/sourceSize.qml similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/sourceSize.qml rename to tests/auto/quick/qquickimage/data/sourceSize.qml diff --git a/tests/auto/qtquick2/qquickimage/data/vtiling.qml b/tests/auto/quick/qquickimage/data/vtiling.qml similarity index 100% rename from tests/auto/qtquick2/qquickimage/data/vtiling.qml rename to tests/auto/quick/qquickimage/data/vtiling.qml diff --git a/tests/auto/qtquick2/qquickimage/qquickimage.pro b/tests/auto/quick/qquickimage/qquickimage.pro similarity index 81% rename from tests/auto/qtquick2/qquickimage/qquickimage.pro rename to tests/auto/quick/qquickimage/qquickimage.pro index 43e95a2bed..a68a7870d8 100644 --- a/tests/auto/qtquick2/qquickimage/qquickimage.pro +++ b/tests/auto/quick/qquickimage/qquickimage.pro @@ -14,4 +14,4 @@ testDataFiles.path = . DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private network testlib +QT += core-private gui-private qml-private quick-private network testlib diff --git a/tests/auto/qtquick2/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp similarity index 95% rename from tests/auto/qtquick2/qquickimage/tst_qquickimage.cpp rename to tests/auto/quick/qquickimage/tst_qquickimage.cpp index 7602f1b1d5..eda56fa789 100644 --- a/tests/auto/qtquick2/qquickimage/tst_qquickimage.cpp +++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp @@ -44,14 +44,14 @@ #include #include -#include -#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include @@ -68,7 +68,7 @@ using namespace QQuickVisualTestUtil; Q_DECLARE_METATYPE(QQuickImageBase::Status) -class tst_qquickimage : public QDeclarativeDataTest +class tst_qquickimage : public QQmlDataTest { Q_OBJECT public: @@ -99,7 +99,7 @@ private slots: void sourceSize(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; tst_qquickimage::tst_qquickimage() @@ -109,7 +109,7 @@ tst_qquickimage::tst_qquickimage() void tst_qquickimage::noSource() { QString componentStr = "import QtQuick 2.0\nImage { source: \"\" }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -173,7 +173,7 @@ void tst_qquickimage::imageSource() QString componentStr = "import QtQuick 2.0\nImage { source: \"" + source + "\"; asynchronous: " + (async ? QLatin1String("true") : QLatin1String("false")) + "; cache: " + (cache ? QLatin1String("true") : QLatin1String("false")) + " }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -209,9 +209,9 @@ void tst_qquickimage::imageSource() void tst_qquickimage::clearSource() { QString componentStr = "import QtQuick 2.0\nImage { source: srcImage }"; - QDeclarativeContext *ctxt = engine.rootContext(); + QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty("srcImage", testFileUrl("colors.png")); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -233,7 +233,7 @@ void tst_qquickimage::clearSource() void tst_qquickimage::resized() { QString componentStr = "import QtQuick 2.0\nImage { source: \"" + testFile("colors.png") + "\"; width: 300; height: 300 }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -268,7 +268,7 @@ void tst_qquickimage::preserveAspectRatio() void tst_qquickimage::smooth() { QString componentStr = "import QtQuick 2.0\nImage { source: \"" + testFile("colors.png") + "\"; smooth: true; width: 300; height: 300 }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -364,7 +364,7 @@ void tst_qquickimage::svg() QString src = testFileUrl("heart.svg").toString(); QString componentStr = "import QtQuick 2.0\nImage { source: \"" + src + "\"; sourceSize.width: 300; sourceSize.height: 300 }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -434,7 +434,7 @@ void tst_qquickimage::geometry() if (explicitHeight) componentStr.append("height: 400; "); componentStr.append("}"); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -457,7 +457,7 @@ void tst_qquickimage::big() QString src = testFileUrl("big.jpeg").toString(); QString componentStr = "import QtQuick 2.0\nImage { source: \"" + src + "\"; width: 100; sourceSize.height: 256 }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -521,9 +521,9 @@ void tst_qquickimage::noLoading() server.addRedirect("oldcolors.png", SERVER_ADDR "/colors.png"); QString componentStr = "import QtQuick 2.0\nImage { source: srcImage; cache: true }"; - QDeclarativeContext *ctxt = engine.rootContext(); + QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty("srcImage", testFileUrl("heart.png")); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -569,7 +569,7 @@ void tst_qquickimage::paintedWidthHeight() QString src = testFileUrl("heart.png").toString(); QString componentStr = "import QtQuick 2.0\nImage { source: \"" + src + "\"; width: 200; height: 25; fillMode: Image.PreserveAspectFit }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -584,7 +584,7 @@ void tst_qquickimage::paintedWidthHeight() { QString src = testFileUrl("heart.png").toString(); QString componentStr = "import QtQuick 2.0\nImage { source: \"" + src + "\"; width: 26; height: 175; fillMode: Image.PreserveAspectFit }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); @@ -600,9 +600,9 @@ void tst_qquickimage::paintedWidthHeight() void tst_qquickimage::sourceSize_QTBUG_14303() { QString componentStr = "import QtQuick 2.0\nImage { source: srcImage }"; - QDeclarativeContext *ctxt = engine.rootContext(); + QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty("srcImage", testFileUrl("heart200.png")); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickImage *obj = qobject_cast(component.create()); @@ -694,11 +694,11 @@ void tst_qquickimage::imageCrash_QTBUG_22125() qApp->processEvents(); qApp->processEvents(); // shouldn't crash when the view drops out of scope due to - // QDeclarativePixmapData attempting to dereference a pointer to + // QQuickPixmapData attempting to dereference a pointer to // the destroyed reader. } - // shouldn't crash when deleting cancelled QDeclarativePixmapReplys. + // shouldn't crash when deleting cancelled QQmlPixmapReplys. QTest::qWait(520); // Delay mode delays for 500 ms. QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); QCoreApplication::processEvents(); @@ -725,7 +725,7 @@ void tst_qquickimage::sourceSize() QFETCH(qreal, implicitHeight); QQuickView *canvas = new QQuickView(0); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("srcWidth", sourceWidth); ctxt->setContextProperty("srcHeight", sourceHeight); diff --git a/tests/auto/qtquick2/qquickitem/data/order.1.qml b/tests/auto/quick/qquickitem/data/order.1.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem/data/order.1.qml rename to tests/auto/quick/qquickitem/data/order.1.qml diff --git a/tests/auto/qtquick2/qquickitem/data/order.2.qml b/tests/auto/quick/qquickitem/data/order.2.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem/data/order.2.qml rename to tests/auto/quick/qquickitem/data/order.2.qml diff --git a/tests/auto/qtquick2/qquickitem/data/polishOnCompleted.qml b/tests/auto/quick/qquickitem/data/polishOnCompleted.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem/data/polishOnCompleted.qml rename to tests/auto/quick/qquickitem/data/polishOnCompleted.qml diff --git a/tests/auto/qtquick2/qquickitem/qquickitem.pro b/tests/auto/quick/qquickitem/qquickitem.pro similarity index 72% rename from tests/auto/qtquick2/qquickitem/qquickitem.pro rename to tests/auto/quick/qquickitem/qquickitem.pro index 70f6b15b3d..cf24e63d05 100644 --- a/tests/auto/qtquick2/qquickitem/qquickitem.pro +++ b/tests/auto/quick/qquickitem/qquickitem.pro @@ -11,4 +11,4 @@ testDataFiles.path = . DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private widgets testlib +QT += core-private gui-private v8-private qml-private quick-private widgets testlib diff --git a/tests/auto/qtquick2/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp similarity index 99% rename from tests/auto/qtquick2/qquickitem/tst_qquickitem.cpp rename to tests/auto/quick/qquickitem/tst_qquickitem.cpp index be3aef80bd..7a589a48cd 100644 --- a/tests/auto/qtquick2/qquickitem/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp @@ -125,7 +125,7 @@ Q_OBJECT virtual void focusOutEvent(QFocusEvent *) { Q_ASSERT(focused); focused = false; } }; -class tst_qquickitem : public QDeclarativeDataTest +class tst_qquickitem : public QQmlDataTest { Q_OBJECT public: @@ -176,7 +176,7 @@ private slots: void tst_qquickitem::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); qmlRegisterType("Qt.test", 1, 0, "TestPolishItem"); } diff --git a/tests/auto/qtquick2/qquickitem2/data/childrenProperty.qml b/tests/auto/quick/qquickitem2/data/childrenProperty.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/childrenProperty.qml rename to tests/auto/quick/qquickitem2/data/childrenProperty.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/childrenRect.qml b/tests/auto/quick/qquickitem2/data/childrenRect.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/childrenRect.qml rename to tests/auto/quick/qquickitem2/data/childrenRect.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/childrenRectBug.qml b/tests/auto/quick/qquickitem2/data/childrenRectBug.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/childrenRectBug.qml rename to tests/auto/quick/qquickitem2/data/childrenRectBug.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/childrenRectBug2.qml b/tests/auto/quick/qquickitem2/data/childrenRectBug2.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/childrenRectBug2.qml rename to tests/auto/quick/qquickitem2/data/childrenRectBug2.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/childrenRectBug3.qml b/tests/auto/quick/qquickitem2/data/childrenRectBug3.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/childrenRectBug3.qml rename to tests/auto/quick/qquickitem2/data/childrenRectBug3.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/implicitsize.qml b/tests/auto/quick/qquickitem2/data/implicitsize.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/implicitsize.qml rename to tests/auto/quick/qquickitem2/data/implicitsize.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/keynavigationtest.qml b/tests/auto/quick/qquickitem2/data/keynavigationtest.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/keynavigationtest.qml rename to tests/auto/quick/qquickitem2/data/keynavigationtest.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/keynavigationtest_implicit.qml b/tests/auto/quick/qquickitem2/data/keynavigationtest_implicit.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/keynavigationtest_implicit.qml rename to tests/auto/quick/qquickitem2/data/keynavigationtest_implicit.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/keysim.qml b/tests/auto/quick/qquickitem2/data/keysim.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/keysim.qml rename to tests/auto/quick/qquickitem2/data/keysim.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/keyspriority.qml b/tests/auto/quick/qquickitem2/data/keyspriority.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/keyspriority.qml rename to tests/auto/quick/qquickitem2/data/keyspriority.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/keystest.qml b/tests/auto/quick/qquickitem2/data/keystest.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/keystest.qml rename to tests/auto/quick/qquickitem2/data/keystest.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/layoutmirroring.qml b/tests/auto/quick/qquickitem2/data/layoutmirroring.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/layoutmirroring.qml rename to tests/auto/quick/qquickitem2/data/layoutmirroring.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/mapCoordinates.qml b/tests/auto/quick/qquickitem2/data/mapCoordinates.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/mapCoordinates.qml rename to tests/auto/quick/qquickitem2/data/mapCoordinates.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/parentLoop.qml b/tests/auto/quick/qquickitem2/data/parentLoop.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/parentLoop.qml rename to tests/auto/quick/qquickitem2/data/parentLoop.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/propertychanges.qml b/tests/auto/quick/qquickitem2/data/propertychanges.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/propertychanges.qml rename to tests/auto/quick/qquickitem2/data/propertychanges.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/qtbug_16871.qml b/tests/auto/quick/qquickitem2/data/qtbug_16871.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/qtbug_16871.qml rename to tests/auto/quick/qquickitem2/data/qtbug_16871.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/resourcesProperty.qml b/tests/auto/quick/qquickitem2/data/resourcesProperty.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/resourcesProperty.qml rename to tests/auto/quick/qquickitem2/data/resourcesProperty.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/transformCrash.qml b/tests/auto/quick/qquickitem2/data/transformCrash.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/transformCrash.qml rename to tests/auto/quick/qquickitem2/data/transformCrash.qml diff --git a/tests/auto/qtquick2/qquickitem2/data/visiblechildren.qml b/tests/auto/quick/qquickitem2/data/visiblechildren.qml similarity index 100% rename from tests/auto/qtquick2/qquickitem2/data/visiblechildren.qml rename to tests/auto/quick/qquickitem2/data/visiblechildren.qml diff --git a/tests/auto/qtquick2/qquickitem2/qquickitem2.pro b/tests/auto/quick/qquickitem2/qquickitem2.pro similarity index 70% rename from tests/auto/qtquick2/qquickitem2/qquickitem2.pro rename to tests/auto/quick/qquickitem2/qquickitem2.pro index 44d3ba37c8..29897ba3c1 100644 --- a/tests/auto/qtquick2/qquickitem2/qquickitem2.pro +++ b/tests/auto/quick/qquickitem2/qquickitem2.pro @@ -12,4 +12,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/qtquick2/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp similarity index 98% rename from tests/auto/qtquick2/qquickitem2/tst_qquickitem.cpp rename to tests/auto/quick/qquickitem2/tst_qquickitem.cpp index 9891b8718a..c2390c4525 100644 --- a/tests/auto/qtquick2/qquickitem2/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp @@ -40,9 +40,9 @@ ****************************************************************************/ #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -54,7 +54,7 @@ using namespace QQuickVisualTestUtil; -class tst_QQuickItem : public QDeclarativeDataTest +class tst_QQuickItem : public QQmlDataTest { Q_OBJECT public: @@ -94,7 +94,7 @@ private slots: void visibleChildren(); void parentLoop(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; class KeysTestObject : public QObject @@ -185,7 +185,7 @@ tst_QQuickItem::tst_QQuickItem() void tst_QQuickItem::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); qmlRegisterType("Test",1,0,"KeyTestItem"); } @@ -555,7 +555,7 @@ void tst_QQuickItem::layoutMirroring() void tst_QQuickItem::layoutMirroringIllegalParent() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { LayoutMirroring.enabled: true; LayoutMirroring.childrenInherit: true }", QUrl::fromLocalFile("")); QTest::ignoreMessage(QtWarningMsg, "file::1:21: QML QtObject: LayoutDirection attached property only works with Items"); QObject *object = component.create(); @@ -898,7 +898,7 @@ void tst_QQuickItem::keyNavigation_implicitSetting() void tst_QQuickItem::smooth() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Item { smooth: false; }", QUrl::fromLocalFile("")); QQuickItem *item = qobject_cast(component.create()); QSignalSpy spy(item, SIGNAL(smoothChanged(bool))); @@ -927,7 +927,7 @@ void tst_QQuickItem::smooth() void tst_QQuickItem::clip() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nItem { clip: false\n }", QUrl::fromLocalFile("")); QQuickItem *item = qobject_cast(component.create()); QSignalSpy spy(item, SIGNAL(clipChanged(bool))); @@ -1034,7 +1034,7 @@ void tst_QQuickItem::transforms() { QFETCH(QByteArray, qml); QFETCH(QTransform, transform); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nItem { transform: "+qml+"}", QUrl::fromLocalFile("")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -1043,7 +1043,7 @@ void tst_QQuickItem::transforms() void tst_QQuickItem::childrenProperty() { - QDeclarativeComponent component(&engine, testFileUrl("childrenProperty.qml")); + QQmlComponent component(&engine, testFileUrl("childrenProperty.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -1058,7 +1058,7 @@ void tst_QQuickItem::childrenProperty() void tst_QQuickItem::resourcesProperty() { - QDeclarativeComponent component(&engine, testFileUrl("resourcesProperty.qml")); + QQmlComponent component(&engine, testFileUrl("resourcesProperty.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -1288,7 +1288,7 @@ void tst_QQuickItem::implicitSize() void tst_QQuickItem::qtbug_16871() { - QDeclarativeComponent component(&engine, testFileUrl("qtbug_16871.qml")); + QQmlComponent component(&engine, testFileUrl("qtbug_16871.qml")); QObject *o = component.create(); QVERIFY(o != 0); delete o; diff --git a/tests/auto/qtquick2/qquickitemlayer/data/DisableLayer.qml b/tests/auto/quick/qquickitemlayer/data/DisableLayer.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/DisableLayer.qml rename to tests/auto/quick/qquickitemlayer/data/DisableLayer.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/Effect.qml b/tests/auto/quick/qquickitemlayer/data/Effect.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/Effect.qml rename to tests/auto/quick/qquickitemlayer/data/Effect.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/Enabled.qml b/tests/auto/quick/qquickitemlayer/data/Enabled.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/Enabled.qml rename to tests/auto/quick/qquickitemlayer/data/Enabled.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/ItemEffect.qml b/tests/auto/quick/qquickitemlayer/data/ItemEffect.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/ItemEffect.qml rename to tests/auto/quick/qquickitemlayer/data/ItemEffect.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/Mipmap.qml b/tests/auto/quick/qquickitemlayer/data/Mipmap.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/Mipmap.qml rename to tests/auto/quick/qquickitemlayer/data/Mipmap.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/RectangleEffect.qml b/tests/auto/quick/qquickitemlayer/data/RectangleEffect.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/RectangleEffect.qml rename to tests/auto/quick/qquickitemlayer/data/RectangleEffect.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/SamplerNameChange.qml b/tests/auto/quick/qquickitemlayer/data/SamplerNameChange.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/SamplerNameChange.qml rename to tests/auto/quick/qquickitemlayer/data/SamplerNameChange.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/Smooth.qml b/tests/auto/quick/qquickitemlayer/data/Smooth.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/Smooth.qml rename to tests/auto/quick/qquickitemlayer/data/Smooth.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/SourceRect.qml b/tests/auto/quick/qquickitemlayer/data/SourceRect.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/SourceRect.qml rename to tests/auto/quick/qquickitemlayer/data/SourceRect.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/TextureProvider.qml b/tests/auto/quick/qquickitemlayer/data/TextureProvider.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/TextureProvider.qml rename to tests/auto/quick/qquickitemlayer/data/TextureProvider.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/ToggleLayerAndEffect.qml b/tests/auto/quick/qquickitemlayer/data/ToggleLayerAndEffect.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/ToggleLayerAndEffect.qml rename to tests/auto/quick/qquickitemlayer/data/ToggleLayerAndEffect.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/Visible.qml b/tests/auto/quick/qquickitemlayer/data/Visible.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/Visible.qml rename to tests/auto/quick/qquickitemlayer/data/Visible.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/ZOrder.qml b/tests/auto/quick/qquickitemlayer/data/ZOrder.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/ZOrder.qml rename to tests/auto/quick/qquickitemlayer/data/ZOrder.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/data/ZOrderChange.qml b/tests/auto/quick/qquickitemlayer/data/ZOrderChange.qml similarity index 100% rename from tests/auto/qtquick2/qquickitemlayer/data/ZOrderChange.qml rename to tests/auto/quick/qquickitemlayer/data/ZOrderChange.qml diff --git a/tests/auto/qtquick2/qquickitemlayer/qquickitemlayer.pro b/tests/auto/quick/qquickitemlayer/qquickitemlayer.pro similarity index 88% rename from tests/auto/qtquick2/qquickitemlayer/qquickitemlayer.pro rename to tests/auto/quick/qquickitemlayer/qquickitemlayer.pro index 557e23d150..a2d5f401ff 100644 --- a/tests/auto/qtquick2/qquickitemlayer/qquickitemlayer.pro +++ b/tests/auto/quick/qquickitemlayer/qquickitemlayer.pro @@ -11,7 +11,7 @@ DEPLOYMENT += testDataFiles include(../../shared/util.pri) CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private testlib +QT += core-private gui-private v8-private qml-private quick-private testlib OTHER_FILES += \ data/Smooth.qml \ diff --git a/tests/auto/qtquick2/qquickitemlayer/tst_qquickitemlayer.cpp b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp similarity index 99% rename from tests/auto/qtquick2/qquickitemlayer/tst_qquickitemlayer.cpp rename to tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp index 2a856707ba..44d0d6d09c 100644 --- a/tests/auto/qtquick2/qquickitemlayer/tst_qquickitemlayer.cpp +++ b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp @@ -47,7 +47,7 @@ #include "../../shared/util.h" -class tst_QQuickItemLayer: public QDeclarativeDataTest +class tst_QQuickItemLayer: public QQmlDataTest { Q_OBJECT public: diff --git a/tests/auto/qtquick2/qquicklistview/data/ComponentView.qml b/tests/auto/quick/qquicklistview/data/ComponentView.qml similarity index 100% rename from tests/auto/qtquick2/qquicklistview/data/ComponentView.qml rename to tests/auto/quick/qquicklistview/data/ComponentView.qml diff --git a/tests/auto/qtquick2/qquicklistview/data/Page.qml b/tests/auto/quick/qquicklistview/data/Page.qml similarity index 100% rename from tests/auto/qtquick2/qquicklistview/data/Page.qml rename to tests/auto/quick/qquicklistview/data/Page.qml diff --git a/tests/auto/qtquick2/qquicklistview/data/addTransitions.qml b/tests/auto/quick/qquicklistview/data/addTransitions.qml similarity index 98% rename from tests/auto/qtquick2/qquicklistview/data/addTransitions.qml rename to tests/auto/quick/qquicklistview/data/addTransitions.qml index ff90ead8a6..6a7c3234f6 100644 --- a/tests/auto/qtquick2/qquicklistview/data/addTransitions.qml +++ b/tests/auto/quick/qquicklistview/data/addTransitions.qml @@ -65,7 +65,7 @@ Rectangle { model: testModel delegate: myDelegate - // for QDeclarativeListProperty types + // for QQmlListProperty types function copyList(propList) { var temp = new Array() for (var i=0; i #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include -#include +#include +#include #include "../../shared/util.h" #include "../shared/viewtestutil.h" #include "../shared/visualtestutil.h" @@ -63,7 +64,7 @@ Q_DECLARE_METATYPE(QQuickListView::Orientation) using namespace QQuickViewTestUtil; using namespace QQuickVisualTestUtil; -class tst_QQuickListView : public QDeclarativeDataTest +class tst_QQuickListView : public QQmlDataTest { Q_OBJECT public: @@ -255,7 +256,7 @@ void tst_QQuickListView::items(const QUrl &source, bool forceLayout) model.addItem("John", "2345"); model.addItem("Bob", "54321"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -339,7 +340,7 @@ void tst_QQuickListView::changed(const QUrl &source, bool forceLayout) model.addItem("John", "2345"); model.addItem("Bob", "54321"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -381,7 +382,7 @@ void tst_QQuickListView::inserted(const QUrl &source) model.addItem("John", "2345"); model.addItem("Bob", "54321"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -481,7 +482,7 @@ void tst_QQuickListView::inserted_more() model.addItem("Item" + QString::number(i), ""); QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -514,7 +515,7 @@ void tst_QQuickListView::inserted_more() int firstVisibleIndex = -1; for (int i=0; iy() >= contentY) { - QDeclarativeExpression e(qmlContext(items[i]), items[i], "index"); + QQmlExpression e(qmlContext(items[i]), items[i], "index"); firstVisibleIndex = e.evaluate().toInt(); break; } @@ -634,7 +635,7 @@ void tst_QQuickListView::insertBeforeVisible() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -724,7 +725,7 @@ void tst_QQuickListView::removed(const QUrl &source, bool /* animated */) for (int i = 0; i < 50; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -913,7 +914,7 @@ void tst_QQuickListView::removed_more(const QUrl &source) for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -947,7 +948,7 @@ void tst_QQuickListView::removed_more(const QUrl &source) QList items = findItems(contentItem, "wrapper"); for (int i=0; iy() >= contentY) { - QDeclarativeExpression e(qmlContext(items[i]), items[i], "index"); + QQmlExpression e(qmlContext(items[i]), items[i], "index"); firstVisibleIndex = e.evaluate().toInt(); break; } @@ -1084,7 +1085,7 @@ void tst_QQuickListView::clear(const QUrl &source) for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -1134,7 +1135,7 @@ void tst_QQuickListView::moved(const QUrl &source) for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -1165,7 +1166,7 @@ void tst_QQuickListView::moved(const QUrl &source) int firstVisibleIndex = -1; for (int i=0; iy() >= contentY) { - QDeclarativeExpression e(qmlContext(items[i]), items[i], "index"); + QQmlExpression e(qmlContext(items[i]), items[i], "index"); firstVisibleIndex = e.evaluate().toInt(); break; } @@ -1360,7 +1361,7 @@ void tst_QQuickListView::multipleChanges() for (int i = 0; i < startCount; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -1586,7 +1587,7 @@ void tst_QQuickListView::swapWithFirstItem() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -1617,7 +1618,7 @@ void tst_QQuickListView::enforceRange() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("listview-enforcerange.qml")); @@ -1678,7 +1679,7 @@ void tst_QQuickListView::enforceRange_withoutHighlight() model.addItem("Item 2", "b"); model.addItem("Item 3", "c"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("listview-enforcerange-nohighlight.qml")); @@ -1718,7 +1719,7 @@ void tst_QQuickListView::spacing() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -1780,7 +1781,7 @@ void tst_QQuickListView::sections(const QUrl &source) for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), QString::number(i/5)); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(source); @@ -1879,7 +1880,7 @@ void tst_QQuickListView::sectionsDelegate() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), QString::number(i/5)); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("listview-sections_delegate.qml")); @@ -2002,7 +2003,7 @@ void tst_QQuickListView::sectionsPositioning() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), QString::number(i/5)); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("listview-sections_delegate.qml")); @@ -2171,7 +2172,7 @@ void tst_QQuickListView::currentIndex() QQuickView *canvas = new QQuickView(0); canvas->setGeometry(0,0,240,320); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testWrap", QVariant(false)); @@ -2308,7 +2309,7 @@ void tst_QQuickListView::noCurrentIndex() QQuickView *canvas = new QQuickView(0); canvas->setGeometry(0,0,240,320); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); QString filename(testFile("listview-noCurrent.qml")); @@ -2386,7 +2387,7 @@ void tst_QQuickListView::cacheBuffer() for (int i = 0; i < 90; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -2414,7 +2415,7 @@ void tst_QQuickListView::cacheBuffer() QTRY_VERIFY(item->y() == i*20); } - QDeclarativeIncubationController controller; + QQmlIncubationController controller; canvas->engine()->setIncubationController(&controller); testObject->setCacheBuffer(200); @@ -2487,7 +2488,7 @@ void tst_QQuickListView::positionViewAtIndex() for (int i = 0; i < 40; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -2655,7 +2656,7 @@ void tst_QQuickListView::resetModel() strings << "one" << "two" << "three"; QStringListModel model(strings); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("displaylist.qml")); @@ -2768,10 +2769,10 @@ void tst_QQuickListView::componentChanges() QQuickListView *listView = canvas->rootObject()->findChild("listView"); QTRY_VERIFY(listView); - QDeclarativeComponent component(canvas->engine()); + QQmlComponent component(canvas->engine()); component.setData("import QtQuick 2.0; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile("")); - QDeclarativeComponent delegateComponent(canvas->engine()); + QQmlComponent delegateComponent(canvas->engine()); delegateComponent.setData("import QtQuick 2.0; Text { text: 'Name: ' + name }", QUrl::fromLocalFile("")); QSignalSpy highlightSpy(listView, SIGNAL(highlightChanged())); @@ -2816,7 +2817,7 @@ void tst_QQuickListView::modelChanges() QQuickListView *listView = canvas->rootObject()->findChild("listView"); QTRY_VERIFY(listView); - QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild("alternateModel"); + QQuickListModel *alternateModel = canvas->rootObject()->findChild("alternateModel"); QTRY_VERIFY(alternateModel); QVariant modelVariant = QVariant::fromValue(alternateModel); QSignalSpy modelSpy(listView, SIGNAL(modelChanged())); @@ -2913,7 +2914,7 @@ void tst_QQuickListView::QTBUG_11105() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -3152,7 +3153,7 @@ void tst_QQuickListView::footer() for (int i = 0; i < 3; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("footer.qml")); @@ -3308,7 +3309,7 @@ void tst_QQuickListView::headerFooter() QQuickView *canvas = createView(); QmlListModel model; - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("headerfooter.qml")); @@ -3338,7 +3339,7 @@ void tst_QQuickListView::headerFooter() QQuickView *canvas = createView(); QmlListModel model; - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("headerfooter.qml")); @@ -3369,7 +3370,7 @@ void tst_QQuickListView::headerFooter() QQuickView *canvas = createView(); QmlListModel model; - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("headerfooter.qml")); @@ -3406,7 +3407,7 @@ void tst_QQuickListView::resizeView() for (int i = 0; i < 40; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -3486,7 +3487,7 @@ void tst_QQuickListView::resizeViewAndRepaint() for (int i = 0; i < 40; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("initialHeight", 100); @@ -3521,7 +3522,7 @@ void tst_QQuickListView::sizeLessThan1() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -3581,7 +3582,7 @@ void tst_QQuickListView::resizeDelegate() strings << QString::number(i); QStringListModel model(strings); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("displaylist.qml")); @@ -3662,7 +3663,7 @@ void tst_QQuickListView::resizeFirstDelegate() for (int i = 0; i < 10; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -3770,7 +3771,7 @@ void tst_QQuickListView::indexAt_itemAt() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); TestObject *testObject = new TestObject; @@ -3804,7 +3805,7 @@ void tst_QQuickListView::incrementalModel() QQuickView *canvas = createView(); IncrementalModel model; - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("displaylist.qml")); @@ -3839,7 +3840,7 @@ void tst_QQuickListView::onAdd() QQuickView *canvas = createView(); canvas->setGeometry(0,0,200, delegateHeight * (initialItemCount + itemsToAdd)); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("delegateHeight", delegateHeight); canvas->setSource(testFileUrl("attachedSignals.qml")); @@ -3893,7 +3894,7 @@ void tst_QQuickListView::onRemove() model.addItem(QString("value %1").arg(i), "dummy value"); QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("delegateHeight", delegateHeight); canvas->setSource(testFileUrl("attachedSignals.qml")); @@ -4054,7 +4055,7 @@ void tst_QQuickListView::margins() for (int i = 0; i < 50; i++) model.addItem("Item" + QString::number(i), ""); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("margins.qml")); @@ -4462,7 +4463,7 @@ void tst_QQuickListView::asynchronous() { QQuickView *canvas = createView(); canvas->show(); - QDeclarativeIncubationController controller; + QQmlIncubationController controller; canvas->engine()->setIncubationController(&controller); canvas->setSource(testFileUrl("asyncloader.qml")); @@ -4629,7 +4630,7 @@ void tst_QQuickListView::unrequestedVisibility() QQuickView *canvas = new QQuickView(0); canvas->setGeometry(0,0,240,320); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testWrap", QVariant(false)); @@ -4940,7 +4941,7 @@ void tst_QQuickListView::addTransitions() QaimModel model_displacedItems_transitionVia; QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); TestObject *testObject = new TestObject; ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("model_targetItems_transitionFrom", &model_targetItems_transitionFrom); @@ -5019,7 +5020,7 @@ void tst_QQuickListView::addTransitions() int itemCount = items.count(); for (int i=0; iy() >= contentY) { - QDeclarativeExpression e(qmlContext(items[i]), items[i], "index"); + QQmlExpression e(qmlContext(items[i]), items[i], "index"); firstVisibleIndex = e.evaluate().toInt(); break; } @@ -5134,7 +5135,7 @@ void tst_QQuickListView::moveTransitions() QaimModel model_displacedItems_transitionVia; QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); TestObject *testObject = new TestObject; ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("model_targetItems_transitionVia", &model_targetItems_transitionVia); @@ -5202,7 +5203,7 @@ void tst_QQuickListView::moveTransitions() int firstVisibleIndex = -1; for (int i=0; iy() >= contentY) { - QDeclarativeExpression e(qmlContext(items[i]), items[i], "index"); + QQmlExpression e(qmlContext(items[i]), items[i], "index"); firstVisibleIndex = e.evaluate().toInt(); break; } @@ -5336,7 +5337,7 @@ void tst_QQuickListView::removeTransitions() QaimModel model_displacedItems_transitionVia; QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); TestObject *testObject = new TestObject; ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("model_targetItems_transitionTo", &model_targetItems_transitionTo); @@ -5413,7 +5414,7 @@ void tst_QQuickListView::removeTransitions() int itemCount = items.count(); for (int i=0; iy() >= contentY) firstVisibleIndex = index; @@ -5527,7 +5528,7 @@ void tst_QQuickListView::multipleTransitions() model.addItem("Original item" + QString::number(i), ""); QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); TestObject *testObject = new TestObject; ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("testObject", testObject); @@ -5607,7 +5608,7 @@ void tst_QQuickListView::multipleTransitions() int firstVisibleIndex = -1; for (int i=0; iy() >= contentY) { - QDeclarativeExpression e(qmlContext(items[i]), items[i], "index"); + QQmlExpression e(qmlContext(items[i]), items[i], "index"); firstVisibleIndex = e.evaluate().toInt(); break; } diff --git a/tests/auto/qtquick2/qquickloader/data/ActiveComponent.qml b/tests/auto/quick/qquickloader/data/ActiveComponent.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/ActiveComponent.qml rename to tests/auto/quick/qquickloader/data/ActiveComponent.qml diff --git a/tests/auto/qtquick2/qquickloader/data/AnchoredLoader.qml b/tests/auto/quick/qquickloader/data/AnchoredLoader.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/AnchoredLoader.qml rename to tests/auto/quick/qquickloader/data/AnchoredLoader.qml diff --git a/tests/auto/qtquick2/qquickloader/data/BigComponent.qml b/tests/auto/quick/qquickloader/data/BigComponent.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/BigComponent.qml rename to tests/auto/quick/qquickloader/data/BigComponent.qml diff --git a/tests/auto/qtquick2/qquickloader/data/BlueRect.qml b/tests/auto/quick/qquickloader/data/BlueRect.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/BlueRect.qml rename to tests/auto/quick/qquickloader/data/BlueRect.qml diff --git a/tests/auto/qtquick2/qquickloader/data/CreationContextLoader.qml b/tests/auto/quick/qquickloader/data/CreationContextLoader.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/CreationContextLoader.qml rename to tests/auto/quick/qquickloader/data/CreationContextLoader.qml diff --git a/tests/auto/qtquick2/qquickloader/data/GraphicsWidget250x250.qml b/tests/auto/quick/qquickloader/data/GraphicsWidget250x250.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/GraphicsWidget250x250.qml rename to tests/auto/quick/qquickloader/data/GraphicsWidget250x250.qml diff --git a/tests/auto/qtquick2/qquickloader/data/GreenRect.qml b/tests/auto/quick/qquickloader/data/GreenRect.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/GreenRect.qml rename to tests/auto/quick/qquickloader/data/GreenRect.qml diff --git a/tests/auto/qtquick2/qquickloader/data/InitialPropertyValuesComponent.qml b/tests/auto/quick/qquickloader/data/InitialPropertyValuesComponent.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/InitialPropertyValuesComponent.qml rename to tests/auto/quick/qquickloader/data/InitialPropertyValuesComponent.qml diff --git a/tests/auto/qtquick2/qquickloader/data/InvalidSourceComponent.qml b/tests/auto/quick/qquickloader/data/InvalidSourceComponent.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/InvalidSourceComponent.qml rename to tests/auto/quick/qquickloader/data/InvalidSourceComponent.qml diff --git a/tests/auto/qtquick2/qquickloader/data/NoResize.qml b/tests/auto/quick/qquickloader/data/NoResize.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/NoResize.qml rename to tests/auto/quick/qquickloader/data/NoResize.qml diff --git a/tests/auto/qtquick2/qquickloader/data/NoResizeGraphicsWidget.qml b/tests/auto/quick/qquickloader/data/NoResizeGraphicsWidget.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/NoResizeGraphicsWidget.qml rename to tests/auto/quick/qquickloader/data/NoResizeGraphicsWidget.qml diff --git a/tests/auto/qtquick2/qquickloader/data/QTBUG_16928.qml b/tests/auto/quick/qquickloader/data/QTBUG_16928.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/QTBUG_16928.qml rename to tests/auto/quick/qquickloader/data/QTBUG_16928.qml diff --git a/tests/auto/qtquick2/qquickloader/data/QTBUG_17114.qml b/tests/auto/quick/qquickloader/data/QTBUG_17114.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/QTBUG_17114.qml rename to tests/auto/quick/qquickloader/data/QTBUG_17114.qml diff --git a/tests/auto/qtquick2/qquickloader/data/Rect120x60.qml b/tests/auto/quick/qquickloader/data/Rect120x60.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/Rect120x60.qml rename to tests/auto/quick/qquickloader/data/Rect120x60.qml diff --git a/tests/auto/qtquick2/qquickloader/data/SetSourceComponent.qml b/tests/auto/quick/qquickloader/data/SetSourceComponent.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/SetSourceComponent.qml rename to tests/auto/quick/qquickloader/data/SetSourceComponent.qml diff --git a/tests/auto/qtquick2/qquickloader/data/SizeGraphicsWidgetToLoader.qml b/tests/auto/quick/qquickloader/data/SizeGraphicsWidgetToLoader.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/SizeGraphicsWidgetToLoader.qml rename to tests/auto/quick/qquickloader/data/SizeGraphicsWidgetToLoader.qml diff --git a/tests/auto/qtquick2/qquickloader/data/SizeLoaderToGraphicsWidget.qml b/tests/auto/quick/qquickloader/data/SizeLoaderToGraphicsWidget.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/SizeLoaderToGraphicsWidget.qml rename to tests/auto/quick/qquickloader/data/SizeLoaderToGraphicsWidget.qml diff --git a/tests/auto/qtquick2/qquickloader/data/SizeToItem.qml b/tests/auto/quick/qquickloader/data/SizeToItem.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/SizeToItem.qml rename to tests/auto/quick/qquickloader/data/SizeToItem.qml diff --git a/tests/auto/qtquick2/qquickloader/data/SizeToLoader.qml b/tests/auto/quick/qquickloader/data/SizeToLoader.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/SizeToLoader.qml rename to tests/auto/quick/qquickloader/data/SizeToLoader.qml diff --git a/tests/auto/qtquick2/qquickloader/data/VmeError.qml b/tests/auto/quick/qquickloader/data/VmeError.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/VmeError.qml rename to tests/auto/quick/qquickloader/data/VmeError.qml diff --git a/tests/auto/qtquick2/qquickloader/data/active.1.qml b/tests/auto/quick/qquickloader/data/active.1.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/active.1.qml rename to tests/auto/quick/qquickloader/data/active.1.qml diff --git a/tests/auto/qtquick2/qquickloader/data/active.2.qml b/tests/auto/quick/qquickloader/data/active.2.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/active.2.qml rename to tests/auto/quick/qquickloader/data/active.2.qml diff --git a/tests/auto/qtquick2/qquickloader/data/active.3.qml b/tests/auto/quick/qquickloader/data/active.3.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/active.3.qml rename to tests/auto/quick/qquickloader/data/active.3.qml diff --git a/tests/auto/qtquick2/qquickloader/data/active.4.qml b/tests/auto/quick/qquickloader/data/active.4.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/active.4.qml rename to tests/auto/quick/qquickloader/data/active.4.qml diff --git a/tests/auto/qtquick2/qquickloader/data/active.5.qml b/tests/auto/quick/qquickloader/data/active.5.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/active.5.qml rename to tests/auto/quick/qquickloader/data/active.5.qml diff --git a/tests/auto/qtquick2/qquickloader/data/active.6.qml b/tests/auto/quick/qquickloader/data/active.6.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/active.6.qml rename to tests/auto/quick/qquickloader/data/active.6.qml diff --git a/tests/auto/qtquick2/qquickloader/data/active.7.qml b/tests/auto/quick/qquickloader/data/active.7.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/active.7.qml rename to tests/auto/quick/qquickloader/data/active.7.qml diff --git a/tests/auto/qtquick2/qquickloader/data/active.8.qml b/tests/auto/quick/qquickloader/data/active.8.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/active.8.qml rename to tests/auto/quick/qquickloader/data/active.8.qml diff --git a/tests/auto/qtquick2/qquickloader/data/asynchronous.qml b/tests/auto/quick/qquickloader/data/asynchronous.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/asynchronous.qml rename to tests/auto/quick/qquickloader/data/asynchronous.qml diff --git a/tests/auto/qtquick2/qquickloader/data/crash.qml b/tests/auto/quick/qquickloader/data/crash.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/crash.qml rename to tests/auto/quick/qquickloader/data/crash.qml diff --git a/tests/auto/qtquick2/qquickloader/data/creationContext.qml b/tests/auto/quick/qquickloader/data/creationContext.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/creationContext.qml rename to tests/auto/quick/qquickloader/data/creationContext.qml diff --git a/tests/auto/qtquick2/qquickloader/data/differentorigin.qml b/tests/auto/quick/qquickloader/data/differentorigin.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/differentorigin.qml rename to tests/auto/quick/qquickloader/data/differentorigin.qml diff --git a/tests/auto/qtquick2/qquickloader/data/implicitSize.qml b/tests/auto/quick/qquickloader/data/implicitSize.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/implicitSize.qml rename to tests/auto/quick/qquickloader/data/implicitSize.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.1.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.1.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.1.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.1.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.2.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.2.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.2.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.2.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.3.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.3.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.3.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.3.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.4.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.4.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.4.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.4.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.5.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.5.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.5.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.5.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.6.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.6.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.6.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.6.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.7.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.7.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.7.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.7.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.8.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.8.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.8.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.8.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.binding.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.binding.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.binding.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.binding.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.error.1.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.error.1.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.error.1.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.error.1.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.error.2.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.error.2.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.error.2.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.error.2.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.error.3.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.error.3.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.error.3.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.error.3.qml diff --git a/tests/auto/qtquick2/qquickloader/data/initialPropertyValues.error.4.qml b/tests/auto/quick/qquickloader/data/initialPropertyValues.error.4.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/initialPropertyValues.error.4.qml rename to tests/auto/quick/qquickloader/data/initialPropertyValues.error.4.qml diff --git a/tests/auto/qtquick2/qquickloader/data/nonItem.qml b/tests/auto/quick/qquickloader/data/nonItem.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/nonItem.qml rename to tests/auto/quick/qquickloader/data/nonItem.qml diff --git a/tests/auto/qtquick2/qquickloader/data/parented.qml b/tests/auto/quick/qquickloader/data/parented.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/parented.qml rename to tests/auto/quick/qquickloader/data/parented.qml diff --git a/tests/auto/qtquick2/qquickloader/data/qmldir b/tests/auto/quick/qquickloader/data/qmldir similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/qmldir rename to tests/auto/quick/qquickloader/data/qmldir diff --git a/tests/auto/qtquick2/qquickloader/data/sameorigin-load.qml b/tests/auto/quick/qquickloader/data/sameorigin-load.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/sameorigin-load.qml rename to tests/auto/quick/qquickloader/data/sameorigin-load.qml diff --git a/tests/auto/qtquick2/qquickloader/data/sameorigin.qml b/tests/auto/quick/qquickloader/data/sameorigin.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/sameorigin.qml rename to tests/auto/quick/qquickloader/data/sameorigin.qml diff --git a/tests/auto/qtquick2/qquickloader/data/sizebound.qml b/tests/auto/quick/qquickloader/data/sizebound.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/sizebound.qml rename to tests/auto/quick/qquickloader/data/sizebound.qml diff --git a/tests/auto/qtquick2/qquickloader/data/vmeErrors.qml b/tests/auto/quick/qquickloader/data/vmeErrors.qml similarity index 100% rename from tests/auto/qtquick2/qquickloader/data/vmeErrors.qml rename to tests/auto/quick/qquickloader/data/vmeErrors.qml diff --git a/tests/auto/qtquick2/qquickloader/qquickloader.pro b/tests/auto/quick/qquickloader/qquickloader.pro similarity index 81% rename from tests/auto/qtquick2/qquickloader/qquickloader.pro rename to tests/auto/quick/qquickloader/qquickloader.pro index 33c8c207af..fd525351ab 100644 --- a/tests/auto/qtquick2/qquickloader/qquickloader.pro +++ b/tests/auto/quick/qquickloader/qquickloader.pro @@ -16,4 +16,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private network testlib +QT += core-private gui-private qml-private quick-private network testlib diff --git a/tests/auto/qtquick2/qquickloader/tst_qquickloader.cpp b/tests/auto/quick/qquickloader/tst_qquickloader.cpp similarity index 91% rename from tests/auto/qtquick2/qquickloader/tst_qquickloader.cpp rename to tests/auto/quick/qquickloader/tst_qquickloader.cpp index 33148db7b1..77d0c29220 100644 --- a/tests/auto/qtquick2/qquickloader/tst_qquickloader.cpp +++ b/tests/auto/quick/qquickloader/tst_qquickloader.cpp @@ -42,9 +42,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include "testhttpserver.h" #include "../../shared/util.h" @@ -52,7 +52,7 @@ #define SERVER_PORT 14450 class PeriodicIncubationController : public QObject, - public QDeclarativeIncubationController + public QQmlIncubationController { public: PeriodicIncubationController() { @@ -65,7 +65,7 @@ class PeriodicIncubationController : public QObject, } }; -class tst_QQuickLoader : public QDeclarativeDataTest +class tst_QQuickLoader : public QQmlDataTest { Q_OBJECT @@ -107,7 +107,7 @@ private slots: void sizeBound(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; @@ -126,7 +126,7 @@ void tst_QQuickLoader::sourceOrComponent() if (error) QTest::ignoreMessage(QtWarningMsg, errorString.toUtf8().constData()); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(QByteArray( "import QtQuick 2.0\n" "Loader {\n" @@ -159,7 +159,7 @@ void tst_QQuickLoader::sourceOrComponent() if (!error) { bool sourceComponentIsChildOfLoader = false; for (int ii = 0; ii < loader->children().size(); ++ii) { - QDeclarativeComponent *c = qobject_cast(loader->children().at(ii)); + QQmlComponent *c = qobject_cast(loader->children().at(ii)); if (c && c == loader->sourceComponent()) { sourceComponentIsChildOfLoader = true; } @@ -199,7 +199,7 @@ void tst_QQuickLoader::sourceOrComponent_data() void tst_QQuickLoader::clear() { { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(QByteArray( "import QtQuick 2.0\n" " Loader { id: loader\n" @@ -221,7 +221,7 @@ void tst_QQuickLoader::clear() delete loader; } { - QDeclarativeComponent component(&engine, testFileUrl("/SetSourceComponent.qml")); + QQmlComponent component(&engine, testFileUrl("/SetSourceComponent.qml")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -241,7 +241,7 @@ void tst_QQuickLoader::clear() delete item; } { - QDeclarativeComponent component(&engine, testFileUrl("/SetSourceComponent.qml")); + QQmlComponent component(&engine, testFileUrl("/SetSourceComponent.qml")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -264,7 +264,7 @@ void tst_QQuickLoader::clear() void tst_QQuickLoader::urlToComponent() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\n" "Loader {\n" " id: loader\n" @@ -287,7 +287,7 @@ void tst_QQuickLoader::urlToComponent() void tst_QQuickLoader::componentToUrl() { - QDeclarativeComponent component(&engine, testFileUrl("/SetSourceComponent.qml")); + QQmlComponent component(&engine, testFileUrl("/SetSourceComponent.qml")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -309,7 +309,7 @@ void tst_QQuickLoader::componentToUrl() void tst_QQuickLoader::anchoredLoader() { - QDeclarativeComponent component(&engine, testFileUrl("/AnchoredLoader.qml")); + QQmlComponent component(&engine, testFileUrl("/AnchoredLoader.qml")); QQuickItem *rootItem = qobject_cast(component.create()); QVERIFY(rootItem != 0); QQuickItem *loader = rootItem->findChild("loader"); @@ -330,7 +330,7 @@ void tst_QQuickLoader::anchoredLoader() void tst_QQuickLoader::sizeLoaderToItem() { - QDeclarativeComponent component(&engine, testFileUrl("/SizeToItem.qml")); + QQmlComponent component(&engine, testFileUrl("/SizeToItem.qml")); QQuickLoader *loader = qobject_cast(component.create()); QVERIFY(loader != 0); QCOMPARE(loader->width(), 120.0); @@ -371,7 +371,7 @@ void tst_QQuickLoader::sizeLoaderToItem() void tst_QQuickLoader::sizeItemToLoader() { - QDeclarativeComponent component(&engine, testFileUrl("/SizeToLoader.qml")); + QQmlComponent component(&engine, testFileUrl("/SizeToLoader.qml")); QQuickLoader *loader = qobject_cast(component.create()); QVERIFY(loader != 0); QCOMPARE(loader->width(), 200.0); @@ -401,7 +401,7 @@ void tst_QQuickLoader::sizeItemToLoader() void tst_QQuickLoader::noResize() { - QDeclarativeComponent component(&engine, testFileUrl("/NoResize.qml")); + QQmlComponent component(&engine, testFileUrl("/NoResize.qml")); QQuickItem* item = qobject_cast(component.create()); QVERIFY(item != 0); QCOMPARE(item->width(), 200.0); @@ -416,7 +416,7 @@ void tst_QQuickLoader::networkRequestUrl() QVERIFY(server.isValid()); server.serveDirectory(dataDirectory()); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nLoader { property int signalCount : 0; source: \"http://127.0.0.1:14450/Rect120x60.qml\"; onLoaded: signalCount += 1 }"), testFileUrl("../dummy.qml")); if (component.isError()) qDebug() << component.errors(); @@ -440,7 +440,7 @@ void tst_QQuickLoader::networkComponent() QVERIFY(server.isValid()); server.serveDirectory("slowdata", TestHTTPServer::Delay); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(QByteArray( "import QtQuick 2.0\n" "import \"http://127.0.0.1:14450/\" as NW\n" @@ -473,7 +473,7 @@ void tst_QQuickLoader::failNetworkRequest() QTest::ignoreMessage(QtWarningMsg, "http://127.0.0.1:14450/IDontExist.qml: File not found"); - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nLoader { property int did_load: 123; source: \"http://127.0.0.1:14450/IDontExist.qml\"; onLoaded: did_load=456 }"), QUrl::fromLocalFile("http://127.0.0.1:14450/dummy.qml")); QQuickLoader *loader = qobject_cast(component.create()); QVERIFY(loader != 0); @@ -492,7 +492,7 @@ void tst_QQuickLoader::active() { // check that the item isn't instantiated until active is set to true { - QDeclarativeComponent component(&engine, testFileUrl("active.1.qml")); + QQmlComponent component(&engine, testFileUrl("active.1.qml")); QObject *object = component.create(); QVERIFY(object != 0); QQuickLoader *loader = object->findChild("loader"); @@ -511,7 +511,7 @@ void tst_QQuickLoader::active() // check that the status is Null if active is set to false { - QDeclarativeComponent component(&engine, testFileUrl("active.2.qml")); + QQmlComponent component(&engine, testFileUrl("active.2.qml")); QObject *object = component.create(); QVERIFY(object != 0); QQuickLoader *loader = object->findChild("loader"); @@ -528,7 +528,7 @@ void tst_QQuickLoader::active() // check that the source is not cleared if active is set to false { - QDeclarativeComponent component(&engine, testFileUrl("active.3.qml")); + QQmlComponent component(&engine, testFileUrl("active.3.qml")); QObject *object = component.create(); QVERIFY(object != 0); QQuickLoader *loader = object->findChild("loader"); @@ -545,7 +545,7 @@ void tst_QQuickLoader::active() // check that the sourceComponent is not cleared if active is set to false { - QDeclarativeComponent component(&engine, testFileUrl("active.4.qml")); + QQmlComponent component(&engine, testFileUrl("active.4.qml")); QObject *object = component.create(); QVERIFY(object != 0); QQuickLoader *loader = object->findChild("loader"); @@ -562,7 +562,7 @@ void tst_QQuickLoader::active() // check that the item is released if active is set to false { - QDeclarativeComponent component(&engine, testFileUrl("active.5.qml")); + QQmlComponent component(&engine, testFileUrl("active.5.qml")); QObject *object = component.create(); QVERIFY(object != 0); QQuickLoader *loader = object->findChild("loader"); @@ -579,7 +579,7 @@ void tst_QQuickLoader::active() // check that the activeChanged signal is emitted correctly { - QDeclarativeComponent component(&engine, testFileUrl("active.6.qml")); + QQmlComponent component(&engine, testFileUrl("active.6.qml")); QObject *object = component.create(); QVERIFY(object != 0); QQuickLoader *loader = object->findChild("loader"); @@ -609,7 +609,7 @@ void tst_QQuickLoader::active() // check that the component isn't loaded until active is set to true { - QDeclarativeComponent component(&engine, testFileUrl("active.7.qml")); + QQmlComponent component(&engine, testFileUrl("active.7.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("success").toBool(), true); @@ -618,7 +618,7 @@ void tst_QQuickLoader::active() // check that the component is loaded if active is not set (true by default) { - QDeclarativeComponent component(&engine, testFileUrl("active.8.qml")); + QQmlComponent component(&engine, testFileUrl("active.8.qml")); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("success").toBool(), true); @@ -688,7 +688,7 @@ void tst_QQuickLoader::initialPropertyValues() foreach (const QString &warning, expectedWarnings) QTest::ignoreMessage(QtWarningMsg, warning.toAscii().constData()); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); qApp->processEvents(); @@ -702,7 +702,7 @@ void tst_QQuickLoader::initialPropertyValues() void tst_QQuickLoader::initialPropertyValuesBinding() { - QDeclarativeComponent component(&engine, testFileUrl("initialPropertyValues.binding.qml")); + QQmlComponent component(&engine, testFileUrl("initialPropertyValues.binding.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -739,7 +739,7 @@ void tst_QQuickLoader::initialPropertyValuesError() foreach (const QString &warning, expectedWarnings) QTest::ignoreMessage(QtWarningMsg, warning.toUtf8().constData()); - QDeclarativeComponent component(&engine, qmlFile); + QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); QQuickLoader *loader = object->findChild("loader"); @@ -751,7 +751,7 @@ void tst_QQuickLoader::initialPropertyValuesError() // QTBUG-9241 void tst_QQuickLoader::deleteComponentCrash() { - QDeclarativeComponent component(&engine, testFileUrl("crash.qml")); + QQmlComponent component(&engine, testFileUrl("crash.qml")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -773,7 +773,7 @@ void tst_QQuickLoader::deleteComponentCrash() void tst_QQuickLoader::nonItem() { - QDeclarativeComponent component(&engine, testFileUrl("nonItem.qml")); + QQmlComponent component(&engine, testFileUrl("nonItem.qml")); QString err = testFileUrl("nonItem.qml").toString() + ":3:1: QML Loader: Loader does not support loading non-visual elements."; QTest::ignoreMessage(QtWarningMsg, err.toLatin1().constData()); @@ -786,7 +786,7 @@ void tst_QQuickLoader::nonItem() void tst_QQuickLoader::vmeErrors() { - QDeclarativeComponent component(&engine, testFileUrl("vmeErrors.qml")); + QQmlComponent component(&engine, testFileUrl("vmeErrors.qml")); QString err = testFileUrl("VmeError.qml").toString() + ":6: Cannot assign object type QObject with no default method"; QTest::ignoreMessage(QtWarningMsg, err.toLatin1().constData()); QQuickLoader *loader = qobject_cast(component.create()); @@ -799,7 +799,7 @@ void tst_QQuickLoader::vmeErrors() // QTBUG-13481 void tst_QQuickLoader::creationContext() { - QDeclarativeComponent component(&engine, testFileUrl("creationContext.qml")); + QQmlComponent component(&engine, testFileUrl("creationContext.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -811,7 +811,7 @@ void tst_QQuickLoader::creationContext() void tst_QQuickLoader::QTBUG_16928() { - QDeclarativeComponent component(&engine, testFileUrl("QTBUG_16928.qml")); + QQmlComponent component(&engine, testFileUrl("QTBUG_16928.qml")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -823,7 +823,7 @@ void tst_QQuickLoader::QTBUG_16928() void tst_QQuickLoader::implicitSize() { - QDeclarativeComponent component(&engine, testFileUrl("implicitSize.qml")); + QQmlComponent component(&engine, testFileUrl("implicitSize.qml")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -838,7 +838,7 @@ void tst_QQuickLoader::implicitSize() void tst_QQuickLoader::QTBUG_17114() { - QDeclarativeComponent component(&engine, testFileUrl("QTBUG_17114.qml")); + QQmlComponent component(&engine, testFileUrl("QTBUG_17114.qml")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item); @@ -870,7 +870,7 @@ void tst_QQuickLoader::asynchronous() if (!engine.incubationController()) engine.setIncubationController(new PeriodicIncubationController); - QDeclarativeComponent component(&engine, testFileUrl("asynchronous.qml")); + QQmlComponent component(&engine, testFileUrl("asynchronous.qml")); QQuickItem *root = qobject_cast(component.create()); QVERIFY(root); @@ -904,7 +904,7 @@ void tst_QQuickLoader::asynchronous_clear() { if (!engine.incubationController()) engine.setIncubationController(new PeriodicIncubationController); - QDeclarativeComponent component(&engine, testFileUrl("asynchronous.qml")); + QQmlComponent component(&engine, testFileUrl("asynchronous.qml")); QQuickItem *root = qobject_cast(component.create()); QVERIFY(root); @@ -945,7 +945,7 @@ void tst_QQuickLoader::asynchronous_clear() void tst_QQuickLoader::parented() { - QDeclarativeComponent component(&engine, testFileUrl("parented.qml")); + QQmlComponent component(&engine, testFileUrl("parented.qml")); QQuickItem *root = qobject_cast(component.create()); QVERIFY(root); @@ -962,7 +962,7 @@ void tst_QQuickLoader::parented() void tst_QQuickLoader::sizeBound() { - QDeclarativeComponent component(&engine, testFileUrl("sizebound.qml")); + QQmlComponent component(&engine, testFileUrl("sizebound.qml")); QQuickItem *root = qobject_cast(component.create()); QVERIFY(root); QQuickLoader *loader = root->findChild("loader"); diff --git a/tests/auto/qtquick2/qquickmousearea/data/clickThrough.qml b/tests/auto/quick/qquickmousearea/data/clickThrough.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/clickThrough.qml rename to tests/auto/quick/qquickmousearea/data/clickThrough.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/clickThrough2.qml b/tests/auto/quick/qquickmousearea/data/clickThrough2.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/clickThrough2.qml rename to tests/auto/quick/qquickmousearea/data/clickThrough2.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/clickandhold.qml b/tests/auto/quick/qquickmousearea/data/clickandhold.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/clickandhold.qml rename to tests/auto/quick/qquickmousearea/data/clickandhold.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/clicktwice.qml b/tests/auto/quick/qquickmousearea/data/clicktwice.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/clicktwice.qml rename to tests/auto/quick/qquickmousearea/data/clicktwice.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/doubleclick.qml b/tests/auto/quick/qquickmousearea/data/doubleclick.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/doubleclick.qml rename to tests/auto/quick/qquickmousearea/data/doubleclick.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/dragging.qml b/tests/auto/quick/qquickmousearea/data/dragging.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/dragging.qml rename to tests/auto/quick/qquickmousearea/data/dragging.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/dragproperties.qml b/tests/auto/quick/qquickmousearea/data/dragproperties.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/dragproperties.qml rename to tests/auto/quick/qquickmousearea/data/dragproperties.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/dragreset.qml b/tests/auto/quick/qquickmousearea/data/dragreset.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/dragreset.qml rename to tests/auto/quick/qquickmousearea/data/dragreset.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/hoverPosition.qml b/tests/auto/quick/qquickmousearea/data/hoverPosition.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/hoverPosition.qml rename to tests/auto/quick/qquickmousearea/data/hoverPosition.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/hoverPropagation.qml b/tests/auto/quick/qquickmousearea/data/hoverPropagation.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/hoverPropagation.qml rename to tests/auto/quick/qquickmousearea/data/hoverPropagation.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/hoverVisible.qml b/tests/auto/quick/qquickmousearea/data/hoverVisible.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/hoverVisible.qml rename to tests/auto/quick/qquickmousearea/data/hoverVisible.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/noclickandhold.qml b/tests/auto/quick/qquickmousearea/data/noclickandhold.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/noclickandhold.qml rename to tests/auto/quick/qquickmousearea/data/noclickandhold.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/pressedCanceled.qml b/tests/auto/quick/qquickmousearea/data/pressedCanceled.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/pressedCanceled.qml rename to tests/auto/quick/qquickmousearea/data/pressedCanceled.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/pressedOrdering.qml b/tests/auto/quick/qquickmousearea/data/pressedOrdering.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/pressedOrdering.qml rename to tests/auto/quick/qquickmousearea/data/pressedOrdering.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/preventstealing.qml b/tests/auto/quick/qquickmousearea/data/preventstealing.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/preventstealing.qml rename to tests/auto/quick/qquickmousearea/data/preventstealing.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/rejectEvent.qml b/tests/auto/quick/qquickmousearea/data/rejectEvent.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/rejectEvent.qml rename to tests/auto/quick/qquickmousearea/data/rejectEvent.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/updateMousePosOnClick.qml b/tests/auto/quick/qquickmousearea/data/updateMousePosOnClick.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/updateMousePosOnClick.qml rename to tests/auto/quick/qquickmousearea/data/updateMousePosOnClick.qml diff --git a/tests/auto/qtquick2/qquickmousearea/data/updateMousePosOnResize.qml b/tests/auto/quick/qquickmousearea/data/updateMousePosOnResize.qml similarity index 100% rename from tests/auto/qtquick2/qquickmousearea/data/updateMousePosOnResize.qml rename to tests/auto/quick/qquickmousearea/data/updateMousePosOnResize.qml diff --git a/tests/auto/qtquick2/qquickmousearea/qquickmousearea.pro b/tests/auto/quick/qquickmousearea/qquickmousearea.pro similarity index 80% rename from tests/auto/qtquick2/qquickmousearea/qquickmousearea.pro rename to tests/auto/quick/qquickmousearea/qquickmousearea.pro index 67d77dc05a..c75db5ea55 100644 --- a/tests/auto/qtquick2/qquickmousearea/qquickmousearea.pro +++ b/tests/auto/quick/qquickmousearea/qquickmousearea.pro @@ -14,4 +14,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private network testlib +QT += core-private gui-private qml-private quick-private network testlib diff --git a/tests/auto/qtquick2/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp similarity index 99% rename from tests/auto/qtquick2/qquickmousearea/tst_qquickmousearea.cpp rename to tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp index 66f651329a..0fb82a66bc 100644 --- a/tests/auto/qtquick2/qquickmousearea/tst_qquickmousearea.cpp +++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp @@ -45,14 +45,14 @@ #include #include #include -#include -#include +#include +#include #include #include "../../shared/util.h" //#define OLDWAY -class tst_QQuickMouseArea: public QDeclarativeDataTest +class tst_QQuickMouseArea: public QQmlDataTest { Q_OBJECT private slots: diff --git a/tests/auto/qtquick2/qquickmultipointtoucharea/data/basic.qml b/tests/auto/quick/qquickmultipointtoucharea/data/basic.qml similarity index 100% rename from tests/auto/qtquick2/qquickmultipointtoucharea/data/basic.qml rename to tests/auto/quick/qquickmultipointtoucharea/data/basic.qml diff --git a/tests/auto/qtquick2/qquickmultipointtoucharea/data/inFlickable.qml b/tests/auto/quick/qquickmultipointtoucharea/data/inFlickable.qml similarity index 100% rename from tests/auto/qtquick2/qquickmultipointtoucharea/data/inFlickable.qml rename to tests/auto/quick/qquickmultipointtoucharea/data/inFlickable.qml diff --git a/tests/auto/qtquick2/qquickmultipointtoucharea/data/nested.qml b/tests/auto/quick/qquickmultipointtoucharea/data/nested.qml similarity index 100% rename from tests/auto/qtquick2/qquickmultipointtoucharea/data/nested.qml rename to tests/auto/quick/qquickmultipointtoucharea/data/nested.qml diff --git a/tests/auto/qtquick2/qquickmultipointtoucharea/data/nonOverlapping.qml b/tests/auto/quick/qquickmultipointtoucharea/data/nonOverlapping.qml similarity index 100% rename from tests/auto/qtquick2/qquickmultipointtoucharea/data/nonOverlapping.qml rename to tests/auto/quick/qquickmultipointtoucharea/data/nonOverlapping.qml diff --git a/tests/auto/qtquick2/qquickmultipointtoucharea/data/properties.qml b/tests/auto/quick/qquickmultipointtoucharea/data/properties.qml similarity index 100% rename from tests/auto/qtquick2/qquickmultipointtoucharea/data/properties.qml rename to tests/auto/quick/qquickmultipointtoucharea/data/properties.qml diff --git a/tests/auto/qtquick2/qquickmultipointtoucharea/data/signalTest.qml b/tests/auto/quick/qquickmultipointtoucharea/data/signalTest.qml similarity index 100% rename from tests/auto/qtquick2/qquickmultipointtoucharea/data/signalTest.qml rename to tests/auto/quick/qquickmultipointtoucharea/data/signalTest.qml diff --git a/tests/auto/qtquick2/qquickmultipointtoucharea/qquickmultipointtoucharea.pro b/tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro similarity index 73% rename from tests/auto/qtquick2/qquickmultipointtoucharea/qquickmultipointtoucharea.pro rename to tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro index 38c32099b0..3c6f304284 100644 --- a/tests/auto/qtquick2/qquickmultipointtoucharea/qquickmultipointtoucharea.pro +++ b/tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro @@ -8,4 +8,4 @@ importFiles.files = data importFiles.path = . DEPLOYMENT += importFiles -QT += core-private gui-private declarative-private quick-private testlib +QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/qtquick2/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp b/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp similarity index 99% rename from tests/auto/qtquick2/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp rename to tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp index 0a154d0a7b..507612f8ce 100644 --- a/tests/auto/qtquick2/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp +++ b/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp @@ -85,7 +85,7 @@ void tst_QQuickMultiPointTouchArea::properties() QCOMPARE(area->minimumTouchPoints(), 2); QCOMPARE(area->maximumTouchPoints(), 4); - QDeclarativeListReference ref(area, "touchPoints"); + QQmlListReference ref(area, "touchPoints"); QCOMPARE(ref.count(), 4); delete canvas; diff --git a/tests/auto/qtquick2/qdeclarativepath/data/arc.qml b/tests/auto/quick/qquickpath/data/arc.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativepath/data/arc.qml rename to tests/auto/quick/qquickpath/data/arc.qml diff --git a/tests/auto/qtquick2/qdeclarativepath/data/closedcurve.qml b/tests/auto/quick/qquickpath/data/closedcurve.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativepath/data/closedcurve.qml rename to tests/auto/quick/qquickpath/data/closedcurve.qml diff --git a/tests/auto/qtquick2/qdeclarativepath/data/curve.qml b/tests/auto/quick/qquickpath/data/curve.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativepath/data/curve.qml rename to tests/auto/quick/qquickpath/data/curve.qml diff --git a/tests/auto/qtquick2/qdeclarativepath/data/svg.qml b/tests/auto/quick/qquickpath/data/svg.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativepath/data/svg.qml rename to tests/auto/quick/qquickpath/data/svg.qml diff --git a/tests/auto/quick/qquickpath/qquickpath.pro b/tests/auto/quick/qquickpath/qquickpath.pro new file mode 100644 index 0000000000..e1f0f7b278 --- /dev/null +++ b/tests/auto/quick/qquickpath/qquickpath.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qquickpath +macx:CONFIG -= app_bundle + +SOURCES += tst_qquickpath.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private v8-private qml-private quick-private testlib diff --git a/tests/auto/qtquick2/qdeclarativepath/tst_qdeclarativepath.cpp b/tests/auto/quick/qquickpath/tst_qquickpath.cpp similarity index 70% rename from tests/auto/qtquick2/qdeclarativepath/tst_qdeclarativepath.cpp rename to tests/auto/quick/qquickpath/tst_qquickpath.cpp index cdf2566531..73e7e6ea38 100644 --- a/tests/auto/qtquick2/qdeclarativepath/tst_qdeclarativepath.cpp +++ b/tests/auto/quick/qquickpath/tst_qquickpath.cpp @@ -40,17 +40,17 @@ ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include #include "../../shared/util.h" -class tst_QDeclarativePath : public QDeclarativeDataTest +class tst_QuickPath : public QQmlDataTest { Q_OBJECT public: - tst_QDeclarativePath() {} + tst_QuickPath() {} private slots: void arc(); @@ -59,27 +59,27 @@ private slots: void svg(); }; -void tst_QDeclarativePath::arc() +void tst_QuickPath::arc() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("arc.qml")); - QDeclarativePath *obj = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("arc.qml")); + QQuickPath *obj = qobject_cast(c.create()); QVERIFY(obj != 0); QCOMPARE(obj->startX(), 0.); QCOMPARE(obj->startY(), 0.); - QDeclarativeListReference list(obj, "pathElements"); + QQmlListReference list(obj, "pathElements"); QCOMPARE(list.count(), 1); - QDeclarativePathArc* arc = qobject_cast(list.at(0)); + QQuickPathArc* arc = qobject_cast(list.at(0)); QVERIFY(arc != 0); QCOMPARE(arc->x(), 100.); QCOMPARE(arc->y(), 100.); QCOMPARE(arc->radiusX(), 100.); QCOMPARE(arc->radiusY(), 100.); QCOMPARE(arc->useLargeArc(), false); - QCOMPARE(arc->direction(), QDeclarativePathArc::Clockwise); + QCOMPARE(arc->direction(), QQuickPathArc::Clockwise); QPainterPath path = obj->path(); QVERIFY(path != QPainterPath()); @@ -94,25 +94,25 @@ void tst_QDeclarativePath::arc() QCOMPARE(pos, QPointF(100,100)); } -void tst_QDeclarativePath::catmullromCurve() +void tst_QuickPath::catmullromCurve() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("curve.qml")); - QDeclarativePath *obj = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("curve.qml")); + QQuickPath *obj = qobject_cast(c.create()); QVERIFY(obj != 0); QCOMPARE(obj->startX(), 0.); QCOMPARE(obj->startY(), 0.); - QDeclarativeListReference list(obj, "pathElements"); + QQmlListReference list(obj, "pathElements"); QCOMPARE(list.count(), 3); - QDeclarativePathCatmullRomCurve* curve = qobject_cast(list.at(0)); + QQuickPathCatmullRomCurve* curve = qobject_cast(list.at(0)); QVERIFY(curve != 0); QCOMPARE(curve->x(), 100.); QCOMPARE(curve->y(), 50.); - curve = qobject_cast(list.at(2)); + curve = qobject_cast(list.at(2)); QVERIFY(curve != 0); QCOMPARE(curve->x(), 100.); QCOMPARE(curve->y(), 150.); @@ -130,20 +130,20 @@ void tst_QDeclarativePath::catmullromCurve() QCOMPARE(pos, QPointF(100,150)); } -void tst_QDeclarativePath::closedCatmullromCurve() +void tst_QuickPath::closedCatmullromCurve() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("closedcurve.qml")); - QDeclarativePath *obj = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("closedcurve.qml")); + QQuickPath *obj = qobject_cast(c.create()); QVERIFY(obj != 0); QCOMPARE(obj->startX(), 50.); QCOMPARE(obj->startY(), 50.); - QDeclarativeListReference list(obj, "pathElements"); + QQmlListReference list(obj, "pathElements"); QCOMPARE(list.count(), 3); - QDeclarativePathCatmullRomCurve* curve = qobject_cast(list.at(2)); + QQuickPathCatmullRomCurve* curve = qobject_cast(list.at(2)); QVERIFY(curve != 0); QCOMPARE(curve->x(), 50.); QCOMPARE(curve->y(), 50.); @@ -163,20 +163,20 @@ void tst_QDeclarativePath::closedCatmullromCurve() QCOMPARE(pos, QPointF(50,50)); } -void tst_QDeclarativePath::svg() +void tst_QuickPath::svg() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("svg.qml")); - QDeclarativePath *obj = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("svg.qml")); + QQuickPath *obj = qobject_cast(c.create()); QVERIFY(obj != 0); QCOMPARE(obj->startX(), 0.); QCOMPARE(obj->startY(), 0.); - QDeclarativeListReference list(obj, "pathElements"); + QQmlListReference list(obj, "pathElements"); QCOMPARE(list.count(), 1); - QDeclarativePathSvg* svg = qobject_cast(list.at(0)); + QQuickPathSvg* svg = qobject_cast(list.at(0)); QVERIFY(svg != 0); QCOMPARE(svg->path(), QLatin1String("M200,300 Q400,50 600,300 T1000,300")); @@ -194,6 +194,6 @@ void tst_QDeclarativePath::svg() } -QTEST_MAIN(tst_QDeclarativePath) +QTEST_MAIN(tst_QuickPath) -#include "tst_qdeclarativepath.moc" +#include "tst_qquickpath.moc" diff --git a/tests/auto/qtquick2/qquickpathview/data/ComponentView.qml b/tests/auto/quick/qquickpathview/data/ComponentView.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/ComponentView.qml rename to tests/auto/quick/qquickpathview/data/ComponentView.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/asyncloader.qml b/tests/auto/quick/qquickpathview/data/asyncloader.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/asyncloader.qml rename to tests/auto/quick/qquickpathview/data/asyncloader.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/closedPath.qml b/tests/auto/quick/qquickpathview/data/closedPath.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/closedPath.qml rename to tests/auto/quick/qquickpathview/data/closedPath.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/creationContext.qml b/tests/auto/quick/qquickpathview/data/creationContext.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/creationContext.qml rename to tests/auto/quick/qquickpathview/data/creationContext.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/datamodel.qml b/tests/auto/quick/qquickpathview/data/datamodel.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/datamodel.qml rename to tests/auto/quick/qquickpathview/data/datamodel.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/displaypath.qml b/tests/auto/quick/qquickpathview/data/displaypath.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/displaypath.qml rename to tests/auto/quick/qquickpathview/data/displaypath.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/dragpath.qml b/tests/auto/quick/qquickpathview/data/dragpath.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/dragpath.qml rename to tests/auto/quick/qquickpathview/data/dragpath.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/emptymodel.qml b/tests/auto/quick/qquickpathview/data/emptymodel.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/emptymodel.qml rename to tests/auto/quick/qquickpathview/data/emptymodel.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/missingPercent.qml b/tests/auto/quick/qquickpathview/data/missingPercent.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/missingPercent.qml rename to tests/auto/quick/qquickpathview/data/missingPercent.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/openPath.qml b/tests/auto/quick/qquickpathview/data/openPath.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/openPath.qml rename to tests/auto/quick/qquickpathview/data/openPath.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/pathUpdate.qml b/tests/auto/quick/qquickpathview/data/pathUpdate.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/pathUpdate.qml rename to tests/auto/quick/qquickpathview/data/pathUpdate.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/pathUpdateOnStartChanged.qml b/tests/auto/quick/qquickpathview/data/pathUpdateOnStartChanged.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/pathUpdateOnStartChanged.qml rename to tests/auto/quick/qquickpathview/data/pathUpdateOnStartChanged.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/pathline.qml b/tests/auto/quick/qquickpathview/data/pathline.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/pathline.qml rename to tests/auto/quick/qquickpathview/data/pathline.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/pathtest.qml b/tests/auto/quick/qquickpathview/data/pathtest.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/pathtest.qml rename to tests/auto/quick/qquickpathview/data/pathtest.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/pathview0.qml b/tests/auto/quick/qquickpathview/data/pathview0.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/pathview0.qml rename to tests/auto/quick/qquickpathview/data/pathview0.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/pathview1.qml b/tests/auto/quick/qquickpathview/data/pathview1.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/pathview1.qml rename to tests/auto/quick/qquickpathview/data/pathview1.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/pathview2.qml b/tests/auto/quick/qquickpathview/data/pathview2.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/pathview2.qml rename to tests/auto/quick/qquickpathview/data/pathview2.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/pathview3.qml b/tests/auto/quick/qquickpathview/data/pathview3.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/pathview3.qml rename to tests/auto/quick/qquickpathview/data/pathview3.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/pathview_package.qml b/tests/auto/quick/qquickpathview/data/pathview_package.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/pathview_package.qml rename to tests/auto/quick/qquickpathview/data/pathview_package.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/propertychanges.qml b/tests/auto/quick/qquickpathview/data/propertychanges.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/propertychanges.qml rename to tests/auto/quick/qquickpathview/data/propertychanges.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/treemodel.qml b/tests/auto/quick/qquickpathview/data/treemodel.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/treemodel.qml rename to tests/auto/quick/qquickpathview/data/treemodel.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/undefinedpath.qml b/tests/auto/quick/qquickpathview/data/undefinedpath.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/undefinedpath.qml rename to tests/auto/quick/qquickpathview/data/undefinedpath.qml diff --git a/tests/auto/qtquick2/qquickpathview/data/vdm.qml b/tests/auto/quick/qquickpathview/data/vdm.qml similarity index 100% rename from tests/auto/qtquick2/qquickpathview/data/vdm.qml rename to tests/auto/quick/qquickpathview/data/vdm.qml diff --git a/tests/auto/qtquick2/qquickpathview/qquickpathview.pro b/tests/auto/quick/qquickpathview/qquickpathview.pro similarity index 74% rename from tests/auto/qtquick2/qquickpathview/qquickpathview.pro rename to tests/auto/quick/qquickpathview/qquickpathview.pro index 027abb60e6..52f00ce3f8 100644 --- a/tests/auto/qtquick2/qquickpathview/qquickpathview.pro +++ b/tests/auto/quick/qquickpathview/qquickpathview.pro @@ -12,4 +12,4 @@ testDataFiles.path = . DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private widgets testlib +QT += core-private gui-private v8-private qml-private quick-private widgets testlib diff --git a/tests/auto/qtquick2/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp similarity index 92% rename from tests/auto/qtquick2/qquickpathview/tst_qquickpathview.cpp rename to tests/auto/quick/qquickpathview/tst_qquickpathview.cpp index 8ed2ee75a6..8866cafd80 100644 --- a/tests/auto/qtquick2/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp @@ -41,17 +41,17 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include +#include #include #include -#include -#include +#include +#include #include #include #include @@ -83,7 +83,7 @@ static void initStandardTreeModel(QStandardItemModel *model) } -class tst_QQuickPathView : public QDeclarativeDataTest +class tst_QQuickPathView : public QQmlDataTest { Q_OBJECT public: @@ -161,8 +161,8 @@ tst_QQuickPathView::tst_QQuickPathView() void tst_QQuickPathView::initValues() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pathview1.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("pathview1.qml")); QQuickPathView *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -189,7 +189,7 @@ void tst_QQuickPathView::items() model.addItem("Bob", "54321"); model.addItem("Bill", "4321"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("pathview0.qml")); @@ -211,7 +211,7 @@ void tst_QQuickPathView::items() QCOMPARE(number->text(), model.number(i)); } - QDeclarativePath *path = qobject_cast(pathview->path()); + QQuickPath *path = qobject_cast(pathview->path()); QVERIFY(path); QVERIFY(pathview->highlightItem()); @@ -226,8 +226,8 @@ void tst_QQuickPathView::items() void tst_QQuickPathView::pathview2() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pathview2.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("pathview2.qml")); QQuickPathView *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -246,8 +246,8 @@ void tst_QQuickPathView::pathview2() void tst_QQuickPathView::pathview3() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pathview3.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("pathview3.qml")); QQuickPathView *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -323,7 +323,7 @@ void tst_QQuickPathView::insertModel() model.addItem("Jimmy", "3535"); model.addItem("Barb", "9039"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("pathview0.qml")); @@ -409,7 +409,7 @@ void tst_QQuickPathView::removeModel() model.addItem("Jimmy", "3535"); model.addItem("Barb", "9039"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("pathview0.qml")); @@ -500,7 +500,7 @@ void tst_QQuickPathView::moveModel() model.addItem("Jimmy", "3535"); model.addItem("Barb", "9039"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("pathview0.qml")); @@ -525,40 +525,40 @@ void tst_QQuickPathView::moveModel() void tst_QQuickPathView::path() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("pathtest.qml")); - QDeclarativePath *obj = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("pathtest.qml")); + QQuickPath *obj = qobject_cast(c.create()); QVERIFY(obj != 0); QCOMPARE(obj->startX(), 120.); QCOMPARE(obj->startY(), 100.); QVERIFY(obj->path() != QPainterPath()); - QDeclarativeListReference list(obj, "pathElements"); + QQmlListReference list(obj, "pathElements"); QCOMPARE(list.count(), 5); - QDeclarativePathAttribute* attr = qobject_cast(list.at(0)); + QQuickPathAttribute* attr = qobject_cast(list.at(0)); QVERIFY(attr != 0); QCOMPARE(attr->name(), QString("scale")); QCOMPARE(attr->value(), 1.0); - QDeclarativePathQuad* quad = qobject_cast(list.at(1)); + QQuickPathQuad* quad = qobject_cast(list.at(1)); QVERIFY(quad != 0); QCOMPARE(quad->x(), 120.); QCOMPARE(quad->y(), 25.); QCOMPARE(quad->controlX(), 260.); QCOMPARE(quad->controlY(), 75.); - QDeclarativePathPercent* perc = qobject_cast(list.at(2)); + QQuickPathPercent* perc = qobject_cast(list.at(2)); QVERIFY(perc != 0); QCOMPARE(perc->value(), 0.3); - QDeclarativePathLine* line = qobject_cast(list.at(3)); + QQuickPathLine* line = qobject_cast(list.at(3)); QVERIFY(line != 0); QCOMPARE(line->x(), 120.); QCOMPARE(line->y(), 100.); - QDeclarativePathCubic* cubic = qobject_cast(list.at(4)); + QQuickPathCubic* cubic = qobject_cast(list.at(4)); QVERIFY(cubic != 0); QCOMPARE(cubic->x(), 180.); QCOMPARE(cubic->y(), 0.); @@ -575,7 +575,7 @@ void tst_QQuickPathView::dataModel() QQuickView *canvas = createView(); canvas->show(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); TestObject *testObject = new TestObject; ctxt->setContextProperty("testObject", testObject); @@ -695,7 +695,7 @@ void tst_QQuickPathView::pathMoved() model.addItem("Bob", "54321"); model.addItem("Bill", "4321"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("pathview0.qml")); @@ -706,7 +706,7 @@ void tst_QQuickPathView::pathMoved() QQuickRectangle *firstItem = findItem(pathview, "wrapper", 0); QVERIFY(firstItem); - QDeclarativePath *path = qobject_cast(pathview->path()); + QQuickPath *path = qobject_cast(pathview->path()); QVERIFY(path); QPointF start = path->pointAt(0.0); QPointF offset;//Center of item is at point, but pos is from corner @@ -752,7 +752,7 @@ void tst_QQuickPathView::setCurrentIndex() model.addItem("Bob", "54321"); model.addItem("Bill", "4321"); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("pathview0.qml")); @@ -763,7 +763,7 @@ void tst_QQuickPathView::setCurrentIndex() QQuickRectangle *firstItem = findItem(pathview, "wrapper", 0); QVERIFY(firstItem); - QDeclarativePath *path = qobject_cast(pathview->path()); + QQuickPath *path = qobject_cast(pathview->path()); QVERIFY(path); QPointF start = path->pointAt(0.0); QPointF offset;//Center of item is at point, but pos is from corner @@ -879,7 +879,7 @@ void tst_QQuickPathView::resetModel() strings << "one" << "two" << "three"; QStringListModel model(strings); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("displaypath.qml")); @@ -955,7 +955,7 @@ void tst_QQuickPathView::pathChanges() QQuickPathView *pathView = canvas->rootObject()->findChild("pathView"); QVERIFY(pathView); - QDeclarativePath *path = canvas->rootObject()->findChild("path"); + QQuickPath *path = canvas->rootObject()->findChild("path"); QVERIFY(path); QSignalSpy startXSpy(path, SIGNAL(startXChanged())); @@ -979,7 +979,7 @@ void tst_QQuickPathView::pathChanges() QCOMPARE(startXSpy.count(),1); QCOMPARE(startYSpy.count(),1); - QDeclarativePath *alternatePath = canvas->rootObject()->findChild("alternatePath"); + QQuickPath *alternatePath = canvas->rootObject()->findChild("alternatePath"); QVERIFY(alternatePath); QSignalSpy pathSpy(pathView, SIGNAL(pathChanged())); @@ -993,7 +993,7 @@ void tst_QQuickPathView::pathChanges() pathView->setPath(alternatePath); QCOMPARE(pathSpy.count(),1); - QDeclarativePathAttribute *pathAttribute = canvas->rootObject()->findChild("pathAttribute"); + QQuickPathAttribute *pathAttribute = canvas->rootObject()->findChild("pathAttribute"); QVERIFY(pathAttribute); QSignalSpy nameSpy(pathAttribute, SIGNAL(nameChanged())); @@ -1017,7 +1017,7 @@ void tst_QQuickPathView::componentChanges() QQuickPathView *pathView = canvas->rootObject()->findChild("pathView"); QVERIFY(pathView); - QDeclarativeComponent delegateComponent(canvas->engine()); + QQmlComponent delegateComponent(canvas->engine()); delegateComponent.setData("import QtQuick 2.0; Text { text: 'Name: ' + name }", QUrl::fromLocalFile("")); QSignalSpy delegateSpy(pathView, SIGNAL(delegateChanged())); @@ -1040,7 +1040,7 @@ void tst_QQuickPathView::modelChanges() QQuickPathView *pathView = canvas->rootObject()->findChild("pathView"); QVERIFY(pathView); - QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild("alternateModel"); + QQuickListModel *alternateModel = canvas->rootObject()->findChild("alternateModel"); QVERIFY(alternateModel); QVariant modelVariant = QVariant::fromValue(alternateModel); QSignalSpy modelSpy(pathView, SIGNAL(modelChanged())); @@ -1067,7 +1067,7 @@ void tst_QQuickPathView::pathUpdateOnStartChanged() QQuickPathView *pathView = canvas->rootObject()->findChild("pathView"); QVERIFY(pathView); - QDeclarativePath *path = canvas->rootObject()->findChild("path"); + QQuickPath *path = canvas->rootObject()->findChild("path"); QVERIFY(path); QCOMPARE(path->startX(), 400.0); QCOMPARE(path->startY(), 300.0); @@ -1109,7 +1109,7 @@ void tst_QQuickPathView::emptyModel() QStringListModel model; - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("emptyModel", &model); canvas->setSource(testFileUrl("emptymodel.qml")); @@ -1125,19 +1125,19 @@ void tst_QQuickPathView::emptyModel() void tst_QQuickPathView::closed() { - QDeclarativeEngine engine; + QQmlEngine engine; { - QDeclarativeComponent c(&engine, testFileUrl("openPath.qml")); - QDeclarativePath *obj = qobject_cast(c.create()); + QQmlComponent c(&engine, testFileUrl("openPath.qml")); + QQuickPath *obj = qobject_cast(c.create()); QVERIFY(obj); QCOMPARE(obj->isClosed(), false); delete obj; } { - QDeclarativeComponent c(&engine, testFileUrl("closedPath.qml")); - QDeclarativePath *obj = qobject_cast(c.create()); + QQmlComponent c(&engine, testFileUrl("closedPath.qml")); + QQuickPath *obj = qobject_cast(c.create()); QVERIFY(obj); QCOMPARE(obj->isClosed(), true); delete obj; @@ -1163,8 +1163,8 @@ void tst_QQuickPathView::pathUpdate() void tst_QQuickPathView::visualDataModel() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("vdm.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("vdm.qml")); QQuickPathView *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -1176,7 +1176,7 @@ void tst_QQuickPathView::visualDataModel() void tst_QQuickPathView::undefinedPath() { - QDeclarativeEngine engine; + QQmlEngine engine; // QPainterPath warnings are only received if QT_NO_DEBUG is not defined if (QLibraryInfo::isDebugBuild()) { @@ -1187,7 +1187,7 @@ void tst_QQuickPathView::undefinedPath() QTest::ignoreMessage(QtWarningMsg,qPrintable(warning2)); } - QDeclarativeComponent c(&engine, testFileUrl("undefinedpath.qml")); + QQmlComponent c(&engine, testFileUrl("undefinedpath.qml")); QQuickPathView *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -1276,7 +1276,7 @@ void tst_QQuickPathView::changePreferredHighlight() QQuickRectangle *firstItem = findItem(pathview, "wrapper", 0); QVERIFY(firstItem); - QDeclarativePath *path = qobject_cast(pathview->path()); + QQuickPath *path = qobject_cast(pathview->path()); QVERIFY(path); QPointF start = path->pointAt(0.5); QPointF offset;//Center of item is at point, but pos is from corner @@ -1316,7 +1316,7 @@ void tst_QQuickPathView::currentOffsetOnInsertion() QaimModel model; - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); canvas->setSource(testFileUrl("pathline.qml")); @@ -1337,7 +1337,7 @@ void tst_QQuickPathView::currentOffsetOnInsertion() QQuickRectangle *item = 0; QTRY_VERIFY(item = findItem(pathview, "wrapper", 0)); - QDeclarativePath *path = qobject_cast(pathview->path()); + QQuickPath *path = qobject_cast(pathview->path()); QVERIFY(path); QPointF start = path->pointAt(0.5); @@ -1391,7 +1391,7 @@ void tst_QQuickPathView::asynchronous() { QQuickView *canvas = createView(); canvas->show(); - QDeclarativeIncubationController controller; + QQmlIncubationController controller; canvas->engine()->setIncubationController(&controller); canvas->setSource(testFileUrl("asyncloader.qml")); @@ -1425,7 +1425,7 @@ void tst_QQuickPathView::asynchronous() // verify positioning QQuickRectangle *firstItem = findItem(pathview, "wrapper", 0); QVERIFY(firstItem); - QDeclarativePath *path = qobject_cast(pathview->path()); + QQuickPath *path = qobject_cast(pathview->path()); QVERIFY(path); QPointF start = path->pointAt(0.0); QPointF offset;//Center of item is at point, but pos is from corner @@ -1445,9 +1445,9 @@ void tst_QQuickPathView::asynchronous() void tst_QQuickPathView::missingPercent() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("missingPercent.qml")); - QDeclarativePath *obj = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("missingPercent.qml")); + QQuickPath *obj = qobject_cast(c.create()); QVERIFY(obj); QCOMPARE(obj->attributeAt("_qfx_percent", 1.0), qreal(1.0)); delete obj; diff --git a/tests/auto/qtquick2/qquickpincharea/data/pinchproperties.qml b/tests/auto/quick/qquickpincharea/data/pinchproperties.qml similarity index 100% rename from tests/auto/qtquick2/qquickpincharea/data/pinchproperties.qml rename to tests/auto/quick/qquickpincharea/data/pinchproperties.qml diff --git a/tests/auto/qtquick2/qquickpincharea/qquickpincharea.pro b/tests/auto/quick/qquickpincharea/qquickpincharea.pro similarity index 77% rename from tests/auto/qtquick2/qquickpincharea/qquickpincharea.pro rename to tests/auto/quick/qquickpincharea/qquickpincharea.pro index 3c75079ca5..514dd25a5a 100644 --- a/tests/auto/qtquick2/qquickpincharea/qquickpincharea.pro +++ b/tests/auto/quick/qquickpincharea/qquickpincharea.pro @@ -12,4 +12,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private testlib +QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/qtquick2/qquickpincharea/tst_qquickpincharea.cpp b/tests/auto/quick/qquickpincharea/tst_qquickpincharea.cpp similarity index 98% rename from tests/auto/qtquick2/qquickpincharea/tst_qquickpincharea.cpp rename to tests/auto/quick/qquickpincharea/tst_qquickpincharea.cpp index e1eaa7879e..6e83d41c4e 100644 --- a/tests/auto/qtquick2/qquickpincharea/tst_qquickpincharea.cpp +++ b/tests/auto/quick/qquickpincharea/tst_qquickpincharea.cpp @@ -44,10 +44,10 @@ #include #include #include -#include +#include #include "../../shared/util.h" -class tst_QQuickPinchArea: public QDeclarativeDataTest +class tst_QQuickPinchArea: public QQmlDataTest { Q_OBJECT public: @@ -66,7 +66,7 @@ private slots: }; void tst_QQuickPinchArea::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); if (!device) { device = new QTouchDevice; device->setType(QTouchDevice::TouchScreen); diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/exists.png b/tests/auto/quick/qquickpixmapcache/data/exists.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/exists.png rename to tests/auto/quick/qquickpixmapcache/data/exists.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/exists1.png b/tests/auto/quick/qquickpixmapcache/data/exists1.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/exists1.png rename to tests/auto/quick/qquickpixmapcache/data/exists1.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/exists2.png b/tests/auto/quick/qquickpixmapcache/data/exists2.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/exists2.png rename to tests/auto/quick/qquickpixmapcache/data/exists2.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists.png b/tests/auto/quick/qquickpixmapcache/data/http/exists.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists.png rename to tests/auto/quick/qquickpixmapcache/data/http/exists.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists1.png b/tests/auto/quick/qquickpixmapcache/data/http/exists1.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists1.png rename to tests/auto/quick/qquickpixmapcache/data/http/exists1.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists2.png b/tests/auto/quick/qquickpixmapcache/data/http/exists2.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists2.png rename to tests/auto/quick/qquickpixmapcache/data/http/exists2.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists3.png b/tests/auto/quick/qquickpixmapcache/data/http/exists3.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists3.png rename to tests/auto/quick/qquickpixmapcache/data/http/exists3.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists4.png b/tests/auto/quick/qquickpixmapcache/data/http/exists4.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists4.png rename to tests/auto/quick/qquickpixmapcache/data/http/exists4.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists5.png b/tests/auto/quick/qquickpixmapcache/data/http/exists5.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists5.png rename to tests/auto/quick/qquickpixmapcache/data/http/exists5.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists6.png b/tests/auto/quick/qquickpixmapcache/data/http/exists6.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists6.png rename to tests/auto/quick/qquickpixmapcache/data/http/exists6.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists7.png b/tests/auto/quick/qquickpixmapcache/data/http/exists7.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists7.png rename to tests/auto/quick/qquickpixmapcache/data/http/exists7.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists8.png b/tests/auto/quick/qquickpixmapcache/data/http/exists8.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/http/exists8.png rename to tests/auto/quick/qquickpixmapcache/data/http/exists8.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/data/massive.png b/tests/auto/quick/qquickpixmapcache/data/massive.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativepixmapcache/data/massive.png rename to tests/auto/quick/qquickpixmapcache/data/massive.png diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/qdeclarativepixmapcache.pro b/tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro similarity index 67% rename from tests/auto/qtquick2/qdeclarativepixmapcache/qdeclarativepixmapcache.pro rename to tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro index 006489cce7..7611e37b49 100644 --- a/tests/auto/qtquick2/qdeclarativepixmapcache/qdeclarativepixmapcache.pro +++ b/tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qdeclarativepixmapcache +TARGET = tst_qquickpixmapcache macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativepixmapcache.cpp \ +SOURCES += tst_qquickpixmapcache.cpp \ ../../shared/testhttpserver.cpp HEADERS += ../../shared/testhttpserver.h INCLUDEPATH += ../../shared/ @@ -18,4 +18,4 @@ DEPLOYMENT += importFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private network testlib concurrent +QT += core-private gui-private qml-private quick-private network testlib concurrent diff --git a/tests/auto/qtquick2/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp similarity index 79% rename from tests/auto/qtquick2/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp rename to tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp index 84ea9ec3a9..855322e376 100644 --- a/tests/auto/qtquick2/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp +++ b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp @@ -40,9 +40,9 @@ ****************************************************************************/ #include #include -#include -#include -#include +#include +#include +#include #include #include "../../shared/util.h" #include "testhttpserver.h" @@ -54,11 +54,11 @@ #define PIXMAP_DATA_LEAK_TEST 0 -class tst_qdeclarativepixmapcache : public QDeclarativeDataTest +class tst_qquickpixmapcache : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativepixmapcache() : server(14452) {} + tst_qquickpixmapcache() : server(14452) {} private slots: void initTestCase(); @@ -77,7 +77,7 @@ private slots: void dataLeak(); #endif private: - QDeclarativeEngine engine; + QQmlEngine engine; TestHTTPServer server; }; @@ -111,15 +111,15 @@ static const bool localfile_optimized = false; #endif -void tst_qdeclarativepixmapcache::initTestCase() +void tst_qquickpixmapcache::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); server.serveDirectory(testFile("http")); } -void tst_qdeclarativepixmapcache::single_data() +void tst_qquickpixmapcache::single_data() { - // Note, since QDeclarativePixmapCache is shared, tests affect each other! + // Note, since QQuickPixmapCache is shared, tests affect each other! // so use different files fore all test functions. QTest::addColumn("target"); @@ -134,7 +134,7 @@ void tst_qdeclarativepixmapcache::single_data() QTest::newRow("remote") << QUrl("http://127.0.0.1:14452/notexists.png") << false << false << true; } -void tst_qdeclarativepixmapcache::single() +void tst_qquickpixmapcache::single() { QFETCH(QUrl, target); QFETCH(bool, incache); @@ -148,7 +148,7 @@ void tst_qdeclarativepixmapcache::single() expectedError = "Cannot open: " + target.toString(); } - QDeclarativePixmap pixmap; + QQuickPixmap pixmap; QVERIFY(pixmap.width() <= 0); // Check Qt assumption pixmap.load(&engine, target); @@ -156,10 +156,10 @@ void tst_qdeclarativepixmapcache::single() if (incache) { QCOMPARE(pixmap.error(), expectedError); if (exists) { - QVERIFY(pixmap.status() == QDeclarativePixmap::Ready); + QVERIFY(pixmap.status() == QQuickPixmap::Ready); QVERIFY(pixmap.width() > 0); } else { - QVERIFY(pixmap.status() == QDeclarativePixmap::Error); + QVERIFY(pixmap.status() == QQuickPixmap::Error); QVERIFY(pixmap.width() <= 0); } } else { @@ -171,19 +171,19 @@ void tst_qdeclarativepixmapcache::single() QVERIFY(!QTestEventLoop::instance().timeout()); QVERIFY(getter.gotslot); if (exists) { - QVERIFY(pixmap.status() == QDeclarativePixmap::Ready); + QVERIFY(pixmap.status() == QQuickPixmap::Ready); QVERIFY(pixmap.width() > 0); } else { - QVERIFY(pixmap.status() == QDeclarativePixmap::Error); + QVERIFY(pixmap.status() == QQuickPixmap::Error); QVERIFY(pixmap.width() <= 0); } QCOMPARE(pixmap.error(), expectedError); } } -void tst_qdeclarativepixmapcache::parallel_data() +void tst_qquickpixmapcache::parallel_data() { - // Note, since QDeclarativePixmapCache is shared, tests affect each other! + // Note, since QQuickPixmapCache is shared, tests affect each other! // so use different files fore all test functions. QTest::addColumn("target1"); @@ -222,7 +222,7 @@ void tst_qdeclarativepixmapcache::parallel_data() << 0; } -void tst_qdeclarativepixmapcache::parallel() +void tst_qquickpixmapcache::parallel() { QFETCH(QUrl, target1); QFETCH(QUrl, target2); @@ -232,17 +232,17 @@ void tst_qdeclarativepixmapcache::parallel() QList targets; targets << target1 << target2; - QList pixmaps; + QList pixmaps; QList pending; QList getters; for (int i=0; iload(&engine, target); - QVERIFY(pixmap->status() != QDeclarativePixmap::Error); + QVERIFY(pixmap->status() != QQuickPixmap::Error); pixmaps.append(pixmap); if (pixmap->isReady()) { QVERIFY(pixmap->width() > 0); @@ -269,7 +269,7 @@ void tst_qdeclarativepixmapcache::parallel() } for (int i=0; igotslot); @@ -286,21 +286,21 @@ void tst_qdeclarativepixmapcache::parallel() qDeleteAll(pixmaps); } -void tst_qdeclarativepixmapcache::massive() +void tst_qquickpixmapcache::massive() { - QDeclarativeEngine engine; + QQmlEngine engine; QUrl url = testFileUrl("massive.png"); // Confirm that massive images remain in the cache while they are // in use by the application. { qint64 cachekey = 0; - QDeclarativePixmap p(&engine, url); + QQuickPixmap p(&engine, url); QVERIFY(p.isReady()); QVERIFY(p.image().size() == QSize(10000, 1000)); cachekey = p.image().cacheKey(); - QDeclarativePixmap p2(&engine, url); + QQuickPixmap p2(&engine, url); QVERIFY(p2.isReady()); QVERIFY(p2.image().size() == QSize(10000, 1000)); @@ -312,13 +312,13 @@ void tst_qdeclarativepixmapcache::massive() { qint64 cachekey = 0; { - QDeclarativePixmap p(&engine, url); + QQuickPixmap p(&engine, url); QVERIFY(p.isReady()); QVERIFY(p.image().size() == QSize(10000, 1000)); cachekey = p.image().cacheKey(); } - QDeclarativePixmap p2(&engine, url); + QQuickPixmap p2(&engine, url); QVERIFY(p2.isReady()); QVERIFY(p2.image().size() == QSize(10000, 1000)); @@ -327,19 +327,19 @@ void tst_qdeclarativepixmapcache::massive() } // QTBUG-12729 -void tst_qdeclarativepixmapcache::cancelcrash() +void tst_qquickpixmapcache::cancelcrash() { QUrl url("http://127.0.0.1:14452/cancelcrash_notexist.png"); for (int ii = 0; ii < 1000; ++ii) { - QDeclarativePixmap pix(&engine, url); + QQuickPixmap pix(&engine, url); } } -class MyPixmapProvider : public QDeclarativeImageProvider +class MyPixmapProvider : public QQmlImageProvider { public: MyPixmapProvider() - : QDeclarativeImageProvider(Pixmap) {} + : QQmlImageProvider(Pixmap) {} virtual QPixmap requestPixmap(const QString &d, QSize *, const QSize &) { Q_UNUSED(d) @@ -350,14 +350,14 @@ class MyPixmapProvider : public QDeclarativeImageProvider }; // QTBUG-13345 -void tst_qdeclarativepixmapcache::shrinkcache() +void tst_qquickpixmapcache::shrinkcache() { - QDeclarativeEngine engine; + QQmlEngine engine; engine.addImageProvider(QLatin1String("mypixmaps"), new MyPixmapProvider); for (int ii = 0; ii < 4000; ++ii) { QUrl url("image://mypixmaps/" + QString::number(ii)); - QDeclarativePixmap p(&engine, url); + QQuickPixmap p(&engine, url); } } @@ -367,19 +367,19 @@ void createNetworkServer() { QEventLoop eventLoop; TestHTTPServer server(14453); - server.serveDirectory(QDeclarativeDataTest::instance()->testFile("http")); + server.serveDirectory(QQmlDataTest::instance()->testFile("http")); QTimer::singleShot(100, &eventLoop, SLOT(quit())); eventLoop.exec(); } #ifndef QT_NO_CONCURRENT // QT-3957 -void tst_qdeclarativepixmapcache::networkCrash() +void tst_qquickpixmapcache::networkCrash() { QFuture future = QtConcurrent::run(createNetworkServer); - QDeclarativeEngine engine; + QQmlEngine engine; for (int ii = 0; ii < 100 ; ++ii) { - QDeclarativePixmap* pixmap = new QDeclarativePixmap; + QQuickPixmap* pixmap = new QQuickPixmap; pixmap->load(&engine, QUrl(QString("http://127.0.0.1:14453/exists.png"))); QTest::qSleep(1); pixmap->clear(); @@ -392,15 +392,15 @@ void tst_qdeclarativepixmapcache::networkCrash() #endif // QTBUG-22125 -void tst_qdeclarativepixmapcache::lockingCrash() +void tst_qquickpixmapcache::lockingCrash() { TestHTTPServer server(14453); server.serveDirectory(testFile("http"), TestHTTPServer::Delay); { - QDeclarativePixmap* p = new QDeclarativePixmap; + QQuickPixmap* p = new QQuickPixmap; { - QDeclarativeEngine e; + QQmlEngine e; p->load(&e, QUrl(QString("http://127.0.0.1:14453/exists6.png"))); } p->clear(); @@ -435,16 +435,16 @@ class DataLeakView : public QQuickView }; // QTBUG-22742 -Q_GLOBAL_STATIC(QDeclarativePixmap, dataLeakPixmap) -void tst_qdeclarativepixmapcache::dataLeak() +Q_GLOBAL_STATIC(QQuickPixmap, dataLeakPixmap) +void tst_qquickpixmapcache::dataLeak() { - // Should not leak cached QDeclarativePixmapData. - // Unfortunately, since the QDeclarativePixmapStore + // Should not leak cached QQuickPixmapData. + // Unfortunately, since the QQuickPixmapStore // is a global static, and it releases the cache // entries on dtor (application exit), we must use // valgrind to determine whether it leaks or not. - QDeclarativePixmap *p1 = new QDeclarativePixmap; - QDeclarativePixmap *p2 = new QDeclarativePixmap; + QQuickPixmap *p1 = new QQuickPixmap; + QQuickPixmap *p2 = new QQuickPixmap; { QScopedPointer test(new DataLeakView); test->showFor2Seconds(); @@ -455,13 +455,13 @@ void tst_qdeclarativepixmapcache::dataLeak() } // When the (global static) dataLeakPixmap is deleted, it - // shouldn't attempt to dereference a QDeclarativePixmapData - // which has been deleted by the QDeclarativePixmapStore + // shouldn't attempt to dereference a QQuickPixmapData + // which has been deleted by the QQuickPixmapStore // destructor. } #endif #undef PIXMAP_DATA_LEAK_TEST -QTEST_MAIN(tst_qdeclarativepixmapcache) +QTEST_MAIN(tst_qquickpixmapcache) -#include "tst_qdeclarativepixmapcache.moc" +#include "tst_qquickpixmapcache.moc" diff --git a/tests/auto/qtquick2/qquickpositioners/data/allInvisible.qml b/tests/auto/quick/qquickpositioners/data/allInvisible.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/allInvisible.qml rename to tests/auto/quick/qquickpositioners/data/allInvisible.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/attachedproperties-column.qml b/tests/auto/quick/qquickpositioners/data/attachedproperties-column.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/attachedproperties-column.qml rename to tests/auto/quick/qquickpositioners/data/attachedproperties-column.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/attachedproperties-dynamic.qml b/tests/auto/quick/qquickpositioners/data/attachedproperties-dynamic.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/attachedproperties-dynamic.qml rename to tests/auto/quick/qquickpositioners/data/attachedproperties-dynamic.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/attachedproperties-flow.qml b/tests/auto/quick/qquickpositioners/data/attachedproperties-flow.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/attachedproperties-flow.qml rename to tests/auto/quick/qquickpositioners/data/attachedproperties-flow.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/attachedproperties-grid.qml b/tests/auto/quick/qquickpositioners/data/attachedproperties-grid.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/attachedproperties-grid.qml rename to tests/auto/quick/qquickpositioners/data/attachedproperties-grid.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/attachedproperties-row.qml b/tests/auto/quick/qquickpositioners/data/attachedproperties-row.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/attachedproperties-row.qml rename to tests/auto/quick/qquickpositioners/data/attachedproperties-row.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/flow-testimplicitsize.qml b/tests/auto/quick/qquickpositioners/data/flow-testimplicitsize.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/flow-testimplicitsize.qml rename to tests/auto/quick/qquickpositioners/data/flow-testimplicitsize.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/flowtest-toptobottom.qml b/tests/auto/quick/qquickpositioners/data/flowtest-toptobottom.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/flowtest-toptobottom.qml rename to tests/auto/quick/qquickpositioners/data/flowtest-toptobottom.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/flowtest.qml b/tests/auto/quick/qquickpositioners/data/flowtest.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/flowtest.qml rename to tests/auto/quick/qquickpositioners/data/flowtest.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/grid-animated.qml b/tests/auto/quick/qquickpositioners/data/grid-animated.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/grid-animated.qml rename to tests/auto/quick/qquickpositioners/data/grid-animated.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/grid-row-column-spacing.qml b/tests/auto/quick/qquickpositioners/data/grid-row-column-spacing.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/grid-row-column-spacing.qml rename to tests/auto/quick/qquickpositioners/data/grid-row-column-spacing.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/grid-spacing.qml b/tests/auto/quick/qquickpositioners/data/grid-spacing.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/grid-spacing.qml rename to tests/auto/quick/qquickpositioners/data/grid-spacing.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/grid-toptobottom.qml b/tests/auto/quick/qquickpositioners/data/grid-toptobottom.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/grid-toptobottom.qml rename to tests/auto/quick/qquickpositioners/data/grid-toptobottom.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/gridtest.qml b/tests/auto/quick/qquickpositioners/data/gridtest.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/gridtest.qml rename to tests/auto/quick/qquickpositioners/data/gridtest.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/gridzerocolumns.qml b/tests/auto/quick/qquickpositioners/data/gridzerocolumns.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/gridzerocolumns.qml rename to tests/auto/quick/qquickpositioners/data/gridzerocolumns.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/horizontal-animated-disabled.qml b/tests/auto/quick/qquickpositioners/data/horizontal-animated-disabled.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/horizontal-animated-disabled.qml rename to tests/auto/quick/qquickpositioners/data/horizontal-animated-disabled.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/horizontal-animated.qml b/tests/auto/quick/qquickpositioners/data/horizontal-animated.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/horizontal-animated.qml rename to tests/auto/quick/qquickpositioners/data/horizontal-animated.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/horizontal-spacing.qml b/tests/auto/quick/qquickpositioners/data/horizontal-spacing.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/horizontal-spacing.qml rename to tests/auto/quick/qquickpositioners/data/horizontal-spacing.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/horizontal.qml b/tests/auto/quick/qquickpositioners/data/horizontal.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/horizontal.qml rename to tests/auto/quick/qquickpositioners/data/horizontal.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/propertychangestest.qml b/tests/auto/quick/qquickpositioners/data/propertychangestest.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/propertychangestest.qml rename to tests/auto/quick/qquickpositioners/data/propertychangestest.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/rectangleComponent.qml b/tests/auto/quick/qquickpositioners/data/rectangleComponent.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/rectangleComponent.qml rename to tests/auto/quick/qquickpositioners/data/rectangleComponent.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/repeatertest.qml b/tests/auto/quick/qquickpositioners/data/repeatertest.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/repeatertest.qml rename to tests/auto/quick/qquickpositioners/data/repeatertest.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/vertical-animated.qml b/tests/auto/quick/qquickpositioners/data/vertical-animated.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/vertical-animated.qml rename to tests/auto/quick/qquickpositioners/data/vertical-animated.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/vertical-spacing.qml b/tests/auto/quick/qquickpositioners/data/vertical-spacing.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/vertical-spacing.qml rename to tests/auto/quick/qquickpositioners/data/vertical-spacing.qml diff --git a/tests/auto/qtquick2/qquickpositioners/data/vertical.qml b/tests/auto/quick/qquickpositioners/data/vertical.qml similarity index 100% rename from tests/auto/qtquick2/qquickpositioners/data/vertical.qml rename to tests/auto/quick/qquickpositioners/data/vertical.qml diff --git a/tests/auto/qtquick2/qquickpositioners/qquickpositioners.pro b/tests/auto/quick/qquickpositioners/qquickpositioners.pro similarity index 71% rename from tests/auto/qtquick2/qquickpositioners/qquickpositioners.pro rename to tests/auto/quick/qquickpositioners/qquickpositioners.pro index ec0056f8e9..56fe465901 100644 --- a/tests/auto/qtquick2/qquickpositioners/qquickpositioners.pro +++ b/tests/auto/quick/qquickpositioners/qquickpositioners.pro @@ -11,4 +11,4 @@ testDataFiles.path = . DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp similarity index 98% rename from tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp rename to tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp index 4c903ab704..ecc4c80b2a 100644 --- a/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp +++ b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp @@ -41,15 +41,15 @@ #include #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include "../../shared/util.h" -class tst_qquickpositioners : public QDeclarativeDataTest +class tst_qquickpositioners : public QQmlDataTest { Q_OBJECT public: @@ -867,8 +867,8 @@ void tst_qquickpositioners::test_propertychanges() QQuickGrid *grid = qobject_cast(canvas->rootObject()); QVERIFY(grid != 0); - QDeclarativeTransition *rowTransition = canvas->rootObject()->findChild("rowTransition"); - QDeclarativeTransition *columnTransition = canvas->rootObject()->findChild("columnTransition"); + QQuickTransition *rowTransition = canvas->rootObject()->findChild("rowTransition"); + QQuickTransition *columnTransition = canvas->rootObject()->findChild("columnTransition"); QSignalSpy addSpy(grid, SIGNAL(addChanged())); QSignalSpy moveSpy(grid, SIGNAL(moveChanged())); @@ -1176,8 +1176,8 @@ void interceptWarnings(QtMsgType type, const char *msg) void tst_qquickpositioners::test_conflictinganchors() { QtMsgHandler oldMsgHandler = qInstallMsgHandler(interceptWarnings); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nColumn { Item { width: 100; height: 100; } }", QUrl::fromLocalFile("")); QQuickItem *item = qobject_cast(component.create()); @@ -1299,9 +1299,9 @@ void tst_qquickpositioners::test_mirroring() QTRY_VERIFY(itemA->x() != itemB->x()); } - QDeclarativeProperty enabledProp(rootB, "LayoutMirroring.enabled", qmlContext(rootB)); + QQmlProperty enabledProp(rootB, "LayoutMirroring.enabled", qmlContext(rootB)); enabledProp.write(true); - QDeclarativeProperty inheritProp(rootB, "LayoutMirroring.childrenInherit", qmlContext(rootB)); + QQmlProperty inheritProp(rootB, "LayoutMirroring.childrenInherit", qmlContext(rootB)); inheritProp.write(true); // RTL == mirror diff --git a/tests/auto/qtquick2/qquickrepeater/data/asyncloader.qml b/tests/auto/quick/qquickrepeater/data/asyncloader.qml similarity index 100% rename from tests/auto/qtquick2/qquickrepeater/data/asyncloader.qml rename to tests/auto/quick/qquickrepeater/data/asyncloader.qml diff --git a/tests/auto/qtquick2/qquickrepeater/data/initparent.qml b/tests/auto/quick/qquickrepeater/data/initparent.qml similarity index 100% rename from tests/auto/qtquick2/qquickrepeater/data/initparent.qml rename to tests/auto/quick/qquickrepeater/data/initparent.qml diff --git a/tests/auto/qtquick2/qquickrepeater/data/intmodel.qml b/tests/auto/quick/qquickrepeater/data/intmodel.qml similarity index 100% rename from tests/auto/qtquick2/qquickrepeater/data/intmodel.qml rename to tests/auto/quick/qquickrepeater/data/intmodel.qml diff --git a/tests/auto/qtquick2/qquickrepeater/data/itemlist.qml b/tests/auto/quick/qquickrepeater/data/itemlist.qml similarity index 100% rename from tests/auto/qtquick2/qquickrepeater/data/itemlist.qml rename to tests/auto/quick/qquickrepeater/data/itemlist.qml diff --git a/tests/auto/qtquick2/qquickrepeater/data/modelChanged.qml b/tests/auto/quick/qquickrepeater/data/modelChanged.qml similarity index 100% rename from tests/auto/qtquick2/qquickrepeater/data/modelChanged.qml rename to tests/auto/quick/qquickrepeater/data/modelChanged.qml diff --git a/tests/auto/qtquick2/qquickrepeater/data/objlist.qml b/tests/auto/quick/qquickrepeater/data/objlist.qml similarity index 100% rename from tests/auto/qtquick2/qquickrepeater/data/objlist.qml rename to tests/auto/quick/qquickrepeater/data/objlist.qml diff --git a/tests/auto/qtquick2/qquickrepeater/data/properties.qml b/tests/auto/quick/qquickrepeater/data/properties.qml similarity index 100% rename from tests/auto/qtquick2/qquickrepeater/data/properties.qml rename to tests/auto/quick/qquickrepeater/data/properties.qml diff --git a/tests/auto/qtquick2/qquickrepeater/data/repeater1.qml b/tests/auto/quick/qquickrepeater/data/repeater1.qml similarity index 100% rename from tests/auto/qtquick2/qquickrepeater/data/repeater1.qml rename to tests/auto/quick/qquickrepeater/data/repeater1.qml diff --git a/tests/auto/qtquick2/qquickrepeater/data/repeater2.qml b/tests/auto/quick/qquickrepeater/data/repeater2.qml similarity index 100% rename from tests/auto/qtquick2/qquickrepeater/data/repeater2.qml rename to tests/auto/quick/qquickrepeater/data/repeater2.qml diff --git a/tests/auto/qtquick2/qquickrepeater/qquickrepeater.pro b/tests/auto/quick/qquickrepeater/qquickrepeater.pro similarity index 78% rename from tests/auto/qtquick2/qquickrepeater/qquickrepeater.pro rename to tests/auto/quick/qquickrepeater/qquickrepeater.pro index b791faf78a..c3d96ee6d5 100644 --- a/tests/auto/qtquick2/qquickrepeater/qquickrepeater.pro +++ b/tests/auto/quick/qquickrepeater/qquickrepeater.pro @@ -12,4 +12,4 @@ testFiles.path = . DEPLOYMENT += testFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private testlib +QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/qtquick2/qquickrepeater/tst_qquickrepeater.cpp b/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp similarity index 94% rename from tests/auto/qtquick2/qquickrepeater/tst_qquickrepeater.cpp rename to tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp index 59322704f5..1b07a6e9f8 100644 --- a/tests/auto/qtquick2/qquickrepeater/tst_qquickrepeater.cpp +++ b/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp @@ -42,11 +42,11 @@ #include #include #include -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include @@ -58,7 +58,7 @@ using namespace QQuickViewTestUtil; using namespace QQuickVisualTestUtil; -class tst_QQuickRepeater : public QDeclarativeDataTest +class tst_QQuickRepeater : public QQmlDataTest { Q_OBJECT public: @@ -111,7 +111,7 @@ void tst_QQuickRepeater::numberModel() { QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testData", 5); TestObject *testObject = new TestObject; ctxt->setContextProperty("testObject", testObject); @@ -154,7 +154,7 @@ void tst_QQuickRepeater::objectList() for (int i=0; i<100; i++) data << new MyObject(i); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testData", QVariant::fromValue(data)); canvas->setSource(testFileUrl("objlist.qml")); @@ -195,7 +195,7 @@ void tst_QQuickRepeater::stringList() data << "Three"; data << "Four"; - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testData", data); canvas->setSource(testFileUrl("repeater1.qml")); @@ -240,7 +240,7 @@ void tst_QQuickRepeater::stringList() void tst_QQuickRepeater::dataModel_adding() { QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); TestObject *testObject = new TestObject; ctxt->setContextProperty("testObject", testObject); @@ -304,7 +304,7 @@ void tst_QQuickRepeater::dataModel_adding() void tst_QQuickRepeater::dataModel_removing() { QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); TestObject *testObject = new TestObject; ctxt->setContextProperty("testObject", testObject); @@ -372,7 +372,7 @@ void tst_QQuickRepeater::dataModel_removing() void tst_QQuickRepeater::dataModel_changes() { QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); TestObject *testObject = new TestObject; ctxt->setContextProperty("testObject", testObject); @@ -412,7 +412,7 @@ void tst_QQuickRepeater::dataModel_changes() void tst_QQuickRepeater::itemModel() { QQuickView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); TestObject *testObject = new TestObject; ctxt->setContextProperty("testObject", testObject); @@ -458,7 +458,7 @@ void tst_QQuickRepeater::resetModel() for (int i=0; i<10; i++) dataA << QString::number(i); - QDeclarativeContext *ctxt = canvas->rootContext(); + QQmlContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testData", dataA); canvas->setSource(testFileUrl("repeater1.qml")); qApp->processEvents(); @@ -521,8 +521,8 @@ void tst_QQuickRepeater::resetModel() // QTBUG-17156 void tst_QQuickRepeater::modelChanged() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("modelChanged.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("modelChanged.qml")); QQuickItem *rootObject = qobject_cast(component.create()); QVERIFY(rootObject); @@ -544,8 +544,8 @@ void tst_QQuickRepeater::modelChanged() void tst_QQuickRepeater::properties() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("properties.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("properties.qml")); QQuickItem *rootObject = qobject_cast(component.create()); QVERIFY(rootObject); @@ -561,7 +561,7 @@ void tst_QQuickRepeater::properties() QSignalSpy delegateSpy(repeater, SIGNAL(delegateChanged())); - QDeclarativeComponent rectComponent(&engine); + QQmlComponent rectComponent(&engine); rectComponent.setData("import QtQuick 2.0; Rectangle {}", QUrl::fromLocalFile("")); repeater->setDelegate(&rectComponent); @@ -576,7 +576,7 @@ void tst_QQuickRepeater::asynchronous() { QQuickView *canvas = createView(); canvas->show(); - QDeclarativeIncubationController controller; + QQmlIncubationController controller; canvas->engine()->setIncubationController(&controller); canvas->setSource(testFileUrl("asyncloader.qml")); @@ -630,8 +630,8 @@ void tst_QQuickRepeater::asynchronous() void tst_QQuickRepeater::initParent() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("initparent.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("initparent.qml")); QQuickItem *rootObject = qobject_cast(component.create()); QVERIFY(rootObject); diff --git a/tests/auto/qtquick2/qquickscreen/data/screen.qml b/tests/auto/quick/qquickscreen/data/screen.qml similarity index 100% rename from tests/auto/qtquick2/qquickscreen/data/screen.qml rename to tests/auto/quick/qquickscreen/data/screen.qml diff --git a/tests/auto/qtquick2/qquickscreen/qquickscreen.pro b/tests/auto/quick/qquickscreen/qquickscreen.pro similarity index 68% rename from tests/auto/qtquick2/qquickscreen/qquickscreen.pro rename to tests/auto/quick/qquickscreen/qquickscreen.pro index 6d0a5e1650..00ec51ef33 100644 --- a/tests/auto/qtquick2/qquickscreen/qquickscreen.pro +++ b/tests/auto/quick/qquickscreen/qquickscreen.pro @@ -7,4 +7,4 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle CONFIG += parallel_test -QT += core-private gui-private declarative-private testlib quick-private +QT += core-private gui-private qml-private testlib quick-private diff --git a/tests/auto/qtquick2/qquickscreen/tst_qquickscreen.cpp b/tests/auto/quick/qquickscreen/tst_qquickscreen.cpp similarity index 97% rename from tests/auto/qtquick2/qquickscreen/tst_qquickscreen.cpp rename to tests/auto/quick/qquickscreen/tst_qquickscreen.cpp index bb687f7596..cbf9438f24 100644 --- a/tests/auto/qtquick2/qquickscreen/tst_qquickscreen.cpp +++ b/tests/auto/quick/qquickscreen/tst_qquickscreen.cpp @@ -46,7 +46,7 @@ #include #include "../../shared/util.h" -class tst_qquickscreen : public QDeclarativeDataTest +class tst_qquickscreen : public QQmlDataTest { Q_OBJECT private slots: diff --git a/tests/auto/qtquick2/qquickshadereffect/qquickshadereffect.pro b/tests/auto/quick/qquickshadereffect/qquickshadereffect.pro similarity index 63% rename from tests/auto/qtquick2/qquickshadereffect/qquickshadereffect.pro rename to tests/auto/quick/qquickshadereffect/qquickshadereffect.pro index de8b247340..6ff50a0553 100644 --- a/tests/auto/qtquick2/qquickshadereffect/qquickshadereffect.pro +++ b/tests/auto/quick/qquickshadereffect/qquickshadereffect.pro @@ -5,4 +5,4 @@ SOURCES += tst_qquickshadereffect.cpp macx:CONFIG -= app_bundle CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private widgets testlib +QT += core-private gui-private qml-private quick-private widgets testlib diff --git a/tests/auto/qtquick2/qquickshadereffect/tst_qquickshadereffect.cpp b/tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp similarity index 100% rename from tests/auto/qtquick2/qquickshadereffect/tst_qquickshadereffect.cpp rename to tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp diff --git a/tests/auto/qtquick2/qdeclarativesmoothedanimation/data/deleteOnUpdate.qml b/tests/auto/quick/qquicksmoothedanimation/data/deleteOnUpdate.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativesmoothedanimation/data/deleteOnUpdate.qml rename to tests/auto/quick/qquicksmoothedanimation/data/deleteOnUpdate.qml diff --git a/tests/auto/qtquick2/qdeclarativesmoothedanimation/data/simpleanimation.qml b/tests/auto/quick/qquicksmoothedanimation/data/simpleanimation.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativesmoothedanimation/data/simpleanimation.qml rename to tests/auto/quick/qquicksmoothedanimation/data/simpleanimation.qml diff --git a/tests/auto/qtquick2/qdeclarativesmoothedanimation/data/smoothedanimation1.qml b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation1.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativesmoothedanimation/data/smoothedanimation1.qml rename to tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation1.qml diff --git a/tests/auto/qtquick2/qdeclarativesmoothedanimation/data/smoothedanimation2.qml b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativesmoothedanimation/data/smoothedanimation2.qml rename to tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation2.qml diff --git a/tests/auto/qtquick2/qdeclarativesmoothedanimation/data/smoothedanimation3.qml b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation3.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativesmoothedanimation/data/smoothedanimation3.qml rename to tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation3.qml diff --git a/tests/auto/qtquick2/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimationBehavior.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml rename to tests/auto/quick/qquicksmoothedanimation/data/smoothedanimationBehavior.qml diff --git a/tests/auto/qtquick2/qdeclarativesmoothedanimation/data/smoothedanimationValueSource.qml b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimationValueSource.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativesmoothedanimation/data/smoothedanimationValueSource.qml rename to tests/auto/quick/qquicksmoothedanimation/data/smoothedanimationValueSource.qml diff --git a/tests/auto/quick/qquicksmoothedanimation/qquicksmoothedanimation.pro b/tests/auto/quick/qquicksmoothedanimation/qquicksmoothedanimation.pro new file mode 100644 index 0000000000..0d5567da8d --- /dev/null +++ b/tests/auto/quick/qquicksmoothedanimation/qquicksmoothedanimation.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qquicksmoothedanimation +macx:CONFIG -= app_bundle + +SOURCES += tst_qquicksmoothedanimation.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private v8-private qml-private quick-private testlib diff --git a/tests/auto/qtquick2/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp b/tests/auto/quick/qquicksmoothedanimation/tst_qquicksmoothedanimation.cpp similarity index 63% rename from tests/auto/qtquick2/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp rename to tests/auto/quick/qquicksmoothedanimation/tst_qquicksmoothedanimation.cpp index 09bde4ad76..a3e0e46f97 100644 --- a/tests/auto/qtquick2/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp +++ b/tests/auto/quick/qquicksmoothedanimation/tst_qquicksmoothedanimation.cpp @@ -39,18 +39,18 @@ ** ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include "../../shared/util.h" -class tst_qdeclarativesmoothedanimation : public QDeclarativeDataTest +class tst_qquicksmoothedanimation : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativesmoothedanimation(); + tst_qquicksmoothedanimation(); private slots: void defaultValues(); @@ -62,18 +62,18 @@ private slots: void deleteOnUpdate(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -tst_qdeclarativesmoothedanimation::tst_qdeclarativesmoothedanimation() +tst_qquicksmoothedanimation::tst_qquicksmoothedanimation() { } -void tst_qdeclarativesmoothedanimation::defaultValues() +void tst_qquicksmoothedanimation::defaultValues() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("smoothedanimation1.qml")); - QDeclarativeSmoothedAnimation *obj = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("smoothedanimation1.qml")); + QQuickSmoothedAnimation *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -81,16 +81,16 @@ void tst_qdeclarativesmoothedanimation::defaultValues() QCOMPARE(obj->velocity(), 200.); QCOMPARE(obj->duration(), -1); QCOMPARE(obj->maximumEasingTime(), -1); - QCOMPARE(obj->reversingMode(), QDeclarativeSmoothedAnimation::Eased); + QCOMPARE(obj->reversingMode(), QQuickSmoothedAnimation::Eased); delete obj; } -void tst_qdeclarativesmoothedanimation::values() +void tst_qquicksmoothedanimation::values() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("smoothedanimation2.qml")); - QDeclarativeSmoothedAnimation *obj = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("smoothedanimation2.qml")); + QQuickSmoothedAnimation *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -98,38 +98,38 @@ void tst_qdeclarativesmoothedanimation::values() QCOMPARE(obj->velocity(), 200.); QCOMPARE(obj->duration(), 300); QCOMPARE(obj->maximumEasingTime(), -1); - QCOMPARE(obj->reversingMode(), QDeclarativeSmoothedAnimation::Immediate); + QCOMPARE(obj->reversingMode(), QQuickSmoothedAnimation::Immediate); delete obj; } -void tst_qdeclarativesmoothedanimation::disabled() +void tst_qquicksmoothedanimation::disabled() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("smoothedanimation3.qml")); - QDeclarativeSmoothedAnimation *obj = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("smoothedanimation3.qml")); + QQuickSmoothedAnimation *obj = qobject_cast(c.create()); QVERIFY(obj != 0); QCOMPARE(obj->to(), 10.); QCOMPARE(obj->velocity(), 250.); QCOMPARE(obj->maximumEasingTime(), 150); - QCOMPARE(obj->reversingMode(), QDeclarativeSmoothedAnimation::Sync); + QCOMPARE(obj->reversingMode(), QQuickSmoothedAnimation::Sync); delete obj; } -void tst_qdeclarativesmoothedanimation::simpleAnimation() +void tst_qquicksmoothedanimation::simpleAnimation() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("simpleanimation.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("simpleanimation.qml")); QObject *obj = c.create(); QVERIFY(obj); QQuickRectangle *rect = obj->findChild("rect"); QVERIFY(rect); - QDeclarativeSmoothedAnimation *animation = obj->findChild("anim"); + QQuickSmoothedAnimation *animation = obj->findChild("anim"); QVERIFY(animation); animation->setTargetObject(rect); @@ -157,11 +157,11 @@ void tst_qdeclarativesmoothedanimation::simpleAnimation() QCOMPARE(rect->x(), qreal(100)); } -void tst_qdeclarativesmoothedanimation::valueSource() +void tst_qquicksmoothedanimation::valueSource() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("smoothedanimationValueSource.qml")); + QQmlComponent c(&engine, testFileUrl("smoothedanimationValueSource.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -169,11 +169,11 @@ void tst_qdeclarativesmoothedanimation::valueSource() QQuickRectangle *theRect = rect->findChild("theRect"); QVERIFY(theRect); - QDeclarativeSmoothedAnimation *easeX = rect->findChild("easeX"); + QQuickSmoothedAnimation *easeX = rect->findChild("easeX"); QVERIFY(easeX); QVERIFY(easeX->isRunning()); - QDeclarativeSmoothedAnimation *easeY = rect->findChild("easeY"); + QQuickSmoothedAnimation *easeY = rect->findChild("easeY"); QVERIFY(easeY); QVERIFY(easeY->isRunning()); @@ -189,11 +189,11 @@ void tst_qdeclarativesmoothedanimation::valueSource() delete rect; } -void tst_qdeclarativesmoothedanimation::behavior() +void tst_qquicksmoothedanimation::behavior() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("smoothedanimationBehavior.qml")); + QQmlComponent c(&engine, testFileUrl("smoothedanimationBehavior.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); @@ -201,10 +201,10 @@ void tst_qdeclarativesmoothedanimation::behavior() QQuickRectangle *theRect = rect->findChild("theRect"); QVERIFY(theRect); - QDeclarativeSmoothedAnimation *easeX = rect->findChild("easeX"); + QQuickSmoothedAnimation *easeX = rect->findChild("easeX"); QVERIFY(easeX); - QDeclarativeSmoothedAnimation *easeY = rect->findChild("easeY"); + QQuickSmoothedAnimation *easeY = rect->findChild("easeY"); QVERIFY(easeY); // XXX get the proper duration @@ -219,16 +219,16 @@ void tst_qdeclarativesmoothedanimation::behavior() delete rect; } -void tst_qdeclarativesmoothedanimation::deleteOnUpdate() +void tst_qquicksmoothedanimation::deleteOnUpdate() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("deleteOnUpdate.qml")); + QQmlComponent c(&engine, testFileUrl("deleteOnUpdate.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect); - QDeclarativeSmoothedAnimation *anim = rect->findChild("anim"); + QQuickSmoothedAnimation *anim = rect->findChild("anim"); QVERIFY(anim); //don't crash @@ -237,6 +237,6 @@ void tst_qdeclarativesmoothedanimation::deleteOnUpdate() delete rect; } -QTEST_MAIN(tst_qdeclarativesmoothedanimation) +QTEST_MAIN(tst_qquicksmoothedanimation) -#include "tst_qdeclarativesmoothedanimation.moc" +#include "tst_qquicksmoothedanimation.moc" diff --git a/tests/auto/qtquick2/qdeclarativespringanimation/data/springanimation1.qml b/tests/auto/quick/qquickspringanimation/data/springanimation1.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativespringanimation/data/springanimation1.qml rename to tests/auto/quick/qquickspringanimation/data/springanimation1.qml diff --git a/tests/auto/qtquick2/qdeclarativespringanimation/data/springanimation2.qml b/tests/auto/quick/qquickspringanimation/data/springanimation2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativespringanimation/data/springanimation2.qml rename to tests/auto/quick/qquickspringanimation/data/springanimation2.qml diff --git a/tests/auto/qtquick2/qdeclarativespringanimation/data/springanimation3.qml b/tests/auto/quick/qquickspringanimation/data/springanimation3.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativespringanimation/data/springanimation3.qml rename to tests/auto/quick/qquickspringanimation/data/springanimation3.qml diff --git a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro b/tests/auto/quick/qquickspringanimation/qquickspringanimation.pro similarity index 54% rename from tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro rename to tests/auto/quick/qquickspringanimation/qquickspringanimation.pro index 3e1cc01e09..8ad472f8cc 100644 --- a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro +++ b/tests/auto/quick/qquickspringanimation/qquickspringanimation.pro @@ -1,10 +1,10 @@ CONFIG += testcase -TARGET = tst_qdeclarativecontext -SOURCES += tst_qdeclarativecontext.cpp +TARGET = tst_qquickspringanimation +macx:CONFIG -= app_bundle -include (../../shared/util.pri) +SOURCES += tst_qquickspringanimation.cpp -macx:CONFIG -= app_bundle +include (../../shared/util.pri) testDataFiles.files = data testDataFiles.path = . @@ -12,4 +12,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private testlib v8-private +QT += core-private gui-private v8-private qml-private quick-private testlib diff --git a/tests/auto/qtquick2/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp b/tests/auto/quick/qquickspringanimation/tst_qquickspringanimation.cpp similarity index 70% rename from tests/auto/qtquick2/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp rename to tests/auto/quick/qquickspringanimation/tst_qquickspringanimation.cpp index 64956d7753..4fa512d9b6 100644 --- a/tests/auto/qtquick2/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp +++ b/tests/auto/quick/qquickspringanimation/tst_qquickspringanimation.cpp @@ -39,17 +39,17 @@ ** ****************************************************************************/ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "../../shared/util.h" -class tst_qdeclarativespringanimation : public QDeclarativeDataTest +class tst_qquickspringanimation : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativespringanimation(); + tst_qquickspringanimation(); private slots: void defaultValues(); @@ -57,18 +57,18 @@ private slots: void disabled(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -tst_qdeclarativespringanimation::tst_qdeclarativespringanimation() +tst_qquickspringanimation::tst_qquickspringanimation() { } -void tst_qdeclarativespringanimation::defaultValues() +void tst_qquickspringanimation::defaultValues() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("springanimation1.qml")); - QDeclarativeSpringAnimation *obj = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("springanimation1.qml")); + QQuickSpringAnimation *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -84,13 +84,13 @@ void tst_qdeclarativespringanimation::defaultValues() delete obj; } -void tst_qdeclarativespringanimation::values() +void tst_qquickspringanimation::values() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("springanimation2.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("springanimation2.qml")); QObject *root = c.create(); - QDeclarativeSpringAnimation *obj = root->findChild(); + QQuickSpringAnimation *obj = root->findChild(); QVERIFY(obj != 0); @@ -108,11 +108,11 @@ void tst_qdeclarativespringanimation::values() delete obj; } -void tst_qdeclarativespringanimation::disabled() +void tst_qquickspringanimation::disabled() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("springanimation3.qml")); - QDeclarativeSpringAnimation *obj = qobject_cast(c.create()); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("springanimation3.qml")); + QQuickSpringAnimation *obj = qobject_cast(c.create()); QVERIFY(obj != 0); @@ -128,6 +128,6 @@ void tst_qdeclarativespringanimation::disabled() delete obj; } -QTEST_MAIN(tst_qdeclarativespringanimation) +QTEST_MAIN(tst_qquickspringanimation) -#include "tst_qdeclarativespringanimation.moc" +#include "tst_qquickspringanimation.moc" diff --git a/tests/auto/qtquick2/qquickspriteimage/data/advance.qml b/tests/auto/quick/qquickspriteimage/data/advance.qml similarity index 100% rename from tests/auto/qtquick2/qquickspriteimage/data/advance.qml rename to tests/auto/quick/qquickspriteimage/data/advance.qml diff --git a/tests/auto/qtquick2/qquickspriteimage/data/basic.qml b/tests/auto/quick/qquickspriteimage/data/basic.qml similarity index 100% rename from tests/auto/qtquick2/qquickspriteimage/data/basic.qml rename to tests/auto/quick/qquickspriteimage/data/basic.qml diff --git a/tests/auto/qtquick2/qquickspriteimage/data/squarefacesprite.png b/tests/auto/quick/qquickspriteimage/data/squarefacesprite.png similarity index 100% rename from tests/auto/qtquick2/qquickspriteimage/data/squarefacesprite.png rename to tests/auto/quick/qquickspriteimage/data/squarefacesprite.png diff --git a/tests/auto/qtquick2/qquickspriteimage/qquickspriteimage.pro b/tests/auto/quick/qquickspriteimage/qquickspriteimage.pro similarity index 75% rename from tests/auto/qtquick2/qquickspriteimage/qquickspriteimage.pro rename to tests/auto/quick/qquickspriteimage/qquickspriteimage.pro index 0d63007c65..50613792de 100644 --- a/tests/auto/qtquick2/qquickspriteimage/qquickspriteimage.pro +++ b/tests/auto/quick/qquickspriteimage/qquickspriteimage.pro @@ -12,4 +12,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private declarative-private quick-private network testlib +QT += core-private gui-private qml-private quick-private network testlib diff --git a/tests/auto/qtquick2/qquickspriteimage/tst_qquickspriteimage.cpp b/tests/auto/quick/qquickspriteimage/tst_qquickspriteimage.cpp similarity index 98% rename from tests/auto/qtquick2/qquickspriteimage/tst_qquickspriteimage.cpp rename to tests/auto/quick/qquickspriteimage/tst_qquickspriteimage.cpp index 37453521fa..7aff77334d 100644 --- a/tests/auto/qtquick2/qquickspriteimage/tst_qquickspriteimage.cpp +++ b/tests/auto/quick/qquickspriteimage/tst_qquickspriteimage.cpp @@ -43,7 +43,7 @@ #include #include -class tst_qquickspriteimage : public QDeclarativeDataTest +class tst_qquickspriteimage : public QQmlDataTest { Q_OBJECT public: diff --git a/tests/auto/qtquick2/qdeclarativestates/data/ExtendedRectangle.qml b/tests/auto/quick/qquickstates/data/ExtendedRectangle.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/ExtendedRectangle.qml rename to tests/auto/quick/qquickstates/data/ExtendedRectangle.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/Implementation/MyType.qml b/tests/auto/quick/qquickstates/data/Implementation/MyType.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/Implementation/MyType.qml rename to tests/auto/quick/qquickstates/data/Implementation/MyType.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/Implementation/images/qt-logo.png b/tests/auto/quick/qquickstates/data/Implementation/images/qt-logo.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/Implementation/images/qt-logo.png rename to tests/auto/quick/qquickstates/data/Implementation/images/qt-logo.png diff --git a/tests/auto/qtquick2/qdeclarativestates/data/QTBUG-14830.qml b/tests/auto/quick/qquickstates/data/QTBUG-14830.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/QTBUG-14830.qml rename to tests/auto/quick/qquickstates/data/QTBUG-14830.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/anchorChanges1.qml b/tests/auto/quick/qquickstates/data/anchorChanges1.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/anchorChanges1.qml rename to tests/auto/quick/qquickstates/data/anchorChanges1.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/anchorChanges2.qml b/tests/auto/quick/qquickstates/data/anchorChanges2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/anchorChanges2.qml rename to tests/auto/quick/qquickstates/data/anchorChanges2.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/anchorChanges3.qml b/tests/auto/quick/qquickstates/data/anchorChanges3.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/anchorChanges3.qml rename to tests/auto/quick/qquickstates/data/anchorChanges3.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/anchorChanges4.qml b/tests/auto/quick/qquickstates/data/anchorChanges4.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/anchorChanges4.qml rename to tests/auto/quick/qquickstates/data/anchorChanges4.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/anchorChanges5.qml b/tests/auto/quick/qquickstates/data/anchorChanges5.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/anchorChanges5.qml rename to tests/auto/quick/qquickstates/data/anchorChanges5.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/anchorChangesCrash.qml b/tests/auto/quick/qquickstates/data/anchorChangesCrash.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/anchorChangesCrash.qml rename to tests/auto/quick/qquickstates/data/anchorChangesCrash.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/anchorRewindBug.qml b/tests/auto/quick/qquickstates/data/anchorRewindBug.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/anchorRewindBug.qml rename to tests/auto/quick/qquickstates/data/anchorRewindBug.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/anchorRewindBug2.qml b/tests/auto/quick/qquickstates/data/anchorRewindBug2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/anchorRewindBug2.qml rename to tests/auto/quick/qquickstates/data/anchorRewindBug2.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/attachedPropertyChanges.qml b/tests/auto/quick/qquickstates/data/attachedPropertyChanges.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/attachedPropertyChanges.qml rename to tests/auto/quick/qquickstates/data/attachedPropertyChanges.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml b/tests/auto/quick/qquickstates/data/autoStateAtStartupRestoreBug.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml rename to tests/auto/quick/qquickstates/data/autoStateAtStartupRestoreBug.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/avoidFastForward.qml b/tests/auto/quick/qquickstates/data/avoidFastForward.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/avoidFastForward.qml rename to tests/auto/quick/qquickstates/data/avoidFastForward.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/basicBinding.qml b/tests/auto/quick/qquickstates/data/basicBinding.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/basicBinding.qml rename to tests/auto/quick/qquickstates/data/basicBinding.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/basicBinding2.qml b/tests/auto/quick/qquickstates/data/basicBinding2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/basicBinding2.qml rename to tests/auto/quick/qquickstates/data/basicBinding2.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/basicBinding3.qml b/tests/auto/quick/qquickstates/data/basicBinding3.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/basicBinding3.qml rename to tests/auto/quick/qquickstates/data/basicBinding3.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/basicBinding4.qml b/tests/auto/quick/qquickstates/data/basicBinding4.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/basicBinding4.qml rename to tests/auto/quick/qquickstates/data/basicBinding4.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/basicChanges.qml b/tests/auto/quick/qquickstates/data/basicChanges.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/basicChanges.qml rename to tests/auto/quick/qquickstates/data/basicChanges.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/basicChanges2.qml b/tests/auto/quick/qquickstates/data/basicChanges2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/basicChanges2.qml rename to tests/auto/quick/qquickstates/data/basicChanges2.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/basicChanges3.qml b/tests/auto/quick/qquickstates/data/basicChanges3.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/basicChanges3.qml rename to tests/auto/quick/qquickstates/data/basicChanges3.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/basicChanges4.qml b/tests/auto/quick/qquickstates/data/basicChanges4.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/basicChanges4.qml rename to tests/auto/quick/qquickstates/data/basicChanges4.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/basicExtension.qml b/tests/auto/quick/qquickstates/data/basicExtension.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/basicExtension.qml rename to tests/auto/quick/qquickstates/data/basicExtension.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/deleting.qml b/tests/auto/quick/qquickstates/data/deleting.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/deleting.qml rename to tests/auto/quick/qquickstates/data/deleting.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/deletingState.qml b/tests/auto/quick/qquickstates/data/deletingState.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/deletingState.qml rename to tests/auto/quick/qquickstates/data/deletingState.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/editProperties.qml b/tests/auto/quick/qquickstates/data/editProperties.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/editProperties.qml rename to tests/auto/quick/qquickstates/data/editProperties.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/explicit.qml b/tests/auto/quick/qquickstates/data/explicit.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/explicit.qml rename to tests/auto/quick/qquickstates/data/explicit.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/extendsBug.qml b/tests/auto/quick/qquickstates/data/extendsBug.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/extendsBug.qml rename to tests/auto/quick/qquickstates/data/extendsBug.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/fakeExtension.qml b/tests/auto/quick/qquickstates/data/fakeExtension.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/fakeExtension.qml rename to tests/auto/quick/qquickstates/data/fakeExtension.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/illegalObj.qml b/tests/auto/quick/qquickstates/data/illegalObj.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/illegalObj.qml rename to tests/auto/quick/qquickstates/data/illegalObj.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/illegalTempState.qml b/tests/auto/quick/qquickstates/data/illegalTempState.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/illegalTempState.qml rename to tests/auto/quick/qquickstates/data/illegalTempState.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/image.png b/tests/auto/quick/qquickstates/data/image.png similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/image.png rename to tests/auto/quick/qquickstates/data/image.png diff --git a/tests/auto/qtquick2/qdeclarativestates/data/legalTempState.qml b/tests/auto/quick/qquickstates/data/legalTempState.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/legalTempState.qml rename to tests/auto/quick/qquickstates/data/legalTempState.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/nonExistantProp.qml b/tests/auto/quick/qquickstates/data/nonExistantProp.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/nonExistantProp.qml rename to tests/auto/quick/qquickstates/data/nonExistantProp.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/parentChange1.qml b/tests/auto/quick/qquickstates/data/parentChange1.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/parentChange1.qml rename to tests/auto/quick/qquickstates/data/parentChange1.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/parentChange2.qml b/tests/auto/quick/qquickstates/data/parentChange2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/parentChange2.qml rename to tests/auto/quick/qquickstates/data/parentChange2.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/parentChange3.qml b/tests/auto/quick/qquickstates/data/parentChange3.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/parentChange3.qml rename to tests/auto/quick/qquickstates/data/parentChange3.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/parentChange4.qml b/tests/auto/quick/qquickstates/data/parentChange4.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/parentChange4.qml rename to tests/auto/quick/qquickstates/data/parentChange4.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/parentChange5.qml b/tests/auto/quick/qquickstates/data/parentChange5.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/parentChange5.qml rename to tests/auto/quick/qquickstates/data/parentChange5.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/parentChange6.qml b/tests/auto/quick/qquickstates/data/parentChange6.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/parentChange6.qml rename to tests/auto/quick/qquickstates/data/parentChange6.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/propertyErrors.qml b/tests/auto/quick/qquickstates/data/propertyErrors.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/propertyErrors.qml rename to tests/auto/quick/qquickstates/data/propertyErrors.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/reset.qml b/tests/auto/quick/qquickstates/data/reset.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/reset.qml rename to tests/auto/quick/qquickstates/data/reset.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/restoreEntryValues.qml b/tests/auto/quick/qquickstates/data/restoreEntryValues.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/restoreEntryValues.qml rename to tests/auto/quick/qquickstates/data/restoreEntryValues.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/returnToBase.qml b/tests/auto/quick/qquickstates/data/returnToBase.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/returnToBase.qml rename to tests/auto/quick/qquickstates/data/returnToBase.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/revertListBug.qml b/tests/auto/quick/qquickstates/data/revertListBug.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/revertListBug.qml rename to tests/auto/quick/qquickstates/data/revertListBug.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/script.qml b/tests/auto/quick/qquickstates/data/script.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/script.qml rename to tests/auto/quick/qquickstates/data/script.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/signalOverride.qml b/tests/auto/quick/qquickstates/data/signalOverride.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/signalOverride.qml rename to tests/auto/quick/qquickstates/data/signalOverride.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/signalOverride2.qml b/tests/auto/quick/qquickstates/data/signalOverride2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/signalOverride2.qml rename to tests/auto/quick/qquickstates/data/signalOverride2.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/signalOverrideCrash.qml b/tests/auto/quick/qquickstates/data/signalOverrideCrash.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/signalOverrideCrash.qml rename to tests/auto/quick/qquickstates/data/signalOverrideCrash.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/signalOverrideCrash2.qml b/tests/auto/quick/qquickstates/data/signalOverrideCrash2.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/signalOverrideCrash2.qml rename to tests/auto/quick/qquickstates/data/signalOverrideCrash2.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/signalOverrideCrash3.qml b/tests/auto/quick/qquickstates/data/signalOverrideCrash3.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/signalOverrideCrash3.qml rename to tests/auto/quick/qquickstates/data/signalOverrideCrash3.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/unnamedWhen.qml b/tests/auto/quick/qquickstates/data/unnamedWhen.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/unnamedWhen.qml rename to tests/auto/quick/qquickstates/data/unnamedWhen.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/urlResolution.qml b/tests/auto/quick/qquickstates/data/urlResolution.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/urlResolution.qml rename to tests/auto/quick/qquickstates/data/urlResolution.qml diff --git a/tests/auto/qtquick2/qdeclarativestates/data/whenOrdering.qml b/tests/auto/quick/qquickstates/data/whenOrdering.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativestates/data/whenOrdering.qml rename to tests/auto/quick/qquickstates/data/whenOrdering.qml diff --git a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro b/tests/auto/quick/qquickstates/qquickstates.pro similarity index 55% rename from tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro rename to tests/auto/quick/qquickstates/qquickstates.pro index 6098d03509..ec881680ea 100644 --- a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro +++ b/tests/auto/quick/qquickstates/qquickstates.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qdeclarativebinding +TARGET = tst_qquickstates macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativebinding.cpp +SOURCES += tst_qquickstates.cpp include (../../shared/util.pri) @@ -11,5 +11,4 @@ testDataFiles.path = . DEPLOYMENT += testDataFiles CONFIG += parallel_test - -QT += core-private gui-private declarative-private quick-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/qtquick2/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/quick/qquickstates/tst_qquickstates.cpp similarity index 81% rename from tests/auto/qtquick2/qdeclarativestates/tst_qdeclarativestates.cpp rename to tests/auto/quick/qquickstates/tst_qquickstates.cpp index 391a4f7cfe..fc8194f6ca 100644 --- a/tests/auto/qtquick2/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/quick/qquickstates/tst_qquickstates.cpp @@ -39,17 +39,17 @@ ** ****************************************************************************/ #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include -#include +#include #include "../../shared/util.h" class MyAttached : public QObject @@ -92,11 +92,11 @@ class MyRect : public QQuickRectangle QML_DECLARE_TYPE(MyRect) QML_DECLARE_TYPEINFO(MyRect, QML_HAS_ATTACHED_PROPERTIES) -class tst_qdeclarativestates : public QDeclarativeDataTest +class tst_qquickstates : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativestates() {} + tst_qquickstates() {} private: QByteArray fullDataPath(const QString &path) const; @@ -149,23 +149,23 @@ private slots: void revertListBug(); }; -void tst_qdeclarativestates::initTestCase() +void tst_qquickstates::initTestCase() { - QDeclarativeDataTest::initTestCase(); + QQmlDataTest::initTestCase(); qmlRegisterType("Qt.test", 1, 0, "MyRectangle"); } -QByteArray tst_qdeclarativestates::fullDataPath(const QString &path) const +QByteArray tst_qquickstates::fullDataPath(const QString &path) const { return testFileUrl(path).toString().toUtf8(); } -void tst_qdeclarativestates::basicChanges() +void tst_qquickstates::basicChanges() { - QDeclarativeEngine engine; + QQmlEngine engine; { - QDeclarativeComponent rectComponent(&engine, testFileUrl("basicChanges.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("basicChanges.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); @@ -180,7 +180,7 @@ void tst_qdeclarativestates::basicChanges() } { - QDeclarativeComponent rectComponent(&engine, testFileUrl("basicChanges2.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("basicChanges2.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); @@ -201,7 +201,7 @@ void tst_qdeclarativestates::basicChanges() } { - QDeclarativeComponent rectComponent(&engine, testFileUrl("basicChanges3.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("basicChanges3.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); @@ -237,7 +237,7 @@ void tst_qdeclarativestates::basicChanges() // signal using 'onPropertyWithNotifyChanged' even though the signal name is // actually 'oddlyNamedNotifySignal' - QDeclarativeComponent component(&engine, testFileUrl("basicChanges4.qml")); + QQmlComponent component(&engine, testFileUrl("basicChanges4.qml")); QVERIFY(component.isReady()); MyRect *rect = qobject_cast(component.create()); @@ -255,11 +255,11 @@ void tst_qdeclarativestates::basicChanges() } } -void tst_qdeclarativestates::attachedPropertyChanges() +void tst_qquickstates::attachedPropertyChanges() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("attachedPropertyChanges.qml")); + QQmlComponent component(&engine, testFileUrl("attachedPropertyChanges.qml")); QVERIFY(component.isReady()); QQuickItem *item = qobject_cast(component.create()); @@ -276,12 +276,12 @@ void tst_qdeclarativestates::attachedPropertyChanges() QCOMPARE(att->foo(), 1); } -void tst_qdeclarativestates::basicExtension() +void tst_qquickstates::basicExtension() { - QDeclarativeEngine engine; + QQmlEngine engine; { - QDeclarativeComponent rectComponent(&engine, testFileUrl("basicExtension.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("basicExtension.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); @@ -315,7 +315,7 @@ void tst_qdeclarativestates::basicExtension() } { - QDeclarativeComponent rectComponent(&engine, testFileUrl("fakeExtension.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("fakeExtension.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); @@ -342,12 +342,12 @@ void tst_qdeclarativestates::basicExtension() } } -void tst_qdeclarativestates::basicBinding() +void tst_qquickstates::basicBinding() { - QDeclarativeEngine engine; + QQmlEngine engine; { - QDeclarativeComponent rectComponent(&engine, testFileUrl("basicBinding.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("basicBinding.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); @@ -375,7 +375,7 @@ void tst_qdeclarativestates::basicBinding() } { - QDeclarativeComponent rectComponent(&engine, testFileUrl("basicBinding2.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("basicBinding2.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); @@ -406,7 +406,7 @@ void tst_qdeclarativestates::basicBinding() } { - QDeclarativeComponent rectComponent(&engine, testFileUrl("basicBinding3.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("basicBinding3.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); @@ -431,7 +431,7 @@ void tst_qdeclarativestates::basicBinding() } { - QDeclarativeComponent rectComponent(&engine, testFileUrl("basicBinding4.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("basicBinding4.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); @@ -459,12 +459,12 @@ void tst_qdeclarativestates::basicBinding() } } -void tst_qdeclarativestates::signalOverride() +void tst_qquickstates::signalOverride() { - QDeclarativeEngine engine; + QQmlEngine engine; { - QDeclarativeComponent rectComponent(&engine, testFileUrl("signalOverride.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("signalOverride.qml")); MyRect *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -478,7 +478,7 @@ void tst_qdeclarativestates::signalOverride() } { - QDeclarativeComponent rectComponent(&engine, testFileUrl("signalOverride2.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("signalOverride2.qml")); MyRect *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -495,11 +495,11 @@ void tst_qdeclarativestates::signalOverride() } } -void tst_qdeclarativestates::signalOverrideCrash() +void tst_qquickstates::signalOverrideCrash() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("signalOverrideCrash.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("signalOverrideCrash.qml")); MyRect *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -507,11 +507,11 @@ void tst_qdeclarativestates::signalOverrideCrash() rect->doSomething(); } -void tst_qdeclarativestates::signalOverrideCrash2() +void tst_qquickstates::signalOverrideCrash2() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("signalOverrideCrash2.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("signalOverrideCrash2.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -522,11 +522,11 @@ void tst_qdeclarativestates::signalOverrideCrash2() delete rect; } -void tst_qdeclarativestates::signalOverrideCrash3() +void tst_qquickstates::signalOverrideCrash3() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("signalOverrideCrash3.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("signalOverrideCrash3.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -538,20 +538,20 @@ void tst_qdeclarativestates::signalOverrideCrash3() delete rect; } -void tst_qdeclarativestates::parentChange() +void tst_qquickstates::parentChange() { - QDeclarativeEngine engine; + QQmlEngine engine; { - QDeclarativeComponent rectComponent(&engine, testFileUrl("parentChange1.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("parentChange1.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickRectangle *innerRect = qobject_cast(rect->findChild("MyRect")); QVERIFY(innerRect != 0); - QDeclarativeListReference list(rect, "states"); - QDeclarativeState *state = qobject_cast(list.at(0)); + QQmlListReference list(rect, "states"); + QQuickState *state = qobject_cast(list.at(0)); QVERIFY(state != 0); qmlExecuteDeferred(state); @@ -570,7 +570,7 @@ void tst_qdeclarativestates::parentChange() } { - QDeclarativeComponent rectComponent(&engine, testFileUrl("parentChange2.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("parentChange2.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -585,7 +585,7 @@ void tst_qdeclarativestates::parentChange() } { - QDeclarativeComponent rectComponent(&engine, testFileUrl("parentChange3.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("parentChange3.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -607,7 +607,7 @@ void tst_qdeclarativestates::parentChange() } { - QDeclarativeComponent rectComponent(&engine, testFileUrl("parentChange6.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("parentChange6.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -622,12 +622,12 @@ void tst_qdeclarativestates::parentChange() } } -void tst_qdeclarativestates::parentChangeErrors() +void tst_qquickstates::parentChangeErrors() { - QDeclarativeEngine engine; + QQmlEngine engine; { - QDeclarativeComponent rectComponent(&engine, testFileUrl("parentChange4.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("parentChange4.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -643,7 +643,7 @@ void tst_qdeclarativestates::parentChangeErrors() } { - QDeclarativeComponent rectComponent(&engine, testFileUrl("parentChange5.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("parentChange5.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -659,11 +659,11 @@ void tst_qdeclarativestates::parentChangeErrors() } } -void tst_qdeclarativestates::anchorChanges() +void tst_qquickstates::anchorChanges() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("anchorChanges1.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("anchorChanges1.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -671,8 +671,8 @@ void tst_qdeclarativestates::anchorChanges() QQuickRectangle *innerRect = qobject_cast(rect->findChild("MyRect")); QVERIFY(innerRect != 0); - QDeclarativeListReference list(rect, "states"); - QDeclarativeState *state = qobject_cast(list.at(0)); + QQmlListReference list(rect, "states"); + QQuickState *state = qobject_cast(list.at(0)); QVERIFY(state != 0); qmlExecuteDeferred(state); @@ -695,11 +695,11 @@ void tst_qdeclarativestates::anchorChanges() delete rect; } -void tst_qdeclarativestates::anchorChanges2() +void tst_qquickstates::anchorChanges2() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("anchorChanges2.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("anchorChanges2.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -716,11 +716,11 @@ void tst_qdeclarativestates::anchorChanges2() delete rect; } -void tst_qdeclarativestates::anchorChanges3() +void tst_qquickstates::anchorChanges3() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("anchorChanges3.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("anchorChanges3.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -734,8 +734,8 @@ void tst_qdeclarativestates::anchorChanges3() QQuickItem *bottomGuideline = qobject_cast(rect->findChild("BottomGuideline")); QVERIFY(bottomGuideline != 0); - QDeclarativeListReference list(rect, "states"); - QDeclarativeState *state = qobject_cast(list.at(0)); + QQmlListReference list(rect, "states"); + QQuickState *state = qobject_cast(list.at(0)); QVERIFY(state != 0); qmlExecuteDeferred(state); @@ -770,11 +770,11 @@ void tst_qdeclarativestates::anchorChanges3() delete rect; } -void tst_qdeclarativestates::anchorChanges4() +void tst_qquickstates::anchorChanges4() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("anchorChanges4.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("anchorChanges4.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -787,8 +787,8 @@ void tst_qdeclarativestates::anchorChanges4() QQuickItem *bottomGuideline = qobject_cast(rect->findChild("BottomGuideline")); QVERIFY(bottomGuideline != 0); - QDeclarativeListReference list(rect, "states"); - QDeclarativeState *state = qobject_cast(list.at(0)); + QQmlListReference list(rect, "states"); + QQuickState *state = qobject_cast(list.at(0)); QVERIFY(state != 0); qmlExecuteDeferred(state); @@ -808,11 +808,11 @@ void tst_qdeclarativestates::anchorChanges4() delete rect; } -void tst_qdeclarativestates::anchorChanges5() +void tst_qquickstates::anchorChanges5() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("anchorChanges5.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("anchorChanges5.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -825,8 +825,8 @@ void tst_qdeclarativestates::anchorChanges5() QQuickItem *bottomGuideline = qobject_cast(rect->findChild("BottomGuideline")); QVERIFY(bottomGuideline != 0); - QDeclarativeListReference list(rect, "states"); - QDeclarativeState *state = qobject_cast(list.at(0)); + QQmlListReference list(rect, "states"); + QQuickState *state = qobject_cast(list.at(0)); QVERIFY(state != 0); qmlExecuteDeferred(state); @@ -854,11 +854,11 @@ qreal offsetRTL(QQuickItem *anchorItem, QQuickItem *item) { return anchorItem->width()+2*anchorItem->x()-item->width(); } -void tst_qdeclarativestates::anchorChangesRTL() +void tst_qquickstates::anchorChangesRTL() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("anchorChanges1.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("anchorChanges1.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -867,8 +867,8 @@ void tst_qdeclarativestates::anchorChangesRTL() QVERIFY(innerRect != 0); mirrorAnchors(innerRect); - QDeclarativeListReference list(rect, "states"); - QDeclarativeState *state = qobject_cast(list.at(0)); + QQmlListReference list(rect, "states"); + QQuickState *state = qobject_cast(list.at(0)); QVERIFY(state != 0); qmlExecuteDeferred(state); @@ -888,11 +888,11 @@ void tst_qdeclarativestates::anchorChangesRTL() delete rect; } -void tst_qdeclarativestates::anchorChangesRTL2() +void tst_qquickstates::anchorChangesRTL2() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("anchorChanges2.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("anchorChanges2.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -910,11 +910,11 @@ void tst_qdeclarativestates::anchorChangesRTL2() delete rect; } -void tst_qdeclarativestates::anchorChangesRTL3() +void tst_qquickstates::anchorChangesRTL3() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("anchorChanges3.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("anchorChanges3.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -929,8 +929,8 @@ void tst_qdeclarativestates::anchorChangesRTL3() QQuickItem *bottomGuideline = qobject_cast(rect->findChild("BottomGuideline")); QVERIFY(bottomGuideline != 0); - QDeclarativeListReference list(rect, "states"); - QDeclarativeState *state = qobject_cast(list.at(0)); + QQmlListReference list(rect, "states"); + QQuickState *state = qobject_cast(list.at(0)); QVERIFY(state != 0); qmlExecuteDeferred(state); @@ -965,11 +965,11 @@ void tst_qdeclarativestates::anchorChangesRTL3() } //QTBUG-9609 -void tst_qdeclarativestates::anchorChangesCrash() +void tst_qquickstates::anchorChangesCrash() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("anchorChangesCrash.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("anchorChangesCrash.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -979,7 +979,7 @@ void tst_qdeclarativestates::anchorChangesCrash() } // QTBUG-12273 -void tst_qdeclarativestates::anchorRewindBug() +void tst_qquickstates::anchorRewindBug() { QQuickView *view = new QQuickView; view->setSource(testFileUrl("anchorRewindBug.qml")); @@ -1018,11 +1018,11 @@ void tst_qdeclarativestates::anchorRewindBug() } // QTBUG-11834 -void tst_qdeclarativestates::anchorRewindBug2() +void tst_qquickstates::anchorRewindBug2() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("anchorRewindBug2.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("anchorRewindBug2.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -1043,12 +1043,12 @@ void tst_qdeclarativestates::anchorRewindBug2() delete rect; } -void tst_qdeclarativestates::script() +void tst_qquickstates::script() { - QDeclarativeEngine engine; + QQmlEngine engine; { - QDeclarativeComponent rectComponent(&engine, testFileUrl("script.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("script.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1062,11 +1062,11 @@ void tst_qdeclarativestates::script() } } -void tst_qdeclarativestates::restoreEntryValues() +void tst_qquickstates::restoreEntryValues() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("restoreEntryValues.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("restoreEntryValues.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1079,20 +1079,20 @@ void tst_qdeclarativestates::restoreEntryValues() QCOMPARE(rect->color(),QColor("blue")); } -void tst_qdeclarativestates::explicitChanges() +void tst_qquickstates::explicitChanges() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("explicit.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("explicit.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); - QDeclarativeListReference list(rect, "states"); - QDeclarativeState *state = qobject_cast(list.at(0)); + QQmlListReference list(rect, "states"); + QQuickState *state = qobject_cast(list.at(0)); QVERIFY(state != 0); qmlExecuteDeferred(state); - QDeclarativePropertyChanges *changes = qobject_cast(rect->findChild("changes")); + QQuickPropertyChanges *changes = qobject_cast(rect->findChild("changes")); QVERIFY(changes != 0); QVERIFY(changes->isExplicit()); @@ -1113,10 +1113,10 @@ void tst_qdeclarativestates::explicitChanges() QCOMPARE(rect->color(),QColor("yellow")); } -void tst_qdeclarativestates::propertyErrors() +void tst_qquickstates::propertyErrors() { - QDeclarativeEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("propertyErrors.qml")); + QQmlEngine engine; + QQmlComponent rectComponent(&engine, testFileUrl("propertyErrors.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); @@ -1127,11 +1127,11 @@ void tst_qdeclarativestates::propertyErrors() QQuickItemPrivate::get(rect)->setState("blue"); } -void tst_qdeclarativestates::incorrectRestoreBug() +void tst_qquickstates::incorrectRestoreBug() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("basicChanges.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("basicChanges.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1153,11 +1153,11 @@ void tst_qdeclarativestates::incorrectRestoreBug() QCOMPARE(rect->color(),QColor("green")); } -void tst_qdeclarativestates::autoStateAtStartupRestoreBug() +void tst_qquickstates::autoStateAtStartupRestoreBug() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("autoStateAtStartupRestoreBug.qml")); + QQmlComponent component(&engine, testFileUrl("autoStateAtStartupRestoreBug.qml")); QObject *obj = component.create(); QVERIFY(obj != 0); @@ -1170,11 +1170,11 @@ void tst_qdeclarativestates::autoStateAtStartupRestoreBug() delete obj; } -void tst_qdeclarativestates::deletingChange() +void tst_qquickstates::deletingChange() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("deleting.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("deleting.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1186,11 +1186,11 @@ void tst_qdeclarativestates::deletingChange() QCOMPARE(rect->color(),QColor("red")); QCOMPARE(rect->radius(),qreal(0)); - QDeclarativePropertyChanges *pc = rect->findChild("pc1"); + QQuickPropertyChanges *pc = rect->findChild("pc1"); QVERIFY(pc != 0); delete pc; - QDeclarativeState *state = rect->findChild(); + QQuickState *state = rect->findChild(); QVERIFY(state != 0); qmlExecuteDeferred(state); QCOMPARE(state->operationCount(), 1); @@ -1202,15 +1202,15 @@ void tst_qdeclarativestates::deletingChange() delete rect; } -void tst_qdeclarativestates::deletingState() +void tst_qquickstates::deletingState() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("deletingState.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("deletingState.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); - QDeclarativeStateGroup *sg = rect->findChild(); + QQuickStateGroup *sg = rect->findChild(); QVERIFY(sg != 0); QVERIFY(sg->findState("blue") != 0); @@ -1220,7 +1220,7 @@ void tst_qdeclarativestates::deletingState() sg->setState(""); QCOMPARE(rect->color(),QColor("red")); - QDeclarativeState *state = rect->findChild(); + QQuickState *state = rect->findChild(); QVERIFY(state != 0); delete state; @@ -1233,11 +1233,11 @@ void tst_qdeclarativestates::deletingState() delete rect; } -void tst_qdeclarativestates::tempState() +void tst_qquickstates::tempState() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("legalTempState.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("legalTempState.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1247,11 +1247,11 @@ void tst_qdeclarativestates::tempState() QCOMPARE(rectPrivate->state(), QLatin1String("idle")); } -void tst_qdeclarativestates::illegalTempState() +void tst_qquickstates::illegalTempState() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("illegalTempState.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("illegalTempState.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1260,11 +1260,11 @@ void tst_qdeclarativestates::illegalTempState() QCOMPARE(rectPrivate->state(), QLatin1String("placed")); } -void tst_qdeclarativestates::nonExistantProperty() +void tst_qquickstates::nonExistantProperty() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent rectComponent(&engine, testFileUrl("nonExistantProp.qml")); + QQmlComponent rectComponent(&engine, testFileUrl("nonExistantProp.qml")); QQuickRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1273,11 +1273,11 @@ void tst_qdeclarativestates::nonExistantProperty() QCOMPARE(rectPrivate->state(), QLatin1String("blue")); } -void tst_qdeclarativestates::reset() +void tst_qquickstates::reset() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("reset.qml")); + QQmlComponent c(&engine, testFileUrl("reset.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); @@ -1294,24 +1294,24 @@ void tst_qdeclarativestates::reset() delete rect; } -void tst_qdeclarativestates::illegalObjectCreation() +void tst_qquickstates::illegalObjectCreation() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent component(&engine, testFileUrl("illegalObj.qml")); - QList errors = component.errors(); + QQmlComponent component(&engine, testFileUrl("illegalObj.qml")); + QList errors = component.errors(); QVERIFY(errors.count() == 1); - const QDeclarativeError &error = errors.at(0); + const QQmlError &error = errors.at(0); QCOMPARE(error.line(), 9); QCOMPARE(error.column(), 23); QCOMPARE(error.description().toUtf8().constData(), "PropertyChanges does not support creating state-specific objects."); } -void tst_qdeclarativestates::whenOrdering() +void tst_qquickstates::whenOrdering() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("whenOrdering.qml")); + QQmlComponent c(&engine, testFileUrl("whenOrdering.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1330,11 +1330,11 @@ void tst_qdeclarativestates::whenOrdering() QCOMPARE(rectPrivate->state(), QLatin1String("")); } -void tst_qdeclarativestates::urlResolution() +void tst_qquickstates::urlResolution() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("urlResolution.qml")); + QQmlComponent c(&engine, testFileUrl("urlResolution.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); @@ -1353,11 +1353,11 @@ void tst_qdeclarativestates::urlResolution() delete rect; } -void tst_qdeclarativestates::unnamedWhen() +void tst_qquickstates::unnamedWhen() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("unnamedWhen.qml")); + QQmlComponent c(&engine, testFileUrl("unnamedWhen.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1372,11 +1372,11 @@ void tst_qdeclarativestates::unnamedWhen() QCOMPARE(rect->property("stateString").toString(), QLatin1String("")); } -void tst_qdeclarativestates::returnToBase() +void tst_qquickstates::returnToBase() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("returnToBase.qml")); + QQmlComponent c(&engine, testFileUrl("returnToBase.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1392,11 +1392,11 @@ void tst_qdeclarativestates::returnToBase() } //QTBUG-12559 -void tst_qdeclarativestates::extendsBug() +void tst_qquickstates::extendsBug() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("extendsBug.qml")); + QQmlComponent c(&engine, testFileUrl("extendsBug.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); @@ -1407,44 +1407,44 @@ void tst_qdeclarativestates::extendsBug() QCOMPARE(greenRect->y(), qreal(100)); } -void tst_qdeclarativestates::editProperties() +void tst_qquickstates::editProperties() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("editProperties.qml")); + QQmlComponent c(&engine, testFileUrl("editProperties.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); - QDeclarativeStateGroup *stateGroup = rectPrivate->_states(); + QQuickStateGroup *stateGroup = rectPrivate->_states(); QVERIFY(stateGroup != 0); qmlExecuteDeferred(stateGroup); - QDeclarativeState *blueState = stateGroup->findState("blue"); + QQuickState *blueState = stateGroup->findState("blue"); QVERIFY(blueState != 0); qmlExecuteDeferred(blueState); - QDeclarativePropertyChanges *propertyChangesBlue = qobject_cast(blueState->operationAt(0)); + QQuickPropertyChanges *propertyChangesBlue = qobject_cast(blueState->operationAt(0)); QVERIFY(propertyChangesBlue != 0); - QDeclarativeState *greenState = stateGroup->findState("green"); + QQuickState *greenState = stateGroup->findState("green"); QVERIFY(greenState != 0); qmlExecuteDeferred(greenState); - QDeclarativePropertyChanges *propertyChangesGreen = qobject_cast(greenState->operationAt(0)); + QQuickPropertyChanges *propertyChangesGreen = qobject_cast(greenState->operationAt(0)); QVERIFY(propertyChangesGreen != 0); QQuickRectangle *childRect = rect->findChild("rect2"); QVERIFY(childRect != 0); QCOMPARE(childRect->width(), qreal(402)); - QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QVERIFY(QQmlPropertyPrivate::binding(QQmlProperty(childRect, "width"))); QCOMPARE(childRect->height(), qreal(200)); rectPrivate->setState("blue"); QCOMPARE(childRect->width(), qreal(50)); QCOMPARE(childRect->height(), qreal(40)); - QVERIFY(!QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QVERIFY(!QQmlPropertyPrivate::binding(QQmlProperty(childRect, "width"))); QVERIFY(blueState->bindingInRevertList(childRect, "width")); @@ -1480,7 +1480,7 @@ void tst_qdeclarativestates::editProperties() QCOMPARE(propertyChangesBlue->value("width").toInt(), 50); QCOMPARE(propertyChangesBlue->actions().length(), 2); - QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QVERIFY(QQmlPropertyPrivate::binding(QQmlProperty(childRect, "width"))); rectPrivate->setState("blue"); QCOMPARE(childRect->width(), qreal(50)); QCOMPARE(childRect->height(), qreal(40)); @@ -1489,14 +1489,14 @@ void tst_qdeclarativestates::editProperties() QCOMPARE(propertyChangesBlue->value("width").toInt(), 60); QCOMPARE(propertyChangesBlue->actions().length(), 2); QCOMPARE(childRect->width(), qreal(60)); - QVERIFY(!QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QVERIFY(!QQmlPropertyPrivate::binding(QQmlProperty(childRect, "width"))); propertyChangesBlue->changeExpression("width", "myRectangle.width / 2"); QVERIFY(!propertyChangesBlue->containsValue("width")); QVERIFY(propertyChangesBlue->containsExpression("width")); QCOMPARE(propertyChangesBlue->value("width").toInt(), 0); QCOMPARE(propertyChangesBlue->actions().length(), 2); - QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QVERIFY(QQmlPropertyPrivate::binding(QQmlProperty(childRect, "width"))); QCOMPARE(childRect->width(), qreal(200)); propertyChangesBlue->changeValue("width", 50); @@ -1504,25 +1504,25 @@ void tst_qdeclarativestates::editProperties() rectPrivate->setState(""); QCOMPARE(childRect->width(), qreal(402)); - QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QVERIFY(QQmlPropertyPrivate::binding(QQmlProperty(childRect, "width"))); QCOMPARE(propertyChangesGreen->actions().length(), 2); rectPrivate->setState("green"); QCOMPARE(childRect->width(), qreal(200)); QCOMPARE(childRect->height(), qreal(100)); - QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QVERIFY(QQmlPropertyPrivate::binding(QQmlProperty(childRect, "width"))); QVERIFY(greenState->bindingInRevertList(childRect, "width")); QCOMPARE(propertyChangesGreen->actions().length(), 2); propertyChangesGreen->removeProperty("height"); - QVERIFY(!QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "height"))); + QVERIFY(!QQmlPropertyPrivate::binding(QQmlProperty(childRect, "height"))); QCOMPARE(childRect->height(), qreal(200)); QVERIFY(greenState->bindingInRevertList(childRect, "width")); QVERIFY(greenState->containsPropertyInRevertList(childRect, "width")); propertyChangesGreen->removeProperty("width"); - QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QVERIFY(QQmlPropertyPrivate::binding(QQmlProperty(childRect, "width"))); QCOMPARE(childRect->width(), qreal(402)); QVERIFY(!greenState->bindingInRevertList(childRect, "width")); QVERIFY(!greenState->containsPropertyInRevertList(childRect, "width")); @@ -1535,11 +1535,11 @@ void tst_qdeclarativestates::editProperties() QCOMPARE(childRect->height(), qreal(40)); } -void tst_qdeclarativestates::QTBUG_14830() +void tst_qquickstates::QTBUG_14830() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("QTBUG-14830.qml")); + QQmlComponent c(&engine, testFileUrl("QTBUG-14830.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); QQuickItem *item = rect->findChild("area"); @@ -1547,12 +1547,12 @@ void tst_qdeclarativestates::QTBUG_14830() QCOMPARE(item->width(), qreal(171)); } -void tst_qdeclarativestates::avoidFastForward() +void tst_qquickstates::avoidFastForward() { - QDeclarativeEngine engine; + QQmlEngine engine; //shouldn't fast forward if there isn't a transition - QDeclarativeComponent c(&engine, testFileUrl("avoidFastForward.qml")); + QQmlComponent c(&engine, testFileUrl("avoidFastForward.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); @@ -1562,11 +1562,11 @@ void tst_qdeclarativestates::avoidFastForward() } //QTBUG-22583 -void tst_qdeclarativestates::revertListBug() +void tst_qquickstates::revertListBug() { - QDeclarativeEngine engine; + QQmlEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("revertListBug.qml")); + QQmlComponent c(&engine, testFileUrl("revertListBug.qml")); QQuickRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); @@ -1603,6 +1603,6 @@ void tst_qdeclarativestates::revertListBug() QCOMPARE(rect2->parentItem(), origParent2); //QTBUG-22583 causes rect2's parent item to be origParent1 } -QTEST_MAIN(tst_qdeclarativestates) +QTEST_MAIN(tst_qquickstates) -#include "tst_qdeclarativestates.moc" +#include "tst_qquickstates.moc" diff --git a/tests/auto/quick/qquickstyledtext/qquickstyledtext.pro b/tests/auto/quick/qquickstyledtext/qquickstyledtext.pro new file mode 100644 index 0000000000..bd367d5ce2 --- /dev/null +++ b/tests/auto/quick/qquickstyledtext/qquickstyledtext.pro @@ -0,0 +1,8 @@ +CONFIG += testcase +TARGET = tst_qquickstyledtext +macx:CONFIG -= app_bundle + +SOURCES += tst_qquickstyledtext.cpp + +CONFIG += parallel_test +QT += core-private gui-private qml-private quick-private network testlib diff --git a/tests/auto/qtquick2/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp b/tests/auto/quick/qquickstyledtext/tst_qquickstyledtext.cpp similarity index 95% rename from tests/auto/qtquick2/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp rename to tests/auto/quick/qquickstyledtext/tst_qquickstyledtext.cpp index fd0d1abd29..86874b84fd 100644 --- a/tests/auto/qtquick2/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp +++ b/tests/auto/quick/qquickstyledtext/tst_qquickstyledtext.cpp @@ -42,13 +42,13 @@ #include #include #include -#include +#include -class tst_qdeclarativestyledtext : public QObject +class tst_qquickstyledtext : public QObject { Q_OBJECT public: - tst_qdeclarativestyledtext() + tst_qquickstyledtext() { } @@ -75,15 +75,15 @@ private slots: void textOutput_data(); }; -Q_DECLARE_METATYPE(tst_qdeclarativestyledtext::FormatList); +Q_DECLARE_METATYPE(tst_qquickstyledtext::FormatList); -const QChar tst_qdeclarativestyledtext::bullet(0x2022); -const QChar tst_qdeclarativestyledtext::disc(0x25e6); -const QChar tst_qdeclarativestyledtext::square(0x25a1); +const QChar tst_qquickstyledtext::bullet(0x2022); +const QChar tst_qquickstyledtext::disc(0x25e6); +const QChar tst_qquickstyledtext::square(0x25a1); // For malformed input all we test is that we get the expected text and format out. // -void tst_qdeclarativestyledtext::textOutput_data() +void tst_qquickstyledtext::textOutput_data() { QTest::addColumn("input"); QTest::addColumn("output"); @@ -152,15 +152,15 @@ void tst_qdeclarativestyledtext::textOutput_data() QTest::newRow("img") << "ab" << "a b" << FormatList(); } -void tst_qdeclarativestyledtext::textOutput() +void tst_qquickstyledtext::textOutput() { QFETCH(QString, input); QFETCH(QString, output); QFETCH(FormatList, formats); QTextLayout layout; - QList imgTags; - QDeclarativeStyledText::parse(input, layout, imgTags, QUrl(), 0, false); + QList imgTags; + QQuickStyledText::parse(input, layout, imgTags, QUrl(), 0, false); QCOMPARE(layout.text(), output); @@ -180,6 +180,6 @@ void tst_qdeclarativestyledtext::textOutput() } -QTEST_MAIN(tst_qdeclarativestyledtext) +QTEST_MAIN(tst_qquickstyledtext) -#include "tst_qdeclarativestyledtext.moc" +#include "tst_qquickstyledtext.moc" diff --git a/tests/auto/quick/qquicksystempalette/qquicksystempalette.pro b/tests/auto/quick/qquicksystempalette/qquicksystempalette.pro new file mode 100644 index 0000000000..c8825c07fb --- /dev/null +++ b/tests/auto/quick/qquicksystempalette/qquicksystempalette.pro @@ -0,0 +1,8 @@ +CONFIG += testcase +TARGET = tst_qquicksystempalette +macx:CONFIG -= app_bundle + +SOURCES += tst_qquicksystempalette.cpp + +CONFIG += parallel_test +QT += core-private gui-private qml-private quick-private widgets testlib diff --git a/tests/auto/qtquick2/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp b/tests/auto/quick/qquicksystempalette/tst_qquicksystempalette.cpp similarity index 80% rename from tests/auto/qtquick2/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp rename to tests/auto/quick/qquicksystempalette/tst_qquicksystempalette.cpp index f2b1eeb602..3b74dfd0ed 100644 --- a/tests/auto/qtquick2/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp +++ b/tests/auto/quick/qquicksystempalette/tst_qquicksystempalette.cpp @@ -41,16 +41,16 @@ #include #include -#include -#include -#include +#include +#include +#include #include -class tst_qdeclarativesystempalette : public QObject +class tst_qquicksystempalette : public QObject { Q_OBJECT public: - tst_qdeclarativesystempalette(); + tst_qquicksystempalette(); private slots: void activePalette(); @@ -59,19 +59,19 @@ private slots: void paletteChanged(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; -tst_qdeclarativesystempalette::tst_qdeclarativesystempalette() +tst_qquicksystempalette::tst_qquicksystempalette() { } -void tst_qdeclarativesystempalette::activePalette() +void tst_qquicksystempalette::activePalette() { QString componentStr = "import QtQuick 2.0\nSystemPalette { }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeSystemPalette *object = qobject_cast(component.create()); + QQuickSystemPalette *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -95,15 +95,15 @@ void tst_qdeclarativesystempalette::activePalette() delete object; } -void tst_qdeclarativesystempalette::inactivePalette() +void tst_qquicksystempalette::inactivePalette() { QString componentStr = "import QtQuick 2.0\nSystemPalette { colorGroup: SystemPalette.Inactive }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeSystemPalette *object = qobject_cast(component.create()); + QQuickSystemPalette *object = qobject_cast(component.create()); QVERIFY(object != 0); - QVERIFY(object->colorGroup() == QDeclarativeSystemPalette::Inactive); + QVERIFY(object->colorGroup() == QQuickSystemPalette::Inactive); QPalette palette; palette.setCurrentColorGroup(QPalette::Inactive); @@ -125,15 +125,15 @@ void tst_qdeclarativesystempalette::inactivePalette() delete object; } -void tst_qdeclarativesystempalette::disabledPalette() +void tst_qquicksystempalette::disabledPalette() { QString componentStr = "import QtQuick 2.0\nSystemPalette { colorGroup: SystemPalette.Disabled }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeSystemPalette *object = qobject_cast(component.create()); + QQuickSystemPalette *object = qobject_cast(component.create()); QVERIFY(object != 0); - QVERIFY(object->colorGroup() == QDeclarativeSystemPalette::Disabled); + QVERIFY(object->colorGroup() == QQuickSystemPalette::Disabled); QPalette palette; palette.setCurrentColorGroup(QPalette::Disabled); @@ -155,12 +155,12 @@ void tst_qdeclarativesystempalette::disabledPalette() delete object; } -void tst_qdeclarativesystempalette::paletteChanged() +void tst_qquicksystempalette::paletteChanged() { QString componentStr = "import QtQuick 2.0\nSystemPalette { }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QDeclarativeSystemPalette *object = qobject_cast(component.create()); + QQuickSystemPalette *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -172,7 +172,7 @@ void tst_qdeclarativesystempalette::paletteChanged() qApp->setPalette(p); - object->setColorGroup(QDeclarativeSystemPalette::Active); + object->setColorGroup(QQuickSystemPalette::Active); QTRY_COMPARE(QColor("red"), object->text()); QTRY_COMPARE(QColor("green"), object->buttonText()); QTRY_COMPARE(QColor("blue"), object->windowText()); @@ -180,6 +180,6 @@ void tst_qdeclarativesystempalette::paletteChanged() delete object; } -QTEST_MAIN(tst_qdeclarativesystempalette) +QTEST_MAIN(tst_qquicksystempalette) -#include "tst_qdeclarativesystempalette.moc" +#include "tst_qquicksystempalette.moc" diff --git a/tests/auto/qtquick2/qquicktext/data/alignments.qml b/tests/auto/quick/qquicktext/data/alignments.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/alignments.qml rename to tests/auto/quick/qquicktext/data/alignments.qml diff --git a/tests/auto/qtquick2/qquicktext/data/alignments_cb.png b/tests/auto/quick/qquicktext/data/alignments_cb.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/alignments_cb.png rename to tests/auto/quick/qquicktext/data/alignments_cb.png diff --git a/tests/auto/qtquick2/qquicktext/data/alignments_cc.png b/tests/auto/quick/qquicktext/data/alignments_cc.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/alignments_cc.png rename to tests/auto/quick/qquicktext/data/alignments_cc.png diff --git a/tests/auto/qtquick2/qquicktext/data/alignments_ct.png b/tests/auto/quick/qquicktext/data/alignments_ct.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/alignments_ct.png rename to tests/auto/quick/qquicktext/data/alignments_ct.png diff --git a/tests/auto/qtquick2/qquicktext/data/alignments_lb.png b/tests/auto/quick/qquicktext/data/alignments_lb.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/alignments_lb.png rename to tests/auto/quick/qquicktext/data/alignments_lb.png diff --git a/tests/auto/qtquick2/qquicktext/data/alignments_lc.png b/tests/auto/quick/qquicktext/data/alignments_lc.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/alignments_lc.png rename to tests/auto/quick/qquicktext/data/alignments_lc.png diff --git a/tests/auto/qtquick2/qquicktext/data/alignments_lt.png b/tests/auto/quick/qquicktext/data/alignments_lt.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/alignments_lt.png rename to tests/auto/quick/qquicktext/data/alignments_lt.png diff --git a/tests/auto/qtquick2/qquicktext/data/alignments_rb.png b/tests/auto/quick/qquicktext/data/alignments_rb.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/alignments_rb.png rename to tests/auto/quick/qquicktext/data/alignments_rb.png diff --git a/tests/auto/qtquick2/qquicktext/data/alignments_rc.png b/tests/auto/quick/qquicktext/data/alignments_rc.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/alignments_rc.png rename to tests/auto/quick/qquicktext/data/alignments_rc.png diff --git a/tests/auto/qtquick2/qquicktext/data/alignments_rt.png b/tests/auto/quick/qquicktext/data/alignments_rt.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/alignments_rt.png rename to tests/auto/quick/qquicktext/data/alignments_rt.png diff --git a/tests/auto/qtquick2/qquicktext/data/embeddedImagesLocal.qml b/tests/auto/quick/qquicktext/data/embeddedImagesLocal.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/embeddedImagesLocal.qml rename to tests/auto/quick/qquicktext/data/embeddedImagesLocal.qml diff --git a/tests/auto/qtquick2/qquicktext/data/embeddedImagesLocalError.qml b/tests/auto/quick/qquicktext/data/embeddedImagesLocalError.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/embeddedImagesLocalError.qml rename to tests/auto/quick/qquicktext/data/embeddedImagesLocalError.qml diff --git a/tests/auto/qtquick2/qquicktext/data/embeddedImagesLocalRelative.qml b/tests/auto/quick/qquicktext/data/embeddedImagesLocalRelative.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/embeddedImagesLocalRelative.qml rename to tests/auto/quick/qquicktext/data/embeddedImagesLocalRelative.qml diff --git a/tests/auto/qtquick2/qquicktext/data/embeddedImagesRemote.qml b/tests/auto/quick/qquicktext/data/embeddedImagesRemote.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/embeddedImagesRemote.qml rename to tests/auto/quick/qquicktext/data/embeddedImagesRemote.qml diff --git a/tests/auto/qtquick2/qquicktext/data/embeddedImagesRemoteError.qml b/tests/auto/quick/qquicktext/data/embeddedImagesRemoteError.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/embeddedImagesRemoteError.qml rename to tests/auto/quick/qquicktext/data/embeddedImagesRemoteError.qml diff --git a/tests/auto/qtquick2/qquicktext/data/embeddedImagesRemoteRelative.qml b/tests/auto/quick/qquicktext/data/embeddedImagesRemoteRelative.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/embeddedImagesRemoteRelative.qml rename to tests/auto/quick/qquicktext/data/embeddedImagesRemoteRelative.qml diff --git a/tests/auto/qtquick2/qquicktext/data/fontSizeMode.qml b/tests/auto/quick/qquicktext/data/fontSizeMode.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/fontSizeMode.qml rename to tests/auto/quick/qquicktext/data/fontSizeMode.qml diff --git a/tests/auto/qtquick2/qquicktext/data/horizontalAlignment_RightToLeft.qml b/tests/auto/quick/qquicktext/data/horizontalAlignment_RightToLeft.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/horizontalAlignment_RightToLeft.qml rename to tests/auto/quick/qquicktext/data/horizontalAlignment_RightToLeft.qml diff --git a/tests/auto/qtquick2/qquicktext/data/http/exists.png b/tests/auto/quick/qquicktext/data/http/exists.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/http/exists.png rename to tests/auto/quick/qquicktext/data/http/exists.png diff --git a/tests/auto/qtquick2/qquicktext/data/images/face-sad.png b/tests/auto/quick/qquicktext/data/images/face-sad.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/images/face-sad.png rename to tests/auto/quick/qquicktext/data/images/face-sad.png diff --git a/tests/auto/qtquick2/qquicktext/data/images/heart200.png b/tests/auto/quick/qquicktext/data/images/heart200.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/images/heart200.png rename to tests/auto/quick/qquicktext/data/images/heart200.png diff --git a/tests/auto/qtquick2/qquicktext/data/images/starfish_2.png b/tests/auto/quick/qquicktext/data/images/starfish_2.png similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/images/starfish_2.png rename to tests/auto/quick/qquicktext/data/images/starfish_2.png diff --git a/tests/auto/qtquick2/qquicktext/data/imgTagsElide.qml b/tests/auto/quick/qquicktext/data/imgTagsElide.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/imgTagsElide.qml rename to tests/auto/quick/qquicktext/data/imgTagsElide.qml diff --git a/tests/auto/qtquick2/qquicktext/data/imgTagsUpdates.qml b/tests/auto/quick/qquicktext/data/imgTagsUpdates.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/imgTagsUpdates.qml rename to tests/auto/quick/qquicktext/data/imgTagsUpdates.qml diff --git a/tests/auto/qtquick2/qquicktext/data/lineCount.qml b/tests/auto/quick/qquicktext/data/lineCount.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/lineCount.qml rename to tests/auto/quick/qquicktext/data/lineCount.qml diff --git a/tests/auto/qtquick2/qquicktext/data/lineHeight.qml b/tests/auto/quick/qquicktext/data/lineHeight.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/lineHeight.qml rename to tests/auto/quick/qquicktext/data/lineHeight.qml diff --git a/tests/auto/qtquick2/qquicktext/data/lineLayout.qml b/tests/auto/quick/qquicktext/data/lineLayout.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/lineLayout.qml rename to tests/auto/quick/qquicktext/data/lineLayout.qml diff --git a/tests/auto/qtquick2/qquicktext/data/multilengthStrings.qml b/tests/auto/quick/qquicktext/data/multilengthStrings.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/multilengthStrings.qml rename to tests/auto/quick/qquicktext/data/multilengthStrings.qml diff --git a/tests/auto/qtquick2/qquicktext/data/multilengthStringsWrapped.qml b/tests/auto/quick/qquicktext/data/multilengthStringsWrapped.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/multilengthStringsWrapped.qml rename to tests/auto/quick/qquicktext/data/multilengthStringsWrapped.qml diff --git a/tests/auto/qtquick2/qquicktext/data/multilineelide.qml b/tests/auto/quick/qquicktext/data/multilineelide.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/multilineelide.qml rename to tests/auto/quick/qquicktext/data/multilineelide.qml diff --git a/tests/auto/qtquick2/qquicktext/data/qtbug_14734.qml b/tests/auto/quick/qquicktext/data/qtbug_14734.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/qtbug_14734.qml rename to tests/auto/quick/qquicktext/data/qtbug_14734.qml diff --git a/tests/auto/qtquick2/qquicktext/data/rotated.qml b/tests/auto/quick/qquicktext/data/rotated.qml similarity index 100% rename from tests/auto/qtquick2/qquicktext/data/rotated.qml rename to tests/auto/quick/qquicktext/data/rotated.qml diff --git a/tests/auto/qtquick2/qquicktext/qquicktext.pro b/tests/auto/quick/qquicktext/qquicktext.pro similarity index 74% rename from tests/auto/qtquick2/qquicktext/qquicktext.pro rename to tests/auto/quick/qquicktext/qquicktext.pro index b483bebc61..67e0b9fb90 100644 --- a/tests/auto/qtquick2/qquicktext/qquicktext.pro +++ b/tests/auto/quick/qquicktext/qquicktext.pro @@ -16,4 +16,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private widgets-private opengl-private network testlib +QT += core-private gui-private v8-private qml-private quick-private widgets-private opengl-private network testlib diff --git a/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp similarity index 95% rename from tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp rename to tests/auto/quick/qquicktext/tst_qquicktext.cpp index d1c0f765d0..754395dba1 100644 --- a/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -41,11 +41,11 @@ #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include @@ -58,7 +58,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD) -class tst_qquicktext : public QDeclarativeDataTest +class tst_qquicktext : public QQmlDataTest { Q_OBJECT public: @@ -91,7 +91,7 @@ private slots: void color(); void smooth(); - // QDeclarativeFontValueType + // QQmlFontValueType void weight(); void underline(); void overline(); @@ -138,7 +138,7 @@ private slots: QStringList colorStrings; - QDeclarativeEngine engine; + QQmlEngine engine; QQuickView *createView(const QString &filename); }; @@ -207,7 +207,7 @@ QQuickView *tst_qquicktext::createView(const QString &filename) void tst_qquicktext::text() { { - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData("import QtQuick 2.0\nText { text: \"\" }", QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -221,7 +221,7 @@ void tst_qquicktext::text() for (int i = 0; i < standard.size(); i++) { QString componentStr = "import QtQuick 2.0\nText { text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -236,7 +236,7 @@ void tst_qquicktext::text() for (int i = 0; i < richText.size(); i++) { QString componentStr = "import QtQuick 2.0\nText { text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -253,7 +253,7 @@ void tst_qquicktext::width() { // uses Font metrics to find the width for standard and document to find the width for rich { - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData("import QtQuick 2.0\nText { text: \"\" }", QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -301,7 +301,7 @@ void tst_qquicktext::width() } QString componentStr = "import QtQuick 2.0\nText { text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -318,7 +318,7 @@ void tst_qquicktext::width() QVERIFY(Qt::mightBeRichText(richText.at(i))); // self-test QString componentStr = "import QtQuick 2.0\nText { text: \"" + richText.at(i) + "\"; textFormat: Text.RichText }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); @@ -341,7 +341,7 @@ void tst_qquicktext::wrap() int textHeight = 0; // for specified width and wrap set true { - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData("import QtQuick 2.0\nText { text: \"Hello\"; wrapMode: Text.WordWrap; width: 300 }", QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); textHeight = textObject->height(); @@ -356,7 +356,7 @@ void tst_qquicktext::wrap() for (int i = 0; i < standard.size(); i++) { QString componentStr = "import QtQuick 2.0\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -374,7 +374,7 @@ void tst_qquicktext::wrap() for (int i = 0; i < richText.size(); i++) { QString componentStr = "import QtQuick 2.0\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -393,7 +393,7 @@ void tst_qquicktext::wrap() for (int i = 0; i < richText.size(); i++) { QString componentStr = "import QtQuick 2.0\nText { wrapMode: Text.WordWrap; width: 30; height: 50; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -418,7 +418,7 @@ void tst_qquicktext::elide() // XXX Poor coverage. { - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(("import QtQuick 2.0\nText { text: \"\"; "+elide+" width: 100 }").toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -431,7 +431,7 @@ void tst_qquicktext::elide() for (int i = 0; i < standard.size(); i++) { QString componentStr = "import QtQuick 2.0\nText { "+elide+" width: 100; text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -445,7 +445,7 @@ void tst_qquicktext::elide() for (int i = 0; i < richText.size(); i++) { QString componentStr = "import QtQuick 2.0\nText { "+elide+" width: 100; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -503,7 +503,7 @@ void tst_qquicktext::multilineElide() void tst_qquicktext::textFormat() { { - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData("import QtQuick 2.0\nText { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -517,7 +517,7 @@ void tst_qquicktext::textFormat() delete textObject; } { - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData("import QtQuick 2.0\nText { text: \"Hello\" }", QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -531,7 +531,7 @@ void tst_qquicktext::textFormat() delete textObject; } { - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData("import QtQuick 2.0\nText { text: \"Hello\"; textFormat: Text.PlainText }", QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -605,7 +605,7 @@ void tst_qquicktext::horizontalAlignment() for (int j=0; j < horizontalAlignmentmentStrings.size(); j++) { QString componentStr = "import QtQuick 2.0\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -620,7 +620,7 @@ void tst_qquicktext::horizontalAlignment() for (int j=0; j < horizontalAlignmentmentStrings.size(); j++) { QString componentStr = "import QtQuick 2.0\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -740,7 +740,7 @@ void tst_qquicktext::horizontalAlignment_RightToLeft() // alignment of Text with no text set to it QString componentStr = "import QtQuick 2.0\nText {}"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QCOMPARE(textObject->hAlign(), qApp->inputMethod()->inputDirection() == Qt::LeftToRight ? @@ -757,7 +757,7 @@ void tst_qquicktext::verticalAlignment() for (int j=0; j < verticalAlignmentmentStrings.size(); j++) { QString componentStr = "import QtQuick 2.0\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -773,7 +773,7 @@ void tst_qquicktext::verticalAlignment() for (int j=0; j < verticalAlignmentmentStrings.size(); j++) { QString componentStr = "import QtQuick 2.0\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -791,7 +791,7 @@ void tst_qquicktext::font() //test size, then bold, then italic, then family { QString componentStr = "import QtQuick 2.0\nText { font.pointSize: 40; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -804,7 +804,7 @@ void tst_qquicktext::font() { QString componentStr = "import QtQuick 2.0\nText { font.pixelSize: 40; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -817,7 +817,7 @@ void tst_qquicktext::font() { QString componentStr = "import QtQuick 2.0\nText { font.bold: true; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -829,7 +829,7 @@ void tst_qquicktext::font() { QString componentStr = "import QtQuick 2.0\nText { font.italic: true; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -841,7 +841,7 @@ void tst_qquicktext::font() { QString componentStr = "import QtQuick 2.0\nText { font.family: \"Helvetica\"; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -854,7 +854,7 @@ void tst_qquicktext::font() { QString componentStr = "import QtQuick 2.0\nText { font.family: \"\"; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -870,7 +870,7 @@ void tst_qquicktext::style() for (int i = 0; i < styles.size(); i++) { QString componentStr = "import QtQuick 2.0\nText { style: \"" + styleStrings.at(i) + "\"; styleColor: \"white\"; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -880,7 +880,7 @@ void tst_qquicktext::style() delete textObject; } QString componentStr = "import QtQuick 2.0\nText { text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -900,7 +900,7 @@ void tst_qquicktext::color() for (int i = 0; i < colorStrings.size(); i++) { QString componentStr = "import QtQuick 2.0\nText { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -914,7 +914,7 @@ void tst_qquicktext::color() for (int i = 0; i < colorStrings.size(); i++) { QString componentStr = "import QtQuick 2.0\nText { styleColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -929,7 +929,7 @@ void tst_qquicktext::color() for (int i = 0; i < colorStrings.size(); i++) { QString componentStr = "import QtQuick 2.0\nText { linkColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -949,7 +949,7 @@ void tst_qquicktext::color() "styleColor: \"" + colorStrings.at(j) + "\"; " "linkColor: \"" + colorStrings.at(j) + "\"; " "text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -966,7 +966,7 @@ void tst_qquicktext::color() testColor.setAlpha(170); QString componentStr = "import QtQuick 2.0\nText { color: \"" + colorStr + "\"; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -978,7 +978,7 @@ void tst_qquicktext::color() QColor testColor(colorStr); QString componentStr = "import QtQuick 2.0\nText { color: \"" + colorStr + "\"; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QScopedPointer object(textComponent.create()); QQuickText *textObject = qobject_cast(object.data()); @@ -999,7 +999,7 @@ void tst_qquicktext::color() QColor testColor(colorStr); QString componentStr = "import QtQuick 2.0\nText { styleColor: \"" + colorStr + "\"; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QScopedPointer object(textComponent.create()); QQuickText *textObject = qobject_cast(object.data()); @@ -1020,7 +1020,7 @@ void tst_qquicktext::color() QColor testColor(colorStr); QString componentStr = "import QtQuick 2.0\nText { linkColor: \"" + colorStr + "\"; text: \"Hello World\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QScopedPointer object(textComponent.create()); QQuickText *textObject = qobject_cast(object.data()); @@ -1045,7 +1045,7 @@ void tst_qquicktext::smooth() { { QString componentStr = "import QtQuick 2.0\nText { smooth: true; text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QCOMPARE(textObject->smooth(), true); @@ -1054,7 +1054,7 @@ void tst_qquicktext::smooth() } { QString componentStr = "import QtQuick 2.0\nText { text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QCOMPARE(textObject->smooth(), false); @@ -1066,7 +1066,7 @@ void tst_qquicktext::smooth() { { QString componentStr = "import QtQuick 2.0\nText { smooth: true; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QCOMPARE(textObject->smooth(), true); @@ -1075,7 +1075,7 @@ void tst_qquicktext::smooth() } { QString componentStr = "import QtQuick 2.0\nText { text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QCOMPARE(textObject->smooth(), false); @@ -1089,23 +1089,23 @@ void tst_qquicktext::weight() { { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); - QCOMPARE((int)textObject->font().weight(), (int)QDeclarativeFontValueType::Normal); + QCOMPARE((int)textObject->font().weight(), (int)QQmlFontValueType::Normal); delete textObject; } { QString componentStr = "import QtQuick 2.0\nText { font.weight: \"Bold\"; text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); - QCOMPARE((int)textObject->font().weight(), (int)QDeclarativeFontValueType::Bold); + QCOMPARE((int)textObject->font().weight(), (int)QQmlFontValueType::Bold); delete textObject; } @@ -1115,7 +1115,7 @@ void tst_qquicktext::underline() { { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1126,7 +1126,7 @@ void tst_qquicktext::underline() } { QString componentStr = "import QtQuick 2.0\nText { font.underline: true; text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1141,7 +1141,7 @@ void tst_qquicktext::overline() { { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1152,7 +1152,7 @@ void tst_qquicktext::overline() } { QString componentStr = "import QtQuick 2.0\nText { font.overline: true; text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1167,7 +1167,7 @@ void tst_qquicktext::strikeout() { { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1178,7 +1178,7 @@ void tst_qquicktext::strikeout() } { QString componentStr = "import QtQuick 2.0\nText { font.strikeout: true; text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1193,56 +1193,56 @@ void tst_qquicktext::capitalization() { { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); - QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::MixedCase); + QCOMPARE((int)textObject->font().capitalization(), (int)QQmlFontValueType::MixedCase); delete textObject; } { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\"; font.capitalization: \"AllUppercase\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); - QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::AllUppercase); + QCOMPARE((int)textObject->font().capitalization(), (int)QQmlFontValueType::AllUppercase); delete textObject; } { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\"; font.capitalization: \"AllLowercase\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); - QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::AllLowercase); + QCOMPARE((int)textObject->font().capitalization(), (int)QQmlFontValueType::AllLowercase); delete textObject; } { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\"; font.capitalization: \"SmallCaps\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); - QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::SmallCaps); + QCOMPARE((int)textObject->font().capitalization(), (int)QQmlFontValueType::SmallCaps); delete textObject; } { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\"; font.capitalization: \"Capitalize\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); - QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::Capitalize); + QCOMPARE((int)textObject->font().capitalization(), (int)QQmlFontValueType::Capitalize); delete textObject; } @@ -1252,7 +1252,7 @@ void tst_qquicktext::letterSpacing() { { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1263,7 +1263,7 @@ void tst_qquicktext::letterSpacing() } { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\"; font.letterSpacing: -2 }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1274,7 +1274,7 @@ void tst_qquicktext::letterSpacing() } { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\"; font.letterSpacing: 3 }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1289,7 +1289,7 @@ void tst_qquicktext::wordSpacing() { { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1300,7 +1300,7 @@ void tst_qquicktext::wordSpacing() } { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\"; font.wordSpacing: -50 }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1311,7 +1311,7 @@ void tst_qquicktext::wordSpacing() } { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\"; font.wordSpacing: 200 }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1354,7 +1354,7 @@ void tst_qquicktext::clickLink() { { QString componentStr = "import QtQuick 2.0\nText { text: \"Hello world!\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1387,7 +1387,7 @@ void tst_qquicktext::baseUrl() QUrl localUrl("file:///tests/text.qml"); QUrl remoteUrl("http://qt.nokia.com/test.qml"); - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData("import QtQuick 2.0\n Text {}", localUrl); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1435,7 +1435,7 @@ void tst_qquicktext::embeddedImages() if (!error.isEmpty()) QTest::ignoreMessage(QtWarningMsg, error.toLatin1()); - QDeclarativeComponent textComponent(&engine, qmlfile); + QQmlComponent textComponent(&engine, qmlfile); QQuickText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); @@ -1549,7 +1549,7 @@ void tst_qquicktext::implicitSize() "wrapMode: " + wrap + "; " "elide: " + elide + "; " "maximumLineCount: 1 }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1566,7 +1566,7 @@ void tst_qquicktext::implicitSize() void tst_qquicktext::contentSize() { QString componentStr = "import QtQuick 2.0\nText { width: 75; height: 16; font.pixelSize: 10 }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QScopedPointer object(textComponent.create()); QQuickText *textObject = qobject_cast(object.data()); @@ -1707,7 +1707,7 @@ void tst_qquicktext::imgTagsBaseUrl() baseUrlFragment = "; baseUrl: \"" + baseUrl.toEncoded() + "\""; QByteArray componentStr = "import QtQuick 2.0\nText { text: \"This is a test \"" + baseUrlFragment + " }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr, contextUrl); QScopedPointer object(component.create()); QQuickText *textObject = qobject_cast(object.data()); @@ -1737,7 +1737,7 @@ void tst_qquicktext::imgTagsAlign() QFETCH(int, imgHeight); QFETCH(QString, align); QString componentStr = "import QtQuick 2.0\nText { text: \"This is a test of image.\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1762,7 +1762,7 @@ void tst_qquicktext::imgTagsMultipleImages() { QString componentStr = "import QtQuick 2.0\nText { text: \"This is a starfish and another one.\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); @@ -1823,7 +1823,7 @@ void tst_qquicktext::imgTagsError() { QString componentStr = "import QtQuick 2.0\nText { text: \"This is a starfish.\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); QTest::ignoreMessage(QtWarningMsg, "file::2:1: QML Text: Cannot open: file:data/images/starfish_2.pn"); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); diff --git a/tests/auto/qtquick2/qquicktextedit/data/Cursor.qml b/tests/auto/quick/qquicktextedit/data/Cursor.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/Cursor.qml rename to tests/auto/quick/qquicktextedit/data/Cursor.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/CursorRect.qml b/tests/auto/quick/qquicktextedit/data/CursorRect.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/CursorRect.qml rename to tests/auto/quick/qquicktextedit/data/CursorRect.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/alignments.qml b/tests/auto/quick/qquicktextedit/data/alignments.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/alignments.qml rename to tests/auto/quick/qquicktextedit/data/alignments.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/alignments_cb.png b/tests/auto/quick/qquicktextedit/data/alignments_cb.png similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/alignments_cb.png rename to tests/auto/quick/qquicktextedit/data/alignments_cb.png diff --git a/tests/auto/qtquick2/qquicktextedit/data/alignments_cc.png b/tests/auto/quick/qquicktextedit/data/alignments_cc.png similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/alignments_cc.png rename to tests/auto/quick/qquicktextedit/data/alignments_cc.png diff --git a/tests/auto/qtquick2/qquicktextedit/data/alignments_ct.png b/tests/auto/quick/qquicktextedit/data/alignments_ct.png similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/alignments_ct.png rename to tests/auto/quick/qquicktextedit/data/alignments_ct.png diff --git a/tests/auto/qtquick2/qquicktextedit/data/alignments_lb.png b/tests/auto/quick/qquicktextedit/data/alignments_lb.png similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/alignments_lb.png rename to tests/auto/quick/qquicktextedit/data/alignments_lb.png diff --git a/tests/auto/qtquick2/qquicktextedit/data/alignments_lc.png b/tests/auto/quick/qquicktextedit/data/alignments_lc.png similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/alignments_lc.png rename to tests/auto/quick/qquicktextedit/data/alignments_lc.png diff --git a/tests/auto/qtquick2/qquicktextedit/data/alignments_lt.png b/tests/auto/quick/qquicktextedit/data/alignments_lt.png similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/alignments_lt.png rename to tests/auto/quick/qquicktextedit/data/alignments_lt.png diff --git a/tests/auto/qtquick2/qquicktextedit/data/alignments_rb.png b/tests/auto/quick/qquicktextedit/data/alignments_rb.png similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/alignments_rb.png rename to tests/auto/quick/qquicktextedit/data/alignments_rb.png diff --git a/tests/auto/qtquick2/qquicktextedit/data/alignments_rc.png b/tests/auto/quick/qquicktextedit/data/alignments_rc.png similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/alignments_rc.png rename to tests/auto/quick/qquicktextedit/data/alignments_rc.png diff --git a/tests/auto/qtquick2/qquicktextedit/data/alignments_rt.png b/tests/auto/quick/qquicktextedit/data/alignments_rt.png similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/alignments_rt.png rename to tests/auto/quick/qquicktextedit/data/alignments_rt.png diff --git a/tests/auto/qtquick2/qquicktextedit/data/cursorTest.qml b/tests/auto/quick/qquicktextedit/data/cursorTest.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/cursorTest.qml rename to tests/auto/quick/qquicktextedit/data/cursorTest.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/cursorTestExternal.qml b/tests/auto/quick/qquicktextedit/data/cursorTestExternal.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/cursorTestExternal.qml rename to tests/auto/quick/qquicktextedit/data/cursorTestExternal.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/cursorTestInline.qml b/tests/auto/quick/qquicktextedit/data/cursorTestInline.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/cursorTestInline.qml rename to tests/auto/quick/qquicktextedit/data/cursorTestInline.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/cursorVisible.qml b/tests/auto/quick/qquicktextedit/data/cursorVisible.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/cursorVisible.qml rename to tests/auto/quick/qquicktextedit/data/cursorVisible.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/embeddedImagesLocal.qml b/tests/auto/quick/qquicktextedit/data/embeddedImagesLocal.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/embeddedImagesLocal.qml rename to tests/auto/quick/qquicktextedit/data/embeddedImagesLocal.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/embeddedImagesLocalError.qml b/tests/auto/quick/qquicktextedit/data/embeddedImagesLocalError.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/embeddedImagesLocalError.qml rename to tests/auto/quick/qquicktextedit/data/embeddedImagesLocalError.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/embeddedImagesLocalRelative.qml b/tests/auto/quick/qquicktextedit/data/embeddedImagesLocalRelative.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/embeddedImagesLocalRelative.qml rename to tests/auto/quick/qquicktextedit/data/embeddedImagesLocalRelative.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/embeddedImagesRemote.qml b/tests/auto/quick/qquicktextedit/data/embeddedImagesRemote.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/embeddedImagesRemote.qml rename to tests/auto/quick/qquicktextedit/data/embeddedImagesRemote.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/embeddedImagesRemoteError.qml b/tests/auto/quick/qquicktextedit/data/embeddedImagesRemoteError.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/embeddedImagesRemoteError.qml rename to tests/auto/quick/qquicktextedit/data/embeddedImagesRemoteError.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/embeddedImagesRemoteRelative.qml b/tests/auto/quick/qquicktextedit/data/embeddedImagesRemoteRelative.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/embeddedImagesRemoteRelative.qml rename to tests/auto/quick/qquicktextedit/data/embeddedImagesRemoteRelative.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/geometrySignals.qml b/tests/auto/quick/qquicktextedit/data/geometrySignals.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/geometrySignals.qml rename to tests/auto/quick/qquicktextedit/data/geometrySignals.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/horizontalAlignment_RightToLeft.qml b/tests/auto/quick/qquicktextedit/data/horizontalAlignment_RightToLeft.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/horizontalAlignment_RightToLeft.qml rename to tests/auto/quick/qquicktextedit/data/horizontalAlignment_RightToLeft.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/http/ErrItem.qml b/tests/auto/quick/qquicktextedit/data/http/ErrItem.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/http/ErrItem.qml rename to tests/auto/quick/qquicktextedit/data/http/ErrItem.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/http/NormItem.qml b/tests/auto/quick/qquicktextedit/data/http/NormItem.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/http/NormItem.qml rename to tests/auto/quick/qquicktextedit/data/http/NormItem.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/http/cursorHttpTest.qml b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTest.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/http/cursorHttpTest.qml rename to tests/auto/quick/qquicktextedit/data/http/cursorHttpTest.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/http/cursorHttpTestFail1.qml b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail1.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/http/cursorHttpTestFail1.qml rename to tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail1.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/http/cursorHttpTestFail2.qml b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail2.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/http/cursorHttpTestFail2.qml rename to tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail2.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/http/cursorHttpTestPass.qml b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestPass.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/http/cursorHttpTestPass.qml rename to tests/auto/quick/qquicktextedit/data/http/cursorHttpTestPass.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/http/exists.png b/tests/auto/quick/qquicktextedit/data/http/exists.png similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/http/exists.png rename to tests/auto/quick/qquicktextedit/data/http/exists.png diff --git a/tests/auto/qtquick2/qquicktextedit/data/http/qmldir b/tests/auto/quick/qquicktextedit/data/http/qmldir similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/http/qmldir rename to tests/auto/quick/qquicktextedit/data/http/qmldir diff --git a/tests/auto/qtquick2/qquicktextedit/data/httpfail/FailItem.qml b/tests/auto/quick/qquicktextedit/data/httpfail/FailItem.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/httpfail/FailItem.qml rename to tests/auto/quick/qquicktextedit/data/httpfail/FailItem.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/httpslow/WaitItem.qml b/tests/auto/quick/qquicktextedit/data/httpslow/WaitItem.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/httpslow/WaitItem.qml rename to tests/auto/quick/qquicktextedit/data/httpslow/WaitItem.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/inputContext.qml b/tests/auto/quick/qquicktextedit/data/inputContext.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/inputContext.qml rename to tests/auto/quick/qquicktextedit/data/inputContext.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/inputMethodEvent.qml b/tests/auto/quick/qquicktextedit/data/inputMethodEvent.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/inputMethodEvent.qml rename to tests/auto/quick/qquicktextedit/data/inputMethodEvent.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/inputmethodhints.qml b/tests/auto/quick/qquicktextedit/data/inputmethodhints.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/inputmethodhints.qml rename to tests/auto/quick/qquicktextedit/data/inputmethodhints.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/linkActivated.qml b/tests/auto/quick/qquicktextedit/data/linkActivated.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/linkActivated.qml rename to tests/auto/quick/qquicktextedit/data/linkActivated.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/mouseselection_default.qml b/tests/auto/quick/qquicktextedit/data/mouseselection_default.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/mouseselection_default.qml rename to tests/auto/quick/qquicktextedit/data/mouseselection_default.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/mouseselection_false.qml b/tests/auto/quick/qquicktextedit/data/mouseselection_false.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/mouseselection_false.qml rename to tests/auto/quick/qquicktextedit/data/mouseselection_false.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/mouseselection_false_words.qml b/tests/auto/quick/qquicktextedit/data/mouseselection_false_words.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/mouseselection_false_words.qml rename to tests/auto/quick/qquicktextedit/data/mouseselection_false_words.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/mouseselection_true.qml b/tests/auto/quick/qquicktextedit/data/mouseselection_true.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/mouseselection_true.qml rename to tests/auto/quick/qquicktextedit/data/mouseselection_true.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/mouseselection_true_words.qml b/tests/auto/quick/qquicktextedit/data/mouseselection_true_words.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/mouseselection_true_words.qml rename to tests/auto/quick/qquicktextedit/data/mouseselection_true_words.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/mouseselectionmode_characters.qml b/tests/auto/quick/qquicktextedit/data/mouseselectionmode_characters.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/mouseselectionmode_characters.qml rename to tests/auto/quick/qquicktextedit/data/mouseselectionmode_characters.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/mouseselectionmode_default.qml b/tests/auto/quick/qquicktextedit/data/mouseselectionmode_default.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/mouseselectionmode_default.qml rename to tests/auto/quick/qquicktextedit/data/mouseselectionmode_default.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/mouseselectionmode_words.qml b/tests/auto/quick/qquicktextedit/data/mouseselectionmode_words.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/mouseselectionmode_words.qml rename to tests/auto/quick/qquicktextedit/data/mouseselectionmode_words.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/navigation.qml b/tests/auto/quick/qquicktextedit/data/navigation.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/navigation.qml rename to tests/auto/quick/qquicktextedit/data/navigation.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/openInputPanel.qml b/tests/auto/quick/qquicktextedit/data/openInputPanel.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/openInputPanel.qml rename to tests/auto/quick/qquicktextedit/data/openInputPanel.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/persistentSelection.qml b/tests/auto/quick/qquicktextedit/data/persistentSelection.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/persistentSelection.qml rename to tests/auto/quick/qquicktextedit/data/persistentSelection.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/positionAt.qml b/tests/auto/quick/qquicktextedit/data/positionAt.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/positionAt.qml rename to tests/auto/quick/qquicktextedit/data/positionAt.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/qtbug-22058.qml b/tests/auto/quick/qquicktextedit/data/qtbug-22058.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/qtbug-22058.qml rename to tests/auto/quick/qquicktextedit/data/qtbug-22058.qml diff --git a/tests/auto/qtquick2/qquicktextedit/data/readOnly.qml b/tests/auto/quick/qquicktextedit/data/readOnly.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextedit/data/readOnly.qml rename to tests/auto/quick/qquicktextedit/data/readOnly.qml diff --git a/tests/auto/qtquick2/qquicktextedit/qquicktextedit.pro b/tests/auto/quick/qquicktextedit/qquicktextedit.pro similarity index 71% rename from tests/auto/qtquick2/qquicktextedit/qquicktextedit.pro rename to tests/auto/quick/qquicktextedit/qquicktextedit.pro index 6f74761b7b..39a5178c7d 100644 --- a/tests/auto/qtquick2/qquicktextedit/qquicktextedit.pro +++ b/tests/auto/quick/qquicktextedit/qquicktextedit.pro @@ -13,4 +13,4 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private network widgets-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private network widgets-private testlib diff --git a/tests/auto/qtquick2/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp similarity index 97% rename from tests/auto/qtquick2/qquicktextedit/tst_qquicktextedit.cpp rename to tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp index 41c8546688..314a523602 100644 --- a/tests/auto/qtquick2/qquicktextedit/tst_qquicktextedit.cpp +++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp @@ -44,10 +44,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -75,7 +75,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD) QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& actual) { // XXX This will be replaced by some clever persistent platform image store. - QString persistent_dir = QDeclarativeDataTest::instance()->dataDirectory(); + QString persistent_dir = QQmlDataTest::instance()->dataDirectory(); QString arch = "unknown-architecture"; // QTest needs to help with this. QString expectfile = persistent_dir + QDir::separator() + filebasename + "-" + arch + ".png"; @@ -90,7 +90,7 @@ QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& typedef QPair Key; -class tst_qquicktextedit : public QDeclarativeDataTest +class tst_qquicktextedit : public QQmlDataTest { Q_OBJECT @@ -199,7 +199,7 @@ private slots: QStringList colorStrings; - QDeclarativeEngine engine; + QQmlEngine engine; }; typedef QList IntList; @@ -313,7 +313,7 @@ void tst_qquicktextedit::cleanup() void tst_qquicktextedit::text() { { - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData("import QtQuick 2.0\nTextEdit { text: \"\" }", QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -325,7 +325,7 @@ void tst_qquicktextedit::text() for (int i = 0; i < standard.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -337,7 +337,7 @@ void tst_qquicktextedit::text() for (int i = 0; i < richText.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -353,7 +353,7 @@ void tst_qquicktextedit::text() for (int i = 0; i < standard.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { textFormat: TextEdit.RichText; text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -371,7 +371,7 @@ void tst_qquicktextedit::text() for (int i = 0; i < richText.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { textFormat: TextEdit.RichText; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -390,7 +390,7 @@ void tst_qquicktextedit::text() for (int i = 0; i < standard.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { textFormat: TextEdit.AutoText; text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -402,7 +402,7 @@ void tst_qquicktextedit::text() for (int i = 0; i < richText.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { textFormat: TextEdit.AutoText; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -423,7 +423,7 @@ void tst_qquicktextedit::width() { // uses Font metrics to find the width for standard and document to find the width for rich { - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData("import QtQuick 2.0\nTextEdit { text: \"\" }", QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -436,7 +436,7 @@ void tst_qquicktextedit::width() for (int i = 0; i < standard.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -478,7 +478,7 @@ void tst_qquicktextedit::width() int documentWidth = ceil(document.idealWidth()); QString componentStr = "import QtQuick 2.0\nTextEdit { textFormat: TextEdit.RichText; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -491,7 +491,7 @@ void tst_qquicktextedit::wrap() { // for specified width and wrap set true { - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData("import QtQuick 2.0\nTextEdit { text: \"\"; wrapMode: TextEdit.WordWrap; width: 300 }", QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -502,7 +502,7 @@ void tst_qquicktextedit::wrap() for (int i = 0; i < standard.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -513,7 +513,7 @@ void tst_qquicktextedit::wrap() for (int i = 0; i < richText.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -526,7 +526,7 @@ void tst_qquicktextedit::wrap() void tst_qquicktextedit::textFormat() { { - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData("import QtQuick 2.0\nTextEdit { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile("")); QQuickTextEdit *textObject = qobject_cast(textComponent.create()); @@ -534,7 +534,7 @@ void tst_qquicktextedit::textFormat() QVERIFY(textObject->textFormat() == QQuickTextEdit::RichText); } { - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData("import QtQuick 2.0\nTextEdit { text: \"Hello\"; textFormat: Text.PlainText }", QUrl::fromLocalFile("")); QQuickTextEdit *textObject = qobject_cast(textComponent.create()); @@ -603,7 +603,7 @@ void tst_qquicktextedit::hAlign() for (int j=0; j < hAlignmentStrings.size(); j++) { QString componentStr = "import QtQuick 2.0\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -617,7 +617,7 @@ void tst_qquicktextedit::hAlign() for (int j=0; j < hAlignmentStrings.size(); j++) { QString componentStr = "import QtQuick 2.0\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -779,7 +779,7 @@ void tst_qquicktextedit::vAlign() for (int j=0; j < vAlignmentStrings.size(); j++) { QString componentStr = "import QtQuick 2.0\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -793,7 +793,7 @@ void tst_qquicktextedit::vAlign() for (int j=0; j < vAlignmentStrings.size(); j++) { QString componentStr = "import QtQuick 2.0\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -802,7 +802,7 @@ void tst_qquicktextedit::vAlign() } } - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData( "import QtQuick 2.0\n" "TextEdit { width: 100; height: 100; text: \"Hello World\" }", QUrl()); @@ -834,7 +834,7 @@ void tst_qquicktextedit::font() //test size, then bold, then italic, then family { QString componentStr = "import QtQuick 2.0\nTextEdit { font.pointSize: 40; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -846,7 +846,7 @@ void tst_qquicktextedit::font() { QString componentStr = "import QtQuick 2.0\nTextEdit { font.bold: true; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -857,7 +857,7 @@ void tst_qquicktextedit::font() { QString componentStr = "import QtQuick 2.0\nTextEdit { font.italic: true; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -868,7 +868,7 @@ void tst_qquicktextedit::font() { QString componentStr = "import QtQuick 2.0\nTextEdit { font.family: \"Helvetica\"; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -880,7 +880,7 @@ void tst_qquicktextedit::font() { QString componentStr = "import QtQuick 2.0\nTextEdit { font.family: \"\"; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -894,7 +894,7 @@ void tst_qquicktextedit::color() //test initial color { QString componentStr = "import QtQuick 2.0\nTextEdit { text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -912,7 +912,7 @@ void tst_qquicktextedit::color() for (int i = 0; i < colorStrings.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); //qDebug() << "textEditObject: " << textEditObject->color() << "vs. " << QColor(colorStrings.at(i)); @@ -924,7 +924,7 @@ void tst_qquicktextedit::color() for (int i = 0; i < colorStrings.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); QVERIFY(textEditObject != 0); @@ -935,7 +935,7 @@ void tst_qquicktextedit::color() for (int i = 0; i < colorStrings.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextEdit { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); QVERIFY(textEditObject != 0); @@ -948,7 +948,7 @@ void tst_qquicktextedit::color() testColor.setAlpha(170); QString componentStr = "import QtQuick 2.0\nTextEdit { color: \"" + colorStr + "\"; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -961,7 +961,7 @@ void tst_qquicktextedit::textMargin() { for (qreal i=0; i<=10; i+=0.3) { QString componentStr = "import QtQuick 2.0\nTextEdit { textMargin: " + QString::number(i) + "; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); QVERIFY(textEditObject != 0); @@ -1018,7 +1018,7 @@ void tst_qquicktextedit::focusOnPress() { { QString componentStr = "import QtQuick 2.0\nTextEdit { activeFocusOnPress: true; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); QVERIFY(textEditObject != 0); @@ -1027,7 +1027,7 @@ void tst_qquicktextedit::focusOnPress() { QString componentStr = "import QtQuick 2.0\nTextEdit { activeFocusOnPress: false; text: \"Hello World\" }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); QVERIFY(textEditObject != 0); @@ -1039,7 +1039,7 @@ void tst_qquicktextedit::selection() { QString testStr = standard[0];//TODO: What should happen for multiline/rich text? QString componentStr = "import QtQuick 2.0\nTextEdit { text: \""+ testStr +"\"; }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEditObject = qobject_cast(texteditComponent.create()); QVERIFY(textEditObject != 0); @@ -1382,7 +1382,7 @@ void tst_qquicktextedit::moveCursorSelection() QFETCH(bool, reversible); QString componentStr = "import QtQuick 2.0\nTextEdit { text: \""+ testStr +"\"; }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *texteditObject = qobject_cast(textinputComponent.create()); QVERIFY(texteditObject != 0); @@ -1541,7 +1541,7 @@ void tst_qquicktextedit::moveCursorSelectionSequence() QFETCH(int, selection2End); QString componentStr = "import QtQuick 2.0\nTextEdit { text: \""+ testStr +"\"; }"; - QDeclarativeComponent texteditComponent(&engine); + QQmlComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *texteditObject = qobject_cast(texteditComponent.create()); QVERIFY(texteditObject != 0); @@ -2047,7 +2047,7 @@ void tst_qquicktextedit::copyAndPaste() { #endif QString componentStr = "import QtQuick 2.0\nTextEdit { text: \"Hello world!\" }"; - QDeclarativeComponent textEditComponent(&engine); + QQmlComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEdit = qobject_cast(textEditComponent.create()); QVERIFY(textEdit != 0); @@ -2098,7 +2098,7 @@ void tst_qquicktextedit::canPaste() { QGuiApplication::clipboard()->setText("Some text"); QString componentStr = "import QtQuick 2.0\nTextEdit { text: \"Hello world!\" }"; - QDeclarativeComponent textEditComponent(&engine); + QQmlComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEdit = qobject_cast(textEditComponent.create()); QVERIFY(textEdit != 0); @@ -2116,7 +2116,7 @@ void tst_qquicktextedit::canPasteEmpty() { QGuiApplication::clipboard()->clear(); QString componentStr = "import QtQuick 2.0\nTextEdit { text: \"Hello world!\" }"; - QDeclarativeComponent textEditComponent(&engine); + QQmlComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEdit = qobject_cast(textEditComponent.create()); QVERIFY(textEdit != 0); @@ -2382,7 +2382,7 @@ void tst_qquicktextedit::openInputPanel() void tst_qquicktextedit::geometrySignals() { - QDeclarativeComponent component(&engine, testFileUrl("geometrySignals.qml")); + QQmlComponent component(&engine, testFileUrl("geometrySignals.qml")); QObject *o = component.create(); QVERIFY(o); QCOMPARE(o->property("bindingWidth").toInt(), 400); @@ -2394,7 +2394,7 @@ void tst_qquicktextedit::pastingRichText_QTBUG_14003() { #ifndef QT_NO_CLIPBOARD QString componentStr = "import QtQuick 2.0\nTextEdit { textFormat: TextEdit.PlainText }"; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickTextEdit *obj = qobject_cast(component.create()); @@ -2426,7 +2426,7 @@ void tst_qquicktextedit::implicitSize() QFETCH(QString, text); QFETCH(QString, wrap); QString componentStr = "import QtQuick 2.0\nTextEdit { text: \"" + text + "\"; width: 50; wrapMode: " + wrap + " }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickTextEdit *textObject = qobject_cast(textComponent.create()); @@ -2441,7 +2441,7 @@ void tst_qquicktextedit::implicitSize() void tst_qquicktextedit::contentSize() { QString componentStr = "import QtQuick 2.0\nTextEdit { width: 75; height: 16; font.pixelSize: 10 }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QScopedPointer object(textComponent.create()); QQuickTextEdit *textObject = qobject_cast(object.data()); @@ -2663,7 +2663,7 @@ void tst_qquicktextedit::getText() QFETCH(QString, expectedText); QString componentStr = "import QtQuick 2.0\nTextEdit { textFormat: TextEdit.AutoText; text: \"" + text + "\" }"; - QDeclarativeComponent textEditComponent(&engine); + QQmlComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEdit = qobject_cast(textEditComponent.create()); QVERIFY(textEdit != 0); @@ -2764,7 +2764,7 @@ void tst_qquicktextedit::getFormattedText() QFETCH(QString, expectedText); QString componentStr = "import QtQuick 2.0\nTextEdit {}"; - QDeclarativeComponent textEditComponent(&engine); + QQmlComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEdit = qobject_cast(textEditComponent.create()); QVERIFY(textEdit != 0); @@ -2956,7 +2956,7 @@ void tst_qquicktextedit::insert() QFETCH(bool, cursorPositionChanged); QString componentStr = "import QtQuick 2.0\nTextEdit { text: \"" + text + "\" }"; - QDeclarativeComponent textEditComponent(&engine); + QQmlComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEdit = qobject_cast(textEditComponent.create()); QVERIFY(textEdit != 0); @@ -3201,7 +3201,7 @@ void tst_qquicktextedit::remove() QFETCH(bool, cursorPositionChanged); QString componentStr = "import QtQuick 2.0\nTextEdit { text: \"" + text + "\" }"; - QDeclarativeComponent textEditComponent(&engine); + QQmlComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEdit = qobject_cast(textEditComponent.create()); QVERIFY(textEdit != 0); @@ -3329,7 +3329,7 @@ void tst_qquicktextedit::keySequence() } QString componentStr = "import QtQuick 2.0\nTextEdit { focus: true; text: \"" + text + "\" }"; - QDeclarativeComponent textEditComponent(&engine); + QQmlComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEdit = qobject_cast(textEditComponent.create()); QVERIFY(textEdit != 0); @@ -3489,7 +3489,7 @@ void tst_qquicktextedit::undo() QFETCH(QStringList, expectedString); QString componentStr = "import QtQuick 2.0\nTextEdit { focus: true }"; - QDeclarativeComponent textEditComponent(&engine); + QQmlComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEdit = qobject_cast(textEditComponent.create()); QVERIFY(textEdit != 0); @@ -3575,7 +3575,7 @@ void tst_qquicktextedit::redo() QFETCH(QStringList, expectedString); QString componentStr = "import QtQuick 2.0\nTextEdit { focus: true }"; - QDeclarativeComponent textEditComponent(&engine); + QQmlComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEdit = qobject_cast(textEditComponent.create()); QVERIFY(textEdit != 0); @@ -3768,7 +3768,7 @@ void tst_qquicktextedit::undo_keypressevents() QFETCH(QStringList, expectedString); QString componentStr = "import QtQuick 2.0\nTextEdit { focus: true }"; - QDeclarativeComponent textEditComponent(&engine); + QQmlComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextEdit *textEdit = qobject_cast(textEditComponent.create()); QVERIFY(textEdit != 0); @@ -3794,7 +3794,7 @@ void tst_qquicktextedit::baseUrl() QUrl localUrl("file:///tests/text.qml"); QUrl remoteUrl("http://qt.nokia.com/test.qml"); - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData("import QtQuick 2.0\n TextEdit {}", localUrl); QQuickTextEdit *textObject = qobject_cast(textComponent.create()); @@ -3840,7 +3840,7 @@ void tst_qquicktextedit::embeddedImages() if (!error.isEmpty()) QTest::ignoreMessage(QtWarningMsg, error.toLatin1()); - QDeclarativeComponent textComponent(&engine, qmlfile); + QQmlComponent textComponent(&engine, qmlfile); QQuickTextEdit *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); diff --git a/tests/auto/qtquick2/qquicktextinput/data/Cursor.qml b/tests/auto/quick/qquicktextinput/data/Cursor.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/Cursor.qml rename to tests/auto/quick/qquicktextinput/data/Cursor.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/cursorTest.qml b/tests/auto/quick/qquicktextinput/data/cursorTest.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/cursorTest.qml rename to tests/auto/quick/qquicktextinput/data/cursorTest.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/cursorTestExternal.qml b/tests/auto/quick/qquicktextinput/data/cursorTestExternal.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/cursorTestExternal.qml rename to tests/auto/quick/qquicktextinput/data/cursorTestExternal.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/cursorTestInline.qml b/tests/auto/quick/qquicktextinput/data/cursorTestInline.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/cursorTestInline.qml rename to tests/auto/quick/qquicktextinput/data/cursorTestInline.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/cursorVisible.qml b/tests/auto/quick/qquicktextinput/data/cursorVisible.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/cursorVisible.qml rename to tests/auto/quick/qquicktextinput/data/cursorVisible.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/echoMode.qml b/tests/auto/quick/qquicktextinput/data/echoMode.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/echoMode.qml rename to tests/auto/quick/qquicktextinput/data/echoMode.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/geometrySignals.qml b/tests/auto/quick/qquicktextinput/data/geometrySignals.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/geometrySignals.qml rename to tests/auto/quick/qquicktextinput/data/geometrySignals.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/halign_center.png b/tests/auto/quick/qquicktextinput/data/halign_center.png similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/halign_center.png rename to tests/auto/quick/qquicktextinput/data/halign_center.png diff --git a/tests/auto/qtquick2/qquicktextinput/data/halign_left.png b/tests/auto/quick/qquicktextinput/data/halign_left.png similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/halign_left.png rename to tests/auto/quick/qquicktextinput/data/halign_left.png diff --git a/tests/auto/qtquick2/qquicktextinput/data/halign_right.png b/tests/auto/quick/qquicktextinput/data/halign_right.png similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/halign_right.png rename to tests/auto/quick/qquicktextinput/data/halign_right.png diff --git a/tests/auto/qtquick2/qquicktextinput/data/horizontalAlignment.qml b/tests/auto/quick/qquicktextinput/data/horizontalAlignment.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/horizontalAlignment.qml rename to tests/auto/quick/qquicktextinput/data/horizontalAlignment.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/horizontalAlignment_RightToLeft.qml b/tests/auto/quick/qquicktextinput/data/horizontalAlignment_RightToLeft.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/horizontalAlignment_RightToLeft.qml rename to tests/auto/quick/qquicktextinput/data/horizontalAlignment_RightToLeft.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/inputContext.qml b/tests/auto/quick/qquicktextinput/data/inputContext.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/inputContext.qml rename to tests/auto/quick/qquicktextinput/data/inputContext.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/inputMethodEvent.qml b/tests/auto/quick/qquicktextinput/data/inputMethodEvent.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/inputMethodEvent.qml rename to tests/auto/quick/qquicktextinput/data/inputMethodEvent.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/inputmethods.qml b/tests/auto/quick/qquicktextinput/data/inputmethods.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/inputmethods.qml rename to tests/auto/quick/qquicktextinput/data/inputmethods.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/masks.qml b/tests/auto/quick/qquicktextinput/data/masks.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/masks.qml rename to tests/auto/quick/qquicktextinput/data/masks.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/maxLength.qml b/tests/auto/quick/qquicktextinput/data/maxLength.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/maxLength.qml rename to tests/auto/quick/qquicktextinput/data/maxLength.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/mouseselection_true.qml b/tests/auto/quick/qquicktextinput/data/mouseselection_true.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/mouseselection_true.qml rename to tests/auto/quick/qquicktextinput/data/mouseselection_true.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/mouseselectionmode_characters.qml b/tests/auto/quick/qquicktextinput/data/mouseselectionmode_characters.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/mouseselectionmode_characters.qml rename to tests/auto/quick/qquicktextinput/data/mouseselectionmode_characters.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/mouseselectionmode_default.qml b/tests/auto/quick/qquicktextinput/data/mouseselectionmode_default.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/mouseselectionmode_default.qml rename to tests/auto/quick/qquicktextinput/data/mouseselectionmode_default.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/mouseselectionmode_words.qml b/tests/auto/quick/qquicktextinput/data/mouseselectionmode_words.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/mouseselectionmode_words.qml rename to tests/auto/quick/qquicktextinput/data/mouseselectionmode_words.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/navigation.qml b/tests/auto/quick/qquicktextinput/data/navigation.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/navigation.qml rename to tests/auto/quick/qquicktextinput/data/navigation.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/negativeDimensions.qml b/tests/auto/quick/qquicktextinput/data/negativeDimensions.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/negativeDimensions.qml rename to tests/auto/quick/qquicktextinput/data/negativeDimensions.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/openInputPanel.qml b/tests/auto/quick/qquicktextinput/data/openInputPanel.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/openInputPanel.qml rename to tests/auto/quick/qquicktextinput/data/openInputPanel.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/persistentSelection.qml b/tests/auto/quick/qquicktextinput/data/persistentSelection.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/persistentSelection.qml rename to tests/auto/quick/qquicktextinput/data/persistentSelection.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/positionAt.qml b/tests/auto/quick/qquicktextinput/data/positionAt.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/positionAt.qml rename to tests/auto/quick/qquicktextinput/data/positionAt.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/preeditAutoScroll.qml b/tests/auto/quick/qquicktextinput/data/preeditAutoScroll.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/preeditAutoScroll.qml rename to tests/auto/quick/qquicktextinput/data/preeditAutoScroll.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/qtbug-19956double.qml b/tests/auto/quick/qquicktextinput/data/qtbug-19956double.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/qtbug-19956double.qml rename to tests/auto/quick/qquicktextinput/data/qtbug-19956double.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/qtbug-19956int.qml b/tests/auto/quick/qquicktextinput/data/qtbug-19956int.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/qtbug-19956int.qml rename to tests/auto/quick/qquicktextinput/data/qtbug-19956int.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/qtbug-19956regexp.qml b/tests/auto/quick/qquicktextinput/data/qtbug-19956regexp.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/qtbug-19956regexp.qml rename to tests/auto/quick/qquicktextinput/data/qtbug-19956regexp.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/readOnly.qml b/tests/auto/quick/qquicktextinput/data/readOnly.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/readOnly.qml rename to tests/auto/quick/qquicktextinput/data/readOnly.qml diff --git a/tests/auto/qtquick2/qquicktextinput/data/validators.qml b/tests/auto/quick/qquicktextinput/data/validators.qml similarity index 100% rename from tests/auto/qtquick2/qquicktextinput/data/validators.qml rename to tests/auto/quick/qquicktextinput/data/validators.qml diff --git a/tests/auto/qtquick2/qquicktextinput/qquicktextinput.pro b/tests/auto/quick/qquicktextinput/qquicktextinput.pro similarity index 69% rename from tests/auto/qtquick2/qquicktextinput/qquicktextinput.pro rename to tests/auto/quick/qquicktextinput/qquicktextinput.pro index 08ce675a03..78b39a2981 100644 --- a/tests/auto/qtquick2/qquicktextinput/qquicktextinput.pro +++ b/tests/auto/quick/qquicktextinput/qquicktextinput.pro @@ -10,4 +10,4 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/qtquick2/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp similarity index 98% rename from tests/auto/qtquick2/qquicktextinput/tst_qquicktextinput.cpp rename to tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index c1768bd98a..4141fea26f 100644 --- a/tests/auto/qtquick2/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -42,8 +42,8 @@ #include #include "../../shared/util.h" #include -#include -#include +#include +#include #include #include #include @@ -70,7 +70,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD) QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& actual) { // XXX This will be replaced by some clever persistent platform image store. - QString persistent_dir = QDeclarativeDataTest::instance()->dataDirectory(); + QString persistent_dir = QQmlDataTest::instance()->dataDirectory(); QString arch = "unknown-architecture"; // QTest needs to help with this. QString expectfile = persistent_dir + QDir::separator() + filebasename + "-" + arch + ".png"; @@ -85,7 +85,7 @@ QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& template static T evaluate(QObject *scope, const QString &expression) { - QDeclarativeExpression expr(qmlContext(scope), scope, expression); + QQmlExpression expr(qmlContext(scope), scope, expression); T result = expr.evaluate().value(); if (expr.hasError()) qWarning() << expr.error().toString(); @@ -94,7 +94,7 @@ template static T evaluate(QObject *scope, const QString &expressio typedef QPair Key; -class tst_qquicktextinput : public QDeclarativeDataTest +class tst_qquicktextinput : public QQmlDataTest { Q_OBJECT @@ -195,7 +195,7 @@ private slots: void simulateKeys(QWindow *window, const QList &keys); void simulateKeys(QWindow *window, const QKeySequence &sequence); - QDeclarativeEngine engine; + QQmlEngine engine; QStringList standard; QStringList colorStrings; }; @@ -286,7 +286,7 @@ tst_qquicktextinput::tst_qquicktextinput() void tst_qquicktextinput::text() { { - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData("import QtQuick 2.0\nTextInput { text: \"\" }", QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -300,7 +300,7 @@ void tst_qquicktextinput::text() for (int i = 0; i < standard.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextInput { text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -317,7 +317,7 @@ void tst_qquicktextinput::width() { // uses Font metrics to find the width for standard { - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData("import QtQuick 2.0\nTextInput { text: \"\" }", QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -332,7 +332,7 @@ void tst_qquicktextinput::width() for (int i = 0; i < standard.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextInput { text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -372,7 +372,7 @@ void tst_qquicktextinput::font() //test size, then bold, then italic, then family { QString componentStr = "import QtQuick 2.0\nTextInput { font.pointSize: 40; text: \"Hello World\" }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -386,7 +386,7 @@ void tst_qquicktextinput::font() { QString componentStr = "import QtQuick 2.0\nTextInput { font.bold: true; text: \"Hello World\" }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -399,7 +399,7 @@ void tst_qquicktextinput::font() { QString componentStr = "import QtQuick 2.0\nTextInput { font.italic: true; text: \"Hello World\" }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -412,7 +412,7 @@ void tst_qquicktextinput::font() { QString componentStr = "import QtQuick 2.0\nTextInput { font.family: \"Helvetica\"; text: \"Hello World\" }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -426,7 +426,7 @@ void tst_qquicktextinput::font() { QString componentStr = "import QtQuick 2.0\nTextInput { font.family: \"\"; text: \"Hello World\" }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -443,7 +443,7 @@ void tst_qquicktextinput::color() for (int i = 0; i < colorStrings.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextInput { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); QVERIFY(textinputObject != 0); @@ -456,7 +456,7 @@ void tst_qquicktextinput::color() for (int i = 0; i < colorStrings.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextInput { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); QVERIFY(textinputObject != 0); @@ -469,7 +469,7 @@ void tst_qquicktextinput::color() for (int i = 0; i < colorStrings.size(); i++) { QString componentStr = "import QtQuick 2.0\nTextInput { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); QVERIFY(textinputObject != 0); @@ -484,7 +484,7 @@ void tst_qquicktextinput::color() testColor.setAlpha(170); QString componentStr = "import QtQuick 2.0\nTextInput { color: \"" + colorStr + "\"; text: \"Hello World\" }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -500,7 +500,7 @@ void tst_qquicktextinput::wrap() int textHeight = 0; // for specified width and wrap set true { - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData("import QtQuick 2.0\nTextInput { text: \"Hello\"; wrapMode: Text.WrapAnywhere; width: 300 }", QUrl::fromLocalFile("")); QQuickTextInput *textObject = qobject_cast(textComponent.create()); textHeight = textObject->height(); @@ -514,7 +514,7 @@ void tst_qquicktextinput::wrap() for (int i = 0; i < standard.count(); i++) { QString componentStr = "import QtQuick 2.0\nTextInput { wrapMode: Text.WrapAnywhere; width: 30; text: \"" + standard.at(i) + "\" }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickTextInput *textObject = qobject_cast(textComponent.create()); @@ -534,7 +534,7 @@ void tst_qquicktextinput::selection() { QString testStr = standard[0]; QString componentStr = "import QtQuick 2.0\nTextInput { text: \""+ testStr +"\"; }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); QVERIFY(textinputObject != 0); @@ -911,7 +911,7 @@ void tst_qquicktextinput::moveCursorSelection() QFETCH(bool, reversible); QString componentStr = "import QtQuick 2.0\nTextInput { text: \""+ testStr +"\"; }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); QVERIFY(textinputObject != 0); @@ -1121,7 +1121,7 @@ void tst_qquicktextinput::moveCursorSelectionSequence() QFETCH(int, selection2End); QString componentStr = "import QtQuick 2.0\nTextInput { text: \""+ testStr +"\"; }"; - QDeclarativeComponent textinputComponent(&engine); + QQmlComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textinputObject = qobject_cast(textinputComponent.create()); QVERIFY(textinputObject != 0); @@ -1436,7 +1436,7 @@ void tst_qquicktextinput::verticalAlignment() void tst_qquicktextinput::boundingRect() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\n TextInput {}", QUrl()); QScopedPointer object(component.create()); QQuickTextInput *input = qobject_cast(object.data()); @@ -1458,7 +1458,7 @@ void tst_qquicktextinput::boundingRect() QCOMPARE(input->width() + input->cursorRectangle().width(), input->boundingRect().width()); QCOMPARE(input->height(), input->boundingRect().height()); - QDeclarativeComponent cursorComponent(&engine); + QQmlComponent cursorComponent(&engine); cursorComponent.setData("import QtQuick 2.0\nRectangle { height: 20; width: 8 }", QUrl()); input->setCursorDelegate(&cursorComponent); @@ -2121,7 +2121,7 @@ void tst_qquicktextinput::copyAndPaste() { #endif QString componentStr = "import QtQuick 2.0\nTextInput { text: \"Hello world!\" }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -2202,7 +2202,7 @@ void tst_qquicktextinput::copyAndPasteKeySequence() { #endif QString componentStr = "import QtQuick 2.0\nTextInput { text: \"Hello world!\"; focus: true }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -2270,7 +2270,7 @@ void tst_qquicktextinput::canPasteEmpty() { QGuiApplication::clipboard()->clear(); QString componentStr = "import QtQuick 2.0\nTextInput { text: \"Hello world!\" }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -2287,7 +2287,7 @@ void tst_qquicktextinput::canPaste() { QGuiApplication::clipboard()->setText("Some text"); QString componentStr = "import QtQuick 2.0\nTextInput { text: \"Hello world!\" }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -2301,7 +2301,7 @@ void tst_qquicktextinput::canPaste() { void tst_qquicktextinput::passwordCharacter() { QString componentStr = "import QtQuick 2.0\nTextInput { text: \"Hello world!\"; font.family: \"Helvetica\"; echoMode: TextInput.Password }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -2859,7 +2859,7 @@ void tst_qquicktextinput::focusOutClearSelection() void tst_qquicktextinput::geometrySignals() { - QDeclarativeComponent component(&engine, testFileUrl("geometrySignals.qml")); + QQmlComponent component(&engine, testFileUrl("geometrySignals.qml")); QObject *o = component.create(); QVERIFY(o); QCOMPARE(o->property("bindingWidth").toInt(), 400); @@ -2870,7 +2870,7 @@ void tst_qquicktextinput::geometrySignals() void tst_qquicktextinput::contentSize() { QString componentStr = "import QtQuick 2.0\nTextInput { width: 75; height: 16; font.pixelSize: 10 }"; - QDeclarativeComponent textComponent(&engine); + QQmlComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QScopedPointer object(textComponent.create()); QQuickTextInput *textObject = qobject_cast(object.data()); @@ -3351,7 +3351,7 @@ void tst_qquicktextinput::getText() QFETCH(QString, expectedText); QString componentStr = "import QtQuick 2.0\nTextInput { text: \"" + text + "\"; inputMask: \"" + inputMask + "\" }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -3691,7 +3691,7 @@ void tst_qquicktextinput::insert() QFETCH(bool, cursorPositionChanged); QString componentStr = "import QtQuick 2.0\nTextInput { text: \"" + text + "\"; inputMask: \"" + inputMask + "\" }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -4046,7 +4046,7 @@ void tst_qquicktextinput::remove() QFETCH(bool, cursorPositionChanged); QString componentStr = "import QtQuick 2.0\nTextInput { text: \"" + text + "\"; inputMask: \"" + inputMask + "\" }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -4163,7 +4163,7 @@ void tst_qquicktextinput::keySequence() } QString componentStr = "import QtQuick 2.0\nTextInput { focus: true; text: \"" + text + "\" }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -4322,7 +4322,7 @@ void tst_qquicktextinput::undo() QFETCH(QStringList, expectedString); QString componentStr = "import QtQuick 2.0\nTextInput { focus: true }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -4408,7 +4408,7 @@ void tst_qquicktextinput::redo() QFETCH(QStringList, expectedString); QString componentStr = "import QtQuick 2.0\nTextInput { focus: true }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -4600,7 +4600,7 @@ void tst_qquicktextinput::undo_keypressevents() QFETCH(QStringList, expectedString); QString componentStr = "import QtQuick 2.0\nTextInput { focus: true }"; - QDeclarativeComponent textInputComponent(&engine); + QQmlComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QQuickTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); @@ -4692,7 +4692,7 @@ void tst_qquicktextinput::QTBUG_19956_regexp() void tst_qquicktextinput::negativeDimensions() { // Verify this doesn't assert during initialization. - QDeclarativeComponent component(&engine, testFileUrl("negativeDimensions.qml")); + QQmlComponent component(&engine, testFileUrl("negativeDimensions.qml")); QScopedPointer o(component.create()); QVERIFY(o); QQuickTextInput *input = o->findChild("input"); diff --git a/tests/auto/quick/qquicktimer/qquicktimer.pro b/tests/auto/quick/qquicktimer/qquicktimer.pro new file mode 100644 index 0000000000..7b399c778d --- /dev/null +++ b/tests/auto/quick/qquicktimer/qquicktimer.pro @@ -0,0 +1,8 @@ +CONFIG += testcase +TARGET = tst_qquicktimer +macx:CONFIG -= app_bundle + +SOURCES += tst_qquicktimer.cpp + +CONFIG += parallel_test +QT += core-private gui-private qml-private quick-private gui testlib diff --git a/tests/auto/qtquick2/qdeclarativetimer/tst_qdeclarativetimer.cpp b/tests/auto/quick/qquicktimer/tst_qquicktimer.cpp similarity index 79% rename from tests/auto/qtquick2/qdeclarativetimer/tst_qdeclarativetimer.cpp rename to tests/auto/quick/qquicktimer/tst_qquicktimer.cpp index 4aa35d7488..ff33609c06 100644 --- a/tests/auto/qtquick2/qdeclarativetimer/tst_qdeclarativetimer.cpp +++ b/tests/auto/quick/qquicktimer/tst_qquicktimer.cpp @@ -40,17 +40,17 @@ ****************************************************************************/ #include #include -#include -#include -#include +#include +#include +#include #include #include -class tst_qdeclarativetimer : public QObject +class tst_qquicktimer : public QObject { Q_OBJECT public: - tst_qdeclarativetimer(); + tst_qquicktimer(); private slots: void notRepeating(); @@ -84,16 +84,16 @@ public slots: #define TIMEOUT_TIMEOUT 200 -tst_qdeclarativetimer::tst_qdeclarativetimer() +tst_qquicktimer::tst_qquicktimer() { } -void tst_qdeclarativetimer::notRepeating() +void tst_qquicktimer::notRepeating() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 100; running: true }"), QUrl::fromLocalFile("")); - QDeclarativeTimer *timer = qobject_cast(component.create()); + QQuickTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); QVERIFY(timer->isRunning()); QVERIFY(!timer->isRepeating()); @@ -109,12 +109,12 @@ void tst_qdeclarativetimer::notRepeating() QVERIFY(timer->isRunning() == false); } -void tst_qdeclarativetimer::notRepeatingStart() +void tst_qquicktimer::notRepeatingStart() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 100 }"), QUrl::fromLocalFile("")); - QDeclarativeTimer *timer = qobject_cast(component.create()); + QQuickTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); QVERIFY(!timer->isRunning()); @@ -134,12 +134,12 @@ void tst_qdeclarativetimer::notRepeatingStart() delete timer; } -void tst_qdeclarativetimer::repeat() +void tst_qquicktimer::repeat() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 100; repeat: true; running: true }"), QUrl::fromLocalFile("")); - QDeclarativeTimer *timer = qobject_cast(component.create()); + QQuickTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); TimerHelper helper; @@ -176,12 +176,12 @@ void tst_qdeclarativetimer::repeat() delete timer; } -void tst_qdeclarativetimer::triggeredOnStart() +void tst_qquicktimer::triggeredOnStart() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 100; running: true; triggeredOnStart: true }"), QUrl::fromLocalFile("")); - QDeclarativeTimer *timer = qobject_cast(component.create()); + QQuickTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); QVERIFY(timer->triggeredOnStart()); @@ -211,12 +211,12 @@ void tst_qdeclarativetimer::triggeredOnStart() delete timer; } -void tst_qdeclarativetimer::triggeredOnStartRepeat() +void tst_qquicktimer::triggeredOnStartRepeat() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 100; running: true; triggeredOnStart: true; repeat: true }"), QUrl::fromLocalFile("")); - QDeclarativeTimer *timer = qobject_cast(component.create()); + QQuickTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); TimerHelper helper; @@ -234,10 +234,10 @@ void tst_qdeclarativetimer::triggeredOnStartRepeat() delete timer; } -void tst_qdeclarativetimer::noTriggerIfNotRunning() +void tst_qquicktimer::noTriggerIfNotRunning() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray( "import QtQuick 2.0\n" "Item { property bool ok: true\n" @@ -253,12 +253,12 @@ void tst_qdeclarativetimer::noTriggerIfNotRunning() delete item; } -void tst_qdeclarativetimer::changeDuration() +void tst_qquicktimer::changeDuration() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 200; repeat: true; running: true }"), QUrl::fromLocalFile("")); - QDeclarativeTimer *timer = qobject_cast(component.create()); + QQuickTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); TimerHelper helper; @@ -289,12 +289,12 @@ void tst_qdeclarativetimer::changeDuration() delete timer; } -void tst_qdeclarativetimer::restart() +void tst_qquicktimer::restart() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 500; repeat: true; running: true }"), QUrl::fromLocalFile("")); - QDeclarativeTimer *timer = qobject_cast(component.create()); + QQuickTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); TimerHelper helper; @@ -316,10 +316,10 @@ void tst_qdeclarativetimer::restart() delete timer; } -void tst_qdeclarativetimer::restartFromTriggered() +void tst_qquicktimer::restartFromTriggered() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nTimer { " "interval: 500; " "repeat: false; " @@ -327,7 +327,7 @@ void tst_qdeclarativetimer::restartFromTriggered() "onTriggered: restart()" " }"), QUrl::fromLocalFile("")); QScopedPointer object(component.create()); - QDeclarativeTimer *timer = qobject_cast(object.data()); + QQuickTimer *timer = qobject_cast(object.data()); QVERIFY(timer != 0); TimerHelper helper; @@ -343,10 +343,10 @@ void tst_qdeclarativetimer::restartFromTriggered() QVERIFY(timer->isRunning()); } -void tst_qdeclarativetimer::runningFromTriggered() +void tst_qquicktimer::runningFromTriggered() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nTimer { " "property bool ok: false; " "interval: 500; " @@ -355,7 +355,7 @@ void tst_qdeclarativetimer::runningFromTriggered() "onTriggered: { ok = !running; running = true }" " }"), QUrl::fromLocalFile("")); QScopedPointer object(component.create()); - QDeclarativeTimer *timer = qobject_cast(object.data()); + QQuickTimer *timer = qobject_cast(object.data()); QVERIFY(timer != 0); TimerHelper helper; @@ -373,14 +373,14 @@ void tst_qdeclarativetimer::runningFromTriggered() QVERIFY(timer->isRunning()); } -void tst_qdeclarativetimer::parentProperty() +void tst_qquicktimer::parentProperty() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine); + QQmlEngine engine; + QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nItem { Timer { objectName: \"timer\"; running: parent.visible } }"), QUrl::fromLocalFile("")); QQuickItem *item = qobject_cast(component.create()); QVERIFY(item != 0); - QDeclarativeTimer *timer = item->findChild("timer"); + QQuickTimer *timer = item->findChild("timer"); QVERIFY(timer != 0); QVERIFY(timer->isRunning()); @@ -388,6 +388,6 @@ void tst_qdeclarativetimer::parentProperty() delete timer; } -QTEST_MAIN(tst_qdeclarativetimer) +QTEST_MAIN(tst_qquicktimer) -#include "tst_qdeclarativetimer.moc" +#include "tst_qquicktimer.moc" diff --git a/tests/auto/qtquick2/qquickview/data/error1.qml b/tests/auto/quick/qquickview/data/error1.qml similarity index 100% rename from tests/auto/qtquick2/qquickview/data/error1.qml rename to tests/auto/quick/qquickview/data/error1.qml diff --git a/tests/auto/qtquick2/qquickview/data/resizemodeitem.qml b/tests/auto/quick/qquickview/data/resizemodeitem.qml similarity index 100% rename from tests/auto/qtquick2/qquickview/data/resizemodeitem.qml rename to tests/auto/quick/qquickview/data/resizemodeitem.qml diff --git a/tests/auto/qtquick2/qquickview/qquickview.pro b/tests/auto/quick/qquickview/qquickview.pro similarity index 74% rename from tests/auto/qtquick2/qquickview/qquickview.pro rename to tests/auto/quick/qquickview/qquickview.pro index c3bc0ddcaf..77b0f7d86a 100644 --- a/tests/auto/qtquick2/qquickview/qquickview.pro +++ b/tests/auto/quick/qquickview/qquickview.pro @@ -10,4 +10,4 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private declarative-private quick-private testlib +QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/qtquick2/qquickview/tst_qquickview.cpp b/tests/auto/quick/qquickview/tst_qquickview.cpp similarity index 97% rename from tests/auto/qtquick2/qquickview/tst_qquickview.cpp rename to tests/auto/quick/qquickview/tst_qquickview.cpp index fe290456eb..e5e8a83424 100644 --- a/tests/auto/qtquick2/qquickview/tst_qquickview.cpp +++ b/tests/auto/quick/qquickview/tst_qquickview.cpp @@ -40,15 +40,15 @@ ****************************************************************************/ #include #include -#include -#include +#include +#include #include #include #include "../../shared/util.h" #include #include -class tst_QQuickView : public QDeclarativeDataTest +class tst_QQuickView : public QQmlDataTest { Q_OBJECT public: diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/create.qml b/tests/auto/quick/qquickvisualdatamodel/data/create.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/create.qml rename to tests/auto/quick/qquickvisualdatamodel/data/create.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/datalist-package.qml b/tests/auto/quick/qquickvisualdatamodel/data/datalist-package.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/datalist-package.qml rename to tests/auto/quick/qquickvisualdatamodel/data/datalist-package.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/datalist.qml b/tests/auto/quick/qquickvisualdatamodel/data/datalist.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/datalist.qml rename to tests/auto/quick/qquickvisualdatamodel/data/datalist.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/groups-invalid.qml b/tests/auto/quick/qquickvisualdatamodel/data/groups-invalid.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/groups-invalid.qml rename to tests/auto/quick/qquickvisualdatamodel/data/groups-invalid.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/groups-package.qml b/tests/auto/quick/qquickvisualdatamodel/data/groups-package.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/groups-package.qml rename to tests/auto/quick/qquickvisualdatamodel/data/groups-package.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/groups.qml b/tests/auto/quick/qquickvisualdatamodel/data/groups.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/groups.qml rename to tests/auto/quick/qquickvisualdatamodel/data/groups.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/itemsDestroyed_listView.qml b/tests/auto/quick/qquickvisualdatamodel/data/itemsDestroyed_listView.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/itemsDestroyed_listView.qml rename to tests/auto/quick/qquickvisualdatamodel/data/itemsDestroyed_listView.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/itemsDestroyed_package.qml b/tests/auto/quick/qquickvisualdatamodel/data/itemsDestroyed_package.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/itemsDestroyed_package.qml rename to tests/auto/quick/qquickvisualdatamodel/data/itemsDestroyed_package.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/itemsDestroyed_pathView.qml b/tests/auto/quick/qquickvisualdatamodel/data/itemsDestroyed_pathView.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/itemsDestroyed_pathView.qml rename to tests/auto/quick/qquickvisualdatamodel/data/itemsDestroyed_pathView.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/itemsDestroyed_repeater.qml b/tests/auto/quick/qquickvisualdatamodel/data/itemsDestroyed_repeater.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/itemsDestroyed_repeater.qml rename to tests/auto/quick/qquickvisualdatamodel/data/itemsDestroyed_repeater.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/listmodelproperties-package.qml b/tests/auto/quick/qquickvisualdatamodel/data/listmodelproperties-package.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/listmodelproperties-package.qml rename to tests/auto/quick/qquickvisualdatamodel/data/listmodelproperties-package.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/listmodelproperties.qml b/tests/auto/quick/qquickvisualdatamodel/data/listmodelproperties.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/listmodelproperties.qml rename to tests/auto/quick/qquickvisualdatamodel/data/listmodelproperties.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/modelproperties.qml b/tests/auto/quick/qquickvisualdatamodel/data/modelproperties.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/modelproperties.qml rename to tests/auto/quick/qquickvisualdatamodel/data/modelproperties.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/modelproperties2.qml b/tests/auto/quick/qquickvisualdatamodel/data/modelproperties2.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/modelproperties2.qml rename to tests/auto/quick/qquickvisualdatamodel/data/modelproperties2.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/multipleroleproperties-package.qml b/tests/auto/quick/qquickvisualdatamodel/data/multipleroleproperties-package.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/multipleroleproperties-package.qml rename to tests/auto/quick/qquickvisualdatamodel/data/multipleroleproperties-package.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/multipleroleproperties.qml b/tests/auto/quick/qquickvisualdatamodel/data/multipleroleproperties.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/multipleroleproperties.qml rename to tests/auto/quick/qquickvisualdatamodel/data/multipleroleproperties.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/objectlist.qml b/tests/auto/quick/qquickvisualdatamodel/data/objectlist.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/objectlist.qml rename to tests/auto/quick/qquickvisualdatamodel/data/objectlist.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/objectlistproperties-package.qml b/tests/auto/quick/qquickvisualdatamodel/data/objectlistproperties-package.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/objectlistproperties-package.qml rename to tests/auto/quick/qquickvisualdatamodel/data/objectlistproperties-package.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/objectlistproperties.qml b/tests/auto/quick/qquickvisualdatamodel/data/objectlistproperties.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/objectlistproperties.qml rename to tests/auto/quick/qquickvisualdatamodel/data/objectlistproperties.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/onChanged.qml b/tests/auto/quick/qquickvisualdatamodel/data/onChanged.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/onChanged.qml rename to tests/auto/quick/qquickvisualdatamodel/data/onChanged.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/packageView.qml b/tests/auto/quick/qquickvisualdatamodel/data/packageView.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/packageView.qml rename to tests/auto/quick/qquickvisualdatamodel/data/packageView.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/singlerole1.qml b/tests/auto/quick/qquickvisualdatamodel/data/singlerole1.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/singlerole1.qml rename to tests/auto/quick/qquickvisualdatamodel/data/singlerole1.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/singlerole2.qml b/tests/auto/quick/qquickvisualdatamodel/data/singlerole2.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/singlerole2.qml rename to tests/auto/quick/qquickvisualdatamodel/data/singlerole2.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/singleroleproperties-package.qml b/tests/auto/quick/qquickvisualdatamodel/data/singleroleproperties-package.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/singleroleproperties-package.qml rename to tests/auto/quick/qquickvisualdatamodel/data/singleroleproperties-package.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/singleroleproperties.qml b/tests/auto/quick/qquickvisualdatamodel/data/singleroleproperties.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/singleroleproperties.qml rename to tests/auto/quick/qquickvisualdatamodel/data/singleroleproperties.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/stringlistproperties-package.qml b/tests/auto/quick/qquickvisualdatamodel/data/stringlistproperties-package.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/stringlistproperties-package.qml rename to tests/auto/quick/qquickvisualdatamodel/data/stringlistproperties-package.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/stringlistproperties.qml b/tests/auto/quick/qquickvisualdatamodel/data/stringlistproperties.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/stringlistproperties.qml rename to tests/auto/quick/qquickvisualdatamodel/data/stringlistproperties.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/data/visualdatamodel.qml b/tests/auto/quick/qquickvisualdatamodel/data/visualdatamodel.qml similarity index 100% rename from tests/auto/qtquick2/qquickvisualdatamodel/data/visualdatamodel.qml rename to tests/auto/quick/qquickvisualdatamodel/data/visualdatamodel.qml diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/qquickvisualdatamodel.pro b/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro similarity index 75% rename from tests/auto/qtquick2/qquickvisualdatamodel/qquickvisualdatamodel.pro rename to tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro index 6db887d747..bfadf196f9 100644 --- a/tests/auto/qtquick2/qquickvisualdatamodel/qquickvisualdatamodel.pro +++ b/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro @@ -13,4 +13,4 @@ DEPLOYMENT += testDataFiles CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private widgets testlib +QT += core-private gui-private v8-private qml-private quick-private widgets testlib diff --git a/tests/auto/qtquick2/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp b/tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp similarity index 98% rename from tests/auto/qtquick2/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp rename to tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp index 1b6a7629d9..dbfd4919b9 100644 --- a/tests/auto/qtquick2/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp +++ b/tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp @@ -44,17 +44,17 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include -#include -#include -#include +#include +#include +#include #include using namespace QQuickVisualTestUtil; @@ -131,12 +131,12 @@ class StandardItem : public QObject, public QStandardItem class StandardItemModel : public QStandardItemModel { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty items READ items CONSTANT) + Q_PROPERTY(QQmlListProperty items READ items CONSTANT) Q_CLASSINFO("DefaultProperty", "items") public: - QDeclarativeListProperty items() { return QDeclarativeListProperty(this, 0, append); } + QQmlListProperty items() { return QQmlListProperty(this, 0, append); } - static void append(QDeclarativeListProperty *property, StandardItem *item) + static void append(QQmlListProperty *property, StandardItem *item) { static_cast(property->object)->appendRow(item); } @@ -185,7 +185,7 @@ QML_DECLARE_TYPE(StandardItem) QML_DECLARE_TYPE(StandardItemModel) QML_DECLARE_TYPE(DataObject) -class tst_qquickvisualdatamodel : public QDeclarativeDataTest +class tst_qquickvisualdatamodel : public QQmlDataTest { Q_OBJECT public: @@ -252,14 +252,14 @@ private slots: const bool (&sMember)[N]); bool failed; - QDeclarativeEngine engine; + QQmlEngine engine; }; -Q_DECLARE_METATYPE(QDeclarativeChangeSet) +Q_DECLARE_METATYPE(QQuickChangeSet) template static T evaluate(QObject *scope, const QString &expression) { - QDeclarativeExpression expr(qmlContext(scope), scope, expression); + QQmlExpression expr(qmlContext(scope), scope, expression); T result = expr.evaluate().value(); if (expr.hasError()) qWarning() << expr.error().toString(); @@ -268,7 +268,7 @@ template static T evaluate(QObject *scope, const QString &expressio template <> void evaluate(QObject *scope, const QString &expression) { - QDeclarativeExpression expr(qmlContext(scope), scope, expression); + QQmlExpression expr(qmlContext(scope), scope, expression); expr.evaluate(); if (expr.hasError()) qWarning() << expr.error().toString(); @@ -276,8 +276,8 @@ template <> void evaluate(QObject *scope, const QString &expression) void tst_qquickvisualdatamodel::initTestCase() { - QDeclarativeDataTest::initTestCase(); - qRegisterMetaType(); + QQmlDataTest::initTestCase(); + qRegisterMetaType(); qmlRegisterType("tst_qquickvisualdatamodel", 1, 0, "SingleRoleModel"); qmlRegisterType("tst_qquickvisualdatamodel", 1, 0, "StandardItem"); @@ -296,8 +296,8 @@ tst_qquickvisualdatamodel::tst_qquickvisualdatamodel() void tst_qquickvisualdatamodel::rootIndex() { - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("visualdatamodel.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("visualdatamodel.qml")); QStandardItemModel model; initStandardTreeModel(&model); @@ -446,7 +446,7 @@ void tst_qquickvisualdatamodel::objectListModel() dataList.append(new DataObject("Item 3", "blue")); dataList.append(new DataObject("Item 4", "yellow")); - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); view.setSource(testFileUrl("objectlist.qml")); @@ -474,7 +474,7 @@ void tst_qquickvisualdatamodel::singleRole() SingleRoleModel model; - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", &model); view.setSource(testFileUrl("singlerole1.qml")); @@ -496,7 +496,7 @@ void tst_qquickvisualdatamodel::singleRole() SingleRoleModel model; - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", &model); view.setSource(testFileUrl("singlerole2.qml")); @@ -518,7 +518,7 @@ void tst_qquickvisualdatamodel::singleRole() SingleRoleModel model("modelData"); - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", &model); view.setSource(testFileUrl("singlerole2.qml")); @@ -544,7 +544,7 @@ void tst_qquickvisualdatamodel::modelProperties() SingleRoleModel model; - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", &model); view.setSource(testFileUrl("modelproperties.qml")); @@ -577,7 +577,7 @@ void tst_qquickvisualdatamodel::modelProperties() dataList.append(new DataObject("Item 3", "blue")); dataList.append(new DataObject("Item 4", "yellow")); - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); view.setSource(testFileUrl("modelproperties.qml")); @@ -692,7 +692,7 @@ void tst_qquickvisualdatamodel::itemsDestroyed() { QFETCH(QUrl, source); - QDeclarativeGuard delegate; + QQmlGuard delegate; { QQuickView view; @@ -743,8 +743,8 @@ void tst_qquickvisualdatamodel::packagesDestroyed() rightview->setCurrentIndex(20); QTRY_COMPARE(rightview->contentY(), 100.0); - QDeclarativeGuard left; - QDeclarativeGuard right; + QQmlGuard left; + QQmlGuard right; QVERIFY(findItem(leftContent, "wrapper", 1)); QVERIFY(findItem(rightContent, "wrapper", 1)); @@ -791,8 +791,8 @@ void tst_qquickvisualdatamodel::qaimRowsMoved() QFETCH(int, expectTo); QFETCH(int, expectCount); - QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, testFileUrl("visualdatamodel.qml")); + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("visualdatamodel.qml")); SingleRoleModel model; model.list.clear(); @@ -803,12 +803,12 @@ void tst_qquickvisualdatamodel::qaimRowsMoved() QQuickVisualDataModel *obj = qobject_cast(c.create()); QVERIFY(obj != 0); - QSignalSpy spy(obj, SIGNAL(modelUpdated(QDeclarativeChangeSet,bool))); + QSignalSpy spy(obj, SIGNAL(modelUpdated(QQuickChangeSet,bool))); model.emitMove(sourceFirst, sourceLast, destinationChild); QCOMPARE(spy.count(), 1); QCOMPARE(spy[0].count(), 2); - QDeclarativeChangeSet changeSet = spy[0][0].value(); + QQuickChangeSet changeSet = spy[0][0].value(); QCOMPARE(changeSet.removes().count(), 1); QCOMPARE(changeSet.removes().at(0).index, expectFrom); QCOMPARE(changeSet.removes().at(0).count, expectCount); @@ -883,7 +883,7 @@ void tst_qquickvisualdatamodel::remove() << "eleven" << "twelve"; - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", &model); view.setSource(testFileUrl("groups.qml")); @@ -993,7 +993,7 @@ void tst_qquickvisualdatamodel::move() << "eleven" << "twelve"; - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", &model); view.setSource(testFileUrl("groups.qml")); @@ -1183,7 +1183,7 @@ void tst_qquickvisualdatamodel::groups() << "eleven" << "twelve"; - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", &model); view.setSource(source); @@ -1504,7 +1504,7 @@ void tst_qquickvisualdatamodel::get() << "eleven" << "twelve"; - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", &model); view.setSource(testFileUrl("groups.qml")); @@ -1524,7 +1524,7 @@ void tst_qquickvisualdatamodel::get() QQuickVisualDataGroup *selectedItems = visualModel->findChild("selectedItems"); QVERIFY(selectedItems); - QV8Engine *v8Engine = QDeclarativeEnginePrivate::getV8Engine(ctxt->engine()); + QV8Engine *v8Engine = QQmlEnginePrivate::getV8Engine(ctxt->engine()); QVERIFY(v8Engine); const bool f = false; @@ -1641,7 +1641,7 @@ void tst_qquickvisualdatamodel::invalidGroups() QUrl source = testFileUrl("groups-invalid.qml"); QTest::ignoreMessage(QtWarningMsg, (source.toString() + ":12:9: QML VisualDataGroup: " + QQuickVisualDataGroup::tr("Group names must start with a lower case letter")).toUtf8()); - QDeclarativeComponent component(&engine, source); + QQmlComponent component(&engine, source); QScopedPointer object(component.create()); QVERIFY(object); @@ -1760,7 +1760,7 @@ void tst_qquickvisualdatamodel::onChanged() QFETCH(QString, expression); QFETCH(QStringList, tests); - QDeclarativeComponent component(&engine, testFileUrl("onChanged.qml")); + QQmlComponent component(&engine, testFileUrl("onChanged.qml")); QScopedPointer object(component.create()); QVERIFY(object); @@ -1801,7 +1801,7 @@ void tst_qquickvisualdatamodel::create() << "nineteen" << "twenty"; - QDeclarativeContext *ctxt = view.rootContext(); + QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", &model); view.setSource(testFileUrl("create.qml")); @@ -1817,7 +1817,7 @@ void tst_qquickvisualdatamodel::create() QCOMPARE(listview->count(), 20); - QDeclarativeGuard delegate; + QQmlGuard delegate; // persistedItems.includeByDefault is true, so all items belong to persistedItems initially. QVERIFY(delegate = findItem(contentItem, "delegate", 1)); @@ -1921,7 +1921,7 @@ void tst_qquickvisualdatamodel::incompleteModel() // VisualDataModel is first populated in componentComplete. Verify various functions are // harmlessly ignored until then. - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\n VisualDataModel {}", testFileUrl("")); QScopedPointer object(component.beginCreate(engine.rootContext())); @@ -2554,7 +2554,7 @@ void tst_qquickvisualdatamodel::insert() QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.loadUrl(source); QScopedPointer object(component.create()); QQuickListView *listView = qobject_cast(object.data()); @@ -3021,7 +3021,7 @@ void tst_qquickvisualdatamodel::resolve() QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.loadUrl(source); QScopedPointer object(component.create()); QQuickListView *listView = qobject_cast(object.data()); @@ -3421,7 +3421,7 @@ void tst_qquickvisualdatamodel::warnings() QQuickCanvas canvas; - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.loadUrl(source); QScopedPointer object(component.create()); QQuickListView *listView = qobject_cast(object.data()); diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/empty.xml b/tests/auto/quick/qquickxmllistmodel/data/empty.xml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/empty.xml rename to tests/auto/quick/qquickxmllistmodel/data/empty.xml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/get.qml b/tests/auto/quick/qquickxmllistmodel/data/get.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/get.qml rename to tests/auto/quick/qquickxmllistmodel/data/get.qml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/model.qml b/tests/auto/quick/qquickxmllistmodel/data/model.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/model.qml rename to tests/auto/quick/qquickxmllistmodel/data/model.qml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/model.xml b/tests/auto/quick/qquickxmllistmodel/data/model.xml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/model.xml rename to tests/auto/quick/qquickxmllistmodel/data/model.xml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/model2.xml b/tests/auto/quick/qquickxmllistmodel/data/model2.xml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/model2.xml rename to tests/auto/quick/qquickxmllistmodel/data/model2.xml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/propertychanges.qml b/tests/auto/quick/qquickxmllistmodel/data/propertychanges.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/propertychanges.qml rename to tests/auto/quick/qquickxmllistmodel/data/propertychanges.qml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/recipes.qml b/tests/auto/quick/qquickxmllistmodel/data/recipes.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/recipes.qml rename to tests/auto/quick/qquickxmllistmodel/data/recipes.qml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/recipes.xml b/tests/auto/quick/qquickxmllistmodel/data/recipes.xml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/recipes.xml rename to tests/auto/quick/qquickxmllistmodel/data/recipes.xml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/roleCrash.qml b/tests/auto/quick/qquickxmllistmodel/data/roleCrash.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/roleCrash.qml rename to tests/auto/quick/qquickxmllistmodel/data/roleCrash.qml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/roleErrors.qml b/tests/auto/quick/qquickxmllistmodel/data/roleErrors.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/roleErrors.qml rename to tests/auto/quick/qquickxmllistmodel/data/roleErrors.qml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/roleKeys.qml b/tests/auto/quick/qquickxmllistmodel/data/roleKeys.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/roleKeys.qml rename to tests/auto/quick/qquickxmllistmodel/data/roleKeys.qml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/testtypes.qml b/tests/auto/quick/qquickxmllistmodel/data/testtypes.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/testtypes.qml rename to tests/auto/quick/qquickxmllistmodel/data/testtypes.qml diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/data/unique.qml b/tests/auto/quick/qquickxmllistmodel/data/unique.qml similarity index 100% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/data/unique.qml rename to tests/auto/quick/qquickxmllistmodel/data/unique.qml diff --git a/tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro b/tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro new file mode 100644 index 0000000000..b18af50c9e --- /dev/null +++ b/tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro @@ -0,0 +1,15 @@ +CONFIG += testcase +TARGET = tst_qquickxmllistmodel +macx:CONFIG -= app_bundle + +SOURCES += tst_qquickxmllistmodel.cpp + +include (../../shared/util.pri) + +testDataFiles.files = data +testDataFiles.path = . +DEPLOYMENT += testDataFiles + +CONFIG += parallel_test + +QT += core-private gui-private v8-private qml-private network testlib xmlpatterns diff --git a/tests/auto/qtquick2/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp similarity index 78% rename from tests/auto/qtquick2/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp rename to tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp index 80ceb9a712..4d337564c0 100644 --- a/tests/auto/qtquick2/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp +++ b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp @@ -45,38 +45,38 @@ #include #include #include -#include +#include #include #include #include #include #include #include "../../shared/util.h" -#include +#include -#include -#include +#include +#include #include -#include "../../../../src/imports/xmllistmodel/qdeclarativexmllistmodel_p.h" +#include "../../../../src/imports/xmllistmodel/qqmlxmllistmodel_p.h" -typedef QPair QDeclarativeXmlListRange; -typedef QList QDeclarativeXmlModelData; +typedef QPair QQuickXmlListRange; +typedef QList QQmlXmlModelData; -Q_DECLARE_METATYPE(QList) -Q_DECLARE_METATYPE(QDeclarativeXmlModelData) -Q_DECLARE_METATYPE(QDeclarativeXmlListModel::Status) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QQmlXmlModelData) +Q_DECLARE_METATYPE(QQuickXmlListModel::Status) -class tst_qdeclarativexmllistmodel : public QDeclarativeDataTest +class tst_qquickxmllistmodel : public QQmlDataTest { Q_OBJECT public: - tst_qdeclarativexmllistmodel() {} + tst_qquickxmllistmodel() {} private slots: void initTestCase() { - QDeclarativeDataTest::initTestCase(); - qRegisterMetaType(); + QQmlDataTest::initTestCase(); + qRegisterMetaType(); } void buildModel(); @@ -112,7 +112,7 @@ private slots: return ret; } - QString makeItemXmlAndData(const QString &data, QDeclarativeXmlModelData *modelData = 0) const + QString makeItemXmlAndData(const QString &data, QQmlXmlModelData *modelData = 0) const { if (modelData) modelData->clear(); @@ -152,10 +152,10 @@ private slots: return decl + QLatin1String("") + xml + QLatin1String(""); } - QDeclarativeEngine engine; + QQmlEngine engine; }; -class CustomNetworkAccessManagerFactory : public QObject, public QDeclarativeNetworkAccessManagerFactory +class CustomNetworkAccessManagerFactory : public QObject, public QQmlNetworkAccessManagerFactory { Q_OBJECT public: @@ -193,9 +193,9 @@ QNetworkAccessManager *CustomNetworkAccessManagerFactory::create(QObject *parent } -void tst_qdeclarativexmllistmodel::buildModel() +void tst_qquickxmllistmodel::buildModel() { - QDeclarativeComponent component(&engine, testFileUrl("model.qml")); + QQmlComponent component(&engine, testFileUrl("model.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); QTRY_COMPARE(model->count(), 9); @@ -208,13 +208,13 @@ void tst_qdeclarativexmllistmodel::buildModel() delete model; } -void tst_qdeclarativexmllistmodel::testTypes() +void tst_qquickxmllistmodel::testTypes() { QFETCH(QString, xml); QFETCH(QString, roleName); QFETCH(QVariant, expectedValue); - QDeclarativeComponent component(&engine, testFileUrl("testtypes.qml")); + QQmlComponent component(&engine, testFileUrl("testtypes.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); model->setProperty("xml",xml.toUtf8()); @@ -238,7 +238,7 @@ void tst_qdeclarativexmllistmodel::testTypes() delete model; } -void tst_qdeclarativexmllistmodel::testTypes_data() +void tst_qquickxmllistmodel::testTypes_data() { QTest::addColumn("xml"); QTest::addColumn("roleName"); @@ -272,9 +272,9 @@ void tst_qdeclarativexmllistmodel::testTypes_data() << "numberValue" << QVariant("1.5"); } -void tst_qdeclarativexmllistmodel::cdata() +void tst_qquickxmllistmodel::cdata() { - QDeclarativeComponent component(&engine, testFileUrl("recipes.qml")); + QQmlComponent component(&engine, testFileUrl("recipes.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); QTRY_COMPARE(model->count(), 5); @@ -284,9 +284,9 @@ void tst_qdeclarativexmllistmodel::cdata() delete model; } -void tst_qdeclarativexmllistmodel::attributes() +void tst_qquickxmllistmodel::attributes() { - QDeclarativeComponent component(&engine, testFileUrl("recipes.qml")); + QQmlComponent component(&engine, testFileUrl("recipes.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); QTRY_COMPARE(model->count(), 5); @@ -295,9 +295,9 @@ void tst_qdeclarativexmllistmodel::attributes() delete model; } -void tst_qdeclarativexmllistmodel::roles() +void tst_qquickxmllistmodel::roles() { - QDeclarativeComponent component(&engine, testFileUrl("model.qml")); + QQmlComponent component(&engine, testFileUrl("model.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); QTRY_COMPARE(model->count(), 9); @@ -312,9 +312,9 @@ void tst_qdeclarativexmllistmodel::roles() delete model; } -void tst_qdeclarativexmllistmodel::roleErrors() +void tst_qquickxmllistmodel::roleErrors() { - QDeclarativeComponent component(&engine, testFileUrl("roleErrors.qml")); + QQmlComponent component(&engine, testFileUrl("roleErrors.qml")); QTest::ignoreMessage(QtWarningMsg, (testFileUrl("roleErrors.qml").toString() + ":7:5: QML XmlRole: An XmlRole query must not start with '/'").toUtf8().constData()); QTest::ignoreMessage(QtWarningMsg, (testFileUrl("roleErrors.qml").toString() + ":10:5: QML XmlRole: invalid query: \"age/\"").toUtf8().constData()); @@ -335,9 +335,9 @@ void tst_qdeclarativexmllistmodel::roleErrors() delete model; } -void tst_qdeclarativexmllistmodel::uniqueRoleNames() +void tst_qquickxmllistmodel::uniqueRoleNames() { - QDeclarativeComponent component(&engine, testFileUrl("unique.qml")); + QQmlComponent component(&engine, testFileUrl("unique.qml")); QTest::ignoreMessage(QtWarningMsg, (testFileUrl("unique.qml").toString() + ":8:5: QML XmlRole: \"name\" duplicates a previous role name and will be disabled.").toUtf8().constData()); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); @@ -350,23 +350,23 @@ void tst_qdeclarativexmllistmodel::uniqueRoleNames() } -void tst_qdeclarativexmllistmodel::xml() +void tst_qquickxmllistmodel::xml() { QFETCH(QString, xml); QFETCH(int, count); - QDeclarativeComponent component(&engine, testFileUrl("model.qml")); + QQmlComponent component(&engine, testFileUrl("model.qml")); QListModelInterface *model = qobject_cast(component.create()); - QSignalSpy spy(model, SIGNAL(statusChanged(QDeclarativeXmlListModel::Status))); + QSignalSpy spy(model, SIGNAL(statusChanged(QQuickXmlListModel::Status))); QVERIFY(errorString(model).isEmpty()); QCOMPARE(model->property("progress").toDouble(), qreal(0.0)); - QCOMPARE(qvariant_cast(model->property("status")), - QDeclarativeXmlListModel::Loading); + QCOMPARE(qvariant_cast(model->property("status")), + QQuickXmlListModel::Loading); QTRY_COMPARE(spy.count(), 1); spy.clear(); QTest::qWait(50); - QCOMPARE(qvariant_cast(model->property("status")), - QDeclarativeXmlListModel::Ready); + QCOMPARE(qvariant_cast(model->property("status")), + QQuickXmlListModel::Ready); QVERIFY(errorString(model).isEmpty()); QCOMPARE(model->property("progress").toDouble(), qreal(1.0)); QCOMPARE(model->count(), 9); @@ -377,22 +377,22 @@ void tst_qdeclarativexmllistmodel::xml() model->setProperty("xml",xml); QCOMPARE(model->property("progress").toDouble(), qreal(1.0)); // immediately goes to 1.0 if using setXml() QTRY_COMPARE(spy.count(), 1); spy.clear(); - QCOMPARE(qvariant_cast(model->property("status")), - QDeclarativeXmlListModel::Loading); + QCOMPARE(qvariant_cast(model->property("status")), + QQuickXmlListModel::Loading); QTRY_COMPARE(spy.count(), 1); spy.clear(); if (xml.isEmpty()) - QCOMPARE(qvariant_cast(model->property("status")), - QDeclarativeXmlListModel::Null); + QCOMPARE(qvariant_cast(model->property("status")), + QQuickXmlListModel::Null); else - QCOMPARE(qvariant_cast(model->property("status")), - QDeclarativeXmlListModel::Ready); + QCOMPARE(qvariant_cast(model->property("status")), + QQuickXmlListModel::Ready); QVERIFY(errorString(model).isEmpty()); QCOMPARE(model->count(), count); delete model; } -void tst_qdeclarativexmllistmodel::xml_data() +void tst_qquickxmllistmodel::xml_data() { QTest::addColumn("xml"); QTest::addColumn("count"); @@ -402,19 +402,19 @@ void tst_qdeclarativexmllistmodel::xml_data() QTest::newRow("one item") << "HobbesTiger7Large" << 1; } -void tst_qdeclarativexmllistmodel::headers() +void tst_qquickxmllistmodel::headers() { // ensure the QNetworkAccessManagers created for this test are immediately deleted - QDeclarativeEngine qmlEng; + QQmlEngine qmlEng; CustomNetworkAccessManagerFactory factory; qmlEng.setNetworkAccessManagerFactory(&factory); - QDeclarativeComponent component(&qmlEng, testFileUrl("model.qml")); + QQmlComponent component(&qmlEng, testFileUrl("model.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); - QTRY_COMPARE(qvariant_cast(model->property("status")), - QDeclarativeXmlListModel::Ready); + QTRY_COMPARE(qvariant_cast(model->property("status")), + QQuickXmlListModel::Ready); QVariantMap expectedHeaders; expectedHeaders["Accept"] = "application/xml,*/*"; @@ -428,84 +428,84 @@ void tst_qdeclarativexmllistmodel::headers() delete model; } -void tst_qdeclarativexmllistmodel::source() +void tst_qquickxmllistmodel::source() { QFETCH(QUrl, source); QFETCH(int, count); - QFETCH(QDeclarativeXmlListModel::Status, status); + QFETCH(QQuickXmlListModel::Status, status); - QDeclarativeComponent component(&engine, testFileUrl("model.qml")); + QQmlComponent component(&engine, testFileUrl("model.qml")); QListModelInterface *model = qobject_cast(component.create()); - QSignalSpy spy(model, SIGNAL(statusChanged(QDeclarativeXmlListModel::Status))); + QSignalSpy spy(model, SIGNAL(statusChanged(QQuickXmlListModel::Status))); QVERIFY(errorString(model).isEmpty()); QCOMPARE(model->property("progress").toDouble(), qreal(0.0)); - QCOMPARE(qvariant_cast(model->property("status")), - QDeclarativeXmlListModel::Loading); + QCOMPARE(qvariant_cast(model->property("status")), + QQuickXmlListModel::Loading); QTRY_COMPARE(spy.count(), 1); spy.clear(); - QCOMPARE(qvariant_cast(model->property("status")), - QDeclarativeXmlListModel::Ready); + QCOMPARE(qvariant_cast(model->property("status")), + QQuickXmlListModel::Ready); QVERIFY(errorString(model).isEmpty()); QCOMPARE(model->property("progress").toDouble(), qreal(1.0)); QCOMPARE(model->count(), 9); model->setProperty("source",source); if (model->property("source").toString().isEmpty()) - QCOMPARE(qvariant_cast(model->property("status")), - QDeclarativeXmlListModel::Null); + QCOMPARE(qvariant_cast(model->property("status")), + QQuickXmlListModel::Null); QCOMPARE(model->property("progress").toDouble(), qreal(0.0)); QTRY_COMPARE(spy.count(), 1); spy.clear(); - QCOMPARE(qvariant_cast(model->property("status")), - QDeclarativeXmlListModel::Loading); + QCOMPARE(qvariant_cast(model->property("status")), + QQuickXmlListModel::Loading); QVERIFY(errorString(model).isEmpty()); QEventLoop loop; QTimer timer; timer.setSingleShot(true); - connect(model, SIGNAL(statusChanged(QDeclarativeXmlListModel::Status)), &loop, SLOT(quit())); + connect(model, SIGNAL(statusChanged(QQuickXmlListModel::Status)), &loop, SLOT(quit())); connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); timer.start(20000); loop.exec(); - if (spy.count() == 0 && status != QDeclarativeXmlListModel::Ready) { - qWarning("QDeclarativeXmlListModel invalid source test timed out"); + if (spy.count() == 0 && status != QQuickXmlListModel::Ready) { + qWarning("QQuickXmlListModel invalid source test timed out"); } else { QCOMPARE(spy.count(), 1); spy.clear(); } - QCOMPARE(qvariant_cast(model->property("status")), status); + QCOMPARE(qvariant_cast(model->property("status")), status); QCOMPARE(model->count(), count); - if (status == QDeclarativeXmlListModel::Ready) + if (status == QQuickXmlListModel::Ready) QCOMPARE(model->property("progress").toDouble(), qreal(1.0)); - QCOMPARE(errorString(model).isEmpty(), status == QDeclarativeXmlListModel::Ready); + QCOMPARE(errorString(model).isEmpty(), status == QQuickXmlListModel::Ready); delete model; } -void tst_qdeclarativexmllistmodel::source_data() +void tst_qquickxmllistmodel::source_data() { QTest::addColumn("source"); QTest::addColumn("count"); - QTest::addColumn("status"); + QTest::addColumn("status"); QTest::newRow("valid") << testFileUrl("model2.xml") << 2 - << QDeclarativeXmlListModel::Ready; + << QQuickXmlListModel::Ready; QTest::newRow("invalid") << QUrl("http://blah.blah/blah.xml") << 0 - << QDeclarativeXmlListModel::Error; + << QQuickXmlListModel::Error; // empty file QTemporaryFile *temp = new QTemporaryFile(this); if (temp->open()) QTest::newRow("empty file") << QUrl::fromLocalFile(temp->fileName()) << 0 - << QDeclarativeXmlListModel::Ready; + << QQuickXmlListModel::Ready; temp->close(); } -void tst_qdeclarativexmllistmodel::data() +void tst_qquickxmllistmodel::data() { - QDeclarativeComponent component(&engine, testFileUrl("model.qml")); + QQmlComponent component(&engine, testFileUrl("model.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); @@ -519,9 +519,9 @@ void tst_qdeclarativexmllistmodel::data() delete model; } -void tst_qdeclarativexmllistmodel::get() +void tst_qquickxmllistmodel::get() { - QDeclarativeComponent component(&engine, testFileUrl("get.qml")); + QQmlComponent component(&engine, testFileUrl("get.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); @@ -537,12 +537,12 @@ void tst_qdeclarativexmllistmodel::get() delete model; } -void tst_qdeclarativexmllistmodel::reload() +void tst_qquickxmllistmodel::reload() { // If no keys are used, the model should be rebuilt from scratch when // reload() is called. - QDeclarativeComponent component(&engine, testFileUrl("model.qml")); + QQmlComponent component(&engine, testFileUrl("model.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); QTRY_COMPARE(model->count(), 9); @@ -569,7 +569,7 @@ void tst_qdeclarativexmllistmodel::reload() delete model; } -void tst_qdeclarativexmllistmodel::useKeys() +void tst_qquickxmllistmodel::useKeys() { // If using incremental updates through keys, the model should only // insert & remove some of the items, instead of throwing everything @@ -578,11 +578,11 @@ void tst_qdeclarativexmllistmodel::useKeys() QFETCH(QString, oldXml); QFETCH(int, oldCount); QFETCH(QString, newXml); - QFETCH(QDeclarativeXmlModelData, newData); - QFETCH(QList, insertRanges); - QFETCH(QList, removeRanges); + QFETCH(QQmlXmlModelData, newData); + QFETCH(QList, insertRanges); + QFETCH(QList, removeRanges); - QDeclarativeComponent component(&engine, testFileUrl("roleKeys.qml")); + QQmlComponent component(&engine, testFileUrl("roleKeys.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); @@ -624,116 +624,116 @@ void tst_qdeclarativexmllistmodel::useKeys() delete model; } -void tst_qdeclarativexmllistmodel::useKeys_data() +void tst_qquickxmllistmodel::useKeys_data() { QTest::addColumn("oldXml"); QTest::addColumn("oldCount"); QTest::addColumn("newXml"); - QTest::addColumn("newData"); - QTest::addColumn >("insertRanges"); - QTest::addColumn >("removeRanges"); + QTest::addColumn("newData"); + QTest::addColumn >("insertRanges"); + QTest::addColumn >("removeRanges"); - QDeclarativeXmlModelData modelData; + QQmlXmlModelData modelData; QTest::newRow("append 1") << makeItemXmlAndData("name=A,age=25,sport=Football") << 1 << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics", &modelData) << modelData - << (QList() << qMakePair(1, 1)) - << QList(); + << (QList() << qMakePair(1, 1)) + << QList(); QTest::newRow("append multiple") << makeItemXmlAndData("name=A,age=25,sport=Football") << 1 << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling", &modelData) << modelData - << (QList() << qMakePair(1, 2)) - << QList(); + << (QList() << qMakePair(1, 2)) + << QList(); QTest::newRow("insert in different spots") << makeItemXmlAndData("name=B,age=35,sport=Athletics") << 1 << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling;name=D,age=55,sport=Golf", &modelData) << modelData - << (QList() << qMakePair(0, 1) << qMakePair(2,2)) - << QList(); + << (QList() << qMakePair(0, 1) << qMakePair(2,2)) + << QList(); QTest::newRow("insert in middle") << makeItemXmlAndData("name=A,age=25,sport=Football;name=D,age=55,sport=Golf") << 2 << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling;name=D,age=55,sport=Golf", &modelData) << modelData - << (QList() << qMakePair(1, 2)) - << QList(); + << (QList() << qMakePair(1, 2)) + << QList(); QTest::newRow("remove first") << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics") << 2 << makeItemXmlAndData("name=B,age=35,sport=Athletics", &modelData) << modelData - << QList() - << (QList() << qMakePair(0, 1)); + << QList() + << (QList() << qMakePair(0, 1)); QTest::newRow("remove last") << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics") << 2 << makeItemXmlAndData("name=A,age=25,sport=Football", &modelData) << modelData - << QList() - << (QList() << qMakePair(1, 1)); + << QList() + << (QList() << qMakePair(1, 1)); QTest::newRow("remove from multiple spots") << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling;name=D,age=55,sport=Golf;name=E,age=65,sport=Fencing") << 5 << makeItemXmlAndData("name=A,age=25,sport=Football;name=C,age=45,sport=Curling", &modelData) << modelData - << QList() - << (QList() << qMakePair(1, 1) << qMakePair(3,2)); + << QList() + << (QList() << qMakePair(1, 1) << qMakePair(3,2)); QTest::newRow("remove all") << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling") << 3 << makeItemXmlAndData("", &modelData) << modelData - << QList() - << (QList() << qMakePair(0, 3)); + << QList() + << (QList() << qMakePair(0, 3)); QTest::newRow("replace item") << makeItemXmlAndData("name=A,age=25,sport=Football") << 1 << makeItemXmlAndData("name=ZZZ,age=25,sport=Football", &modelData) << modelData - << (QList() << qMakePair(0, 1)) - << (QList() << qMakePair(0, 1)); + << (QList() << qMakePair(0, 1)) + << (QList() << qMakePair(0, 1)); QTest::newRow("add and remove simultaneously, in different spots") << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling;name=D,age=55,sport=Golf") << 4 << makeItemXmlAndData("name=B,age=35,sport=Athletics;name=E,age=65,sport=Fencing", &modelData) << modelData - << (QList() << qMakePair(1, 1)) - << (QList() << qMakePair(0, 1) << qMakePair(2,2)); + << (QList() << qMakePair(1, 1)) + << (QList() << qMakePair(0, 1) << qMakePair(2,2)); QTest::newRow("insert at start, remove at end i.e. rss feed") << makeItemXmlAndData("name=C,age=45,sport=Curling;name=D,age=55,sport=Golf;name=E,age=65,sport=Fencing") << 3 << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling", &modelData) << modelData - << (QList() << qMakePair(0, 2)) - << (QList() << qMakePair(1, 2)); + << (QList() << qMakePair(0, 2)) + << (QList() << qMakePair(1, 2)); QTest::newRow("remove at start, insert at end") << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling") << 3 << makeItemXmlAndData("name=C,age=45,sport=Curling;name=D,age=55,sport=Golf;name=E,age=65,sport=Fencing", &modelData) << modelData - << (QList() << qMakePair(1, 2)) - << (QList() << qMakePair(0, 2)); + << (QList() << qMakePair(1, 2)) + << (QList() << qMakePair(0, 2)); QTest::newRow("all data has changed") << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35") << 2 << makeItemXmlAndData("name=C,age=45,sport=Curling;name=D,age=55,sport=Golf", &modelData) << modelData - << (QList() << qMakePair(0, 2)) - << (QList() << qMakePair(0, 2)); + << (QList() << qMakePair(0, 2)) + << (QList() << qMakePair(0, 2)); } -void tst_qdeclarativexmllistmodel::noKeysValueChanges() +void tst_qquickxmllistmodel::noKeysValueChanges() { // The 'key' roles are 'name' and 'age', as defined in roleKeys.qml. // If a 'sport' value is changed, the model should not be reloaded, // since 'sport' is not marked as a key. - QDeclarativeComponent component(&engine, testFileUrl("roleKeys.qml")); + QQmlComponent component(&engine, testFileUrl("roleKeys.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); @@ -765,13 +765,13 @@ void tst_qdeclarativexmllistmodel::noKeysValueChanges() delete model; } -void tst_qdeclarativexmllistmodel::keysChanged() +void tst_qquickxmllistmodel::keysChanged() { // If the key roles change, the next time the data is reloaded, it should // delete all its data and build a clean model (i.e. same behaviour as // if no keys are set). - QDeclarativeComponent component(&engine, testFileUrl("roleKeys.qml")); + QQmlComponent component(&engine, testFileUrl("roleKeys.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); @@ -803,11 +803,11 @@ void tst_qdeclarativexmllistmodel::keysChanged() delete model; } -void tst_qdeclarativexmllistmodel::threading() +void tst_qquickxmllistmodel::threading() { QFETCH(int, xmlDataCount); - QDeclarativeComponent component(&engine, testFileUrl("roleKeys.qml")); + QQmlComponent component(&engine, testFileUrl("roleKeys.qml")); QListModelInterface *m1 = qobject_cast(component.create()); QVERIFY(m1 != 0); @@ -869,7 +869,7 @@ void tst_qdeclarativexmllistmodel::threading() delete m3; } -void tst_qdeclarativexmllistmodel::threading_data() +void tst_qquickxmllistmodel::threading_data() { QTest::addColumn("xmlDataCount"); @@ -878,9 +878,9 @@ void tst_qdeclarativexmllistmodel::threading_data() QTest::newRow("10") << 10; } -void tst_qdeclarativexmllistmodel::propertyChanges() +void tst_qquickxmllistmodel::propertyChanges() { - QDeclarativeComponent component(&engine, testFileUrl("propertychanges.qml")); + QQmlComponent component(&engine, testFileUrl("propertychanges.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); QTRY_COMPARE(model->count(), 9); @@ -948,15 +948,15 @@ void tst_qdeclarativexmllistmodel::propertyChanges() delete model; } -void tst_qdeclarativexmllistmodel::roleCrash() +void tst_qquickxmllistmodel::roleCrash() { // don't crash - QDeclarativeComponent component(&engine, testFileUrl("roleCrash.qml")); + QQmlComponent component(&engine, testFileUrl("roleCrash.qml")); QListModelInterface *model = qobject_cast(component.create()); QVERIFY(model != 0); delete model; } -QTEST_MAIN(tst_qdeclarativexmllistmodel) +QTEST_MAIN(tst_qquickxmllistmodel) -#include "tst_qdeclarativexmllistmodel.moc" +#include "tst_qquickxmllistmodel.moc" diff --git a/tests/auto/qtquick2/qtquick2.pro b/tests/auto/quick/quick.pro similarity index 66% rename from tests/auto/qtquick2/qtquick2.pro rename to tests/auto/quick/quick.pro index 7acd75f69e..6fba193790 100644 --- a/tests/auto/qtquick2/qtquick2.pro +++ b/tests/auto/quick/quick.pro @@ -5,27 +5,27 @@ PUBLICTESTS += \ geometry \ nodes \ rendernode \ - qdeclarativepixmapcache + qquickpixmapcache # This test requires the qtconcurrent module -!contains(QT_CONFIG, concurrent):PUBLICTESTS -= qdeclarativepixmapcache +!contains(QT_CONFIG, concurrent):PUBLICTESTS -= qqmlpixmapcache PRIVATETESTS += \ - qdeclarativeanimations \ - qdeclarativeapplication \ - qdeclarativebehaviors \ - qdeclarativefontloader \ - qdeclarativepath \ - qdeclarativesmoothedanimation \ - qdeclarativespringanimation \ - qdeclarativestyledtext \ - qdeclarativestates \ - qdeclarativesystempalette \ - qdeclarativetimer \ - qdeclarativexmllistmodel + qquickanimations \ + qquickapplication \ + qquickbehaviors \ + qquickfontloader \ + qquickpath \ + qquicksmoothedanimation \ + qquickspringanimation \ + qquickstyledtext \ + qquickstates \ + qquicksystempalette \ + qquicktimer \ + qquickxmllistmodel # This test requires the xmlpatterns module -!contains(QT_CONFIG,xmlpatterns):PRIVATETESTS -= qdeclarativexmllistmodel +!contains(QT_CONFIG,xmlpatterns):PRIVATETESTS -= qqmlxmllistmodel QUICKTESTS = \ qquickaccessible \ diff --git a/tests/auto/qtquick2/rendernode/data/MessUpState.qml b/tests/auto/quick/rendernode/data/MessUpState.qml similarity index 100% rename from tests/auto/qtquick2/rendernode/data/MessUpState.qml rename to tests/auto/quick/rendernode/data/MessUpState.qml diff --git a/tests/auto/qtquick2/rendernode/data/RenderOrder.qml b/tests/auto/quick/rendernode/data/RenderOrder.qml similarity index 100% rename from tests/auto/qtquick2/rendernode/data/RenderOrder.qml rename to tests/auto/quick/rendernode/data/RenderOrder.qml diff --git a/tests/auto/qtquick2/rendernode/rendernode.pro b/tests/auto/quick/rendernode/rendernode.pro similarity index 78% rename from tests/auto/qtquick2/rendernode/rendernode.pro rename to tests/auto/quick/rendernode/rendernode.pro index f915a58900..8484d591e5 100644 --- a/tests/auto/qtquick2/rendernode/rendernode.pro +++ b/tests/auto/quick/rendernode/rendernode.pro @@ -11,7 +11,7 @@ DEPLOYMENT += testDataFiles include(../../shared/util.pri) CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private quick-private testlib +QT += core-private gui-private v8-private qml-private quick-private testlib OTHER_FILES += \ data/RenderOrder.qml \ diff --git a/tests/auto/qtquick2/rendernode/tst_rendernode.cpp b/tests/auto/quick/rendernode/tst_rendernode.cpp similarity index 99% rename from tests/auto/qtquick2/rendernode/tst_rendernode.cpp rename to tests/auto/quick/rendernode/tst_rendernode.cpp index f0e385152e..b456a5980e 100644 --- a/tests/auto/qtquick2/rendernode/tst_rendernode.cpp +++ b/tests/auto/quick/rendernode/tst_rendernode.cpp @@ -48,7 +48,7 @@ #include "../../shared/util.h" -class tst_rendernode: public QDeclarativeDataTest +class tst_rendernode: public QQmlDataTest { Q_OBJECT public: diff --git a/tests/auto/qtquick2/shared/util.pri b/tests/auto/quick/shared/util.pri similarity index 66% rename from tests/auto/qtquick2/shared/util.pri rename to tests/auto/quick/shared/util.pri index eddbe4b6aa..aa79c7ca98 100644 --- a/tests/auto/qtquick2/shared/util.pri +++ b/tests/auto/quick/shared/util.pri @@ -4,4 +4,4 @@ HEADERS += $$PWD/visualtestutil.h \ SOURCES += $$PWD/visualtestutil.cpp \ $$PWD/viewtestutil.cpp -DEFINES += QT_DECLARATIVETEST_DATADIR=\\\"$${_PRO_FILE_PWD_}/data\\\" +DEFINES += QT_QMLTEST_DATADIR=\\\"$${_PRO_FILE_PWD_}/data\\\" diff --git a/tests/auto/qtquick2/shared/viewtestutil.cpp b/tests/auto/quick/shared/viewtestutil.cpp similarity index 98% rename from tests/auto/qtquick2/shared/viewtestutil.cpp rename to tests/auto/quick/shared/viewtestutil.cpp index eeef23001e..d00a0e2a96 100644 --- a/tests/auto/qtquick2/shared/viewtestutil.cpp +++ b/tests/auto/quick/shared/viewtestutil.cpp @@ -46,7 +46,7 @@ #include template -static void qdeclarativemodelviewstestutil_move(int from, int to, int n, T *items) +static void qquickmodelviewstestutil_move(int from, int to, int n, T *items) { if (from > to) { // Only move forwards - flip if backwards moving @@ -259,7 +259,7 @@ void QQuickViewTestUtil::QmlListModel::moveItem(int from, int to) void QQuickViewTestUtil::QmlListModel::moveItems(int from, int to, int count) { - qdeclarativemodelviewstestutil_move(from, to, count, &list); + qquickmodelviewstestutil_move(from, to, count, &list); emit itemsMoved(from, to, count); } @@ -383,7 +383,7 @@ void QQuickViewTestUtil::QaimModel::moveItem(int from, int to) void QQuickViewTestUtil::QaimModel::moveItems(int from, int to, int count) { emit beginMoveRows(QModelIndex(), from, from+count-1, QModelIndex(), to > from ? to+count : to); - qdeclarativemodelviewstestutil_move(from, to, count, &list); + qquickmodelviewstestutil_move(from, to, count, &list); emit endMoveRows(); } diff --git a/tests/auto/qtquick2/shared/viewtestutil.h b/tests/auto/quick/shared/viewtestutil.h similarity index 98% rename from tests/auto/qtquick2/shared/viewtestutil.h rename to tests/auto/quick/shared/viewtestutil.h index 71fd5065df..e940727789 100644 --- a/tests/auto/qtquick2/shared/viewtestutil.h +++ b/tests/auto/quick/shared/viewtestutil.h @@ -43,8 +43,8 @@ #define QQUICKVIEWTESTUTIL_H #include -#include -#include +#include +#include #include QT_FORWARD_DECLARE_CLASS(QQuickView) diff --git a/tests/auto/qtquick2/shared/visualtestutil.cpp b/tests/auto/quick/shared/visualtestutil.cpp similarity index 100% rename from tests/auto/qtquick2/shared/visualtestutil.cpp rename to tests/auto/quick/shared/visualtestutil.cpp diff --git a/tests/auto/qtquick2/shared/visualtestutil.h b/tests/auto/quick/shared/visualtestutil.h similarity index 96% rename from tests/auto/qtquick2/shared/visualtestutil.h rename to tests/auto/quick/shared/visualtestutil.h index 09bb03c002..9407ff8e8f 100644 --- a/tests/auto/qtquick2/shared/visualtestutil.h +++ b/tests/auto/quick/shared/visualtestutil.h @@ -43,7 +43,7 @@ #define QQUICKVISUALTESTUTIL_H #include -#include +#include namespace QQuickVisualTestUtil { @@ -66,7 +66,7 @@ namespace QQuickVisualTestUtil continue; if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) { if (index != -1) { - QDeclarativeExpression e(qmlContext(item), item, "index"); + QQmlExpression e(qmlContext(item), item, "index"); if (e.evaluate().toInt() == index) return static_cast(item); } else { diff --git a/tests/auto/shared/util.cpp b/tests/auto/shared/util.cpp index 5a3d50f695..c015898ab7 100644 --- a/tests/auto/shared/util.cpp +++ b/tests/auto/shared/util.cpp @@ -41,19 +41,19 @@ #include "util.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -QDeclarativeDataTest *QDeclarativeDataTest::m_instance = 0; +QQmlDataTest *QQmlDataTest::m_instance = 0; -QDeclarativeDataTest::QDeclarativeDataTest() : +QQmlDataTest::QQmlDataTest() : #ifdef QT_TESTCASE_BUILDDIR - m_dataDirectory(QTest::qFindTestData("data", QT_DECLARATIVETEST_DATADIR, 0, QT_TESTCASE_BUILDDIR)), + m_dataDirectory(QTest::qFindTestData("data", QT_QMLTEST_DATADIR, 0, QT_TESTCASE_BUILDDIR)), #else - m_dataDirectory(QTest::qFindTestData("data", QT_DECLARATIVETEST_DATADIR, 0)), + m_dataDirectory(QTest::qFindTestData("data", QT_QMLTEST_DATADIR, 0)), #endif m_dataDirectoryUrl(QUrl::fromLocalFile(m_dataDirectory + QLatin1Char('/'))) @@ -61,33 +61,33 @@ QDeclarativeDataTest::QDeclarativeDataTest() : m_instance = this; } -QDeclarativeDataTest::~QDeclarativeDataTest() +QQmlDataTest::~QQmlDataTest() { m_instance = 0; } -void QDeclarativeDataTest::initTestCase() +void QQmlDataTest::initTestCase() { QVERIFY2(!m_dataDirectory.isEmpty(), "'data' directory not found"); m_directory = QFileInfo(m_dataDirectory).absolutePath(); QVERIFY2(QDir::setCurrent(m_directory), qPrintable(QLatin1String("Could not chdir to ") + m_directory)); } -QString QDeclarativeDataTest::testFile(const QString &fileName) const +QString QQmlDataTest::testFile(const QString &fileName) const { if (m_directory.isEmpty()) - qFatal("QDeclarativeDataTest::initTestCase() not called."); + qFatal("QQmlDataTest::initTestCase() not called."); QString result = m_dataDirectory; result += QLatin1Char('/'); result += fileName; return result; } -QByteArray QDeclarativeDataTest::msgComponentError(const QDeclarativeComponent &c, - const QDeclarativeEngine *engine /* = 0 */) +QByteArray QQmlDataTest::msgComponentError(const QQmlComponent &c, + const QQmlEngine *engine /* = 0 */) { QString result; - const QList errors = c.errors(); + const QList errors = c.errors(); QTextStream str(&result); str << "Component '" << c.url().toString() << "' has " << errors.size() << " errors: '"; @@ -98,7 +98,7 @@ QByteArray QDeclarativeDataTest::msgComponentError(const QDeclarativeComponent & } if (!engine) - if (QDeclarativeContext *context = c.creationContext()) + if (QQmlContext *context = c.creationContext()) engine = context->engine(); if (engine) { str << " Import paths: (" << engine->importPathList().join(QStringLiteral(", ")) diff --git a/tests/auto/shared/util.h b/tests/auto/shared/util.h index 9f73d9eb05..5a31ebd719 100644 --- a/tests/auto/shared/util.h +++ b/tests/auto/shared/util.h @@ -39,25 +39,25 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVETESTUTILS_H -#define QDECLARATIVETESTUTILS_H +#ifndef QQMLTESTUTILS_H +#define QQMLTESTUTILS_H #include #include #include #include -QT_FORWARD_DECLARE_CLASS(QDeclarativeComponent) -QT_FORWARD_DECLARE_CLASS(QDeclarativeEngine) +QT_FORWARD_DECLARE_CLASS(QQmlComponent) +QT_FORWARD_DECLARE_CLASS(QQmlEngine) /* Base class for tests with data that are located in a "data" subfolder. */ -class QDeclarativeDataTest : public QObject +class QQmlDataTest : public QObject { Q_OBJECT public: - QDeclarativeDataTest(); - virtual ~QDeclarativeDataTest(); + QQmlDataTest(); + virtual ~QQmlDataTest(); QString testFile(const QString &fileName) const; inline QString testFile(const char *fileName) const @@ -71,20 +71,20 @@ class QDeclarativeDataTest : public QObject inline QUrl dataDirectoryUrl() const { return m_dataDirectoryUrl; } inline QString directory() const { return m_directory; } - static inline QDeclarativeDataTest *instance() { return m_instance; } + static inline QQmlDataTest *instance() { return m_instance; } - static QByteArray msgComponentError(const QDeclarativeComponent &, - const QDeclarativeEngine *engine = 0); + static QByteArray msgComponentError(const QQmlComponent &, + const QQmlEngine *engine = 0); public slots: virtual void initTestCase(); private: - static QDeclarativeDataTest *m_instance; + static QQmlDataTest *m_instance; const QString m_dataDirectory; const QUrl m_dataDirectoryUrl; QString m_directory; }; -#endif // QDECLARATIVETESTUTILS_H +#endif // QQMLTESTUTILS_H diff --git a/tests/auto/shared/util.pri b/tests/auto/shared/util.pri index 916e5fb32a..8e82dcb33b 100644 --- a/tests/auto/shared/util.pri +++ b/tests/auto/shared/util.pri @@ -2,4 +2,4 @@ HEADERS += $$PWD/util.h SOURCES += $$PWD/util.cpp -DEFINES += QT_DECLARATIVETEST_DATADIR=\\\"$${_PRO_FILE_PWD_}/data\\\" +DEFINES += QT_QMLTEST_DATADIR=\\\"$${_PRO_FILE_PWD_}/data\\\" diff --git a/tests/benchmarks/declarative/qdeclarativedebugtrace/qdeclarativedebugtrace.pro b/tests/benchmarks/declarative/qdeclarativedebugtrace/qdeclarativedebugtrace.pro deleted file mode 100644 index 6f2712adec..0000000000 --- a/tests/benchmarks/declarative/qdeclarativedebugtrace/qdeclarativedebugtrace.pro +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG += testcase -QT += declarative testlib -TEMPLATE = app -TARGET = tst_qdeclarativedebugtrace -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativedebugtrace.cpp - diff --git a/tests/benchmarks/particles/affectors/affectors.pro b/tests/benchmarks/particles/affectors/affectors.pro index 17b23255ac..654f788465 100644 --- a/tests/benchmarks/particles/affectors/affectors.pro +++ b/tests/benchmarks/particles/affectors/affectors.pro @@ -7,4 +7,4 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/benchmarks/particles/emission/emission.pro b/tests/benchmarks/particles/emission/emission.pro index 343bdf0430..7c00c68c90 100644 --- a/tests/benchmarks/particles/emission/emission.pro +++ b/tests/benchmarks/particles/emission/emission.pro @@ -7,4 +7,4 @@ testDataFiles.files = data testDataFiles.path = . DEPLOYMENT += testDataFiles -QT += core-private gui-private v8-private declarative-private quick-private opengl-private testlib +QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/benchmarks/declarative/animation/animation.pro b/tests/benchmarks/qml/animation/animation.pro similarity index 55% rename from tests/benchmarks/declarative/animation/animation.pro rename to tests/benchmarks/qml/animation/animation.pro index fc72040a3d..5efac8da1c 100644 --- a/tests/benchmarks/declarative/animation/animation.pro +++ b/tests/benchmarks/qml/animation/animation.pro @@ -1,10 +1,10 @@ TEMPLATE = app TARGET = tst_animation -QT += declarative +QT += qml macx:CONFIG -= app_bundle SOURCES += tst_animation.cpp DEFINES += SRCDIR=\\\"$$PWD\\\" -QT += testlib core-private gui-private declarative-private quick-private v8-private +QT += testlib core-private gui-private qml-private quick-private v8-private diff --git a/tests/benchmarks/declarative/animation/data/animation.qml b/tests/benchmarks/qml/animation/data/animation.qml similarity index 100% rename from tests/benchmarks/declarative/animation/data/animation.qml rename to tests/benchmarks/qml/animation/data/animation.qml diff --git a/tests/benchmarks/declarative/animation/tst_animation.cpp b/tests/benchmarks/qml/animation/tst_animation.cpp similarity index 86% rename from tests/benchmarks/declarative/animation/tst_animation.cpp rename to tests/benchmarks/qml/animation/tst_animation.cpp index 6273d9740e..e5619caa6c 100644 --- a/tests/benchmarks/declarative/animation/tst_animation.cpp +++ b/tests/benchmarks/qml/animation/tst_animation.cpp @@ -40,11 +40,11 @@ ****************************************************************************/ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class tst_animation : public QObject { @@ -68,7 +68,7 @@ private slots: void numberAnimationEmpty(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; tst_animation::tst_animation() @@ -91,7 +91,7 @@ void tst_animation::abstractAnimation() void tst_animation::bulkValueAnimator() { QBENCHMARK { - QDeclarativeBulkValueAnimator *animator = new QDeclarativeBulkValueAnimator; + QQuickBulkValueAnimator *animator = new QQuickBulkValueAnimator; delete animator; } } @@ -99,14 +99,14 @@ void tst_animation::bulkValueAnimator() void tst_animation::propertyUpdater() { QBENCHMARK { - QDeclarativeAnimationPropertyUpdater *updater = new QDeclarativeAnimationPropertyUpdater; + QQuickAnimationPropertyUpdater *updater = new QQuickAnimationPropertyUpdater; delete updater; } } void tst_animation::animationtree_qml() { - QDeclarativeComponent component(&engine, TEST_FILE("animation.qml")); + QQmlComponent component(&engine, TEST_FILE("animation.qml")); QObject *obj = component.create(); delete obj; @@ -120,7 +120,7 @@ void tst_animation::animationelements_data() { QTest::addColumn("type"); - QSet types = QDeclarativeMetaType::qmlTypeNames().toSet(); + QSet types = QQmlMetaType::qmlTypeNames().toSet(); foreach (const QString &type, types) { if (type.contains(QLatin1String("Animation"))) QTest::newRow(type.toLatin1()) << type; @@ -133,7 +133,7 @@ void tst_animation::animationelements_data() void tst_animation::animationelements() { QFETCH(QString, type); - QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 2, 0); + QQmlType *t = QQmlMetaType::qmlType(type, 2, 0); if (!t || !t->isCreatable()) QSKIP("Non-creatable type"); @@ -145,7 +145,7 @@ void tst_animation::animationelements() void tst_animation::numberAnimation() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nItem { Rectangle { id: rect; NumberAnimation { target: rect; property: \"x\"; to: 100; duration: 500; easing.type: Easing.InOutQuad } } }", QUrl()); QObject *obj = component.create(); @@ -159,7 +159,7 @@ void tst_animation::numberAnimation() void tst_animation::numberAnimationStarted() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nItem { Rectangle { id: rect; NumberAnimation { target: rect; property: \"x\"; to: 100; duration: 500; easing.type: Easing.InOutQuad; running: true; paused: true } } }", QUrl()); QObject *obj = component.create(); @@ -173,7 +173,7 @@ void tst_animation::numberAnimationStarted() void tst_animation::numberAnimationMultipleTargets() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nItem { Rectangle { id: rect; NumberAnimation { target: rect; properties: \"x,y,z,width,height,implicitWidth,implicitHeight\"; to: 100; duration: 500; easing.type: Easing.InOutQuad; running: true; paused: true } } }", QUrl()); QObject *obj = component.create(); @@ -187,7 +187,7 @@ void tst_animation::numberAnimationMultipleTargets() void tst_animation::numberAnimationEmpty() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nNumberAnimation { }", QUrl()); QObject *obj = component.create(); diff --git a/tests/benchmarks/declarative/binding/binding.pro b/tests/benchmarks/qml/binding/binding.pro similarity index 89% rename from tests/benchmarks/declarative/binding/binding.pro rename to tests/benchmarks/qml/binding/binding.pro index ba59080232..776c8390a3 100644 --- a/tests/benchmarks/declarative/binding/binding.pro +++ b/tests/benchmarks/qml/binding/binding.pro @@ -1,7 +1,7 @@ CONFIG += testcase TEMPLATE = app TARGET = tst_binding -QT += declarative testlib +QT += qml testlib macx:CONFIG -= app_bundle SOURCES += tst_binding.cpp testtypes.cpp diff --git a/tests/benchmarks/declarative/binding/data/creation.txt b/tests/benchmarks/qml/binding/data/creation.txt similarity index 100% rename from tests/benchmarks/declarative/binding/data/creation.txt rename to tests/benchmarks/qml/binding/data/creation.txt diff --git a/tests/benchmarks/declarative/binding/data/idproperty.txt b/tests/benchmarks/qml/binding/data/idproperty.txt similarity index 100% rename from tests/benchmarks/declarative/binding/data/idproperty.txt rename to tests/benchmarks/qml/binding/data/idproperty.txt diff --git a/tests/benchmarks/declarative/binding/data/localproperty.txt b/tests/benchmarks/qml/binding/data/localproperty.txt similarity index 100% rename from tests/benchmarks/declarative/binding/data/localproperty.txt rename to tests/benchmarks/qml/binding/data/localproperty.txt diff --git a/tests/benchmarks/declarative/binding/data/objectproperty.txt b/tests/benchmarks/qml/binding/data/objectproperty.txt similarity index 100% rename from tests/benchmarks/declarative/binding/data/objectproperty.txt rename to tests/benchmarks/qml/binding/data/objectproperty.txt diff --git a/tests/benchmarks/declarative/binding/testtypes.cpp b/tests/benchmarks/qml/binding/testtypes.cpp similarity index 100% rename from tests/benchmarks/declarative/binding/testtypes.cpp rename to tests/benchmarks/qml/binding/testtypes.cpp diff --git a/tests/benchmarks/declarative/binding/testtypes.h b/tests/benchmarks/qml/binding/testtypes.h similarity index 92% rename from tests/benchmarks/declarative/binding/testtypes.h rename to tests/benchmarks/qml/binding/testtypes.h index 1c99842e33..03542ca24c 100644 --- a/tests/benchmarks/declarative/binding/testtypes.h +++ b/tests/benchmarks/qml/binding/testtypes.h @@ -42,7 +42,7 @@ #define TESTTYPES_H #include -#include +#include class MyQmlObject : public QObject { @@ -50,7 +50,7 @@ class MyQmlObject : public QObject Q_PROPERTY(int result READ result WRITE setResult) Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged) Q_PROPERTY(MyQmlObject *object READ object WRITE setObject NOTIFY objectChanged) - Q_PROPERTY(QDeclarativeListProperty data READ data) + Q_PROPERTY(QQmlListProperty data READ data) Q_CLASSINFO("DefaultProperty", "data") public: MyQmlObject() : m_result(0), m_value(0), m_object(0) {} @@ -61,7 +61,7 @@ class MyQmlObject : public QObject int value() const { return m_value; } void setValue(int v) { m_value = v; emit valueChanged(); } - QDeclarativeListProperty data() { return QDeclarativeListProperty(this, m_data); } + QQmlListProperty data() { return QQmlListProperty(this, m_data); } MyQmlObject *object() const { return m_object; } void setObject(MyQmlObject *o) { m_object = o; emit objectChanged(); } diff --git a/tests/benchmarks/declarative/binding/tst_binding.cpp b/tests/benchmarks/qml/binding/tst_binding.cpp similarity index 96% rename from tests/benchmarks/declarative/binding/tst_binding.cpp rename to tests/benchmarks/qml/binding/tst_binding.cpp index 858e99016b..cd854e06e0 100644 --- a/tests/benchmarks/declarative/binding/tst_binding.cpp +++ b/tests/benchmarks/qml/binding/tst_binding.cpp @@ -40,9 +40,9 @@ ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include #include #include #include "testtypes.h" @@ -68,7 +68,7 @@ private slots: void creation(); private: - QDeclarativeEngine engine; + QQmlEngine engine; MyQmlObject tstObject; }; @@ -91,7 +91,7 @@ void tst_binding::cleanupTestCase() } #define COMPONENT(filename, binding) \ - QDeclarativeComponent c(&engine); \ + QQmlComponent c(&engine); \ { \ QFile f(filename); \ QVERIFY(f.open(QIODevice::ReadOnly)); \ diff --git a/tests/benchmarks/declarative/compilation/compilation.pro b/tests/benchmarks/qml/compilation/compilation.pro similarity index 75% rename from tests/benchmarks/declarative/compilation/compilation.pro rename to tests/benchmarks/qml/compilation/compilation.pro index 44ea3d0c68..4fa9e49918 100644 --- a/tests/benchmarks/declarative/compilation/compilation.pro +++ b/tests/benchmarks/qml/compilation/compilation.pro @@ -1,7 +1,7 @@ CONFIG += testcase TEMPLATE = app TARGET = tst_compilation -QT += declarative testlib +QT += qml qml-private testlib core-private v8-private macx:CONFIG -= app_bundle CONFIG += release diff --git a/tests/benchmarks/declarative/compilation/data/BoomBlock.qml b/tests/benchmarks/qml/compilation/data/BoomBlock.qml similarity index 97% rename from tests/benchmarks/declarative/compilation/data/BoomBlock.qml rename to tests/benchmarks/qml/compilation/data/BoomBlock.qml index 58ef377b71..65d253e074 100644 --- a/tests/benchmarks/declarative/compilation/data/BoomBlock.qml +++ b/tests/benchmarks/qml/compilation/data/BoomBlock.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/compilation/tst_compilation.cpp b/tests/benchmarks/qml/compilation/tst_compilation.cpp similarity index 83% rename from tests/benchmarks/declarative/compilation/tst_compilation.cpp rename to tests/benchmarks/qml/compilation/tst_compilation.cpp index b9c619af31..9eeed7e9ed 100644 --- a/tests/benchmarks/declarative/compilation/tst_compilation.cpp +++ b/tests/benchmarks/qml/compilation/tst_compilation.cpp @@ -41,13 +41,13 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -69,7 +69,7 @@ private slots: void scriptparser(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; tst_compilation::tst_compilation() @@ -89,12 +89,12 @@ void tst_compilation::boomblock() //get rid of initialization effects { - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData(data, QUrl()); } QBENCHMARK { - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData(data, QUrl()); // QVERIFY(c.isReady()); } @@ -119,13 +119,13 @@ void tst_compilation::jsparser() const QString code = stream.readAll(); QBENCHMARK { - QDeclarativeJS::Engine engine; - QDeclarativeJS::NodePool nodePool(file, &engine); + QQmlJS::Engine engine; + QQmlJS::NodePool nodePool(file, &engine); - QDeclarativeJS::Lexer lexer(&engine); + QQmlJS::Lexer lexer(&engine); lexer.setCode(code, -1); - QDeclarativeJS::Parser parser(&engine); + QQmlJS::Parser parser(&engine); parser.parse(); parser.ast(); } @@ -149,7 +149,7 @@ void tst_compilation::scriptparser() QUrl url = QUrl::fromLocalFile(file); QBENCHMARK { - QDeclarativeScript::Parser parser; + QQmlScript::Parser parser; parser.parse(data, url); parser.tree(); } diff --git a/tests/benchmarks/declarative/creation/creation.pro b/tests/benchmarks/qml/creation/creation.pro similarity index 63% rename from tests/benchmarks/declarative/creation/creation.pro rename to tests/benchmarks/qml/creation/creation.pro index 6d0d9d7e8f..d887a1ffbf 100644 --- a/tests/benchmarks/declarative/creation/creation.pro +++ b/tests/benchmarks/qml/creation/creation.pro @@ -7,4 +7,4 @@ SOURCES += tst_creation.cpp DEFINES += SRCDIR=\\\"$$PWD\\\" -QT += core-private gui-private declarative-private qtquick1-private widgets testlib +QT += core-private gui-private qml-private qtquick1-private widgets testlib diff --git a/tests/benchmarks/declarative/creation/data/item.qml b/tests/benchmarks/qml/creation/data/item.qml similarity index 96% rename from tests/benchmarks/declarative/creation/data/item.qml rename to tests/benchmarks/qml/creation/data/item.qml index ebc50ceb13..af6c2f3f59 100644 --- a/tests/benchmarks/declarative/creation/data/item.qml +++ b/tests/benchmarks/qml/creation/data/item.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/creation/data/qobject.qml b/tests/benchmarks/qml/creation/data/qobject.qml similarity index 96% rename from tests/benchmarks/declarative/creation/data/qobject.qml rename to tests/benchmarks/qml/creation/data/qobject.qml index 4b59535bcb..90620ab35e 100644 --- a/tests/benchmarks/declarative/creation/data/qobject.qml +++ b/tests/benchmarks/qml/creation/data/qobject.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/qml/creation/tst_creation.cpp similarity index 77% rename from tests/benchmarks/declarative/creation/tst_creation.cpp rename to tests/benchmarks/qml/creation/tst_creation.cpp index 809271e4d2..6bdaae48fd 100644 --- a/tests/benchmarks/declarative/creation/tst_creation.cpp +++ b/tests/benchmarks/qml/creation/tst_creation.cpp @@ -40,14 +40,14 @@ ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include #include #include #include -#include -#include +#include +#include #include #include @@ -80,23 +80,23 @@ private slots: void elements(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; class TestType : public QObject { Q_OBJECT -Q_PROPERTY(QDeclarativeListProperty resources READ resources) +Q_PROPERTY(QQmlListProperty resources READ resources) Q_CLASSINFO("DefaultProperty", "resources") public: TestType(QObject *parent = 0) : QObject(parent) {} - QDeclarativeListProperty resources() { - return QDeclarativeListProperty(this, 0, resources_append); + QQmlListProperty resources() { + return QQmlListProperty(this, 0, resources_append); } - static void resources_append(QDeclarativeListProperty *p, QObject *o) { + static void resources_append(QQmlListProperty *p, QObject *o) { o->setParent(p->object); } }; @@ -124,7 +124,7 @@ void tst_creation::qobject_cpp() void tst_creation::qobject_qml() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import QtQuick 2.0\nQtObject {}", QUrl()); QObject *obj = component.create(); delete obj; @@ -137,7 +137,7 @@ void tst_creation::qobject_qml() void tst_creation::qobject_10flat_qml() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import Qt.test 1.0\nTestType { resources: [ TestType{},TestType{},TestType{},TestType{},TestType{},TestType{},TestType{},TestType{},TestType{},TestType{} ] }", QUrl()); QObject *obj = component.create(); delete obj; @@ -168,7 +168,7 @@ void tst_creation::qobject_10flat_cpp() void tst_creation::qobject_10tree_qml() { - QDeclarativeComponent component(&engine); + QQmlComponent component(&engine); component.setData("import Qt.test 1.0\nTestType { TestType{ TestType { TestType{ TestType{ TestType{ TestType{ TestType{ TestType{ TestType{ TestType{ } } } } } } } } } } }", QUrl()); QObject *obj = component.create(); @@ -201,7 +201,7 @@ void tst_creation::qobject_10tree_cpp() void tst_creation::qobject_qmltype() { - QDeclarativeType *t = QDeclarativeMetaType::qmlType("QtQuick/QtObject", 2, 0); + QQmlType *t = QQmlMetaType::qmlType("QtQuick/QtObject", 2, 0); QBENCHMARK { QObject *obj = t->create(); @@ -238,7 +238,7 @@ void tst_creation::qobject_alloc() } } -struct QDeclarativeGraphics_Derived : public QObject +struct QQmlGraphics_Derived : public QObject { void setParent_noEvent(QObject *parent) { bool sce = d_ptr->sendChildEvents; @@ -248,17 +248,17 @@ struct QDeclarativeGraphics_Derived : public QObject } }; -inline void QDeclarativeGraphics_setParent_noEvent(QObject *object, QObject *parent) +inline void QQmlGraphics_setParent_noEvent(QObject *object, QObject *parent) { - static_cast(object)->setParent_noEvent(parent); + static_cast(object)->setParent_noEvent(parent); } void tst_creation::itemtree_notree_cpp() { QBENCHMARK { - QDeclarativeItem *item = new QDeclarativeItem; + QQuickItem *item = new QQuickItem; for (int i = 0; i < 30; ++i) { - QDeclarativeItem *child = new QDeclarativeItem; + QQuickItem *child = new QQuickItem; Q_UNUSED(child); } delete item; @@ -268,10 +268,10 @@ void tst_creation::itemtree_notree_cpp() void tst_creation::itemtree_objtree_cpp() { QBENCHMARK { - QDeclarativeItem *item = new QDeclarativeItem; + QQuickItem *item = new QQuickItem; for (int i = 0; i < 30; ++i) { - QDeclarativeItem *child = new QDeclarativeItem; - QDeclarativeGraphics_setParent_noEvent(child,item); + QQuickItem *child = new QQuickItem; + QQmlGraphics_setParent_noEvent(child,item); } delete item; } @@ -280,10 +280,10 @@ void tst_creation::itemtree_objtree_cpp() void tst_creation::itemtree_cpp() { QBENCHMARK { - QDeclarativeItem *item = new QDeclarativeItem; + QQuickItem *item = new QQuickItem; for (int i = 0; i < 30; ++i) { - QDeclarativeItem *child = new QDeclarativeItem; - QDeclarativeGraphics_setParent_noEvent(child,item); + QQuickItem *child = new QQuickItem; + QQmlGraphics_setParent_noEvent(child,item); child->setParentItem(item); } delete item; @@ -293,11 +293,11 @@ void tst_creation::itemtree_cpp() void tst_creation::itemtree_data_cpp() { QBENCHMARK { - QDeclarativeItem *item = new QDeclarativeItem; + QQuickItem *item = new QQuickItem; for (int i = 0; i < 30; ++i) { - QDeclarativeItem *child = new QDeclarativeItem; - QDeclarativeGraphics_setParent_noEvent(child,item); - QDeclarativeListReference ref(item, "data"); + QQuickItem *child = new QQuickItem; + QQmlGraphics_setParent_noEvent(child,item); + QQmlListReference ref(item, "data"); ref.append(child); } delete item; @@ -306,7 +306,7 @@ void tst_creation::itemtree_data_cpp() void tst_creation::itemtree_qml() { - QDeclarativeComponent component(&engine, TEST_FILE("item.qml")); + QQmlComponent component(&engine, TEST_FILE("item.qml")); QObject *obj = component.create(); delete obj; @@ -319,13 +319,13 @@ void tst_creation::itemtree_qml() void tst_creation::itemtree_scene_cpp() { QGraphicsScene scene; - QDeclarativeItem *root = new QDeclarativeItem; + QQuickItem *root = new QQuickItem; scene.addItem(root); QBENCHMARK { - QDeclarativeItem *item = new QDeclarativeItem; + QQuickItem *item = new QQuickItem; for (int i = 0; i < 30; ++i) { - QDeclarativeItem *child = new QDeclarativeItem; - QDeclarativeGraphics_setParent_noEvent(child,item); + QQuickItem *child = new QQuickItem; + QQmlGraphics_setParent_noEvent(child,item); child->setParentItem(item); } item->setParentItem(root); @@ -338,7 +338,7 @@ void tst_creation::elements_data() { QTest::addColumn("type"); - QList types = QDeclarativeMetaType::qmlTypeNames(); + QList types = QQmlMetaType::qmlTypeNames(); foreach (QString type, types) QTest::newRow(type.toLatin1()) << type; } @@ -346,7 +346,7 @@ void tst_creation::elements_data() void tst_creation::elements() { QFETCH(QString, type); - QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 2, 0); + QQmlType *t = QQmlMetaType::qmlType(type, 2, 0); if (!t || !t->isCreatable()) QSKIP("Non-creatable type"); diff --git a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicFour.qml b/tests/benchmarks/qml/holistic/data/dynamicTargets/DynamicFour.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicFour.qml rename to tests/benchmarks/qml/holistic/data/dynamicTargets/DynamicFour.qml diff --git a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicOne.qml b/tests/benchmarks/qml/holistic/data/dynamicTargets/DynamicOne.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicOne.qml rename to tests/benchmarks/qml/holistic/data/dynamicTargets/DynamicOne.qml diff --git a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicThree.qml b/tests/benchmarks/qml/holistic/data/dynamicTargets/DynamicThree.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicThree.qml rename to tests/benchmarks/qml/holistic/data/dynamicTargets/DynamicThree.qml diff --git a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicTwo.qml b/tests/benchmarks/qml/holistic/data/dynamicTargets/DynamicTwo.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicTwo.qml rename to tests/benchmarks/qml/holistic/data/dynamicTargets/DynamicTwo.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Mlbsi.qml b/tests/benchmarks/qml/holistic/data/jsImports/Mlbsi.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/Mlbsi.qml rename to tests/benchmarks/qml/holistic/data/jsImports/Mlbsi.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Mldsi.qml b/tests/benchmarks/qml/holistic/data/jsImports/Mldsi.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/Mldsi.qml rename to tests/benchmarks/qml/holistic/data/jsImports/Mldsi.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Mlsi.qml b/tests/benchmarks/qml/holistic/data/jsImports/Mlsi.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/Mlsi.qml rename to tests/benchmarks/qml/holistic/data/jsImports/Mlsi.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/ModuleBm.qml b/tests/benchmarks/qml/holistic/data/jsImports/ModuleBm.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/ModuleBm.qml rename to tests/benchmarks/qml/holistic/data/jsImports/ModuleBm.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Msbsi.qml b/tests/benchmarks/qml/holistic/data/jsImports/Msbsi.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/Msbsi.qml rename to tests/benchmarks/qml/holistic/data/jsImports/Msbsi.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Msdsi.qml b/tests/benchmarks/qml/holistic/data/jsImports/Msdsi.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/Msdsi.qml rename to tests/benchmarks/qml/holistic/data/jsImports/Msdsi.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Mssi.qml b/tests/benchmarks/qml/holistic/data/jsImports/Mssi.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/Mssi.qml rename to tests/benchmarks/qml/holistic/data/jsImports/Mssi.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/PragmaBm.qml b/tests/benchmarks/qml/holistic/data/jsImports/PragmaBm.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/PragmaBm.qml rename to tests/benchmarks/qml/holistic/data/jsImports/PragmaBm.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/PragmaModuleBm.qml b/tests/benchmarks/qml/holistic/data/jsImports/PragmaModuleBm.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/PragmaModuleBm.qml rename to tests/benchmarks/qml/holistic/data/jsImports/PragmaModuleBm.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Slsi.qml b/tests/benchmarks/qml/holistic/data/jsImports/Slsi.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/Slsi.qml rename to tests/benchmarks/qml/holistic/data/jsImports/Slsi.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Sssi.qml b/tests/benchmarks/qml/holistic/data/jsImports/Sssi.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/Sssi.qml rename to tests/benchmarks/qml/holistic/data/jsImports/Sssi.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi1.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi1.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi1.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi1.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi10.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi10.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi10.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi10.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi11.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi11.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi11.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi11.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi12.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi12.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi12.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi12.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi13.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi13.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi13.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi13.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi14.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi14.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi14.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi14.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi15.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi15.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi15.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi15.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi2.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi2.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi2.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi2.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi3.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi3.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi3.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi3.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi4.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi4.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi4.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi4.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi5.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi5.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi5.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi5.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi6.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi6.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi6.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi6.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi7.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi7.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi7.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi7.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi8.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi8.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi8.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi8.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi9.js b/tests/benchmarks/qml/holistic/data/jsImports/mlbsi9.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlbsi9.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlbsi9.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi1.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi1.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi1.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi1.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi10.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi10.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi10.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi10.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi11.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi11.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi11.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi11.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi12.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi12.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi12.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi12.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi13.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi13.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi13.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi13.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi14.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi14.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi14.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi14.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi15.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi15.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi15.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi15.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi2.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi2.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi2.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi2.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi3.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi3.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi3.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi3.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi4.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi4.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi4.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi4.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi5.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi5.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi5.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi5.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi6.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi6.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi6.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi6.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi7.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi7.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi7.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi7.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi8.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi8.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi8.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi8.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi9.js b/tests/benchmarks/qml/holistic/data/jsImports/mldsi9.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mldsi9.js rename to tests/benchmarks/qml/holistic/data/jsImports/mldsi9.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlsi.js b/tests/benchmarks/qml/holistic/data/jsImports/mlsi.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mlsi.js rename to tests/benchmarks/qml/holistic/data/jsImports/mlsi.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/moduleBm.js b/tests/benchmarks/qml/holistic/data/jsImports/moduleBm.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/moduleBm.js rename to tests/benchmarks/qml/holistic/data/jsImports/moduleBm.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi1.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi1.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi1.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi1.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi10.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi10.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi10.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi10.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi11.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi11.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi11.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi11.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi12.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi12.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi12.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi12.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi13.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi13.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi13.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi13.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi14.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi14.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi14.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi14.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi15.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi15.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi15.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi15.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi2.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi2.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi2.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi2.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi3.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi3.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi3.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi3.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi4.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi4.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi4.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi4.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi5.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi5.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi5.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi5.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi6.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi6.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi6.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi6.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi7.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi7.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi7.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi7.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi8.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi8.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi8.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi8.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi9.js b/tests/benchmarks/qml/holistic/data/jsImports/msbsi9.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msbsi9.js rename to tests/benchmarks/qml/holistic/data/jsImports/msbsi9.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi1.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi1.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi1.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi1.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi10.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi10.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi10.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi10.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi11.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi11.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi11.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi11.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi12.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi12.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi12.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi12.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi13.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi13.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi13.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi13.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi14.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi14.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi14.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi14.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi15.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi15.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi15.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi15.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi2.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi2.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi2.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi2.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi3.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi3.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi3.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi3.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi4.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi4.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi4.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi4.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi5.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi5.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi5.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi5.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi6.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi6.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi6.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi6.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi7.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi7.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi7.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi7.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi8.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi8.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi8.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi8.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi9.js b/tests/benchmarks/qml/holistic/data/jsImports/msdsi9.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/msdsi9.js rename to tests/benchmarks/qml/holistic/data/jsImports/msdsi9.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mssi.js b/tests/benchmarks/qml/holistic/data/jsImports/mssi.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/mssi.js rename to tests/benchmarks/qml/holistic/data/jsImports/mssi.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaBmOne.js b/tests/benchmarks/qml/holistic/data/jsImports/pragmaBmOne.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/pragmaBmOne.js rename to tests/benchmarks/qml/holistic/data/jsImports/pragmaBmOne.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaBmTwo.js b/tests/benchmarks/qml/holistic/data/jsImports/pragmaBmTwo.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/pragmaBmTwo.js rename to tests/benchmarks/qml/holistic/data/jsImports/pragmaBmTwo.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaLib.js b/tests/benchmarks/qml/holistic/data/jsImports/pragmaLib.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/pragmaLib.js rename to tests/benchmarks/qml/holistic/data/jsImports/pragmaLib.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaModuleBm.js b/tests/benchmarks/qml/holistic/data/jsImports/pragmaModuleBm.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/pragmaModuleBm.js rename to tests/benchmarks/qml/holistic/data/jsImports/pragmaModuleBm.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/slsi.js b/tests/benchmarks/qml/holistic/data/jsImports/slsi.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/slsi.js rename to tests/benchmarks/qml/holistic/data/jsImports/slsi.js diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/sssi.js b/tests/benchmarks/qml/holistic/data/jsImports/sssi.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsImports/sssi.js rename to tests/benchmarks/qml/holistic/data/jsImports/sssi.js diff --git a/tests/benchmarks/declarative/holistic/data/jsTargets/JsOne.qml b/tests/benchmarks/qml/holistic/data/jsTargets/JsOne.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsTargets/JsOne.qml rename to tests/benchmarks/qml/holistic/data/jsTargets/JsOne.qml diff --git a/tests/benchmarks/declarative/holistic/data/jsTargets/JsTwo.qml b/tests/benchmarks/qml/holistic/data/jsTargets/JsTwo.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/jsTargets/JsTwo.qml rename to tests/benchmarks/qml/holistic/data/jsTargets/JsTwo.qml diff --git a/tests/benchmarks/declarative/holistic/data/largeTargets/gridview-example.qml b/tests/benchmarks/qml/holistic/data/largeTargets/gridview-example.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/largeTargets/gridview-example.qml rename to tests/benchmarks/qml/holistic/data/largeTargets/gridview-example.qml diff --git a/tests/benchmarks/declarative/holistic/data/largeTargets/layoutdirection.qml b/tests/benchmarks/qml/holistic/data/largeTargets/layoutdirection.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/largeTargets/layoutdirection.qml rename to tests/benchmarks/qml/holistic/data/largeTargets/layoutdirection.qml diff --git a/tests/benchmarks/declarative/holistic/data/largeTargets/mousearea-example.qml b/tests/benchmarks/qml/holistic/data/largeTargets/mousearea-example.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/largeTargets/mousearea-example.qml rename to tests/benchmarks/qml/holistic/data/largeTargets/mousearea-example.qml diff --git a/tests/benchmarks/declarative/holistic/data/resolutionTargets/ResolveOne.qml b/tests/benchmarks/qml/holistic/data/resolutionTargets/ResolveOne.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/resolutionTargets/ResolveOne.qml rename to tests/benchmarks/qml/holistic/data/resolutionTargets/ResolveOne.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/CppToJs.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/CppToJs.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/CppToJs.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/CppToJs.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/CppToQml.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/CppToQml.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/CppToQml.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/CppToQml.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppEight.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppEight.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppEight.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppEight.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppEleven.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppEleven.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppEleven.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppEleven.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppFive.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppFive.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppFive.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppFive.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppFour.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppFour.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppFour.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppFour.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppNine.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppNine.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppNine.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppNine.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppOne.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppOne.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppOne.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppOne.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppSeven.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppSeven.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppSeven.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppSeven.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppSix.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppSix.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppSix.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppSix.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppTen.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppTen.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppTen.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppTen.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppThree.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppThree.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppThree.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppThree.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppTwo.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppTwo.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppTwo.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/JsToCppTwo.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/ScarceOne.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/ScarceOne.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/ScarceOne.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/ScarceOne.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/ScarceTwo.qml b/tests/benchmarks/qml/holistic/data/scopeSwitching/ScarceTwo.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/ScarceTwo.qml rename to tests/benchmarks/qml/holistic/data/scopeSwitching/ScarceTwo.qml diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/cppToJs.js b/tests/benchmarks/qml/holistic/data/scopeSwitching/cppToJs.js similarity index 100% rename from tests/benchmarks/declarative/holistic/data/scopeSwitching/cppToJs.js rename to tests/benchmarks/qml/holistic/data/scopeSwitching/cppToJs.js diff --git a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallFour.qml b/tests/benchmarks/qml/holistic/data/smallTargets/SmallFour.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/smallTargets/SmallFour.qml rename to tests/benchmarks/qml/holistic/data/smallTargets/SmallFour.qml diff --git a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallOne.qml b/tests/benchmarks/qml/holistic/data/smallTargets/SmallOne.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/smallTargets/SmallOne.qml rename to tests/benchmarks/qml/holistic/data/smallTargets/SmallOne.qml diff --git a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallThree.qml b/tests/benchmarks/qml/holistic/data/smallTargets/SmallThree.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/smallTargets/SmallThree.qml rename to tests/benchmarks/qml/holistic/data/smallTargets/SmallThree.qml diff --git a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallTwo.qml b/tests/benchmarks/qml/holistic/data/smallTargets/SmallTwo.qml similarity index 100% rename from tests/benchmarks/declarative/holistic/data/smallTargets/SmallTwo.qml rename to tests/benchmarks/qml/holistic/data/smallTargets/SmallTwo.qml diff --git a/tests/benchmarks/declarative/holistic/holistic.pro b/tests/benchmarks/qml/holistic/holistic.pro similarity index 86% rename from tests/benchmarks/declarative/holistic/holistic.pro rename to tests/benchmarks/qml/holistic/holistic.pro index 586af79275..82f2ef6e4e 100644 --- a/tests/benchmarks/declarative/holistic/holistic.pro +++ b/tests/benchmarks/qml/holistic/holistic.pro @@ -1,7 +1,7 @@ CONFIG += testcase TEMPLATE = app TARGET = tst_holistic -QT += declarative network testlib +QT += qml network testlib macx:CONFIG -= app_bundle CONFIG += release diff --git a/tests/benchmarks/declarative/holistic/testtypes.cpp b/tests/benchmarks/qml/holistic/testtypes.cpp similarity index 92% rename from tests/benchmarks/declarative/holistic/testtypes.cpp rename to tests/benchmarks/qml/holistic/testtypes.cpp index 872a3be7b1..65d3ee8522 100644 --- a/tests/benchmarks/declarative/holistic/testtypes.cpp +++ b/tests/benchmarks/qml/holistic/testtypes.cpp @@ -41,10 +41,10 @@ #include "testtypes.h" #include #include -#include +#include #include -static QScriptValue script_api(QDeclarativeEngine *engine, QScriptEngine *scriptEngine) +static QScriptValue script_api(QQmlEngine *engine, QScriptEngine *scriptEngine) { Q_UNUSED(engine) Q_UNUSED(scriptEngine) @@ -55,7 +55,7 @@ static QScriptValue script_api(QDeclarativeEngine *engine, QScriptEngine *script return v; } -static QObject *qobject_api(QDeclarativeEngine *engine, QScriptEngine *scriptEngine) +static QObject *qobject_api(QQmlEngine *engine, QScriptEngine *scriptEngine) { Q_UNUSED(engine) Q_UNUSED(scriptEngine) @@ -65,7 +65,7 @@ static QObject *qobject_api(QDeclarativeEngine *engine, QScriptEngine *scriptEng return o; } -static QObject *qobject_api_engine_parent(QDeclarativeEngine *engine, QScriptEngine *scriptEngine) +static QObject *qobject_api_engine_parent(QQmlEngine *engine, QScriptEngine *scriptEngine) { Q_UNUSED(scriptEngine) diff --git a/tests/benchmarks/declarative/holistic/testtypes.h b/tests/benchmarks/qml/holistic/testtypes.h similarity index 96% rename from tests/benchmarks/declarative/holistic/testtypes.h rename to tests/benchmarks/qml/holistic/testtypes.h index c3824d2352..66d755d944 100644 --- a/tests/benchmarks/declarative/holistic/testtypes.h +++ b/tests/benchmarks/qml/holistic/testtypes.h @@ -42,11 +42,11 @@ #define TESTTYPES_H #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include @@ -54,8 +54,8 @@ #include #include #include -#include -#include +#include +#include class MyQmlAttachedObject : public QObject { @@ -90,7 +90,7 @@ class MyQmlObject : public QObject Q_PROPERTY(int console READ console CONSTANT) Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty NOTIFY stringChanged) Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty NOTIFY objectChanged) - Q_PROPERTY(QDeclarativeListProperty objectListProperty READ objectListProperty CONSTANT) + Q_PROPERTY(QQmlListProperty objectListProperty READ objectListProperty CONSTANT) Q_PROPERTY(int resettableProperty READ resettableProperty WRITE setResettableProperty RESET resetProperty) Q_PROPERTY(QRegExp regExp READ regExp WRITE setRegExp) Q_PROPERTY(int nonscriptable READ nonscriptable WRITE setNonscriptable SCRIPTABLE false) @@ -121,7 +121,7 @@ class MyQmlObject : public QObject emit objectChanged(); } - QDeclarativeListProperty objectListProperty() { return QDeclarativeListProperty(this, m_objectQList); } + QQmlListProperty objectListProperty() { return QQmlListProperty(this, m_objectQList); } bool methodCalled() const { return m_methodCalled; } bool methodIntCalled() const { return m_methodIntCalled; } diff --git a/tests/benchmarks/declarative/holistic/tst_holistic.cpp b/tests/benchmarks/qml/holistic/tst_holistic.cpp similarity index 96% rename from tests/benchmarks/declarative/holistic/tst_holistic.cpp rename to tests/benchmarks/qml/holistic/tst_holistic.cpp index 6a2aa19804..db8cc1cecb 100644 --- a/tests/benchmarks/declarative/holistic/tst_holistic.cpp +++ b/tests/benchmarks/qml/holistic/tst_holistic.cpp @@ -42,10 +42,10 @@ #include "testtypes.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -122,7 +122,7 @@ private slots: void typeResolution(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; tst_holistic::tst_holistic() @@ -268,7 +268,7 @@ void tst_holistic::compilation() engine.clearComponentCache(); for (int i = 0; i < repetitions; ++i) { for (int j = 0; j < files.size(); ++j) { - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(files.at(j))); + QQmlComponent c(&engine, QUrl::fromLocalFile(files.at(j))); } } } @@ -285,9 +285,9 @@ void tst_holistic::instantiation() Q_ASSERT(files.size() > 0); Q_ASSERT(repetitions > 0); - QList components; + QList components; for (int i = 0; i < files.size(); ++i) { - QDeclarativeComponent *c = new QDeclarativeComponent(&engine, QUrl::fromLocalFile(files.at(i))); + QQmlComponent *c = new QQmlComponent(&engine, QUrl::fromLocalFile(files.at(i))); components.append(c); } @@ -323,7 +323,7 @@ void tst_holistic::creation() engine.clearComponentCache(); for (int i = 0; i < repetitions; ++i) { for (int j = 0; j < files.size(); ++j) { - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(files.at(j))); + QQmlComponent c(&engine, QUrl::fromLocalFile(files.at(j))); QObject *obj = c.create(); delete obj; } @@ -382,7 +382,7 @@ void tst_holistic::dynamicity() QFETCH(QVariant, writeValueTwo); QFETCH(QString, readProperty); - QDeclarativeComponent c(&engine, file); + QQmlComponent c(&engine, file); QObject *obj = c.create(); QVariant readValue; @@ -491,7 +491,7 @@ void tst_holistic::cppToJsDirect() QFETCH(QString, file); QFETCH(QString, methodName); - QDeclarativeComponent c(&engine, file); + QQmlComponent c(&engine, file); QObject *obj = c.create(); QBENCHMARK { @@ -510,11 +510,11 @@ void tst_holistic::cppToJsIndirect() // The benchmark deliberately causes change signals to be emitted (and // modifies the scarce resources) so that the properties are updated. - QDeclarativeComponent c(&engine, QString(SRCDIR + QLatin1String("/data/scopeSwitching/ScarceTwo.qml"))); + QQmlComponent c(&engine, QString(SRCDIR + QLatin1String("/data/scopeSwitching/ScarceTwo.qml"))); QObject *obj = c.create(); ScarceResourceProvider *srp = 0; - srp = qobject_cast(QDeclarativeProperty::read(obj, "a").value()); + srp = qobject_cast(QQmlProperty::read(obj, "a").value()); QBENCHMARK { srp->changeResources(); // will cause small+large scarce resources changed signals to be emitted. @@ -573,7 +573,7 @@ void tst_holistic::typeResolution() Q_ASSERT(propertyNameTwo.size() == propertyValueTwo.size()); Q_ASSERT(repetitions > 0); - QDeclarativeComponent c(&engine, file); + QQmlComponent c(&engine, file); QObject *obj = c.create(); PropertyNameList writeProperty; diff --git a/tests/benchmarks/declarative/javascript/data/NestedIdObject.qml b/tests/benchmarks/qml/javascript/data/NestedIdObject.qml similarity index 100% rename from tests/benchmarks/declarative/javascript/data/NestedIdObject.qml rename to tests/benchmarks/qml/javascript/data/NestedIdObject.qml diff --git a/tests/benchmarks/declarative/javascript/data/intQObjectProperty.qml b/tests/benchmarks/qml/javascript/data/intQObjectProperty.qml similarity index 100% rename from tests/benchmarks/declarative/javascript/data/intQObjectProperty.qml rename to tests/benchmarks/qml/javascript/data/intQObjectProperty.qml diff --git a/tests/benchmarks/declarative/javascript/data/localId.qml b/tests/benchmarks/qml/javascript/data/localId.qml similarity index 100% rename from tests/benchmarks/declarative/javascript/data/localId.qml rename to tests/benchmarks/qml/javascript/data/localId.qml diff --git a/tests/benchmarks/declarative/javascript/data/nestedId.qml b/tests/benchmarks/qml/javascript/data/nestedId.qml similarity index 100% rename from tests/benchmarks/declarative/javascript/data/nestedId.qml rename to tests/benchmarks/qml/javascript/data/nestedId.qml diff --git a/tests/benchmarks/declarative/javascript/data/stringQObjectProperty.qml b/tests/benchmarks/qml/javascript/data/stringQObjectProperty.qml similarity index 100% rename from tests/benchmarks/declarative/javascript/data/stringQObjectProperty.qml rename to tests/benchmarks/qml/javascript/data/stringQObjectProperty.qml diff --git a/tests/benchmarks/declarative/javascript/javascript.pro b/tests/benchmarks/qml/javascript/javascript.pro similarity index 90% rename from tests/benchmarks/declarative/javascript/javascript.pro rename to tests/benchmarks/qml/javascript/javascript.pro index 8026540309..281bbd0069 100644 --- a/tests/benchmarks/declarative/javascript/javascript.pro +++ b/tests/benchmarks/qml/javascript/javascript.pro @@ -1,7 +1,7 @@ CONFIG += testcase TEMPLATE = app TARGET = tst_javascript -QT += declarative testlib +QT += qml testlib macx:CONFIG -= app_bundle SOURCES += tst_javascript.cpp testtypes.cpp diff --git a/tests/benchmarks/declarative/javascript/testtypes.cpp b/tests/benchmarks/qml/javascript/testtypes.cpp similarity index 97% rename from tests/benchmarks/declarative/javascript/testtypes.cpp rename to tests/benchmarks/qml/javascript/testtypes.cpp index 0ba82a495d..43abef2d03 100644 --- a/tests/benchmarks/declarative/javascript/testtypes.cpp +++ b/tests/benchmarks/qml/javascript/testtypes.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "testtypes.h" -#include +#include void registerTypes() { diff --git a/tests/benchmarks/declarative/javascript/testtypes.h b/tests/benchmarks/qml/javascript/testtypes.h similarity index 100% rename from tests/benchmarks/declarative/javascript/testtypes.h rename to tests/benchmarks/qml/javascript/testtypes.h diff --git a/tests/benchmarks/declarative/javascript/tst_javascript.cpp b/tests/benchmarks/qml/javascript/tst_javascript.cpp similarity index 95% rename from tests/benchmarks/declarative/javascript/tst_javascript.cpp rename to tests/benchmarks/qml/javascript/tst_javascript.cpp index f27c7e5b73..d506951b9f 100644 --- a/tests/benchmarks/declarative/javascript/tst_javascript.cpp +++ b/tests/benchmarks/qml/javascript/tst_javascript.cpp @@ -42,8 +42,8 @@ #include #include #include -#include -#include +#include +#include #include "testtypes.h" @@ -60,7 +60,7 @@ private slots: void run(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; tst_javascript::tst_javascript() @@ -98,7 +98,7 @@ void tst_javascript::run() { QFETCH(QString, file); - QDeclarativeComponent c(&engine, file); + QQmlComponent c(&engine, file); if (c.isError()) { qWarning() << c.errors(); diff --git a/tests/benchmarks/declarative/js/js.pro b/tests/benchmarks/qml/js/js.pro similarity index 100% rename from tests/benchmarks/declarative/js/js.pro rename to tests/benchmarks/qml/js/js.pro diff --git a/tests/benchmarks/declarative/js/qjsengine/qjsengine.pro b/tests/benchmarks/qml/js/qjsengine/qjsengine.pro similarity index 78% rename from tests/benchmarks/declarative/js/qjsengine/qjsengine.pro rename to tests/benchmarks/qml/js/qjsengine/qjsengine.pro index f04da8ec95..f8f2874a63 100644 --- a/tests/benchmarks/declarative/js/qjsengine/qjsengine.pro +++ b/tests/benchmarks/qml/js/qjsengine/qjsengine.pro @@ -4,4 +4,4 @@ TARGET = tst_bench_qjsengine SOURCES += tst_qjsengine.cpp -QT += declarative testlib +QT += qml testlib diff --git a/tests/benchmarks/declarative/js/qjsengine/tst_qjsengine.cpp b/tests/benchmarks/qml/js/qjsengine/tst_qjsengine.cpp similarity index 99% rename from tests/benchmarks/declarative/js/qjsengine/tst_qjsengine.cpp rename to tests/benchmarks/qml/js/qjsengine/tst_qjsengine.cpp index c7011e40a0..5713eb2f2e 100644 --- a/tests/benchmarks/declarative/js/qjsengine/tst_qjsengine.cpp +++ b/tests/benchmarks/qml/js/qjsengine/tst_qjsengine.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include -#include -#include +#include +#include Q_DECLARE_METATYPE(QJSValue) diff --git a/tests/benchmarks/declarative/js/qjsvalue/qjsvalue.pro b/tests/benchmarks/qml/js/qjsvalue/qjsvalue.pro similarity index 77% rename from tests/benchmarks/declarative/js/qjsvalue/qjsvalue.pro rename to tests/benchmarks/qml/js/qjsvalue/qjsvalue.pro index 2dc917d3aa..772aa5da8c 100644 --- a/tests/benchmarks/declarative/js/qjsvalue/qjsvalue.pro +++ b/tests/benchmarks/qml/js/qjsvalue/qjsvalue.pro @@ -4,4 +4,4 @@ TARGET = tst_bench_qjsvalue SOURCES += tst_qjsvalue.cpp -QT += declarative testlib +QT += qml testlib diff --git a/tests/benchmarks/declarative/js/qjsvalue/tst_qjsvalue.cpp b/tests/benchmarks/qml/js/qjsvalue/tst_qjsvalue.cpp similarity index 99% rename from tests/benchmarks/declarative/js/qjsvalue/tst_qjsvalue.cpp rename to tests/benchmarks/qml/js/qjsvalue/tst_qjsvalue.cpp index 4c085ab437..6c760f37aa 100644 --- a/tests/benchmarks/declarative/js/qjsvalue/tst_qjsvalue.cpp +++ b/tests/benchmarks/qml/js/qjsvalue/tst_qjsvalue.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include -#include -#include +#include +#include Q_DECLARE_METATYPE(QJSValue) diff --git a/tests/benchmarks/declarative/js/qjsvalueiterator/qjsvalueiterator.pro b/tests/benchmarks/qml/js/qjsvalueiterator/qjsvalueiterator.pro similarity index 78% rename from tests/benchmarks/declarative/js/qjsvalueiterator/qjsvalueiterator.pro rename to tests/benchmarks/qml/js/qjsvalueiterator/qjsvalueiterator.pro index a15ceba9a4..7601789ca9 100644 --- a/tests/benchmarks/declarative/js/qjsvalueiterator/qjsvalueiterator.pro +++ b/tests/benchmarks/qml/js/qjsvalueiterator/qjsvalueiterator.pro @@ -4,4 +4,4 @@ TARGET = tst_bench_qjsvalueiterator SOURCES += tst_qjsvalueiterator.cpp -QT = core declarative testlib +QT = core qml testlib diff --git a/tests/benchmarks/declarative/js/qjsvalueiterator/tst_qjsvalueiterator.cpp b/tests/benchmarks/qml/js/qjsvalueiterator/tst_qjsvalueiterator.cpp similarity index 98% rename from tests/benchmarks/declarative/js/qjsvalueiterator/tst_qjsvalueiterator.cpp rename to tests/benchmarks/qml/js/qjsvalueiterator/tst_qjsvalueiterator.cpp index f8426fbefb..51c6cffd99 100644 --- a/tests/benchmarks/declarative/js/qjsvalueiterator/tst_qjsvalueiterator.cpp +++ b/tests/benchmarks/qml/js/qjsvalueiterator/tst_qjsvalueiterator.cpp @@ -40,9 +40,9 @@ ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include class tst_QJSValueIterator : public QObject { diff --git a/tests/benchmarks/declarative/painting/data/63x63.png b/tests/benchmarks/qml/painting/data/63x63.png similarity index 100% rename from tests/benchmarks/declarative/painting/data/63x63.png rename to tests/benchmarks/qml/painting/data/63x63.png diff --git a/tests/benchmarks/declarative/painting/data/63x63_opaque.png b/tests/benchmarks/qml/painting/data/63x63_opaque.png similarity index 100% rename from tests/benchmarks/declarative/painting/data/63x63_opaque.png rename to tests/benchmarks/qml/painting/data/63x63_opaque.png diff --git a/tests/benchmarks/declarative/painting/data/64x64.png b/tests/benchmarks/qml/painting/data/64x64.png similarity index 100% rename from tests/benchmarks/declarative/painting/data/64x64.png rename to tests/benchmarks/qml/painting/data/64x64.png diff --git a/tests/benchmarks/declarative/painting/data/64x64_opaque.png b/tests/benchmarks/qml/painting/data/64x64_opaque.png similarity index 100% rename from tests/benchmarks/declarative/painting/data/64x64_opaque.png rename to tests/benchmarks/qml/painting/data/64x64_opaque.png diff --git a/tests/benchmarks/declarative/painting/paintbenchmark.cpp b/tests/benchmarks/qml/painting/paintbenchmark.cpp similarity index 100% rename from tests/benchmarks/declarative/painting/paintbenchmark.cpp rename to tests/benchmarks/qml/painting/paintbenchmark.cpp diff --git a/tests/benchmarks/declarative/painting/painting.pro b/tests/benchmarks/qml/painting/painting.pro similarity index 100% rename from tests/benchmarks/declarative/painting/painting.pro rename to tests/benchmarks/qml/painting/painting.pro diff --git a/tests/benchmarks/declarative/pointers/pointers.pro b/tests/benchmarks/qml/pointers/pointers.pro similarity index 81% rename from tests/benchmarks/declarative/pointers/pointers.pro rename to tests/benchmarks/qml/pointers/pointers.pro index d4112f94ec..d2f9729a14 100644 --- a/tests/benchmarks/declarative/pointers/pointers.pro +++ b/tests/benchmarks/qml/pointers/pointers.pro @@ -1,5 +1,5 @@ CONFIG += testcase -QT += declarative testlib +QT += qml testlib TEMPLATE = app TARGET = tst_pointers macx:CONFIG -= app_bundle diff --git a/tests/benchmarks/declarative/pointers/tst_pointers.cpp b/tests/benchmarks/qml/pointers/tst_pointers.cpp similarity index 96% rename from tests/benchmarks/declarative/pointers/tst_pointers.cpp rename to tests/benchmarks/qml/pointers/tst_pointers.cpp index ce81c7f5c9..d65376460a 100644 --- a/tests/benchmarks/declarative/pointers/tst_pointers.cpp +++ b/tests/benchmarks/qml/pointers/tst_pointers.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include -#include "private/qdeclarativeguard_p.h" +#include "private/qqmlguard_p.h" #include class tst_pointers : public QObject @@ -59,7 +59,7 @@ void tst_pointers::qmlguard() { QObject *obj = new QObject; QBENCHMARK { - QDeclarativeGuard guardedObject; + QQmlGuard guardedObject; guardedObject = obj; } } diff --git a/tests/benchmarks/declarative/declarative.pro b/tests/benchmarks/qml/qml.pro similarity index 73% rename from tests/benchmarks/declarative/declarative.pro rename to tests/benchmarks/qml/qml.pro index 820d84b0a2..7a75c69dd1 100644 --- a/tests/benchmarks/declarative/declarative.pro +++ b/tests/benchmarks/qml/qml.pro @@ -6,9 +6,9 @@ SUBDIRS += \ javascript \ holistic \ pointers \ - qdeclarativecomponent \ - qdeclarativeimage \ - qdeclarativemetaproperty \ + qqmlcomponent \ + qqmlimage \ + qqmlmetaproperty \ script \ qmltime \ js diff --git a/tests/benchmarks/declarative/qmltime/example.qml b/tests/benchmarks/qml/qmltime/example.qml similarity index 96% rename from tests/benchmarks/declarative/qmltime/example.qml rename to tests/benchmarks/qml/qmltime/example.qml index f608963930..66c4fdacaa 100644 --- a/tests/benchmarks/declarative/qmltime/example.qml +++ b/tests/benchmarks/qml/qmltime/example.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/qmltime.cpp b/tests/benchmarks/qml/qmltime/qmltime.cpp similarity index 91% rename from tests/benchmarks/declarative/qmltime/qmltime.cpp rename to tests/benchmarks/qml/qmltime/qmltime.cpp index f33b9205e7..7bca7e6544 100644 --- a/tests/benchmarks/declarative/qmltime/qmltime.cpp +++ b/tests/benchmarks/qml/qmltime/qmltime.cpp @@ -38,25 +38,25 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include -#include +#include +#include #include #include #include -#include +#include #include #include class Timer : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeComponent *component READ component WRITE setComponent) + Q_PROPERTY(QQmlComponent *component READ component WRITE setComponent) public: Timer(); - QDeclarativeComponent *component() const; - void setComponent(QDeclarativeComponent *); + QQmlComponent *component() const; + void setComponent(QQmlComponent *); static Timer *timerInstance(); @@ -66,9 +66,9 @@ class Timer : public QObject void setWillParent(bool p); private: - void runTest(QDeclarativeContext *, uint); + void runTest(QQmlContext *, uint); - QDeclarativeComponent *m_component; + QQmlComponent *m_component; static Timer *m_timer; bool m_willparent; @@ -90,12 +90,12 @@ Timer::Timer() m_scene.addItem(&m_item); } -QDeclarativeComponent *Timer::component() const +QQmlComponent *Timer::component() const { return m_component; } -void Timer::setComponent(QDeclarativeComponent *c) +void Timer::setComponent(QQmlComponent *c) { m_component = c; } @@ -107,7 +107,7 @@ Timer *Timer::timerInstance() void Timer::run(uint iterations) { - QDeclarativeContext context(qmlContext(this)); + QQmlContext context(qmlContext(this)); QObject *o = m_component->create(&context); QGraphicsObject *go = qobject_cast(o); @@ -128,7 +128,7 @@ void Timer::setWillParent(bool p) m_willparent = p; } -void Timer::runTest(QDeclarativeContext *context, uint iterations) +void Timer::runTest(QQmlContext *context, uint iterations) { QTime t; t.start(); @@ -249,8 +249,8 @@ int main(int argc, char ** argv) if (filename.isEmpty()) usage(argv[0]); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, filename); + QQmlEngine engine; + QQmlComponent component(&engine, filename); if (component.isError()) { qWarning() << component.errors(); return -1; diff --git a/tests/benchmarks/declarative/qmltime/qmltime.pro b/tests/benchmarks/qml/qmltime/qmltime.pro similarity index 75% rename from tests/benchmarks/declarative/qmltime/qmltime.pro rename to tests/benchmarks/qml/qmltime/qmltime.pro index e1948981bf..6cc6d13b34 100644 --- a/tests/benchmarks/declarative/qmltime/qmltime.pro +++ b/tests/benchmarks/qml/qmltime/qmltime.pro @@ -1,7 +1,7 @@ CONFIG += testcase TEMPLATE = app TARGET = qmltime -QT += declarative widgets testlib +QT += qml widgets testlib macx:CONFIG -= app_bundle SOURCES += qmltime.cpp diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml b/tests/benchmarks/qml/qmltime/tests/anchors/empty.qml similarity index 97% rename from tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml rename to tests/benchmarks/qml/qmltime/tests/anchors/empty.qml index b08b43268c..6ecfb3d48f 100644 --- a/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml +++ b/tests/benchmarks/qml/qmltime/tests/anchors/empty.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml b/tests/benchmarks/qml/qmltime/tests/anchors/fill.qml similarity index 97% rename from tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml rename to tests/benchmarks/qml/qmltime/tests/anchors/fill.qml index a173050427..c2e3b3decb 100644 --- a/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml +++ b/tests/benchmarks/qml/qmltime/tests/anchors/fill.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml b/tests/benchmarks/qml/qmltime/tests/anchors/null.qml similarity index 96% rename from tests/benchmarks/declarative/qmltime/tests/anchors/null.qml rename to tests/benchmarks/qml/qmltime/tests/anchors/null.qml index ea01839e14..677281f162 100644 --- a/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml +++ b/tests/benchmarks/qml/qmltime/tests/anchors/null.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/animation/large.qml b/tests/benchmarks/qml/qmltime/tests/animation/large.qml similarity index 97% rename from tests/benchmarks/declarative/qmltime/tests/animation/large.qml rename to tests/benchmarks/qml/qmltime/tests/animation/large.qml index b58de4955b..16aad5c9ec 100644 --- a/tests/benchmarks/declarative/qmltime/tests/animation/large.qml +++ b/tests/benchmarks/qml/qmltime/tests/animation/large.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml b/tests/benchmarks/qml/qmltime/tests/animation/largeNoProps.qml similarity index 97% rename from tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml rename to tests/benchmarks/qml/qmltime/tests/animation/largeNoProps.qml index fbe4acb8d3..5538182646 100644 --- a/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml +++ b/tests/benchmarks/qml/qmltime/tests/animation/largeNoProps.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml b/tests/benchmarks/qml/qmltime/tests/item_creation/children.qml similarity index 97% rename from tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml rename to tests/benchmarks/qml/qmltime/tests/item_creation/children.qml index 85698d6bf6..4677bb6e72 100644 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml +++ b/tests/benchmarks/qml/qmltime/tests/item_creation/children.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml b/tests/benchmarks/qml/qmltime/tests/item_creation/data.qml similarity index 97% rename from tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml rename to tests/benchmarks/qml/qmltime/tests/item_creation/data.qml index 6a8ca1b968..af54e9c9e9 100644 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml +++ b/tests/benchmarks/qml/qmltime/tests/item_creation/data.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml b/tests/benchmarks/qml/qmltime/tests/item_creation/no_creation.qml similarity index 96% rename from tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml rename to tests/benchmarks/qml/qmltime/tests/item_creation/no_creation.qml index 4dde9f289e..87d61b810e 100644 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml +++ b/tests/benchmarks/qml/qmltime/tests/item_creation/no_creation.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml b/tests/benchmarks/qml/qmltime/tests/item_creation/resources.qml similarity index 97% rename from tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml rename to tests/benchmarks/qml/qmltime/tests/item_creation/resources.qml index 802598839c..029f782ef5 100644 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml +++ b/tests/benchmarks/qml/qmltime/tests/item_creation/resources.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml b/tests/benchmarks/qml/qmltime/tests/loader/Loaded.qml similarity index 96% rename from tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml rename to tests/benchmarks/qml/qmltime/tests/loader/Loaded.qml index d5d22f948c..1310115c43 100644 --- a/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml +++ b/tests/benchmarks/qml/qmltime/tests/loader/Loaded.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml b/tests/benchmarks/qml/qmltime/tests/loader/component_loader.qml similarity index 96% rename from tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml rename to tests/benchmarks/qml/qmltime/tests/loader/component_loader.qml index ab42dfb2f9..bed709991e 100644 --- a/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml +++ b/tests/benchmarks/qml/qmltime/tests/loader/component_loader.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml b/tests/benchmarks/qml/qmltime/tests/loader/empty_loader.qml similarity index 96% rename from tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml rename to tests/benchmarks/qml/qmltime/tests/loader/empty_loader.qml index c32ca2e61b..a25cbb8f45 100644 --- a/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml +++ b/tests/benchmarks/qml/qmltime/tests/loader/empty_loader.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml b/tests/benchmarks/qml/qmltime/tests/loader/no_loader.qml similarity index 96% rename from tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml rename to tests/benchmarks/qml/qmltime/tests/loader/no_loader.qml index dff5f11f99..ae2ad3e60e 100644 --- a/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml +++ b/tests/benchmarks/qml/qmltime/tests/loader/no_loader.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml b/tests/benchmarks/qml/qmltime/tests/loader/source_loader.qml similarity index 96% rename from tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml rename to tests/benchmarks/qml/qmltime/tests/loader/source_loader.qml index 6b16afc1c4..a077f448d5 100644 --- a/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml +++ b/tests/benchmarks/qml/qmltime/tests/loader/source_loader.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml b/tests/benchmarks/qml/qmltime/tests/positioner_creation/no_positioner.qml similarity index 97% rename from tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml rename to tests/benchmarks/qml/qmltime/tests/positioner_creation/no_positioner.qml index e9f13e9deb..0377a8e1a2 100644 --- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml +++ b/tests/benchmarks/qml/qmltime/tests/positioner_creation/no_positioner.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml b/tests/benchmarks/qml/qmltime/tests/positioner_creation/null_positioner.qml similarity index 97% rename from tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml rename to tests/benchmarks/qml/qmltime/tests/positioner_creation/null_positioner.qml index d50da90764..e9fc2c06ec 100644 --- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml +++ b/tests/benchmarks/qml/qmltime/tests/positioner_creation/null_positioner.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml b/tests/benchmarks/qml/qmltime/tests/positioner_creation/positioner.qml similarity index 97% rename from tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml rename to tests/benchmarks/qml/qmltime/tests/positioner_creation/positioner.qml index 8f7814be6a..3a5daec0a5 100644 --- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml +++ b/tests/benchmarks/qml/qmltime/tests/positioner_creation/positioner.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml b/tests/benchmarks/qml/qmltime/tests/vmemetaobject/null.qml similarity index 96% rename from tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml rename to tests/benchmarks/qml/qmltime/tests/vmemetaobject/null.qml index 34d6b30670..c283261dd5 100644 --- a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml +++ b/tests/benchmarks/qml/qmltime/tests/vmemetaobject/null.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml b/tests/benchmarks/qml/qmltime/tests/vmemetaobject/property.qml similarity index 96% rename from tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml rename to tests/benchmarks/qml/qmltime/tests/vmemetaobject/property.qml index 4dd63bb36e..4722150d98 100644 --- a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml +++ b/tests/benchmarks/qml/qmltime/tests/vmemetaobject/property.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject.qml b/tests/benchmarks/qml/qqmlcomponent/data/myqmlobject.qml similarity index 96% rename from tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject.qml rename to tests/benchmarks/qml/qqmlcomponent/data/myqmlobject.qml index a7db476f70..4c7e48fc7c 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject.qml +++ b/tests/benchmarks/qml/qqmlcomponent/data/myqmlobject.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject_binding.qml b/tests/benchmarks/qml/qqmlcomponent/data/myqmlobject_binding.qml similarity index 96% rename from tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject_binding.qml rename to tests/benchmarks/qml/qqmlcomponent/data/myqmlobject_binding.qml index a8add75aee..918f93c30e 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject_binding.qml +++ b/tests/benchmarks/qml/qqmlcomponent/data/myqmlobject_binding.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml b/tests/benchmarks/qml/qqmlcomponent/data/object.qml similarity index 96% rename from tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml rename to tests/benchmarks/qml/qqmlcomponent/data/object.qml index 91371c80d6..726871b8ea 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml +++ b/tests/benchmarks/qml/qqmlcomponent/data/object.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml b/tests/benchmarks/qml/qqmlcomponent/data/object_id.qml similarity index 96% rename from tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml rename to tests/benchmarks/qml/qqmlcomponent/data/object_id.qml index 240f27b4ac..eb99567717 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml +++ b/tests/benchmarks/qml/qqmlcomponent/data/object_id.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml b/tests/benchmarks/qml/qqmlcomponent/data/samegame/BoomBlock.qml similarity index 98% rename from tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml rename to tests/benchmarks/qml/qqmlcomponent/data/samegame/BoomBlock.qml index dbe9e99260..5678fa400e 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml +++ b/tests/benchmarks/qml/qqmlcomponent/data/samegame/BoomBlock.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStone.png b/tests/benchmarks/qml/qqmlcomponent/data/samegame/pics/blueStone.png similarity index 100% rename from tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStone.png rename to tests/benchmarks/qml/qqmlcomponent/data/samegame/pics/blueStone.png diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStone.png b/tests/benchmarks/qml/qqmlcomponent/data/samegame/pics/greenStone.png similarity index 100% rename from tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStone.png rename to tests/benchmarks/qml/qqmlcomponent/data/samegame/pics/greenStone.png diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStone.png b/tests/benchmarks/qml/qqmlcomponent/data/samegame/pics/redStone.png similarity index 100% rename from tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStone.png rename to tests/benchmarks/qml/qqmlcomponent/data/samegame/pics/redStone.png diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/yellowStone.png b/tests/benchmarks/qml/qqmlcomponent/data/samegame/pics/yellowStone.png similarity index 100% rename from tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/yellowStone.png rename to tests/benchmarks/qml/qqmlcomponent/data/samegame/pics/yellowStone.png diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml b/tests/benchmarks/qml/qqmlcomponent/data/synthesized_properties.2.qml similarity index 96% rename from tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml rename to tests/benchmarks/qml/qqmlcomponent/data/synthesized_properties.2.qml index 3a86c48af1..ec987defb3 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml +++ b/tests/benchmarks/qml/qqmlcomponent/data/synthesized_properties.2.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml b/tests/benchmarks/qml/qqmlcomponent/data/synthesized_properties.qml similarity index 96% rename from tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml rename to tests/benchmarks/qml/qqmlcomponent/data/synthesized_properties.qml index 9d4dc03c82..397efae5f8 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml +++ b/tests/benchmarks/qml/qqmlcomponent/data/synthesized_properties.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/benchmarks/qml/qqmlcomponent/qqmlcomponent.pro similarity index 58% rename from tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro rename to tests/benchmarks/qml/qqmlcomponent/qqmlcomponent.pro index 0d415db8ba..ba41f5a95b 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro +++ b/tests/benchmarks/qml/qqmlcomponent/qqmlcomponent.pro @@ -1,10 +1,10 @@ CONFIG += testcase TEMPLATE = app -TARGET = tst_qdeclarativecomponent -QT += declarative testlib +TARGET = tst_qqmlcomponent +QT += qml testlib macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativecomponent.cpp testtypes.cpp +SOURCES += tst_qqmlcomponent.cpp testtypes.cpp HEADERS += testtypes.h # Define SRCDIR equal to test's source directory diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.cpp b/tests/benchmarks/qml/qqmlcomponent/testtypes.cpp similarity index 100% rename from tests/benchmarks/declarative/qdeclarativecomponent/testtypes.cpp rename to tests/benchmarks/qml/qqmlcomponent/testtypes.cpp diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h b/tests/benchmarks/qml/qqmlcomponent/testtypes.h similarity index 92% rename from tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h rename to tests/benchmarks/qml/qqmlcomponent/testtypes.h index 1c99842e33..03542ca24c 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h +++ b/tests/benchmarks/qml/qqmlcomponent/testtypes.h @@ -42,7 +42,7 @@ #define TESTTYPES_H #include -#include +#include class MyQmlObject : public QObject { @@ -50,7 +50,7 @@ class MyQmlObject : public QObject Q_PROPERTY(int result READ result WRITE setResult) Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged) Q_PROPERTY(MyQmlObject *object READ object WRITE setObject NOTIFY objectChanged) - Q_PROPERTY(QDeclarativeListProperty data READ data) + Q_PROPERTY(QQmlListProperty data READ data) Q_CLASSINFO("DefaultProperty", "data") public: MyQmlObject() : m_result(0), m_value(0), m_object(0) {} @@ -61,7 +61,7 @@ class MyQmlObject : public QObject int value() const { return m_value; } void setValue(int v) { m_value = v; emit valueChanged(); } - QDeclarativeListProperty data() { return QDeclarativeListProperty(this, m_data); } + QQmlListProperty data() { return QQmlListProperty(this, m_data); } MyQmlObject *object() const { return m_object; } void setObject(MyQmlObject *o) { m_object = o; emit objectChanged(); } diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/benchmarks/qml/qqmlcomponent/tst_qqmlcomponent.cpp similarity index 94% rename from tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp rename to tests/benchmarks/qml/qqmlcomponent/tst_qqmlcomponent.cpp index d20126b132..47b7455a94 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp +++ b/tests/benchmarks/qml/qqmlcomponent/tst_qqmlcomponent.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include -#include -#include +#include +#include #include #include #include "testtypes.h" @@ -63,7 +63,7 @@ private slots: void creation(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; tst_qmlcomponent::tst_qmlcomponent() @@ -100,7 +100,7 @@ void tst_qmlcomponent::creation() { QFETCH(QString, file); - QDeclarativeComponent c(&engine, file); + QQmlComponent c(&engine, file); QVERIFY(c.isReady()); QObject *obj = c.create(); @@ -113,4 +113,4 @@ void tst_qmlcomponent::creation() } QTEST_MAIN(tst_qmlcomponent) -#include "tst_qdeclarativecomponent.moc" +#include "tst_qqmlcomponent.moc" diff --git a/tests/benchmarks/qml/qqmldebugtrace/qqmldebugtrace.pro b/tests/benchmarks/qml/qqmldebugtrace/qqmldebugtrace.pro new file mode 100644 index 0000000000..ebf0ae074f --- /dev/null +++ b/tests/benchmarks/qml/qqmldebugtrace/qqmldebugtrace.pro @@ -0,0 +1,8 @@ +CONFIG += testcase +QT += qml testlib +TEMPLATE = app +TARGET = tst_qqmldebugtrace +macx:CONFIG -= app_bundle + +SOURCES += tst_qqmldebugtrace.cpp + diff --git a/tests/benchmarks/declarative/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp b/tests/benchmarks/qml/qqmldebugtrace/tst_qqmldebugtrace.cpp similarity index 87% rename from tests/benchmarks/declarative/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp rename to tests/benchmarks/qml/qqmldebugtrace/tst_qqmldebugtrace.cpp index a8ac44a008..36144f6a76 100644 --- a/tests/benchmarks/declarative/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp +++ b/tests/benchmarks/qml/qqmldebugtrace/tst_qqmldebugtrace.cpp @@ -43,12 +43,12 @@ #include #include -class tst_qdeclarativedebugtrace : public QObject +class tst_qqmldebugtrace : public QObject { Q_OBJECT public: - tst_qdeclarativedebugtrace() {} + tst_qqmldebugtrace() {} private slots: void all(); @@ -57,7 +57,7 @@ private slots: void trace(); }; -void tst_qdeclarativedebugtrace::all() +void tst_qqmldebugtrace::all() { QBENCHMARK { QElapsedTimer t; @@ -66,7 +66,7 @@ void tst_qdeclarativedebugtrace::all() } } -void tst_qdeclarativedebugtrace::startElapsed() +void tst_qqmldebugtrace::startElapsed() { QElapsedTimer t; QBENCHMARK { @@ -75,7 +75,7 @@ void tst_qdeclarativedebugtrace::startElapsed() } } -void tst_qdeclarativedebugtrace::doubleElapsed() +void tst_qqmldebugtrace::doubleElapsed() { QElapsedTimer t; t.start(); @@ -85,7 +85,7 @@ void tst_qdeclarativedebugtrace::doubleElapsed() } } -void tst_qdeclarativedebugtrace::trace() +void tst_qqmldebugtrace::trace() { QString s("A decent sized string of text here."); QBENCHMARK { @@ -95,6 +95,6 @@ void tst_qdeclarativedebugtrace::trace() } } -QTEST_MAIN(tst_qdeclarativedebugtrace) +QTEST_MAIN(tst_qqmldebugtrace) -#include "tst_qdeclarativedebugtrace.moc" +#include "tst_qqmldebugtrace.moc" diff --git a/tests/benchmarks/declarative/qdeclarativeimage/image.png b/tests/benchmarks/qml/qqmlimage/image.png similarity index 100% rename from tests/benchmarks/declarative/qdeclarativeimage/image.png rename to tests/benchmarks/qml/qqmlimage/image.png diff --git a/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/benchmarks/qml/qqmlimage/qqmlimage.pro similarity index 54% rename from tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro rename to tests/benchmarks/qml/qqmlimage/qqmlimage.pro index 6a46e8f40c..21d3efdd1f 100644 --- a/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro +++ b/tests/benchmarks/qml/qqmlimage/qqmlimage.pro @@ -1,11 +1,11 @@ CONFIG += testcase TEMPLATE = app -TARGET = tst_qdeclarativeimage -QT += declarative testlib +TARGET = tst_qqmlimage +QT += qml quick-private testlib macx:CONFIG -= app_bundle CONFIG += release -SOURCES += tst_qdeclarativeimage.cpp +SOURCES += tst_qqmlimage.cpp DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp similarity index 79% rename from tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp rename to tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp index fcebd35671..ec872b881a 100644 --- a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp @@ -40,9 +40,9 @@ ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include class tst_qmlgraphicsimage : public QObject { @@ -56,7 +56,7 @@ private slots: void qmlgraphicsimage_url(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; void tst_qmlgraphicsimage::qmlgraphicsimage() @@ -65,8 +65,8 @@ void tst_qmlgraphicsimage::qmlgraphicsimage() QUrl url(SRCDIR "/image.png"); QBENCHMARK { QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); - QDeclarativeImage *image = new QDeclarativeImage; - QDeclarativeEngine::setContextForObject(image, engine.rootContext()); + QQuickImage *image = new QQuickImage; + QQmlEngine::setContextForObject(image, engine.rootContext()); delete image; } } @@ -77,14 +77,14 @@ void tst_qmlgraphicsimage::qmlgraphicsimage_file() QUrl url(SRCDIR "/image.png"); //get rid of initialization effects { - QDeclarativeImage *image = new QDeclarativeImage; - QDeclarativeEngine::setContextForObject(image, engine.rootContext()); + QQuickImage *image = new QQuickImage; + QQmlEngine::setContextForObject(image, engine.rootContext()); image->setSource(url); } QBENCHMARK { QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); - QDeclarativeImage *image = new QDeclarativeImage; - QDeclarativeEngine::setContextForObject(image, engine.rootContext()); + QQuickImage *image = new QQuickImage; + QQmlEngine::setContextForObject(image, engine.rootContext()); image->setSource(url); delete image; } @@ -96,8 +96,8 @@ void tst_qmlgraphicsimage::qmlgraphicsimage_url() QUrl url(SRCDIR "/image.png"); QBENCHMARK { QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); - QDeclarativeImage *image = new QDeclarativeImage; - QDeclarativeEngine::setContextForObject(image, engine.rootContext()); + QQuickImage *image = new QQuickImage; + QQmlEngine::setContextForObject(image, engine.rootContext()); image->setSource(url2); delete image; } @@ -105,4 +105,4 @@ void tst_qmlgraphicsimage::qmlgraphicsimage_url() QTEST_MAIN(tst_qmlgraphicsimage) -#include "tst_qdeclarativeimage.moc" +#include "tst_qqmlimage.moc" diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml b/tests/benchmarks/qml/qqmlmetaproperty/data/object.qml similarity index 96% rename from tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml rename to tests/benchmarks/qml/qqmlmetaproperty/data/object.qml index c386df72a3..47c0442d29 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml +++ b/tests/benchmarks/qml/qqmlmetaproperty/data/object.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml b/tests/benchmarks/qml/qqmlmetaproperty/data/synthesized_object.qml similarity index 96% rename from tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml rename to tests/benchmarks/qml/qqmlmetaproperty/data/synthesized_object.qml index 6eec87aea1..a4609cb6e0 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml +++ b/tests/benchmarks/qml/qqmlmetaproperty/data/synthesized_object.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro b/tests/benchmarks/qml/qqmlmetaproperty/qqmlmetaproperty.pro similarity index 56% rename from tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro rename to tests/benchmarks/qml/qqmlmetaproperty/qqmlmetaproperty.pro index 1ac0bb240a..9d507e9581 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro +++ b/tests/benchmarks/qml/qqmlmetaproperty/qqmlmetaproperty.pro @@ -1,10 +1,10 @@ CONFIG += testcase TEMPLATE = app -TARGET = tst_qdeclarativemetaproperty -QT += declarative testlib +TARGET = tst_qqmlmetaproperty +QT += qml testlib macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativemetaproperty.cpp +SOURCES += tst_qqmlmetaproperty.cpp # Define SRCDIR equal to test's source directory DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp b/tests/benchmarks/qml/qqmlmetaproperty/tst_qqmlmetaproperty.cpp similarity index 91% rename from tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp rename to tests/benchmarks/qml/qqmlmetaproperty/tst_qqmlmetaproperty.cpp index 7726c051ac..216d603da8 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp +++ b/tests/benchmarks/qml/qqmlmetaproperty/tst_qqmlmetaproperty.cpp @@ -40,9 +40,9 @@ ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include #include #include @@ -63,7 +63,7 @@ private slots: void lookup(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; tst_qmlmetaproperty::tst_qmlmetaproperty() @@ -94,17 +94,17 @@ void tst_qmlmetaproperty::lookup() { QFETCH(QString, file); - QDeclarativeComponent c(&engine, file); + QQmlComponent c(&engine, file); QVERIFY(c.isReady()); QObject *obj = c.create(); QBENCHMARK { - QDeclarativeProperty p(obj, "x"); + QQmlProperty p(obj, "x"); } delete obj; } QTEST_MAIN(tst_qmlmetaproperty) -#include "tst_qdeclarativemetaproperty.moc" +#include "tst_qqmlmetaproperty.moc" diff --git a/tests/benchmarks/declarative/script/data/CustomObject.qml b/tests/benchmarks/qml/script/data/CustomObject.qml similarity index 96% rename from tests/benchmarks/declarative/script/data/CustomObject.qml rename to tests/benchmarks/qml/script/data/CustomObject.qml index 7c8c561114..485f8a1354 100644 --- a/tests/benchmarks/declarative/script/data/CustomObject.qml +++ b/tests/benchmarks/qml/script/data/CustomObject.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/script/data/block.qml b/tests/benchmarks/qml/script/data/block.qml similarity index 97% rename from tests/benchmarks/declarative/script/data/block.qml rename to tests/benchmarks/qml/script/data/block.qml index 67ad5cbed2..3816b9f64b 100644 --- a/tests/benchmarks/declarative/script/data/block.qml +++ b/tests/benchmarks/qml/script/data/block.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/script/data/enums.qml b/tests/benchmarks/qml/script/data/enums.qml similarity index 100% rename from tests/benchmarks/declarative/script/data/enums.qml rename to tests/benchmarks/qml/script/data/enums.qml diff --git a/tests/benchmarks/declarative/script/data/global.js b/tests/benchmarks/qml/script/data/global.js similarity index 100% rename from tests/benchmarks/declarative/script/data/global.js rename to tests/benchmarks/qml/script/data/global.js diff --git a/tests/benchmarks/declarative/script/data/global_prop.qml b/tests/benchmarks/qml/script/data/global_prop.qml similarity index 100% rename from tests/benchmarks/declarative/script/data/global_prop.qml rename to tests/benchmarks/qml/script/data/global_prop.qml diff --git a/tests/benchmarks/declarative/script/data/namespacedEnums.qml b/tests/benchmarks/qml/script/data/namespacedEnums.qml similarity index 100% rename from tests/benchmarks/declarative/script/data/namespacedEnums.qml rename to tests/benchmarks/qml/script/data/namespacedEnums.qml diff --git a/tests/benchmarks/declarative/script/data/script.js b/tests/benchmarks/qml/script/data/script.js similarity index 100% rename from tests/benchmarks/declarative/script/data/script.js rename to tests/benchmarks/qml/script/data/script.js diff --git a/tests/benchmarks/declarative/script/data/script2.js b/tests/benchmarks/qml/script/data/script2.js similarity index 100% rename from tests/benchmarks/declarative/script/data/script2.js rename to tests/benchmarks/qml/script/data/script2.js diff --git a/tests/benchmarks/declarative/script/data/scriptCall.qml b/tests/benchmarks/qml/script/data/scriptCall.qml similarity index 100% rename from tests/benchmarks/declarative/script/data/scriptCall.qml rename to tests/benchmarks/qml/script/data/scriptCall.qml diff --git a/tests/benchmarks/declarative/script/data/signal_args.qml b/tests/benchmarks/qml/script/data/signal_args.qml similarity index 96% rename from tests/benchmarks/declarative/script/data/signal_args.qml rename to tests/benchmarks/qml/script/data/signal_args.qml index ed5c56a197..757ac1a1f9 100644 --- a/tests/benchmarks/declarative/script/data/signal_args.qml +++ b/tests/benchmarks/qml/script/data/signal_args.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/script/data/signal_qml.qml b/tests/benchmarks/qml/script/data/signal_qml.qml similarity index 96% rename from tests/benchmarks/declarative/script/data/signal_qml.qml rename to tests/benchmarks/qml/script/data/signal_qml.qml index c5bda7d18e..c7314a6b1e 100644 --- a/tests/benchmarks/declarative/script/data/signal_qml.qml +++ b/tests/benchmarks/qml/script/data/signal_qml.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/script/data/signal_unconnected.qml b/tests/benchmarks/qml/script/data/signal_unconnected.qml similarity index 96% rename from tests/benchmarks/declarative/script/data/signal_unconnected.qml rename to tests/benchmarks/qml/script/data/signal_unconnected.qml index 90fe2bc6f5..a33942dd2d 100644 --- a/tests/benchmarks/declarative/script/data/signal_unconnected.qml +++ b/tests/benchmarks/qml/script/data/signal_unconnected.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/script/data/signal_unusedArgs.qml b/tests/benchmarks/qml/script/data/signal_unusedArgs.qml similarity index 96% rename from tests/benchmarks/declarative/script/data/signal_unusedArgs.qml rename to tests/benchmarks/qml/script/data/signal_unusedArgs.qml index 6de5815939..52b4e1a54f 100644 --- a/tests/benchmarks/declarative/script/data/signal_unusedArgs.qml +++ b/tests/benchmarks/qml/script/data/signal_unusedArgs.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/script/data/slot_complex.qml b/tests/benchmarks/qml/script/data/slot_complex.qml similarity index 96% rename from tests/benchmarks/declarative/script/data/slot_complex.qml rename to tests/benchmarks/qml/script/data/slot_complex.qml index 8e2cb30089..4763146c65 100644 --- a/tests/benchmarks/declarative/script/data/slot_complex.qml +++ b/tests/benchmarks/qml/script/data/slot_complex.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/script/data/slot_complex_js.js b/tests/benchmarks/qml/script/data/slot_complex_js.js similarity index 100% rename from tests/benchmarks/declarative/script/data/slot_complex_js.js rename to tests/benchmarks/qml/script/data/slot_complex_js.js diff --git a/tests/benchmarks/declarative/script/data/slot_complex_js.qml b/tests/benchmarks/qml/script/data/slot_complex_js.qml similarity index 96% rename from tests/benchmarks/declarative/script/data/slot_complex_js.qml rename to tests/benchmarks/qml/script/data/slot_complex_js.qml index ca06046389..e44fc73f8e 100644 --- a/tests/benchmarks/declarative/script/data/slot_complex_js.qml +++ b/tests/benchmarks/qml/script/data/slot_complex_js.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/script/data/slot_simple.qml b/tests/benchmarks/qml/script/data/slot_simple.qml similarity index 96% rename from tests/benchmarks/declarative/script/data/slot_simple.qml rename to tests/benchmarks/qml/script/data/slot_simple.qml index c93fbcc757..b788970d12 100644 --- a/tests/benchmarks/declarative/script/data/slot_simple.qml +++ b/tests/benchmarks/qml/script/data/slot_simple.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/script/data/slot_simple_js.js b/tests/benchmarks/qml/script/data/slot_simple_js.js similarity index 100% rename from tests/benchmarks/declarative/script/data/slot_simple_js.js rename to tests/benchmarks/qml/script/data/slot_simple_js.js diff --git a/tests/benchmarks/declarative/script/data/slot_simple_js.qml b/tests/benchmarks/qml/script/data/slot_simple_js.qml similarity index 96% rename from tests/benchmarks/declarative/script/data/slot_simple_js.qml rename to tests/benchmarks/qml/script/data/slot_simple_js.qml index 07334ab4fa..5af1b0868f 100644 --- a/tests/benchmarks/declarative/script/data/slot_simple_js.qml +++ b/tests/benchmarks/qml/script/data/slot_simple_js.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/script/script.pro b/tests/benchmarks/qml/script/script.pro similarity index 74% rename from tests/benchmarks/declarative/script/script.pro rename to tests/benchmarks/qml/script/script.pro index 310d17d3c9..88e8d9b33d 100644 --- a/tests/benchmarks/declarative/script/script.pro +++ b/tests/benchmarks/qml/script/script.pro @@ -1,7 +1,7 @@ CONFIG += testcase TEMPLATE = app TARGET = tst_script -QT += declarative testlib +QT += qml qml-private testlib v8-private core-private macx:CONFIG -= app_bundle CONFIG += release diff --git a/tests/benchmarks/declarative/script/tst_script.cpp b/tests/benchmarks/qml/script/tst_script.cpp similarity index 85% rename from tests/benchmarks/declarative/script/tst_script.cpp rename to tests/benchmarks/qml/script/tst_script.cpp index 0e5d782134..204fb945eb 100644 --- a/tests/benchmarks/declarative/script/tst_script.cpp +++ b/tests/benchmarks/qml/script/tst_script.cpp @@ -40,11 +40,11 @@ ****************************************************************************/ #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include @@ -309,12 +309,12 @@ void tst_script::property_qobject() void tst_script::property_qmlobject() { - QDeclarativeEngine qmlengine; + QQmlEngine qmlengine; - QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine); + QScriptEngine *engine = QQmlEnginePrivate::getScriptEngine(&qmlengine); TestObject to; - QScriptValue v = QDeclarativeEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); + QScriptValue v = QQmlEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); QScriptValueList args; args << v; @@ -352,12 +352,12 @@ void tst_script::setproperty_js() void tst_script::setproperty_qmlobject() { - QDeclarativeEngine qmlengine; + QQmlEngine qmlengine; - QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine); + QScriptEngine *engine = QQmlEnginePrivate::getScriptEngine(&qmlengine); TestObject to; - QScriptValue v = QDeclarativeEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); + QScriptValue v = QQmlEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); QScriptValueList args; args << v; @@ -436,12 +436,12 @@ void tst_script::function_qobject() void tst_script::function_qmlobject() { - QDeclarativeEngine qmlengine; + QQmlEngine qmlengine; - QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine); + QScriptEngine *engine = QQmlEnginePrivate::getScriptEngine(&qmlengine); TestObject to; - QScriptValue v = QDeclarativeEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); + QScriptValue v = QQmlEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); QScriptValueList args; args << v; @@ -520,12 +520,12 @@ void tst_script::function_args_qobject() void tst_script::function_args_qmlobject() { - QDeclarativeEngine qmlengine; + QQmlEngine qmlengine; - QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine); + QScriptEngine *engine = QQmlEnginePrivate::getScriptEngine(&qmlengine); TestObject to; - QScriptValue v = QDeclarativeEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); + QScriptValue v = QQmlEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); QScriptValueList args; args << v; @@ -539,8 +539,8 @@ void tst_script::function_args_qmlobject() void tst_script::signal_unconnected() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("signal_unconnected.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("signal_unconnected.qml")); TestObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -553,8 +553,8 @@ void tst_script::signal_unconnected() void tst_script::signal_qml() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("signal_qml.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("signal_qml.qml")); TestObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -567,8 +567,8 @@ void tst_script::signal_qml() void tst_script::signal_args() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("signal_args.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("signal_args.qml")); TestObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -581,8 +581,8 @@ void tst_script::signal_args() void tst_script::signal_unusedArgs() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("signal_unusedArgs.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("signal_unusedArgs.qml")); TestObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -595,8 +595,8 @@ void tst_script::signal_unusedArgs() void tst_script::slot_simple() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("slot_simple.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("slot_simple.qml")); TestObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -609,8 +609,8 @@ void tst_script::slot_simple() void tst_script::slot_simple_js() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("slot_simple_js.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("slot_simple_js.qml")); TestObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -623,8 +623,8 @@ void tst_script::slot_simple_js() void tst_script::slot_complex() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("slot_complex.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("slot_complex.qml")); TestObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -637,8 +637,8 @@ void tst_script::slot_complex() void tst_script::slot_complex_js() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("slot_complex_js.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("slot_complex_js.qml")); TestObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -660,9 +660,9 @@ void tst_script::block_data() void tst_script::block() { QFETCH(QString, methodName); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("block.qml")); - QDeclarativeRectangle *rect = qobject_cast(component.create()); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("block.qml")); + QQuickRectangle *rect = qobject_cast(component.create()); QVERIFY(rect != 0); int index = rect->metaObject()->indexOfMethod(methodName.toUtf8()); @@ -697,9 +697,9 @@ void tst_script::global_property_js() void tst_script::global_property_qml() { - QDeclarativeEngine qmlengine; + QQmlEngine qmlengine; - QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine); + QScriptEngine *engine = QQmlEnginePrivate::getScriptEngine(&qmlengine); QScriptValue prog = engine->evaluate(GLOBALPROPERTY_PROGRAM); prog.call(); @@ -710,9 +710,9 @@ void tst_script::global_property_qml() void tst_script::global_property_qml_js() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("global_prop.qml")); - QDeclarativeRectangle *rect = qobject_cast(component.create()); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("global_prop.qml")); + QQuickRectangle *rect = qobject_cast(component.create()); QVERIFY(rect != 0); int index = rect->metaObject()->indexOfMethod("triggered()"); @@ -728,9 +728,9 @@ void tst_script::global_property_qml_js() void tst_script::scriptfile_property() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("global_prop.qml")); - QDeclarativeRectangle *rect = qobject_cast(component.create()); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("global_prop.qml")); + QQuickRectangle *rect = qobject_cast(component.create()); QVERIFY(rect != 0); int index = rect->metaObject()->indexOfMethod("incrementTriggered()"); @@ -746,8 +746,8 @@ void tst_script::scriptfile_property() void tst_script::enums() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("enums.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("enums.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -764,8 +764,8 @@ void tst_script::enums() void tst_script::namespacedEnums() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("namespacedEnums.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("namespacedEnums.qml")); QObject *o = component.create(); QVERIFY(o != 0); @@ -782,8 +782,8 @@ void tst_script::namespacedEnums() void tst_script::scriptCall() { - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("scriptCall.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, TEST_FILE("scriptCall.qml")); QObject *o = component.create(); QVERIFY(o != 0); diff --git a/tests/benchmarks/declarative/typeimports/data/QmlTestType1.qml b/tests/benchmarks/qml/typeimports/data/QmlTestType1.qml similarity index 96% rename from tests/benchmarks/declarative/typeimports/data/QmlTestType1.qml rename to tests/benchmarks/qml/typeimports/data/QmlTestType1.qml index 47467a64a6..eb1ae13881 100644 --- a/tests/benchmarks/declarative/typeimports/data/QmlTestType1.qml +++ b/tests/benchmarks/qml/typeimports/data/QmlTestType1.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/typeimports/data/QmlTestType2.qml b/tests/benchmarks/qml/typeimports/data/QmlTestType2.qml similarity index 96% rename from tests/benchmarks/declarative/typeimports/data/QmlTestType2.qml rename to tests/benchmarks/qml/typeimports/data/QmlTestType2.qml index 2547d44ec0..f6801cddef 100644 --- a/tests/benchmarks/declarative/typeimports/data/QmlTestType2.qml +++ b/tests/benchmarks/qml/typeimports/data/QmlTestType2.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/typeimports/data/QmlTestType3.qml b/tests/benchmarks/qml/typeimports/data/QmlTestType3.qml similarity index 96% rename from tests/benchmarks/declarative/typeimports/data/QmlTestType3.qml rename to tests/benchmarks/qml/typeimports/data/QmlTestType3.qml index b07f70a802..21ade835ec 100644 --- a/tests/benchmarks/declarative/typeimports/data/QmlTestType3.qml +++ b/tests/benchmarks/qml/typeimports/data/QmlTestType3.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/typeimports/data/QmlTestType4.qml b/tests/benchmarks/qml/typeimports/data/QmlTestType4.qml similarity index 96% rename from tests/benchmarks/declarative/typeimports/data/QmlTestType4.qml rename to tests/benchmarks/qml/typeimports/data/QmlTestType4.qml index 3407b3b0bd..45fdbfbb09 100644 --- a/tests/benchmarks/declarative/typeimports/data/QmlTestType4.qml +++ b/tests/benchmarks/qml/typeimports/data/QmlTestType4.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/typeimports/data/cpp.qml b/tests/benchmarks/qml/typeimports/data/cpp.qml similarity index 97% rename from tests/benchmarks/declarative/typeimports/data/cpp.qml rename to tests/benchmarks/qml/typeimports/data/cpp.qml index 28bc3222d3..8700846b5a 100644 --- a/tests/benchmarks/declarative/typeimports/data/cpp.qml +++ b/tests/benchmarks/qml/typeimports/data/cpp.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/typeimports/data/qml.qml b/tests/benchmarks/qml/typeimports/data/qml.qml similarity index 97% rename from tests/benchmarks/declarative/typeimports/data/qml.qml rename to tests/benchmarks/qml/typeimports/data/qml.qml index c6a71b30c5..1235cde924 100644 --- a/tests/benchmarks/declarative/typeimports/data/qml.qml +++ b/tests/benchmarks/qml/typeimports/data/qml.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp b/tests/benchmarks/qml/typeimports/tst_typeimports.cpp similarity index 84% rename from tests/benchmarks/declarative/typeimports/tst_typeimports.cpp rename to tests/benchmarks/qml/typeimports/tst_typeimports.cpp index a4fb034eb2..69b3f2e215 100644 --- a/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp +++ b/tests/benchmarks/qml/typeimports/tst_typeimports.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include -#include -#include +#include +#include #include class tst_typeimports : public QObject @@ -55,22 +55,22 @@ private slots: void qml(); private: - QDeclarativeEngine engine; + QQmlEngine engine; }; class TestType1 : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty resources READ resources); + Q_PROPERTY(QQmlListProperty resources READ resources); Q_CLASSINFO("DefaultProperty", "resources"); public: TestType1(QObject *parent = 0) : QObject(parent) {} - QDeclarativeListProperty resources() { - return QDeclarativeListProperty(this, 0, resources_append); + QQmlListProperty resources() { + return QQmlListProperty(this, 0, resources_append); } - static void resources_append(QDeclarativeListProperty *p, QObject *o) { + static void resources_append(QQmlListProperty *p, QObject *o) { o->setParent(p->object); } }; @@ -114,7 +114,7 @@ inline QUrl TEST_FILE(const QString &filename) void tst_typeimports::cpp() { QBENCHMARK { - QDeclarativeComponent component(&engine, TEST_FILE("cpp.qml")); + QQmlComponent component(&engine, TEST_FILE("cpp.qml")); QVERIFY(component.isReady()); } } @@ -122,10 +122,10 @@ void tst_typeimports::cpp() void tst_typeimports::qml() { //get rid of initialization effects - { QDeclarativeComponent component(&engine, TEST_FILE("qml.qml")); } + { QQmlComponent component(&engine, TEST_FILE("qml.qml")); } QBENCHMARK { - QDeclarativeComponent component(&engine, TEST_FILE("qml.qml")); + QQmlComponent component(&engine, TEST_FILE("qml.qml")); QVERIFY(component.isReady()); } } diff --git a/tests/benchmarks/declarative/typeimports/typeimports.pro b/tests/benchmarks/qml/typeimports/typeimports.pro similarity index 85% rename from tests/benchmarks/declarative/typeimports/typeimports.pro rename to tests/benchmarks/qml/typeimports/typeimports.pro index 403387f0ce..dc58e4044b 100644 --- a/tests/benchmarks/declarative/typeimports/typeimports.pro +++ b/tests/benchmarks/qml/typeimports/typeimports.pro @@ -1,7 +1,7 @@ CONFIG += testcase TEMPLATE = app TARGET = tst_typeimports -QT += declarative testlib +QT += qml testlib macx:CONFIG -= app_bundle SOURCES += tst_typeimports.cpp diff --git a/tests/global/global.cfg b/tests/global/global.cfg index 80e064a74f..e01462a5a0 100644 --- a/tests/global/global.cfg +++ b/tests/global/global.cfg @@ -1,5 +1,5 @@ - + diff --git a/tests/manual/accessibility/animation.qml b/tests/manual/accessibility/animation.qml index 3d75f28573..bb5c7ac192 100644 --- a/tests/manual/accessibility/animation.qml +++ b/tests/manual/accessibility/animation.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/manual/accessibility/behavior.qml b/tests/manual/accessibility/behavior.qml index de86284dcd..614330fbb5 100644 --- a/tests/manual/accessibility/behavior.qml +++ b/tests/manual/accessibility/behavior.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/manual/accessibility/flickable.qml b/tests/manual/accessibility/flickable.qml index 24a3b93edc..1014d307ee 100644 --- a/tests/manual/accessibility/flickable.qml +++ b/tests/manual/accessibility/flickable.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/manual/accessibility/hittest.qml b/tests/manual/accessibility/hittest.qml index 9f94b7e999..10d65707b0 100644 --- a/tests/manual/accessibility/hittest.qml +++ b/tests/manual/accessibility/hittest.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/manual/accessibility/numberanimation.qml b/tests/manual/accessibility/numberanimation.qml index 91c54ecbd3..c35c022272 100644 --- a/tests/manual/accessibility/numberanimation.qml +++ b/tests/manual/accessibility/numberanimation.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/manual/accessibility/textandbuttons.qml b/tests/manual/accessibility/textandbuttons.qml index 893cb071b2..6abdb1ea49 100644 --- a/tests/manual/accessibility/textandbuttons.qml +++ b/tests/manual/accessibility/textandbuttons.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/manual/accessibility/transition.qml b/tests/manual/accessibility/transition.qml index 05714503a2..d606da7744 100644 --- a/tests/manual/accessibility/transition.qml +++ b/tests/manual/accessibility/transition.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/testapplications/qsgimage/ImageNG.qml b/tests/testapplications/qsgimage/ImageNG.qml index fbcef04662..afc4d0c22e 100644 --- a/tests/testapplications/qsgimage/ImageNG.qml +++ b/tests/testapplications/qsgimage/ImageNG.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tests/testapplications/qsgimage/img-align.qml b/tests/testapplications/qsgimage/img-align.qml index b751e006a5..7d118f7538 100644 --- a/tests/testapplications/qsgimage/img-align.qml +++ b/tests/testapplications/qsgimage/img-align.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tools/qmleasing/TextField.qml b/tools/qmleasing/TextField.qml index ccdb562cfa..2d7cb5ec28 100644 --- a/tools/qmleasing/TextField.qml +++ b/tools/qmleasing/TextField.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tools/qmleasing/easing.qml b/tools/qmleasing/easing.qml index 50a349357f..437bc7da3d 100644 --- a/tools/qmleasing/easing.qml +++ b/tools/qmleasing/easing.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tools/qmleasing/qmleasing.pro b/tools/qmleasing/qmleasing.pro index 6f5e56b147..488ec5748a 100644 --- a/tools/qmleasing/qmleasing.pro +++ b/tools/qmleasing/qmleasing.pro @@ -1,4 +1,4 @@ -QT += declarative quick widgets +QT += qml quick widgets CONFIG -= app_bundle SOURCES += main.cpp diff --git a/tools/qmlmin/main.cpp b/tools/qmlmin/main.cpp index f59eedec84..8baa131b9a 100644 --- a/tools/qmlmin/main.cpp +++ b/tools/qmlmin/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include #include @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE // // QML/JS minifier // -namespace QDeclarativeJS { +namespace QQmlJS { enum RegExpFlag { Global = 0x01, @@ -66,7 +66,7 @@ enum RegExpFlag { class QmlminLexer: protected Lexer, public Directives { - QDeclarativeJS::Engine _engine; + QQmlJS::Engine _engine; QString _fileName; QString _directives; @@ -492,7 +492,7 @@ bool Tokenize::parse(int startToken) return false; } -} // end of QDeclarativeJS namespace +} // end of QQmlJS namespace static void usage(bool showHelp = false) { @@ -571,7 +571,7 @@ int runQmlmin(int argc, char *argv[]) const QString code = QString::fromUtf8(file.readAll()); // QML files are UTF-8 encoded. file.close(); - QDeclarativeJS::Minify minify; + QQmlJS::Minify minify; if (! minify(fileName, code)) { std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << "' (not a valid QML/JS file)" << std::endl; return EXIT_FAILURE; @@ -580,13 +580,13 @@ int runQmlmin(int argc, char *argv[]) // // verify the output // - QDeclarativeJS::Minify secondMinify; + QQmlJS::Minify secondMinify; if (! secondMinify(fileName, minify.minifiedCode()) || secondMinify.minifiedCode() != minify.minifiedCode()) { std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << "'" << std::endl; return EXIT_FAILURE; } - QDeclarativeJS::Tokenize originalTokens, minimizedTokens; + QQmlJS::Tokenize originalTokens, minimizedTokens; originalTokens(fileName, code); minimizedTokens(fileName, minify.minifiedCode()); diff --git a/tools/qmlmin/qmlmin.pro b/tools/qmlmin/qmlmin.pro index 67c7004c18..c57ec29d5b 100644 --- a/tools/qmlmin/qmlmin.pro +++ b/tools/qmlmin/qmlmin.pro @@ -1,7 +1,7 @@ QT = core qmldevtools-private CONFIG += console CONFIG -= app_bundle -DESTDIR = $$QT.declarative.bins +DESTDIR = $$QT.qml.bins SOURCES += main.cpp target.path = $$[QT_INSTALL_BINS] diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index ad8a3a6d64..2c12941d07 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include @@ -101,14 +101,14 @@ void collectReachableMetaObjects(QObject *object, QSet *met for (int index = 0; index < meta->propertyCount(); ++index) { QMetaProperty prop = meta->property(index); - if (QDeclarativeMetaType::isQObject(prop.userType())) { + if (QQmlMetaType::isQObject(prop.userType())) { if (verbose) qDebug() << " Processing property" << prop.name(); currentProperty = QString("%1::%2").arg(meta->className(), prop.name()); // if the property was not initialized during construction, // accessing a member of oo is going to cause a segmentation fault - QObject *oo = QDeclarativeMetaType::toQObject(prop.read(object)); + QObject *oo = QQmlMetaType::toQObject(prop.read(object)); if (oo && !metas->contains(oo->metaObject())) collectReachableMetaObjects(oo, metas); currentProperty.clear(); @@ -116,7 +116,7 @@ void collectReachableMetaObjects(QObject *object, QSet *met } } -void collectReachableMetaObjects(const QDeclarativeType *ty, QSet *metas) +void collectReachableMetaObjects(const QQmlType *ty, QSet *metas) { collectReachableMetaObjects(ty->metaObject(), metas, ty->isExtendedType()); if (ty->attachedPropertiesType()) @@ -136,7 +136,7 @@ class FriendlyQObject: public QObject To do this, we need to find the QDeclarativeTypes associated with this QMetaObject. */ -static QHash > qmlTypesByCppName; +static QHash > qmlTypesByCppName; static QHash cppToId; @@ -187,13 +187,13 @@ class ModuleApi { }; QList moduleApis; -QSet collectReachableMetaObjects(QDeclarativeEngine *engine, const QList &skip = QList()) +QSet collectReachableMetaObjects(QQmlEngine *engine, const QList &skip = QList()) { QSet metas; metas.insert(FriendlyQObject::qtMeta()); QHash > extensions; - foreach (const QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) { + foreach (const QQmlType *ty, QQmlMetaType::qmlTypes()) { qmlTypesByCppName[ty->metaObject()->className()].insert(ty); if (ty->isExtendedType()) { extensions[ty->typeName()].insert(ty->metaObject()->className()); @@ -206,18 +206,18 @@ QSet collectReachableMetaObjects(QDeclarativeEngine *engine // Example: QDeclarativeGraphicsWidget overrides the QtQuick/QGraphicsWidget export // of QGraphicsWidget. foreach (const QByteArray &baseCpp, extensions.keys()) { - QSet baseExports = qmlTypesByCppName.value(baseCpp); + QSet baseExports = qmlTypesByCppName.value(baseCpp); const QSet extensionCppNames = extensions.value(baseCpp); foreach (const QByteArray &extensionCppName, extensionCppNames) { - const QSet extensionExports = qmlTypesByCppName.value(extensionCppName); + const QSet extensionExports = qmlTypesByCppName.value(extensionCppName); // remove extension exports from base imports - // unfortunately the QDeclarativeType pointers don't match, so can't use QSet::substract - QSet newBaseExports; - foreach (const QDeclarativeType *baseExport, baseExports) { + // unfortunately the QQmlType pointers don't match, so can't use QSet::substract + QSet newBaseExports; + foreach (const QQmlType *baseExport, baseExports) { bool match = false; - foreach (const QDeclarativeType *extensionExport, extensionExports) { + foreach (const QQmlType *extensionExport, extensionExports) { if (baseExport->qmlTypeName() == extensionExport->qmlTypeName() && baseExport->majorVersion() == extensionExport->majorVersion() && baseExport->minorVersion() == extensionExport->minorVersion()) { @@ -235,14 +235,14 @@ QSet collectReachableMetaObjects(QDeclarativeEngine *engine // find even more QMetaObjects by instantiating QML types and running // over the instances - foreach (QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) { + foreach (QQmlType *ty, QQmlMetaType::qmlTypes()) { if (skip.contains(ty)) continue; if (ty->isExtendedType()) continue; if (!ty->isCreatable()) continue; - if (ty->typeName() == "QDeclarativeComponent") + if (ty->typeName() == "QQmlComponent") continue; QString tyName = ty->qmlTypeName(); @@ -261,10 +261,10 @@ QSet collectReachableMetaObjects(QDeclarativeEngine *engine } // extract exported module api - QHashIterator > moduleApiIt(QDeclarativeMetaType::moduleApis()); + QHashIterator > moduleApiIt(QQmlMetaType::moduleApis()); while (moduleApiIt.hasNext()) { moduleApiIt.next(); - foreach (const QDeclarativeMetaType::ModuleApi &api, moduleApiIt.value()) { + foreach (const QQmlMetaType::ModuleApi &api, moduleApiIt.value()) { ModuleApi moduleApi; moduleApi.uri = moduleApiIt.key(); moduleApi.majorVersion = api.major; @@ -322,11 +322,11 @@ class Dumper if (meta->superClass()) qml->writeScriptBinding(QLatin1String("prototype"), enquote(convertToId(meta->superClass()))); - QSet qmlTypes = qmlTypesByCppName.value(meta->className()); + QSet qmlTypes = qmlTypesByCppName.value(meta->className()); if (!qmlTypes.isEmpty()) { - QHash exports; + QHash exports; - foreach (const QDeclarativeType *qmlTy, qmlTypes) { + foreach (const QQmlType *qmlTy, qmlTypes) { QString qmlTyName = qmlTy->qmlTypeName(); if (qmlTyName.startsWith(relocatableModuleUri + QLatin1Char('/'))) { qmlTyName.remove(0, relocatableModuleUri.size() + 1); @@ -432,7 +432,7 @@ class Dumper { qml->writeStartObject(QLatin1String("Component")); qml->writeScriptBinding(QLatin1String("name"), enquote(QLatin1String("QEasingCurve"))); - qml->writeScriptBinding(QLatin1String("prototype"), enquote(QLatin1String("QDeclarativeEasingValueType"))); + qml->writeScriptBinding(QLatin1String("prototype"), enquote(QLatin1String("QQmlEasingValueType"))); qml->writeEndObject(); } @@ -447,7 +447,7 @@ class Dumper */ static void removePointerAndList(QByteArray *typeName, bool *isList, bool *isPointer) { - static QByteArray declListPrefix = "QDeclarativeListProperty<"; + static QByteArray declListPrefix = "QQmlListProperty<"; if (typeName->endsWith('*')) { *isPointer = true; @@ -670,7 +670,7 @@ int main(int argc, char *argv[]) } } - QDeclarativeEngine engine; + QQmlEngine engine; if (!pluginImportPath.isEmpty()) { QDir cur = QDir::current(); cur.cd(pluginImportPath); @@ -682,11 +682,11 @@ int main(int argc, char *argv[]) // load the QtQuick 2 plugin { QByteArray code("import QtQuick 2.0\nQtObject {}"); - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData(code, QUrl::fromLocalFile(pluginImportPath + "/loadqtquick2.qml")); c.create(); if (!c.errors().isEmpty()) { - foreach (const QDeclarativeError &error, c.errors()) + foreach (const QQmlError &error, c.errors()) qWarning() << error.toString(); return EXIT_IMPORTERROR; } @@ -694,7 +694,7 @@ int main(int argc, char *argv[]) // find all QMetaObjects reachable from the builtin module QSet defaultReachable = collectReachableMetaObjects(&engine); - QList defaultTypes = QDeclarativeMetaType::qmlTypes(); + QList defaultTypes = QQmlMetaType::qmlTypes(); // add some otherwise unreachable QMetaObjects defaultReachable.insert(&QQuickMouseEvent::staticMetaObject); @@ -708,7 +708,7 @@ int main(int argc, char *argv[]) } else { // find a valid QtQuick import QByteArray importCode; - QDeclarativeType *qtObjectType = QDeclarativeMetaType::qmlType(&QObject::staticMetaObject); + QQmlType *qtObjectType = QQmlMetaType::qmlType(&QObject::staticMetaObject); if (!qtObjectType) { qWarning() << "Could not find QtObject type"; importCode = QByteArray("import QtQuick 2.0\n"); @@ -733,12 +733,12 @@ int main(int argc, char *argv[]) { QByteArray code = importCode; code += "QtObject {}"; - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData(code, QUrl::fromLocalFile(pluginImportPath + "/typelist.qml")); c.create(); if (!c.errors().isEmpty()) { - foreach (const QDeclarativeError &error, c.errors()) + foreach (const QQmlError &error, c.errors()) qWarning() << error.toString(); return EXIT_IMPORTERROR; } @@ -761,7 +761,7 @@ int main(int argc, char *argv[]) // setup static rewrites of type names cppToId.insert("QString", "string"); - cppToId.insert("QDeclarativeEasingValueType::Type", "Type"); + cppToId.insert("QQmlEasingValueType::Type", "Type"); // start dumping data QByteArray bytes; @@ -787,7 +787,7 @@ int main(int argc, char *argv[]) dumper.dump(meta); } - // define QEasingCurve as an extension of QDeclarativeEasingValueType, this way + // define QEasingCurve as an extension of QQmlEasingValueType, this way // properties using the QEasingCurve type get useful type information. if (pluginImportUri.isEmpty()) dumper.writeEasingCurve(); diff --git a/tools/qmlplugindump/qmlplugindump.pro b/tools/qmlplugindump/qmlplugindump.pro index e1c8485e27..7662fd79c8 100644 --- a/tools/qmlplugindump/qmlplugindump.pro +++ b/tools/qmlplugindump/qmlplugindump.pro @@ -1,8 +1,8 @@ TEMPLATE = app CONFIG += qt uic console -DESTDIR = $$QT.declarative.bins +DESTDIR = $$QT.qml.bins -QT += declarative declarative-private quick-private core-private +QT += qml qml-private quick-private core-private TARGET = qmlplugindump diff --git a/tools/qmlprofiler/commandlistener.cpp b/tools/qmlprofiler/commandlistener.cpp index cc969160d6..aa3659636d 100644 --- a/tools/qmlprofiler/commandlistener.cpp +++ b/tools/qmlprofiler/commandlistener.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tools/qmlprofiler/commandlistener.h b/tools/qmlprofiler/commandlistener.h index 77fd79362d..abe302cb8a 100644 --- a/tools/qmlprofiler/commandlistener.h +++ b/tools/qmlprofiler/commandlistener.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tools/qmlprofiler/constants.h b/tools/qmlprofiler/constants.h index 2e6acda275..e5a1f8025d 100644 --- a/tools/qmlprofiler/constants.h +++ b/tools/qmlprofiler/constants.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tools/qmlprofiler/profileclient.cpp b/tools/qmlprofiler/profileclient.cpp index 3e84569f2f..5871aa29af 100644 --- a/tools/qmlprofiler/profileclient.cpp +++ b/tools/qmlprofiler/profileclient.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,8 +45,8 @@ #include ProfileClient::ProfileClient(const QString &clientName, - QDeclarativeDebugConnection *client) - : QDeclarativeDebugClient(clientName, client), + QQmlDebugConnection *client) + : QQmlDebugClient(clientName, client), m_recording(false), m_enabled(false) { @@ -111,19 +111,19 @@ class DeclarativeProfileClientPrivate , maximumTime(0) { ::memset(rangeCount, 0, - QDeclarativeProfilerService::MaximumRangeType * sizeof(int)); + QQmlProfilerService::MaximumRangeType * sizeof(int)); } qint64 inProgressRanges; - QStack rangeStartTimes[QDeclarativeProfilerService::MaximumRangeType]; - QStack rangeDatas[QDeclarativeProfilerService::MaximumRangeType]; - QStack rangeLocations[QDeclarativeProfilerService::MaximumRangeType]; - int rangeCount[QDeclarativeProfilerService::MaximumRangeType]; + QStack rangeStartTimes[QQmlProfilerService::MaximumRangeType]; + QStack rangeDatas[QQmlProfilerService::MaximumRangeType]; + QStack rangeLocations[QQmlProfilerService::MaximumRangeType]; + int rangeCount[QQmlProfilerService::MaximumRangeType]; qint64 maximumTime; }; DeclarativeProfileClient::DeclarativeProfileClient( - QDeclarativeDebugConnection *client) + QQmlDebugConnection *client) : ProfileClient(QLatin1String("CanvasFrameRate"), client), d(new DeclarativeProfileClientPrivate) { @@ -137,7 +137,7 @@ DeclarativeProfileClient::~DeclarativeProfileClient() void DeclarativeProfileClient::clearData() { ::memset(d->rangeCount, 0, - QDeclarativeProfilerService::MaximumRangeType * sizeof(int)); + QQmlProfilerService::MaximumRangeType * sizeof(int)); ProfileClient::clearData(); } @@ -159,43 +159,43 @@ void DeclarativeProfileClient::messageReceived(const QByteArray &data) stream >> time >> messageType; - if (messageType >= QDeclarativeProfilerService::MaximumMessage) + if (messageType >= QQmlProfilerService::MaximumMessage) return; - if (messageType == QDeclarativeProfilerService::Event) { + if (messageType == QQmlProfilerService::Event) { int event; stream >> event; - if (event == QDeclarativeProfilerService::EndTrace) { + if (event == QQmlProfilerService::EndTrace) { emit this->traceFinished(time); d->maximumTime = time; d->maximumTime = qMax(time, d->maximumTime); - } else if (event == QDeclarativeProfilerService::AnimationFrame) { + } else if (event == QQmlProfilerService::AnimationFrame) { int frameRate, animationCount; stream >> frameRate >> animationCount; emit this->frame(time, frameRate, animationCount); d->maximumTime = qMax(time, d->maximumTime); - } else if (event == QDeclarativeProfilerService::StartTrace) { + } else if (event == QQmlProfilerService::StartTrace) { emit this->traceStarted(time); d->maximumTime = time; - } else if (event < QDeclarativeProfilerService::MaximumEventType) { + } else if (event < QQmlProfilerService::MaximumEventType) { d->maximumTime = qMax(time, d->maximumTime); } - } else if (messageType == QDeclarativeProfilerService::Complete) { + } else if (messageType == QQmlProfilerService::Complete) { emit complete(); } else { int range; stream >> range; - if (range >= QDeclarativeProfilerService::MaximumRangeType) + if (range >= QQmlProfilerService::MaximumRangeType) return; - if (messageType == QDeclarativeProfilerService::RangeStart) { + if (messageType == QQmlProfilerService::RangeStart) { d->rangeStartTimes[range].push(time); d->inProgressRanges |= (static_cast(1) << range); ++d->rangeCount[range]; - } else if (messageType == QDeclarativeProfilerService::RangeData) { + } else if (messageType == QQmlProfilerService::RangeData) { QString data; stream >> data; @@ -206,7 +206,7 @@ void DeclarativeProfileClient::messageReceived(const QByteArray &data) d->rangeDatas[range][count-1] << data; } - } else if (messageType == QDeclarativeProfilerService::RangeLocation) { + } else if (messageType == QQmlProfilerService::RangeLocation) { QString fileName; int line; int column = -1; @@ -232,7 +232,7 @@ void DeclarativeProfileClient::messageReceived(const QByteArray &data) d->rangeLocations[range].pop() : EventLocation(); qint64 startTime = d->rangeStartTimes[range].pop(); - emit this->range((QDeclarativeProfilerService::RangeType)range, + emit this->range((QQmlProfilerService::RangeType)range, startTime, time - startTime, data, location); if (d->rangeCount[range] == 0) { int count = d->rangeDatas[range].count() + @@ -246,7 +246,7 @@ void DeclarativeProfileClient::messageReceived(const QByteArray &data) } } -V8ProfileClient::V8ProfileClient(QDeclarativeDebugConnection *client) +V8ProfileClient::V8ProfileClient(QQmlDebugConnection *client) : ProfileClient(QLatin1String("V8Profiler"), client) { } diff --git a/tools/qmlprofiler/profileclient.h b/tools/qmlprofiler/profileclient.h index 87e9dbc508..fd581c59c4 100644 --- a/tools/qmlprofiler/profileclient.h +++ b/tools/qmlprofiler/profileclient.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,11 +44,11 @@ #include "profiledata.h" -#include -#include +#include +#include class ProfileClientPrivate; -class ProfileClient : public QDeclarativeDebugClient +class ProfileClient : public QQmlDebugClient { Q_OBJECT @@ -58,7 +58,7 @@ class ProfileClient : public QDeclarativeDebugClient public: ProfileClient(const QString & clientName, - QDeclarativeDebugConnection *client); + QQmlDebugConnection *client); ~ProfileClient(); bool isEnabled() const; @@ -88,7 +88,7 @@ class DeclarativeProfileClient : public ProfileClient Q_OBJECT public: - DeclarativeProfileClient(QDeclarativeDebugConnection *client); + DeclarativeProfileClient(QQmlDebugConnection *client); ~DeclarativeProfileClient(); public slots: @@ -98,7 +98,7 @@ public slots: signals: void traceFinished( qint64 time ); void traceStarted( qint64 time ); - void range(QDeclarativeProfilerService::RangeType type, qint64 startTime, + void range(QQmlProfilerService::RangeType type, qint64 startTime, qint64 length, const QStringList &data, const EventLocation &location); void frame(qint64 time, int frameRate, int animationCount); @@ -122,7 +122,7 @@ class V8ProfileClient : public ProfileClient V8MaximumMessage }; - V8ProfileClient(QDeclarativeDebugConnection *client); + V8ProfileClient(QQmlDebugConnection *client); ~V8ProfileClient(); public slots: diff --git a/tools/qmlprofiler/profiledata.cpp b/tools/qmlprofiler/profiledata.cpp index 19c282b97c..96d7520844 100644 --- a/tools/qmlprofiler/profiledata.cpp +++ b/tools/qmlprofiler/profiledata.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -52,7 +52,7 @@ using namespace Constants; DeclarativeEvent::DeclarativeEvent() { - eventType = QDeclarativeProfilerService::MaximumRangeType; + eventType = QQmlProfilerService::MaximumRangeType; eventId = -1; duration = 0; calls = 0; @@ -204,22 +204,22 @@ bool compareStartIndexes(const DeclarativeEventEndTime &t1, return t1.startTimeIndex < t2.startTimeIndex; } -QString declarativeEventType(QDeclarativeProfilerService::RangeType typeEnum) +QString declarativeEventType(QQmlProfilerService::RangeType typeEnum) { switch (typeEnum) { - case QDeclarativeProfilerService::Painting: + case QQmlProfilerService::Painting: return QLatin1String(TYPE_PAINTING_STR); break; - case QDeclarativeProfilerService::Compiling: + case QQmlProfilerService::Compiling: return QLatin1String(TYPE_COMPILING_STR); break; - case QDeclarativeProfilerService::Creating: + case QQmlProfilerService::Creating: return QLatin1String(TYPE_CREATING_STR); break; - case QDeclarativeProfilerService::Binding: + case QQmlProfilerService::Binding: return QLatin1String(TYPE_BINDING_STR); break; - case QDeclarativeProfilerService::HandlingSignal: + case QQmlProfilerService::HandlingSignal: return QLatin1String(TYPE_HANDLINGSIGNAL_STR); break; default: @@ -227,32 +227,32 @@ QString declarativeEventType(QDeclarativeProfilerService::RangeType typeEnum) } } -QDeclarativeProfilerService::RangeType declarativeEventType(const QString &typeString) +QQmlProfilerService::RangeType declarativeEventType(const QString &typeString) { if (typeString == QLatin1String(TYPE_PAINTING_STR)) { - return QDeclarativeProfilerService::Painting; + return QQmlProfilerService::Painting; } else if (typeString == QLatin1String(TYPE_COMPILING_STR)) { - return QDeclarativeProfilerService::Compiling; + return QQmlProfilerService::Compiling; } else if (typeString == QLatin1String(TYPE_CREATING_STR)) { - return QDeclarativeProfilerService::Creating; + return QQmlProfilerService::Creating; } else if (typeString == QLatin1String(TYPE_BINDING_STR)) { - return QDeclarativeProfilerService::Binding; + return QQmlProfilerService::Binding; } else if (typeString == QLatin1String(TYPE_HANDLINGSIGNAL_STR)) { - return QDeclarativeProfilerService::HandlingSignal; + return QQmlProfilerService::HandlingSignal; } else { bool isNumber = false; int type = typeString.toUInt(&isNumber); if (isNumber) { - return (QDeclarativeProfilerService::RangeType)type; + return (QQmlProfilerService::RangeType)type; } else { - return QDeclarativeProfilerService::MaximumRangeType; + return QQmlProfilerService::MaximumRangeType; } } } QString getHashStringForDeclarativeEvent( EventLocation location, - QDeclarativeProfilerService::RangeType eventType) + QQmlProfilerService::RangeType eventType) { return QString("%1:%2:%3:%4").arg(location.filename, QString::number(location.line), @@ -383,7 +383,7 @@ const V8Events& ProfileData::getV8Events() const } void ProfileData::addDeclarativeEvent( - QDeclarativeProfilerService::RangeType type, qint64 startTime, qint64 length, + QQmlProfilerService::RangeType type, qint64 startTime, qint64 length, const QStringList &data, const EventLocation &location) { const QChar colon = QLatin1Char(':'); @@ -408,7 +408,7 @@ void ProfileData::addDeclarativeEvent( // backwards compatibility: "compiling" events don't have a proper location in older // version of the protocol, but the filename is passed in the details string - if (type == QDeclarativeProfilerService::Compiling && eventLocation.filename.isEmpty()) { + if (type == QQmlProfilerService::Compiling && eventLocation.filename.isEmpty()) { eventLocation.filename = details; eventLocation.line = 1; eventLocation.column = 1; @@ -544,7 +544,7 @@ void ProfileData::addFrameEvent(qint64 time, int framerate, int animationcount) newEvent = new DeclarativeEvent; newEvent->displayname = displayName; newEvent->eventHashStr = eventHashStr; - newEvent->eventType = QDeclarativeProfilerService::Painting; + newEvent->eventType = QQmlProfilerService::Painting; newEvent->details = details; d->m_eventDescriptions.insert(eventHashStr, newEvent); } @@ -651,7 +651,7 @@ void ProfileDataPrivate::clearDeclarativeRootEvent() m_qmlRootEvent.location = EventLocation(); m_qmlRootEvent.eventHashStr = m_rootEventName; m_qmlRootEvent.details = m_rootEventDesc; - m_qmlRootEvent.eventType = QDeclarativeProfilerService::Binding; + m_qmlRootEvent.eventType = QQmlProfilerService::Binding; m_qmlRootEvent.duration = 0; m_qmlRootEvent.calls = 0; m_qmlRootEvent.minTime = 0; @@ -721,7 +721,7 @@ void ProfileData::compileStatistics(qint64 startTime, qint64 endTime) continue; } - if (eventDescription->eventType == QDeclarativeProfilerService::Painting) { + if (eventDescription->eventType == QQmlProfilerService::Painting) { // skip animation/paint events continue; } @@ -948,7 +948,7 @@ void ProfileData::findAnimationLimits() for (int i = 0; i < d->m_startTimeSortedList.count(); i++) { if (d->m_startTimeSortedList[i].description->eventType == - QDeclarativeProfilerService::Painting && + QQmlProfilerService::Painting && d->m_startTimeSortedList[i].animationCount >= 0) { int animationcount = d->m_startTimeSortedList[i].animationCount; if (d->m_lastFrameEvent) { @@ -974,7 +974,7 @@ void ProfileData::computeNestingLevels() int level = MIN_LEVEL; endtimesPerLevel[MIN_LEVEL] = 0; - for (int i = 0; i < QDeclarativeProfilerService::MaximumRangeType; i++) { + for (int i = 0; i < QQmlProfilerService::MaximumRangeType; i++) { nestingLevels << MIN_LEVEL; QHash dummyHash; dummyHash[MIN_LEVEL] = 0; @@ -985,7 +985,7 @@ void ProfileData::computeNestingLevels() qint64 st = d->m_startTimeSortedList[i].startTime; int type = d->m_startTimeSortedList[i].description->eventType; - if (type == QDeclarativeProfilerService::Painting) { + if (type == QQmlProfilerService::Painting) { // animation/paint events have level 1 by definition, // but are not considered parents of other events for // statistical purposes @@ -1075,8 +1075,8 @@ void ProfileData::reloadDetails() { // request binding/signal details from the AST foreach (DeclarativeEvent *event, d->m_eventDescriptions.values()) { - if (event->eventType != QDeclarativeProfilerService::Binding && - event->eventType != QDeclarativeProfilerService::HandlingSignal) + if (event->eventType != QQmlProfilerService::Binding && + event->eventType != QQmlProfilerService::HandlingSignal) continue; // This skips anonymous bindings in Qt4.8 (we don't have valid location data for them) @@ -1146,7 +1146,7 @@ void ProfileData::findBindingLoops(qint64 startTime, qint64 endTime) } void ProfileData::rewriteDetailsString( - QDeclarativeProfilerService::RangeType eventType, + QQmlProfilerService::RangeType eventType, const EventLocation &location, const QString &newString) { QString eventHashStr = getHashStringForDeclarativeEvent(location, @@ -1366,7 +1366,7 @@ bool ProfileData::save(const QString &filename) QString::number(d->m_eventDescriptions.keys().indexOf( rangedEvent.description->eventHashStr))); if (rangedEvent.description->eventType == - QDeclarativeProfilerService::Painting && rangedEvent.animationCount >= 0) { + QQmlProfilerService::Painting && rangedEvent.animationCount >= 0) { // animation frame stream.writeAttribute("framerate", QString::number(rangedEvent.frameRate)); @@ -1825,7 +1825,7 @@ QString ProfileData::getDetails(int index) const { // special: animations if (d->m_startTimeSortedList[index].description->eventType == - QDeclarativeProfilerService::Painting && + QQmlProfilerService::Painting && d->m_startTimeSortedList[index].animationCount >= 0) return tr("%1 animations at %2 FPS").arg( QString::number(d->m_startTimeSortedList[index].animationCount), diff --git a/tools/qmlprofiler/profiledata.h b/tools/qmlprofiler/profiledata.h index eaa2127f4a..4dd12f7fd3 100644 --- a/tools/qmlprofiler/profiledata.h +++ b/tools/qmlprofiler/profiledata.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,7 +42,7 @@ #ifndef PROFILEDATA_H #define PROFILEDATA_H -#include +#include #include #include @@ -87,7 +87,7 @@ struct DeclarativeEvent QString eventHashStr; QString details; EventLocation location; - QDeclarativeProfilerService::RangeType eventType; + QQmlProfilerService::RangeType eventType; QHash parentHash; QHash childrenHash; qint64 duration; @@ -205,7 +205,7 @@ class ProfileData : public QObject public slots: void clear(); - void addDeclarativeEvent(QDeclarativeProfilerService::RangeType type, + void addDeclarativeEvent(QQmlProfilerService::RangeType type, qint64 startTime, qint64 length, const QStringList &data, const EventLocation &location); @@ -222,7 +222,7 @@ public slots: void setTraceEndTime( qint64 time ); void setTraceStartTime( qint64 time ); - void rewriteDetailsString(QDeclarativeProfilerService::RangeType eventType, + void rewriteDetailsString(QQmlProfilerService::RangeType eventType, const EventLocation &location, const QString &newString); void finishedRewritingDetails(); diff --git a/tools/qmlprofiler/qmlprofiler.pro b/tools/qmlprofiler/qmlprofiler.pro index 1d8f89a150..ec5f50e376 100644 --- a/tools/qmlprofiler/qmlprofiler.pro +++ b/tools/qmlprofiler/qmlprofiler.pro @@ -1,8 +1,8 @@ TEMPLATE = app TARGET = qmlprofiler -DESTDIR = $$QT.declarative.bins +DESTDIR = $$QT.qml.bins -QT += declarative declarative-private network +QT += qml qml-private network target.path = $$[QT_INSTALL_BINS] INSTALLS += target diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp index af5f4298a8..855ede711c 100644 --- a/tools/qmlprofiler/qmlprofilerapplication.cpp +++ b/tools/qmlprofiler/qmlprofilerapplication.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -104,8 +104,8 @@ QmlProfilerApplication::QmlProfilerApplication(int &argc, char **argv) : connect(&m_declarativeProfilerClient, SIGNAL(enabledChanged()), this, SLOT(traceClientEnabled())); connect(&m_declarativeProfilerClient, SIGNAL(recordingChanged(bool)), this, SLOT(recordingChanged())); - connect(&m_declarativeProfilerClient, SIGNAL(range(QDeclarativeProfilerService::RangeType,qint64,qint64,QStringList,EventLocation)), - &m_profileData, SLOT(addDeclarativeEvent(QDeclarativeProfilerService::RangeType,qint64,qint64,QStringList,EventLocation))); + connect(&m_declarativeProfilerClient, SIGNAL(range(QQmlProfilerService::RangeType,qint64,qint64,QStringList,EventLocation)), + &m_profileData, SLOT(addDeclarativeEvent(QQmlProfilerService::RangeType,qint64,qint64,QStringList,EventLocation))); connect(&m_declarativeProfilerClient, SIGNAL(traceFinished(qint64)), &m_profileData, SLOT(setTraceEndTime(qint64))); connect(&m_declarativeProfilerClient, SIGNAL(traceStarted(qint64)), &m_profileData, SLOT(setTraceStartTime(qint64))); connect(&m_declarativeProfilerClient, SIGNAL(frame(qint64,int,int)), &m_profileData, SLOT(addFrameEvent(qint64,int,int))); @@ -414,7 +414,7 @@ void QmlProfilerApplication::logStatus(const QString &status) void QmlProfilerApplication::declarativeComplete() { m_declarativeDataReady = true; - if (m_v8profilerClient.state() != QDeclarativeDebugClient::Enabled || + if (m_v8profilerClient.state() != QQmlDebugClient::Enabled || m_v8DataReady) { m_profileData.complete(); // once complete is sent, reset the flag @@ -425,7 +425,7 @@ void QmlProfilerApplication::declarativeComplete() void QmlProfilerApplication::v8Complete() { m_v8DataReady = true; - if (m_declarativeProfilerClient.state() != QDeclarativeDebugClient::Enabled || + if (m_declarativeProfilerClient.state() != QQmlDebugClient::Enabled || m_declarativeDataReady) { m_profileData.complete(); // once complete is sent, reset the flag diff --git a/tools/qmlprofiler/qmlprofilerapplication.h b/tools/qmlprofiler/qmlprofilerapplication.h index 49ddaf88cd..5bedb46cff 100644 --- a/tools/qmlprofiler/qmlprofilerapplication.h +++ b/tools/qmlprofiler/qmlprofilerapplication.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -103,7 +103,7 @@ private slots: bool m_verbose; bool m_quitAfterSave; - QDeclarativeDebugConnection m_connection; + QQmlDebugConnection m_connection; DeclarativeProfileClient m_declarativeProfilerClient; V8ProfileClient m_v8profilerClient; ProfileData m_profileData; diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index d586131845..327dfc6889 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -47,10 +47,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -308,7 +308,7 @@ static void displayFileDialog(Options *options) #endif } -static void loadDummyDataFiles(QDeclarativeEngine &engine, const QString& directory) +static void loadDummyDataFiles(QQmlEngine &engine, const QString& directory) { QDir dir(directory+"/dummydata", "*.qml"); QStringList list = dir.entryList(); @@ -317,13 +317,13 @@ static void loadDummyDataFiles(QDeclarativeEngine &engine, const QString& direct QFile f(dir.filePath(qml)); f.open(QIODevice::ReadOnly); QByteArray data = f.readAll(); - QDeclarativeComponent comp(&engine); + QQmlComponent comp(&engine); comp.setData(data, QUrl()); QObject *dummyData = comp.create(); if(comp.isError()) { - QList errors = comp.errors(); - foreach (const QDeclarativeError &error, errors) { + QList errors = comp.errors(); + foreach (const QQmlError &error, errors) { qWarning() << error; } } @@ -401,7 +401,7 @@ int main(int argc, char ** argv) #endif QWindow *window = 0; - QDeclarativeEngine *engine = 0; + QQmlEngine *engine = 0; int exitCode = 0; diff --git a/tools/qmlscene/qmlscene.pro b/tools/qmlscene/qmlscene.pro index 5e4d79253e..392e607b88 100644 --- a/tools/qmlscene/qmlscene.pro +++ b/tools/qmlscene/qmlscene.pro @@ -1,8 +1,8 @@ TEMPLATE = app TARGET = qmlscene -DESTDIR= $$QT.declarative.bins +DESTDIR= $$QT.qml.bins -QT += declarative quick core-private +QT += qml quick core-private !isEmpty(QT.widgets.name): QT += widgets target.path = $$[QT_INSTALL_BINS] diff --git a/tools/qmltestrunner/qmltestrunner.pro b/tools/qmltestrunner/qmltestrunner.pro index 72990d6f98..a6c9533e0a 100644 --- a/tools/qmltestrunner/qmltestrunner.pro +++ b/tools/qmltestrunner/qmltestrunner.pro @@ -1,11 +1,11 @@ TEMPLATE = app TARGET = qmltestrunner -DESTDIR= $$QT.declarative.bins +DESTDIR= $$QT.qml.bins CONFIG += warn_on SOURCES += main.cpp -QT += declarative qmltest +QT += qml qmltest macx: CONFIG -= app_bundle