diff options
Diffstat (limited to 'src/gui/image/qicon.cpp')
-rw-r--r-- | src/gui/image/qicon.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 681e7e3f79..ac95222c99 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtGui module of the Qt Toolkit. @@ -1321,8 +1321,20 @@ QDataStream &operator>>(QDataStream &s, QIcon &icon) #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QIcon &i) { - dbg.nospace() << "QIcon(" << i.name() << ')'; - return dbg.space(); + QDebugStateSaver saver(dbg); + dbg.resetFormat(); + dbg.nospace(); + dbg << "QIcon("; + if (i.isNull()) { + dbg << "null"; + } else { + if (!i.name().isEmpty()) + dbg << i.name() << ','; + dbg << "availableSizes[normal,Off]=" << i.availableSizes() + << ",cacheKey=" << showbase << hex << i.cacheKey() << dec << noshowbase; + } + dbg << ')'; + return dbg; } #endif |