Import Qt6 conversion patch 15/30515/1 master 19.90.0 trout/19.90.0 trout_19.90.0
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 19 Nov 2024 11:35:30 +0000 (12:35 +0100)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 19 Nov 2024 11:35:30 +0000 (12:35 +0100)
Import the patches for the demo applications into the app repos.

Bug-AGL: SPEC-5294

Change-Id: I2cc7de0547d40b40265adb06f5f7d877e0b500a9
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
12 files changed:
homescreen/meson.build
homescreen/qml/IconItem.qml
homescreen/qml/MediaAreaBlank.qml
homescreen/qml/MediaAreaMusic.qml
homescreen/qml/MediaAreaRadio.qml
homescreen/qml/ShortcutIcon.qml
homescreen/qml/SpeechChrome.qml
homescreen/qml/StatusArea.qml
homescreen/qml/TopArea.qml
homescreen/qml/background.qml
homescreen/qml/background_with_panels.qml
meson.build

index 4b98cd1..42645a1 100644 (file)
@@ -1,5 +1,5 @@
 cpp = meson.get_compiler('cpp')
-qt5_dep = dependency('qt5', modules: ['Qml', 'Quick', 'Gui'])
+qt_dep = dependency('qt6', modules: ['Core', 'Qml', 'Quick', 'Gui'])
 dep_wayland_client = dependency('wayland-client', version: '>= 1.20.0')
 dep_qtappfw = [
     dependency('qtappfw-weather'),
@@ -14,11 +14,11 @@ protoc = find_program('protoc')
 grpc_cpp = find_program('grpc_cpp_plugin')
 
 qt_defines = []
-qpa_header_path = join_paths(qt5_dep.version(), 'QtGui')
+qpa_header_path = join_paths(qt_dep.version(), 'QtGui')
 qpa_header = join_paths(qpa_header_path, 'qpa/qplatformnativeinterface.h')
 # we pass this QT_QPA_HEADER straight in the code as there's no easy
 # way to pass the correct header
-if cpp.has_header(qpa_header, dependencies : qt5_dep)
+if cpp.has_header(qpa_header, dependencies : qt_dep)
   qt_defines += [ '-DQT_QPA_HEADER=<@0@>'.format(qpa_header) ]
   message('Found QtGui QPA header in ' + qpa_header_path)
 endif
@@ -41,7 +41,7 @@ grpc_gen = generator(protoc, \
                      output : ['@BASENAME@.grpc.pb.cc', '@BASENAME@.grpc.pb.h'],
                      arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/proto',
                        '--grpc_out=@BUILD_DIR@',
-                       '--plugin=protoc-gen-grpc=' + grpc_cpp.path(),
+                       '--plugin=protoc-gen-grpc=' + grpc_cpp.full_path(),
                        '@INPUT@'])
 generated_grpc_sources = grpc_gen.process('proto/agl_shell.proto')
 
