diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qimage.cpp | 8 | ||||
-rw-r--r-- | src/gui/image/qimage.h | 5 | ||||
-rw-r--r-- | src/gui/image/qpixmap.cpp | 8 | ||||
-rw-r--r-- | src/gui/image/qpixmap.h | 4 | ||||
-rw-r--r-- | src/gui/kernel/qcursor.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qcursor.h | 5 | ||||
-rw-r--r-- | src/gui/kernel/qpalette.cpp | 9 | ||||
-rw-r--r-- | src/gui/kernel/qpalette.h | 4 | ||||
-rw-r--r-- | src/gui/text/qtextformat.cpp | 15 | ||||
-rw-r--r-- | src/gui/text/qtextformat.h | 8 |
10 files changed, 76 insertions, 0 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 0e5a4484dc..564abd2af2 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -5863,4 +5863,12 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla \internal */ +#ifndef QT_NO_DEBUG_STREAM +QDebug operator<<(QDebug dbg, const QImage &i) +{ + dbg.nospace() << "QImage(" << i.size() << ')'; + return dbg.space(); +} +#endif + QT_END_NAMESPACE diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h index 3abf203b3b..7a5a732c9a 100644 --- a/src/gui/image/qimage.h +++ b/src/gui/image/qimage.h @@ -406,6 +406,11 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QImage &); Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QImage &); #endif +#ifndef QT_NO_DEBUG_STREAM +Q_GUI_EXPORT QDebug operator<<(QDebug, const QImage &); +#endif + + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index cc7171a598..48d393cc24 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -1631,4 +1631,12 @@ QPlatformPixmap* QPixmap::handle() const return data.data(); } +#ifndef QT_NO_DEBUG_STREAM +QDebug operator<<(QDebug dbg, const QPixmap &r) +{ + dbg.nospace() << "QPixmap(" << r.size() << ')'; + return dbg.space(); +} +#endif + QT_END_NAMESPACE diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h index dfb729a77d..5e8ef70828 100644 --- a/src/gui/image/qpixmap.h +++ b/src/gui/image/qpixmap.h @@ -238,6 +238,10 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QPixmap &); Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPixmap &); #endif +#ifndef QT_NO_DEBUG_STREAM +Q_GUI_EXPORT QDebug operator<<(QDebug, const QPixmap &); +#endif + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp index e2fc1e0c99..bd327e1eb1 100644 --- a/src/gui/kernel/qcursor.cpp +++ b/src/gui/kernel/qcursor.cpp @@ -49,6 +49,7 @@ #include <qdatastream.h> #include <qvariant.h> #include <private/qcursor_p.h> +#include <qdebug.h> QT_BEGIN_NAMESPACE @@ -564,6 +565,15 @@ QCursor::operator QVariant() const { return QVariant(QVariant::Cursor, this); } + +#ifndef QT_NO_DEBUG_STREAM +QDebug operator<<(QDebug dbg, const QCursor &c) +{ + dbg.nospace() << "QCursor(Qt::CursorShape(" << c.shape() << "))"; + return dbg.space(); +} +#endif + QT_END_NAMESPACE #endif // QT_NO_CURSOR diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h index 121bd2c2e6..7437da4aba 100644 --- a/src/gui/kernel/qcursor.h +++ b/src/gui/kernel/qcursor.h @@ -126,6 +126,11 @@ private: Q_GUI_EXPORT QDataStream &operator<<(QDataStream &outS, const QCursor &cursor); Q_GUI_EXPORT QDataStream &operator>>(QDataStream &inS, QCursor &cursor); #endif + +#ifndef QT_NO_DEBUG_STREAM +Q_GUI_EXPORT QDebug operator<<(QDebug, const QCursor &); +#endif + #endif // QT_NO_CURSOR QT_END_NAMESPACE diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp index 0e067392c6..2dd2ef00c5 100644 --- a/src/gui/kernel/qpalette.cpp +++ b/src/gui/kernel/qpalette.cpp @@ -43,6 +43,7 @@ #include "qguiapplication.h" #include "qdatastream.h" #include "qvariant.h" +#include "qdebug.h" QT_BEGIN_NAMESPACE @@ -1081,4 +1082,12 @@ void QPalette::setColorGroup(ColorGroup cg, const QBrush &foreground, const QBru setBrush(cg, ToolTipText, toolTipText); } +#ifndef QT_NO_DEBUG_STREAM +QDebug operator<<(QDebug dbg, const QPalette &) +{ + dbg.nospace() << "QPalette()"; + return dbg.space(); +} +#endif + QT_END_NAMESPACE diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h index 23cecd2cfc..d47854df07 100644 --- a/src/gui/kernel/qpalette.h +++ b/src/gui/kernel/qpalette.h @@ -190,6 +190,10 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &ds, const QPalette &p); Q_GUI_EXPORT QDataStream &operator>>(QDataStream &ds, QPalette &p); #endif // QT_NO_DATASTREAM +#ifndef QT_NO_DEBUG_STREAM +Q_GUI_EXPORT QDebug operator<<(QDebug, const QPalette &); +#endif + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp index a118462514..4db57282b7 100644 --- a/src/gui/text/qtextformat.cpp +++ b/src/gui/text/qtextformat.cpp @@ -3321,4 +3321,19 @@ void QTextFormatCollection::setDefaultFont(const QFont &f) formats[i].d->resolveFont(defaultFnt); } +#ifndef QT_NO_DEBUG_STREAM +QDebug operator<<(QDebug dbg, const QTextLength &l) +{ + dbg.nospace() << "QTextLength(QTextLength::Type(" << l.type() << "))"; + return dbg.space(); +} + +QDebug operator<<(QDebug dbg, const QTextFormat &f) +{ + dbg.nospace() << "QTextFormat(QTextFormat::FormatType(" << f.type() << "))"; + return dbg.space(); +} + +#endif + QT_END_NAMESPACE diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h index a535f900a7..2e1bcd8d33 100644 --- a/src/gui/text/qtextformat.h +++ b/src/gui/text/qtextformat.h @@ -81,6 +81,10 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTextLength &); Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTextLength &); #endif +#ifndef QT_NO_DEBUG_STREAM +Q_GUI_EXPORT QDebug operator<<(QDebug, const QTextLength &); +#endif + class Q_GUI_EXPORT QTextLength { public: @@ -126,6 +130,10 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTextFormat &); Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTextFormat &); #endif +#ifndef QT_NO_DEBUG_STREAM +Q_GUI_EXPORT QDebug operator<<(QDebug, const QTextFormat &); +#endif + class Q_GUI_EXPORT QTextFormat { Q_GADGET |