diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-07-21 16:20:13 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-07-21 22:29:03 +0200 |
commit | 43e8c1896d5c9c04a78983d10afeb1d5a2112995 (patch) | |
tree | 9088d233134bd231b2c7d17da8b3920bd38b7d5b /src/gui/image/qicon.cpp | |
parent | c76a91ebdc024e68c87544f00f0d260f0eb3c81f (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/qicon.cpp')
-rw-r--r-- | src/gui/image/qicon.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 681e7e3f79..4f5e9c3d1f 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -1321,7 +1321,17 @@ QDataStream &operator>>(QDataStream &s, QIcon &icon) #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QIcon &i) { - dbg.nospace() << "QIcon(" << i.name() << ')'; + QDebug nospace = dbg.nospace(); + nospace << "QIcon("; + if (i.isNull()) { + nospace << "null"; + } else { + if (!i.name().isEmpty()) + nospace << i.name() << ','; + nospace << "availableSizes[normal,Off]=" << i.availableSizes() + << ",cacheKey=" << showbase << hex << i.cacheKey() << dec << noshowbase; + } + nospace << ')'; return dbg.space(); } #endif |