From 1c79112f6e709c40a5165d734d3e9a7d48076d8e Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 10 Apr 2015 19:36:30 +0200 Subject: [PATCH] + handling of undercore in calltips window --- src/Gui/CallTips.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Gui/CallTips.cpp b/src/Gui/CallTips.cpp index 70282ffa0..0e416ff07 100644 --- a/src/Gui/CallTips.cpp +++ b/src/Gui/CallTips.cpp @@ -568,6 +568,10 @@ bool CallTipsList::eventFilter(QObject * watched, QEvent * event) hide(); return true; } + else if ((ke->key() == Qt::Key_Minus) && (ke->modifiers() & Qt::ShiftModifier)) { + // do nothing here, but this check is needed to ignore underscore + // which in Qt 4.8 gives Key_Minus instead of Key_Underscore + } else if (this->hideKeys.indexOf(ke->key()) > -1) { itemActivated(currentItem()); return false; @@ -586,9 +590,9 @@ bool CallTipsList::eventFilter(QObject * watched, QEvent * event) itemActivated(currentItem()); return false; } - else if (ke->key() == Qt::Key_Shift || ke->key() == Qt::Key_Control || - ke->key() == Qt::Key_Meta || ke->key() == Qt::Key_Alt || - ke->key() == Qt::Key_AltGr) { + else if (ke->key() == Qt::Key_Shift || ke->key() == Qt::Key_Control || + ke->key() == Qt::Key_Meta || ke->key() == Qt::Key_Alt || + ke->key() == Qt::Key_AltGr) { // filter these meta keys to avoid to call keyboardSearch() return true; }