From fd84a339108a33b517efbba86d74d556e6777111 Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Wed, 23 Nov 2022 18:41:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E9=83=A8=E5=88=86=E6=9C=AA?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=8A=9F=E8=83=BD=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scanner/mainwindow.cpp | 60 +++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp index 851ecce5..ef32e565 100644 --- a/app/scanner/mainwindow.cpp +++ b/app/scanner/mainwindow.cpp @@ -3826,39 +3826,39 @@ void MainWindow::upgradeFwAndLockDevice() } } -void MainWindow::deleteFile(QString filePath) -{ - QDir dir(filePath); - if(!dir.exists()) - { - return; - } - dir.setFilter(QDir::Files | QDir::NoSymLinks); - QFileInfoList list = dir.entryInfoList(); +//void MainWindow::deleteFile(QString filePath) +//{ +// QDir dir(filePath); +// if(!dir.exists()) +// { +// return; +// } +// dir.setFilter(QDir::Files | QDir::NoSymLinks); +// QFileInfoList list = dir.entryInfoList(); - int count = list.count(); - if(count <= 0) - { - return; - } +// int count = list.count(); +// if(count <= 0) +// { +// return; +// } - for(int i=0; i < count; i++) - { - QFileInfo info = list.at(i); - QString suffix = info.suffix(); - if(QString::compare(suffix, QString("exe"), Qt::CaseInsensitive) == 0) - { - QDateTime nowTime = QDateTime::currentDateTime(); - QDateTime createTime = info.created(); - int days = createTime.daysTo(nowTime); - if (days > 14) - { - HGBase_DeleteFile(info.absoluteFilePath().c_str()); - } - } +// for(int i=0; i < count; i++) +// { +// QFileInfo info = list.at(i); +// QString suffix = info.suffix(); +// if(QString::compare(suffix, QString("exe"), Qt::CaseInsensitive) == 0) +// { +// QDateTime nowTime = QDateTime::currentDateTime(); +// QDateTime createTime = info.created(); +// int days = createTime.daysTo(nowTime); +// if (days > 14) +// { +// HGBase_DeleteFile(info.absoluteFilePath().c_str()); +// } +// } - } -} +// } +//} void MainWindow::copyFile() {