summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <[email protected]>2025-01-08 16:47:26 +0100
committerGiuseppe D'Angelo <[email protected]>2025-01-12 11:48:25 +0100
commit09e40152f8342644f1f002d1f0b6d31d715e7fd1 (patch)
tree34fed87ec6126575a6f80740744ed7a9b1e1b4ef
parentc64774eef72411029f7c2fb611328f25b83ff8ca (diff)
Q*PaintEngineState: use canonical signature for the copy constructor
I'm not sure why this code had copy constructors taking by non-const reference. Add the missing const. Change-Id: Ie6d1cb6eab7b829a59e21f1874b041a00a52d1e9 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h2
-rw-r--r--src/opengl/qopenglpaintengine.cpp2
-rw-r--r--src/opengl/qopenglpaintengine_p.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 92f21d3aaf4..0cb9edab577 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -515,7 +515,7 @@ QRasterPaintEngineState::QRasterPaintEngineState()
dirty = 0;
}
-QRasterPaintEngineState::QRasterPaintEngineState(QRasterPaintEngineState &s)
+QRasterPaintEngineState::QRasterPaintEngineState(const QRasterPaintEngineState &s)
: QPainterState(s)
, lastPen(s.lastPen)
, penData(s.penData)
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index ab0048af524..d436afc5c77 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -39,7 +39,7 @@ class QClipData;
class QRasterPaintEngineState : public QPainterState
{
public:
- QRasterPaintEngineState(QRasterPaintEngineState &other);
+ QRasterPaintEngineState(const QRasterPaintEngineState &other);
QRasterPaintEngineState();
~QRasterPaintEngineState();
diff --git a/src/opengl/qopenglpaintengine.cpp b/src/opengl/qopenglpaintengine.cpp
index dbbc69a4a9d..408b1a4111e 100644
--- a/src/opengl/qopenglpaintengine.cpp
+++ b/src/opengl/qopenglpaintengine.cpp
@@ -2680,7 +2680,7 @@ QPainterState *QOpenGL2PaintEngineEx::createState(QPainterState *orig) const
return s;
}
-QOpenGL2PaintEngineState::QOpenGL2PaintEngineState(QOpenGL2PaintEngineState &other)
+QOpenGL2PaintEngineState::QOpenGL2PaintEngineState(const QOpenGL2PaintEngineState &other)
: QPainterState(other)
{
isNew = true;
diff --git a/src/opengl/qopenglpaintengine_p.h b/src/opengl/qopenglpaintengine_p.h
index df407444bef..37efa3e9fe4 100644
--- a/src/opengl/qopenglpaintengine_p.h
+++ b/src/opengl/qopenglpaintengine_p.h
@@ -54,7 +54,7 @@ class QOpenGL2PaintEngineExPrivate;
class QOpenGL2PaintEngineState : public QPainterState
{
public:
- QOpenGL2PaintEngineState(QOpenGL2PaintEngineState &other);
+ QOpenGL2PaintEngineState(const QOpenGL2PaintEngineState &other);
QOpenGL2PaintEngineState();
~QOpenGL2PaintEngineState();