diff options
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data/singleton')
16 files changed, 233 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/singleton/SingletonType.qml b/tests/auto/qml/qqmllanguage/data/singleton/SingletonType.qml new file mode 100644 index 0000000000..a2f1a4eeb7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/SingletonType.qml @@ -0,0 +1,18 @@ +import QtQuick 2.0 +pragma Singleton + +Item { + id: singletonId + + property int testProp1: 125 + property int testProp2: 25 + property int testProp3: -55 + + width: 25; height: 25 + + Rectangle { + id: rectangle + border.color: "white" + anchors.fill: parent + } +}
\ No newline at end of file diff --git a/tests/auto/qml/qqmllanguage/data/singleton/js/jspragma.js b/tests/auto/qml/qqmllanguage/data/singleton/js/jspragma.js new file mode 100644 index 0000000000..b652689a48 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/js/jspragma.js @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 BlackBerry Limited. All rights reserved. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +.pragma library + +var value = 333 diff --git a/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/NonSingletonType.qml b/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/NonSingletonType.qml new file mode 100644 index 0000000000..9a3b7abbd6 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/NonSingletonType.qml @@ -0,0 +1,17 @@ +import QtQuick 2.0 + +Item { + id: singletonId + + property int testProp1: 125 + property int testProp2: 25 + property int testProp3: -55 + + width: 25; height: 25 + + Rectangle { + id: rectangle + border.color: "white" + anchors.fill: parent + } +}
\ No newline at end of file diff --git a/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/NonSingletonType25.qml b/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/NonSingletonType25.qml new file mode 100644 index 0000000000..ca4d87faf7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/NonSingletonType25.qml @@ -0,0 +1,17 @@ +import QtQuick 2.0 + +Item { + id: singletonId + + property int testProp1: 225 + property int testProp2: 125 + property int testProp3: 55 + + width: 25; height: 25 + + Rectangle { + id: rectangle + border.color: "white" + anchors.fill: parent + } +}
\ No newline at end of file diff --git a/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/SingletonType.qml b/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/SingletonType.qml new file mode 100644 index 0000000000..a2f1a4eeb7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/SingletonType.qml @@ -0,0 +1,18 @@ +import QtQuick 2.0 +pragma Singleton + +Item { + id: singletonId + + property int testProp1: 125 + property int testProp2: 25 + property int testProp3: -55 + + width: 25; height: 25 + + Rectangle { + id: rectangle + border.color: "white" + anchors.fill: parent + } +}
\ No newline at end of file diff --git a/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/SingletonType22.qml b/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/SingletonType22.qml new file mode 100644 index 0000000000..2ca61b0fcc --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/SingletonType22.qml @@ -0,0 +1,18 @@ +pragma Singleton +import QtQuick 2.0 + +Item { + id: singletonId + + property int testProp1: 225 + property int testProp2: 125 + property int testProp3: 55 + + width: 25; height: 25 + + Rectangle { + id: rectangle + border.color: "white" + anchors.fill: parent + } +}
\ No newline at end of file diff --git a/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/qmldir b/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/qmldir new file mode 100644 index 0000000000..91fc8f9139 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/module/org/qtproject/SingletonTest/qmldir @@ -0,0 +1,5 @@ +module org.qtproject.SingletonTest +singleton SingletonType 1.0 SingletonType.qml +singleton SingletonType 2.2 SingletonType22.qml +NonSingletonType 1.0 NonSingletonType.qml +NonSingletonType 2.5 NonSingletonType25.qml diff --git a/tests/auto/qml/qqmllanguage/data/singleton/qmldir b/tests/auto/qml/qqmllanguage/data/singleton/qmldir new file mode 100644 index 0000000000..533fb6999a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/qmldir @@ -0,0 +1,3 @@ +singleton SingletonType SingletonType.qml + + diff --git a/tests/auto/qml/qqmllanguage/data/singleton/qmldir-error/SType2.qml b/tests/auto/qml/qqmllanguage/data/singleton/qmldir-error/SType2.qml new file mode 100644 index 0000000000..43450afcec --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/qmldir-error/SType2.qml @@ -0,0 +1,18 @@ +import QtQuick 2.0 +pragma Singleton + +Item { + id: singletonId + + property int testProp1: 125 + property int testProp2: 25 + property int testProp3: -55 + + width: 25; height: 25 + + Rectangle { + id: rectangle + border.color: "white" + anchors.fill: parent + } +} diff --git a/tests/auto/qml/qqmllanguage/data/singleton/qmldir-error/qmldir b/tests/auto/qml/qqmllanguage/data/singleton/qmldir-error/qmldir new file mode 100644 index 0000000000..0f499f9dce --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/qmldir-error/qmldir @@ -0,0 +1 @@ +singleton SType2 diff --git a/tests/auto/qml/qqmllanguage/data/singleton/qualified/SingletonType.qml b/tests/auto/qml/qqmllanguage/data/singleton/qualified/SingletonType.qml new file mode 100644 index 0000000000..9a3b7abbd6 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/qualified/SingletonType.qml @@ -0,0 +1,17 @@ +import QtQuick 2.0 + +Item { + id: singletonId + + property int testProp1: 125 + property int testProp2: 25 + property int testProp3: -55 + + width: 25; height: 25 + + Rectangle { + id: rectangle + border.color: "white" + anchors.fill: parent + } +}
\ No newline at end of file diff --git a/tests/auto/qml/qqmllanguage/data/singleton/registeredComposite/CompositeType.qml b/tests/auto/qml/qqmllanguage/data/singleton/registeredComposite/CompositeType.qml new file mode 100644 index 0000000000..5c86c21ffb --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/registeredComposite/CompositeType.qml @@ -0,0 +1,19 @@ +import QtQuick 2.0 +pragma Singleton + +Item { + id: singletonId + + property int testProp1: 325 + property int testProp2: 225 + property int testProp3: 155 + + width: 25; height: 25 + + Rectangle { + id: rectangle + border.color: "white" + anchors.fill: parent + } +} + diff --git a/tests/auto/qml/qqmllanguage/data/singleton/remote/RemoteSingletonType2.qml b/tests/auto/qml/qqmllanguage/data/singleton/remote/RemoteSingletonType2.qml new file mode 100644 index 0000000000..41d619a275 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/remote/RemoteSingletonType2.qml @@ -0,0 +1,18 @@ +import QtQuick 2.0 +pragma Singleton + +Item { + id: singletonId + + property int testProp1: 525 + property int testProp2: 425 + property int testProp3: 355 + + width: 25; height: 25 + + Rectangle { + id: rectangle + border.color: "white" + anchors.fill: parent + } +} diff --git a/tests/auto/qml/qqmllanguage/data/singleton/remote/qmldir b/tests/auto/qml/qqmllanguage/data/singleton/remote/qmldir new file mode 100644 index 0000000000..c73782b825 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/remote/qmldir @@ -0,0 +1 @@ +singleton RemoteSingletonType2 RemoteSingletonType2.qml
\ No newline at end of file diff --git a/tests/auto/qml/qqmllanguage/data/singleton/subdir/ErrorSingletonType.qml b/tests/auto/qml/qqmllanguage/data/singleton/subdir/ErrorSingletonType.qml new file mode 100644 index 0000000000..9a3b7abbd6 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/subdir/ErrorSingletonType.qml @@ -0,0 +1,17 @@ +import QtQuick 2.0 + +Item { + id: singletonId + + property int testProp1: 125 + property int testProp2: 25 + property int testProp3: -55 + + width: 25; height: 25 + + Rectangle { + id: rectangle + border.color: "white" + anchors.fill: parent + } +}
\ No newline at end of file diff --git a/tests/auto/qml/qqmllanguage/data/singleton/subdir/qmldir b/tests/auto/qml/qqmllanguage/data/singleton/subdir/qmldir new file mode 100644 index 0000000000..eb702eccaf --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/subdir/qmldir @@ -0,0 +1,3 @@ +singleton ErrorSingletonType ErrorSingletonType.qml + + |