summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-04-19 08:45:09 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-04-19 08:45:09 (GMT)
commit0bbf0c7c189e3a3fd7860aae86d2f62d4bc77014 (patch)
treef9b0b9e50f70b8f24e29c1966ebd23ffa3377a40 /tests/auto
parentbce9c47d5437812b137c47ff3c602ff23ffa5e22 (diff)
parent5ce428cf7f20cd37f4cf0d92ddcceddd07c5a0db (diff)
downloadQt-0bbf0c7c189e3a3fd7860aae86d2f62d4bc77014.zip
Qt-0bbf0c7c189e3a3fd7860aae86d2f62d4bc77014.tar.gz
Qt-0bbf0c7c189e3a3fd7860aae86d2f62d4bc77014.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/bic/tst_bic.cpp5
-rw-r--r--tests/auto/declarative/.gitignore1
-rw-r--r--tests/auto/declarative/declarative.pro8
-rw-r--r--tests/auto/declarative/examples/examples.pro5
-rw-r--r--tests/auto/declarative/examples/tst_examples.cpp74
-rw-r--r--tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml85
-rw-r--r--tests/auto/declarative/graphicswidgets/graphicswidgets.pro2
-rw-r--r--tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp7
-rw-r--r--tests/auto/declarative/parserstress/parserstress.pro3
-rw-r--r--tests/auto/declarative/parserstress/tst_parserstress.cpp6
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml163
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp102
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/qmldir1
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanerror1.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanscaled.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp30
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/binding.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/startup.qml17
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro3
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp171
-rw-r--r--tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp40
-rw-r--r--tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro3
-rw-r--r--tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro3
-rw-r--r--tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp28
-rw-r--r--tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro3
-rw-r--r--tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro3
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir3
-rw-r--r--tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro3
-rw-r--r--tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp82
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.js6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/numberAssignment.qml18
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml22
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/qtbug_9792.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/signalParameterTypes.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp1
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.h65
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp212
-rw-r--r--tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/test5.qml4
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro1
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro3
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp18
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro3
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp568
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp54
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp12
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp21
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml21
-rw-r--r--tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp39
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml14
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/i18nScript.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/idProperty.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importscript.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importscript.1.qml3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml17
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.1.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.10.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.10.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.11.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.11.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.12.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.2.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.3.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.4.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.5.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.6.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.6.qml11
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.7.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.7.qml11
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.8.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.9.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.9.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestNamed.qml1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp311
-rw-r--r--tests/auto/declarative/qdeclarativelayouts/data/layouts.qml43
-rw-r--r--tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro3
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/data/model.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro3
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp31
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro3
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml29
-rw-r--r--tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp644
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/qmldir1
-rw-r--r--tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp45
-rw-r--r--tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro3
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro1
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp1
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml13
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml28
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro3
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp76
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro3
-rw-r--r--tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro3
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/data/http/exists.png (renamed from tests/auto/declarative/qmlvisual/animation/easing/pics/qtlogo.png)bin2738 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/data/http/exists1.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/data/http/exists2.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/data/http/exists3.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/data/http/exists4.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/data/http/exists5.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro9
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp51
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml41
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml40
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro3
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp65
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro3
-rw-r--r--tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro3
-rw-r--r--tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/darker.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/formatting.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/lighter.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/point.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/rect.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/size.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/vector.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp16
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro2
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp12
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml5
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro3
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow1.qml3
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow3.qml6
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowDisabled.qml13
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowValueSource.qml13
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro11
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp189
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro3
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp6
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/README (renamed from tests/auto/declarative/sql/data/README)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/changeversion.js (renamed from tests/auto/declarative/sql/data/changeversion.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/creation-a.js (renamed from tests/auto/declarative/sql/data/creation-a.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/creation.js (renamed from tests/auto/declarative/sql/data/creation.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/error-a.js (renamed from tests/auto/declarative/sql/data/error-a.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/error-b.js (renamed from tests/auto/declarative/sql/data/error-b.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/error-creation.js (renamed from tests/auto/declarative/sql/data/error-creation.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/error-notransaction.js (renamed from tests/auto/declarative/sql/data/error-notransaction.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/error-outsidetransaction.js (renamed from tests/auto/declarative/sql/data/error-outsidetransaction.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/iteration-forwardonly.js (renamed from tests/auto/declarative/sql/data/iteration-forwardonly.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/iteration.js (renamed from tests/auto/declarative/sql/data/iteration.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/readonly-error.js (renamed from tests/auto/declarative/sql/data/readonly-error.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/readonly.js (renamed from tests/auto/declarative/sql/data/readonly.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/reopen1.js (renamed from tests/auto/declarative/sql/data/reopen1.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/reopen2.js (renamed from tests/auto/declarative/sql/data/reopen2.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/selection-bindnames.js (renamed from tests/auto/declarative/sql/data/selection-bindnames.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/data/selection.js (renamed from tests/auto/declarative/sql/data/selection.js)0
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro (renamed from tests/auto/declarative/sql/sql.pro)5
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp (renamed from tests/auto/declarative/sql/tst_sql.cpp)42
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml32
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/Implementation/images/qt-logo.pngbin0 -> 5149 bytes
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml14
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/reset.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/urlResolution.qml12
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml11
-rw-r--r--tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro2
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp61
-rw-r--r--tests/auto/declarative/qdeclarativestyledtext/qdeclarativestyledtext.pro2
-rw-r--r--tests/auto/declarative/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro3
-rw-r--r--tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml5
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml5
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml5
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml5
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/http/exists.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro10
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp177
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml1
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/navigation.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp122
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/echoMode.qml11
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/navigation.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/validators.qml6
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro1
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp137
-rw-r--r--tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro2
-rw-r--r--tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp16
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/bindingVariantCopy.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml9
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/font_read.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/font_write.4.qml7
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml14
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/point_read.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/pointf_read.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/rect_read.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/rectf_read.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml17
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/scriptVariantCopy.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/size_read.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/sizef_read.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_read.qml8
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror.qml6
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror2.qml7
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror3.qml7
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml10
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_read.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro3
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/testtypes.h6
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp83
-rw-r--r--tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml68
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml136
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml40
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml168
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml134
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro3
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp6
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro3
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp16
-rw-r--r--tests/auto/declarative/qmetaobjectbuilder/qmetaobjectbuilder.pro1
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml5
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml (renamed from tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation.qml)0
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.0.png (renamed from tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.0.png)bin627 -> 627 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.1.png (renamed from tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.1.png)bin626 -> 626 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.2.png (renamed from tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.2.png)bin625 -> 625 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.qml (renamed from tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.qml)14
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation-visual.qml (renamed from tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation.qml)0
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml (renamed from tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation.qml)8
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.0.png (renamed from tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.0.png)bin1418 -> 1418 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.1.png (renamed from tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.1.png)bin1430 -> 1430 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.2.png (renamed from tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.2.png)bin1431 -> 1431 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.qml (renamed from tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.qml)8
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml (renamed from tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction.qml)7
-rw-r--r--tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.qml (renamed from tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction.qml)0
-rw-r--r--tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml (renamed from tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction.qml)5
-rw-r--r--tests/auto/declarative/qmlvisual/fillmode/data/fillmode.qml270
-rw-r--r--tests/auto/declarative/qmlvisual/fillmode/fillmode.qml5
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.1.pngbin98912 -> 98927 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.qml110
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.1.pngbin23029 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.2.pngbin23029 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.3.pngbin23029 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.4.pngbin23029 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.qml1350
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.pngbin1563 -> 1578 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.pngbin1570 -> 1585 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.pngbin1553 -> 1568 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.pngbin1563 -> 1578 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.pngbin1569 -> 1584 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.pngbin1569 -> 1584 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.pngbin1566 -> 1581 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.pngbin1566 -> 1581 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml8
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml1
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml (renamed from tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/repeater.qml)0
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml (renamed from tests/auto/declarative/qmlvisual/qdeclarativepositioners/repeater.qml)0
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml40
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml12
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml10
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml14
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml14
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml23
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml67
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.0.pngbin999 -> 716 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.1.pngbin1880 -> 1352 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.2.pngbin2962 -> 2047 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.qml376
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.0.pngbin0 -> 3137 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.1.pngbin0 -> 3195 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.10.pngbin0 -> 3853 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.2.pngbin0 -> 3171 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.3.pngbin0 -> 3228 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.4.pngbin0 -> 3198 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.5.pngbin0 -> 3310 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.6.pngbin0 -> 3233 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.7.pngbin0 -> 3607 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.8.pngbin0 -> 3657 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.9.pngbin0 -> 3262 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.qml4335
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/usingLineEdit.qml10
-rw-r--r--tests/auto/declarative/qmlvisual/qmlvisual.pro3
-rw-r--r--tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp42
-rw-r--r--tests/auto/declarative/qmlvisual/webview/embedding/egg.qml4
-rw-r--r--tests/auto/declarative/qpacketprotocol/qpacketprotocol.pro2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp23
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result17
-rw-r--r--tests/auto/macgui/tst_macgui.cpp27
-rw-r--r--tests/auto/macnativeevents/expectedeventlist.cpp176
-rw-r--r--tests/auto/macnativeevents/expectedeventlist.h71
-rw-r--r--tests/auto/macnativeevents/macnativeevents.pro6
-rw-r--r--tests/auto/macnativeevents/nativeeventlist.cpp (renamed from tests/auto/macnativeevents/qnativeplayer.cpp)78
-rw-r--r--tests/auto/macnativeevents/nativeeventlist.h (renamed from tests/auto/macnativeevents/qnativeplayer.h)32
-rw-r--r--tests/auto/macnativeevents/qnativeevents.cpp (renamed from tests/auto/macnativeevents/qnativeinput.cpp)2
-rw-r--r--tests/auto/macnativeevents/qnativeevents.h (renamed from tests/auto/macnativeevents/qnativeinput.h)0
-rw-r--r--tests/auto/macnativeevents/qnativeevents_mac.cpp (renamed from tests/auto/macnativeevents/qnativeinput_mac.cpp)2
-rw-r--r--tests/auto/macnativeevents/tst_macnativeevents.cpp253
-rw-r--r--tests/auto/mediaobject/qtesthelper.h1
-rw-r--r--tests/auto/mediaobject/tst_mediaobject.cpp43
-rw-r--r--tests/auto/qchar/qchar.pro6
-rw-r--r--tests/auto/qchar/tst_qchar.cpp5
-rw-r--r--tests/auto/qcssparser/tst_qcssparser.cpp13
-rw-r--r--tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp15
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp62
-rw-r--r--tests/auto/qftp/tst_qftp.cpp26
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp82
-rw-r--r--tests/auto/qhelpgenerator/data/test.qhp2
-rw-r--r--tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp2
-rw-r--r--tests/auto/qhelpprojectdata/data/test.qhp4
-rw-r--r--tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp2
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp2
-rw-r--r--tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp2
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp30
-rw-r--r--tests/auto/qlocale/tst_qlocale.cpp6
-rw-r--r--tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro2
-rw-r--r--tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp15
-rw-r--r--tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro2
-rw-r--r--tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp13
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp2
-rw-r--r--tests/auto/qnetworksession/lackey/main.cpp7
-rw-r--r--tests/auto/qnetworksession/test/test.pro2
-rw-r--r--tests/auto/qnetworksession/test/tst_qnetworksession.cpp32
-rw-r--r--tests/auto/qscriptengine/qscriptengine.pro1
-rw-r--r--tests/auto/qscriptengine/qscriptengine.qrc5
-rw-r--r--tests/auto/qscriptengine/translatable.js9
-rw-r--r--tests/auto/qscriptengine/translatable2.js9
-rw-r--r--tests/auto/qscriptengine/translations/translatable_la.qmbin0 -> 678 bytes
-rw-r--r--tests/auto/qscriptengine/translations/translatable_la.ts72
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp124
-rw-r--r--tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp34
-rw-r--r--tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp5
-rw-r--r--tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp2
-rw-r--r--tests/auto/qtabwidget/tst_qtabwidget.cpp47
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp2
-rw-r--r--tests/auto/qtextcursor/tst_qtextcursor.cpp34
-rw-r--r--tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp2
-rw-r--r--tests/auto/qthread/tst_qthread.cpp67
-rw-r--r--tests/auto/qwindowsurface/tst_qwindowsurface.cpp48
-rw-r--r--tests/auto/uiloader/baseline/css_scroll.ui14
447 files changed, 10051 insertions, 3998 deletions
diff --git a/tests/auto/bic/tst_bic.cpp b/tests/auto/bic/tst_bic.cpp
index 0331c96..28129c5 100644
--- a/tests/auto/bic/tst_bic.cpp
+++ b/tests/auto/bic/tst_bic.cpp
@@ -147,7 +147,9 @@ void tst_Bic::initTestCase_data()
QTest::newRow("QtXmlPatterns") << "QtXmlPatterns";
QTest::newRow("Qt3Support") << "Qt3Support";
QTest::newRow("QtTest") << "QtTest";
+#ifndef QT_NO_DBUS
QTest::newRow("QtDBus") << "QtDBus";
+#endif
QTest::newRow("QtDesigner") << "QtDesigner";
}
@@ -237,6 +239,9 @@ QBic::Info tst_Bic::getCurrentInfo(const QString &libName)
QStringList args;
args << "-c"
<< "-I" + qtDir + "/include"
+#ifdef Q_OS_MAC
+ << "-arch" << "i386" // Always use 32-bit data on Mac.
+#endif
#ifndef Q_OS_WIN
<< "-I/usr/X11R6/include/"
#endif
diff --git a/tests/auto/declarative/.gitignore b/tests/auto/declarative/.gitignore
index d937eb4..57608cf 100644
--- a/tests/auto/declarative/.gitignore
+++ b/tests/auto/declarative/.gitignore
@@ -1,4 +1,5 @@
tst_*
!tst_*.*
+tst_*.log
tst_*.debug
tst_*~
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 2d88058..7834650 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -1,5 +1,6 @@
TEMPLATE = subdirs
SUBDIRS += \
+ examples \
graphicswidgets \ # Cover
parserstress \ # Cover
qmetaobjectbuilder \ # Cover
@@ -41,13 +42,14 @@ SUBDIRS += \
qdeclarativelanguage \ # Cover
qdeclarativelistreference \ # Cover
qdeclarativelistmodel \ # Cover
- qdeclarativeproperty \ # Cover
+ qdeclarativeproperty \ # Cover
qdeclarativemetatype \ # Cover
qdeclarativemoduleplugin \ # Cover
qdeclarativepixmapcache \ # Cover
qdeclarativepropertymap \ # Cover
qdeclarativeqt \ # Cover
qdeclarativesmoothedanimation \ # Cover
+ qdeclarativesmoothedfollow\ # Cover
qdeclarativespringfollow \ # Cover
qdeclarativestates \ # Cover
qdeclarativesystempalette \ # Cover
@@ -60,8 +62,8 @@ SUBDIRS += \
qdeclarativexmlhttprequest \ # Cover
qdeclarativeimageprovider \ # Cover
qdeclarativestyledtext \ # Cover
- sql \ # Cover
- qmlvisual
+ qdeclarativesqldatabase \ # Cover
+ qmlvisual # Cover
contains(QT_CONFIG, webkit) {
SUBDIRS += \
diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro
index 85d2a73..4c32524 100644
--- a/tests/auto/declarative/examples/examples.pro
+++ b/tests/auto/declarative/examples/examples.pro
@@ -4,4 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_examples.cpp
+include(../../../../tools/qml/qml.pri)
+
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp
index 678dd59..c650346 100644
--- a/tests/auto/declarative/examples/tst_examples.cpp
+++ b/tests/auto/declarative/examples/tst_examples.cpp
@@ -43,6 +43,9 @@
#include <QDir>
#include <QProcess>
#include <QDebug>
+#include "qmlruntime.h"
+#include <QDeclarativeView>
+#include <QDeclarativeError>
class tst_examples : public QObject
{
@@ -79,6 +82,23 @@ tst_examples::tst_examples()
// Add directories you want excluded here
excludedDirs << "examples/declarative/extending";
excludedDirs << "examples/declarative/plugins";
+ excludedDirs << "examples/declarative/proxywidgets";
+ excludedDirs << "examples/declarative/gestures";
+
+ excludedDirs << "examples/declarative/imageprovider";
+ excludedDirs << "demos/declarative/minehunt";
+
+#ifdef QT_NO_WEBKIT
+ excludedDirs << "examples/declarative/webview";
+ excludedDirs << "demos/declarative/webbrowser";
+#endif
+
+#ifdef QT_NO_XMLPATTERNS
+ excludedDirs << "examples/declarative/xmldata";
+ excludedDirs << "demos/declarative/twitter";
+ excludedDirs << "demos/declarative/flickr";
+ excludedDirs << "demos/declarative/photoviewer";
+#endif
}
/*
@@ -88,24 +108,24 @@ to have them tested by the examples() test.
void tst_examples::namingConvention(const QDir &d)
{
for (int ii = 0; ii < excludedDirs.count(); ++ii) {
- QString s = QDir::toNativeSeparators(excludedDirs.at(ii));
+ QString s = excludedDirs.at(ii);
if (d.absolutePath().endsWith(s))
return;
}
- QStringList files = d.entryList(QStringList() << QLatin1String("*.qml"),
+ QStringList files = d.entryList(QStringList() << QLatin1String("*.qml"),
QDir::Files);
bool seenQml = !files.isEmpty();
bool seenLowercase = false;
foreach (const QString &file, files) {
- if (file.at(0).isLower())
+ if (file.at(0).isLower())
seenLowercase = true;
}
if (!seenQml) {
- QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
+ QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
QDir::NoSymLinks);
foreach (const QString &dir, dirs) {
QDir sub = d;
@@ -129,14 +149,14 @@ void tst_examples::namingConvention()
QStringList tst_examples::findQmlFiles(const QDir &d)
{
for (int ii = 0; ii < excludedDirs.count(); ++ii) {
- QString s = QDir::toNativeSeparators(excludedDirs.at(ii));
+ QString s = excludedDirs.at(ii);
if (d.absolutePath().endsWith(s))
return QStringList();
}
QStringList rv;
- QStringList files = d.entryList(QStringList() << QLatin1String("*.qml"),
+ QStringList files = d.entryList(QStringList() << QLatin1String("*.qml"),
QDir::Files);
foreach (const QString &file, files) {
if (file.at(0).isLower()) {
@@ -144,7 +164,7 @@ QStringList tst_examples::findQmlFiles(const QDir &d)
}
}
- QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
+ QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
QDir::NoSymLinks);
foreach (const QString &dir, dirs) {
QDir sub = d;
@@ -156,18 +176,18 @@ 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 declarative UI source tree and ensures
that they start and exit cleanly.
Examples are any .qml files under the examples/ or demos/ directory that start
-with a lower case letter.
+with a lower case letter.
*/
void tst_examples::examples_data()
{
QTest::addColumn<QString>("file");
- QString examples = QLibraryInfo::location(QLibraryInfo::ExamplesPath);
- QString demos = QLibraryInfo::location(QLibraryInfo::DemosPath);
+ QString examples = QLatin1String(SRCDIR) + "/../../../../demos/declarative/";
+ QString demos = QLatin1String(SRCDIR) + "/../../../../examples/declarative/";
QString snippets = QLatin1String(SRCDIR) + "/../../../../doc/src/snippets/";
QStringList files;
@@ -176,26 +196,30 @@ void tst_examples::examples_data()
files << findQmlFiles(QDir(snippets));
foreach (const QString &file, files)
- QTest::newRow(file.toLatin1().constData()) << file;
+ QTest::newRow(qPrintable(file)) << file;
+}
+
+static void silentErrorsMsgHandler(QtMsgType, const char *)
+{
}
void tst_examples::examples()
{
QFETCH(QString, file);
- QFileInfo fi(file);
- QFileInfo dir(fi.path());
- QString script = "data/"+dir.baseName()+"/"+fi.baseName();
- QFileInfo testdata(script+".qml");
- QStringList arguments;
- arguments << "-script" << (testdata.exists() ? script : QLatin1String("data/dummytest"))
- << "-scriptopts" << "play,testerror,exitoncomplete,exitonfailure"
- << file;
- QProcess p;
- p.start(qmlruntime, arguments);
- QVERIFY(p.waitForFinished());
- QCOMPARE(p.exitStatus(), QProcess::NormalExit);
- QCOMPARE(p.exitCode(), 0);
+ QDeclarativeViewer viewer;
+
+ QtMsgHandler old = qInstallMsgHandler(silentErrorsMsgHandler);
+ QVERIFY(viewer.open(file));
+ qInstallMsgHandler(old);
+
+ if (viewer.view()->status() == QDeclarativeView::Error)
+ qWarning() << viewer.view()->errors();
+
+ QCOMPARE(viewer.view()->status(), QDeclarativeView::Ready);
+ viewer.show();
+
+ QTest::qWaitForWindowShown(&viewer);
}
QTEST_MAIN(tst_examples)
diff --git a/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml b/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
index c00173d..714ae7c 100644
--- a/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
+++ b/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
@@ -1,58 +1,49 @@
import Qt 4.6
import Qt.widgets 4.6
-QGraphicsView {
- objectName: "GView"
- size: "800x600"
-
- QGraphicsScene {
- objectName: "GScene"
- sceneRect: "0,0,500x300"
-
+QGraphicsWidget {
+ layout: QGraphicsLinearLayout {
+ orientation: Qt.Horizontal
QGraphicsWidget {
layout: QGraphicsLinearLayout {
- orientation: Qt.Horizontal
- QGraphicsWidget {
- layout: QGraphicsLinearLayout {
- spacing: 10; orientation: Qt.Vertical
- LayoutItem {
- QGraphicsLinearLayout.stretchFactor: 1
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent }
- }
- LayoutItem {
- QGraphicsLinearLayout.stretchFactor: 10
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "blue"; anchors.fill: parent }
- }
- }
+ spacing: 10; orientation: Qt.Vertical
+ LayoutItem {
+ QGraphicsLinearLayout.stretchFactor: 1
+ objectName: "left"
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent }
}
- QGraphicsWidget {
- layout: QGraphicsLinearLayout {
- spacing: 10; orientation: Qt.Vertical
- LayoutItem {
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "red"; anchors.fill: parent }
- }
- LayoutItem {
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "green"; anchors.fill: parent }
- }
- }
+ LayoutItem {
+ QGraphicsLinearLayout.stretchFactor: 10
+ objectName: "left"
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { objectName: "yellowRect"; color: "blue"; anchors.fill: parent }
+ }
+ }
+ }
+ QGraphicsWidget {
+ layout: QGraphicsLinearLayout {
+ spacing: 10; orientation: Qt.Vertical
+ LayoutItem {
+ objectName: "left"
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { objectName: "yellowRect"; color: "red"; anchors.fill: parent }
+ }
+ LayoutItem {
+ objectName: "left"
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { objectName: "yellowRect"; color: "green"; anchors.fill: parent }
}
}
}
}
}
+
diff --git a/tests/auto/declarative/graphicswidgets/graphicswidgets.pro b/tests/auto/declarative/graphicswidgets/graphicswidgets.pro
index 712c34c..b77b430 100644
--- a/tests/auto/declarative/graphicswidgets/graphicswidgets.pro
+++ b/tests/auto/declarative/graphicswidgets/graphicswidgets.pro
@@ -6,3 +6,5 @@ SOURCES += tst_graphicswidgets.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp b/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp
index a85ceed..f1a71d5 100644
--- a/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp
+++ b/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp
@@ -42,7 +42,7 @@
#include <QFile>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
-#include <QtGui/qgraphicsview.h>
+#include <QtGui/qgraphicswidget.h>
class tst_graphicswidgets : public QObject
@@ -63,12 +63,9 @@ void tst_graphicswidgets::widgets()
{
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/graphicswidgets.qml"));
- QGraphicsView *obj = qobject_cast<QGraphicsView*>(c.create());
+ QGraphicsWidget *obj = qobject_cast<QGraphicsWidget*>(c.create());
QVERIFY(obj != 0);
- QVERIFY(obj->scene() != 0);
- QList<QObject*> list;
- QVERIFY(obj->scene()->children() != list);
delete obj;
}
diff --git a/tests/auto/declarative/parserstress/parserstress.pro b/tests/auto/declarative/parserstress/parserstress.pro
index 48f147a..8830511 100644
--- a/tests/auto/declarative/parserstress/parserstress.pro
+++ b/tests/auto/declarative/parserstress/parserstress.pro
@@ -5,3 +5,6 @@ macx:CONFIG -= app_bundle
SOURCES += tst_parserstress.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp
index 6ff5515..41c0a1b 100644
--- a/tests/auto/declarative/parserstress/tst_parserstress.cpp
+++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp
@@ -113,7 +113,7 @@ void tst_parserstress::ecmascript()
QString dataStr = QString::fromUtf8(data);
- QString qml = "import Qt 4.6\n";
+ QString qml = "import Qt 4.7\n";
qml+= "\n";
qml+= "QtObject {\n";
qml+= " property int test\n";
@@ -121,10 +121,8 @@ void tst_parserstress::ecmascript()
qml+= dataStr + "\n";
qml+= " return 1;\n";
qml+= " }\n";
- qml+= " Script {\n";
- qml+= " function stress() {\n";
+ qml+= " function stress() {\n";
qml+= dataStr;
- qml+= " }\n";
qml+= " }\n";
qml+= "}\n";
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml b/tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml
new file mode 100644
index 0000000..ba424b9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml
@@ -0,0 +1,163 @@
+import Qt 4.6
+import Qt.widgets 4.7
+
+Rectangle {
+ color: "white"
+ width: 240
+ height: 320
+ Rectangle { id: masterRect; objectName: "masterRect"; x: 26; width: 96; height: 20; color: "red" }
+ QGraphicsWidget {
+ id: rect1; objectName: "rect1"
+ y: 20; width: 10; height: 10
+ anchors.left: masterRect.left
+ }
+ QGraphicsWidget {
+ id: rect2; objectName: "rect2"
+ y: 20; width: 10; height: 10
+ anchors.left: masterRect.right
+ }
+ QGraphicsWidget {
+ id: rect3; objectName: "rect3"
+ y: 20; width: 10; height: 10
+ anchors.left: masterRect.horizontalCenter
+ }
+ QGraphicsWidget {
+ id: rect4; objectName: "rect4"
+ y: 30; width: 10; height: 10
+ anchors.right: masterRect.left
+ }
+ QGraphicsWidget {
+ id: rect5; objectName: "rect5"
+ y: 30; width: 10; height: 10
+ anchors.right: masterRect.right
+ }
+ QGraphicsWidget {
+ id: rect6; objectName: "rect6"
+ y: 30; width: 10; height: 10
+ anchors.right: masterRect.horizontalCenter
+ }
+ QGraphicsWidget {
+ id: rect7; objectName: "rect7"
+ y: 50; width: 10; height: 10
+ anchors.left: parent.left
+ }
+ QGraphicsWidget {
+ id: rect8; objectName: "rect8"
+ y: 50; width: 10; height: 10
+ anchors.left: parent.right
+ }
+ QGraphicsWidget {
+ id: rect9; objectName: "rect9"
+ y: 50; width: 10; height: 10
+ anchors.left: parent.horizontalCenter
+ }
+ QGraphicsWidget {
+ id: rect10; objectName: "rect10"
+ y: 60; width: 10; height: 10
+ anchors.right: parent.left
+ }
+ QGraphicsWidget {
+ id: rect11; objectName: "rect11"
+ y: 60; width: 10; height: 10
+ anchors.right: parent.right
+ }
+ QGraphicsWidget {
+ id: rect12; objectName: "rect12"
+ y: 60; width: 10; height: 10
+ anchors.right: parent.horizontalCenter
+ }
+ QGraphicsWidget {
+ id: rect13; objectName: "rect13"
+ x: 200; width: 10; height: 10
+ anchors.top: masterRect.bottom
+ }
+ QGraphicsWidget {
+ id: rect14; objectName: "rect14"
+ width: 10; height: 10;
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ QGraphicsWidget {
+ id: rect15; objectName: "rect15"
+ y: 200; height: 10
+ anchors.left: masterRect.left
+ anchors.right: masterRect.right
+ }
+ QGraphicsWidget {
+ id: rect16; objectName: "rect16"
+ y: 220; height: 10
+ anchors.left: masterRect.left
+ anchors.horizontalCenter: masterRect.right
+ }
+ QGraphicsWidget {
+ id: rect17; objectName: "rect17"
+ y: 240; height: 10
+ anchors.right: masterRect.right
+ anchors.horizontalCenter: masterRect.left
+ }
+ QGraphicsWidget {
+ id: rect18; objectName: "rect18"
+ x: 180; width: 10
+ anchors.top: masterRect.bottom
+ anchors.bottom: rect12.top
+ }
+ QGraphicsWidget {
+ id: rect19; objectName: "rect19"
+ y: 70; width: 10; height: 10
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ QGraphicsWidget {
+ id: rect20; objectName: "rect20"
+ y: 70; width: 10; height: 10
+ anchors.horizontalCenter: parent.right
+ }
+ QGraphicsWidget {
+ id: rect21; objectName: "rect21"
+ y: 70; width: 10; height: 10
+ anchors.horizontalCenter: parent.left
+ }
+ QGraphicsWidget {
+ id: rect22; objectName: "rect22"
+ width: 10; height: 10
+ anchors.centerIn: masterRect
+ }
+ QGraphicsWidget {
+ id: rect23; objectName: "rect23"
+ anchors.left: masterRect.left
+ anchors.leftMargin: 5
+ anchors.right: masterRect.right
+ anchors.rightMargin: 5
+ anchors.top: masterRect.top
+ anchors.topMargin: 5
+ anchors.bottom: masterRect.bottom
+ anchors.bottomMargin: 5
+ }
+ QGraphicsWidget {
+ id: rect24; objectName: "rect24"
+ width: 10; height: 10
+ anchors.horizontalCenter: masterRect.left
+ anchors.horizontalCenterOffset: width/2
+ }
+ QGraphicsWidget {
+ id: rect25; objectName: "rect25"
+ width: 10; height: 10
+ anchors.verticalCenter: rect12.top
+ anchors.verticalCenterOffset: height/2
+ }
+ Rectangle {
+ id: rect26; objectName: "rect26"
+ width: 10; height: 10
+ anchors.baseline: masterRect.top
+ anchors.baselineOffset: height/2
+ }
+ Text {
+ id: text1; objectName: "text1"
+ y: 200;
+ text: "Hello"
+ }
+ Text {
+ id: text2; objectName: "text2"
+ anchors.baseline: text1.baseline
+ anchors.left: text1.right
+ text: "World"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
index ca2f68f..a2403f2 100644
--- a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
+++ b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
@@ -4,3 +4,6 @@ SOURCES += tst_qdeclarativeanchors.cpp
macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
index 16ae7fc..01b5bc5 100644
--- a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
+++ b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
@@ -40,6 +40,8 @@
****************************************************************************/
#include <qtest.h>
#include <QSignalSpy>
+#include <QtGui/QGraphicsWidget>
+#include <private/qgraphicsitem_p.h>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
#include <QtDeclarative/qdeclarativeview.h>
@@ -59,9 +61,11 @@ public:
template<typename T>
T *findItem(QGraphicsObject *parent, const QString &id);
+ QGraphicsObject *findObject(QGraphicsObject *parent, const QString &objectName);
private slots:
void basicAnchors();
+ void basicAnchorsQGraphicsWidget();
void loops();
void illegalSets();
void illegalSets_data();
@@ -99,6 +103,25 @@ T *tst_qdeclarativeanchors::findItem(QGraphicsObject *parent, const QString &obj
return 0;
}
+QGraphicsObject *tst_qdeclarativeanchors::findObject(QGraphicsObject *parent, const QString &objectName)
+{
+ QList<QGraphicsItem *> children = parent->childItems();
+ for (int i = 0; i < children.count(); ++i) {
+ QGraphicsObject *item = children.at(i)->toGraphicsObject();
+ if (item) {
+ if (objectName.isEmpty() || item->objectName() == objectName) {
+ return item;
+ }
+ item = findObject(item, objectName);
+ if (item)
+ return item;
+ }
+ }
+
+ return 0;
+}
+
+
void tst_qdeclarativeanchors::basicAnchors()
{
QDeclarativeView *view = new QDeclarativeView;
@@ -166,6 +189,73 @@ void tst_qdeclarativeanchors::basicAnchors()
delete view;
}
+void tst_qdeclarativeanchors::basicAnchorsQGraphicsWidget()
+{
+ QDeclarativeView *view = new QDeclarativeView;
+ view->setSource(QUrl::fromLocalFile(SRCDIR "/data/anchorsqgraphicswidget.qml"));
+
+ qApp->processEvents();
+
+ //sibling horizontal
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect1"))->x(), 26.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect2"))->x(), 122.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect3"))->x(), 74.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect4"))->x(), 16.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect5"))->x(), 112.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect6"))->x(), 64.0);
+
+ //parent horizontal
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect7"))->x(), 0.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect8"))->x(), 240.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect9"))->x(), 120.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect10"))->x(), -10.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect11"))->x(), 230.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect12"))->x(), 110.0);
+
+ //vertical
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect13"))->y(), 20.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect14"))->y(), 155.0);
+
+ //stretch
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect15"))->x(), 26.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect15"))->property("width").toReal(), 96.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect16"))->x(), 26.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect16"))->property("width").toReal(), 192.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect17"))->x(), -70.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect17"))->property("width").toReal(), 192.0);
+
+ //vertical stretch
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect18"))->y(), 20.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect18"))->property("height").toReal(), 40.0);
+
+ //more parent horizontal
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect19"))->x(), 115.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect20"))->x(), 235.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect21"))->x(), -5.0);
+
+ //centerIn
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect22"))->x(), 69.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect22"))->y(), 5.0);
+
+ //margins
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect23"))->x(), 31.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect23"))->y(), 5.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect23"))->property("width").toReal(), 86.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect23"))->property("height").toReal(), 10.0);
+
+ // offsets
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect24"))->x(), 26.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect25"))->y(), 60.0);
+ QCOMPARE(findObject(view->rootObject(), QLatin1String("rect26"))->y(), 5.0);
+
+ //baseline
+ QDeclarativeText *text1 = findItem<QDeclarativeText>(view->rootObject(), QLatin1String("text1"));
+ QDeclarativeText *text2 = findItem<QDeclarativeText>(view->rootObject(), QLatin1String("text2"));
+ QCOMPARE(text1->y(), text2->y());
+
+ delete view;
+}
+
// mostly testing that we don't crash
void tst_qdeclarativeanchors::loops()
{
@@ -207,7 +297,7 @@ void tst_qdeclarativeanchors::illegalSets()
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\n" + qml.toUtf8()), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\n" + qml.toUtf8()), QUrl::fromLocalFile(""));
if (!component.isReady())
qWarning() << "Test errors:" << component.errors();
QVERIFY(component.isReady());
@@ -372,6 +462,16 @@ void tst_qdeclarativeanchors::crash1()
QUrl source(QUrl::fromLocalFile(SRCDIR "/data/crash1.qml"));
QString expect = "QML Text (" + source.toString() + ":4:5" + ") Possible anchor loop detected on fill.";
+
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+
+ // QT-3245 ... anchor loop detection needs improving.
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
QDeclarativeView *view = new QDeclarativeView(source);
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/qmldir b/tests/auto/declarative/qdeclarativeanimatedimage/data/qmldir
new file mode 100644
index 0000000..ef7c1f4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/qmldir
@@ -0,0 +1 @@
+# No local types
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanerror1.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanerror1.qml
new file mode 100644
index 0000000..5b0bdcb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanerror1.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+AnimatedImage {
+ sourceSize: "240x180"
+ source: "stickman.gif"
+}
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanscaled.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanscaled.qml
new file mode 100644
index 0000000..f4d277a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanscaled.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+AnimatedImage {
+ width: 240
+ height: 180
+ source: "stickman.gif"
+}
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
index 2904986..74f9be0 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
@@ -5,3 +5,6 @@ SOURCES += tst_qdeclarativeanimatedimage.cpp ../shared/testhttpserver.cpp
macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
index 31efc64..0fb080c 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
@@ -72,6 +72,8 @@ private slots:
void frameCount();
void remote();
void remote_data();
+ void sourceSize();
+ void sourceSizeReadOnly();
void invalidSource();
};
@@ -139,12 +141,12 @@ void tst_qdeclarativeanimatedimage::remote()
QFETCH(QString, fileName);
QFETCH(bool, paused);
- TestHTTPServer server(14445);
+ TestHTTPServer server(14449);
QVERIFY(server.isValid());
server.serveDirectory(SRCDIR "/data");
QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("http://127.0.0.1:14445/" + fileName));
+ QDeclarativeComponent component(&engine, QUrl("http://127.0.0.1:14449/" + fileName));
TRY_WAIT(component.isReady());
QDeclarativeAnimatedImage *anim = qobject_cast<QDeclarativeAnimatedImage *>(component.create());
@@ -155,10 +157,32 @@ void tst_qdeclarativeanimatedimage::remote()
TRY_WAIT(anim->isPaused());
QCOMPARE(anim->currentFrame(), 2);
}
+ QVERIFY(anim->status() != QDeclarativeAnimatedImage::Error);
delete anim;
}
+void tst_qdeclarativeanimatedimage::sourceSize()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/stickmanscaled.qml"));
+ QDeclarativeAnimatedImage *anim = qobject_cast<QDeclarativeAnimatedImage *>(component.create());
+ QVERIFY(anim);
+ QCOMPARE(anim->width(),240.0);
+ QCOMPARE(anim->height(),180.0);
+ QCOMPARE(anim->sourceSize(),QSize(160,120));
+
+ delete anim;
+}
+
+void tst_qdeclarativeanimatedimage::sourceSizeReadOnly()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/stickmanerror1.qml"));
+ QVERIFY(component.isError());
+ QCOMPARE(component.errors().at(0).description(), QString("Invalid property assignment: \"sourceSize\" is a read-only property"));
+}
+
void tst_qdeclarativeanimatedimage::remote_data()
{
QTest::addColumn<QString>("fileName");
@@ -172,7 +196,7 @@ void tst_qdeclarativeanimatedimage::invalidSource()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6\n AnimatedImage { source: \"no-such-file.gif\" }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7\n AnimatedImage { source: \"no-such-file.gif\" }", QUrl::fromLocalFile(""));
QVERIFY(component.isReady());
QTest::ignoreMessage(QtWarningMsg, "Error Reading Animated Image File QUrl( \"file:no-such-file.gif\" ) ");
diff --git a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
index 8eac75f..ce38eeb 100644
--- a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
+++ b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
@@ -4,3 +4,6 @@ SOURCES += tst_qdeclarativeanimations.cpp
macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
index f018ce1..959cc19 100644
--- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -648,7 +648,7 @@ void tst_qdeclarativeanimations::easingProperties()
{
{
QDeclarativeEngine engine;
- QString componentStr = "import Qt 4.6\nNumberAnimation { easing.type: \"InOutQuad\" }";
+ QString componentStr = "import Qt 4.7\nNumberAnimation { easing.type: \"InOutQuad\" }";
QDeclarativeComponent animationComponent(&engine);
animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
@@ -659,7 +659,7 @@ void tst_qdeclarativeanimations::easingProperties()
{
QDeclarativeEngine engine;
- QString componentStr = "import Qt 4.6\nPropertyAnimation { easing.type: \"OutBounce\"; easing.amplitude: 5.0 }";
+ QString componentStr = "import Qt 4.7\nPropertyAnimation { easing.type: \"OutBounce\"; easing.amplitude: 5.0 }";
QDeclarativeComponent animationComponent(&engine);
animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
@@ -671,7 +671,7 @@ void tst_qdeclarativeanimations::easingProperties()
{
QDeclarativeEngine engine;
- QString componentStr = "import Qt 4.6\nPropertyAnimation { easing.type: \"OutElastic\"; easing.amplitude: 5.0; easing.period: 3.0}";
+ QString componentStr = "import Qt 4.7\nPropertyAnimation { easing.type: \"OutElastic\"; easing.amplitude: 5.0; easing.period: 3.0}";
QDeclarativeComponent animationComponent(&engine);
animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
@@ -684,7 +684,7 @@ void tst_qdeclarativeanimations::easingProperties()
{
QDeclarativeEngine engine;
- QString componentStr = "import Qt 4.6\nPropertyAnimation { easing.type: \"InOutBack\"; easing.overshoot: 2 }";
+ QString componentStr = "import Qt 4.7\nPropertyAnimation { easing.type: \"InOutBack\"; easing.overshoot: 2 }";
QDeclarativeComponent animationComponent(&engine);
animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml b/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml
index e982f21..e9fb286 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml
@@ -9,7 +9,7 @@ Rectangle {
objectName: "MyRect"
width: 100; height: 100; color: "green"
x: basex
- Behavior on x { NumberAnimation { duration: 500; } }
+ Behavior on x { NumberAnimation { duration: 800; } }
}
MouseArea {
id: clicker
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml b/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml
index b22441a..795b309 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml
@@ -11,6 +11,6 @@ Rectangle {
id: rect
objectName: "MyRect"
width: 100; height: 100; color: "green"
- Behavior on x { NumberAnimation { duration: 500; } }
+ Behavior on x { NumberAnimation { duration: 800; } }
}
}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/startup.qml b/tests/auto/declarative/qdeclarativebehaviors/data/startup.qml
new file mode 100644
index 0000000..f3ff620
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/startup.qml
@@ -0,0 +1,17 @@
+import Qt 4.7
+
+Rectangle {
+ width: 400
+ height: 400
+
+ Rectangle {
+ objectName: "innerRect"
+ height: 100; width: 100; color: "green"
+ property real targetX: 100
+
+ x: targetX
+ Behavior on x {
+ NumberAnimation {}
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
index a1dac32..c2781b8 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
+++ b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
@@ -4,3 +4,6 @@ SOURCES += tst_qdeclarativebehaviors.cpp
macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
index 26c8231..3bff2f5 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
+++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
@@ -45,6 +45,7 @@
#include <private/qdeclarativerectangle_p.h>
#include <private/qdeclarativebehavior_p.h>
#include <private/qdeclarativeanimation_p.h>
+#include "../../../shared/util.h"
class tst_qdeclarativebehaviors : public QObject
{
@@ -68,6 +69,7 @@ private slots:
void reassignedAnimation();
void disabled();
void dontStart();
+ void startup();
};
void tst_qdeclarativebehaviors::simpleBehavior()
@@ -75,13 +77,13 @@ void tst_qdeclarativebehaviors::simpleBehavior()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/simple.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
- QVERIFY(qobject_cast<QDeclarativeBehavior*>(rect->findChild<QDeclarativeBehavior*>("MyBehavior"))->animation());
+ QTRY_VERIFY(rect);
+ QTRY_VERIFY(qobject_cast<QDeclarativeBehavior*>(rect->findChild<QDeclarativeBehavior*>("MyBehavior"))->animation());
rect->setState("moved");
- QTest::qWait(200);
- qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
- QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() > 0);
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() < 200);
+ //i.e. the behavior has been triggered
delete rect;
}
@@ -91,12 +93,12 @@ void tst_qdeclarativebehaviors::scriptTriggered()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/scripttrigger.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QTRY_VERIFY(rect);
rect->setColor(QColor("red"));
- QTest::qWait(200);
- qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
- QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() > 0);
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() < 200);
+ //i.e. the behavior has been triggered
delete rect;
}
@@ -106,15 +108,14 @@ void tst_qdeclarativebehaviors::cppTriggered()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/cpptrigger.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QTRY_VERIFY(rect);
QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
- QVERIFY(innerRect);
+ QTRY_VERIFY(innerRect);
innerRect->setProperty("x", 200);
- QTest::qWait(200);
- qreal x = innerRect->x();
- QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+ QTRY_VERIFY(innerRect->x() > 0);
+ QTRY_VERIFY(innerRect->x() < 200); //i.e. the behavior has been triggered
delete rect;
}
@@ -124,7 +125,7 @@ void tst_qdeclarativebehaviors::loop()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/loop.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QTRY_VERIFY(rect);
//don't crash
rect->setState("moved");
@@ -137,12 +138,12 @@ void tst_qdeclarativebehaviors::colorBehavior()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/color.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QTRY_VERIFY(rect);
rect->setState("red");
- QTest::qWait(200);
- QColor color = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->color();
- QVERIFY(color != QColor("red") && color != QColor("green")); //i.e. the behavior has been triggered
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->color() != QColor("red"));
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->color() != QColor("green"));
+ //i.e. the behavior has been triggered
delete rect;
}
@@ -152,16 +153,11 @@ void tst_qdeclarativebehaviors::parentBehavior()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/parent.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QTRY_VERIFY(rect);
rect->setState("reparented");
- QTest::qWait(200);
- QDeclarativeItem *newParent = rect->findChild<QDeclarativeItem*>("NewParent");
- QDeclarativeItem *parent = rect->findChild<QDeclarativeRectangle*>("MyRect")->parentItem();
- QVERIFY(parent != newParent);
- QTest::qWait(600);
- parent = rect->findChild<QDeclarativeRectangle*>("MyRect")->parentItem();
- QVERIFY(parent == newParent);
+ QTRY_VERIFY(rect->findChild<QDeclarativeRectangle*>("MyRect")->parentItem() != rect->findChild<QDeclarativeItem*>("NewParent"));
+ QTRY_VERIFY(rect->findChild<QDeclarativeRectangle*>("MyRect")->parentItem() == rect->findChild<QDeclarativeItem*>("NewParent"));
delete rect;
}
@@ -171,33 +167,28 @@ void tst_qdeclarativebehaviors::replaceBinding()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/binding.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QTRY_VERIFY(rect);
rect->setState("moved");
- QTest::qWait(200);
QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
- QVERIFY(innerRect);
- qreal x = innerRect->x();
- QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
- QTest::qWait(600);
- QCOMPARE(innerRect->x(), (qreal)200);
+ QTRY_VERIFY(innerRect);
+ QTRY_VERIFY(innerRect->x() > 0);
+ QTRY_VERIFY(innerRect->x() < 200);
+ //i.e. the behavior has been triggered
+ QTRY_COMPARE(innerRect->x(), (qreal)200);
rect->setProperty("basex", 10);
- QCOMPARE(innerRect->x(), (qreal)200);
+ QTRY_COMPARE(innerRect->x(), (qreal)200);
rect->setProperty("movedx", 210);
- QTest::qWait(600);
- QCOMPARE(innerRect->x(), (qreal)210);
+ QTRY_COMPARE(innerRect->x(), (qreal)210);
rect->setState("");
- QTest::qWait(200);
- x = innerRect->x();
- QVERIFY(x > 10 && x < 210); //i.e. the behavior has been triggered
- QTest::qWait(600);
- QCOMPARE(innerRect->x(), (qreal)10);
+ QTRY_VERIFY(innerRect->x() > 10);
+ QTRY_VERIFY(innerRect->x() < 210); //i.e. the behavior has been triggered
+ QTRY_COMPARE(innerRect->x(), (qreal)10);
rect->setProperty("movedx", 200);
- QCOMPARE(innerRect->x(), (qreal)10);
+ QTRY_COMPARE(innerRect->x(), (qreal)10);
rect->setProperty("basex", 20);
- QTest::qWait(600);
- QCOMPARE(innerRect->x(), (qreal)20);
+ QTRY_COMPARE(innerRect->x(), (qreal)20);
delete rect;
}
@@ -208,12 +199,13 @@ void tst_qdeclarativebehaviors::group()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/groupProperty.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QTRY_VERIFY(rect);
rect->setState("moved");
- QTest::qWait(200);
- qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
- QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+ //QTest::qWait(200);
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() > 0);
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() < 200);
+ //i.e. the behavior has been triggered
delete rect;
}
@@ -222,12 +214,12 @@ void tst_qdeclarativebehaviors::group()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/groupProperty2.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QTRY_VERIFY(rect);
rect->setState("moved");
- QTest::qWait(200);
- qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
- QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() > 0);
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() < 200);
+ //i.e. the behavior has been triggered
delete rect;
}
@@ -238,46 +230,42 @@ void tst_qdeclarativebehaviors::emptyBehavior()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/empty.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QTRY_VERIFY(rect);
rect->setState("moved");
qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
- QCOMPARE(x, qreal(200)); //should change immediately
+ QTRY_COMPARE(x, qreal(200)); //should change immediately
delete rect;
}
void tst_qdeclarativebehaviors::explicitSelection()
{
- {
- QDeclarativeEngine engine;
- QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/explicit.qml"));
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/explicit.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QTRY_VERIFY(rect);
- rect->setState("moved");
- QTest::qWait(200);
- qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
- QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+ rect->setState("moved");
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() > 0);
+ QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() < 200);
+ //i.e. the behavior has been triggered
- delete rect;
- }
+ delete rect;
}
void tst_qdeclarativebehaviors::nonSelectingBehavior()
{
- {
- QDeclarativeEngine engine;
- QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/nonSelecting2.qml"));
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/nonSelecting2.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QTRY_VERIFY(rect);
- rect->setState("moved");
- qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
- QCOMPARE(x, qreal(200)); //should change immediately
+ rect->setState("moved");
+ qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
+ QTRY_COMPARE(x, qreal(200)); //should change immediately
- delete rect;
- }
+ delete rect;
}
void tst_qdeclarativebehaviors::reassignedAnimation()
@@ -286,8 +274,8 @@ void tst_qdeclarativebehaviors::reassignedAnimation()
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/reassignedAnimation.qml"));
QTest::ignoreMessage(QtWarningMsg, QString("QML Behavior (" + QUrl::fromLocalFile(SRCDIR "/data/reassignedAnimation.qml").toString() + ":9:9) Cannot change the animation assigned to a Behavior.").toUtf8().constData());
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
- QCOMPARE(qobject_cast<QDeclarativeNumberAnimation*>(
+ QTRY_VERIFY(rect);
+ QTRY_COMPARE(qobject_cast<QDeclarativeNumberAnimation*>(
qobject_cast<QDeclarativeBehavior*>(
rect->findChild<QDeclarativeBehavior*>("MyBehavior"))->animation())->duration(), 200);
@@ -299,12 +287,12 @@ void tst_qdeclarativebehaviors::disabled()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/disabled.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
- QCOMPARE(rect->findChild<QDeclarativeBehavior*>("MyBehavior")->enabled(), false);
+ QTRY_VERIFY(rect);
+ QTRY_COMPARE(rect->findChild<QDeclarativeBehavior*>("MyBehavior")->enabled(), false);
rect->setState("moved");
qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
- QCOMPARE(x, qreal(200)); //should change immediately
+ QTRY_COMPARE(x, qreal(200)); //should change immediately
delete rect;
}
@@ -317,11 +305,26 @@ void tst_qdeclarativebehaviors::dontStart()
QTest::ignoreMessage(QtWarningMsg, "QDeclarativeAbstractAnimation: setRunning() cannot be used on non-root animation nodes");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QVERIFY(rect);
+ QTRY_VERIFY(rect);
QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim");
- QVERIFY(myAnim && myAnim->qtAnimation());
- QVERIFY(myAnim->qtAnimation()->state() == QAbstractAnimation::Stopped);
+ QTRY_VERIFY(myAnim && myAnim->qtAnimation());
+ QTRY_VERIFY(myAnim->qtAnimation()->state() == QAbstractAnimation::Stopped);
+
+ delete rect;
+}
+
+void tst_qdeclarativebehaviors::startup()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/startup.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QTRY_VERIFY(rect);
+
+ QDeclarativeRectangle *innerRect = rect->findChild<QDeclarativeRectangle*>("innerRect");
+ QTRY_VERIFY(innerRect);
+
+ QTRY_COMPARE(innerRect->x(), qreal(100)); //should be set immediately
delete rect;
}
diff --git a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
index 7879976..04dd6f5 100644
--- a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
+++ b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
@@ -6,3 +6,6 @@ SOURCES += tst_qdeclarativebinding.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
index 0574ddb..e754923 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
+++ b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
@@ -7,3 +7,6 @@ SOURCES += tst_qdeclarativeborderimage.cpp ../shared/testhttpserver.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
index 8aeba6d..8621239 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
+++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
@@ -55,8 +55,8 @@
#include "../shared/testhttpserver.h"
-#define SERVER_PORT 14445
-#define SERVER_ADDR "http://127.0.0.1:14445"
+#define SERVER_PORT 14446
+#define SERVER_ADDR "http://127.0.0.1:14446"
#define TRY_WAIT(expr) \
do { \
@@ -99,7 +99,7 @@ tst_qdeclarativeborderimage::tst_qdeclarativeborderimage()
void tst_qdeclarativeborderimage::noSource()
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"\" }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -121,10 +121,10 @@ void tst_qdeclarativeborderimage::imageSource_data()
QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << false << "";
QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() << false
- << "Cannot open QUrl( \"" + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() + "\" ) ";
+ << "QML BorderImage (file::2:1) Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString();
QTest::newRow("remote") << SERVER_ADDR "/colors.png" << true << "";
QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << true
- << "\"Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found\" ";
+ << "QML BorderImage (file::2:1) Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found";
}
void tst_qdeclarativeborderimage::imageSource()
@@ -143,12 +143,12 @@ void tst_qdeclarativeborderimage::imageSource()
if (!error.isEmpty())
QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + source + "\" }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + source + "\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
QVERIFY(obj != 0);
-
+
if (remote)
TRY_WAIT(obj->status() == QDeclarativeBorderImage::Loading);
@@ -170,7 +170,7 @@ void tst_qdeclarativeborderimage::imageSource()
void tst_qdeclarativeborderimage::clearSource()
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: srcImage }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: srcImage }";
QDeclarativeContext *ctxt = engine.rootContext();
ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/colors.png"));
QDeclarativeComponent component(&engine);
@@ -190,7 +190,7 @@ void tst_qdeclarativeborderimage::clearSource()
void tst_qdeclarativeborderimage::resized()
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() + "\"; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() + "\"; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -205,7 +205,7 @@ void tst_qdeclarativeborderimage::resized()
void tst_qdeclarativeborderimage::smooth()
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -222,7 +222,7 @@ void tst_qdeclarativeborderimage::smooth()
void tst_qdeclarativeborderimage::tileModes()
{
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 100; height: 300; horizontalTileMode: BorderImage.Repeat; verticalTileMode: BorderImage.Repeat }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 100; height: 300; horizontalTileMode: BorderImage.Repeat; verticalTileMode: BorderImage.Repeat }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -235,7 +235,7 @@ void tst_qdeclarativeborderimage::tileModes()
delete obj;
}
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 150; horizontalTileMode: BorderImage.Round; verticalTileMode: BorderImage.Round }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 150; horizontalTileMode: BorderImage.Round; verticalTileMode: BorderImage.Round }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -262,19 +262,19 @@ void tst_qdeclarativeborderimage::sciSource()
server->serveDirectory(SRCDIR "/data");
}
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + source + "\"; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + source + "\"; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
QVERIFY(obj != 0);
-
+
if (remote)
TRY_WAIT(obj->status() == QDeclarativeBorderImage::Loading);
-
+
QCOMPARE(obj->source(), remote ? source : QUrl(source));
QCOMPARE(obj->width(), 300.);
QCOMPARE(obj->height(), 300.);
-
+
if (valid) {
TRY_WAIT(obj->status() == QDeclarativeBorderImage::Ready);
QCOMPARE(obj->border()->left(), 10);
@@ -307,7 +307,7 @@ void tst_qdeclarativeborderimage::invalidSciFile()
QTest::ignoreMessage(QtWarningMsg, "Unknown tile rule specified. Using Stretch "); // for "Roun"
QTest::ignoreMessage(QtWarningMsg, "Unknown tile rule specified. Using Stretch "); // for "Repea"
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/invalid.sci").toString() +"\"; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/invalid.sci").toString() +"\"; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -325,7 +325,7 @@ void tst_qdeclarativeborderimage::pendingRemoteRequest()
{
QFETCH(QString, source);
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + source + "\" }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + source + "\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -342,8 +342,8 @@ void tst_qdeclarativeborderimage::pendingRemoteRequest_data()
{
QTest::addColumn<QString>("source");
- QTest::newRow("png file") << "http://no-such-qt-server-like-this/none.png";
- QTest::newRow("sci file") << "http://no-such-qt-server-like-this/none.sci";
+ QTest::newRow("png file") << "http://localhost/none.png";
+ QTest::newRow("sci file") << "http://localhost/none.sci";
}
QTEST_MAIN(tst_qdeclarativeborderimage)
diff --git a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
index c7affb7..e58c798 100644
--- a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
+++ b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
@@ -6,3 +6,6 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativecomponent.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
index a6adfa4..959354d 100644
--- a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
+++ b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
@@ -6,3 +6,6 @@ SOURCES += tst_qdeclarativeconnection.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
index adace70..5db9a9e 100644
--- a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
+++ b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
@@ -4,3 +4,6 @@ SOURCES += tst_qdeclarativecontext.cpp
macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
index be20ba1..851460f 100644
--- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
+++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
@@ -172,8 +172,8 @@ void tst_qdeclarativecontext::parentContext()
delete ctxt2; ctxt2 = 0;
QCOMPARE(ctxt->parentContext(), engine->rootContext());
- QCOMPARE(ctxt3->parentContext(), ctxt2);
- QCOMPARE(ctxt4->parentContext(), ctxt2);
+ QCOMPARE(ctxt3->parentContext(), (QDeclarativeContext *)0);
+ QCOMPARE(ctxt4->parentContext(), (QDeclarativeContext *)0);
QCOMPARE(ctxt5->parentContext(), ctxt);
QCOMPARE(ctxt6->parentContext(), engine->rootContext());
QCOMPARE(ctxt7->parentContext(), engine->rootContext());
@@ -181,9 +181,9 @@ void tst_qdeclarativecontext::parentContext()
delete engine; engine = 0;
QCOMPARE(ctxt->parentContext(), (QDeclarativeContext *)0);
- QCOMPARE(ctxt3->parentContext(), ctxt2);
- QCOMPARE(ctxt4->parentContext(), ctxt2);
- QCOMPARE(ctxt5->parentContext(), ctxt);
+ 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);
@@ -228,7 +228,7 @@ private:
#define TEST_CONTEXT_PROPERTY(ctxt, name, value) \
{ \
QDeclarativeComponent component(&engine); \
- component.setData("import Qt 4.6; QtObject { property var test: " #name " }", QUrl()); \
+ component.setData("import Qt 4.7; QtObject { property variant test: " #name " }", QUrl()); \
\
QObject *obj = component.create(ctxt); \
\
@@ -278,7 +278,7 @@ void tst_qdeclarativecontext::setContextProperty()
// Changes in context properties
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant test: a }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -290,7 +290,7 @@ void tst_qdeclarativecontext::setContextProperty()
}
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var test: b }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant test: b }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -304,7 +304,7 @@ void tst_qdeclarativecontext::setContextProperty()
}
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var test: e.a }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant test: e.a }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -318,7 +318,7 @@ void tst_qdeclarativecontext::setContextProperty()
// New context properties
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant test: a }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -332,7 +332,7 @@ void tst_qdeclarativecontext::setContextProperty()
// Setting an object-variant context property
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { id: root; property int a: 10; property int test: ctxtProp.a; property var obj: root; }", QUrl());
+ component.setData("import Qt 4.7; QtObject { id: root; property int a: 10; property int test: ctxtProp.a; property variant obj: root; }", QUrl());
QDeclarativeContext ctxt(engine.rootContext());
ctxt.setContextProperty("ctxtProp", QVariant());
@@ -380,7 +380,7 @@ void tst_qdeclarativecontext::setContextObject()
// Changes in context properties
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant test: a }", QUrl());
QObject *obj = component.create(&ctxt);
@@ -412,7 +412,7 @@ void tst_qdeclarativecontext::destruction()
void tst_qdeclarativecontext::idAsContextProperty()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var a; a: QtObject { id: myObject } }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant a; a: QtObject { id: myObject } }", QUrl());
QObject *obj = component.create();
QVERIFY(obj);
@@ -432,7 +432,7 @@ void tst_qdeclarativecontext::idAsContextProperty()
void tst_qdeclarativecontext::readOnlyContexts()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { id: me }", QUrl());
+ component.setData("import Qt 4.7; QtObject { id: me }", QUrl());
QObject *obj = component.create();
QVERIFY(obj);
diff --git a/tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro b/tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro
index ff1d0d4..1214fcf 100644
--- a/tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro
+++ b/tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro
@@ -5,3 +5,6 @@ macx:CONFIG -= app_bundle
HEADERS += ../shared/debugutil_p.h
SOURCES += tst_qdeclarativedebug.cpp \
../shared/debugutil.cpp
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
index d0eb90e..133dcb8 100644
--- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
+++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
@@ -822,7 +822,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
QList<QByteArray> qml;
- qml << "import Qt 4.6\n"
+ qml << "import Qt 4.7\n"
"Item {"
"width: 10; height: 20; scale: blueRect.scale;"
"Rectangle { id: blueRect; width: 500; height: 600; color: \"blue\"; }"
@@ -832,7 +832,7 @@ int main(int argc, char *argv[])
"}"
"}";
// add second component to test multiple root contexts
- qml << "import Qt 4.6\n"
+ qml << "import Qt 4.7\n"
"Item {}";
tst_QDeclarativeDebug_Factory factory;
return QDeclarativeDebugTest::runTests(&factory, qml);
diff --git a/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro b/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro
index e375889..a62e148 100644
--- a/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro
+++ b/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro
@@ -5,3 +5,6 @@ macx:CONFIG -= app_bundle
HEADERS += ../shared/debugutil_p.h
SOURCES += tst_qdeclarativedebugservice.cpp \
../shared/debugutil.cpp
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir
index 5bdd17b..98d6b74 100644
--- a/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir
+++ b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir
@@ -1 +1,2 @@
-Foo Foo.qml
+Foo 1.1 Foo.qml
+Foo 1.0 Foo.qml
diff --git a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
index 35df26e..466c563 100644
--- a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
+++ b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
@@ -5,3 +5,6 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativedom.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
index 79b0c36..1f0c47c 100644
--- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
+++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
@@ -81,7 +81,7 @@ private:
void tst_qdeclarativedom::loadSimple()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {}";
QDeclarativeDomDocument document;
@@ -94,13 +94,13 @@ void tst_qdeclarativedom::loadSimple()
QVERIFY(!rootObject.isCustomType());
QVERIFY(rootObject.objectType() == "Qt/Item");
QVERIFY(rootObject.objectTypeMajorVersion() == 4);
- QVERIFY(rootObject.objectTypeMinorVersion() == 6);
+ QVERIFY(rootObject.objectTypeMinorVersion() == 7);
}
// Test regular properties
void tst_qdeclarativedom::loadProperties()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item { id : item; x : 300; visible : true }";
QDeclarativeDomDocument document;
@@ -134,7 +134,7 @@ void tst_qdeclarativedom::loadProperties()
void tst_qdeclarativedom::loadGroupedProperties()
{
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item { anchors.left: parent.left; anchors.right: parent.right }";
QDeclarativeDomDocument document;
@@ -177,7 +177,7 @@ void tst_qdeclarativedom::loadGroupedProperties()
}
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item { \n"
" anchors {\n"
" left: parent.left\n"
@@ -228,7 +228,7 @@ void tst_qdeclarativedom::loadGroupedProperties()
void tst_qdeclarativedom::loadChildObject()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item { Item {} }";
QDeclarativeDomDocument document;
@@ -273,8 +273,8 @@ void tst_qdeclarativedom::loadComposite()
void tst_qdeclarativedom::testValueSource()
{
- QByteArray qml = "import Qt 4.6\n"
- "Rectangle { SpringFollow on height { spring: 1.4; damping: .15; source: Math.min(Math.max(-130, value*2.2 - 130), 133); }}";
+ QByteArray qml = "import Qt 4.7\n"
+ "Rectangle { SpringFollow on height { spring: 1.4; damping: .15; to: Math.min(Math.max(-130, value*2.2 - 130), 133); }}";
QDeclarativeEngine freshEngine;
QDeclarativeDomDocument document;
@@ -291,13 +291,13 @@ void tst_qdeclarativedom::testValueSource()
QVERIFY(valueSourceObject.isValid());
QVERIFY(valueSourceObject.objectType() == "Qt/SpringFollow");
-
+
const QDeclarativeDomValue springValue = valueSourceObject.property("spring").value();
QVERIFY(!springValue.isInvalid());
QVERIFY(springValue.isLiteral());
QVERIFY(springValue.toLiteral().literal() == "1.4");
- const QDeclarativeDomValue sourceValue = valueSourceObject.property("source").value();
+ const QDeclarativeDomValue sourceValue = valueSourceObject.property("to").value();
QVERIFY(!sourceValue.isInvalid());
QVERIFY(sourceValue.isBinding());
QVERIFY(sourceValue.toBinding().binding() == "Math.min(Math.max(-130, value*2.2 - 130), 133)");
@@ -305,7 +305,7 @@ void tst_qdeclarativedom::testValueSource()
void tst_qdeclarativedom::testValueInterceptor()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Rectangle { Behavior on height { NumberAnimation { duration: 100 } } }";
QDeclarativeEngine freshEngine;
@@ -332,9 +332,9 @@ void tst_qdeclarativedom::testValueInterceptor()
// Test QDeclarativeDomDocument::imports()
void tst_qdeclarativedom::loadImports()
{
- QByteArray qml = "import Qt 4.6\n"
- "import importlib.sublib 4.7\n"
- "import importlib.sublib 4.6 as NewFoo\n"
+ QByteArray qml = "import Qt 4.7\n"
+ "import importlib.sublib 1.1\n"
+ "import importlib.sublib 1.0 as NewFoo\n"
"import 'import'\n"
"import 'import' as X\n"
"Item {}";
@@ -350,19 +350,19 @@ void tst_qdeclarativedom::loadImports()
QCOMPARE(import.type(), QDeclarativeDomImport::Library);
QCOMPARE(import.uri(), QLatin1String("Qt"));
QCOMPARE(import.qualifier(), QString());
- QCOMPARE(import.version(), QLatin1String("4.6"));
+ QCOMPARE(import.version(), QLatin1String("4.7"));
import = document.imports().at(1);
QCOMPARE(import.type(), QDeclarativeDomImport::Library);
QCOMPARE(import.uri(), QLatin1String("importlib.sublib"));
QCOMPARE(import.qualifier(), QString());
- QCOMPARE(import.version(), QLatin1String("4.7"));
+ QCOMPARE(import.version(), QLatin1String("1.1"));
import = document.imports().at(2);
QCOMPARE(import.type(), QDeclarativeDomImport::Library);
QCOMPARE(import.uri(), QLatin1String("importlib.sublib"));
QCOMPARE(import.qualifier(), QLatin1String("NewFoo"));
- QCOMPARE(import.version(), QLatin1String("4.6"));
+ QCOMPARE(import.version(), QLatin1String("1.0"));
import = document.imports().at(3);
QCOMPARE(import.type(), QDeclarativeDomImport::File);
@@ -380,7 +380,7 @@ void tst_qdeclarativedom::loadImports()
// Test loading a file with errors
void tst_qdeclarativedom::loadErrors()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" foo: 12\n"
"}";
@@ -400,7 +400,7 @@ void tst_qdeclarativedom::loadErrors()
// Test loading a file with syntax errors
void tst_qdeclarativedom::loadSyntaxErrors()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"asdf";
QDeclarativeDomDocument document;
@@ -415,10 +415,10 @@ void tst_qdeclarativedom::loadSyntaxErrors()
QCOMPARE(error.description(), QString("Syntax error"));
}
-// Test attempting to load a file with remote references
+// Test attempting to load a file with remote references
void tst_qdeclarativedom::loadRemoteErrors()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" Script {\n"
" source: \"http://localhost/exampleQmlScript.js\""
@@ -440,7 +440,7 @@ void tst_qdeclarativedom::loadRemoteErrors()
void tst_qdeclarativedom::loadDynamicProperty()
{
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" property int a\n"
" property bool b\n"
@@ -450,7 +450,7 @@ void tst_qdeclarativedom::loadDynamicProperty()
" property url f\n"
" property color g\n"
" property date h\n"
- " property var i\n"
+ " property variant i\n"
" property QtObject j\n"
"}";
@@ -483,12 +483,12 @@ void tst_qdeclarativedom::loadDynamicProperty()
DP_TEST(5, f, QVariant::Url, 128, 14, "url");
DP_TEST(6, g, QVariant::Color, 147, 16, "color");
DP_TEST(7, h, QVariant::DateTime, 168, 15, "date");
- DP_TEST(8, i, qMetaTypeId<QVariant>(), 188, 14, "var");
- DP_TEST(9, j, -1, 207, 19, "QtObject");
+ DP_TEST(8, i, qMetaTypeId<QVariant>(), 188, 18, "variant");
+ DP_TEST(9, j, -1, 211, 19, "QtObject");
}
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" property int a: 12\n"
" property int b: a + 6\n"
@@ -502,7 +502,7 @@ void tst_qdeclarativedom::loadDynamicProperty()
QVERIFY(rootObject.isValid());
QCOMPARE(rootObject.dynamicProperties().count(), 3);
-
+
{
QDeclarativeDomDynamicProperty d = rootObject.dynamicProperties().at(0);
QVERIFY(d.isDefaultProperty() == false);
@@ -532,7 +532,7 @@ void tst_qdeclarativedom::loadComponent()
{
// Explicit component
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" Component {\n"
" id: myComponent\n"
@@ -563,7 +563,7 @@ void tst_qdeclarativedom::loadComponent()
QVERIFY(component.isValid());
QVERIFY(component.objectType() == "Qt/Component");
QVERIFY(component.objectTypeMajorVersion() == 4);
- QVERIFY(component.objectTypeMinorVersion() == 6);
+ QVERIFY(component.objectTypeMinorVersion() == 7);
QVERIFY(component.objectClassName() == "Component");
QVERIFY(component.objectId() == "myComponent");
QVERIFY(component.properties().isEmpty());
@@ -580,7 +580,7 @@ void tst_qdeclarativedom::loadComponent()
// Implicit component
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"ListView {\n"
" delegate: Item {}\n"
"}";
@@ -630,7 +630,7 @@ void tst_qdeclarativedom::object_dynamicProperty()
// Valid object, no dynamic properties
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {}";
QDeclarativeDomDocument document;
@@ -645,7 +645,7 @@ void tst_qdeclarativedom::object_dynamicProperty()
// Valid object, dynamic properties
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" property int a\n"
"}";
@@ -683,7 +683,7 @@ void tst_qdeclarativedom::object_property()
// Valid object - no default
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" x: 10\n"
" y: 12\n"
@@ -723,7 +723,7 @@ void tst_qdeclarativedom::object_property()
// Valid object - with default
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" x: 10\n"
" y: 12\n"
@@ -760,7 +760,7 @@ void tst_qdeclarativedom::object_property()
QVERIFY(y.value().toLiteral().literal() == "12");
QCOMPARE(y.position(), 35);
QCOMPARE(y.length(), 1);
-
+
QDeclarativeDomProperty data = rootObject.property("data");
QVERIFY(data.isValid());
QVERIFY(data.propertyName() == "data");
@@ -782,9 +782,9 @@ void tst_qdeclarativedom::object_url()
QCOMPARE(object.url(), QUrl());
}
- // Valid builtin object
+ // Valid builtin object
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {}";
QDeclarativeDomDocument document;
@@ -797,7 +797,7 @@ void tst_qdeclarativedom::object_url()
// Valid composite object
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"MyItem {}";
QUrl myUrl = QUrl::fromLocalFile(SRCDIR "/data/main.qml");
@@ -815,7 +815,7 @@ void tst_qdeclarativedom::object_url()
// Test copy constructors and operators
void tst_qdeclarativedom::copy()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"MyItem {\n"
" id: myItem\n"
" property int a: 10\n"
@@ -1029,7 +1029,7 @@ void tst_qdeclarativedom::copy()
QDeclarativeDomObject object = document.rootObject();
QDeclarativeDomProperty property = object.property("data");
QCOMPARE(property.value().toList().values().count(), 1);
- QDeclarativeDomComponent component =
+ QDeclarativeDomComponent component =
property.value().toList().values().at(0).toObject().toComponent();
QCOMPARE(component.componentRoot().objectClassName(), QByteArray("Item"));
@@ -1190,7 +1190,7 @@ void tst_qdeclarativedom::copy()
// Tests the position/length of various elements
void tst_qdeclarativedom::position()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" id: myItem\n"
" property int a: 10\n"
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml
index 7c32e56..28252df 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml
@@ -3,7 +3,7 @@ import Qt 4.6
QtObject {
property int b: obj.prop.a
- property var prop;
+ property variant prop;
prop: QtObject {
property int a: 10
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml b/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml
new file mode 100644
index 0000000..86c312c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+Item {
+ property int children: root.children.length
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
index 2fec9da..1c88700 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
@@ -38,7 +38,7 @@ QtObject {
property int d: 176
property string e: "Hello"
property string f: "World"
- property var g: 6.7
- property var h: "!"
- property var i: true
+ property variant g: 6.7
+ property variant h: "!"
+ property variant i: true
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml
new file mode 100644
index 0000000..6c538fe
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+QtObject {
+ function calculate() {
+ return b * 13;
+ }
+
+ property int a: calculate()
+ property int b: 3
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml
index 6bc3a17..29eba42 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml
@@ -2,7 +2,7 @@ import Qt 4.6
import Qt.test 1.0
QtObject {
- property var obj
+ property variant obj
obj: MyQmlObject {
id: myObject
value: 92
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml b/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml
index a902312..566f5ed 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml
@@ -1,4 +1,5 @@
import Qt.test 1.0
+import Qt 4.6
MyExtendedObject
{
@@ -7,4 +8,12 @@ MyExtendedObject
coreProperty: extendedProperty
extendedProperty: 9
+
+ property QtObject nested: MyExtendedObject {
+ baseProperty: baseExtendedProperty
+ baseExtendedProperty: 13
+
+ coreProperty: extendedProperty
+ extendedProperty: 9
+ }
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml
new file mode 100644
index 0000000..4aca111
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+QtObject {
+ function myFunction() {
+ a = 10;
+ }
+
+ Component.onCompleted: myFunction();
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml
index 2db0fc6..93054f8 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml
@@ -4,7 +4,7 @@ import Qt 4.6
MyQmlObject {
objectProperty: if(1) otherObject
- property var obj
+ property variant obj
obj: QtObject {
id: otherObject
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml
index f66428d..5ae8b14 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml
@@ -4,7 +4,7 @@ import Qt 4.6
MyQmlObject {
objectProperty: otherObject
- property var obj
+ property variant obj
obj: QtObject {
id: otherObject
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.js b/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.js
new file mode 100644
index 0000000..3ffdb33
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.js
@@ -0,0 +1,6 @@
+.pragma library
+
+function test(target)
+{
+ var a = target.a;
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml b/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml
new file mode 100644
index 0000000..9e8408f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+import "libraryScriptAssert.js" as Test
+
+QtObject {
+ id: root
+ Component.onCompleted: Test.test(root);
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml b/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml
index 810f9b6..216e916 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml
@@ -9,15 +9,12 @@ MyQmlObject {
QtObject { property int a: 11 }
]
- Script {
- function calcTest1() {
- var rv = 0;
- for (var ii = 0; ii < root.objectListProperty.length; ++ii) {
- rv += root.objectListProperty[ii].a;
- }
- return rv;
+ function calcTest1() {
+ var rv = 0;
+ for (var ii = 0; ii < root.objectListProperty.length; ++ii) {
+ rv += root.objectListProperty[ii].a;
}
-
+ return rv;
}
property int test1: calcTest1();
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml b/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml
index 47f4e50..e6d31c7 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml
@@ -1,5 +1,5 @@
import Qt 4.6
QtObject {
- property var test: children
+ property variant test: children
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml
new file mode 100644
index 0000000..a762d6d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+Item {
+ id: root
+
+ Item {}
+
+ SpuriousWarning {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml
new file mode 100644
index 0000000..a52c772
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+Item {
+ id: root
+
+ property int childrenCount: root.children.length
+
+ Item {}
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml b/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml
new file mode 100644
index 0000000..1bf0b81
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ property QtObject test
+ test: if (1) model
+ property ListModel model
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/numberAssignment.qml b/tests/auto/declarative/qdeclarativeecmascript/data/numberAssignment.qml
new file mode 100644
index 0000000..30a77e8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/numberAssignment.qml
@@ -0,0 +1,18 @@
+import Qt.test 1.0
+
+NumberAssignment {
+ test1: if (1) 6.7
+ test2: if (1) "6.7"
+ test3: if (1) 6
+ test4: if (1) "6"
+
+ test5: if (1) 6.7
+ test6: if (1) "6.7"
+ test7: if (1) 6
+ test8: if (1) "6"
+
+ test9: if (1) 6.7
+ test10: if (1) "6.7"
+ test11: if (1) 6
+ test12: if (1) "6"
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml b/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml
index 18e488a..edcd340 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml
@@ -3,7 +3,7 @@ import Qt 4.6
Item {
id: root
- property var item: child
+ property variant item: child
Item { id: child }
property bool test1: child == child
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml
new file mode 100644
index 0000000..c66f071
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml
@@ -0,0 +1,22 @@
+import Qt 4.6
+
+QtObject {
+ id: root
+
+ property int a
+ property variant b
+
+ Component.onCompleted: {
+ try {
+ root.a = undefined;
+ } catch(e) {
+ console.log (e.fileName + ":" + e.lineNumber + ":" + e);
+ }
+
+ try {
+ root.a = "Hello";
+ } catch(e) {
+ console.log (e.fileName + ":" + e.lineNumber + ":" + e);
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_9792.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_9792.qml
new file mode 100644
index 0000000..9ac4430
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_9792.qml
@@ -0,0 +1,5 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ onBasicSignal: print("Hello world!");
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalParameterTypes.qml b/tests/auto/declarative/qdeclarativeecmascript/data/signalParameterTypes.qml
index 6fc8b02..ffbe317 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/signalParameterTypes.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/signalParameterTypes.qml
@@ -6,9 +6,9 @@ MyQmlObject
property int intProperty
property real realProperty
property color colorProperty
- property var variantProperty
+ property variant variantProperty
- signal mySignal(int a, real b, color c, var d)
+ signal mySignal(int a, real b, color c, variant d)
onMySignal: { intProperty = a; realProperty = b; colorProperty = c; variantProperty = d; }
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml
index fa7e01c..bd23544 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml
@@ -1,9 +1,9 @@
import Qt 4.6
QtObject {
- property var obj: nested
+ property variant obj: nested
- property var obj2
+ property variant obj2
obj2: NestedTypeTransientErrors {
id: nested
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml b/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml
new file mode 100644
index 0000000..5488e1a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ property bool runTest: false
+ onRunTestChanged: test1 = undefined
+
+ property variant test1: 10
+ property variant test2: (runTest == false)?11:undefined
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
index 0e21cb2..eabed26 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
+++ b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
@@ -8,3 +8,6 @@ HEADERS += testtypes.h
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp
index a3bcb6a..0d07055 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp
@@ -80,6 +80,7 @@ void registerTypes()
qmlRegisterExtendedType<MyBaseExtendedObject, BaseExtensionObject>("Qt.test", 1,0, "MyBaseExtendedObject");
qmlRegisterExtendedType<MyExtendedObject, ExtensionObject>("Qt.test", 1,0, "MyExtendedObject");
qmlRegisterType<MyTypeObject>("Qt.test", 1,0, "MyTypeObject");
+ qmlRegisterType<NumberAssignment>("Qt.test", 1,0, "NumberAssignment");
}
#include "testtypes.moc"
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
index faad8b7..4424419 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
+++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
@@ -600,6 +600,71 @@ private:
QVariantList m_actuals;
};
+class NumberAssignment : public QObject
+{
+ Q_OBJECT
+public:
+ Q_PROPERTY(qreal test1 READ test1 WRITE setTest1);
+ qreal _test1;
+ qreal test1() const { return _test1; }
+ void setTest1(qreal v) { _test1 = v; }
+
+ Q_PROPERTY(qreal test2 READ test2 WRITE setTest2);
+ qreal _test2;
+ qreal test2() const { return _test2; }
+ void setTest2(qreal v) { _test2 = v; }
+
+ Q_PROPERTY(qreal test3 READ test3 WRITE setTest3);
+ qreal _test3;
+ qreal test3() const { return _test3; }
+ void setTest3(qreal v) { _test3 = v; }
+
+ Q_PROPERTY(qreal test4 READ test4 WRITE setTest4);
+ qreal _test4;
+ qreal test4() const { return _test4; }
+ void setTest4(qreal v) { _test4 = v; }
+
+ Q_PROPERTY(int test5 READ test5 WRITE setTest5);
+ int _test5;
+ int test5() const { return _test5; }
+ void setTest5(int v) { _test5 = v; }
+
+ Q_PROPERTY(int test6 READ test6 WRITE setTest6);
+ int _test6;
+ int test6() const { return _test6; }
+ void setTest6(int v) { _test6 = v; }
+
+ Q_PROPERTY(int test7 READ test7 WRITE setTest7);
+ int _test7;
+ int test7() const { return _test7; }
+ void setTest7(int v) { _test7 = v; }
+
+ Q_PROPERTY(int test8 READ test8 WRITE setTest8);
+ int _test8;
+ int test8() const { return _test8; }
+ void setTest8(int v) { _test8 = v; }
+
+ Q_PROPERTY(unsigned int test9 READ test9 WRITE setTest9);
+ unsigned int _test9;
+ unsigned int test9() const { return _test9; }
+ void setTest9(unsigned int v) { _test9 = v; }
+
+ Q_PROPERTY(unsigned int test10 READ test10 WRITE setTest10);
+ unsigned int _test10;
+ unsigned int test10() const { return _test10; }
+ void setTest10(unsigned int v) { _test10 = v; }
+
+ Q_PROPERTY(unsigned int test11 READ test11 WRITE setTest11);
+ unsigned int _test11;
+ unsigned int test11() const { return _test11; }
+ void setTest11(unsigned int v) { _test11 = v; }
+
+ Q_PROPERTY(unsigned int test12 READ test12 WRITE setTest12);
+ unsigned int _test12;
+ unsigned int test12() const { return _test12; }
+ void setTest12(unsigned int v) { _test12 = v; }
+};
+
void registerTypes();
#endif // TESTTYPES_H
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 77dd4b8..098ac36 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -108,6 +108,8 @@ private slots:
void selfDeletingBinding();
void extendedObjectPropertyLookup();
void scriptErrors();
+ void functionErrors();
+ void propertyAssignmentErrors();
void signalTriggeredBindings();
void listProperties();
void exceptionClearsOnReeval();
@@ -130,10 +132,17 @@ private slots:
void qlistqobjectMethods();
void strictlyEquals();
void compiled();
+ void numberAssignment();
void bug1();
void dynamicCreationCrash();
void regExpBug();
+ void nullObjectBinding();
+ void deletedEngine();
+ void libraryScriptAssert();
+ void variantsAssignedUndefined();
+ void qtbug_9792();
+ void noSpuriousWarningsAtShutdown();
void callQtInvokables();
private:
@@ -543,11 +552,20 @@ void tst_qdeclarativeecmascript::extensionObjects()
QVERIFY(object != 0);
QCOMPARE(object->baseProperty(), 13);
QCOMPARE(object->coreProperty(), 9);
-
object->setProperty("extendedProperty", QVariant(11));
object->setProperty("baseExtendedProperty", QVariant(92));
QCOMPARE(object->coreProperty(), 11);
QCOMPARE(object->baseProperty(), 92);
+
+ MyExtendedObject *nested = qobject_cast<MyExtendedObject*>(qvariant_cast<QObject *>(object->property("nested")));
+ QVERIFY(nested);
+ QCOMPARE(nested->baseProperty(), 13);
+ QCOMPARE(nested->coreProperty(), 9);
+ nested->setProperty("extendedProperty", QVariant(11));
+ nested->setProperty("baseExtendedProperty", QVariant(92));
+ QCOMPARE(nested->coreProperty(), 11);
+ QCOMPARE(nested->baseProperty(), 92);
+
}
void tst_qdeclarativeecmascript::attachedProperties()
@@ -986,6 +1004,44 @@ void tst_qdeclarativeecmascript::scriptErrors()
}
/*
+Test file/lineNumbers for inline functions.
+*/
+void tst_qdeclarativeecmascript::functionErrors()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("functionErrors.qml"));
+ QString url = component.url().toString();
+
+ QString warning = url + ":5: Error: Invalid write to global property \"a\"";
+
+ QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ delete object;
+}
+
+/*
+Test various errors that can occur when assigning a property from script
+*/
+void tst_qdeclarativeecmascript::propertyAssignmentErrors()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("propertyAssignmentErrors.qml"));
+
+ QString url = component.url().toString();
+
+ QString warning1 = url + ":11:Error: Cannot assign [undefined] to int";
+ QString warning2 = url + ":17:Error: Cannot assign QString to int";
+
+ QTest::ignoreMessage(QtDebugMsg, warning1.toLatin1().constData());
+ QTest::ignoreMessage(QtDebugMsg, warning2.toLatin1().constData());
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ delete object;
+}
+
+/*
Test bindings still work when the reeval is triggered from within
a signal script.
*/
@@ -1326,7 +1382,6 @@ void tst_qdeclarativeecmascript::callQtInvokables()
o.reset();
{
QScriptValue ret = engine->evaluate("object.method_NoArgs_QPointF()");
- QVERIFY(ret.isVariant());
QCOMPARE(ret.toVariant(), QVariant(QPointF(123, 4.5)));
QCOMPARE(o.error(), false);
QCOMPARE(o.invoked(), 3);
@@ -2065,6 +2120,159 @@ void tst_qdeclarativeecmascript::compiled()
delete object;
}
+// Test that numbers assigned in bindings as strings work consistently
+void tst_qdeclarativeecmascript::numberAssignment()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("numberAssignment.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QVERIFY(object->property("test1") == QVariant((qreal)6.7));
+ QVERIFY(object->property("test2") == QVariant((qreal)6.7));
+ QVERIFY(object->property("test3") == QVariant((qreal)6));
+ QVERIFY(object->property("test4") == QVariant((qreal)6));
+
+ QVERIFY(object->property("test5") == QVariant((int)7));
+ QVERIFY(object->property("test6") == QVariant((int)7));
+ QVERIFY(object->property("test7") == QVariant((int)6));
+ QVERIFY(object->property("test8") == QVariant((int)6));
+
+ QVERIFY(object->property("test9") == QVariant((unsigned int)7));
+ QVERIFY(object->property("test10") == QVariant((unsigned int)7));
+ QVERIFY(object->property("test11") == QVariant((unsigned int)6));
+ QVERIFY(object->property("test12") == QVariant((unsigned int)6));
+
+ delete object;
+}
+
+// Test that assigning a null object works
+// Regressed with: df1788b4dbbb2826ae63f26bdf166342595343f4
+void tst_qdeclarativeecmascript::nullObjectBinding()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("nullObjectBinding.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QVERIFY(object->property("test") == QVariant::fromValue((QObject *)0));
+
+ delete object;
+}
+
+// Test that bindings don't evaluate once the engine has been destroyed
+void tst_qdeclarativeecmascript::deletedEngine()
+{
+ QDeclarativeEngine *engine = new QDeclarativeEngine;
+ QDeclarativeComponent component(engine, TEST_FILE("deletedEngine.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("a").toInt(), 39);
+ object->setProperty("b", QVariant(9));
+ QCOMPARE(object->property("a").toInt(), 117);
+
+ delete engine;
+
+ QCOMPARE(object->property("a").toInt(), 117);
+ object->setProperty("b", QVariant(10));
+ QCOMPARE(object->property("a").toInt(), 117);
+
+ delete object;
+}
+
+// Test the crashing part of QTBUG-9705
+void tst_qdeclarativeecmascript::libraryScriptAssert()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("libraryScriptAssert.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ delete object;
+}
+
+void tst_qdeclarativeecmascript::variantsAssignedUndefined()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("variantsAssignedUndefined.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toInt(), 10);
+ QCOMPARE(object->property("test2").toInt(), 11);
+
+ object->setProperty("runTest", true);
+
+ QCOMPARE(object->property("test1"), QVariant());
+ QCOMPARE(object->property("test2"), QVariant());
+
+
+ delete object;
+}
+
+void tst_qdeclarativeecmascript::qtbug_9792()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("qtbug_9792.qml"));
+
+ QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext());
+
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create(context));
+ QVERIFY(object != 0);
+
+ QTest::ignoreMessage(QtDebugMsg, "Hello world!");
+ object->basicSignal();
+
+ delete context;
+
+ transientErrorsMsgCount = 0;
+ QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler);
+
+ object->basicSignal();
+
+ qInstallMsgHandler(old);
+
+ QCOMPARE(transientErrorsMsgCount, 0);
+
+ delete object;
+}
+
+// Test that we shut down without stupid warnings
+void tst_qdeclarativeecmascript::noSpuriousWarningsAtShutdown()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("noSpuriousWarningsAtShutdown.qml"));
+
+ QObject *o = component.create();
+
+ transientErrorsMsgCount = 0;
+ QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler);
+
+ delete o;
+
+ qInstallMsgHandler(old);
+
+ QCOMPARE(transientErrorsMsgCount, 0);
+ }
+
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("noSpuriousWarningsAtShutdown.2.qml"));
+
+ QObject *o = component.create();
+
+ transientErrorsMsgCount = 0;
+ QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler);
+
+ delete o;
+
+ qInstallMsgHandler(old);
+
+ QCOMPARE(transientErrorsMsgCount, 0);
+ }
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"
diff --git a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
index 5b6530d..e0ea2e5 100644
--- a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
+++ b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
@@ -6,3 +6,6 @@ SOURCES += tst_qdeclarativeengine.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
index 5dc5f19..5d8a52d 100644
--- a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
+++ b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
@@ -192,7 +192,7 @@ void tst_qdeclarativeengine::clearComponentCache()
{
QFile file("temp.qml");
QVERIFY(file.open(QIODevice::WriteOnly));
- file.write("import Qt 4.6\nQtObject {\nproperty int test: 10\n}\n");
+ file.write("import Qt 4.7\nQtObject {\nproperty int test: 10\n}\n");
file.close();
}
@@ -209,7 +209,7 @@ void tst_qdeclarativeengine::clearComponentCache()
{
QFile file("temp.qml");
QVERIFY(file.open(QIODevice::WriteOnly));
- file.write("import Qt 4.6\nQtObject {\nproperty int test: 11\n}\n");
+ file.write("import Qt 4.7\nQtObject {\nproperty int test: 11\n}\n");
file.close();
}
diff --git a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
index 6591406..501f32c 100644
--- a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
+++ b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
@@ -4,3 +4,6 @@ SOURCES += tst_qdeclarativeerror.cpp
macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
index 4b71381..07637c9 100644
--- a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
+++ b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
@@ -6,3 +6,6 @@ SOURCES += tst_qdeclarativeflickable.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
index cb87977..a345a60 100644
--- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
+++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
@@ -147,7 +147,7 @@ void tst_qdeclarativeflickable::properties()
void tst_qdeclarativeflickable::overShoot()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; Flickable { overShoot: false; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Flickable { overShoot: false; }", QUrl::fromLocalFile(""));
QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
QSignalSpy spy(flickable, SIGNAL(overShootChanged()));
@@ -170,7 +170,7 @@ void tst_qdeclarativeflickable::overShoot()
void tst_qdeclarativeflickable::maximumFlickVelocity()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; Flickable { maximumFlickVelocity: 1.0; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Flickable { maximumFlickVelocity: 1.0; }", QUrl::fromLocalFile(""));
QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
QSignalSpy spy(flickable, SIGNAL(maximumFlickVelocityChanged()));
@@ -187,7 +187,7 @@ void tst_qdeclarativeflickable::maximumFlickVelocity()
void tst_qdeclarativeflickable::flickDeceleration()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; Flickable { flickDeceleration: 1.0; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Flickable { flickDeceleration: 1.0; }", QUrl::fromLocalFile(""));
QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
QSignalSpy spy(flickable, SIGNAL(flickDecelerationChanged()));
@@ -204,7 +204,7 @@ void tst_qdeclarativeflickable::flickDeceleration()
void tst_qdeclarativeflickable::pressDelay()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; Flickable { pressDelay: 100; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Flickable { pressDelay: 100; }", QUrl::fromLocalFile(""));
QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
QSignalSpy spy(flickable, SIGNAL(pressDelayChanged()));
diff --git a/tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml b/tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml
new file mode 100644
index 0000000..f6f2014
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+Rectangle {
+ Flipable {
+ id: flipable
+ }
+ Rectangle {
+ visible: flipable.side == Flipable.Front
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
index e29d324..9830b55 100644
--- a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
+++ b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
@@ -6,3 +6,6 @@ SOURCES += tst_qdeclarativeflipable.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
index 4beee9a..4155edb 100644
--- a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
+++ b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
@@ -116,7 +116,9 @@ void tst_qdeclarativeflipable::setFrontAndBack()
void tst_qdeclarativeflipable::QTBUG_9161_crash()
{
QDeclarativeView *canvas = new QDeclarativeView;
- canvas->setSource(QUrl(SRCDIR "/data/crash.qml"));
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/crash.qml"));
+ QGraphicsObject *root = canvas->rootObject();
+ QVERIFY(root != 0);
canvas->show();
delete canvas;
}
@@ -124,7 +126,9 @@ void tst_qdeclarativeflipable::QTBUG_9161_crash()
void tst_qdeclarativeflipable::QTBUG_8474_qgv_abort()
{
QDeclarativeView *canvas = new QDeclarativeView;
- canvas->setSource(QUrl(SRCDIR "/data/flipable-abort.qml"));
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/flipable-abort.qml"));
+ QGraphicsObject *root = canvas->rootObject();
+ QVERIFY(root != 0);
canvas->show();
delete canvas;
}
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml
index 0b75ec4..da452cf 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml
@@ -38,7 +38,7 @@ Rectangle {
Keys.onReturnPressed: console.log("Top Left");
KeyNavigation.right: item2
focus: true
- wrap: true
+ wrapMode: TextEdit.WordWrap
text: "Box 1"
}
@@ -79,6 +79,6 @@ Rectangle {
Keys.onReturnPressed: console.log("Bottom Left");
KeyNavigation.up: myScope
- wrap: true
+ wrapMode: TextEdit.WordWrap
}
}
diff --git a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
index 4d7a9b3..687c80c 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
+++ b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
@@ -4,3 +4,4 @@ SOURCES += tst_qdeclarativefocusscope.cpp
macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
diff --git a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
index 3ba50be..9a8a3ff 100644
--- a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
+++ b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
@@ -7,3 +7,6 @@ SOURCES += tst_qdeclarativefontloader.cpp ../shared/testhttpserver.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
index 375e801..5cdc96c 100644
--- a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
+++ b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
@@ -45,7 +45,7 @@
#include "../../../shared/util.h"
#include "../shared/testhttpserver.h"
-#define SERVER_PORT 14445
+#define SERVER_PORT 14448
class tst_qdeclarativefontloader : public QObject
@@ -79,7 +79,7 @@ tst_qdeclarativefontloader::tst_qdeclarativefontloader() :
void tst_qdeclarativefontloader::noFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { }";
+ QString componentStr = "import Qt 4.7\nFontLoader { }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
@@ -94,7 +94,7 @@ void tst_qdeclarativefontloader::noFont()
void tst_qdeclarativefontloader::namedFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { name: \"Helvetica\" }";
+ QString componentStr = "import Qt 4.7\nFontLoader { name: \"Helvetica\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
@@ -107,7 +107,7 @@ void tst_qdeclarativefontloader::namedFont()
void tst_qdeclarativefontloader::localFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { source: \"" SRCDIR "/data/tarzeau_ocr_a.ttf\" }";
+ QString componentStr = "import Qt 4.7\nFontLoader { source: \"" SRCDIR "/data/tarzeau_ocr_a.ttf\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
@@ -120,7 +120,7 @@ void tst_qdeclarativefontloader::localFont()
void tst_qdeclarativefontloader::failLocalFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" }";
+ QString componentStr = "import Qt 4.7\nFontLoader { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" }";
QTest::ignoreMessage(QtWarningMsg, QString("Cannot load font: QUrl( \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" ) ").toUtf8().constData());
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -134,7 +134,7 @@ void tst_qdeclarativefontloader::failLocalFont()
void tst_qdeclarativefontloader::webFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { source: \"http://localhost:14445/tarzeau_ocr_a.ttf\" }";
+ QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/tarzeau_ocr_a.ttf\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -150,7 +150,7 @@ void tst_qdeclarativefontloader::redirWebFont()
{
server.addRedirect("olddir/oldname.ttf","../tarzeau_ocr_a.ttf");
- QString componentStr = "import Qt 4.6\nFontLoader { source: \"http://localhost:14445/olddir/oldname.ttf\" }";
+ QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/olddir/oldname.ttf\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -164,8 +164,8 @@ void tst_qdeclarativefontloader::redirWebFont()
void tst_qdeclarativefontloader::failWebFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { source: \"http://localhost:14445/nonexist.ttf\" }";
- QTest::ignoreMessage(QtWarningMsg, "Cannot load font: QUrl( \"http://localhost:14445/nonexist.ttf\" ) ");
+ QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/nonexist.ttf\" }";
+ QTest::ignoreMessage(QtWarningMsg, "Cannot load font: QUrl( \"http://localhost:14448/nonexist.ttf\" ) ");
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml
index ba6b807..a061ae2 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml
@@ -3,7 +3,7 @@ import Qt 4.6
Rectangle {
id: root
property int added: -1
- property var removed
+ property variant removed
width: 240
height: 320
diff --git a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
index af206d7..b069260 100644
--- a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
+++ b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
@@ -6,3 +6,6 @@ SOURCES += tst_qdeclarativegridview.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
index dd594774..89be151 100644
--- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -50,6 +50,7 @@
#include <QtDeclarative/private/qdeclarativegridview_p.h>
#include <QtDeclarative/private/qdeclarativetext_p.h>
#include <QtDeclarative/private/qdeclarativelistmodel_p.h>
+#include "../../../shared/util.h"
class tst_QDeclarativeGridView : public QObject
{
@@ -169,21 +170,21 @@ void tst_QDeclarativeGridView::items()
qApp->processEvents();
QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
- QVERIFY(gridview != 0);
+ QTRY_VERIFY(gridview != 0);
QDeclarativeItem *viewport = gridview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
- QCOMPARE(gridview->count(), model.count());
- QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+ QTRY_COMPARE(gridview->count(), model.count());
+ QTRY_COMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
for (int i = 0; i < model.count(); ++i) {
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", i);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(i));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(i));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", i);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(i));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(i));
}
// set an empty model and confirm that items are destroyed
@@ -191,7 +192,7 @@ void tst_QDeclarativeGridView::items()
ctxt->setContextProperty("testModel", &model2);
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
- QVERIFY(itemCount == 0);
+ QTRY_VERIFY(itemCount == 0);
delete canvas;
}
@@ -217,18 +218,18 @@ void tst_QDeclarativeGridView::changed()
qApp->processEvents();
QDeclarativeFlickable *gridview = findItem<QDeclarativeFlickable>(canvas->rootObject(), "grid");
- QVERIFY(gridview != 0);
+ QTRY_VERIFY(gridview != 0);
QDeclarativeItem *viewport = gridview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
model.modifyItem(1, "Will", "9876");
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(1));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(1));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(1));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(1));
delete canvas;
}
@@ -250,71 +251,62 @@ void tst_QDeclarativeGridView::inserted()
qApp->processEvents();
QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
- QVERIFY(gridview != 0);
+ QTRY_VERIFY(gridview != 0);
QDeclarativeItem *viewport = gridview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
model.insertItem(1, "Will", "9876");
- // let transitions settle.
- QTest::qWait(100);
-
- QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+ QTRY_COMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(1));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(1));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(1));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(1));
// Checks that onAdd is called
int added = canvas->rootObject()->property("added").toInt();
- QCOMPARE(added, 1);
+ QTRY_COMPARE(added, 1);
// Confirm items positioned correctly
for (int i = 0; i < model.count(); ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
- QCOMPARE(item->x(), (i%3)*80.0);
- QCOMPARE(item->y(), (i/3)*60.0);
+ QTRY_COMPARE(item->x(), (i%3)*80.0);
+ QTRY_COMPARE(item->y(), (i/3)*60.0);
}
model.insertItem(0, "Foo", "1111"); // zero index, and current item
- // let transitions settle.
- QTest::qWait(100);
-
- QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+ QTRY_COMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
name = findItem<QDeclarativeText>(viewport, "textName", 0);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(0));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(0));
number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(0));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(0));
- QCOMPARE(gridview->currentIndex(), 1);
+ QTRY_COMPARE(gridview->currentIndex(), 1);
// Confirm items positioned correctly
for (int i = 0; i < model.count(); ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
- QVERIFY(item->x() == (i%3)*80);
- QVERIFY(item->y() == (i/3)*60);
+ QTRY_VERIFY(item->x() == (i%3)*80);
+ QTRY_VERIFY(item->y() == (i/3)*60);
}
for (int i = model.count(); i < 30; ++i)
model.insertItem(i, "Hello", QString::number(i));
- QTest::qWait(100);
gridview->setContentY(120);
- QTest::qWait(100);
// Insert item outside visible area
model.insertItem(1, "Hello", "1324");
- QTest::qWait(100);
- QVERIFY(gridview->contentY() == 120);
+ QTRY_VERIFY(gridview->contentY() == 120);
delete canvas;
}
@@ -335,107 +327,91 @@ void tst_QDeclarativeGridView::removed()
qApp->processEvents();
QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
- QVERIFY(gridview != 0);
+ QTRY_VERIFY(gridview != 0);
QDeclarativeItem *viewport = gridview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
model.removeItem(1);
- // let transitions settle.
- QTest::qWait(100);
-
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(1));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(1));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(1));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(1));
// Checks that onRemove is called
QString removed = canvas->rootObject()->property("removed").toString();
- QCOMPARE(removed, QString("Item1"));
+ QTRY_COMPARE(removed, QString("Item1"));
// Confirm items positioned correctly
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->x() == (i%3)*80);
- QVERIFY(item->y() == (i/3)*60);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->x() == (i%3)*80);
+ QTRY_VERIFY(item->y() == (i/3)*60);
}
// Remove first item (which is the current item);
model.removeItem(0);
- // let transitions settle.
- QTest::qWait(100);
-
name = findItem<QDeclarativeText>(viewport, "textName", 0);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(0));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(0));
number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(0));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(0));
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->x() == (i%3)*80);
- QVERIFY(item->y() == (i/3)*60);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->x() == (i%3)*80);
+ QTRY_VERIFY(item->y() == (i/3)*60);
}
// Remove items not visible
model.removeItem(25);
- // let transitions settle.
- QTest::qWait(100);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->x() == (i%3)*80);
- QVERIFY(item->y() == (i/3)*60);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->x() == (i%3)*80);
+ QTRY_VERIFY(item->y() == (i/3)*60);
}
// Remove items before visible
gridview->setContentY(120);
- QTest::qWait(100);
gridview->setCurrentIndex(10);
- // let transitions settle.
- QTest::qWait(100);
-
// Setting currentIndex above shouldn't cause view to scroll
- QCOMPARE(gridview->contentY(), 120.0);
+ QTRY_COMPARE(gridview->contentY(), 120.0);
model.removeItem(1);
- // let transitions settle.
- QTest::qWait(100);
-
// Confirm items positioned correctly
for (int i = 6; i < 18; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->x() == (i%3)*80);
- QVERIFY(item->y() == (i/3)*60);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->x() == (i%3)*80);
+ QTRY_VERIFY(item->y() == (i/3)*60);
}
// Remove currentIndex
QDeclarativeItem *oldCurrent = gridview->currentItem();
model.removeItem(9);
- QTest::qWait(100);
- QCOMPARE(gridview->currentIndex(), 9);
- QVERIFY(gridview->currentItem() != oldCurrent);
+ QTRY_COMPARE(gridview->currentIndex(), 9);
+ QTRY_VERIFY(gridview->currentItem() != oldCurrent);
gridview->setContentY(0);
// let transitions settle.
@@ -446,39 +422,34 @@ void tst_QDeclarativeGridView::removed()
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->x() == (i%3)*80);
- QVERIFY(item->y() == (i/3)*60);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->x() == (i%3)*80);
+ QTRY_VERIFY(item->y() == (i/3)*60);
}
// remove item outside current view.
gridview->setCurrentIndex(32);
- QTest::qWait(100);
gridview->setContentY(240);
model.removeItem(30);
- QVERIFY(gridview->currentIndex() == 31);
+ QTRY_VERIFY(gridview->currentIndex() == 31);
// remove current item beyond visible items.
gridview->setCurrentIndex(20);
- QTest::qWait(100);
gridview->setContentY(0);
model.removeItem(20);
- QTest::qWait(100);
- QCOMPARE(gridview->currentIndex(), 20);
- QVERIFY(gridview->currentItem() != 0);
+ QTRY_COMPARE(gridview->currentIndex(), 20);
+ QTRY_VERIFY(gridview->currentItem() != 0);
// remove item before current, but visible
gridview->setCurrentIndex(8);
- QTest::qWait(100);
gridview->setContentY(240);
oldCurrent = gridview->currentItem();
model.removeItem(6);
- QTest::qWait(100);
- QCOMPARE(gridview->currentIndex(), 7);
- QVERIFY(gridview->currentItem() == oldCurrent);
+ QTRY_COMPARE(gridview->currentIndex(), 7);
+ QTRY_VERIFY(gridview->currentItem() == oldCurrent);
delete canvas;
}
@@ -499,38 +470,35 @@ void tst_QDeclarativeGridView::moved()
qApp->processEvents();
QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
- QVERIFY(gridview != 0);
+ QTRY_VERIFY(gridview != 0);
QDeclarativeItem *viewport = gridview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
model.moveItem(1, 8);
- // let transitions settle.
- QTest::qWait(100);
-
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(1));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(1));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(1));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(1));
name = findItem<QDeclarativeText>(viewport, "textName", 8);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(8));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(8));
number = findItem<QDeclarativeText>(viewport, "textNumber", 8);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(8));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(8));
// Confirm items positioned correctly
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->x() == (i%3)*80);
- QVERIFY(item->y() == (i/3)*60);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->x() == (i%3)*80);
+ QTRY_VERIFY(item->y() == (i/3)*60);
}
gridview->setContentY(120);
@@ -538,46 +506,45 @@ void tst_QDeclarativeGridView::moved()
// move outside visible area
model.moveItem(1, 25);
- // let transitions settle.
- QTest::qWait(100);
-
// Confirm items positioned correctly and indexes correct
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count()-1;
for (int i = 6; i < model.count()-6 && i < itemCount+6; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->x(), qreal((i%3)*80));
- QCOMPARE(item->y(), qreal((i/3)*60));
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->x(), qreal((i%3)*80));
+ QTRY_COMPARE(item->y(), qreal((i/3)*60));
name = findItem<QDeclarativeText>(viewport, "textName", i);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(i));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(i));
number = findItem<QDeclarativeText>(viewport, "textNumber", i);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(i));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(i));
}
// move from outside visible into visible
model.moveItem(28, 8);
- // let transitions settle.
- QTest::qWait(100);
-
// Confirm items positioned correctly and indexes correct
for (int i = 6; i < model.count()-6 && i < itemCount+6; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->x() == (i%3)*80);
- QVERIFY(item->y() == (i/3)*60);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->x() == (i%3)*80);
+ QTRY_VERIFY(item->y() == (i/3)*60);
name = findItem<QDeclarativeText>(viewport, "textName", i);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(i));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(i));
number = findItem<QDeclarativeText>(viewport, "textNumber", i);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(i));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(i));
}
+ // ensure content position is stable
+ gridview->setContentY(0);
+ model.moveItem(10, 0);
+ QTRY_VERIFY(gridview->contentY() == 0);
+
delete canvas;
}
@@ -599,65 +566,59 @@ void tst_QDeclarativeGridView::currentIndex()
qApp->processEvents();
QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
- QVERIFY(gridview != 0);
+ QTRY_VERIFY(gridview != 0);
QDeclarativeItem *viewport = gridview->viewport();
- QVERIFY(viewport != 0);
-
- QTest::qWait(300);
+ QTRY_VERIFY(viewport != 0);
// current item should be third item
- QCOMPARE(gridview->currentIndex(), 5);
- QCOMPARE(gridview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 5));
- QCOMPARE(gridview->currentItem()->y(), gridview->highlightItem()->y());
+ QTRY_COMPARE(gridview->currentIndex(), 5);
+ QTRY_COMPARE(gridview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 5));
+ QTRY_COMPARE(gridview->currentItem()->y(), gridview->highlightItem()->y());
gridview->moveCurrentIndexRight();
- QCOMPARE(gridview->currentIndex(), 6);
+ QTRY_COMPARE(gridview->currentIndex(), 6);
gridview->moveCurrentIndexDown();
- QCOMPARE(gridview->currentIndex(), 9);
+ QTRY_COMPARE(gridview->currentIndex(), 9);
gridview->moveCurrentIndexUp();
- QCOMPARE(gridview->currentIndex(), 6);
+ QTRY_COMPARE(gridview->currentIndex(), 6);
gridview->moveCurrentIndexLeft();
- QCOMPARE(gridview->currentIndex(), 5);
+ QTRY_COMPARE(gridview->currentIndex(), 5);
// no wrap
gridview->setCurrentIndex(0);
- QCOMPARE(gridview->currentIndex(), 0);
+ QTRY_COMPARE(gridview->currentIndex(), 0);
gridview->moveCurrentIndexUp();
- QCOMPARE(gridview->currentIndex(), 0);
+ QTRY_COMPARE(gridview->currentIndex(), 0);
gridview->moveCurrentIndexLeft();
- QCOMPARE(gridview->currentIndex(), 0);
+ QTRY_COMPARE(gridview->currentIndex(), 0);
gridview->setCurrentIndex(model.count()-1);
- QTest::qWait(100);
- QCOMPARE(gridview->currentIndex(), model.count()-1);
+ QTRY_COMPARE(gridview->currentIndex(), model.count()-1);
gridview->moveCurrentIndexRight();
- QCOMPARE(gridview->currentIndex(), model.count()-1);
+ QTRY_COMPARE(gridview->currentIndex(), model.count()-1);
gridview->moveCurrentIndexDown();
- QCOMPARE(gridview->currentIndex(), model.count()-1);
+ QTRY_COMPARE(gridview->currentIndex(), model.count()-1);
// with wrap
gridview->setWrapEnabled(true);
gridview->setCurrentIndex(0);
- QCOMPARE(gridview->currentIndex(), 0);
- QTest::qWait(500);
+ QTRY_COMPARE(gridview->currentIndex(), 0);
gridview->moveCurrentIndexLeft();
- QCOMPARE(gridview->currentIndex(), model.count()-1);
+ QTRY_COMPARE(gridview->currentIndex(), model.count()-1);
- QTest::qWait(500);
- QCOMPARE(gridview->contentY(), 279.0);
+ QTRY_COMPARE(gridview->contentY(), 279.0);
gridview->moveCurrentIndexRight();
- QCOMPARE(gridview->currentIndex(), 0);
+ QTRY_COMPARE(gridview->currentIndex(), 0);
- QTest::qWait(500);
- QCOMPARE(gridview->contentY(), 0.0);
+ QTRY_COMPARE(gridview->contentY(), 0.0);
// Test keys
canvas->show();
@@ -666,47 +627,46 @@ void tst_QDeclarativeGridView::currentIndex()
// to be safe and avoid failing setFocus with window managers
qt_x11_wait_for_window_manager(canvas);
#endif
- QVERIFY(canvas->hasFocus());
- QVERIFY(canvas->scene()->hasFocus());
+ QTRY_VERIFY(canvas->hasFocus());
+ QTRY_VERIFY(canvas->scene()->hasFocus());
qApp->processEvents();
QTest::keyClick(canvas, Qt::Key_Down);
- QCOMPARE(gridview->currentIndex(), 3);
+ QTRY_COMPARE(gridview->currentIndex(), 3);
QTest::keyClick(canvas, Qt::Key_Up);
- QCOMPARE(gridview->currentIndex(), 0);
+ QTRY_COMPARE(gridview->currentIndex(), 0);
gridview->setFlow(QDeclarativeGridView::TopToBottom);
QTest::keyClick(canvas, Qt::Key_Right);
- QCOMPARE(gridview->currentIndex(), 5);
+ QTRY_COMPARE(gridview->currentIndex(), 5);
QTest::keyClick(canvas, Qt::Key_Left);
- QCOMPARE(gridview->currentIndex(), 0);
+ QTRY_COMPARE(gridview->currentIndex(), 0);
QTest::keyClick(canvas, Qt::Key_Down);
- QCOMPARE(gridview->currentIndex(), 1);
+ QTRY_COMPARE(gridview->currentIndex(), 1);
QTest::keyClick(canvas, Qt::Key_Up);
- QCOMPARE(gridview->currentIndex(), 0);
+ QTRY_COMPARE(gridview->currentIndex(), 0);
// turn off auto highlight
gridview->setHighlightFollowsCurrentItem(false);
- QVERIFY(gridview->highlightFollowsCurrentItem() == false);
- QVERIFY(gridview->highlightItem());
+ QTRY_VERIFY(gridview->highlightFollowsCurrentItem() == false);
+ QTRY_VERIFY(gridview->highlightItem());
qreal hlPosX = gridview->highlightItem()->x();
qreal hlPosY = gridview->highlightItem()->y();
gridview->setCurrentIndex(5);
- QTest::qWait(500);
- QCOMPARE(gridview->highlightItem()->x(), hlPosX);
- QCOMPARE(gridview->highlightItem()->y(), hlPosY);
+ QTRY_COMPARE(gridview->highlightItem()->x(), hlPosX);
+ QTRY_COMPARE(gridview->highlightItem()->y(), hlPosY);
// insert item before currentIndex
gridview->setCurrentIndex(28);
model.insertItem(0, "Foo", "1111");
- QCOMPARE(canvas->rootObject()->property("current").toInt(), 29);
+ QTRY_COMPARE(canvas->rootObject()->property("current").toInt(), 29);
delete canvas;
}
@@ -727,44 +687,43 @@ void tst_QDeclarativeGridView::changeFlow()
qApp->processEvents();
QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
- QVERIFY(gridview != 0);
+ QTRY_VERIFY(gridview != 0);
QDeclarativeItem *viewport = gridview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
// Confirm items positioned correctly and indexes correct
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->x(), qreal((i%3)*80));
- QCOMPARE(item->y(), qreal((i/3)*60));
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->x(), qreal((i%3)*80));
+ QTRY_COMPARE(item->y(), qreal((i/3)*60));
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", i);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(i));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(i));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", i);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(i));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(i));
}
ctxt->setContextProperty("testTopToBottom", QVariant(true));
- QTest::qWait(100);
// Confirm items positioned correctly and indexes correct
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->x(), qreal((i/5)*80));
- QCOMPARE(item->y(), qreal((i%5)*60));
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->x(), qreal((i/5)*80));
+ QTRY_COMPARE(item->y(), qreal((i%5)*60));
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", i);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(i));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(i));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", i);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(i));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(i));
}
delete canvas;
@@ -776,20 +735,20 @@ void tst_QDeclarativeGridView::defaultValues()
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/gridview3.qml"));
QDeclarativeGridView *obj = qobject_cast<QDeclarativeGridView*>(c.create());
- QVERIFY(obj != 0);
- QVERIFY(obj->model() == QVariant());
- QVERIFY(obj->delegate() == 0);
- QCOMPARE(obj->currentIndex(), -1);
- QVERIFY(obj->currentItem() == 0);
- QCOMPARE(obj->count(), 0);
- QVERIFY(obj->highlight() == 0);
- QVERIFY(obj->highlightItem() == 0);
- QCOMPARE(obj->highlightFollowsCurrentItem(), true);
- QVERIFY(obj->flow() == 0);
- QCOMPARE(obj->isWrapEnabled(), false);
- QCOMPARE(obj->cacheBuffer(), 0);
- QCOMPARE(obj->cellWidth(), 100); //### Should 100 be the default?
- QCOMPARE(obj->cellHeight(), 100);
+ QTRY_VERIFY(obj != 0);
+ QTRY_VERIFY(obj->model() == QVariant());
+ QTRY_VERIFY(obj->delegate() == 0);
+ QTRY_COMPARE(obj->currentIndex(), -1);
+ QTRY_VERIFY(obj->currentItem() == 0);
+ QTRY_COMPARE(obj->count(), 0);
+ QTRY_VERIFY(obj->highlight() == 0);
+ QTRY_VERIFY(obj->highlightItem() == 0);
+ QTRY_COMPARE(obj->highlightFollowsCurrentItem(), true);
+ QTRY_VERIFY(obj->flow() == 0);
+ QTRY_COMPARE(obj->isWrapEnabled(), false);
+ QTRY_COMPARE(obj->cacheBuffer(), 0);
+ QTRY_COMPARE(obj->cellWidth(), 100); //### Should 100 be the default?
+ QTRY_COMPARE(obj->cellHeight(), 100);
delete obj;
}
@@ -799,59 +758,59 @@ void tst_QDeclarativeGridView::properties()
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/gridview2.qml"));
QDeclarativeGridView *obj = qobject_cast<QDeclarativeGridView*>(c.create());
- QVERIFY(obj != 0);
- QVERIFY(obj->model() != QVariant());
- QVERIFY(obj->delegate() != 0);
- QCOMPARE(obj->currentIndex(), 0);
- QVERIFY(obj->currentItem() != 0);
- QCOMPARE(obj->count(), 4);
- QVERIFY(obj->highlight() != 0);
- QVERIFY(obj->highlightItem() != 0);
- QCOMPARE(obj->highlightFollowsCurrentItem(), false);
- QVERIFY(obj->flow() == 0);
- QCOMPARE(obj->isWrapEnabled(), true);
- QCOMPARE(obj->cacheBuffer(), 200);
- QCOMPARE(obj->cellWidth(), 100);
- QCOMPARE(obj->cellHeight(), 100);
+ QTRY_VERIFY(obj != 0);
+ QTRY_VERIFY(obj->model() != QVariant());
+ QTRY_VERIFY(obj->delegate() != 0);
+ QTRY_COMPARE(obj->currentIndex(), 0);
+ QTRY_VERIFY(obj->currentItem() != 0);
+ QTRY_COMPARE(obj->count(), 4);
+ QTRY_VERIFY(obj->highlight() != 0);
+ QTRY_VERIFY(obj->highlightItem() != 0);
+ QTRY_COMPARE(obj->highlightFollowsCurrentItem(), false);
+ QTRY_VERIFY(obj->flow() == 0);
+ QTRY_COMPARE(obj->isWrapEnabled(), true);
+ QTRY_COMPARE(obj->cacheBuffer(), 200);
+ QTRY_COMPARE(obj->cellWidth(), 100);
+ QTRY_COMPARE(obj->cellHeight(), 100);
delete obj;
}
void tst_QDeclarativeGridView::propertyChanges()
{
QDeclarativeView *canvas = createView();
- QVERIFY(canvas);
+ QTRY_VERIFY(canvas);
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychangestest.qml"));
QDeclarativeGridView *gridView = canvas->rootObject()->findChild<QDeclarativeGridView*>("gridView");
- QVERIFY(gridView);
+ QTRY_VERIFY(gridView);
QSignalSpy keyNavigationWrapsSpy(gridView, SIGNAL(keyNavigationWrapsChanged()));
QSignalSpy cacheBufferSpy(gridView, SIGNAL(cacheBufferChanged()));
QSignalSpy flowSpy(gridView, SIGNAL(flowChanged()));
- QCOMPARE(gridView->isWrapEnabled(), true);
- QCOMPARE(gridView->cacheBuffer(), 10);
- QCOMPARE(gridView->flow(), QDeclarativeGridView::LeftToRight);
+ QTRY_COMPARE(gridView->isWrapEnabled(), true);
+ QTRY_COMPARE(gridView->cacheBuffer(), 10);
+ QTRY_COMPARE(gridView->flow(), QDeclarativeGridView::LeftToRight);
gridView->setWrapEnabled(false);
gridView->setCacheBuffer(3);
gridView->setFlow(QDeclarativeGridView::TopToBottom);
- QCOMPARE(gridView->isWrapEnabled(), false);
- QCOMPARE(gridView->cacheBuffer(), 3);
- QCOMPARE(gridView->flow(), QDeclarativeGridView::TopToBottom);
+ QTRY_COMPARE(gridView->isWrapEnabled(), false);
+ QTRY_COMPARE(gridView->cacheBuffer(), 3);
+ QTRY_COMPARE(gridView->flow(), QDeclarativeGridView::TopToBottom);
- QCOMPARE(keyNavigationWrapsSpy.count(),1);
- QCOMPARE(cacheBufferSpy.count(),1);
- QCOMPARE(flowSpy.count(),1);
+ QTRY_COMPARE(keyNavigationWrapsSpy.count(),1);
+ QTRY_COMPARE(cacheBufferSpy.count(),1);
+ QTRY_COMPARE(flowSpy.count(),1);
gridView->setWrapEnabled(false);
gridView->setCacheBuffer(3);
gridView->setFlow(QDeclarativeGridView::TopToBottom);
- QCOMPARE(keyNavigationWrapsSpy.count(),1);
- QCOMPARE(cacheBufferSpy.count(),1);
- QCOMPARE(flowSpy.count(),1);
+ QTRY_COMPARE(keyNavigationWrapsSpy.count(),1);
+ QTRY_COMPARE(cacheBufferSpy.count(),1);
+ QTRY_COMPARE(flowSpy.count(),1);
delete canvas;
}
@@ -859,17 +818,17 @@ void tst_QDeclarativeGridView::propertyChanges()
void tst_QDeclarativeGridView::componentChanges()
{
QDeclarativeView *canvas = createView();
- QVERIFY(canvas);
+ QTRY_VERIFY(canvas);
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychangestest.qml"));
QDeclarativeGridView *gridView = canvas->rootObject()->findChild<QDeclarativeGridView*>("gridView");
- QVERIFY(gridView);
+ QTRY_VERIFY(gridView);
QDeclarativeComponent component(canvas->engine());
- component.setData("import Qt 4.6; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile(""));
QDeclarativeComponent delegateComponent(canvas->engine());
- delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
+ delegateComponent.setData("import Qt 4.7; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
QSignalSpy highlightSpy(gridView, SIGNAL(highlightChanged()));
QSignalSpy delegateSpy(gridView, SIGNAL(delegateChanged()));
@@ -877,43 +836,43 @@ void tst_QDeclarativeGridView::componentChanges()
gridView->setHighlight(&component);
gridView->setDelegate(&delegateComponent);
- QCOMPARE(gridView->highlight(), &component);
- QCOMPARE(gridView->delegate(), &delegateComponent);
+ QTRY_COMPARE(gridView->highlight(), &component);
+ QTRY_COMPARE(gridView->delegate(), &delegateComponent);
- QCOMPARE(highlightSpy.count(),1);
- QCOMPARE(delegateSpy.count(),1);
+ QTRY_COMPARE(highlightSpy.count(),1);
+ QTRY_COMPARE(delegateSpy.count(),1);
gridView->setHighlight(&component);
gridView->setDelegate(&delegateComponent);
- QCOMPARE(highlightSpy.count(),1);
- QCOMPARE(delegateSpy.count(),1);
+ QTRY_COMPARE(highlightSpy.count(),1);
+ QTRY_COMPARE(delegateSpy.count(),1);
delete canvas;
}
void tst_QDeclarativeGridView::modelChanges()
{
QDeclarativeView *canvas = createView();
- QVERIFY(canvas);
+ QTRY_VERIFY(canvas);
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychangestest.qml"));
QDeclarativeGridView *gridView = canvas->rootObject()->findChild<QDeclarativeGridView*>("gridView");
- QVERIFY(gridView);
+ QTRY_VERIFY(gridView);
QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild<QDeclarativeListModel*>("alternateModel");
- QVERIFY(alternateModel);
+ QTRY_VERIFY(alternateModel);
QVariant modelVariant = QVariant::fromValue(alternateModel);
QSignalSpy modelSpy(gridView, SIGNAL(modelChanged()));
gridView->setModel(modelVariant);
- QCOMPARE(gridView->model(), modelVariant);
- QCOMPARE(modelSpy.count(),1);
+ QTRY_COMPARE(gridView->model(), modelVariant);
+ QTRY_COMPARE(modelSpy.count(),1);
gridView->setModel(modelVariant);
- QCOMPARE(modelSpy.count(),1);
+ QTRY_COMPARE(modelSpy.count(),1);
gridView->setModel(QVariant());
- QCOMPARE(modelSpy.count(),2);
+ QTRY_COMPARE(modelSpy.count(),2);
delete canvas;
}
@@ -933,117 +892,117 @@ void tst_QDeclarativeGridView::positionViewAtIndex()
qApp->processEvents();
QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
- QVERIFY(gridview != 0);
+ QTRY_VERIFY(gridview != 0);
QDeclarativeItem *viewport = gridview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
// Confirm items positioned correctly
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount-1; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->x(), (i%3)*80.);
- QCOMPARE(item->y(), (i/3)*60.);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->x(), (i%3)*80.);
+ QTRY_COMPARE(item->y(), (i/3)*60.);
}
// Position on a currently visible item
gridview->positionViewAtIndex(4, QDeclarativeGridView::Beginning);
- QCOMPARE(gridview->contentY(), 60.);
+ QTRY_COMPARE(gridview->contentY(), 60.);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 3; i < model.count() && i < itemCount-3-1; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->x(), (i%3)*80.);
- QCOMPARE(item->y(), (i/3)*60.);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->x(), (i%3)*80.);
+ QTRY_COMPARE(item->y(), (i/3)*60.);
}
// Position on an item beyond the visible items
gridview->positionViewAtIndex(21, QDeclarativeGridView::Beginning);
- QCOMPARE(gridview->contentY(), 420.);
+ QTRY_COMPARE(gridview->contentY(), 420.);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 22; i < model.count() && i < itemCount-22-1; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->x(), (i%3)*80.);
- QCOMPARE(item->y(), (i/3)*60.);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->x(), (i%3)*80.);
+ QTRY_COMPARE(item->y(), (i/3)*60.);
}
// Position on an item that would leave empty space if positioned at the top
gridview->positionViewAtIndex(31, QDeclarativeGridView::Beginning);
- QCOMPARE(gridview->contentY(), 520.);
+ QTRY_COMPARE(gridview->contentY(), 520.);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 24; i < model.count() && i < itemCount-24-1; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->x(), (i%3)*80.);
- QCOMPARE(item->y(), (i/3)*60.);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->x(), (i%3)*80.);
+ QTRY_COMPARE(item->y(), (i/3)*60.);
}
// Position at the beginning again
gridview->positionViewAtIndex(0, QDeclarativeGridView::Beginning);
- QCOMPARE(gridview->contentY(), 0.);
+ QTRY_COMPARE(gridview->contentY(), 0.);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount-1; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->x(), (i%3)*80.);
- QCOMPARE(item->y(), (i/3)*60.);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->x(), (i%3)*80.);
+ QTRY_COMPARE(item->y(), (i/3)*60.);
}
// Position at End
gridview->positionViewAtIndex(30, QDeclarativeGridView::End);
- QCOMPARE(gridview->contentY(), 340.);
+ QTRY_COMPARE(gridview->contentY(), 340.);
// Position in Center
gridview->positionViewAtIndex(15, QDeclarativeGridView::Center);
- QCOMPARE(gridview->contentY(), 170.);
+ QTRY_COMPARE(gridview->contentY(), 170.);
// Ensure at least partially visible
gridview->positionViewAtIndex(15, QDeclarativeGridView::Visible);
- QCOMPARE(gridview->contentY(), 170.);
+ QTRY_COMPARE(gridview->contentY(), 170.);
gridview->setContentY(302);
gridview->positionViewAtIndex(15, QDeclarativeGridView::Visible);
- QCOMPARE(gridview->contentY(), 302.);
+ QTRY_COMPARE(gridview->contentY(), 302.);
gridview->setContentY(360);
gridview->positionViewAtIndex(15, QDeclarativeGridView::Visible);
- QCOMPARE(gridview->contentY(), 300.);
+ QTRY_COMPARE(gridview->contentY(), 300.);
gridview->setContentY(60);
gridview->positionViewAtIndex(20, QDeclarativeGridView::Visible);
- QCOMPARE(gridview->contentY(), 60.);
+ QTRY_COMPARE(gridview->contentY(), 60.);
gridview->setContentY(20);
gridview->positionViewAtIndex(20, QDeclarativeGridView::Visible);
- QCOMPARE(gridview->contentY(), 100.);
+ QTRY_COMPARE(gridview->contentY(), 100.);
// Ensure completely visible
gridview->setContentY(120);
gridview->positionViewAtIndex(20, QDeclarativeGridView::Contain);
- QCOMPARE(gridview->contentY(), 120.);
+ QTRY_COMPARE(gridview->contentY(), 120.);
gridview->setContentY(302);
gridview->positionViewAtIndex(15, QDeclarativeGridView::Contain);
- QCOMPARE(gridview->contentY(), 300.);
+ QTRY_COMPARE(gridview->contentY(), 300.);
gridview->setContentY(60);
gridview->positionViewAtIndex(20, QDeclarativeGridView::Contain);
- QCOMPARE(gridview->contentY(), 100.);
+ QTRY_COMPARE(gridview->contentY(), 100.);
delete canvas;
}
@@ -1063,29 +1022,29 @@ void tst_QDeclarativeGridView::resetModel()
qApp->processEvents();
QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
- QVERIFY(gridview != 0);
+ QTRY_VERIFY(gridview != 0);
QDeclarativeItem *viewport = gridview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
- QCOMPARE(gridview->count(), model.rowCount());
+ QTRY_COMPARE(gridview->count(), model.rowCount());
for (int i = 0; i < model.rowCount(); ++i) {
QDeclarativeText *display = findItem<QDeclarativeText>(viewport, "displayText", i);
- QVERIFY(display != 0);
- QCOMPARE(display->text(), strings.at(i));
+ QTRY_VERIFY(display != 0);
+ QTRY_COMPARE(display->text(), strings.at(i));
}
strings.clear();
strings << "four" << "five" << "six" << "seven";
model.setStringList(strings);
- QCOMPARE(gridview->count(), model.rowCount());
+ QTRY_COMPARE(gridview->count(), model.rowCount());
for (int i = 0; i < model.rowCount(); ++i) {
QDeclarativeText *display = findItem<QDeclarativeText>(viewport, "displayText", i);
- QVERIFY(display != 0);
- QCOMPARE(display->text(), strings.at(i));
+ QTRY_VERIFY(display != 0);
+ QTRY_COMPARE(display->text(), strings.at(i));
}
}
@@ -1104,34 +1063,33 @@ void tst_QDeclarativeGridView::enforceRange()
qApp->processEvents();
QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
- QVERIFY(gridview != 0);
+ QTRY_VERIFY(gridview != 0);
- QCOMPARE(gridview->preferredHighlightBegin(), 100.0);
- QCOMPARE(gridview->preferredHighlightEnd(), 100.0);
- QCOMPARE(gridview->highlightRangeMode(), QDeclarativeGridView::StrictlyEnforceRange);
+ QTRY_COMPARE(gridview->preferredHighlightBegin(), 100.0);
+ QTRY_COMPARE(gridview->preferredHighlightEnd(), 100.0);
+ QTRY_COMPARE(gridview->highlightRangeMode(), QDeclarativeGridView::StrictlyEnforceRange);
QDeclarativeItem *viewport = gridview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
// view should be positioned at the top of the range.
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", 0);
- QVERIFY(item);
- QCOMPARE(gridview->contentY(), -100.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(gridview->contentY(), -100.0);
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 0);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(0));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(0));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(0));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(0));
// Check currentIndex is updated when viewport moves
gridview->setContentY(0);
- QCOMPARE(gridview->currentIndex(), 2);
+ QTRY_COMPARE(gridview->currentIndex(), 2);
gridview->setCurrentIndex(5);
- QTest::qWait(500);
- QCOMPARE(gridview->contentY(), 100.);
+ QTRY_COMPARE(gridview->contentY(), 100.);
delete canvas;
}
@@ -1144,9 +1102,9 @@ void tst_QDeclarativeGridView::QTBUG_8456()
qApp->processEvents();
QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
- QVERIFY(gridview != 0);
+ QTRY_VERIFY(gridview != 0);
- QCOMPARE(gridview->currentIndex(), 0);
+ QTRY_COMPARE(gridview->currentIndex(), 0);
}
QDeclarativeView *tst_QDeclarativeGridView::createView()
diff --git a/tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml b/tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml
new file mode 100644
index 0000000..402d33e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml
@@ -0,0 +1,6 @@
+import Qt 4.7
+
+Image {
+ source: "heart.png"
+ fillMode: Image.PreserveAspectFit;
+}
diff --git a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
index 7634c12..ff365ee 100644
--- a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
+++ b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
@@ -7,3 +7,6 @@ SOURCES += tst_qdeclarativeimage.cpp ../shared/testhttpserver.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index ec9f4ec..854bcdd 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -46,6 +46,7 @@
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeview.h>
#include <private/qdeclarativeimage_p.h>
#include <private/qdeclarativeimagebase_p.h>
#include <private/qdeclarativeloader_p.h>
@@ -54,8 +55,8 @@
#include "../shared/testhttpserver.h"
-#define SERVER_PORT 14445
-#define SERVER_ADDR "http://127.0.0.1:14445"
+#define SERVER_PORT 14451
+#define SERVER_ADDR "http://127.0.0.1:14451"
#define TRY_WAIT(expr) \
do { \
@@ -80,6 +81,7 @@ private slots:
void imageSource_data();
void clearSource();
void resized();
+ void preserveAspectRatio();
void smooth();
void pixmap();
void svg();
@@ -95,7 +97,7 @@ tst_qdeclarativeimage::tst_qdeclarativeimage()
void tst_qdeclarativeimage::noSource()
{
- QString componentStr = "import Qt 4.6\nImage { source: \"\" }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -122,13 +124,14 @@ void tst_qdeclarativeimage::imageSource_data()
QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << 120.0 << 120.0 << false << false << "";
QTest::newRow("local async") << QUrl::fromLocalFile(SRCDIR "/data/colors1.png").toString() << 120.0 << 120.0 << false << true << "";
QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() << 0.0 << 0.0 << false
- << false << "Cannot open QUrl( \"" + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() + "\" ) ";
+ << false << "QML Image (file::2:1) Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString();
QTest::newRow("local async not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString() << 0.0 << 0.0 << false
- << true << "\"Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString() + "\" ";
+ << true << "QML Image (file::2:1) Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString();
QTest::newRow("remote") << SERVER_ADDR "/colors.png" << 120.0 << 120.0 << true << false << "";
QTest::newRow("remote svg") << SERVER_ADDR "/heart.svg" << 550.0 << 500.0 << true << false << "";
- QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << 0.0 << 0.0 << true << false
- << "\"Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found\" ";
+ QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << 0.0 << 0.0 << true
+ << false << "QML Image (file::2:1) Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found";
+
}
void tst_qdeclarativeimage::imageSource()
@@ -149,7 +152,7 @@ void tst_qdeclarativeimage::imageSource()
if (!error.isEmpty())
QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
- QString componentStr = "import Qt 4.6\nImage { source: \"" + source + "\"; asynchronous: "
+ QString componentStr = "import Qt 4.7\nImage { source: \"" + source + "\"; asynchronous: "
+ (async ? QLatin1String("true") : QLatin1String("false")) + " }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -179,7 +182,7 @@ void tst_qdeclarativeimage::imageSource()
void tst_qdeclarativeimage::clearSource()
{
- QString componentStr = "import Qt 4.6\nImage { source: srcImage }";
+ QString componentStr = "import Qt 4.7\nImage { source: srcImage }";
QDeclarativeContext *ctxt = engine.rootContext();
ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/colors.png"));
QDeclarativeComponent component(&engine);
@@ -201,7 +204,7 @@ void tst_qdeclarativeimage::clearSource()
void tst_qdeclarativeimage::resized()
{
- QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -209,13 +212,34 @@ void tst_qdeclarativeimage::resized()
QCOMPARE(obj->width(), 300.);
QCOMPARE(obj->height(), 300.);
QCOMPARE(obj->fillMode(), QDeclarativeImage::Stretch);
-
delete obj;
}
+
+void tst_qdeclarativeimage::preserveAspectRatio()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->show();
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/aspectratio.qml"));
+ QDeclarativeImage *image = qobject_cast<QDeclarativeImage*>(canvas->rootObject());
+ QVERIFY(image != 0);
+ image->setWidth(80.0);
+ QCOMPARE(image->width(), 80.);
+ QCOMPARE(image->height(), 80.);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/aspectratio.qml"));
+ image = qobject_cast<QDeclarativeImage*>(canvas->rootObject());
+ image->setHeight(60.0);
+ QVERIFY(image != 0);
+ QCOMPARE(image->height(), 60.);
+ QCOMPARE(image->width(), 60.);
+ delete canvas;
+}
+
void tst_qdeclarativeimage::smooth()
{
- QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -230,7 +254,7 @@ void tst_qdeclarativeimage::smooth()
void tst_qdeclarativeimage::pixmap()
{
- QString componentStr = "import Qt 4.6\nImage { pixmap: testPixmap }";
+ QString componentStr = "import Qt 4.7\nImage { pixmap: testPixmap }";
QPixmap pixmap;
QDeclarativeContext *ctxt = engine.rootContext();
@@ -261,7 +285,7 @@ void tst_qdeclarativeimage::pixmap()
void tst_qdeclarativeimage::svg()
{
QString src = QUrl::fromLocalFile(SRCDIR "/data/heart.svg").toString();
- QString componentStr = "import Qt 4.6\nImage { source: \"" + src + "\"; sourceSize.width: 300; sourceSize.height: 300 }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"" + src + "\"; sourceSize.width: 300; sourceSize.height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -300,7 +324,7 @@ void tst_qdeclarativeimage::big()
// have to build a 400 MB image. That would be a bug in the JPEG loader.
QString src = QUrl::fromLocalFile(SRCDIR "/data/big.jpeg").toString();
- QString componentStr = "import Qt 4.6\nImage { source: \"" + src + "\"; sourceSize.width: 256; sourceSize.height: 256 }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"" + src + "\"; sourceSize.width: 256; sourceSize.height: 256 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
index a4d3eb2..22be991 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
+++ b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
@@ -10,3 +10,6 @@ SOURCES += tst_qdeclarativeimageprovider.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
index fe5f5a2..aca951b 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
+++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
@@ -96,9 +96,10 @@ void tst_qdeclarativeimageprovider::imageSource_data()
QTest::newRow("exists") << "image://test/exists.png" << "" << QSize(100,100) << "";
QTest::newRow("scaled") << "image://test/exists.png" << "sourceSize: \"80x30\"" << QSize(80,30) << "";
QTest::newRow("missing") << "image://test/no-such-file.png" << "" << QSize()
- << "\"Failed to get image from provider: image://test/no-such-file.png\" ";
+ << "QML Image (file::2:1) Failed to get image from provider: image://test/no-such-file.png";
QTest::newRow("unknown provider") << "image://bogus/exists.png" << "" << QSize()
- << "\"Failed to get image from provider: image://bogus/exists.png\" ";
+ << "QML Image (file::2:1) Failed to get image from provider: image://bogus/exists.png";
+
}
void tst_qdeclarativeimageprovider::imageSource()
@@ -114,7 +115,7 @@ void tst_qdeclarativeimageprovider::imageSource()
engine.addImageProvider("test", new TestProvider);
QVERIFY(engine.imageProvider("test") != 0);
- QString componentStr = "import Qt 4.6\nImage { source: \"" + source + "\"; " + properties + " }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"" + source + "\"; " + properties + " }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -145,7 +146,7 @@ void tst_qdeclarativeimageprovider::removeProvider()
QVERIFY(engine.imageProvider("test2") != 0);
// add provider, confirm it works
- QString componentStr = "import Qt 4.6\nImage { source: \"image://test2/exists1.png\" }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"image://test2/exists1.png\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -157,7 +158,8 @@ void tst_qdeclarativeimageprovider::removeProvider()
QCOMPARE(obj->width(), 100.0);
// remove the provider and confirm
- QString error("\"Failed to get image from provider: image://test2/exists2.png\" ");
+ QString error("QML Image (file::2:1) Failed to get image from provider: image://test2/exists2.png");
+
QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
engine.removeImageProvider("test2");
diff --git a/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml
index cd5b426..548e498 100644
--- a/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml
+++ b/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml
@@ -1,7 +1,7 @@
import Qt 4.6
QtObject {
- property var nested
+ property variant nested
nested: QtObject {}
}
diff --git a/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml
index a2ce78a..eac0b73 100644
--- a/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml
+++ b/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml
@@ -1,8 +1,8 @@
import Qt 4.6
QtObject {
- property var nested
+ property variant nested
nested: NestedObject { }
- property var nested2: nested.nested
+ property variant nested2: nested.nested
}
diff --git a/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml
index ce05f89..176636a 100644
--- a/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml
+++ b/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml
@@ -1,7 +1,7 @@
import Qt 4.6
QtObject {
- property var nested
+ property variant nested
nested: QtObject {
}
diff --git a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
index 015c094..bb54d6c 100644
--- a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
+++ b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
@@ -5,3 +5,6 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeinfo.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
index b8f7d27..0daa9e5 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
+++ b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
@@ -4,3 +4,6 @@ SOURCES += tst_qdeclarativeinstruction.cpp
macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
index c747bfc..f4df130 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
+++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
@@ -520,12 +520,31 @@ void tst_qdeclarativeinstruction::dump()
data->bytecode << i;
}
+ {
+ QDeclarativeInstruction i;
+ i.line = 51;
+ i.type = QDeclarativeInstruction::StoreVariantInteger;
+ i.storeInteger.value = 11;
+ i.storeInteger.propertyIndex = 32;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 52;
+ i.type = QDeclarativeInstruction::StoreVariantDouble;
+ i.storeDouble.value = 33.7;
+ i.storeDouble.propertyIndex = 19;
+ data->bytecode << i;
+ }
+
QStringList expect;
expect
<< "Index\tLine\tOperation\t\tData1\tData2\tData3\tComments"
<< "-------------------------------------------------------------------------------"
<< "0\t\t0\tINIT\t\t\t0\t3\t-1\t-1"
<< "1\t\t1\tCREATE\t\t\t0\t\t\t\"Test\""
+ << "1\t\t1\tCREATE_SIMPLE\t\t-1"
<< "2\t\t2\tSETID\t\t\t0\t\t\t\"testId\""
<< "3\t\t3\tSET_DEFAULT"
<< "4\t\t4\tCREATE_COMPONENT\t3"
@@ -574,6 +593,8 @@ void tst_qdeclarativeinstruction::dump()
<< "47\t\tNA\tDEFER\t\t\t7"
<< "48\t\t48\tSTORE_IMPORTED_SCRIPT\t2"
<< "49\t\t50\tXXX UNKOWN INSTRUCTION\t1234"
+ << "50\t\t51\tSTORE_VARIANT_INTEGER\t\t32\t11"
+ << "51\t\t52\tSTORE_VARIANT_DOUBLE\t\t19\t33.7"
<< "-------------------------------------------------------------------------------";
messages = QStringList();
diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml
new file mode 100644
index 0000000..dcd4061
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Item {
+ id: root
+
+ property bool test1: root.children.length == 3
+ property bool test2: root.children[0] == item1
+ property bool test3: root.children[1] == item2
+ property bool test4: root.children[2] == item3
+ property bool test5: root.children[3] == null
+
+ children: [ Item { id: item1 }, Item { id: item2 }, Item { id: item3 } ]
+}
+
diff --git a/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml b/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml
new file mode 100644
index 0000000..fa299be
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Item {
+ id: root
+
+ property bool test1
+ property bool test2
+ property bool test3
+ property bool test4
+ property bool test5
+
+ Component.onCompleted: {
+ test1 = (root.resources.length >= 3)
+ test2 = root.resources[0] == item1
+ test3 = root.resources[1] == item2
+ test4 = root.resources[2] == item3
+ test5 = root.resources[10] == null
+ }
+
+ resources: [ Item { id: item1 }, Item { id: item2 }, Item { id: item3 } ]
+}
diff --git a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
index 0eb2141..e834a4e 100644
--- a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
+++ b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
@@ -5,3 +5,6 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeitem.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index 46f3517..4400116 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -64,6 +64,9 @@ private slots:
void transforms();
void transforms_data();
+ void childrenProperty();
+ void resourcesProperty();
+
private:
template<typename T>
T *findItem(QGraphicsObject *parent, const QString &objectName);
@@ -290,7 +293,7 @@ void tst_QDeclarativeItem::keyNavigation()
void tst_QDeclarativeItem::smooth()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; Item { smooth: false; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Item { smooth: false; }", QUrl::fromLocalFile(""));
QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
QSignalSpy spy(item, SIGNAL(smoothChanged(bool)));
@@ -319,7 +322,7 @@ void tst_QDeclarativeItem::smooth()
void tst_QDeclarativeItem::clip()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6\nItem { clip: false\n }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7\nItem { clip: false\n }", QUrl::fromLocalFile(""));
QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
QSignalSpy spy(item, SIGNAL(clipChanged(bool)));
@@ -423,12 +426,42 @@ void tst_QDeclarativeItem::transforms()
QFETCH(QByteArray, qml);
QFETCH(QMatrix, matrix);
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6\nItem { transform: "+qml+"}", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7\nItem { transform: "+qml+"}", QUrl::fromLocalFile(""));
QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
QVERIFY(item);
QCOMPARE(item->sceneMatrix(), matrix);
}
+void tst_QDeclarativeItem::childrenProperty()
+{
+ QDeclarativeComponent component(&engine, SRCDIR "/data/childrenProperty.qml");
+
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ QCOMPARE(o->property("test3").toBool(), true);
+ QCOMPARE(o->property("test4").toBool(), true);
+ QCOMPARE(o->property("test5").toBool(), true);
+ delete o;
+}
+
+void tst_QDeclarativeItem::resourcesProperty()
+{
+ QDeclarativeComponent component(&engine, SRCDIR "/data/resourcesProperty.qml");
+
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ QCOMPARE(o->property("test3").toBool(), true);
+ QCOMPARE(o->property("test4").toBool(), true);
+ QCOMPARE(o->property("test5").toBool(), true);
+ delete o;
+}
+
void tst_QDeclarativeItem::propertyChanges()
{
QDeclarativeView *canvas = new QDeclarativeView(0);
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml
index 6362b2d..f62c860 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml
@@ -2,7 +2,7 @@ import Test 1.0
import Qt 4.6
QtObject {
- property var other
+ property variant other
other: MyTypeObject { id: obj }
property alias enumAlias: obj.enumProperty;
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml
index d1e78f8..9050c3a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml
@@ -3,7 +3,7 @@ import Qt 4.6
QtObject {
property alias obj : otherObj
- property var child
+ property variant child
child: QtObject {
id: otherObj
property int myValue: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml b/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml
index dc3b382..df8c851 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml
@@ -2,7 +2,7 @@ import Test 1.0
import Qt 4.6
QtObject {
- property var child
+ property variant child
child: QtObject { id: obj }
property alias objAlias: obj;
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml b/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml
new file mode 100644
index 0000000..e5a7cf8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int a: Math.max(10, 9)
+ property int b: 11
+ Component.onDestruction: console.log("Destruction " + a + " " + b);
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml
index e059937..0b968c2 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml
@@ -1,7 +1,7 @@
import Qt 4.6
QtObject {
- property var other
+ property variant other
other: Alias { id: myAliasObject }
property alias value: myAliasObject.aliasValue
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml
index 4316d0d..125c518 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml
@@ -4,7 +4,7 @@ import Test 1.0
QtObject {
property alias otherAlias: otherObject
- property var other
+ property variant other
other: MyQmlObject {
id: otherObject
value: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml
index 2b9ad85..629dd2a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml
@@ -1,7 +1,7 @@
import Qt 4.6
QtObject {
- property var other
+ property variant other
other: Alias3 { id: myAliasObject }
property int value: myAliasObject.obj.myValue
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml
index a2a41a1..7c072e1 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml
@@ -1,7 +1,7 @@
import Qt 4.6
QtObject {
- property var other
+ property variant other
other: Alias4 { id: myAliasObject }
property int value: myAliasObject.obj.myValue
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml
new file mode 100644
index 0000000..91fd833
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+QtObject {
+ property variant test1: 1
+ property variant test2: 1.7
+ property variant test3: "Hello world!"
+ property variant test4: "#FF008800"
+ property variant test5: "10,10,10x10"
+ property variant test6: "10,10"
+ property variant test7: "10x10"
+ property variant test8: "100,100,100"
+ property variant test9: String("#FF008800")
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml
index 0ff9370..774762a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml
@@ -2,6 +2,6 @@ import Test 1.0
import Qt 4.6
QtObject {
- property var a;
+ property variant a;
a: MyQmlObject {}
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml b/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml
index 0a7249a..e745e91 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml
@@ -1,7 +1,7 @@
import Qt 4.6
QtObject {
- property var test
+ property variant test
test: ComponentComposite {}
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.errors.txt
new file mode 100644
index 0000000..3348494
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.errors.txt
@@ -0,0 +1 @@
+4:5:Cannot assign to non-existent property "onDestroyed"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml
new file mode 100644
index 0000000..4eab50a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ onDestroyed: print("Hello World!")
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml
index bedab8c..6411609 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml
@@ -9,5 +9,5 @@ QtObject {
property color colorProperty: "red"
property url urlProperty: "main.qml"
property date dateProperty: "1945-09-02"
- property var varProperty: "Hello World!"
+ property variant varProperty: "Hello World!"
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nScript.qml b/tests/auto/declarative/qdeclarativelanguage/data/i18nScript.qml
index 942ed90..e77cb52 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/i18nScript.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/i18nScript.qml
@@ -1,12 +1,9 @@
import Test 1.0
MyTypeObject {
- Script {
- function val() {
- var áâãäå = 20
- return "Test áâãäå: " + áâãäå
- }
-
+ function val() {
+ var áâãäå = 20
+ return "Test áâãäå: " + áâãäå
}
stringProperty: val()
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/idProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/idProperty.qml
index 90c1483..bf048ea 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/idProperty.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/idProperty.qml
@@ -1,6 +1,6 @@
import Test 1.0
MyContainer {
- property var object : myObjectId
+ property variant object : myObjectId
MyTypeObject {
id: "myObjectId"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importscript.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/importscript.1.errors.txt
new file mode 100644
index 0000000..ebc936d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importscript.1.errors.txt
@@ -0,0 +1 @@
+1:8:Script import requires a qualifier
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importscript.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/importscript.1.qml
new file mode 100644
index 0000000..2b2ab6b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importscript.1.qml
@@ -0,0 +1,3 @@
+import "test.js"
+
+Item { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml
index 1167e39..9012aa6 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml
@@ -1,6 +1,6 @@
import Qt 4.6
QtObject {
- property var o;
+ property variant o;
o.blah: 10
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml b/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml
new file mode 100644
index 0000000..7ebae7b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml
@@ -0,0 +1,17 @@
+import Test 1.0
+import Qt 4.6
+
+MyTypeObject {
+ // We set a and b to ensure that onCompleted is executed after bindings and
+ // constants have been assigned
+ property int a: Math.min(6, 7)
+ Component.onDestruction: console.log("Destruction " + a + " " + nestedObject.b)
+
+ objectProperty: OnDestructionType {
+ qmlobjectProperty: MyQmlObject {
+ id: nestedObject
+ property int b: 10
+ Component.onDestruction: console.log("Destruction " + a + " " + nestedObject.b)
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml
index cd86a48..a4a976e 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml
@@ -2,7 +2,7 @@ import Test 1.0
import Qt 4.6
QtObject {
- property var child
+ property variant child
child: HelperAlias { objAlias: QtObject {} }
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.1.errors.txt
deleted file mode 100644
index 50518cc..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.1.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-3:1:Invalid use of Script block
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.1.qml
deleted file mode 100644
index 8dac8b7..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.1.qml
+++ /dev/null
@@ -1,4 +0,0 @@
-import Qt 4.6
-
-Script {
-}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.10.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.10.errors.txt
deleted file mode 100644
index 13f47d1..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.10.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-6:9:Component elements may not contain script blocks
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.10.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.10.qml
deleted file mode 100644
index 516e878..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.10.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import Qt 4.6
-
-Item {
- Component {
- Item {}
- Script {}
- }
-}
-
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.11.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.11.errors.txt
deleted file mode 100644
index a664203..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.11.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-5:9:Invalid Script block
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.11.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.11.qml
deleted file mode 100644
index 6d2d598..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.11.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import Qt 4.6
-
-QtObject {
- Script {
- QtObject {}
- }
-}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt
deleted file mode 100644
index f8297f5..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-4:5:JavaScript declaration outside Script element
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.12.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.12.qml
deleted file mode 100644
index 9ecb5d9..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.12.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-import Qt 4.6
-
-QtObject {
- var a
-}
-
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.2.errors.txt
deleted file mode 100644
index 8fb3bbd..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.2.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-5:9:Properties cannot be set on Script block
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.2.qml
deleted file mode 100644
index dce1a41..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.2.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import Qt 4.6
-
-QtObject {
- Script {
- id: myScript
- }
-}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.3.errors.txt
deleted file mode 100644
index 8fb3bbd..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.3.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-5:9:Properties cannot be set on Script block
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.3.qml
deleted file mode 100644
index 8621a9a..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.3.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import Qt 4.6
-
-QtObject {
- Script {
- hello: world
- }
-}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.4.errors.txt
deleted file mode 100644
index 49a507f..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.4.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-5:9:Invalid Script source value
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.4.qml
deleted file mode 100644
index d89817c..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.4.qml
+++ /dev/null
@@ -1,8 +0,0 @@
-import Qt 4.6
-
-QtObject {
- Script {
- source: 10
- }
-}
-
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.5.errors.txt
deleted file mode 100644
index 49a507f..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.5.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-5:9:Invalid Script source value
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.5.qml
deleted file mode 100644
index 8986b3b..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.5.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import Qt 4.6
-
-QtObject {
- Script {
- source: "hello" + ".js"
- }
-}
-
-
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.6.errors.txt
deleted file mode 100644
index 4e53b6b..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.6.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-5:9:Invalid Script block. Specify either the source property or inline script
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.6.qml
deleted file mode 100644
index 07e9d78..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.6.qml
+++ /dev/null
@@ -1,11 +0,0 @@
-import Qt 4.6
-
-QtObject {
- Script {
- source: "test.js"
- function helloWorld() {}
- }
-}
-
-
-
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.7.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.7.errors.txt
deleted file mode 100644
index dc15ddf..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.7.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-5:9:Variable declarations not allow in inline Script blocks
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.7.qml
deleted file mode 100644
index fa905e6..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.7.qml
+++ /dev/null
@@ -1,11 +0,0 @@
-import Qt 4.6
-
-QtObject {
- Script {
- var a = 10;
- }
-}
-
-
-
-
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt
deleted file mode 100644
index 450fc16..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-6:9:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.8.qml
deleted file mode 100644
index f600c88..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.8.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import Qt 4.6
-
-QtObject {
- Script {
- source: "test.js"
- source: "test2.js"
- }
-}
-
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.9.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.9.errors.txt
deleted file mode 100644
index 41e8d46..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.9.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-5:9:Component elements may not contain script blocks
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.9.qml
deleted file mode 100644
index 79aa504..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.9.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import Qt 4.6
-
-Item {
- Component {
- Script {}
- }
-}
diff --git a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
index d7c1def..5771469 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
+++ b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
@@ -12,3 +12,5 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestNamed.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestNamed.qml
new file mode 100644
index 0000000..672cb8f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestNamed.qml
@@ -0,0 +1 @@
+NamedLocal { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir
index da10ba9..60150f8 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir
@@ -1,4 +1,5 @@
Test Test.qml
TestSubDir TestSubDir.qml
TestLocal TestLocal.qml
+NamedLocal LocalInternal.qml
internal LocalInternal LocalInternal.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 722e161..8feab32 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -52,6 +52,7 @@
#include "testtypes.h"
#include "../../../shared/util.h"
+#include "testhttpserver.h"
/*
This test case covers QML language issues. This covers everything that does not
@@ -87,6 +88,7 @@ private slots:
void assignBasicTypes();
void assignTypeExtremes();
void assignCompositeToType();
+ void assignLiteralToVariant();
void customParserTypes();
void rootAsQmlComponent();
void inlineQmlComponents();
@@ -111,10 +113,13 @@ private slots:
void i18n();
void i18n_data();
void onCompleted();
+ void onDestruction();
void scriptString();
void defaultPropertyListOrder();
void declaredPropertyValues();
+ void basicRemote_data();
+ void basicRemote();
void importsBuiltin_data();
void importsBuiltin();
void importsLocal_data();
@@ -136,7 +141,7 @@ private slots:
private:
QDeclarativeEngine engine;
- void testType(const QString& qml, const QString& type);
+ void testType(const QString& qml, const QString& type, const QString& error);
};
#define VERIFY_ERRORS(errorfile) \
@@ -283,18 +288,7 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("property.6") << "property.6.qml" << "property.6.errors.txt" << false;
QTest::newRow("property.7") << "property.7.qml" << "property.7.errors.txt" << false;
- QTest::newRow("Script.1") << "script.1.qml" << "script.1.errors.txt" << false;
- QTest::newRow("Script.2") << "script.2.qml" << "script.2.errors.txt" << false;
- QTest::newRow("Script.3") << "script.3.qml" << "script.3.errors.txt" << false;
- QTest::newRow("Script.4") << "script.4.qml" << "script.4.errors.txt" << false;
- QTest::newRow("Script.5") << "script.5.qml" << "script.5.errors.txt" << false;
- QTest::newRow("Script.6") << "script.6.qml" << "script.6.errors.txt" << false;
- QTest::newRow("Script.7") << "script.7.qml" << "script.7.errors.txt" << false;
- QTest::newRow("Script.8") << "script.8.qml" << "script.8.errors.txt" << false;
- QTest::newRow("Script.9") << "script.9.qml" << "script.9.errors.txt" << false;
- QTest::newRow("Script.10") << "script.10.qml" << "script.10.errors.txt" << false;
- QTest::newRow("Script.11") << "script.11.qml" << "script.11.errors.txt" << false;
- QTest::newRow("Script.12") << "script.12.qml" << "script.12.errors.txt" << false;
+ QTest::newRow("importScript.1") << "importscript.1.qml" << "importscript.1.errors.txt" << false;
QTest::newRow("Component.1") << "component.1.qml" << "component.1.errors.txt" << false;
QTest::newRow("Component.2") << "component.2.qml" << "component.2.errors.txt" << false;
@@ -336,6 +330,7 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("missingValueTypeProperty") << "missingValueTypeProperty.qml" << "missingValueTypeProperty.errors.txt" << false;
QTest::newRow("objectValueTypeProperty") << "objectValueTypeProperty.qml" << "objectValueTypeProperty.errors.txt" << false;
QTest::newRow("enumTypes") << "enumTypes.qml" << "enumTypes.errors.txt" << false;
+ QTest::newRow("destroyedSignal") << "destroyedSignal.qml" << "destroyedSignal.errors.txt" << false;
}
@@ -490,6 +485,37 @@ void tst_qdeclarativelanguage::assignCompositeToType()
QVERIFY(object != 0);
}
+// Test that literals are stored correctly in variant properties
+void tst_qdeclarativelanguage::assignLiteralToVariant()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("assignLiteralToVariant.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").userType(), (int)QVariant::Int);
+ QCOMPARE(object->property("test2").userType(), (int)QMetaType::Double);
+ QCOMPARE(object->property("test3").userType(), (int)QVariant::String);
+ QCOMPARE(object->property("test4").userType(), (int)QVariant::Color);
+ QCOMPARE(object->property("test5").userType(), (int)QVariant::RectF);
+ QCOMPARE(object->property("test6").userType(), (int)QVariant::PointF);
+ QCOMPARE(object->property("test7").userType(), (int)QVariant::SizeF);
+ QCOMPARE(object->property("test8").userType(), (int)QVariant::Vector3D);
+ QCOMPARE(object->property("test9").userType(), (int)QVariant::String);
+
+ QVERIFY(object->property("test1") == QVariant(1));
+ QVERIFY(object->property("test2") == QVariant((double)1.7));
+ QVERIFY(object->property("test3") == QVariant(QString(QLatin1String("Hello world!"))));
+ QVERIFY(object->property("test4") == QVariant(QColor::fromRgb(0xFF008800)));
+ QVERIFY(object->property("test5") == QVariant(QRectF(10, 10, 10, 10)));
+ QVERIFY(object->property("test6") == QVariant(QPointF(10, 10)));
+ QVERIFY(object->property("test7") == QVariant(QSizeF(10, 10)));
+ QVERIFY(object->property("test8") == QVariant(QVector3D(100, 100, 100)));
+ QVERIFY(object->property("test9") == QVariant(QString(QLatin1String("#FF008800"))));
+
+ delete object;
+}
+
// Tests that custom parser types can be instantiated
void tst_qdeclarativelanguage::customParserTypes()
{
@@ -1025,6 +1051,20 @@ void tst_qdeclarativelanguage::onCompleted()
QVERIFY(object != 0);
}
+// Check that the Component::onDestruction attached property works
+void tst_qdeclarativelanguage::onDestruction()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("onDestruction.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QTest::ignoreMessage(QtDebugMsg, "Destruction 6 10");
+ QTest::ignoreMessage(QtDebugMsg, "Destruction 6 10");
+ QTest::ignoreMessage(QtDebugMsg, "Destruction 10 11");
+ delete object;
+}
+
// Check that assignments to QDeclarativeScriptString properties work
void tst_qdeclarativelanguage::scriptString()
{
@@ -1069,7 +1109,7 @@ void tst_qdeclarativelanguage::declaredPropertyValues()
}
// 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)
+void tst_qdeclarativelanguage::testType(const QString& qml, const QString& type, const QString& expectederror)
{
QDeclarativeComponent component(&engine);
component.setData(qml.toUtf8(), TEST_FILE("empty.qml")); // just a file for relative local imports
@@ -1078,6 +1118,13 @@ void tst_qdeclarativelanguage::testType(const QString& qml, const QString& type)
if (type.isEmpty()) {
QVERIFY(component.isError());
+ QString actualerror;
+ foreach (const QDeclarativeError e, component.errors()) {
+ if (!actualerror.isEmpty())
+ actualerror.append("; ");
+ actualerror.append(e.description());
+ }
+ QCOMPARE(actualerror,expectederror);
} else {
VERIFY_ERRORS(0);
QObject *object = component.create();
@@ -1097,169 +1144,245 @@ void tst_qdeclarativelanguage::importsBuiltin_data()
QTest::addColumn<QString>("qml");
QTest::addColumn<QString>("type");
+ QTest::addColumn<QString>("error");
// import built-ins
QTest::newRow("missing import")
<< "Test {}"
- << "";
+ << ""
+ << "Test is not a type";
QTest::newRow("not in version 0.0")
<< "import com.nokia.Test 0.0\n"
"Test {}"
- << "";
+ << ""
+ << "Test is not a type";
+ QTest::newRow("version not installed")
+ << "import com.nokia.Test 99.0\n"
+ "Test {}"
+ << ""
+ << "module \"com.nokia.Test\" version 99.0 is not installed";
QTest::newRow("in version 0.0")
<< "import com.nokia.Test 0.0\n"
"TestTP {}"
- << "TestType";
+ << "TestType"
+ << "";
QTest::newRow("qualified in version 0.0")
<< "import com.nokia.Test 0.0 as T\n"
"T.TestTP {}"
- << "TestType";
+ << "TestType"
+ << "";
QTest::newRow("in version 1.0")
<< "import com.nokia.Test 1.0\n"
"Test {}"
- << "TestType";
+ << "TestType"
+ << "";
QTest::newRow("qualified wrong")
<< "import com.nokia.Test 1.0 as T\n" // QT-610
"Test {}"
- << "";
+ << ""
+ << "Test is not a type";
QTest::newRow("qualified right")
<< "import com.nokia.Test 1.0 as T\n"
"T.Test {}"
- << "TestType";
+ << "TestType"
+ << "";
QTest::newRow("qualified right but not in version 0.0")
<< "import com.nokia.Test 0.0 as T\n"
"T.Test {}"
- << "";
+ << ""
+ << "T.Test is not a type";
QTest::newRow("in version 1.1")
<< "import com.nokia.Test 1.1\n"
"Test {}"
- << "TestType";
+ << "TestType"
+ << "";
QTest::newRow("in version 1.3")
<< "import com.nokia.Test 1.3\n"
"Test {}"
- << "TestType";
+ << "TestType"
+ << "";
QTest::newRow("in version 1.5")
<< "import com.nokia.Test 1.5\n"
"Test {}"
- << "TestType";
+ << "TestType"
+ << "";
QTest::newRow("changed in version 1.8")
<< "import com.nokia.Test 1.8\n"
"Test {}"
- << "TestType2";
+ << "TestType2"
+ << "";
QTest::newRow("in version 1.12")
<< "import com.nokia.Test 1.12\n"
"Test {}"
- << "TestType2";
+ << "TestType2"
+ << "";
QTest::newRow("old in version 1.9")
<< "import com.nokia.Test 1.9\n"
"OldTest {}"
- << "TestType";
+ << "TestType"
+ << "";
QTest::newRow("old in version 1.11")
<< "import com.nokia.Test 1.11\n"
"OldTest {}"
- << "TestType";
+ << "TestType"
+ << "";
QTest::newRow("multiversion 1")
<< "import com.nokia.Test 1.11\n"
"import com.nokia.Test 1.12\n"
"Test {}"
- << "TestType2";
+ << "TestType2"
+ << "";
QTest::newRow("multiversion 2")
<< "import com.nokia.Test 1.11\n"
"import com.nokia.Test 1.12\n"
"OldTest {}"
- << "TestType";
+ << "TestType"
+ << "";
QTest::newRow("qualified multiversion 3")
<< "import com.nokia.Test 1.0 as T0\n"
"import com.nokia.Test 1.8 as T8\n"
"T0.Test {}"
- << "TestType";
+ << "TestType"
+ << "";
QTest::newRow("qualified multiversion 4")
<< "import com.nokia.Test 1.0 as T0\n"
"import com.nokia.Test 1.8 as T8\n"
"T8.Test {}"
- << "TestType2";
+ << "TestType2"
+ << "";
}
void tst_qdeclarativelanguage::importsBuiltin()
{
QFETCH(QString, qml);
QFETCH(QString, type);
- testType(qml,type);
+ QFETCH(QString, error);
+ testType(qml,type,error);
}
void tst_qdeclarativelanguage::importsLocal_data()
{
QTest::addColumn<QString>("qml");
QTest::addColumn<QString>("type");
+ QTest::addColumn<QString>("error");
// import locals
QTest::newRow("local import")
<< "import \"subdir\"\n" // QT-613
"Test {}"
- << "QDeclarativeRectangle";
+ << "QDeclarativeRectangle"
+ << "";
QTest::newRow("local import second")
- << "import Qt 4.6\nimport \"subdir\"\n"
+ << "import Qt 4.7\nimport \"subdir\"\n"
"Test {}"
- << "QDeclarativeRectangle";
+ << "QDeclarativeRectangle"
+ << "";
QTest::newRow("local import subsubdir")
- << "import Qt 4.6\nimport \"subdir/subsubdir\"\n"
+ << "import Qt 4.7\nimport \"subdir/subsubdir\"\n"
"SubTest {}"
- << "QDeclarativeRectangle";
+ << "QDeclarativeRectangle"
+ << "";
QTest::newRow("local import QTBUG-7721 A")
<< "subdir.Test {}" // no longer allowed (QTBUG-7721)
- << "";
+ << ""
+ << "subdir.Test is not a type";
QTest::newRow("local import QTBUG-7721 B")
<< "import \"subdir\" as X\n"
"X.subsubdir.SubTest {}" // no longer allowed (QTBUG-7721)
- << "";
+ << ""
+ << "X.subsubdir.SubTest is not a type";
QTest::newRow("local import as")
<< "import \"subdir\" as T\n"
"T.Test {}"
- << "QDeclarativeRectangle";
+ << "QDeclarativeRectangle"
+ << "";
QTest::newRow("wrong local import as")
<< "import \"subdir\" as T\n"
"Test {}"
- << "";
+ << ""
+ << "Test is not a type";
QTest::newRow("library precedence over local import")
<< "import \"subdir\"\n"
"import com.nokia.Test 1.0\n"
"Test {}"
- << "TestType";
+ << "TestType"
+ << "";
}
void tst_qdeclarativelanguage::importsLocal()
{
QFETCH(QString, qml);
QFETCH(QString, type);
- testType(qml,type);
+ QFETCH(QString, error);
+ testType(qml,type,error);
+}
+
+void tst_qdeclarativelanguage::basicRemote_data()
+{
+ QTest::addColumn<QUrl>("url");
+ QTest::addColumn<QString>("type");
+ QTest::addColumn<QString>("error");
+
+ QString serverdir = "http://127.0.0.1:14447/qtest/declarative/qmllanguage/";
+
+ QTest::newRow("no need for qmldir") << QUrl(serverdir+"Test.qml") << "" << "";
+ QTest::newRow("need qmldir") << QUrl(serverdir+"TestLocal.qml") << "" << "";
+}
+
+void tst_qdeclarativelanguage::basicRemote()
+{
+ QFETCH(QUrl, url);
+ QFETCH(QString, type);
+ QFETCH(QString, error);
+
+ TestHTTPServer server(14447);
+ server.serveDirectory(SRCDIR);
+
+ QDeclarativeComponent component(&engine, url);
+
+ QTRY_VERIFY(!component.isLoading());
+
+ if (error.isEmpty()) {
+ if (component.isError())
+ qDebug() << component.errors();
+ QVERIFY(!component.isError());
+ } else {
+ QVERIFY(component.isError());
+ }
}
void tst_qdeclarativelanguage::importsRemote_data()
{
QTest::addColumn<QString>("qml");
QTest::addColumn<QString>("type");
+ QTest::addColumn<QString>("error");
- QString serverdir = "http://127.0.0.1:14445/qtest/declarative/qmllanguage";
+ QString serverdir = "http://127.0.0.1:14447/qtest/declarative/qmllanguage";
- QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QDeclarativeRectangle";
- QTest::newRow("remote import with subdir") << "import \""+serverdir+"\"\nTestSubDir {}" << "QDeclarativeText";
- QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QDeclarativeImage";
- QTest::newRow("wrong remote import with undeclared local") << "import \""+serverdir+"\"\nWrongTestLocal {}" << "";
- QTest::newRow("wrong remote import of internal local") << "import \""+serverdir+"\"\nLocalInternal {}" << "";
- QTest::newRow("wrong remote import of undeclared local") << "import \""+serverdir+"\"\nUndeclaredLocal {}" << "";
+ QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QDeclarativeRectangle"
+ << "";
+ QTest::newRow("remote import with subdir") << "import \""+serverdir+"\"\nTestSubDir {}" << "QDeclarativeText"
+ << "";
+ QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QDeclarativeImage"
+ << "";
+ QTest::newRow("wrong remote import with undeclared local") << "import \""+serverdir+"\"\nWrongTestLocal {}" << ""
+ << "WrongTestLocal is not a type";
+ QTest::newRow("wrong remote import of internal local") << "import \""+serverdir+"\"\nLocalInternal {}" << ""
+ << "LocalInternal is not a type";
+ QTest::newRow("wrong remote import of undeclared local") << "import \""+serverdir+"\"\nUndeclaredLocal {}" << ""
+ << "UndeclaredLocal is not a type";
}
-#include "testhttpserver.h"
-
void tst_qdeclarativelanguage::importsRemote()
{
QFETCH(QString, qml);
QFETCH(QString, type);
+ QFETCH(QString, error);
- TestHTTPServer server(14445);
+ TestHTTPServer server(14447);
server.serveDirectory(SRCDIR);
- testType(qml,type);
+ testType(qml,type,error);
}
void tst_qdeclarativelanguage::importsInstalled_data()
@@ -1268,43 +1391,57 @@ void tst_qdeclarativelanguage::importsInstalled_data()
QTest::addColumn<QString>("qml");
QTest::addColumn<QString>("type");
+ QTest::addColumn<QString>("error");
// import installed
QTest::newRow("installed import 0")
<< "import com.nokia.installedtest 0.0\n"
"InstalledTestTP {}"
- << "QDeclarativeRectangle";
+ << "QDeclarativeRectangle"
+ << "";
QTest::newRow("installed import 0 as TP")
<< "import com.nokia.installedtest 0.0 as TP\n"
"TP.InstalledTestTP {}"
- << "QDeclarativeRectangle";
+ << "QDeclarativeRectangle"
+ << "";
QTest::newRow("installed import 1")
<< "import com.nokia.installedtest 1.0\n"
"InstalledTest {}"
- << "QDeclarativeRectangle";
+ << "QDeclarativeRectangle"
+ << "";
QTest::newRow("installed import 2")
<< "import com.nokia.installedtest 1.3\n"
"InstalledTest {}"
- << "QDeclarativeRectangle";
+ << "QDeclarativeRectangle"
+ << "";
QTest::newRow("installed import 3")
<< "import com.nokia.installedtest 1.4\n"
"InstalledTest {}"
- << "QDeclarativeText";
- QTest::newRow("installed import 4")
+ << "QDeclarativeText"
+ << "";
+ QTest::newRow("installed import minor version not available") // QTBUG-9627
<< "import com.nokia.installedtest 1.10\n"
"InstalledTest {}"
- << "QDeclarativeText";
+ << ""
+ << "module \"com.nokia.installedtest\" version 1.10 is not installed";
+ QTest::newRow("installed import major version not available") // QTBUG-9627
+ << "import com.nokia.installedtest 9.0\n"
+ "InstalledTest {}"
+ << ""
+ << "module \"com.nokia.installedtest\" version 9.0 is not installed";
QTest::newRow("installed import visibility") // QT-614
<< "import com.nokia.installedtest 1.4\n"
"PrivateType {}"
- << "";
+ << ""
+ << "PrivateType is not a type";
}
void tst_qdeclarativelanguage::importsInstalled()
{
QFETCH(QString, qml);
QFETCH(QString, type);
- testType(qml,type);
+ QFETCH(QString, error);
+ testType(qml,type,error);
}
@@ -1312,65 +1449,77 @@ void tst_qdeclarativelanguage::importsOrder_data()
{
QTest::addColumn<QString>("qml");
QTest::addColumn<QString>("type");
+ QTest::addColumn<QString>("error");
QTest::newRow("installed import overrides 1") <<
"import com.nokia.installedtest 1.0\n"
"import com.nokia.installedtest 1.4\n"
"InstalledTest {}"
- << "QDeclarativeText";
+ << "QDeclarativeText"
+ << "";
QTest::newRow("installed import overrides 2") <<
"import com.nokia.installedtest 1.4\n"
"import com.nokia.installedtest 1.0\n"
"InstalledTest {}"
- << "QDeclarativeRectangle";
+ << "QDeclarativeRectangle"
+ << "";
QTest::newRow("installed import re-overrides 1") <<
"import com.nokia.installedtest 1.4\n"
"import com.nokia.installedtest 1.0\n"
"import com.nokia.installedtest 1.4\n"
"InstalledTest {}"
- << "QDeclarativeText";
+ << "QDeclarativeText"
+ << "";
QTest::newRow("installed import re-overrides 2") <<
"import com.nokia.installedtest 1.4\n"
"import com.nokia.installedtest 1.0\n"
"import com.nokia.installedtest 1.4\n"
"import com.nokia.installedtest 1.0\n"
"InstalledTest {}"
- << "QDeclarativeRectangle";
+ << "QDeclarativeRectangle"
+ << "";
QTest::newRow("installed import versus builtin 1") <<
"import com.nokia.installedtest 1.5\n"
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
"Rectangle {}"
- << "QDeclarativeRectangle";
+ << "QDeclarativeRectangle"
+ << "";
QTest::newRow("installed import versus builtin 2") <<
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
"import com.nokia.installedtest 1.5\n"
"Rectangle {}"
- << "QDeclarativeText";
+ << "QDeclarativeText"
+ << "";
QTest::newRow("namespaces cannot be overridden by types 1") <<
- "import Qt 4.6 as Rectangle\n"
+ "import Qt 4.7 as Rectangle\n"
"import com.nokia.installedtest 1.5\n"
"Rectangle {}"
- << "";
+ << ""
+ << "Namespace Rectangle cannot be used as a type";
QTest::newRow("namespaces cannot be overridden by types 2") <<
- "import Qt 4.6 as Rectangle\n"
+ "import Qt 4.7 as Rectangle\n"
"import com.nokia.installedtest 1.5\n"
"Rectangle.Image {}"
- << "QDeclarativeImage";
+ << "QDeclarativeImage"
+ << "";
QTest::newRow("local last 1") <<
"LocalLast {}"
- << "QDeclarativeText";
+ << "QDeclarativeText"
+ << "";
QTest::newRow("local last 2") <<
"import com.nokia.installedtest 1.0\n"
"LocalLast {}"
- << "QDeclarativeRectangle"; // i.e. from com.nokia.installedtest, not data/LocalLast.qml
+ << "QDeclarativeRectangle"
+ << ""; // i.e. from com.nokia.installedtest, not data/LocalLast.qml
}
void tst_qdeclarativelanguage::importsOrder()
{
QFETCH(QString, qml);
QFETCH(QString, type);
- testType(qml,type);
+ QFETCH(QString, error);
+ testType(qml,type,error);
}
void tst_qdeclarativelanguage::qmlAttachedPropertiesObjectMethod()
@@ -1404,7 +1553,7 @@ void tst_qdeclarativelanguage::qmlAttachedPropertiesObjectMethod()
void tst_qdeclarativelanguage::crash1()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6\nComponent {}", QUrl());
+ component.setData("import Qt 4.7\nComponent {}", QUrl());
}
void tst_qdeclarativelanguage::crash2()
diff --git a/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml b/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml
index 1792500..5c2178f 100644
--- a/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml
+++ b/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml
@@ -5,29 +5,26 @@ Item {
id: resizable
width:300
height:300
-
- GraphicsObjectContainer {
- anchors.fill: parent
- synchronizedResizing: true
-
- QGraphicsWidget {
-
- layout: QGraphicsLinearLayout {
- spacing: 0
- LayoutItem {
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent }
- }
- LayoutItem {
- objectName: "right"
- minimumSize: "100x100"
- maximumSize: "400x400"
- preferredSize: "200x200"
- Rectangle { objectName: "greenRect"; color: "green"; anchors.fill: parent }
- }
+ QGraphicsWidget {
+ x : resizable.x
+ y : resizable.y
+ width : resizable.width
+ height : resizable.height
+ layout: QGraphicsLinearLayout {
+ spacing: 0
+ LayoutItem {
+ objectName: "left"
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent }
+ }
+ LayoutItem {
+ objectName: "right"
+ minimumSize: "100x100"
+ maximumSize: "400x400"
+ preferredSize: "200x200"
+ Rectangle { objectName: "greenRect"; color: "green"; anchors.fill: parent }
}
}
}
diff --git a/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro b/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro
index 7276162..a2065f4 100644
--- a/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro
+++ b/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro
@@ -5,3 +5,6 @@ macx:CONFIG -= app_bundle
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/model.qml b/tests/auto/declarative/qdeclarativelistmodel/data/model.qml
index ebd4ebf..4019948 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/data/model.qml
+++ b/tests/auto/declarative/qdeclarativelistmodel/data/model.qml
@@ -2,9 +2,9 @@ import Qt 4.6
Item {
id: item
- property var model
+ property variant model
property bool done: false
- property var result
+ property variant result
function evalExpressionViaWorker(commands) {
done = false
diff --git a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
index 8813242..9f1e146 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
+++ b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
@@ -7,3 +7,6 @@ SOURCES += tst_qdeclarativelistmodel.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index d02f54f..9d61ad0 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -118,7 +118,7 @@ void tst_QDeclarativeListModel::waitForWorker(QDeclarativeItem *item)
void tst_QDeclarativeListModel::static_i18n()
{
QString expect = QString::fromUtf8("na\303\257ve");
- QString componentStr = "import Qt 4.6\nListModel { ListElement { prop1: \""+expect+"\" } }";
+ QString componentStr = "import Qt 4.7\nListModel { ListElement { prop1: \""+expect+"\" } }";
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
component.setData(componentStr.toUtf8(), QUrl::fromLocalFile(""));
@@ -139,7 +139,7 @@ void tst_QDeclarativeListModel::static_nestedElements()
QString elementsStr = elements.join(",\n") + "\n";
QString componentStr =
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
"ListModel {\n"
" ListElement {\n"
" attributes: [\n";
@@ -337,7 +337,6 @@ void tst_QDeclarativeListModel::dynamic_worker()
}
delete item;
- QTest::ignoreMessage(QtWarningMsg, "QThread: Destroyed while thread is still running");
qApp->processEvents();
}
@@ -367,7 +366,6 @@ void tst_QDeclarativeListModel::convertNestedToFlat_fail()
QCOMPARE(model.count(), 2);
delete item;
- QTest::ignoreMessage(QtWarningMsg, "QThread: Destroyed while thread is still running");
qApp->processEvents();
}
@@ -427,7 +425,6 @@ void tst_QDeclarativeListModel::convertNestedToFlat_ok()
QCOMPARE(model.count(), count+1);
delete item;
- QTest::ignoreMessage(QtWarningMsg, "QThread: Destroyed while thread is still running");
qApp->processEvents();
}
@@ -471,7 +468,7 @@ void tst_QDeclarativeListModel::static_types()
QFETCH(QString, qml);
QFETCH(QVariant, value);
- qml = "import Qt 4.6\nListModel { " + qml + " }";
+ qml = "import Qt 4.7\nListModel { " + qml + " }";
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
@@ -503,32 +500,36 @@ void tst_QDeclarativeListModel::error_data()
QTest::addColumn<QString>("error");
QTest::newRow("id not allowed in ListElement")
- << "import Qt 4.6\nListModel { ListElement { id: fred } }"
+ << "import Qt 4.7\nListModel { ListElement { id: fred } }"
<< "ListElement: cannot use reserved \"id\" property";
QTest::newRow("id allowed in ListModel")
- << "import Qt 4.6\nListModel { id:model }"
+ << "import Qt 4.7\nListModel { id:model }"
<< "";
QTest::newRow("random properties not allowed in ListModel")
- << "import Qt 4.6\nListModel { foo:123 }"
+ << "import Qt 4.7\nListModel { foo:123 }"
<< "ListModel: undefined property 'foo'";
QTest::newRow("random properties allowed in ListElement")
- << "import Qt 4.6\nListModel { ListElement { foo:123 } }"
+ << "import Qt 4.7\nListModel { ListElement { foo:123 } }"
<< "";
QTest::newRow("bindings not allowed in ListElement")
- << "import Qt 4.6\nRectangle { id: rect; ListModel { ListElement { foo: rect.color } } }"
+ << "import Qt 4.7\nRectangle { id: rect; ListModel { ListElement { foo: rect.color } } }"
<< "ListElement: cannot use script for property value";
QTest::newRow("random object list properties allowed in ListElement")
- << "import Qt 4.6\nListModel { ListElement { foo: [ ListElement { bar: 123 } ] } }"
+ << "import Qt 4.7\nListModel { ListElement { foo: [ ListElement { bar: 123 } ] } }"
<< "";
QTest::newRow("default properties not allowed in ListElement")
- << "import Qt 4.6\nListModel { ListElement { Item { } } }"
- << "QTBUG-6082 ListElement should not allow child objects";
+ << "import Qt 4.7\nListModel { ListElement { Item { } } }"
+ << "ListElement: cannot contain nested elements";
+
+ QTest::newRow("QML elements not allowed in ListElement")
+ << "import Qt 4.7\nListModel { ListElement { a: Item { } } }"
+ << "ListElement: cannot contain nested elements";
}
void tst_QDeclarativeListModel::error()
@@ -543,8 +544,6 @@ void tst_QDeclarativeListModel::error()
if (error.isEmpty()) {
QVERIFY(!component.isError());
} else {
- if (error.startsWith(QLatin1String("QTBUG-")))
- QEXPECT_FAIL("",error.toLatin1(),Abort);
QVERIFY(component.isError());
QList<QDeclarativeError> errors = component.errors();
QCOMPARE(errors.count(),1);
diff --git a/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml b/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml
index 0c2d0aa..d64be0f 100644
--- a/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml
+++ b/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml
@@ -4,7 +4,7 @@ QtObject {
property list<QtObject> myList;
myList: QtObject {}
- property var value: myList
+ property variant value: myList
property int test: value.length
}
diff --git a/tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro b/tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro
index 0c9b2d9..f3e6f52 100644
--- a/tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro
+++ b/tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro
@@ -3,3 +3,6 @@ contains(QT_CONFIG,declarative): QT += declarative
macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativelistreference.cpp
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml b/tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml
new file mode 100644
index 0000000..6fc41fa
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml
@@ -0,0 +1,29 @@
+import Qt 4.7
+
+ListView {
+ id: list
+ objectName: "list"
+ width: 320
+ height: 480
+
+ function fillModel() {
+ list.model.append({"col": "red"});
+ list.currentIndex = list.count-1
+ list.model.append({"col": "blue"});
+ list.currentIndex = list.count-1
+ list.model.append({"col": "green"});
+ list.currentIndex = list.count-1
+ }
+
+ model: ListModel { id: listModel } // empty model
+ delegate: Rectangle { id: wrapper; objectName: "wrapper"; color: col; width: 300; height: 400 }
+ orientation: "Horizontal"
+ snapMode: "SnapToItem"
+ cacheBuffer: 1000
+
+ preferredHighlightBegin: 10
+ preferredHighlightEnd: 10
+
+ highlightRangeMode: "StrictlyEnforceRange"
+ focus: true
+}
diff --git a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
index 3a076f8..5d962c0 100644
--- a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
+++ b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
@@ -6,3 +6,5 @@ SOURCES += tst_qdeclarativelistview.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index 8d94804..6b7a361 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -50,6 +50,7 @@
#include <QtDeclarative/private/qdeclarativevisualitemmodel_p.h>
#include <QtDeclarative/private/qdeclarativelistmodel_p.h>
#include <QtDeclarative/private/qlistmodelinterface_p.h>
+#include "../../../shared/util.h"
class tst_QDeclarativeListView : public QObject
{
@@ -88,6 +89,7 @@ private slots:
void propertyChanges();
void componentChanges();
void modelChanges();
+ void QTBUG_9791();
private:
template <class T> void items();
@@ -325,62 +327,59 @@ void tst_QDeclarativeListView::items()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
- QVERIFY(testObject->error() == false);
+ QTRY_VERIFY(testObject->error() == false);
- QVERIFY(listview->highlightItem() != 0);
- QCOMPARE(listview->count(), model.count());
- QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+ QTRY_VERIFY(listview->highlightItem() != 0);
+ QTRY_COMPARE(listview->count(), model.count());
+ QTRY_COMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
// current item should be first item
- QCOMPARE(listview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 0));
+ QTRY_COMPARE(listview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 0));
for (int i = 0; i < model.count(); ++i) {
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", i);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(i));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(i));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", i);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(i));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(i));
}
// switch to other delegate
testObject->setAnimate(true);
QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
- QVERIFY(testObject->error() == false);
- QVERIFY(listview->currentItem());
+ QTRY_VERIFY(testObject->error() == false);
+ QTRY_VERIFY(listview->currentItem());
// set invalid highlight
testObject->setInvalidHighlight(true);
QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
- QVERIFY(testObject->error() == false);
- QVERIFY(listview->currentItem());
- QVERIFY(listview->highlightItem() == 0);
+ QTRY_VERIFY(testObject->error() == false);
+ QTRY_VERIFY(listview->currentItem());
+ QTRY_VERIFY(listview->highlightItem() == 0);
// back to normal highlight
testObject->setInvalidHighlight(false);
QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
- QVERIFY(testObject->error() == false);
- QVERIFY(listview->currentItem());
- QVERIFY(listview->highlightItem() != 0);
+ QTRY_VERIFY(testObject->error() == false);
+ QTRY_VERIFY(listview->currentItem());
+ QTRY_VERIFY(listview->highlightItem() != 0);
// set an empty model and confirm that items are destroyed
T model2;
ctxt->setContextProperty("testModel", &model2);
- // Allow deleteLaters to process
- QTest::qWait(500);
-
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
- QVERIFY(itemCount == 0);
+ QTRY_VERIFY(itemCount == 0);
- QCOMPARE(listview->highlightResizeSpeed(), 1000.0);
- QCOMPARE(listview->highlightMoveSpeed(), 1000.0);
+ QTRY_COMPARE(listview->highlightResizeSpeed(), 1000.0);
+ QTRY_COMPARE(listview->highlightMoveSpeed(), 1000.0);
delete canvas;
}
@@ -406,18 +405,18 @@ void tst_QDeclarativeListView::changed()
qApp->processEvents();
QDeclarativeFlickable *listview = findItem<QDeclarativeFlickable>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
model.modifyItem(1, "Will", "9876");
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(1));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(1));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(1));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(1));
delete canvas;
}
@@ -442,75 +441,66 @@ void tst_QDeclarativeListView::inserted()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
model.insertItem(1, "Will", "9876");
- // let transitions settle.
- QTest::qWait(300);
-
- QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+ QTRY_COMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(1));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(1));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(1));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(1));
// Confirm items positioned correctly
for (int i = 0; i < model.count(); ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
- QCOMPARE(item->y(), i*20.0);
+ QTRY_COMPARE(item->y(), i*20.0);
}
model.insertItem(0, "Foo", "1111"); // zero index, and current item
- // let transitions settle.
- QTest::qWait(300);
-
- QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+ QTRY_COMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
name = findItem<QDeclarativeText>(viewport, "textName", 0);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(0));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(0));
number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(0));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(0));
- QCOMPARE(listview->currentIndex(), 1);
+ QTRY_COMPARE(listview->currentIndex(), 1);
// Confirm items positioned correctly
for (int i = 0; i < model.count(); ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
- QCOMPARE(item->y(), i*20.0);
+ QTRY_COMPARE(item->y(), i*20.0);
}
for (int i = model.count(); i < 30; ++i)
model.insertItem(i, "Hello", QString::number(i));
- QTest::qWait(300);
listview->setContentY(80);
- QTest::qWait(300);
// Insert item outside visible area
model.insertItem(1, "Hello", "1324");
- QTest::qWait(300);
- QVERIFY(listview->contentY() == 80);
+ QTRY_VERIFY(listview->contentY() == 80);
// Confirm items positioned correctly
for (int i = 5; i < 5+15; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(), i*20.0 - 20.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(), i*20.0 - 20.0);
}
-// QCOMPARE(listview->viewportHeight(), model.count() * 20.0);
+// QTRY_COMPARE(listview->viewportHeight(), model.count() * 20.0);
delete canvas;
}
@@ -535,66 +525,60 @@ void tst_QDeclarativeListView::removed(bool animated)
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
model.removeItem(1);
- // let transitions settle.
- QTest::qWait(300);
-
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(1));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(1));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(1));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(1));
// Confirm items positioned correctly
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->y() == i*20);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->y() == i*20);
}
// Remove first item (which is the current item);
model.removeItem(0); // post: top item starts at 20
- // let transitions settle.
QTest::qWait(300);
name = findItem<QDeclarativeText>(viewport, "textName", 0);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(0));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(0));
number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(0));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(0));
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(),i*20.0 + 20.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(),i*20.0 + 20.0);
}
// Remove items not visible
model.removeItem(18);
- // let transitions settle.
- QTest::qWait(300);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(),i*20.0+20.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(),i*20.0+20.0);
}
// Remove items before visible
@@ -602,25 +586,22 @@ void tst_QDeclarativeListView::removed(bool animated)
listview->setCurrentIndex(10);
model.removeItem(1); // post: top item will be at 40
- // let transitions settle.
- QTest::qWait(300);
// Confirm items positioned correctly
for (int i = 2; i < 18; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(),40+i*20.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(),40+i*20.0);
}
// Remove current index
- QVERIFY(listview->currentIndex() == 9);
+ QTRY_VERIFY(listview->currentIndex() == 9);
QDeclarativeItem *oldCurrent = listview->currentItem();
model.removeItem(9);
- QTest::qWait(300);
- QCOMPARE(listview->currentIndex(), 9);
- QVERIFY(listview->currentItem() != oldCurrent);
+ QTRY_COMPARE(listview->currentIndex(), 9);
+ QTRY_VERIFY(listview->currentItem() != oldCurrent);
listview->setContentY(40); // That's the top now
// let transitions settle.
@@ -631,29 +612,25 @@ void tst_QDeclarativeListView::removed(bool animated)
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(),40+i*20.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(),40+i*20.0);
}
// remove current item beyond visible items.
listview->setCurrentIndex(20);
- QTest::qWait(300);
listview->setContentY(40);
model.removeItem(20);
- QTest::qWait(300);
- QCOMPARE(listview->currentIndex(), 20);
- QVERIFY(listview->currentItem() != 0);
+ QTRY_COMPARE(listview->currentIndex(), 20);
+ QTRY_VERIFY(listview->currentItem() != 0);
// remove item before current, but visible
listview->setCurrentIndex(8);
- QTest::qWait(300);
oldCurrent = listview->currentItem();
model.removeItem(6);
- QTest::qWait(300);
- QCOMPARE(listview->currentIndex(), 7);
- QVERIFY(listview->currentItem() == oldCurrent);
+ QTRY_COMPARE(listview->currentIndex(), 7);
+ QTRY_VERIFY(listview->currentItem() == oldCurrent);
delete canvas;
}
@@ -677,19 +654,16 @@ void tst_QDeclarativeListView::clear()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
model.clear();
- // let transitions settle.
- QTest::qWait(500);
-
- QVERIFY(listview->count() == 0);
- QVERIFY(listview->currentItem() == 0);
- QVERIFY(listview->contentY() == 0);
+ QTRY_VERIFY(listview->count() == 0);
+ QTRY_VERIFY(listview->currentItem() == 0);
+ QTRY_VERIFY(listview->contentY() == 0);
delete canvas;
}
@@ -714,37 +688,34 @@ void tst_QDeclarativeListView::moved()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
model.moveItem(1, 4);
- // let transitions settle.
- QTest::qWait(500);
-
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(1));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(1));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(1));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(1));
name = findItem<QDeclarativeText>(viewport, "textName", 4);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(4));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(4));
number = findItem<QDeclarativeText>(viewport, "textNumber", 4);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(4));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(4));
// Confirm items positioned correctly
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->y() == i*20);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->y() == i*20);
}
listview->setContentY(80);
@@ -752,41 +723,35 @@ void tst_QDeclarativeListView::moved()
// move outside visible area
model.moveItem(1, 18);
- // let transitions settle.
- QTest::qWait(500);
-
// Confirm items positioned correctly and indexes correct
for (int i = 3; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(), i*20.0 + 20);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(), i*20.0 + 20);
name = findItem<QDeclarativeText>(viewport, "textName", i);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(i));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(i));
number = findItem<QDeclarativeText>(viewport, "textNumber", i);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(i));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(i));
}
// move from outside visible into visible
model.moveItem(20, 4);
- // let transitions settle.
- QTest::qWait(500);
-
// Confirm items positioned correctly and indexes correct
for (int i = 3; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(), i*20.0 + 20);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(), i*20.0 + 20);
name = findItem<QDeclarativeText>(viewport, "textName", i);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(i));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(i));
number = findItem<QDeclarativeText>(viewport, "textNumber", i);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(i));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(i));
}
delete canvas;
@@ -807,32 +772,31 @@ void tst_QDeclarativeListView::enforceRange()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
- QCOMPARE(listview->preferredHighlightBegin(), 100.0);
- QCOMPARE(listview->preferredHighlightEnd(), 100.0);
- QCOMPARE(listview->highlightRangeMode(), QDeclarativeListView::StrictlyEnforceRange);
+ QTRY_COMPARE(listview->preferredHighlightBegin(), 100.0);
+ QTRY_COMPARE(listview->preferredHighlightEnd(), 100.0);
+ QTRY_COMPARE(listview->highlightRangeMode(), QDeclarativeListView::StrictlyEnforceRange);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
// view should be positioned at the top of the range.
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", 0);
- QVERIFY(item);
- QCOMPARE(listview->contentY(), -100.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(listview->contentY(), -100.0);
QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 0);
- QVERIFY(name != 0);
- QCOMPARE(name->text(), model.name(0));
+ QTRY_VERIFY(name != 0);
+ QTRY_COMPARE(name->text(), model.name(0));
QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
- QVERIFY(number != 0);
- QCOMPARE(number->text(), model.number(0));
+ QTRY_VERIFY(number != 0);
+ QTRY_COMPARE(number->text(), model.number(0));
// Check currentIndex is updated when viewport moves
listview->setContentY(20);
- QTest::qWait(500);
- QCOMPARE(listview->currentIndex(), 6);
+ QTRY_COMPARE(listview->currentIndex(), 6);
delete canvas;
}
@@ -855,30 +819,30 @@ void tst_QDeclarativeListView::spacing()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
// Confirm items positioned correctly
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->y() == i*20);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->y() == i*20);
}
listview->setSpacing(10);
- QVERIFY(listview->spacing() == 10);
+ QTRY_VERIFY(listview->spacing() == 10);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->y() == i*30);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->y() == i*30);
}
listview->setSpacing(0);
@@ -888,8 +852,8 @@ void tst_QDeclarativeListView::spacing()
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(), i*20.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(), i*20.0);
}
delete canvas;
@@ -910,63 +874,60 @@ void tst_QDeclarativeListView::sections()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
// Confirm items positioned correctly
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
- QVERIFY(item);
- QCOMPARE(item->y(), qreal(i*20 + ((i+4)/5) * 20));
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(), qreal(i*20 + ((i+4)/5) * 20));
}
// Remove section boundary
model.removeItem(5);
- QTest::qWait(100);
// New section header created
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", 5);
- QVERIFY(item);
- QCOMPARE(item->height(), 40.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->height(), 40.0);
model.insertItem(3, "New Item", "0");
- QTest::qWait(100);
// Section header moved
item = findItem<QDeclarativeItem>(viewport, "wrapper", 5);
- QVERIFY(item);
- QCOMPARE(item->height(), 20.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->height(), 20.0);
item = findItem<QDeclarativeItem>(viewport, "wrapper", 6);
- QVERIFY(item);
- QCOMPARE(item->height(), 40.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->height(), 40.0);
// insert item which will become a section header
model.insertItem(6, "Replace header", "1");
- QTest::qWait(100);
item = findItem<QDeclarativeItem>(viewport, "wrapper", 6);
- QVERIFY(item);
- QCOMPARE(item->height(), 40.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->height(), 40.0);
item = findItem<QDeclarativeItem>(viewport, "wrapper", 7);
- QVERIFY(item);
- QCOMPARE(item->height(), 20.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->height(), 20.0);
- QCOMPARE(listview->currentSection(), QString("0"));
+ QTRY_COMPARE(listview->currentSection(), QString("0"));
listview->setContentY(140);
- QCOMPARE(listview->currentSection(), QString("1"));
+ QTRY_COMPARE(listview->currentSection(), QString("1"));
listview->setContentY(20);
- QCOMPARE(listview->currentSection(), QString("0"));
+ QTRY_COMPARE(listview->currentSection(), QString("0"));
item = findItem<QDeclarativeItem>(viewport, "wrapper", 1);
- QVERIFY(item);
- QCOMPARE(item->height(), 20.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->height(), 20.0);
delete canvas;
}
@@ -990,45 +951,41 @@ void tst_QDeclarativeListView::currentIndex()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
-
- QTest::qWait(500);
+ QTRY_VERIFY(viewport != 0);
// current item should be third item
- QCOMPARE(listview->currentIndex(), 3);
- QCOMPARE(listview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 3));
- QCOMPARE(listview->highlightItem()->y(), listview->currentItem()->y());
+ QTRY_COMPARE(listview->currentIndex(), 3);
+ QTRY_COMPARE(listview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 3));
+ QTRY_COMPARE(listview->highlightItem()->y(), listview->currentItem()->y());
// no wrap
listview->setCurrentIndex(0);
- QCOMPARE(listview->currentIndex(), 0);
+ QTRY_COMPARE(listview->currentIndex(), 0);
listview->incrementCurrentIndex();
- QCOMPARE(listview->currentIndex(), 1);
+ QTRY_COMPARE(listview->currentIndex(), 1);
listview->decrementCurrentIndex();
- QCOMPARE(listview->currentIndex(), 0);
+ QTRY_COMPARE(listview->currentIndex(), 0);
listview->decrementCurrentIndex();
- QCOMPARE(listview->currentIndex(), 0);
+ QTRY_COMPARE(listview->currentIndex(), 0);
// with wrap
ctxt->setContextProperty("testWrap", QVariant(true));
- QVERIFY(listview->isWrapEnabled());
+ QTRY_VERIFY(listview->isWrapEnabled());
listview->decrementCurrentIndex();
- QCOMPARE(listview->currentIndex(), model.count()-1);
+ QTRY_COMPARE(listview->currentIndex(), model.count()-1);
- QTest::qWait(1000);
- QCOMPARE(listview->contentY(), 279.0);
+ QTRY_COMPARE(listview->contentY(), 279.0);
listview->incrementCurrentIndex();
- QCOMPARE(listview->currentIndex(), 0);
+ QTRY_COMPARE(listview->currentIndex(), 0);
- QTest::qWait(1000);
- QCOMPARE(listview->contentY(), 0.0);
+ QTRY_COMPARE(listview->contentY(), 0.0);
// Test keys
canvas->show();
@@ -1037,32 +994,30 @@ void tst_QDeclarativeListView::currentIndex()
// to be safe and avoid failing setFocus with window managers
qt_x11_wait_for_window_manager(canvas);
#endif
- QVERIFY(canvas->hasFocus());
- QVERIFY(canvas->scene()->hasFocus());
+ QTRY_VERIFY(canvas->hasFocus());
+ QTRY_VERIFY(canvas->scene()->hasFocus());
qApp->processEvents();
QTest::keyClick(canvas, Qt::Key_Down);
- QCOMPARE(listview->currentIndex(), 1);
+ QTRY_COMPARE(listview->currentIndex(), 1);
QTest::keyClick(canvas, Qt::Key_Up);
- QCOMPARE(listview->currentIndex(), 0);
+ QTRY_COMPARE(listview->currentIndex(), 0);
// turn off auto highlight
listview->setHighlightFollowsCurrentItem(false);
- QVERIFY(listview->highlightFollowsCurrentItem() == false);
+ QTRY_VERIFY(listview->highlightFollowsCurrentItem() == false);
- QTest::qWait(500);
- QVERIFY(listview->highlightItem());
+ QTRY_VERIFY(listview->highlightItem());
qreal hlPos = listview->highlightItem()->y();
listview->setCurrentIndex(4);
- QTest::qWait(500);
- QCOMPARE(listview->highlightItem()->y(), hlPos);
+ QTRY_COMPARE(listview->highlightItem()->y(), hlPos);
// insert item before currentIndex
listview->setCurrentIndex(28);
model.insertItem(0, "Foo", "1111");
- QCOMPARE(canvas->rootObject()->property("current").toInt(), 29);
+ QTRY_COMPARE(canvas->rootObject()->property("current").toInt(), 29);
delete canvas;
}
@@ -1075,35 +1030,34 @@ void tst_QDeclarativeListView::itemList()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "view");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
QDeclarativeVisualItemModel *model = canvas->rootObject()->findChild<QDeclarativeVisualItemModel*>("itemModel");
- QVERIFY(model != 0);
+ QTRY_VERIFY(model != 0);
- QVERIFY(model->count() == 3);
- QCOMPARE(listview->currentIndex(), 0);
+ QTRY_VERIFY(model->count() == 3);
+ QTRY_COMPARE(listview->currentIndex(), 0);
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "item1");
- QVERIFY(item);
- QCOMPARE(item->x(), 0.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->x(), 0.0);
QDeclarativeText *text = findItem<QDeclarativeText>(viewport, "text1");
- QVERIFY(text);
- QCOMPARE(text->text(), QLatin1String("index: 0"));
+ QTRY_VERIFY(text);
+ QTRY_COMPARE(text->text(), QLatin1String("index: 0"));
listview->setCurrentIndex(2);
- QTest::qWait(1000);
item = findItem<QDeclarativeItem>(viewport, "item3");
- QVERIFY(item);
- QCOMPARE(item->x(), 480.0);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->x(), 480.0);
text = findItem<QDeclarativeText>(viewport, "text3");
- QVERIFY(text);
- QCOMPARE(text->text(), QLatin1String("index: 2"));
+ QTRY_VERIFY(text);
+ QTRY_COMPARE(text->text(), QLatin1String("index: 2"));
delete canvas;
}
@@ -1126,35 +1080,35 @@ void tst_QDeclarativeListView::cacheBuffer()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
- QVERIFY(listview->delegate() != 0);
- QVERIFY(listview->model() != 0);
- QVERIFY(listview->highlight() != 0);
+ QTRY_VERIFY(viewport != 0);
+ QTRY_VERIFY(listview->delegate() != 0);
+ QTRY_VERIFY(listview->model() != 0);
+ QTRY_VERIFY(listview->highlight() != 0);
// Confirm items positioned correctly
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->y() == i*20);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->y() == i*20);
}
testObject->setCacheBuffer(400);
- QVERIFY(listview->cacheBuffer() == 400);
+ QTRY_VERIFY(listview->cacheBuffer() == 400);
int newItemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
- QVERIFY(newItemCount > itemCount);
+ QTRY_VERIFY(newItemCount > itemCount);
// Confirm items positioned correctly
for (int i = 0; i < model.count() && i < newItemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QVERIFY(item->y() == i*20);
+ QTRY_VERIFY(item);
+ QTRY_VERIFY(item->y() == i*20);
}
delete canvas;
@@ -1178,112 +1132,112 @@ void tst_QDeclarativeListView::positionViewAtIndex()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
// Confirm items positioned correctly
int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(), i*20.);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(), i*20.);
}
// Position on a currently visible item
listview->positionViewAtIndex(3, QDeclarativeListView::Beginning);
- QCOMPARE(listview->contentY(), 60.);
+ QTRY_COMPARE(listview->contentY(), 60.);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 3; i < model.count() && i < itemCount-3-1; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(), i*20.);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(), i*20.);
}
// Position on an item beyond the visible items
listview->positionViewAtIndex(22, QDeclarativeListView::Beginning);
- QCOMPARE(listview->contentY(), 440.);
+ QTRY_COMPARE(listview->contentY(), 440.);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 22; i < model.count() && i < itemCount-22-1; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(), i*20.);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(), i*20.);
}
// Position on an item that would leave empty space if positioned at the top
listview->positionViewAtIndex(28, QDeclarativeListView::Beginning);
- QCOMPARE(listview->contentY(), 480.);
+ QTRY_COMPARE(listview->contentY(), 480.);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 24; i < model.count() && i < itemCount-24-1; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(), i*20.);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(), i*20.);
}
// Position at the beginning again
listview->positionViewAtIndex(0, QDeclarativeListView::Beginning);
- QCOMPARE(listview->contentY(), 0.);
+ QTRY_COMPARE(listview->contentY(), 0.);
// Confirm items positioned correctly
itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount-1; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
- QVERIFY(item);
- QCOMPARE(item->y(), i*20.);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->y(), i*20.);
}
// Position at End
listview->positionViewAtIndex(20, QDeclarativeListView::End);
- QCOMPARE(listview->contentY(), 100.);
+ QTRY_COMPARE(listview->contentY(), 100.);
// Position in Center
listview->positionViewAtIndex(15, QDeclarativeListView::Center);
- QCOMPARE(listview->contentY(), 150.);
+ QTRY_COMPARE(listview->contentY(), 150.);
// Ensure at least partially visible
listview->positionViewAtIndex(15, QDeclarativeListView::Visible);
- QCOMPARE(listview->contentY(), 150.);
+ QTRY_COMPARE(listview->contentY(), 150.);
listview->setContentY(302);
listview->positionViewAtIndex(15, QDeclarativeListView::Visible);
- QCOMPARE(listview->contentY(), 302.);
+ QTRY_COMPARE(listview->contentY(), 302.);
listview->setContentY(320);
listview->positionViewAtIndex(15, QDeclarativeListView::Visible);
- QCOMPARE(listview->contentY(), 300.);
+ QTRY_COMPARE(listview->contentY(), 300.);
listview->setContentY(85);
listview->positionViewAtIndex(20, QDeclarativeListView::Visible);
- QCOMPARE(listview->contentY(), 85.);
+ QTRY_COMPARE(listview->contentY(), 85.);
listview->setContentY(75);
listview->positionViewAtIndex(20, QDeclarativeListView::Visible);
- QCOMPARE(listview->contentY(), 100.);
+ QTRY_COMPARE(listview->contentY(), 100.);
// Ensure completely visible
listview->setContentY(120);
listview->positionViewAtIndex(20, QDeclarativeListView::Contain);
- QCOMPARE(listview->contentY(), 120.);
+ QTRY_COMPARE(listview->contentY(), 120.);
listview->setContentY(302);
listview->positionViewAtIndex(15, QDeclarativeListView::Contain);
- QCOMPARE(listview->contentY(), 300.);
+ QTRY_COMPARE(listview->contentY(), 300.);
listview->setContentY(85);
listview->positionViewAtIndex(20, QDeclarativeListView::Contain);
- QCOMPARE(listview->contentY(), 100.);
+ QTRY_COMPARE(listview->contentY(), 100.);
delete canvas;
}
@@ -1303,40 +1257,40 @@ void tst_QDeclarativeListView::resetModel()
qApp->processEvents();
QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
- QVERIFY(listview != 0);
+ QTRY_VERIFY(listview != 0);
QDeclarativeItem *viewport = listview->viewport();
- QVERIFY(viewport != 0);
+ QTRY_VERIFY(viewport != 0);
- QCOMPARE(listview->count(), model.rowCount());
+ QTRY_COMPARE(listview->count(), model.rowCount());
for (int i = 0; i < model.rowCount(); ++i) {
QDeclarativeText *display = findItem<QDeclarativeText>(viewport, "displayText", i);
- QVERIFY(display != 0);
- QCOMPARE(display->text(), strings.at(i));
+ QTRY_VERIFY(display != 0);
+ QTRY_COMPARE(display->text(), strings.at(i));
}
strings.clear();
strings << "four" << "five" << "six" << "seven";
model.setStringList(strings);
- QCOMPARE(listview->count(), model.rowCount());
+ QTRY_COMPARE(listview->count(), model.rowCount());
for (int i = 0; i < model.rowCount(); ++i) {
QDeclarativeText *display = findItem<QDeclarativeText>(viewport, "displayText", i);
- QVERIFY(display != 0);
- QCOMPARE(display->text(), strings.at(i));
+ QTRY_VERIFY(display != 0);
+ QTRY_COMPARE(display->text(), strings.at(i));
}
}
void tst_QDeclarativeListView::propertyChanges()
{
QDeclarativeView *canvas = createView();
- QVERIFY(canvas);
+ QTRY_VERIFY(canvas);
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychangestest.qml"));
QDeclarativeListView *listView = canvas->rootObject()->findChild<QDeclarativeListView*>("listView");
- QVERIFY(listView);
+ QTRY_VERIFY(listView);
QSignalSpy highlightFollowsCurrentItemSpy(listView, SIGNAL(highlightFollowsCurrentItemChanged()));
QSignalSpy preferredHighlightBeginSpy(listView, SIGNAL(preferredHighlightBeginChanged()));
@@ -1346,13 +1300,13 @@ void tst_QDeclarativeListView::propertyChanges()
QSignalSpy cacheBufferSpy(listView, SIGNAL(cacheBufferChanged()));
QSignalSpy snapModeSpy(listView, SIGNAL(snapModeChanged()));
- QCOMPARE(listView->highlightFollowsCurrentItem(), true);
- QCOMPARE(listView->preferredHighlightBegin(), 0.0);
- QCOMPARE(listView->preferredHighlightEnd(), 0.0);
- QCOMPARE(listView->highlightRangeMode(), QDeclarativeListView::ApplyRange);
- QCOMPARE(listView->isWrapEnabled(), true);
- QCOMPARE(listView->cacheBuffer(), 10);
- QCOMPARE(listView->snapMode(), QDeclarativeListView::SnapToItem);
+ QTRY_COMPARE(listView->highlightFollowsCurrentItem(), true);
+ QTRY_COMPARE(listView->preferredHighlightBegin(), 0.0);
+ QTRY_COMPARE(listView->preferredHighlightEnd(), 0.0);
+ QTRY_COMPARE(listView->highlightRangeMode(), QDeclarativeListView::ApplyRange);
+ QTRY_COMPARE(listView->isWrapEnabled(), true);
+ QTRY_COMPARE(listView->cacheBuffer(), 10);
+ QTRY_COMPARE(listView->snapMode(), QDeclarativeListView::SnapToItem);
listView->setHighlightFollowsCurrentItem(false);
listView->setPreferredHighlightBegin(1.0);
@@ -1362,21 +1316,21 @@ void tst_QDeclarativeListView::propertyChanges()
listView->setCacheBuffer(3);
listView->setSnapMode(QDeclarativeListView::SnapOneItem);
- QCOMPARE(listView->highlightFollowsCurrentItem(), false);
- QCOMPARE(listView->preferredHighlightBegin(), 1.0);
- QCOMPARE(listView->preferredHighlightEnd(), 1.0);
- QCOMPARE(listView->highlightRangeMode(), QDeclarativeListView::StrictlyEnforceRange);
- QCOMPARE(listView->isWrapEnabled(), false);
- QCOMPARE(listView->cacheBuffer(), 3);
- QCOMPARE(listView->snapMode(), QDeclarativeListView::SnapOneItem);
-
- QCOMPARE(highlightFollowsCurrentItemSpy.count(),1);
- QCOMPARE(preferredHighlightBeginSpy.count(),1);
- QCOMPARE(preferredHighlightEndSpy.count(),1);
- QCOMPARE(highlightRangeModeSpy.count(),1);
- QCOMPARE(keyNavigationWrapsSpy.count(),1);
- QCOMPARE(cacheBufferSpy.count(),1);
- QCOMPARE(snapModeSpy.count(),1);
+ QTRY_COMPARE(listView->highlightFollowsCurrentItem(), false);
+ QTRY_COMPARE(listView->preferredHighlightBegin(), 1.0);
+ QTRY_COMPARE(listView->preferredHighlightEnd(), 1.0);
+ QTRY_COMPARE(listView->highlightRangeMode(), QDeclarativeListView::StrictlyEnforceRange);
+ QTRY_COMPARE(listView->isWrapEnabled(), false);
+ QTRY_COMPARE(listView->cacheBuffer(), 3);
+ QTRY_COMPARE(listView->snapMode(), QDeclarativeListView::SnapOneItem);
+
+ QTRY_COMPARE(highlightFollowsCurrentItemSpy.count(),1);
+ QTRY_COMPARE(preferredHighlightBeginSpy.count(),1);
+ QTRY_COMPARE(preferredHighlightEndSpy.count(),1);
+ QTRY_COMPARE(highlightRangeModeSpy.count(),1);
+ QTRY_COMPARE(keyNavigationWrapsSpy.count(),1);
+ QTRY_COMPARE(cacheBufferSpy.count(),1);
+ QTRY_COMPARE(snapModeSpy.count(),1);
listView->setHighlightFollowsCurrentItem(false);
listView->setPreferredHighlightBegin(1.0);
@@ -1386,13 +1340,13 @@ void tst_QDeclarativeListView::propertyChanges()
listView->setCacheBuffer(3);
listView->setSnapMode(QDeclarativeListView::SnapOneItem);
- QCOMPARE(highlightFollowsCurrentItemSpy.count(),1);
- QCOMPARE(preferredHighlightBeginSpy.count(),1);
- QCOMPARE(preferredHighlightEndSpy.count(),1);
- QCOMPARE(highlightRangeModeSpy.count(),1);
- QCOMPARE(keyNavigationWrapsSpy.count(),1);
- QCOMPARE(cacheBufferSpy.count(),1);
- QCOMPARE(snapModeSpy.count(),1);
+ QTRY_COMPARE(highlightFollowsCurrentItemSpy.count(),1);
+ QTRY_COMPARE(preferredHighlightBeginSpy.count(),1);
+ QTRY_COMPARE(preferredHighlightEndSpy.count(),1);
+ QTRY_COMPARE(highlightRangeModeSpy.count(),1);
+ QTRY_COMPARE(keyNavigationWrapsSpy.count(),1);
+ QTRY_COMPARE(cacheBufferSpy.count(),1);
+ QTRY_COMPARE(snapModeSpy.count(),1);
delete canvas;
}
@@ -1400,17 +1354,17 @@ void tst_QDeclarativeListView::propertyChanges()
void tst_QDeclarativeListView::componentChanges()
{
QDeclarativeView *canvas = createView();
- QVERIFY(canvas);
+ QTRY_VERIFY(canvas);
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychangestest.qml"));
QDeclarativeListView *listView = canvas->rootObject()->findChild<QDeclarativeListView*>("listView");
- QVERIFY(listView);
+ QTRY_VERIFY(listView);
QDeclarativeComponent component(canvas->engine());
- component.setData("import Qt 4.6; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile(""));
QDeclarativeComponent delegateComponent(canvas->engine());
- delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
+ delegateComponent.setData("import Qt 4.7; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
QSignalSpy highlightSpy(listView, SIGNAL(highlightChanged()));
QSignalSpy delegateSpy(listView, SIGNAL(delegateChanged()));
@@ -1422,25 +1376,25 @@ void tst_QDeclarativeListView::componentChanges()
listView->setFooter(&component);
listView->setDelegate(&delegateComponent);
- QCOMPARE(listView->highlight(), &component);
- QCOMPARE(listView->header(), &component);
- QCOMPARE(listView->footer(), &component);
- QCOMPARE(listView->delegate(), &delegateComponent);
+ QTRY_COMPARE(listView->highlight(), &component);
+ QTRY_COMPARE(listView->header(), &component);
+ QTRY_COMPARE(listView->footer(), &component);
+ QTRY_COMPARE(listView->delegate(), &delegateComponent);
- QCOMPARE(highlightSpy.count(),1);
- QCOMPARE(delegateSpy.count(),1);
- QCOMPARE(headerSpy.count(),1);
- QCOMPARE(footerSpy.count(),1);
+ QTRY_COMPARE(highlightSpy.count(),1);
+ QTRY_COMPARE(delegateSpy.count(),1);
+ QTRY_COMPARE(headerSpy.count(),1);
+ QTRY_COMPARE(footerSpy.count(),1);
listView->setHighlight(&component);
listView->setHeader(&component);
listView->setFooter(&component);
listView->setDelegate(&delegateComponent);
- QCOMPARE(highlightSpy.count(),1);
- QCOMPARE(delegateSpy.count(),1);
- QCOMPARE(headerSpy.count(),1);
- QCOMPARE(footerSpy.count(),1);
+ QTRY_COMPARE(highlightSpy.count(),1);
+ QTRY_COMPARE(delegateSpy.count(),1);
+ QTRY_COMPARE(headerSpy.count(),1);
+ QTRY_COMPARE(footerSpy.count(),1);
delete canvas;
}
@@ -1448,30 +1402,68 @@ void tst_QDeclarativeListView::componentChanges()
void tst_QDeclarativeListView::modelChanges()
{
QDeclarativeView *canvas = createView();
- QVERIFY(canvas);
+ QTRY_VERIFY(canvas);
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychangestest.qml"));
QDeclarativeListView *listView = canvas->rootObject()->findChild<QDeclarativeListView*>("listView");
- QVERIFY(listView);
+ QTRY_VERIFY(listView);
QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild<QDeclarativeListModel*>("alternateModel");
- QVERIFY(alternateModel);
+ QTRY_VERIFY(alternateModel);
QVariant modelVariant = QVariant::fromValue(alternateModel);
QSignalSpy modelSpy(listView, SIGNAL(modelChanged()));
listView->setModel(modelVariant);
- QCOMPARE(listView->model(), modelVariant);
- QCOMPARE(modelSpy.count(),1);
+ QTRY_COMPARE(listView->model(), modelVariant);
+ QTRY_COMPARE(modelSpy.count(),1);
listView->setModel(modelVariant);
- QCOMPARE(modelSpy.count(),1);
+ QTRY_COMPARE(modelSpy.count(),1);
listView->setModel(QVariant());
- QCOMPARE(modelSpy.count(),2);
+ QTRY_COMPARE(modelSpy.count(),2);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::QTBUG_9791()
+{
+ QDeclarativeView *canvas = createView();
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/strictlyenforcerange.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = qobject_cast<QDeclarativeListView*>(canvas->rootObject());
+ QTRY_VERIFY(listview != 0);
- delete canvas;
+ QDeclarativeItem *viewport = listview->viewport();
+ QTRY_VERIFY(viewport != 0);
+ QTRY_VERIFY(listview->delegate() != 0);
+ QTRY_VERIFY(listview->model() != 0);
+
+ QMetaObject::invokeMethod(listview, "fillModel");
+ qApp->processEvents();
+
+ // Confirm items positioned correctly
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ QVERIFY(itemCount == 3);
+
+ for (int i = 0; i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->x(), i*300.0);
+ }
+
+ // check that view is positioned correctly
+ QTRY_COMPARE(listview->contentX(), 590.0);
+
+ delete canvas;
}
+
void tst_QDeclarativeListView::qListModelInterface_items()
{
items<TestModel>();
diff --git a/tests/auto/declarative/qdeclarativeloader/data/qmldir b/tests/auto/declarative/qdeclarativeloader/data/qmldir
new file mode 100644
index 0000000..bf42b50
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/qmldir
@@ -0,0 +1 @@
+# For tst_QDeclarativeLoader::networkRequestUrl; no types needed though.
diff --git a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
index 8ff2be4..96fea5b 100644
--- a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
+++ b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
@@ -9,3 +9,5 @@ SOURCES += tst_qdeclarativeloader.cpp \
DEFINES += SRCDIR=\\\"$$PWD\\\"
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
index 05d968c..4a82b50 100644
--- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -48,7 +48,7 @@
#include <private/qdeclarativeloader_p.h>
#include "testhttpserver.h"
-#define SERVER_PORT 14445
+#define SERVER_PORT 14450
inline QUrl TEST_FILE(const QString &filename)
{
@@ -104,7 +104,7 @@ tst_QDeclarativeLoader::tst_QDeclarativeLoader()
void tst_QDeclarativeLoader::url()
{
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nLoader { source: \"Rect120x60.qml\" }"), TEST_FILE(""));
+ component.setData(QByteArray("import Qt 4.7\nLoader { source: \"Rect120x60.qml\" }"), TEST_FILE(""));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
QVERIFY(loader->item());
@@ -133,7 +133,7 @@ void tst_QDeclarativeLoader::component()
QVERIFY(c);
QCOMPARE(loader->sourceComponent(), c);
- delete loader;
+ delete item;
}
void tst_QDeclarativeLoader::invalidUrl()
@@ -141,7 +141,7 @@ void tst_QDeclarativeLoader::invalidUrl()
QTest::ignoreMessage(QtWarningMsg, QString("(:-1: File error for URL " + QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ") ").toUtf8().constData());
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE(""));
+ component.setData(QByteArray("import Qt 4.7\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE(""));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
QVERIFY(loader->item() == 0);
@@ -157,7 +157,7 @@ void tst_QDeclarativeLoader::clear()
{
QDeclarativeComponent component(&engine);
component.setData(QByteArray(
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
" Loader { id: loader\n"
" source: 'Rect120x60.qml'\n"
" Timer { interval: 200; running: true; onTriggered: loader.source = '' }\n"
@@ -196,14 +196,14 @@ void tst_QDeclarativeLoader::clear()
QCOMPARE(loader->status(), QDeclarativeLoader::Null);
QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 0);
- delete loader;
+ delete item;
}
}
void tst_QDeclarativeLoader::urlToComponent()
{
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\n"
+ component.setData(QByteArray("import Qt 4.7\n"
"Loader {\n"
" id: loader\n"
" Component { id: myComp; Rectangle { width: 10; height: 10 } }\n"
@@ -242,7 +242,7 @@ void tst_QDeclarativeLoader::componentToUrl()
QCOMPARE(loader->width(), 120.0);
QCOMPARE(loader->height(), 60.0);
- delete loader;
+ delete item;
}
void tst_QDeclarativeLoader::sizeLoaderToItem()
@@ -275,6 +275,8 @@ void tst_QDeclarativeLoader::sizeLoaderToItem()
QCOMPARE(spy.count(),1);
loader->setResizeMode(QDeclarativeLoader::NoResize);
QCOMPARE(spy.count(),1);
+
+ delete loader;
}
void tst_QDeclarativeLoader::sizeItemToLoader()
@@ -303,6 +305,8 @@ void tst_QDeclarativeLoader::sizeItemToLoader()
rect->setHeight(45);
QCOMPARE(loader->width(), 160.0);
QCOMPARE(loader->height(), 45.0);
+
+ delete loader;
}
void tst_QDeclarativeLoader::noResize()
@@ -317,6 +321,8 @@ void tst_QDeclarativeLoader::noResize()
QVERIFY(rect);
QCOMPARE(rect->width(), 120.0);
QCOMPARE(rect->height(), 60.0);
+
+ delete loader;
}
void tst_QDeclarativeLoader::sizeLoaderToGraphicsWidget()
@@ -344,6 +350,8 @@ void tst_QDeclarativeLoader::sizeLoaderToGraphicsWidget()
loader->setHeight(30);
QCOMPARE(widget->size().width(), 180.0);
QCOMPARE(widget->size().height(), 30.0);
+
+ delete loader;
}
void tst_QDeclarativeLoader::sizeGraphicsWidgetToLoader()
@@ -374,6 +382,8 @@ void tst_QDeclarativeLoader::sizeGraphicsWidgetToLoader()
widget->resize(QSizeF(160,45));
QCOMPARE(loader->width(), 160.0);
QCOMPARE(loader->height(), 45.0);
+
+ delete loader;
}
void tst_QDeclarativeLoader::noResizeGraphicsWidget()
@@ -391,6 +401,8 @@ void tst_QDeclarativeLoader::noResizeGraphicsWidget()
QVERIFY(widget);
QCOMPARE(widget->size().width(), 250.0);
QCOMPARE(widget->size().height(), 250.0);
+
+ delete loader;
}
void tst_QDeclarativeLoader::networkRequestUrl()
@@ -400,7 +412,9 @@ void tst_QDeclarativeLoader::networkRequestUrl()
server.serveDirectory(SRCDIR "/data");
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nLoader { source: \"http://127.0.0.1:14445/Rect120x60.qml\" }"), QUrl("http://127.0.0.1:14445/dummy.qml"));
+ component.setData(QByteArray("import Qt 4.7\nLoader { source: \"http://127.0.0.1:14450/Rect120x60.qml\" }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml"));
+ if (component.isError())
+ qDebug() << component.errors();
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
@@ -422,8 +436,8 @@ void tst_QDeclarativeLoader::networkComponent()
QDeclarativeComponent component(&engine);
component.setData(QByteArray(
- "import Qt 4.6\n"
- "import \"http://127.0.0.1:14445/\" as NW\n"
+ "import Qt 4.7\n"
+ "import \"http://127.0.0.1:14450/\" as NW\n"
"Item {\n"
" Component { id: comp; NW.SlowRect {} }\n"
" Loader { sourceComponent: comp } }")
@@ -451,10 +465,10 @@ void tst_QDeclarativeLoader::failNetworkRequest()
QVERIFY(server.isValid());
server.serveDirectory(SRCDIR "/data");
- QTest::ignoreMessage(QtWarningMsg, "(:-1: Network error for URL http://127.0.0.1:14445/IDontExist.qml) ");
+ QTest::ignoreMessage(QtWarningMsg, "(:-1: Network error for URL http://127.0.0.1:14450/IDontExist.qml) ");
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nLoader { source: \"http://127.0.0.1:14445/IDontExist.qml\" }"), QUrl("http://127.0.0.1:14445/dummy.qml"));
+ component.setData(QByteArray("import Qt 4.7\nLoader { source: \"http://127.0.0.1:14450/IDontExist.qml\" }"), QUrl::fromLocalFile("http://127.0.0.1:14450/dummy.qml"));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
@@ -504,8 +518,9 @@ void tst_QDeclarativeLoader::nonItem()
void tst_QDeclarativeLoader::vmeErrors()
{
QDeclarativeComponent component(&engine, TEST_FILE("vmeErrors.qml"));
- QString err = QString("(") + QUrl::fromLocalFile(SRCDIR).toString() + QString("/data/VmeError.qml:6: Cannot assign object type QObject with no default method\n onSomethingHappened: QtObject {}) ");
- QTest::ignoreMessage(QtWarningMsg, err.toLatin1().constData());
+ //ignore message for now
+ //QString err = QUrl::fromLocalFile(SRCDIR "/data/VmeError.qml:6: Cannot assign object type QObject with no default method\n onSomethingHappened: QtObject {}) ");
+ //QTest::ignoreMessage(QtWarningMsg, err.toLatin1().constData());
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader);
QVERIFY(loader->item() == 0);
diff --git a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
index 2f7ff82..cf3fa65 100644
--- a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
+++ b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
@@ -4,3 +4,6 @@ SOURCES += tst_qdeclarativemetatype.cpp
macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro
index 96f4454..824b402 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro
@@ -4,4 +4,5 @@ SUBDIRS = plugin
tst_qdeclarativemoduleplugin_pro.depends += plugin
SUBDIRS += tst_qdeclarativemoduleplugin.pro
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
index 26199d3..6d17acc 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
@@ -101,7 +101,6 @@ inline QUrl TEST_FILE(const QString &filename)
void tst_qdeclarativemoduleplugin::importsPlugin()
{
-QSKIP("Fix me", SkipAll);
QDeclarativeEngine engine;
engine.addImportPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("imports"));
QTest::ignoreMessage(QtWarningMsg, "plugin created");
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml b/tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml
new file mode 100644
index 0000000..e800f98
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+Item {
+ id: root
+ property bool clicked: false
+ property bool held: false
+
+ MouseArea {
+ width: 200; height: 200
+ onClicked: { root.clicked = true }
+ onPressAndHold: { root.held = true }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml b/tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml
new file mode 100644
index 0000000..4bfb9c3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml
@@ -0,0 +1,28 @@
+import Qt 4.6
+Rectangle {
+ id: whiteRect
+ width: 200
+ height: 200
+ color: "white"
+ Rectangle {
+ id: blackRect
+ objectName: "blackrect"
+ color: "black"
+ y: 50
+ x: 50
+ width: 100
+ height: 100
+ opacity: (whiteRect.width-blackRect.x+whiteRect.height-blackRect.y-199)/200
+ Text { text: blackRect.opacity}
+ MouseArea {
+ objectName: "mouseregion"
+ anchors.fill: parent
+ drag.target: haveTarget ? blackRect : undefined
+ drag.axis: Drag.XandYAxis
+ drag.minimumX: 0
+ drag.maximumX: whiteRect.width-blackRect.width
+ drag.minimumY: 0
+ drag.maximumY: whiteRect.height-blackRect.height
+ }
+ }
+ }
diff --git a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
index d01955b..48fe025 100644
--- a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
+++ b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
@@ -7,3 +7,6 @@ SOURCES += tst_qdeclarativemousearea.cpp ../shared/testhttpserver.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
index 9b664e5..bdb8eca 100644
--- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
+++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
@@ -44,20 +44,24 @@
#include <private/qdeclarativemousearea_p.h>
#include <private/qdeclarativerectangle_p.h>
#include <QtDeclarative/qdeclarativeview.h>
+#include <QtDeclarative/qdeclarativecontext.h>
class tst_QDeclarativeMouseArea: public QObject
{
Q_OBJECT
private slots:
void dragProperties();
+ void resetDrag();
void updateMouseAreaPosOnClick();
+ void noOnClickedWithPressAndHold();
private:
- QDeclarativeView *createView(const QString &filename);
+ QDeclarativeView *createView();
};
void tst_QDeclarativeMouseArea::dragProperties()
{
- QDeclarativeView *canvas = createView(SRCDIR "/data/dragproperties.qml");
+ QDeclarativeView *canvas = createView();
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/dragproperties.qml"));
canvas->show();
canvas->setFocus();
QVERIFY(canvas->rootObject() != 0);
@@ -127,19 +131,49 @@ void tst_QDeclarativeMouseArea::dragProperties()
delete canvas;
}
-QDeclarativeView *tst_QDeclarativeMouseArea::createView(const QString &filename)
+void tst_QDeclarativeMouseArea::resetDrag()
+{
+ QDeclarativeView *canvas = createView();
+
+ canvas->rootContext()->setContextProperty("haveTarget", QVariant(true));
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/dragreset.qml"));
+ canvas->show();
+ canvas->setFocus();
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeMouseArea *mouseRegion = canvas->rootObject()->findChild<QDeclarativeMouseArea*>("mouseregion");
+ QDeclarativeDrag *drag = mouseRegion->drag();
+ QVERIFY(mouseRegion != 0);
+ QVERIFY(drag != 0);
+
+ // target
+ QDeclarativeItem *blackRect = canvas->rootObject()->findChild<QDeclarativeItem*>("blackrect");
+ QVERIFY(blackRect != 0);
+ QVERIFY(blackRect == drag->target());
+ QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(canvas->rootObject());
+ QVERIFY(rootItem != 0);
+ QSignalSpy targetSpy(drag, SIGNAL(targetChanged()));
+ QVERIFY(drag->target() != 0);
+ canvas->rootContext()->setContextProperty("haveTarget", QVariant(false));
+ QCOMPARE(targetSpy.count(),1);
+ QVERIFY(drag->target() == 0);
+
+ delete canvas;
+}
+
+
+QDeclarativeView *tst_QDeclarativeMouseArea::createView()
{
QDeclarativeView *canvas = new QDeclarativeView(0);
canvas->setFixedSize(240,320);
- canvas->setSource(QUrl::fromLocalFile(filename));
-
return canvas;
}
void tst_QDeclarativeMouseArea::updateMouseAreaPosOnClick()
{
- QDeclarativeView *canvas = createView(SRCDIR "/data/updateMousePosOnClick.qml");
+ QDeclarativeView *canvas = createView();
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/updateMousePosOnClick.qml"));
canvas->show();
canvas->setFocus();
QVERIFY(canvas->rootObject() != 0);
@@ -169,6 +203,36 @@ void tst_QDeclarativeMouseArea::updateMouseAreaPosOnClick()
delete canvas;
}
+void tst_QDeclarativeMouseArea::noOnClickedWithPressAndHold()
+{
+ QDeclarativeView *canvas = createView();
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/clickandhold.qml"));
+ canvas->show();
+ canvas->setFocus();
+ QVERIFY(canvas->rootObject() != 0);
+
+ QGraphicsScene *scene = canvas->scene();
+ QGraphicsSceneMouseEvent pressEvent(QEvent::GraphicsSceneMousePress);
+ pressEvent.setScenePos(QPointF(100, 100));
+ pressEvent.setButton(Qt::LeftButton);
+ pressEvent.setButtons(Qt::LeftButton);
+ QApplication::sendEvent(scene, &pressEvent);
+
+ QVERIFY(!canvas->rootObject()->property("clicked").toBool());
+ QVERIFY(!canvas->rootObject()->property("held").toBool());
+
+ QTest::qWait(1000);
+
+ QGraphicsSceneMouseEvent releaseEvent(QEvent::GraphicsSceneMousePress);
+ releaseEvent.setScenePos(QPointF(100, 100));
+ releaseEvent.setButton(Qt::LeftButton);
+ releaseEvent.setButtons(Qt::LeftButton);
+ QApplication::sendEvent(scene, &releaseEvent);
+
+ QVERIFY(!canvas->rootObject()->property("clicked").toBool());
+ QVERIFY(canvas->rootObject()->property("held").toBool());
+}
+
QTEST_MAIN(tst_QDeclarativeMouseArea)
#include "tst_qdeclarativemousearea.moc"
diff --git a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
index 043bb85..8a061c3 100644
--- a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
+++ b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
@@ -6,3 +6,6 @@ SOURCES += tst_qdeclarativeparticles.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
index 2f6ae32..3c327d5 100644
--- a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
+++ b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
@@ -6,3 +6,6 @@ SOURCES += tst_qdeclarativepathview.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
index 4d43c68..df7c511 100644
--- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
+++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
@@ -632,7 +632,7 @@ void tst_QDeclarativePathView::componentChanges()
QVERIFY(pathView);
QDeclarativeComponent delegateComponent(canvas->engine());
- delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
+ delegateComponent.setData("import Qt 4.7; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
QSignalSpy delegateSpy(pathView, SIGNAL(delegateChanged()));
diff --git a/tests/auto/declarative/qmlvisual/animation/easing/pics/qtlogo.png b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists.png
index 399bd0b..399bd0b 100644
--- a/tests/auto/declarative/qmlvisual/animation/easing/pics/qtlogo.png
+++ b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists1.png b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists1.png
new file mode 100644
index 0000000..399bd0b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists1.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists2.png b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists2.png
new file mode 100644
index 0000000..399bd0b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists2.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists3.png b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists3.png
new file mode 100644
index 0000000..399bd0b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists3.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists4.png b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists4.png
new file mode 100644
index 0000000..399bd0b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists4.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists5.png b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists5.png
new file mode 100644
index 0000000..399bd0b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists5.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
index 899c43f..4b247fc 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
+++ b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
@@ -5,5 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativepixmapcache.cpp
+INCLUDEPATH += ../shared/
+HEADERS += ../shared/testhttpserver.h
+SOURCES += ../shared/testhttpserver.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
+
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
index 223f54f..0cc13ad 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
+++ b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
@@ -43,6 +43,8 @@
#include <private/qdeclarativepixmapcache_p.h>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QNetworkReply>
+#include "testhttpserver.h"
+#include "../../../shared/util.h"
// These don't let normal people run tests!
//#include "../network-settings.h"
@@ -52,8 +54,10 @@ class tst_qdeclarativepixmapcache : public QObject
Q_OBJECT
public:
tst_qdeclarativepixmapcache() :
- thisfile(QUrl::fromLocalFile(__FILE__))
+ thisfile(QUrl::fromLocalFile(__FILE__)),
+ server(14452)
{
+ server.serveDirectory(SRCDIR "/data/http");
}
private slots:
@@ -65,6 +69,7 @@ private slots:
private:
QDeclarativeEngine engine;
QUrl thisfile;
+ TestHTTPServer server;
};
@@ -110,8 +115,8 @@ void tst_qdeclarativepixmapcache::single_data()
// File URLs are optimized
QTest::newRow("local") << thisfile.resolved(QUrl("data/exists.png")) << localfile_optimized << true << false;
QTest::newRow("local") << thisfile.resolved(QUrl("data/notexists.png")) << localfile_optimized << false << false;
- QTest::newRow("remote") << QUrl("http://qt.nokia.com/logo.png") << false << true << false;
- QTest::newRow("remote") << QUrl("http://qt.nokia.com/thereisnologo.png") << false << false << true;
+ QTest::newRow("remote") << QUrl("http://127.0.0.1:14452/exists.png") << false << true << false;
+ QTest::newRow("remote") << QUrl("http://127.0.0.1:14452/notexists.png") << false << false << true;
}
void tst_qdeclarativepixmapcache::single()
@@ -121,19 +126,20 @@ void tst_qdeclarativepixmapcache::single()
QFETCH(bool, exists);
QFETCH(bool, neterror);
+ QString expectedError;
if (neterror) {
- QString expected = "\"Error downloading " + target.toString() + " - server replied: Not Found\" ";
- QTest::ignoreMessage(QtWarningMsg, expected.toLatin1());
+ expectedError = "Error downloading " + target.toString() + " - server replied: Not found";
} else if (!exists) {
- QString expected = "Cannot open QUrl( \"" + target.toString() + "\" ) ";
- QTest::ignoreMessage(QtWarningMsg, expected.toLatin1());
+ expectedError = "Cannot open: " + target.toString();
}
QPixmap pixmap;
QVERIFY(pixmap.width() <= 0); // Check Qt assumption
- QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(target, &pixmap);
+ QString errorString;
+ QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(target, &pixmap, &errorString);
if (incache) {
+ QCOMPARE(errorString, expectedError);
if (exists) {
QVERIFY(status == QDeclarativePixmapReply::Ready);
QVERIFY(pixmap.width() > 0);
@@ -151,13 +157,15 @@ void tst_qdeclarativepixmapcache::single()
QTestEventLoop::instance().enterLoop(10);
QVERIFY(!QTestEventLoop::instance().timeout());
QVERIFY(getter.gotslot);
+ QString errorString;
if (exists) {
- QVERIFY(QDeclarativePixmapCache::get(target, &pixmap) == QDeclarativePixmapReply::Ready);
+ QVERIFY(QDeclarativePixmapCache::get(target, &pixmap, &errorString) == QDeclarativePixmapReply::Ready);
QVERIFY(pixmap.width() > 0);
} else {
- QVERIFY(QDeclarativePixmapCache::get(target, &pixmap) == QDeclarativePixmapReply::Error);
+ QVERIFY(QDeclarativePixmapCache::get(target, &pixmap, &errorString) == QDeclarativePixmapReply::Error);
QVERIFY(pixmap.width() <= 0);
}
+ QCOMPARE(errorString, expectedError);
}
QCOMPARE(QDeclarativePixmapCache::pendingRequests(), 0);
@@ -183,32 +191,32 @@ void tst_qdeclarativepixmapcache::parallel_data()
;
QTest::newRow("remote")
- << QUrl("http://qt.nokia.com/images/template/checkbox-on.png")
- << QUrl("http://qt.nokia.com/images/products/qt-logo/image_tile")
+ << QUrl("http://127.0.0.1:14452/exists2.png")
+ << QUrl("http://127.0.0.1:14452/exists3.png")
<< 0
<< -1
<< 2
;
QTest::newRow("remoteagain")
- << QUrl("http://qt.nokia.com/images/template/checkbox-on.png")
- << QUrl("http://qt.nokia.com/images/products/qt-logo/image_tile")
+ << QUrl("http://127.0.0.1:14452/exists2.png")
+ << QUrl("http://127.0.0.1:14452/exists3.png")
<< 2
<< -1
<< 0
;
QTest::newRow("remotecopy")
- << QUrl("http://qt.nokia.com/images/template/checkbox-off.png")
- << QUrl("http://qt.nokia.com/images/template/checkbox-off.png")
+ << QUrl("http://127.0.0.1:14452/exists4.png")
+ << QUrl("http://127.0.0.1:14452/exists4.png")
<< 0
<< -1
<< 1
;
QTest::newRow("remotecopycancel")
- << QUrl("http://qt.nokia.com/rounded_block_bg.png")
- << QUrl("http://qt.nokia.com/rounded_block_bg.png")
+ << QUrl("http://127.0.0.1:14452/exists5.png")
+ << QUrl("http://127.0.0.1:14452/exists5.png")
<< 0
<< 0
<< 1
@@ -231,8 +239,10 @@ void tst_qdeclarativepixmapcache::parallel()
for (int i=0; i<targets.count(); ++i) {
QUrl target = targets.at(i);
QPixmap pixmap;
- QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(target, &pixmap);
+ QString errorString;
+ QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(target, &pixmap, &errorString);
QDeclarativePixmapReply *reply = 0;
+ QVERIFY(status != QDeclarativePixmapReply::Error);
if (status != QDeclarativePixmapReply::Error && status != QDeclarativePixmapReply::Ready)
reply = QDeclarativePixmapCache::request(&engine, target);
replies.append(reply);
@@ -267,7 +277,8 @@ void tst_qdeclarativepixmapcache::parallel()
} else {
QVERIFY(getters[i]->gotslot);
QPixmap pixmap;
- QVERIFY(QDeclarativePixmapCache::get(targets[i], &pixmap) == QDeclarativePixmapReply::Ready);
+ QString errorString;
+ QVERIFY(QDeclarativePixmapCache::get(targets[i], &pixmap, &errorString) == QDeclarativePixmapReply::Ready);
QVERIFY(pixmap.width() > 0);
}
delete getters[i];
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml
new file mode 100644
index 0000000..34a84bf
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml
@@ -0,0 +1,41 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Grid {
+ objectName: "grid"
+ rows: 3
+ flow: Grid.TopToBottom
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "green"
+ width: 20
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ color: "blue"
+ width: 50
+ height: 20
+ }
+ Rectangle {
+ objectName: "four"
+ color: "cyan"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "five"
+ color: "magenta"
+ width: 10
+ height: 10
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml b/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml
new file mode 100644
index 0000000..052d96b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Grid {
+ objectName: "grid"
+ columns: 0
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "green"
+ width: 20
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ color: "blue"
+ width: 50
+ height: 20
+ }
+ Rectangle {
+ objectName: "four"
+ color: "cyan"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "five"
+ color: "magenta"
+ width: 10
+ height: 10
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
index 5edfa55..dbe2cbee 100644
--- a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
+++ b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
@@ -5,3 +5,6 @@ macx:CONFIG -= app_bundle
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
index 08eac0a..b4ac0e1 100644
--- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
+++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
@@ -61,8 +61,10 @@ private slots:
void test_vertical_spacing();
void test_vertical_animated();
void test_grid();
+ void test_grid_topToBottom();
void test_grid_spacing();
void test_grid_animated();
+ void test_grid_zero_columns();
void test_propertychanges();
void test_repeater();
void test_flow();
@@ -304,6 +306,37 @@ void tst_QDeclarativePositioners::test_grid()
QCOMPARE(grid->height(), 100.0);
}
+void tst_QDeclarativePositioners::test_grid_topToBottom()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/grid-toptobottom.qml");
+
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+ QDeclarativeRectangle *four = canvas->rootObject()->findChild<QDeclarativeRectangle*>("four");
+ QVERIFY(four != 0);
+ QDeclarativeRectangle *five = canvas->rootObject()->findChild<QDeclarativeRectangle*>("five");
+ QVERIFY(five != 0);
+
+ QCOMPARE(one->x(), 0.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 0.0);
+ QCOMPARE(two->y(), 50.0);
+ QCOMPARE(three->x(), 0.0);
+ QCOMPARE(three->y(), 100.0);
+ QCOMPARE(four->x(), 50.0);
+ QCOMPARE(four->y(), 0.0);
+ QCOMPARE(five->x(), 50.0);
+ QCOMPARE(five->y(), 50.0);
+
+ QDeclarativeItem *grid = canvas->rootObject()->findChild<QDeclarativeItem*>("grid");
+ QCOMPARE(grid->width(), 100.0);
+ QCOMPARE(grid->height(), 120.0);
+}
+
void tst_QDeclarativePositioners::test_grid_spacing()
{
QDeclarativeView *canvas = createView(SRCDIR "/data/grid-spacing.qml");
@@ -414,6 +447,38 @@ void tst_QDeclarativePositioners::test_grid_animated()
QTRY_COMPARE(five->y(), 50.0);
}
+
+void tst_QDeclarativePositioners::test_grid_zero_columns()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/gridzerocolumns.qml");
+
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+ QDeclarativeRectangle *four = canvas->rootObject()->findChild<QDeclarativeRectangle*>("four");
+ QVERIFY(four != 0);
+ QDeclarativeRectangle *five = canvas->rootObject()->findChild<QDeclarativeRectangle*>("five");
+ QVERIFY(five != 0);
+
+ QCOMPARE(one->x(), 0.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 50.0);
+ QCOMPARE(two->y(), 0.0);
+ QCOMPARE(three->x(), 70.0);
+ QCOMPARE(three->y(), 0.0);
+ QCOMPARE(four->x(), 120.0);
+ QCOMPARE(four->y(), 0.0);
+ QCOMPARE(five->x(), 0.0);
+ QCOMPARE(five->y(), 50.0);
+
+ QDeclarativeItem *grid = canvas->rootObject()->findChild<QDeclarativeItem*>("grid");
+ QCOMPARE(grid->width(), 170.0);
+ QCOMPARE(grid->height(), 60.0);
+}
+
void tst_QDeclarativePositioners::test_propertychanges()
{
QDeclarativeView *canvas = createView(SRCDIR "/data/propertychangestest.qml");
diff --git a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
index af1e1b6..6910ccc 100644
--- a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
+++ b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
@@ -5,3 +5,6 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeproperty.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro b/tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro
index aeccf9b..3c0f7b3 100644
--- a/tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro
+++ b/tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro
@@ -3,3 +3,6 @@ contains(QT_CONFIG,declarative): QT += declarative
macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativepropertymap.cpp
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
index c996a14..f1d3bf0 100644
--- a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
+++ b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
@@ -138,7 +138,7 @@ void tst_QDeclarativePropertyMap::changed()
QDeclarativeContext *ctxt = engine.rootContext();
ctxt->setContextProperty(QLatin1String("testdata"), &map);
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6\nText { text: { testdata.key1 = 'Hello World'; 'X' } }",
+ component.setData("import Qt 4.7\nText { text: { testdata.key1 = 'Hello World'; 'X' } }",
QUrl::fromLocalFile(""));
QVERIFY(component.isReady());
QDeclarativeText *txt = qobject_cast<QDeclarativeText*>(component.create());
@@ -179,7 +179,7 @@ void tst_QDeclarativePropertyMap::crashBug()
context.setContextProperty("map", &map);
QDeclarativeComponent c(&engine);
- c.setData("import Qt 4.6\nBinding { target: map; property: \"myProp\"; value: 10 + 23 }",QUrl());
+ c.setData("import Qt 4.7\nBinding { target: map; property: \"myProp\"; value: 10 + 23 }",QUrl());
QObject *obj = c.create(&context);
delete obj;
}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/darker.qml b/tests/auto/declarative/qdeclarativeqt/data/darker.qml
index 2df067e..b265a0e 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/darker.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/darker.qml
@@ -1,11 +1,11 @@
import Qt 4.6
QtObject {
- property var test1: Qt.darker(Qt.rgba(1, 0.8, 0.3))
- property var test2: Qt.darker()
- property var test3: Qt.darker(Qt.rgba(1, 0.8, 0.3), 10)
- property var test4: Qt.darker("red");
- property var test5: Qt.darker("perfectred"); // Non-existant color
- property var test6: Qt.darker(10);
+ property variant test1: Qt.darker(Qt.rgba(1, 0.8, 0.3))
+ property variant test2: Qt.darker()
+ property variant test3: Qt.darker(Qt.rgba(1, 0.8, 0.3), 10)
+ property variant test4: Qt.darker("red");
+ property variant test5: Qt.darker("perfectred"); // Non-existant color
+ property variant test6: Qt.darker(10);
}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/formatting.qml b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml
index e62749a..4cf0602 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/formatting.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml
@@ -6,13 +6,13 @@ QtObject {
property string test2: Qt.formatDate(date1, Qt.DefaultLocaleLongDate)
property string test3: Qt.formatDate(date1, "ddd MMMM d yy")
- property var time1: new Date(0,0,0,14,15,38,200)
+ property variant time1: new Date(0,0,0,14,15,38,200)
property string test4: Qt.formatTime(time1)
property string test5: Qt.formatTime(time1, Qt.DefaultLocaleLongDate)
property string test6: Qt.formatTime(time1, "H:m:s a")
property string test7: Qt.formatTime(time1, "hh:mm:ss.zzz")
- property var dateTime1: new Date(1978,2,4,9,13,54)
+ property variant dateTime1: new Date(1978,2,4,9,13,54)
property string test8: Qt.formatDateTime(dateTime1)
property string test9: Qt.formatDateTime(dateTime1, Qt.DefaultLocaleLongDate)
property string test10: Qt.formatDateTime(dateTime1, "M/d/yy H:m:s a")
diff --git a/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml b/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml
new file mode 100644
index 0000000..d986492
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+QtObject {
+ id: root
+
+ property QtObject nullObject
+
+ property bool test1: Qt.isQtObject(root)
+ property bool test2: Qt.isQtObject(nullObject)
+ property bool test3: Qt.isQtObject(10)
+ property bool test4: Qt.isQtObject(null)
+ property bool test5: Qt.isQtObject({ a: 10, b: 11 })
+}
+
diff --git a/tests/auto/declarative/qdeclarativeqt/data/lighter.qml b/tests/auto/declarative/qdeclarativeqt/data/lighter.qml
index 4e0c431..2d2b835 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/lighter.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/lighter.qml
@@ -1,10 +1,10 @@
import Qt 4.6
QtObject {
- property var test1: Qt.lighter(Qt.rgba(1, 0.8, 0.3))
- property var test2: Qt.lighter()
- property var test3: Qt.lighter(Qt.rgba(1, 0.8, 0.3), 10)
- property var test4: Qt.lighter("red");
- property var test5: Qt.lighter("perfectred"); // Non-existant color
- property var test6: Qt.lighter(10);
+ property variant test1: Qt.lighter(Qt.rgba(1, 0.8, 0.3))
+ property variant test2: Qt.lighter()
+ property variant test3: Qt.lighter(Qt.rgba(1, 0.8, 0.3), 10)
+ property variant test4: Qt.lighter("red");
+ property variant test5: Qt.lighter("perfectred"); // Non-existant color
+ property variant test6: Qt.lighter(10);
}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/point.qml b/tests/auto/declarative/qdeclarativeqt/data/point.qml
index c383beb..1054ac9 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/point.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/point.qml
@@ -1,9 +1,9 @@
import Qt 4.6
QtObject {
- property var test1: Qt.point(19, 34);
- property var test2: Qt.point(-3, 109.2);
- property var test3: Qt.point(-3);
- property var test4: Qt.point(-3, 109.2, 1);
+ property variant test1: Qt.point(19, 34);
+ property variant test2: Qt.point(-3, 109.2);
+ property variant test3: Qt.point(-3);
+ property variant test4: Qt.point(-3, 109.2, 1);
}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/rect.qml b/tests/auto/declarative/qdeclarativeqt/data/rect.qml
index 82b6428..e008656 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/rect.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/rect.qml
@@ -1,9 +1,9 @@
import Qt 4.6
QtObject {
- property var test1: Qt.rect(10, 13, 100, 109)
- property var test2: Qt.rect(-10, 13, 100, 109.6)
- property var test3: Qt.rect(10, 13);
- property var test4: Qt.rect(10, 13, 100, 109, 10)
- property var test5: Qt.rect(10, 13, 100, -109)
+ property variant test1: Qt.rect(10, 13, 100, 109)
+ property variant test2: Qt.rect(-10, 13, 100, 109.6)
+ property variant test3: Qt.rect(10, 13);
+ property variant test4: Qt.rect(10, 13, 100, 109, 10)
+ property variant test5: Qt.rect(10, 13, 100, -109)
}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/size.qml b/tests/auto/declarative/qdeclarativeqt/data/size.qml
index 05b0317..93577f2 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/size.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/size.qml
@@ -1,11 +1,11 @@
import Qt 4.6
QtObject {
- property var test1: Qt.size(19, 34);
- property var test2: Qt.size(3, 109.2);
- property var test3: Qt.size(-3, 10);
- property var test4: Qt.size(3);
- property var test5: Qt.size(3, 109.2, 1);
+ property variant test1: Qt.size(19, 34);
+ property variant test2: Qt.size(3, 109.2);
+ property variant test3: Qt.size(-3, 10);
+ property variant test4: Qt.size(3);
+ property variant test5: Qt.size(3, 109.2, 1);
}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/vector.qml b/tests/auto/declarative/qdeclarativeqt/data/vector.qml
index a471c7a..16716db 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/vector.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/vector.qml
@@ -1,8 +1,8 @@
import Qt 4.6
QtObject {
- property var test1: Qt.vector3d(1, 0, 0.9);
- property var test2: Qt.vector3d(102, -10, -982.1);
- property var test3: Qt.vector3d(102, -10);
- property var test4: Qt.vector3d(102, -10, -982.1, 10);
+ property variant test1: Qt.vector3d(1, 0, 0.9);
+ property variant test2: Qt.vector3d(102, -10, -982.1);
+ property variant test3: Qt.vector3d(102, -10);
+ property variant test4: Qt.vector3d(102, -10, -982.1, 10);
}
diff --git a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
index aff00ad..10e10a3 100644
--- a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
+++ b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
@@ -7,3 +7,6 @@ DEFINES += SRCDIR=\\\"$$PWD\\\"
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index 48d5235..98f1200 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -73,6 +73,7 @@ private slots:
void createQmlObject();
void consoleLog();
void formatting();
+ void isQtObject();
private:
QDeclarativeEngine engine;
@@ -392,6 +393,21 @@ void tst_qdeclarativeqt::formatting()
delete object;
}
+void tst_qdeclarativeqt::isQtObject()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("isQtObject.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toBool(), true);
+ QCOMPARE(object->property("test2").toBool(), false);
+ QCOMPARE(object->property("test3").toBool(), false);
+ QCOMPARE(object->property("test4").toBool(), false);
+ QCOMPARE(object->property("test5").toBool(), false);
+
+ delete object;
+}
+
QTEST_MAIN(tst_qdeclarativeqt)
#include "tst_qdeclarativeqt.moc"
diff --git a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
index 132123a..abd36e0 100644
--- a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
+++ b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
@@ -6,3 +6,5 @@ SOURCES += tst_qdeclarativerepeater.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
index 09c4879..8be7d80 100644
--- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
+++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
@@ -181,6 +181,7 @@ void tst_QDeclarativeRepeater::numberModel()
QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
QVERIFY(testObject->error() == false);
+ delete testObject;
delete canvas;
}
@@ -204,6 +205,9 @@ void tst_QDeclarativeRepeater::objectList()
QVERIFY(repeater != 0);
QCOMPARE(repeater->property("errors").toInt(), 0);//If this fails either they are out of order or can't find the object's data
QCOMPARE(repeater->property("instantiated").toInt(), 100);
+
+ qDeleteAll(data);
+ delete canvas;
}
/*
@@ -293,6 +297,9 @@ void tst_QDeclarativeRepeater::dataModel()
testModel.removeItem(2);
QCOMPARE(container->childItems().count(), 4);
+
+ delete testObject;
+ delete canvas;
}
void tst_QDeclarativeRepeater::itemModel()
@@ -323,6 +330,7 @@ void tst_QDeclarativeRepeater::itemModel()
QVERIFY(qobject_cast<QObject*>(container->childItems().at(2))->objectName() == "item3");
QVERIFY(container->childItems().at(3) == repeater);
+ delete testObject;
delete canvas;
}
@@ -346,12 +354,14 @@ void tst_QDeclarativeRepeater::properties()
QSignalSpy delegateSpy(repeater, SIGNAL(delegateChanged()));
QDeclarativeComponent rectComponent(&engine);
- rectComponent.setData("import Qt 4.6; Rectangle {}", QUrl::fromLocalFile(""));
+ rectComponent.setData("import Qt 4.7; Rectangle {}", QUrl::fromLocalFile(""));
repeater->setDelegate(&rectComponent);
QCOMPARE(delegateSpy.count(),1);
repeater->setDelegate(&rectComponent);
QCOMPARE(delegateSpy.count(),1);
+
+ delete rootObject;
}
QDeclarativeView *tst_QDeclarativeRepeater::createView()
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml
index eb06344..ec35067 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml
@@ -17,7 +17,8 @@ Rectangle {
color: "green"
width: 60; height: 60;
x: rect1.x; y: rect1.y;
- Behavior on x { SmoothedAnimation { objectName: "easeX"; velocity: 400 } }
- Behavior on y { SmoothedAnimation { objectName: "easeY"; velocity: 400 } }
+ // id are needed for SmoothedAnimation in order to avoid deferred creation
+ Behavior on x { SmoothedAnimation { id: anim1; objectName: "easeX"; velocity: 400 } }
+ Behavior on y { SmoothedAnimation { id: anim2; objectName: "easeY"; velocity: 400 } }
}
}
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
index b41b23a..80b757d 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
@@ -6,3 +6,6 @@ SOURCES += tst_qdeclarativesmoothedanimation.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow1.qml b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow1.qml
new file mode 100644
index 0000000..c162e7a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow1.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+SmoothedFollow {}
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow2.qml b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow2.qml
new file mode 100644
index 0000000..d45001f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow2.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+SmoothedFollow {
+ to: 10; duration: 300; reversingMode: SmoothedFollow.Immediate
+}
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow3.qml b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow3.qml
new file mode 100644
index 0000000..c09fb8e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow3.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+SmoothedFollow {
+ to: 10; velocity: 250; reversingMode: SmoothedFollow.Sync
+ maximumEasingTime: 150
+}
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowDisabled.qml b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowDisabled.qml
new file mode 100644
index 0000000..131f674
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowDisabled.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+Rectangle {
+ width: 300; height: 300;
+ Rectangle {
+ objectName: "theRect"
+ color: "red"
+ width: 60; height: 60;
+ x: 100; y: 100;
+ SmoothedFollow on x { id: animX; objectName: "animX"; to: 200; enabled: true; duration: 200 }
+ SmoothedFollow on y { id: animY; objectName: "animY"; to: 200; enabled: false; duration: 200 }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowValueSource.qml b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowValueSource.qml
new file mode 100644
index 0000000..514537c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowValueSource.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+Rectangle {
+ width: 300; height: 300;
+ Rectangle {
+ objectName: "theRect"
+ color: "red"
+ width: 60; height: 60;
+ x: 100; y: 100;
+ SmoothedFollow on x { objectName: "easeX"; to: 200; velocity: 500 }
+ SmoothedFollow on y { objectName: "easeY"; to: 200; duration: 250; velocity: 500 }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro b/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro
new file mode 100644
index 0000000..7f737c2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro
@@ -0,0 +1,11 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativesmoothedfollow.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp b/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp
new file mode 100644
index 0000000..ac750d9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeview.h>
+
+#include <private/qdeclarativesmoothedfollow_p.h>
+#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativevaluetype_p.h>
+#include "../../../shared/util.h"
+
+class tst_qdeclarativesmoothedfollow : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativesmoothedfollow();
+
+private slots:
+ void defaultValues();
+ void values();
+ void disabled();
+ void valueSource();
+ void followTo();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativesmoothedfollow::tst_qdeclarativesmoothedfollow()
+{
+}
+
+void tst_qdeclarativesmoothedfollow::defaultValues()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/smoothedfollow1.qml"));
+ QDeclarativeSmoothedFollow *obj = qobject_cast<QDeclarativeSmoothedFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->to(), 0.);
+ QCOMPARE(obj->velocity(), 200.);
+ QCOMPARE(obj->duration(), -1);
+ QCOMPARE(obj->maximumEasingTime(), -1);
+ QCOMPARE(obj->reversingMode(), QDeclarativeSmoothedFollow::Eased);
+
+ delete obj;
+}
+
+void tst_qdeclarativesmoothedfollow::values()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/smoothedfollow2.qml"));
+ QDeclarativeSmoothedFollow *obj = qobject_cast<QDeclarativeSmoothedFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->to(), 10.);
+ QCOMPARE(obj->velocity(), 200.);
+ QCOMPARE(obj->duration(), 300);
+ QCOMPARE(obj->maximumEasingTime(), -1);
+ QCOMPARE(obj->reversingMode(), QDeclarativeSmoothedFollow::Immediate);
+
+ delete obj;
+}
+
+void tst_qdeclarativesmoothedfollow::disabled()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/smoothedfollow3.qml"));
+ QDeclarativeSmoothedFollow *obj = qobject_cast<QDeclarativeSmoothedFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->to(), 10.);
+ QCOMPARE(obj->velocity(), 250.);
+ QCOMPARE(obj->maximumEasingTime(), 150);
+ QCOMPARE(obj->reversingMode(), QDeclarativeSmoothedFollow::Sync);
+
+ delete obj;
+}
+
+void tst_qdeclarativesmoothedfollow::valueSource()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/smoothedfollowValueSource.qml"));
+
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *theRect = rect->findChild<QDeclarativeRectangle*>("theRect");
+ QVERIFY(theRect);
+
+ QDeclarativeSmoothedFollow *easeX = rect->findChild<QDeclarativeSmoothedFollow*>("easeX");
+ QVERIFY(easeX);
+ QVERIFY(easeX->enabled());
+
+ QDeclarativeSmoothedFollow *easeY = rect->findChild<QDeclarativeSmoothedFollow*>("easeY");
+ QVERIFY(easeY);
+ QVERIFY(easeY->enabled());
+
+ // XXX get the proper duration
+ QTest::qWait(200);
+
+ QTRY_COMPARE(theRect->x(), easeX->to());
+ QTRY_COMPARE(theRect->y(), easeY->to());
+
+ QTRY_COMPARE(theRect->x(), qreal(200));
+ QTRY_COMPARE(theRect->y(), qreal(200));
+}
+
+void tst_qdeclarativesmoothedfollow::followTo()
+{
+ QDeclarativeView canvas;
+ canvas.setFixedSize(240,320);
+
+ canvas.setSource(QUrl::fromLocalFile(SRCDIR "/data/smoothedfollowDisabled.qml"));
+ canvas.show();
+ canvas.setFocus();
+ QVERIFY(canvas.rootObject() != 0);
+
+ QDeclarativeRectangle *rect = canvas.rootObject()->findChild<QDeclarativeRectangle*>("theRect");
+ QVERIFY(rect != 0);
+
+ QDeclarativeSmoothedFollow *animX = canvas.rootObject()->findChild<QDeclarativeSmoothedFollow*>("animX");
+ QVERIFY(animX != 0);
+ QDeclarativeSmoothedFollow *animY = canvas.rootObject()->findChild<QDeclarativeSmoothedFollow*>("animY");
+ QVERIFY(animY != 0);
+
+ QVERIFY(animX->enabled());
+ QVERIFY(!animY->enabled());
+
+ // animX should track 'to'
+ animX->setTo(50.0);
+ // animY should not track this 'to' change
+ animY->setTo(50.0);
+
+ // XXX get the proper duration
+ QTest::qWait(250);
+
+ QTRY_COMPARE(rect->x(), animX->to());
+
+ QCOMPARE(rect->x(), 50.0);
+ QCOMPARE(rect->y(), 100.0);
+}
+
+QTEST_MAIN(tst_qdeclarativesmoothedfollow)
+
+#include "tst_qdeclarativesmoothedfollow.moc"
diff --git a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml
index 7c81fb5..ffbf7d5 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml
+++ b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml
@@ -1,7 +1,7 @@
import Qt 4.6
SpringFollow {
- source: 1.44; velocity: 0.9
+ to: 1.44; velocity: 0.9
spring: 1.0; damping: 0.5
epsilon: 0.25; modulus: 360.0
mass: 2.0; enabled: true
diff --git a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml
index 6fec55b..9a8f6f3 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml
+++ b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml
@@ -1,7 +1,7 @@
import Qt 4.6
SpringFollow {
- source: 1.44; velocity: 0.9
+ to: 1.44; velocity: 0.9
spring: 1.0; damping: 0.5
epsilon: 0.25; modulus: 360.0
mass: 2.0; enabled: false
diff --git a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
index 61aad0f..6f400a3 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
+++ b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
@@ -6,3 +6,6 @@ SOURCES += tst_qdeclarativespringfollow.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp b/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
index 7a60e78..8a07d6b 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
+++ b/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
@@ -72,7 +72,7 @@ void tst_qdeclarativespringfollow::defaultValues()
QVERIFY(obj != 0);
- QCOMPARE(obj->sourceValue(), 0.);
+ QCOMPARE(obj->to(), 0.);
QCOMPARE(obj->velocity(), 0.);
QCOMPARE(obj->spring(), 0.);
QCOMPARE(obj->damping(), 0.);
@@ -94,7 +94,7 @@ void tst_qdeclarativespringfollow::values()
QVERIFY(obj != 0);
- QCOMPARE(obj->sourceValue(), 1.44);
+ QCOMPARE(obj->to(), 1.44);
QCOMPARE(obj->velocity(), 0.9);
QCOMPARE(obj->spring(), 1.0);
QCOMPARE(obj->damping(), 0.5);
@@ -117,7 +117,7 @@ void tst_qdeclarativespringfollow::disabled()
QVERIFY(obj != 0);
- QCOMPARE(obj->sourceValue(), 1.44);
+ QCOMPARE(obj->to(), 1.44);
QCOMPARE(obj->velocity(), 0.9);
QCOMPARE(obj->spring(), 1.0);
QCOMPARE(obj->damping(), 0.5);
diff --git a/tests/auto/declarative/sql/data/README b/tests/auto/declarative/qdeclarativesqldatabase/data/README
index 7efca3a..7efca3a 100644
--- a/tests/auto/declarative/sql/data/README
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/README
diff --git a/tests/auto/declarative/sql/data/changeversion.js b/tests/auto/declarative/qdeclarativesqldatabase/data/changeversion.js
index 680d7a6..680d7a6 100644
--- a/tests/auto/declarative/sql/data/changeversion.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/changeversion.js
diff --git a/tests/auto/declarative/sql/data/creation-a.js b/tests/auto/declarative/qdeclarativesqldatabase/data/creation-a.js
index bd7d5c5..bd7d5c5 100644
--- a/tests/auto/declarative/sql/data/creation-a.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/creation-a.js
diff --git a/tests/auto/declarative/sql/data/creation.js b/tests/auto/declarative/qdeclarativesqldatabase/data/creation.js
index 317b4c1..317b4c1 100644
--- a/tests/auto/declarative/sql/data/creation.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/creation.js
diff --git a/tests/auto/declarative/sql/data/error-a.js b/tests/auto/declarative/qdeclarativesqldatabase/data/error-a.js
index 10a23f6..10a23f6 100644
--- a/tests/auto/declarative/sql/data/error-a.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/error-a.js
diff --git a/tests/auto/declarative/sql/data/error-b.js b/tests/auto/declarative/qdeclarativesqldatabase/data/error-b.js
index 4dd0ecf..4dd0ecf 100644
--- a/tests/auto/declarative/sql/data/error-b.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/error-b.js
diff --git a/tests/auto/declarative/sql/data/error-creation.js b/tests/auto/declarative/qdeclarativesqldatabase/data/error-creation.js
index 0ab2a35..0ab2a35 100644
--- a/tests/auto/declarative/sql/data/error-creation.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/error-creation.js
diff --git a/tests/auto/declarative/sql/data/error-notransaction.js b/tests/auto/declarative/qdeclarativesqldatabase/data/error-notransaction.js
index b9cc647..b9cc647 100644
--- a/tests/auto/declarative/sql/data/error-notransaction.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/error-notransaction.js
diff --git a/tests/auto/declarative/sql/data/error-outsidetransaction.js b/tests/auto/declarative/qdeclarativesqldatabase/data/error-outsidetransaction.js
index a7af3bd..a7af3bd 100644
--- a/tests/auto/declarative/sql/data/error-outsidetransaction.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/error-outsidetransaction.js
diff --git a/tests/auto/declarative/sql/data/iteration-forwardonly.js b/tests/auto/declarative/qdeclarativesqldatabase/data/iteration-forwardonly.js
index 45947c0..45947c0 100644
--- a/tests/auto/declarative/sql/data/iteration-forwardonly.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/iteration-forwardonly.js
diff --git a/tests/auto/declarative/sql/data/iteration.js b/tests/auto/declarative/qdeclarativesqldatabase/data/iteration.js
index c34cbbb..c34cbbb 100644
--- a/tests/auto/declarative/sql/data/iteration.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/iteration.js
diff --git a/tests/auto/declarative/sql/data/readonly-error.js b/tests/auto/declarative/qdeclarativesqldatabase/data/readonly-error.js
index 69ec67f..69ec67f 100644
--- a/tests/auto/declarative/sql/data/readonly-error.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/readonly-error.js
diff --git a/tests/auto/declarative/sql/data/readonly.js b/tests/auto/declarative/qdeclarativesqldatabase/data/readonly.js
index 5ee862c..5ee862c 100644
--- a/tests/auto/declarative/sql/data/readonly.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/readonly.js
diff --git a/tests/auto/declarative/sql/data/reopen1.js b/tests/auto/declarative/qdeclarativesqldatabase/data/reopen1.js
index c1a8157..c1a8157 100644
--- a/tests/auto/declarative/sql/data/reopen1.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/reopen1.js
diff --git a/tests/auto/declarative/sql/data/reopen2.js b/tests/auto/declarative/qdeclarativesqldatabase/data/reopen2.js
index 4f7248f..4f7248f 100644
--- a/tests/auto/declarative/sql/data/reopen2.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/reopen2.js
diff --git a/tests/auto/declarative/sql/data/selection-bindnames.js b/tests/auto/declarative/qdeclarativesqldatabase/data/selection-bindnames.js
index 9786821..9786821 100644
--- a/tests/auto/declarative/sql/data/selection-bindnames.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/selection-bindnames.js
diff --git a/tests/auto/declarative/sql/data/selection.js b/tests/auto/declarative/qdeclarativesqldatabase/data/selection.js
index f116eff..f116eff 100644
--- a/tests/auto/declarative/sql/data/selection.js
+++ b/tests/auto/declarative/qdeclarativesqldatabase/data/selection.js
diff --git a/tests/auto/declarative/sql/sql.pro b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
index 4217eac..3ff4529 100644
--- a/tests/auto/declarative/sql/sql.pro
+++ b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
@@ -3,7 +3,10 @@ contains(QT_CONFIG,declarative): QT += declarative
QT += sql script
macx:CONFIG -= app_bundle
-SOURCES += tst_sql.cpp
+SOURCES += tst_qdeclarativesqldatabase.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp
index e8a5e0c..7486a4b 100644
--- a/tests/auto/declarative/sql/tst_sql.cpp
+++ b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp
@@ -53,19 +53,19 @@
#include <QtCore/qdir.h>
#include <QtCore/qfile.h>
-class tst_sql : public QObject
+class tst_qdeclarativesqldatabase : public QObject
{
Q_OBJECT
public:
- tst_sql()
+ tst_qdeclarativesqldatabase()
{
- qApp->setApplicationName("tst_sql");
+ qApp->setApplicationName("tst_qdeclarativesqldatabase");
qApp->setOrganizationName("Nokia");
qApp->setOrganizationDomain("nokia.com");
engine = new QDeclarativeEngine;
}
- ~tst_sql()
+ ~tst_qdeclarativesqldatabase()
{
delete engine;
}
@@ -108,33 +108,33 @@ void removeRecursive(const QString& dirname)
QDir().rmdir(dirname);
}
-void tst_sql::initTestCase()
+void tst_qdeclarativesqldatabase::initTestCase()
{
removeRecursive(dbDir());
QDir().mkpath(dbDir());
}
-void tst_sql::cleanupTestCase()
+void tst_qdeclarativesqldatabase::cleanupTestCase()
{
removeRecursive(dbDir());
}
-QString tst_sql::dbDir() const
+QString tst_qdeclarativesqldatabase::dbDir() const
{
- static QString tmpd = QDir::tempPath()+"/tst_sql_output-"
+ static QString tmpd = QDir::tempPath()+"/tst_qdeclarativesqldatabase_output-"
+ QDateTime::currentDateTime().toString(QLatin1String("yyyyMMddhhmmss"));
return tmpd;
}
-void tst_sql::checkDatabasePath()
+void tst_qdeclarativesqldatabase::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_sql"));
+ QVERIFY(engine->offlineStoragePath().contains("tst_qdeclarativesqldatabase"));
QVERIFY(engine->offlineStoragePath().contains("OfflineStorage"));
}
static const int total_databases_created_by_tests = 12;
-void tst_sql::testQml_data()
+void tst_qdeclarativesqldatabase::testQml_data()
{
QTest::addColumn<QString>("jsfile"); // The input file
@@ -161,7 +161,7 @@ void tst_sql::testQml_data()
}
/*
-void tst_sql::validateAgainstWebkit()
+void tst_qdeclarativesqldatabase::validateAgainstWebkit()
{
// Validates tests against WebKit (HTML5) support.
//
@@ -188,7 +188,7 @@ void tst_sql::validateAgainstWebkit()
}
*/
-void tst_sql::testQml()
+void tst_qdeclarativesqldatabase::testQml()
{
// Tests QML SQL Database support with tests
// that have been validated against Webkit.
@@ -196,18 +196,20 @@ void tst_sql::testQml()
QFETCH(QString, jsfile);
QString qml=
- "import Qt 4.6\n"
- "Text { Script { source: \""+jsfile+"\" } text: test() }";
+ "import Qt 4.7\n"
+ "import \""+jsfile+"\" as JS\n"
+ "Text { text: JS.test() }";
engine->setOfflineStoragePath(dbDir());
QDeclarativeComponent component(engine);
component.setData(qml.toUtf8(), QUrl::fromLocalFile(SRCDIR "/empty.qml")); // just a file for relative local imports
+ QVERIFY(!component.isError());
QDeclarativeText *text = qobject_cast<QDeclarativeText*>(component.create());
QVERIFY(text != 0);
QCOMPARE(text->text(),QString("passed"));
}
-void tst_sql::testQml_cleanopen_data()
+void tst_qdeclarativesqldatabase::testQml_cleanopen_data()
{
QTest::addColumn<QString>("jsfile"); // The input file
QTest::newRow("reopen1") << "data/reopen1.js";
@@ -215,7 +217,7 @@ void tst_sql::testQml_cleanopen_data()
QTest::newRow("error-creation") << "data/error-creation.js"; // re-uses creation DB
}
-void tst_sql::testQml_cleanopen()
+void tst_qdeclarativesqldatabase::testQml_cleanopen()
{
// Same as testQml, but clean connections between tests,
// making it more like the tests are running in new processes.
@@ -227,11 +229,11 @@ void tst_sql::testQml_cleanopen()
}
}
-void tst_sql::totalDatabases()
+void tst_qdeclarativesqldatabase::totalDatabases()
{
QCOMPARE(QDir(dbDir()+"/Databases").entryInfoList(QDir::Files|QDir::NoDotAndDotDot).count(), total_databases_created_by_tests*2);
}
-QTEST_MAIN(tst_sql)
+QTEST_MAIN(tst_qdeclarativesqldatabase)
-#include "tst_sql.moc"
+#include "tst_qdeclarativesqldatabase.moc"
diff --git a/tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml b/tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml
new file mode 100644
index 0000000..1872de8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml
@@ -0,0 +1,32 @@
+import Qt 4.7
+
+Item {
+ Column {
+ anchors.centerIn: parent
+ Image { id: image1; objectName: "image1" }
+ Image { id: image2; objectName: "image2" }
+ Image { id: image3; objectName: "image3" }
+ }
+
+ states: State {
+ name: "SetImageState"
+ PropertyChanges {
+ target: image1
+ source: "images/qt-logo.png"
+ }
+ PropertyChanges {
+ target: image2
+ source: "images/" + "qt-logo.png"
+ }
+ PropertyChanges {
+ target: image3
+ source: "images/" + (true ? "qt-logo.png" : "")
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "SetImageState"
+ }
+
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/Implementation/images/qt-logo.png b/tests/auto/declarative/qdeclarativestates/data/Implementation/images/qt-logo.png
new file mode 100644
index 0000000..14ddf2a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/Implementation/images/qt-logo.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml
new file mode 100644
index 0000000..861ef8f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml
@@ -0,0 +1,14 @@
+import Qt 4.7
+
+Rectangle {
+ id: container
+ width: 400
+ height: 400
+
+ states: State {
+ name: "reanchored"
+ AnchorChanges {
+ anchors.top: container.top
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/reset.qml b/tests/auto/declarative/qdeclarativestates/data/reset.qml
index 8e9b13a..7da80b3 100644
--- a/tests/auto/declarative/qdeclarativestates/data/reset.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/reset.qml
@@ -6,7 +6,7 @@ Rectangle {
Text {
id: theText
width: 40
- wrap: true
+ wrapMode: Text.WordWrap
text: "a text string that is longer than 40 pixels"
}
diff --git a/tests/auto/declarative/qdeclarativestates/data/urlResolution.qml b/tests/auto/declarative/qdeclarativestates/data/urlResolution.qml
new file mode 100644
index 0000000..8995b56
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/urlResolution.qml
@@ -0,0 +1,12 @@
+import Qt 4.7
+import "Implementation"
+
+Rectangle {
+ width: 100
+ height: 200
+
+ MyType {
+ objectName: "MyType"
+ anchors.fill: parent
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml b/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml
new file mode 100644
index 0000000..7369c63
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+Rectangle {
+ property bool condition1: false
+ property bool condition2: false
+
+ states: [
+ State { name: "state1"; when: condition1 },
+ State { name: "state2"; when: condition2 }
+ ]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
index f874803..706d045 100644
--- a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
+++ b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
@@ -6,3 +6,5 @@ SOURCES += tst_qdeclarativestates.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index 2ab21a4..578bcb4 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -43,6 +43,7 @@
#include <QtDeclarative/qdeclarativecomponent.h>
#include <private/qdeclarativeanchors_p_p.h>
#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativeimage_p.h>
#include <private/qdeclarativetext_p.h>
#include <private/qdeclarativepropertychanges_p.h>
#include <private/qdeclarativestategroup_p.h>
@@ -94,6 +95,7 @@ private slots:
void anchorChanges3();
void anchorChanges4();
void anchorChanges5();
+ void anchorChangesCrash();
void script();
void restoreEntryValues();
void explicitChanges();
@@ -107,6 +109,8 @@ private slots:
void nonExistantProperty();
void reset();
void illegalObjectCreation();
+ void whenOrdering();
+ void urlResolution();
};
void tst_qdeclarativestates::initTestCase()
@@ -716,6 +720,20 @@ void tst_qdeclarativestates::anchorChanges5()
delete rect;
}
+//QTBUG-9609
+void tst_qdeclarativestates::anchorChangesCrash()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChangesCrash.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ rect->setState("reanchored");
+
+ delete rect;
+}
+
void tst_qdeclarativestates::script()
{
QDeclarativeEngine engine;
@@ -978,6 +996,49 @@ void tst_qdeclarativestates::illegalObjectCreation()
QCOMPARE(error.description().toUtf8().constData(), "PropertyChanges does not support creating state-specific objects.");
}
+void tst_qdeclarativestates::whenOrdering()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, SRCDIR "/data/whenOrdering.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->state(), QLatin1String(""));
+ rect->setProperty("condition2", true);
+ QCOMPARE(rect->state(), QLatin1String("state2"));
+ rect->setProperty("condition1", true);
+ QCOMPARE(rect->state(), QLatin1String("state1"));
+ rect->setProperty("condition2", false);
+ QCOMPARE(rect->state(), QLatin1String("state1"));
+ rect->setProperty("condition2", true);
+ QCOMPARE(rect->state(), QLatin1String("state1"));
+ rect->setProperty("condition1", false);
+ rect->setProperty("condition2", false);
+ QCOMPARE(rect->state(), QLatin1String(""));
+}
+
+void tst_qdeclarativestates::urlResolution()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, SRCDIR "/data/urlResolution.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeItem *myType = rect->findChild<QDeclarativeItem*>("MyType");
+ QDeclarativeImage *image1 = rect->findChild<QDeclarativeImage*>("image1");
+ QDeclarativeImage *image2 = rect->findChild<QDeclarativeImage*>("image2");
+ QDeclarativeImage *image3 = rect->findChild<QDeclarativeImage*>("image3");
+ QVERIFY(myType != 0 && image1 != 0 && image2 != 0 && image3 != 0);
+
+ myType->setState("SetImageState");
+ QUrl resolved = QUrl::fromLocalFile(SRCDIR "/data/Implementation/images/qt-logo.png");
+ QCOMPARE(image1->source(), resolved);
+ QCOMPARE(image2->source(), resolved);
+ QCOMPARE(image3->source(), resolved);
+}
+
QTEST_MAIN(tst_qdeclarativestates)
#include "tst_qdeclarativestates.moc"
diff --git a/tests/auto/declarative/qdeclarativestyledtext/qdeclarativestyledtext.pro b/tests/auto/declarative/qdeclarativestyledtext/qdeclarativestyledtext.pro
index bd4d829..87d0e5b 100644
--- a/tests/auto/declarative/qdeclarativestyledtext/qdeclarativestyledtext.pro
+++ b/tests/auto/declarative/qdeclarativestyledtext/qdeclarativestyledtext.pro
@@ -7,3 +7,5 @@ SOURCES += tst_qdeclarativestyledtext.cpp
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
+
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp b/tests/auto/declarative/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp
index 7b1293e..e475d42 100644
--- a/tests/auto/declarative/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp
+++ b/tests/auto/declarative/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp
@@ -71,11 +71,16 @@ void tst_qdeclarativestyledtext::textOutput_data()
QTest::newRow("missing </b>") << "<b>text" << "text";
QTest::newRow("bad nest") << "<b>text <i>italic</b></i>" << "text italic";
QTest::newRow("font color") << "<font color=\"red\">red text</font>" << "red text";
+ QTest::newRow("font color: single quote") << "<font color='red'>red text</font>" << "red text";
QTest::newRow("font size") << "<font size=\"1\">text</font>" << "text";
QTest::newRow("font empty") << "<font>text</font>" << "text";
QTest::newRow("font bad 1") << "<font ezis=\"blah\">text</font>" << "text";
QTest::newRow("font bad 2") << "<font size=\"1>text</font>" << "";
QTest::newRow("extra close") << "<b>text</b></b>" << "text";
+ QTest::newRow("extra space") << "<b >text</b>" << "text";
+ QTest::newRow("entities") << "&lt;b&gt;this &amp; that&lt;/b&gt;" << "<b>this & that</b>";
+ QTest::newRow("newline") << "text<br>more text" << QLatin1String("text") + QChar(QChar::LineSeparator) + QLatin1String("more text") ;
+ QTest::newRow("self-closing newline") << "text<br/>more text" << QLatin1String("text") + QChar(QChar::LineSeparator) + QLatin1String("more text") ;
QTest::newRow("empty") << "" << "";
}
diff --git a/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
index 0781774..b2705fa 100644
--- a/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
+++ b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
@@ -3,3 +3,6 @@ contains(QT_CONFIG,declarative): QT += declarative gui
macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesystempalette.cpp
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
index 5c93952..7927d97 100644
--- a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
+++ b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
@@ -70,7 +70,7 @@ tst_qdeclarativesystempalette::tst_qdeclarativesystempalette()
void tst_qdeclarativesystempalette::activePalette()
{
- QString componentStr = "import Qt 4.6\nSystemPalette { }";
+ QString componentStr = "import Qt 4.7\nSystemPalette { }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
@@ -99,7 +99,7 @@ void tst_qdeclarativesystempalette::activePalette()
void tst_qdeclarativesystempalette::inactivePalette()
{
- QString componentStr = "import Qt 4.6\nSystemPalette { colorGroup: SystemPalette.Inactive }";
+ QString componentStr = "import Qt 4.7\nSystemPalette { colorGroup: SystemPalette.Inactive }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
@@ -129,7 +129,7 @@ void tst_qdeclarativesystempalette::inactivePalette()
void tst_qdeclarativesystempalette::disabledPalette()
{
- QString componentStr = "import Qt 4.6\nSystemPalette { colorGroup: SystemPalette.Disabled }";
+ QString componentStr = "import Qt 4.7\nSystemPalette { colorGroup: SystemPalette.Disabled }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
@@ -159,7 +159,7 @@ void tst_qdeclarativesystempalette::disabledPalette()
void tst_qdeclarativesystempalette::paletteChanged()
{
- QString componentStr = "import Qt 4.6\nSystemPalette { }";
+ QString componentStr = "import Qt 4.7\nSystemPalette { }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml
new file mode 100644
index 0000000..5aeea56
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+Text {
+ text: "<img src='http/exists.png'>"
+}
diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml
new file mode 100644
index 0000000..17bb21c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+Text {
+ text: "<img src='http/notexists.png'>"
+}
diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml
new file mode 100644
index 0000000..53b0266
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+Text {
+ text: "<img src='http://127.0.0.1:14453/exists.png'>"
+}
diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml
new file mode 100644
index 0000000..48c7a95
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+Text {
+ text: "<img src='http://127.0.0.1:14453/notexists.png'>"
+}
diff --git a/tests/auto/declarative/qdeclarativetext/data/http/exists.png b/tests/auto/declarative/qdeclarativetext/data/http/exists.png
new file mode 100644
index 0000000..399bd0b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetext/data/http/exists.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
index 8b4b4d1..e70443e 100644
--- a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
+++ b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
@@ -1,5 +1,15 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative gui
+QT += network
macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativetext.cpp
+
+INCLUDEPATH += ../shared/
+HEADERS += ../shared/testhttpserver.h
+SOURCES += ../shared/testhttpserver.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
index bbbbd83..edb4a32 100644
--- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -48,6 +48,9 @@
#include <QGraphicsSceneMouseEvent>
#include <qmath.h>
+#include "../../../shared/util.h"
+#include "testhttpserver.h"
+
class tst_qdeclarativetext : public QObject
{
@@ -62,6 +65,9 @@ private slots:
void elide();
void textFormat();
+ void embeddedImages_data();
+ void embeddedImages();
+
// ### these tests may be trivial
void horizontalAlignment();
void verticalAlignment();
@@ -156,7 +162,7 @@ void tst_qdeclarativetext::text()
{
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nText { text: \"\" }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nText { text: \"\" }", QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -168,7 +174,7 @@ void tst_qdeclarativetext::text()
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -181,7 +187,7 @@ void tst_qdeclarativetext::text()
for (int i = 0; i < richText.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -198,7 +204,7 @@ void tst_qdeclarativetext::width()
// uses Font metrics to find the width for standard and document to find the width for rich
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nText { text: \"\" }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nText { text: \"\" }", QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -214,7 +220,7 @@ void tst_qdeclarativetext::width()
qreal metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width();
metricWidth = qCeil(metricWidth);
- QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -234,7 +240,7 @@ void tst_qdeclarativetext::width()
int documentWidth = document.idealWidth();
- QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -251,18 +257,18 @@ void tst_qdeclarativetext::wrap()
// for specified width and wrap set true
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nText { text: \"Hello\"; wrap: true; width: 300 }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nText { text: \"Hello\"; wrapMode: Text.WordWrap; width: 300 }", QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
textHeight = textObject->height();
QVERIFY(textObject != 0);
- QVERIFY(textObject->wrap() == true);
+ QVERIFY(textObject->wrapMode() == QDeclarativeText::WordWrap);
QCOMPARE(textObject->width(), 300.);
}
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { wrap: true; width: 30; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -278,7 +284,7 @@ void tst_qdeclarativetext::wrap()
for (int i = 0; i < richText.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { wrap: true; width: 30; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -286,8 +292,28 @@ void tst_qdeclarativetext::wrap()
QVERIFY(textObject != 0);
QCOMPARE(textObject->width(), 30.);
QVERIFY(textObject->height() > textHeight);
+
+ qreal oldHeight = textObject->height();
+ textObject->setWidth(100);
+ QVERIFY(textObject->height() < oldHeight);
}
+ // richtext again with a fixed height
+ for (int i = 0; i < richText.size(); i++)
+ {
+ QString componentStr = "import Qt 4.7\nText { wrapMode: Text.WordWrap; width: 30; height: 50; text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->width(), 30.);
+ QVERIFY(textObject->implicitHeight() > textHeight);
+
+ qreal oldHeight = textObject->implicitHeight();
+ textObject->setWidth(100);
+ QVERIFY(textObject->implicitHeight() < oldHeight);
+ }
}
void tst_qdeclarativetext::elide()
@@ -300,7 +326,7 @@ void tst_qdeclarativetext::elide()
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData(("import Qt 4.6\nText { text: \"\"; "+elide+" width: 100 }").toLatin1(), QUrl::fromLocalFile(""));
+ textComponent.setData(("import Qt 4.7\nText { text: \"\"; "+elide+" width: 100 }").toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QCOMPARE(textObject->elideMode(), m);
@@ -309,7 +335,7 @@ void tst_qdeclarativetext::elide()
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { "+elide+" width: 100; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { "+elide+" width: 100; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -321,7 +347,7 @@ void tst_qdeclarativetext::elide()
// richtext - does nothing
for (int i = 0; i < richText.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { "+elide+" width: 100; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { "+elide+" width: 100; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -336,7 +362,7 @@ void tst_qdeclarativetext::textFormat()
{
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nText { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nText { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -344,7 +370,7 @@ void tst_qdeclarativetext::textFormat()
}
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nText { text: \"<b>Hello</b>\"; textFormat: Text.PlainText }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nText { text: \"<b>Hello</b>\"; textFormat: Text.PlainText }", QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -361,7 +387,7 @@ void tst_qdeclarativetext::horizontalAlignment()
{
for (int j=0; j < horizontalAlignmentmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -374,7 +400,7 @@ void tst_qdeclarativetext::horizontalAlignment()
{
for (int j=0; j < horizontalAlignmentmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -393,7 +419,7 @@ void tst_qdeclarativetext::verticalAlignment()
{
for (int j=0; j < verticalAlignmentmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -407,7 +433,7 @@ void tst_qdeclarativetext::verticalAlignment()
{
for (int j=0; j < verticalAlignmentmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -423,7 +449,7 @@ void tst_qdeclarativetext::font()
{
//test size, then bold, then italic, then family
{
- QString componentStr = "import Qt 4.6\nText { font.pointSize: 40; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.pointSize: 40; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -434,7 +460,7 @@ void tst_qdeclarativetext::font()
}
{
- QString componentStr = "import Qt 4.6\nText { font.pixelSize: 40; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.pixelSize: 40; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -445,7 +471,7 @@ void tst_qdeclarativetext::font()
}
{
- QString componentStr = "import Qt 4.6\nText { font.bold: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.bold: true; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -455,7 +481,7 @@ void tst_qdeclarativetext::font()
}
{
- QString componentStr = "import Qt 4.6\nText { font.italic: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.italic: true; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -465,7 +491,7 @@ void tst_qdeclarativetext::font()
}
{
- QString componentStr = "import Qt 4.6\nText { font.family: \"Helvetica\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.family: \"Helvetica\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -476,7 +502,7 @@ void tst_qdeclarativetext::font()
}
{
- QString componentStr = "import Qt 4.6\nText { font.family: \"\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.family: \"\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -490,7 +516,7 @@ void tst_qdeclarativetext::style()
//test style
for (int i = 0; i < styles.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { style: \"" + styleStrings.at(i) + "\"; styleColor: \"white\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { style: \"" + styleStrings.at(i) + "\"; styleColor: \"white\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -505,7 +531,7 @@ void tst_qdeclarativetext::color()
//test style
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -516,7 +542,7 @@ void tst_qdeclarativetext::color()
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { styleColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { styleColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -530,7 +556,7 @@ void tst_qdeclarativetext::color()
{
for (int j = 0; j < colorStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nText { color: \"" + colorStrings.at(i) + "\"; styleColor: \"" + colorStrings.at(j) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { color: \"" + colorStrings.at(i) + "\"; styleColor: \"" + colorStrings.at(j) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -544,7 +570,7 @@ void tst_qdeclarativetext::color()
QColor testColor("#001234");
testColor.setAlpha(170);
- QString componentStr = "import Qt 4.6\nText { color: \"" + colorStr + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { color: \"" + colorStr + "\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -558,14 +584,14 @@ void tst_qdeclarativetext::smooth()
for (int i = 0; i < standard.size(); i++)
{
{
- QString componentStr = "import Qt 4.6\nText { smooth: true; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { smooth: true; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QCOMPARE(textObject->smooth(), true);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -575,14 +601,14 @@ void tst_qdeclarativetext::smooth()
for (int i = 0; i < richText.size(); i++)
{
{
- QString componentStr = "import Qt 4.6\nText { smooth: true; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { smooth: true; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QCOMPARE(textObject->smooth(), true);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -594,7 +620,7 @@ void tst_qdeclarativetext::smooth()
void tst_qdeclarativetext::weight()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -603,7 +629,7 @@ void tst_qdeclarativetext::weight()
QCOMPARE((int)textObject->font().weight(), (int)QDeclarativeFontValueType::Normal);
}
{
- QString componentStr = "import Qt 4.6\nText { font.weight: \"Bold\"; text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { font.weight: \"Bold\"; text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -616,7 +642,7 @@ void tst_qdeclarativetext::weight()
void tst_qdeclarativetext::underline()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -625,7 +651,7 @@ void tst_qdeclarativetext::underline()
QCOMPARE(textObject->font().underline(), false);
}
{
- QString componentStr = "import Qt 4.6\nText { font.underline: true; text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { font.underline: true; text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -638,7 +664,7 @@ void tst_qdeclarativetext::underline()
void tst_qdeclarativetext::overline()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -647,7 +673,7 @@ void tst_qdeclarativetext::overline()
QCOMPARE(textObject->font().overline(), false);
}
{
- QString componentStr = "import Qt 4.6\nText { font.overline: true; text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { font.overline: true; text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -660,7 +686,7 @@ void tst_qdeclarativetext::overline()
void tst_qdeclarativetext::strikeout()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -669,7 +695,7 @@ void tst_qdeclarativetext::strikeout()
QCOMPARE(textObject->font().strikeOut(), false);
}
{
- QString componentStr = "import Qt 4.6\nText { font.strikeout: true; text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { font.strikeout: true; text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -682,7 +708,7 @@ void tst_qdeclarativetext::strikeout()
void tst_qdeclarativetext::capitalization()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -691,7 +717,7 @@ void tst_qdeclarativetext::capitalization()
QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::MixedCase);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"AllUppercase\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"AllUppercase\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -700,7 +726,7 @@ void tst_qdeclarativetext::capitalization()
QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::AllUppercase);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"AllLowercase\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"AllLowercase\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -709,7 +735,7 @@ void tst_qdeclarativetext::capitalization()
QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::AllLowercase);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"SmallCaps\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"SmallCaps\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -718,7 +744,7 @@ void tst_qdeclarativetext::capitalization()
QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::SmallCaps);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"Capitalize\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"Capitalize\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -731,7 +757,7 @@ void tst_qdeclarativetext::capitalization()
void tst_qdeclarativetext::letterSpacing()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -740,7 +766,7 @@ void tst_qdeclarativetext::letterSpacing()
QCOMPARE(textObject->font().letterSpacing(), 0.0);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.letterSpacing: -50 }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: -50 }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -749,7 +775,7 @@ void tst_qdeclarativetext::letterSpacing()
QCOMPARE(textObject->font().letterSpacing(), -50.);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.letterSpacing: 200 }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: 200 }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -762,7 +788,7 @@ void tst_qdeclarativetext::letterSpacing()
void tst_qdeclarativetext::wordSpacing()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -771,7 +797,7 @@ void tst_qdeclarativetext::wordSpacing()
QCOMPARE(textObject->font().wordSpacing(), 0.0);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.wordSpacing: -50 }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.wordSpacing: -50 }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -780,7 +806,7 @@ void tst_qdeclarativetext::wordSpacing()
QCOMPARE(textObject->font().wordSpacing(), -50.);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.wordSpacing: 200 }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.wordSpacing: 200 }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -811,7 +837,7 @@ public slots:
void tst_qdeclarativetext::clickLink()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"<a href=\\\"http://qt.nokia.com\\\">Hello world!</a>\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"<a href=\\\"http://qt.nokia.com\\\">Hello world!</a>\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -839,6 +865,49 @@ void tst_qdeclarativetext::clickLink()
}
}
+void tst_qdeclarativetext::embeddedImages_data()
+{
+ QTest::addColumn<QUrl>("qmlfile");
+ QTest::addColumn<QString>("error");
+ QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesLocal.qml") << "";
+ QTest::newRow("local-error") << QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesLocalError.qml")
+ << "QML Text ("+QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesLocalError.qml").toString()+":3:1) Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/http/notexists.png").toString();
+ QTest::newRow("remote") << QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesRemote.qml") << "";
+ QTest::newRow("remote-error") << QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesRemoteError.qml")
+ << "QML Text ("+QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesRemoteError.qml").toString()+":3:1) Error downloading http://127.0.0.1:14453/notexists.png - server replied: Not found";
+}
+
+void tst_qdeclarativetext::embeddedImages()
+{
+ // Tests QTBUG-9900
+
+ QFETCH(QUrl, qmlfile);
+ QFETCH(QString, error);
+
+ TestHTTPServer server(14453);
+ server.serveDirectory(SRCDIR "/data/http");
+
+ if (!error.isEmpty())
+ QTest::ignoreMessage(QtWarningMsg, error.toLatin1());
+
+ QDeclarativeComponent textComponent(&engine, qmlfile);
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+
+ QTRY_COMPARE(textObject->resourcesLoading(), 0);
+
+ QPixmap pm(SRCDIR "/data/http/exists.png");
+ if (error.isEmpty()) {
+ QCOMPARE(textObject->width(), double(pm.width()));
+ QCOMPARE(textObject->height(), double(pm.height()));
+ } else {
+ QVERIFY(16 != pm.width()); // check test is effective
+ QCOMPARE(textObject->width(), 16.0); // default size of QTextDocument broken image icon
+ QCOMPARE(textObject->height(), 16.0);
+ }
+}
+
QTEST_MAIN(tst_qdeclarativetext)
#include "tst_qdeclarativetext.moc"
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml
index de4de00..a44e867 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml
@@ -1,5 +1,4 @@
import Qt 4.6
-import "http://localhost:42332"
Rectangle { width: 300; height: 300; color: "white"
resources: [
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml b/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml
index 8d7dbbc..1aed8d8 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml
@@ -1,7 +1,7 @@
import Qt 4.6
Rectangle {
- property var myInput: input
+ property variant myInput: input
width: 800; height: 600; color: "blue"
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml b/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml
index 103a627..69a6479 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml
@@ -1,7 +1,7 @@
import Qt 4.6
Rectangle {
- property var myInput: input
+ property variant myInput: input
width: 800; height: 600; color: "blue"
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index b1935df..25101ba 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -79,6 +79,7 @@ private slots:
void inputMethodHints();
void cursorDelegate();
+ void delegateLoading_data();
void delegateLoading();
void navigation();
void readOnly();
@@ -149,7 +150,7 @@ void tst_qdeclarativetextedit::text()
{
{
QDeclarativeComponent texteditComponent(&engine);
- texteditComponent.setData("import Qt 4.6\nTextEdit { text: \"\" }", QUrl());
+ texteditComponent.setData("import Qt 4.7\nTextEdit { text: \"\" }", QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
@@ -158,7 +159,7 @@ void tst_qdeclarativetextedit::text()
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -169,7 +170,7 @@ void tst_qdeclarativetextedit::text()
for (int i = 0; i < richText.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -189,7 +190,7 @@ void tst_qdeclarativetextedit::width()
// uses Font metrics to find the width for standard and document to find the width for rich
{
QDeclarativeComponent texteditComponent(&engine);
- texteditComponent.setData("import Qt 4.6\nTextEdit { text: \"\" }", QUrl());
+ texteditComponent.setData("import Qt 4.7\nTextEdit { text: \"\" }", QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
@@ -203,7 +204,7 @@ void tst_qdeclarativetextedit::width()
qreal metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width();
metricWidth = floor(metricWidth);
- QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -220,7 +221,7 @@ void tst_qdeclarativetextedit::width()
int documentWidth = document.idealWidth();
- QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -235,7 +236,7 @@ void tst_qdeclarativetextedit::wrap()
// for specified width and wrap set true
{
QDeclarativeComponent texteditComponent(&engine);
- texteditComponent.setData("import Qt 4.6\nTextEdit { text: \"\"; wrap: true; width: 300 }", QUrl());
+ texteditComponent.setData("import Qt 4.7\nTextEdit { text: \"\"; wrapMode: TextEdit.WordWrap; width: 300 }", QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
@@ -244,7 +245,7 @@ void tst_qdeclarativetextedit::wrap()
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { wrap: true; width: 300; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -255,7 +256,7 @@ void tst_qdeclarativetextedit::wrap()
for (int i = 0; i < richText.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { wrap: true; width: 300; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -270,7 +271,7 @@ void tst_qdeclarativetextedit::textFormat()
{
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nTextEdit { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nTextEdit { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile(""));
QDeclarativeTextEdit *textObject = qobject_cast<QDeclarativeTextEdit*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -278,7 +279,7 @@ void tst_qdeclarativetextedit::textFormat()
}
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nTextEdit { text: \"<b>Hello</b>\"; textFormat: Text.PlainText }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nTextEdit { text: \"<b>Hello</b>\"; textFormat: Text.PlainText }", QUrl::fromLocalFile(""));
QDeclarativeTextEdit *textObject = qobject_cast<QDeclarativeTextEdit*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -295,7 +296,7 @@ void tst_qdeclarativetextedit::hAlign()
{
for (int j=0; j < hAlignmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -309,7 +310,7 @@ void tst_qdeclarativetextedit::hAlign()
{
for (int j=0; j < hAlignmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -329,7 +330,7 @@ void tst_qdeclarativetextedit::vAlign()
{
for (int j=0; j < vAlignmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -343,7 +344,7 @@ void tst_qdeclarativetextedit::vAlign()
{
for (int j=0; j < vAlignmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -359,7 +360,7 @@ void tst_qdeclarativetextedit::font()
{
//test size, then bold, then italic, then family
{
- QString componentStr = "import Qt 4.6\nTextEdit { font.pointSize: 40; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { font.pointSize: 40; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -371,7 +372,7 @@ void tst_qdeclarativetextedit::font()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { font.bold: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { font.bold: true; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -382,7 +383,7 @@ void tst_qdeclarativetextedit::font()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { font.italic: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { font.italic: true; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -393,7 +394,7 @@ void tst_qdeclarativetextedit::font()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { font.family: \"Helvetica\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { font.family: \"Helvetica\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -405,7 +406,7 @@ void tst_qdeclarativetextedit::font()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { font.family: \"\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { font.family: \"\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -420,7 +421,7 @@ void tst_qdeclarativetextedit::color()
//test normal
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -432,7 +433,7 @@ void tst_qdeclarativetextedit::color()
//test selection
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -443,7 +444,7 @@ void tst_qdeclarativetextedit::color()
//test selected text
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -456,7 +457,7 @@ void tst_qdeclarativetextedit::color()
QColor testColor("#001234");
testColor.setAlpha(170);
- QString componentStr = "import Qt 4.6\nTextEdit { color: \"" + colorStr + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { color: \"" + colorStr + "\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -469,7 +470,7 @@ void tst_qdeclarativetextedit::color()
void tst_qdeclarativetextedit::textMargin()
{
for(qreal i=0; i<=10; i+=0.3){
- QString componentStr = "import Qt 4.6\nTextEdit { textMargin: " + QString::number(i) + "; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { textMargin: " + QString::number(i) + "; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -481,7 +482,7 @@ void tst_qdeclarativetextedit::textMargin()
void tst_qdeclarativetextedit::persistentSelection()
{
{
- QString componentStr = "import Qt 4.6\nTextEdit { persistentSelection: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { persistentSelection: true; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -490,7 +491,7 @@ void tst_qdeclarativetextedit::persistentSelection()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { persistentSelection: false; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { persistentSelection: false; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -502,7 +503,7 @@ void tst_qdeclarativetextedit::persistentSelection()
void tst_qdeclarativetextedit::focusOnPress()
{
{
- QString componentStr = "import Qt 4.6\nTextEdit { focusOnPress: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { focusOnPress: true; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -511,7 +512,7 @@ void tst_qdeclarativetextedit::focusOnPress()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { focusOnPress: false; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { focusOnPress: false; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -523,7 +524,7 @@ void tst_qdeclarativetextedit::focusOnPress()
void tst_qdeclarativetextedit::selection()
{
QString testStr = standard[0];//TODO: What should happen for multiline/rich text?
- QString componentStr = "import Qt 4.6\nTextEdit { text: \""+ testStr +"\"; }";
+ QString componentStr = "import Qt 4.7\nTextEdit { text: \""+ testStr +"\"; }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -641,41 +642,60 @@ void tst_qdeclarativetextedit::cursorDelegate()
QVERIFY(!textEditObject->findChild<QDeclarativeItem*>("cursorInstance"));
}
+void tst_qdeclarativetextedit::delegateLoading_data()
+{
+ QTest::addColumn<QString>("qmlfile");
+ QTest::addColumn<QString>("error");
+
+ // import installed
+ QTest::newRow("pass") << "cursorHttpTestPass.qml" << "";
+ QTest::newRow("fail1") << "cursorHttpTestFail1.qml" << ":-1: Network error for URL http://localhost:42332/FailItem.qml ";
+ QTest::newRow("fail2") << "cursorHttpTestFail2.qml" << "http://localhost:42332/ErrItem.qml:4:5: Fungus is not a type ";
+}
+
void tst_qdeclarativetextedit::delegateLoading()
{
+ QFETCH(QString, qmlfile);
+ QFETCH(QString, error);
+
TestHTTPServer server(42332);
server.serveDirectory(SRCDIR "/data/httpfail", TestHTTPServer::Disconnect);
server.serveDirectory(SRCDIR "/data/httpslow", TestHTTPServer::Delay);
server.serveDirectory(SRCDIR "/data/http");
+
QDeclarativeView* view = new QDeclarativeView(0);
- view->setSource(QUrl("http://localhost:42332/cursorHttpTestPass.qml"));
- view->show();
- view->setFocus();
- QTRY_VERIFY(view->rootObject());//Wait for loading to finish.
- QDeclarativeTextEdit *textEditObject = view->rootObject()->findChild<QDeclarativeTextEdit*>("textEditObject");
- // view->rootObject()->dumpObjectTree();
- QVERIFY(textEditObject != 0);
- textEditObject->setFocus(true);
- QDeclarativeItem *delegate;
- delegate = view->rootObject()->findChild<QDeclarativeItem*>("delegateOkay");
- QVERIFY(delegate);
- delegate = view->rootObject()->findChild<QDeclarativeItem*>("delegateSlow");
- QVERIFY(delegate);
- view->setSource(QUrl("http://localhost:42332/cursorHttpTestFail1.qml"));
- view->show();
- QTRY_VERIFY(view->status()==QDeclarativeView::Error);
- view->setFocus();
- QTRY_VERIFY(!view->rootObject()); // there is fail item inside this test
- view->setSource(QUrl("http://localhost:42332/cursorHttpTestFail2.qml"));
+
+ view->setSource(QUrl(QLatin1String("http://localhost:42332/") + qmlfile));
view->show();
- QTRY_VERIFY(view->status()==QDeclarativeView::Error);
view->setFocus();
- QTRY_VERIFY(!view->rootObject()); // there is fail item inside this test
+
+ if (!error.isEmpty()) {
+ QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
+ QTRY_VERIFY(view->status()==QDeclarativeView::Error);
+ QTRY_VERIFY(!view->rootObject()); // there is fail item inside this test
+ } else {
+ QTRY_VERIFY(view->rootObject());//Wait for loading to finish.
+ QDeclarativeTextEdit *textEditObject = view->rootObject()->findChild<QDeclarativeTextEdit*>("textEditObject");
+ // view->rootObject()->dumpObjectTree();
+ QVERIFY(textEditObject != 0);
+ textEditObject->setFocus(true);
+ QDeclarativeItem *delegate;
+ delegate = view->rootObject()->findChild<QDeclarativeItem*>("delegateOkay");
+ QVERIFY(delegate);
+ delegate = view->rootObject()->findChild<QDeclarativeItem*>("delegateSlow");
+ QVERIFY(delegate);
+
+ delete delegate;
+ }
+
+
//A test should be added here with a component which is ready but component.create() returns null
//Not sure how to accomplish this with QDeclarativeTextEdits cursor delegate
//###This was only needed for code coverage, and could be a case of overzealous defensive programming
//delegate = view->rootObject()->findChild<QDeclarativeItem*>("delegateErrorB");
//QVERIFY(!delegate);
+
+ delete view;
}
/*
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/echoMode.qml b/tests/auto/declarative/qdeclarativetextinput/data/echoMode.qml
new file mode 100644
index 0000000..66a2017
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextinput/data/echoMode.qml
@@ -0,0 +1,11 @@
+import Qt 4.7
+
+Rectangle {
+ property QtObject myInput: input
+
+ width: 400; height: 200; color: "green"
+
+ TextInput { id: input; focus: true
+ text: "ABCDefgh"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml
index 493db5b..04f06da 100644
--- a/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml
+++ b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml
@@ -1,7 +1,7 @@
import Qt 4.6
Rectangle {
- property var myInput: input
+ property variant myInput: input
width: 800; height: 600; color: "blue"
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml
index c47371a..41e8b59 100644
--- a/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml
+++ b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml
@@ -1,7 +1,7 @@
import Qt 4.6
Rectangle {
- property var myInput: input
+ property variant myInput: input
width: 800; height: 600; color: "blue"
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/validators.qml b/tests/auto/declarative/qdeclarativetextinput/data/validators.qml
index 531a232..4b1ba27 100644
--- a/tests/auto/declarative/qdeclarativetextinput/data/validators.qml
+++ b/tests/auto/declarative/qdeclarativetextinput/data/validators.qml
@@ -1,9 +1,9 @@
import Qt 4.7
Item {
- property var intInput: intInput
- property var dblInput: dblInput
- property var strInput: strInput
+ property variant intInput: intInput
+ property variant dblInput: dblInput
+ property variant strInput: strInput
width: 800; height: 600;
diff --git a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
index 5aed51f..957e75c 100644
--- a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
+++ b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
@@ -6,3 +6,4 @@ SOURCES += tst_qdeclarativetextinput.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index b6f55dd..fcd7527 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -73,7 +73,9 @@ private slots:
void sendRequestSoftwareInputPanelEvent();
void setHAlignClearCache();
+ void focusOutClearSelection();
+ void echoMode();
private:
void simulateKey(QDeclarativeView *, int key);
QDeclarativeView *createView(const QString &filename);
@@ -107,22 +109,26 @@ void tst_qdeclarativetextinput::text()
{
{
QDeclarativeComponent textinputComponent(&engine);
- textinputComponent.setData("import Qt 4.6\nTextInput { text: \"\" }", QUrl());
+ textinputComponent.setData("import Qt 4.7\nTextInput { text: \"\" }", QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->text(), QString(""));
+
+ delete textinputObject;
}
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextInput { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->text(), standard.at(i));
+
+ delete textinputObject;
}
}
@@ -132,11 +138,13 @@ void tst_qdeclarativetextinput::width()
// uses Font metrics to find the width for standard
{
QDeclarativeComponent textinputComponent(&engine);
- textinputComponent.setData("import Qt 4.6\nTextInput { text: \"\" }", QUrl());
+ textinputComponent.setData("import Qt 4.7\nTextInput { text: \"\" }", QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->width(), 1.);//1 for the cursor
+
+ delete textinputObject;
}
for (int i = 0; i < standard.size(); i++)
@@ -145,13 +153,15 @@ void tst_qdeclarativetextinput::width()
QFontMetricsF fm(f);
qreal metricWidth = fm.width(standard.at(i));
- QString componentStr = "import Qt 4.6\nTextInput { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->width(), qreal(metricWidth) + 1.);//1 for the cursor
+
+ delete textinputObject;
}
}
@@ -159,7 +169,7 @@ void tst_qdeclarativetextinput::font()
{
//test size, then bold, then italic, then family
{
- QString componentStr = "import Qt 4.6\nTextInput { font.pointSize: 40; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { font.pointSize: 40; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -168,10 +178,12 @@ void tst_qdeclarativetextinput::font()
QCOMPARE(textinputObject->font().pointSize(), 40);
QCOMPARE(textinputObject->font().bold(), false);
QCOMPARE(textinputObject->font().italic(), false);
+
+ delete textinputObject;
}
{
- QString componentStr = "import Qt 4.6\nTextInput { font.bold: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { font.bold: true; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -179,10 +191,12 @@ void tst_qdeclarativetextinput::font()
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->font().bold(), true);
QCOMPARE(textinputObject->font().italic(), false);
+
+ delete textinputObject;
}
{
- QString componentStr = "import Qt 4.6\nTextInput { font.italic: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { font.italic: true; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -190,10 +204,12 @@ void tst_qdeclarativetextinput::font()
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->font().italic(), true);
QCOMPARE(textinputObject->font().bold(), false);
+
+ delete textinputObject;
}
{
- QString componentStr = "import Qt 4.6\nTextInput { font.family: \"Helvetica\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { font.family: \"Helvetica\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -202,16 +218,20 @@ void tst_qdeclarativetextinput::font()
QCOMPARE(textinputObject->font().family(), QString("Helvetica"));
QCOMPARE(textinputObject->font().bold(), false);
QCOMPARE(textinputObject->font().italic(), false);
+
+ delete textinputObject;
}
{
- QString componentStr = "import Qt 4.6\nTextInput { font.family: \"\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { font.family: \"\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->font().family(), QString(""));
+
+ delete textinputObject;
}
}
@@ -220,34 +240,40 @@ void tst_qdeclarativetextinput::color()
//test color
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextInput { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->color(), QColor(colorStrings.at(i)));
+
+ delete textinputObject;
}
//test selection color
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextInput { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->selectionColor(), QColor(colorStrings.at(i)));
+
+ delete textinputObject;
}
//test selected text color
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextInput { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->selectedTextColor(), QColor(colorStrings.at(i)));
+
+ delete textinputObject;
}
{
@@ -255,20 +281,22 @@ void tst_qdeclarativetextinput::color()
QColor testColor("#001234");
testColor.setAlpha(170);
- QString componentStr = "import Qt 4.6\nTextInput { color: \"" + colorStr + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { color: \"" + colorStr + "\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->color(), testColor);
+
+ delete textinputObject;
}
}
void tst_qdeclarativetextinput::selection()
{
QString testStr = standard[0];
- QString componentStr = "import Qt 4.6\nTextInput { text: \""+ testStr +"\"; }";
+ QString componentStr = "import Qt 4.7\nTextInput { text: \""+ testStr +"\"; }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -344,11 +372,13 @@ void tst_qdeclarativetextinput::selection()
QVERIFY(textinputObject->selectedText().size() == 10);
textinputObject->setSelectionEnd(100);
QVERIFY(textinputObject->selectedText().size() == 10);
+
+ delete textinputObject;
}
void tst_qdeclarativetextinput::maxLength()
{
- //QString componentStr = "import Qt 4.6\nTextInput { maximumLength: 10; }";
+ //QString componentStr = "import Qt 4.7\nTextInput { maximumLength: 10; }";
QDeclarativeView *canvas = createView(SRCDIR "/data/maxLength.qml");
canvas->show();
canvas->setFocus();
@@ -371,12 +401,14 @@ void tst_qdeclarativetextinput::maxLength()
QTest::keyPress(canvas, Qt::Key_A);
QTest::keyRelease(canvas, Qt::Key_A, Qt::NoModifier ,10);
}
+
+ delete canvas;
}
void tst_qdeclarativetextinput::masks()
{
//Not a comprehensive test of the possible masks, that's done elsewhere (QLineEdit)
- //QString componentStr = "import Qt 4.6\nTextInput { inputMask: 'HHHHhhhh'; }";
+ //QString componentStr = "import Qt 4.7\nTextInput { inputMask: 'HHHHhhhh'; }";
QDeclarativeView *canvas = createView(SRCDIR "/data/masks.qml");
canvas->show();
canvas->setFocus();
@@ -393,6 +425,8 @@ void tst_qdeclarativetextinput::masks()
QTest::keyPress(canvas, Qt::Key_A);
QTest::keyRelease(canvas, Qt::Key_A, Qt::NoModifier ,10);
}
+
+ delete canvas;
}
void tst_qdeclarativetextinput::validators()
@@ -485,6 +519,8 @@ void tst_qdeclarativetextinput::validators()
QTest::keyRelease(canvas, Qt::Key_A, Qt::NoModifier ,10);
QCOMPARE(strInput->text(), QLatin1String("aaaa"));
QCOMPARE(strInput->hasAcceptableInput(), true);
+
+ delete canvas;
}
void tst_qdeclarativetextinput::inputMethodHints()
@@ -499,6 +535,8 @@ void tst_qdeclarativetextinput::inputMethodHints()
QVERIFY(textinputObject->inputMethodHints() & Qt::ImhNoPredictiveText);
textinputObject->setInputMethodHints(Qt::ImhUppercaseOnly);
QVERIFY(textinputObject->inputMethodHints() & Qt::ImhUppercaseOnly);
+
+ delete canvas;
}
/*
@@ -536,6 +574,8 @@ void tst_qdeclarativetextinput::navigation()
QVERIFY(input->hasFocus() == false);
simulateKey(canvas, Qt::Key_Left);
QVERIFY(input->hasFocus() == true);
+
+ delete canvas;
}
void tst_qdeclarativetextinput::cursorDelegate()
@@ -563,6 +603,8 @@ void tst_qdeclarativetextinput::cursorDelegate()
//Test Delegate gets deleted
textInputObject->setCursorDelegate(0);
QVERIFY(!textInputObject->findChild<QDeclarativeItem*>("cursorInstance"));
+
+ delete view;
}
void tst_qdeclarativetextinput::readOnly()
@@ -585,6 +627,46 @@ void tst_qdeclarativetextinput::readOnly()
simulateKey(canvas, Qt::Key_Space);
simulateKey(canvas, Qt::Key_Escape);
QCOMPARE(input->text(), initial);
+
+ delete canvas;
+}
+
+void tst_qdeclarativetextinput::echoMode()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/echoMode.qml");
+ canvas->show();
+ canvas->setFocus();
+
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeTextInput *input = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("myInput")));
+
+ QVERIFY(input != 0);
+ QTRY_VERIFY(input->hasFocus() == true);
+ QString initial = input->text();
+ QCOMPARE(initial, QLatin1String("ABCDefgh"));
+ QCOMPARE(input->echoMode(), QDeclarativeTextInput::Normal);
+ QCOMPARE(input->displayText(), input->text());
+ input->setEchoMode(QDeclarativeTextInput::NoEcho);
+ QCOMPARE(input->text(), initial);
+ QCOMPARE(input->displayText(), QLatin1String(""));
+ QCOMPARE(input->passwordCharacter(), QLatin1String("*"));
+ input->setEchoMode(QDeclarativeTextInput::Password);
+ QCOMPARE(input->text(), initial);
+ QCOMPARE(input->displayText(), QLatin1String("********"));
+ input->setPasswordCharacter(QChar('Q'));
+ QCOMPARE(input->passwordCharacter(), QLatin1String("Q"));
+ QCOMPARE(input->text(), initial);
+ QCOMPARE(input->displayText(), QLatin1String("QQQQQQQQ"));
+ input->setEchoMode(QDeclarativeTextInput::PasswordEchoOnEdit);
+ QCOMPARE(input->text(), initial);
+ QCOMPARE(input->displayText(), QLatin1String("QQQQQQQQ"));
+ QTest::keyPress(canvas, Qt::Key_A);//Clearing previous entry is part of PasswordEchoOnEdit
+ QTest::keyRelease(canvas, Qt::Key_A, Qt::NoModifier ,10);
+ QCOMPARE(input->text(), QLatin1String("a"));
+ QCOMPARE(input->displayText(), QLatin1String("a"));
+ input->setFocus(false);
+ QCOMPARE(input->displayText(), QLatin1String("Q"));
}
void tst_qdeclarativetextinput::simulateKey(QDeclarativeView *view, int key)
@@ -683,6 +765,29 @@ void tst_qdeclarativetextinput::setHAlignClearCache()
QCOMPARE(input.nbPaint, 2);
}
+void tst_qdeclarativetextinput::focusOutClearSelection()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ QDeclarativeTextInput input;
+ QDeclarativeTextInput input2;
+ input.setText(QLatin1String("Hello world"));
+ input.setFocus(true);
+ scene.addItem(&input2);
+ scene.addItem(&input);
+ view.show();
+ QApplication::setActiveWindow(&view);
+ QTest::qWaitForWindowShown(&view);
+ input.setSelectionStart(2);
+ input.setSelectionEnd(5);
+ //The selection should work
+ QTRY_COMPARE(input.selectedText(), QLatin1String("llo"));
+ input2.setFocus(true);
+ QApplication::processEvents();
+ //The input lost the focus selection should be cleared
+ QTRY_COMPARE(input.selectedText(), QLatin1String(""));
+}
+
QTEST_MAIN(tst_qdeclarativetextinput)
#include "tst_qdeclarativetextinput.moc"
diff --git a/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
index b162739..42604d8 100644
--- a/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
+++ b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
@@ -5,3 +5,5 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativetimer.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
index 1dfec50..a08a91c 100644
--- a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
+++ b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
@@ -93,7 +93,7 @@ void tst_qdeclarativetimer::notRepeating()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; running: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; running: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
QVERIFY(timer->isRunning());
@@ -114,7 +114,7 @@ void tst_qdeclarativetimer::notRepeatingStart()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100 }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100 }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
QVERIFY(!timer->isRunning());
@@ -139,7 +139,7 @@ void tst_qdeclarativetimer::repeat()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; repeat: true; running: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
@@ -181,7 +181,7 @@ void tst_qdeclarativetimer::triggeredOnStart()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; running: true; triggeredOnStart: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; running: true; triggeredOnStart: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
QVERIFY(timer->triggeredOnStart());
@@ -216,7 +216,7 @@ void tst_qdeclarativetimer::triggeredOnStartRepeat()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; running: true; triggeredOnStart: true; repeat: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; running: true; triggeredOnStart: true; repeat: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
@@ -240,7 +240,7 @@ void tst_qdeclarativetimer::noTriggerIfNotRunning()
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
component.setData(QByteArray(
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
"Item { property bool ok: true\n"
"Timer { id: t1; interval: 100; repeat: true; running: true; onTriggered: if (!running) ok=false }"
"Timer { interval: 10; running: true; onTriggered: t1.running=false }"
@@ -258,7 +258,7 @@ void tst_qdeclarativetimer::changeDuration()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 200; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 200; repeat: true; running: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
@@ -294,7 +294,7 @@ void tst_qdeclarativetimer::restart()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 500; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 500; repeat: true; running: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.3.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.3.qml
index c82b533..d431b4a 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.3.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.3.qml
@@ -1,7 +1,7 @@
import Test 1.0
MyTypeObject {
- property var value
+ property variant value
rect: value
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingVariantCopy.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/bindingVariantCopy.qml
index 691a56c..3a48c8b 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingVariantCopy.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/bindingVariantCopy.qml
@@ -1,7 +1,7 @@
import Test 1.0
MyTypeObject {
- property var object
+ property variant object
object: MyTypeObject {
rect.x: 19
rect.y: 33
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml
index 05459f4..7c22775 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml
@@ -1,12 +1,11 @@
import Test 1.0
import Qt 4.6
+import "deletedObject.js" as JS
MyTypeObject {
- property var object
-
- Script { source: "deletedObject.js" }
+ property variant object
object: MyTypeObject {}
- Component.onCompleted: startup()
- onRunScript: afterDelete()
+ Component.onCompleted: JS.startup()
+ onRunScript: JS.afterDelete()
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/font_read.qml
index e1d1ce0..d73bb13 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/font_read.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/font_read.qml
@@ -13,6 +13,6 @@ MyTypeObject {
property int f_capitalization: font.capitalization
property real f_letterSpacing: font.letterSpacing
property real f_wordSpacing: font.wordSpacing;
- property var copy: font
+ property variant copy: font
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.4.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.4.qml
new file mode 100644
index 0000000..2ec69d7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.4.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ font.pointSize: 19
+ font.pixelSize: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml
new file mode 100644
index 0000000..4c12f21
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+import Test 1.0
+
+Item {
+ MyTypeObject {
+ objectName: "object1"
+ font.pixelSize: 19
+ }
+ MyTypeObject {
+ objectName: "object2"
+ font.pointSize: 14
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/point_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/point_read.qml
index 3e67de6..4bb6c53 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/point_read.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/point_read.qml
@@ -3,5 +3,5 @@ import Test 1.0
MyTypeObject {
property int p_x: point.x
property int p_y: point.y
- property var copy: point
+ property variant copy: point
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_read.qml
index d845a5b..0eab6da 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_read.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_read.qml
@@ -3,6 +3,6 @@ import Test 1.0
MyTypeObject {
property real p_x: pointf.x
property real p_y: pointf.y
- property var copy: pointf
+ property variant copy: pointf
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rect_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/rect_read.qml
index 5364431..c3b37a7 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/rect_read.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/rect_read.qml
@@ -5,6 +5,6 @@ MyTypeObject {
property int r_y: rect.y
property int r_width: rect.width
property int r_height: rect.height
- property var copy: rect
+ property variant copy: rect
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_read.qml
index aeb9f41..6ff3ce3 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_read.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_read.qml
@@ -5,6 +5,6 @@ MyTypeObject {
property real r_y: rectf.y
property real r_width: rectf.width
property real r_height: rectf.height
- property var copy: rectf
+ property variant copy: rectf
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml
new file mode 100644
index 0000000..185e7ba
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml
@@ -0,0 +1,17 @@
+import Test 1.0
+import Qt 4.6
+
+MyTypeObject {
+ property bool test1: false;
+ property bool test2: false;
+
+ Component.onCompleted: {
+ var a = method();
+
+ test1 = (a.width == 13)
+ test2 = (a.height == 14)
+
+ size = a;
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/scriptVariantCopy.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/scriptVariantCopy.qml
index 29157e8..42fccfa 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/scriptVariantCopy.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/scriptVariantCopy.qml
@@ -1,7 +1,7 @@
import Test 1.0
MyTypeObject {
- property var object
+ property variant object
object: MyTypeObject {
rect.x: 19
rect.y: 33
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/size_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/size_read.qml
index 86dba03..a49fd9f 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/size_read.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/size_read.qml
@@ -3,6 +3,6 @@ import Test 1.0
MyTypeObject {
property int s_width: size.width
property int s_height: size.height
- property var copy: size
+ property variant copy: size
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_read.qml
index c6f34e4..96cd425 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_read.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_read.qml
@@ -3,7 +3,7 @@ import Test 1.0
MyTypeObject {
property real s_width: sizef.width
property real s_height: sizef.height
- property var copy: sizef
+ property variant copy: sizef
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_read.qml
new file mode 100644
index 0000000..7f708a0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_read.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ property int s_width: sizereadonly.width
+ property int s_height: sizereadonly.height
+ property variant copy: sizereadonly
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror.qml
new file mode 100644
index 0000000..3254557
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ sizereadonly: "13x88"
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror2.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror2.qml
new file mode 100644
index 0000000..656d718
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror2.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ sizereadonly.width: if (true) 13
+ sizereadonly.height: if (true) 88
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror3.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror3.qml
new file mode 100644
index 0000000..b8e3f0d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror3.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ sizereadonly.width: 13
+ sizereadonly.height: 88
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml
new file mode 100644
index 0000000..8ae2ef8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+import Qt 4.6
+
+MyTypeObject {
+ Component.onCompleted: {
+ sizereadonly.width = 13;
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_read.qml
index abdf9f0..f1e876d 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_read.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_read.qml
@@ -4,6 +4,6 @@ MyTypeObject {
property real v_x: vector.x
property real v_y: vector.y
property real v_z: vector.z
- property var copy: vector
+ property variant copy: vector
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
index 028fc57..d9f1c13 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
+++ b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
@@ -8,3 +8,6 @@ SOURCES += tst_qdeclarativevaluetypes.cpp \
testtypes.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
index 0ad8449..dd13429 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
+++ b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
@@ -63,6 +63,7 @@ class MyTypeObject : public QObject
Q_PROPERTY(QPointF pointf READ pointf WRITE setPointf NOTIFY changed)
Q_PROPERTY(QSize size READ size WRITE setSize NOTIFY changed)
Q_PROPERTY(QSizeF sizef READ sizef WRITE setSizef NOTIFY changed)
+ Q_PROPERTY(QSize sizereadonly READ size NOTIFY changed)
Q_PROPERTY(QRect rect READ rect WRITE setRect NOTIFY changed)
Q_PROPERTY(QRectF rectf READ rectf WRITE setRectf NOTIFY changed)
Q_PROPERTY(QVector3D vector READ vector WRITE setVector NOTIFY changed)
@@ -128,12 +129,16 @@ public:
signals:
void changed();
void runScript();
+
+public slots:
+ QSize method() { return QSize(13, 14); }
};
QML_DECLARE_TYPE(MyTypeObject);
class MyConstantValueSource : public QObject, public QDeclarativePropertyValueSource
{
Q_OBJECT
+ Q_INTERFACES(QDeclarativePropertyValueSource)
public:
virtual void setTarget(const QDeclarativeProperty &p) { p.write(3345); }
};
@@ -142,6 +147,7 @@ QML_DECLARE_TYPE(MyConstantValueSource);
class MyOffsetValueInterceptor : public QObject, public QDeclarativePropertyValueInterceptor
{
Q_OBJECT
+ Q_INTERFACES(QDeclarativePropertyValueInterceptor)
public:
virtual void setTarget(const QDeclarativeProperty &p) { prop = p; }
virtual void write(const QVariant &value) { QDeclarativePropertyPrivate::write(prop, value.toInt() + 13, QDeclarativePropertyPrivate::BypassInterceptor); }
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
index 4e254eb..b733b10 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
+++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
@@ -59,6 +59,7 @@ private slots:
void pointf();
void size();
void sizef();
+ void sizereadonly();
void rect();
void rectf();
void vector3d();
@@ -78,6 +79,7 @@ private slots:
void cppClasses();
void enums();
void conflictingBindings();
+ void returnValues();
private:
QDeclarativeEngine engine;
@@ -193,6 +195,50 @@ void tst_qdeclarativevaluetypes::sizef()
}
}
+void tst_qdeclarativevaluetypes::sizereadonly()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("sizereadonly_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("s_width").toInt(), 1912);
+ QCOMPARE(object->property("s_height").toInt(), 1913);
+ QCOMPARE(object->property("copy"), QVariant(QSize(1912, 1913)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("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, TEST_FILE("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, TEST_FILE("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, TEST_FILE("sizereadonly_writeerror4.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object);
+
+ QCOMPARE(object->property("sizereadonly").toSize(), QSize(1912, 1913));
+
+ delete object;
+ }
+}
+
void tst_qdeclarativevaluetypes::rect()
{
{
@@ -352,6 +398,30 @@ void tst_qdeclarativevaluetypes::font()
delete object;
}
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("font_write.4.qml"));
+ QTest::ignoreMessage(QtWarningMsg, "Both point size and pixel size set. Using pixel size. ");
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->font().pixelSize(), 10);
+
+ delete object;
+ }
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("font_write.5.qml"));
+ QObject *object = qobject_cast<QObject *>(component.create());
+ QVERIFY(object != 0);
+ MyTypeObject *object1 = object->findChild<MyTypeObject *>("object1");
+ QVERIFY(object1 != 0);
+ MyTypeObject *object2 = object->findChild<MyTypeObject *>("object2");
+ QVERIFY(object2 != 0);
+
+ QCOMPARE(object1->font().pixelSize(), 19);
+ QCOMPARE(object2->font().pointSize(), 14);
+
+ delete object;
+ }
}
// Test bindings can write to value types
@@ -694,6 +764,19 @@ void tst_qdeclarativevaluetypes::conflictingBindings()
}
}
+void tst_qdeclarativevaluetypes::returnValues()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("returnValues.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toBool(), true);
+ QCOMPARE(object->property("test2").toBool(), true);
+ QCOMPARE(object->property("size").toSize(), QSize(13, 14));
+
+ delete object;
+}
+
QTEST_MAIN(tst_qdeclarativevaluetypes)
#include "tst_qdeclarativevaluetypes.moc"
diff --git a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
index 20173c6..956272f 100644
--- a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
+++ b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
@@ -7,3 +7,5 @@ SOURCES += tst_qdeclarativewebview.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
index ce389f3..beabf86 100644
--- a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
+++ b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
@@ -453,7 +453,7 @@ void tst_qdeclarativewebview::newWindowComponent()
QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
QDeclarativeComponent substituteComponent(&engine);
- substituteComponent.setData("import Qt 4.6; WebView { objectName: 'newWebView'; url: 'basic.html'; }", QUrl::fromLocalFile(""));
+ substituteComponent.setData("import Qt 4.7; WebView { objectName: 'newWebView'; url: 'basic.html'; }", QUrl::fromLocalFile(""));
QSignalSpy newWindowComponentSpy(wv, SIGNAL(newWindowComponentChanged()));
wv->setProperty("newWindowComponent", QVariant::fromValue(&substituteComponent));
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml b/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml
index 1fce155..ca989f8 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml
+++ b/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml
@@ -4,7 +4,7 @@ WorkerScript {
id: worker
source: "script.js"
- property var response
+ property variant response
signal done()
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
index e2b31c7..2e3da4d 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
+++ b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
@@ -6,3 +6,6 @@ SOURCES += tst_qdeclarativeworkerscript.cpp
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
index fe2dac2..a1dae24 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
+++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
@@ -85,7 +85,7 @@ void tst_QDeclarativeWorkerScript::source()
QUrl source = QUrl::fromLocalFile(SRCDIR "/data/worker.qml");
QDeclarativeComponent component(&m_engine);
- component.setData("import Qt 4.6\nWorkerScript { source: '" + source.toString().toUtf8() + "'; }", QUrl());
+ component.setData("import Qt 4.7\nWorkerScript { source: '" + source.toString().toUtf8() + "'; }", QUrl());
QDeclarativeWorkerScript *item = qobject_cast<QDeclarativeWorkerScript*>(component.create());
QVERIFY(item != 0);
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect
index f43e043..4d21122 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect
@@ -1,9 +1,9 @@
PUT /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Content-Type: text/plain;charset=UTF-8
Content-Length: 9
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml
index d7b9266..729793e 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml
@@ -13,6 +13,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("GET", urlDummy);
x.setRequestHeader("Test-header", "TestValue");
+ x.setRequestHeader("Accept-Language", "en-US");
x.send();
x.onreadystatechange = function() {
@@ -35,6 +36,7 @@ QtObject {
}
}
x.open("PUT", url);
+ x.setRequestHeader("Accept-Language", "en-US");
x.send("Test Data");
}
}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml
index 72a45e7..33ca020 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml
@@ -21,10 +21,12 @@ QtObject {
readyState = true;
x.open("PUT", url);
+ x.setRequestHeader("Accept-Language", "en-US");
x.abort();
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml
index aa78cde..c0957ed 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml
@@ -21,6 +21,7 @@ QtObject {
readyState = true;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml
index 9049fc7..0b4badc 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml
@@ -4,55 +4,53 @@ QtObject {
property bool xmlTest: false
property bool dataOK: false
- Script {
- function checkAttr(documentElement, attr)
- {
- if (attr == null)
- return;
+ function checkAttr(documentElement, attr)
+ {
+ if (attr == null)
+ return;
- if (attr.name != "attr")
- return;
+ if (attr.name != "attr")
+ return;
- if (attr.value != "myvalue")
- return;
+ if (attr.value != "myvalue")
+ return;
- if (attr.ownerElement.tagName != documentElement.tagName)
- return;
+ if (attr.ownerElement.tagName != documentElement.tagName)
+ return;
- if (attr.nodeName != "attr")
- return;
+ if (attr.nodeName != "attr")
+ return;
- if (attr.nodeValue != "myvalue")
- return;
+ if (attr.nodeValue != "myvalue")
+ return;
- if (attr.nodeType != 2)
- return;
+ if (attr.nodeType != 2)
+ return;
- if (attr.childNodes.length != 0)
- return;
+ if (attr.childNodes.length != 0)
+ return;
- if (attr.firstChild != null)
- return;
+ if (attr.firstChild != null)
+ return;
- if (attr.lastChild != null)
- return;
+ if (attr.lastChild != null)
+ return;
- if (attr.previousSibling != null)
- return;
+ if (attr.previousSibling != null)
+ return;
- if (attr.nextSibling != null)
- return;
+ if (attr.nextSibling != null)
+ return;
- if (attr.attributes != null)
- return;
+ if (attr.attributes != null)
+ return;
- xmlTest = true;
- }
+ xmlTest = true;
+ }
- function checkXML(document)
- {
- checkAttr(document.documentElement, document.documentElement.attributes[0]);
- }
+ function checkXML(document)
+ {
+ checkAttr(document.documentElement, document.documentElement.attributes[0]);
}
Component.onCompleted: {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml
index b2d0209..928e514 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml
@@ -4,108 +4,106 @@ QtObject {
property bool xmlTest: false
property bool dataOK: false
- Script {
- function checkCData(text, whitespacetext)
- {
- // This is essentially a copy of text.qml/checkText()
+ function checkCData(text, whitespacetext)
+ {
+ // This is essentially a copy of text.qml/checkText()
- if (text == null)
- return;
+ if (text == null)
+ return;
- if (text.nodeName != "#cdata-section")
- return;
+ if (text.nodeName != "#cdata-section")
+ return;
- if (text.nodeValue != "Hello world!")
- return;
+ if (text.nodeValue != "Hello world!")
+ return;
- if (text.nodeType != 4)
- return;
+ if (text.nodeType != 4)
+ return;
- if (text.parentNode.nodeName != "item")
- return;
+ if (text.parentNode.nodeName != "item")
+ return;
- if (text.childNodes.length != 0)
- return;
+ if (text.childNodes.length != 0)
+ return;
- if (text.firstChild != null)
- return;
+ if (text.firstChild != null)
+ return;
- if (text.lastChild != null)
- return;
+ if (text.lastChild != null)
+ return;
- if (text.previousSibling != null)
- return;
+ if (text.previousSibling != null)
+ return;
- if (text.nextSibling != null)
- return;
+ if (text.nextSibling != null)
+ return;
- if (text.attributes != null)
- return;
+ if (text.attributes != null)
+ return;
- if (text.wholeText != "Hello world!")
- return;
+ if (text.wholeText != "Hello world!")
+ return;
- if (text.data != "Hello world!")
- return;
+ if (text.data != "Hello world!")
+ return;
- if (text.length != 12)
- return;
+ if (text.length != 12)
+ return;
- if (text.isElementContentWhitespace != false)
- return;
+ if (text.isElementContentWhitespace != false)
+ return;
- if (whitespacetext.nodeName != "#cdata-section")
- return;
+ if (whitespacetext.nodeName != "#cdata-section")
+ return;
- if (whitespacetext.nodeValue != " ")
- return;
+ if (whitespacetext.nodeValue != " ")
+ return;
- if (whitespacetext.nodeType != 4)
- return;
+ if (whitespacetext.nodeType != 4)
+ return;
- if (whitespacetext.parentNode.nodeName != "item")
- return;
+ if (whitespacetext.parentNode.nodeName != "item")
+ return;
- if (whitespacetext.childNodes.length != 0)
- return;
+ if (whitespacetext.childNodes.length != 0)
+ return;
- if (whitespacetext.firstChild != null)
- return;
+ if (whitespacetext.firstChild != null)
+ return;
- if (whitespacetext.lastChild != null)
- return;
+ if (whitespacetext.lastChild != null)
+ return;
- if (whitespacetext.previousSibling != null)
- return;
+ if (whitespacetext.previousSibling != null)
+ return;
- if (whitespacetext.nextSibling != null)
- return;
+ if (whitespacetext.nextSibling != null)
+ return;
- if (whitespacetext.attributes != null)
- return;
+ if (whitespacetext.attributes != null)
+ return;
- if (whitespacetext.wholeText != " ")
- return;
+ if (whitespacetext.wholeText != " ")
+ return;
- if (whitespacetext.data != " ")
- return;
+ if (whitespacetext.data != " ")
+ return;
- if (whitespacetext.length != 3)
- return;
+ if (whitespacetext.length != 3)
+ return;
- if (whitespacetext.isElementContentWhitespace != true)
- return;
+ if (whitespacetext.isElementContentWhitespace != true)
+ return;
- xmlTest = true;
- }
+ xmlTest = true;
+ }
- function checkXML(document)
- {
- checkCData(document.documentElement.childNodes[0].childNodes[0],
- document.documentElement.childNodes[1].childNodes[0]);
+ function checkXML(document)
+ {
+ checkCData(document.documentElement.childNodes[0].childNodes[0],
+ document.documentElement.childNodes[1].childNodes[0]);
- }
}
Component.onCompleted: {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml
index e372361..682ea9f 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml
@@ -4,34 +4,32 @@ QtObject {
property bool xmlTest: false
property bool dataOK: false
- Script {
- function checkXML(document)
- {
- if (document.xmlVersion != "1.0")
- return;
+ function checkXML(document)
+ {
+ if (document.xmlVersion != "1.0")
+ return;
- if (document.xmlEncoding != "UTF-8")
- return;
+ if (document.xmlEncoding != "UTF-8")
+ return;
- if (document.xmlStandalone != true)
- return;
+ if (document.xmlStandalone != true)
+ return;
- if (document.documentElement == null)
- return;
+ if (document.documentElement == null)
+ return;
- if (document.nodeName != "#document")
- return;
+ if (document.nodeName != "#document")
+ return;
- if (document.nodeValue != null)
- return;
+ if (document.nodeValue != null)
+ return;
- if (document.parentNode != null)
- return;
+ if (document.parentNode != null)
+ return;
- // ### Test other node properties
- // ### test encoding (what is a valid qt encoding?)
- xmlTest = true;
- }
+ // ### Test other node properties
+ // ### test encoding (what is a valid qt encoding?)
+ xmlTest = true;
}
Component.onCompleted: {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml
index 78c0374..200214f 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml
@@ -4,122 +4,120 @@ QtObject {
property bool xmlTest: false
property bool dataOK: false
- Script {
- function checkElement(e, person, fruit)
- {
- if (e.tagName != "root")
- return;
+ function checkElement(e, person, fruit)
+ {
+ if (e.tagName != "root")
+ return;
- if (e.nodeName != "root")
- return;
+ if (e.nodeName != "root")
+ return;
- if (e.nodeValue != null)
- return;
+ if (e.nodeValue != null)
+ return;
- if (e.nodeType != 1)
- return;
+ if (e.nodeType != 1)
+ return;
- var childTagNames = [ "person", "fruit" ];
+ var childTagNames = [ "person", "fruit" ];
- if (e.childNodes.length != childTagNames.length)
- return;
+ if (e.childNodes.length != childTagNames.length)
+ return;
- for (var ii = 0; ii < childTagNames.length; ++ii) {
- if (e.childNodes[ii].tagName != childTagNames[ii])
- return;
- }
-
- if (e.childNodes[childTagNames.length + 1] != null)
+ for (var ii = 0; ii < childTagNames.length; ++ii) {
+ if (e.childNodes[ii].tagName != childTagNames[ii])
return;
+ }
- // Check writing fails
- e.childNodes[0] = null;
- if (e.childNodes[0] == null)
- return;
+ if (e.childNodes[childTagNames.length + 1] != null)
+ return;
- e.childNodes[10] = 10;
- if (e.childNodes[10] != null)
- return;
+ // Check writing fails
+ e.childNodes[0] = null;
+ if (e.childNodes[0] == null)
+ return;
- if (e.firstChild.tagName != e.childNodes[0].tagName)
- return;
+ e.childNodes[10] = 10;
+ if (e.childNodes[10] != null)
+ return;
- if (e.lastChild.tagName != e.childNodes[1].tagName)
- return;
+ if (e.firstChild.tagName != e.childNodes[0].tagName)
+ return;
- if (e.previousSibling != null)
- return;
+ if (e.lastChild.tagName != e.childNodes[1].tagName)
+ return;
- if (e.nextSibling != null)
- return;
+ if (e.previousSibling != null)
+ return;
- if (e.attributes == null)
- return;
+ if (e.nextSibling != null)
+ return;
- if (e.attributes.length != 2)
- return;
+ if (e.attributes == null)
+ return;
- var attr1 = e.attributes["attr"];
- if (attr1.nodeValue != "value")
- return;
+ if (e.attributes.length != 2)
+ return;
- var attrIdx = e.attributes[0];
- if (attrIdx.nodeValue != "value")
- return;
+ var attr1 = e.attributes["attr"];
+ if (attr1.nodeValue != "value")
+ return;
- var attr2 = e.attributes["attr2"];
- if (attr2.nodeValue != "value2")
- return;
+ var attrIdx = e.attributes[0];
+ if (attrIdx.nodeValue != "value")
+ return;
- var attr3 = e.attributes["attr3"];
- if (attr3 != null)
- return;
+ var attr2 = e.attributes["attr2"];
+ if (attr2.nodeValue != "value2")
+ return;
- var attrIdx2 = e.attributes[11];
- if (attrIdx2 != null)
- return;
+ var attr3 = e.attributes["attr3"];
+ if (attr3 != null)
+ return;
- // Check writing fails
- e.attributes[0] = null;
- if (e.attributes[0] == null)
- return;
+ var attrIdx2 = e.attributes[11];
+ if (attrIdx2 != null)
+ return;
- e.attributes["attr"] = null;
- if (e.attributes["attr"] == null)
- return;
+ // Check writing fails
+ e.attributes[0] = null;
+ if (e.attributes[0] == null)
+ return;
- e.attributes["attr3"] = 10;
- if (e.attributes["attr3"] != null)
- return;
+ e.attributes["attr"] = null;
+ if (e.attributes["attr"] == null)
+ return;
- // Check person and fruit sub elements
- if (person.parentNode.nodeName != "root")
- return;
+ e.attributes["attr3"] = 10;
+ if (e.attributes["attr3"] != null)
+ return;
- if (person.previousSibling != null)
- return;
+ // Check person and fruit sub elements
+ if (person.parentNode.nodeName != "root")
+ return;
- if (person.nextSibling.nodeName != "fruit")
- return;
+ if (person.previousSibling != null)
+ return;
- if (fruit.parentNode.nodeName != "root")
- return;
+ if (person.nextSibling.nodeName != "fruit")
+ return;
- if (fruit.previousSibling.nodeName != "person")
- return;
+ if (fruit.parentNode.nodeName != "root")
+ return;
- if (fruit.nextSibling != null)
- return;
+ if (fruit.previousSibling.nodeName != "person")
+ return;
- xmlTest = true;
- }
+ if (fruit.nextSibling != null)
+ return;
- function checkXML(document)
- {
- checkElement(document.documentElement,
- document.documentElement.childNodes[0],
- document.documentElement.childNodes[1]);
- }
+ xmlTest = true;
+ }
+
+ function checkXML(document)
+ {
+ checkElement(document.documentElement,
+ document.documentElement.childNodes[0],
+ document.documentElement.childNodes[1]);
}
Component.onCompleted: {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml
index 8d67fad..9096999 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml
@@ -31,6 +31,7 @@ QtObject {
readyState = true;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect
index a740c79..c6cad70 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect
@@ -1,7 +1,7 @@
GET /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml
index 2f949e1..7a65e25 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml
@@ -37,6 +37,7 @@ QtObject {
readyState = true;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml
index c06bae3..72fb9d7 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml
@@ -20,6 +20,7 @@ QtObject {
readyState = true;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language","en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect
index a740c79..c6cad70 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect
@@ -1,7 +1,7 @@
GET /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml
index 19e37fa..b07f8e7 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml
@@ -20,6 +20,7 @@ QtObject {
readyState = true;
x.open("GET", url, true, "username", "password");
+ x.setRequestHeader("Accept-Language","en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
index 4bb3a7a..9fa4847 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
@@ -22,6 +22,7 @@ QtObject {
unsent = (x.responseText == "");
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
opened = (x.responseText == "");
@@ -39,6 +40,7 @@ QtObject {
dataOK = (x.responseText == expectedText);
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
reset = (x.responseText == "");
}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml
index 0bad7df..a9ef3e8 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml
@@ -7,6 +7,7 @@ QtObject {
Component.onCompleted: {
var x = new XMLHttpRequest;
x.open("GET", "testdocument.html");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect
index 81dd4a0..2effbdc 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect
@@ -1,9 +1,9 @@
POST /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Content-Type: text/plain;charset=UTF-8
Content-Length: 12
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml
index 03543a9..171e0b1 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml
@@ -8,6 +8,7 @@ QtObject {
Component.onCompleted: {
var x = new XMLHttpRequest;
x.open("POST", url);
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml
index 79a27b6..09b742b 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("POST", url);
x.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml
index e048769..8786917 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("POST", url);
x.setRequestHeader("Content-Type", "text/plain;charset=latin1");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect
index 8fcf3ac..8336860 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect
@@ -1,9 +1,9 @@
POST /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Content-Type: charset=UTF-8;text/plain
Content-Length: 12
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml
index 7ab0b27..6789480 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("POST", url);
x.setRequestHeader("Content-Type", "charset=UTF-8;text/plain");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml
index 29bf2c2..08d999d 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("POST", url);
x.setRequestHeader("Content-Type", "charset=latin1;text/plain");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect
index 97e6fac..4f10bbc 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect
@@ -1,9 +1,9 @@
PUT /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Content-Type: text/plain;charset=UTF-8
Content-Length: 12
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml
index 135f45c..e047fc8 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml
@@ -8,6 +8,7 @@ QtObject {
Component.onCompleted: {
var x = new XMLHttpRequest;
x.open("PUT", url);
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml
index 4a09527..ba0db25 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("POST", url);
x.setRequestHeader("Content-Type", "text/plain");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml
index dd5fa46..ddf520e 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml
@@ -9,6 +9,7 @@ QtObject {
Component.onCompleted: {
var x = new XMLHttpRequest;
x.open(reqType, url);
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect
index a740c79..c6cad70 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect
@@ -1,7 +1,7 @@
GET /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect
index 991bd59..74a9798 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect
@@ -1,7 +1,7 @@
HEAD /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect
index 4600f2a..7b8e260 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect
@@ -1,9 +1,9 @@
GET /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
TEST-HEADER: value
TEST-HEADER2: value,value2
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml
index b0723aa..61eea33 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language","en-US");
x.setRequestHeader("Test-header", "value");
x.setRequestHeader("Test-header2", "value");
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml
index bf31eca..b22b239 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml
@@ -21,6 +21,7 @@ QtObject {
readyState = true;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language","en-US");
x.setRequestHeader(header, "Value");
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml
index c2bbc6e..666c791 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml
@@ -10,6 +10,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect
index a740c79..c6cad70 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect
@@ -1,7 +1,7 @@
GET /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
index 04202c4..c903e12 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
@@ -27,6 +27,7 @@ QtObject {
}
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
try {
var a = x.status;
@@ -54,6 +55,7 @@ QtObject {
}
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
try {
var a = x.status;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml
index 8becc3b..a3b98be 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml
@@ -27,6 +27,7 @@ QtObject {
}
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
try {
var a = x.statusText;
@@ -54,6 +55,7 @@ QtObject {
}
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
try {
var a = x.statusText;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml
index 4615a07..0eb31d5 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml
@@ -4,105 +4,103 @@ QtObject {
property bool xmlTest: false
property bool dataOK: false
- Script {
- function checkText(text, whitespacetext)
- {
- if (text == null)
- return;
+ function checkText(text, whitespacetext)
+ {
+ if (text == null)
+ return;
- if (text.nodeName != "#text")
- return;
+ if (text.nodeName != "#text")
+ return;
- if (text.nodeValue != "Hello world!")
- return;
+ if (text.nodeValue != "Hello world!")
+ return;
- if (text.nodeType != 3)
- return;
+ if (text.nodeType != 3)
+ return;
- if (text.parentNode.nodeName != "item")
- return;
+ if (text.parentNode.nodeName != "item")
+ return;
- if (text.childNodes.length != 0)
- return;
+ if (text.childNodes.length != 0)
+ return;
- if (text.firstChild != null)
- return;
+ if (text.firstChild != null)
+ return;
- if (text.lastChild != null)
- return;
+ if (text.lastChild != null)
+ return;
- if (text.previousSibling != null)
- return;
+ if (text.previousSibling != null)
+ return;
- if (text.nextSibling != null)
- return;
+ if (text.nextSibling != null)
+ return;
- if (text.attributes != null)
- return;
+ if (text.attributes != null)
+ return;
- if (text.wholeText != "Hello world!")
- return;
+ if (text.wholeText != "Hello world!")
+ return;
- if (text.data != "Hello world!")
- return;
+ if (text.data != "Hello world!")
+ return;
- if (text.length != 12)
- return;
+ if (text.length != 12)
+ return;
- if (text.isElementContentWhitespace != false)
- return;
+ if (text.isElementContentWhitespace != false)
+ return;
- if (whitespacetext.nodeName != "#text")
- return;
+ if (whitespacetext.nodeName != "#text")
+ return;
- if (whitespacetext.nodeValue != " ")
- return;
+ if (whitespacetext.nodeValue != " ")
+ return;
- if (whitespacetext.nodeType != 3)
- return;
+ if (whitespacetext.nodeType != 3)
+ return;
- if (whitespacetext.parentNode.nodeName != "item")
- return;
+ if (whitespacetext.parentNode.nodeName != "item")
+ return;
- if (whitespacetext.childNodes.length != 0)
- return;
+ if (whitespacetext.childNodes.length != 0)
+ return;
- if (whitespacetext.firstChild != null)
- return;
+ if (whitespacetext.firstChild != null)
+ return;
- if (whitespacetext.lastChild != null)
- return;
+ if (whitespacetext.lastChild != null)
+ return;
- if (whitespacetext.previousSibling != null)
- return;
+ if (whitespacetext.previousSibling != null)
+ return;
- if (whitespacetext.nextSibling != null)
- return;
+ if (whitespacetext.nextSibling != null)
+ return;
- if (whitespacetext.attributes != null)
- return;
+ if (whitespacetext.attributes != null)
+ return;
- if (whitespacetext.wholeText != " ")
- return;
+ if (whitespacetext.wholeText != " ")
+ return;
- if (whitespacetext.data != " ")
- return;
+ if (whitespacetext.data != " ")
+ return;
- if (whitespacetext.length != 3)
- return;
+ if (whitespacetext.length != 3)
+ return;
- if (whitespacetext.isElementContentWhitespace != true)
- return;
+ if (whitespacetext.isElementContentWhitespace != true)
+ return;
- xmlTest = true;
- }
+ xmlTest = true;
+ }
- function checkXML(document)
- {
- checkText(document.documentElement.childNodes[0].childNodes[0],
- document.documentElement.childNodes[1].childNodes[0]);
+ function checkXML(document)
+ {
+ checkText(document.documentElement.childNodes[0].childNodes[0],
+ document.documentElement.childNodes[1].childNodes[0]);
- }
}
Component.onCompleted: {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
index 7bc92af..160300e 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
@@ -11,3 +11,6 @@ SOURCES += tst_qdeclarativexmlhttprequest.cpp \
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
index 13ed959..1d26f2c 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
@@ -55,12 +55,6 @@ public:
tst_qdeclarativexmlhttprequest() {}
private slots:
- void initTestCase() {
- if (QLocale::system().name().replace(QChar::fromAscii('_'),QChar::fromAscii('-')) != QLatin1String("en-US")) {
- qWarning() << "Test will fail unless LANG is en_US";
- }
- }
-
void domExceptionCodes();
void callbackException();
void callbackException_data();
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
index 88832dc..8c5052a 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
@@ -9,3 +9,6 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativexmllistmodel.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
index 74da79e..cf7e357 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
@@ -320,7 +320,21 @@ void tst_qdeclarativexmllistmodel::source()
QCOMPARE(model->progress(), qreal(0.0));
QTRY_COMPARE(spy.count(), 1); spy.clear();
QCOMPARE(model->status(), QDeclarativeXmlListModel::Loading);
- QTRY_COMPARE(spy.count(), 1); spy.clear();
+
+ QEventLoop loop;
+ QTimer timer;
+ timer.setSingleShot(true);
+ connect(model, SIGNAL(statusChanged(QDeclarativeXmlListModel::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");
+ } else {
+ QCOMPARE(spy.count(), 1); spy.clear();
+ }
+
QCOMPARE(model->status(), status);
QCOMPARE(model->count(), count);
if (status == QDeclarativeXmlListModel::Ready)
diff --git a/tests/auto/declarative/qmetaobjectbuilder/qmetaobjectbuilder.pro b/tests/auto/declarative/qmetaobjectbuilder/qmetaobjectbuilder.pro
index 94ffe4b..988177e 100644
--- a/tests/auto/declarative/qmetaobjectbuilder/qmetaobjectbuilder.pro
+++ b/tests/auto/declarative/qmetaobjectbuilder/qmetaobjectbuilder.pro
@@ -5,3 +5,4 @@ macx:CONFIG -= app_bundle
SOURCES += \
tst_qmetaobjectbuilder.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml b/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml
index f6c033f..7ccba10 100644
--- a/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml
+++ b/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml
@@ -63,8 +63,9 @@ Rectangle {
Transition {
from: "*"; to: "*"
SequentialAnimation {
- ParentAction{}
- NumberAnimation { properties: "x,y,width"; easing.type: "InOutQuad" }
+ ParentAnimation{
+ NumberAnimation { properties: "x,y,width"; easing.type: "InOutQuad" }
+ }
}
}
]
diff --git a/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation.qml b/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml
index f205ae8..f205ae8 100644
--- a/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation.qml
+++ b/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml
diff --git a/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.0.png b/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.0.png
index e6ea16d..e6ea16d 100644
--- a/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.0.png
+++ b/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.1.png b/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.1.png
index b75ba61..b75ba61 100644
--- a/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.1.png
+++ b/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.2.png b/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.2.png
index 4320f6f..4320f6f 100644
--- a/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.2.png
+++ b/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.qml b/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.qml
index 4d0959a..4ab94f3 100644
--- a/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation.qml
+++ b/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.qml
@@ -258,7 +258,7 @@ VisualTest {
}
Frame {
msec: 960
- image: "colorAnimation.0.png"
+ image: "colorAnimation-visual.0.png"
}
Frame {
msec: 976
@@ -270,7 +270,7 @@ VisualTest {
}
Frame {
msec: 1008
- hash: "243dbffcf416926242bbcb7348974c4c"
+ hash: "e0f53c5605116a30d9bf3c031c63d958"
}
Frame {
msec: 1024
@@ -370,7 +370,7 @@ VisualTest {
}
Frame {
msec: 1408
- hash: "7178bfe86fd2fd513218b33760460f8d"
+ hash: "45770fe0d61c485c13992d0f98b2a3ba"
}
Frame {
msec: 1424
@@ -470,7 +470,7 @@ VisualTest {
}
Frame {
msec: 1808
- hash: "8593a81be812edf54ec94da8ae9c1314"
+ hash: "a2fa71b4147372175774250501b6625e"
}
Frame {
msec: 1824
@@ -498,7 +498,7 @@ VisualTest {
}
Frame {
msec: 1920
- image: "colorAnimation.1.png"
+ image: "colorAnimation-visual.1.png"
}
Frame {
msec: 1936
@@ -570,7 +570,7 @@ VisualTest {
}
Frame {
msec: 2208
- hash: "e5dc5450604a491cc24a0dcf5c278b58"
+ hash: "10d46d2862e333e5136b1c046dabb33b"
}
Frame {
msec: 2224
@@ -738,7 +738,7 @@ VisualTest {
}
Frame {
msec: 2880
- image: "colorAnimation.2.png"
+ image: "colorAnimation-visual.2.png"
}
Frame {
msec: 2896
diff --git a/tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation.qml b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation-visual.qml
index 5f5b8fc..5f5b8fc 100644
--- a/tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation.qml
+++ b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation-visual.qml
diff --git a/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation.qml b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml
index 1980b91..ba606f4 100644
--- a/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation.qml
+++ b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml
@@ -1,5 +1,13 @@
import Qt 4.6
+/*
+ This test verifies that a single animation animating two properties is visually the same as two
+ animations in a parallel group animating the same properties. Visually, you should see a red
+ rectangle at 0,0 stretching from the top of the window to the bottom. This rect will be moved to
+ the right side of the window while turning purple. If the bottom half is visually different
+ than the top half, there is a problem.
+*/
+
Rectangle {
width: 400; height: 200
Rectangle {
diff --git a/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.0.png b/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.0.png
index 64d6b06..64d6b06 100644
--- a/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.0.png
+++ b/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.1.png b/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.1.png
index f7fce15..f7fce15 100644
--- a/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.1.png
+++ b/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.2.png b/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.2.png
index 3080df5..3080df5 100644
--- a/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.2.png
+++ b/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.qml b/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.qml
index 7c8c233..0a9057e 100644
--- a/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction.qml
+++ b/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.qml
@@ -242,7 +242,7 @@ VisualTest {
}
Frame {
msec: 960
- image: "propertyAction.0.png"
+ image: "propertyAction-visual.0.png"
}
Frame {
msec: 976
@@ -490,7 +490,7 @@ VisualTest {
}
Frame {
msec: 1920
- image: "propertyAction.1.png"
+ image: "propertyAction-visual.1.png"
}
Frame {
msec: 1936
@@ -738,7 +738,7 @@ VisualTest {
}
Frame {
msec: 2880
- image: "propertyAction.2.png"
+ image: "propertyAction-visual.2.png"
}
Frame {
msec: 2896
@@ -810,7 +810,7 @@ VisualTest {
}
Frame {
msec: 3168
- hash: "dcc79277fdb8966e5a3f2ed1b2fc4292"
+ hash: "38b7e5894cf49a19ac055264d6447b9f"
}
Frame {
msec: 3184
diff --git a/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction.qml b/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml
index e18e770..5651b87 100644
--- a/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction.qml
+++ b/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml
@@ -1,5 +1,12 @@
import Qt 4.6
+/*
+This test starts with a red rectangle at 0,0. It should animate a color change to blue,
+then jump 50 pixels right, and then animate moving 50 pixels down. Afer this it should
+do an exact visual reversal (animate up 50 pixels, jump left 50 pixels, and then animate
+a change back to red).
+*/
+
Rectangle {
width: 400; height: 400
Rectangle {
diff --git a/tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction.qml b/tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.qml
index 01da490..01da490 100644
--- a/tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction.qml
+++ b/tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.qml
diff --git a/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction.qml b/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml
index fc9ccc8..dc2fcee 100644
--- a/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction.qml
+++ b/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml
@@ -1,5 +1,10 @@
import Qt 4.6
+/*
+This test starts with a red rectangle at 0,0. It should animate moving 50 pixels right,
+then immediately change blue, and then animate moving 50 pixels down.
+*/
+
Rectangle {
width: 400; height: 400
Rectangle {
diff --git a/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.qml b/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.qml
index 7ac6f51..08ed609 100644
--- a/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.qml
+++ b/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.qml
@@ -6,274 +6,6 @@ VisualTest {
}
Frame {
msec: 16
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 32
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 48
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 64
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 80
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 96
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 112
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 128
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 144
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 160
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 176
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 192
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 208
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 224
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 240
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 256
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 272
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 288
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 304
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 320
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 336
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 352
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 368
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 384
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 400
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 416
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 432
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 448
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 464
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 480
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 496
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 512
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 528
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 544
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 560
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 576
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 592
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 608
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 624
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 640
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 656
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 672
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 688
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 704
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Key {
- type: 6
- key: 16777249
- modifiers: 0
- text: ""
- autorep: false
- count: 1
- }
- Frame {
- msec: 720
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 736
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 752
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 768
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 784
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 800
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 816
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 832
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 848
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 864
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 880
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 896
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 912
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 928
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 944
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 960
image: "fillmode.0.png"
- }
- Frame {
- msec: 976
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 992
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 1008
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 1024
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 1040
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
- Frame {
- msec: 1056
- hash: "c8cb8d51ca04231dc272133faaf2fb6d"
- }
+ }
}
diff --git a/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml b/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml
index 8450bf2..7c3b486 100644
--- a/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml
+++ b/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml
@@ -1,5 +1,10 @@
import Qt 4.6
+/*
+ This is a static display test of the various Image fill modes. See the png file in the data
+ subdirectory to see what the image should look like.
+*/
+
Rectangle {
id: screen; width: 750; height: 600; color: "gray"
property string source: "face.png"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.1.png b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.1.png
index 1f960e5..4366d53 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.qml
index 043f5e2..c6df3c4 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.qml
@@ -130,7 +130,7 @@ VisualTest {
}
Frame {
msec: 512
- hash: "37c3f25e5cfdb48d7e3ab0cf8ffb9154"
+ hash: "0f347763f25350ebb62dda1536372b45"
}
Frame {
msec: 528
@@ -186,7 +186,7 @@ VisualTest {
}
Frame {
msec: 736
- hash: "902683d72f789399e9d99d1cea1bf177"
+ hash: "74af3457583fbaf73f14556aeccc8403"
}
Frame {
msec: 752
@@ -210,7 +210,7 @@ VisualTest {
}
Frame {
msec: 832
- hash: "a15f19f374bbfb6a922b69d080a91eaa"
+ hash: "d2ed2cf3a12e41bac299399cc35abe6a"
}
Frame {
msec: 848
@@ -294,7 +294,7 @@ VisualTest {
}
Frame {
msec: 1168
- hash: "2192094410e2d7c8d9d4aa5f8deacff5"
+ hash: "85ef33fcb3f91e4fc20391bf94455984"
}
Frame {
msec: 1184
@@ -302,7 +302,7 @@ VisualTest {
}
Frame {
msec: 1200
- hash: "92176cce4836dcae4dfca94e49b041a8"
+ hash: "07acba64dc608439a8a54fcb080379e8"
}
Frame {
msec: 1216
@@ -310,7 +310,7 @@ VisualTest {
}
Frame {
msec: 1232
- hash: "42be5d26afb9f066dd27cc9fbaf6ce20"
+ hash: "1f964c6c9bebdc9945dc69a6095400f7"
}
Frame {
msec: 1248
@@ -318,7 +318,7 @@ VisualTest {
}
Frame {
msec: 1264
- hash: "7f9999a9c87af43b9703323efab31770"
+ hash: "2084ccc60ddd493399c128717816d33b"
}
Frame {
msec: 1280
@@ -346,7 +346,7 @@ VisualTest {
}
Frame {
msec: 1376
- hash: "49a1df977b0494c7c72ca0b65c394e13"
+ hash: "45d891d804609ebbe1d5ac3f826d0c17"
}
Frame {
msec: 1392
@@ -406,7 +406,7 @@ VisualTest {
}
Frame {
msec: 1616
- hash: "4520003d4b221a3de6834b2729b3026d"
+ hash: "880640372bf584955627f6835f24be13"
}
Frame {
msec: 1632
@@ -414,7 +414,7 @@ VisualTest {
}
Frame {
msec: 1648
- hash: "83d49474db15d5779923972ff5f55917"
+ hash: "705d9c8de05c859a42769f73761c6a63"
}
Frame {
msec: 1664
@@ -426,7 +426,7 @@ VisualTest {
}
Frame {
msec: 1696
- hash: "d8e398a1ce9ca45c19951e93bd5c932a"
+ hash: "64cd225202ed6c91b02c368a9160a656"
}
Frame {
msec: 1712
@@ -438,7 +438,7 @@ VisualTest {
}
Frame {
msec: 1744
- hash: "fc913807eb1069d611495fbd5d43ee3d"
+ hash: "fe899138116774df4c4441687e3019c5"
}
Frame {
msec: 1760
@@ -450,7 +450,7 @@ VisualTest {
}
Frame {
msec: 1792
- hash: "e3a2b5c7247acfc1b30825233fbfd56b"
+ hash: "c3ea530de646612f9203c5800cad884b"
}
Frame {
msec: 1808
@@ -490,7 +490,7 @@ VisualTest {
}
Frame {
msec: 1952
- hash: "3991bc7760b7981d80665e3a7654c9f4"
+ hash: "b980703c1d0018937e83a8ba8862469e"
}
Frame {
msec: 1968
@@ -502,15 +502,15 @@ VisualTest {
}
Frame {
msec: 2000
- hash: "723f87da7e5b002a2e9b0bcbc81f9458"
+ hash: "ee297a2d68c9e58157d9bf189d353713"
}
Frame {
msec: 2016
- hash: "6b8ded0d9386a3fff0601a100c513080"
+ hash: "00f3c9b8b37cb104cf2a7701639bc61f"
}
Frame {
msec: 2032
- hash: "f976cd5046ef5391536859e63db905bd"
+ hash: "ee297a2d68c9e58157d9bf189d353713"
}
Frame {
msec: 2048
@@ -562,7 +562,7 @@ VisualTest {
}
Frame {
msec: 2240
- hash: "e3a2b5c7247acfc1b30825233fbfd56b"
+ hash: "c3ea530de646612f9203c5800cad884b"
}
Frame {
msec: 2256
@@ -598,7 +598,7 @@ VisualTest {
}
Frame {
msec: 2384
- hash: "83d49474db15d5779923972ff5f55917"
+ hash: "705d9c8de05c859a42769f73761c6a63"
}
Frame {
msec: 2400
@@ -606,7 +606,7 @@ VisualTest {
}
Frame {
msec: 2416
- hash: "4520003d4b221a3de6834b2729b3026d"
+ hash: "880640372bf584955627f6835f24be13"
}
Frame {
msec: 2432
@@ -666,7 +666,7 @@ VisualTest {
}
Frame {
msec: 2656
- hash: "a676f45d946aeb9fa577c0e862735b01"
+ hash: "45d891d804609ebbe1d5ac3f826d0c17"
}
Frame {
msec: 2672
@@ -702,7 +702,7 @@ VisualTest {
}
Frame {
msec: 2800
- hash: "42be5d26afb9f066dd27cc9fbaf6ce20"
+ hash: "1f964c6c9bebdc9945dc69a6095400f7"
}
Frame {
msec: 2816
@@ -710,7 +710,7 @@ VisualTest {
}
Frame {
msec: 2832
- hash: "92176cce4836dcae4dfca94e49b041a8"
+ hash: "07acba64dc608439a8a54fcb080379e8"
}
Frame {
msec: 2848
@@ -802,7 +802,7 @@ VisualTest {
}
Frame {
msec: 3200
- hash: "a15f19f374bbfb6a922b69d080a91eaa"
+ hash: "d2ed2cf3a12e41bac299399cc35abe6a"
}
Frame {
msec: 3216
@@ -826,7 +826,7 @@ VisualTest {
}
Frame {
msec: 3296
- hash: "902683d72f789399e9d99d1cea1bf177"
+ hash: "74af3457583fbaf73f14556aeccc8403"
}
Frame {
msec: 3312
@@ -854,7 +854,7 @@ VisualTest {
}
Frame {
msec: 3408
- hash: "f602e3eda1889d1a7e49560f0dfb5d4c"
+ hash: "89c159ef00d273ecfe61332e1bf7244d"
}
Frame {
msec: 3424
@@ -862,7 +862,7 @@ VisualTest {
}
Frame {
msec: 3440
- hash: "c8312ede0998636a6bd6451d13636577"
+ hash: "61c16009b65a55bffb63e27727e1615e"
}
Frame {
msec: 3456
@@ -950,7 +950,7 @@ VisualTest {
}
Frame {
msec: 3792
- hash: "8419b295f67cae133760da79dfc26505"
+ hash: "f22a47b846cfee96ebdf39bbce2e6d51"
}
Frame {
msec: 3808
@@ -970,7 +970,7 @@ VisualTest {
}
Frame {
msec: 3872
- hash: "d56ba74d38c1889a278929d1c1b7f17a"
+ hash: "ed9f2ca797894612600bc4b7fbaecb84"
}
Frame {
msec: 3888
@@ -1130,7 +1130,7 @@ VisualTest {
}
Frame {
msec: 4512
- hash: "37c3f25e5cfdb48d7e3ab0cf8ffb9154"
+ hash: "0f347763f25350ebb62dda1536372b45"
}
Frame {
msec: 4528
@@ -1186,7 +1186,7 @@ VisualTest {
}
Frame {
msec: 4736
- hash: "902683d72f789399e9d99d1cea1bf177"
+ hash: "74af3457583fbaf73f14556aeccc8403"
}
Frame {
msec: 4752
@@ -1210,7 +1210,7 @@ VisualTest {
}
Frame {
msec: 4832
- hash: "a15f19f374bbfb6a922b69d080a91eaa"
+ hash: "d2ed2cf3a12e41bac299399cc35abe6a"
}
Frame {
msec: 4848
@@ -1294,7 +1294,7 @@ VisualTest {
}
Frame {
msec: 5168
- hash: "2192094410e2d7c8d9d4aa5f8deacff5"
+ hash: "85ef33fcb3f91e4fc20391bf94455984"
}
Frame {
msec: 5184
@@ -1302,7 +1302,7 @@ VisualTest {
}
Frame {
msec: 5200
- hash: "92176cce4836dcae4dfca94e49b041a8"
+ hash: "07acba64dc608439a8a54fcb080379e8"
}
Frame {
msec: 5216
@@ -1310,7 +1310,7 @@ VisualTest {
}
Frame {
msec: 5232
- hash: "42be5d26afb9f066dd27cc9fbaf6ce20"
+ hash: "1f964c6c9bebdc9945dc69a6095400f7"
}
Frame {
msec: 5248
@@ -1318,7 +1318,7 @@ VisualTest {
}
Frame {
msec: 5264
- hash: "7f9999a9c87af43b9703323efab31770"
+ hash: "2084ccc60ddd493399c128717816d33b"
}
Frame {
msec: 5280
@@ -1346,7 +1346,7 @@ VisualTest {
}
Frame {
msec: 5376
- hash: "49a1df977b0494c7c72ca0b65c394e13"
+ hash: "45d891d804609ebbe1d5ac3f826d0c17"
}
Frame {
msec: 5392
@@ -1406,7 +1406,7 @@ VisualTest {
}
Frame {
msec: 5616
- hash: "4520003d4b221a3de6834b2729b3026d"
+ hash: "880640372bf584955627f6835f24be13"
}
Frame {
msec: 5632
@@ -1414,7 +1414,7 @@ VisualTest {
}
Frame {
msec: 5648
- hash: "83d49474db15d5779923972ff5f55917"
+ hash: "705d9c8de05c859a42769f73761c6a63"
}
Frame {
msec: 5664
@@ -1426,7 +1426,7 @@ VisualTest {
}
Frame {
msec: 5696
- hash: "d8e398a1ce9ca45c19951e93bd5c932a"
+ hash: "64cd225202ed6c91b02c368a9160a656"
}
Frame {
msec: 5712
@@ -1438,7 +1438,7 @@ VisualTest {
}
Frame {
msec: 5744
- hash: "fc913807eb1069d611495fbd5d43ee3d"
+ hash: "fe899138116774df4c4441687e3019c5"
}
Frame {
msec: 5760
@@ -1450,7 +1450,7 @@ VisualTest {
}
Frame {
msec: 5792
- hash: "e3a2b5c7247acfc1b30825233fbfd56b"
+ hash: "c3ea530de646612f9203c5800cad884b"
}
Frame {
msec: 5808
@@ -1482,7 +1482,7 @@ VisualTest {
}
Frame {
msec: 5920
- hash: "ec7e1190dd4fe122545e6ce6c8740500"
+ hash: "3b7b83e97d17440b42e6ef4b962076d8"
}
Frame {
msec: 5936
@@ -1490,7 +1490,7 @@ VisualTest {
}
Frame {
msec: 5952
- hash: "3991bc7760b7981d80665e3a7654c9f4"
+ hash: "b980703c1d0018937e83a8ba8862469e"
}
Frame {
msec: 5968
@@ -1502,15 +1502,15 @@ VisualTest {
}
Frame {
msec: 6000
- hash: "723f87da7e5b002a2e9b0bcbc81f9458"
+ hash: "ee297a2d68c9e58157d9bf189d353713"
}
Frame {
msec: 6016
- hash: "6b8ded0d9386a3fff0601a100c513080"
+ hash: "00f3c9b8b37cb104cf2a7701639bc61f"
}
Frame {
msec: 6032
- hash: "f976cd5046ef5391536859e63db905bd"
+ hash: "ee297a2d68c9e58157d9bf189d353713"
}
Frame {
msec: 6048
@@ -1562,7 +1562,7 @@ VisualTest {
}
Frame {
msec: 6240
- hash: "e3a2b5c7247acfc1b30825233fbfd56b"
+ hash: "c3ea530de646612f9203c5800cad884b"
}
Frame {
msec: 6256
@@ -1598,7 +1598,7 @@ VisualTest {
}
Frame {
msec: 6384
- hash: "83d49474db15d5779923972ff5f55917"
+ hash: "705d9c8de05c859a42769f73761c6a63"
}
Frame {
msec: 6400
@@ -1606,7 +1606,7 @@ VisualTest {
}
Frame {
msec: 6416
- hash: "4520003d4b221a3de6834b2729b3026d"
+ hash: "880640372bf584955627f6835f24be13"
}
Frame {
msec: 6432
@@ -1666,7 +1666,7 @@ VisualTest {
}
Frame {
msec: 6656
- hash: "a676f45d946aeb9fa577c0e862735b01"
+ hash: "45d891d804609ebbe1d5ac3f826d0c17"
}
Frame {
msec: 6672
@@ -1702,7 +1702,7 @@ VisualTest {
}
Frame {
msec: 6800
- hash: "42be5d26afb9f066dd27cc9fbaf6ce20"
+ hash: "1f964c6c9bebdc9945dc69a6095400f7"
}
Frame {
msec: 6816
@@ -1710,7 +1710,7 @@ VisualTest {
}
Frame {
msec: 6832
- hash: "92176cce4836dcae4dfca94e49b041a8"
+ hash: "07acba64dc608439a8a54fcb080379e8"
}
Frame {
msec: 6848
@@ -1779,7 +1779,7 @@ VisualTest {
Key {
type: 6
key: 16777249
- modifiers: 67108864
+ modifiers: 0
text: ""
autorep: false
count: 1
@@ -1810,7 +1810,7 @@ VisualTest {
}
Frame {
msec: 7200
- hash: "a15f19f374bbfb6a922b69d080a91eaa"
+ hash: "d2ed2cf3a12e41bac299399cc35abe6a"
}
Frame {
msec: 7216
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.1.png b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.1.png
deleted file mode 100644
index 80cbd26..0000000
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.1.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.2.png b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.2.png
deleted file mode 100644
index 80cbd26..0000000
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.2.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.3.png b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.3.png
deleted file mode 100644
index 80cbd26..0000000
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.3.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.4.png b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.4.png
deleted file mode 100644
index 80cbd26..0000000
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.4.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.qml
index 16cd5e9..1403d35 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.qml
@@ -6,1354 +6,6 @@ VisualTest {
}
Frame {
msec: 16
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 32
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 48
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 64
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 80
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 96
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 112
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 128
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 144
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 160
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 176
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 192
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 208
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 224
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 240
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 256
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 272
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 288
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 304
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 320
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 336
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 352
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 368
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 384
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 400
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 416
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 432
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 448
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 464
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 480
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 496
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 512
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 528
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 544
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 560
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 576
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 592
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 608
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 624
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 640
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 656
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 672
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 688
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 704
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 720
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 736
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 752
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 768
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 784
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 800
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 816
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 832
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 848
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 864
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 880
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 896
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 912
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 928
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 944
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 960
- image: "borders.0.png"
- }
- Frame {
- msec: 976
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 992
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1008
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1024
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1040
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1056
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1072
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1088
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1104
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1120
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1136
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1152
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1168
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1184
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1200
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1216
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1232
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1248
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1264
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1280
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1296
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1312
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1328
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1344
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1360
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1376
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1392
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1408
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1424
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1440
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1456
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1472
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1488
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1504
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1520
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1536
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1552
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1568
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1584
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1600
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1616
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1632
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1648
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1664
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1680
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1696
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1712
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1728
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1744
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1760
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1776
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1792
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1808
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1824
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1840
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1856
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1872
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1888
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1904
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1920
- image: "borders.1.png"
- }
- Frame {
- msec: 1936
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1952
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1968
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 1984
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2000
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2016
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2032
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2048
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2064
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2080
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2096
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2112
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2128
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2144
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2160
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2176
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2192
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2208
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2224
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2240
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2256
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2272
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2288
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2304
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2320
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2336
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2352
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2368
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2384
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2400
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2416
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2432
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2448
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2464
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2480
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2496
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2512
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2528
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2544
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2560
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2576
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2592
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2608
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2624
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2640
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2656
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2672
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2688
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2704
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2720
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2736
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2752
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2768
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2784
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2800
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2816
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2832
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2848
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2864
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2880
- image: "borders.2.png"
- }
- Frame {
- msec: 2896
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2912
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2928
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2944
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2960
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2976
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 2992
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3008
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3024
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3040
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3056
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3072
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3088
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3104
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3120
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3136
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3152
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3168
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3184
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3200
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3216
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3232
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3248
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3264
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3280
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3296
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3312
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3328
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3344
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3360
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3376
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3392
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3408
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3424
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3440
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3456
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3472
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3488
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3504
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3520
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3536
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3552
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3568
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3584
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3600
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3616
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3632
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3648
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3664
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3680
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3696
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3712
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3728
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3744
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3760
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3776
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3792
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3808
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3824
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3840
- image: "borders.3.png"
- }
- Frame {
- msec: 3856
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3872
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3888
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3904
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3920
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3936
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3952
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3968
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 3984
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4000
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4016
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4032
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4048
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4064
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4080
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4096
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4112
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4128
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4144
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4160
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4176
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4192
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4208
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4224
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4240
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4256
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4272
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4288
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4304
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4320
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4336
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4352
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4368
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4384
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4400
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4416
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4432
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4448
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4464
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4480
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4496
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4512
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4528
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4544
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4560
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4576
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4592
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4608
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4624
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4640
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4656
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4672
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4688
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4704
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4720
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4736
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4752
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4768
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4784
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4800
- image: "borders.4.png"
- }
- Frame {
- msec: 4816
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4832
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4848
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4864
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4880
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4896
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4912
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4928
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4944
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4960
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4976
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 4992
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5008
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5024
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5040
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5056
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5072
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5088
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5104
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5120
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5136
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5152
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5168
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5184
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5200
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5216
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5232
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5248
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5264
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5280
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5296
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5312
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5328
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5344
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5360
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5376
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5392
- hash: "ab9753116e289c932064144bb0845857"
- }
- Frame {
- msec: 5408
- hash: "ab9753116e289c932064144bb0845857"
+ hash: "258a7e75b491e4f51a91739c776803b3"
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.png
index cf36d60..5b7b426 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.png
index 6069df8..7c27310 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.png
index b8bd5f3..cbfdb23 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.png
index cf36d60..5b7b426 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.png
index 831d6b4..5af705e 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.png
index f7079dc..af4395e 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.png
index a5f4451..cd12bc9 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.png
index e1261d0..471c86b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml
index 5a131e9..f3071e4 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml
@@ -486,7 +486,7 @@ VisualTest {
}
Frame {
msec: 1840
- hash: "b6b4b2c7acddd23609caa9727911b981"
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
}
Mouse {
type: 5
@@ -498,7 +498,7 @@ VisualTest {
}
Frame {
msec: 1856
- hash: "b6b4b2c7acddd23609caa9727911b981"
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
}
Mouse {
type: 5
@@ -510,7 +510,7 @@ VisualTest {
}
Frame {
msec: 1872
- hash: "022610222cfbcf9e9a8991cdb60c7bbb"
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
}
Mouse {
type: 5
@@ -522,7 +522,7 @@ VisualTest {
}
Frame {
msec: 1888
- hash: "9b5201a3201a102b20592d81218b5e74"
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
}
Mouse {
type: 5
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml b/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml
index 2d481c9..fc8261f 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import Qt.labs.particles 1.0
Rectangle {
width: 640; height: 480; color: "black"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/repeater.qml b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml
index 1eb115d..1eb115d 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/repeater.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/repeater.qml b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml
index ff60365..ff60365 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/repeater.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml
new file mode 100644
index 0000000..5dee0c6
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Rectangle {
+ width: 800; height: 240; color: "gray"
+
+ Rectangle {
+ id: rect
+ width: 50; height: 20; y: 30; color: "black"
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ NumberAnimation { from: 50; to: 700; duration: 2000 }
+ NumberAnimation { from: 700; to: 50; duration: 2000 }
+ }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 60; color: "red"
+ SmoothedFollow on x { to: rect.x; velocity: 400; enabled: true }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 90; color: "yellow"
+ SmoothedFollow on x { to: rect.x; velocity: 300; reversingMode: SmoothedAnimation.Immediate; enabled: true }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 120; color: "green"
+ SmoothedFollow on x { to: rect.x; reversingMode: SmoothedAnimation.Sync; enabled: true }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 150; color: "purple"
+ SmoothedFollow on x { to: rect.x; maximumEasingTime: 200; enabled: true }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 180; color: "blue"
+ SmoothedFollow on x { to: rect.x; duration: 300; enabled: true }
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml
index 21bbc7f..0ddcca4 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml
@@ -5,9 +5,9 @@ Rectangle {
color: "gray"
width: 200; height: 200
- property var hours: 10
- property var minutes: 28
- property var seconds: 0
+ property variant hours: 10
+ property variant minutes: 28
+ property variant seconds: 0
Timer {
interval: 1000; running: true; repeat: true; triggeredOnStart: true
@@ -25,7 +25,7 @@ Rectangle {
origin.x: 7.5; origin.y: 73; angle: 0
SpringFollow on angle {
spring: 2; damping: 0.2; modulus: 360
- source: (clock.hours * 30) + (clock.minutes * 0.5)
+ to: (clock.hours * 30) + (clock.minutes * 0.5)
}
}
}
@@ -39,7 +39,7 @@ Rectangle {
origin.x: 6.5; origin.y: 83; angle: 0
SpringFollow on angle {
spring: 2; damping: 0.2; modulus: 360
- source: clock.minutes * 6
+ to: clock.minutes * 6
}
}
}
@@ -53,7 +53,7 @@ Rectangle {
origin.x: 2.5; origin.y: 80; angle: 0
SpringFollow on angle {
spring: 5; damping: 0.25; modulus: 360
- source: clock.seconds * 6
+ to: clock.seconds * 6
}
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml
index 1659bb7..5368349 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml
@@ -26,7 +26,7 @@ Rectangle {
color: "#ff0000"
x: rect.width; width: rect.width; height: 20
y: 200
- SpringFollow on y { source: rect.y; velocity: 200 }
+ SpringFollow on y { to: rect.y; velocity: 200 }
}
// Spring
@@ -34,13 +34,13 @@ Rectangle {
color: "#ff0000"
x: rect.width * 2; width: rect.width/2; height: 20
y: 200
- SpringFollow on y { source: rect.y; spring: 1.0; damping: 0.2 }
+ SpringFollow on y { to: rect.y; spring: 1.0; damping: 0.2 }
}
Rectangle {
color: "#880000"
x: rect.width * 2.5; width: rect.width/2; height: 20
y: 200
- SpringFollow on y { source: rect.y; spring: 1.0; damping: 0.2; mass: 3.0 } // "heavier" object
+ SpringFollow on y { to: rect.y; spring: 1.0; damping: 0.2; mass: 3.0 } // "heavier" object
}
// Follow mouse
@@ -52,8 +52,8 @@ Rectangle {
width: 20; height: 20
radius: 10
color: "#0000ff"
- SpringFollow on x { id: f1; source: mouseRegion.mouseX-10; spring: 1.0; damping: 0.05; epsilon: 0.25 }
- SpringFollow on y { id: f2; source: mouseRegion.mouseY-10; spring: 1.0; damping: 0.05; epsilon: 0.25 }
+ SpringFollow on x { id: f1; to: mouseRegion.mouseX-10; spring: 1.0; damping: 0.05; epsilon: 0.25 }
+ SpringFollow on y { id: f2; to: mouseRegion.mouseY-10; spring: 1.0; damping: 0.05; epsilon: 0.25 }
states: [
State {
name: "following"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
index a3aa929..90b5411 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
@@ -61,7 +61,7 @@ Rectangle {
text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: 800; height: 20
}
Text {
- text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrap: true; width: 200
+ text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200
}
Text {
text: s.text; elide: Text.ElideLeft; width: 200
@@ -73,13 +73,19 @@ Rectangle {
text: s.text; elide: Text.ElideRight; width: 200
}
Text {
- text: s.text; elide: Text.ElideLeft; width: 200; wrap: true
+ text: s.text; elide: Text.ElideLeft; width: 200; wrapMode: Text.WordWrap
}
Text {
- text: s.text; elide: Text.ElideMiddle; width: 200; wrap: true
+ text: s.text; elide: Text.ElideMiddle; width: 200; wrapMode: Text.WordWrap
}
Text {
- text: s.text; elide: Text.ElideRight; width: 200; wrap: true
+ text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap
+ }
+ Text {
+ text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere
+ }
+ Text {
+ text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAtWordBoundaryOrAnywhere
}
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
index 35aa232..0dba47c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
@@ -61,7 +61,7 @@ Rectangle {
text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: 800; height: 20
}
Text {
- text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrap: true; width: 200
+ text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200
}
Text {
text: s.text; elide: Text.ElideLeft; width: 200
@@ -73,13 +73,19 @@ Rectangle {
text: s.text; elide: Text.ElideRight; width: 200
}
Text {
- text: s.text; elide: Text.ElideLeft; width: 200; wrap: true
+ text: s.text; elide: Text.ElideLeft; width: 200; wrapMode: Text.WordWrap
}
Text {
- text: s.text; elide: Text.ElideMiddle; width: 200; wrap: true
+ text: s.text; elide: Text.ElideMiddle; width: 200; wrapMode: Text.WordWrap
}
Text {
- text: s.text; elide: Text.ElideRight; width: 200; wrap: true
+ text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap
+ }
+ Text {
+ text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere
+ }
+ Text {
+ text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAtWordBoundaryOrAnywhere
}
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml
index f9fe025..b2a0754 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml
@@ -5,17 +5,30 @@ Item {
width: 200
TextEdit {
width: 200
- height: 200
- wrap: true
+ height: 100
+ wrapMode: TextEdit.WordWrap
focus: true
}
//With QTBUG-6273 only the bottom one would be wrapped
TextEdit {
width: 200
- height: 200
- wrap: true
+ height: 100
+ wrapMode: TextEdit.WordWrap
text: "This is a test that text edit wraps correctly."
+ y:100
+ }
+ TextEdit {
+ width: 150
+ height: 100
+ wrapMode: TextEdit.WrapAnywhere
+ text: "This is a test that text edit wraps correctly. thisisaverylongstringwithnospaces"
y:200
}
-
+ TextEdit {
+ width: 150
+ height: 100
+ wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
+ text: "This is a test that text edit wraps correctly. thisisaverylongstringwithnospaces"
+ y:300
+ }
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml
new file mode 100644
index 0000000..31f24ec
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml
@@ -0,0 +1,67 @@
+import Qt 4.7
+
+Item {
+ id:lineedit
+ property alias text: textInp.text
+
+ width: textInp.width + 11
+ height: 13 + 11
+
+ Rectangle{
+ color: 'lightsteelblue'
+ anchors.fill: parent
+ }
+ clip: true
+ Component.onCompleted: textInp.cursorPosition = 0;
+ TextInput{
+ id:textInp
+ cursorDelegate: Item{
+ Rectangle{
+ visible: parent.parent.focus
+ color: "#009BCE"
+ height: 13
+ width: 2
+ y: 1
+ }
+ }
+ property int leftMargin: 6
+ property int rightMargin: 6
+ x: leftMargin
+ y: 5
+ //Below function implements all scrolling logic
+ onCursorPositionChanged: {
+ if(cursorRect.x < leftMargin - textInp.x){//Cursor went off the front
+ textInp.x = leftMargin - Math.max(0, cursorRect.x);
+ }else if(cursorRect.x > parent.width - leftMargin - rightMargin - textInp.x){//Cusor went off the end
+ textInp.x = leftMargin - Math.max(0, cursorRect.x - (parent.width - leftMargin - rightMargin));
+ }
+ }
+
+ text:""
+ horizontalAlignment: TextInput.AlignLeft
+ font.pixelSize:15
+ }
+ MouseArea{
+ //Implements all line edit mouse handling
+ id: mainMouseArea
+ anchors.fill: parent;
+ function translateX(x){
+ return x - textInp.x
+ }
+ onPressed: {
+ textInp.focus = true;
+ textInp.cursorPosition = textInp.xToPosition(translateX(mouse.x));
+ }
+ onPositionChanged: {
+ textInp.moveCursorSelection(textInp.xToPosition(translateX(mouse.x)));
+ }
+ onReleased: {
+ }
+ onDoubleClicked: {
+ textInp.selectionStart=0;
+ textInp.selectionEnd=textInp.text.length;
+ }
+ z: textInp.z + 1
+ }
+
+}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.0.png
index 2b45a06..f30ee4f 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.1.png
index 1f5bae0..7ae3b94 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.2.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.2.png
index cb2b5a4..636afe8 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.qml
index dd7b291..b779c21 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.qml
@@ -6,11 +6,11 @@ VisualTest {
}
Frame {
msec: 16
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 32
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Key {
type: 6
@@ -22,83 +22,83 @@ VisualTest {
}
Frame {
msec: 48
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 64
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 80
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 96
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 112
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 128
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 144
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 160
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 176
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 192
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 208
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 224
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 240
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 256
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 272
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 288
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 304
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 320
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 336
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Frame {
msec: 352
- hash: "b73bd9c2fef8812591fff9f43b73da13"
+ hash: "48400809c3862dae64b0cd00d51057a4"
}
Key {
type: 6
@@ -110,23 +110,23 @@ VisualTest {
}
Frame {
msec: 368
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "4acf112eda369b7eb351e0e522cefa05"
}
Frame {
msec: 384
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "4acf112eda369b7eb351e0e522cefa05"
}
Frame {
msec: 400
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "4acf112eda369b7eb351e0e522cefa05"
}
Frame {
msec: 416
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "4acf112eda369b7eb351e0e522cefa05"
}
Frame {
msec: 432
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "4acf112eda369b7eb351e0e522cefa05"
}
Key {
type: 7
@@ -138,27 +138,27 @@ VisualTest {
}
Frame {
msec: 448
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "4acf112eda369b7eb351e0e522cefa05"
}
Frame {
msec: 464
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "4acf112eda369b7eb351e0e522cefa05"
}
Frame {
msec: 480
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "4acf112eda369b7eb351e0e522cefa05"
}
Frame {
msec: 496
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "4acf112eda369b7eb351e0e522cefa05"
}
Frame {
msec: 512
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "4acf112eda369b7eb351e0e522cefa05"
}
Frame {
msec: 528
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "4acf112eda369b7eb351e0e522cefa05"
}
Key {
type: 7
@@ -170,43 +170,43 @@ VisualTest {
}
Frame {
msec: 544
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "238dc96885dadb763bfc1500d8b7c5b2"
}
Frame {
msec: 560
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "238dc96885dadb763bfc1500d8b7c5b2"
}
Frame {
msec: 576
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "238dc96885dadb763bfc1500d8b7c5b2"
}
Frame {
msec: 592
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "238dc96885dadb763bfc1500d8b7c5b2"
}
Frame {
msec: 608
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "238dc96885dadb763bfc1500d8b7c5b2"
}
Frame {
msec: 624
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "238dc96885dadb763bfc1500d8b7c5b2"
}
Frame {
msec: 640
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "238dc96885dadb763bfc1500d8b7c5b2"
}
Frame {
msec: 656
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "238dc96885dadb763bfc1500d8b7c5b2"
}
Frame {
msec: 672
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "238dc96885dadb763bfc1500d8b7c5b2"
}
Frame {
msec: 688
- hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ hash: "238dc96885dadb763bfc1500d8b7c5b2"
}
Key {
type: 6
@@ -218,23 +218,23 @@ VisualTest {
}
Frame {
msec: 704
- hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ hash: "2da540e72d88932b61a261d791fc34b0"
}
Frame {
msec: 720
- hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ hash: "2da540e72d88932b61a261d791fc34b0"
}
Frame {
msec: 736
- hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ hash: "2da540e72d88932b61a261d791fc34b0"
}
Frame {
msec: 752
- hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ hash: "2da540e72d88932b61a261d791fc34b0"
}
Frame {
msec: 768
- hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ hash: "2da540e72d88932b61a261d791fc34b0"
}
Key {
type: 7
@@ -246,23 +246,23 @@ VisualTest {
}
Frame {
msec: 784
- hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ hash: "2da540e72d88932b61a261d791fc34b0"
}
Frame {
msec: 800
- hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ hash: "2da540e72d88932b61a261d791fc34b0"
}
Frame {
msec: 816
- hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ hash: "2da540e72d88932b61a261d791fc34b0"
}
Frame {
msec: 832
- hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ hash: "2da540e72d88932b61a261d791fc34b0"
}
Frame {
msec: 848
- hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ hash: "2da540e72d88932b61a261d791fc34b0"
}
Key {
type: 6
@@ -274,15 +274,15 @@ VisualTest {
}
Frame {
msec: 864
- hash: "a4b81c526a5bf8902fde9b8721980977"
+ hash: "25ade09747f07a9bdd07f5885a72dc55"
}
Frame {
msec: 880
- hash: "a4b81c526a5bf8902fde9b8721980977"
+ hash: "25ade09747f07a9bdd07f5885a72dc55"
}
Frame {
msec: 896
- hash: "a4b81c526a5bf8902fde9b8721980977"
+ hash: "25ade09747f07a9bdd07f5885a72dc55"
}
Key {
type: 7
@@ -294,15 +294,15 @@ VisualTest {
}
Frame {
msec: 912
- hash: "a4b81c526a5bf8902fde9b8721980977"
+ hash: "25ade09747f07a9bdd07f5885a72dc55"
}
Frame {
msec: 928
- hash: "a4b81c526a5bf8902fde9b8721980977"
+ hash: "25ade09747f07a9bdd07f5885a72dc55"
}
Frame {
msec: 944
- hash: "a4b81c526a5bf8902fde9b8721980977"
+ hash: "25ade09747f07a9bdd07f5885a72dc55"
}
Frame {
msec: 960
@@ -310,7 +310,7 @@ VisualTest {
}
Frame {
msec: 976
- hash: "a4b81c526a5bf8902fde9b8721980977"
+ hash: "25ade09747f07a9bdd07f5885a72dc55"
}
Key {
type: 6
@@ -322,19 +322,19 @@ VisualTest {
}
Frame {
msec: 992
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "0a60e76e96846f9f4e909f7a01ede377"
}
Frame {
msec: 1008
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "0a60e76e96846f9f4e909f7a01ede377"
}
Frame {
msec: 1024
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "0a60e76e96846f9f4e909f7a01ede377"
}
Frame {
msec: 1040
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Key {
type: 7
@@ -346,51 +346,51 @@ VisualTest {
}
Frame {
msec: 1056
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Frame {
msec: 1072
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Frame {
msec: 1088
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Frame {
msec: 1104
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Frame {
msec: 1120
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Frame {
msec: 1136
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Frame {
msec: 1152
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Frame {
msec: 1168
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Frame {
msec: 1184
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Frame {
msec: 1200
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Frame {
msec: 1216
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Frame {
msec: 1232
- hash: "d072aebc2314a149a856634786b208a0"
+ hash: "6f28f435e552cbbf6376f2443ed3843c"
}
Key {
type: 6
@@ -402,15 +402,15 @@ VisualTest {
}
Frame {
msec: 1248
- hash: "94defec2865529f185d02cfcbfe166cc"
+ hash: "16a353e711a8fb654b5fe3097ba29296"
}
Frame {
msec: 1264
- hash: "94defec2865529f185d02cfcbfe166cc"
+ hash: "16a353e711a8fb654b5fe3097ba29296"
}
Frame {
msec: 1280
- hash: "94defec2865529f185d02cfcbfe166cc"
+ hash: "16a353e711a8fb654b5fe3097ba29296"
}
Key {
type: 7
@@ -422,15 +422,15 @@ VisualTest {
}
Frame {
msec: 1296
- hash: "94defec2865529f185d02cfcbfe166cc"
+ hash: "16a353e711a8fb654b5fe3097ba29296"
}
Frame {
msec: 1312
- hash: "94defec2865529f185d02cfcbfe166cc"
+ hash: "16a353e711a8fb654b5fe3097ba29296"
}
Frame {
msec: 1328
- hash: "94defec2865529f185d02cfcbfe166cc"
+ hash: "16a353e711a8fb654b5fe3097ba29296"
}
Key {
type: 6
@@ -442,39 +442,39 @@ VisualTest {
}
Frame {
msec: 1344
- hash: "f625a2a82879df96141000e6931d4487"
+ hash: "fcdbf8ef17e1a7aa6e0e1d952b25d47d"
}
Frame {
msec: 1360
- hash: "f625a2a82879df96141000e6931d4487"
+ hash: "fcdbf8ef17e1a7aa6e0e1d952b25d47d"
}
Frame {
msec: 1376
- hash: "f625a2a82879df96141000e6931d4487"
+ hash: "fcdbf8ef17e1a7aa6e0e1d952b25d47d"
}
Frame {
msec: 1392
- hash: "f625a2a82879df96141000e6931d4487"
+ hash: "fcdbf8ef17e1a7aa6e0e1d952b25d47d"
}
Frame {
msec: 1408
- hash: "f625a2a82879df96141000e6931d4487"
+ hash: "fcdbf8ef17e1a7aa6e0e1d952b25d47d"
}
Frame {
msec: 1424
- hash: "f625a2a82879df96141000e6931d4487"
+ hash: "fcdbf8ef17e1a7aa6e0e1d952b25d47d"
}
Frame {
msec: 1440
- hash: "f625a2a82879df96141000e6931d4487"
+ hash: "fcdbf8ef17e1a7aa6e0e1d952b25d47d"
}
Frame {
msec: 1456
- hash: "f625a2a82879df96141000e6931d4487"
+ hash: "fcdbf8ef17e1a7aa6e0e1d952b25d47d"
}
Frame {
msec: 1472
- hash: "f625a2a82879df96141000e6931d4487"
+ hash: "fcdbf8ef17e1a7aa6e0e1d952b25d47d"
}
Key {
type: 7
@@ -486,7 +486,7 @@ VisualTest {
}
Frame {
msec: 1488
- hash: "f625a2a82879df96141000e6931d4487"
+ hash: "fcdbf8ef17e1a7aa6e0e1d952b25d47d"
}
Key {
type: 6
@@ -498,19 +498,19 @@ VisualTest {
}
Frame {
msec: 1504
- hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ hash: "fe0e4e097f655e0b330ed6fcfce669c2"
}
Frame {
msec: 1520
- hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ hash: "fe0e4e097f655e0b330ed6fcfce669c2"
}
Frame {
msec: 1536
- hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ hash: "522f11cbb8da0cca25af91d3f6d5240b"
}
Frame {
msec: 1552
- hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ hash: "522f11cbb8da0cca25af91d3f6d5240b"
}
Key {
type: 7
@@ -522,27 +522,27 @@ VisualTest {
}
Frame {
msec: 1568
- hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ hash: "522f11cbb8da0cca25af91d3f6d5240b"
}
Frame {
msec: 1584
- hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ hash: "522f11cbb8da0cca25af91d3f6d5240b"
}
Frame {
msec: 1600
- hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ hash: "522f11cbb8da0cca25af91d3f6d5240b"
}
Frame {
msec: 1616
- hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ hash: "522f11cbb8da0cca25af91d3f6d5240b"
}
Frame {
msec: 1632
- hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ hash: "522f11cbb8da0cca25af91d3f6d5240b"
}
Frame {
msec: 1648
- hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ hash: "522f11cbb8da0cca25af91d3f6d5240b"
}
Key {
type: 6
@@ -554,23 +554,23 @@ VisualTest {
}
Frame {
msec: 1664
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "f459ca172e643d6e22c38067f8ced305"
}
Frame {
msec: 1680
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "f459ca172e643d6e22c38067f8ced305"
}
Frame {
msec: 1696
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "f459ca172e643d6e22c38067f8ced305"
}
Frame {
msec: 1712
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "f459ca172e643d6e22c38067f8ced305"
}
Frame {
msec: 1728
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "f459ca172e643d6e22c38067f8ced305"
}
Key {
type: 6
@@ -582,7 +582,7 @@ VisualTest {
}
Frame {
msec: 1744
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "0016ecff508885d3a199b27baa9b7ecf"
}
Key {
type: 7
@@ -594,15 +594,15 @@ VisualTest {
}
Frame {
msec: 1760
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "0016ecff508885d3a199b27baa9b7ecf"
}
Frame {
msec: 1776
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "0016ecff508885d3a199b27baa9b7ecf"
}
Frame {
msec: 1792
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "0016ecff508885d3a199b27baa9b7ecf"
}
Key {
type: 7
@@ -614,19 +614,19 @@ VisualTest {
}
Frame {
msec: 1808
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "0016ecff508885d3a199b27baa9b7ecf"
}
Frame {
msec: 1824
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "0016ecff508885d3a199b27baa9b7ecf"
}
Frame {
msec: 1840
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "0016ecff508885d3a199b27baa9b7ecf"
}
Frame {
msec: 1856
- hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ hash: "0016ecff508885d3a199b27baa9b7ecf"
}
Key {
type: 6
@@ -638,15 +638,15 @@ VisualTest {
}
Frame {
msec: 1872
- hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ hash: "05c631afb9df51c23b1f714a7de92788"
}
Frame {
msec: 1888
- hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ hash: "05c631afb9df51c23b1f714a7de92788"
}
Frame {
msec: 1904
- hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ hash: "05c631afb9df51c23b1f714a7de92788"
}
Frame {
msec: 1920
@@ -662,27 +662,27 @@ VisualTest {
}
Frame {
msec: 1936
- hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ hash: "05c631afb9df51c23b1f714a7de92788"
}
Frame {
msec: 1952
- hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ hash: "05c631afb9df51c23b1f714a7de92788"
}
Frame {
msec: 1968
- hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ hash: "05c631afb9df51c23b1f714a7de92788"
}
Frame {
msec: 1984
- hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ hash: "05c631afb9df51c23b1f714a7de92788"
}
Frame {
msec: 2000
- hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ hash: "05c631afb9df51c23b1f714a7de92788"
}
Frame {
msec: 2016
- hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ hash: "05c631afb9df51c23b1f714a7de92788"
}
Key {
type: 6
@@ -694,11 +694,11 @@ VisualTest {
}
Frame {
msec: 2032
- hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ hash: "95ad72a49b991225e2ed5ae9c2a7b4e5"
}
Frame {
msec: 2048
- hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ hash: "95ad72a49b991225e2ed5ae9c2a7b4e5"
}
Key {
type: 7
@@ -710,11 +710,11 @@ VisualTest {
}
Frame {
msec: 2064
- hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ hash: "95ad72a49b991225e2ed5ae9c2a7b4e5"
}
Frame {
msec: 2080
- hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ hash: "95ad72a49b991225e2ed5ae9c2a7b4e5"
}
Key {
type: 6
@@ -726,19 +726,19 @@ VisualTest {
}
Frame {
msec: 2096
- hash: "c82441813af6ff577687f29f6a09da38"
+ hash: "7f2366b163c110a50259936c150d8287"
}
Frame {
msec: 2112
- hash: "c82441813af6ff577687f29f6a09da38"
+ hash: "7f2366b163c110a50259936c150d8287"
}
Frame {
msec: 2128
- hash: "c82441813af6ff577687f29f6a09da38"
+ hash: "7f2366b163c110a50259936c150d8287"
}
Frame {
msec: 2144
- hash: "c82441813af6ff577687f29f6a09da38"
+ hash: "7f2366b163c110a50259936c150d8287"
}
Key {
type: 6
@@ -758,19 +758,19 @@ VisualTest {
}
Frame {
msec: 2160
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "b5110b1a7aa74f7b4ed72f573f10b1fe"
}
Frame {
msec: 2176
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "b5110b1a7aa74f7b4ed72f573f10b1fe"
}
Frame {
msec: 2192
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "b5110b1a7aa74f7b4ed72f573f10b1fe"
}
Frame {
msec: 2208
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "b5110b1a7aa74f7b4ed72f573f10b1fe"
}
Key {
type: 6
@@ -782,7 +782,7 @@ VisualTest {
}
Frame {
msec: 2224
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "30cdfb276e7a234c72d89a03e6a10dc5"
}
Key {
type: 7
@@ -794,23 +794,23 @@ VisualTest {
}
Frame {
msec: 2240
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "30cdfb276e7a234c72d89a03e6a10dc5"
}
Frame {
msec: 2256
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "30cdfb276e7a234c72d89a03e6a10dc5"
}
Frame {
msec: 2272
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "30cdfb276e7a234c72d89a03e6a10dc5"
}
Frame {
msec: 2288
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "30cdfb276e7a234c72d89a03e6a10dc5"
}
Frame {
msec: 2304
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "30cdfb276e7a234c72d89a03e6a10dc5"
}
Key {
type: 7
@@ -822,11 +822,11 @@ VisualTest {
}
Frame {
msec: 2320
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "30cdfb276e7a234c72d89a03e6a10dc5"
}
Frame {
msec: 2336
- hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ hash: "30cdfb276e7a234c72d89a03e6a10dc5"
}
Key {
type: 6
@@ -838,27 +838,27 @@ VisualTest {
}
Frame {
msec: 2352
- hash: "8f36e26d8685fe55e7a1dd294188f649"
+ hash: "c0f7406f3718ab0120c79ff119d6986c"
}
Frame {
msec: 2368
- hash: "8f36e26d8685fe55e7a1dd294188f649"
+ hash: "c0f7406f3718ab0120c79ff119d6986c"
}
Frame {
msec: 2384
- hash: "8f36e26d8685fe55e7a1dd294188f649"
+ hash: "c0f7406f3718ab0120c79ff119d6986c"
}
Frame {
msec: 2400
- hash: "8f36e26d8685fe55e7a1dd294188f649"
+ hash: "c0f7406f3718ab0120c79ff119d6986c"
}
Frame {
msec: 2416
- hash: "8f36e26d8685fe55e7a1dd294188f649"
+ hash: "c0f7406f3718ab0120c79ff119d6986c"
}
Frame {
msec: 2432
- hash: "8f36e26d8685fe55e7a1dd294188f649"
+ hash: "c0f7406f3718ab0120c79ff119d6986c"
}
Key {
type: 7
@@ -870,19 +870,19 @@ VisualTest {
}
Frame {
msec: 2448
- hash: "8f36e26d8685fe55e7a1dd294188f649"
+ hash: "c0f7406f3718ab0120c79ff119d6986c"
}
Frame {
msec: 2464
- hash: "8f36e26d8685fe55e7a1dd294188f649"
+ hash: "c0f7406f3718ab0120c79ff119d6986c"
}
Frame {
msec: 2480
- hash: "8f36e26d8685fe55e7a1dd294188f649"
+ hash: "c0f7406f3718ab0120c79ff119d6986c"
}
Frame {
msec: 2496
- hash: "8f36e26d8685fe55e7a1dd294188f649"
+ hash: "c0f7406f3718ab0120c79ff119d6986c"
}
Key {
type: 6
@@ -894,15 +894,15 @@ VisualTest {
}
Frame {
msec: 2512
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "870d7866b8e289b4843b62c856d769d4"
}
Frame {
msec: 2528
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "870d7866b8e289b4843b62c856d769d4"
}
Frame {
msec: 2544
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Key {
type: 7
@@ -914,83 +914,83 @@ VisualTest {
}
Frame {
msec: 2560
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2576
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2592
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2608
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2624
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2640
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2656
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2672
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2688
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2704
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2720
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2736
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2752
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2768
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2784
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2800
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2816
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2832
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2848
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2864
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2880
@@ -998,46 +998,46 @@ VisualTest {
}
Frame {
msec: 2896
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2912
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2928
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2944
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2960
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2976
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 2992
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 3008
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 3024
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "84e1cbf26e6b571603e0b9e69579af8b"
}
Frame {
msec: 3040
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "870d7866b8e289b4843b62c856d769d4"
}
Frame {
msec: 3056
- hash: "316f2ba46d059755576e6822dc77afb2"
+ hash: "870d7866b8e289b4843b62c856d769d4"
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.0.png
new file mode 100644
index 0000000..b064e79
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.1.png
new file mode 100644
index 0000000..7dd1bd8
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.10.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.10.png
new file mode 100644
index 0000000..d8e55e2
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.10.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.2.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.2.png
new file mode 100644
index 0000000..f9f1744
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.3.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.3.png
new file mode 100644
index 0000000..70ae713
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.4.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.4.png
new file mode 100644
index 0000000..9ce28db
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.5.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.5.png
new file mode 100644
index 0000000..2ef2ac0
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.6.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.6.png
new file mode 100644
index 0000000..2a614f8
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.6.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.7.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.7.png
new file mode 100644
index 0000000..f916c97
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.7.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.8.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.8.png
new file mode 100644
index 0000000..56bf00b
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.8.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.9.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.9.png
new file mode 100644
index 0000000..97847d9
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.9.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.qml
new file mode 100644
index 0000000..645b447
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.qml
@@ -0,0 +1,4335 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 32
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 48
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 64
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 80
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 96
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 112
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 128
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 144
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 160
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 176
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 192
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 208
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 224
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 240
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 256
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 272
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 288
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 304
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 320
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 336
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 352
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 368
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 384
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 400
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 416
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 432
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 448
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 464
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 480
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 496
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 512
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 528
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 544
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 560
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 576
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 592
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 608
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 624
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 640
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 656
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 672
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 688
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 704
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 720
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 736
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 752
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 768
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 784
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 800
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 816
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 832
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 848
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 864
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 880
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 896
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 912
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Frame {
+ msec: 928
+ hash: "a6d33b1212bb4d1241734bfff167d1a5"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 85; y: 11
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 944
+ hash: "c83faf1ed7b59715046e1abef04fa546"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 85; y: 11
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 960
+ image: "usingLineEdit.0.png"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 85; y: 11
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 976
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 992
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1008
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1024
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1040
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1056
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 85; y: 11
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1072
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1088
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1104
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1120
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1136
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1152
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1168
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1184
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1200
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1216
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1232
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1248
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1264
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1280
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1296
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1312
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1328
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1344
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1360
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1376
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1392
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1408
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1424
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1440
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1456
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1472
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1488
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1504
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1520
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1536
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1552
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1568
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1584
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1600
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1616
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1632
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1648
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1664
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1680
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1696
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1712
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1728
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1744
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1760
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1776
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1792
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1808
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1824
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1840
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1856
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1872
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1888
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1904
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1920
+ image: "usingLineEdit.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1952
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1968
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 1984
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Key {
+ type: 6
+ key: 67
+ modifiers: 67108864
+ text: "03"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2000
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2016
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2032
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2048
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2064
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2080
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2096
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2112
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Key {
+ type: 7
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2128
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2144
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2160
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2176
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2192
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2208
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2224
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2240
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2256
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2272
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2288
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2304
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2320
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2336
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2352
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2368
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2384
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2400
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2416
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2432
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2448
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2464
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Frame {
+ msec: 2480
+ hash: "3b899cd28b58c3f94946286a0ddcab89"
+ }
+ Key {
+ type: 6
+ key: 16777233
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2496
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2512
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2528
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2544
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2560
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2576
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Key {
+ type: 7
+ key: 16777233
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2592
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2608
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2624
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2640
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2656
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2672
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2688
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2704
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2720
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2736
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2752
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2768
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2784
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2800
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2816
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2832
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2848
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2864
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2880
+ image: "usingLineEdit.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2912
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2928
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2944
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2960
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2976
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 2992
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3008
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3024
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3040
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3056
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3072
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3088
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3104
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3120
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3136
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3152
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3168
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3184
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3200
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Frame {
+ msec: 3216
+ hash: "f2a573f227a3eb84f60418d0f3e81fb3"
+ }
+ Key {
+ type: 6
+ key: 86
+ modifiers: 67108864
+ text: "16"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3232
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3248
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3264
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3280
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3296
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3312
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3328
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Key {
+ type: 7
+ key: 86
+ modifiers: 67108864
+ text: "16"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3344
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3360
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3376
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3392
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3408
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3424
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3440
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3456
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3472
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3488
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3504
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3520
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3536
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Frame {
+ msec: 3552
+ hash: "202ad01bacfb48341efdd85197df6964"
+ }
+ Key {
+ type: 6
+ key: 86
+ modifiers: 67108864
+ text: "16"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3568
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3584
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3600
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3616
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3632
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3648
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3664
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3680
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Key {
+ type: 7
+ key: 86
+ modifiers: 67108864
+ text: "16"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3696
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3712
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3728
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3744
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3760
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3776
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3792
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3808
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3824
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3840
+ image: "usingLineEdit.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3872
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3888
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3904
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3920
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3936
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3952
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3968
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 3984
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4000
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4016
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4032
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4048
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4064
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4080
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4096
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4112
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4128
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4144
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4160
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4176
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4192
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Key {
+ type: 7
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4208
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4224
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4240
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4256
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4272
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4288
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4304
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4320
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4336
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4352
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4368
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4384
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4400
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4416
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4432
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4448
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4464
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4480
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4496
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4512
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4528
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4544
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4560
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4576
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4592
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4608
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4624
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4640
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4656
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4672
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4688
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Frame {
+ msec: 4704
+ hash: "eac37a53473ad7f378a2a1bb37fa6b58"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 69; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4720
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4736
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4752
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4768
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4784
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4800
+ image: "usingLineEdit.4.png"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 69; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4816
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4832
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4848
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4864
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4880
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4896
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4912
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4928
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4944
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4960
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4976
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 4992
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5008
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5024
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5040
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5056
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5072
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5088
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5104
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5120
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5136
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5152
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5168
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5184
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5200
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5216
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5232
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5248
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5264
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5280
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5296
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5312
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5328
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5344
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Frame {
+ msec: 5360
+ hash: "c65ff28e032b18223c65f8810b39d603"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5376
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5392
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5408
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5424
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5440
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5456
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5472
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5488
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5504
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5520
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5536
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5552
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5568
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5584
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5600
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Frame {
+ msec: 5616
+ hash: "8c755780c2d281aba23c507bcebfd5db"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5632
+ hash: "baa42bc9d5e16c3e7af81e126d37655a"
+ }
+ Frame {
+ msec: 5648
+ hash: "baa42bc9d5e16c3e7af81e126d37655a"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5664
+ hash: "aa876e6d6ff0f169bcc3cf25be5e7a81"
+ }
+ Frame {
+ msec: 5680
+ hash: "aa876e6d6ff0f169bcc3cf25be5e7a81"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5696
+ hash: "8ec4c1a8ae28af44dcabf338fc056717"
+ }
+ Frame {
+ msec: 5712
+ hash: "8ec4c1a8ae28af44dcabf338fc056717"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5728
+ hash: "ec0da333c0bc090eec0ded5e4d18bd6e"
+ }
+ Frame {
+ msec: 5744
+ hash: "ec0da333c0bc090eec0ded5e4d18bd6e"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5760
+ image: "usingLineEdit.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "325ba5789a6150ec0fef81fa5b005c09"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5792
+ hash: "023dd8fe428b1ed0f4c994f7e67ac3cd"
+ }
+ Frame {
+ msec: 5808
+ hash: "023dd8fe428b1ed0f4c994f7e67ac3cd"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5824
+ hash: "f661f599f576ae883f25422b20408138"
+ }
+ Frame {
+ msec: 5840
+ hash: "f661f599f576ae883f25422b20408138"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5856
+ hash: "f661f599f576ae883f25422b20408138"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5872
+ hash: "8e7ad34802a0ced493e88b779c73cc47"
+ }
+ Frame {
+ msec: 5888
+ hash: "8e7ad34802a0ced493e88b779c73cc47"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5904
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5920
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 5936
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 5952
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 5968
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 5984
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 6000
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 6016
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 6032
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 6048
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6064
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 6080
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 6096
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 6112
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 6128
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Frame {
+ msec: 6144
+ hash: "943c7ec51fbe8db38fcd3086990fa4e0"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6160
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6176
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6192
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6208
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6224
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6240
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6256
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6272
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6288
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6304
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6320
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6336
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6352
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6368
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6384
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Frame {
+ msec: 6400
+ hash: "bd2e37c4ac90a6389f7f4e1e1360b31b"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6416
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6432
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6448
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6464
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6480
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6496
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6512
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6528
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6544
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6560
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6576
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6592
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6608
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6624
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6640
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6656
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6672
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6688
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6704
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6720
+ image: "usingLineEdit.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6752
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6768
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6784
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6800
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6816
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6832
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6848
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6864
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6880
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6896
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6912
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6928
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Frame {
+ msec: 6944
+ hash: "608bba00320e20da05aa2a6bbcba6e19"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6960
+ hash: "40456a6d22e09e1817b07f3898676524"
+ }
+ Frame {
+ msec: 6976
+ hash: "40456a6d22e09e1817b07f3898676524"
+ }
+ Frame {
+ msec: 6992
+ hash: "40456a6d22e09e1817b07f3898676524"
+ }
+ Frame {
+ msec: 7008
+ hash: "40456a6d22e09e1817b07f3898676524"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7024
+ hash: "40456a6d22e09e1817b07f3898676524"
+ }
+ Frame {
+ msec: 7040
+ hash: "40456a6d22e09e1817b07f3898676524"
+ }
+ Frame {
+ msec: 7056
+ hash: "40456a6d22e09e1817b07f3898676524"
+ }
+ Frame {
+ msec: 7072
+ hash: "40456a6d22e09e1817b07f3898676524"
+ }
+ Frame {
+ msec: 7088
+ hash: "40456a6d22e09e1817b07f3898676524"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7104
+ hash: "dada78341b65c1efb2816e16a8cbe8b5"
+ }
+ Frame {
+ msec: 7120
+ hash: "dada78341b65c1efb2816e16a8cbe8b5"
+ }
+ Frame {
+ msec: 7136
+ hash: "dada78341b65c1efb2816e16a8cbe8b5"
+ }
+ Frame {
+ msec: 7152
+ hash: "dada78341b65c1efb2816e16a8cbe8b5"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7168
+ hash: "dada78341b65c1efb2816e16a8cbe8b5"
+ }
+ Frame {
+ msec: 7184
+ hash: "dada78341b65c1efb2816e16a8cbe8b5"
+ }
+ Frame {
+ msec: 7200
+ hash: "dada78341b65c1efb2816e16a8cbe8b5"
+ }
+ Frame {
+ msec: 7216
+ hash: "dada78341b65c1efb2816e16a8cbe8b5"
+ }
+ Frame {
+ msec: 7232
+ hash: "dada78341b65c1efb2816e16a8cbe8b5"
+ }
+ Frame {
+ msec: 7248
+ hash: "dada78341b65c1efb2816e16a8cbe8b5"
+ }
+ Frame {
+ msec: 7264
+ hash: "dada78341b65c1efb2816e16a8cbe8b5"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7280
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7296
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7312
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7328
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7344
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7360
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7376
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7392
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7408
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7424
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7440
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7456
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7472
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7488
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7504
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7520
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Key {
+ type: 7
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7536
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7552
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7568
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7584
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7600
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7616
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7632
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7648
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7664
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7680
+ image: "usingLineEdit.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7712
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7728
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7744
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7760
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7776
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7792
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7808
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7824
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7840
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7856
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7872
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7888
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7904
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7920
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7936
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7952
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7968
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 7984
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8000
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8016
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8032
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8048
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8064
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8080
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8096
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8112
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8128
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8144
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8160
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8176
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8192
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8208
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8224
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8240
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8256
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8272
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8288
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8304
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8320
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8336
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8352
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8368
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8384
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8400
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8416
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8432
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8448
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8464
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8480
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Frame {
+ msec: 8496
+ hash: "f249bfae1934844abfd5fc158a9c89cf"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 61; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8512
+ hash: "e594125fb367adee5b6acdb1268c86cd"
+ }
+ Frame {
+ msec: 8528
+ hash: "e594125fb367adee5b6acdb1268c86cd"
+ }
+ Frame {
+ msec: 8544
+ hash: "e594125fb367adee5b6acdb1268c86cd"
+ }
+ Frame {
+ msec: 8560
+ hash: "e594125fb367adee5b6acdb1268c86cd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 60; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 58; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8576
+ hash: "e594125fb367adee5b6acdb1268c86cd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 46; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8592
+ hash: "7d4116a8689b6995702a042d974ef74b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 41; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 40; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8608
+ hash: "cb9221f27ac24e4b6b103ca53acad3b3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 32; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8624
+ hash: "074bc6abd9a67db829ae5d6c5f187fb6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 31; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 30; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8640
+ image: "usingLineEdit.8.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 29; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8656
+ hash: "074bc6abd9a67db829ae5d6c5f187fb6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 28; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 27; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8672
+ hash: "074bc6abd9a67db829ae5d6c5f187fb6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 26; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8688
+ hash: "7e403c56d5652321a7701529fc6b8098"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 25; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 24; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8704
+ hash: "7e403c56d5652321a7701529fc6b8098"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 23; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 22; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8720
+ hash: "7e403c56d5652321a7701529fc6b8098"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 20; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 19; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8736
+ hash: "7e403c56d5652321a7701529fc6b8098"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 18; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 17; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8752
+ hash: "2435f2526b3ccc12b7b573872b40e5f1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 16; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 15; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8768
+ hash: "2435f2526b3ccc12b7b573872b40e5f1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 14; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 13; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8784
+ hash: "2435f2526b3ccc12b7b573872b40e5f1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 12; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 11; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8800
+ hash: "2435f2526b3ccc12b7b573872b40e5f1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 10; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 8; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8816
+ hash: "f5a185b954e8b181222cc50075d8ebb6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 6; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 5; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8832
+ hash: "93a00b37c5027650791d1ff589408d0d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 3; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 2; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8848
+ hash: "0b29f6006be3604ef862db7d31f9a434"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 0; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -1; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8864
+ hash: "8390b63b71e1452cb93c576a3f2395e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -2; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -3; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8880
+ hash: "72298910946a4e1a9ccc4520d99e9420"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -5; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -6; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8896
+ hash: "17d349b0ed29d6aa57bf8fda9a55abf8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -7; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -9; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8912
+ hash: "01e8a877d51f5564aaf2f11e7aadbc4a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -10; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -11; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8928
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -12; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -13; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8944
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -14; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -15; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8960
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 8976
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -16; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -17; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8992
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -18; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9008
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9024
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9040
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9056
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9072
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9088
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9104
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9120
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9136
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9152
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9168
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9184
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Frame {
+ msec: 9200
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -17; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9216
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -16; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9232
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -14; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -13; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9248
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -11; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -10; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9264
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -8; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -7; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9280
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -6; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -5; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9296
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -3; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -1; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9312
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 1; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 3; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9328
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 4; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 6; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9344
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 7; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 8; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9360
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 10; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 11; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9376
+ hash: "bc8f49abd277f5f15d422341de212183"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 12; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 14; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9392
+ hash: "12e705f08ff90fd8ddb1937e5a7e23a0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 15; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 17; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9408
+ hash: "12e705f08ff90fd8ddb1937e5a7e23a0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 21; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 24; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9424
+ hash: "4daae0f05ff1b7ef68ed1d839b113dc4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 27; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 30; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9440
+ hash: "a1186544d7f5576e6ccbbd7938c1c374"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 33; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 35; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9456
+ hash: "6ce09c9a06135d2280e4f7bc1c81b70e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 38; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 39; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9472
+ hash: "6ce09c9a06135d2280e4f7bc1c81b70e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 43; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 45; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9488
+ hash: "035b177c3cacd8cdef807d5673de4607"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 48; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 50; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9504
+ hash: "7b7e3c4600f3af7bd0f45799661db993"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 51; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 53; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9520
+ hash: "7b7e3c4600f3af7bd0f45799661db993"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 55; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9536
+ hash: "7b7e3c4600f3af7bd0f45799661db993"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 56; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 58; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9552
+ hash: "859950e1cf496ef830a30b3a0ec801ac"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 61; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 64; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9568
+ hash: "859950e1cf496ef830a30b3a0ec801ac"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 67; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 70; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9584
+ hash: "be7343825b6adcb16f49e20ee2bdf19f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 73; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 74; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9600
+ image: "usingLineEdit.9.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 76; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9616
+ hash: "597923ce1046fbf4b728545c54c97fa5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 77; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 78; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9632
+ hash: "597923ce1046fbf4b728545c54c97fa5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 79; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 80; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9648
+ hash: "597923ce1046fbf4b728545c54c97fa5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 81; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 84; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9664
+ hash: "2fc5c42f94350f28ae0117bc7f6daff1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 85; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 88; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9680
+ hash: "4b4ec69d583151f1a64052d696966f9c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 89; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 91; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9696
+ hash: "0882a25ac1c2b534367736d825a73630"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 92; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 94; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9712
+ hash: "d5b6acc155f827c05b0c4c289a2e3eec"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 95; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 96; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9728
+ hash: "a05b3f2f9f22249ab694ac45e1de7b85"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 98; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 100; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9744
+ hash: "5b0e034813f8543627f370efdcf3591e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 102; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 104; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9760
+ hash: "5b8d80b9d7e2a8c1a24c28e127d0f7e5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 105; y: 39
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 108; y: 39
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9776
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 109; y: 39
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 110; y: 39
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9792
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 39
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9808
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 112; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9824
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 113; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9840
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 114; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9856
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 9872
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 115; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9888
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 116; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9904
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 117; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9920
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 118; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9936
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 9952
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 119; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9968
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 120; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9984
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 121; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10000
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10016
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 122; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10032
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10048
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10064
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10080
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10096
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10112
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10128
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10144
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10160
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10176
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10192
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10208
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10224
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10240
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 122; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10256
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10272
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10288
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10304
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10320
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10336
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10352
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10368
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10384
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10400
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10416
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10432
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10448
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10464
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10480
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10496
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10512
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10528
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10544
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10560
+ image: "usingLineEdit.10.png"
+ }
+ Frame {
+ msec: 10576
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10592
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10608
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10624
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10640
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10656
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10672
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10688
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10704
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10720
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10736
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10752
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10768
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10784
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10800
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10816
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10832
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10848
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10864
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10880
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10896
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10912
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10928
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10944
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10960
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10976
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 10992
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11008
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11024
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11040
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11056
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11072
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11088
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11104
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11120
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11136
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11152
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11168
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11184
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11200
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11216
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11232
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11248
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+ Frame {
+ msec: 11264
+ hash: "66715d4a4f83d0e5905adbc4c459b0fb"
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml
index b0b50e4..ed8bc2c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml
@@ -4,7 +4,7 @@ Item{
height: 50; width: 200
Column{
//Not an exhaustive echo mode test, that's in QLineEdit (since the functionality is in QLineControl)
- TextInput{ id: main; focus: true; echoMode: TextInput.Password }
+ TextInput{ id: main; focus: true; echoMode: TextInput.Password; passwordCharacter: '.' }
Text{ text: main.text }
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/usingLineEdit.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/usingLineEdit.qml
new file mode 100644
index 0000000..2465866
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/usingLineEdit.qml
@@ -0,0 +1,10 @@
+import Qt 4.7
+
+Rectangle{
+ width: 600
+ height: 200
+ Column{
+ LineEdit{text: 'Hello world'}
+ LineEdit{text: 'Hello underwhelmingly verbose world'; width: 80; height: 24;}
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/qmlvisual.pro b/tests/auto/declarative/qmlvisual/qmlvisual.pro
index f2b3bca..a3abbe3 100644
--- a/tests/auto/declarative/qmlvisual/qmlvisual.pro
+++ b/tests/auto/declarative/qmlvisual/qmlvisual.pro
@@ -5,3 +5,6 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qmlvisual.cpp
DEFINES += QT_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
index 91f8486..681b530 100644
--- a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
+++ b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
@@ -47,7 +47,7 @@
#include <QProcess>
#include <QFile>
-enum Mode { Record, RecordNoVisuals, Play, TestVisuals, RemoveVisuals, UpdateVisuals, UpdatePlatformVisuals, Test };
+enum Mode { Record, RecordNoVisuals, RecordSnapshot, Play, TestVisuals, RemoveVisuals, UpdateVisuals, UpdatePlatformVisuals, Test };
static QString testdir;
class tst_qmlvisual : public QObject
@@ -100,12 +100,35 @@ void tst_qmlvisual::visual_data()
if (qgetenv("QMLVISUAL_ALL") != "")
files << findQmlFiles(QDir(QT_TEST_SOURCE_DIR));
else {
+ //these are newly added tests we want to try out in CI (then move to the stable list)
+ files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/borders.qml";
+ files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/animated.qml";
+ files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/animated-smooth.qml";
+ files << QT_TEST_SOURCE_DIR "/qdeclarativeflipable/test-flipable.qml";
+ files << QT_TEST_SOURCE_DIR "/qdeclarativepositioners/usingRepeater.qml";
+
//these are tests we think are stable and useful enough to be run by the CI system
- files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/mousearea-visual.qml";
- files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/drag.qml";
- files << QT_TEST_SOURCE_DIR "/animation/pauseAnimation/pauseAnimation-visual.qml";
+ files << QT_TEST_SOURCE_DIR "/animation/bindinganimation/bindinganimation.qml";
+ files << QT_TEST_SOURCE_DIR "/animation/loop/loop.qml";
+ files << QT_TEST_SOURCE_DIR "/animation/parallelAnimation/parallelAnimation-visual.qml";
files << QT_TEST_SOURCE_DIR "/animation/parentAnimation/parentAnimation-visual.qml";
files << QT_TEST_SOURCE_DIR "/animation/reanchor/reanchor.qml";
+ files << QT_TEST_SOURCE_DIR "/animation/scriptAction/scriptAction-visual.qml";
+ files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/drag.qml";
+ files << QT_TEST_SOURCE_DIR "/fillmode/fillmode.qml";
+
+ //these reliably fail in CI, for unknown reasons
+ //files << QT_TEST_SOURCE_DIR "/animation/easing/easing.qml";
+ //files << QT_TEST_SOURCE_DIR "/animation/pauseAnimation/pauseAnimation-visual.qml";
+
+ //these reliably fail on Linux because of color interpolation (different float rounding)
+#if !defined(Q_WS_X11) && !defined(Q_WS_QWS)
+ files << QT_TEST_SOURCE_DIR "/animation/colorAnimation/colorAnimation-visual.qml";
+ files << QT_TEST_SOURCE_DIR "/animation/propertyAction/propertyAction-visual.qml";
+#endif
+
+ //this is unstable because the MouseArea press-and-hold timer is not synchronized to the animation framework.
+ //files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/mousearea-visual.qml";
}
foreach (const QString &file, files) {
@@ -125,7 +148,7 @@ void tst_qmlvisual::visual()
QStringList arguments;
arguments << "-script" << testdata
<< "-scriptopts" << "play,testimages,testerror,exitoncomplete,exitonfailure"
- << file << "-graphicssystem" << "raster";
+ << file;
#ifdef Q_WS_QWS
arguments << "-qws";
#endif
@@ -238,6 +261,11 @@ void action(Mode mode, const QString &file)
<< "-scriptopts" << "record,saveonexit"
<< file;
break;
+ case RecordSnapshot:
+ arguments << "-script" << testdata
+ << "-scriptopts" << "record,testimages,snapshot,saveonexit"
+ << file;
+ break;
case Play:
arguments << "-script" << testdata
<< "-scriptopts" << "play,testimages,testerror,exitoncomplete"
@@ -275,6 +303,7 @@ void usage()
fprintf(stderr, " -listtests : list all the tests seen by tst_qmlvisual, and then exit immediately\n");
fprintf(stderr, " -record file : record new test data for file\n");
fprintf(stderr, " -recordnovisuals file : record new test data for file, but ignore visuals\n");
+ fprintf(stderr, " -recordsnapshot file : record new snapshot for file (like record but only records a single frame and then exits)\n");
fprintf(stderr, " -play file : playback test data for file, printing errors\n");
fprintf(stderr, " -testvisuals file : playback test data for file, without errors\n");
fprintf(stderr, " -updatevisuals file : playback test data for file, accept new visuals for file\n");
@@ -332,6 +361,9 @@ int main(int argc, char **argv)
} else if (arg == "-recordnovisuals" && (ii + 1) < argc) {
mode = RecordNoVisuals;
file = argv[++ii];
+ } else if (arg == "-recordsnapshot" && (ii + 1) < argc) {
+ mode = RecordSnapshot;
+ file = argv[++ii];
} else if (arg == "-testvisuals" && (ii + 1) < argc) {
mode = TestVisuals;
file = argv[++ii];
diff --git a/tests/auto/declarative/qmlvisual/webview/embedding/egg.qml b/tests/auto/declarative/qmlvisual/webview/embedding/egg.qml
index fe1bb70..711a747 100644
--- a/tests/auto/declarative/qmlvisual/webview/embedding/egg.qml
+++ b/tests/auto/declarative/qmlvisual/webview/embedding/egg.qml
@@ -1,8 +1,8 @@
import Qt 4.6
Item {
- property var period : 250
- property var color : "black"
+ property variant period : 250
+ property variant color : "black"
id: root
Item {
diff --git a/tests/auto/declarative/qpacketprotocol/qpacketprotocol.pro b/tests/auto/declarative/qpacketprotocol/qpacketprotocol.pro
index f42cecc..7ffda93 100644
--- a/tests/auto/declarative/qpacketprotocol/qpacketprotocol.pro
+++ b/tests/auto/declarative/qpacketprotocol/qpacketprotocol.pro
@@ -5,3 +5,5 @@ macx:CONFIG -= app_bundle
HEADERS += ../shared/debugutil_p.h
SOURCES += tst_qpacketprotocol.cpp \
../shared/debugutil.cpp
+
+CONFIG += parallel_test
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result
index 2f21de2..53d7a25 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result
@@ -98,7 +98,7 @@
<location filename="main.cpp" line="238"/>
<source></source>
<comment>This is a comment to the translator.</comment>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
</context>
<context>
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
index 6e73d6d..0765bfc 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
@@ -252,3 +252,26 @@ class YetAnotherTest : QObject {
//: This is a message without a source string
QString test = qtTrId("yet_another_id");
+
+
+
+// QTBUG-9276: context in static initializers
+class Bogus : QObject {
+ Q_OBJECT
+
+ static const char * const s_strings[];
+};
+
+const char * const Bogus::s_strings[] = {
+ QT_TR_NOOP("this should be in Bogus")
+};
+
+const char * const Bogus::s_strings[SIZE] = {
+ QT_TR_NOOP("this should be in Bogus")
+};
+
+void bogosity()
+{
+ // no spaces here. test collateral damage from ignoring equal sign
+ Class::member=QObject::tr("just QObject");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
index 6d50c21..208191d 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
@@ -26,6 +26,15 @@ backslashed \ stuff.</source>
</message>
</context>
<context>
+ <name>Bogus</name>
+ <message>
+ <location filename="main.cpp" line="266"/>
+ <location filename="main.cpp" line="270"/>
+ <source>this should be in Bogus</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>Dialog2</name>
<message numerus="yes">
<location filename="main.cpp" line="70"/>
@@ -184,6 +193,14 @@ backslashed \ stuff.</source>
</message>
</context>
<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="276"/>
+ <source>just QObject</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>QTranslator</name>
<message>
<location filename="main.cpp" line="93"/>
diff --git a/tests/auto/macgui/tst_macgui.cpp b/tests/auto/macgui/tst_macgui.cpp
index 847ba4b..7f558a3 100644
--- a/tests/auto/macgui/tst_macgui.cpp
+++ b/tests/auto/macgui/tst_macgui.cpp
@@ -60,7 +60,6 @@ private slots:
void dummy();
void splashScreenModality();
- void dialogModality();
void nonModalOrder();
void spinBoxArrowButtons();
@@ -157,32 +156,6 @@ void tst_MacGui::splashScreenModality()
QVERIFY(QTestEventLoop::instance().timeout() == false);
}
-
-/*
- Test that a non-modal dialog created as a child of a modal dialog is
- shown in front.
-*/
-void tst_MacGui::dialogModality()
-{
- QDialog d;
- d.setModal(true);
- d.show();
-
- QProgressDialog progress(&d);
- progress.setValue(2);
-
- InterfaceChildPair interface = wn.find(QAccessible::Name, "Cancel", &progress);
- QVERIFY(interface.iface);
- const int delay = 2000;
- clickLater(interface, Qt::LeftButton, delay);
-
- connect(&progress, SIGNAL(canceled()), SLOT(exitLoopSlot()));
-
- const int timeout = 3;
- QTestEventLoop::instance().enterLoop(timeout);
- QVERIFY(QTestEventLoop::instance().timeout() == false);
-}
-
class PrimaryWindowDialog : public QDialog
{
Q_OBJECT
diff --git a/tests/auto/macnativeevents/expectedeventlist.cpp b/tests/auto/macnativeevents/expectedeventlist.cpp
new file mode 100644
index 0000000..b1fb9a6
--- /dev/null
+++ b/tests/auto/macnativeevents/expectedeventlist.cpp
@@ -0,0 +1,176 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "expectedeventlist.h"
+#include <QDebug>
+#include <QCoreApplication>
+#include <QAbstractEventDispatcher>
+#include <QtTest/QtTest>
+
+ExpectedEventList::ExpectedEventList(QObject *target)
+ : QObject(target), eventCount(0)
+{
+ target->installEventFilter(this);
+ debug = !qgetenv("NATIVEDEBUG").isEmpty();
+}
+
+ExpectedEventList::~ExpectedEventList()
+{
+ qDeleteAll(eventList);
+}
+
+void ExpectedEventList::append(QEvent *e)
+{
+ eventList.append(e);
+ ++eventCount;
+}
+
+void ExpectedEventList::timerEvent(QTimerEvent *)
+{
+ timer.stop();
+ QAbstractEventDispatcher::instance()->interrupt();
+}
+
+bool ExpectedEventList::waitForAllEvents(int maxEventWaitTime)
+{
+ if (eventList.isEmpty())
+ return true;
+
+ int eventCount = eventList.size();
+ timer.start(maxEventWaitTime, this);
+
+ while (timer.isActive()) {
+ QCoreApplication::processEvents(QEventLoop::WaitForMoreEvents);
+ if (eventList.isEmpty())
+ return true;
+
+ if (eventCount < eventList.size()){
+ eventCount = eventList.size();
+ timer.start(maxEventWaitTime, this);
+ }
+ }
+
+ int eventListNr = eventCount - eventList.size() + 1;
+ qWarning() << "Stopped waiting for expected event nr" << eventListNr;
+ return false;
+}
+
+void ExpectedEventList::compareMouseEvents(QEvent *received, QEvent *expected)
+{
+ QMouseEvent *e1 = static_cast<QMouseEvent *>(received);
+ QMouseEvent *e2 = static_cast<QMouseEvent *>(expected);
+ if (e1->pos() == e2->pos()
+ && (e1->globalPos() == e2->globalPos())
+ && (e1->button() == e2->button())
+ && (e1->buttons() == e2->buttons())
+ && (e1->modifiers() == e2->modifiers()))
+ return; // equal
+
+ int eventListNr = eventCount - eventList.size();
+ if (!debug) {
+ qWarning() << "Expected event" << eventListNr << "differs from received event:";
+ QCOMPARE(e1->pos(), e2->pos());
+ QCOMPARE(e1->globalPos(), e2->globalPos());
+ QCOMPARE(e1->button(), e2->button());
+ QCOMPARE(e1->buttons(), e2->buttons());
+ QCOMPARE(e1->modifiers(), e2->modifiers());
+ } else {
+ qWarning() << "*** FAIL *** : Expected event" << eventListNr << "differs from received event:";
+ qWarning() << "Received:" << e1 << e1->globalPos();
+ qWarning() << "Expected:" << e2 << e2->globalPos();
+ }
+}
+
+void ExpectedEventList::compareKeyEvents(QEvent *event1, QEvent *event2)
+{
+ QKeyEvent *e1 = static_cast<QKeyEvent *>(event1);
+ QKeyEvent *e2 = static_cast<QKeyEvent *>(event2);
+ Q_UNUSED(e1);
+ Q_UNUSED(e2);
+}
+
+bool ExpectedEventList::eventFilter(QObject *, QEvent *received)
+{
+ if (debug)
+ qDebug() << received;
+ if (eventList.isEmpty())
+ return false;
+
+ QEvent *expected = eventList.first();
+ if (expected->type() == received->type()) {
+ eventList.removeFirst();
+ switch (received->type()) {
+ case QEvent::MouseButtonPress:
+ case QEvent::MouseButtonRelease:
+ case QEvent::MouseMove:
+ case QEvent::MouseButtonDblClick:
+ case QEvent::NonClientAreaMouseButtonPress:
+ case QEvent::NonClientAreaMouseButtonRelease:
+ case QEvent::NonClientAreaMouseButtonDblClick:
+ case QEvent::NonClientAreaMouseMove: {
+ compareMouseEvents(received, expected);
+ break;
+ }
+ case QEvent::KeyPress: {
+ break;
+ }
+ case QEvent::KeyRelease: {
+ break;
+ }
+ case QEvent::Resize: {
+ break;
+ }
+ case QEvent::WindowActivate: {
+ break;
+ }
+ case QEvent::WindowDeactivate: {
+ break;
+ }
+ default:
+ break;
+ }
+ if (eventList.isEmpty())
+ QAbstractEventDispatcher::instance()->interrupt();
+ }
+
+ return false;
+}
+
diff --git a/tests/auto/macnativeevents/expectedeventlist.h b/tests/auto/macnativeevents/expectedeventlist.h
new file mode 100644
index 0000000..bd9f358
--- /dev/null
+++ b/tests/auto/macnativeevents/expectedeventlist.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EVENTFILTER
+#define EVENTFILTER
+
+#include <QWidget>
+#include <QList>
+#include <QEvent>
+#include <QBasicTimer>
+
+class ExpectedEventList : public QObject
+{
+ QList<QEvent *> eventList;
+ QBasicTimer timer;
+ bool debug;
+ int eventCount;
+ void timerEvent(QTimerEvent *);
+
+public:
+ ExpectedEventList(QObject *target);
+ ~ExpectedEventList();
+ void append(QEvent *e);
+ bool waitForAllEvents(int timeoutPerEvent = 2000);
+ bool eventFilter(QObject *obj, QEvent *event);
+
+private:
+ void compareMouseEvents(QEvent *event1, QEvent *event2);
+ void compareKeyEvents(QEvent *event1, QEvent *event2);
+};
+
+#endif
+
diff --git a/tests/auto/macnativeevents/macnativeevents.pro b/tests/auto/macnativeevents/macnativeevents.pro
index a0293d4..af34942 100644
--- a/tests/auto/macnativeevents/macnativeevents.pro
+++ b/tests/auto/macnativeevents/macnativeevents.pro
@@ -8,9 +8,9 @@ DEPENDPATH += .
INCLUDEPATH += .
LIBS += -framework Carbon
-HEADERS += qnativeinput.h qnativeplayer.h
-SOURCES += qnativeinput.cpp qnativeplayer.cpp qnativeinput_mac.cpp
-
+HEADERS += qnativeevents.h nativeeventlist.h expectedeventlist.h
+SOURCES += qnativeevents.cpp qnativeevents_mac.cpp
+SOURCES += expectedeventlist.cpp nativeeventlist.cpp
SOURCES += tst_macnativeevents.cpp
requires(mac)
diff --git a/tests/auto/macnativeevents/qnativeplayer.cpp b/tests/auto/macnativeevents/nativeeventlist.cpp
index 92298ef..d5d7b95 100644
--- a/tests/auto/macnativeevents/qnativeplayer.cpp
+++ b/tests/auto/macnativeevents/nativeeventlist.cpp
@@ -39,22 +39,26 @@
**
****************************************************************************/
-#include "qnativeplayer.h"
+#include "nativeeventlist.h"
-QNativePlayer::QNativePlayer()
+NativeEventList::NativeEventList(int defaultWaitMs)
+ : playbackMultiplier(1.0)
+ , currIndex(-1)
+ , wait(false)
+ , defaultWaitMs(defaultWaitMs)
{
- currIndex = -1;
- playbackMultiplier = 1.0;
- wait = false;
+ QString multiplier = qgetenv("NATIVEDEBUG");
+ if (!multiplier.isEmpty())
+ setTimeMultiplier(multiplier.toFloat());
}
-QNativePlayer::~QNativePlayer()
+NativeEventList::~NativeEventList()
{
for (int i=0; i<eventList.size(); i++)
delete eventList.takeAt(i).second;
}
-void QNativePlayer::sendNextEvent()
+void NativeEventList::sendNextEvent()
{
QNativeEvent *e = eventList.at(currIndex).second;
if (e)
@@ -62,7 +66,7 @@ void QNativePlayer::sendNextEvent()
waitNextEvent();
}
-void QNativePlayer::waitNextEvent()
+void NativeEventList::waitNextEvent()
{
if (++currIndex >= eventList.size()){
emit done();
@@ -74,12 +78,22 @@ void QNativePlayer::waitNextEvent()
QTimer::singleShot(interval * playbackMultiplier, this, SLOT(sendNextEvent()));
}
-void QNativePlayer::append(int waitMs, QNativeEvent *event)
+void NativeEventList::append(QNativeEvent *event)
+{
+ eventList.append(QPair<int, QNativeEvent *>(defaultWaitMs, event));
+}
+
+void NativeEventList::append(int waitMs, QNativeEvent *event)
{
eventList.append(QPair<int, QNativeEvent *>(waitMs, event));
}
-void QNativePlayer::play(Playback playback)
+void NativeEventList::append(int waitMs)
+{
+ eventList.append(QPair<int, QNativeEvent *>(waitMs, 0));
+}
+
+void NativeEventList::play(Playback playback)
{
waitNextEvent();
@@ -88,52 +102,14 @@ void QNativePlayer::play(Playback playback)
QCoreApplication::processEvents(QEventLoop::WaitForMoreEvents);
}
-void QNativePlayer::stop()
+void NativeEventList::stop()
{
wait = false;
QAbstractEventDispatcher::instance()->interrupt();
}
-// ************************************************************************
-
-QEventOutputList::QEventOutputList()
-{
- wait = true;
-}
-
-QEventOutputList::~QEventOutputList()
+void NativeEventList::setTimeMultiplier(float multiplier)
{
- qDeleteAll(*this);
+ playbackMultiplier = multiplier;
}
-bool QEventOutputList::waitUntilEmpty(int maxEventWaitTime)
-{
- int currSize = size();
- QTime time;
- time.restart();
- while (wait){
- QCoreApplication::processEvents(QEventLoop::AllEvents, 50);
-
- if (isEmpty()){
- return true;
- }
- else if (currSize == size()){
- if (time.elapsed() > maxEventWaitTime){
- return false;
- }
- }
- else{
- currSize = size();
- time.restart();
- }
- }
- return false;
-}
-
-void QEventOutputList::sleep(int sleepTime)
-{
- QTime time;
- time.restart();
- while (time.elapsed() < sleepTime)
- QCoreApplication::processEvents(QEventLoop::AllEvents, 50);
-}
diff --git a/tests/auto/macnativeevents/qnativeplayer.h b/tests/auto/macnativeevents/nativeeventlist.h
index 61ee162..688665d 100644
--- a/tests/auto/macnativeevents/qnativeplayer.h
+++ b/tests/auto/macnativeevents/nativeeventlist.h
@@ -43,22 +43,25 @@
#define Q_NATIVE_PLAYBACK
#include <QtCore>
-#include "qnativeinput.h"
+#include "qnativeevents.h"
-class QNativePlayer : public QObject
+class NativeEventList : public QObject
{
Q_OBJECT;
public:
enum Playback {ReturnImmediately, WaitUntilFinished};
- QNativePlayer();
- ~QNativePlayer();
+ NativeEventList(int defaultWaitMs = 20);
+ ~NativeEventList();
+ void append(QNativeEvent *event);
void append(int waitMs, QNativeEvent *event = 0);
+ void append(int waitMs);
+
void play(Playback playback = WaitUntilFinished);
void stop();
- float playbackMultiplier;
+ void setTimeMultiplier(float multiplier);
signals:
void done();
@@ -66,27 +69,14 @@ signals:
private slots:
void sendNextEvent();
- private:
+private:
void waitNextEvent();
QList<QPair<int, QNativeEvent *> > eventList;
+ float playbackMultiplier;
int currIndex;
bool wait;
+ int defaultWaitMs;
};
-// ******************************************************************
-
-class QEventOutputList : public QList<QEvent *>
-{
-public:
- QEventOutputList();
- ~QEventOutputList();
- bool waitUntilEmpty(int maxEventWaitTime = 1000);
- bool wait;
-
- // Useful method. Just sleep and process events:
- static void sleep(int sleepTime);
-};
-
-
#endif
diff --git a/tests/auto/macnativeevents/qnativeinput.cpp b/tests/auto/macnativeevents/qnativeevents.cpp
index c9462a6..cb4b82e 100644
--- a/tests/auto/macnativeevents/qnativeinput.cpp
+++ b/tests/auto/macnativeevents/qnativeevents.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qnativeinput.h"
+#include "qnativeevents.h"
QNativeInput::QNativeInput(bool subscribe)
{
diff --git a/tests/auto/macnativeevents/qnativeinput.h b/tests/auto/macnativeevents/qnativeevents.h
index a98e4e4..a98e4e4 100644
--- a/tests/auto/macnativeevents/qnativeinput.h
+++ b/tests/auto/macnativeevents/qnativeevents.h
diff --git a/tests/auto/macnativeevents/qnativeinput_mac.cpp b/tests/auto/macnativeevents/qnativeevents_mac.cpp
index 143a633..6c04bf3 100644
--- a/tests/auto/macnativeevents/qnativeinput_mac.cpp
+++ b/tests/auto/macnativeevents/qnativeevents_mac.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qnativeinput.h"
+#include "qnativeevents.h"
#include <Carbon/Carbon.h>
#include <QtCore>
diff --git a/tests/auto/macnativeevents/tst_macnativeevents.cpp b/tests/auto/macnativeevents/tst_macnativeevents.cpp
index ccadd54..70a14f5 100644
--- a/tests/auto/macnativeevents/tst_macnativeevents.cpp
+++ b/tests/auto/macnativeevents/tst_macnativeevents.cpp
@@ -41,11 +41,13 @@
#include <QApplication>
#include <QWidget>
+#include <QDialog>
#include <QPushButton>
#include <QtTest/QtTest>
-#include "qnativeinput.h"
-#include "qnativeplayer.h"
+#include "qnativeevents.h"
+#include "nativeeventlist.h"
+#include "expectedeventlist.h"
#ifdef Q_OS_MAC
@@ -55,19 +57,254 @@ class tst_MacNativeEvents : public QObject
{
Q_OBJECT
private slots:
- void testLeftMousePressRelease();
+ void testMouseMoveLocation();
+ void testPushButtonPressRelease();
+ void testMouseLeftDoubleClick();
+ void stressTestMouseLeftDoubleClick();
+ void testMouseDragInside();
+ void testMouseDragOutside();
+ void testMouseDragToNonClientArea();
+ void testDragWindow();
+ void testMouseEnter();
+ void testChildDialogInFrontOfModalParent();
};
-void tst_MacNativeEvents::testLeftMousePressRelease()
+void tst_MacNativeEvents::testMouseMoveLocation()
{
+ QWidget w;
+ w.setMouseTracking(true);
+ w.show();
+ QPoint p = w.geometry().center();
+
+ NativeEventList native;
+ native.append(new QNativeMouseMoveEvent(p, Qt::NoModifier));
+
+ ExpectedEventList expected(&w);
+ expected.append(new QMouseEvent(QEvent::MouseMove, w.mapFromGlobal(p), p, Qt::NoButton, Qt::NoButton, Qt::NoModifier));
+
+ native.play();
+ QVERIFY2(expected.waitForAllEvents(), "the test did not receive all expected events!");
+}
+
+void tst_MacNativeEvents::testPushButtonPressRelease()
+{
+ // Check that a native mouse press and release generates the
+ // same qevents on a pushbutton:
QPushButton w("click me");
w.show();
QPoint p = w.geometry().center();
- QNativePlayer player;
- player.append(50, new QNativeMouseButtonEvent(p, Qt::LeftButton, 1, Qt::NoModifier));
- player.append(50, new QNativeMouseButtonEvent(p, Qt::LeftButton, 0, Qt::NoModifier));
- player.play();
+ NativeEventList native;
+ native.append(new QNativeMouseButtonEvent(p, Qt::LeftButton, 1, Qt::NoModifier));
+ native.append(new QNativeMouseButtonEvent(p, Qt::LeftButton, 0, Qt::NoModifier));
+
+ ExpectedEventList expected(&w);
+ expected.append(new QMouseEvent(QEvent::MouseButtonPress, w.mapFromGlobal(p), p, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseButtonRelease, w.mapFromGlobal(p), p, Qt::LeftButton, Qt::NoButton, Qt::NoModifier));
+
+ native.play();
+ QVERIFY2(expected.waitForAllEvents(), "the test did not receive all expected events!");
+}
+
+void tst_MacNativeEvents::testMouseLeftDoubleClick()
+{
+ // Check that a native double click makes
+ // the test widget receive a press-release-click-release:
+ QWidget w;
+ w.show();
+ QPoint p = w.geometry().center();
+
+ NativeEventList native;
+ native.append(new QNativeMouseButtonEvent(p, Qt::LeftButton, 1, Qt::NoModifier));
+ native.append(new QNativeMouseButtonEvent(p, Qt::LeftButton, 0, Qt::NoModifier));
+ native.append(new QNativeMouseButtonEvent(p, Qt::LeftButton, 2, Qt::NoModifier));
+ native.append(new QNativeMouseButtonEvent(p, Qt::LeftButton, 0, Qt::NoModifier));
+
+ ExpectedEventList expected(&w);
+ expected.append(new QMouseEvent(QEvent::MouseButtonPress, w.mapFromGlobal(p), p, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseButtonRelease, w.mapFromGlobal(p), p, Qt::LeftButton, Qt::NoButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseButtonDblClick, w.mapFromGlobal(p), p, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseButtonRelease, w.mapFromGlobal(p), p, Qt::LeftButton, Qt::NoButton, Qt::NoModifier));
+
+ native.play();
+ QVERIFY2(expected.waitForAllEvents(), "the test did not receive all expected events!");
+}
+
+void tst_MacNativeEvents::stressTestMouseLeftDoubleClick()
+{
+ // Check that multiple, fast, double clicks makes
+ // the test widget receive correct click events
+ QWidget w;
+ w.show();
+ QPoint p = w.geometry().center();
+
+ NativeEventList native;
+ ExpectedEventList expected(&w);
+
+ for (int i=0; i<10; ++i){
+ native.append(new QNativeMouseButtonEvent(p, Qt::LeftButton, 1, Qt::NoModifier));
+ native.append(new QNativeMouseButtonEvent(p, Qt::LeftButton, 0, Qt::NoModifier));
+ native.append(new QNativeMouseButtonEvent(p, Qt::LeftButton, 2, Qt::NoModifier));
+ native.append(new QNativeMouseButtonEvent(p, Qt::LeftButton, 0, Qt::NoModifier));
+
+ expected.append(new QMouseEvent(QEvent::MouseButtonPress, w.mapFromGlobal(p), p, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseButtonRelease, w.mapFromGlobal(p), p, Qt::LeftButton, Qt::NoButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseButtonDblClick, w.mapFromGlobal(p), p, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseButtonRelease, w.mapFromGlobal(p), p, Qt::LeftButton, Qt::NoButton, Qt::NoModifier));
+ }
+
+ native.play();
+ QVERIFY2(expected.waitForAllEvents(), "the test did not receive all expected events!");
+}
+
+void tst_MacNativeEvents::testMouseDragInside()
+{
+ // Check that a mouse drag inside a widget
+ // will cause press-move-release events to be delivered
+ QWidget w;
+ w.show();
+ QPoint p1 = w.geometry().center();
+ QPoint p2 = p1 - QPoint(10, 0);
+ QPoint p3 = p1 - QPoint(20, 0);
+ QPoint p4 = p1 - QPoint(30, 0);
+
+ NativeEventList native;
+ native.append(new QNativeMouseButtonEvent(p1, Qt::LeftButton, 1, Qt::NoModifier));
+ native.append(new QNativeMouseDragEvent(p2, Qt::LeftButton, Qt::NoModifier));
+ native.append(new QNativeMouseDragEvent(p3, Qt::LeftButton, Qt::NoModifier));
+ native.append(new QNativeMouseButtonEvent(p4, Qt::LeftButton, 0, Qt::NoModifier));
+
+ ExpectedEventList expected(&w);
+ expected.append(new QMouseEvent(QEvent::MouseButtonPress, w.mapFromGlobal(p1), p1, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseMove, w.mapFromGlobal(p2), p2, Qt::NoButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseMove, w.mapFromGlobal(p3), p3, Qt::NoButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseButtonRelease, w.mapFromGlobal(p4), p4, Qt::LeftButton, Qt::NoButton, Qt::NoModifier));
+
+ native.play();
+ QVERIFY2(expected.waitForAllEvents(), "the test did not receive all expected events!");
+}
+
+void tst_MacNativeEvents::testMouseDragOutside()
+{
+ // Check that if we drag the mouse from inside the
+ // widget, and release it outside, we still get mouse move
+ // and release events when the mouse is outside the widget.
+ QWidget w;
+ w.show();
+ QPoint inside1 = w.geometry().center();
+ QPoint inside2 = inside1 - QPoint(10, 0);
+ QPoint outside1 = w.geometry().topLeft() - QPoint(50, 0);
+ QPoint outside2 = outside1 - QPoint(10, 0);
+
+ NativeEventList native;
+ native.append(new QNativeMouseButtonEvent(inside1, Qt::LeftButton, 1, Qt::NoModifier));
+ native.append(new QNativeMouseDragEvent(inside2, Qt::LeftButton, Qt::NoModifier));
+ native.append(new QNativeMouseDragEvent(outside1, Qt::LeftButton, Qt::NoModifier));
+ native.append(new QNativeMouseButtonEvent(outside2, Qt::LeftButton, 0, Qt::NoModifier));
+
+ ExpectedEventList expected(&w);
+ expected.append(new QMouseEvent(QEvent::MouseButtonPress, w.mapFromGlobal(inside1), inside1, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseMove, w.mapFromGlobal(inside2), inside2, Qt::NoButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseMove, w.mapFromGlobal(outside1), outside1, Qt::NoButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseButtonRelease, w.mapFromGlobal(outside2), outside2, Qt::LeftButton, Qt::NoButton, Qt::NoModifier));
+
+ native.play();
+ QVERIFY2(expected.waitForAllEvents(), "the test did not receive all expected events!");
+}
+
+void tst_MacNativeEvents::testMouseDragToNonClientArea()
+{
+ // Check that if we drag the mouse from inside the
+ // widget, and release it on the title bar, we still get mouse move
+ // and release events when the mouse is on the title bar
+ QWidget w;
+ w.show();
+ QPoint inside1 = w.geometry().center();
+ QPoint inside2 = inside1 - QPoint(10, 0);
+ QPoint titlebar1 = w.geometry().topLeft() - QPoint(-100, 10);
+ QPoint titlebar2 = titlebar1 - QPoint(10, 0);
+
+ NativeEventList native;
+ native.append(new QNativeMouseButtonEvent(inside1, Qt::LeftButton, 1, Qt::NoModifier));
+ native.append(new QNativeMouseDragEvent(inside2, Qt::LeftButton, Qt::NoModifier));
+ native.append(new QNativeMouseDragEvent(titlebar1, Qt::LeftButton, Qt::NoModifier));
+ native.append(new QNativeMouseButtonEvent(titlebar2, Qt::LeftButton, 0, Qt::NoModifier));
+
+ ExpectedEventList expected(&w);
+ expected.append(new QMouseEvent(QEvent::MouseButtonPress, w.mapFromGlobal(inside1), inside1, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseMove, w.mapFromGlobal(inside2), inside2, Qt::NoButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseMove, w.mapFromGlobal(titlebar1), titlebar1, Qt::NoButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::MouseButtonRelease, w.mapFromGlobal(titlebar2), titlebar2, Qt::LeftButton, Qt::NoButton, Qt::NoModifier));
+
+ native.play();
+ QVERIFY2(expected.waitForAllEvents(), "the test did not receive all expected events!");
+}
+
+void tst_MacNativeEvents::testDragWindow()
+{
+ // Check that if we drag the mouse from inside the
+ // widgets title bar, we get a move event on the window
+ QWidget w;
+ w.show();
+ QPoint titlebar = w.geometry().topLeft() - QPoint(-100, 10);
+ QPoint moveTo = titlebar + QPoint(100, 0);
+
+ NativeEventList native;
+ native.append(new QNativeMouseButtonEvent(titlebar, Qt::LeftButton, 1, Qt::NoModifier));
+ native.append(new QNativeMouseDragEvent(moveTo, Qt::LeftButton, Qt::NoModifier));
+ native.append(500, new QNativeMouseButtonEvent(moveTo, Qt::LeftButton, 0, Qt::NoModifier));
+
+ ExpectedEventList expected(&w);
+ expected.append(new QMouseEvent(QEvent::NonClientAreaMouseButtonPress, w.mapFromGlobal(titlebar), titlebar, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier));
+ expected.append(new QMouseEvent(QEvent::NonClientAreaMouseButtonRelease, w.mapFromGlobal(titlebar), moveTo, Qt::LeftButton, Qt::NoButton, Qt::NoModifier));
+
+ native.play();
+ QVERIFY2(expected.waitForAllEvents(), "the test did not receive all expected events!");
+}
+
+void tst_MacNativeEvents::testMouseEnter()
+{
+ // When a mouse enters a widget, both a mouse enter events and a
+ // mouse move event should be sendt. Lets test this:
+ QWidget w;
+ w.setMouseTracking(true);
+ w.show();
+ QPoint outside = w.geometry().topLeft() - QPoint(50, 0);
+ QPoint inside = w.geometry().center();
+
+ NativeEventList native;
+ native.append(new QNativeMouseMoveEvent(outside, Qt::NoModifier));
+ native.append(new QNativeMouseMoveEvent(inside, Qt::NoModifier));
+
+ ExpectedEventList expected(&w);
+ expected.append(new QEvent(QEvent::Enter));
+ expected.append(new QMouseEvent(QEvent::MouseMove, w.mapFromGlobal(inside), inside, Qt::NoButton, Qt::NoButton, Qt::NoModifier));
+
+ native.play();
+ QVERIFY2(expected.waitForAllEvents(), "the test did not receive all expected events!");
+}
+
+void tst_MacNativeEvents::testChildDialogInFrontOfModalParent()
+{
+ // Test that a child dialog of a modal parent dialog is
+ // in front of the parent, and active:
+ QDialog parent;
+ parent.setWindowModality(Qt::ApplicationModal);
+ QDialog child(&parent);
+ QPushButton button("close", &child);
+ connect(&button, SIGNAL(clicked()), &child, SLOT(close()));
+ parent.show();
+ child.show();
+ QPoint inside = button.mapToGlobal(button.geometry().center());
+
+ // Post a click on the button to close the child dialog:
+ NativeEventList native;
+ native.append(new QNativeMouseButtonEvent(inside, Qt::LeftButton, 1, Qt::NoModifier));
+ native.append(new QNativeMouseButtonEvent(inside, Qt::LeftButton, 0, Qt::NoModifier));
+
+ native.play();
+ QTest::qWait(100);
+ QVERIFY(!child.isVisible());
}
#include "tst_macnativeevents.moc"
diff --git a/tests/auto/mediaobject/qtesthelper.h b/tests/auto/mediaobject/qtesthelper.h
index f082296..39d5b91 100644
--- a/tests/auto/mediaobject/qtesthelper.h
+++ b/tests/auto/mediaobject/qtesthelper.h
@@ -215,7 +215,6 @@ namespace QTest
default:
return 0;
}
- return 0;
}
} // namespace QTest
QT_END_NAMESPACE
diff --git a/tests/auto/mediaobject/tst_mediaobject.cpp b/tests/auto/mediaobject/tst_mediaobject.cpp
index 5b0943e..994057b 100644
--- a/tests/auto/mediaobject/tst_mediaobject.cpp
+++ b/tests/auto/mediaobject/tst_mediaobject.cpp
@@ -193,31 +193,17 @@ static qint32 castQVariantToInt32(const QVariant &variant)
return *reinterpret_cast<const qint32 *>(variant.constData());
}
-static const char *const red = "\033[0;31m";
-static const char *const green = "\033[0;32m";
-static const char *const yellow = "\033[0;33m";
-static const char *const blue = "\033[0;34m";
-static const char *const purple = "\033[0;35m";
-static const char *const cyan = "\033[0;36m";
-static const char *const white = "\033[0;37m";
-static const char *const normal = "\033[0m";
-
void tst_MediaObject::stateChanged(Phonon::State newstate, Phonon::State oldstate)
{
- if (newstate == Phonon::ErrorState) {
- QWARN(QByteArray(QByteArray(red) + ".......................................................... ") + QByteArray(QTest::toString(oldstate)) + " to " + QByteArray(QTest::toString(newstate)) + normal);
- } else {
- //qDebug() << ".........................................................." << cyan << QTest::toString(oldstate) << "to" << QTest::toString(newstate) << normal;
- }
+ if (newstate == Phonon::ErrorState)
+ QWARN(QByteArray(QByteArray(QTest::toString(oldstate)) + " to " + QByteArray(QTest::toString(newstate))));
}
void tst_MediaObject::testPlayFromResource()
{
#ifdef Q_OS_SYMBIAN
QSKIP("Not implemented yet.", SkipAll);
- return;
-#endif
-
+#else
QFile file(MEDIA_FILEPATH);
MediaObject media;
media.setCurrentSource(&file);
@@ -229,6 +215,7 @@ void tst_MediaObject::testPlayFromResource()
if (media.state() != Phonon::PlayingState)
QTest::waitForSignal(&media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), 10000);
QCOMPARE(media.state(), Phonon::PlayingState);
+#endif
}
void tst_MediaObject::testPlayIllegalFile()
@@ -264,6 +251,13 @@ void tst_MediaObject::init()
}
m_stateChangedSignalSpy->clear();
}
+
+ // Ensure that m_media is in StoppedState
+ if (m_media->state() != Phonon::StoppedState) {
+ m_media->stop();
+ QTest::waitForSignal(m_media, SIGNAL(stateChanged(Phonon::State, Phonon::State)));
+ QCOMPARE(m_media->state(), Phonon::StoppedState);
+ }
}
void tst_MediaObject::cleanup()
@@ -579,13 +573,18 @@ void tst_MediaObject::playSDP()
if (m_media->state() != Phonon::StoppedState)
QTest::waitForSignal(m_media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), 10000);
- // At this point we're in error state due to absent media, but it has now loaded the SDP:
- QCOMPARE(m_media->errorString(), QString::fromLatin1("Buffering clip failed: Unknown error (-39)"));
+ // MediaObject should have loaded the SDP, but be in error state due to absent media
+ const bool stateMatch = (m_media->state() == Phonon::ErrorState);
+ const bool errorStringMatch = (m_media->errorString() == QString::fromLatin1("Loading clip failed: Unknown error (-39)"));
- // We cannot play the SDP, we can neither attempt to play it, because we
- // won't get a state change from ErrorState to ErrorState, and hence block
- // on a never occuring signal.
+ // Ensure that m_media is back in ground state prior to starting next test step
m_media->setCurrentSource(oldSource);
+ if (m_media->state() != Phonon::StoppedState)
+ QTest::waitForSignal(m_media, SIGNAL(stateChanged(Phonon::State, Phonon::State)));
+ QCOMPARE(m_media->state(), Phonon::StoppedState);
+
+ QVERIFY(stateMatch);
+ QVERIFY(errorStringMatch);
#else
QSKIP("Unsupported on this platform.", SkipAll);
diff --git a/tests/auto/qchar/qchar.pro b/tests/auto/qchar/qchar.pro
index 0a3fcc3..a534d14 100644
--- a/tests/auto/qchar/qchar.pro
+++ b/tests/auto/qchar/qchar.pro
@@ -8,4 +8,8 @@ deploy.sources += NormalizationTest.txt
DEPLOYMENT = deploy
}
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
+symbian*: {
+ DEFINES += SRCDIR=""
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD/\\\"
+}
diff --git a/tests/auto/qchar/tst_qchar.cpp b/tests/auto/qchar/tst_qchar.cpp
index 6227c2e..5ca2255 100644
--- a/tests/auto/qchar/tst_qchar.cpp
+++ b/tests/auto/qchar/tst_qchar.cpp
@@ -513,10 +513,7 @@ void tst_QChar::normalization()
}
QFile f(SRCDIR "NormalizationTest.txt");
- if (!f.exists()) {
- QFAIL("Couldn't find NormalizationTest.txt");
- return;
- }
+ QVERIFY(f.exists());
f.open(QIODevice::ReadOnly);
diff --git a/tests/auto/qcssparser/tst_qcssparser.cpp b/tests/auto/qcssparser/tst_qcssparser.cpp
index ef102a0..966563c 100644
--- a/tests/auto/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/qcssparser/tst_qcssparser.cpp
@@ -1381,6 +1381,13 @@ void tst_QCssParser::shorthandBackgroundProperty()
QTEST(image, "expectedImage");
QTEST(int(repeat), "expectedRepeatValue");
QTEST(int(alignment), "expectedAlignment");
+
+ //QTBUG-9674 : a second evaluation should give the same results
+ QVERIFY(v.extractBackground(&brush, &image, &repeat, &alignment, &origin, &attachment, &ignoredOrigin));
+ QVERIFY(expectedBrush.color() == brush.color());
+ QTEST(image, "expectedImage");
+ QTEST(int(repeat), "expectedRepeatValue");
+ QTEST(int(alignment), "expectedAlignment");
}
void tst_QCssParser::pseudoElement_data()
@@ -1644,6 +1651,12 @@ void tst_QCssParser::extractBorder()
QVERIFY(widths[QCss::TopEdge] == expectedTopWidth);
QVERIFY(styles[QCss::TopEdge] == expectedTopStyle);
QVERIFY(colors[QCss::TopEdge] == expectedTopColor);
+
+ //QTBUG-9674 : a second evaluation should give the same results
+ QVERIFY(extractor.extractBorder(widths, colors, styles, radii));
+ QVERIFY(widths[QCss::TopEdge] == expectedTopWidth);
+ QVERIFY(styles[QCss::TopEdge] == expectedTopStyle);
+ QVERIFY(colors[QCss::TopEdge] == expectedTopColor);
}
void tst_QCssParser::noTextDecoration()
diff --git a/tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp b/tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp
index 9ea422c..87df57d 100644
--- a/tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp
+++ b/tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp
@@ -46,6 +46,17 @@
static const int minResolution = 50; // the minimum resolution for the tests
+QDebug operator<<(QDebug s, const QElapsedTimer &t)
+{
+ union {
+ QElapsedTimer t;
+ struct { qint64 t1, t2; } i;
+ } copy;
+ copy.t = t;
+ s.nospace() << "(" << copy.i.t1 << ", " << copy.i.t2 << ")";
+ return s.space();
+}
+
class tst_QElapsedTimer : public QObject
{
Q_OBJECT
@@ -110,15 +121,17 @@ void tst_QElapsedTimer::basics()
#endif
quint64 value1 = t1.msecsSinceReference();
+ qDebug() << value1 << t1;
qint64 elapsed = t1.restart();
QVERIFY(elapsed < minResolution);
quint64 value2 = t1.msecsSinceReference();
+ qDebug() << value2 << t1 << elapsed;
// in theory, elapsed == value2 - value1
// However, since QElapsedTimer keeps internally the full resolution,
// we have here a rounding error due to integer division
- QVERIFY(qAbs(elapsed - qint64(value2 - value1)) < 1);
+ QVERIFY(qAbs(elapsed - qint64(value2 - value1)) <= 1);
}
void tst_QElapsedTimer::elapsed()
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp
index 42e7250..403c5f9 100644
--- a/tests/auto/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp
@@ -194,6 +194,9 @@ tst_QFileInfo::~tst_QFileInfo()
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
QDir().rmdir("./.hidden-directory");
#endif
+#ifdef Q_OS_WIN
+ QDir().rmdir("./hidden-directory");
+#endif
}
// Testing get/set functions
@@ -1056,14 +1059,6 @@ void tst_QFileInfo::isSymLink_data()
QTest::newRow("existent file") << SRCDIR "tst_qfileinfo.cpp" << false << "";
QTest::newRow("link") << "link.lnk" << true << QFileInfo(SRCDIR "tst_qfileinfo.cpp").absoluteFilePath();
QTest::newRow("broken link") << "brokenlink.lnk" << true << QFileInfo("dummyfile").absoluteFilePath();
-
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
- if (QSysInfo::WindowsVersion & QSysInfo::WV_VISTA) {
- QTest::newRow("Documents and Settings") << "C:/Documents and Settings" << true << "C:/Users";
- QTest::newRow("All Users") << "C:/Users/All Users" << true << "C:/ProgramData";
- QTest::newRow("Default User") << "C:/Users/Default User" << true << "C:/Users/Default";
- }
-#endif
}
void tst_QFileInfo::isSymLink()
@@ -1086,16 +1081,13 @@ void tst_QFileInfo::isHidden_data()
}
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
- QTest::newRow("C:/RECYCLER") << QString::fromLatin1("C:/RECYCLER") << true;
- QTest::newRow("C:/RECYCLER/.") << QString::fromLatin1("C:/RECYCLER/.") << true;
- QTest::newRow("C:/RECYCLER/..") << QString::fromLatin1("C:/RECYCLER/..") << true;
+ QVERIFY(QDir("./hidden-directory").exists() || QDir().mkdir("./hidden-directory"));
+ QVERIFY(SetFileAttributesW(QString("./hidden-directory").utf16(),FILE_ATTRIBUTE_HIDDEN));
+ QTest::newRow("C:/path/to/hidden-directory") << QDir::currentPath() + QString::fromLatin1("/hidden-directory") << true;
+ QTest::newRow("C:/path/to/hidden-directory/.") << QDir::currentPath() + QString::fromLatin1("/hidden-directory/.") << true;
#endif
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
-
- if (!QDir("./.hidden-directory").exists()
- && !QDir().mkdir("./.hidden-directory"))
- qWarning("Unable to create directory './.hidden-directory'. Some tests will fail.");
-
+ QVERIFY(QDir("./.hidden-directory").exists() || QDir().mkdir("./.hidden-directory"));
QTest::newRow("/path/to/.hidden-directory") << QDir::currentPath() + QString("/.hidden-directory") << true;
QTest::newRow("/path/to/.hidden-directory/.") << QDir::currentPath() + QString("/.hidden-directory/.") << true;
QTest::newRow("/path/to/.hidden-directory/..") << QDir::currentPath() + QString("/.hidden-directory/..") << true;
@@ -1123,34 +1115,24 @@ void tst_QFileInfo::isHidden_data()
{
QFile file(hiddenFileName);
- if (file.open(QIODevice::WriteOnly)) {
- QTextStream t(&file);
- t << "foobar";
- } else {
- qWarning("Failed to create hidden file");
- }
+ QVERIFY(file.open(QIODevice::WriteOnly));
+ QTextStream t(&file);
+ t << "foobar";
+
QFile file2(notHiddenFileName);
- if (file2.open(QIODevice::WriteOnly)) {
- QTextStream t(&file);
- t << "foobar";
- } else {
- qWarning("Failed to create non-hidden file");
- }
+ QVERIFY(file2.open(QIODevice::WriteOnly))
+ QTextStream t(&file);
+ t << "foobar";
}
RFs rfs;
TInt err = rfs.Connect();
- if (err == KErrNone) {
- HBufC* symFile = qt_QString2HBufC(hiddenFileName);
- err = rfs.SetAtt(*symFile, KEntryAttHidden, 0);
- rfs.Close();
- delete symFile;
- if (err != KErrNone) {
- qWarning("Failed to set hidden attribute for test file");
- }
- } else {
- qWarning("Failed to open RFs session");
- }
+ QCOMPARE(err, KErrNone);
+ HBufC* symFile = qt_QString2HBufC(hiddenFileName);
+ err = rfs.SetAtt(*symFile, KEntryAttHidden, 0);
+ rfs.Close();
+ delete symFile;
+ QCOMPARE(err, KErrNone);
#endif
}
@@ -1207,7 +1189,7 @@ void tst_QFileInfo::isLocalFs()
void tst_QFileInfo::refresh()
{
-#if defined(Q_OS_WINCE)
+#if defined(Q_OS_WINCE) || defined(Q_OS_WIN)
int sleepTime = 3000;
#else
int sleepTime = 2000;
diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp
index 638c810..2a42d6d 100644
--- a/tests/auto/qftp/tst_qftp.cpp
+++ b/tests/auto/qftp/tst_qftp.cpp
@@ -123,6 +123,8 @@ private slots:
void doneSignal();
void queueMoreCommandsInDoneSlot();
+ void qtbug7359Crash();
+
protected slots:
void stateChanged( int );
void listInfo( const QUrlInfo & );
@@ -2052,6 +2054,30 @@ void tst_QFtp::cdUpSlot(bool error)
}
}
+void tst_QFtp::qtbug7359Crash()
+{
+ QFtp ftp;
+ ftp.connectToHost("127.0.0.1");
+
+ QTime t;
+ int elapsed;
+
+ t.start();
+ while ((elapsed = t.elapsed()) < 200)
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 200 - elapsed);
+
+ ftp.close();
+ t.restart();
+ while ((elapsed = t.elapsed()) < 1000)
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000 - elapsed);
+
+ ftp.connectToHost("127.0.0.1");
+
+ t.restart();
+ while ((elapsed = t.elapsed()) < 2000)
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 2000 - elapsed);
+}
+
QTEST_MAIN(tst_QFtp)
#include "tst_qftp.moc"
diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index e46709b..d5f63d3 100644
--- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -43,6 +43,7 @@
#include <QtTest/QtTest>
#include <QtGui>
#include "../../shared/util.h"
+#include <private/qgraphicsproxywidget_p.h>
#include <private/qlayoutengine_p.h> // qSmartMin functions...
#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
#include <QMacStyle>
@@ -2582,33 +2583,68 @@ void tst_QGraphicsProxyWidget::changingCursor_basic()
void tst_QGraphicsProxyWidget::tooltip_basic()
{
- // Confirm that mouse events are working properly by checking that
- // when moving the mouse over a label with a tooptip the tooltip appears
- QGraphicsScene scene;
- QGraphicsView view(&scene);
- view.show();
+ QString toolTip = "Qt rocks!";
+ QString toolTip2 = "Qt rocks even more!";
+
+ QPushButton *button = new QPushButton("button");
+ QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget;
+ QGraphicsProxyWidgetPrivate *proxyd = static_cast<QGraphicsProxyWidgetPrivate *>(QGraphicsItemPrivate::get(proxy));
+ proxy->setWidget(button);
+ proxyd->lastWidgetUnderMouse = button; // force widget under mouse
+
+ QVERIFY(button->toolTip().isEmpty());
+ QVERIFY(proxy->toolTip().isEmpty());
+ // Check that setting the tooltip on the proxy also set it on the widget
+ proxy->setToolTip(toolTip);
+ QCOMPARE(proxy->toolTip(), toolTip);
+ QCOMPARE(button->toolTip(), toolTip);
+ // Check that setting the tooltip on the widget also set it on the proxy
+ button->setToolTip(toolTip2);
+ QCOMPARE(proxy->toolTip(), toolTip2);
+ QCOMPARE(button->toolTip(), toolTip2);
- QSKIP("Tooltips don't work yet", SkipAll);
-
- SubQGraphicsProxyWidget *proxy = new SubQGraphicsProxyWidget;
- QLabel *widget = new QLabel;
- widget->setText("If it ain't tested it's broken");
- widget->setToolTip("When in doubt, test");
- proxy->setWidget(widget);
- widget->show();
+ QGraphicsScene scene;
scene.addItem(proxy);
- QTest::qWait(125);
- // in
- QTest::mouseMove(view.viewport(), view.mapFromScene(proxy->mapToScene(proxy->boundingRect().center())));
+ QGraphicsView view(&scene);
+ view.setFixedSize(200, 200);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ {
+ QHelpEvent helpEvent(QEvent::ToolTip, view.viewport()->rect().topLeft(),
+ view.viewport()->mapToGlobal(view.viewport()->rect().topLeft()));
+ QApplication::sendEvent(view.viewport(), &helpEvent);
+ QTest::qWait(350);
+
+ bool foundView = false;
+ bool foundTipLabel = false;
+ foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ if (widget == &view)
+ foundView = true;
+ if (widget->inherits("QTipLabel"))
+ foundTipLabel = true;
+ }
+ QVERIFY(foundView);
+ QVERIFY(!foundTipLabel);
+ }
- QTRY_COMPARE(proxy->childItems().count(), 1);
- QGraphicsProxyWidget *child = (QGraphicsProxyWidget*)(proxy->childItems())[0];
- QVERIFY(child->isWidget());
- QVERIFY(child->widget());
- QCOMPARE(child->widget()->parent(), static_cast<QObject*>(widget));
- QCOMPARE(child->widget()->x(), widget->x()); // ### ???
- QCOMPARE(child->widget()->y(), widget->y() + widget->height()); // ### ???
+ {
+ QHelpEvent helpEvent(QEvent::ToolTip, view.mapFromScene(proxy->boundingRect().center()),
+ view.viewport()->mapToGlobal(view.mapFromScene(proxy->boundingRect().center())));
+ QApplication::sendEvent(view.viewport(), &helpEvent);
+ QTest::qWait(350);
+
+ bool foundView = false;
+ bool foundTipLabel = false;
+ foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ if (widget == &view)
+ foundView = true;
+ if (widget->inherits("QTipLabel"))
+ foundTipLabel = true;
+ }
+ QVERIFY(foundView);
+ QVERIFY(foundTipLabel);
+ }
}
void tst_QGraphicsProxyWidget::childPos_data()
diff --git a/tests/auto/qhelpgenerator/data/test.qhp b/tests/auto/qhelpgenerator/data/test.qhp
index a97c00d..2c3f128 100644
--- a/tests/auto/qhelpgenerator/data/test.qhp
+++ b/tests/auto/qhelpgenerator/data/test.qhp
@@ -3,7 +3,7 @@
<metaData name="author" value="Nokia Corporation and/or its subsidiary(-ies)" />
<metaData name="language" value="en" />
<virtualFolder>testFolder</virtualFolder>
- <namespace>trolltech.com.1_0_0.test</namespace>
+ <namespace>trolltech.com.1.0.0.test</namespace>
<customFilter name="Custom Filter 1">
<filterAttribute>test</filterAttribute>
<filterAttribute>filter1</filterAttribute>
diff --git a/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp b/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp
index 34ee7c6..a190081 100644
--- a/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp
+++ b/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp
@@ -119,7 +119,7 @@ void tst_QHelpGenerator::checkNamespace()
{
m_query->exec("SELECT Id, Name FROM NamespaceTable");
if (m_query->next()
- && m_query->value(1).toString() == QLatin1String("trolltech.com.1_0_0.test"))
+ && m_query->value(1).toString() == QLatin1String("trolltech.com.1.0.0.test"))
return;
QFAIL("Namespace Error!");
}
diff --git a/tests/auto/qhelpprojectdata/data/test.qhp b/tests/auto/qhelpprojectdata/data/test.qhp
index e9ac7f2..1e9074a 100644
--- a/tests/auto/qhelpprojectdata/data/test.qhp
+++ b/tests/auto/qhelpprojectdata/data/test.qhp
@@ -3,7 +3,7 @@
<metaData name="author" value="Nokia Corporation and/or its subsidiary(-ies)" />
<metaData name="language" value="en" />
<virtualFolder>testFolder</virtualFolder>
- <namespace>trolltech.com.1_0_0.test</namespace>
+ <namespace>trolltech.com.1.0.0.test</namespace>
<customFilter name="Custom Filter 1">
<filterAttribute>test</filterAttribute>
<filterAttribute>filter1</filterAttribute>
@@ -69,4 +69,4 @@
<file>cars.html</file>
</files>
</filterSection>
-</QtHelpProject> \ No newline at end of file
+</QtHelpProject>
diff --git a/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp b/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp
index 929cab5..9c458f7 100644
--- a/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp
+++ b/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp
@@ -83,7 +83,7 @@ void tst_QHelpProjectData::namespaceName()
QHelpProjectData data;
if (!data.readData(m_inputFile))
QFAIL("Cannot read qhp file!");
- QCOMPARE(data.namespaceName(), QString("trolltech.com.1_0_0.test"));
+ QCOMPARE(data.namespaceName(), QString("trolltech.com.1.0.0.test"));
}
void tst_QHelpProjectData::virtualFolder()
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index 35ebbd9..0b55390 100644
--- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -801,7 +801,7 @@ void tst_QHttpNetworkConnection::getMultiple_data()
QTest::newRow("6 connections, no pipelining, 100 requests") << quint16(6) << false << 100;
QTest::newRow("1 connection, no pipelining, 100 requests") << quint16(1) << false << 100;
- QTest::newRow("6 connections, pipelining allowed, 100 requests") << quint16(2) << true << 100;
+ QTest::newRow("6 connections, pipelining allowed, 100 requests") << quint16(6) << true << 100;
QTest::newRow("1 connection, pipelining allowed, 100 requests") << quint16(1) << true << 100;
}
diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
index 3a3ea79..f86ba63 100644
--- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
+++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
@@ -641,7 +641,7 @@ void tst_QHttpSocketEngine::downloadBigFile()
QByteArray hostName = QtNetworkSettings::serverName().toLatin1();
QVERIFY(tmpSocket->state() == QAbstractSocket::ConnectedState);
- QVERIFY(tmpSocket->write("GET /mediumfile HTTP/1.0\r\n") > 0);
+ QVERIFY(tmpSocket->write("GET /qtest/mediumfile HTTP/1.0\r\n") > 0);
QVERIFY(tmpSocket->write("Host: ") > 0);
QVERIFY(tmpSocket->write(hostName.data()) > 0);
QVERIFY(tmpSocket->write("\r\n") > 0);
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index d2181f8..f5c32cd 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -123,6 +123,7 @@ private slots:
void taskQTBUG_435_deselectOnViewportClick();
void taskQTBUG_2678_spacingAndWrappedText();
void taskQTBUG_5877_skippingItemInPageDownUp();
+ void taskQTBUG_9455_wrongScrollbarRanges();
};
// Testing get/set functions
@@ -1941,5 +1942,34 @@ void tst_QListView::taskQTBUG_5877_skippingItemInPageDownUp()
}
}
+class ListView_9455 : public QListView
+{
+public:
+ QSize contentsSize() const
+ {
+ return QListView::contentsSize();
+ }
+};
+
+void tst_QListView::taskQTBUG_9455_wrongScrollbarRanges()
+{
+ QStringList list;
+ const int nrItems = 8;
+ for (int i = 0; i < nrItems; i++)
+ list << QString().sprintf("item %d", i);
+
+ QStringListModel model(list);
+ ListView_9455 w;
+ w.setModel(&model);
+ w.setViewMode(QListView::IconMode);
+ w.resize(116, 132);
+ w.setMovement(QListView::Static);
+ const int spacing = 40;
+ w.setSpacing(spacing);
+ w.show();
+ QTest::qWaitForWindowShown(&w);
+ QCOMPARE(w.verticalScrollBar()->maximum(), w.contentsSize().height() - w.viewport()->geometry().height());
+}
+
QTEST_MAIN(tst_QListView)
#include "tst_qlistview.moc"
diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp
index 182f73b..7a5d8a6 100644
--- a/tests/auto/qlocale/tst_qlocale.cpp
+++ b/tests/auto/qlocale/tst_qlocale.cpp
@@ -1921,7 +1921,7 @@ void tst_QLocale::dateFormat()
const QLocale no("no_NO");
QCOMPARE(no.dateFormat(QLocale::NarrowFormat), QLatin1String("dd.MM.yy"));
QCOMPARE(no.dateFormat(QLocale::ShortFormat), QLatin1String("dd.MM.yy"));
- QCOMPARE(no.dateFormat(QLocale::LongFormat), QLatin1String("dddd d. MMMM y"));
+ QCOMPARE(no.dateFormat(QLocale::LongFormat), QLatin1String("dddd d. MMMM yyyy"));
}
void tst_QLocale::timeFormat()
@@ -1933,7 +1933,7 @@ void tst_QLocale::timeFormat()
const QLocale no("no_NO");
QCOMPARE(no.timeFormat(QLocale::NarrowFormat), QLatin1String("HH:mm"));
QCOMPARE(no.timeFormat(QLocale::ShortFormat), QLatin1String("HH:mm"));
- QCOMPARE(no.timeFormat(QLocale::LongFormat), QLatin1String("'kl'. HH:mm:ss tttt"));
+ QCOMPARE(no.timeFormat(QLocale::LongFormat), QLatin1String("'kl'. HH:mm:ss t"));
}
void tst_QLocale::dateTimeFormat()
@@ -1945,7 +1945,7 @@ void tst_QLocale::dateTimeFormat()
const QLocale no("no_NO");
QCOMPARE(no.dateTimeFormat(QLocale::NarrowFormat), QLatin1String("dd.MM.yy HH:mm"));
QCOMPARE(no.dateTimeFormat(QLocale::ShortFormat), QLatin1String("dd.MM.yy HH:mm"));
- QCOMPARE(no.dateTimeFormat(QLocale::LongFormat), QLatin1String("dddd d. MMMM y 'kl'. HH:mm:ss tttt"));
+ QCOMPARE(no.dateTimeFormat(QLocale::LongFormat), QLatin1String("dddd d. MMMM yyyy 'kl'. HH:mm:ss t"));
}
void tst_QLocale::monthName()
diff --git a/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro b/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro
index df2d2d9..ca463bd 100644
--- a/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro
+++ b/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro
@@ -8,7 +8,7 @@ symbian {
TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData
}
-maemo6 {
+maemo6|maemo5 {
CONFIG += link_pkgconfig
PKGCONFIG += conninet
diff --git a/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
index 70f4447..ce3acb7 100644
--- a/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
+++ b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -41,10 +41,11 @@
#include <QtTest/QtTest>
#include "../qbearertestcommon.h"
-#include "qnetworkconfiguration.h"
-#include "qnetworkconfigmanager.h"
-#ifdef Q_WS_MAEMO_6
+#include <QtNetwork/qnetworkconfiguration.h>
+#include <QtNetwork/qnetworkconfigmanager.h>
+
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
#include <stdio.h>
#include <iapconf.h>
#endif
@@ -65,7 +66,7 @@ private slots:
void isRoamingAvailable();
private:
-#ifdef Q_WS_MAEMO_6
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
Maemo::IAPConf *iapconf;
Maemo::IAPConf *iapconf2;
Maemo::IAPConf *gprsiap;
@@ -77,7 +78,7 @@ private:
void tst_QNetworkConfiguration::initTestCase()
{
-#ifdef Q_WS_MAEMO_6
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
iapconf = new Maemo::IAPConf("007");
iapconf->setValue("ipv4_type", "AUTO");
iapconf->setValue("wlan_wepkey1", "connt");
@@ -150,7 +151,7 @@ void tst_QNetworkConfiguration::initTestCase()
void tst_QNetworkConfiguration::cleanupTestCase()
{
-#ifdef Q_WS_MAEMO_6
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
iapconf->clear();
delete iapconf;
iapconf2->clear();
diff --git a/tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro b/tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
index e0028e5..d9c1d6b 100644
--- a/tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
+++ b/tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
@@ -8,7 +8,7 @@ symbian {
TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData
}
-maemo6 {
+maemo6|maemo5 {
CONFIG += link_pkgconfig
PKGCONFIG += conninet
diff --git a/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
index 30c5a74..7cc527c 100644
--- a/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
+++ b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
@@ -41,10 +41,11 @@
#include <QtTest/QtTest>
#include "../qbearertestcommon.h"
-#include "qnetworkconfiguration.h"
-#include "qnetworkconfigmanager.h"
-#ifdef Q_WS_MAEMO_6
+#include <QtNetwork/qnetworkconfiguration.h>
+#include <QtNetwork/qnetworkconfigmanager.h>
+
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
#include <stdio.h>
#include <iapconf.h>
#endif
@@ -66,7 +67,7 @@ private slots:
void configurationFromIdentifier();
private:
-#ifdef Q_WS_MAEMO_6
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
Maemo::IAPConf *iapconf;
Maemo::IAPConf *iapconf2;
Maemo::IAPConf *gprsiap;
@@ -78,7 +79,7 @@ private:
void tst_QNetworkConfigurationManager::initTestCase()
{
-#ifdef Q_WS_MAEMO_6
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
iapconf = new Maemo::IAPConf("007");
iapconf->setValue("ipv4_type", "AUTO");
iapconf->setValue("wlan_wepkey1", "connt");
@@ -152,7 +153,7 @@ void tst_QNetworkConfigurationManager::initTestCase()
void tst_QNetworkConfigurationManager::cleanupTestCase()
{
-#ifdef Q_WS_MAEMO_6
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
iapconf->clear();
delete iapconf;
iapconf2->clear();
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index dd497b0..ff79c09 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -4113,7 +4113,7 @@ public slots:
}
}
void startOne() {
- QUrl url = "http://" + QtNetworkSettings::serverName() + "/gif/fluke.gif";
+ QUrl url = "http://" + QtNetworkSettings::serverName() + "/qtest/fluke.gif";
QNetworkRequest request(url);
QNetworkReply *reply = manager.get(request);
reply->setParent(this);
diff --git a/tests/auto/qnetworksession/lackey/main.cpp b/tests/auto/qnetworksession/lackey/main.cpp
index 66d6dd4..8759b52 100644
--- a/tests/auto/qnetworksession/lackey/main.cpp
+++ b/tests/auto/qnetworksession/lackey/main.cpp
@@ -42,9 +42,10 @@
#include <QCoreApplication>
#include <QStringList>
#include <QLocalSocket>
-#include <qnetworkconfigmanager.h>
-#include <qnetworkconfiguration.h>
-#include <qnetworksession.h>
+
+#include <QtNetwork/qnetworkconfiguration.h>
+#include <QtNetwork/qnetworkconfigmanager.h>
+#include <QtNetwork/qnetworksession.h>
#include <QDebug>
diff --git a/tests/auto/qnetworksession/test/test.pro b/tests/auto/qnetworksession/test/test.pro
index d248b10..bfffe90 100644
--- a/tests/auto/qnetworksession/test/test.pro
+++ b/tests/auto/qnetworksession/test/test.pro
@@ -19,7 +19,7 @@ symbian {
TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData PowerMgmt
}
-maemo6 {
+maemo6|maemo5 {
CONFIG += link_pkgconfig
PKGCONFIG += conninet
diff --git a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
index 58b0576..23cdc6a 100644
--- a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
+++ b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
@@ -44,10 +44,11 @@
#include <QLocalSocket>
#include <QTimer>
#include "../../qbearertestcommon.h"
-#include <qnetworkconfigmanager.h>
-#include <qnetworksession.h>
-#ifdef Q_WS_MAEMO_6
+#include <QtNetwork/qnetworkconfigmanager.h>
+#include <QtNetwork/qnetworksession.h>
+
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
#include <stdio.h>
#include <iapconf.h>
#endif
@@ -72,6 +73,8 @@ public slots:
private slots:
+ void robustnessBombing();
+
void outOfProcessSession();
void invalidSession();
@@ -100,7 +103,7 @@ private:
int inProcessSessionManagementCount;
-#ifdef Q_WS_MAEMO_6
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
Maemo::IAPConf *iapconf;
Maemo::IAPConf *iapconf2;
Maemo::IAPConf *gprsiap;
@@ -123,7 +126,7 @@ void tst_QNetworkSession::initTestCase()
qRegisterMetaType<QNetworkConfiguration>("QNetworkConfiguration");
qRegisterMetaType<QNetworkConfiguration::Type>("QNetworkConfiguration::Type");
-#ifdef Q_WS_MAEMO_6
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
iapconf = new Maemo::IAPConf("007");
iapconf->setValue("ipv4_type", "AUTO");
iapconf->setValue("wlan_wepkey1", "connt");
@@ -209,7 +212,7 @@ void tst_QNetworkSession::cleanupTestCase()
"inProcessSessionManagement()");
}
-#ifdef Q_WS_MAEMO_6
+#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
iapconf->clear();
delete iapconf;
iapconf2->clear();
@@ -232,6 +235,23 @@ void tst_QNetworkSession::cleanupTestCase()
#endif
}
+// Robustness test for calling interfaces in nonsense order / with nonsense parameters
+void tst_QNetworkSession::robustnessBombing()
+{
+ QNetworkConfigurationManager mgr;
+ QNetworkSession testSession(mgr.defaultConfiguration());
+ // Should not reset even session is not opened
+ testSession.migrate();
+ testSession.accept();
+ testSession.ignore();
+ testSession.reject();
+ quint64 temp;
+ temp = testSession.bytesWritten();
+ temp = testSession.bytesReceived();
+ temp = testSession.activeTime();
+}
+
+
void tst_QNetworkSession::invalidSession()
{
// 1. Verify that session created with invalid configuration remains in invalid state
diff --git a/tests/auto/qscriptengine/qscriptengine.pro b/tests/auto/qscriptengine/qscriptengine.pro
index dd058a4..7d0f5d0 100644
--- a/tests/auto/qscriptengine/qscriptengine.pro
+++ b/tests/auto/qscriptengine/qscriptengine.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT = core gui script
SOURCES += tst_qscriptengine.cpp
+RESOURCES += qscriptengine.qrc
wince* {
DEFINES += SRCDIR=\\\"./\\\"
diff --git a/tests/auto/qscriptengine/qscriptengine.qrc b/tests/auto/qscriptengine/qscriptengine.qrc
new file mode 100644
index 0000000..b87f985
--- /dev/null
+++ b/tests/auto/qscriptengine/qscriptengine.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>translations/translatable_la.qm</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qscriptengine/translatable.js b/tests/auto/qscriptengine/translatable.js
new file mode 100644
index 0000000..30e139a
--- /dev/null
+++ b/tests/auto/qscriptengine/translatable.js
@@ -0,0 +1,9 @@
+qsTr("One");
+qsTranslate("FooContext", "Two");
+
+var greeting_strings = [
+ QT_TR_NOOP("Hello"),
+ QT_TRANSLATE_NOOP("FooContext", "Goodbye")
+];
+
+qsTr("One", "not the same one");
diff --git a/tests/auto/qscriptengine/translatable2.js b/tests/auto/qscriptengine/translatable2.js
new file mode 100644
index 0000000..eee66f1
--- /dev/null
+++ b/tests/auto/qscriptengine/translatable2.js
@@ -0,0 +1,9 @@
+qsTr("Three");
+qsTranslate("BarContext", "Four");
+
+var celebration_strings = [
+ QT_TR_NOOP("Happy birthday!"),
+ QT_TRANSLATE_NOOP("BarContext", "Congratulations!")
+];
+
+qsTr("Three", "not the same three");
diff --git a/tests/auto/qscriptengine/translations/translatable_la.qm b/tests/auto/qscriptengine/translations/translatable_la.qm
new file mode 100644
index 0000000..703d0f1
--- /dev/null
+++ b/tests/auto/qscriptengine/translations/translatable_la.qm
Binary files differ
diff --git a/tests/auto/qscriptengine/translations/translatable_la.ts b/tests/auto/qscriptengine/translations/translatable_la.ts
new file mode 100644
index 0000000..1598f39
--- /dev/null
+++ b/tests/auto/qscriptengine/translations/translatable_la.ts
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="nb_NO">
+<context>
+ <name>BarContext</name>
+ <message>
+ <location filename="translatable2.js" line="2"/>
+ <source>Four</source>
+ <translation>Fire</translation>
+ </message>
+ <message>
+ <location filename="translatable2.js" line="6"/>
+ <source>Congratulations!</source>
+ <translation>Gratulerer!</translation>
+ </message>
+</context>
+<context>
+ <name>FooContext</name>
+ <message>
+ <location filename="translatable.js" line="2"/>
+ <source>Two</source>
+ <translation>To</translation>
+ </message>
+ <message>
+ <location filename="translatable.js" line="6"/>
+ <source>Goodbye</source>
+ <translation>Farvel</translation>
+ </message>
+</context>
+<context>
+ <name>translatable</name>
+ <message>
+ <location filename="translatable.js" line="1"/>
+ <source>One</source>
+ <translation>En</translation>
+ </message>
+ <message>
+ <location filename="translatable.js" line="5"/>
+ <source>Hello</source>
+ <translation>Hallo</translation>
+ </message>
+ <message>
+ <location filename="translatable.js" line="9"/>
+ <source>One</source>
+ <comment>not the same one</comment>
+ <translation>Enda en</translation>
+ </message>
+ <message>
+ <source>Goodbye</source>
+ <translation type="obsolete">Farvel</translation>
+ </message>
+</context>
+<context>
+ <name>translatable2</name>
+ <message>
+ <location filename="translatable2.js" line="1"/>
+ <source>Three</source>
+ <translation>Tre</translation>
+ </message>
+ <message>
+ <location filename="translatable2.js" line="5"/>
+ <source>Happy birthday!</source>
+ <translation>Gratulerer med dagen!</translation>
+ </message>
+ <message>
+ <location filename="translatable2.js" line="9"/>
+ <source>Three</source>
+ <comment>not the same three</comment>
+ <translation>Tre andre</translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 25d8e3df..89ea1db 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -155,6 +155,9 @@ private slots:
void incDecNonObjectProperty();
void installTranslatorFunctions_data();
void installTranslatorFunctions();
+ void translateScript();
+ void translateWithInvalidArgs_data();
+ void translateWithInvalidArgs();
void functionScopes();
void nativeFunctionScopes();
void evaluateProgram();
@@ -4335,6 +4338,127 @@ void tst_QScriptEngine::installTranslatorFunctions()
}
}
+static QScriptValue callQsTr(QScriptContext *ctx, QScriptEngine *eng)
+{
+ return eng->globalObject().property("qsTr").call(ctx->thisObject(), ctx->argumentsObject());
+}
+
+void tst_QScriptEngine::translateScript()
+{
+ QScriptEngine engine;
+
+ QTranslator translator;
+ translator.load(":/translations/translatable_la");
+ QCoreApplication::instance()->installTranslator(&translator);
+ engine.installTranslatorFunctions();
+
+ QString fileName = QString::fromLatin1("translatable.js");
+ // Top-level
+ QCOMPARE(engine.evaluate("qsTr('One')", fileName).toString(), QString::fromLatin1("En"));
+ QCOMPARE(engine.evaluate("qsTr('Hello')", fileName).toString(), QString::fromLatin1("Hallo"));
+ // From function
+ QCOMPARE(engine.evaluate("(function() { return qsTr('One'); })()", fileName).toString(), QString::fromLatin1("En"));
+ QCOMPARE(engine.evaluate("(function() { return qsTr('Hello'); })()", fileName).toString(), QString::fromLatin1("Hallo"));
+ // From eval
+ QCOMPARE(engine.evaluate("eval('qsTr(\\'One\\')')", fileName).toString(), QString::fromLatin1("En"));
+ QCOMPARE(engine.evaluate("eval('qsTr(\\'Hello\\')')", fileName).toString(), QString::fromLatin1("Hallo"));
+
+ QCOMPARE(engine.evaluate("qsTranslate('FooContext', 'Two')", fileName).toString(), QString::fromLatin1("To"));
+ QCOMPARE(engine.evaluate("qsTranslate('FooContext', 'Goodbye')", fileName).toString(), QString::fromLatin1("Farvel"));
+ // From eval
+ QCOMPARE(engine.evaluate("eval('qsTranslate(\\'FooContext\\', \\'Two\\')')", fileName).toString(), QString::fromLatin1("To"));
+ QCOMPARE(engine.evaluate("eval('qsTranslate(\\'FooContext\\', \\'Goodbye\\')')", fileName).toString(), QString::fromLatin1("Farvel"));
+
+ QCOMPARE(engine.evaluate("qsTranslate('FooContext', 'Goodbye', '', 'UnicodeUTF8')", fileName).toString(), QString::fromLatin1("Farvel"));
+
+ QCOMPARE(engine.evaluate("qsTr('One', 'not the same one')", fileName).toString(), QString::fromLatin1("Enda en"));
+
+ QVERIFY(engine.evaluate("QT_TR_NOOP()").isUndefined());
+ QCOMPARE(engine.evaluate("QT_TR_NOOP('One')").toString(), QString::fromLatin1("One"));
+
+ QVERIFY(engine.evaluate("QT_TRANSLATE_NOOP()").isUndefined());
+ QVERIFY(engine.evaluate("QT_TRANSLATE_NOOP('FooContext')").isUndefined());
+ QCOMPARE(engine.evaluate("QT_TRANSLATE_NOOP('FooContext', 'Two')").toString(), QString::fromLatin1("Two"));
+
+ // Don't exist in translation
+ QCOMPARE(engine.evaluate("qsTr('Three')", fileName).toString(), QString::fromLatin1("Three"));
+ QCOMPARE(engine.evaluate("qsTranslate('FooContext', 'So long')", fileName).toString(), QString::fromLatin1("So long"));
+ QCOMPARE(engine.evaluate("qsTranslate('BarContext', 'Goodbye')", fileName).toString(), QString::fromLatin1("Goodbye"));
+
+ // From C++
+ // There is no context, but it shouldn't crash
+ QCOMPARE(engine.globalObject().property("qsTr").call(
+ QScriptValue(), QScriptValueList() << "One").toString(), QString::fromLatin1("One"));
+
+ // Translate strings from the second script (translatable2.js)
+
+ QString fileName2 = QString::fromLatin1("translatable2.js");
+
+ QCOMPARE(engine.evaluate("qsTr('Three')", fileName2).toString(), QString::fromLatin1("Tre"));
+ QCOMPARE(engine.evaluate("qsTr('Happy birthday!')", fileName2).toString(), QString::fromLatin1("Gratulerer med dagen!"));
+
+ // Not translated because translation is only in translatable.js
+ QCOMPARE(engine.evaluate("qsTr('One')", fileName2).toString(), QString::fromLatin1("One"));
+ QCOMPARE(engine.evaluate("(function() { return qsTr('One'); })()", fileName2).toString(), QString::fromLatin1("One"));
+
+ // For qsTranslate() the filename shouldn't matter
+ QCOMPARE(engine.evaluate("qsTranslate('FooContext', 'Two')", fileName2).toString(), QString::fromLatin1("To"));
+ QCOMPARE(engine.evaluate("qsTranslate('BarContext', 'Congratulations!')", fileName).toString(), QString::fromLatin1("Gratulerer!"));
+
+ // qsTr() should use the innermost filename as context
+ engine.evaluate("function foo(s) { return bar(s); }", fileName);
+ engine.evaluate("function bar(s) { return qsTr(s); }", fileName2);
+ QCOMPARE(engine.evaluate("bar('Three')", fileName2).toString(), QString::fromLatin1("Tre"));
+ QCOMPARE(engine.evaluate("bar('Three')", fileName).toString(), QString::fromLatin1("Tre"));
+ QCOMPARE(engine.evaluate("bar('One')", fileName2).toString(), QString::fromLatin1("One"));
+
+ engine.evaluate("function foo(s) { return bar(s); }", fileName2);
+ engine.evaluate("function bar(s) { return qsTr(s); }", fileName);
+ QCOMPARE(engine.evaluate("bar('Three')", fileName2).toString(), QString::fromLatin1("Three"));
+ QCOMPARE(engine.evaluate("bar('One')", fileName).toString(), QString::fromLatin1("En"));
+ QCOMPARE(engine.evaluate("bar('One')", fileName2).toString(), QString::fromLatin1("En"));
+
+ // Calling qsTr() from a native function
+ engine.globalObject().setProperty("qsTrProxy", engine.newFunction(callQsTr));
+ QCOMPARE(engine.evaluate("qsTrProxy('One')", fileName).toString(), QString::fromLatin1("En"));
+ QCOMPARE(engine.evaluate("qsTrProxy('One')", fileName2).toString(), QString::fromLatin1("One"));
+ QCOMPARE(engine.evaluate("qsTrProxy('Three')", fileName).toString(), QString::fromLatin1("Three"));
+ QCOMPARE(engine.evaluate("qsTrProxy('Three')", fileName2).toString(), QString::fromLatin1("Tre"));
+
+ QCoreApplication::instance()->removeTranslator(&translator);
+}
+
+void tst_QScriptEngine::translateWithInvalidArgs_data()
+{
+ QTest::addColumn<QString>("expression");
+ QTest::addColumn<QString>("expectedError");
+
+ QTest::newRow("qsTr()") << "qsTr()" << "Error: qsTr() requires at least one argument";
+ QTest::newRow("qsTr(123)") << "qsTr(123)" << "Error: qsTr(): first argument (text) must be a string";
+ QTest::newRow("qsTr('foo', 123)") << "qsTr('foo', 123)" << "Error: qsTr(): second argument (comment) must be a string";
+ QTest::newRow("qsTr('foo', 'bar', 'baz')") << "qsTr('foo', 'bar', 'baz')" << "Error: qsTr(): third argument (n) must be a number";
+ QTest::newRow("qsTr('foo', 'bar', true)") << "qsTr('foo', 'bar', true)" << "Error: qsTr(): third argument (n) must be a number";
+
+ QTest::newRow("qsTranslate()") << "qsTranslate()" << "Error: qsTranslate() requires at least two arguments";
+ QTest::newRow("qsTranslate('foo')") << "qsTranslate('foo')" << "Error: qsTranslate() requires at least two arguments";
+ QTest::newRow("qsTranslate('foo', 123)") << "qsTranslate('foo', 123)" << "Error: qsTranslate(): second argument (text) must be a string";
+ QTest::newRow("qsTranslate('foo', 'bar', 123)") << "qsTranslate('foo', 'bar', 123)" << "Error: qsTranslate(): third argument (comment) must be a string";
+ QTest::newRow("qsTranslate('foo', 'bar', 'baz', 123)") << "qsTranslate('foo', 'bar', 'baz', 123)" << "Error: qsTranslate(): fourth argument (encoding) must be a string";
+ QTest::newRow("qsTranslate('foo', 'bar', 'baz', 'zab', 'rab')") << "qsTranslate('foo', 'bar', 'baz', 'zab', 'rab')" << "Error: qsTranslate(): fifth argument (n) must be a number";
+ QTest::newRow("qsTranslate('foo', 'bar', 'baz', 'zab', 123)") << "qsTranslate('foo', 'bar', 'baz', 'zab', 123)" << "Error: qsTranslate(): invalid encoding 'zab'";
+}
+
+void tst_QScriptEngine::translateWithInvalidArgs()
+{
+ QFETCH(QString, expression);
+ QFETCH(QString, expectedError);
+ QScriptEngine engine;
+ engine.installTranslatorFunctions();
+ QScriptValue result = engine.evaluate(expression);
+ QVERIFY(result.isError());
+ QCOMPARE(result.toString(), expectedError);
+}
+
void tst_QScriptEngine::functionScopes()
{
QScriptEngine eng;
diff --git a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
index c1496f7..09070e6 100644
--- a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
+++ b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
@@ -534,6 +534,7 @@ private slots:
void connectToDestroyedSignal();
void emitAfterReceiverDeleted();
void inheritedSlots();
+ void enumerateMetaObject();
private:
QScriptEngine *m_engine;
@@ -3130,5 +3131,38 @@ void tst_QScriptExtQObject::inheritedSlots()
QCOMPARE(prototypeButtonClickedSpy.count(), 0);
}
+void tst_QScriptExtQObject::enumerateMetaObject()
+{
+ QScriptValue myClass = m_engine->newQMetaObject(m_myObject->metaObject(), m_engine->undefinedValue());
+
+ QStringList expectedNames;
+ expectedNames << "FooPolicy" << "BarPolicy" << "BazPolicy"
+ << "FooStrategy" << "BarStrategy" << "BazStrategy"
+ << "NoAbility" << "FooAbility" << "BarAbility" << "BazAbility" << "AllAbility";
+
+ for (int x = 0; x < 2; ++x) {
+ QSet<QString> actualNames;
+ if (x == 0) {
+ // From C++
+ QScriptValueIterator it(myClass);
+ while (it.hasNext()) {
+ it.next();
+ actualNames.insert(it.name());
+ }
+ } else {
+ // From JS
+ m_engine->globalObject().setProperty("MyClass", myClass);
+ QScriptValue ret = m_engine->evaluate("a=[]; for (var p in MyClass) if (MyClass.hasOwnProperty(p)) a.push(p); a");
+ QVERIFY(ret.isArray());
+ QStringList strings = qscriptvalue_cast<QStringList>(ret);
+ for (int i = 0; i < strings.size(); ++i)
+ actualNames.insert(strings.at(i));
+ }
+ QCOMPARE(actualNames.size(), expectedNames.size());
+ for (int i = 0; i < expectedNames.size(); ++i)
+ QVERIFY(actualNames.contains(expectedNames.at(i)));
+ }
+}
+
QTEST_MAIN(tst_QScriptExtQObject)
#include "tst_qscriptextqobject.moc"
diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
index 10ff488..a280256 100644
--- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
+++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
@@ -683,11 +683,6 @@ tst_Suite::tst_Suite()
addExpectedFailure("ecma_3/String/15.5.4.11.js", "Section 7", willFixInNextReleaseMessage);
addExpectedFailure("ecma_3/String/15.5.4.11.js", "Section 26", willFixInNextReleaseMessage);
-#ifndef Q_CC_MINGW
- addExpectedFailure("ecma/Expressions/11.4.7-02.js", "-(-2147483648) == 2147483648", willFixInNextReleaseMessage);
- addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "- -\"0x80000000\"", willFixInNextReleaseMessage);
-#endif
-
#ifdef Q_CC_MSVC
addExpectedFailure("ecma_3/Expressions/11.7.3-01.js", "11.7.3 - >>> should evaluate operands in order: order", "QTBUG-8056");
addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.7.3 >>>", "QTBUG-8056");
diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
index a679765..8f0cbc3 100644
--- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
+++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
@@ -780,7 +780,7 @@ void tst_QSocks5SocketEngine::downloadBigFile()
QByteArray hostName = QtNetworkSettings::serverName().toLatin1();
QVERIFY(tmpSocket->state() == QAbstractSocket::ConnectedState);
- QVERIFY(tmpSocket->write("GET /mediumfile HTTP/1.0\r\n") > 0);
+ QVERIFY(tmpSocket->write("GET /qtest/mediumfile HTTP/1.0\r\n") > 0);
QVERIFY(tmpSocket->write("HOST: ") > 0);
QVERIFY(tmpSocket->write(hostName.data()) > 0);
QVERIFY(tmpSocket->write("\r\n") > 0);
diff --git a/tests/auto/qtabwidget/tst_qtabwidget.cpp b/tests/auto/qtabwidget/tst_qtabwidget.cpp
index 204c27a..4491fb3 100644
--- a/tests/auto/qtabwidget/tst_qtabwidget.cpp
+++ b/tests/auto/qtabwidget/tst_qtabwidget.cpp
@@ -45,7 +45,6 @@
#include <qdebug.h>
#include <qapplication.h>
#include <qlabel.h>
-#include <qboxlayout.h>
//TESTED_CLASS=
//TESTED_FILES=
@@ -121,8 +120,6 @@ class tst_QTabWidget:public QObject {
void clear();
void keyboardNavigation();
void paintEventCount();
- void heightForWidth();
- void heightForWidth_data();
private:
int addPage();
@@ -624,50 +621,6 @@ void tst_QTabWidget::paintEventCount()
QCOMPARE(tab2->count, 1);
}
-void tst_QTabWidget::heightForWidth_data()
-{
- QTest::addColumn<int>("tabPosition");
- QTest::newRow("West") << int(QTabWidget::West);
- QTest::newRow("North") << int(QTabWidget::North);
- QTest::newRow("East") << int(QTabWidget::East);
- QTest::newRow("South") << int(QTabWidget::South);
-}
-
-void tst_QTabWidget::heightForWidth()
-{
- QFETCH(int, tabPosition);
-
- QWidget *window = new QWidget;
- QVBoxLayout *lay = new QVBoxLayout(window);
- lay->setMargin(0);
- lay->setSpacing(0);
- QTabWidget *tabWid = new QTabWidget(window);
- QWidget *w = new QWidget;
- tabWid->addTab(w, QLatin1String("HFW page"));
- tabWid->setTabPosition(QTabWidget::TabPosition(tabPosition));
- QVBoxLayout *lay2 = new QVBoxLayout(w);
- QLabel *label = new QLabel("Label with wordwrap turned on makes it trade height for width."
- " Make it a really long text so that it spans on several lines"
- " when the label is on its narrowest."
- " I don't like to repeat myself."
- " I don't like to repeat myself."
- " I don't like to repeat myself."
- " I don't like to repeat myself."
- );
- label->setWordWrap(true);
- lay2->addWidget(label);
- lay2->setMargin(0);
-
- lay->addWidget(tabWid);
- int h = window->heightForWidth(160);
- window->resize(160, h);
- window->show();
-
- QTest::qWaitForWindowShown(window);
- QVERIFY(label->height() >= label->heightForWidth(label->width()));
-
- delete window;
-}
QTEST_MAIN(tst_QTabWidget)
#include "tst_qtabwidget.moc"
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index 5a209c2..cd512a1 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -1117,7 +1117,7 @@ void tst_QTcpSocket::downloadBigFile()
QByteArray hostName = QtNetworkSettings::serverName().toLatin1();
QVERIFY(tmpSocket->state() == QAbstractSocket::ConnectedState);
- QVERIFY(tmpSocket->write("GET /mediumfile HTTP/1.0\r\n") > 0);
+ QVERIFY(tmpSocket->write("GET /qtest/mediumfile HTTP/1.0\r\n") > 0);
QVERIFY(tmpSocket->write("HOST: ") > 0);
QVERIFY(tmpSocket->write(hostName.data()) > 0);
QVERIFY(tmpSocket->write("\r\n") > 0);
diff --git a/tests/auto/qtextcursor/tst_qtextcursor.cpp b/tests/auto/qtextcursor/tst_qtextcursor.cpp
index f55b8db..d44ce72 100644
--- a/tests/auto/qtextcursor/tst_qtextcursor.cpp
+++ b/tests/auto/qtextcursor/tst_qtextcursor.cpp
@@ -150,6 +150,7 @@ private slots:
void adjustCursorsOnInsert();
void cursorPositionWithBlockUndoAndRedo();
+ void cursorPositionWithBlockUndoAndRedo2();
private:
int blockCount();
@@ -1778,5 +1779,38 @@ void tst_QTextCursor::cursorPositionWithBlockUndoAndRedo()
QCOMPARE(cursor.position(), cursorPositionAfter);
}
+void tst_QTextCursor::cursorPositionWithBlockUndoAndRedo2()
+{
+ cursor.insertText("AAAABBBB");
+ int cursorPositionBefore = cursor.position();
+ cursor.setPosition(0, QTextCursor::KeepAnchor);
+ cursor.beginEditBlock();
+ cursor.removeSelectedText();
+ cursor.insertText("AAAABBBBCCCCDDDD");
+ cursor.endEditBlock();
+ doc->undo(&cursor);
+ QVERIFY(doc->toPlainText() == "AAAABBBB");
+ QCOMPARE(cursor.position(), cursorPositionBefore);
+
+ cursor.insertText("CCCC");
+ QVERIFY(doc->toPlainText() == "AAAABBBBCCCC");
+
+ cursorPositionBefore = cursor.position();
+ cursor.setPosition(0, QTextCursor::KeepAnchor);
+ cursor.beginEditBlock();
+ cursor.removeSelectedText();
+ cursor.insertText("AAAABBBBCCCCDDDD");
+ cursor.endEditBlock();
+
+ /* this undo now implicitely reinserts two segments, first "CCCCC", then
+ "AAAABBBB". The test ensures that the two are combined in order to
+ reconstruct the correct cursor position */
+ doc->undo(&cursor);
+
+
+ QVERIFY(doc->toPlainText() == "AAAABBBBCCCC");
+ QCOMPARE(cursor.position(), cursorPositionBefore);
+}
+
QTEST_MAIN(tst_QTextCursor)
#include "tst_qtextcursor.moc"
diff --git a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
index 018c036..0a7458f 100644
--- a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -871,6 +871,8 @@ void tst_QTextScriptEngine::malayalam()
{ 0x3f8, 0x0 } },
{ { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 },
{ 0x2ff, 0x0 } },
+ { { 0xd30, 0xd4d, 0x200d, 0xd35, 0xd4d, 0xd35, 0x0 },
+ { 0xf3, 0x350, 0x0 } },
{ {0}, {0} }
};
diff --git a/tests/auto/qthread/tst_qthread.cpp b/tests/auto/qthread/tst_qthread.cpp
index bd1bc53..9a4397e 100644
--- a/tests/auto/qthread/tst_qthread.cpp
+++ b/tests/auto/qthread/tst_qthread.cpp
@@ -168,16 +168,18 @@ public slots:
class Exit_Thread : public Simple_Thread
{
public:
+ Exit_Object *object;
int code;
int result;
void run()
{
Simple_Thread::run();
- Exit_Object o;
- o.thread = this;
- o.code = code;
- QTimer::singleShot(100, &o, SLOT(slot()));
+ if (object) {
+ object->thread = this;
+ object->code = code;
+ QTimer::singleShot(100, object, SLOT(slot()));
+ }
result = exec();
}
};
@@ -211,17 +213,16 @@ public slots:
class Quit_Thread : public Simple_Thread
{
public:
+ Quit_Object *object;
int result;
void run()
{
- {
- QMutexLocker locker(&mutex);
- cond.wakeOne();
+ Simple_Thread::run();
+ if (object) {
+ object->thread = this;
+ QTimer::singleShot(100, object, SLOT(slot()));
}
- Quit_Object o;
- o.thread = this;
- QTimer::singleShot(100, &o, SLOT(slot()));
result = exec();
}
};
@@ -420,6 +421,8 @@ void tst_QThread::stackSize()
void tst_QThread::exit()
{
Exit_Thread thread;
+ thread.object = new Exit_Object;
+ thread.object->moveToThread(&thread);
thread.code = 42;
thread.result = 0;
QVERIFY(!thread.isFinished());
@@ -433,19 +436,31 @@ void tst_QThread::exit()
QVERIFY(thread.isFinished());
QVERIFY(!thread.isRunning());
QCOMPARE(thread.result, thread.code);
+ delete thread.object;
+
+ Exit_Thread thread2;
+ thread2.object = 0;
+ thread2.code = 53;
+ thread2.result = 0;
+ thread2.start();
+ thread2.exit(thread2.code);
+ QMutexLocker locker2(&thread2.mutex);
+ thread2.cond.wait(locker2.mutex());
+ QVERIFY(thread2.wait(five_minutes));
+ QCOMPARE(thread2.result, thread2.code);
}
void tst_QThread::start()
{
QThread::Priority priorities[] = {
- QThread::IdlePriority,
- QThread::LowestPriority,
- QThread::LowPriority,
- QThread::NormalPriority,
- QThread::HighPriority,
- QThread::HighestPriority,
- QThread::TimeCriticalPriority,
- QThread::InheritPriority
+ QThread::IdlePriority,
+ QThread::LowestPriority,
+ QThread::LowPriority,
+ QThread::NormalPriority,
+ QThread::HighPriority,
+ QThread::HighestPriority,
+ QThread::TimeCriticalPriority,
+ QThread::InheritPriority
};
const int prio_count = sizeof(priorities) / sizeof(QThread::Priority);
@@ -480,6 +495,9 @@ void tst_QThread::terminate()
void tst_QThread::quit()
{
Quit_Thread thread;
+ thread.object = new Quit_Object;
+ thread.object->moveToThread(&thread);
+ thread.result = -1;
QVERIFY(!thread.isFinished());
QVERIFY(!thread.isRunning());
QMutexLocker locker(&thread.mutex);
@@ -491,6 +509,17 @@ void tst_QThread::quit()
QVERIFY(thread.isFinished());
QVERIFY(!thread.isRunning());
QCOMPARE(thread.result, 0);
+ delete thread.object;
+
+ Quit_Thread thread2;
+ thread2.object = 0;
+ thread2.result = -1;
+ thread2.start();
+ thread2.quit();
+ QMutexLocker locker2(&thread2.mutex);
+ thread2.cond.wait(locker2.mutex());
+ QVERIFY(thread2.wait(five_minutes));
+ QCOMPARE(thread2.result, 0);
}
void tst_QThread::wait()
@@ -667,7 +696,7 @@ void NativeThreadWrapper::start(FunctionPointer functionPointer, void *data)
const int state = pthread_create(&nativeThreadHandle, 0, NativeThreadWrapper::runUnix, this);
Q_UNUSED(state);
#elif defined(Q_OS_WINCE)
- nativeThreadHandle = CreateThread(NULL, 0 , (LPTHREAD_START_ROUTINE)NativeThreadWrapper::runWin , this, 0, NULL);
+ nativeThreadHandle = CreateThread(NULL, 0 , (LPTHREAD_START_ROUTINE)NativeThreadWrapper::runWin , this, 0, NULL);
#elif defined Q_OS_WIN
unsigned thrdid = 0;
nativeThreadHandle = (Qt::HANDLE) _beginthreadex(NULL, 0, NativeThreadWrapper::runWin, this, 0, &thrdid);
diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
index dd985ca..7dde402 100644
--- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
+++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
@@ -66,6 +66,7 @@ private slots:
void getSetWindowSurface();
void flushOutsidePaintEvent();
void grabWidget();
+ void staticContentsAndPartialUpdateSupport();
};
class MyWindowSurface : public QWindowSurface
@@ -81,6 +82,8 @@ public:
/* nothing */
}
+ using QWindowSurface::setStaticContentsSupport;
+ using QWindowSurface::setPartialUpdateSupport;
private:
QImage image;
};
@@ -280,6 +283,51 @@ void tst_QWindowSurface::grabWidget()
QVERIFY(QColor(childInvalidSubImage.pixel(0, 0)) == QColor(Qt::white));
}
+void tst_QWindowSurface::staticContentsAndPartialUpdateSupport()
+{
+ QWidget widget;
+ MyWindowSurface surface(&widget);
+
+ // Default values.
+ QVERIFY(surface.hasPartialUpdateSupport());
+ QVERIFY(!surface.hasStaticContentsSupport());
+
+ // Partial: YES, Static: YES
+ surface.setStaticContentsSupport(true);
+ QVERIFY(surface.hasPartialUpdateSupport());
+ QVERIFY(surface.hasStaticContentsSupport());
+
+ // Static contents requires support for partial updates.
+ // We simply ingore bad combinations and spit out a warning.
+
+ // CONFLICT: Partial: NO, Static: YES
+ QTest::ignoreMessage(QtWarningMsg, "QWindowSurface::setPartialUpdateSupport: static contents support requires partial update support");
+ surface.setPartialUpdateSupport(false);
+ QVERIFY(surface.hasPartialUpdateSupport());
+ QVERIFY(surface.hasStaticContentsSupport());
+
+ // Partial: YES, Static: NO
+ surface.setStaticContentsSupport(false);
+ QVERIFY(surface.hasPartialUpdateSupport());
+ QVERIFY(!surface.hasStaticContentsSupport());
+
+ // Partial: NO, Static: NO
+ surface.setPartialUpdateSupport(false);
+ QVERIFY(!surface.hasPartialUpdateSupport());
+ QVERIFY(!surface.hasStaticContentsSupport());
+
+ // CONFLICT: Partial: NO, Static: YES
+ QTest::ignoreMessage(QtWarningMsg, "QWindowSurface::setStaticContentsSupport: static contents support requires partial update support");
+ surface.setStaticContentsSupport(true);
+ QVERIFY(!surface.hasPartialUpdateSupport());
+ QVERIFY(!surface.hasStaticContentsSupport());
+
+ // Partial: YES, Static: NO
+ surface.setPartialUpdateSupport(true);
+ QVERIFY(surface.hasPartialUpdateSupport());
+ QVERIFY(!surface.hasStaticContentsSupport());
+}
+
QTEST_MAIN(tst_QWindowSurface)
#else // Q_WS_MAC
diff --git a/tests/auto/uiloader/baseline/css_scroll.ui b/tests/auto/uiloader/baseline/css_scroll.ui
index 0537ab0..6ac6886 100644
--- a/tests/auto/uiloader/baseline/css_scroll.ui
+++ b/tests/auto/uiloader/baseline/css_scroll.ui
@@ -14,8 +14,10 @@
<string>Form</string>
</property>
<property name="styleSheet">
- <string notr="true">QScrollArea { background:red; }
-QScrollArea .QWidget { background:transparent; }
+ <string notr="true">QScrollArea { background:red;
+ border: 5px dashed blue; }
+QScrollArea .QWidget { background:transparent;
+ border: 5px dotted green;}
QScrollArea::corner { background:yellow; }
@@ -111,10 +113,10 @@ QScrollArea::corner { background:yellow; }
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
- <x>-60</x>
- <y>-145</y>
- <width>554</width>
- <height>575</height>
+ <x>0</x>
+ <y>0</y>
+ <width>520</width>
+ <height>532</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_3">