fix: 现在安装到ACE的软件包不会再报错了

This commit is contained in:
2025-06-11 15:10:09 +08:00
parent fb6446292c
commit 05a5b89464
4 changed files with 37 additions and 34 deletions

View File

@@ -216,11 +216,11 @@ void DownloadItem::slotAsyncInstall(int t)
}
}
QProcess isInstall;
isInstall.start("dpkg", QStringList() << "-s" << pkgName);
isInstall.waitForFinished(180 * 1000); // 默认超时 3 分钟
int error = QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
if (error == 0 && !haveError)
// QProcess isInstall;
// isInstall.start("dpkg", QStringList() << "-s" << pkgName);
// isInstall.waitForFinished(180 * 1000); // 默认超时 3 分钟
// int error = QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
if ( !haveError)
{
ui->pushButton_install->hide();
Utils::sendNotification("spark-store", tr("Spark Store"), ui->label->text() + " " + tr("Installation complete."));
@@ -252,5 +252,5 @@ void DownloadItem::slotAsyncInstall(int t)
ui->widget_spinner->hide();
DownloadItem::isInstall = false;
emit finished(error == 0 && !haveError && !notRoot);
emit finished(!haveError && !notRoot);
}