summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qkeymapper_qpa.cpp
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2012-10-11 07:40:14 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-13 05:51:19 +0200
commitbcbcf5e71884b006b0c89c4509af171de5aa59d7 (patch)
tree98d6a871d32b87e509ba0dd62d249c0a9be4f163 /src/gui/kernel/qkeymapper_qpa.cpp
parent9e44b76093e08fed7b57b52246f39a38f3265727 (diff)
Be able to obtain list of possible key combinations in platform integration
As there is no way to obtain the list of possible keys for a shortcut in a platform independent way there needs to be a way to get that from the platform integration. Task-number: QTBUG-26902 Change-Id: I520add56ee09d5c3c58709fb29dad2fbfe4c9d0b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/gui/kernel/qkeymapper_qpa.cpp')
-rw-r--r--src/gui/kernel/qkeymapper_qpa.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qkeymapper_qpa.cpp b/src/gui/kernel/qkeymapper_qpa.cpp
index 5073720ed8..0c225a4c91 100644
--- a/src/gui/kernel/qkeymapper_qpa.cpp
+++ b/src/gui/kernel/qkeymapper_qpa.cpp
@@ -43,6 +43,8 @@
#include <qdebug.h>
#include <private/qevent_p.h>
#include <private/qlocale_p.h>
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
QT_BEGIN_NAMESPACE
@@ -66,7 +68,10 @@ void QKeyMapperPrivate::clearMappings()
QList<int> QKeyMapperPrivate::possibleKeys(QKeyEvent *e)
{
- QList<int> result;
+ QList<int> result = QGuiApplicationPrivate::platformIntegration()->possibleKeys(e);
+ if (!result.isEmpty())
+ return result;
+
if (e->key() && (e->key() != Qt::Key_unknown))
result << int(e->key() + e->modifiers());
else if (!e->text().isEmpty())