mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-16 17:11:37 +08:00
chore:点击更新时,调用更新器
This commit is contained in:
@@ -552,11 +552,11 @@ void MainWindow::on_pushButton_14_clicked()
|
|||||||
if (!upgradeStatus.exists())
|
if (!upgradeStatus.exists())
|
||||||
{
|
{
|
||||||
QString appPath;
|
QString appPath;
|
||||||
|
|
||||||
// 开发环境路径(构建目录)
|
// 开发环境路径(构建目录)
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
appPath = QCoreApplication::applicationDirPath() +
|
appPath = QCoreApplication::applicationDirPath() +
|
||||||
"/../spark-update-tool/spark-update-tool";
|
"/spark-update-tool/spark-update-tool";
|
||||||
#else
|
#else
|
||||||
// 安装后路径(系统PATH)
|
// 安装后路径(系统PATH)
|
||||||
appPath = QStandardPaths::findExecutable("spark-update-tool");
|
appPath = QStandardPaths::findExecutable("spark-update-tool");
|
||||||
@@ -569,8 +569,8 @@ void MainWindow::on_pushButton_14_clicked()
|
|||||||
|
|
||||||
QProcess *process = new QProcess(this);
|
QProcess *process = new QProcess(this);
|
||||||
process->start(appPath, {"--silent"});
|
process->start(appPath, {"--silent"});
|
||||||
|
|
||||||
connect(process, QOverload<int>::of(&QProcess::finished),
|
connect(process, QOverload<int>::of(&QProcess::finished),
|
||||||
[=](int exitCode) {
|
[=](int exitCode) {
|
||||||
if (exitCode == 0) {
|
if (exitCode == 0) {
|
||||||
qDebug() << "Update check successful";
|
qDebug() << "Update check successful";
|
||||||
|
|||||||
Reference in New Issue
Block a user