aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickpopup.cpp
diff options
context:
space:
mode:
authorNikita Krupenko <krnekit@gmail.com>2016-05-18 06:47:36 +0300
committerNikita Krupenko <krnekit@gmail.com>2016-05-18 13:59:24 +0000
commit8f08885f8557099c2a37d4f3579e73f900a43cad (patch)
treed5a67c53b5f3336b22f605b4f56bd0f1aa30d479 /src/quicktemplates2/qquickpopup.cpp
parent145ba3fd216b1d77331ef239f957360e03432d44 (diff)
Popup: don't ignore Back key
This allows to close popup on mobile device when Back key pressed and CloseOnEscape policy is set. Change-Id: I97e863b462ee50d2d8e79d18cf8097f960f14227 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickpopup.cpp')
-rw-r--r--src/quicktemplates2/qquickpopup.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index 6d969e30..9279b261 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -1831,7 +1831,7 @@ void QQuickPopup::keyPressEvent(QKeyEvent *event)
if (hasActiveFocus() && (event->key() == Qt::Key_Tab || event->key() == Qt::Key_Backtab))
QQuickItemPrivate::focusNextPrev(d->popupItem, event->key() == Qt::Key_Tab);
- if (event->key() != Qt::Key_Escape)
+ if (event->key() != Qt::Key_Escape && event->key() != Qt::Key_Back)
return;
if (d->closePolicy.testFlag(CloseOnEscape))