From 8e8df04213a20c44c8d152cb08f46e72579c9703 Mon Sep 17 00:00:00 2001 From: barry <870709867@qq.com> Date: Sat, 7 Dec 2024 12:25:47 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=80=82=E9=85=8D3.0.2=E7=9A=84?= =?UTF-8?q?=E7=94=B5=E6=BA=90=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QtScrcpy/QtScrcpyCore | 2 +- QtScrcpy/groupcontroller/groupcontroller.cpp | 4 ++-- QtScrcpy/groupcontroller/groupcontroller.h | 2 +- QtScrcpy/ui/toolform.cpp | 4 ++-- QtScrcpy/ui/videoform.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/QtScrcpy/QtScrcpyCore b/QtScrcpy/QtScrcpyCore index eb8b7837b..8e2cc1f3b 160000 --- a/QtScrcpy/QtScrcpyCore +++ b/QtScrcpy/QtScrcpyCore @@ -1 +1 @@ -Subproject commit eb8b7837b18d4d2c13276d90884feb7f1c37d7ba +Subproject commit 8e2cc1f3b17ad888b567ce05c5fe125bcaca0dd5 diff --git a/QtScrcpy/groupcontroller/groupcontroller.cpp b/QtScrcpy/groupcontroller/groupcontroller.cpp index fc7975108..24b3c8e51 100644 --- a/QtScrcpy/groupcontroller/groupcontroller.cpp +++ b/QtScrcpy/groupcontroller/groupcontroller.cpp @@ -262,7 +262,7 @@ void GroupController::postCut() } } -void GroupController::setScreenPowerMode(bool open) +void GroupController::setDisplayPower(bool on) { for (const auto& serial : m_devices) { if (true == isHost(serial)) { @@ -273,7 +273,7 @@ void GroupController::setScreenPowerMode(bool open) continue; } - device->setScreenPowerMode(open); + device->setDisplayPower(on); } } diff --git a/QtScrcpy/groupcontroller/groupcontroller.h b/QtScrcpy/groupcontroller/groupcontroller.h index bb2136dc5..f0a0f2bf2 100644 --- a/QtScrcpy/groupcontroller/groupcontroller.h +++ b/QtScrcpy/groupcontroller/groupcontroller.h @@ -31,7 +31,7 @@ class GroupController : public QObject, public qsc::DeviceObserver void postVolumeDown() override; void postCopy() override; void postCut() override; - void setScreenPowerMode(bool open) override; + void setDisplayPower(bool on) override; void expandNotificationPanel() override; void collapsePanel() override; void postBackOrScreenOn(bool down) override; diff --git a/QtScrcpy/ui/toolform.cpp b/QtScrcpy/ui/toolform.cpp index f9e0ba8d1..35614f704 100644 --- a/QtScrcpy/ui/toolform.cpp +++ b/QtScrcpy/ui/toolform.cpp @@ -186,7 +186,7 @@ void ToolForm::on_closeScreenBtn_clicked() if (!device) { return; } - device->setScreenPowerMode(false); + device->setDisplayPower(false); } void ToolForm::on_expandNotifyBtn_clicked() @@ -221,5 +221,5 @@ void ToolForm::on_openScreenBtn_clicked() if (!device) { return; } - device->setScreenPowerMode(true); + device->setDisplayPower(true); } diff --git a/QtScrcpy/ui/videoform.cpp b/QtScrcpy/ui/videoform.cpp index 085c847ea..5806f1d5d 100644 --- a/QtScrcpy/ui/videoform.cpp +++ b/QtScrcpy/ui/videoform.cpp @@ -290,7 +290,7 @@ void VideoForm::installShortcut() if (!device) { return; } - emit device->setScreenPowerMode(false); + emit device->setDisplayPower(false); }); // expandNotificationPanel