summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2010-03-17 07:30:39 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2010-03-17 07:30:39 (GMT)
commit7a4f05f89927fd9ca8771550f1405d99e3961c24 (patch)
treea8fc87fae66cc7419db870bfa19d0465b8042808
parent111708e655d66fb0dcbc4f2cbdc2abf14c700cf4 (diff)
downloadQt-7a4f05f89927fd9ca8771550f1405d99e3961c24.zip
Qt-7a4f05f89927fd9ca8771550f1405d99e3961c24.tar.gz
Qt-7a4f05f89927fd9ca8771550f1405d99e3961c24.tar.bz2
Display the itemSendScenePositionChange properly when debugging.
Also a harmless test added to check that the flag is actually set. Reviewed-by:TrustMe
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp2
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp3
2 files changed, 4 insertions, 1 deletions
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);