From 7a4f05f89927fd9ca8771550f1405d99e3961c24 Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Wed, 17 Mar 2010 08:30:39 +0100 Subject: Display the itemSendScenePositionChange properly when debugging. Also a harmless test added to check that the flag is actually set. Reviewed-by:TrustMe --- src/gui/graphicsview/qgraphicsitem.cpp | 2 +- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index b712016..3c255ef 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -11141,7 +11141,7 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlags flags) { debug << '('; bool f = false; - for (int i = 0; i < 16; ++i) { + for (int i = 0; i < 17; ++i) { if (flags & (1 << i)) { if (f) debug << '|'; diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 4d9f23f..c0ad8bf 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -9767,6 +9767,9 @@ void tst_QGraphicsItem::scenePosChange() child1->setFlag(QGraphicsItem::ItemSendsScenePositionChanges, true); grandChild2->setFlag(QGraphicsItem::ItemSendsScenePositionChanges, true); + QVERIFY(child1->flags() & QGraphicsItem::ItemSendsScenePositionChanges); + QVERIFY(grandChild2->flags() & QGraphicsItem::ItemSendsScenePositionChanges); + QGraphicsScene scene; scene.addItem(root); -- cgit v0.12