[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:19:16 UTC 2016


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

The following commit has been merged in the master branch:
commit 9972b54b93f68ffaa57129e670fd02486094ab66
Author: Lasse Liehu <lliehu at kolumbus.fi>
Date:   Tue Apr 12 15:53:15 2011 +0300

    Close the find bar by pressing Esc
    REVIEW:101094
---
 lib/chat-widget.cpp | 8 ++++++++
 lib/chat-widget.h   | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index af7edff..3611590 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -308,6 +308,14 @@ void ChatWidget::showEvent(QShowEvent* e)
     QWidget::showEvent(e);
 }
 
+void ChatWidget::keyPressEvent(QKeyEvent* e)
+{
+    if (e->key() == Qt::Key_Escape && d->ui.searchBar->isVisible()) {
+        d->ui.searchBar->toggleView(false);
+    } else {
+        QWidget::keyPressEvent(e);
+    }
+}
 
 QString ChatWidget::title() const
 {
diff --git a/lib/chat-widget.h b/lib/chat-widget.h
index fdf5ccd..92cda98 100644
--- a/lib/chat-widget.h
+++ b/lib/chat-widget.h
@@ -34,6 +34,7 @@
 class ChatSearchBar;
 class ChatWidgetPrivate;
 class QShowEvent;
+class QKeyEvent;
 
 class KDE_TELEPATHY_CHAT_EXPORT ChatWidget : public QWidget
 {
@@ -68,6 +69,7 @@ protected:
     void changeEvent(QEvent *e);
     void resizeEvent(QResizeEvent *);
     void showEvent(QShowEvent *e);
+    void keyPressEvent(QKeyEvent *e);
 
 protected slots:
     /** Show the received message in the chat window*/

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list