[neon/kde/kdeconnect/Neon/experimental] debian/patches: add qqc2 compat patch as per porting guide
Carlos De Maine
null at kde.org
Sat Dec 16 06:28:32 GMT 2023
Git commit 01586ad4313548dfca0d59a0d1ceaa39dbfadd78 by Carlos De Maine.
Committed on 16/12/2023 at 07:28.
Pushed by carlosdem into branch 'Neon/experimental'.
add qqc2 compat patch as per porting guide
A +137 -0 debian/patches/kirigami_QQC2.patch
A +1 -0 debian/patches/series
https://invent.kde.org/neon/kde/kdeconnect/-/commit/01586ad4313548dfca0d59a0d1ceaa39dbfadd78
diff --git a/debian/patches/kirigami_QQC2.patch b/debian/patches/kirigami_QQC2.patch
new file mode 100644
index 00000000..7ca27709
--- /dev/null
+++ b/debian/patches/kirigami_QQC2.patch
@@ -0,0 +1,137 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f21c945f956afc8855447e270a12d70ad7caf61e..854dd0ab5b05e8772f58c5f099ff13cfa0d75860 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -57,7 +57,7 @@ ecm_set_disabled_deprecation_versions(
+ add_library(kdeconnectversion INTERFACE)
+ target_include_directories(kdeconnectversion INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
+
+-set(KF5_REQUIRED_COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications KIO KCMUtils Service Solid Kirigami2 People WindowSystem GuiAddons DocTools)
++set(KF5_REQUIRED_COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications KIO KCMUtils Service Solid Kirigami People WindowSystem GuiAddons DocTools)
+
+ set_package_properties(KF${QT_MAJOR_VERSION}Kirigami2 PROPERTIES
+ DESCRIPTION "QtQuick plugins to build user interfaces based on KDE UX guidelines"
+diff --git a/app/qml/DevicePage.qml b/app/qml/DevicePage.qml
+index 864e273cbc28ebd271315400972f5154be045743..e5aa08f7180b25dec029846416195f48863e3905 100644
+--- a/app/qml/DevicePage.qml
++++ b/app/qml/DevicePage.qml
+@@ -46,11 +46,12 @@ Kirigami.ScrollablePage {
+
+ ListView {
+ model: plugins
+- delegate: Kirigami.BasicListItem {
+- label: name
+- @KIRIGAMI_ICON@: iconName
++ delegate: QQC2.ItemDelegate {
++ text: name
++ icon.name: iconName
+ highlighted: false
+- iconColor: "transparent"
++ icon.color: "transparent"
++ width: ListView.view.width
+ visible: loaded
+ onClicked: onClick()
+ }
+diff --git a/app/qml/FindDevicesPage.qml b/app/qml/FindDevicesPage.qml
+index 40601d105829b312f48abc20418c434fdc9fea04..69387e418395818e540d90eb4e81d3bb0cc47020 100644
+--- a/app/qml/FindDevicesPage.qml
++++ b/app/qml/FindDevicesPage.qml
+@@ -60,12 +60,20 @@ Kirigami.ScrollablePage
+ model: DevicesSortProxyModel {
+ sourceModel: DevicesModel {}
+ }
+- delegate: Kirigami.BasicListItem {
+- @KIRIGAMI_ICON@: iconName
+- iconColor: "transparent"
+- label: model.name
+- subtitle: toolTip
++ delegate: ItemDelegate {
++ id: delegate
++ icon.name: iconName
++ icon.color: "transparent"
++ text: model.name
++ width: ListView.view.width
+ highlighted: false
++
++ contentItem: Kirigami.IconTitleSubtitle {
++ title: delegate.text
++ subtitle: toolTip
++ icon: icon.fromControlsIcon(delegate.icon)
++ }
++
+ onClicked: {
+ pageStack.push(
+ deviceComp,
+diff --git a/app/qml/main.qml b/app/qml/main.qml
+index 94e429016ab44a293a999d96a962611d734578e9..54fcf6e6a4a7a80c97f8d1951193ae1e3afed03b 100644
+--- a/app/qml/main.qml
++++ b/app/qml/main.qml
+@@ -68,10 +68,10 @@ Kirigami.ApplicationWindow {
+ }
+ }
+
+- Kirigami.BasicListItem {
++ QQC2.ItemDelegate {
+ id: findDevicesAction
+ text: i18nd("kdeconnect-app", "Find devices...")
+- @KIRIGAMI_ICON@: "list-add"
++ icon.name: "list-add"
+ checked: pageStack.currentItem && pageStack.currentItem.objectName == "FindDevices"
+ Layout.fillWidth: true
+
+@@ -92,13 +92,13 @@ Kirigami.ApplicationWindow {
+ }
+ }
+
+- Kirigami.BasicListItem {
++ QQC2.ItemDelegate {
+ Layout.fillWidth: true
+ text: model.name + "\n" + toolTip
+ enabled: status & DevicesModel.Reachable
+ checked: pageStack.currentItem && pageStack.currentItem.currentDevice == device
+- @KIRIGAMI_ICON@: model.iconName
+- iconColor: "transparent"
++ icon.name: model.iconName
++ icon.color: "transparent"
+ onClicked: {
+ root.pageStack.clear()
+ root.pageStack.push(
+@@ -114,9 +114,10 @@ Kirigami.ApplicationWindow {
+ Layout.fillWidth: true
+ }
+
+- Kirigami.BasicListItem {
++ QQC2.ItemDelegate {
+ text: i18n("Settings")
+- @KIRIGAMI_ICON@: "settings-configure"
++ icon.name: "settings-configure"
++ Layout.fillWidth: true
+ onClicked: pageStack.pushDialogLayer('qrc:/qml/Settings.qml', {}, {
+ title: i18n("Settings"),
+ });
+diff --git a/app/qml/runcommand.qml b/app/qml/runcommand.qml
+index f2fde7b233b0ec91344b1e2803f86c14873c1e4e..abf7b2a658b473e488f61a5087bf56d502581fe6 100644
+--- a/app/qml/runcommand.qml
++++ b/app/qml/runcommand.qml
+@@ -30,12 +30,17 @@ Kirigami.ScrollablePage
+ model: RemoteCommandsModel {
+ deviceId: pluginInterface.deviceId
+ }
+- delegate: Kirigami.BasicListItem {
++ delegate: ItemDelegate {
++ id: delegate
+ width: ListView.view.width
+- label: name
+- subtitle: command
++ text: name
++
++ contentItem: Kirigami.TitleSubtitle {
++ title: delegate.text
++ subtitle: command
++ }
++
+ onClicked: pluginInterface.triggerCommand(key)
+- reserveSpaceForIcon: false
+ }
+
+ Kirigami.PlaceholderMessage {
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..e841552f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+kirigami_QQC2.patch
\ No newline at end of file
More information about the Neon-commits
mailing list