Skip to content

Commit

Permalink
QStyle: block future changes that result in QPainter warnings
Browse files Browse the repository at this point in the history
Amends ff98181 and follow-up changes,
which shouldn't have passed CI as they resulted in runtime warnings
until ca8ca21.

Pick-to: 6.8
Change-Id: Ib3688779d5bcba06ce992453e62fb841251f6a62
Reviewed-by: Christian Ehrlicher <[email protected]>
  • Loading branch information
vohi committed Nov 1, 2024
1 parent ebdc01c commit 3662be5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class tst_QStyle : public QObject
Q_OBJECT

private slots:
void init();
void drawItemPixmap();
void cleanup();
#ifndef QT_NO_STYLE_FUSION
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 3662be5

Please sign in to comment.