[SCM] qtdeclarative packaging branch, ubuntu, updated. ubuntu/5.5.1-2ubuntu3-3-g524bdd9

Timo Jyrinki timo at moszumanska.debian.org
Mon Jan 25 11:56:57 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtdeclarative.git;a=commitdiff;h=524bdd9

The following commit has been merged in the ubuntu branch:
commit 524bdd922351dce75286b97a774e74cae4a07456
Author: Timo Jyrinki <timo.jyrinki at canonical.com>
Date:   Thu Dec 17 07:53:41 2015 +0000

    Add debian/patches/QQuickItem-fix-an-infinite-loop-nextItemInFocusChain.patch
---
 debian/changelog                                   |  4 +-
 ...fix-an-infinite-loop-nextItemInFocusChain.patch | 85 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 89 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 6a18769..90562b8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,10 @@ qtdeclarative-opensource-src (5.5.1-2ubuntu4) UNRELEASED; urgency=medium
 
   * debian/patches/Add-isTabFence-private-flag.patch:
     - Tab should not leave dialog/popover/menu (LP: #1526208)
+  * debian/patches/QQuickItem-fix-an-infinite-loop-nextItemInFocusChain.patch:
+    - Refine the previous patch (LP: #1526208)
 
- -- Timo Jyrinki <timo-jyrinki at ubuntu.com>  Wed, 16 Dec 2015 14:05:33 +0000
+ -- Timo Jyrinki <timo-jyrinki at ubuntu.com>  Wed, 16 Dec 2015 15:06:40 +0000
 
 qtdeclarative-opensource-src (5.5.1-2ubuntu3) xenial; urgency=medium
 
diff --git a/debian/patches/QQuickItem-fix-an-infinite-loop-nextItemInFocusChain.patch b/debian/patches/QQuickItem-fix-an-infinite-loop-nextItemInFocusChain.patch
new file mode 100644
index 0000000..ee90778
--- /dev/null
+++ b/debian/patches/QQuickItem-fix-an-infinite-loop-nextItemInFocusChain.patch
@@ -0,0 +1,85 @@
+From 0cc242c679b54d91d43b865414b250e644a1d879 Mon Sep 17 00:00:00 2001
+From: Liang Qi <liang.qi at theqtcompany.com>
+Date: Wed, 20 Jan 2016 12:21:21 +0100
+Subject: [PATCH] QQuickItem: fix an infinite loop nextItemInFocusChain()
+
+When isTabFence is set to true and no children.
+
+Task-number: QTBUG-50516
+Change-Id: I8430336fde7ab041797f8f9d9dfe5b9d56fecddd
+---
+ src/quick/items/qquickitem.cpp                    |  2 ++
+ tests/auto/quick/qquickitem2/data/qtbug_50516.qml |  9 +++++++++
+ tests/auto/quick/qquickitem2/tst_qquickitem.cpp   | 20 ++++++++++++++++++++
+ 3 files changed, 31 insertions(+)
+ create mode 100644 tests/auto/quick/qquickitem2/data/qtbug_50516.qml
+
+diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
+index 224dece..059bb4b 100644
+--- a/src/quick/items/qquickitem.cpp
++++ b/src/quick/items/qquickitem.cpp
+@@ -2508,6 +2508,8 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo
+                 lastChild = prevTabChildItem(current, -1);
+         }
+         bool isTabFence = current->d_func()->isTabFence;
++        if (isTabFence && !hasChildren)
++            return current;
+ 
+         // coming from parent: check children
+         if (hasChildren && from == current->parentItem()) {
+diff --git a/tests/auto/quick/qquickitem2/data/qtbug_50516.qml b/tests/auto/quick/qquickitem2/data/qtbug_50516.qml
+new file mode 100644
+index 0000000..5e2a60b
+--- /dev/null
++++ b/tests/auto/quick/qquickitem2/data/qtbug_50516.qml
+@@ -0,0 +1,9 @@
++import QtQuick 2.1
++import Test 1.0
++
++TabFence {
++    objectName: "root"
++    focus: true
++    width: 800
++    height: 600
++}
+diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+index c7717b9..7225724 100644
+--- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
++++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+@@ -74,6 +74,7 @@ private slots:
+     void nextItemInFocusChain3();
+ 
+     void tabFence();
++    void qtbug_50516();
+ 
+     void keys();
+     void standardKeys_data();
+@@ -1194,6 +1195,25 @@ void tst_QQuickItem::tabFence()
+     verifyTabFocusChain(window, fence1BacktabFocusChain, false /* forward */);
+ }
+ 
++void tst_QQuickItem::qtbug_50516()
++{
++    QQuickView *window = new QQuickView(0);
++    window->setBaseSize(QSize(800,600));
++
++    window->setSource(testFileUrl("qtbug_50516.qml"));
++    window->show();
++    window->requestActivate();
++    QVERIFY(QTest::qWaitForWindowActive(window));
++    QVERIFY(QGuiApplication::focusWindow() == window);
++    QVERIFY(window->rootObject()->hasActiveFocus());
++
++    QQuickItem *contentItem = window->rootObject();
++    QQuickItem *next = contentItem->nextItemInFocusChain(true);
++    QCOMPARE(next, contentItem);
++    next = contentItem->nextItemInFocusChain(false);
++    QCOMPARE(next, contentItem);
++}
++
+ void tst_QQuickItem::keys()
+ {
+     QQuickView *window = new QQuickView(0);
+-- 
+2.7.0.rc3
+
diff --git a/debian/patches/series b/debian/patches/series
index b18c8fd..40f6ec0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,6 +9,7 @@ Image-fix-crash-when-switching-between-multiple-scre.patch
 Flickable-avoid-perturbing-the-timeline-further-whil.patch
 MultiPointTouchArea-Fixed-released-duplication-on-mo.patch
 Add-isTabFence-private-flag.patch
+QQuickItem-fix-an-infinite-loop-nextItemInFocusChain.patch
 
 # Debian patches
 check_system_double-conversion.patch

-- 
qtdeclarative packaging



More information about the pkg-kde-commits mailing list