From a2a8a9ea0159cc6239737de2d745129f01c94d37 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 29 Apr 2013 20:26:25 +0200 Subject: Make access to xkbcommon_workaround.h more generic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It makes more sense to keep this workaround header together with the other libxkbcommon files for a better access point since it's used by several *.pro files. Change-Id: I63d4eb58f6e7f3852834e41c4b6e058a2c962233 Reviewed-by: Oswald Buddenhagen Reviewed-by: Samuel Rødal --- .../platforminputcontexts/compose/generator/qtablegenerator.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/platforminputcontexts/compose/generator') diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp index 400f7aece8..f746207cc0 100644 --- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp +++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp @@ -49,7 +49,10 @@ #include #include + +#ifdef XKBCOMMON_0_2_0 #include +#endif //#define DEBUG_GENERATOR @@ -258,6 +261,7 @@ ushort TableGenerator::keysymToUtf8(quint32 sym) int bytes; chars.resize(8); +#ifdef XKBCOMMON_0_2_0 if (needWorkaround(sym)) { quint32 codepoint; if (sym == XKB_KEY_KP_Space) @@ -269,6 +273,9 @@ ushort TableGenerator::keysymToUtf8(quint32 sym) } else { bytes = xkb_keysym_to_utf8(sym, chars.data(), chars.size()); } +#else + bytes = xkb_keysym_to_utf8(sym, chars.data(), chars.size()); +#endif if (bytes == -1) qWarning("TableGenerator::keysymToUtf8 - buffer too small"); -- cgit v1.2.3