From: Ivailo Monev Date: Sat, 29 Jan 2022 21:36:24 +0000 (+0200) Subject: declare xlibMaxLinePoints as static constant X-Git-Tag: 4.12.0~1044 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=34d7383d9091d27e7521faa40194a35978549ccb;p=kde%2FKatie.git declare xlibMaxLinePoints as static constant Signed-off-by: Ivailo Monev --- diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp index c1f3dfa7f..ea934f31c 100644 --- a/src/gui/painting/qpaintengine_x11.cpp +++ b/src/gui/painting/qpaintengine_x11.cpp @@ -412,7 +412,6 @@ bool QX11PaintEngine::begin(QPaintDevice *pdev) #if !defined(QT_NO_XRENDER) d->composition_mode = PictOpOver; #endif - d->xlibMaxLinePoints = 32762; // a safe number used to avoid, call to XMaxRequestSize(d->dpy) - 3; d->opacity = 1; // Set up the polygon clipper. Note: This will only work in @@ -1016,6 +1015,9 @@ void QX11PaintEnginePrivate::fillPolygon_dev(const QPointF *polygonPoints, int p void QX11PaintEnginePrivate::strokePolygon_dev(const QPointF *polygonPoints, int pointCount, bool close) { + // a safe number used to avoid, call to XMaxRequestSize(d->dpy) - 3; + static const int xlibMaxLinePoints = 32762; + int clippedCount = 0; QPointF *clippedPoints = nullptr; polygonClipper.clipPolygon(polygonPoints, pointCount, diff --git a/src/gui/painting/qpaintengine_x11_p.h b/src/gui/painting/qpaintengine_x11_p.h index c2ddcf807..a722e420a 100644 --- a/src/gui/painting/qpaintengine_x11_p.h +++ b/src/gui/painting/qpaintengine_x11_p.h @@ -170,7 +170,6 @@ public: qreal xform_scale; QPolygonClipper polygonClipper; - int xlibMaxLinePoints; #ifndef QT_NO_XRENDER QXRenderTessellator *tessellator; #endif