Fix BlackBerry10 build on NDKs prior to 10.2.1

This commit adds a dependency checking for a recently
introduced define. On NDKs 10.2.1 and later it compiles
with support for VIRTUALKEYBOARD_LAYOUT_ALPHANUMERIC.
NDKs 10.2.0 and earlier do not know this define
and therefore it will be ignored.
This is necessary because there is no newer NDK
publicly available than 10.2.0.
Assuming pure QNX SDKs are missing the define completely,
we are only including it on recent BB NDKs.

Change-Id: I6f814e5c2d77c50edf8534f3567b157f71147555
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
This commit is contained in:
Wolfgang Bremer 2014-01-16 11:18:25 +01:00 committed by The Qt Project
parent 11442778ed
commit 93154216ca

View File

@ -46,6 +46,9 @@
#include <bps/event.h>
#include <bps/locale.h>
#include <bps/virtualkeyboard.h>
#if defined(Q_OS_BLACKBERRY)
#include <bbndk.h>
#endif
#if defined(QQNXVIRTUALKEYBOARD_DEBUG)
#define qVirtualKeyboardDebug qDebug
@ -133,8 +136,12 @@ virtualkeyboard_layout_t QQnxVirtualKeyboardBps::keyboardLayout() const
return VIRTUALKEYBOARD_LAYOUT_PIN;
case Password:
return VIRTUALKEYBOARD_LAYOUT_PASSWORD;
#if defined(Q_OS_BLACKBERRY)
#if BBNDK_VERSION_AT_LEAST(10, 2, 1)
case Alphanumeric:
return VIRTUALKEYBOARD_LAYOUT_ALPHANUMERIC;
#endif
#endif
case Default: // fall through
default:
return VIRTUALKEYBOARD_LAYOUT_DEFAULT;