summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTuomo Pelkonen <tuomo.pelkonen@gmail.com>2021-01-14 10:49:40 +0200
committerTuomo Pelkonen <tuomo.pelkonen@gmail.com>2021-01-27 10:01:58 +0200
commit6c2aec18ed7f043c17b09c939b9bc521def37aa5 (patch)
tree3dd4face677a6eb9ef2e45b51548d4b5a17263c4 /tests
parent1fc39261132f0b3edf89934fd055234f8b19ced1 (diff)
Fix most of the QML example applications
Most of the QML examples work now as supposed to. Qmlbars still needs fixing and is not included in this patch. Task-number: QTBUG-89298 Change-Id: Ic8bc6511cdb00dd3db0a181b7a31b3bbc39f0556 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/qmldynamicdata/qml/qmldynamicdata/NewButton.qml54
-rw-r--r--tests/manual/qmldynamicdata/qml/qmldynamicdata/main.qml11
-rw-r--r--tests/manual/qmldynamicdata/qmldynamicdata.qrc1
-rw-r--r--tests/manual/qmlmultitest/qml/qmlmultitest/Data.qml2
-rw-r--r--tests/manual/qmlmultitest/qml/qmlmultitest/NewButton.qml63
-rw-r--r--tests/manual/qmlmultitest/qml/qmlmultitest/main.qml15
-rw-r--r--tests/manual/qmlmultitest/qmlmultitest.qrc1
-rw-r--r--tests/manual/qmlperf/qml/qmlperf/main.qml8
-rw-r--r--tests/manual/qmlvolume/qml/qmlvolume/NewButton.qml63
-rw-r--r--tests/manual/qmlvolume/qml/qmlvolume/main.qml12
-rw-r--r--tests/manual/qmlvolume/qmlvolume.qrc1
11 files changed, 25 insertions, 206 deletions
diff --git a/tests/manual/qmldynamicdata/qml/qmldynamicdata/NewButton.qml b/tests/manual/qmldynamicdata/qml/qmldynamicdata/NewButton.qml
deleted file mode 100644
index 54cdce24..00000000
--- a/tests/manual/qmldynamicdata/qml/qmldynamicdata/NewButton.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** 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 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** 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.1
-import QtQuick.Controls 1.0
-
-Item {
- id: newbutton
-
- property alias text: buttonText.text
-
- signal clicked
-
- height: 80
-
- Button {
- width: parent.width
- height: parent.height
- Text {
- id: buttonText
- wrapMode: Text.WordWrap
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.fill: parent
- }
- onClicked: newbutton.clicked()
- }
-}
diff --git a/tests/manual/qmldynamicdata/qml/qmldynamicdata/main.qml b/tests/manual/qmldynamicdata/qml/qmldynamicdata/main.qml
index a49a1184..3c351d29 100644
--- a/tests/manual/qmldynamicdata/qml/qmldynamicdata/main.qml
+++ b/tests/manual/qmldynamicdata/qml/qmldynamicdata/main.qml
@@ -27,8 +27,9 @@
**
****************************************************************************/
-import QtQuick 2.1
-import QtDataVisualization 1.0
+import QtQuick
+import QtDataVisualization
+import QtQuick.Controls
import "."
Rectangle {
@@ -227,7 +228,7 @@ Rectangle {
}
}
- NewButton {
+ Button {
id: shadowToggle
width: parent.width / 3 // We're adding 3 buttons and want to divide them equally
text: "Hide Shadows"
@@ -244,7 +245,7 @@ Rectangle {
}
}
- NewButton {
+ Button {
id: cameraToggle
width: parent.width / 3
text: "Pause Camera"
@@ -261,7 +262,7 @@ Rectangle {
}
}
- NewButton {
+ Button {
id: exitButton
width: parent.width / 3
text: "Quit"
diff --git a/tests/manual/qmldynamicdata/qmldynamicdata.qrc b/tests/manual/qmldynamicdata/qmldynamicdata.qrc
index 76641cf9..e1997ffc 100644
--- a/tests/manual/qmldynamicdata/qmldynamicdata.qrc
+++ b/tests/manual/qmldynamicdata/qmldynamicdata.qrc
@@ -1,6 +1,5 @@
<RCC>
<qresource prefix="/">
<file>qml/qmldynamicdata/main.qml</file>
- <file>qml/qmldynamicdata/NewButton.qml</file>
</qresource>
</RCC>
diff --git a/tests/manual/qmlmultitest/qml/qmlmultitest/Data.qml b/tests/manual/qmlmultitest/qml/qmlmultitest/Data.qml
index 9bbbd7f8..b6d16eae 100644
--- a/tests/manual/qmlmultitest/qml/qmlmultitest/Data.qml
+++ b/tests/manual/qmlmultitest/qml/qmlmultitest/Data.qml
@@ -27,7 +27,7 @@
**
****************************************************************************/
-import QtQuick 2.1
+import QtQuick
Item {
property alias sharedData: dataModel
diff --git a/tests/manual/qmlmultitest/qml/qmlmultitest/NewButton.qml b/tests/manual/qmlmultitest/qml/qmlmultitest/NewButton.qml
deleted file mode 100644
index 19309cca..00000000
--- a/tests/manual/qmlmultitest/qml/qmlmultitest/NewButton.qml
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** 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 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** 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.1
-import QtQuick.Controls 1.0
-import QtQuick.Controls.Styles 1.0
-
-Item {
- id: newbutton
-
- property alias text: buttonText.text
-
- signal clicked
-
- implicitWidth: buttonText.implicitWidth + 5
- implicitHeight: buttonText.implicitHeight + 10
-
- Button {
- id: buttonText
- width: parent.width
- height: parent.height
-
- style: ButtonStyle {
- label: Component {
- Text {
- text: buttonText.text
- clip: true
- wrapMode: Text.WordWrap
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.fill: parent
- }
- }
- }
- onClicked: newbutton.clicked()
- }
-}
diff --git a/tests/manual/qmlmultitest/qml/qmlmultitest/main.qml b/tests/manual/qmlmultitest/qml/qmlmultitest/main.qml
index 388cf391..bf0fb624 100644
--- a/tests/manual/qmlmultitest/qml/qmlmultitest/main.qml
+++ b/tests/manual/qmlmultitest/qml/qmlmultitest/main.qml
@@ -27,9 +27,10 @@
**
****************************************************************************/
-import QtQuick 2.1
-import QtQuick.Layouts 1.0
-import QtDataVisualization 1.1
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import QtDataVisualization
import "."
Rectangle {
@@ -106,7 +107,7 @@ Rectangle {
anchors.bottom: parent.bottom
columns: 2
- NewButton {
+ Button {
Layout.minimumWidth: parent.width / 2
Layout.fillHeight: true
Layout.fillWidth: true
@@ -114,7 +115,7 @@ Rectangle {
onClicked: clearSelections() // call a helper function to keep button itself simpler
}
- NewButton {
+ Button {
Layout.minimumWidth: parent.width / 2
Layout.fillHeight: true
Layout.fillWidth: true
@@ -122,14 +123,14 @@ Rectangle {
onClicked: Qt.quit(0);
}
- NewButton {
+ Button {
Layout.fillHeight: true
Layout.fillWidth: true
text: "Reset Cameras"
onClicked: resetCameras() // call a helper function to keep button itself simpler
}
- NewButton {
+ Button {
id: mmbButton
Layout.fillHeight: true
Layout.fillWidth: true
diff --git a/tests/manual/qmlmultitest/qmlmultitest.qrc b/tests/manual/qmlmultitest/qmlmultitest.qrc
index 7fc9ade2..ae52b7e7 100644
--- a/tests/manual/qmlmultitest/qmlmultitest.qrc
+++ b/tests/manual/qmlmultitest/qmlmultitest.qrc
@@ -2,6 +2,5 @@
<qresource prefix="/">
<file>qml/qmlmultitest/Data.qml</file>
<file>qml/qmlmultitest/main.qml</file>
- <file>qml/qmlmultitest/NewButton.qml</file>
</qresource>
</RCC>
diff --git a/tests/manual/qmlperf/qml/qmlperf/main.qml b/tests/manual/qmlperf/qml/qmlperf/main.qml
index 43c6c5bf..e17c4c02 100644
--- a/tests/manual/qmlperf/qml/qmlperf/main.qml
+++ b/tests/manual/qmlperf/qml/qmlperf/main.qml
@@ -27,10 +27,10 @@
**
****************************************************************************/
-import QtQuick 2.1
-import QtQuick.Layouts 1.0
-import QtQuick.Controls 1.0
-import QtDataVisualization 1.1
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import QtDataVisualization
import "."
Rectangle {
diff --git a/tests/manual/qmlvolume/qml/qmlvolume/NewButton.qml b/tests/manual/qmlvolume/qml/qmlvolume/NewButton.qml
deleted file mode 100644
index 19309cca..00000000
--- a/tests/manual/qmlvolume/qml/qmlvolume/NewButton.qml
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** 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 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** 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.1
-import QtQuick.Controls 1.0
-import QtQuick.Controls.Styles 1.0
-
-Item {
- id: newbutton
-
- property alias text: buttonText.text
-
- signal clicked
-
- implicitWidth: buttonText.implicitWidth + 5
- implicitHeight: buttonText.implicitHeight + 10
-
- Button {
- id: buttonText
- width: parent.width
- height: parent.height
-
- style: ButtonStyle {
- label: Component {
- Text {
- text: buttonText.text
- clip: true
- wrapMode: Text.WordWrap
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.fill: parent
- }
- }
- }
- onClicked: newbutton.clicked()
- }
-}
diff --git a/tests/manual/qmlvolume/qml/qmlvolume/main.qml b/tests/manual/qmlvolume/qml/qmlvolume/main.qml
index 24946a12..52e8868b 100644
--- a/tests/manual/qmlvolume/qml/qmlvolume/main.qml
+++ b/tests/manual/qmlvolume/qml/qmlvolume/main.qml
@@ -27,10 +27,10 @@
**
****************************************************************************/
-import QtQuick 2.1
-import QtQuick.Layouts 1.0
-import QtQuick.Controls 1.0
-import QtDataVisualization 1.2
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import QtDataVisualization
import "."
Item {
@@ -128,7 +128,7 @@ Item {
anchors.bottom: parent.bottom
spacing: 0
- NewButton {
+ Button {
id: sliceButton
Layout.fillHeight: true
Layout.fillWidth: true
@@ -147,7 +147,7 @@ Item {
}
}
}
- NewButton {
+ Button {
id: exitButton
Layout.fillHeight: true
Layout.fillWidth: true
diff --git a/tests/manual/qmlvolume/qmlvolume.qrc b/tests/manual/qmlvolume/qmlvolume.qrc
index 18fe57e1..b1cb2997 100644
--- a/tests/manual/qmlvolume/qmlvolume.qrc
+++ b/tests/manual/qmlvolume/qmlvolume.qrc
@@ -1,6 +1,5 @@
<RCC>
<qresource prefix="/">
<file>qml/qmlvolume/main.qml</file>
- <file>qml/qmlvolume/NewButton.qml</file>
</qresource>
</RCC>