peony-extensions/0001-replace-some-deprecated-member-functions-to-recommen.patch
侯红勋 bda6e14c30 repace some deprecated functions to recommended ones
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
2024-04-24 09:55:40 +08:00

58 lines
2.4 KiB
Diff

From be8300414c7f15ce7dd1a0f7dafaacb76a835d48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
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: 侯红勋 <houhongxun@kylinos.cn>
---
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<QAction *> 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