1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
|
From 8c60817ccf80502c03d3852afac006e25903d4b9 Mon Sep 17 00:00:00 2001
From: Indivara Weerasuriya <1806262-indivara@users.noreply.git.qt.io>
Date: Wed, 24 Jul 2024 09:08:36 +0900
Subject: [PATCH] Migrate to Qt 6
---
homescreen/meson.build | 16 ++++++++--------
homescreen/qml/IconItem.qml | 4 ++--
homescreen/qml/MediaAreaBlank.qml | 4 ++--
homescreen/qml/MediaAreaMusic.qml | 14 +++++++-------
homescreen/qml/MediaAreaRadio.qml | 2 +-
homescreen/qml/ShortcutIcon.qml | 6 +++---
homescreen/qml/SpeechChrome.qml | 6 +++---
homescreen/qml/StatusArea.qml | 6 +++---
homescreen/qml/TopArea.qml | 2 +-
homescreen/qml/background.qml | 2 +-
homescreen/qml/background_with_panels.qml | 4 ++--
meson.build | 2 +-
12 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/homescreen/meson.build b/homescreen/meson.build
index 4b98cd1..42645a1 100644
--- a/homescreen/meson.build
+++ b/homescreen/meson.build
@@ -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',
diff --git a/homescreen/qml/IconItem.qml b/homescreen/qml/IconItem.qml
index ace0628..034a51d 100644
--- a/homescreen/qml/IconItem.qml
+++ b/homescreen/qml/IconItem.qml
@@ -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()
diff --git a/homescreen/qml/MediaAreaBlank.qml b/homescreen/qml/MediaAreaBlank.qml
index b758a7d..3c7ff51 100644
--- a/homescreen/qml/MediaAreaBlank.qml
+++ b/homescreen/qml/MediaAreaBlank.qml
@@ -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 {
diff --git a/homescreen/qml/MediaAreaMusic.qml b/homescreen/qml/MediaAreaMusic.qml
index 6d72003..ffb9796 100644
--- a/homescreen/qml/MediaAreaMusic.qml
+++ b/homescreen/qml/MediaAreaMusic.qml
@@ -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
diff --git a/homescreen/qml/MediaAreaRadio.qml b/homescreen/qml/MediaAreaRadio.qml
index 73ab073..ed73000 100644
--- a/homescreen/qml/MediaAreaRadio.qml
+++ b/homescreen/qml/MediaAreaRadio.qml
@@ -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'
}
diff --git a/homescreen/qml/ShortcutIcon.qml b/homescreen/qml/ShortcutIcon.qml
index d039d36..f67a992 100644
--- a/homescreen/qml/ShortcutIcon.qml
+++ b/homescreen/qml/ShortcutIcon.qml
@@ -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
}
diff --git a/homescreen/qml/SpeechChrome.qml b/homescreen/qml/SpeechChrome.qml
index 123928c..e666f44 100644
--- a/homescreen/qml/SpeechChrome.qml
+++ b/homescreen/qml/SpeechChrome.qml
@@ -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
diff --git a/homescreen/qml/StatusArea.qml b/homescreen/qml/StatusArea.qml
index 4a8fbc0..03c60ee 100644
--- a/homescreen/qml/StatusArea.qml
+++ b/homescreen/qml/StatusArea.qml
@@ -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
diff --git a/homescreen/qml/TopArea.qml b/homescreen/qml/TopArea.qml
index 3b0b25a..3b5289c 100644
--- a/homescreen/qml/TopArea.qml
+++ b/homescreen/qml/TopArea.qml
@@ -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
diff --git a/homescreen/qml/background.qml b/homescreen/qml/background.qml
index c2bb309..a2ba39c 100644
--- a/homescreen/qml/background.qml
+++ b/homescreen/qml/background.qml
@@ -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'
}
}
diff --git a/homescreen/qml/background_with_panels.qml b/homescreen/qml/background_with_panels.qml
index f0cb958..c7cca7c 100644
--- a/homescreen/qml/background_with_panels.qml
+++ b/homescreen/qml/background_with_panels.qml
@@ -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'
}
}
diff --git a/meson.build b/meson.build
index 3d77b36..9ce3607 100644
--- a/meson.build
+++ b/meson.build
@@ -29,5 +29,5 @@ project (
],
)
-qt5 = import('qt5')
+qt = import('qt6')
subdir('homescreen')
|