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

Subscribers

People subscribed via source and target branches

to all changes: