diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativeitem')
14 files changed, 40 insertions, 15 deletions
diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml index 5958004..fab2367 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml index f351b53..84f362f 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml index 4a2f056..2ab73a1 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml index 225d8d4..d67ad0e 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width:360; diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug3.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug3.qml index 54b5b68..9d8e1e8 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug3.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300 diff --git a/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml b/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml index 87e64c5..229f969 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Grid { columns: 2 diff --git a/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml b/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml index 171536b..375a6b6 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Test 1.0 KeyTestItem { diff --git a/tests/auto/declarative/qdeclarativeitem/data/keystest.qml b/tests/auto/declarative/qdeclarativeitem/data/keystest.qml index 8ff3e87..aedccd9 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/keystest.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/keystest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { focus: true diff --git a/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml b/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml index 4a92e9d..bb20ecc 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root; objectName: "root" diff --git a/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml b/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml index a562b8b..afa5397 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QGraphicsWidget { size: "200x100" diff --git a/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml b/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml index dd86453..f1ea933 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { Item { diff --git a/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml b/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml index 852f242..e82cd02 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml b/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml new file mode 100644 index 0000000..35c1a9a --- /dev/null +++ b/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml @@ -0,0 +1,13 @@ +import QtQuick 1.0 + +Item { + id: wrapper + width: 200 + height: 200 + + QtObject { + id: object + } + + Component.onCompleted: wrapper.transform = object +} diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp index 25ca157..e9dad6b 100644 --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp @@ -81,6 +81,8 @@ private slots: void resourcesProperty(); void mouseFocus(); + void transformCrash(); + private: template<typename T> T *findItem(QGraphicsObject *parent, const QString &objectName); @@ -434,7 +436,7 @@ void tst_QDeclarativeItem::keyNavigation() void tst_QDeclarativeItem::smooth() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; Item { smooth: false; }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0; Item { smooth: false; }", QUrl::fromLocalFile("")); QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create()); QSignalSpy spy(item, SIGNAL(smoothChanged(bool))); @@ -463,7 +465,7 @@ void tst_QDeclarativeItem::smooth() void tst_QDeclarativeItem::clip() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7\nItem { clip: false\n }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nItem { clip: false\n }", QUrl::fromLocalFile("")); QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create()); QSignalSpy spy(item, SIGNAL(clipChanged(bool))); @@ -570,7 +572,7 @@ void tst_QDeclarativeItem::transforms() QFETCH(QByteArray, qml); QFETCH(QMatrix, matrix); QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7\nItem { transform: "+qml+"}", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nItem { transform: "+qml+"}", QUrl::fromLocalFile("")); QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create()); QVERIFY(item); QCOMPARE(item->sceneMatrix(), matrix); @@ -792,6 +794,16 @@ void tst_QDeclarativeItem::childrenRectBug3() delete canvas; } +// QTBUG-13893 +void tst_QDeclarativeItem::transformCrash() +{ + QDeclarativeView *canvas = new QDeclarativeView(0); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/transformCrash.qml")); + canvas->show(); + + delete canvas; +} + template<typename T> T *tst_QDeclarativeItem::findItem(QGraphicsObject *parent, const QString &objectName) { |