屏蔽部分未实现功能代码

This commit is contained in:
yangjiaxuan 2022-11-23 18:41:22 +08:00
parent 7abdfef872
commit fd84a33910
1 changed files with 30 additions and 30 deletions

View File

@ -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()
{