summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpen.cpp
diff options
context:
space:
mode:
authorgunnar <gunnar@trolltech.com>2009-11-04 18:38:01 (GMT)
committergunnar <gunnar@trolltech.com>2009-11-04 20:13:00 (GMT)
commit391441b2ce2be527db0829798631436670df0965 (patch)
treec9fc2bed6e053c4da8017d13991892b8c5aa66e3 /src/gui/painting/qpen.cpp
parent56b8d24c337d30c6bcdda101fbc664c4fd6d642d (diff)
downloadQt-391441b2ce2be527db0829798631436670df0965.zip
Qt-391441b2ce2be527db0829798631436670df0965.tar.gz
Qt-391441b2ce2be527db0829798631436670df0965.tar.bz2
Added some helpful info to QBrush and QPen's QDebug operators
Reviewed-by: TrustMe
Diffstat (limited to 'src/gui/painting/qpen.cpp')
-rw-r--r--src/gui/painting/qpen.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index 41efc80..9746747 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -983,8 +983,18 @@ QDataStream &operator>>(QDataStream &s, QPen &p)
QDebug operator<<(QDebug dbg, const QPen &p)
{
#ifndef Q_BROKEN_DEBUG_STREAM
+ char *PEN_STYLES[] = {
+ "NoPen",
+ "SolidLine",
+ "DashLine",
+ "DotLine",
+ "DashDotLine",
+ "DashDotDotLine",
+ "CustomDashLine"
+ };
+
dbg.nospace() << "QPen(" << p.width() << ',' << p.brush()
- << ',' << int(p.style()) << ',' << int(p.capStyle())
+ << ',' << PEN_STYLES[p.style()] << ',' << int(p.capStyle())
<< ',' << int(p.joinStyle()) << ',' << p.dashPattern()
<< ',' << p.dashOffset()
<< ',' << p.miterLimit() << ')';