From 2b7dc1d4e6998e1a87caee23f6fe1076f87c59e3 Mon Sep 17 00:00:00 2001 From: Dipper209 <3611691282@qq.com> Date: Wed, 10 Jul 2024 11:50:33 +0800 Subject: [PATCH] filefunc --- filefunc.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/filefunc.cpp b/filefunc.cpp index 481d78a..e4171fc 100644 --- a/filefunc.cpp +++ b/filefunc.cpp @@ -4,9 +4,6 @@ //用多线程遍历本地文件夹 void Filefunc::readDirectory(const QString &path) { - // 清空之前的文件列表 - fileInfoList.clear(); - // 递归读取文件夹和子文件夹 recursiveRead(path); } @@ -22,10 +19,15 @@ void Filefunc::recursiveRead(const QString &path) recursiveRead(info.filePath()); } else { // 如果是文件,添加到文件信息列表 - fileInfoList.append(info); + addSynctask(info.absoluteFilePath()); qDebug()<