diff options
author | Roger Maclean <rmaclean@qnx.com> | 2013-11-12 11:58:42 -0500 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-24 19:17:36 +0100 |
commit | 8a5c261954836e2aeac53f5e6581135ffaa9a2e0 (patch) | |
tree | edc7eb5c203f571ddce7026e177a65d337d29632 /src/plugins/platforms/qnx/qqnxnativeinterface.h | |
parent | 432674d787124ecfd6f3e1cca74f13f0f0096e53 (diff) |
QNX: Add support for BB10 text highlighting and spell checking
Adds the QPA side of the support for text highlighting during text
entry and for spell checking. The changes are compatible with
existing Qt text controls though require more advanced ones to have
any effect.
QQnxInputContext has three colors it can now use for highlighting
text during composition to represent the active region, auto
corrected text and reverted text. If any of these colors is invalid,
that form of highlighting is not used. By default, only the active
region color has a valid default which corresponds to the highlighting
capabilities of classes such as QQuickTextInput. The QNX QPA native
interface has been augmented with the ability to get a function
pointer that can be used to set any or all of the three colors. The
set of colors is reset to the default at any time that focus changes
to ensure appropriate behavior if there is a mix of controls.
It's worth noting that while the colors can be changed even when
used with one of the standard Qt text controls, the auto-correct
color will not show up since it is applied immediately before
committing the text. Appropriate display of this highlighting
requires that the control maintain the highlighting for a period
after committing the text.
Spell checking is provided via another function accessible through
the QNX QPA native interface. This takes a string and a callback
function to be called once spell checking is complete.
As a slightly unrelated change, toSpannableString now uses
toWCharArray to convert the QString to UTF-32 as required by IMF,
the previous code was invalid in the case of strings containing
UTF-16 surrogate pairs.
Removed some extraneous includes.
Change-Id: Ifdf3744d1990e0560d1923bca5db30953dea0192
Reviewed-by: Roger Maclean <rmaclean@qnx.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxnativeinterface.h')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxnativeinterface.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.h b/src/plugins/platforms/qnx/qqnxnativeinterface.h index dfd386214e..e2fdd32689 100644 --- a/src/plugins/platforms/qnx/qqnxnativeinterface.h +++ b/src/plugins/platforms/qnx/qqnxnativeinterface.h @@ -51,8 +51,10 @@ class QQnxNativeInterface : public QPlatformNativeInterface public: void *nativeResourceForWindow(const QByteArray &resource, QWindow *window); void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen); + void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context); void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value); + NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource); }; QT_END_NAMESPACE |