From bf8eaf56800d1906a4cb9cff25e51a3a8797ee11 Mon Sep 17 00:00:00 2001
From: zty199 <46324746+zty199@users.noreply.github.com>
Date: Fri, 21 Jun 2024 09:07:16 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85?=
 =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E5=88=A4=E6=96=AD=E6=9D=A1=E4=BB=B6=E9=94=99?=
 =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

原始判断条件将 QString 和 bool 类型函数返回值进行比较,可能存在问题
Qt5 中比较结果始终为 false,不会认为安装失败

Log: 判断输出包含 "OMG-IT-GOES-WRONG" 关键词则认为安装失败
---
 src/widgets/common/downloaditem.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/widgets/common/downloaditem.cpp b/src/widgets/common/downloaditem.cpp
index 5b39962..574780b 100644
--- a/src/widgets/common/downloaditem.cpp
+++ b/src/widgets/common/downloaditem.cpp
@@ -198,7 +198,7 @@ void DownloadItem::slotAsyncInstall(int t)
     for (int i = 0; i < everyOut.size(); i++)
     {
         tempOutput = everyOut[i];
-        if (everyOut[i].left(2) == tempOutput.contains("OMG-IT-GOES-WRONG"))
+        if (tempOutput.contains("OMG-IT-GOES-WRONG"))
         {
             haveError = true;
         }