diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-16 14:50:22 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2017-08-16 14:50:22 +0000 |
commit | 530b7cb114ccbc0567b2c279492b6dfd980dcec0 (patch) | |
tree | 426ee254bb92f3da97935fe6458ae34c999a96cd /src | |
parent | d256ad12c3dca5269626158d64c73e07a44f0ec9 (diff) | |
parent | c7af140c1e59cd1e5f8a7361b9be593548e105a0 (diff) |
Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev
Diffstat (limited to 'src')
-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 |
8 files changed, 20 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; }; |