aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2016-11-04 15:25:38 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2020-04-08 15:11:07 +0200
commitdfb10af1e9ff1fa6845758fc37f3687f63e05a22 (patch)
treee70bc33673f733dcabcade2cb44d4da4e9aa075e
parent2c12b9c920f6ea5635fe52ab52715d54e8517f1c (diff)
Move qtvirtualkeyboard over to the new configure system
Adjust configuration from passing lots of CONFIG+=... on the qmake command line to proper command line arguments. Add configure tests for external libraries we might end up using. Adjusted the build documentation to reflect the new way of configuring. Replace all custom HAVE_FOO feature defines with proper QT_CONFIG() checks. This patch does not handle the options -disable-hunspell, -no-bundle-ctime and -no-bundle-pinyin as they are not a necessity to properly support the CMake port and can be added later. [ChangeLog][Important Behavior Changes] The build system was switched to the new configure system. See documentation for updated instructions. Change-Id: I52f863a4d0217bde38fa3fc5e5967b7d8dcb06e0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--config.tests/hunspell/hunspell.pro1
-rw-r--r--config.tests/hunspell/main.cpp43
-rw-r--r--configure.json5
-rw-r--r--examples/virtualkeyboard/basic/basic.pro10
-rw-r--r--src/config.pri123
-rw-r--r--src/plugins/hangul/hangul.pro4
-rw-r--r--src/plugins/hunspell/hunspell.pro5
-rw-r--r--src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod.pro6
-rw-r--r--src/plugins/hunspell/plugin/plugin.pro6
-rw-r--r--src/plugins/lipi-toolkit/plugin/lipiinputmethod.cpp14
-rw-r--r--src/plugins/lipi-toolkit/plugin/lipiinputmethod_p.h3
-rw-r--r--src/plugins/lipi-toolkit/plugin/plugin.pro16
-rw-r--r--src/plugins/myscript/plugin/plugin.pro92
-rw-r--r--src/plugins/openwnn/openwnn.pro2
-rw-r--r--src/plugins/openwnn/plugin/plugin.pro4
-rw-r--r--src/plugins/pinyin/plugin/plugin.pro4
-rw-r--r--src/plugins/plugins.pro24
-rw-r--r--src/plugins/t9write/plugin/plugin.pro95
-rw-r--r--src/plugins/t9write/plugin/t9write_p.h6
-rw-r--r--src/plugins/tcime/plugin/plugin.pro16
-rw-r--r--src/plugins/tcime/plugin/tcinputmethod.cpp32
-rw-r--r--src/plugins/tcime/plugin/tcinputmethod_p.h1
-rw-r--r--src/plugins/thai/plugin/plugin.pro7
-rw-r--r--src/shared.pri5
-rw-r--r--src/src.pro1
-rw-r--r--src/virtualkeyboard/configure.json497
-rw-r--r--src/virtualkeyboard/configure.pri181
-rw-r--r--src/virtualkeyboard/desktopinputpanel.cpp7
-rw-r--r--src/virtualkeyboard/doc/src/build.qdoc201
-rw-r--r--src/virtualkeyboard/qvirtualkeyboard_global.h1
-rw-r--r--src/virtualkeyboard/qvirtualkeyboard_global_p.h59
-rw-r--r--src/virtualkeyboard/styles/styles.pro18
-rw-r--r--src/virtualkeyboard/virtualkeyboard.pro104
33 files changed, 1125 insertions, 468 deletions
diff --git a/config.tests/hunspell/hunspell.pro b/config.tests/hunspell/hunspell.pro
new file mode 100644
index 00000000..28dcadcb
--- /dev/null
+++ b/config.tests/hunspell/hunspell.pro
@@ -0,0 +1 @@
+SOURCES += main.cpp
diff --git a/config.tests/hunspell/main.cpp b/config.tests/hunspell/main.cpp
new file mode 100644
index 00000000..d37e6983
--- /dev/null
+++ b/config.tests/hunspell/main.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtualkeyboard module
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <hunspell/hunspell.h>
+
+int main(int argc, char** argv)
+{
+ Hunspell_create(0, 0);
+ return 0;
+}
diff --git a/configure.json b/configure.json
new file mode 100644
index 00000000..06bf1afe
--- /dev/null
+++ b/configure.json
@@ -0,0 +1,5 @@
+{
+ "subconfigs": [
+ "src/virtualkeyboard"
+ ]
+}
diff --git a/examples/virtualkeyboard/basic/basic.pro b/examples/virtualkeyboard/basic/basic.pro
index 27ad4141..10a0c726 100644
--- a/examples/virtualkeyboard/basic/basic.pro
+++ b/examples/virtualkeyboard/basic/basic.pro
@@ -1,6 +1,9 @@
TEMPLATE = app
TARGET = basic
QT += qml quick
+
+QT_FOR_CONFIG += virtualkeyboard
+
SOURCES += main.cpp
CONFIG += link_pkgconfig
static {
@@ -22,12 +25,7 @@ OTHER_FILES += \
content/TextArea.qml \
content/TextField.qml \
-disable-xcb {
- message("The disable-xcb option has been deprecated. Please use disable-desktop instead.")
- CONFIG += disable-desktop
-}
-
-disable-desktop|android-embedded|!isEmpty(CROSS_COMPILE)|qnx {
+!qtConfig(vkb-desktop) {
DEFINES += MAIN_QML=\\\"basic-b2qt.qml\\\"
} else {
DEFINES += MAIN_QML=\\\"Basic.qml\\\"
diff --git a/src/config.pri b/src/config.pri
deleted file mode 100644
index 435ae5e1..00000000
--- a/src/config.pri
+++ /dev/null
@@ -1,123 +0,0 @@
-# Enable handwriting
-handwriting:!lipi-toolkit:!t9write:!myscript {
- include(plugins/myscript/3rdparty/myscript/myscript.pri)
- equals(MYSCRIPT_FOUND, 1) {
- CONFIG += myscript
- } else {
- include(plugins/t9write/3rdparty/t9write/t9write-build.pri)
- equals(T9WRITE_FOUND, 1): CONFIG += t9write
- else: CONFIG += lipi-toolkit
- }
-}
-myscript {
- !handwriting: include(plugins/myscript/3rdparty/myscript/myscript.pri)
-}
-t9write {
- !handwriting: include(plugins/t9write/3rdparty/t9write/t9write-build.pri)
- equals(T9WRITE_CJK_FOUND, 1): CONFIG += t9write-cjk
- equals(T9WRITE_ALPHABETIC_FOUND, 1): CONFIG += t9write-alphabetic
-}
-
-# Enable pkgconfig
-win32: CONFIG += no-pkg-config
-!no-pkg-config: CONFIG += link_pkgconfig
-
-# Enable Hunspell
-!disable-hunspell:!hunspell-library:!hunspell-package {
- exists(plugins/hunspell/3rdparty/hunspell/src/hunspell/hunspell.h): CONFIG += hunspell-library
- else:link_pkgconfig:packagesExist(hunspell): CONFIG += hunspell-package
- else: CONFIG += disable-hunspell
-}
-disable-hunspell: CONFIG -= hunspell
-else: CONFIG += hunspell
-
-# Disable built-in layouts
-disable-layouts {
- message("The built-in layouts are now excluded from the Qt Virtual Keyboard plugin.")
-} else {
- # Enable languages by features
- openwnn: CONFIG += lang-ja_JP
- hangul: CONFIG += lang-ko_KR
- pinyin: CONFIG += lang-zh_CN
- tcime|zhuyin|cangjie: CONFIG += lang-zh_TW
- thai: CONFIG += lang-th_TH
-
- # Use all languages by default
- !contains(CONFIG, lang-.*): CONFIG += lang-all
-
- # Flag for activating all languages
- lang-all: CONFIG += \
- lang-ar_AR \
- lang-bg_BG \
- lang-cs_CZ \
- lang-da_DK \
- lang-de_DE \
- lang-el_GR \
- lang-en_GB \
- lang-en_US \
- lang-es_ES \
- lang-es_MX \
- lang-et_EE \
- lang-fa_FA \
- lang-fi_FI \
- lang-fr_CA \
- lang-fr_FR \
- lang-he_IL \
- lang-hi_IN \
- lang-hr_HR \
- lang-hu_HU \
- lang-id_ID \
- lang-it_IT \
- lang-ja_JP \
- lang-ko_KR \
- lang-ms_MY \
- lang-nb_NO \
- lang-nl_NL \
- lang-pl_PL \
- lang-pt_BR \
- lang-pt_PT \
- lang-ro_RO \
- lang-ru_RU \
- lang-sk_SK \
- lang-sl_SI \
- lang-sq_AL \
- lang-sr_SP \
- lang-sv_SE \
- lang-th_TH \
- lang-tr_TR \
- lang-uk_UA \
- lang-vi_VN \
- lang-zh_CN \
- lang-zh_TW
-}
-
-# Common variables
-LAYOUTS_BASE = $$PWD/virtualkeyboard
-LAYOUTS_PREFIX = /QtQuick/VirtualKeyboard
-VIRTUALKEYBOARD_INSTALL_DATA = $$[QT_INSTALL_DATA]/qtvirtualkeyboard
-
-# Enable features by languages
-contains(CONFIG, lang-ja.*)|lang-all: CONFIG += openwnn
-contains(CONFIG, lang-ko.*)|lang-all: CONFIG += hangul
-contains(CONFIG, lang-zh(_CN)?)|lang-all: CONFIG += pinyin
-contains(CONFIG, lang-zh(_TW)?)|lang-all: CONFIG += tcime
-contains(CONFIG, lang-th.*)|lang-all: CONFIG += thai
-
-# Feature dependencies
-tcime {
- !cangjie:!zhuyin: CONFIG += cangjie zhuyin
-} else {
- cangjie|zhuyin: CONFIG += tcime
-}
-
-# Deprecated configuration flags
-disable-xcb {
- message("The disable-xcb option has been deprecated. Please use disable-desktop instead.")
- CONFIG += disable-desktop
-}
-
-# Enables logging of sensitive information, such as key events.
-# Should never be enabled by default.
-# It's defined here rather than virtualkeyboarddebug_p.h
-# so that the plugins can use it.
-sensitive-debug: DEFINES += SENSITIVE_DEBUG
diff --git a/src/plugins/hangul/hangul.pro b/src/plugins/hangul/hangul.pro
index 5ce08a65..f2540ab2 100644
--- a/src/plugins/hangul/hangul.pro
+++ b/src/plugins/hangul/hangul.pro
@@ -1,6 +1,8 @@
TARGET = qtvirtualkeyboard_hangul
QT += qml virtualkeyboard
+include(../../shared.pri)
+
HEADERS += \
hangul_p.h \
hangulplugin.h \
@@ -18,8 +20,6 @@ DEFINES += \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_FROM_BYTEARRAY
-include(../../config.pri)
-
LAYOUT_FILES += \
$$LAYOUTS_BASE/content/layouts/ko_KR/dialpad.fallback \
$$LAYOUTS_BASE/content/layouts/ko_KR/digits.fallback \
diff --git a/src/plugins/hunspell/hunspell.pro b/src/plugins/hunspell/hunspell.pro
index fbe25a0a..a34a56e7 100644
--- a/src/plugins/hunspell/hunspell.pro
+++ b/src/plugins/hunspell/hunspell.pro
@@ -1,11 +1,12 @@
TEMPLATE = subdirs
-include(../../config.pri)
+QT_FOR_CONFIG += virtualkeyboard-private
SUBDIRS += \
hunspellinputmethod \
plugin
-hunspell-library {
+
+qtConfig(3rdparty-hunspell) {
SUBDIRS += 3rdparty/hunspell
hunspellinputmethod.depends += 3rdparty/hunspell
}
diff --git a/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod.pro b/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod.pro
index 9dc2e654..9948b01f 100644
--- a/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod.pro
+++ b/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod.pro
@@ -22,9 +22,7 @@ DEFINES += \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_FROM_BYTEARRAY
-include(../../../config.pri)
-
-hunspell-library: QMAKE_USE += hunspell
-else:hunspell-package: PKGCONFIG += hunspell
+qtConfig(system-hunspell):QMAKE_USE += hunspell
+else:qtConfig(3rdparty-hunspell): PKGCONFIG += hunspell
load(qt_module)
diff --git a/src/plugins/hunspell/plugin/plugin.pro b/src/plugins/hunspell/plugin/plugin.pro
index 1981b5e5..c791dee3 100644
--- a/src/plugins/hunspell/plugin/plugin.pro
+++ b/src/plugins/hunspell/plugin/plugin.pro
@@ -1,6 +1,8 @@
TARGET = qtvirtualkeyboard_hunspell
QT += qml virtualkeyboard hunspellinputmethod-private
+include(../../../shared.pri)
+
HEADERS += \
hunspellplugin.h
SOURCES += \
@@ -14,9 +16,7 @@ DEFINES += \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_FROM_BYTEARRAY
-include(../../../config.pri)
-
-hunspell-library {
+qtConfig(3rdparty-hunspell) {
exists(../3rdparty/hunspell/data) {
hunspell_data.files = \
$$PWD/../3rdparty/hunspell/data/*.dic \
diff --git a/src/plugins/lipi-toolkit/plugin/lipiinputmethod.cpp b/src/plugins/lipi-toolkit/plugin/lipiinputmethod.cpp
index 829692c8..8429c74c 100644
--- a/src/plugins/lipi-toolkit/plugin/lipiinputmethod.cpp
+++ b/src/plugins/lipi-toolkit/plugin/lipiinputmethod.cpp
@@ -37,7 +37,7 @@
#include <QtVirtualKeyboard/qvirtualkeyboardtrace.h>
#include <QtVirtualKeyboard/private/handwritinggesturerecognizer_p.h>
-#ifdef QT_HUNSPELLINPUTMETHOD_LIB
+#if QT_CONFIG(hunspell)
#include <QtHunspellInputMethod/private/hunspellinputmethod_p_p.h>
#endif
@@ -59,7 +59,7 @@
QT_BEGIN_NAMESPACE
namespace QtVirtualKeyboard {
-#ifdef QT_HUNSPELLINPUTMETHOD_LIB
+#if QT_CONFIG(hunspell)
#define LipiInputMethodPrivateBase HunspellInputMethodPrivate
#else
#define LipiInputMethodPrivateBase DummyPrivate
@@ -73,7 +73,7 @@ class LipiInputMethodPrivate : public LipiInputMethodPrivateBase
Q_DECLARE_PUBLIC(LipiInputMethod)
public:
LipiInputMethodPrivate(LipiInputMethod *q_ptr) :
-#ifdef QT_HUNSPELLINPUTMETHOD_LIB
+#if QT_CONFIG(hunspell)
LipiInputMethodPrivateBase(static_cast<HunspellInputMethod *>(q_ptr)),
#else
LipiInputMethodPrivateBase(),
@@ -275,7 +275,7 @@ public:
} else if (swipeTouchCount == 2) {
// Double swipe: commit word, or insert space
cancelRecognition();
-#ifdef QT_HUNSPELLINPUTMETHOD_LIB
+#if QT_CONFIG(hunspell)
int activeWordIndex = wordCandidates.index();
if (activeWordIndex != -1) {
q->selectionListItemSelected(QVirtualKeyboardSelectionListModel::Type::WordCandidateList, activeWordIndex);
@@ -513,7 +513,7 @@ QList<QVirtualKeyboardInputEngine::InputMode> LipiInputMethod::inputModes(const
bool LipiInputMethod::setInputMode(const QString &locale, QVirtualKeyboardInputEngine::InputMode inputMode)
{
Q_D(LipiInputMethod);
-#ifdef QT_HUNSPELLINPUTMETHOD_LIB
+#if QT_CONFIG(hunspell)
HunspellInputMethod::setInputMode(locale, inputMode);
#else
Q_UNUSED(locale)
@@ -540,7 +540,7 @@ bool LipiInputMethod::setTextCase(QVirtualKeyboardInputEngine::TextCase textCase
{
Q_D(LipiInputMethod);
d->textCase = textCase;
-#ifdef QT_HUNSPELLINPUTMETHOD_LIB
+#if QT_CONFIG(hunspell)
HunspellInputMethod::setTextCase(textCase);
#endif
return true;
@@ -548,7 +548,7 @@ bool LipiInputMethod::setTextCase(QVirtualKeyboardInputEngine::TextCase textCase
bool LipiInputMethod::keyEvent(Qt::Key key, const QString &text, Qt::KeyboardModifiers modifiers)
{
-#ifdef QT_HUNSPELLINPUTMETHOD_LIB
+#if QT_CONFIG(hunspell)
Q_D(LipiInputMethod);
switch (key) {
case Qt::Key_Enter:
diff --git a/src/plugins/lipi-toolkit/plugin/lipiinputmethod_p.h b/src/plugins/lipi-toolkit/plugin/lipiinputmethod_p.h
index abbccf90..e235c32d 100644
--- a/src/plugins/lipi-toolkit/plugin/lipiinputmethod_p.h
+++ b/src/plugins/lipi-toolkit/plugin/lipiinputmethod_p.h
@@ -41,7 +41,8 @@
// We mean it.
//
-#ifdef QT_HUNSPELLINPUTMETHOD_LIB
+#include <QtVirtualKeyboard/private/qvirtualkeyboard_global_p.h>
+#if QT_CONFIG(hunspell)
#include <QtHunspellInputMethod/private/hunspellinputmethod_p.h>
#define LipiInputMethodBase HunspellInputMethod
#else
diff --git a/src/plugins/lipi-toolkit/plugin/plugin.pro b/src/plugins/lipi-toolkit/plugin/plugin.pro
index e342af14..562443a8 100644
--- a/src/plugins/lipi-toolkit/plugin/plugin.pro
+++ b/src/plugins/lipi-toolkit/plugin/plugin.pro
@@ -2,6 +2,8 @@ TARGET = qtvirtualkeyboard_lipi
CONFIG += exceptions
QT += qml virtualkeyboard-private
+include(../../../shared.pri)
+
HEADERS += \
lipiinputmethod_p.h \
lipiplugin.h \
@@ -21,8 +23,6 @@ DEFINES += \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_FROM_BYTEARRAY
-include(../../../config.pri)
-
INCLUDEPATH += \
../3rdparty/lipi-toolkit/src/include \
../3rdparty/lipi-toolkit/src/util/lib
@@ -37,16 +37,16 @@ ltk_projects.path = $$VIRTUALKEYBOARD_INSTALL_DATA/lipi_toolkit
INSTALLS += ltk_projects
!prefix_build: COPIES += ltk_projects
-!disable-hunspell {
+qtConfig(hunspell) {
QT += hunspellinputmethod-private
}
LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fallback/handwriting.qml
-contains(CONFIG, lang-en(_GB)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_GB/handwriting.fallback
-contains(CONFIG, lang-en(_US)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_US/handwriting.fallback
-contains(CONFIG, lang-id.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/id_ID/handwriting.fallback
-contains(CONFIG, lang-ms.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ms_MY/handwriting.fallback
-contains(CONFIG, lang-nl.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/nl_NL/handwriting.fallback
+qtConfig(vkb-lang-en_GB): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_GB/handwriting.fallback
+qtConfig(vkb-lang-en_US): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_US/handwriting.fallback
+qtConfig(vkb-lang-id.ID): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/id_ID/handwriting.fallback
+qtConfig(vkb-lang-ms_MY): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ms_MY/handwriting.fallback
+qtConfig(vkb-lang-nl_NL): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/nl_NL/handwriting.fallback
OTHER_FILES += \
$$LAYOUT_FILES
diff --git a/src/plugins/myscript/plugin/plugin.pro b/src/plugins/myscript/plugin/plugin.pro
index 0bb8a90e..81f62de8 100644
--- a/src/plugins/myscript/plugin/plugin.pro
+++ b/src/plugins/myscript/plugin/plugin.pro
@@ -1,11 +1,13 @@
TARGET = qtvirtualkeyboard_myscript
QT += qml virtualkeyboard
-include(../../../config.pri)
-
-equals(MYSCRIPT_FOUND, 0): \
+!qtConfig(vkb-myscript) {
error("MyScript SDK could not be found. For more information, see" \
"the documentation in Building Qt Virtual Keyboard")
+}
+
+include(../../../shared.pri)
+
HEADERS += \
myscriptplugin.h \
myscriptinputmethod_p.h \
@@ -48,48 +50,48 @@ INSTALLS += \
myscript_resources
LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fallback/handwriting.qml
-contains(CONFIG, lang-en(_GB)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_GB/handwriting.fallback
-contains(CONFIG, lang-en(_US)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_US/handwriting.fallback
-contains(CONFIG, lang-ar.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ar_AR/handwriting.qml
-contains(CONFIG, lang-bg.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/bg_BG/handwriting.qml
-contains(CONFIG, lang-cs.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/cs_CZ/handwriting.qml
-contains(CONFIG, lang-da.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/da_DK/handwriting.fallback
-contains(CONFIG, lang-de.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/de_DE/handwriting.fallback
-contains(CONFIG, lang-el.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/el_GR/handwriting.qml
-contains(CONFIG, lang-es(_ES)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/es_ES/handwriting.qml
-contains(CONFIG, lang-es(_MX)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/es_MX/handwriting.qml
-contains(CONFIG, lang-et.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/et_EE/handwriting.fallback
-contains(CONFIG, lang-fa.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fa_FA/handwriting.qml
-contains(CONFIG, lang-fi.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fi_FI/handwriting.fallback
-contains(CONFIG, lang-fr(_FR)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fr_FR/handwriting.fallback
-contains(CONFIG, lang-fr(_CA)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fr_CA/handwriting.fallback
-contains(CONFIG, lang-he.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/he_IL/handwriting.qml
-contains(CONFIG, lang-hi.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/hi_IN/handwriting.qml
-contains(CONFIG, lang-hr.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/hr_HR/handwriting.qml
-contains(CONFIG, lang-hu.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/hu_HU/handwriting.qml
-contains(CONFIG, lang-id.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/id_ID/handwriting.fallback
-contains(CONFIG, lang-it.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/it_IT/handwriting.fallback
-contains(CONFIG, lang-ja.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ja_JP/handwriting.qml
-contains(CONFIG, lang-ko.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ko_KR/handwriting.qml
-contains(CONFIG, lang-ms.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ms_MY/handwriting.fallback
-contains(CONFIG, lang-nb.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/nb_NO/handwriting.fallback
-contains(CONFIG, lang-nl.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/nl_NL/handwriting.fallback
-contains(CONFIG, lang-pl.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pl_PL/handwriting.fallback
-contains(CONFIG, lang-pt(_BR)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pt_BR/handwriting.fallback
-contains(CONFIG, lang-pt(_PT)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pt_PT/handwriting.fallback
-contains(CONFIG, lang-ro.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ro_RO/handwriting.qml
-contains(CONFIG, lang-ru.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ru_RU/handwriting.fallback
-contains(CONFIG, lang-sk.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sk_SK/handwriting.fallback
-contains(CONFIG, lang-sl.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sl_SI/handwriting.fallback
-contains(CONFIG, lang-sq.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sq_AL/handwriting.fallback
-contains(CONFIG, lang-sr.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sr_SP/handwriting.qml
-contains(CONFIG, lang-sv.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sv_SE/handwriting.fallback
-contains(CONFIG, lang-th.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/th_TH/handwriting.fallback
-contains(CONFIG, lang-tr.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/tr_TR/handwriting.fallback
-contains(CONFIG, lang-uk.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/uk_UA/handwriting.fallback
-contains(CONFIG, lang-vi.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/vi_VN/handwriting.fallback
-contains(CONFIG, lang-zh(_CN)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/zh_CN/handwriting.qml
-contains(CONFIG, lang-zh(_TW)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/zh_TW/handwriting.qml
+qtConfig(vkb-lang-en_GB): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_GB/handwriting.fallback
+qtConfig(vkb-lang-en_US): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_US/handwriting.fallback
+qtConfig(vkb-lang-ar_AR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ar_AR/handwriting.qml
+qtConfig(vkb-lang-bg_BG): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/bg_BG/handwriting.qml
+qtConfig(vkb-lang-cs_CZ): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/cs_CZ/handwriting.qml
+qtConfig(vkb-lang-da_DK): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/da_DK/handwriting.fallback
+qtConfig(vkb-lang-de_DE): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/de_DE/handwriting.fallback
+qtConfig(vkb-lang-el_GR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/el_GR/handwriting.qml
+qtConfig(vkb-lang-es_ES): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/es_ES/handwriting.qml
+qtConfig(vkb-lang-es_MX): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/es_MX/handwriting.qml
+qtConfig(vkb-lang-et_EE): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/et_EE/handwriting.fallback
+qtConfig(vkb-lang-fa_FA): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fa_FA/handwriting.qml
+qtConfig(vkb-lang-fi_FI): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fi_FI/handwriting.fallback
+qtConfig(vkb-lang-fr_FR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fr_FR/handwriting.fallback
+qtConfig(vkb-lang-fr_CA): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fr_CA/handwriting.fallback
+qtConfig(vkb-lang-he_IL): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/he_IL/handwriting.qml
+qtConfig(vkb-lang-hi_IN): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/hi_IN/handwriting.qml
+qtConfig(vkb-lang-hr_HR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/hr_HR/handwriting.qml
+qtConfig(vkb-lang-hu_HU): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/hu_HU/handwriting.qml
+qtConfig(vkb-lang-id_ID): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/id_ID/handwriting.fallback
+qtConfig(vkb-lang-it_IT): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/it_IT/handwriting.fallback
+qtConfig(vkb-lang-ja_JP): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ja_JP/handwriting.qml
+qtConfig(vkb-lang-ko_KR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ko_KR/handwriting.qml
+qtConfig(vkb-lang-ms_MY): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ms_MY/handwriting.fallback
+qtConfig(vkb-lang-nb_NO): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/nb_NO/handwriting.fallback
+qtConfig(vkb-lang-nl_NL): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/nl_NL/handwriting.fallback
+qtConfig(vkb-lang-pl_PL): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pl_PL/handwriting.fallback
+qtConfig(vkb-lang-pt_BR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pt_BR/handwriting.fallback
+qtConfig(vkb-lang-pt_PT): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pt_PT/handwriting.fallback
+qtConfig(vkb-lang-ro_RO): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ro_RO/handwriting.qml
+qtConfig(vkb-lang-ru_RU): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ru_RU/handwriting.fallback
+qtConfig(vkb-lang-sk_SK): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sk_SK/handwriting.fallback
+qtConfig(vkb-lang-sl_SI): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sl_SI/handwriting.fallback
+qtConfig(vkb-lang-sq_AL): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sq_AL/handwriting.fallback
+qtConfig(vkb-lang-sr_SP): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sr_SP/handwriting.qml
+qtConfig(vkb-lang-sv_SE): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sv_SE/handwriting.fallback
+qtConfig(vkb-lang-th_TH): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/th_TH/handwriting.fallback
+qtConfig(vkb-lang-tr_TR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/tr_TR/handwriting.fallback
+qtConfig(vkb-lang-uk_UA): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/uk_UA/handwriting.fallback
+qtConfig(vkb-lang-vi_VN): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/vi_VN/handwriting.fallback
+qtConfig(vkb-lang-zh_CN): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/zh_CN/handwriting.qml
+qtConfig(vkb-lang-zh_TW): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/zh_TW/handwriting.qml
OTHER_FILES += \
$$LAYOUT_FILES
diff --git a/src/plugins/openwnn/openwnn.pro b/src/plugins/openwnn/openwnn.pro
index 33b18551..bb639c86 100644
--- a/src/plugins/openwnn/openwnn.pro
+++ b/src/plugins/openwnn/openwnn.pro
@@ -1,5 +1,7 @@
TEMPLATE = subdirs
+include(../../../shared.pri)
+
SUBDIRS += \
3rdparty/openwnn \
plugin
diff --git a/src/plugins/openwnn/plugin/plugin.pro b/src/plugins/openwnn/plugin/plugin.pro
index 7e11d890..51a4a2b7 100644
--- a/src/plugins/openwnn/plugin/plugin.pro
+++ b/src/plugins/openwnn/plugin/plugin.pro
@@ -1,6 +1,8 @@
TARGET = qtvirtualkeyboard_openwnn
QT += qml virtualkeyboard
+include(../../../shared.pri)
+
HEADERS += \
openwnnplugin.h \
openwnninputmethod_p.h
@@ -16,8 +18,6 @@ DEFINES += \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_FROM_BYTEARRAY
-include(../../../config.pri)
-
LAYOUT_FILES += \
$$LAYOUTS_BASE/content/layouts/ja_JP/dialpad.fallback \
$$LAYOUTS_BASE/content/layouts/ja_JP/digits.fallback \
diff --git a/src/plugins/pinyin/plugin/plugin.pro b/src/plugins/pinyin/plugin/plugin.pro
index f66c887e..5b11fe8c 100644
--- a/src/plugins/pinyin/plugin/plugin.pro
+++ b/src/plugins/pinyin/plugin/plugin.pro
@@ -1,6 +1,8 @@
TARGET = qtvirtualkeyboard_pinyin
QT += qml virtualkeyboard
+include(../../../shared.pri)
+
HEADERS += \
pinyindecoderservice_p.h \
pinyininputmethod_p.h \
@@ -18,8 +20,6 @@ DEFINES += \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_FROM_BYTEARRAY
-include(../../../config.pri)
-
LAYOUT_FILES += \
$$LAYOUTS_BASE/content/layouts/zh_CN/dialpad.fallback \
$$LAYOUTS_BASE/content/layouts/zh_CN/digits.fallback \
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index b5e8abb5..12ee3f67 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -1,19 +1,19 @@
TEMPLATE = subdirs
-include(../config.pri)
+QT_FOR_CONFIG += virtualkeyboard-private
-hangul: SUBDIRS += hangul
-hunspell: SUBDIRS += hunspell
-lipi-toolkit: {
+qtConfig(hangul): SUBDIRS += hangul
+qtConfig(hunspell): SUBDIRS += hunspell
+qtConfig(lipi-toolkit) {
SUBDIRS += lipi-toolkit
- !disable-hunspell: lipi-toolkit.depends += hunspell
+ qtConfig(hunspell): lipi-toolkit.depends += hunspell
}
-openwnn: SUBDIRS += openwnn
-pinyin: SUBDIRS += pinyin
-t9write: SUBDIRS += t9write
-tcime: SUBDIRS += tcime
-myscript: SUBDIRS += myscript
-thai: {
+qtConfig(openwnn): SUBDIRS += openwnn
+qtConfig(pinyin): SUBDIRS += pinyin
+qtConfig(t9write): SUBDIRS += t9write
+qtConfig(tcime): SUBDIRS += tcime
+qtConfig(vkb-myscript): SUBDIRS += myscript
+qtConfig(thai) {
SUBDIRS += thai
- !disable-hunspell: thai.depends += hunspell
+ qtConfig(hunspell): thai.depends += hunspell
}
diff --git a/src/plugins/t9write/plugin/plugin.pro b/src/plugins/t9write/plugin/plugin.pro
index 07630b5f..98156373 100644
--- a/src/plugins/t9write/plugin/plugin.pro
+++ b/src/plugins/t9write/plugin/plugin.pro
@@ -1,6 +1,8 @@
TARGET = qtvirtualkeyboard_t9write
QT += qml virtualkeyboard-private
+include(../../../shared.pri)
+
HEADERS += \
t9write_p.h \
t9writedictionary_p.h \
@@ -21,58 +23,57 @@ DEFINES += \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_FROM_BYTEARRAY
-include(../../../config.pri)
include(../3rdparty/t9write/t9write-build.pri)
-equals(T9WRITE_FOUND, 0): \
+!qtConfig(t9write-cjk): \
error("T9Write SDK could not be found. For more information, see" \
"the documentation in Building Qt Virtual Keyboard")
LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fallback/handwriting.qml
-t9write-alphabetic {
- contains(CONFIG, lang-en(_GB)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_GB/handwriting.fallback
- contains(CONFIG, lang-en(_US)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_US/handwriting.fallback
- contains(CONFIG, lang-ar.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ar_AR/handwriting.qml
- contains(CONFIG, lang-bg.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/bg_BG/handwriting.qml
- contains(CONFIG, lang-cs.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/cs_CZ/handwriting.qml
- contains(CONFIG, lang-da.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/da_DK/handwriting.fallback
- contains(CONFIG, lang-de.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/de_DE/handwriting.fallback
- contains(CONFIG, lang-el.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/el_GR/handwriting.qml
- contains(CONFIG, lang-es(_ES)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/es_ES/handwriting.qml
- contains(CONFIG, lang-es(_MX)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/es_MX/handwriting.qml
- contains(CONFIG, lang-et.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/et_EE/handwriting.fallback
- contains(CONFIG, lang-fa.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fa_FA/handwriting.qml
- contains(CONFIG, lang-fi.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fi_FI/handwriting.fallback
- contains(CONFIG, lang-fr(_FR)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fr_FR/handwriting.fallback
- contains(CONFIG, lang-fr(_CA)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fr_CA/handwriting.fallback
- contains(CONFIG, lang-he.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/he_IL/handwriting.qml
- contains(CONFIG, lang-hr.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/hr_HR/handwriting.qml
- contains(CONFIG, lang-hu.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/hu_HU/handwriting.qml
- contains(CONFIG, lang-id.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/id_ID/handwriting.fallback
- contains(CONFIG, lang-it.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/it_IT/handwriting.fallback
- contains(CONFIG, lang-ms.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ms_MY/handwriting.fallback
- contains(CONFIG, lang-nb.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/nb_NO/handwriting.fallback
- contains(CONFIG, lang-nl.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/nl_NL/handwriting.fallback
- contains(CONFIG, lang-pl.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pl_PL/handwriting.fallback
- contains(CONFIG, lang-pt(_BR)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pt_BR/handwriting.fallback
- contains(CONFIG, lang-pt(_PT)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pt_PT/handwriting.fallback
- contains(CONFIG, lang-ro.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ro_RO/handwriting.qml
- contains(CONFIG, lang-ru.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ru_RU/handwriting.fallback
- contains(CONFIG, lang-sk.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sk_SK/handwriting.fallback
- contains(CONFIG, lang-sl.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sl_SI/handwriting.fallback
- contains(CONFIG, lang-sq.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sq_AL/handwriting.fallback
- contains(CONFIG, lang-sr.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sr_SP/handwriting.qml
- contains(CONFIG, lang-sv.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sv_SE/handwriting.fallback
- contains(CONFIG, lang-th.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/th_TH/handwriting.qml
- contains(CONFIG, lang-tr.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/tr_TR/handwriting.fallback
- contains(CONFIG, lang-uk.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/uk_UA/handwriting.fallback
- contains(CONFIG, lang-vi.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/vi_VN/handwriting.fallback
+qtConfig(t9write-alphabetic) {
+ qtConfig(vkb-lang-en_GB): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_GB/handwriting.fallback
+ qtConfig(vkb-lang-en_US): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/en_US/handwriting.fallback
+ qtConfig(vkb-lang-ar_AR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ar_AR/handwriting.qml
+ qtConfig(vkb-lang-bg_BG): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/bg_BG/handwriting.qml
+ qtConfig(vkb-lang-cs_CZ): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/cs_CZ/handwriting.qml
+ qtConfig(vkb-lang-da_DK): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/da_DK/handwriting.fallback
+ qtConfig(vkb-lang-de_DE): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/de_DE/handwriting.fallback
+ qtConfig(vkb-lang-el_GR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/el_GR/handwriting.qml
+ qtConfig(vkb-lang-es_ES): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/es_ES/handwriting.qml
+ qtConfig(vkb-lang-es_MX): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/es_MX/handwriting.qml
+ qtConfig(vkb-lang-et_EE): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/et_EE/handwriting.fallback
+ qtConfig(vkb-lang-fa_FA): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fa_FA/handwriting.qml
+ qtConfig(vkb-lang-fi_FI): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fi_FI/handwriting.fallback
+ qtConfig(vkb-lang-fr_FR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fr_FR/handwriting.fallback
+ qtConfig(vkb-lang-fr_CA): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/fr_CA/handwriting.fallback
+ qtConfig(vkb-lang-he_IL): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/he_IL/handwriting.qml
+ qtConfig(vkb-lang-hr_HR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/hr_HR/handwriting.qml
+ qtConfig(vkb-lang-hu_HU): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/hu_HU/handwriting.qml
+ qtConfig(vkb-lang-id_ID): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/id_ID/handwriting.fallback
+ qtConfig(vkb-lang-it_IT): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/it_IT/handwriting.fallback
+ qtConfig(vkb-lang-ms_MY): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ms_MY/handwriting.fallback
+ qtConfig(vkb-lang-nb_NO): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/nb_NO/handwriting.fallback
+ qtConfig(vkb-lang-nl_NL): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/nl_NL/handwriting.fallback
+ qtConfig(vkb-lang-pl_PL): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pl_PL/handwriting.fallback
+ qtConfig(vkb-lang-pt_BR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pt_BR/handwriting.fallback
+ qtConfig(vkb-lang-pt_PT): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/pt_PT/handwriting.fallback
+ qtConfig(vkb-lang-ro_RO): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ro_RO/handwriting.qml
+ qtConfig(vkb-lang-ru_RU): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ru_RU/handwriting.fallback
+ qtConfig(vkb-lang-sk_SK): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sk_SK/handwriting.fallback
+ qtConfig(vkb-lang-sl_SI): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sl_SI/handwriting.fallback
+ qtConfig(vkb-lang-sq_AL): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sq_AL/handwriting.fallback
+ qtConfig(vkb-lang-sr_SP): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sr_SP/handwriting.qml
+ qtConfig(vkb-lang-sv_SE): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/sv_SE/handwriting.fallback
+ qtConfig(vkb-lang-th_TH): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/th_TH/handwriting.qml
+ qtConfig(vkb-lang-tr_TR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/tr_TR/handwriting.fallback
+ qtConfig(vkb-lang-uk_UA): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/uk_UA/handwriting.fallback
+ qtConfig(vkb-lang-vi_VN): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/vi_VN/handwriting.fallback
}
-t9write-cjk {
- contains(CONFIG, lang-ja.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ja_JP/handwriting.qml
- contains(CONFIG, lang-ko.*): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ko_KR/handwriting.qml
- contains(CONFIG, lang-zh(_CN)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/zh_CN/handwriting.qml
- contains(CONFIG, lang-zh(_TW)?): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/zh_TW/handwriting.qml
+qtConfig(t9write-cjk) {
+ qtConfig(vkb-lang-ja_JP): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ja_JP/handwriting.qml
+ qtConfig(vkb-lang-ko_KR): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/ko_KR/handwriting.qml
+ qtConfig(vkb-lang-zh_CN): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/zh_CN/handwriting.qml
+ qtConfig(vkb-lang-zh_TW): LAYOUT_FILES += $$LAYOUTS_BASE/content/layouts/zh_TW/handwriting.qml
}
OTHER_FILES += \
@@ -86,7 +87,7 @@ RESOURCES += virtualkeyboard_t9write_layouts
DEFINES += HAVE_T9WRITE
QMAKE_USE += t9write_db
INCLUDEPATH += $$T9WRITE_INCLUDE_DIRS
-t9write-alphabetic {
+qtConfig(t9write-alphabetic) {
LIBS += $$T9WRITE_ALPHABETIC_LIBS
DEFINES += HAVE_T9WRITE_ALPHABETIC
!isEmpty(T9WRITE_ALPHABETIC_BINS) {
@@ -96,7 +97,7 @@ t9write-alphabetic {
!prefix_build: COPIES += t9write_alphabetic_bins
}
}
-t9write-cjk {
+qtConfig(t9write-cjk) {
LIBS += $$T9WRITE_CJK_LIBS
DEFINES += HAVE_T9WRITE_CJK
!isEmpty(T9WRITE_CJK_BINS) {
diff --git a/src/plugins/t9write/plugin/t9write_p.h b/src/plugins/t9write/plugin/t9write_p.h
index c052b4c7..5e85b19c 100644
--- a/src/plugins/t9write/plugin/t9write_p.h
+++ b/src/plugins/t9write/plugin/t9write_p.h
@@ -41,11 +41,13 @@
// We mean it.
//
+#include <QtVirtualKeyboard/private/qvirtualkeyboard_global_p.h>
+
#include "t9write_api_version.h"
-#ifdef HAVE_T9WRITE_ALPHABETIC
+#if QT_CONFIG(t9write_alphabetic)
#include "decuma_hwr.h"
#endif
-#ifdef HAVE_T9WRITE_CJK
+#if QT_CONFIG(t9write_cjk)
#include "decuma_hwr_cjk.h"
#endif
#include "decumaFunctionalSupport.h"
diff --git a/src/plugins/tcime/plugin/plugin.pro b/src/plugins/tcime/plugin/plugin.pro
index 9ac49798..c11eb09a 100644
--- a/src/plugins/tcime/plugin/plugin.pro
+++ b/src/plugins/tcime/plugin/plugin.pro
@@ -1,5 +1,7 @@
TARGET = qtvirtualkeyboard_tcime
-QT += qml virtualkeyboard
+QT += qml virtualkeyboard-private
+
+include(../../../shared.pri)
HEADERS += \
tcinputmethod_p.h \
@@ -16,8 +18,6 @@ DEFINES += \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_FROM_BYTEARRAY
-include(../../../config.pri)
-
LAYOUT_FILES += \
$$LAYOUTS_BASE/content/layouts/zh_TW/dialpad.fallback \
$$LAYOUTS_BASE/content/layouts/zh_TW/digits.fallback \
@@ -30,14 +30,12 @@ virtualkeyboard_tcime_layouts.base = $$LAYOUTS_BASE
virtualkeyboard_tcime_layouts.prefix = $$LAYOUTS_PREFIX
RESOURCES += virtualkeyboard_tcime_layouts
-cangjie: DEFINES += HAVE_TCIME_CANGJIE
-zhuyin: DEFINES += HAVE_TCIME_ZHUYIN
QMAKE_USE += tcime
!no-bundle-tcime {
TCIME_FILES += ../3rdparty/tcime/data/qt/dict_phrases.dat
- cangjie: TCIME_FILES += \
+ qtConfig(cangjie): TCIME_FILES += \
../3rdparty/tcime/data/qt/dict_cangjie.dat
- zhuyin: TCIME_FILES += \
+ qtConfig(zhuyin): TCIME_FILES += \
../3rdparty/tcime/data/qt/dict_zhuyin.dat
tcime.files = $$TCIME_FILES
tcime.base = $$PWD/..
@@ -46,9 +44,9 @@ QMAKE_USE += tcime
} else {
tcime_data.files = \
$$PWD/../3rdparty/tcime/data/qt/dict_phrases.dat
- cangjie: tcime_data.files += \
+ qtConfig(cangjie): tcime_data.files += \
$$PWD/../3rdparty/tcime/data/qt/dict_cangjie.dat
- zhuyin: tcime_data.files += \
+ qtConfig(zhuyin): tcime_data.files += \
$$PWD/../3rdparty/tcime/data/qt/dict_zhuyin.dat
tcime_data.path = $$VIRTUALKEYBOARD_INSTALL_DATA/tcime
INSTALLS += tcime_data
diff --git a/src/plugins/tcime/plugin/tcinputmethod.cpp b/src/plugins/tcime/plugin/tcinputmethod.cpp
index 3460079d..45ffe6d8 100644
--- a/src/plugins/tcime/plugin/tcinputmethod.cpp
+++ b/src/plugins/tcime/plugin/tcinputmethod.cpp
@@ -30,11 +30,11 @@
#include "tcinputmethod_p.h"
#include <QtVirtualKeyboard/qvirtualkeyboardinputengine.h>
#include <QtVirtualKeyboard/qvirtualkeyboardinputcontext.h>
-#if defined(HAVE_TCIME_CANGJIE)
+#if QT_CONFIG(cangjie)
#include "cangjiedictionary.h"
#include "cangjietable.h"
#endif
-#if defined(HAVE_TCIME_ZHUYIN)
+#if QT_CONFIG(zhuyin)
#include "zhuyindictionary.h"
#include "zhuyintable.h"
#endif
@@ -105,12 +105,12 @@ public:
QVirtualKeyboardInputContext *ic = q->inputContext();
switch (inputMode)
{
-#if defined(HAVE_TCIME_CANGJIE)
+#if QT_CONFIG(cangjie)
case QVirtualKeyboardInputEngine::InputMode::Cangjie:
accept = composeCangjie(ic, c);
break;
#endif
-#if defined(HAVE_TCIME_ZHUYIN)
+#if QT_CONFIG(zhuyin)
case QVirtualKeyboardInputEngine::InputMode::Zhuyin:
accept = composeZhuyin(ic, c);
break;
@@ -122,7 +122,7 @@ public:
return accept;
}
-#if defined(HAVE_TCIME_CANGJIE)
+#if QT_CONFIG(cangjie)
bool composeCangjie(QVirtualKeyboardInputContext *ic, const QChar &c)
{
bool accept = false;
@@ -200,7 +200,7 @@ public:
}
#endif
-#if defined(HAVE_TCIME_ZHUYIN)
+#if QT_CONFIG(zhuyin)
bool composeZhuyin(QVirtualKeyboardInputContext *ic, const QChar &c)
{
if (ZhuyinTable::isTone(c)) {
@@ -294,10 +294,10 @@ public:
TCInputMethod *q_ptr;
QVirtualKeyboardInputEngine::InputMode inputMode;
-#if defined(HAVE_TCIME_CANGJIE)
+#if QT_CONFIG(cangjie)
CangjieDictionary cangjieDictionary;
#endif
-#if defined(HAVE_TCIME_ZHUYIN)
+#if QT_CONFIG(zhuyin)
ZhuyinDictionary zhuyinDictionary;
#endif
PhraseDictionary phraseDictionary;
@@ -324,7 +324,7 @@ TCInputMethod::~TCInputMethod()
bool TCInputMethod::simplified() const
{
-#if defined(HAVE_TCIME_CANGJIE)
+#if QT_CONFIG(cangjie)
Q_D(const TCInputMethod);
return d->cangjieDictionary.simplified();
#else
@@ -335,7 +335,7 @@ bool TCInputMethod::simplified() const
void TCInputMethod::setSimplified(bool simplified)
{
qCDebug(lcTCIme) << "TCInputMethod::setSimplified(): " << simplified;
-#if defined(HAVE_TCIME_CANGJIE)
+#if QT_CONFIG(cangjie)
Q_D(TCInputMethod);
if (d->cangjieDictionary.simplified() != simplified) {
d->reset();
@@ -354,10 +354,10 @@ QList<QVirtualKeyboardInputEngine::InputMode> TCInputMethod::inputModes(const QS
{
Q_UNUSED(locale)
return QList<QVirtualKeyboardInputEngine::InputMode>()
-#if defined(HAVE_TCIME_ZHUYIN)
+#if QT_CONFIG(zhuyin)
<< QVirtualKeyboardInputEngine::InputMode::Zhuyin
#endif
-#if defined(HAVE_TCIME_CANGJIE)
+#if QT_CONFIG(cangjie)
<< QVirtualKeyboardInputEngine::InputMode::Cangjie
#endif
;
@@ -373,7 +373,7 @@ bool TCInputMethod::setInputMode(const QString &locale, QVirtualKeyboardInputEng
bool result = false;
d->inputMode = inputMode;
d->wordDictionary = nullptr;
-#if defined(HAVE_TCIME_CANGJIE)
+#if QT_CONFIG(cangjie)
if (inputMode == QVirtualKeyboardInputEngine::InputMode::Cangjie) {
if (d->cangjieDictionary.isEmpty()) {
QString cangjieDictionary(qEnvironmentVariable("QT_VIRTUALKEYBOARD_CANGJIE_DICTIONARY"));
@@ -387,7 +387,7 @@ bool TCInputMethod::setInputMode(const QString &locale, QVirtualKeyboardInputEng
d->wordDictionary = &d->cangjieDictionary;
}
#endif
-#if defined(HAVE_TCIME_ZHUYIN)
+#if QT_CONFIG(zhuyin)
if (inputMode == QVirtualKeyboardInputEngine::InputMode::Zhuyin) {
if (d->zhuyinDictionary.isEmpty()) {
QString zhuyinDictionary(qEnvironmentVariable("QT_VIRTUALKEYBOARD_ZHUYIN_DICTIONARY"));
@@ -463,14 +463,14 @@ bool TCInputMethod::keyEvent(Qt::Key key, const QString &text, Qt::KeyboardModif
if (!d->input.isEmpty()) {
d->input.remove(d->input.length() - 1, 1);
ic->setPreeditText(d->input);
-#if defined(HAVE_TCIME_CANGJIE)
+#if QT_CONFIG(cangjie)
if (!d->checkSpecialCharInput()) {
#endif
if (d->setCandidates(d->wordDictionary->getWords(d->input), true)) {
emit selectionListChanged(QVirtualKeyboardSelectionListModel::Type::WordCandidateList);
emit selectionListActiveItemChanged(QVirtualKeyboardSelectionListModel::Type::WordCandidateList, d->highlightIndex);
}
-#if defined(HAVE_TCIME_CANGJIE)
+#if QT_CONFIG(cangjie)
}
#endif
accept = true;
diff --git a/src/plugins/tcime/plugin/tcinputmethod_p.h b/src/plugins/tcime/plugin/tcinputmethod_p.h
index 5915c3ab..8e8c5c76 100644
--- a/src/plugins/tcime/plugin/tcinputmethod_p.h
+++ b/src/plugins/tcime/plugin/tcinputmethod_p.h
@@ -41,6 +41,7 @@
// We mean it.
//
+#include <QtVirtualKeyboard/private/qvirtualkeyboard_global_p.h>
#include <QtVirtualKeyboard/qvirtualkeyboardabstractinputmethod.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/thai/plugin/plugin.pro b/src/plugins/thai/plugin/plugin.pro
index 81f05b4b..dd756029 100644
--- a/src/plugins/thai/plugin/plugin.pro
+++ b/src/plugins/thai/plugin/plugin.pro
@@ -1,6 +1,10 @@
TARGET = qtvirtualkeyboard_thai
QT += qml virtualkeyboard
+QT_FOR_CONFIG += virtualkeyboard-private
+
+include(../../../shared.pri)
+
HEADERS += \
thaiinputmethod_p.h \
thaiplugin.h
@@ -16,9 +20,8 @@ DEFINES += \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_FROM_BYTEARRAY
-include(../../../config.pri)
-!disable-hunspell {
+qtConfig(hunspell) {
QT += hunspellinputmethod-private
}
diff --git a/src/shared.pri b/src/shared.pri
new file mode 100644
index 00000000..4e2654ae
--- /dev/null
+++ b/src/shared.pri
@@ -0,0 +1,5 @@
+# Common variables
+LAYOUTS_BASE = $$PWD/virtualkeyboard
+LAYOUTS_PREFIX = /QtQuick/VirtualKeyboard
+VIRTUALKEYBOARD_INSTALL_DATA = $$[QT_INSTALL_DATA]/qtvirtualkeyboard
+
diff --git a/src/src.pro b/src/src.pro
index fc840d28..cee8f573 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,6 +1,5 @@
TEMPLATE = subdirs
-include(config.pri)
SUBDIRS += \
virtualkeyboard \
diff --git a/src/virtualkeyboard/configure.json b/src/virtualkeyboard/configure.json
new file mode 100644
index 00000000..cdaed556
--- /dev/null
+++ b/src/virtualkeyboard/configure.json
@@ -0,0 +1,497 @@
+{
+ "module": "virtualkeyboard",
+ "testDir": "../../config.tests",
+
+ "commandline": {
+ "options": {
+ "vkb-sensitive-debug": "boolean",
+ "vkb-arrow-keynavigation": "boolean",
+ "vkb-enable": { "type": "enableLang" },
+ "vkb-disable": { "type": "disableLang" },
+ "vkb-desktop": "boolean",
+ "vkb-cangjie": { "type": "boolean", "value": "cangjie" },
+ "vkb-zhuyin": { "type": "boolean", "value": "zhuyin" },
+ "vkb-hunspell": { "type": "enum", "values": [ "no", "3rdparty", "system" ] },
+ "vkb-handwriting": { "type": "optionalString", "values": [ "yes", "no", "t9write", "lipi" ] },
+ "vkb-style": { "type": "string", "values": [ "standard", "retro" , "none"] }
+ }
+ },
+
+ "libraries": {
+ "hunspell": {
+ "label": "Hunspell",
+ "test": "hunspell",
+ "sources": [
+ { "type": "pkgConfig", "args": "hunspell" },
+ { "includedir": "/usr/include/hunspell", "libs": "-lhunspell-1.3" }
+ ]
+ },
+ "xcb": {
+ "label": "XCB",
+ "headers": "xcb/xcb.h",
+ "sources": [
+ { "type": "pkgConfig", "args": "xcb" },
+ "-lxcb"
+ ]
+ },
+ "xcb-xfixes": {
+ "label": "XCB Xfixes",
+ "headers": "xcb/xfixes.h",
+ "sources": [
+ { "type": "pkgConfig", "args": "xcb-xfixes" },
+ "-lxcb-xfixes"
+ ],
+ "use": "xcb"
+ }
+ },
+
+ "tests": {
+ "3rdparty-hunspell": {
+ "label": "Hunspell copy under 3rdparty/",
+ "type": "3rdpartyHunspell"
+ },
+ "t9write-alphabetic": {
+ "label" : "T9Write Alphabetic Support",
+ "type" : "t9write-alphabetic"
+ },
+ "t9write-cjk": {
+ "label" : "T9Write CJK Support",
+ "type" : "t9write-cjk"
+ }
+ },
+
+ "features": {
+ "vkb-record-trace-input": {
+ "label": "Input trace recording",
+ "autoDetect": "false",
+ "output": [ "publicFeature" ]
+ },
+ "vkb-arrow-keynavigation": {
+ "label": "Key navigation",
+ "autoDetect": "false",
+ "output": [ "publicFeature" ]
+ },
+ "vkb-desktop": {
+ "label": "Desktop integration",
+ "condition": "!config.cross_compile",
+ "output": [ "publicFeature" ]
+ },
+ "vkb-xcb": {
+ "label": "XCB integration",
+ "condition": "libs.xcb && libs.xcb-xfixes",
+ "output": [ "publicFeature" ]
+ },
+ "vkb-layouts": {
+ "label": "Built-in layouts",
+ "output": [ "publicFeature" ]
+ },
+ "vkb-no-builtin-style": {
+ "label": "Disable builtin styles",
+ "autoDetect": false,
+ "enable": "input.vkb-style == 'none'",
+ "output": [ "publicFeature" ]
+ },
+ "vkb-retro-style": {
+ "label": "Retro style as default",
+ "autoDetect": false,
+ "enable": "input.vkb-style == 'retro'",
+ "output": [ "publicFeature" ]
+ },
+ "vkb-default-style": {
+ "label": "Default style",
+ "autoDetect": true,
+ "condition": "!features.vkb-retro-style && !features.vkb-no-builtin-style",
+ "enable": "input.vkb-style == 'default'",
+ "output": [ "publicFeature" ]
+ },
+ "vkb-sensitive-debug": {
+ "label": "Sensitive Debug",
+ "autoDetect": false,
+ "output": [ "privateFeature" ]
+ },
+
+ "t9write-alphabetic": {
+ "label": " Alphabetic",
+ "condition": "tests.t9write-alphabetic",
+ "output": [ "privateFeature" ]
+ },
+ "t9write-cjk": {
+ "label": " CJK",
+ "condition": "tests.t9write-cjk",
+ "output": [ "privateFeature" ]
+ },
+ "t9write": {
+ "label": "T9Write handwriting",
+ "enable": "input.vkb-handwriting == 't9write'",
+ "disable": "input.vkb-handwriting == 'no' || input.vkb-handwriting == 'lipi'",
+ "condition": "features.t9write-alphabetic || features.t9write-cjk",
+ "output": [ "privateFeature" ]
+ },
+ "lipi-toolkit": {
+ "label": "Lipi handwriting",
+ "autoDetect": false,
+ "enable": "input.vkb-handwriting == 'lipi'",
+ "disable": "input.vkb-handwriting == 'no' || input.vkb-handwriting == 't9write'",
+ "output": [ "privateFeature" ]
+ },
+ "system-hunspell": {
+ "label": "System Hunspell",
+ "condition": "libs.hunspell",
+ "output": [ "privateFeature" ]
+ },
+ "3rdparty-hunspell": {
+ "label": " Using Hunspell copy from 3rdparty/",
+ "disable": "input.vkb-hunspell == 'no' || input.vkb-hunspell == 'system'",
+ "condition": "tests.3rdparty-hunspell",
+ "output": [ "privateFeature" ]
+ },
+ "hunspell": {
+ "label": "Hunspell",
+ "condition": "features.3rdparty-hunspell || features.system-hunspell",
+ "output": [ "privateFeature" ]
+ },
+ "openwnn": {
+ "label": "OpenWnn",
+ "autoDetect": "input.lang-ja_JP != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-myscript": {
+ "label": "MyScript",
+ "autoDetect": false,
+ "output": [ "privateFeature" ]
+ },
+ "pinyin": {
+ "label": "libpinyin",
+ "autoDetect": "input.lang-ch_CN != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "tcime": {
+ "label": "Traditional Chinese IME (tcime)",
+ "autoDetect": "input.lang-ch_TW != 'no'",
+ "condition": "features.zhuyin || features.cangjie",
+ "output": [ "privateFeature" ]
+ },
+ "zhuyin": {
+ "label": "Zhuyin",
+ "autoDetect": "input.lang-zh_TW != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "cangjie": {
+ "label": "Cangjie",
+ "autoDetect": "input.lang-zh_TW != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "hangul": {
+ "label": "Hangul",
+ "autoDectect": "input.lang-ko_KR != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "thai": {
+ "label": "Thai",
+ "autoDectect": "input.lang-th_TH != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-ar_AR": {
+ "label": "Arabic",
+ "autoDetect": "input.lang-ar_AR != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-bg_BG": {
+ "label": "Bulgarian",
+ "autoDetect": "input.lang-bg_BG != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-cs_CZ": {
+ "label": "Czech",
+ "autoDetect": "input.lang-cs_CZ != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-da_DK": {
+ "label": "Danish",
+ "autoDetect": "input.lang-da_DK != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-de_DE": {
+ "label": "German",
+ "autoDetect": "input.lang-de_DE != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-el_GR": {
+ "label": "Greek",
+ "autoDetect": "input.lang-el_GR != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-en_GB": {
+ "label": "English GB",
+ "autoDetect": "input.lang-en_GB != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-en_US": {
+ "label": "English US",
+ "autoDetect": "input.lang-en_US != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-es_ES": {
+ "label": "Spanish",
+ "autoDetect": "input.lang-es_ES != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-es_MX": {
+ "label": "Spanish Mexico",
+ "autoDetect": "input.lang-es_MX != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-et_EE": {
+ "label": "Estonian",
+ "autoDetect": "input.lang-et_EE != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-fa_FA": {
+ "label": "Farsi",
+ "autoDetect": "input.lang-fa_FA != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-fi_FI": {
+ "label": "Finnish",
+ "autoDetect": "input.lang-fi_FI != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-fr_CA": {
+ "label": "French Canada",
+ "autoDetect": "input.lang-fr_CA != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-fr_FR": {
+ "label": "French France",
+ "autoDetect": "input.lang-fr_FR != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-he_IL": {
+ "label": "Hebrew",
+ "autoDetect": "input.lang-he_IL != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-hi_IN": {
+ "label": "Hindi",
+ "autoDetect": "input.lang-hi_IN != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-hr_HR": {
+ "label": "Croatian",
+ "autoDetect": "input.lang-hr_HR != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-hu_HU": {
+ "label": "Hungarian",
+ "autoDetect": "input.lang-hu_HU != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-id_ID": {
+ "label": "Indonesian",
+ "autoDetect": "input.lang-id_ID != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-it_IT": {
+ "label": "Italian",
+ "autoDetect": "input.lang-it_IT != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-ja_JP": {
+ "label": "Japanese",
+ "condition": "features.openwnn",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-ko_KR": {
+ "label": "Korean",
+ "autoDetect": "input.lang-ko_KR != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-ms_MY": {
+ "label": "Malay",
+ "autoDetect": "input.lang-ms_MY != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-nb_NO": {
+ "label": "Norwegian",
+ "autoDetect": "input.lang-nb_NO != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-nl_NL": {
+ "label": "Dutch",
+ "autoDetect": "input.lang-nl_NL != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-pl_PL": {
+ "label": "Polish",
+ "autoDetect": "input.lang-pl_PL != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-pt_BR": {
+ "label": "Portuguese Brazil",
+ "autoDetect": "input.lang-pt_BR != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-pt_PT": {
+ "label": "Portuguese Portugal",
+ "autoDetect": "input.lang-pt_PT != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-ro_RO": {
+ "label": "Romanian",
+ "autoDetect": "input.lang-ro_RO != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-ru_RU": {
+ "label": "Russian",
+ "autoDetect": "input.lang-ru_RU != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-sk_SK": {
+ "label": "Slovak",
+ "autoDetect": "input.lang-sk_SK != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-sl_SI": {
+ "label": "Slovenian",
+ "autoDetect": "input.lang-sl_SI != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-sq_AL": {
+ "label": "Albanian",
+ "autoDetect": "input.lang-sq_AL != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-sr_SP": {
+ "label": "Serbian",
+ "autoDetect": "input.lang-sr_SP != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-sv_SE": {
+ "label": "Swedish",
+ "autoDetect": "input.lang-sv_SE != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-th_TH": {
+ "label": "Thai",
+ "condition": "features.thai",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-tr_TR": {
+ "label": "Turkish",
+ "autoDetect": "input.lang-tr_TR != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-uk_UA": {
+ "label": "Ukrainian",
+ "autoDetect": "input.lang-uk_UA != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-vi_VN": {
+ "label": "Vietnamese",
+ "autoDetect": "input.lang-vi_VN != 'no'",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-zh_CN": {
+ "label": "Simplified Chinese",
+ "autoDetect": "input.lang-zh_CN != 'no'",
+ "condition": "features.pinyin",
+ "output": [ "privateFeature" ]
+ },
+ "vkb-lang-zh_TW": {
+ "label": "Traditional Chinese",
+ "autoDetect": "input.lang-zh_TW != 'no'",
+ "condition": "features.tcime || features.zhuyin || features.cangjie",
+ "output": [ "privateFeature" ]
+ }
+ },
+
+ "report": [
+ {
+ "type": "error",
+ "condition": "input.vkb-handwriting == 't9write' && !features.t9write",
+ "message": "T9Write SDK could not be found. For more information,
+see the documentation in 'Building Qt Virtual Keyboard'."
+ },
+ {
+ "type": "note",
+ "condition": "!features.hunspell",
+ "message": "Hunspell disabled. Spelling correction will not be available."
+ }
+ ],
+
+ "summary": [
+ {
+ "section": "Qt Virtualkeyboard",
+ "entries": [
+ "vkb-desktop",
+ "vkb-layouts",
+ "vkb-arrow-keynavigation",
+ "vkb-retro-style",
+ "vkb-sensitive-debug",
+ "t9write",
+ "t9write-alphabetic",
+ "t9write-cjk",
+ "lipi-toolkit",
+ "hunspell",
+ "3rdparty-hunspell",
+ "openwnn",
+ "vkb-myscript",
+ {
+ "section": "Language support enabled for",
+ "entries": [
+ "vkb-lang-ar_AR",
+ "vkb-lang-bg_BG",
+ "vkb-lang-cs_CZ",
+ "vkb-lang-da_DK",
+ "vkb-lang-de_DE",
+ "vkb-lang-el_GR",
+ "vkb-lang-en_GB",
+ "vkb-lang-en_US",
+ "vkb-lang-es_ES",
+ "vkb-lang-es_MX",
+ "vkb-lang-et_EE",
+ "vkb-lang-fa_FA",
+ "vkb-lang-fi_FI",
+ "vkb-lang-fr_CA",
+ "vkb-lang-fr_FR",
+ "vkb-lang-he_IL",
+ "vkb-lang-hi_IN",
+ "vkb-lang-hr_HR",
+ "vkb-lang-hu_HU",
+ "vkb-lang-id_ID",
+ "vkb-lang-it_IT",
+ "vkb-lang-ja_JP",
+ "vkb-lang-ko_KR",
+ "vkb-lang-ms_MY",
+ "vkb-lang-nb_NO",
+ "vkb-lang-nl_NL",
+ "vkb-lang-pl_PL",
+ "vkb-lang-pt_BR",
+ "vkb-lang-pt_PT",
+ "vkb-lang-ro_RO",
+ "vkb-lang-ru_RU",
+ "vkb-lang-sk_SK",
+ "vkb-lang-sl_SI",
+ "vkb-lang-sq_AL",
+ "vkb-lang-sr_SP",
+ "vkb-lang-sv_SE",
+ "vkb-lang-th_TH",
+ "vkb-lang-tr_TR",
+ "vkb-lang-uk_UA",
+ "vkb-lang-vi_VN",
+ "vkb-lang-zh_CN",
+ "vkb-lang-zh_TW"
+ ]
+ },
+ {
+ "section": "Traditional chinese input methods",
+ "condition": "features.vkb-lang-zh_TW",
+ "entries": [
+ "zhuyin",
+ "cangjie"
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/virtualkeyboard/configure.pri b/src/virtualkeyboard/configure.pri
new file mode 100644
index 00000000..2d3ca610
--- /dev/null
+++ b/src/virtualkeyboard/configure.pri
@@ -0,0 +1,181 @@
+VKB_SOURCE_TREE = $$PWD
+VALID_LANGUAGES = \
+ ar_AR \
+ bg_BG \
+ cs_CZ \
+ da_DK \
+ de_DE \
+ el_GR \
+ en_GB \
+ en_US \
+ es_ES \
+ es_MX \
+ et_EE \
+ fa_FA \
+ fi_FI \
+ fr_CA \
+ fr_FR \
+ he_IL \
+ hi_IN \
+ hr_HR \
+ hu_HU \
+ id_ID \
+ it_IT \
+ ja_JP \
+ ko_KR \
+ ms_MY \
+ nb_NO \
+ nl_NL \
+ pl_PL \
+ pt_BR \
+ pt_PT \
+ ro_RO \
+ ru_RU \
+ sk_SK \
+ sl_SI \
+ sq_AL \
+ sr_SP \
+ sv_SE \
+ th_TH \
+ tr_TR \
+ uk_UA \
+ vi_VN \
+ zh_CN \
+ zh_TW
+
+defineReplace(qtConfGetLanguageList) {
+ val = $${2}
+ isEmpty(val): val = $$qtConfGetNextCommandlineArg()
+ contains(val, "^-.*|[A-Z_]+=.*")|isEmpty(val) {
+ qtConfAddError("No value supplied to command line option '$$1'.")
+ return()
+ }
+ vals = $$split(val, ',')
+ for (l, vals) {
+ languages += $$l
+ equals(val, "all"): \
+ return($$VALID_LANGUAGES)
+
+ !contains(VALID_LANGUAGES, $$l) {
+ qtConfAddError("Language '$$l' is not supported by the Qt Virtual Keyboard." \
+ "The list of valid languages is:" \
+ "$$VALID_LANGUAGES");
+ return()
+ }
+ }
+ return($$languages)
+}
+
+defineTest(qtConfCommandline_enableLang) {
+ languages = $$qtConfGetLanguageList($$1, $$2)
+
+ # explicitly disable all languages that are currently not explicitly set
+ for (l, VALID_LANGUAGES) {
+ isEmpty(config.input.lang-$${l}) {
+ config.input.lang-$${l} = "no"
+ export(config.input.lang-$${l})
+ }
+ }
+
+ for (l, languages) {
+ config.input.lang-$${l} = "yes"
+ export(config.input.lang-$${l})
+ }
+}
+
+defineTest(qtConfCommandline_disableLang) {
+ languages = $$qtConfGetLanguageList($$1, $$2)
+
+ for (l, languages) {
+ config.input.lang-$${l} = "no"
+ export(config.input.lang-$${l})
+ }
+}
+
+
+# T9Write tests
+
+T9WRITE_BASE_DIR = $$VKB_SOURCE_TREE/3rdparty/t9write
+
+defineTest(t9writeFindSharedLibrary) {
+ contains(QT_ARCH, arm) {
+ LIB_DIR = $$BASE_DIR/lib/arm/shared
+ } else: linux {
+ LIB_DIR = $$BASE_DIR/lib/linux-x86/shared
+ } else: win32 {
+ LIB_DIR = $$BASE_DIR/lib/win32/shared
+ } else {
+ return(false)
+ }
+ win32 {
+ result = $$files($$LIB_DIR/$$1/*.obj)
+ isEmpty(result): result = $$files($$LIB_DIR/$$1/*.lib)
+ isEmpty(result) {
+ return(false)
+ }
+ } else {
+ result = $$files($$LIB_DIR/$$1/*.o)
+ isEmpty(result): result = $$files($$LIB_DIR/$$1/*.so)
+ isEmpty(result) {
+ return(false)
+ }
+ }
+ return(true)
+}
+
+defineTest(t9writeFindStaticLibrary) {
+ contains(QT_ARCH, arm) {
+ LIB_DIR = $$BASE_DIR/lib/arm/shared
+ } else: linux {
+ LIB_DIR = $$BASE_DIR/lib/linux-x86/shared
+ } else: win32 {
+ LIB_DIR = $$BASE_DIR/lib/win32/shared
+ } else {
+ return(false)
+ }
+ win32 {
+ result = $$files($$LIB_DIR/$$1/*.obj)
+ isEmpty(result): result = $$files($$LIB_DIR/$$1/*.lib)
+ isEmpty(result) {
+ return(false)
+ }
+ } else {
+ result = $$files($$LIB_DIR/$$1/*.o)
+ isEmpty(result): result = $$files($$LIB_DIR/$$1/*.a)
+ isEmpty(result) {
+ return(false)
+ }
+ }
+ return(true)
+}
+
+defineTest(qtConfTest_t9write-alphabetic) {
+ !exists($${T9WRITE_BASE_DIR}/api/decuma_hwr.h) {
+ return (false)
+ }
+ !t9writeFindStaticLibrary(alphabetic)|!t9writeFindSharedLibrary(alphabetic) {
+ return (false)
+ }
+ return(true)
+}
+
+defineTest(qtConfTest_t9write-cjk) {
+ !exists($${T9WRITE_BASE_DIR}/api/decuma_hwr_cjk.h) {
+ return (false)
+ }
+ !t9writeFindStaticLibrary(cjk)|!t9writeFindSharedLibrary(cjk) {
+ return (false)
+ }
+ return(true)
+}
+
+
+# 3rdpary hunspell support
+
+defineTest(qtConfTest_3rdpartyHunspell) {
+ !exists($$VKB_SOURCE_TREE/src/plugins/hunspell/3rdparty/hunspell/hunspell.h): \
+ return(false)
+ !exists($$VKB_SOURCE_TREE/src/plugins/hunspell/3rdparty/hunspell/data): \
+ return(false)
+ return(true)
+}
diff --git a/src/virtualkeyboard/desktopinputpanel.cpp b/src/virtualkeyboard/desktopinputpanel.cpp
index aee0f100..354a4c15 100644
--- a/src/virtualkeyboard/desktopinputpanel.cpp
+++ b/src/virtualkeyboard/desktopinputpanel.cpp
@@ -27,6 +27,7 @@
**
****************************************************************************/
+#include <QtVirtualKeyboard/private/qvirtualkeyboard_global_p.h>
#include <QtVirtualKeyboard/private/desktopinputpanel_p.h>
#include <QtVirtualKeyboard/private/appinputpanel_p_p.h>
#include <QtVirtualKeyboard/private/inputview_p.h>
@@ -37,7 +38,7 @@
#include <QQmlEngine>
#include <QScreen>
#include <QtVirtualKeyboard/private/virtualkeyboarddebug_p.h>
-#if defined(QT_VIRTUALKEYBOARD_HAVE_XCB)
+#if QT_CONFIG(vkb_xcb)
#include <xcb/xcb.h>
#include <xcb/xfixes.h>
#endif
@@ -225,7 +226,7 @@ void DesktopInputPanel::previewVisibleChanged()
updateInputRegion();
}
-#if defined(QT_VIRTUALKEYBOARD_HAVE_XCB)
+#if QT_CONFIG(vkb_xcb)
static inline xcb_rectangle_t qRectToXCBRectangle(const QRect &r)
{
xcb_rectangle_t result;
@@ -250,7 +251,7 @@ void DesktopInputPanel::updateInputRegion()
switch (d->windowingSystem) {
case DesktopInputPanelPrivate::Xcb:
-#if defined(QT_VIRTUALKEYBOARD_HAVE_XCB)
+#if QT_CONFIG(vkb_xcb)
{
QVector<xcb_rectangle_t> rects;
rects.push_back(qRectToXCBRectangle(d->keyboardRect.toRect()));
diff --git a/src/virtualkeyboard/doc/src/build.qdoc b/src/virtualkeyboard/doc/src/build.qdoc
index 27b18f63..46dbfb65 100644
--- a/src/virtualkeyboard/doc/src/build.qdoc
+++ b/src/virtualkeyboard/doc/src/build.qdoc
@@ -87,90 +87,98 @@ keyboard features.
\table
\header
- \li CONFIG
+ \li Option
+ \li Arguments
\li Description
\li Remarks
\row
- \li \e lang-<code>
+ \li \e {-vkb-enable <code>[,<code>]*}"
+ \li Supported language codes or 'all'
\li Enables the specified language
- \li The specified language can be activated using \e lang-<code> option, which
- has the format "language[_country]", where:
+ \li The specified languages can be explicitly enabled using this option.
+ Each language code has the format \e {language[_country]}, where:
\list
- \li language is a lowercase, two-letter, ISO 639 language code
- \li country is an uppercase, two-letter, ISO 3166 country code
+ \li \e language is a lowercase, two-letter, ISO 639 language code
+ \li \e country is an uppercase, two-letter, ISO 3166 country code
\endlist
- This option can be used to define the language support as required. The virtual
- keyboard can support one or more languages at a time.
-
- For example, \c CONFIG+=lang-fi_FI activates the Finnish language.
-
- The virtual keyboard automatically includes all languages if no other languages
- are specified.
-\row
- \li \e lang-all
- \li Enables all the languages
- \li Enables all the languages supported by the virtual keyboard. This flag is essentially
- an alias for \c {CONFIG+="lang-ar_AR lang-da_DK ..."}
-
- This option is enabled by default. To build only a specific language, use the
- \c lang-<code> option above.
-\row
- \li \e handwriting
- \li Enables handwriting input
- \li This flag enables handwriting input using the first engine available at
- build time in the following order: \c myscript, \c t9write, \c lipi-toolkit. To enable handwriting
- input using a specific engine, use the feature-specific configuration instead.
- For example, \c CONFIG+=lipi-toolkit.
-\row
- \li \e arrow-key-navigation
- \li Enables arrow key navigation for the keyboard
- \li Allows controlling the keyboard using the arrow and return keys.
+ This option can be used to define the language support as required.
+ The virtual keyboard can support one or more languages at a time.
+
+ For example, \c {-vkb-enable de_DE,fi_FI} enables support for the
+ German and Finnish languages.
+
+ The virtual keyboard automatically includes all supported languages
+ if no other languages are specified.
+\row
+ \li \e -vkb-handwriting
+ \li [yes|no|t9write|lipi]
+ \li Enables or disabled handwriting input
+ \li This flag enables handwriting input. By default, the first engine
+ available at build time is used. The engines are chosen in the
+ following order: \c t9write, \c lipi-toolkit. To force handwriting
+ input using to use a specific engine, specify the engine to be used;
+ for example, \c {-vkb-handwriting lipi}.
+\row
+ \li \e [-no]-vkb-arrow-keynavigation
+ \li
+ \li Enables or disables arrow key navigation for the keyboard
+ \li Allows controlling the keyboard using the arrow and return keys. This
+ feature is off by default.
+\row
+ \li \e -vkb-style
+ \li \e [standard|retro]
+ \li Choose the style of the virtual keyboard
+ \li The Qt Virtual Keyboard supports two styles, standard and retro. Both
+ styles will be included in the package, but this option allows you to
+ change the built-in default style.
+\row
+ \li \e [-no]-vkb-cangjie
+ \li
+ \li Enables or disables the Cangjie input method for Traditional Chinese.
+ \li This option enables or disables the Cangjie input method for the
+ Traditional Chinese language. The input method is enabled by default
+ if support for Traditional Chinese is enabled.
+\row
+ \li \e [-no]-vkb-zhuyin
+ \li
+ \li Enables or disables the Zhuyin input method for Traditional Chinese.
+ \li This option enables or disables the Zhuyin input method for the
+ Traditional Chinese language. The input method is enabled by default if
+ support for Traditional Chinese is enabled.
+\row
+ \li \e [-no]-vkb-desktop
+ \li
+ \li Enables or disables Desktop integration
+ \li By default, the desktop integration is enabled when the target
+ environment is X11 or Windows desktop. With this option, the desktop
+ integration can be disabled.
+ \note For embedded integration, where the InputPanel is instantitated
+ by the application, there is no need to use this option explicitly. The
+ virtual keyboard will not create the desktop input panel if the
+ application creates InputPanel before the focus is set to an input field.
+\row
+ \li \e [-no]-vkb-layouts
+ \li
+ \li Enables or disables built-in layouts
+ \li By default, the virtual keyboard plugin contains the English keyboard layout.
+ By specifiying \e -no-vkb-layouts, the built-in layout(s) are excluded from
+ the virtual keyboard plugin.
+ \note In this scenario, the \c QT_VIRTUALKEYBOARD_LAYOUT_PATH environment
+ variable should be set to the file system directory containing the custom
+ keyboard layouts before running the application.
\endtable
-\section3 Advanced Configuration Options
-
-The table below shows the advanced configuration options that will be applied
-automatically when activating a certain top-level feature. The options can also be
-used for enabling or disabling a specific feature.
+These options can be passed to configure when doing a full build of Qt.
+Alternatively, when building only the Qt Virtual Keyboard, you can configure
+the keyboard using the following command (where SRCDIR points to the source
+directory of QtVirtualKeyboard):
-In most cases, these options are not needed, but there are also cases where their use is
-justified. For example, the Traditional Chinese language (CONFIG=lang-zh_TW) will include
-both Zhuyin and Cangjie input methods by default. This behavior can be changed by adding
-the preferred input method to the configuration, e.g., \c CONFIG+="lang-zh_TW zhuyin".
+\badcode
+qmake $SRCDIR -- [options]
+\endcode
\table
-\header
- \li Advanced CONFIG
- \li Top-level CONFIG
- \li Description
- \li Remarks
-\row
- \li \e disable-desktop
- \li \e n/a
- \li Disables Desktop integration
- \li By default, the desktop integration is enabled when the target environment
- is X11 or Windows desktop. With this option, the desktop integration can be
- disabled.
- \note For embedded integration, where the InputPanel is instantitated by
- the application, there is no need to use this option explicitly. The virtual
- keyboard will not create the desktop input panel if the application creates
- InputPanel before the focus is set to an input field.
-\row
- \li \e disable-layouts
- \li \e n/a
- \li Disables built-in layouts
- \li By default, the virtual keyboard plugin contains the English keyboard layout.
- By specifiying the \e disable-layouts configuration flag, the built-in layout(s)
- are excluded from the virtual keyboard plugin.
- \note In this scenario, the \c QT_VIRTUALKEYBOARD_LAYOUT_PATH environment
- variable should be set to the file system directory containing the custom keyboard
- layouts before running the application.
-\row
- \li \e disable-xcb
- \li \e n/a
- \li Disables X11 integration
- \li \note Deprecated since 1.3. Use \e disable-desktop instead.
\row
\li \e disable-hunspell
\li \e n/a
@@ -191,22 +199,6 @@ the preferred input method to the configuration, e.g., \c CONFIG+="lang-zh_TW zh
\li This option excludes tcime resources from the plugin binary. This option may be
used to reduce the plugin binary size.
\row
- \li \e static
- \li Enables static builds of the virtual keyboard
- \li This option enables \l {Static builds}{static builds}.
-\row
- \li \e retro-style
- \li \e n/a
- \li Enables Retro style
- \li Changes the default keyboard style to the Retro style. Both styles are still
- included in the package, but this option allows you to change the built-in
- default style.
-\row
- \li \e no-builtin-style
- \li \e n/a
- \li Disables bunding of styles
- \li This option excludes styles from the plugin binary.
-\row
\li \e pinyin
\li \e lang-zh_CN
\li Enables the Pinyin input method for Simplified Chinese.
@@ -223,29 +215,6 @@ the preferred input method to the configuration, e.g., \c CONFIG+="lang-zh_TW zh
\include build.qdocinc input-method-language-option-note
\row
- \li \e cangjie
- \li \e lang-zh_TW
- \li Enables the Cangjie input method for Traditional Chinese.
- \li This option activates the Cangjie input method for the Traditional Chinese
- language.
-
- \include build.qdocinc input-method-language-option-note
-\row
- \li \e zhuyin
- \li \e lang-zh_TW
- \li Enables the Zhuyin input method for Traditional Chinese.
- \li This option activates the Zhuyin input method for the Traditional Chinese
- language.
-
- \include build.qdocinc input-method-language-option-note
-\row
- \li \e hangul
- \li \e lang-ko_KR
- \li Enables the Hangul input method for Korean.
- \li This option activates the Hangul input method for the Korean language.
-
- \include build.qdocinc input-method-language-option-note
-\row
\li \e openwnn
\li \e lang-ja_JP
\li Enables the OpenWnn input method for Japanese.
@@ -257,16 +226,6 @@ the preferred input method to the configuration, e.g., \c CONFIG+="lang-zh_TW zh
\li \e handwriting
\li Enables the handwriting input method using Lipi Toolkit.
\li Handwriting recognition is based on the open source Lipi Toolkit.
-\row
- \li \e t9write
- \li \e handwriting
- \li Enables the handwriting input method using T9 Write.
- \li Handwriting recognition is based on the commercial T9 Write product from Nuance Communications.
-\row
- \li \e myscript
- \li \e handwriting
- \li Enables the handwriting input method using MyScript Text SDK.
- \li Handwriting recognition is based on the most recent commercial Text Recognition SDK product from MyScript.
\endtable
\section2 Building Documentation
diff --git a/src/virtualkeyboard/qvirtualkeyboard_global.h b/src/virtualkeyboard/qvirtualkeyboard_global.h
index f14375e5..b4719d3c 100644
--- a/src/virtualkeyboard/qvirtualkeyboard_global.h
+++ b/src/virtualkeyboard/qvirtualkeyboard_global.h
@@ -31,6 +31,7 @@
#define QVIRTUALKEYBOARD_GLOBAL_H
#include <QtCore/qglobal.h>
+#include <QtVirtualKeyboard/qtvirtualkeyboard-config.h>
QT_BEGIN_NAMESPACE
diff --git a/src/virtualkeyboard/qvirtualkeyboard_global_p.h b/src/virtualkeyboard/qvirtualkeyboard_global_p.h
new file mode 100644
index 00000000..a8f0f12a
--- /dev/null
+++ b/src/virtualkeyboard/qvirtualkeyboard_global_p.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtVirtualkeyboard module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTVIRTUALKEYBOARDGLOBAL_H
+#define QTVIRTUALKEYBOARDGLOBAL_H
+
+#include <QtVirtualKeyboard/qvirtualkeyboard_global.h>
+#include <QtVirtualKeyboard/private/qtvirtualkeyboard-config_p.h>
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+
+#endif // QTVIRTUALKEYBOARDGLOBAL_H
+
diff --git a/src/virtualkeyboard/styles/styles.pro b/src/virtualkeyboard/styles/styles.pro
new file mode 100644
index 00000000..6914b188
--- /dev/null
+++ b/src/virtualkeyboard/styles/styles.pro
@@ -0,0 +1,18 @@
+TARGET = qtvirtualkeyboardstylesplugin
+TARGETPATH = QtQuick/VirtualKeyboard/Styles
+QT += qml quick svg
+
+CONFIG += no_cxx_module
+
+SOURCES += \
+ svgimageprovider.cpp \
+ styles_plugin.cpp
+
+HEADERS += \
+ svgimageprovider.h \
+ styles_plugin.h
+
+RESOURCES += \
+ styles.qrc
+
+load(qml_plugin)
diff --git a/src/virtualkeyboard/virtualkeyboard.pro b/src/virtualkeyboard/virtualkeyboard.pro
index cb28d6a1..37e695cc 100644
--- a/src/virtualkeyboard/virtualkeyboard.pro
+++ b/src/virtualkeyboard/virtualkeyboard.pro
@@ -2,15 +2,20 @@ TARGET = QtVirtualKeyboard
MODULE = virtualkeyboard
MODULE_PLUGIN_TYPES = virtualkeyboard
+include(../shared.pri)
+
QMAKE_DOCS = $$PWD/doc/qtvirtualkeyboard.qdocconf
include(doc/doc.pri)
QT += qml quick gui gui-private core-private
CONFIG += qtquickcompiler
-DEFINES += QVIRTUALKEYBOARD_LIBRARY
+qtConfig(vkb-sensitive-debug) {
+ MODULE_DEFINES += SENSITIVE_DEBUG
+}
-include(../config.pri)
+
+DEFINES += QVIRTUALKEYBOARD_LIBRARY
SOURCES += \
platforminputcontext.cpp \
@@ -63,6 +68,7 @@ HEADERS += \
gesturerecognizer_p.h \
handwritinggesturerecognizer_p.h \
qvirtualkeyboard_global.h \
+ qvirtualkeyboard_global_p.h \
qvirtualkeyboardextensionplugin.h \
qvirtualkeyboard_staticplugin_p.h
@@ -80,7 +86,7 @@ LAYOUT_FILES += \
content/layouts/fallback/numbers.qml \
content/layouts/fallback/main.qml \
content/layouts/fallback/symbols.qml
-contains(CONFIG, lang-en(_GB)?) {
+qtConfig(vkb-lang-en_GB) {
LAYOUT_FILES += \
content/layouts/en_GB/dialpad.fallback \
content/layouts/en_GB/digits.fallback \
@@ -88,7 +94,7 @@ contains(CONFIG, lang-en(_GB)?) {
content/layouts/en_GB/numbers.fallback \
content/layouts/en_GB/symbols.fallback
}
-contains(CONFIG, lang-en(_US)?) {
+qtConfig(vkb-lang-en_US) {
LAYOUT_FILES += \
content/layouts/en_US/dialpad.fallback \
content/layouts/en_US/digits.fallback \
@@ -96,7 +102,7 @@ contains(CONFIG, lang-en(_US)?) {
content/layouts/en_US/numbers.fallback \
content/layouts/en_US/symbols.fallback
}
-contains(CONFIG, lang-ar.*) {
+qtConfig(vkb-lang-ar_AR) {
LAYOUT_FILES += \
content/layouts/ar_AR/dialpad.fallback \
content/layouts/ar_AR/digits.qml \
@@ -104,7 +110,7 @@ contains(CONFIG, lang-ar.*) {
content/layouts/ar_AR/numbers.qml \
content/layouts/ar_AR/symbols.qml
}
-contains(CONFIG, lang-bg.*) {
+qtConfig(vkb-lang-bg_BG) {
LAYOUT_FILES += \
content/layouts/bg_BG/dialpad.fallback \
content/layouts/bg_BG/digits.fallback \
@@ -112,7 +118,7 @@ contains(CONFIG, lang-bg.*) {
content/layouts/bg_BG/numbers.fallback \
content/layouts/bg_BG/symbols.fallback
}
-contains(CONFIG, lang-cs.*) {
+qtConfig(vkb-lang-cs_CZ) {
LAYOUT_FILES += \
content/layouts/cs_CZ/dialpad.fallback \
content/layouts/cs_CZ/digits.fallback \
@@ -120,7 +126,7 @@ contains(CONFIG, lang-cs.*) {
content/layouts/cs_CZ/numbers.fallback \
content/layouts/cs_CZ/symbols.fallback
}
-contains(CONFIG, lang-da.*) {
+qtConfig(vkb-lang-da_DK) {
LAYOUT_FILES += \
content/layouts/da_DK/dialpad.fallback \
content/layouts/da_DK/digits.fallback \
@@ -128,7 +134,7 @@ contains(CONFIG, lang-da.*) {
content/layouts/da_DK/numbers.fallback \
content/layouts/da_DK/symbols.fallback
}
-contains(CONFIG, lang-de.*) {
+qtConfig(vkb-lang-de_DE) {
LAYOUT_FILES += \
content/layouts/de_DE/dialpad.fallback \
content/layouts/de_DE/digits.fallback \
@@ -136,7 +142,7 @@ contains(CONFIG, lang-de.*) {
content/layouts/de_DE/numbers.fallback \
content/layouts/de_DE/symbols.fallback
}
-contains(CONFIG, lang-el.*) {
+qtConfig(vkb-lang-el_GR) {
LAYOUT_FILES += \
content/layouts/el_GR/dialpad.fallback \
content/layouts/el_GR/digits.fallback \
@@ -144,7 +150,7 @@ contains(CONFIG, lang-el.*) {
content/layouts/el_GR/numbers.fallback \
content/layouts/el_GR/symbols.fallback
}
-contains(CONFIG, lang-es(_ES)?) {
+qtConfig(vkb-lang-es_ES) {
LAYOUT_FILES += \
content/layouts/es_ES/dialpad.fallback \
content/layouts/es_ES/digits.fallback \
@@ -152,7 +158,7 @@ contains(CONFIG, lang-es(_ES)?) {
content/layouts/es_ES/numbers.fallback \
content/layouts/es_ES/symbols.qml
}
-contains(CONFIG, lang-es(_MX)?) {
+qtConfig(vkb-lang-es_MX) {
LAYOUT_FILES += \
content/layouts/es_MX/dialpad.fallback \
content/layouts/es_MX/digits.fallback \
@@ -160,7 +166,7 @@ contains(CONFIG, lang-es(_MX)?) {
content/layouts/es_MX/numbers.fallback \
content/layouts/es_MX/symbols.qml
}
-contains(CONFIG, lang-et.*) {
+qtConfig(vkb-lang-et_EE) {
LAYOUT_FILES += \
content/layouts/et_EE/dialpad.fallback \
content/layouts/et_EE/digits.fallback \
@@ -168,7 +174,7 @@ contains(CONFIG, lang-et.*) {
content/layouts/et_EE/numbers.fallback \
content/layouts/et_EE/symbols.fallback
}
-contains(CONFIG, lang-fa.*) {
+qtConfig(vkb-lang-fa_FA) {
LAYOUT_FILES += \
content/layouts/fa_FA/dialpad.fallback \
content/layouts/fa_FA/digits.qml \
@@ -176,7 +182,7 @@ contains(CONFIG, lang-fa.*) {
content/layouts/fa_FA/numbers.qml \
content/layouts/fa_FA/symbols.qml
}
-contains(CONFIG, lang-fi.*) {
+qtConfig(vkb-lang-fi_FI) {
LAYOUT_FILES += \
content/layouts/fi_FI/dialpad.fallback \
content/layouts/fi_FI/digits.fallback \
@@ -184,7 +190,7 @@ contains(CONFIG, lang-fi.*) {
content/layouts/fi_FI/numbers.fallback \
content/layouts/fi_FI/symbols.fallback
}
-contains(CONFIG, lang-fr(_CA)?) {
+qtConfig(vkb-lang-fr_CA) {
LAYOUT_FILES += \
content/layouts/fr_CA/dialpad.fallback \
content/layouts/fr_CA/digits.fallback \
@@ -192,7 +198,7 @@ contains(CONFIG, lang-fr(_CA)?) {
content/layouts/fr_CA/numbers.fallback \
content/layouts/fr_CA/symbols.fallback
}
-contains(CONFIG, lang-fr(_FR)?) {
+qtConfig(vkb-lang-fr_FR) {
LAYOUT_FILES += \
content/layouts/fr_FR/dialpad.fallback \
content/layouts/fr_FR/digits.fallback \
@@ -200,7 +206,7 @@ contains(CONFIG, lang-fr(_FR)?) {
content/layouts/fr_FR/numbers.fallback \
content/layouts/fr_FR/symbols.fallback
}
-contains(CONFIG, lang-he.*) {
+qtConfig(vkb-lang-he_IL) {
LAYOUT_FILES += \
content/layouts/he_IL/dialpad.fallback \
content/layouts/he_IL/digits.fallback \
@@ -208,7 +214,7 @@ contains(CONFIG, lang-he.*) {
content/layouts/he_IL/numbers.fallback \
content/layouts/he_IL/symbols.qml
}
-contains(CONFIG, lang-hi.*) {
+qtConfig(vkb-lang-hi_IN) {
LAYOUT_FILES += \
content/layouts/hi_IN/dialpad.fallback \
content/layouts/hi_IN/digits.fallback \
@@ -216,7 +222,7 @@ contains(CONFIG, lang-hi.*) {
content/layouts/hi_IN/numbers.fallback \
content/layouts/hi_IN/symbols.qml
}
-contains(CONFIG, lang-hr.*) {
+qtConfig(vkb-lang-hr_HR) {
LAYOUT_FILES += \
content/layouts/hr_HR/dialpad.fallback \
content/layouts/hr_HR/digits.fallback \
@@ -224,7 +230,7 @@ contains(CONFIG, lang-hr.*) {
content/layouts/hr_HR/numbers.fallback \
content/layouts/hr_HR/symbols.fallback
}
-contains(CONFIG, lang-hu.*) {
+qtConfig(vkb-lang-hu_HU) {
LAYOUT_FILES += \
content/layouts/hu_HU/dialpad.fallback \
content/layouts/hu_HU/digits.fallback \
@@ -232,7 +238,7 @@ contains(CONFIG, lang-hu.*) {
content/layouts/hu_HU/numbers.fallback \
content/layouts/hu_HU/symbols.fallback
}
-contains(CONFIG, lang-id.*) {
+qtConfig(vkb-lang-id_ID) {
LAYOUT_FILES += \
content/layouts/id_ID/dialpad.fallback \
content/layouts/id_ID/digits.fallback \
@@ -240,7 +246,7 @@ contains(CONFIG, lang-id.*) {
content/layouts/id_ID/numbers.fallback \
content/layouts/id_ID/symbols.fallback
}
-contains(CONFIG, lang-it.*) {
+qtConfig(vkb-lang-it_IT) {
LAYOUT_FILES += \
content/layouts/it_IT/dialpad.fallback \
content/layouts/it_IT/digits.fallback \
@@ -248,7 +254,7 @@ contains(CONFIG, lang-it.*) {
content/layouts/it_IT/numbers.fallback \
content/layouts/it_IT/symbols.fallback
}
-contains(CONFIG, lang-nb.*) {
+qtConfig(vkb-lang-nb_NO) {
LAYOUT_FILES += \
content/layouts/nb_NO/dialpad.fallback \
content/layouts/nb_NO/digits.fallback \
@@ -256,7 +262,7 @@ contains(CONFIG, lang-nb.*) {
content/layouts/nb_NO/numbers.fallback \
content/layouts/nb_NO/symbols.fallback
}
-contains(CONFIG, lang-ms.*) {
+qtConfig(vkb-lang-ms_MY) {
LAYOUT_FILES += \
content/layouts/ms_MY/dialpad.fallback \
content/layouts/ms_MY/digits.fallback \
@@ -264,7 +270,7 @@ contains(CONFIG, lang-ms.*) {
content/layouts/ms_MY/numbers.fallback \
content/layouts/ms_MY/symbols.fallback
}
-contains(CONFIG, lang-nl.*) {
+qtConfig(vkb-lang-nl_NL) {
LAYOUT_FILES += \
content/layouts/nl_NL/dialpad.fallback \
content/layouts/nl_NL/digits.fallback \
@@ -272,7 +278,7 @@ contains(CONFIG, lang-nl.*) {
content/layouts/nl_NL/numbers.fallback \
content/layouts/nl_NL/symbols.fallback
}
-contains(CONFIG, lang-pl.*) {
+qtConfig(vkb-lang-pl_PL) {
LAYOUT_FILES += \
content/layouts/pl_PL/dialpad.fallback \
content/layouts/pl_PL/digits.fallback \
@@ -280,7 +286,7 @@ contains(CONFIG, lang-pl.*) {
content/layouts/pl_PL/numbers.fallback \
content/layouts/pl_PL/symbols.fallback
}
-contains(CONFIG, lang-pt(_BR)?) {
+qtConfig(vkb-lang-pt_BR) {
LAYOUT_FILES += \
content/layouts/pt_BR/dialpad.fallback \
content/layouts/pt_BR/digits.fallback \
@@ -288,7 +294,7 @@ contains(CONFIG, lang-pt(_BR)?) {
content/layouts/pt_BR/numbers.fallback \
content/layouts/pt_BR/symbols.fallback
}
-contains(CONFIG, lang-pt(_PT)?) {
+qtConfig(vkb-lang-pt_PT) {
LAYOUT_FILES += \
content/layouts/pt_PT/dialpad.fallback \
content/layouts/pt_PT/digits.fallback \
@@ -296,7 +302,7 @@ contains(CONFIG, lang-pt(_PT)?) {
content/layouts/pt_PT/numbers.fallback \
content/layouts/pt_PT/symbols.fallback
}
-contains(CONFIG, lang-ro.*) {
+qtConfig(vkb-lang-ro_RO) {
LAYOUT_FILES += \
content/layouts/ro_RO/dialpad.fallback \
content/layouts/ro_RO/digits.fallback \
@@ -304,7 +310,7 @@ contains(CONFIG, lang-ro.*) {
content/layouts/ro_RO/numbers.fallback \
content/layouts/ro_RO/symbols.fallback
}
-contains(CONFIG, lang-ru.*) {
+qtConfig(vkb-lang-ru_RU) {
LAYOUT_FILES += \
content/layouts/ru_RU/dialpad.fallback \
content/layouts/ru_RU/digits.fallback \
@@ -312,7 +318,7 @@ contains(CONFIG, lang-ru.*) {
content/layouts/ru_RU/numbers.fallback \
content/layouts/ru_RU/symbols.fallback
}
-contains(CONFIG, lang-sk.*) {
+qtConfig(vkb-lang-sk_SK) {
LAYOUT_FILES += \
content/layouts/sk_SK/dialpad.fallback \
content/layouts/sk_SK/digits.fallback \
@@ -320,7 +326,7 @@ contains(CONFIG, lang-sk.*) {
content/layouts/sk_SK/numbers.fallback \
content/layouts/sk_SK/symbols.fallback
}
-contains(CONFIG, lang-sl.*) {
+qtConfig(vkb-lang-sl_SI) {
LAYOUT_FILES += \
content/layouts/sl_SI/dialpad.fallback \
content/layouts/sl_SI/digits.fallback \
@@ -328,7 +334,7 @@ contains(CONFIG, lang-sl.*) {
content/layouts/sl_SI/numbers.fallback \
content/layouts/sl_SI/symbols.fallback
}
-contains(CONFIG, lang-sq.*) {
+qtConfig(vkb-lang-sq_AL) {
LAYOUT_FILES += \
content/layouts/sq_AL/dialpad.fallback \
content/layouts/sq_AL/digits.fallback \
@@ -336,7 +342,7 @@ contains(CONFIG, lang-sq.*) {
content/layouts/sq_AL/numbers.fallback \
content/layouts/sq_AL/symbols.fallback
}
-contains(CONFIG, lang-sr.*) {
+qtConfig(vkb-lang-sr_SP) {
LAYOUT_FILES += \
content/layouts/sr_SP/dialpad.fallback \
content/layouts/sr_SP/digits.fallback \
@@ -344,7 +350,7 @@ contains(CONFIG, lang-sr.*) {
content/layouts/sr_SP/numbers.fallback \
content/layouts/sr_SP/symbols.fallback
}
-contains(CONFIG, lang-sv.*) {
+qtConfig(vkb-lang-sv_SE) {
LAYOUT_FILES += \
content/layouts/sv_SE/dialpad.fallback \
content/layouts/sv_SE/digits.fallback \
@@ -352,7 +358,7 @@ contains(CONFIG, lang-sv.*) {
content/layouts/sv_SE/numbers.fallback \
content/layouts/sv_SE/symbols.fallback
}
-contains(CONFIG, lang-tr.*) {
+qtConfig(vkb-lang-tr_TR) {
LAYOUT_FILES += \
content/layouts/tr_TR/dialpad.fallback \
content/layouts/tr_TR/digits.fallback \
@@ -360,7 +366,7 @@ contains(CONFIG, lang-tr.*) {
content/layouts/tr_TR/numbers.fallback \
content/layouts/tr_TR/symbols.fallback
}
-contains(CONFIG, lang-uk.*) {
+qtConfig(vkb-lang-uk_UA) {
LAYOUT_FILES += \
content/layouts/uk_UA/dialpad.fallback \
content/layouts/uk_UA/digits.fallback \
@@ -368,7 +374,7 @@ contains(CONFIG, lang-uk.*) {
content/layouts/uk_UA/numbers.fallback \
content/layouts/uk_UA/symbols.fallback
}
-contains(CONFIG, lang-vi.*) {
+qtConfig(vkb-lang-vi_VN) {
LAYOUT_FILES += \
content/layouts/vi_VN/dialpad.fallback \
content/layouts/vi_VN/digits.fallback \
@@ -377,9 +383,9 @@ contains(CONFIG, lang-vi.*) {
content/layouts/vi_VN/symbols.qml
}
-no-builtin-style {
+qtConfig(vkb-no-builtin-style){
DEFINES += QT_VIRTUALKEYBOARD_DEFAULT_STYLE=\\\"\\\"
-} else:retro-style {
+} else:qtConfig(vkb-retro-style) {
DEFINES += QT_VIRTUALKEYBOARD_DEFAULT_STYLE=\\\"retro\\\"
} else {
DEFINES += QT_VIRTUALKEYBOARD_DEFAULT_STYLE=\\\"default\\\"
@@ -401,29 +407,27 @@ OTHER_FILES += \
qtvirtualkeyboard.json \
$$LAYOUT_FILES
-!disable-desktop:isEmpty(CROSS_COMPILE):!android-embedded:!qnx {
+qtConfig(vkb-desktop) {
SOURCES += desktopinputpanel.cpp inputview.cpp
HEADERS += desktopinputpanel_p.h inputview_p.h
DEFINES += QT_VIRTUALKEYBOARD_DESKTOP
- !no-pkg-config:packagesExist(xcb) {
- PKGCONFIG += xcb xcb-xfixes
- DEFINES += QT_VIRTUALKEYBOARD_HAVE_XCB
- }
+ qtConfig(vkb-xcb): \
+ QMAKE_USE += xcb-xfixes
}
-record-trace-input {
+qtConfig(vkb-record-trace-input) {
SOURCES += unipentrace.cpp
HEADERS += unipentrace_p.h
MODULE_DEFINES += QT_VIRTUALKEYBOARD_RECORD_TRACE_INPUT
}
-arrow-key-navigation: DEFINES += QT_VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION
+qtConfig(vkb-arrow-keynavigation): \
+ DEFINES += QT_VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION
-!disable-layouts {
+qtConfig(vkb-layouts) {
virtualkeyboard_layouts.files = $$LAYOUT_FILES
virtualkeyboard_layouts.prefix = $$LAYOUTS_PREFIX
RESOURCES += virtualkeyboard_layouts
- DEFINES += HAVE_LAYOUTS
}
load(qt_module)