43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
From 434d2c7ffce80409d61eb62fad01b2ed342161a1 Mon Sep 17 00:00:00 2001
|
|
From: peijiankang <peijiankang>
|
|
Date: Thu, 15 Dec 2022 17:09:20 +0800
|
|
Subject: [PATCH] fix power missing issue
|
|
|
|
---
|
|
shell/mainwindow.cpp | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/shell/mainwindow.cpp b/shell/mainwindow.cpp
|
|
index a1ac0e5..c75e55b 100644
|
|
--- a/shell/mainwindow.cpp
|
|
+++ b/shell/mainwindow.cpp
|
|
@@ -810,7 +810,7 @@ QPushButton * MainWindow::buildLeftsideBtn(QString bname,QString tipName, QIcon
|
|
bool MainWindow::isExistsCloudAccount() {
|
|
QProcess *wifiPro = new QProcess();
|
|
QString shellOutput = "";
|
|
- wifiPro->start("dpkg -l | grep kylin-sso-client");
|
|
+ wifiPro->start("rpm -qa|grep kylin-sso-client");
|
|
wifiPro->waitForFinished();
|
|
QString output = wifiPro->readAll();
|
|
shellOutput += output;
|
|
@@ -827,14 +827,14 @@ bool MainWindow::isExistsCloudAccount() {
|
|
bool MainWindow::isExistsPower()
|
|
{
|
|
QProcess *process = new QProcess;
|
|
- process->start("dpkg -l ukui-power-manager");
|
|
+ process->start("rpm -q ukui-power-manager");
|
|
process->waitForFinished();
|
|
|
|
QByteArray ba = process->readAllStandardOutput();
|
|
delete process;
|
|
QString mOutput = QString(ba.data());
|
|
|
|
- return mOutput.contains("ii", Qt::CaseSensitive) ? true : false;
|
|
+ return mOutput.contains("ukui-power-manager", Qt::CaseSensitive) ? true : false;
|
|
}
|
|
|
|
bool MainWindow::isExistWirelessDevice()
|
|
--
|
|
2.33.0
|
|
|