summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpen.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-11-10 06:39:00 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-11-10 06:39:00 (GMT)
commit432d54d092414431e1e54daa2259384d83600bf2 (patch)
tree0ec7c9080b5dcdae1f411457f8b057145ef94366 /src/gui/painting/qpen.cpp
parentc411c39557d31b94efb5813be9e9ef43c05a9093 (diff)
parent4459e18afd3e537c2155dadad0937e0a5cdd76c5 (diff)
downloadQt-432d54d092414431e1e54daa2259384d83600bf2.zip
Qt-432d54d092414431e1e54daa2259384d83600bf2.tar.gz
Qt-432d54d092414431e1e54daa2259384d83600bf2.tar.bz2
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/gui/painting/qpen.cpp')
-rw-r--r--src/gui/painting/qpen.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index 41efc80..77aa748 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -835,16 +835,17 @@ bool QPen::operator==(const QPen &p) const
{
QPenData *dd = static_cast<QPenData *>(d);
QPenData *pdd = static_cast<QPenData *>(p.d);
- return (p.d == d) || (p.d->style == d->style
- && p.d->capStyle == d->capStyle
- && p.d->joinStyle == d->joinStyle
- && p.d->width == d->width
- && pdd->miterLimit == dd->miterLimit
- && (d->style != Qt::CustomDashLine
- || (qFuzzyCompare(pdd->dashOffset, dd->dashOffset) &&
- pdd->dashPattern == dd->dashPattern))
- && p.d->brush == d->brush
- && pdd->cosmetic == dd->cosmetic);
+ return (p.d == d)
+ || (p.d->style == d->style
+ && p.d->capStyle == d->capStyle
+ && p.d->joinStyle == d->joinStyle
+ && p.d->width == d->width
+ && pdd->miterLimit == dd->miterLimit
+ && (d->style != Qt::CustomDashLine
+ || (qFuzzyCompare(pdd->dashOffset, dd->dashOffset) &&
+ pdd->dashPattern == dd->dashPattern))
+ && p.d->brush == d->brush
+ && pdd->cosmetic == dd->cosmetic);
}
@@ -983,8 +984,18 @@ QDataStream &operator>>(QDataStream &s, QPen &p)
QDebug operator<<(QDebug dbg, const QPen &p)
{
#ifndef Q_BROKEN_DEBUG_STREAM
+ const 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() << ')';