From f00d9ee406001081464d5c0ce67cf893755f8f34 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 30 Jan 2018 09:08:48 +0200 Subject: 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 --- ...-background-size-regression-caused-by-def.patch | 43 ++++++++++++++++++++++ recipes-qt/qt5/qtquickcontrols2_git.bbappend | 34 +++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 recipes-qt/qt5/qtquickcontrols2/0001-Control-fix-background-size-regression-caused-by-def.patch create mode 100644 recipes-qt/qt5/qtquickcontrols2_git.bbappend 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 @@ +From 83046de497827a69bf05cd0b06ca6421b51e02b8 Mon Sep 17 00:00:00 2001 +From: J-P Nurmi +Date: Mon, 22 Jan 2018 10:58:06 +0100 +Subject: [PATCH] Control: fix background size regression caused by deferred + execution + +Task-number: QTBUG-65880 +Change-Id: Ic4f9fb087f4a78bd4c6257828011240186b6b22e +Reviewed-by: Mitch Curtis +--- + src/quicktemplates2/qquickcontrol.cpp | 1 + + tests/auto/controls/data/tst_popup.qml | 8 ++++++++ + 2 files changed, 9 insertions(+) + +diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp +index 6fbd4c07..957936df 100644 +--- a/src/quicktemplates2/qquickcontrol.cpp ++++ b/src/quicktemplates2/qquickcontrol.cpp +@@ -1343,6 +1343,7 @@ void QQuickControl::componentComplete() + d->executeBackground(true); + d->executeContentItem(true); + QQuickItem::componentComplete(); ++ d->resizeBackground(); + d->resizeContent(); + if (!d->hasLocale) + d->locale = QQuickControlPrivate::calcLocale(d->parentItem); +diff --git a/tests/auto/controls/data/tst_popup.qml b/tests/auto/controls/data/tst_popup.qml +index bec50ad0..1f3a097f 100644 +--- a/tests/auto/controls/data/tst_popup.qml ++++ b/tests/auto/controls/data/tst_popup.qml +@@ -1253,4 +1253,12 @@ TestCase { + control.open() + verify(control.visible) + } ++ ++ function test_deferredBackgroundSize() { ++ var control = createTemporaryObject(popupControl, testCase, {width: 200, height: 100}) ++ verify(control) ++ ++ compare(control.background.width, 200) ++ compare(control.background.height, 100) ++ } + } 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 @@ +############################################################################ +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://0001-Control-fix-background-size-regression-caused-by-def.patch \ + " -- cgit v1.2.3-54-g00ecf