Move QRectVectorPath into the .cpp of the only file actually using it.
authorRobin Burchell <robin+qt@viroteck.net>
Wed, 11 Apr 2012 08:26:50 +0000 (10:26 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 11 Apr 2012 12:33:18 +0000 (14:33 +0200)
Change-Id: I2778b5142ee574f44a9f9489a2752265c6a6c170
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/gui/painting/qpaintengine_raster.cpp
src/gui/painting/qpaintengineex_p.h

index 15f344b..e73fb5e 100644 (file)
 
 QT_BEGIN_NAMESPACE
 
+class QRectVectorPath : public QVectorPath {
+public:
+    inline void set(const QRect &r) {
+        qreal left = r.x();
+        qreal right = r.x() + r.width();
+        qreal top = r.y();
+        qreal bottom = r.y() + r.height();
+        pts[0] = left;
+        pts[1] = top;
+        pts[2] = right;
+        pts[3] = top;
+        pts[4] = right;
+        pts[5] = bottom;
+        pts[6] = left;
+        pts[7] = bottom;
+    }
+
+    inline void set(const QRectF &r) {
+        qreal left = r.x();
+        qreal right = r.x() + r.width();
+        qreal top = r.y();
+        qreal bottom = r.y() + r.height();
+        pts[0] = left;
+        pts[1] = top;
+        pts[2] = right;
+        pts[3] = top;
+        pts[4] = right;
+        pts[5] = bottom;
+        pts[6] = left;
+        pts[7] = bottom;
+    }
+    inline QRectVectorPath(const QRect &r)
+        : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
+    {
+        set(r);
+    }
+    inline QRectVectorPath(const QRectF &r)
+        : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
+    {
+        set(r);
+    }
+    inline QRectVectorPath()
+        : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
+    { }
+
+    qreal pts[8];
+};
+
 Q_GUI_EXPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
 
 #define qreal_to_fixed_26_6(f) (int(f * 64))
index bc944b2..8a65e6c 100644 (file)
@@ -84,54 +84,6 @@ struct QIntRect {
     }
 };
 
-class QRectVectorPath : public QVectorPath {
-public:
-    inline void set(const QRect &r) {
-        qreal left = r.x();
-        qreal right = r.x() + r.width();
-        qreal top = r.y();
-        qreal bottom = r.y() + r.height();
-        pts[0] = left;
-        pts[1] = top;
-        pts[2] = right;
-        pts[3] = top;
-        pts[4] = right;
-        pts[5] = bottom;
-        pts[6] = left;
-        pts[7] = bottom;
-    }
-
-    inline void set(const QRectF &r) {
-        qreal left = r.x();
-        qreal right = r.x() + r.width();
-        qreal top = r.y();
-        qreal bottom = r.y() + r.height();
-        pts[0] = left;
-        pts[1] = top;
-        pts[2] = right;
-        pts[3] = top;
-        pts[4] = right;
-        pts[5] = bottom;
-        pts[6] = left;
-        pts[7] = bottom;
-    }
-    inline QRectVectorPath(const QRect &r)
-        : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
-    {
-        set(r);
-    }
-    inline QRectVectorPath(const QRectF &r)
-        : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
-    {
-        set(r);
-    }
-    inline QRectVectorPath()
-        : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
-    { }
-
-    qreal pts[8];
-};
-
 #ifndef QT_NO_DEBUG_STREAM
 QDebug Q_GUI_EXPORT &operator<<(QDebug &, const QVectorPath &path);
 #endif