屏蔽部分未实现功能代码
This commit is contained in:
parent
7abdfef872
commit
fd84a33910
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue