From 3662be51935827e2fdb384bc407e055470e831c0 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 1 Nov 2024 11:26:45 +0100 Subject: [PATCH] QStyle: block future changes that result in QPainter warnings Amends ff9818135db28e287e7818defd9c1a9acdebacdc and follow-up changes, which shouldn't have passed CI as they resulted in runtime warnings until ca8ca216dbd5d374aa05d96db8052c2411baae7c. Pick-to: 6.8 Change-Id: Ib3688779d5bcba06ce992453e62fb841251f6a62 Reviewed-by: Christian Ehrlicher --- tests/auto/widgets/styles/qstyle/tst_qstyle.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp index 95e24da21d8..679595058ee 100644 --- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp +++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp @@ -44,6 +44,7 @@ class tst_QStyle : public QObject Q_OBJECT private slots: + void init(); void drawItemPixmap(); void cleanup(); #ifndef QT_NO_STYLE_FUSION @@ -88,6 +89,11 @@ class MyWidget : public QWidget void paintEvent(QPaintEvent *) override; }; +void tst_QStyle::init() +{ + QTest::failOnWarning(QRegularExpression("QPainter:.*")); +} + void tst_QStyle::cleanup() { QVERIFY(QApplication::topLevelWidgets().isEmpty());