From e823c351c6226765ccfe66e2ee93a2797dcc9721 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 26 Nov 2018 11:22:07 +0100 Subject: Fix resolve() on fonts returned from QWidget::font() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set the inherited properties as resolved on the font, so non-default values are passed on in contexts that does resolve logic like QPainter. One test is updated as it actually tests what it is supposed to on more configurations. Fixes: QTBUG-39560 Change-Id: Ief668e992ccdc091337a259a4c1306a00e67c73f Reviewed-by: Tor Arne Vestbø --- tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/widgets/styles') diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp index 03f24ba151..0e5c40f1b6 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -741,9 +741,9 @@ void tst_QStyleSheetStyle::fontPropagation() QCOMPARE(FONTSIZE(pb), 20); QWidget window; - window.setStyleSheet("* { font-size: 10pt }"); + window.setStyleSheet("* { font-size: 9pt }"); pb.setParent(&window); - QCOMPARE(FONTSIZE(pb), 10); + QCOMPARE(FONTSIZE(pb), 9); window.setStyleSheet(""); QCOMPARE(FONTSIZE(pb), buttonFontSize); -- cgit v1.2.3