summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorNick Shaforostoff <[email protected]>2016-04-13 00:47:50 +0300
committerUlf Hermann <[email protected]>2016-08-26 07:39:53 +0000
commit8adad2fe09b173ff876895c27884f49804a20bcc (patch)
tree97cc19e256e08e8c958cb1b60860e153a8f18685 /src/widgets/kernel/qwidget.cpp
parent15c39dfe3db5c4264b49cb53e80ec088ea4948e9 (diff)
fix build with various QT_NO_* defines
Done-with: Andriy Gerasika <[email protected]> Change-Id: I90883a491dbddb005c3d756c339e42285d50e437 Reviewed-by: Oswald Buddenhagen <[email protected]> Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index d0971443bae..2e3d1cf9f83 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -9441,10 +9441,13 @@ void QWidget::tabletEvent(QTabletEvent *event)
void QWidget::keyPressEvent(QKeyEvent *event)
{
+#ifndef QT_NO_SHORTCUT
if ((windowType() == Qt::Popup) && event->matches(QKeySequence::Cancel)) {
event->accept();
close();
- } else {
+ } else
+#endif
+ {
event->ignore();
}
}