修复:使用 QOverload 消除歧义并修复 ARM64 编译

变更详情:QProcess::finished 重载用 QOverload 消歧,修复 ARM64 编译
This commit is contained in:
宋一鸣 2026-10-28 23:59:03 -04:00
parent d739b2c9a1
commit 791f49e987

View File

@ -73,7 +73,10 @@ bool MoonlightSession::start(const ConnectionTicket& ticket, StateCallback callb
const QString logPath = logDir + QStringLiteral("/moonlight-%1.log")
.arg(QDate::currentDate().toString(QStringLiteral("yyyyMMdd")));
connect(process_, &QProcess::finished, this, &MoonlightSession::onProcessFinished);
// QProcess::finished 在 Qt5 里有两个重载((int) 已废弃),必须用 QOverload 消歧
connect(process_,
QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this,
&MoonlightSession::onProcessFinished);
connect(process_, &QProcess::errorOccurred, this, &MoonlightSession::onProcessError);
connect(process_, &QProcess::readyReadStandardOutput, this, [this, logPath]() {
QFile log(logPath);