chore:点击更新时,调用更新器

This commit is contained in:
momen 2025-07-11 00:31:18 +08:00
parent 5a66c86b54
commit 59588c90d5
1 changed files with 5 additions and 5 deletions

View File

@ -552,11 +552,11 @@ void MainWindow::on_pushButton_14_clicked()
if (!upgradeStatus.exists())
{
QString appPath;
// 开发环境路径(构建目录)
#ifdef QT_DEBUG
appPath = QCoreApplication::applicationDirPath() +
"/../spark-update-tool/spark-update-tool";
appPath = QCoreApplication::applicationDirPath() +
"/spark-update-tool/spark-update-tool";
#else
// 安装后路径系统PATH
appPath = QStandardPaths::findExecutable("spark-update-tool");
@ -569,8 +569,8 @@ void MainWindow::on_pushButton_14_clicked()
QProcess *process = new QProcess(this);
process->start(appPath, {"--silent"});
connect(process, QOverload<int>::of(&QProcess::finished),
connect(process, QOverload<int>::of(&QProcess::finished),
[=](int exitCode) {
if (exitCode == 0) {
qDebug() << "Update check successful";