Move QVectorPath::polygonFlags to its own class.
authorRobin Burchell <robin+qt@viroteck.net>
Wed, 11 Apr 2012 08:09:26 +0000 (10:09 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 11 Apr 2012 12:33:33 +0000 (14:33 +0200)
Who can say why it was put in QPaintEngineEx's header, but it certainly doesn't
belong there.

Change-Id: Ieb3b977affcf4b240f621d13b72bdc0e8f8138b9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/gui/painting/qpaintengineex_p.h
src/gui/painting/qvectorpath_p.h

index 8a65e6c..71a2ec3 100644 (file)
@@ -204,16 +204,6 @@ public:
     QRect exDeviceRect;
 };
 
-inline uint QVectorPath::polygonFlags(QPaintEngine::PolygonDrawMode mode) {
-    switch (mode) {
-    case QPaintEngine::ConvexMode: return ConvexPolygonHint | ImplicitClose;
-    case QPaintEngine::OddEvenMode: return PolygonHint | OddEvenFill | ImplicitClose;
-    case QPaintEngine::WindingMode: return PolygonHint | WindingFill | ImplicitClose;
-    case QPaintEngine::PolylineMode: return PolygonHint;
-    default: return 0;
-    }
-}
-
 QT_END_NAMESPACE
 
 QT_END_HEADER
index 2ee7d86..fc2661f 100644 (file)
@@ -139,7 +139,16 @@ public:
     inline int elementCount() const { return m_count; }
     inline const QPainterPath convertToPainterPath() const;
 
-    static inline uint polygonFlags(QPaintEngine::PolygonDrawMode mode);
+    static inline uint polygonFlags(QPaintEngine::PolygonDrawMode mode)
+    {
+        switch (mode) {
+        case QPaintEngine::ConvexMode: return ConvexPolygonHint | ImplicitClose;
+        case QPaintEngine::OddEvenMode: return PolygonHint | OddEvenFill | ImplicitClose;
+        case QPaintEngine::WindingMode: return PolygonHint | WindingFill | ImplicitClose;
+        case QPaintEngine::PolylineMode: return PolygonHint;
+        default: return 0;
+        }
+    }
 
     struct CacheEntry {
         QPaintEngineEx *engine;