diff --git a/src/widgets/graphicsview/qgraphicsitem.h b/src/widgets/graphicsview/qgraphicsitem.h index e1732ff3929..e4bd7a8fe89 100644 --- a/src/widgets/graphicsview/qgraphicsitem.h +++ b/src/widgets/graphicsview/qgraphicsitem.h @@ -973,14 +973,14 @@ template inline T qgraphicsitem_cast(QGraphicsItem *item) { typedef typename std::remove_cv::type>::type Item; return int(Item::Type) == int(QGraphicsItem::Type) - || (item && int(Item::Type) == item->type()) ? static_cast(item) : 0; + || (item && int(Item::Type) == item->type()) ? static_cast(item) : nullptr; } template inline T qgraphicsitem_cast(const QGraphicsItem *item) { typedef typename std::remove_cv::type>::type Item; return int(Item::Type) == int(QGraphicsItem::Type) - || (item && int(Item::Type) == item->type()) ? static_cast(item) : 0; + || (item && int(Item::Type) == item->type()) ? static_cast(item) : nullptr; } #ifndef QT_NO_DEBUG_STREAM