From c72211c1f518adc53e12aaf70e47e966a50698d5 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 19 Nov 2009 12:58:51 +1000 Subject: Test clearing the source of a BorderImage. --- .../tst_qmlgraphicsborderimage.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp b/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp index 06a05dd..a0860c5 100644 --- a/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp +++ b/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include "../shared/testhttpserver.h" @@ -78,6 +79,7 @@ private slots: void noSource(); void imageSource(); void imageSource_data(); + void clearSource(); void resized(); void smooth(); void tileModes(); @@ -143,6 +145,25 @@ void tst_qmlgraphicsborderimage::imageSource() delete obj; } +void tst_qmlgraphicsborderimage::clearSource() +{ + QString componentStr = "import Qt 4.6\nBorderImage { source: srcImage }"; + QmlContext *ctxt = engine.rootContext(); + ctxt->setContextProperty("srcImage", SRCDIR "/data/colors.png"); + QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlGraphicsBorderImage *obj = qobject_cast(component.create()); + QVERIFY(obj != 0); + QVERIFY(obj->status() == QmlGraphicsBorderImage::Ready); + QCOMPARE(obj->width(), 120.); + QCOMPARE(obj->height(), 120.); + + ctxt->setContextProperty("srcImage", ""); + QVERIFY(obj->source().isEmpty()); + QVERIFY(obj->status() == QmlGraphicsBorderImage::Null); + QCOMPARE(obj->width(), 0.); + QCOMPARE(obj->height(), 0.); +} + void tst_qmlgraphicsborderimage::imageSource_data() { QTest::addColumn("source"); -- cgit v0.12 From 1337ed2a695e5d78cfde830f07877ff55a5b7051 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 19 Nov 2009 13:09:38 +1000 Subject: Remove small inefficiency. --- src/declarative/graphicsitems/qmlgraphicsborderimage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp index d7627ac..5b05487 100644 --- a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp @@ -395,7 +395,8 @@ void QmlGraphicsBorderImage::paint(QPainter *p, const QStyleOptionGraphicsItem * if (d->smooth) p->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth); - QMargins margins(border()->top(), border()->left(), border()->bottom(), border()->right()); + const QmlGraphicsScaleGrid *border = d->getScaleGrid(); + QMargins margins(border->top(), border->left(), border->bottom(), border->right()); QTileRules rules((Qt::TileRule)d->horizontalTileMode, (Qt::TileRule)d->verticalTileMode); qDrawBorderPixmap(p, QRect(0, 0, (int)d->width, (int)d->height), margins, d->pix, d->pix.rect(), margins, rules); if (d->smooth) { -- cgit v0.12 From a9a2b17b8a967c001137e12af570856d9ce4b937 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 19 Nov 2009 13:34:28 +1000 Subject: Rename QML Object to QtObject --- examples/declarative/webview/content/Mapping/Map.qml | 2 +- examples/declarative/webview/evalandattach.qml | 4 ++-- src/declarative/qml/qmlengine.cpp | 2 +- tests/auto/declarative/parserstress/tst_parserstress.cpp | 2 +- tests/auto/declarative/qmlcontext/tst_qmlcontext.cpp | 14 +++++++------- tests/auto/declarative/qmldom/tst_qmldom.cpp | 6 +++--- .../qmlecmascript/data/NestedTypeTransientErrors.qml | 4 ++-- .../qmlecmascript/data/aliasPropertyAndBinding.qml | 2 +- .../qmlecmascript/data/extendedObjectPropertyLookup.qml | 2 +- .../qmlecmascript/data/idShortcutInvalidates.1.qml | 2 +- .../qmlecmascript/data/idShortcutInvalidates.qml | 2 +- .../auto/declarative/qmlecmascript/data/listProperties.qml | 10 +++++----- tests/auto/declarative/qmlecmascript/data/methods.3.qml | 2 +- tests/auto/declarative/qmlecmascript/data/scope.2.qml | 6 +++--- .../auto/declarative/qmlecmascript/data/shutdownErrors.qml | 4 ++-- .../qmlecmascript/data/signalTriggeredBindings.qml | 2 +- .../declarative/qmlecmascript/data/transientErrors.qml | 2 +- tests/auto/declarative/qmlengine/tst_qmlengine.cpp | 4 ++-- .../declarative/qmlgraphicswebview/data/javaScript.qml | 2 +- tests/auto/declarative/qmlinfo/data/NestedObject.qml | 4 ++-- tests/auto/declarative/qmlinfo/data/nestedQmlObject.qml | 2 +- tests/auto/declarative/qmlinfo/data/qmlObject.qml | 4 ++-- tests/auto/declarative/qmllanguage/data/Alias.qml | 2 +- tests/auto/declarative/qmllanguage/data/Alias2.qml | 2 +- .../declarative/qmllanguage/data/ComponentComposite.qml | 2 +- tests/auto/declarative/qmllanguage/data/CompositeType.qml | 2 +- tests/auto/declarative/qmllanguage/data/CompositeType3.qml | 2 +- .../qmllanguage/data/DynamicPropertiesNestedType.qml | 2 +- tests/auto/declarative/qmllanguage/data/NestedAlias.qml | 10 +++++----- tests/auto/declarative/qmllanguage/data/alias.1.qml | 2 +- tests/auto/declarative/qmllanguage/data/alias.3.qml | 2 +- tests/auto/declarative/qmllanguage/data/alias.5.qml | 2 +- tests/auto/declarative/qmllanguage/data/alias.6.qml | 4 ++-- tests/auto/declarative/qmllanguage/data/alias.7.qml | 10 +++++----- .../declarative/qmllanguage/data/assignCompositeToType.qml | 10 +++++----- .../declarative/qmllanguage/data/assignObjectToVariant.qml | 3 ++- .../declarative/qmllanguage/data/attachedProperties.qml | 2 +- tests/auto/declarative/qmllanguage/data/component.2.qml | 2 +- tests/auto/declarative/qmllanguage/data/component.3.qml | 2 +- tests/auto/declarative/qmllanguage/data/component.4.qml | 4 ++-- tests/auto/declarative/qmllanguage/data/component.5.qml | 2 +- tests/auto/declarative/qmllanguage/data/component.6.qml | 4 ++-- .../qmllanguage/data/componentCompositeType.qml | 2 +- tests/auto/declarative/qmllanguage/data/crash2.qml | 2 +- tests/auto/declarative/qmllanguage/data/defaultGrouped.qml | 2 +- .../qmllanguage/data/dynamicObjectProperties.qml | 8 ++++---- .../declarative/qmllanguage/data/dynamicProperties.qml | 2 +- .../qmllanguage/data/dynamicSignalsAndSlots.qml | 2 +- .../qmllanguage/data/invalidAttachedProperty.1.qml | 2 +- .../qmllanguage/data/invalidAttachedProperty.10.qml | 2 +- .../qmllanguage/data/invalidAttachedProperty.11.qml | 2 +- .../qmllanguage/data/invalidAttachedProperty.2.qml | 2 +- .../qmllanguage/data/invalidAttachedProperty.3.qml | 2 +- .../qmllanguage/data/invalidAttachedProperty.4.qml | 2 +- .../qmllanguage/data/invalidAttachedProperty.5.qml | 4 ++-- .../qmllanguage/data/invalidAttachedProperty.6.qml | 4 ++-- .../qmllanguage/data/invalidAttachedProperty.7.qml | 2 +- .../qmllanguage/data/invalidAttachedProperty.8.qml | 2 +- .../qmllanguage/data/invalidAttachedProperty.9.qml | 2 +- .../qmllanguage/data/invalidGroupedProperty.1.qml | 2 +- .../qmllanguage/data/invalidGroupedProperty.2.qml | 2 +- .../auto/declarative/qmllanguage/data/invalidImportID.qml | 2 +- tests/auto/declarative/qmllanguage/data/listProperties.qml | 6 +++--- tests/auto/declarative/qmllanguage/data/missingSignal.qml | 2 +- tests/auto/declarative/qmllanguage/data/property.1.qml | 2 +- tests/auto/declarative/qmllanguage/data/property.2.qml | 2 +- tests/auto/declarative/qmllanguage/data/property.3.qml | 4 ++-- tests/auto/declarative/qmllanguage/data/property.4.qml | 2 +- tests/auto/declarative/qmllanguage/data/property.5.qml | 2 +- .../data/qmlAttachedPropertiesObjectMethod.1.qml | 2 +- .../data/qmlAttachedPropertiesObjectMethod.2.qml | 2 +- tests/auto/declarative/qmllanguage/data/script.11.qml | 4 ++-- tests/auto/declarative/qmllanguage/data/script.12.qml | 2 +- tests/auto/declarative/qmllanguage/data/script.2.qml | 2 +- tests/auto/declarative/qmllanguage/data/script.3.qml | 2 +- tests/auto/declarative/qmllanguage/data/script.4.qml | 2 +- tests/auto/declarative/qmllanguage/data/script.5.qml | 2 +- tests/auto/declarative/qmllanguage/data/script.6.qml | 2 +- tests/auto/declarative/qmllanguage/data/script.7.qml | 2 +- tests/auto/declarative/qmllanguage/data/script.8.qml | 2 +- tests/auto/declarative/qmllanguage/data/signal.1.qml | 2 +- tests/auto/declarative/qmllanguage/data/signal.2.qml | 2 +- tests/auto/declarative/qmllanguage/data/signal.3.qml | 2 +- tests/auto/declarative/qmlqt/data/closestangle.qml | 2 +- tests/auto/declarative/qmlqt/data/createComponent.qml | 2 +- tests/auto/declarative/qmlqt/data/createComponentData.qml | 2 +- tests/auto/declarative/qmlqt/data/createQmlObject.qml | 12 ++++++------ tests/auto/declarative/qmlqt/data/darker.qml | 2 +- tests/auto/declarative/qmlqt/data/enums.qml | 2 +- tests/auto/declarative/qmlqt/data/hsla.qml | 2 +- tests/auto/declarative/qmlqt/data/lighter.qml | 2 +- tests/auto/declarative/qmlqt/data/md5.qml | 2 +- tests/auto/declarative/qmlqt/data/point.qml | 2 +- tests/auto/declarative/qmlqt/data/rect.qml | 2 +- tests/auto/declarative/qmlqt/data/rgba.qml | 2 +- tests/auto/declarative/qmlqt/data/size.qml | 2 +- tests/auto/declarative/qmlqt/data/tint.qml | 2 +- tests/auto/declarative/qmlqt/data/vector.qml | 2 +- .../visual/webview/javascript/evaluateJavaScript.qml | 2 +- .../visual/webview/javascript/windowObjects.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/abort.qml | 2 +- .../auto/declarative/xmlhttprequest/data/abort_opened.qml | 2 +- .../auto/declarative/xmlhttprequest/data/abort_unsent.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/attr.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/cdata.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/constructor.qml | 2 +- .../auto/declarative/xmlhttprequest/data/defaultState.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/document.qml | 2 +- .../declarative/xmlhttprequest/data/domExceptionCodes.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/element.qml | 2 +- .../xmlhttprequest/data/getAllResponseHeaders.qml | 2 +- .../xmlhttprequest/data/getAllResponseHeaders_args.qml | 2 +- .../xmlhttprequest/data/getAllResponseHeaders_sent.qml | 2 +- .../xmlhttprequest/data/getAllResponseHeaders_unsent.qml | 2 +- .../declarative/xmlhttprequest/data/getResponseHeader.qml | 2 +- .../xmlhttprequest/data/getResponseHeader_args.qml | 2 +- .../xmlhttprequest/data/getResponseHeader_sent.qml | 2 +- .../xmlhttprequest/data/getResponseHeader_unsent.qml | 2 +- .../xmlhttprequest/data/instanceStateValues.qml | 2 +- .../declarative/xmlhttprequest/data/invalidMethodUsage.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/open.qml | 2 +- .../declarative/xmlhttprequest/data/open_arg_count.1.qml | 2 +- .../declarative/xmlhttprequest/data/open_arg_count.2.qml | 2 +- .../xmlhttprequest/data/open_invalid_method.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/open_sync.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/open_user.qml | 2 +- .../auto/declarative/xmlhttprequest/data/open_username.qml | 2 +- .../auto/declarative/xmlhttprequest/data/responseText.qml | 2 +- .../xmlhttprequest/data/responseXML_invalid.qml | 2 +- .../declarative/xmlhttprequest/data/send_alreadySent.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/send_data.1.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/send_data.2.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/send_data.3.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/send_data.4.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/send_data.5.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/send_data.6.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/send_data.7.qml | 2 +- .../declarative/xmlhttprequest/data/send_ignoreData.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/send_unsent.qml | 2 +- .../declarative/xmlhttprequest/data/setRequestHeader.qml | 2 +- .../xmlhttprequest/data/setRequestHeader_args.qml | 2 +- .../xmlhttprequest/data/setRequestHeader_illegalName.qml | 2 +- .../xmlhttprequest/data/setRequestHeader_sent.qml | 2 +- .../xmlhttprequest/data/setRequestHeader_unsent.qml | 2 +- .../declarative/xmlhttprequest/data/staticStateValues.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/status.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/statusText.qml | 2 +- tests/auto/declarative/xmlhttprequest/data/text.qml | 2 +- 148 files changed, 198 insertions(+), 197 deletions(-) diff --git a/examples/declarative/webview/content/Mapping/Map.qml b/examples/declarative/webview/content/Mapping/Map.qml index 9bde031..aae6b5d 100644 --- a/examples/declarative/webview/content/Mapping/Map.qml +++ b/examples/declarative/webview/content/Mapping/Map.qml @@ -9,7 +9,7 @@ Item { id: map anchors.fill: parent url: "map.html" - javaScriptWindowObjects: Object { + javaScriptWindowObjects: QtObject { WebView.windowObjectName: "qml" property real lat: page.latitude property real lng: page.longitude diff --git a/examples/declarative/webview/evalandattach.qml b/examples/declarative/webview/evalandattach.qml index e755819..1b211c9 100644 --- a/examples/declarative/webview/evalandattach.qml +++ b/examples/declarative/webview/evalandattach.qml @@ -37,12 +37,12 @@ Item { focus: true settings.pluginsEnabled: true javaScriptWindowObjects: [ - Object { + QtObject { id: txt WebView.windowObjectName: "statusText1" property string text: "Click me!" }, - Object { + QtObject { id: txt2 WebView.windowObjectName: "statusText2" property string text: "" diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 86472de..e292e5c 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -99,7 +99,7 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE) -QML_DEFINE_TYPE(Qt,4,6,Object,QObject) +QML_DEFINE_TYPE(Qt,4,6,QtObject,QObject) struct StaticQtMetaObject : public QObject { diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp index dd8f347..e584140 100644 --- a/tests/auto/declarative/parserstress/tst_parserstress.cpp +++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp @@ -115,7 +115,7 @@ void tst_parserstress::ecmascript() QString qml = "import Qt 4.6\n"; qml+= "\n"; - qml+= "Object {\n"; + qml+= "QtObject {\n"; qml+= " property int test\n"; qml+= " test: {\n"; qml+= dataStr + "\n"; diff --git a/tests/auto/declarative/qmlcontext/tst_qmlcontext.cpp b/tests/auto/declarative/qmlcontext/tst_qmlcontext.cpp index 3c60b2b..f82f202 100644 --- a/tests/auto/declarative/qmlcontext/tst_qmlcontext.cpp +++ b/tests/auto/declarative/qmlcontext/tst_qmlcontext.cpp @@ -244,7 +244,7 @@ private: #define TEST_CONTEXT_PROPERTY(ctxt, name, value) \ { \ QmlComponent component(&engine); \ - component.setData("import Qt 4.6; Object { property var test: " #name " }", QUrl()); \ + component.setData("import Qt 4.6; QtObject { property var test: " #name " }", QUrl()); \ \ QObject *obj = component.create(ctxt); \ \ @@ -294,7 +294,7 @@ void tst_qmlcontext::setContextProperty() // Changes in context properties { QmlComponent component(&engine); - component.setData("import Qt 4.6; Object { property var test: a }", QUrl()); + component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -306,7 +306,7 @@ void tst_qmlcontext::setContextProperty() } { QmlComponent component(&engine); - component.setData("import Qt 4.6; Object { property var test: b }", QUrl()); + component.setData("import Qt 4.6; QtObject { property var test: b }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -320,7 +320,7 @@ void tst_qmlcontext::setContextProperty() } { QmlComponent component(&engine); - component.setData("import Qt 4.6; Object { property var test: e.a }", QUrl()); + component.setData("import Qt 4.6; QtObject { property var test: e.a }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -334,7 +334,7 @@ void tst_qmlcontext::setContextProperty() // New context properties { QmlComponent component(&engine); - component.setData("import Qt 4.6; Object { property var test: a }", QUrl()); + component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -348,7 +348,7 @@ void tst_qmlcontext::setContextProperty() // Setting an object-variant context property { QmlComponent component(&engine); - component.setData("import Qt 4.6; Object { id: root; property int a: 10; property int test: ctxtProp.a; property var obj: root; }", QUrl()); + component.setData("import Qt 4.6; QtObject { id: root; property int a: 10; property int test: ctxtProp.a; property var obj: root; }", QUrl()); QmlContext ctxt(engine.rootContext()); ctxt.setContextProperty("ctxtProp", QVariant()); @@ -400,7 +400,7 @@ void tst_qmlcontext::addDefaultObject() // Changes in context properties { QmlComponent component(&engine); - component.setData("import Qt 4.6; Object { property var test: a }", QUrl()); + component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl()); QObject *obj = component.create(&ctxt); diff --git a/tests/auto/declarative/qmldom/tst_qmldom.cpp b/tests/auto/declarative/qmldom/tst_qmldom.cpp index 9e1a2a8..6527b36 100644 --- a/tests/auto/declarative/qmldom/tst_qmldom.cpp +++ b/tests/auto/declarative/qmldom/tst_qmldom.cpp @@ -452,7 +452,7 @@ void tst_qmldom::loadDynamicProperty() " property date h\n" " property var i\n" " property variant j\n" - " property Object k\n" + " property QtObject k\n" "}"; QmlDomDocument document; @@ -486,7 +486,7 @@ void tst_qmldom::loadDynamicProperty() DP_TEST(7, h, QVariant::Date, 168, 15, "date"); DP_TEST(8, i, qMetaTypeId(), 188, 14, "var"); DP_TEST(9, j, qMetaTypeId(), 207, 18, "variant"); - DP_TEST(10, k, -1, 230, 17, "Object"); + DP_TEST(10, k, -1, 230, 17, "QtObject"); } { @@ -494,7 +494,7 @@ void tst_qmldom::loadDynamicProperty() "Item {\n" " property int a: 12\n" " property int b: a + 6\n" - " default property Object c\n" + " default property QtObject c\n" "}\n"; QmlDomDocument document; diff --git a/tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml b/tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml index e19bf24..7c32e56 100644 --- a/tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml +++ b/tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml @@ -1,10 +1,10 @@ import Qt 4.6 -Object { +QtObject { property int b: obj.prop.a property var prop; - prop: Object { + prop: QtObject { property int a: 10 } } diff --git a/tests/auto/declarative/qmlecmascript/data/aliasPropertyAndBinding.qml b/tests/auto/declarative/qmlecmascript/data/aliasPropertyAndBinding.qml index 6143164..7fdd8ca 100644 --- a/tests/auto/declarative/qmlecmascript/data/aliasPropertyAndBinding.qml +++ b/tests/auto/declarative/qmlecmascript/data/aliasPropertyAndBinding.qml @@ -5,7 +5,7 @@ MyQmlObject { property alias c1: MyObject.c1 property int c2: 3 property int c3: c2 - objectProperty: Object { + objectProperty: QtObject { id: MyObject property int c1 } diff --git a/tests/auto/declarative/qmlecmascript/data/extendedObjectPropertyLookup.qml b/tests/auto/declarative/qmlecmascript/data/extendedObjectPropertyLookup.qml index 8ff3aeb..ab379c1 100644 --- a/tests/auto/declarative/qmlecmascript/data/extendedObjectPropertyLookup.qml +++ b/tests/auto/declarative/qmlecmascript/data/extendedObjectPropertyLookup.qml @@ -1,7 +1,7 @@ import Qt.test 1.0 import Qt 4.6 -Object { +QtObject { property MyExtendedObject a; a: MyExtendedObject { id: Root } property int b: Math.max(Root.extendedProperty, 0) diff --git a/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.1.qml b/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.1.qml index ccb3a22..b377b94 100644 --- a/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.1.qml +++ b/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.1.qml @@ -6,7 +6,7 @@ MyQmlObject { property var obj - obj: Object { + obj: QtObject { id: OtherObject } } diff --git a/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.qml b/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.qml index 6c1fca6..40cacf6 100644 --- a/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.qml +++ b/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.qml @@ -6,7 +6,7 @@ MyQmlObject { property var obj - obj: Object { + obj: QtObject { id: OtherObject } } diff --git a/tests/auto/declarative/qmlecmascript/data/listProperties.qml b/tests/auto/declarative/qmlecmascript/data/listProperties.qml index 73a1d6f..cae1721 100644 --- a/tests/auto/declarative/qmlecmascript/data/listProperties.qml +++ b/tests/auto/declarative/qmlecmascript/data/listProperties.qml @@ -5,14 +5,14 @@ MyQmlObject { id: root objectListProperty: [ - Object { property int a: 10 }, - Object { property int a: 11 } + QtObject { property int a: 10 }, + QtObject { property int a: 11 } ] objectQmlListProperty: [ - Object { property int a: 10 }, - Object { property int a: 1 }, - Object { property int a: 39 } + QtObject { property int a: 10 }, + QtObject { property int a: 1 }, + QtObject { property int a: 39 } ] Script { diff --git a/tests/auto/declarative/qmlecmascript/data/methods.3.qml b/tests/auto/declarative/qmlecmascript/data/methods.3.qml index 2efcf6a..79efc50 100644 --- a/tests/auto/declarative/qmlecmascript/data/methods.3.qml +++ b/tests/auto/declarative/qmlecmascript/data/methods.3.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { function testFunction() { return 19; } property int test: testFunction() diff --git a/tests/auto/declarative/qmlecmascript/data/scope.2.qml b/tests/auto/declarative/qmlecmascript/data/scope.2.qml index 433a22e..8e5aa0b 100644 --- a/tests/auto/declarative/qmlecmascript/data/scope.2.qml +++ b/tests/auto/declarative/qmlecmascript/data/scope.2.qml @@ -9,17 +9,17 @@ Item { function c() { return 33; } } - Object { + QtObject { id: a property int value: 19 } - Object { + QtObject { id: c property int value: 24 } - Object { + QtObject { id: nested property int a: 1 property int test: a.value diff --git a/tests/auto/declarative/qmlecmascript/data/shutdownErrors.qml b/tests/auto/declarative/qmlecmascript/data/shutdownErrors.qml index 398489a..5a19639 100644 --- a/tests/auto/declarative/qmlecmascript/data/shutdownErrors.qml +++ b/tests/auto/declarative/qmlecmascript/data/shutdownErrors.qml @@ -5,8 +5,8 @@ Item { Item { id: myObject - property Object object; - object: Object { + property QtObject object; + object: QtObject { property int a: 10 } } diff --git a/tests/auto/declarative/qmlecmascript/data/signalTriggeredBindings.qml b/tests/auto/declarative/qmlecmascript/data/signalTriggeredBindings.qml index f65e253..7d419cd 100644 --- a/tests/auto/declarative/qmlecmascript/data/signalTriggeredBindings.qml +++ b/tests/auto/declarative/qmlecmascript/data/signalTriggeredBindings.qml @@ -6,7 +6,7 @@ MyQmlObject { property alias test1: myObject.test1 property alias test2: myObject.test2 - objectProperty: Object { + objectProperty: QtObject { id: myObject property real test1: base property real test2: Math.max(0, base) diff --git a/tests/auto/declarative/qmlecmascript/data/transientErrors.qml b/tests/auto/declarative/qmlecmascript/data/transientErrors.qml index 4e123c6..fa7e01c 100644 --- a/tests/auto/declarative/qmlecmascript/data/transientErrors.qml +++ b/tests/auto/declarative/qmlecmascript/data/transientErrors.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property var obj: nested property var obj2 diff --git a/tests/auto/declarative/qmlengine/tst_qmlengine.cpp b/tests/auto/declarative/qmlengine/tst_qmlengine.cpp index 5471691..8794af9 100644 --- a/tests/auto/declarative/qmlengine/tst_qmlengine.cpp +++ b/tests/auto/declarative/qmlengine/tst_qmlengine.cpp @@ -189,7 +189,7 @@ void tst_qmlengine::clearComponentCache() { QFile file("temp.qml"); QVERIFY(file.open(QIODevice::WriteOnly)); - file.write("import Qt 4.6\nObject {\nproperty int test: 10\n}\n"); + file.write("import Qt 4.6\nQtObject {\nproperty int test: 10\n}\n"); file.close(); } @@ -206,7 +206,7 @@ void tst_qmlengine::clearComponentCache() { QFile file("temp.qml"); QVERIFY(file.open(QIODevice::WriteOnly)); - file.write("import Qt 4.6\nObject {\nproperty int test: 11\n}\n"); + file.write("import Qt 4.6\nQtObject {\nproperty int test: 11\n}\n"); file.close(); } diff --git a/tests/auto/declarative/qmlgraphicswebview/data/javaScript.qml b/tests/auto/declarative/qmlgraphicswebview/data/javaScript.qml index 28742f3..07eee88 100644 --- a/tests/auto/declarative/qmlgraphicswebview/data/javaScript.qml +++ b/tests/auto/declarative/qmlgraphicswebview/data/javaScript.qml @@ -3,7 +3,7 @@ import Qt 4.6 WebView { url: "javaScript.html" javaScriptWindowObjects: [ - Object { + QtObject { property string qmlprop: "qmlvalue" WebView.windowObjectName: "myjsname" } diff --git a/tests/auto/declarative/qmlinfo/data/NestedObject.qml b/tests/auto/declarative/qmlinfo/data/NestedObject.qml index ac96d20..cd5b426 100644 --- a/tests/auto/declarative/qmlinfo/data/NestedObject.qml +++ b/tests/auto/declarative/qmlinfo/data/NestedObject.qml @@ -1,8 +1,8 @@ import Qt 4.6 -Object { +QtObject { property var nested - nested: Object {} + nested: QtObject {} } diff --git a/tests/auto/declarative/qmlinfo/data/nestedQmlObject.qml b/tests/auto/declarative/qmlinfo/data/nestedQmlObject.qml index ee98354..a2ce78a 100644 --- a/tests/auto/declarative/qmlinfo/data/nestedQmlObject.qml +++ b/tests/auto/declarative/qmlinfo/data/nestedQmlObject.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property var nested nested: NestedObject { } property var nested2: nested.nested diff --git a/tests/auto/declarative/qmlinfo/data/qmlObject.qml b/tests/auto/declarative/qmlinfo/data/qmlObject.qml index b86063b..ce05f89 100644 --- a/tests/auto/declarative/qmlinfo/data/qmlObject.qml +++ b/tests/auto/declarative/qmlinfo/data/qmlObject.qml @@ -1,8 +1,8 @@ import Qt 4.6 -Object { +QtObject { property var nested - nested: Object { + nested: QtObject { } } diff --git a/tests/auto/declarative/qmllanguage/data/Alias.qml b/tests/auto/declarative/qmllanguage/data/Alias.qml index 8264e0d..af6187a 100644 --- a/tests/auto/declarative/qmllanguage/data/Alias.qml +++ b/tests/auto/declarative/qmllanguage/data/Alias.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { id: Root property int value: 1892 property alias aliasValue: Root.value diff --git a/tests/auto/declarative/qmllanguage/data/Alias2.qml b/tests/auto/declarative/qmllanguage/data/Alias2.qml index b7e81a5..6362b2d 100644 --- a/tests/auto/declarative/qmllanguage/data/Alias2.qml +++ b/tests/auto/declarative/qmllanguage/data/Alias2.qml @@ -1,7 +1,7 @@ import Test 1.0 import Qt 4.6 -Object { +QtObject { property var other other: MyTypeObject { id: obj } property alias enumAlias: obj.enumProperty; diff --git a/tests/auto/declarative/qmllanguage/data/ComponentComposite.qml b/tests/auto/declarative/qmllanguage/data/ComponentComposite.qml index f8726ef..05fbc3f 100644 --- a/tests/auto/declarative/qmllanguage/data/ComponentComposite.qml +++ b/tests/auto/declarative/qmllanguage/data/ComponentComposite.qml @@ -1,5 +1,5 @@ import Qt 4.6 Component { - Object {} + QtObject {} } diff --git a/tests/auto/declarative/qmllanguage/data/CompositeType.qml b/tests/auto/declarative/qmllanguage/data/CompositeType.qml index 8c5094b..99d010f 100644 --- a/tests/auto/declarative/qmllanguage/data/CompositeType.qml +++ b/tests/auto/declarative/qmllanguage/data/CompositeType.qml @@ -1,4 +1,4 @@ import Qt 4.6 -Object { +QtObject { } diff --git a/tests/auto/declarative/qmllanguage/data/CompositeType3.qml b/tests/auto/declarative/qmllanguage/data/CompositeType3.qml index bb5469a..d08f35b 100644 --- a/tests/auto/declarative/qmllanguage/data/CompositeType3.qml +++ b/tests/auto/declarative/qmllanguage/data/CompositeType3.qml @@ -1,5 +1,5 @@ import Qt 4.6 -Object { +QtObject { property int a } diff --git a/tests/auto/declarative/qmllanguage/data/DynamicPropertiesNestedType.qml b/tests/auto/declarative/qmllanguage/data/DynamicPropertiesNestedType.qml index 5c2edb4..aefbf9a 100644 --- a/tests/auto/declarative/qmllanguage/data/DynamicPropertiesNestedType.qml +++ b/tests/auto/declarative/qmllanguage/data/DynamicPropertiesNestedType.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property int super_a: 10 property int super_c: 14 } diff --git a/tests/auto/declarative/qmllanguage/data/NestedAlias.qml b/tests/auto/declarative/qmllanguage/data/NestedAlias.qml index 93a5454..5155612 100644 --- a/tests/auto/declarative/qmllanguage/data/NestedAlias.qml +++ b/tests/auto/declarative/qmllanguage/data/NestedAlias.qml @@ -1,13 +1,13 @@ import Qt 4.6 -Object { - property Object o1 - property Object o2 +QtObject { + property QtObject o1 + property QtObject o2 property alias a: object2.a - o1: Object { id: object1 } - o2: Object { + o1: QtObject { id: object1 } + o2: QtObject { id: object2 property int a: 1923 } diff --git a/tests/auto/declarative/qmllanguage/data/alias.1.qml b/tests/auto/declarative/qmllanguage/data/alias.1.qml index 492d99a..3ad8f38 100644 --- a/tests/auto/declarative/qmllanguage/data/alias.1.qml +++ b/tests/auto/declarative/qmllanguage/data/alias.1.qml @@ -1,7 +1,7 @@ import Test 1.0 import Qt 4.6 -Object { +QtObject { id: Root property int value: 10 property alias valueAlias: Root.value diff --git a/tests/auto/declarative/qmllanguage/data/alias.3.qml b/tests/auto/declarative/qmllanguage/data/alias.3.qml index e25fbae..fa8a253 100644 --- a/tests/auto/declarative/qmllanguage/data/alias.3.qml +++ b/tests/auto/declarative/qmllanguage/data/alias.3.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property var other other: Alias { id: MyAliasObject } diff --git a/tests/auto/declarative/qmllanguage/data/alias.5.qml b/tests/auto/declarative/qmllanguage/data/alias.5.qml index 39bfd9b..4316d0d 100644 --- a/tests/auto/declarative/qmllanguage/data/alias.5.qml +++ b/tests/auto/declarative/qmllanguage/data/alias.5.qml @@ -1,7 +1,7 @@ import Qt 4.6 import Test 1.0 -Object { +QtObject { property alias otherAlias: otherObject property var other diff --git a/tests/auto/declarative/qmllanguage/data/alias.6.qml b/tests/auto/declarative/qmllanguage/data/alias.6.qml index aac0ef3..e3af230 100644 --- a/tests/auto/declarative/qmllanguage/data/alias.6.qml +++ b/tests/auto/declarative/qmllanguage/data/alias.6.qml @@ -1,7 +1,7 @@ import Qt 4.6 -Object { - property Object o; +QtObject { + property QtObject o; property alias a: object.a o: NestedAlias { id: object } } diff --git a/tests/auto/declarative/qmllanguage/data/alias.7.qml b/tests/auto/declarative/qmllanguage/data/alias.7.qml index d3cf5fe..a9a57eb 100644 --- a/tests/auto/declarative/qmllanguage/data/alias.7.qml +++ b/tests/auto/declarative/qmllanguage/data/alias.7.qml @@ -1,14 +1,14 @@ import Qt 4.6 -Object { - property Object object +QtObject { + property QtObject object property alias aliasedObject: target.object - object: Object { + object: QtObject { id: target - property Object object - object: Object {} + property QtObject object + object: QtObject {} } } diff --git a/tests/auto/declarative/qmllanguage/data/assignCompositeToType.qml b/tests/auto/declarative/qmllanguage/data/assignCompositeToType.qml index ec2867d..f6422bd 100644 --- a/tests/auto/declarative/qmllanguage/data/assignCompositeToType.qml +++ b/tests/auto/declarative/qmllanguage/data/assignCompositeToType.qml @@ -1,11 +1,11 @@ import Qt 4.6 import Test 1.0 -Object { - property Object myProperty - property Object myProperty2 - property Object myProperty3 - property Object myProperty4 +QtObject { + property QtObject myProperty + property QtObject myProperty2 + property QtObject myProperty3 + property QtObject myProperty4 property MyQmlObject myProperty5 property MyQmlObject myProperty6 diff --git a/tests/auto/declarative/qmllanguage/data/assignObjectToVariant.qml b/tests/auto/declarative/qmllanguage/data/assignObjectToVariant.qml index 28c68c4..0ff9370 100644 --- a/tests/auto/declarative/qmllanguage/data/assignObjectToVariant.qml +++ b/tests/auto/declarative/qmllanguage/data/assignObjectToVariant.qml @@ -1,6 +1,7 @@ import Test 1.0 import Qt 4.6 -Object { + +QtObject { property var a; a: MyQmlObject {} } diff --git a/tests/auto/declarative/qmllanguage/data/attachedProperties.qml b/tests/auto/declarative/qmllanguage/data/attachedProperties.qml index fec96cc..b46ec34 100644 --- a/tests/auto/declarative/qmllanguage/data/attachedProperties.qml +++ b/tests/auto/declarative/qmllanguage/data/attachedProperties.qml @@ -2,7 +2,7 @@ import Test 1.0 import Test 1.0 as Namespace import Qt 4.6 -Object { +QtObject { MyQmlObject.value: 10 Namespace.MyQmlObject.value2: 13 } diff --git a/tests/auto/declarative/qmllanguage/data/component.2.qml b/tests/auto/declarative/qmllanguage/data/component.2.qml index 74a4f89..88e0f73 100644 --- a/tests/auto/declarative/qmllanguage/data/component.2.qml +++ b/tests/auto/declarative/qmllanguage/data/component.2.qml @@ -4,6 +4,6 @@ Item { id: myId Component { id: myId - Object {} + QtObject {} } } diff --git a/tests/auto/declarative/qmllanguage/data/component.3.qml b/tests/auto/declarative/qmllanguage/data/component.3.qml index 043cb6b..287a959 100644 --- a/tests/auto/declarative/qmllanguage/data/component.3.qml +++ b/tests/auto/declarative/qmllanguage/data/component.3.qml @@ -4,6 +4,6 @@ Item { Component { id: myId id: myId2 - Object {} + QtObject {} } } diff --git a/tests/auto/declarative/qmllanguage/data/component.4.qml b/tests/auto/declarative/qmllanguage/data/component.4.qml index 3d115ba..ab1e29b 100644 --- a/tests/auto/declarative/qmllanguage/data/component.4.qml +++ b/tests/auto/declarative/qmllanguage/data/component.4.qml @@ -1,6 +1,6 @@ import Qt 4.6 Component { - Object {} - Object {} + QtObject {} + QtObject {} } diff --git a/tests/auto/declarative/qmllanguage/data/component.5.qml b/tests/auto/declarative/qmllanguage/data/component.5.qml index ab57622..629e998 100644 --- a/tests/auto/declarative/qmllanguage/data/component.5.qml +++ b/tests/auto/declarative/qmllanguage/data/component.5.qml @@ -2,5 +2,5 @@ import Qt 4.6 Component { x: 10 - Object {} + QtObject {} } diff --git a/tests/auto/declarative/qmllanguage/data/component.6.qml b/tests/auto/declarative/qmllanguage/data/component.6.qml index 6adaf0d..2303ebf 100644 --- a/tests/auto/declarative/qmllanguage/data/component.6.qml +++ b/tests/auto/declarative/qmllanguage/data/component.6.qml @@ -1,6 +1,6 @@ import Qt 4.6 Component { - id: Object {} - Object {} + id: QtObject {} + QtObject {} } diff --git a/tests/auto/declarative/qmllanguage/data/componentCompositeType.qml b/tests/auto/declarative/qmllanguage/data/componentCompositeType.qml index 3a1b191..0a7249a 100644 --- a/tests/auto/declarative/qmllanguage/data/componentCompositeType.qml +++ b/tests/auto/declarative/qmllanguage/data/componentCompositeType.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property var test test: ComponentComposite {} diff --git a/tests/auto/declarative/qmllanguage/data/crash2.qml b/tests/auto/declarative/qmllanguage/data/crash2.qml index ae6f650..a22c776 100644 --- a/tests/auto/declarative/qmllanguage/data/crash2.qml +++ b/tests/auto/declarative/qmllanguage/data/crash2.qml @@ -1,5 +1,5 @@ import Qt 4.6 -Object { +QtObject { objectName: "Hello" + "World" } diff --git a/tests/auto/declarative/qmllanguage/data/defaultGrouped.qml b/tests/auto/declarative/qmllanguage/data/defaultGrouped.qml index 39ac5e0..532b2bb 100644 --- a/tests/auto/declarative/qmllanguage/data/defaultGrouped.qml +++ b/tests/auto/declarative/qmllanguage/data/defaultGrouped.qml @@ -4,7 +4,7 @@ import Qt 4.6 MyTypeObject { grouped { script: print(1921) - Object {} + QtObject {} } } diff --git a/tests/auto/declarative/qmllanguage/data/dynamicObjectProperties.qml b/tests/auto/declarative/qmllanguage/data/dynamicObjectProperties.qml index e69ccee..c80a7c0 100644 --- a/tests/auto/declarative/qmllanguage/data/dynamicObjectProperties.qml +++ b/tests/auto/declarative/qmllanguage/data/dynamicObjectProperties.qml @@ -2,10 +2,10 @@ import Test 1.0 import Qt 4.6 import Qt 4.6 as Qt -Object { - property Object objectProperty - property Object objectProperty2 - objectProperty2: Object {} +QtObject { + property QtObject objectProperty + property QtObject objectProperty2 + objectProperty2: QtObject {} property MyComponent myComponentProperty property MyComponent myComponentProperty2 diff --git a/tests/auto/declarative/qmllanguage/data/dynamicProperties.qml b/tests/auto/declarative/qmllanguage/data/dynamicProperties.qml index 17fa974..aef3269 100644 --- a/tests/auto/declarative/qmllanguage/data/dynamicProperties.qml +++ b/tests/auto/declarative/qmllanguage/data/dynamicProperties.qml @@ -1,6 +1,6 @@ import Test 1.0 import Qt 4.6 -Object { +QtObject { default property int intProperty : 10 property bool boolProperty: false property double doubleProperty: -10.1 diff --git a/tests/auto/declarative/qmllanguage/data/dynamicSignalsAndSlots.qml b/tests/auto/declarative/qmllanguage/data/dynamicSignalsAndSlots.qml index 72ec218..737681e 100644 --- a/tests/auto/declarative/qmllanguage/data/dynamicSignalsAndSlots.qml +++ b/tests/auto/declarative/qmllanguage/data/dynamicSignalsAndSlots.qml @@ -1,5 +1,5 @@ import Qt 4.6 -Object { +QtObject { signal signal1 function slot1() {} signal signal2 diff --git a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.1.qml b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.1.qml index e99c635..324f79c 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.1.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.1.qml @@ -1,7 +1,7 @@ import Test 1.0 import Qt 4.6 -Object { +QtObject { MyQmlObject.foo: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.10.qml b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.10.qml index 8f987ce..b768e9f 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.10.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.10.qml @@ -1,6 +1,6 @@ import Test 1.0 as Namespace import Qt 4.6 -Object { +QtObject { Namespace.MadeUpClass.foo: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.11.qml b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.11.qml index 18770fc..7b782be 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.11.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.11.qml @@ -1,7 +1,7 @@ import Test 1.0 as Namespace import Qt 4.6 -Object { +QtObject { Namespace.madeUpClass.foo: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.2.qml b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.2.qml index 3c9ae5b..1f47c61 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.2.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.2.qml @@ -1,6 +1,6 @@ import Test 1.0 as Namespace import Qt 4.6 -Object { +QtObject { Namespace.MyQmlObject.foo: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.3.qml b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.3.qml index e9405a4..79c2981 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.3.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.3.qml @@ -1,7 +1,7 @@ import Test 1.0 import Qt 4.6 -Object { +QtObject { MyQmlObject: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.4.qml b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.4.qml index 6fbf718..af0be80 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.4.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.4.qml @@ -1,7 +1,7 @@ import Test 1.0 as Namespace import Qt 4.6 -Object { +QtObject { Namespace.MyQmlObject: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.5.qml b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.5.qml index 1827a16..0546322 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.5.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.5.qml @@ -1,7 +1,7 @@ import Test 1.0 import Qt 4.6 -Object { - MyQmlObject: Object {} +QtObject { + MyQmlObject: QtObject {} } diff --git a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.6.qml b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.6.qml index 5c7f0ec..108109a 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.6.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.6.qml @@ -1,7 +1,7 @@ import Test 1.0 import Qt 4.6 -Object { - Test.MyQmlObject: Object {} +QtObject { + Test.MyQmlObject: QtObject {} } diff --git a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.7.qml b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.7.qml index 841cc08..ccf0353 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.7.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.7.qml @@ -1,6 +1,6 @@ import Test 1.0 import Qt 4.6 -Object { +QtObject { MyTypeObject.foo: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.8.qml b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.8.qml index f1b4b96..e736379 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.8.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.8.qml @@ -1,6 +1,6 @@ import Test 1.0 as Namespace import Qt 4.6 -Object { +QtObject { Namespace.MyTypeObject.foo: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.9.qml b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.9.qml index 99c4a5c..a095229 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.9.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidAttachedProperty.9.qml @@ -1,7 +1,7 @@ import Test 1.0 import Qt 4.6 -Object { +QtObject { MadeUpClass.foo: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidGroupedProperty.1.qml b/tests/auto/declarative/qmllanguage/data/invalidGroupedProperty.1.qml index 5e95c48..1167e39 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidGroupedProperty.1.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidGroupedProperty.1.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property var o; o.blah: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidGroupedProperty.2.qml b/tests/auto/declarative/qmllanguage/data/invalidGroupedProperty.2.qml index b11d34c..a0c8306 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidGroupedProperty.2.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidGroupedProperty.2.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property int o; o.blah: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidImportID.qml b/tests/auto/declarative/qmllanguage/data/invalidImportID.qml index 75aa06d..30d88d5 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidImportID.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidImportID.qml @@ -1,4 +1,4 @@ import Qt 4.6 import Qt 4.6 as qt -Object {} +QtObject {} diff --git a/tests/auto/declarative/qmllanguage/data/listProperties.qml b/tests/auto/declarative/qmllanguage/data/listProperties.qml index c39ceae..ba9e37c 100644 --- a/tests/auto/declarative/qmllanguage/data/listProperties.qml +++ b/tests/auto/declarative/qmllanguage/data/listProperties.qml @@ -1,9 +1,9 @@ import Qt 4.6 -Object { - property list listProperty +QtObject { + property list listProperty property int test: listProperty.length - listProperty: [ Object{}, Object {} ] + listProperty: [ QtObject{}, QtObject {} ] } diff --git a/tests/auto/declarative/qmllanguage/data/missingSignal.qml b/tests/auto/declarative/qmllanguage/data/missingSignal.qml index fd489ca..8a87437 100644 --- a/tests/auto/declarative/qmllanguage/data/missingSignal.qml +++ b/tests/auto/declarative/qmllanguage/data/missingSignal.qml @@ -1,5 +1,5 @@ import Test 1.0 import Qt 4.6 -Object { +QtObject { onClicked: print("Hello world!") } diff --git a/tests/auto/declarative/qmllanguage/data/property.1.qml b/tests/auto/declarative/qmllanguage/data/property.1.qml index 62178e5..cadc39a 100644 --- a/tests/auto/declarative/qmllanguage/data/property.1.qml +++ b/tests/auto/declarative/qmllanguage/data/property.1.qml @@ -1,5 +1,5 @@ import Qt 4.6 -Object { +QtObject { property blah a; } diff --git a/tests/auto/declarative/qmllanguage/data/property.2.qml b/tests/auto/declarative/qmllanguage/data/property.2.qml index 1d6d015..e810c6c 100644 --- a/tests/auto/declarative/qmllanguage/data/property.2.qml +++ b/tests/auto/declarative/qmllanguage/data/property.2.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property invalidmodifier a; } diff --git a/tests/auto/declarative/qmllanguage/data/property.3.qml b/tests/auto/declarative/qmllanguage/data/property.3.qml index 1b14b86..04147c2 100644 --- a/tests/auto/declarative/qmllanguage/data/property.3.qml +++ b/tests/auto/declarative/qmllanguage/data/property.3.qml @@ -1,7 +1,7 @@ import Qt 4.6 -Object { - property invalidmodifier a; +QtObject { + property invalidmodifier a; } diff --git a/tests/auto/declarative/qmllanguage/data/property.4.qml b/tests/auto/declarative/qmllanguage/data/property.4.qml index d256c96..b2ec482 100644 --- a/tests/auto/declarative/qmllanguage/data/property.4.qml +++ b/tests/auto/declarative/qmllanguage/data/property.4.qml @@ -1,5 +1,5 @@ import Qt 4.6 -Object { +QtObject { readonly property int a } diff --git a/tests/auto/declarative/qmllanguage/data/property.5.qml b/tests/auto/declarative/qmllanguage/data/property.5.qml index c3aaf5e..65fafbb 100644 --- a/tests/auto/declarative/qmllanguage/data/property.5.qml +++ b/tests/auto/declarative/qmllanguage/data/property.5.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { readonly property int a: value } diff --git a/tests/auto/declarative/qmllanguage/data/qmlAttachedPropertiesObjectMethod.1.qml b/tests/auto/declarative/qmllanguage/data/qmlAttachedPropertiesObjectMethod.1.qml index 99a9746..429c327 100644 --- a/tests/auto/declarative/qmllanguage/data/qmlAttachedPropertiesObjectMethod.1.qml +++ b/tests/auto/declarative/qmllanguage/data/qmlAttachedPropertiesObjectMethod.1.qml @@ -1,5 +1,5 @@ import Test 1.0 import Qt 4.6 -Object { +QtObject { } diff --git a/tests/auto/declarative/qmllanguage/data/qmlAttachedPropertiesObjectMethod.2.qml b/tests/auto/declarative/qmllanguage/data/qmlAttachedPropertiesObjectMethod.2.qml index 8179dbd..0f57b61 100644 --- a/tests/auto/declarative/qmllanguage/data/qmlAttachedPropertiesObjectMethod.2.qml +++ b/tests/auto/declarative/qmllanguage/data/qmlAttachedPropertiesObjectMethod.2.qml @@ -1,6 +1,6 @@ import Test 1.0 import Qt 4.6 -Object { +QtObject { MyQmlObject.value: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/script.11.qml b/tests/auto/declarative/qmllanguage/data/script.11.qml index d8313a3..6d2d598 100644 --- a/tests/auto/declarative/qmllanguage/data/script.11.qml +++ b/tests/auto/declarative/qmllanguage/data/script.11.qml @@ -1,7 +1,7 @@ import Qt 4.6 -Object { +QtObject { Script { - Object {} + QtObject {} } } diff --git a/tests/auto/declarative/qmllanguage/data/script.12.qml b/tests/auto/declarative/qmllanguage/data/script.12.qml index ea6c482..9ecb5d9 100644 --- a/tests/auto/declarative/qmllanguage/data/script.12.qml +++ b/tests/auto/declarative/qmllanguage/data/script.12.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { var a } diff --git a/tests/auto/declarative/qmllanguage/data/script.2.qml b/tests/auto/declarative/qmllanguage/data/script.2.qml index 18bb7c8..dce1a41 100644 --- a/tests/auto/declarative/qmllanguage/data/script.2.qml +++ b/tests/auto/declarative/qmllanguage/data/script.2.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { Script { id: myScript } diff --git a/tests/auto/declarative/qmllanguage/data/script.3.qml b/tests/auto/declarative/qmllanguage/data/script.3.qml index c2296ff..8621a9a 100644 --- a/tests/auto/declarative/qmllanguage/data/script.3.qml +++ b/tests/auto/declarative/qmllanguage/data/script.3.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { Script { hello: world } diff --git a/tests/auto/declarative/qmllanguage/data/script.4.qml b/tests/auto/declarative/qmllanguage/data/script.4.qml index 08115c2..d89817c 100644 --- a/tests/auto/declarative/qmllanguage/data/script.4.qml +++ b/tests/auto/declarative/qmllanguage/data/script.4.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { Script { source: 10 } diff --git a/tests/auto/declarative/qmllanguage/data/script.5.qml b/tests/auto/declarative/qmllanguage/data/script.5.qml index a3b1a15..8986b3b 100644 --- a/tests/auto/declarative/qmllanguage/data/script.5.qml +++ b/tests/auto/declarative/qmllanguage/data/script.5.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { Script { source: "hello" + ".js" } diff --git a/tests/auto/declarative/qmllanguage/data/script.6.qml b/tests/auto/declarative/qmllanguage/data/script.6.qml index e578629..07e9d78 100644 --- a/tests/auto/declarative/qmllanguage/data/script.6.qml +++ b/tests/auto/declarative/qmllanguage/data/script.6.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { Script { source: "test.js" function helloWorld() {} diff --git a/tests/auto/declarative/qmllanguage/data/script.7.qml b/tests/auto/declarative/qmllanguage/data/script.7.qml index 6bee3f9..fa905e6 100644 --- a/tests/auto/declarative/qmllanguage/data/script.7.qml +++ b/tests/auto/declarative/qmllanguage/data/script.7.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { Script { var a = 10; } diff --git a/tests/auto/declarative/qmllanguage/data/script.8.qml b/tests/auto/declarative/qmllanguage/data/script.8.qml index 55bc05c..f600c88 100644 --- a/tests/auto/declarative/qmllanguage/data/script.8.qml +++ b/tests/auto/declarative/qmllanguage/data/script.8.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { Script { source: "test.js" source: "test2.js" diff --git a/tests/auto/declarative/qmllanguage/data/signal.1.qml b/tests/auto/declarative/qmllanguage/data/signal.1.qml index d0ad155..fbaf017 100644 --- a/tests/auto/declarative/qmllanguage/data/signal.1.qml +++ b/tests/auto/declarative/qmllanguage/data/signal.1.qml @@ -1,5 +1,5 @@ import Qt 4.6 -Object { +QtObject { signal mySignal(nontype a) } diff --git a/tests/auto/declarative/qmllanguage/data/signal.2.qml b/tests/auto/declarative/qmllanguage/data/signal.2.qml index aa45ae9..5049192 100644 --- a/tests/auto/declarative/qmllanguage/data/signal.2.qml +++ b/tests/auto/declarative/qmllanguage/data/signal.2.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { signal mySignal(,) } diff --git a/tests/auto/declarative/qmllanguage/data/signal.3.qml b/tests/auto/declarative/qmllanguage/data/signal.3.qml index f38ccc5..9dd4cc7 100644 --- a/tests/auto/declarative/qmllanguage/data/signal.3.qml +++ b/tests/auto/declarative/qmllanguage/data/signal.3.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { signal mySignal(a) } diff --git a/tests/auto/declarative/qmlqt/data/closestangle.qml b/tests/auto/declarative/qmlqt/data/closestangle.qml index 8f999e3..b5f7fc6 100644 --- a/tests/auto/declarative/qmlqt/data/closestangle.qml +++ b/tests/auto/declarative/qmlqt/data/closestangle.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property var testSame: Qt.closestAngle(0,1) property var testLess: Qt.closestAngle(0,-359) property var testMore: Qt.closestAngle(0,361) diff --git a/tests/auto/declarative/qmlqt/data/createComponent.qml b/tests/auto/declarative/qmlqt/data/createComponent.qml index 57f50d8..d9b70ec 100644 --- a/tests/auto/declarative/qmlqt/data/createComponent.qml +++ b/tests/auto/declarative/qmlqt/data/createComponent.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool incorrectArgCount1: false property bool incorrectArgCount2: false property bool emptyArg: false diff --git a/tests/auto/declarative/qmlqt/data/createComponentData.qml b/tests/auto/declarative/qmlqt/data/createComponentData.qml index 145fe78..a5e99a0 100644 --- a/tests/auto/declarative/qmlqt/data/createComponentData.qml +++ b/tests/auto/declarative/qmlqt/data/createComponentData.qml @@ -1,5 +1,5 @@ import Qt 4.6 -Object { +QtObject { property int test: 1913 } diff --git a/tests/auto/declarative/qmlqt/data/createQmlObject.qml b/tests/auto/declarative/qmlqt/data/createQmlObject.qml index 8e8919a..9150782 100644 --- a/tests/auto/declarative/qmlqt/data/createQmlObject.qml +++ b/tests/auto/declarative/qmlqt/data/createQmlObject.qml @@ -16,14 +16,14 @@ Item { Component.onCompleted: { // errors incorrectArgCount1 = (createQmlObject() == null); - incorrectArgCount2 = (createQmlObject("import Qt 4.6\nObject{}", root, "main.qml", 10) == null); + incorrectArgCount2 = (createQmlObject("import Qt 4.6\nQtObject{}", root, "main.qml", 10) == null); emptyArg = (createQmlObject("", root) == null); - errors = (createQmlObject("import Qt 4.6\nObject{\nproperty int test: 13\nproperty int test: 13\n}", root, "main.qml") == null); - noParent = (createQmlObject("import Qt 4.6\nObject{\nproperty int test: 13}", 0) == null); - notReady = (createQmlObject("import Qt 4.6\nObject{\nBlah{}\n}", root, "http://www.example.com/main.qml") == null); - runtimeError = (createQmlObject("import Qt 4.6\nObject{property int test\nonTestChanged: Object{}\n}", root) == null); + errors = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\nproperty int test: 13\n}", root, "main.qml") == null); + noParent = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13}", 0) == null); + notReady = (createQmlObject("import Qt 4.6\nQtObject{\nBlah{}\n}", root, "http://www.example.com/main.qml") == null); + runtimeError = (createQmlObject("import Qt 4.6\nQtObject{property int test\nonTestChanged: QtObject{}\n}", root) == null); - var o = createQmlObject("import Qt 4.6\nObject{\nproperty int test: 13\n}", root); + var o = createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\n}", root); success = (o.test == 13); createQmlObject("import Qt 4.6\nItem {}\n", root); diff --git a/tests/auto/declarative/qmlqt/data/darker.qml b/tests/auto/declarative/qmlqt/data/darker.qml index 96ffa77..2df067e 100644 --- a/tests/auto/declarative/qmlqt/data/darker.qml +++ b/tests/auto/declarative/qmlqt/data/darker.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +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) diff --git a/tests/auto/declarative/qmlqt/data/enums.qml b/tests/auto/declarative/qmlqt/data/enums.qml index f87886e..1efa6f5 100644 --- a/tests/auto/declarative/qmlqt/data/enums.qml +++ b/tests/auto/declarative/qmlqt/data/enums.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property int test1: Qt.Key_Escape property int test2: Qt.DescendingOrder property int test3: Qt.ElideMiddle diff --git a/tests/auto/declarative/qmlqt/data/hsla.qml b/tests/auto/declarative/qmlqt/data/hsla.qml index fedb56a..df51ccd 100644 --- a/tests/auto/declarative/qmlqt/data/hsla.qml +++ b/tests/auto/declarative/qmlqt/data/hsla.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property color test1: Qt.hsla(1, 0, 0, 0.8); property color test2: Qt.hsla(1, 0.5, 0.3); property color test3: Qt.hsla(1, 1); diff --git a/tests/auto/declarative/qmlqt/data/lighter.qml b/tests/auto/declarative/qmlqt/data/lighter.qml index 2e9fdc8..4e0c431 100644 --- a/tests/auto/declarative/qmlqt/data/lighter.qml +++ b/tests/auto/declarative/qmlqt/data/lighter.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +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) diff --git a/tests/auto/declarative/qmlqt/data/md5.qml b/tests/auto/declarative/qmlqt/data/md5.qml index 3c96a6b..c474b71 100644 --- a/tests/auto/declarative/qmlqt/data/md5.qml +++ b/tests/auto/declarative/qmlqt/data/md5.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string test1: Qt.md5() property string test2: Qt.md5("Hello World") } diff --git a/tests/auto/declarative/qmlqt/data/point.qml b/tests/auto/declarative/qmlqt/data/point.qml index 582cb00..c383beb 100644 --- a/tests/auto/declarative/qmlqt/data/point.qml +++ b/tests/auto/declarative/qmlqt/data/point.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property var test1: Qt.point(19, 34); property var test2: Qt.point(-3, 109.2); property var test3: Qt.point(-3); diff --git a/tests/auto/declarative/qmlqt/data/rect.qml b/tests/auto/declarative/qmlqt/data/rect.qml index 53d8c38..82b6428 100644 --- a/tests/auto/declarative/qmlqt/data/rect.qml +++ b/tests/auto/declarative/qmlqt/data/rect.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +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); diff --git a/tests/auto/declarative/qmlqt/data/rgba.qml b/tests/auto/declarative/qmlqt/data/rgba.qml index 3fdfe2c..6dd6565 100644 --- a/tests/auto/declarative/qmlqt/data/rgba.qml +++ b/tests/auto/declarative/qmlqt/data/rgba.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property color test1: Qt.rgba(1, 0, 0, 0.8); property color test2: Qt.rgba(1, 0.5, 0.3); property color test3: Qt.rgba(1, 1); diff --git a/tests/auto/declarative/qmlqt/data/size.qml b/tests/auto/declarative/qmlqt/data/size.qml index f0d2e81..05b0317 100644 --- a/tests/auto/declarative/qmlqt/data/size.qml +++ b/tests/auto/declarative/qmlqt/data/size.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property var test1: Qt.size(19, 34); property var test2: Qt.size(3, 109.2); property var test3: Qt.size(-3, 10); diff --git a/tests/auto/declarative/qmlqt/data/tint.qml b/tests/auto/declarative/qmlqt/data/tint.qml index 31e67ba..da8afe2 100644 --- a/tests/auto/declarative/qmlqt/data/tint.qml +++ b/tests/auto/declarative/qmlqt/data/tint.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property color test1: Qt.tint("red", "blue"); property color test2: Qt.tint(Qt.rgba(1, 0, 0), Qt.rgba(0, 0, 0, 0)); property color test3: Qt.tint("red", Qt.rgba(0, 0, 1, 0.5)); // XXX - what should this be? diff --git a/tests/auto/declarative/qmlqt/data/vector.qml b/tests/auto/declarative/qmlqt/data/vector.qml index b879bd6..a471c7a 100644 --- a/tests/auto/declarative/qmlqt/data/vector.qml +++ b/tests/auto/declarative/qmlqt/data/vector.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +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); diff --git a/tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml b/tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml index d3cf578..78d5cfc 100644 --- a/tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml +++ b/tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml @@ -7,7 +7,7 @@ Column { height: 200 url: "test-objects.html" javaScriptWindowObjects: - Object { + QtObject { property string text: btntext.text WebView.windowObjectName: "qmltext" onTextChanged: { diff --git a/tests/auto/declarative/visual/webview/javascript/windowObjects.qml b/tests/auto/declarative/visual/webview/javascript/windowObjects.qml index f1d4097..a41de9a 100644 --- a/tests/auto/declarative/visual/webview/javascript/windowObjects.qml +++ b/tests/auto/declarative/visual/webview/javascript/windowObjects.qml @@ -6,7 +6,7 @@ Column { height: 200 url: "test-objects.html" javaScriptWindowObjects: - Object { + QtObject { property string text: btntext.text WebView.windowObjectName: "qmltext" } diff --git a/tests/auto/declarative/xmlhttprequest/data/abort.qml b/tests/auto/declarative/xmlhttprequest/data/abort.qml index 132eb96..d7b9266 100644 --- a/tests/auto/declarative/xmlhttprequest/data/abort.qml +++ b/tests/auto/declarative/xmlhttprequest/data/abort.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string urlDummy property string url diff --git a/tests/auto/declarative/xmlhttprequest/data/abort_opened.qml b/tests/auto/declarative/xmlhttprequest/data/abort_opened.qml index 9c7449f..72a45e7 100644 --- a/tests/auto/declarative/xmlhttprequest/data/abort_opened.qml +++ b/tests/auto/declarative/xmlhttprequest/data/abort_opened.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url: "testdocument.html" property bool readyState: false diff --git a/tests/auto/declarative/xmlhttprequest/data/abort_unsent.qml b/tests/auto/declarative/xmlhttprequest/data/abort_unsent.qml index 4bc479e..aa78cde 100644 --- a/tests/auto/declarative/xmlhttprequest/data/abort_unsent.qml +++ b/tests/auto/declarative/xmlhttprequest/data/abort_unsent.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url: "testdocument.html" property bool readyState: false diff --git a/tests/auto/declarative/xmlhttprequest/data/attr.qml b/tests/auto/declarative/xmlhttprequest/data/attr.qml index d0ee720..9049fc7 100644 --- a/tests/auto/declarative/xmlhttprequest/data/attr.qml +++ b/tests/auto/declarative/xmlhttprequest/data/attr.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool xmlTest: false property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/cdata.qml b/tests/auto/declarative/xmlhttprequest/data/cdata.qml index 5faa359..b2d0209 100644 --- a/tests/auto/declarative/xmlhttprequest/data/cdata.qml +++ b/tests/auto/declarative/xmlhttprequest/data/cdata.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool xmlTest: false property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/constructor.qml b/tests/auto/declarative/xmlhttprequest/data/constructor.qml index 4b9e9ce..93e44fd 100644 --- a/tests/auto/declarative/xmlhttprequest/data/constructor.qml +++ b/tests/auto/declarative/xmlhttprequest/data/constructor.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool calledAsConstructor property bool calledAsFunction diff --git a/tests/auto/declarative/xmlhttprequest/data/defaultState.qml b/tests/auto/declarative/xmlhttprequest/data/defaultState.qml index 5cc2971..4dcf6f9 100644 --- a/tests/auto/declarative/xmlhttprequest/data/defaultState.qml +++ b/tests/auto/declarative/xmlhttprequest/data/defaultState.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property int readyState property bool statusIsException: false property bool statusTextIsException: false diff --git a/tests/auto/declarative/xmlhttprequest/data/document.qml b/tests/auto/declarative/xmlhttprequest/data/document.qml index ce9e35f..e372361 100644 --- a/tests/auto/declarative/xmlhttprequest/data/document.qml +++ b/tests/auto/declarative/xmlhttprequest/data/document.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool xmlTest: false property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/domExceptionCodes.qml b/tests/auto/declarative/xmlhttprequest/data/domExceptionCodes.qml index a4ab66c..de5ee4f 100644 --- a/tests/auto/declarative/xmlhttprequest/data/domExceptionCodes.qml +++ b/tests/auto/declarative/xmlhttprequest/data/domExceptionCodes.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property int index_size_err: DOMException.INDEX_SIZE_ERR property int domstring_size_err: DOMException.DOMSTRING_SIZE_ERR property int hierarchy_request_err: DOMException.HIERARCHY_REQUEST_ERR diff --git a/tests/auto/declarative/xmlhttprequest/data/element.qml b/tests/auto/declarative/xmlhttprequest/data/element.qml index 228db18..78c0374 100644 --- a/tests/auto/declarative/xmlhttprequest/data/element.qml +++ b/tests/auto/declarative/xmlhttprequest/data/element.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool xmlTest: false property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders.qml b/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders.qml index 0bee7ad..02a8083 100644 --- a/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders.qml +++ b/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool unsentException: false diff --git a/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_args.qml b/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_args.qml index c2cf898..37124c7 100644 --- a/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_args.qml +++ b/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_args.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool exceptionThrown: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_sent.qml b/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_sent.qml index 9583f9d..505e4b1 100644 --- a/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_sent.qml +++ b/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_sent.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool test: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_unsent.qml b/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_unsent.qml index fac5259..20fb040 100644 --- a/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_unsent.qml +++ b/tests/auto/declarative/xmlhttprequest/data/getAllResponseHeaders_unsent.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool test: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/getResponseHeader.qml b/tests/auto/declarative/xmlhttprequest/data/getResponseHeader.qml index 798b346..2f949e1 100644 --- a/tests/auto/declarative/xmlhttprequest/data/getResponseHeader.qml +++ b/tests/auto/declarative/xmlhttprequest/data/getResponseHeader.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool unsentException: false diff --git a/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_args.qml b/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_args.qml index ca7aed8..d5aa4b1 100644 --- a/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_args.qml +++ b/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_args.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool exceptionThrown: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_sent.qml b/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_sent.qml index 148a19c..7538ffd 100644 --- a/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_sent.qml +++ b/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_sent.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool test: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_unsent.qml b/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_unsent.qml index 5abdf0a..3b55802 100644 --- a/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_unsent.qml +++ b/tests/auto/declarative/xmlhttprequest/data/getResponseHeader_unsent.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool test: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/instanceStateValues.qml b/tests/auto/declarative/xmlhttprequest/data/instanceStateValues.qml index ab3064f..b8d01c4 100644 --- a/tests/auto/declarative/xmlhttprequest/data/instanceStateValues.qml +++ b/tests/auto/declarative/xmlhttprequest/data/instanceStateValues.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property int unsent property int opened property int headers_received diff --git a/tests/auto/declarative/xmlhttprequest/data/invalidMethodUsage.qml b/tests/auto/declarative/xmlhttprequest/data/invalidMethodUsage.qml index 893eb8b..b30989b 100644 --- a/tests/auto/declarative/xmlhttprequest/data/invalidMethodUsage.qml +++ b/tests/auto/declarative/xmlhttprequest/data/invalidMethodUsage.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool onreadystatechange: false property bool readyState: false property bool status: false diff --git a/tests/auto/declarative/xmlhttprequest/data/open.qml b/tests/auto/declarative/xmlhttprequest/data/open.qml index 7729bab..c06bae3 100644 --- a/tests/auto/declarative/xmlhttprequest/data/open.qml +++ b/tests/auto/declarative/xmlhttprequest/data/open.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool readyState: false diff --git a/tests/auto/declarative/xmlhttprequest/data/open_arg_count.1.qml b/tests/auto/declarative/xmlhttprequest/data/open_arg_count.1.qml index 74f13ba..b6d4c32 100644 --- a/tests/auto/declarative/xmlhttprequest/data/open_arg_count.1.qml +++ b/tests/auto/declarative/xmlhttprequest/data/open_arg_count.1.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool exceptionThrown: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/open_arg_count.2.qml b/tests/auto/declarative/xmlhttprequest/data/open_arg_count.2.qml index 35dce9f..8c86c20 100644 --- a/tests/auto/declarative/xmlhttprequest/data/open_arg_count.2.qml +++ b/tests/auto/declarative/xmlhttprequest/data/open_arg_count.2.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool exceptionThrown: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/open_invalid_method.qml b/tests/auto/declarative/xmlhttprequest/data/open_invalid_method.qml index 7fb1a4c..69f79ae 100644 --- a/tests/auto/declarative/xmlhttprequest/data/open_invalid_method.qml +++ b/tests/auto/declarative/xmlhttprequest/data/open_invalid_method.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool exceptionThrown: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/open_sync.qml b/tests/auto/declarative/xmlhttprequest/data/open_sync.qml index 7133e81..1477279 100644 --- a/tests/auto/declarative/xmlhttprequest/data/open_sync.qml +++ b/tests/auto/declarative/xmlhttprequest/data/open_sync.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool exceptionThrown: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/open_user.qml b/tests/auto/declarative/xmlhttprequest/data/open_user.qml index cc90433..19e37fa 100644 --- a/tests/auto/declarative/xmlhttprequest/data/open_user.qml +++ b/tests/auto/declarative/xmlhttprequest/data/open_user.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool readyState: false diff --git a/tests/auto/declarative/xmlhttprequest/data/open_username.qml b/tests/auto/declarative/xmlhttprequest/data/open_username.qml index c38110c..983ea14 100644 --- a/tests/auto/declarative/xmlhttprequest/data/open_username.qml +++ b/tests/auto/declarative/xmlhttprequest/data/open_username.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool readyState: false diff --git a/tests/auto/declarative/xmlhttprequest/data/responseText.qml b/tests/auto/declarative/xmlhttprequest/data/responseText.qml index 0bb8659..4bb3a7a 100644 --- a/tests/auto/declarative/xmlhttprequest/data/responseText.qml +++ b/tests/auto/declarative/xmlhttprequest/data/responseText.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property string expectedText diff --git a/tests/auto/declarative/xmlhttprequest/data/responseXML_invalid.qml b/tests/auto/declarative/xmlhttprequest/data/responseXML_invalid.qml index 4fc4fe5..63f288e 100644 --- a/tests/auto/declarative/xmlhttprequest/data/responseXML_invalid.qml +++ b/tests/auto/declarative/xmlhttprequest/data/responseXML_invalid.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool xmlNull: false property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/send_alreadySent.qml b/tests/auto/declarative/xmlhttprequest/data/send_alreadySent.qml index 4598169..0bad7df 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_alreadySent.qml +++ b/tests/auto/declarative/xmlhttprequest/data/send_alreadySent.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool dataOK: false property bool test: false diff --git a/tests/auto/declarative/xmlhttprequest/data/send_data.1.qml b/tests/auto/declarative/xmlhttprequest/data/send_data.1.qml index c0b5bf8..03543a9 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_data.1.qml +++ b/tests/auto/declarative/xmlhttprequest/data/send_data.1.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/send_data.2.qml b/tests/auto/declarative/xmlhttprequest/data/send_data.2.qml index 8a8c375..79a27b6 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_data.2.qml +++ b/tests/auto/declarative/xmlhttprequest/data/send_data.2.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/send_data.3.qml b/tests/auto/declarative/xmlhttprequest/data/send_data.3.qml index ae5731f..e048769 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_data.3.qml +++ b/tests/auto/declarative/xmlhttprequest/data/send_data.3.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/send_data.4.qml b/tests/auto/declarative/xmlhttprequest/data/send_data.4.qml index 4705007..7ab0b27 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_data.4.qml +++ b/tests/auto/declarative/xmlhttprequest/data/send_data.4.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/send_data.5.qml b/tests/auto/declarative/xmlhttprequest/data/send_data.5.qml index eca1676..29bf2c2 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_data.5.qml +++ b/tests/auto/declarative/xmlhttprequest/data/send_data.5.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/send_data.6.qml b/tests/auto/declarative/xmlhttprequest/data/send_data.6.qml index 0bc2e35..135f45c 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_data.6.qml +++ b/tests/auto/declarative/xmlhttprequest/data/send_data.6.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/send_data.7.qml b/tests/auto/declarative/xmlhttprequest/data/send_data.7.qml index 3a2ba56..4a09527 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_data.7.qml +++ b/tests/auto/declarative/xmlhttprequest/data/send_data.7.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/send_ignoreData.qml b/tests/auto/declarative/xmlhttprequest/data/send_ignoreData.qml index 6f33eef..dd5fa46 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_ignoreData.qml +++ b/tests/auto/declarative/xmlhttprequest/data/send_ignoreData.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string reqType property string url diff --git a/tests/auto/declarative/xmlhttprequest/data/send_unsent.qml b/tests/auto/declarative/xmlhttprequest/data/send_unsent.qml index 76c26a3..7f51ecf 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_unsent.qml +++ b/tests/auto/declarative/xmlhttprequest/data/send_unsent.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool test: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader.qml b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader.qml index 8ea587a..b0723aa 100644 --- a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader.qml +++ b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool dataOK: false diff --git a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_args.qml b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_args.qml index 6824af2..8305ae1 100644 --- a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_args.qml +++ b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_args.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool exceptionThrown: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_illegalName.qml b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_illegalName.qml index 8029bc4..bf31eca 100644 --- a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_illegalName.qml +++ b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_illegalName.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property string header diff --git a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_sent.qml b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_sent.qml index b637f17..c2bbc6e 100644 --- a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_sent.qml +++ b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_sent.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property bool test: false diff --git a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_unsent.qml b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_unsent.qml index 4e89abf..30bc93e 100644 --- a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_unsent.qml +++ b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader_unsent.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool test: false Component.onCompleted: { diff --git a/tests/auto/declarative/xmlhttprequest/data/staticStateValues.qml b/tests/auto/declarative/xmlhttprequest/data/staticStateValues.qml index aaaadad..ec1c5d8 100644 --- a/tests/auto/declarative/xmlhttprequest/data/staticStateValues.qml +++ b/tests/auto/declarative/xmlhttprequest/data/staticStateValues.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property int unsent: XMLHttpRequest.UNSENT property int opened: XMLHttpRequest.OPENED property int headers_received: XMLHttpRequest.HEADERS_RECEIVED diff --git a/tests/auto/declarative/xmlhttprequest/data/status.qml b/tests/auto/declarative/xmlhttprequest/data/status.qml index 7b2e8d0..04202c4 100644 --- a/tests/auto/declarative/xmlhttprequest/data/status.qml +++ b/tests/auto/declarative/xmlhttprequest/data/status.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property int expectedStatus diff --git a/tests/auto/declarative/xmlhttprequest/data/statusText.qml b/tests/auto/declarative/xmlhttprequest/data/statusText.qml index 00d8fdc..8becc3b 100644 --- a/tests/auto/declarative/xmlhttprequest/data/statusText.qml +++ b/tests/auto/declarative/xmlhttprequest/data/statusText.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property string url property string expectedStatus diff --git a/tests/auto/declarative/xmlhttprequest/data/text.qml b/tests/auto/declarative/xmlhttprequest/data/text.qml index 8c97504..4615a07 100644 --- a/tests/auto/declarative/xmlhttprequest/data/text.qml +++ b/tests/auto/declarative/xmlhttprequest/data/text.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Object { +QtObject { property bool xmlTest: false property bool dataOK: false -- cgit v0.12 From d363016a703f565432d2fd3d84cea4e179c79995 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 19 Nov 2009 13:50:43 +1000 Subject: Add Image auto test Also fix qmlpixmapcache error reporting and Image and BorderImage progress reporting for null images. --- .../graphicsitems/qmlgraphicsborderimage.cpp | 4 +- .../graphicsitems/qmlgraphicsimagebase.cpp | 21 ++- src/declarative/util/qmlpixmapcache.cpp | 17 +- src/declarative/util/qmlpixmapcache_p.h | 2 +- .../declarative/qmlgraphicsimage/data/colors.png | Bin 0 -> 1655 bytes .../qmlgraphicsimage/qmlgraphicsimage.pro | 9 + .../qmlgraphicsimage/tst_qmlgraphicsimage.cpp | 206 +++++++++++++++++++++ 7 files changed, 243 insertions(+), 16 deletions(-) create mode 100644 tests/auto/declarative/qmlgraphicsimage/data/colors.png create mode 100644 tests/auto/declarative/qmlgraphicsimage/qmlgraphicsimage.pro create mode 100644 tests/auto/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp diff --git a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp index 5b05487..6f953bc 100644 --- a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp @@ -176,12 +176,10 @@ void QmlGraphicsBorderImage::setSource(const QUrl &url) if (url.isEmpty()) { d->pix = QPixmap(); d->status = Null; - d->progress = 1.0; setImplicitWidth(0); setImplicitHeight(0); emit statusChanged(d->status); emit sourceChanged(d->url); - emit progressChanged(1.0); update(); } else { d->status = Loading; @@ -219,7 +217,7 @@ void QmlGraphicsBorderImage::setSource(const QUrl &url) d->progress = 1.0; emit statusChanged(d->status); emit sourceChanged(d->url); - emit progressChanged(1.0); + emit progressChanged(d->progress); update(); } } diff --git a/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp b/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp index 0b57540..3e86a7c 100644 --- a/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp @@ -108,16 +108,15 @@ void QmlGraphicsImageBase::setSource(const QUrl &url) if (url.isEmpty()) { d->pix = QPixmap(); d->status = Null; - d->progress = 1.0; setImplicitWidth(0); setImplicitHeight(0); emit statusChanged(d->status); emit sourceChanged(d->url); - emit progressChanged(1.0); update(); } else { d->status = Loading; - QNetworkReply *reply = QmlPixmapCache::get(qmlEngine(this), d->url, &d->pix); + bool ok = true; + QNetworkReply *reply = QmlPixmapCache::get(qmlEngine(this), d->url, &d->pix, &ok); if (reply) { d->pendingPixmapCache = true; connect(reply, SIGNAL(finished()), this, SLOT(requestFinished())); @@ -125,15 +124,19 @@ void QmlGraphicsImageBase::setSource(const QUrl &url) this, SLOT(requestProgress(qint64,qint64))); } else { //### should be unified with requestFinished - setImplicitWidth(d->pix.width()); - setImplicitHeight(d->pix.height()); - - if (d->status == Loading) - d->status = Ready; + if (ok) { + setImplicitWidth(d->pix.width()); + setImplicitHeight(d->pix.height()); + + if (d->status == Loading) + d->status = Ready; + } else { + d->status = Error; + } d->progress = 1.0; emit statusChanged(d->status); emit sourceChanged(d->url); - emit progressChanged(1.0); + emit progressChanged(d->progress); update(); } } diff --git a/src/declarative/util/qmlpixmapcache.cpp b/src/declarative/util/qmlpixmapcache.cpp index ba7895a..b8a9bd7 100644 --- a/src/declarative/util/qmlpixmapcache.cpp +++ b/src/declarative/util/qmlpixmapcache.cpp @@ -213,23 +213,34 @@ bool QmlPixmapCache::find(const QUrl& url, QPixmap *pixmap) The returned QNetworkReply will be deleted when all get() calls are matched by a corresponding find() call. + + If the \a ok parameter is passed and \a url is a local file, + its value will be set to false if the pixmap could not be loaded; + otherwise the pixmap was loaded and *ok will be true. */ -QNetworkReply *QmlPixmapCache::get(QmlEngine *engine, const QUrl& url, QPixmap *pixmap) +QNetworkReply *QmlPixmapCache::get(QmlEngine *engine, const QUrl& url, QPixmap *pixmap, bool *ok) { #ifndef QT_NO_LOCALFILE_OPTIMIZED_QML QString lf = toLocalFileOrQrc(url); if (!lf.isEmpty()) { QString key = url.toString(); if (!QPixmapCache::find(key,pixmap)) { + bool loaded = true; QFile f(lf); if (f.open(QIODevice::ReadOnly)) { if (!readImage(&f, pixmap)) { qWarning() << "Format error loading" << url; *pixmap = QPixmap(); + loaded = false; } - } else + } else { + qWarning() << "Cannot open" << url; *pixmap = QPixmap(); - QPixmapCache::insert(key, *pixmap); + loaded = false; + } + if (loaded) + QPixmapCache::insert(key, *pixmap); + if (ok) *ok = loaded; } return 0; } diff --git a/src/declarative/util/qmlpixmapcache_p.h b/src/declarative/util/qmlpixmapcache_p.h index e6ed452..d2e272c 100644 --- a/src/declarative/util/qmlpixmapcache_p.h +++ b/src/declarative/util/qmlpixmapcache_p.h @@ -56,7 +56,7 @@ class QNetworkReply; class Q_DECLARATIVE_EXPORT QmlPixmapCache { public: - static QNetworkReply *get(QmlEngine *, const QUrl& url, QPixmap *pixmap); + static QNetworkReply *get(QmlEngine *, const QUrl& url, QPixmap *pixmap, bool *ok=0); static void cancelGet(const QUrl& url, QObject* obj); static bool find(const QUrl& url, QPixmap *pixmap); // url must have been passed to QmlPixmapCache::get, and any returned reply finished. diff --git a/tests/auto/declarative/qmlgraphicsimage/data/colors.png b/tests/auto/declarative/qmlgraphicsimage/data/colors.png new file mode 100644 index 0000000..dfb62f3 Binary files /dev/null and b/tests/auto/declarative/qmlgraphicsimage/data/colors.png differ diff --git a/tests/auto/declarative/qmlgraphicsimage/qmlgraphicsimage.pro b/tests/auto/declarative/qmlgraphicsimage/qmlgraphicsimage.pro new file mode 100644 index 0000000..b5f7f83 --- /dev/null +++ b/tests/auto/declarative/qmlgraphicsimage/qmlgraphicsimage.pro @@ -0,0 +1,9 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative gui network +macx:CONFIG -= app_bundle + +HEADERS += ../shared/testhttpserver.h +SOURCES += tst_qmlgraphicsimage.cpp ../shared/testhttpserver.cpp + +# Define SRCDIR equal to test's source directory +DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp b/tests/auto/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp new file mode 100644 index 0000000..5ce5faf --- /dev/null +++ b/tests/auto/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp @@ -0,0 +1,206 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the 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 +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "../shared/testhttpserver.h" + + +#define SERVER_PORT 14445 +#define SERVER_ADDR "http://127.0.0.1:14445" + +#define TRY_WAIT(expr) \ + do { \ + for (int ii = 0; ii < 6; ++ii) { \ + if ((expr)) break; \ + QTest::qWait(50); \ + } \ + QVERIFY((expr)); \ + } while (false) + + +class tst_qmlgraphicsimage : public QObject + +{ + Q_OBJECT +public: + tst_qmlgraphicsimage(); + +private slots: + void noSource(); + void imageSource(); + void imageSource_data(); + void clearSource(); + void resized(); + void smooth(); + +private: + QmlEngine engine; +}; + +tst_qmlgraphicsimage::tst_qmlgraphicsimage() +{ +} + +void tst_qmlgraphicsimage::noSource() +{ + QString componentStr = "import Qt 4.6\nImage { source: \"\" }"; + QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlGraphicsImage *obj = qobject_cast(component.create()); + QVERIFY(obj != 0); + QCOMPARE(obj->source(), QUrl()); + QVERIFY(obj->status() == QmlGraphicsImage::Null); + QCOMPARE(obj->width(), 0.); + QCOMPARE(obj->height(), 0.); + QCOMPARE(obj->fillMode(), QmlGraphicsImage::Stretch); + QCOMPARE(obj->progress(), 0.0); + + delete obj; +} + +void tst_qmlgraphicsimage::imageSource() +{ + QFETCH(QString, source); + QFETCH(bool, remote); + QFETCH(bool, valid); + + TestHTTPServer server(SERVER_PORT); + if (remote) { + QVERIFY(server.isValid()); + server.serveDirectory(SRCDIR "/data"); + } + + QString componentStr = "import Qt 4.6\nImage { source: \"" + source + "\" }"; + QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlGraphicsImage *obj = qobject_cast(component.create()); + QVERIFY(obj != 0); + + if (remote) + TRY_WAIT(obj->status() == QmlGraphicsImage::Loading); + + QCOMPARE(obj->source(), remote ? source : QUrl::fromLocalFile(source)); + + if (valid) { + TRY_WAIT(obj->status() == QmlGraphicsImage::Ready); + QCOMPARE(obj->width(), 120.); + QCOMPARE(obj->height(), 120.); + QCOMPARE(obj->fillMode(), QmlGraphicsImage::Stretch); + QCOMPARE(obj->progress(), 1.0); + } else { + TRY_WAIT(obj->status() == QmlGraphicsImage::Error); + } + + delete obj; +} + +void tst_qmlgraphicsimage::clearSource() +{ + QString componentStr = "import Qt 4.6\nImage { source: srcImage }"; + QmlContext *ctxt = engine.rootContext(); + ctxt->setContextProperty("srcImage", SRCDIR "/data/colors.png"); + QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlGraphicsImage *obj = qobject_cast(component.create()); + QVERIFY(obj != 0); + QVERIFY(obj->status() == QmlGraphicsImage::Ready); + QCOMPARE(obj->width(), 120.); + QCOMPARE(obj->height(), 120.); + QCOMPARE(obj->progress(), 1.0); + + ctxt->setContextProperty("srcImage", ""); + QVERIFY(obj->source().isEmpty()); + QVERIFY(obj->status() == QmlGraphicsImage::Null); + QCOMPARE(obj->width(), 0.); + QCOMPARE(obj->height(), 0.); + QCOMPARE(obj->progress(), 0.0); +} + +void tst_qmlgraphicsimage::imageSource_data() +{ + QTest::addColumn("source"); + QTest::addColumn("remote"); + QTest::addColumn("valid"); + + QTest::newRow("local") << SRCDIR "/data/colors.png" << false << true; + QTest::newRow("local not found") << SRCDIR "/data/no-such-file.png" << false << false; + QTest::newRow("remote") << SERVER_ADDR "/colors.png" << true << true; + QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << true << false; +} + +void tst_qmlgraphicsimage::resized() +{ + QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 300 }"; + QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlGraphicsImage *obj = qobject_cast(component.create()); + QVERIFY(obj != 0); + QCOMPARE(obj->width(), 300.); + QCOMPARE(obj->height(), 300.); + QCOMPARE(obj->fillMode(), QmlGraphicsImage::Stretch); + + delete obj; +} + +void tst_qmlgraphicsimage::smooth() +{ + QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }"; + QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlGraphicsImage *obj = qobject_cast(component.create()); + QVERIFY(obj != 0); + QCOMPARE(obj->width(), 300.); + QCOMPARE(obj->height(), 300.); + QCOMPARE(obj->smooth(), true); + QCOMPARE(obj->fillMode(), QmlGraphicsImage::Stretch); + + delete obj; +} + +QTEST_MAIN(tst_qmlgraphicsimage) + +#include "tst_qmlgraphicsimage.moc" -- cgit v0.12