aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtualkeyboard/hunspellinputmethod.cpp
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2017-05-12 00:14:58 +0300
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2017-05-15 16:00:24 +0000
commitae8c8fdf92df18849376b943955063b5d5723454 (patch)
tree5a45ab7c4bce920efb6355d5f419c4e10efe00fd /src/virtualkeyboard/hunspellinputmethod.cpp
parente4595b6a04d28def801fb70dec5222914453ee14 (diff)
Hunspell: Update selection list status when loading dictionary
HunspellInputMethod must update selection list status immediately after dictionary starts load. This issue should not cause issues in normal use, but it will cause automatic tests to fail with lipi-toolkit. This is because LipiInputMethod uses HunspellInputMethod for spell correction and suggestions. The automated tests rely on selection list status when deciding if spell correction is available or not. The failing tests was test_hwrWordReselection_data. Also, fix incorrect debug stating dictionary could not be found. Change-Id: Ic6c3526a494fb60dde234c000ed9bd0d70f53335 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/virtualkeyboard/hunspellinputmethod.cpp')
-rw-r--r--src/virtualkeyboard/hunspellinputmethod.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/virtualkeyboard/hunspellinputmethod.cpp b/src/virtualkeyboard/hunspellinputmethod.cpp
index 5cd88c2e..be1a8ce9 100644
--- a/src/virtualkeyboard/hunspellinputmethod.cpp
+++ b/src/virtualkeyboard/hunspellinputmethod.cpp
@@ -163,7 +163,7 @@ QList<SelectionListModel::Type> HunspellInputMethod::selectionLists()
{
Q_D(const HunspellInputMethod);
Qt::InputMethodHints inputMethodHints = inputContext()->inputMethodHints();
- if (d->dictionaryState != HunspellInputMethodPrivate::DictionaryReady || inputMethodHints.testFlag(Qt::ImhNoPredictiveText) || inputMethodHints.testFlag(Qt::ImhHiddenText))
+ if (d->dictionaryState == HunspellInputMethodPrivate::DictionaryNotLoaded || inputMethodHints.testFlag(Qt::ImhNoPredictiveText) || inputMethodHints.testFlag(Qt::ImhHiddenText))
return QList<SelectionListModel::Type>();
return QList<SelectionListModel::Type>() << SelectionListModel::WordCandidateList;
}