From 0dfe034177c12c308400d2cebeaf1c3cf08d7f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= Date: Wed, 24 Apr 2024 09:55:40 +0800 Subject: [PATCH] repace some deprecated functions to recommended ones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 侯红勋 (cherry picked from commit bda6e14c305597e07fbbcc412a68351785415f83) --- ...recated-member-functions-to-recommen.patch | 57 +++++++++++++++++++ peony-extensions.spec | 7 ++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 0001-replace-some-deprecated-member-functions-to-recommen.patch diff --git a/0001-replace-some-deprecated-member-functions-to-recommen.patch b/0001-replace-some-deprecated-member-functions-to-recommen.patch new file mode 100644 index 0000000..2c0c51a --- /dev/null +++ b/0001-replace-some-deprecated-member-functions-to-recommen.patch @@ -0,0 +1,57 @@ +From be8300414c7f15ce7dd1a0f7dafaacb76a835d48 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= +Date: Wed, 24 Apr 2024 09:44:19 +0800 +Subject: [PATCH] replace some deprecated member functions to recommended ones +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: 侯红勋 +--- + peony-bluetooth-plugin/bluetoothplugin.cpp | 2 +- + peony-share/SwitchButton/switchbutton.cpp | 2 +- + peony-share/share-properties-page-plugin.cpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/peony-bluetooth-plugin/bluetoothplugin.cpp b/peony-bluetooth-plugin/bluetoothplugin.cpp +index 10ab347..d05daaa 100644 +--- a/peony-bluetooth-plugin/bluetoothplugin.cpp ++++ b/peony-bluetooth-plugin/bluetoothplugin.cpp +@@ -81,7 +81,7 @@ QList BluetoothPlugin::menuActions(Peony::MenuPluginInterface::Types + } + + QProcess process; +- process.start("rfkill list"); ++ process.start("rfkill", QStringList() << "list"); + process.waitForFinished(); + QByteArray output = process.readAllStandardOutput(); + QString str_output = output; +diff --git a/peony-share/SwitchButton/switchbutton.cpp b/peony-share/SwitchButton/switchbutton.cpp +index 38bb00a..f064ded 100644 +--- a/peony-share/SwitchButton/switchbutton.cpp ++++ b/peony-share/SwitchButton/switchbutton.cpp +@@ -208,7 +208,7 @@ void SwitchButton::mousePressEvent(QMouseEvent *){ + }else{ + QProcess tempProcess; + QString cmd = QString("groups"); +- tempProcess.start(cmd); ++ tempProcess.start(cmd, QStringList()); + tempProcess.waitForFinished(); + + QString result = tempProcess.readAllStandardOutput().data(); +diff --git a/peony-share/share-properties-page-plugin.cpp b/peony-share/share-properties-page-plugin.cpp +index 69a20da..b6a37d8 100644 +--- a/peony-share/share-properties-page-plugin.cpp ++++ b/peony-share/share-properties-page-plugin.cpp +@@ -76,7 +76,7 @@ bool SharePropertiesPagePlugin::supportUris(const QStringList &uris) + return false; + } + // don't share user's home directory file:///home/xxx/ +- QStringList file = info->uri().split('/', QString::SkipEmptyParts); ++ QStringList file = info->uri().split('/', Qt::SkipEmptyParts); + if ((3 == file.size ()) && (file.at(1) == "home")) { + return false; + } +-- +2.43.0 + diff --git a/peony-extensions.spec b/peony-extensions.spec index 44fd83d..0317f72 100644 --- a/peony-extensions.spec +++ b/peony-extensions.spec @@ -1,12 +1,13 @@ Name: peony-extensions Version: 3.10.0 -Release: 5 +Release: 6 Summary: adds extended functionality to the Peony file manager. License: GPLv3 and LGPLv3 URL: http://www.ukui.org Source0: %{name}-%{version}.tar.gz Patch01: 0001-move-sambashare-to-usershares.patch Patch02: 0002-add-share-information-of-peony-share.patch +Patch03: 0001-replace-some-deprecated-member-functions-to-recommen.patch BuildRequires: cmake BuildRequires: pkgconf @@ -108,6 +109,7 @@ to rename it use other tools like gparted. %setup -q %patch01 -p1 %patch02 -p1 +%patch03 -p1 %build export PATH=%{_qt5_bindir}:$PATH @@ -160,6 +162,9 @@ systemctl enable smb &> /dev/null ||: %{_libdir}/peony-extensions/libpeony-drive-rename.so %changelog +* Wed Apr 24 2024 houhongxun - 3.10.0-6 +- replace some deprecated functions to recommended ones + * Sat Jun 17 2023 huayadong - 3.10.0-5 - remove Recommends: ukui-bluetooth -- Gitee