From 2a15b465038bbc5dd523409c4e89beb429fc8925 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Jesper=20Thomsch=C3=BCtz?= Date: Sat, 14 Mar 2009 14:25:11 +0200 Subject: [PATCH] Manually check to see if a search shortcut was hit, as KTextEdit seems to gobble it up, despite having find disabled. --- src/uisupport/inputline.cpp | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/uisupport/inputline.cpp b/src/uisupport/inputline.cpp index 91b4544..2615688 100644 --- a/src/uisupport/inputline.cpp +++ b/src/uisupport/inputline.cpp @@ -73,6 +73,24 @@ bool InputLine::eventFilter(QObject *watched, QEvent *event) { } void InputLine::keyPressEvent(QKeyEvent * event) { + +#ifdef HAVE_KDE + if (event->matches(QKeySequence::Find)) + { + QList actions = nativeParentWidget()->actions(); + QAction *action; + + foreach(action, actions) + { + if (action->objectName() == "ToggleSearchBar") + { + action->toggle(); + return; + } + } + } +#endif + switch(event->key()) { case Qt::Key_Up: event->accept(); -- 1.5.6.3