Constify parameter in QGraphicsItem/Object debug streaming operator
Address FIXME comment. Change-Id: I55b6e458f2aead9baac8ab3bba7009ad993863e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
6693befcbb
commit
6dab2577bf
@ -11354,8 +11354,7 @@ static void formatGraphicsItemHelper(QDebug debug, const QGraphicsItem *item)
|
||||
debug << ", flags=" << item->flags();
|
||||
}
|
||||
|
||||
// FIXME: Qt 6: Make this QDebug operator<<(QDebug debug, const QGraphicsItem *item)
|
||||
QDebug operator<<(QDebug debug, QGraphicsItem *item)
|
||||
QDebug operator<<(QDebug debug, const QGraphicsItem *item)
|
||||
{
|
||||
QDebugStateSaver saver(debug);
|
||||
debug.nospace();
|
||||
@ -11365,7 +11364,7 @@ QDebug operator<<(QDebug debug, QGraphicsItem *item)
|
||||
return debug;
|
||||
}
|
||||
|
||||
if (QGraphicsObject *o = item->toGraphicsObject())
|
||||
if (const QGraphicsObject *o = item->toGraphicsObject())
|
||||
debug << o->metaObject()->className();
|
||||
else
|
||||
debug << "QGraphicsItem";
|
||||
@ -11386,8 +11385,7 @@ QDebug operator<<(QDebug debug, QGraphicsItem *item)
|
||||
return debug;
|
||||
}
|
||||
|
||||
// FIXME: Qt 6: Make this QDebug operator<<(QDebug debug, const QGraphicsObject *item)
|
||||
QDebug operator<<(QDebug debug, QGraphicsObject *item)
|
||||
QDebug operator<<(QDebug debug, const QGraphicsObject *item)
|
||||
{
|
||||
QDebugStateSaver saver(debug);
|
||||
debug.nospace();
|
||||
|
@ -1032,8 +1032,8 @@ template <class T> inline T qgraphicsitem_cast(const QGraphicsItem *item)
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, QGraphicsItem *item);
|
||||
Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, QGraphicsObject *item);
|
||||
Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, const QGraphicsItem *item);
|
||||
Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, const QGraphicsObject *item);
|
||||
Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemChange change);
|
||||
Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlag flag);
|
||||
Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlags flags);
|
||||
|
Loading…
Reference in New Issue
Block a user