Merge lp:~thomas-moenicke/phablet-extras/maliit-plugins-0.99-server into lp:phablet-extras/maliit-plugins

Proposed by Thomas Moenicke
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 2137
Merged at revision: 2131
Proposed branch: lp:~thomas-moenicke/phablet-extras/maliit-plugins-0.99-server
Merge into: lp:phablet-extras/maliit-plugins
Prerequisite: lp:~thomas-moenicke/phablet-extras/maliit-framework-server-upgrade-noquilt
Diff against target: 322 lines (+87/-37)
7 files modified
debian/changelog (+6/-0)
debian/control (+3/-3)
debian/rules (+2/-0)
maliit-keyboard/lib/logic/dynamiclayout_p.h (+1/-1)
maliit-keyboard/plugin/inputmethod.cpp (+65/-31)
maliit-keyboard/plugin/inputmethod.h (+10/-0)
maliit-keyboard/view/view.pro (+0/-2)
To merge this branch: bzr merge lp:~thomas-moenicke/phablet-extras/maliit-plugins-0.99-server
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Günter Schwann (community) Approve
Review via email: mp+172799@code.launchpad.net

Commit message

update to latest server

Description of the change

update to latest server

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Günter Schwann (schwann) wrote :

133 + // : surface_factory(host->surfaceFactory())
134 + // , surface(qSharedPointerDynamicCast<Surface>(surface_factory->create(g_surface_options)))

Should be removed

Revision history for this message
Thomas Moenicke (thomas-moenicke) wrote :

@Guenter: fixed, thx

Revision history for this message
Günter Schwann (schwann) wrote :

