From 73fa400641352d2f397b2e4a8589bf6ce80c7beb Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Mon, 15 Jun 2009 22:51:45 +0100
Subject: Slightly cleaner close behaviour for tabs - still broken.


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();
 }
 
-- 
cgit v0.10.2-6-g49f6