diff options
-rw-r--r-- | src/gui/image/qicon.cpp | 18 | ||||
-rw-r--r-- | src/gui/image/qimage.cpp | 20 | ||||
-rw-r--r-- | src/gui/image/qpixmap.cpp | 16 |
3 files changed, 30 insertions, 24 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 4f5e9c3d1f..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,18 +1321,20 @@ QDataStream &operator>>(QDataStream &s, QIcon &icon) #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QIcon &i) { - QDebug nospace = dbg.nospace(); - nospace << "QIcon("; + QDebugStateSaver saver(dbg); + dbg.resetFormat(); + dbg.nospace(); + dbg << "QIcon("; if (i.isNull()) { - nospace << "null"; + dbg << "null"; } else { if (!i.name().isEmpty()) - nospace << i.name() << ','; - nospace << "availableSizes[normal,Off]=" << i.availableSizes() + dbg << i.name() << ','; + dbg << "availableSizes[normal,Off]=" << i.availableSizes() << ",cacheKey=" << showbase << hex << i.cacheKey() << dec << noshowbase; } - nospace << ')'; - return dbg.space(); + dbg << ')'; + return dbg; } #endif diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 40f8b9e4d8..8c7c446e96 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.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. @@ -4550,19 +4550,21 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QImage &i) { - QDebug nospace = dbg.nospace(); - nospace << "QImage("; + QDebugStateSaver saver(dbg); + dbg.resetFormat(); + dbg.nospace(); + dbg << "QImage("; if (i.isNull()) { - nospace << "null"; + dbg << "null"; } else { - nospace << i.size() << ",format=" << i.format() << ",depth=" << i.depth(); + dbg << i.size() << ",format=" << i.format() << ",depth=" << i.depth(); if (i.colorCount()) - nospace << ",colorCount=" << i.colorCount(); - nospace << ",devicePixelRatio=" << i.devicePixelRatio() + dbg << ",colorCount=" << i.colorCount(); + dbg << ",devicePixelRatio=" << i.devicePixelRatio() << ",bytesPerLine=" << i.bytesPerLine() << ",byteCount=" << i.byteCount(); } - nospace << ')'; - return dbg.space(); + dbg << ')'; + return dbg; } #endif diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 0ed840e0c0..2d41ca7e24 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.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. @@ -1724,17 +1724,19 @@ QPlatformPixmap* QPixmap::handle() const #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QPixmap &r) { - QDebug nospace = dbg.nospace(); - nospace << "QPixmap("; + QDebugStateSaver saver(dbg); + dbg.resetFormat(); + dbg.nospace(); + dbg << "QPixmap("; if (r.isNull()) { - nospace << "null"; + dbg << "null"; } else { - nospace << r.size() << ",depth=" << r.depth() + dbg << r.size() << ",depth=" << r.depth() << ",devicePixelRatio=" << r.devicePixelRatio() << ",cacheKey=" << showbase << hex << r.cacheKey() << dec << noshowbase; } - nospace << ')'; - return dbg.space(); + dbg << ')'; + return dbg; } #endif |