diff options
Diffstat (limited to 'tests/auto/qml/qqmltypeloader/data')
21 files changed, 213 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmltypeloader/data/Base.qml b/tests/auto/qml/qqmltypeloader/data/Base.qml new file mode 100644 index 0000000000..431c659424 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/Base.qml @@ -0,0 +1,3 @@ +import QtQml 2.0 + +QtObject {} diff --git a/tests/auto/qml/qqmltypeloader/data/ComponentWithIncubator.qml b/tests/auto/qml/qqmltypeloader/data/ComponentWithIncubator.qml new file mode 100644 index 0000000000..b3610831df --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/ComponentWithIncubator.qml @@ -0,0 +1,9 @@ +import QtQuick 2.0 + +Item { + Repeater { + model: 3 + Item {} + } +} + diff --git a/tests/auto/qml/qqmltypeloader/data/CppRegisteredSingleton1.qml b/tests/auto/qml/qqmltypeloader/data/CppRegisteredSingleton1.qml new file mode 100644 index 0000000000..f4ad5e5f7a --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/CppRegisteredSingleton1.qml @@ -0,0 +1,6 @@ +pragma Singleton +import QtQuick 2.0 + +Item { + property bool ok: true +} diff --git a/tests/auto/qml/qqmltypeloader/data/CppRegisteredSingleton2.qml b/tests/auto/qml/qqmltypeloader/data/CppRegisteredSingleton2.qml new file mode 100644 index 0000000000..55dd57517f --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/CppRegisteredSingleton2.qml @@ -0,0 +1,7 @@ +pragma Singleton +import QtQuick 2.0 +import cppsingletonmodule 1.0 + +Item { + property bool ok: CppRegisteredSingleton1.ok +} diff --git a/tests/auto/qml/qqmltypeloader/data/Fast/Fast.qml b/tests/auto/qml/qqmltypeloader/data/Fast/Fast.qml new file mode 100644 index 0000000000..e879577e10 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/Fast/Fast.qml @@ -0,0 +1,4 @@ +import QtQml 2.0 + +QtObject { +} diff --git a/tests/auto/qml/qqmltypeloader/data/Fast/qmldir b/tests/auto/qml/qqmltypeloader/data/Fast/qmldir new file mode 100644 index 0000000000..a6a4c9e6c7 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/Fast/qmldir @@ -0,0 +1 @@ +Fast 1.0 Fast.qml diff --git a/tests/auto/qml/qqmltypeloader/data/Intercept.qml b/tests/auto/qml/qqmltypeloader/data/Intercept.qml new file mode 100644 index 0000000000..b557b4b941 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/Intercept.qml @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import Fast 1.0 + +Item { + Rectangle { + color: "red" + width: 100 + height: 100 + } + Fast { + + } +} diff --git a/tests/auto/qml/qqmltypeloader/data/Load.qml b/tests/auto/qml/qqmltypeloader/data/Load.qml new file mode 100644 index 0000000000..0b893bb5cd --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/Load.qml @@ -0,0 +1,11 @@ +import QtQuick 2.0 + +Item { + property int xy: loader.xy + Loader { + id: loader + asynchronous: true + source: 'Base.qml' + property int xy: item.xy + } +} diff --git a/tests/auto/qml/qqmltypeloader/data/Singleton.qml b/tests/auto/qml/qqmltypeloader/data/Singleton.qml new file mode 100644 index 0000000000..3a1b1c1493 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/Singleton.qml @@ -0,0 +1,7 @@ +pragma Singleton +import QtQml 2.0 +import modulewithsingleton 1.0 + +QtObject { + property bool ok: true +} diff --git a/tests/auto/qml/qqmltypeloader/data/ValueSource.qml b/tests/auto/qml/qqmltypeloader/data/ValueSource.qml new file mode 100644 index 0000000000..19e6e730c8 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/ValueSource.qml @@ -0,0 +1,7 @@ +pragma Singleton +import QtQuick 2.6 + +Item { + id: valueSource + property int something: 10 +} diff --git a/tests/auto/qml/qqmltypeloader/data/implicitcomponent.qml b/tests/auto/qml/qqmltypeloader/data/implicitcomponent.qml new file mode 100644 index 0000000000..9cebc88c8b --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/implicitcomponent.qml @@ -0,0 +1,10 @@ +import QtQml 2.2 + +QtObject { + property Component some: QtObject { + property int rrr: 2 + property Component onemore: QtObject { + property int brrrr: -1 + } + } +} diff --git a/tests/auto/qml/qqmltypeloader/data/imports/multisingletonmodule/Singleton1.qml b/tests/auto/qml/qqmltypeloader/data/imports/multisingletonmodule/Singleton1.qml new file mode 100644 index 0000000000..34eca59f86 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/imports/multisingletonmodule/Singleton1.qml @@ -0,0 +1,7 @@ +pragma Singleton +import QtQuick 2.0 +import "." + +Item { + property bool ok: true +} diff --git a/tests/auto/qml/qqmltypeloader/data/imports/multisingletonmodule/Singleton2.qml b/tests/auto/qml/qqmltypeloader/data/imports/multisingletonmodule/Singleton2.qml new file mode 100644 index 0000000000..607d85d7fb --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/imports/multisingletonmodule/Singleton2.qml @@ -0,0 +1,7 @@ +pragma Singleton +import QtQuick 2.0 +import "." + +Item { + property bool ok: Singleton1.ok +} diff --git a/tests/auto/qml/qqmltypeloader/data/imports/multisingletonmodule/qmldir b/tests/auto/qml/qqmltypeloader/data/imports/multisingletonmodule/qmldir new file mode 100644 index 0000000000..71b889a12d --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/imports/multisingletonmodule/qmldir @@ -0,0 +1,2 @@ +singleton Singleton1 1.0 Singleton1.qml +singleton Singleton2 1.0 Singleton2.qml diff --git a/tests/auto/qml/qqmltypeloader/data/multisingletonuser.qml b/tests/auto/qml/qqmltypeloader/data/multisingletonuser.qml new file mode 100644 index 0000000000..b80e2c5223 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/multisingletonuser.qml @@ -0,0 +1,7 @@ +import QtQml 2.0 +import multisingletonmodule 1.0 +import cppsingletonmodule 1.0 + +QtObject { + property bool ok: Singleton2.ok && CppRegisteredSingleton2.ok +} diff --git a/tests/auto/qml/qqmltypeloader/data/redirected/Imported.qml b/tests/auto/qml/qqmltypeloader/data/redirected/Imported.qml new file mode 100644 index 0000000000..62954fe1b2 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/redirected/Imported.qml @@ -0,0 +1,5 @@ +import QtQml 2.0 + +QtObject { + property int xy: 323232 +} diff --git a/tests/auto/qml/qqmltypeloader/data/redirected/Redirected.qml b/tests/auto/qml/qqmltypeloader/data/redirected/Redirected.qml new file mode 100644 index 0000000000..40fec5ed31 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/redirected/Redirected.qml @@ -0,0 +1,5 @@ +import QtQml 2.0 + +Imported { + +} diff --git a/tests/auto/qml/qqmltypeloader/data/redirected/qmldir b/tests/auto/qml/qqmltypeloader/data/redirected/qmldir new file mode 100644 index 0000000000..8eb1fa5c18 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/redirected/qmldir @@ -0,0 +1 @@ +Imported 1.0 Imported.qml diff --git a/tests/auto/qml/qqmltypeloader/data/singletonuser.qml b/tests/auto/qml/qqmltypeloader/data/singletonuser.qml new file mode 100644 index 0000000000..79ca47e12f --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/singletonuser.qml @@ -0,0 +1,6 @@ +import QtQml 2.0 +import modulewithsingleton 1.0 + +QtObject { + property bool ok: Singleton.ok +} diff --git a/tests/auto/qml/qqmltypeloader/data/test_intercept.qml b/tests/auto/qml/qqmltypeloader/data/test_intercept.qml new file mode 100644 index 0000000000..0d64cb7e28 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/test_intercept.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +ListView { + width: 400 + height: 500 + model: 2 + + id: test + property int created: 0 + property int loaded: 0 + + delegate: Loader { + width: ListView.view.width + height: 100 + asynchronous: true + source: index == 0 ? "Intercept.qml" : "GenericView.qml" + + onLoaded: { + test.loaded++ + } + Component.onCompleted: { + test.created++ + } + } +} diff --git a/tests/auto/qml/qqmltypeloader/data/trim_cache3.qml b/tests/auto/qml/qqmltypeloader/data/trim_cache3.qml new file mode 100644 index 0000000000..219c7d3bcb --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/trim_cache3.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 + +Item { + width: 400 + height: 400 + + property alias source: loader.source + + Loader { + id: loader + source: "ComponentWithIncubator.qml" + } +} + |