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 @@ protected: void paintEvent(QPaintEvent *) override; }; +void tst_QStyle::init() +{ + QTest::failOnWarning(QRegularExpression("QPainter:.*")); +} + void tst_QStyle::cleanup() { QVERIFY(QApplication::topLevelWidgets().isEmpty());