@@ -54,7 +54,7 @@ grpc_deps = [
 
 
 homescreen_dep = [
-    qt5_dep,
+    qt_dep,
     dep_wayland_client,
     dep_qtappfw,
     grpc_deps
@@ -70,7 +70,7 @@ homescreen_resources = [
   'qml/qml.qrc'
 ]
 
-resource_files = qt5.compile_resources(sources: homescreen_resources)
+resource_files = qt.compile_resources(sources: homescreen_resources)
 
 protocols = [
         [ 'agl-shell', 'agl-compositor' ],
@@ -116,8 +116,8 @@ homescreen_src_headers = [
   'src/AglShellGrpcClient.h',
 ]
 
-moc_files = qt5.compile_moc(headers: homescreen_src_headers,
-                            dependencies: qt5_dep)
+moc_files = qt.compile_moc(headers: homescreen_src_headers,
+                            dependencies: qt_dep)
 
 homescreen_src = [
   'src/statusbarserver.cpp',
index ace0628..034a51d 100644 (file)
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import QtQuick.Controls 2.0
-import QtGraphicalEffects 1.0
+import Qt5Compat.GraphicalEffects
 
 Item {
     id: main
@@ -23,7 +23,7 @@ Item {
             anchors.horizontalCenter: parent.horizontalCenter
             width: 220
             height: width
-            source: './images/%1_%2.svg'.arg(model.icon).arg(loc.pressed && (loc.index === model.index || loc.currentId === model.id) ? 'active' : 'inactive')
+            source: 'qrc:/images/%1_%2.svg'.arg(model.icon).arg(loc.pressed && (loc.index === model.index || loc.currentId === model.id) ? 'active' : 'inactive')
             antialiasing: item.state !== ''
 
             property string initial: model.name.substring(0,1).toUpperCase()
index b758a7d..3c7ff51 100644 (file)
@@ -23,7 +23,7 @@ import MasterVolume 1.0
 
 Image {
     anchors.fill: parent
-    source: './images/Utility_Logo_Background-01.svg'
+    source: 'qrc:/images/Utility_Logo_Background-01.svg'
     property bool displayVolume: false;
 
     MouseArea {
@@ -41,7 +41,7 @@ Image {
     Image {
         id: logo_image
         anchors.centerIn: parent
-        source: './images/Utility_Logo_Grey-01.svg'
+        source: 'qrc:/images/Utility_Logo_Grey-01.svg'
     }
 
     Timer {
index 6d72003..ffb9796 100644 (file)
@@ -22,7 +22,7 @@ import QtQuick.Controls 2.0
 Image {
     width: 1080
     height: 216
-    source: './images/Utility_Music_Background-01.png'
+    source: 'qrc:/images/Utility_Music_Background-01.png'
 
     ColumnLayout {
         anchors.fill: parent
@@ -33,7 +33,7 @@ Image {
             Layout.preferredHeight: 107
             spacing: 10
             Image {
-                source: './images/MediaMusic/AlbumArtwork.png'
+                source: 'qrc:/images/MediaMusic/AlbumArtwork.png'
                 width: 105.298
                 height: 110.179
                 fillMode: Image.PreserveAspectFit
@@ -51,13 +51,13 @@ Image {
             Layout.fillHeight: true
             Layout.preferredHeight: 107
             Image {
-                source: './images/MediaPlayer/AGL_MediaPlayer_BackArrow.png'
+                source: 'qrc:/images/MediaPlayer/AGL_MediaPlayer_BackArrow.png'
             }
             Image {
-                source: './images/MediaPlayer/AGL_MediaPlayer_Player_Pause.png'
+                source: 'qrc:/images/MediaPlayer/AGL_MediaPlayer_Player_Pause.png'
             }
             Image {
-                source: './images/MediaPlayer/AGL_MediaPlayer_ForwardArrow.png'
+                source: 'qrc:/images/MediaPlayer/AGL_MediaPlayer_ForwardArrow.png'
             }
 
             ProgressBar {
@@ -71,10 +71,10 @@ Image {
                 font.pixelSize: 20
             }
             Image {
-                source: './images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png'
+                source: 'qrc:/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png'
             }
             Image {
-                source: './images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png'
+                source: 'qrc:/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png'
             }
             ProgressBar {
                 Layout.fillWidth: true
index 73ab073..ed73000 100644 (file)
@@ -20,5 +20,5 @@ import QtQuick 2.2
 Image {
     width: 1080
     height: 216
-    source: './images/Utility_Radio_Background-01.png'
+    source: 'qrc:/images/Utility_Radio_Background-01.png'
 }
index d039d36..f67a992 100644 (file)
@@ -17,7 +17,7 @@
 
 import QtQuick 2.2
 import QtQuick.Controls 2.0
-import QtGraphicalEffects 1.0
+import Qt5Compat.GraphicalEffects
 
 MouseArea {
     id: root
@@ -30,13 +30,13 @@ MouseArea {
         Image {
             id: inactiveIcon
             anchors.fill: parent
-            source: './images/Shortcut/%1.svg'.arg(root.name.toLowerCase())
+            source: 'qrc:/images/Shortcut/%1.svg'.arg(root.name.toLowerCase())
             fillMode: Image.PreserveAspectFit
         }
         Image {
             id: activeIcon
             anchors.fill: parent
-            source: './images/Shortcut/%1_active.svg'.arg(root.name.toLowerCase())
+            source: 'qrc:/images/Shortcut/%1_active.svg'.arg(root.name.toLowerCase())
             fillMode: Image.PreserveAspectFit
             opacity: 0.0
         }
index 123928c..e666f44 100644 (file)
@@ -15,7 +15,7 @@ Item {
         id: chromeBarImage
 
         anchors.top: parent.top
-        source: "./images/SpeechChrome/bar.png"
+        source: "qrc:/images/SpeechChrome/bar.png"
 
         Behavior on x {
             NumberAnimation { duration: 250 }
@@ -34,7 +34,7 @@ Item {
         anchors.left: parent.left
         anchors.leftMargin: parent.width / 128
         anchors.verticalCenter: parent.verticalCenter
-        source: agentName === "Alexa" ? "./images/SpeechChrome/push_to_talk_alexa.png" : "./images/SpeechChrome/push_to_talk.svg"
+        source: agentName === "Alexa" ? "qrc:/images/SpeechChrome/push_to_talk_alexa.png" : "qrc:/images/SpeechChrome/push_to_talk.svg"
 
         MouseArea {
             anchors.fill: parent
@@ -55,7 +55,7 @@ Item {
         anchors.right: parent.right
         anchors.rightMargin: parent.width / 128
         anchors.verticalCenter: parent.verticalCenter
-        source: agentName === "Alexa" ? "./images/SpeechChrome/push_to_talk_alexa.png" : "./images/SpeechChrome/push_to_talk.svg"
+        source: agentName === "Alexa" ? "qrc:/images/SpeechChrome/push_to_talk_alexa.png" : "qrc:/images/SpeechChrome/push_to_talk.svg"
 
         MouseArea {
             anchors.fill: parent
index 4a8fbc0..03c60ee 100644 (file)
@@ -47,7 +47,7 @@ Item {
                 icon = "WeatherIcons_Rain-01.png"
             }
 
-            condition_item.source = icon ? './images/Weather/' + icon : ''
+            condition_item.source = icon ? 'qrc:/images/Weather/' + icon : ''
         }
 
         onTemperatureChanged: {
@@ -99,7 +99,7 @@ Item {
                     Layout.preferredHeight: 20
                     Image {
                         id: condition_item
-                        source: './images/Weather/WeatherIcons_Rain-01.png'
+                        source: 'qrc:/images/Weather/WeatherIcons_Rain-01.png'
                     }
                     Text {
                         id: temperature_item
@@ -122,7 +122,7 @@ Item {
                 id: bt_icon
                 Layout.preferredWidth: 77
                 Layout.preferredHeight: 73
-                source: connStatus ? './images/Status/HMI_Status_Bluetooth_On-01.png' : './images/Status/HMI_Status_Bluetooth_Inactive-01.png'
+                source: connStatus ? 'qrc:/images/Status/HMI_Status_Bluetooth_On-01.png' : 'qrc:/images/Status/HMI_Status_Bluetooth_Inactive-01.png'
                 fillMode: Image.PreserveAspectFit
                 property string deviceName: "none"
                 property bool connStatus: false
index 3b0b25a..3b5289c 100644 (file)
@@ -21,7 +21,7 @@ import QtQuick.Controls 2.0
 
 Image {
     anchors.fill: parent
-    source: './images/TopSection_NoText_NoIcons-01.svg'
+    source: 'qrc:/images/TopSection_NoText_NoIcons-01.svg'
     //fillMode: Image.PreserveAspectCrop
     fillMode: Image.Stretch
 
index c2bb309..a2ba39c 100644 (file)
@@ -10,6 +10,6 @@ Window {
 
     Image {
         anchors.fill: parent
-        source: './images/AGL_HMI_Blue_Background_NoCar-01.png'
+        source: 'qrc:/images/AGL_HMI_Blue_Background_NoCar-01.png'
     }
 }
index f0cb958..c7cca7c 100644 (file)
@@ -75,7 +75,7 @@ Window {
 
          Image {
              anchors.fill: parent
-             source: './images/TopSection_NoText_NoIcons-01.svg'
+             source: 'qrc:/images/TopSection_NoText_NoIcons-01.svg'
              //fillMode: Image.PreserveAspectCrop
              fillMode: Image.Stretch
 
@@ -104,7 +104,7 @@ Window {
              height: Screen.height - (2 * 216)
          Image {
              anchors.fill: parent
-             source: './images/AGL_HMI_Blue_Background_NoCar-01.png'
+             source: 'qrc:/images/AGL_HMI_Blue_Background_NoCar-01.png'
          }
 
         }
index 3d77b36..9ce3607 100644 (file)
@@ -29,5 +29,5 @@ project (
     ],
 )
 
-qt5 = import('qt5')
+qt = import('qt6')
 subdir('homescreen')