From c9b9a0ea2f274688da26af20102d349336fdb2a0 Mon Sep 17 00:00:00 2001 From: Elena Zaretskaya Date: Fri, 11 Jan 2019 10:11:03 -0500 Subject: Ability to switch language under platform eglfs/linuxfb I need to change keymap under platforms eglfs and linuxfb (without wayland). I use the function QEglFSFunctions::loadKeymap(const QString&), but there's no way to switch between english and another language than to press AltGr as a modifier. I added the function that allows to change the language. And also added the ability to switch the keymap and language for the platform linuxfb and also added the ability to switch the keymap and language for the platform linuxfb Task-number: QTBUG-72452 Change-Id: I37432cf60d375555bea2bf668ec1387322b4964f Reviewed-by: Laszlo Agocs --- src/platformheaders/eglfsfunctions/qeglfsfunctions.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/platformheaders/eglfsfunctions/qeglfsfunctions.h') diff --git a/src/platformheaders/eglfsfunctions/qeglfsfunctions.h b/src/platformheaders/eglfsfunctions/qeglfsfunctions.h index 7165c3cff4..869fe7ce3f 100644 --- a/src/platformheaders/eglfsfunctions/qeglfsfunctions.h +++ b/src/platformheaders/eglfsfunctions/qeglfsfunctions.h @@ -49,7 +49,9 @@ class QEglFSFunctions { public: typedef void (*LoadKeymapType)(const QString &filename); + typedef void (*SwitchLangType)(); static QByteArray loadKeymapTypeIdentifier() { return QByteArrayLiteral("EglFSLoadKeymap"); } + static QByteArray switchLangTypeIdentifier() { return QByteArrayLiteral("EglFSSwitchLang"); } static void loadKeymap(const QString &filename) { @@ -58,6 +60,13 @@ public: func(filename); } + static void switchLang() + { + SwitchLangType func = reinterpret_cast(QGuiApplication::platformFunction(switchLangTypeIdentifier())); + if (func) + func(); + } + typedef int (*Vsp2AddLayerType)(const QScreen *screen, int dmabufFd, const QSize &size, const QPoint &position, uint drmPixelFormat, uint bytesPerLine); static QByteArray vsp2AddLayerTypeIdentifier() { return QByteArrayLiteral("EglFSVsp2AddLayer"); } -- cgit v1.2.3