diff options
author | Indivara Weerasuriya <indivara.weerasuriya@qt.io> | 2024-07-30 19:47:24 +0900 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2024-11-20 13:35:26 +0000 |
commit | 59ae0b13d2bb14fbf12117f2f55bfcb6f06f104b (patch) | |
tree | ba38354db9033675bde1ad07700d796160450f8f /recipes-demo/libqtappfw | |
parent | a37e8ed0c8f997e13d719c7e5d956b5febc9cfa5 (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/libqtappfw')
-rw-r--r-- | recipes-demo/libqtappfw/libqtappfw/0001-Migrate-to-Qt-6.patch | 540 | ||||
-rw-r--r-- | recipes-demo/libqtappfw/libqtappfw_git.bb | 6 |
2 files changed, 544 insertions, 2 deletions
diff --git a/recipes-demo/libqtappfw/libqtappfw/0001-Migrate-to-Qt-6.patch b/recipes-demo/libqtappfw/libqtappfw/0001-Migrate-to-Qt-6.patch new file mode 100644 index 000000000..7c1d8d18b --- /dev/null +++ b/recipes-demo/libqtappfw/libqtappfw/0001-Migrate-to-Qt-6.patch @@ -0,0 +1,540 @@ +From c159e46ea970294173504f9f140e6ae81039a810 Mon Sep 17 00:00:00 2001 +From: Indivara Weerasuriya <1806262-indivara@users.noreply.git.qt.io> +Date: Wed, 24 Jul 2024 09:22:40 +0900 +Subject: [PATCH] Migrate to Qt 6 + +--- + applauncher/meson.build | 12 ++++++------ + bluetooth/bluetoothmodel.cpp | 2 +- + bluetooth/meson.build | 10 +++++----- + hvac/meson.build | 10 +++++----- + map/meson.build | 10 +++++----- + mediaplayer/meson.build | 10 +++++----- + meson.build | 4 ++-- + navigation/meson.build | 10 +++++----- + network/meson.build | 10 +++++----- + pbap/meson.build | 10 +++++----- + pbap/pbap.cpp | 2 +- + pbap/pbap.h | 6 +++--- + radio/meson.build | 12 ++++++------ + telephony/meson.build | 10 +++++----- + vehicle-signals/QtKuksaClient.cpp | 2 +- + vehicle-signals/meson.build | 14 +++++++------- + vehicle-signals/vehiclesignals.cpp | 2 +- + weather/meson.build | 10 +++++----- + 18 files changed, 73 insertions(+), 73 deletions(-) + +diff --git a/applauncher/meson.build b/applauncher/meson.build +index b36184a..ba31495 100644 +--- a/applauncher/meson.build ++++ b/applauncher/meson.build +@@ -1,9 +1,9 @@ + cpp = meson.get_compiler('cpp') + grpcpp_reflection_dep = cpp.find_library('grpc++_reflection') + +-qt5_dep = dependency('qt5', modules: ['Qml']) ++qt_dep = dependency('qt6', modules: ['Qml']) + applauncher_dep = [ +- qt5_dep, ++ qt_dep, + dependency('protobuf'), + dependency('grpc'), + dependency('grpc++'), +@@ -24,12 +24,12 @@ grpc_gen = generator(protoc, \ + output : ['@BASENAME@.grpc.pb.cc', '@BASENAME@.grpc.pb.h'], + arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/protos', + '--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('protos/applauncher.proto') + +-moc_files = qt5.compile_moc(headers : ['AppLauncherClient.h', 'AppLauncherGrpcClient.h'], +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers : ['AppLauncherClient.h', 'AppLauncherGrpcClient.h'], ++ dependencies: qt_dep) + + src = [ + 'AppLauncherClient.cpp', +@@ -52,5 +52,5 @@ pkg_mod.generate(libraries : lib, + version : '1.0', + name : 'libqtappfw-applauncher', + filebase : 'qtappfw-applauncher', +- requires: 'Qt5Qml', ++ requires: 'Qt6Qml', + description : 'Library wrapping AGL AppLauncher API in Qt objects') +diff --git a/bluetooth/bluetoothmodel.cpp b/bluetooth/bluetoothmodel.cpp +index 605f950..dafdd54 100644 +--- a/bluetooth/bluetoothmodel.cpp ++++ b/bluetooth/bluetoothmodel.cpp +@@ -248,5 +248,5 @@ bool BluetoothModelFilter::filterAcceptsRow(int sourceRow, const QModelIndex &so + QModelIndex index = model->index(sourceRow); + bool paired = model->data(index, BluetoothModel::BluetoothRoles::PairedRole).toBool(); + +- return ((paired ? "true" : "false") == filterRegExp().pattern()); ++ return ((paired ? "true" : "false") == filterRegularExpression().pattern()); + } +diff --git a/bluetooth/meson.build b/bluetooth/meson.build +index 008fda1..c8f7e0f 100644 +--- a/bluetooth/meson.build ++++ b/bluetooth/meson.build +@@ -1,17 +1,17 @@ +-qt5_dep = dependency('qt5', modules: ['Core', 'Qml']) ++qt_dep = dependency('qt6', modules: ['Core', 'Qml']) + + glib_dep = [dependency('glib-2.0'), dependency('gio-2.0'), dependency('gobject-2.0'), dependency('gio-unix-2.0')] + bluez_glib_dep = dependency('bluez-glib') + +-moc_files = qt5.compile_moc(headers : ['bluetooth.h', 'bluetoothmodel.h'], +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers : ['bluetooth.h', 'bluetoothmodel.h'], ++ dependencies: qt_dep) + + src = ['bluetooth.cpp', 'bluetoothmodel.cpp', 'bluetootheventhandler.cpp', moc_files] + lib = shared_library('qtappfw-bt', + sources: src, + version: '1.0.0', + soversion: '0', +- dependencies: [qt5_dep, glib_dep, bluez_glib_dep], ++ dependencies: [qt_dep, glib_dep, bluez_glib_dep], + install: true) + + install_headers('bluetooth.h') +@@ -21,7 +21,7 @@ pkg_mod.generate(libraries : lib, + version : '1.0', + name : 'libqtappfw-bt', + filebase : 'qtappfw-bt', +- requires: 'Qt5Qml', ++ requires: 'Qt6Qml', + description : 'AGL Qt demo app framework helper library for using BlueZ.') + + qtappfw_bt_dep = declare_dependency(link_with: lib, +diff --git a/hvac/meson.build b/hvac/meson.build +index ce3679c..ad41612 100644 +--- a/hvac/meson.build ++++ b/hvac/meson.build +@@ -1,14 +1,14 @@ +-qt5_dep = dependency('qt5', modules: ['Qml']) ++qt_dep = dependency('qt6', modules: ['Qml']) + +-moc_files = qt5.compile_moc(headers: 'hvac.h', +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers: 'hvac.h', ++ dependencies: qt_dep) + + src = ['hvac.cpp', moc_files] + lib = shared_library('qtappfw-hvac', + sources: src, + version: '1.0.0', + soversion: '0', +- dependencies: [qt5_dep, qtappfw_vs_dep], ++ dependencies: [qt_dep, qtappfw_vs_dep], + install: true) + + install_headers('hvac.h') +@@ -18,5 +18,5 @@ pkg_mod.generate(libraries : lib, + version : '1.0', + name : 'libqtappfw-hvac', + filebase : 'qtappfw-hvac', +- requires: 'Qt5Qml', ++ requires: 'Qt6Qml', + description : 'AGL Qt demo app framework helper library for using HVAC.') +diff --git a/map/meson.build b/map/meson.build +index 1f563e6..e68cd0e 100644 +--- a/map/meson.build ++++ b/map/meson.build +@@ -1,14 +1,14 @@ +-qt5_dep = dependency('qt5', modules: ['Qml']) ++qt_dep = dependency('qt6', modules: ['Qml']) + +-moc_files = qt5.compile_moc(headers : 'map.h', +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers : 'map.h', ++ dependencies: qt_dep) + + src = ['map.cpp', moc_files] + lib = shared_library('qtappfw-bt-map', + sources: src, + version: '1.0.0', + soversion: '0', +- dependencies: [qt5_dep, qtappfw_bt_dep], ++ dependencies: [qt_dep, qtappfw_bt_dep], + install: true) + + install_headers('map.h') +@@ -18,5 +18,5 @@ pkg_mod.generate(libraries : lib, + version : '1.0', + name : 'libqtappfw-bt-map', + filebase : 'qtappfw-bt-map', +- requires: 'Qt5Qml', ++ requires: 'Qt6Qml', + description : 'Library wrapping AGL Bluetooth MAP profile API in Qt objects') +diff --git a/mediaplayer/meson.build b/mediaplayer/meson.build +index ff2db0a..b6a716e 100644 +--- a/mediaplayer/meson.build ++++ b/mediaplayer/meson.build +@@ -1,4 +1,4 @@ +-qt5_dep = dependency('qt5', modules: ['Qml']) ++qt_dep = dependency('qt6', modules: ['Qml']) + + mpdclient_dep = dependency('libmpdclient') + +@@ -8,8 +8,8 @@ mediaplayer_headers = [ 'MediaplayerBackend.h', + 'MpdEventHandler.h', + 'mediaplayer.h' + ] +-moc_files = qt5.compile_moc(headers: mediaplayer_headers, +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers: mediaplayer_headers, ++ dependencies: qt_dep) + + src = [ 'MediaplayerBackend.cpp', + 'MediaplayerBluezBackend.cpp', +@@ -22,7 +22,7 @@ lib = shared_library('qtappfw-mediaplayer', + sources: src, + version: '1.0.0', + soversion: '0', +- dependencies: [qt5_dep, mpdclient_dep, qtappfw_bt_dep, qtappfw_vs_dep], ++ dependencies: [qt_dep, mpdclient_dep, qtappfw_bt_dep, qtappfw_vs_dep], + install: true) + + install_headers('mediaplayer.h') +@@ -32,5 +32,5 @@ pkg_mod.generate(libraries: lib, + version: '1.0', + name: 'libqtappfw-mediaplayer', + filebase: 'qtappfw-mediaplayer', +- requires: 'Qt5Qml', ++ requires: 'Qt6Qml', + description: 'Library wrapping AGL mediaplayer API in Qt objects') +diff --git a/meson.build b/meson.build +index 263d3d5..0264a76 100644 +--- a/meson.build ++++ b/meson.build +@@ -19,7 +19,7 @@ project ( + ['cpp'], + version : '2.0.1', + license : 'Apache-2.0', +- meson_version : '>= 0.49.0', ++ meson_version : '>= 0.59.0', + default_options : + [ + 'warning_level=1', +@@ -29,7 +29,7 @@ project ( + ], + ) + +-qt5 = import('qt5') ++qt = import('qt6') + + #subdir('docs') + +diff --git a/navigation/meson.build b/navigation/meson.build +index 9b8e3ea..5e59f3d 100644 +--- a/navigation/meson.build ++++ b/navigation/meson.build +@@ -1,14 +1,14 @@ +-qt5_dep = dependency('qt5', modules: ['Qml']) ++qt_dep = dependency('qt6', modules: ['Qml']) + +-moc_files = qt5.compile_moc(headers: 'navigation.h', +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers: 'navigation.h', ++ dependencies: qt_dep) + + src = ['navigation.cpp', moc_files] + lib = shared_library('qtappfw-navigation', + sources: src, + version: '1.0.0', + soversion: '0', +- dependencies: [qt5_dep, qtappfw_vs_dep], ++ dependencies: [qt_dep, qtappfw_vs_dep], + install: true) + + install_headers('navigation.h') +@@ -18,5 +18,5 @@ pkg_mod.generate(libraries : lib, + version : '1.0', + name : 'libqtappfw-navigation', + filebase : 'qtappfw-navigation', +- requires: 'Qt5Qml', ++ requires: 'Qt6Qml', + description : 'Library wrapping AGL navigation API in Qt objects') +diff --git a/network/meson.build b/network/meson.build +index d60369d..0726264 100644 +--- a/network/meson.build ++++ b/network/meson.build +@@ -1,4 +1,4 @@ +-qt5_dep = dependency('qt5', modules: ['Qml']) ++qt_dep = dependency('qt6', modules: ['Qml']) + + glib_dep = [dependency('glib-2.0'), dependency('gio-2.0'), dependency('gobject-2.0'), dependency('gio-unix-2.0')] + connman_glib_dep = dependency('connman-glib') +@@ -12,8 +12,8 @@ network_headers = [ 'abstractnetworkmodel.h', + 'wiredadapter.h', + 'wirednetworkmodel.h' + ] +-moc_files = qt5.compile_moc(headers: network_headers, +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers: network_headers, ++ dependencies: qt_dep) + + src = [ 'network.cpp', + 'networkeventhandler.cpp', +@@ -29,7 +29,7 @@ lib = shared_library('qtappfw-network', + sources: src, + version: '1.0.0', + soversion: '0', +- dependencies: [qt5_dep, glib_dep, connman_glib_dep], ++ dependencies: [qt_dep, glib_dep, connman_glib_dep], + install: true) + + install_headers(['network.h', 'networkadapter.h', 'wifiadapter.h', 'wiredadapter.h']) +@@ -39,5 +39,5 @@ pkg_mod.generate(libraries : lib, + version : '1.0', + name : 'libqtappfw-network', + filebase : 'qtappfw-network', +- requires: 'Qt5Qml', ++ requires: 'Qt6Qml', + description : 'Library wrapping AGL network API in Qt objects') +diff --git a/pbap/meson.build b/pbap/meson.build +index 7e2d1fb..fc980a8 100644 +--- a/pbap/meson.build ++++ b/pbap/meson.build +@@ -1,14 +1,14 @@ +-qt5_dep = dependency('qt5', modules: ['Qml']) ++qt_dep = dependency('qt6', modules: ['Qml']) + +-moc_files = qt5.compile_moc(headers : 'pbap.h', +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers : 'pbap.h', ++ dependencies: qt_dep) + + src = ['pbap.cpp', moc_files] + lib = shared_library('qtappfw-bt-pbap', + sources: src, + version: '1.0.0', + soversion: '0', +- dependencies: qt5_dep, ++ dependencies: qt_dep, + install: true) + + install_headers('pbap.h') +@@ -18,5 +18,5 @@ pkg_mod.generate(libraries : lib, + version : '1.0', + name : 'libqtappfw-bt-pbap', + filebase : 'qtappfw-bt-pbap', +- requires: 'Qt5Qml', ++ requires: '', + description : 'Library wrapping AGL Bluetooth PBAP profile API in Qt objects') +diff --git a/pbap/pbap.cpp b/pbap/pbap.cpp +index 7473c54..d98fbea 100644 +--- a/pbap/pbap.cpp ++++ b/pbap/pbap.cpp +@@ -241,7 +241,7 @@ void Pbap::updateCalls(QJsonArray vcards) + name = number; + } + +- QStringList typelist = entry.value("type").toString().split(QRegExp("=")); ++ QStringList typelist = entry.value("type").toString().split(QRegularExpression("=")); + type = typelist.takeLast(); + + datetime = entry.value("timestamp").toString(); +diff --git a/pbap/pbap.h b/pbap/pbap.h +index 25fa450..447eeac 100644 +--- a/pbap/pbap.h ++++ b/pbap/pbap.h +@@ -62,7 +62,7 @@ class Contact : public QObject + + Q_PROPERTY(QString name READ name NOTIFY nameChanged) + Q_PROPERTY(QString photo READ photo NOTIFY photoChanged) +- Q_PROPERTY(QQmlListProperty<PhoneNumber>numbers READ numbersList NOTIFY numbersListChanged) ++ Q_PROPERTY(QQmlListProperty<PhoneNumber> numbers READ numbersList NOTIFY numbersListChanged) + + public: + explicit Contact(QString name, QString photo, QList<PhoneNumber *>numbers); +@@ -75,11 +75,11 @@ class Contact : public QObject + QQmlListProperty<PhoneNumber>numbersList() { + return QQmlListProperty<PhoneNumber>(this, 0, &Contact::countNumbers, &Contact::atNumbers); + } +- static int countNumbers(QQmlListProperty<PhoneNumber> *property) { ++ static qsizetype countNumbers(QQmlListProperty<PhoneNumber> *property) { + Contact *contact = qobject_cast<Contact *>(property->object); + return contact->m_numbers.size(); + } +- static PhoneNumber *atNumbers(QQmlListProperty<PhoneNumber> *property, int index) { ++ static PhoneNumber *atNumbers(QQmlListProperty<PhoneNumber> *property, qsizetype index) { + Contact *contact = qobject_cast<Contact *>(property->object); + return contact->m_numbers[index]; + } +diff --git a/radio/meson.build b/radio/meson.build +index 7ae1bac..f4ed0dc 100644 +--- a/radio/meson.build ++++ b/radio/meson.build +@@ -1,9 +1,9 @@ + cpp = meson.get_compiler('cpp') + grpcpp_reflection_dep = cpp.find_library('grpc++_reflection') + +-qt5_dep = dependency('qt5', modules: ['Qml']) ++qt_dep = dependency('qt6', modules: ['Qml']) + radio_dep = [ +- qt5_dep, ++ qt_dep, + dependency('protobuf'), + dependency('grpc'), + dependency('grpc++'), +@@ -24,12 +24,12 @@ grpc_gen = generator(protoc, \ + output : ['@BASENAME@.grpc.pb.cc', '@BASENAME@.grpc.pb.h'], + arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/protos', + '--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('protos/radio.proto') + +-moc_files = qt5.compile_moc(headers: ['RadioClient.h', 'RadioGrpcClient.h'], +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers: ['RadioClient.h', 'RadioGrpcClient.h'], ++ dependencies: qt_dep) + + src = [ + 'RadioClient.cpp', +@@ -53,5 +53,5 @@ pkg_mod.generate(libraries : lib, + version : '1.0', + name : 'libqtappfw-radio', + filebase : 'qtappfw-radio', +- requires: 'Qt5Qml', ++ requires: 'Qt6Qml', + description : 'Library wrapping AGL radio API in Qt objects') +diff --git a/telephony/meson.build b/telephony/meson.build +index 934d70c..f32777f 100644 +--- a/telephony/meson.build ++++ b/telephony/meson.build +@@ -1,14 +1,14 @@ +-qt5_dep = dependency('qt5', modules: ['Qml']) ++qt_dep = dependency('qt6', modules: ['Qml']) + +-moc_files = qt5.compile_moc(headers: 'telephony.h', +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers: 'telephony.h', ++ dependencies: qt_dep) + + src = ['telephony.cpp', moc_files] + lib = shared_library('qtappfw-phone', + sources: src, + version: '1.0.0', + soversion: '0', +- dependencies: qt5_dep, ++ dependencies: qt_dep, + install: true) + + install_headers('telephony.h') +@@ -18,5 +18,5 @@ pkg_mod.generate(libraries : lib, + version : '1.0', + name : 'libqtappfw-phone', + filebase : 'qtappfw-phone', +- requires: 'Qt5Qml', ++ requires: 'Qt6Qml', + description : 'Library wrapping AGL telephony API in Qt objects') +diff --git a/vehicle-signals/QtKuksaClient.cpp b/vehicle-signals/QtKuksaClient.cpp +index 901459d..e258670 100644 +--- a/vehicle-signals/QtKuksaClient.cpp ++++ b/vehicle-signals/QtKuksaClient.cpp +@@ -84,7 +84,7 @@ QtKuksaClient::QtKuksaClient(const std::shared_ptr< ::grpc::ChannelInterface>& c + void QtKuksaClient::connect() + { + // Check for connection in another thread +- QFuture<void> future = QtConcurrent::run(this, &QtKuksaClient::waitForConnected); ++ QFuture<void> future = QtConcurrent::run(&QtKuksaClient::waitForConnected, this); + } + + void QtKuksaClient::get(const QString &path, const bool actuator) +diff --git a/vehicle-signals/meson.build b/vehicle-signals/meson.build +index 50383e4..4dd766c 100644 +--- a/vehicle-signals/meson.build ++++ b/vehicle-signals/meson.build +@@ -1,10 +1,10 @@ + cpp = meson.get_compiler('cpp') + grpcpp_reflection_dep = cpp.find_library('grpc++_reflection') + +-qt5_dep = dependency('qt5', modules: ['Core', 'Concurrent']) ++qt_dep = dependency('qt6', modules: ['Core', 'Concurrent']) + + vs_dep = [ +- qt5_dep, ++ qt_dep, + dependency('protobuf'), + dependency('grpc'), + dependency('grpc++'), +@@ -30,14 +30,14 @@ grpc_gen = generator(protoc, \ + output : ['@BASENAME@.grpc.pb.cc', '@BASENAME@.grpc.pb.h'], + arguments : ['-I=' + protos_base_dir, + '--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(protos_dir / 'val.proto', preserve_path_from : protos_base_dir), + ] + +-moc_files = qt5.compile_moc(headers: [ 'vehiclesignals.h', 'QtKuksaClient.h' ], +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers: [ 'vehiclesignals.h', 'QtKuksaClient.h' ], ++ dependencies: qt_dep) + + src = [ + 'vehiclesignals.cpp', +@@ -62,10 +62,10 @@ pkg_mod.generate(libraries: lib, + version: '1.0', + name: 'libqtappfw-vehicle-signals', + filebase: 'qtappfw-vehicle-signals', +- requires: ['Qt5Core'], ++ requires: ['Qt6Core'], + description: 'Library wrapping VSS API in Qt objects') + +-qtappfw_vs_dep = declare_dependency(dependencies: qt5_dep, ++qtappfw_vs_dep = declare_dependency(dependencies: qt_dep, + link_with: lib, + include_directories: '.', + sources: ['vehiclesignals.h']) +diff --git a/vehicle-signals/vehiclesignals.cpp b/vehicle-signals/vehiclesignals.cpp +index adf371a..f550955 100644 +--- a/vehicle-signals/vehiclesignals.cpp ++++ b/vehicle-signals/vehiclesignals.cpp +@@ -160,7 +160,7 @@ void VehicleSignals::onSubscribeDone(const QMap<QString, bool> &signals_, bool c + { + if (!canceled) { + // queue up a resubscribe attempt +- QFuture<void> future = QtConcurrent::run(this, &VehicleSignals::resubscribe, signals_); ++ QFuture<void> future = QtConcurrent::run(&VehicleSignals::resubscribe, this, signals_); + } + } + +diff --git a/weather/meson.build b/weather/meson.build +index 116975b..bb6e3aa 100644 +--- a/weather/meson.build ++++ b/weather/meson.build +@@ -1,14 +1,14 @@ +-qt5_dep = dependency('qt5', modules: ['Qml']) ++qt_dep = dependency('qt6', modules: ['Qml']) + +-moc_files = qt5.compile_moc(headers: 'weather.h', +- dependencies: qt5_dep) ++moc_files = qt.compile_moc(headers: 'weather.h', ++ dependencies: qt_dep) + + src = ['weather.cpp', moc_files] + lib = shared_library('qtappfw-weather', + sources: src, + version: '1.0.0', + soversion: '0', +- dependencies: qt5_dep, ++ dependencies: qt_dep, + install: true) + + install_headers('weather.h') +@@ -18,5 +18,5 @@ pkg_mod.generate(libraries : lib, + version : '1.0', + name : 'libqtappfw-weather', + filebase : 'qtappfw-weather', +- requires: 'Qt5Qml', ++ requires: 'Qt6Qml', + description : 'Library wrapping AGL weather API in Qt objects') diff --git a/recipes-demo/libqtappfw/libqtappfw_git.bb b/recipes-demo/libqtappfw/libqtappfw_git.bb index f4e360723..7f4d9ddcd 100644 --- a/recipes-demo/libqtappfw/libqtappfw_git.bb +++ b/recipes-demo/libqtappfw/libqtappfw_git.bb @@ -21,14 +21,16 @@ DEPENDS = " \ kuksa-databroker \ " -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libqtappfw;protocol=https;branch=${AGL_BRANCH}" +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libqtappfw;protocol=https;branch=${AGL_BRANCH} \ + file://0001-Migrate-to-Qt-6.patch \ + " SRCREV = "4694b211569e15dc8aa4e75b6fb70e75946e766d" S = "${WORKDIR}/git" # PV needs to be modified with SRCPV to work AUTOREV correctly PV = "2.0.1+git${SRCPV}" -inherit meson pkgconfig +inherit meson pkgconfig meson_qt6_path EXTRA_OEMESON += "-Dprotos=${STAGING_INCDIR}" |