From 2f1f935e38d8fa6df5a36a16a6f240547361f8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=B8=80=E9=B8=A3?= <1000000008@qq.com> Date: Thu, 29 Oct 2026 02:55:41 -0400 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=20Moonlight=20=E5=8D=8F=E8=AE=AE=E5=B9=B6=E7=A7=BB=E9=99=A4=20?= =?UTF-8?q?RDP=20=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 变更详情:协议统一 Moonlight,移除 RDP 选项 --- terminal/kiosk-shell/src/desktop_settings_dialog.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/terminal/kiosk-shell/src/desktop_settings_dialog.cpp b/terminal/kiosk-shell/src/desktop_settings_dialog.cpp index 6d93244..a74d4cd 100644 --- a/terminal/kiosk-shell/src/desktop_settings_dialog.cpp +++ b/terminal/kiosk-shell/src/desktop_settings_dialog.cpp @@ -43,10 +43,7 @@ DesktopSettingsDialog::DesktopSettingsDialog(std::vector desktops, } form->addRow(QStringLiteral("桌面"), comboDesktop_); - comboProtocol_ = new QComboBox(this); - comboProtocol_->addItem(QStringLiteral("Moonlight"), QStringLiteral("moonlight")); - comboProtocol_->addItem(QStringLiteral("RDP"), QStringLiteral("rdp")); - form->addRow(QStringLiteral("协议"), comboProtocol_); + // 协议统一 Moonlight(RDP 渲染实测差,已不提供选项;代码保留作网关备用) editEndpoint_ = new QLineEdit(this); editEndpoint_->setPlaceholderText(QStringLiteral("例如 192.168.1.70 或 VPN 隧道地址")); @@ -54,7 +51,7 @@ DesktopSettingsDialog::DesktopSettingsDialog(std::vector desktops, editApp_ = new QLineEdit(this); editApp_->setPlaceholderText(QStringLiteral("Sunshine 应用名,通常为 Desktop")); - form->addRow(QStringLiteral("应用名(Moonlight)"), editApp_); + form->addRow(QStringLiteral("应用名"), editApp_); comboResolution_ = new QComboBox(this); const char* resolutions[] = {"1920x1080", "2560x1440", "1920x1440", "3840x2160", "1280x720"}; @@ -106,7 +103,6 @@ void DesktopSettingsDialog::loadCurrent() { continue; } loading_ = true; - comboProtocol_->setCurrentIndex(d.protocol == Protocol::kRdp ? 1 : 0); editEndpoint_->setText(d.endpoint); editApp_->setText(d.app); int resIndex = comboResolution_->findData( @@ -125,9 +121,7 @@ void DesktopSettingsDialog::onAccepted() { if (d.id != id) { continue; } - d.protocol = comboProtocol_->currentData().toString() == QStringLiteral("rdp") - ? Protocol::kRdp - : Protocol::kMoonlight; + d.protocol = Protocol::kMoonlight; d.endpoint = editEndpoint_->text().trimmed(); d.app = editApp_->text().trimmed(); const QString res = comboResolution_->currentData().toString();