summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2018-01-30 09:08:48 +0200
committerSamuli Piippo <samuli.piippo@qt.io>2018-01-31 08:53:20 +0000
commitf00d9ee406001081464d5c0ce67cf893755f8f34 (patch)
treeeaa6cbb64f8fbf1da1e66b96bbabb3066cbc6f8c
parentc0c98ab5cc94b914b4df4382e7aee5bc2a1cb263 (diff)
downloadmeta-boot2qt-f00d9ee406001081464d5c0ce67cf893755f8f34.tar.gz
qtquickcontrols2: Fix background regression
Cherry-pick change from 5.9 branch that missed v5.9.4 release. Task-number: AUTOSUITE-189 Change-Id: I21184bb76098b8603a7cd7bf9d7336103dbe1332 Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
-rw-r--r--recipes-qt/qt5/qtquickcontrols2/0001-Control-fix-background-size-regression-caused-by-def.patch43
-rw-r--r--recipes-qt/qt5/qtquickcontrols2_git.bbappend34
2 files changed, 77 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtquickcontrols2/0001-Control-fix-background-size-regression-caused-by-def.patch b/recipes-qt/qt5/qtquickcontrols2/0001-Control-fix-background-size-regression-caused-by-def.patch
new file mode 100644
index 0000000..920273e
--- /dev/null
+++ b/recipes-qt/qt5/qtquickcontrols2/0001-Control-fix-background-size-regression-caused-by-def.patch
@@ -0,0 +1,43 @@
1From 83046de497827a69bf05cd0b06ca6421b51e02b8 Mon Sep 17 00:00:00 2001
2From: J-P Nurmi <jpnurmi@qt.io>
3Date: Mon, 22 Jan 2018 10:58:06 +0100
4Subject: [PATCH] Control: fix background size regression caused by deferred
5 execution
6
7Task-number: QTBUG-65880
8Change-Id: Ic4f9fb087f4a78bd4c6257828011240186b6b22e
9Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
10---
11 src/quicktemplates2/qquickcontrol.cpp | 1 +
12 tests/auto/controls/data/tst_popup.qml | 8 ++++++++
13 2 files changed, 9 insertions(+)
14
15diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp
16index 6fbd4c07..957936df 100644
17--- a/src/quicktemplates2/qquickcontrol.cpp
18+++ b/src/quicktemplates2/qquickcontrol.cpp
19@@ -1343,6 +1343,7 @@ void QQuickControl::componentComplete()
20 d->executeBackground(true);
21 d->executeContentItem(true);
22 QQuickItem::componentComplete();
23+ d->resizeBackground();
24 d->resizeContent();
25 if (!d->hasLocale)
26 d->locale = QQuickControlPrivate::calcLocale(d->parentItem);
27diff --git a/tests/auto/controls/data/tst_popup.qml b/tests/auto/controls/data/tst_popup.qml
28index bec50ad0..1f3a097f 100644
29--- a/tests/auto/controls/data/tst_popup.qml
30+++ b/tests/auto/controls/data/tst_popup.qml
31@@ -1253,4 +1253,12 @@ TestCase {
32 control.open()
33 verify(control.visible)
34 }
35+
36+ function test_deferredBackgroundSize() {
37+ var control = createTemporaryObject(popupControl, testCase, {width: 200, height: 100})
38+ verify(control)
39+
40+ compare(control.background.width, 200)
41+ compare(control.background.height, 100)
42+ }
43 }
diff --git a/recipes-qt/qt5/qtquickcontrols2_git.bbappend b/recipes-qt/qt5/qtquickcontrols2_git.bbappend
new file mode 100644
index 0000000..b546098
--- /dev/null
+++ b/recipes-qt/qt5/qtquickcontrols2_git.bbappend
@@ -0,0 +1,34 @@
1############################################################################
2##
3## Copyright (C) 2018 The Qt Company Ltd.
4## Contact: https://www.qt.io/licensing/
5##
6## This file is part of the Boot to Qt meta layer.
7##
8## $QT_BEGIN_LICENSE:GPL$
9## Commercial License Usage
10## Licensees holding valid commercial Qt licenses may use this file in
11## accordance with the commercial license agreement provided with the
12## Software or, alternatively, in accordance with the terms contained in
13## a written agreement between you and The Qt Company. For licensing terms
14## and conditions see https://www.qt.io/terms-conditions. For further
15## information use the contact form at https://www.qt.io/contact-us.
16##
17## GNU General Public License Usage
18## Alternatively, this file may be used under the terms of the GNU
19## General Public License version 3 or (at your option) any later version
20## approved by the KDE Free Qt Foundation. The licenses are as published by
21## the Free Software Foundation and appearing in the file LICENSE.GPL3
22## included in the packaging of this file. Please review the following
23## information to ensure the GNU General Public License requirements will
24## be met: https://www.gnu.org/licenses/gpl-3.0.html.
25##
26## $QT_END_LICENSE$
27##
28############################################################################
29
30FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
31
32SRC_URI += " \
33 file://0001-Control-fix-background-size-regression-caused-by-def.patch \
34 "