From 9dcfd050a698f52dcefc445917631525503f850a Mon Sep 17 00:00:00 2001 From: Flamingo Date: Wed, 10 Apr 2024 21:22:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8D=E4=BC=A0ng=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E4=B8=8B=E7=9A=84=E5=9B=BE=E7=89=87=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E7=9B=B8=E6=9C=BA=E6=8E=89=E7=94=B5=E4=BB=A5=E5=90=8E?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E5=99=A8=E5=88=B0=E6=97=B6=E9=97=B4=E7=BB=A7?= =?UTF-8?q?=E7=BB=AD=E4=BC=A0=E9=80=81=E6=9C=AA=E5=8F=91=E9=80=81=E7=9A=84?= =?UTF-8?q?=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cigarette/exportData.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Cigarette/exportData.cpp b/Cigarette/exportData.cpp index 9a2cb4f..95f5816 100644 --- a/Cigarette/exportData.cpp +++ b/Cigarette/exportData.cpp @@ -325,7 +325,7 @@ void ExportDataThread::run() } } - if (b_quit && (!tmpListToZip.isEmpty())) { + if ((b_quit || (!timer->isActive() && !readyToSendZip)) && (!tmpListToZip.isEmpty())) { listToZip += tmpListToZip; tmpListToZip.clear(); readyToSendZip = true; @@ -403,6 +403,7 @@ void ExportDataThread::run() } fileNg.remove(); fileOk.remove(); + listToZip.clear(); readyToSendZip = false; } } @@ -505,20 +506,23 @@ void ExportDataThread::GetDataFromSaveThread(QString filePath) { QString remotePath; if (timer->isActive()) { - if ((filePath.indexOf("ng_result") != -1) || (filePath.indexOf("ng") == -1)) { + if (filePath.indexOf("ng") == -1) { tmpListToZip.append(filePath); } } else { - listToZip = tmpListToZip; - tmpListToZip.clear(); - if ((filePath.indexOf("ng_result") != -1) || (filePath.indexOf("ng") == -1)) { - tmpListToZip.append(filePath); + if (!tmpListToZip.isEmpty()) { + listToZip = tmpListToZip; + tmpListToZip.clear(); } if (!listToZip.isEmpty()) { readyToSendZip = true; } + + if (filePath.indexOf("ng") == -1) { + tmpListToZip.append(filePath); + } //remotePath = filePath.mid(filePath.indexOf("image") - 1); //ConnectServer(filePath, remotePath); timer->start(1000 * 60 * 5); // 5min