Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/startmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,8 @@ void StartManager::slotCloseWindow()
// 导致被附加到上一文本编辑器进程
QDBusConnection::sessionBus().unregisterService("com.deepin.Editor");

QTimer::singleShot(1000, []() {
StartManager::instance()->delayMallocTrim();
QTimer::singleShot(1000, [this]() {
this->delayMallocTrim();
QApplication::quit();
});

Expand Down
6 changes: 4 additions & 2 deletions src/widgets/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1199,8 +1199,10 @@ void Window::removeWrapper(const QString &filePath, bool isDelete)
}
}

// Exit window after close all tabs.
if (m_wrappers.isEmpty()) {
// Exit window after close all tabs (including pending and blank tabs).
// Pending tabs are kept in m_pendingTabs, blank tabs are managed by the tabbar.
// Only close the window when the tabbar has no tabs left.
if (m_wrappers.isEmpty() && m_tabbar->count() == 0) {
close();
qInfo() << "after close";
}
Expand Down
Loading