diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-04-02 17:07:04 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-04-08 21:58:41 +0200 |
commit | 6dab2577bfa57e242e9568047c976f5e509c03f4 (patch) | |
tree | 2ea9d2b004d9d1b59cbc3043f83b6ca23e1365dc /src/widgets/graphicsview/qgraphicsitem.cpp | |
parent | 6693befcbbb575ed5dc8826c17c31bd703c2340a (diff) |
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>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsitem.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsitem.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index af4443fa00..09c49a239f 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -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(); |