diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-08-05 01:05:08 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-08-05 01:05:08 (GMT) |
commit | dba4cce953113926b0473dbe167f983a4aed0d08 (patch) | |
tree | b26f2b1ee7acea996eea12a32397a811de8cfe90 | |
parent | 2472959ba8c0dbd404ab038710e5df74723a1780 (diff) | |
download | Qt-dba4cce953113926b0473dbe167f983a4aed0d08.zip Qt-dba4cce953113926b0473dbe167f983a4aed0d08.tar.gz Qt-dba4cce953113926b0473dbe167f983a4aed0d08.tar.bz2 |
Add qDebug support for QFxItem*.
-rw-r--r-- | src/declarative/fx/qfxitem.cpp | 14 | ||||
-rw-r--r-- | src/declarative/fx/qfxitem.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index d5c231b..02466d0 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -1876,4 +1876,18 @@ bool QFxItem::event(QEvent *ev) return QGraphicsObject::event(ev); } +QDebug operator<<(QDebug debug, QFxItem *item) +{ + if (!item) { + debug << "QFxItem(0)"; + return debug; + } + + debug << item->metaObject()->className() << "(this =" << ((void*)item) + << ", parent =" << ((void*)item->parentItem()) + << ", geometry =" << QRectF(item->pos(), QSizeF(item->width(), item->height())) + << ", z =" << item->zValue() << ")"; + return debug; +} + QT_END_NAMESPACE diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h index e1bcb2f..c3607ef 100644 --- a/src/declarative/fx/qfxitem.h +++ b/src/declarative/fx/qfxitem.h @@ -274,6 +274,8 @@ T qobject_cast(QGraphicsItem *item) return qobject_cast<T>(o); } +QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, QFxItem *item); + QT_END_NAMESPACE QML_DECLARE_TYPE(QFxContents) |