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
=== modified file 'debian/changelog'
--- debian/changelog 2013-06-07 19:08:57 +0000
+++ debian/changelog 2013-07-03 15:12:32 +0000
@@ -1,3 +1,9 @@
1maliit-plugins (0.99.trunk.phablet0) saucy; urgency=low
2
3 * upgraded to 0.99 server
4
5 -- Thomas Moenicke <thomas@pachamama> Wed, 03 Jul 2013 16:19:53 +0200
6
1maliit-plugins (0.95.2phablet10) saucy; urgency=low7maliit-plugins (0.95.2phablet10) saucy; urgency=low
28
3 * added word endine/wordribbon9 * added word endine/wordribbon
410
=== modified file 'debian/control'
--- debian/control 2013-06-06 10:29:18 +0000
+++ debian/control 2013-07-03 15:12:32 +0000
@@ -11,7 +11,7 @@
11 libgl-dev, 11 libgl-dev,
12 libgles2-mesa-dev, 12 libgles2-mesa-dev,
13 doxygen, 13 doxygen,
14 maliit-framework-dev (>= 0.94.0-w03-springbok1phablet15), 14 maliit-framework-dev (>= 0.99.trunk.phablet0),
15 libhunspell-dev, 15 libhunspell-dev,
16 libpresage-dev,16 libpresage-dev,
17 libubuntu-platform-api1-dev17 libubuntu-platform-api1-dev
@@ -20,7 +20,7 @@
20Package: nemo-keyboard20Package: nemo-keyboard
21Provides: maliit-inputmethod-plugin21Provides: maliit-inputmethod-plugin
22Architecture: any22Architecture: any
23Depends: maliit-framework, 23Depends: maliit-framework (>= 0.99.trunk.phablet0),
24 ${misc:Depends}, 24 ${misc:Depends},
25 ${shlibs:Depends}, 25 ${shlibs:Depends},
26 qtdeclarative5-window-plugin,26 qtdeclarative5-window-plugin,
@@ -37,7 +37,7 @@
37Package: maliit-keyboard37Package: maliit-keyboard
38Provides: maliit-inputmethod-plugin38Provides: maliit-inputmethod-plugin
39Architecture: armhf39Architecture: armhf
40Depends: maliit-framework, 40Depends: maliit-framework (>= 0.99.trunk.phablet0),
41 libpresage1, 41 libpresage1,
42 ${misc:Depends}, 42 ${misc:Depends},
43 ${shlibs:Depends}, 43 ${shlibs:Depends},
4444
=== modified file 'debian/rules'
--- debian/rules 2013-06-07 08:43:47 +0000
+++ debian/rules 2013-07-03 15:12:32 +0000
@@ -12,7 +12,9 @@
12# Build options12# Build options
13QMAKE_OPTIONS = \13QMAKE_OPTIONS = \
14 MALIIT_DEFAULT_PROFILE=ubuntu \14 MALIIT_DEFAULT_PROFILE=ubuntu \
15 CONFIG+=debug \
15 CONFIG+=nodoc \16 CONFIG+=nodoc \
17 CONFIG+=notests \
16 CONFIG+=enable-presage \18 CONFIG+=enable-presage \
17 CONFIG+=enable-hunspell \19 CONFIG+=enable-hunspell \
18 CONFIG+=enable-preedit \20 CONFIG+=enable-preedit \
1921
=== modified file 'maliit-keyboard/lib/logic/dynamiclayout_p.h'
--- maliit-keyboard/lib/logic/dynamiclayout_p.h 2013-06-05 13:00:26 +0000
+++ maliit-keyboard/lib/logic/dynamiclayout_p.h 2013-07-03 15:12:32 +0000
@@ -102,7 +102,7 @@
102 DynamicLayoutStorage* genericStorage;102 DynamicLayoutStorage* genericStorage;
103103
104 DynamicLayoutPrivate(DynamicLayout* _q) :104 DynamicLayoutPrivate(DynamicLayout* _q) :
105 q(q),105 q(_q),
106 initialized(false),106 initialized(false),
107 wordRibbonEnabled(false),107 wordRibbonEnabled(false),
108 portraitStorage(new DynamicLayoutStorage),108 portraitStorage(new DynamicLayoutStorage),
109109
=== modified file 'maliit-keyboard/plugin/inputmethod.cpp'
--- maliit-keyboard/plugin/inputmethod.cpp 2013-06-06 16:47:16 +0000
+++ maliit-keyboard/plugin/inputmethod.cpp 2013-07-03 15:12:32 +0000
@@ -48,7 +48,6 @@
48#include "logic/keyareaconverter.h"48#include "logic/keyareaconverter.h"
49#include "logic/dynamiclayout.h"49#include "logic/dynamiclayout.h"
5050
51#include "view/glass.h"
52#include "view/setup.h"51#include "view/setup.h"
5352
54#ifdef HAVE_QT_MOBILITY53#ifdef HAVE_QT_MOBILITY
@@ -60,10 +59,10 @@
60#endif59#endif
6160
62#include <maliit/plugins/subviewdescription.h>61#include <maliit/plugins/subviewdescription.h>
63#include <maliit/plugins/abstractsurfacefactory.h>
64#include <maliit/plugins/quickviewsurface.h>
65#include <maliit/plugins/abstractpluginsetting.h>62#include <maliit/plugins/abstractpluginsetting.h>
66#include <maliit/plugins/updateevent.h>63#include <maliit/plugins/updateevent.h>
64#include <maliit/plugins/abstractinputmethodhost.h>
65
6766
68#include <QApplication>67#include <QApplication>
69#include <QWidget>68#include <QWidget>
@@ -85,14 +84,6 @@
8584
86namespace {85namespace {
8786
88const Maliit::Plugins::AbstractSurface::Options g_surface_options(
89 Maliit::Plugins::AbstractSurface::TypeQuick2 | Maliit::Plugins::AbstractSurface::PositionCenterBottom
90);
91
92const Maliit::Plugins::AbstractSurface::Options g_extended_surface_options(
93 Maliit::Plugins::AbstractSurface::TypeQuick2 | Maliit::Plugins::AbstractSurface::PositionOverlay
94);
95
96const QString g_maliit_keyboard_qml(MALIIT_KEYBOARD_DATA_DIR "/maliit-keyboard.qml");87const QString g_maliit_keyboard_qml(MALIIT_KEYBOARD_DATA_DIR "/maliit-keyboard.qml");
97const QString g_maliit_keyboard_extended_qml(MALIIT_KEYBOARD_DATA_DIR "/maliit-keyboard-extended.qml");88const QString g_maliit_keyboard_extended_qml(MALIIT_KEYBOARD_DATA_DIR "/maliit-keyboard-extended.qml");
98const QString g_maliit_magnifier_qml(MALIIT_KEYBOARD_DATA_DIR "/maliit-magnifier.qml");89const QString g_maliit_magnifier_qml(MALIIT_KEYBOARD_DATA_DIR "/maliit-magnifier.qml");
@@ -140,15 +131,23 @@
140 , event_handler(&model, &updater)131 , event_handler(&model, &updater)
141{}132{}
142133
134QQuickView *createWindow(MAbstractInputMethodHost *host)
135{
136 QScopedPointer<QQuickView> view(new QQuickView);
137
138 QSurfaceFormat format;
139 format.setAlphaBufferSize(8);
140 view->setFormat(format);
141 view->setColor(QColor(Qt::transparent));
142
143 host->registerWindow(view.data(), Maliit::PositionCenterBottom);
144
145 return view.take();
146}
143147
144class InputMethodPrivate148class InputMethodPrivate
145{149{
146public:150public:
147 typedef Maliit::Plugins::QuickViewSurface Surface;
148 typedef QSharedPointer<Surface> SharedSurface;
149
150 Maliit::Plugins::AbstractSurfaceFactory *const surface_factory;
151 SharedSurface surface;
152 QQuickItem* qmlRootItem;151 QQuickItem* qmlRootItem;
153#ifdef EXTENDED_SURFACE_TEMP_DISABLED152#ifdef EXTENDED_SURFACE_TEMP_DISABLED
154 SharedSurface extended_surface;153 SharedSurface extended_surface;
@@ -169,6 +168,8 @@
169 MAbstractInputMethodHost* host;168 MAbstractInputMethodHost* host;
170 QQuickView* view;169 QQuickView* view;
171170
171 bool predictionEnabled;
172
172 explicit InputMethodPrivate(InputMethod * const q,173 explicit InputMethodPrivate(InputMethod * const q,
173 MAbstractInputMethodHost *host);174 MAbstractInputMethodHost *host);
174 void setLayoutOrientation(Logic::LayoutHelper::Orientation orientation);175 void setLayoutOrientation(Logic::LayoutHelper::Orientation orientation);
@@ -182,13 +183,13 @@
182183
183InputMethodPrivate::InputMethodPrivate(InputMethod *const q,184InputMethodPrivate::InputMethodPrivate(InputMethod *const q,
184 MAbstractInputMethodHost *host)185 MAbstractInputMethodHost *host)
185 : surface_factory(host->surfaceFactory())186 // : surface_factory(host->surfaceFactory())
186 , surface(qSharedPointerDynamicCast<Surface>(surface_factory->create(g_surface_options)))187 // , surface(qSharedPointerDynamicCast<Surface>(surface_factory->create(g_surface_options)))
187#ifdef EXTENDED_SURFACE_TEMP_DISABLED188#ifdef EXTENDED_SURFACE_TEMP_DISABLED
188 , extended_surface(qSharedPointerDynamicCast<Surface>(surface_factory->create(g_extended_surface_options, surface)))189 , extended_surface(qSharedPointerDynamicCast<Surface>(surface_factory->create(g_extended_surface_options, surface)))
189 , magnifier_surface(qSharedPointerDynamicCast<Surface>(surface_factory->create(g_extended_surface_options, surface)))190 , magnifier_surface(qSharedPointerDynamicCast<Surface>(surface_factory->create(g_extended_surface_options, surface)))
190#endif191#endif
191 , editor(EditorOptions(), new Model::Text, new Logic::WordEngine, new Logic::LanguageFeatures)192 : editor(EditorOptions(), new Model::Text, new Logic::WordEngine, new Logic::LanguageFeatures)
192 , feedback()193 , feedback()
193 , style(new Style)194 , style(new Style)
194 , notifier()195 , notifier()
@@ -199,8 +200,11 @@
199 , magnifier_layout()200 , magnifier_layout()
200 , context(q, style)201 , context(q, style)
201 , host(host)202 , host(host)
202 , view(new QQuickView(0))203 , view(0)
204 , predictionEnabled(false)
203{205{
206 view = createWindow(host);
207
204 editor.setHost(host);208 editor.setHost(host);
205209
206 layout.updater.setLayout(&layout.helper);210 layout.updater.setLayout(&layout.helper);
@@ -210,7 +214,7 @@
210 extended_layout.updater.setStyle(style);214 extended_layout.updater.setStyle(style);
211 feedback.setStyle(style);215 feedback.setStyle(style);
212216
213 const QSize &screen_size(surface_factory->screenSize());217 const QSize &screen_size(view->screen()->size());
214 layout.helper.setScreenSize(screen_size);218 layout.helper.setScreenSize(screen_size);
215 layout.helper.setAlignment(Logic::LayoutHelper::Bottom);219 layout.helper.setAlignment(Logic::LayoutHelper::Bottom);
216 extended_layout.helper.setScreenSize(screen_size);220 extended_layout.helper.setScreenSize(screen_size);
@@ -432,17 +436,14 @@
432 connect(&d->magnifier_layout, SIGNAL(originChanged(QPoint)),436 connect(&d->magnifier_layout, SIGNAL(originChanged(QPoint)),
433 this, SLOT(onMagnifierLayoutOriginChanged(QPoint)));437 this, SLOT(onMagnifierLayoutOriginChanged(QPoint)));
434#endif438#endif
435 // FIXME: Reimplement keyboardClosed, switchLeft and switchRight
436 // (triggered by glass).
437439
438 connect(&d->editor, SIGNAL(rightLayoutSelected()),440 connect(&d->editor, SIGNAL(rightLayoutSelected()),
439 this, SLOT(onRightLayoutSelected()));441 this, SLOT(onRightLayoutSelected()));
440442
441 connect(d->surface_factory, SIGNAL(screenSizeChanged(QSize)),
442 this, SLOT(onScreenSizeChange(QSize)));
443
444 connect(this, SIGNAL(wordEngineEnabledChanged(bool)), uiConst, SLOT(onWordEngineSettingsChanged(bool)));443 connect(this, SIGNAL(wordEngineEnabledChanged(bool)), uiConst, SLOT(onWordEngineSettingsChanged(bool)));
445444
445 connect(this, SIGNAL(predictionEnabledChanged()), this, SLOT(updateWordEngine()));
446
446 registerStyleSetting(host);447 registerStyleSetting(host);
447448
448 registerFeedbackSetting(host);449 registerFeedbackSetting(host);
@@ -451,6 +452,8 @@
451 registerWordEngineSetting(host);452 registerWordEngineSetting(host);
452 registerHideWordRibbonInPortraitModeSetting(host);453 registerHideWordRibbonInPortraitModeSetting(host);
453454
455 setActiveSubView("en_us");
456
454 // Setting layout orientation depends on word engine and hide word ribbon457 // Setting layout orientation depends on word engine and hide word ribbon
455 // settings to be initialized first:458 // settings to be initialized first:
456459
@@ -576,9 +579,9 @@
576void InputMethod::handleAppOrientationChanged(int angle)579void InputMethod::handleAppOrientationChanged(int angle)
577{580{
578 Q_UNUSED(angle);581 Q_UNUSED(angle);
579 Q_D(InputMethod);
580582
581#ifdef DISABLED_AS_CONTENT_ORIENTATION_NOT_WORKING583#ifdef DISABLED_AS_CONTENT_ORIENTATION_NOT_WORKING
584 Q_D(InputMethod);
582 d->updateKeyboardOrientation();585 d->updateKeyboardOrientation();
583#endif586#endif
584}587}
@@ -846,14 +849,12 @@
846849
847void InputMethod::onLayoutWidthChanged(int width)850void InputMethod::onLayoutWidthChanged(int width)
848{851{
849 Q_D(InputMethod);852 Q_UNUSED(width);
850 d->surface->setSize(QSize(width, d->surface->size().height()));
851}853}
852854
853void InputMethod::onLayoutHeightChanged(int height)855void InputMethod::onLayoutHeightChanged(int height)
854{856{
855 Q_D(InputMethod);857 Q_UNUSED(height);
856 d->surface->setSize(QSize(d->surface->size().width(), height));
857}858}
858859
859#ifdef EXTENDED_SURFACE_TEMP_DISABLED860#ifdef EXTENDED_SURFACE_TEMP_DISABLED
@@ -913,4 +914,37 @@
913 d->updateKeyboardOrientation();914 d->updateKeyboardOrientation();
914}915}
915916
917void InputMethod::update()
918{
919 Q_D(InputMethod);
920
921 bool valid;
922
923 bool emitPredictionEnabled = false;
924 bool newPredictionEnabled = inputMethodHost()->predictionEnabled(valid);
925
926 if (!valid)
927 newPredictionEnabled = true;
928
929 if (newPredictionEnabled != d->predictionEnabled) {
930 d->predictionEnabled = newPredictionEnabled;
931 emitPredictionEnabled = true;
932 }
933
934 if (emitPredictionEnabled)
935 Q_EMIT predictionEnabledChanged();
936}
937
938void InputMethod::updateWordEngine()
939{
940 // FIXME stub
941}
942
943bool InputMethod::predictionEnabled()
944{
945 Q_D(InputMethod);
946 return d->predictionEnabled;
947}
948
949
916} // namespace MaliitKeyboard950} // namespace MaliitKeyboard
917951
=== modified file 'maliit-keyboard/plugin/inputmethod.h'
--- maliit-keyboard/plugin/inputmethod.h 2013-06-03 15:41:05 +0000
+++ maliit-keyboard/plugin/inputmethod.h 2013-07-03 15:12:32 +0000
@@ -74,6 +74,16 @@
74 Q_SLOT void onRightLayoutSelected();74 Q_SLOT void onRightLayoutSelected();
75 Q_SLOT void deviceOrientationChanged(Qt::ScreenOrientation orientation);75 Q_SLOT void deviceOrientationChanged(Qt::ScreenOrientation orientation);
7676
77 Q_SLOT void updateWordEngine();
78
79 Q_PROPERTY(bool predictionEnabled READ predictionEnabled NOTIFY predictionEnabledChanged)
80
81 bool predictionEnabled();
82 void update();
83
84Q_SIGNALS:
85 void predictionEnabledChanged();
86
77private:87private:
78 void registerStyleSetting(MAbstractInputMethodHost *host);88 void registerStyleSetting(MAbstractInputMethodHost *host);
79 void registerFeedbackSetting(MAbstractInputMethodHost *host);89 void registerFeedbackSetting(MAbstractInputMethodHost *host);
8090
=== modified file 'maliit-keyboard/view/view.pro'
--- maliit-keyboard/view/view.pro 2013-03-22 16:40:29 +0000
+++ maliit-keyboard/view/view.pro 2013-07-03 15:12:32 +0000
@@ -20,14 +20,12 @@
20HEADERS += \20HEADERS += \
21 setup.h \21 setup.h \
22 abstracttexteditor.h \22 abstracttexteditor.h \
23 glass.h \
24 abstractfeedback.h \23 abstractfeedback.h \
25 nullfeedback.h \24 nullfeedback.h \
2625
27SOURCES += \26SOURCES += \
28 setup.cpp \27 setup.cpp \
29 abstracttexteditor.cpp \28 abstracttexteditor.cpp \
30 glass.cpp \
31 abstractfeedback.cpp \29 abstractfeedback.cpp \
32 nullfeedback.cpp \30 nullfeedback.cpp \
3331

Subscribers

People subscribed via source and target branches