aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugin/plugin.cpp
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-08-07 12:01:39 +0300
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-08-16 13:31:39 +0000
commite803aec1ea21fd00e13b9535a4b536cc43c26ee4 (patch)
tree7cdcfcebb4de0cf3651aeea56637e335b46f9a18 /src/plugin/plugin.cpp
parentcf69f8603e3a1fee24f79d1b446b5ea717e2cf7d (diff)
Add user dictionary and learning for Hunspell
This change adds user dictionary and learning function for Hunspell. Learning happens when the user selects the first candidate from the word candidate list (or presses the space key while the first candidate is selected) and the word does not exist in the default dictionary. User can remove a word from user dictionary by long pressing an item on the word candidate list (and selecting from the menu). This also allows the user to block words originating from the system dictionary. The Hunspell user dictionary is hard limited to 100 words. However, when user enters a word again (which exists in the user dictionary), it will be prioritized in the dictionary, so the most frequent words stay in the dictionary. The dictionaries are language and locale specific and are stored in: QStandardPaths::GenericConfigLocation + "/qtvirtualkeyboard/hunspell" The dictionaries are UTF-8 encoded text files and contain one word per line. The same directory also contains the blacklist files (which also exist per language and locale). These files contain words which are blacklisted from the default dictionary. [ChangeLog] Added user dictionary and learning for Hunspell Change-Id: Ib0fc70f7eaa14ec49b74000144a75c59313ac0fb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/plugin/plugin.cpp')
-rw-r--r--src/plugin/plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugin/plugin.cpp b/src/plugin/plugin.cpp
index 4841f53b..956bafbd 100644
--- a/src/plugin/plugin.cpp
+++ b/src/plugin/plugin.cpp
@@ -191,7 +191,7 @@ QPlatformInputContext *QVirtualKeyboardPlugin::create(const QString &system, con
qmlRegisterType(QUrl(componentsPath + QLatin1String("TraceInputArea.qml")), pluginUri, 2, 0, "TraceInputArea");
qmlRegisterType(QUrl(componentsPath + QLatin1String("TraceInputKey.qml")), pluginUri, 2, 0, "TraceInputKey");
qmlRegisterType(QUrl(componentsPath + QLatin1String("WordCandidatePopupList.qml")), pluginUri, 2, 0, "WordCandidatePopupList");
- qmlRegisterType(QUrl(componentsPath + QLatin1String("LanguagePopupList.qml")), pluginUri, 2, 1, "LanguagePopupList");
+ qmlRegisterType(QUrl(componentsPath + QLatin1String("PopupList.qml")), pluginUri, 2, 3, "PopupList");
qmlRegisterType(QUrl(componentsPath + QLatin1String("SelectionControl.qml")), pluginUri, 2, 1, "SelectionControl");
qmlRegisterType(QUrl(componentsPath + QLatin1String("InputModeKey.qml")), pluginUri, 2, 3, "InputModeKey");