[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:24:47 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=260597a

The following commit has been merged in the master branch:
commit 260597abc6ee6ba0273d0ad276ca80bab58cf44d
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Sat Aug 9 15:53:01 2014 +0200

    delete chat tab when middle click is pressed
    
    Currently we only remove the tab when middle click is pasted, which
    leaks the chat tab.
    
    The major problem this causes is that upon reconnects all the old tabs
    reconnect.
    
    Thanks to the heroic Alex Fiestas for identifying the cause of this
    problem.
    
    Reviewed by: The heroic Alex Fiestas
---
 app/chat-window.cpp | 10 +++++++++-
 app/chat-window.h   |  1 +
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index 2c2e12b..4a16c04 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -112,7 +112,8 @@ ChatWindow::ChatWindow()
 
     connect(m_tabWidget, SIGNAL(closeRequest(QWidget*)), this, SLOT(destroyTab(QWidget*)));
     connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(onCurrentIndexChanged(int)));
-    connect(qobject_cast<KTabBar*>(m_tabWidget->tabBar()), SIGNAL(mouseMiddleClick(int)),m_tabWidget, SLOT(removeTab(int)));
+
+    connect(qobject_cast<KTabBar*>(m_tabWidget->tabBar()), SIGNAL(mouseMiddleClick(int)), this, SLOT(onTabMiddleClicked(int)));
     connect(qobject_cast<KTabBar*>(m_tabWidget->tabBar()), SIGNAL(contextMenu(int,QPoint)), SLOT(tabBarContextMenu(int,QPoint)));
 
     setCentralWidget(m_tabWidget);
@@ -220,6 +221,13 @@ void ChatWindow::removeTab(ChatTab *tab)
     }
 }
 
+void ChatWindow::onTabMiddleClicked(int index)
+{
+    QWidget *tab = m_tabWidget->widget(index);
+    Q_ASSERT(tab);
+    destroyTab(tab);
+}
+
 void ChatWindow::addTab(ChatTab *tab)
 {
     kDebug();
diff --git a/app/chat-window.h b/app/chat-window.h
index 793ac55..f9a0097 100644
--- a/app/chat-window.h
+++ b/app/chat-window.h
@@ -83,6 +83,7 @@ private Q_SLOTS:
     void onAudioCallTriggered();                                /** start an audio call */
     void onBlockContactTriggered();                             /** Blocks contact */
     void onCurrentIndexChanged(int index);
+    void onTabMiddleClicked(int index);
     void onEnableSearchActions(bool enable);                    /** enables/disables menu search actions */
     void onFileTransferTriggered();                             /** start a file transfer (to be used only for 1on1 chats!) */
     void onFindNextText();                                      /** go to next text the user is searching for */

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list