tst_QGraphicsWidget: remove unneeded casts in setStyle()
`fstyle` is already a QStyle*, so casting it to QStyle* is unneeded. Amends 9bc49b0bca361646aac90cd00706588d3dcd66c9. And 0 is a valid nullptr value, so we don't need to cast there, either. Amends the start of the public history. Drive-by port to nullptr. Pick-to: 6.8 6.5 5.15 Change-Id: If763b8bf42de9d8bbe988ac76773d02bb7a2b68b Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit dbfcd541552b51f831521c77fd44e753a97f04db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
4a9782f628
commit
08986f17f6
@ -1360,10 +1360,10 @@ void tst_QGraphicsWidget::setStyle()
|
||||
if (!style.isEmpty()) {
|
||||
QStyle *fstyle = QStyleFactory::create(style);
|
||||
widget.setStyle(fstyle);
|
||||
QCOMPARE(widget.style(), static_cast<QStyle*>(fstyle));
|
||||
QCOMPARE(widget.style(), fstyle);
|
||||
} else {
|
||||
widget.setStyle(0);
|
||||
QVERIFY(widget.style() != (QStyle *)0);
|
||||
QVERIFY(widget.style() != nullptr);
|
||||
}
|
||||
QCOMPARE(widget.eventCount, oldEventCounts + 1);
|
||||
QCOMPARE(widget.testAttribute(Qt::WA_SetStyle), !style.isEmpty());
|
||||
|
Loading…
x
Reference in New Issue
Block a user