summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2009-06-08 08:42:42 (GMT)
committerMarius Storm-Olsen <marius@trolltech.com>2009-06-08 08:43:01 (GMT)
commiteb8789ba06949974eb4108b115a30f96e1500a81 (patch)
tree523aa4541353053454fb3fd307aee4a742653827 /src/gui/painting
parentac30cbdceac428fa206a939e5d820b2bd77227fc (diff)
downloadQt-eb8789ba06949974eb4108b115a30f96e1500a81.zip
Qt-eb8789ba06949974eb4108b115a30f96e1500a81.tar.gz
Qt-eb8789ba06949974eb4108b115a30f96e1500a81.tar.bz2
Fix QT_NO_DATASTREAM macro checks and improve readability
Some checks where in the wrong locations, and some endifs where hard to read. Merge-request: 611 Reviewed-by: Marius Storm-Olsen <marius@trolltech.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qcolor.cpp4
-rw-r--r--src/gui/painting/qfixed_p.h2
-rw-r--r--src/gui/painting/qmatrix.h2
-rw-r--r--src/gui/painting/qpainterpath.cpp2
-rw-r--r--src/gui/painting/qpolygon.cpp2
-rw-r--r--src/gui/painting/qtransform.h2
6 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index b1fe3aa..fa833db 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -2116,9 +2116,7 @@ QDataStream &operator>>(QDataStream &stream, QColor &color)
return stream;
}
-#endif
-
-
+#endif // QT_NO_DATASTREAM
/*****************************************************************************
diff --git a/src/gui/painting/qfixed_p.h b/src/gui/painting/qfixed_p.h
index 2e49615..c89d97a 100644
--- a/src/gui/painting/qfixed_p.h
+++ b/src/gui/painting/qfixed_p.h
@@ -181,8 +181,10 @@ inline bool operator<(int i, const QFixed &f) { return (i<<6) < f.value(); }
inline bool operator>(const QFixed &f, int i) { return f.value() > (i<<6); }
inline bool operator>(int i, const QFixed &f) { return (i<<6) > f.value(); }
+#ifndef QT_NO_DEBUG_STREAM
inline QDebug &operator<<(QDebug &dbg, const QFixed &f)
{ return dbg << f.toReal(); }
+#endif
struct QFixedPoint {
QFixed x;
diff --git a/src/gui/painting/qmatrix.h b/src/gui/painting/qmatrix.h
index 1e5fbb4..1df2395 100644
--- a/src/gui/painting/qmatrix.h
+++ b/src/gui/painting/qmatrix.h
@@ -169,8 +169,10 @@ inline bool QMatrix::isIdentity() const
QMatrix stream functions
*****************************************************************************/
+#ifndef QT_NO_DATASTREAM
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QMatrix &);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QMatrix &);
+#endif
#ifndef QT_NO_DEBUG_STREAM
Q_GUI_EXPORT QDebug operator<<(QDebug, const QMatrix &);
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index bd91dfc..e1bb317 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -2366,7 +2366,7 @@ QDataStream &operator>>(QDataStream &s, QPainterPath &p)
p.d_func()->dirtyControlBounds = true;
return s;
}
-#endif
+#endif // QT_NO_DATASTREAM
/*******************************************************************************
diff --git a/src/gui/painting/qpolygon.cpp b/src/gui/painting/qpolygon.cpp
index 769c095..b79c288 100644
--- a/src/gui/painting/qpolygon.cpp
+++ b/src/gui/painting/qpolygon.cpp
@@ -742,7 +742,7 @@ QDataStream &operator>>(QDataStream &s, QPolygon &a)
QVector<QPoint> &v = a;
return s >> v;
}
-#endif
+#endif // QT_NO_DATASTREAM
/*****************************************************************************
QPolygonF stream functions
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index aac7c31..a5002ca 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -332,8 +332,10 @@ inline QTransform &QTransform::operator-=(qreal num)
}
/****** stream functions *******************/
+#ifndef QT_NO_DATASTREAM
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTransform &);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTransform &);
+#endif
#ifndef QT_NO_DEBUG_STREAM
Q_GUI_EXPORT QDebug operator<<(QDebug, const QTransform &);