path: root/src/platformheaders/eglfsfunctions/qeglfsfunctions.h
diff options
authorElena Zaretskaya <>2019-01-11 10:11:03 -0500
committerElena Zaretskaya <>2019-01-25 15:00:07 +0000
commitc9b9a0ea2f274688da26af20102d349336fdb2a0 (patch)
tree53168ab420947b6ac5388e87c0e601b8f590f5e5 /src/platformheaders/eglfsfunctions/qeglfsfunctions.h
parentc4e7f3ab6555c87fb41c5f341524445283720e6a (diff)
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 <>
Diffstat (limited to 'src/platformheaders/eglfsfunctions/qeglfsfunctions.h')
1 files changed, 9 insertions, 0 deletions
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
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:
+ static void switchLang()
+ {
+ SwitchLangType func = reinterpret_cast<SwitchLangType>(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"); }