From b2e24c4c5d34c26efaa9b7815e39d41841f40706 Mon Sep 17 00:00:00 2001 From: liyigang Date: Fri, 28 Jun 2024 18:02:33 +0800 Subject: [PATCH] fix: After cutting and pasting the SMB remote connection file, Ctrl+Z undo will cause display errors Timing issue, thread processFileEventRunning flag set too late for processing file information Log: After cutting and pasting the SMB remote connection file, Ctrl+Z undo will cause display errors Bug: https://pms.uniontech.com/bug-view-258017.html https://pms.uniontech.com/bug-view-259321.html --- .../filemanager/core/dfmplugin-workspace/models/rootinfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/filemanager/core/dfmplugin-workspace/models/rootinfo.cpp b/src/plugins/filemanager/core/dfmplugin-workspace/models/rootinfo.cpp index 715e3b4de9..dfe6f76440 100644 --- a/src/plugins/filemanager/core/dfmplugin-workspace/models/rootinfo.cpp +++ b/src/plugins/filemanager/core/dfmplugin-workspace/models/rootinfo.cpp @@ -246,7 +246,7 @@ void RootInfo::doWatcherEvent() if (emptyLoopCount >= 5) break; - QThread::msleep(10); + QThread::msleep(20); if (adds.isEmpty() && updates.isEmpty() && removes.isEmpty()) oldtime = timer.elapsed(); @@ -303,6 +303,7 @@ void RootInfo::doWatcherEvent() removes.append(fileUrl); } } + processFileEventRuning = false; // 处理添加文件 if (!removes.isEmpty()) @@ -311,7 +312,6 @@ void RootInfo::doWatcherEvent() addChildren(adds); if (!updates.isEmpty()) updateChildren(updates); - processFileEventRuning = false; } void RootInfo::doThreadWatcherEvent()