diff options
Diffstat (limited to 'tests/auto/qtquick1/qdeclarativeloader/data')
25 files changed, 223 insertions, 0 deletions
diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/AnchoredLoader.qml b/tests/auto/qtquick1/qdeclarativeloader/data/AnchoredLoader.qml new file mode 100644 index 0000000000..7654c07408 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/AnchoredLoader.qml @@ -0,0 +1,14 @@ +import QtQuick 1.0 + +Rectangle { + width: 300 + height: 200 + color: "blue" + Loader { + objectName: "loader" + anchors.fill: parent + sourceComponent: Component { + Rectangle { color: "red"; objectName: "sourceElement" } + } + } +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/BlueRect.qml b/tests/auto/qtquick1/qdeclarativeloader/data/BlueRect.qml new file mode 100644 index 0000000000..d2da64d263 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/BlueRect.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 + +Rectangle { + objectName: "blue" + width: 100 + height: 100 + color: "blue" +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/CreationContextLoader.qml b/tests/auto/qtquick1/qdeclarativeloader/data/CreationContextLoader.qml new file mode 100644 index 0000000000..bfc9a8dd8a --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/CreationContextLoader.qml @@ -0,0 +1,15 @@ +import QtQuick 1.0 + +Loader { + id: myLoader + property int testProperty: 1912 + sourceComponent: loaderComponent + Component { + id: loaderComponent + Item { + Component.onCompleted: { + test = (myLoader.testProperty == 1912); + } + } + } +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/GraphicsWidget250x250.qml b/tests/auto/qtquick1/qdeclarativeloader/data/GraphicsWidget250x250.qml new file mode 100644 index 0000000000..139657bf2c --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/GraphicsWidget250x250.qml @@ -0,0 +1,5 @@ +import QtQuick 1.0 + +QGraphicsWidget { + size: "250x250" +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/GreenRect.qml b/tests/auto/qtquick1/qdeclarativeloader/data/GreenRect.qml new file mode 100644 index 0000000000..5aeb81e918 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/GreenRect.qml @@ -0,0 +1,7 @@ +import QtQuick 1.0 + +Rectangle { + width: 100; height: 100 + color: "green" + Component.onCompleted: myLoader.source = "BlueRect.qml" +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/NoResize.qml b/tests/auto/qtquick1/qdeclarativeloader/data/NoResize.qml new file mode 100644 index 0000000000..bb1030ef9d --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/NoResize.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 + +Item { + width: 200; height: 80 + Loader { + source: "Rect120x60.qml" + } +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/NoResizeGraphicsWidget.qml b/tests/auto/qtquick1/qdeclarativeloader/data/NoResizeGraphicsWidget.qml new file mode 100644 index 0000000000..5a31eff545 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/NoResizeGraphicsWidget.qml @@ -0,0 +1,9 @@ +import QtQuick 1.0 + +Item { + width: 200 + height: 80 + Loader { + source: "GraphicsWidget250x250.qml" + } +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/QTBUG_16928.qml b/tests/auto/qtquick1/qdeclarativeloader/data/QTBUG_16928.qml new file mode 100644 index 0000000000..9949e346f9 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/QTBUG_16928.qml @@ -0,0 +1,23 @@ +import QtQuick 1.1 + +Rectangle { + color: "green" + width: loader.implicitWidth+50 + height: loader.implicitHeight+50 + + Loader { + id: loader + sourceComponent: Item { + anchors.centerIn: parent + + implicitWidth: 200 + implicitHeight: 200 + Rectangle { + color: "red" + anchors.fill: parent + } + } + anchors.fill: parent + anchors.margins: 15 + } +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/QTBUG_17114.qml b/tests/auto/qtquick1/qdeclarativeloader/data/QTBUG_17114.qml new file mode 100644 index 0000000000..8a49733a8c --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/QTBUG_17114.qml @@ -0,0 +1,18 @@ +import QtQuick 1.1 + +Rectangle { + property real loaderWidth: loader.width + property real loaderHeight: loader.height + width: 200 + height: 200 + + Loader { + id: loader + sourceComponent: Item { + property real iwidth: 32 + property real iheight: 32 + width: iwidth + height: iheight + } + } +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/Rect120x60.qml b/tests/auto/qtquick1/qdeclarativeloader/data/Rect120x60.qml new file mode 100644 index 0000000000..5a352844c3 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/Rect120x60.qml @@ -0,0 +1,6 @@ +import QtQuick 1.0 + +Rectangle { + width: 120 + height:60 +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/SetSourceComponent.qml b/tests/auto/qtquick1/qdeclarativeloader/data/SetSourceComponent.qml new file mode 100644 index 0000000000..fa2d3cb325 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/SetSourceComponent.qml @@ -0,0 +1,9 @@ +import QtQuick 1.0 + +Item { + function clear() { + loader.sourceComponent = undefined + } + Component { id: comp; Rectangle { width: 100; height: 50 } } + Loader { id: loader; sourceComponent: comp } +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml b/tests/auto/qtquick1/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml new file mode 100644 index 0000000000..a855947c59 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml @@ -0,0 +1,7 @@ +import QtQuick 1.0 + +Loader { + width: 200 + height: 80 + source: "GraphicsWidget250x250.qml" +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml b/tests/auto/qtquick1/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml new file mode 100644 index 0000000000..b6fd57f590 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml @@ -0,0 +1,5 @@ +import QtQuick 1.0 + +Loader { + source: "GraphicsWidget250x250.qml" +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/SizeToItem.qml b/tests/auto/qtquick1/qdeclarativeloader/data/SizeToItem.qml new file mode 100644 index 0000000000..36ce9912f1 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/SizeToItem.qml @@ -0,0 +1,5 @@ +import QtQuick 1.0 + +Loader { + source: "Rect120x60.qml" +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/SizeToLoader.qml b/tests/auto/qtquick1/qdeclarativeloader/data/SizeToLoader.qml new file mode 100644 index 0000000000..4fa945b300 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/SizeToLoader.qml @@ -0,0 +1,6 @@ +import QtQuick 1.0 + +Loader { + width: 200; height: 80 + source: "Rect120x60.qml" +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/VmeError.qml b/tests/auto/qtquick1/qdeclarativeloader/data/VmeError.qml new file mode 100644 index 0000000000..a36c246260 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/VmeError.qml @@ -0,0 +1,7 @@ +import QtQuick 1.0 + +Rectangle { + width: 100; height: 100; color: "red" + signal somethingHappened + onSomethingHappened: QtObject {} +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/crash.qml b/tests/auto/qtquick1/qdeclarativeloader/data/crash.qml new file mode 100644 index 0000000000..c7a4407add --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/crash.qml @@ -0,0 +1,14 @@ +import QtQuick 1.0 + +Rectangle { + width: 400 + height: 400 + + function setLoaderSource() { + myLoader.source = "GreenRect.qml" + } + + Loader { + id: myLoader + } +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/creationContext.qml b/tests/auto/qtquick1/qdeclarativeloader/data/creationContext.qml new file mode 100644 index 0000000000..529797867f --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/creationContext.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 + +Item { + property bool test: false + + CreationContextLoader { + } +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/differentorigin.qml b/tests/auto/qtquick1/qdeclarativeloader/data/differentorigin.qml new file mode 100644 index 0000000000..043ce5555e --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/differentorigin.qml @@ -0,0 +1,3 @@ +import QtQuick 1.0 + +Loader { source: "http://evil.place/evil.qml" } diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/implicitSize.qml b/tests/auto/qtquick1/qdeclarativeloader/data/implicitSize.qml new file mode 100644 index 0000000000..53aad97ae1 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/implicitSize.qml @@ -0,0 +1,28 @@ +import QtQuick 1.1 + +Rectangle { + property real implWidth: 0 + property real implHeight: 0 + color: "green" + width: loader.implicitWidth+50 + height: loader.implicitHeight+50 + + Loader { + id: loader + sourceComponent: Item { + anchors.centerIn: parent + + implicitWidth: 100 + implicitHeight: 100 + Rectangle { + color: "red" + anchors.fill: parent + } + } + + anchors.fill: parent + anchors.margins: 50 + onImplicitWidthChanged: implWidth = implicitWidth + onImplicitHeightChanged: implHeight = loader.implicitHeight + } +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/nonItem.qml b/tests/auto/qtquick1/qdeclarativeloader/data/nonItem.qml new file mode 100644 index 0000000000..1d0ab5c10d --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/nonItem.qml @@ -0,0 +1,5 @@ +import QtQuick 1.0 + +Loader { + sourceComponent: QtObject {} +} diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/qmldir b/tests/auto/qtquick1/qdeclarativeloader/data/qmldir new file mode 100644 index 0000000000..bf42b507c0 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/qmldir @@ -0,0 +1 @@ +# For tst_QDeclarativeLoader::networkRequestUrl; no types needed though. diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/sameorigin-load.qml b/tests/auto/qtquick1/qdeclarativeloader/data/sameorigin-load.qml new file mode 100644 index 0000000000..dbea969395 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/sameorigin-load.qml @@ -0,0 +1,3 @@ +import QtQuick 1.0 + +Item { } diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/sameorigin.qml b/tests/auto/qtquick1/qdeclarativeloader/data/sameorigin.qml new file mode 100644 index 0000000000..8ba13a0493 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/sameorigin.qml @@ -0,0 +1,3 @@ +import QtQuick 1.0 + +Loader { source: "sameorigin-load.qml" } diff --git a/tests/auto/qtquick1/qdeclarativeloader/data/vmeErrors.qml b/tests/auto/qtquick1/qdeclarativeloader/data/vmeErrors.qml new file mode 100644 index 0000000000..cfced31da5 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeloader/data/vmeErrors.qml @@ -0,0 +1,6 @@ +import QtQuick 1.0 + +Loader { + source: "VmeError.qml" +} + |