Merge lp:~michael-sheldon/ubuntu-keyboard/fix-1335002 into lp:ubuntu-keyboard

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 244
Merged at revision: 249
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/fix-1335002
Merge into: lp:ubuntu-keyboard
Diff against target: 61 lines (+11/-0)
4 files modified
src/lib/logic/abstractwordengine.h (+1/-0)
src/lib/logic/wordengine.cpp (+1/-0)
src/plugin/inputmethod.cpp (+7/-0)
src/plugin/inputmethod.h (+2/-0)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/fix-1335002
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+241974@code.launchpad.net

Commit message

Reset the keyboard when the language plugin changes.

Description of the change

Reset the keyboard when the language plugin changes.

To post a comment you must log in.
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/ubuntu-keyboard) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed UI labels, did you update the pot file?

 * No change

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * No change

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

tested, approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/lib/logic/abstractwordengine.h'
2--- src/lib/logic/abstractwordengine.h 2014-10-29 13:57:51 +0000
3+++ src/lib/logic/abstractwordengine.h 2014-11-17 14:54:38 +0000
4@@ -77,6 +77,7 @@
5 signals:
6 void preeditFaceChanged(Model::Text::PreeditFace face);
7 void primaryCandidateChanged(QString candidate);
8+ void pluginChanged();
9
10 private:
11 virtual void fetchCandidates(Model::Text *text) = 0;
12
13=== modified file 'src/lib/logic/wordengine.cpp'
14--- src/lib/logic/wordengine.cpp 2014-11-07 11:31:10 +0000
15+++ src/lib/logic/wordengine.cpp 2014-11-17 14:54:38 +0000
16@@ -412,6 +412,7 @@
17
18 connect((AbstractLanguagePlugin *) d->languagePlugin, SIGNAL(newSpellingSuggestions(QString, QStringList)), this, SLOT(newSpellingSuggestions(QString, QStringList)));
19 connect((AbstractLanguagePlugin *) d->languagePlugin, SIGNAL(newPredictionSuggestions(QString, QStringList)), this, SLOT(newPredictionSuggestions(QString, QStringList)));
20+ Q_EMIT pluginChanged();
21 }
22
23 AbstractLanguageFeatures* WordEngine::languageFeature()
24
25=== modified file 'src/plugin/inputmethod.cpp'
26--- src/plugin/inputmethod.cpp 2014-11-04 20:17:45 +0000
27+++ src/plugin/inputmethod.cpp 2014-11-17 14:54:38 +0000
28@@ -103,6 +103,7 @@
29
30 connect(this, SIGNAL(contentTypeChanged(TextContentType)), this, SLOT(setContentType(TextContentType)));
31 connect(this, SIGNAL(activeLanguageChanged(QString)), d->editor.wordEngine(), SLOT(onLanguageChanged(QString)));
32+ connect(d->editor.wordEngine(), SIGNAL(pluginChanged()), this, SLOT(onWordEnginePluginChanged()));
33 connect(this, SIGNAL(keyboardStateChanged(QString)), &d->editor, SLOT(onKeyboardStateChanged(QString)));
34 connect(d->m_geometry, SIGNAL(visibleRectChanged()), this, SLOT(onVisibleRectChanged()));
35 d->registerAudioFeedbackSoundSetting();
36@@ -516,6 +517,12 @@
37 Q_EMIT activeLanguageChanged(d->activeLanguage);
38 }
39
40+void InputMethod::onWordEnginePluginChanged()
41+{
42+ reset();
43+ update();
44+}
45+
46 const QString InputMethod::keyboardState() const
47 {
48 Q_D(const InputMethod);
49
50=== modified file 'src/plugin/inputmethod.h'
51--- src/plugin/inputmethod.h 2014-10-07 15:44:46 +0000
52+++ src/plugin/inputmethod.h 2014-11-17 14:54:38 +0000
53@@ -147,6 +147,8 @@
54 Q_SLOT void onLayoutWidthChanged(int width);
55 Q_SLOT void onLayoutHeightChanged(int height);
56
57+ Q_SLOT void onWordEnginePluginChanged();
58+
59 void checkAutocaps();
60
61 const QScopedPointer<InputMethodPrivate> d_ptr;

Subscribers

People subscribed via source and target branches