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

Subscribers

People subscribed via source and target branches