From ebaeca359a5ef1058a38fc749eef1566e7dd76a5 Mon Sep 17 00:00:00 2001 From: uniartisan Date: Mon, 12 Dec 2022 16:44:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/downloadlist.cpp | 2 +- src/widget.cpp | 2 +- src/workerthreads.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/downloadlist.cpp b/src/downloadlist.cpp index 8e6c7dcb..ccf00a6e 100644 --- a/src/downloadlist.cpp +++ b/src/downloadlist.cpp @@ -169,7 +169,7 @@ void downloadlist::install(int t) QProcess isInstall; isInstall.start("dpkg -s " + pkgName); - isInstall.waitForFinished(180); // 默认超时 3 分钟 + isInstall.waitForFinished(180*1000); // 默认超时 3 分钟 int error = QString::fromStdString(isInstall.readAllStandardError().toStdString()).length(); if(error == 0) { diff --git a/src/widget.cpp b/src/widget.cpp index 5b317082..7e09c9a6 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -1200,7 +1200,7 @@ void Widget::on_pushButton_uninstall_clicked() QProcess check; check.start("dpkg", QStringList() << "-s" << pkgName.toLower()); - check.waitForFinished(180); // 默认超时 3 分钟 + check.waitForFinished(180*1000); // 默认超时 3 分钟 if (check.readAllStandardOutput().isEmpty()) { diff --git a/src/workerthreads.cpp b/src/workerthreads.cpp index 99d40c76..49c6f65d 100644 --- a/src/workerthreads.cpp +++ b/src/workerthreads.cpp @@ -92,7 +92,7 @@ void SpkAppInfoLoaderThread::run() QProcess isInstall; packagename = json["Pkgname"].toString(); isInstall.start("dpkg -s " + json["Pkgname"].toString()); - isInstall.waitForFinished(180); // 默认超时 3 分钟 + isInstall.waitForFinished(180*1000); // 默认超时 3 分钟 int error = QString::fromStdString(isInstall.readAllStandardError().toStdString()).length(); if(error == 0) { @@ -100,12 +100,12 @@ void SpkAppInfoLoaderThread::run() QProcess isUpdate; isUpdate.start("dpkg-query --showformat='${Version}' --show " + json["Pkgname"].toString()); - isUpdate.waitForFinished(180); // 默认超时 3 分钟 + isUpdate.waitForFinished(180*1000); // 默认超时 3 分钟 QString localVersion = isUpdate.readAllStandardOutput(); localVersion.replace("'", ""); isUpdate.start("dpkg --compare-versions " + localVersion + " ge " + json["Version"].toString()); - isUpdate.waitForFinished(180); // 默认超时 3 分钟 + isUpdate.waitForFinished(180*1000); // 默认超时 3 分钟 if(!isUpdate.exitCode()) { isUpdated = true;