Merge lp:~sergiusens/ubuntu/trusty/maliit-framework/1251330 into lp:ubuntu/trusty/maliit-framework

Proposed by Sergio Schvezov
Status: Rejected
Rejected by: Ricardo Salveti
Proposed branch: lp:~sergiusens/ubuntu/trusty/maliit-framework/1251330
Merge into: lp:ubuntu/trusty/maliit-framework
Diff against target: 81 lines (+61/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/0006-Inputcontext-to-properly-notify-orientation-with-nat.patch (+53/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~sergiusens/ubuntu/trusty/maliit-framework/1251330
Reviewer Review Type Date Requested Status
Daniel d'Andrada (community) Disapprove
Ubuntu branches Pending
Review via email: mp+204051@code.launchpad.net
To post a comment you must log in.
14. By Sergio Schvezov

Adding comment wrt to patch origin

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

That git commit from upstream is actually buggy. :/

Will propose a correct version myself.

review: Disapprove

Unmerged revisions

14. By Sergio Schvezov

Adding comment wrt to patch origin

13. By Sergio Schvezov

Inputcontext to properly notify orientation with native portrait
displays (LP: #1251330)

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 2014-01-24 13:49:59 +0000
3+++ debian/changelog 2014-01-30 17:25:17 +0000
4@@ -1,3 +1,10 @@
5+maliit-framework (0.99.0+git20130615+97e8335-0ubuntu6) UNRELEASED; urgency=medium
6+
7+ * Inputcontext to properly notify orientation with native portrait
8+ displays (LP: #1251330)
9+
10+ -- Sergio Schvezov <sergio.schvezov@canonical.com> Thu, 30 Jan 2014 17:14:04 +0000
11+
12 maliit-framework (0.99.0+git20130615+97e8335-0ubuntu5) trusty; urgency=medium
13
14 * Modify xvfb command to successfully pass tests (LP: #1272249)
15
16=== added file 'debian/patches/0006-Inputcontext-to-properly-notify-orientation-with-nat.patch'
17--- debian/patches/0006-Inputcontext-to-properly-notify-orientation-with-nat.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/0006-Inputcontext-to-properly-notify-orientation-with-nat.patch 2014-01-30 17:25:17 +0000
19@@ -0,0 +1,53 @@
20+From ea4ed5ec38704264e787631b89b1aba62c72049a Mon Sep 17 00:00:00 2001
21+From: Pekka Vuorela <pekka.vuorela@jollamobile.com>
22+Date: Thu, 4 Jul 2013 17:00:53 +0300
23+Subject: [PATCH] Inputcontext to properly notify orientation with native
24+ portrait displays
25+
26+This patch comes from upstream
27+
28+RevBy: Jan Arne Petersen
29+---
30+ input-context/minputcontext.cpp | 13 +++++++++----
31+ 1 file changed, 9 insertions(+), 4 deletions(-)
32+
33+diff --git a/input-context/minputcontext.cpp b/input-context/minputcontext.cpp
34+index 78b6e81..8f4c6b1 100644
35+--- a/input-context/minputcontext.cpp
36++++ b/input-context/minputcontext.cpp
37+@@ -19,6 +19,7 @@
38+ #include "minputcontext.h"
39+
40+ #include <QGuiApplication>
41++#include <QScreen>
42+ #include <QKeyEvent>
43+ #include <QTextFormat>
44+ #include <QDebug>
45+@@ -36,16 +37,20 @@ namespace
46+
47+ int orientationAngle(Qt::ScreenOrientation orientation)
48+ {
49++ // Maliit uses orientations relative to screen, Qt relative to world
50++ // Note: doesn't work with inverted portrait or landscape as native screen orientation.
51++ static bool portraitRotated = qGuiApp->primaryScreen()->primaryOrientation() == Qt::PortraitOrientation;
52++
53+ switch (orientation) {
54+ case Qt::PrimaryOrientation: // Urgh.
55+ case Qt::PortraitOrientation:
56+- return MInputContext::Angle270;
57++ return portraitRotated ? MInputContext::Angle0 : MInputContext::Angle270;
58+ case Qt::LandscapeOrientation:
59+- return MInputContext::Angle0;
60++ return portraitRotated ? MInputContext::Angle90 : MInputContext::Angle0;
61+ case Qt::InvertedPortraitOrientation:
62+- return MInputContext::Angle90;
63++ return portraitRotated ? MInputContext::Angle180 : MInputContext::Angle90;
64+ case Qt::InvertedLandscapeOrientation:
65+- return MInputContext::Angle180;
66++ return portraitRotated ? MInputContext::Angle270 : MInputContext::Angle180;
67+ }
68+ return MInputContext::Angle0;
69+ }
70+--
71+1.8.5.3
72+
73
74=== modified file 'debian/patches/series'
75--- debian/patches/series 2013-07-23 19:47:04 +0000
76+++ debian/patches/series 2014-01-30 17:25:17 +0000
77@@ -3,3 +3,4 @@
78 0003-prediction.patch
79 0004-fix_activationlostevent.patch
80 0005-testability.patch
81+0006-Inputcontext-to-properly-notify-orientation-with-nat.patch

Subscribers

People subscribed via source and target branches