diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-15 12:24:35 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-08-15 13:50:35 +0200 |
commit | c7af140c1e59cd1e5f8a7361b9be593548e105a0 (patch) | |
tree | ea0033688ff25d1ea0ac48103aad54370f4e070a | |
parent | 4437f07e2c15391144f56140a8f0cbc7a14517c1 (diff) | |
parent | dd8c39ea9312ec1441b3fdd830f9d42fe3258b58 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/virtualkeyboard/t9writeworker.cpp
src/virtualkeyboard/t9writeworker.h
Change-Id: I1fa1567e2739766c55c0e94b10706eecb8ba2ae1
-rw-r--r-- | src/virtualkeyboard/doc/src/deployment-guide.qdoc | 7 | ||||
-rw-r--r-- | src/virtualkeyboard/hunspellworker.cpp | 4 | ||||
-rw-r--r-- | src/virtualkeyboard/hunspellworker.h | 2 | ||||
-rw-r--r-- | src/virtualkeyboard/lipiworker.cpp | 4 | ||||
-rw-r--r-- | src/virtualkeyboard/lipiworker.h | 2 | ||||
-rw-r--r-- | src/virtualkeyboard/openwnninputmethod.cpp | 15 | ||||
-rw-r--r-- | src/virtualkeyboard/t9writeworker.cpp | 2 | ||||
-rw-r--r-- | src/virtualkeyboard/t9writeworker.h | 2 | ||||
-rw-r--r-- | tests/auto/inputpanel/data/tst_inputpanel.qml | 2 |
9 files changed, 22 insertions, 18 deletions
diff --git a/src/virtualkeyboard/doc/src/deployment-guide.qdoc b/src/virtualkeyboard/doc/src/deployment-guide.qdoc index c3729d84..431dcf10 100644 --- a/src/virtualkeyboard/doc/src/deployment-guide.qdoc +++ b/src/virtualkeyboard/doc/src/deployment-guide.qdoc @@ -41,11 +41,8 @@ with Qt 5 applications. \section1 Deployment -The Qt Virtual Keyboard plugin must be properly deployed before it can be used. -The easiest approach to deployment is to add a deployment step -in Qt Creator that executes the \c {make install} command. - -\c {make install} deploys the files in the following locations: +The various Qt Virtual Keyboard plugins and files are deployed in the following +locations: \table \header diff --git a/src/virtualkeyboard/hunspellworker.cpp b/src/virtualkeyboard/hunspellworker.cpp index ec418f50..f2e502ad 100644 --- a/src/virtualkeyboard/hunspellworker.cpp +++ b/src/virtualkeyboard/hunspellworker.cpp @@ -260,9 +260,9 @@ HunspellWorker::HunspellWorker(QObject *parent) : QThread(parent), taskSema(), taskLock(), - hunspell(0), - abort(false) + hunspell(0) { + abort = false; } HunspellWorker::~HunspellWorker() diff --git a/src/virtualkeyboard/hunspellworker.h b/src/virtualkeyboard/hunspellworker.h index 43fb07e4..ff423595 100644 --- a/src/virtualkeyboard/hunspellworker.h +++ b/src/virtualkeyboard/hunspellworker.h @@ -147,7 +147,7 @@ private: QSemaphore taskSema; QMutex taskLock; Hunhandle *hunspell; - QAtomicInteger<bool> abort; + QBasicAtomicInt abort; }; } // namespace QtVirtualKeyboard diff --git a/src/virtualkeyboard/lipiworker.cpp b/src/virtualkeyboard/lipiworker.cpp index 89a202c0..45983621 100644 --- a/src/virtualkeyboard/lipiworker.cpp +++ b/src/virtualkeyboard/lipiworker.cpp @@ -188,9 +188,9 @@ LipiWorker::LipiWorker(LTKShapeRecognizer *shapeRecognizer, QObject *parent) : QThread(parent), taskSema(), taskLock(), - shapeRecognizer(shapeRecognizer), - abort(false) + shapeRecognizer(shapeRecognizer) { + abort = false; } LipiWorker::~LipiWorker() diff --git a/src/virtualkeyboard/lipiworker.h b/src/virtualkeyboard/lipiworker.h index 676a2341..1117c3f4 100644 --- a/src/virtualkeyboard/lipiworker.h +++ b/src/virtualkeyboard/lipiworker.h @@ -140,7 +140,7 @@ private: QSemaphore taskSema; QMutex taskLock; LTKShapeRecognizer *shapeRecognizer; - QAtomicInteger<bool> abort; + QBasicAtomicInt abort; }; } // namespace QtVirtualKeyboard diff --git a/src/virtualkeyboard/openwnninputmethod.cpp b/src/virtualkeyboard/openwnninputmethod.cpp index 38812f97..edba99c0 100644 --- a/src/virtualkeyboard/openwnninputmethod.cpp +++ b/src/virtualkeyboard/openwnninputmethod.cpp @@ -728,15 +728,19 @@ bool OpenWnnInputMethod::keyEvent(Qt::Key key, const QString &text, Qt::Keyboard default: if (key < Qt::Key_Escape && !text.isEmpty() && text.at(0).isPrint()) { - if (d->composingText.size(ComposingText::LAYER1) < OpenWnnInputMethodPrivate::MAX_COMPOSING_TEXT) { + if (d->composingText.size(ComposingText::LAYER1) + text.size() > OpenWnnInputMethodPrivate::MAX_COMPOSING_TEXT) + return true; + const int last = text.size() - 1; + for (int i = 0; i <= last; ++i) { if (d->isEnableL2Converter()) { d->commitConvertingText(); - d->composingText.insertStrSegment(ComposingText::LAYER0, ComposingText::LAYER1, text); + d->composingText.insertStrSegment(ComposingText::LAYER0, ComposingText::LAYER1, text.mid(i, 1)); if (d->preConverter != NULL) d->preConverter->convert(d->composingText); - d->updateViewStatusForPrediction(true, true); + if (i == last) + d->updateViewStatusForPrediction(true, true); } else { - d->composingText.insertStrSegment(ComposingText::LAYER0, ComposingText::LAYER1, text); + d->composingText.insertStrSegment(ComposingText::LAYER0, ComposingText::LAYER1, text.mid(i, 1)); QString layer1 = d->composingText.toString(ComposingText::LAYER1); if (!d->isAlphabetLast(layer1)) { d->commitText(false); @@ -745,7 +749,8 @@ bool OpenWnnInputMethod::keyEvent(Qt::Key key, const QString &text, Qt::Keyboard if (completed) { d->commitTextWithoutLastAlphabet(); } else { - d->updateViewStatusForPrediction(true, true); + if (i == last) + d->updateViewStatusForPrediction(true, true); } } } diff --git a/src/virtualkeyboard/t9writeworker.cpp b/src/virtualkeyboard/t9writeworker.cpp index c2f33124..adbdcedb 100644 --- a/src/virtualkeyboard/t9writeworker.cpp +++ b/src/virtualkeyboard/t9writeworker.cpp @@ -309,9 +309,9 @@ T9WriteWorker::T9WriteWorker(DECUMA_SESSION *decumaSession, const bool cjk, QObj taskSema(), taskLock(), decumaSession(decumaSession), - abort(false), cjk(cjk) { + abort = false; } T9WriteWorker::~T9WriteWorker() diff --git a/src/virtualkeyboard/t9writeworker.h b/src/virtualkeyboard/t9writeworker.h index 5dc8c0d9..437a84f5 100644 --- a/src/virtualkeyboard/t9writeworker.h +++ b/src/virtualkeyboard/t9writeworker.h @@ -184,7 +184,7 @@ private: QSemaphore taskSema; QMutex taskLock; DECUMA_SESSION *decumaSession; - QAtomicInteger<bool> abort; + QBasicAtomicInt abort; const bool cjk; }; diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml index 99ed8a61..81b9b1ce 100644 --- a/tests/auto/inputpanel/data/tst_inputpanel.qml +++ b/tests/auto/inputpanel/data/tst_inputpanel.qml @@ -1061,6 +1061,8 @@ Rectangle { { initLocale: "ja_JP", initInputMode: "Hiragana", inputSequence: ["n","i","h","o","n","g","o",Qt.Key_Return], outputText: "\u306B\u307B\u3093\u3054" }, // Hiragana to Kanjie conversion { initLocale: "ja_JP", initInputMode: "Hiragana", inputSequence: ["n","i","h","o","n","g","o",Qt.Key_Space,Qt.Key_Return], outputText: "\u65E5\u672C\u8A9E" }, + // Hiragana to Kanjie conversion plus a smiley + { initLocale: "ja_JP", initInputMode: "Hiragana", inputSequence: ["n","i","h","o","n","g","o",0xE000,Qt.Key_Space,Qt.Key_Return,Qt.Key_Return], outputText: "\u65E5\u672C\u8A9E\uFF1A\u30FC\uFF09" }, // Correction to Hiragana sequence using exact match mode { initLocale: "ja_JP", initInputMode: "Hiragana", inputSequence: [ // Write part of the text leaving out "ni" from the beginning |