looks good

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-06-07 19:08:57 +0000
3+++ debian/changelog 2013-07-03 15:12:32 +0000
4@@ -1,3 +1,9 @@
5+maliit-plugins (0.99.trunk.phablet0) saucy; urgency=low
6+
7+ * upgraded to 0.99 server
8+
9+ -- Thomas Moenicke <thomas@pachamama> Wed, 03 Jul 2013 16:19:53 +0200
10+
11 maliit-plugins (0.95.2phablet10) saucy; urgency=low
12
13 * added word endine/wordribbon
14
15=== modified file 'debian/control'
16--- debian/control 2013-06-06 10:29:18 +0000
17+++ debian/control 2013-07-03 15:12:32 +0000
18@@ -11,7 +11,7 @@
19 libgl-dev,
20 libgles2-mesa-dev,
21 doxygen,
22- maliit-framework-dev (>= 0.94.0-w03-springbok1phablet15),
23+ maliit-framework-dev (>= 0.99.trunk.phablet0),
24 libhunspell-dev,
25 libpresage-dev,
26 libubuntu-platform-api1-dev
27@@ -20,7 +20,7 @@
28 Package: nemo-keyboard
29 Provides: maliit-inputmethod-plugin
30 Architecture: any
31-Depends: maliit-framework,
32+Depends: maliit-framework (>= 0.99.trunk.phablet0),
33 ${misc:Depends},
34 ${shlibs:Depends},
35 qtdeclarative5-window-plugin,
36@@ -37,7 +37,7 @@
37 Package: maliit-keyboard
38 Provides: maliit-inputmethod-plugin
39 Architecture: armhf
40-Depends: maliit-framework,
41+Depends: maliit-framework (>= 0.99.trunk.phablet0),
42 libpresage1,
43 ${misc:Depends},
44 ${shlibs:Depends},
45
46=== modified file 'debian/rules'
47--- debian/rules 2013-06-07 08:43:47 +0000
48+++ debian/rules 2013-07-03 15:12:32 +0000
49@@ -12,7 +12,9 @@
50 # Build options
51 QMAKE_OPTIONS = \
52 MALIIT_DEFAULT_PROFILE=ubuntu \
53+ CONFIG+=debug \
54 CONFIG+=nodoc \
55+ CONFIG+=notests \
56 CONFIG+=enable-presage \
57 CONFIG+=enable-hunspell \
58 CONFIG+=enable-preedit \
59
60=== modified file 'maliit-keyboard/lib/logic/dynamiclayout_p.h'
61--- maliit-keyboard/lib/logic/dynamiclayout_p.h 2013-06-05 13:00:26 +0000
62+++ maliit-keyboard/lib/logic/dynamiclayout_p.h 2013-07-03 15:12:32 +0000
63@@ -102,7 +102,7 @@
64 DynamicLayoutStorage* genericStorage;
65
66 DynamicLayoutPrivate(DynamicLayout* _q) :
67- q(q),
68+ q(_q),
69 initialized(false),
70 wordRibbonEnabled(false),
71 portraitStorage(new DynamicLayoutStorage),
72
73=== modified file 'maliit-keyboard/plugin/inputmethod.cpp'
74--- maliit-keyboard/plugin/inputmethod.cpp 2013-06-06 16:47:16 +0000
75+++ maliit-keyboard/plugin/inputmethod.cpp 2013-07-03 15:12:32 +0000
76@@ -48,7 +48,6 @@
77 #include "logic/keyareaconverter.h"
78 #include "logic/dynamiclayout.h"
79
80-#include "view/glass.h"
81 #include "view/setup.h"
82
83 #ifdef HAVE_QT_MOBILITY
84@@ -60,10 +59,10 @@
85 #endif
86
87 #include <maliit/plugins/subviewdescription.h>
88-#include <maliit/plugins/abstractsurfacefactory.h>
89-#include <maliit/plugins/quickviewsurface.h>
90 #include <maliit/plugins/abstractpluginsetting.h>
91 #include <maliit/plugins/updateevent.h>
92+#include <maliit/plugins/abstractinputmethodhost.h>
93+
94
95 #include <QApplication>
96 #include <QWidget>
97@@ -85,14 +84,6 @@
98
99 namespace {
100
101-const Maliit::Plugins::AbstractSurface::Options g_surface_options(
102- Maliit::Plugins::AbstractSurface::TypeQuick2 | Maliit::Plugins::AbstractSurface::PositionCenterBottom
103-);
104-
105-const Maliit::Plugins::AbstractSurface::Options g_extended_surface_options(
106- Maliit::Plugins::AbstractSurface::TypeQuick2 | Maliit::Plugins::AbstractSurface::PositionOverlay
107-);
108-
109 const QString g_maliit_keyboard_qml(MALIIT_KEYBOARD_DATA_DIR "/maliit-keyboard.qml");
110 const QString g_maliit_keyboard_extended_qml(MALIIT_KEYBOARD_DATA_DIR "/maliit-keyboard-extended.qml");
111 const QString g_maliit_magnifier_qml(MALIIT_KEYBOARD_DATA_DIR "/maliit-magnifier.qml");
112@@ -140,15 +131,23 @@
113 , event_handler(&model, &updater)
114 {}
115
116+QQuickView *createWindow(MAbstractInputMethodHost *host)
117+{
118+ QScopedPointer<QQuickView> view(new QQuickView);
119+
120+ QSurfaceFormat format;
121+ format.setAlphaBufferSize(8);
122+ view->setFormat(format);
123+ view->setColor(QColor(Qt::transparent));
124+
125+ host->registerWindow(view.data(), Maliit::PositionCenterBottom);
126+
127+ return view.take();
128+}
129
130 class InputMethodPrivate
131 {
132 public:
133- typedef Maliit::Plugins::QuickViewSurface Surface;
134- typedef QSharedPointer<Surface> SharedSurface;
135-
136- Maliit::Plugins::AbstractSurfaceFactory *const surface_factory;
137- SharedSurface surface;
138 QQuickItem* qmlRootItem;
139 #ifdef EXTENDED_SURFACE_TEMP_DISABLED
140 SharedSurface extended_surface;
141@@ -169,6 +168,8 @@
142 MAbstractInputMethodHost* host;
143 QQuickView* view;
144
145+ bool predictionEnabled;
146+
147 explicit InputMethodPrivate(InputMethod * const q,
148 MAbstractInputMethodHost *host);
149 void setLayoutOrientation(Logic::LayoutHelper::Orientation orientation);
150@@ -182,13 +183,13 @@
151
152 InputMethodPrivate::InputMethodPrivate(InputMethod *const q,
153 MAbstractInputMethodHost *host)
154- : surface_factory(host->surfaceFactory())
155- , surface(qSharedPointerDynamicCast<Surface>(surface_factory->create(g_surface_options)))
156+ // : surface_factory(host->surfaceFactory())
157+ // , surface(qSharedPointerDynamicCast<Surface>(surface_factory->create(g_surface_options)))
158 #ifdef EXTENDED_SURFACE_TEMP_DISABLED
159 , extended_surface(qSharedPointerDynamicCast<Surface>(surface_factory->create(g_extended_surface_options, surface)))
160 , magnifier_surface(qSharedPointerDynamicCast<Surface>(surface_factory->create(g_extended_surface_options, surface)))
161 #endif
162- , editor(EditorOptions(), new Model::Text, new Logic::WordEngine, new Logic::LanguageFeatures)
163+ : editor(EditorOptions(), new Model::Text, new Logic::WordEngine, new Logic::LanguageFeatures)
164 , feedback()
165 , style(new Style)
166 , notifier()
167@@ -199,8 +200,11 @@
168 , magnifier_layout()
169 , context(q, style)
170 , host(host)
171- , view(new QQuickView(0))
172+ , view(0)
173+ , predictionEnabled(false)
174 {
175+ view = createWindow(host);
176+
177 editor.setHost(host);
178
179 layout.updater.setLayout(&layout.helper);
180@@ -210,7 +214,7 @@
181 extended_layout.updater.setStyle(style);
182 feedback.setStyle(style);
183
184- const QSize &screen_size(surface_factory->screenSize());
185+ const QSize &screen_size(view->screen()->size());
186 layout.helper.setScreenSize(screen_size);
187 layout.helper.setAlignment(Logic::LayoutHelper::Bottom);
188 extended_layout.helper.setScreenSize(screen_size);
189@@ -432,17 +436,14 @@
190 connect(&d->magnifier_layout, SIGNAL(originChanged(QPoint)),
191 this, SLOT(onMagnifierLayoutOriginChanged(QPoint)));
192 #endif
193- // FIXME: Reimplement keyboardClosed, switchLeft and switchRight
194- // (triggered by glass).
195
196 connect(&d->editor, SIGNAL(rightLayoutSelected()),
197 this, SLOT(onRightLayoutSelected()));
198
199- connect(d->surface_factory, SIGNAL(screenSizeChanged(QSize)),
200- this, SLOT(onScreenSizeChange(QSize)));
201-
202 connect(this, SIGNAL(wordEngineEnabledChanged(bool)), uiConst, SLOT(onWordEngineSettingsChanged(bool)));
203
204+ connect(this, SIGNAL(predictionEnabledChanged()), this, SLOT(updateWordEngine()));
205+
206 registerStyleSetting(host);
207
208 registerFeedbackSetting(host);
209@@ -451,6 +452,8 @@
210 registerWordEngineSetting(host);
211 registerHideWordRibbonInPortraitModeSetting(host);
212
213+ setActiveSubView("en_us");
214+
215 // Setting layout orientation depends on word engine and hide word ribbon
216 // settings to be initialized first:
217
218@@ -576,9 +579,9 @@
219 void InputMethod::handleAppOrientationChanged(int angle)
220 {
221 Q_UNUSED(angle);
222- Q_D(InputMethod);
223
224 #ifdef DISABLED_AS_CONTENT_ORIENTATION_NOT_WORKING
225+ Q_D(InputMethod);
226 d->updateKeyboardOrientation();
227 #endif
228 }
229@@ -846,14 +849,12 @@
230
231 void InputMethod::onLayoutWidthChanged(int width)
232 {
233- Q_D(InputMethod);
234- d->surface->setSize(QSize(width, d->surface->size().height()));
235+ Q_UNUSED(width);
236 }
237
238 void InputMethod::onLayoutHeightChanged(int height)
239 {
240- Q_D(InputMethod);
241- d->surface->setSize(QSize(d->surface->size().width(), height));
242+ Q_UNUSED(height);
243 }
244
245 #ifdef EXTENDED_SURFACE_TEMP_DISABLED
246@@ -913,4 +914,37 @@
247 d->updateKeyboardOrientation();
248 }
249
250+void InputMethod::update()
251+{
252+ Q_D(InputMethod);
253+
254+ bool valid;
255+
256+ bool emitPredictionEnabled = false;
257+ bool newPredictionEnabled = inputMethodHost()->predictionEnabled(valid);
258+
259+ if (!valid)
260+ newPredictionEnabled = true;
261+
262+ if (newPredictionEnabled != d->predictionEnabled) {
263+ d->predictionEnabled = newPredictionEnabled;
264+ emitPredictionEnabled = true;
265+ }
266+
267+ if (emitPredictionEnabled)
268+ Q_EMIT predictionEnabledChanged();
269+}
270+
271+void InputMethod::updateWordEngine()
272+{
273+ // FIXME stub
274+}
275+
276+bool InputMethod::predictionEnabled()
277+{
278+ Q_D(InputMethod);
279+ return d->predictionEnabled;
280+}
281+
282+
283 } // namespace MaliitKeyboard
284
285=== modified file 'maliit-keyboard/plugin/inputmethod.h'
286--- maliit-keyboard/plugin/inputmethod.h 2013-06-03 15:41:05 +0000
287+++ maliit-keyboard/plugin/inputmethod.h 2013-07-03 15:12:32 +0000
288@@ -74,6 +74,16 @@
289 Q_SLOT void onRightLayoutSelected();
290 Q_SLOT void deviceOrientationChanged(Qt::ScreenOrientation orientation);
291
292+ Q_SLOT void updateWordEngine();
293+
294+ Q_PROPERTY(bool predictionEnabled READ predictionEnabled NOTIFY predictionEnabledChanged)
295+
296+ bool predictionEnabled();
297+ void update();
298+
299+Q_SIGNALS:
300+ void predictionEnabledChanged();
301+
302 private:
303 void registerStyleSetting(MAbstractInputMethodHost *host);
304 void registerFeedbackSetting(MAbstractInputMethodHost *host);
305
306=== modified file 'maliit-keyboard/view/view.pro'
307--- maliit-keyboard/view/view.pro 2013-03-22 16:40:29 +0000
308+++ maliit-keyboard/view/view.pro 2013-07-03 15:12:32 +0000
309@@ -20,14 +20,12 @@
310 HEADERS += \
311 setup.h \
312 abstracttexteditor.h \
313- glass.h \
314 abstractfeedback.h \
315 nullfeedback.h \
316
317 SOURCES += \
318 setup.cpp \
319 abstracttexteditor.cpp \
320- glass.cpp \
321 abstractfeedback.cpp \
322 nullfeedback.cpp \
323

Subscribers

People subscribed via source and target branches