summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalazs Egedi <egedib@inf.u-szeged.hu>2021-08-18 16:40:52 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-09 10:41:21 +0000
commit4b9b55854e4f102ed4f085d2722d6515f77fecf3 (patch)
tree456d15fcdaaf05ca4ee8c2486032e94ed334454b
parent12371289b38d2cedb4f8f1f745c51170fa105a84 (diff)
downloadqtwebchannel-4b9b55854e4f102ed4f085d2722d6515f77fecf3.tar.gz
Fix QML files in tests and examples
- Removed the import versions - Changed the implicitly defined properties in Connections - Ported qmls to Qt6 - Dialog icon support is incomplete, so no icon in Dialog for now Change-Id: I2dab3a0e715d447004aa408476bcfd638599b012 Reviewed-by: Arno Rehn <a.rehn@menlosystems.com> (cherry picked from commit d42770a9fda2e00617e6f4c2452156b9b9cafd03) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/webchannel/chatclient-qml/LoginForm.ui.qml7
-rw-r--r--examples/webchannel/chatclient-qml/MainForm.ui.qml6
-rw-r--r--examples/webchannel/chatclient-qml/qmlchatclient.qml31
-rw-r--r--tests/auto/qml/Client.qml8
-rw-r--r--tests/auto/qml/tst_bench.qml8
-rw-r--r--tests/auto/qml/tst_multiclient.qml8
-rw-r--r--tests/auto/qml/tst_webchannel.qml8
-rw-r--r--tests/auto/qml/tst_webchannelseparation.qml8
8 files changed, 45 insertions, 39 deletions
diff --git a/examples/webchannel/chatclient-qml/LoginForm.ui.qml b/examples/webchannel/chatclient-qml/LoginForm.ui.qml
index c8045e5..b67e381 100644
--- a/examples/webchannel/chatclient-qml/LoginForm.ui.qml
+++ b/examples/webchannel/chatclient-qml/LoginForm.ui.qml
@@ -48,10 +48,9 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-import QtQuick 2.4
-import QtQuick.Controls 2.2
-import QtQuick.Layouts 1.0
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
Item {
property alias userName: userName
diff --git a/examples/webchannel/chatclient-qml/MainForm.ui.qml b/examples/webchannel/chatclient-qml/MainForm.ui.qml
index ff881df..f887f78 100644
--- a/examples/webchannel/chatclient-qml/MainForm.ui.qml
+++ b/examples/webchannel/chatclient-qml/MainForm.ui.qml
@@ -49,9 +49,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Controls 2.2
-import QtQuick.Layouts 1.3
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
Item {
property alias chat: chat
diff --git a/examples/webchannel/chatclient-qml/qmlchatclient.qml b/examples/webchannel/chatclient-qml/qmlchatclient.qml
index e10b118..d62118c 100644
--- a/examples/webchannel/chatclient-qml/qmlchatclient.qml
+++ b/examples/webchannel/chatclient-qml/qmlchatclient.qml
@@ -49,12 +49,12 @@
**
****************************************************************************/
-import QtQuick 2.2
-import QtQuick.Dialogs 1.2
-import QtQuick.Controls 2.0
-import QtQuick.Window 2.0
-import QtQuick.Layouts 1.1
-import Qt.WebSockets 1.0
+import QtQuick
+import QtQuick.Dialogs
+import QtQuick.Controls
+import QtQuick.Window
+import QtQuick.Layouts
+import QtWebSockets
import "qwebchannel.js" as WebChannel
ApplicationWindow {
@@ -77,7 +77,7 @@ ApplicationWindow {
sendTextMessage(arg);
}
- onTextMessageReceived: {
+ onTextMessageReceived: function(message) {
onmessage({data: message});
}
@@ -135,7 +135,7 @@ ApplicationWindow {
Connections {
target: mainUi.message
- onEditingFinished: {
+ function onEditingFinished() {
if (mainUi.message.text.length) {
//call the sendMessage method to send the message
root.channel.objects.chatserver.sendMessage(loginName,
@@ -163,7 +163,7 @@ ApplicationWindow {
Connections {
target: loginUi.loginButton
- onClicked: {
+ function onClicked() {
//call the login method
root.channel.objects.chatserver.login(loginName, function(arg) {
//check the return value for success
@@ -179,13 +179,20 @@ ApplicationWindow {
}
}
- MessageDialog {
+ Dialog {
id: errorDialog
+ property alias text: message.text
- icon: StandardIcon.Critical
- standardButtons: StandardButton.Close
+ anchors.centerIn: parent
+ // FIXME: icon!
+ //icon: StandardIcon.Critical
+ standardButtons: Dialog.Close
title: "Chat client"
+ Text {
+ id: message
+ }
+
onAccepted: {
Qt.quit();
}
diff --git a/tests/auto/qml/Client.qml b/tests/auto/qml/Client.qml
index 269c8fb..9543818 100644
--- a/tests/auto/qml/Client.qml
+++ b/tests/auto/qml/Client.qml
@@ -26,11 +26,11 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
+import QtQuick
+import QtTest
-import QtWebChannel 1.0
-import QtWebChannel.Tests 1.0
+import QtWebChannel
+import QtWebChannel.Tests
import "qrc:///qtwebchannel/qwebchannel.js" as JSClient
Item {
diff --git a/tests/auto/qml/tst_bench.qml b/tests/auto/qml/tst_bench.qml
index bd337f8..b8ac0df 100644
--- a/tests/auto/qml/tst_bench.qml
+++ b/tests/auto/qml/tst_bench.qml
@@ -26,11 +26,11 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
+import QtQuick
+import QtTest
-import QtWebChannel 1.0
-import QtWebChannel.Tests 1.0
+import QtWebChannel
+import QtWebChannel.Tests
TestCase {
name: "Bench"
diff --git a/tests/auto/qml/tst_multiclient.qml b/tests/auto/qml/tst_multiclient.qml
index fbebeda..c175c59 100644
--- a/tests/auto/qml/tst_multiclient.qml
+++ b/tests/auto/qml/tst_multiclient.qml
@@ -27,11 +27,11 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
+import QtQuick
+import QtTest
-import QtWebChannel 1.0
-import QtWebChannel.Tests 1.0
+import QtWebChannel
+import QtWebChannel.Tests
import "qrc:///qtwebchannel/qwebchannel.js" as JSClient
diff --git a/tests/auto/qml/tst_webchannel.qml b/tests/auto/qml/tst_webchannel.qml
index 05a3f30..fe62542 100644
--- a/tests/auto/qml/tst_webchannel.qml
+++ b/tests/auto/qml/tst_webchannel.qml
@@ -26,11 +26,11 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
+import QtQuick
+import QtTest
-import QtWebChannel 1.0
-import QtWebChannel.Tests 1.0
+import QtWebChannel
+import QtWebChannel.Tests
import "qrc:///qtwebchannel/qwebchannel.js" as JSClient
TestCase {
diff --git a/tests/auto/qml/tst_webchannelseparation.qml b/tests/auto/qml/tst_webchannelseparation.qml
index 64ad4f8..a0632b3 100644
--- a/tests/auto/qml/tst_webchannelseparation.qml
+++ b/tests/auto/qml/tst_webchannelseparation.qml
@@ -25,11 +25,11 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
+import QtQuick
+import QtTest
-import QtWebChannel 1.0
-import QtWebChannel.Tests 1.0
+import QtWebChannel
+import QtWebChannel.Tests
import "qrc:///qtwebchannel/qwebchannel.js" as JSClient
TestCase {