[SCM] qtdeclarative packaging branch, ubuntu, updated. ubuntu/5.5.1-2ubuntu4-9-g02bd660
Timo Jyrinki
timo at moszumanska.debian.org
Mon Mar 14 13:11:19 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtdeclarative.git;a=commitdiff;h=02bd660
The following commit has been merged in the ubuntu branch:
commit 02bd660974ba2ee4e4b6f4b536bc646787fd2981
Author: Timo Jyrinki <timo.jyrinki at canonical.com>
Date: Mon Mar 14 13:11:13 2016 +0000
QQuickItemView-forceLayout-Also-call-layout-when-d-f.patch:
* QQuickItemView-forceLayout-Also-call-layout-when-d-f.patch:
- Backport patch from Qt 5.7 to call forceLayout more often (LP: #1556842)
---
debian/changelog | 2 +
...iew-forceLayout-Also-call-layout-when-d-f.patch | 76 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 79 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 1071715..ce0b9de 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
qtdeclarative-opensource-src (5.5.1-2ubuntu5) UNRELEASED; urgency=medium
* Update symbols from build logs.
+ * QQuickItemView-forceLayout-Also-call-layout-when-d-f.patch:
+ - Backport patch from Qt 5.7 to call forceLayout more often (LP: #1556842)
-- Timo Jyrinki <timo-jyrinki at ubuntu.com> Mon, 01 Feb 2016 14:39:12 +0000
diff --git a/debian/patches/QQuickItemView-forceLayout-Also-call-layout-when-d-f.patch b/debian/patches/QQuickItemView-forceLayout-Also-call-layout-when-d-f.patch
new file mode 100644
index 0000000..356dab0
--- /dev/null
+++ b/debian/patches/QQuickItemView-forceLayout-Also-call-layout-when-d-f.patch
@@ -0,0 +1,76 @@
+From 201dec50b6f08b740aab9947725f8f5ec36349bb Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <albert.astals at canonical.com>
+Date: Mon, 7 Mar 2016 13:18:56 +0100
+Subject: [PATCH] QQuickItemView::forceLayout: Also call layout when
+ d->forceLayout
+
+This way callers of forceLayout get a relayout if the dimension
+of a delegate that affects the itemview content size has just changed
+but the itemview content size has not been updated yet.
+
+This is useful because sometimes in the QML side you want to do things when the
+item view delegate size has changed but need the item view content size to be already updated.
+
+Change-Id: I846984a841e8e14c84d7a700a7ff736196b60afb
+Reviewed-by: Michael Brasser <michael.brasser at live.com>
+Reviewed-by: Shawn Rutledge <shawn.rutledge at theqtcompany.com>
+---
+ src/quick/items/qquickitemview.cpp | 3 ++-
+ tests/auto/qmltest/listview/tst_listview.qml | 21 +++++++++++++++++++++
+ 2 files changed, 23 insertions(+), 1 deletion(-)
+
+diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp
+index 188b347..aff03b7 100644
+--- a/src/quick/items/qquickitemview.cpp
++++ b/src/quick/items/qquickitemview.cpp
+@@ -1052,7 +1052,8 @@ QQuickItem *QQuickItemView::itemAt(qreal x, qreal y) const
+ void QQuickItemView::forceLayout()
+ {
+ Q_D(QQuickItemView);
+- d->applyPendingChanges();
++ if (isComponentComplete() && (d->currentChanges.hasPendingChanges() || d->forceLayout))
++ d->layout();
+ }
+
+ void QQuickItemViewPrivate::applyPendingChanges()
+diff --git a/tests/auto/qmltest/listview/tst_listview.qml b/tests/auto/qmltest/listview/tst_listview.qml
+index 988d30f..75429c4 100644
+--- a/tests/auto/qmltest/listview/tst_listview.qml
++++ b/tests/auto/qmltest/listview/tst_listview.qml
+@@ -51,6 +51,22 @@ Item {
+ }
+
+ ListView {
++ id: singleElementList
++ height: 20
++ width: 50
++ model: 1
++ property real heightForDelegate: 100
++ property real contentHeightOnDelegateResize
++ delegate: Rectangle {
++ height: singleElementList.heightForDelegate
++ onHeightChanged: {
++ singleElementList.forceLayout();
++ singleElementList.contentHeightOnDelegateResize = singleElementList.contentHeight;
++ }
++ }
++ }
++
++ ListView {
+ id: viewmanyitems
+ model: manyitems
+ delegate: Text { text: model.name }
+@@ -313,5 +329,10 @@ Item {
+ compare(listInteractiveCurrentIndexEnforce.currentIndex, 1);
+ tryCompare(listInteractiveCurrentIndexEnforce, "contentX", listInteractiveCurrentIndexEnforce.width);
+ }
++
++ function test_forceLayoutForContentHeight() {
++ singleElementList.heightForDelegate = 200;
++ compare(singleElementList.contentHeightOnDelegateResize, 200);
++ }
+ }
+ }
+--
+2.7.0
+
diff --git a/debian/patches/series b/debian/patches/series
index 806ff0a..948404c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,6 +11,7 @@ MultiPointTouchArea-Fixed-released-duplication-on-mo.patch
Add-isTabFence-private-flag.patch
QQuickItem-fix-an-infinite-loop-nextItemInFocusChain.patch
QQuickItem-fix-another-infinite-loop-in-nextItemInFo.patch
+QQuickItemView-forceLayout-Also-call-layout-when-d-f.patch
# Debian patches
check_system_double-conversion.patch
--
qtdeclarative packaging
More information about the pkg-kde-commits
mailing list