summaryrefslogtreecommitdiffstats
path: root/recipes-demo/messaging
diff options
context:
space:
mode:
authorIndivara Weerasuriya <indivara.weerasuriya@qt.io>2024-07-30 19:47:24 +0900
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-11-20 13:35:26 +0000
commit59ae0b13d2bb14fbf12117f2f55bfcb6f06f104b (patch)
treeba38354db9033675bde1ad07700d796160450f8f /recipes-demo/messaging
parenta37e8ed0c8f997e13d719c7e5d956b5febc9cfa5 (diff)
Migrate demo app recipes and patch apps to Qt 6
Bug-AGL: SPEC-5294 Change-Id: I6b9ff940745f88af9a3b69e29917082e52b25f88 Signed-off-by: Indivara Weerasuriya <indivara.weerasuriya@qt.io> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/30141 Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'recipes-demo/messaging')
-rw-r--r--recipes-demo/messaging/messaging/0001-Migrate-to-Qt-6.patch91
-rw-r--r--recipes-demo/messaging/messaging_git.bb8
2 files changed, 96 insertions, 3 deletions
diff --git a/recipes-demo/messaging/messaging/0001-Migrate-to-Qt-6.patch b/recipes-demo/messaging/messaging/0001-Migrate-to-Qt-6.patch
new file mode 100644
index 000000000..4a8b1ab13
--- /dev/null
+++ b/recipes-demo/messaging/messaging/0001-Migrate-to-Qt-6.patch
@@ -0,0 +1,91 @@
+From 83be2a0e829c959f5466e6c44c60abadc628ea0b Mon Sep 17 00:00:00 2001
+From: Indivara Weerasuriya <1806262-indivara@users.noreply.git.qt.io>
+Date: Wed, 24 Jul 2024 09:28:22 +0900
+Subject: [PATCH] Migrate to Qt 6
+
+---
+ app/Messaging.qml | 4 ++--
+ app/Notification.qml | 2 +-
+ app/TabImageButton.qml | 11 ++++++-----
+ 3 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/app/Messaging.qml b/app/Messaging.qml
+index 48568c2..05bd452 100644
+--- a/app/Messaging.qml
++++ b/app/Messaging.qml
+@@ -41,13 +41,13 @@ ApplicationWindow {
+ contentHeight: 160
+
+ TabImageButton {
+- icon: "./images/ic_contacts_48px.svg"
++ iconSource: "qrc:/images/ic_contacts_48px.svg"
+ text: "Alerts"
+ font.pixelSize: 50
+ }
+
+ TabImageButton {
+- icon: "./images/ic_contacts_48px.svg"
++ iconSource: "qrc:/images/ic_contacts_48px.svg"
+ text: "Compose"
+ font.pixelSize: 50
+ }
+diff --git a/app/Notification.qml b/app/Notification.qml
+index ac6b360..dd68ce3 100644
+--- a/app/Notification.qml
++++ b/app/Notification.qml
+@@ -30,7 +30,7 @@ Item {
+ Image {
+ id: button
+ scale: 0.5
+- source: '../images/HMI_Settings_X.svg'
++ source: 'qrc:/images/HMI_Settings_X.svg'
+ MouseArea {
+ anchors.fill: button
+ onClicked: notificationModel.remove(index)
+diff --git a/app/TabImageButton.qml b/app/TabImageButton.qml
+index 2176595..c707574 100644
+--- a/app/TabImageButton.qml
++++ b/app/TabImageButton.qml
+@@ -41,6 +41,7 @@ import QtQuick.Layouts 1.1
+ import QtQuick.Controls 2.2
+ import QtQuick.Controls.impl 2.2
+ import QtQuick.Templates 2.2 as T
++import QtQuick.Controls.Basic 2.2
+
+ T.TabButton {
+ id: control
+@@ -53,13 +54,13 @@ T.TabButton {
+
+ padding: 6
+
+- property url icon
++ property url iconSource
+
+ contentItem: ColumnLayout {
+ spacing: 20
+ Image {
+ Layout.alignment: Qt.AlignCenter
+- source: control.icon
++ source: control.iconSource
+ width: 96
+ height: 96
+
+@@ -70,7 +71,7 @@ T.TabButton {
+ font: control.font
+ elide: Text.ElideRight
+ opacity: enabled ? 1 : 0.3
+- color: !control.checked ? Default.textLightColor : control.down ? Default.textDarkColor : Default.textColor
++ color: !control.checked ? Basic.textLightColor : control.down ? Basic.textDarkColor : Basic.textColor
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+@@ -78,7 +79,7 @@ T.TabButton {
+ background: Rectangle {
+ implicitHeight: 160
+ color: control.down
+- ? (control.checked ? Default.tabButtonCheckedPressedColor : Default.tabButtonPressedColor)
+- : (control.checked ? "transparent" : Default.tabButtonColor)
++ ? (control.checked ? Basic.tabButtonCheckedPressedColor : Basic.tabButtonPressedColor)
++ : (control.checked ? "transparent" : Basic.tabButtonColor)
+ }
+ }
diff --git a/recipes-demo/messaging/messaging_git.bb b/recipes-demo/messaging/messaging_git.bb
index 972e9b828..e3597b259 100644
--- a/recipes-demo/messaging/messaging_git.bb
+++ b/recipes-demo/messaging/messaging_git.bb
@@ -6,16 +6,18 @@ SECTION = "apps"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984"
-DEPENDS = "qtquickcontrols2 libqtappfw"
+DEPENDS = "qtdeclarative libqtappfw"
PV = "1.0+git${SRCPV}"
-SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/messaging;protocol=https;branch=${AGL_BRANCH}"
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/messaging;protocol=https;branch=${AGL_BRANCH} \
+ file://0001-Migrate-to-Qt-6.patch \
+ "
SRCREV = "e58b0382de8e665d64b8e3486022a6bcb0572823"
S = "${WORKDIR}/git"
-inherit qmake5 pkgconfig agl-app
+inherit qt6-qmake pkgconfig agl-app
AGL_APP_NAME = "Messaging"