mirror of https://github.com/qt/qtbase.git
tst_QGraphicsWidget: remove unneeded casts in setStyle()
`fstyle` is already a QStyle*, so casting it to QStyle* is unneeded.
Amends 9bc49b0bca
.
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.9 6.8 6.5 5.15
Change-Id: If763b8bf42de9d8bbe988ac76773d02bb7a2b68b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
parent
156bd55923
commit
dbfcd54155
|
@ -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…
Reference in New Issue