summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-07-21 16:20:13 +0200
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2014-07-21 22:29:03 +0200
commit43e8c1896d5c9c04a78983d10afeb1d5a2112995 (patch)
tree9088d233134bd231b2c7d17da8b3920bd38b7d5b /src/gui/image/qimage.cpp
parentc76a91ebdc024e68c87544f00f0d260f0eb3c81f (diff)
Improve debug output of QImage, QPixmap and QIcon.
Task-number: QTBUG-38858 Change-Id: Ie45d595478f971c7ed973d911c65484d947d2a60 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r--src/gui/image/qimage.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index c48924e2fd..40f8b9e4d8 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4550,7 +4550,18 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QImage &i)
{
- dbg.nospace() << "QImage(" << i.size() << ')';
+ QDebug nospace = dbg.nospace();
+ nospace << "QImage(";
+ if (i.isNull()) {
+ nospace << "null";
+ } else {
+ nospace << i.size() << ",format=" << i.format() << ",depth=" << i.depth();
+ if (i.colorCount())
+ nospace << ",colorCount=" << i.colorCount();
+ nospace << ",devicePixelRatio=" << i.devicePixelRatio()
+ << ",bytesPerLine=" << i.bytesPerLine() << ",byteCount=" << i.byteCount();
+ }
+ nospace << ')';
return dbg.space();
}
#endif