summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtChatTabs.cpp3
-rw-r--r--Swift/QtUI/QtChatWindow.cpp1
2 files changed, 2 insertions, 2 deletions
diff --git a/Swift/QtUI/QtChatTabs.cpp b/Swift/QtUI/QtChatTabs.cpp
index 78cdf2d..c7cd7ba 100644
--- a/Swift/QtUI/QtChatTabs.cpp
+++ b/Swift/QtUI/QtChatTabs.cpp
@@ -41,8 +41,7 @@ void QtChatTabs::handleTabClosing() {
void QtChatTabs::handleTabCloseRequested(int index) {
QWidget* widget = tabs_->widget(index);
- tabs_->removeTab(index);
- widget->hide();
+ widget->close();
}
void QtChatTabs::handleTabTitleUpdated() {
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 880678a..9f1f445 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -95,6 +95,7 @@ SecurityLabel QtChatWindow::getSelectedSecurityLabel() {
void QtChatWindow::closeEvent(QCloseEvent* event) {
onClosed();
+ emit windowClosing();
event->accept();
}