Merge lp:~unity-team/kubuntu-packaging/qtdeclarative-fix-1349705 into lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src

Proposed by Michał Sawicz
Status: Merged
Merged at revision: 162
Proposed branch: lp:~unity-team/kubuntu-packaging/qtdeclarative-fix-1349705
Merge into: lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src
Diff against target: 227 lines (+173/-1)
5 files modified
debian/changelog (+10/-0)
debian/control (+2/-0)
debian/patches/8454a21b-Flickable-Cancel-interaction-on-interactive-changes.patch (+152/-0)
debian/patches/series (+1/-0)
debian/rules (+8/-1)
To merge this branch: bzr merge lp:~unity-team/kubuntu-packaging/qtdeclarative-fix-1349705
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Kubuntu Packagers Pending
Review via email: mp+229183@code.launchpad.net

Commit message

Import 8454a21b from upstream.

Description of the change

Distro-patch for bug #1349705 from upstream 8454a21b.

To post a comment you must log in.
163. By Michał Sawicz

Force gcc-4.8

164. By Michał Sawicz

Add changelog.

165. By Michał Sawicz

Explicitly force qmake compiler.

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)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

I'll merge this when it's actually published to archives since it seems to be in a landing PPA already, and meanwhile I'm preparing the next upload as well.

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-07-07 08:43:27 +0000
3+++ debian/changelog 2014-08-01 11:55:53 +0000
4@@ -1,3 +1,13 @@
5+qtdeclarative-opensource-src (5.3.0-3ubuntu8) UNRELEASED; urgency=medium
6+
7+ * debian/patches/8454a21b-Flickable-Cancel-interaction-on-interactive-changes.patch
8+ - Fix flickable interaction (LP: #1349705)
9+ * debian/control
10+ * debian/rules
11+ - Force gcc-4.8 to avoid symbols changes
12+
13+ -- Michał Sawicz <michal.sawicz@canonical.com> Fri, 01 Aug 2014 12:01:14 +0100
14+
15 qtdeclarative-opensource-src (5.3.0-3ubuntu7) utopic; urgency=medium
16
17 * debian/patches/Support-RFC2822Date-date-format-similar-to-V8.patch
18
19=== modified file 'debian/control'
20--- debian/control 2014-06-19 19:14:47 +0000
21+++ debian/control 2014-08-01 11:55:53 +0000
22@@ -11,6 +11,8 @@
23 Timo Jyrinki <timo@debian.org>
24 Build-Depends: debhelper (>= 9),
25 dpkg-dev (>= 1.16.1),
26+# Avoiding symbols updates due to switch to gcc 4.9 by default.
27+ g++-4.8,
28 libqt5xmlpatterns5-private-dev (>= 5.3.0-0~),
29 pkg-kde-tools (>= 0.15.12~),
30 python,
31
32=== added file 'debian/patches/8454a21b-Flickable-Cancel-interaction-on-interactive-changes.patch'
33--- debian/patches/8454a21b-Flickable-Cancel-interaction-on-interactive-changes.patch 1970-01-01 00:00:00 +0000
34+++ debian/patches/8454a21b-Flickable-Cancel-interaction-on-interactive-changes.patch 2014-08-01 11:55:53 +0000
35@@ -0,0 +1,152 @@
36+From 8454a21b837ccf3968f6dbc56ed4f06d60d63c8f Mon Sep 17 00:00:00 2001
37+From: Albert Astals Cid <albert.astals@canonical.com>
38+Date: Wed, 23 Jul 2014 15:40:42 +0200
39+Subject: [PATCH] Flickable: Cancel interaction on interactive changes
40+
41+Otherwise if you have a listview with a flickable inside with a mouseare inside
42+the pressed is never set to false if you make the interactive property of the
43+outer list depend on the moving of the inner flickable. This makes that when
44+later you change currentIndex of the list and you have
45+StrictlyEnforceRange set, the list won't move because it still thinks it is pressed
46+
47+Change-Id: I2c2021f486fc0a31840c3f2199bc7cb76dc01e3e
48+Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
49+---
50+ src/quick/items/qquickflickable.cpp | 41 ++++++++++++++--------------
51+ src/quick/items/qquickflickable_p_p.h | 2 ++
52+ tests/auto/qmltest/listview/tst_listview.qml | 41 ++++++++++++++++++++++++++++
53+ 3 files changed, 63 insertions(+), 21 deletions(-)
54+
55+diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
56+index ee71ea8..63dde66 100644
57+--- a/src/quick/items/qquickflickable.cpp
58++++ b/src/quick/items/qquickflickable.cpp
59+@@ -763,15 +763,8 @@ void QQuickFlickable::setInteractive(bool interactive)
60+ Q_D(QQuickFlickable);
61+ if (interactive != d->interactive) {
62+ d->interactive = interactive;
63+- if (!interactive && (d->hData.flicking || d->vData.flicking)) {
64+- d->clearTimeline();
65+- d->hData.vTime = d->vData.vTime = d->timeline.time();
66+- d->hData.flicking = false;
67+- d->vData.flicking = false;
68+- emit flickingChanged();
69+- emit flickingHorizontallyChanged();
70+- emit flickingVerticallyChanged();
71+- emit flickEnded();
72++ if (!interactive) {
73++ d->cancelInteraction();
74+ }
75+ emit interactiveChanged();
76+ }
77+@@ -2015,18 +2008,24 @@ bool QQuickFlickable::yflick() const
78+ void QQuickFlickable::mouseUngrabEvent()
79+ {
80+ Q_D(QQuickFlickable);
81+- if (d->pressed) {
82+- // if our mouse grab has been removed (probably by another Flickable),
83+- // fix our state
84+- d->clearDelayedPress();
85+- d->pressed = false;
86+- d->draggingEnding();
87+- d->stealMouse = false;
88+- setKeepMouseGrab(false);
89+- d->fixupX();
90+- d->fixupY();
91+- if (!d->isViewMoving())
92+- movementEnding();
93++ // if our mouse grab has been removed (probably by another Flickable),
94++ // fix our state
95++ d->cancelInteraction();
96++}
97++
98++void QQuickFlickablePrivate::cancelInteraction()
99++{
100++ Q_Q(QQuickFlickable);
101++ if (pressed) {
102++ clearDelayedPress();
103++ pressed = false;
104++ draggingEnding();
105++ stealMouse = false;
106++ q->setKeepMouseGrab(false);
107++ fixupX();
108++ fixupY();
109++ if (!isViewMoving())
110++ q->movementEnding();
111+ }
112+ }
113+
114+diff --git a/src/quick/items/qquickflickable_p_p.h b/src/quick/items/qquickflickable_p_p.h
115+index 33a642e..13af2e0 100644
116+--- a/src/quick/items/qquickflickable_p_p.h
117++++ b/src/quick/items/qquickflickable_p_p.h
118+@@ -200,6 +200,8 @@ public:
119+
120+ bool isViewMoving() const;
121+
122++ void cancelInteraction();
123++
124+ public:
125+ QQuickItem *contentItem;
126+
127+diff --git a/tests/auto/qmltest/listview/tst_listview.qml b/tests/auto/qmltest/listview/tst_listview.qml
128+index 03be579..069b62a 100644
129+--- a/tests/auto/qmltest/listview/tst_listview.qml
130++++ b/tests/auto/qmltest/listview/tst_listview.qml
131+@@ -108,6 +108,33 @@ Item {
132+ property int createdDelegates: 0
133+ }
134+
135++ ListView
136++ {
137++ id: listInteractiveCurrentIndexEnforce
138++ width: 600
139++ height: 600
140++
141++ snapMode: ListView.SnapOneItem
142++ orientation: ListView.Horizontal
143++ interactive: !currentItem.moving
144++ highlightRangeMode: ListView.StrictlyEnforceRange
145++
146++ model: 4
147++
148++ focus: true
149++ Keys.onPressed: if (event.key == Qt.Key_K) currentIndex = currentIndex + 1;
150++
151++ delegate: Flickable {
152++ width: 600
153++ height: 600
154++ contentWidth: 600
155++ contentHeight: 1200
156++
157++ MouseArea { anchors.fill: parent }
158++ Rectangle { anchors.fill: parent; color: index == 0 ? "red" : index == 1 ? "green" : index == 2 ? "blue" : "white" }
159++ }
160++ }
161++
162+ Component {
163+ id: delegateModelAfterCreateComponent
164+ Rectangle {
165+@@ -272,5 +299,19 @@ Item {
166+ listViewDelegateModelAfterCreate.model = 40;
167+ verify(listViewDelegateModelAfterCreate.createdDelegates > 0);
168+ }
169++
170++ function test_listInteractiveCurrentIndexEnforce() {
171++ mousePress(listInteractiveCurrentIndexEnforce, 10, 50);
172++ mouseMove(listInteractiveCurrentIndexEnforce, 10, 40);
173++ mouseMove(listInteractiveCurrentIndexEnforce, 10, 30);
174++ mouseMove(listInteractiveCurrentIndexEnforce, 10, 20);
175++ mouseMove(listInteractiveCurrentIndexEnforce, 10, 10);
176++ compare(listInteractiveCurrentIndexEnforce.interactive, false);
177++ mouseRelease(listInteractiveCurrentIndexEnforce, 10, 10);
178++ tryCompare(listInteractiveCurrentIndexEnforce, "interactive", true);
179++ keyClick("k");
180++ compare(listInteractiveCurrentIndexEnforce.currentIndex, 1);
181++ tryCompare(listInteractiveCurrentIndexEnforce, "contentX", listInteractiveCurrentIndexEnforce.width);
182++ }
183+ }
184+ }
185+--
186+2.0.1
187+
188
189=== modified file 'debian/patches/series'
190--- debian/patches/series 2014-07-07 08:45:33 +0000
191+++ debian/patches/series 2014-08-01 11:55:53 +0000
192@@ -8,3 +8,4 @@
193 Implement-proper-support-for-layoutChange-in-QQmlDel.patch
194 parenttosubcreator_qqmlobjectcreator.patch
195 Support-RFC2822Date-date-format-similar-to-V8.patch
196+8454a21b-Flickable-Cancel-interaction-on-interactive-changes.patch
197
198=== modified file 'debian/rules'
199--- debian/rules 2014-05-28 05:57:55 +0000
200+++ debian/rules 2014-08-01 11:55:53 +0000
201@@ -1,10 +1,17 @@
202 #!/usr/bin/make -f
203
204+include /usr/share/dpkg/default.mk
205+
206 # Uncomment this to turn on verbose mode.
207 #export DH_VERBOSE=1
208
209 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
210
211+# Explicitly selecting a G{CC,++}-version here to avoid symbol changes
212+# because of the default gcc switch.
213+export CC=$(DEB_HOST_GNU_TYPE)-gcc-4.8
214+export CXX=$(DEB_HOST_GNU_TYPE)-g++-4.8
215+
216 export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
217 export CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
218 export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
219@@ -14,7 +21,7 @@
220 dh $@ --parallel --with pkgkde_symbolshelper --dbg-package=qtdeclarative5-dbg
221
222 override_dh_auto_configure:
223- qmake QT_BUILD_PARTS+=tests
224+ qmake QT_BUILD_PARTS+=tests QMAKE_CC=$(CC) QMAKE_CXX=$(CXX)
225
226 override_dh_auto_build-indep:
227 dh_auto_build -Smakefile -- html_docs

Subscribers

People subscribed via source and target branches

to all changes: