From ae8c8fdf92df18849376b943955063b5d5723454 Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Fri, 12 May 2017 00:14:58 +0300 Subject: 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 --- src/virtualkeyboard/hunspellinputmethod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/virtualkeyboard/hunspellinputmethod.cpp') 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 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(); return QList() << SelectionListModel::WordCandidateList; } -- cgit v1.2.3