diff options
author | gunnar <gunnar@trolltech.com> | 2009-11-04 19:38:01 +0100 |
---|---|---|
committer | gunnar <gunnar@trolltech.com> | 2009-11-04 21:13:00 +0100 |
commit | 391441b2ce2be527db0829798631436670df0965 (patch) | |
tree | c9fc2bed6e053c4da8017d13991892b8c5aa66e3 /src/gui/painting/qbrush.cpp | |
parent | 56b8d24c337d30c6bcdda101fbc664c4fd6d642d (diff) | |
download | qt4-tools-391441b2ce2be527db0829798631436670df0965.tar.gz |
Added some helpful info to QBrush and QPen's QDebug operators
Reviewed-by: TrustMe
Diffstat (limited to 'src/gui/painting/qbrush.cpp')
-rw-r--r-- | src/gui/painting/qbrush.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index cbfbba63da..6f5d89208c 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -970,7 +970,29 @@ bool QBrush::operator==(const QBrush &b) const QDebug operator<<(QDebug dbg, const QBrush &b) { #ifndef Q_BROKEN_DEBUG_STREAM - dbg.nospace() << "QBrush(" << b.color() << ',' << b.style() << ')'; + char *BRUSH_STYLES[] = { + "NoBrush", + "SolidPattern", + "Dense1Pattern", + "Dense2Pattern", + "Dense3Pattern", + "Dense4Pattern", + "Dense5Pattern", + "Dense6Pattern", + "Dense7Pattern", + "HorPattern", + "VerPattern", + "CrossPattern", + "BDiagPattern", + "FDiagPattern", + "DiagCrossPattern", + "LinearGradientPattern", + "RadialGradientPattern", + "ConicalGradientPattern", + "TexturePattern" + }; + + dbg.nospace() << "QBrush(" << b.color() << ',' << BRUSH_STYLES[b.style()] << ')'; return dbg.space(); #else qWarning("This compiler doesn't support streaming QBrush to QDebug"); |