Skip to content

Commit 4b877b6

Browse files
lichaofan2008deepin-bot[bot]
authored andcommitted
fix: Adjust the handling of draft files when closing the window.
调整关闭窗口时对草稿文件的处理。 初次开启的草稿文件,因为还没有落盘,所以获取到的文件路径为空,此时不应该返回false,而应该继续循环。 Bug: https://pms.uniontech.com/bug-view-315439.html
1 parent 59850bf commit 4b877b6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/widgets/window.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2612,9 +2612,9 @@ bool Window::saveAllFloatingFiles()
26122612
QMap<QString, EditWrapper *> wrappers = m_wrappers;
26132613
for (int i = wrappers.count() - 1; i >= 0; i--) {
26142614
const QString &filePath = m_tabbar->truePathAt(i);
2615-
// 避免异常情况重入时当前已无标签页的情况
2615+
// 对于草稿文件,filePath为空,应该略过而不是返回false
26162616
if (filePath.isEmpty()) {
2617-
return false;
2617+
continue;
26182618
}
26192619

26202620
QFileInfo finfo(filePath);

0 commit comments

Comments
 (0)