summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainterpath_p.h
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-02-25 14:11:40 +0100
committerQt CI Bot <qt_ci_bot@qt-project.org>2021-03-03 21:18:38 +0000
commit0eca1f4a4681b03792f6c3008dd6daf3aa9abedd (patch)
tree682972347aa66657ec236fda07a4885bfeb4e26c /src/gui/painting/qpainterpath_p.h
parent7b3883614d23235f47df632d82b29b52fb521fa1 (diff)
parent1086d9a5720101c11e9668cc0b5e213d77379e5c (diff)
Merge "Port some value classes away from QScopedPointer"
Diffstat (limited to 'src/gui/painting/qpainterpath_p.h')
-rw-r--r--src/gui/painting/qpainterpath_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qpainterpath_p.h b/src/gui/painting/qpainterpath_p.h
index 24feaf410b..92d0853ba0 100644
--- a/src/gui/painting/qpainterpath_p.h
+++ b/src/gui/painting/qpainterpath_p.h
@@ -55,6 +55,7 @@
#include "QtGui/qpainterpath.h"
#include "QtGui/qregion.h"
#include "QtCore/qlist.h"
+#include "QtCore/qshareddata.h"
#include "QtCore/qvarlengtharray.h"
#include <qdebug.h>
@@ -128,7 +129,7 @@ private:
Q_DISABLE_COPY_MOVE(QVectorPathConverter)
};
-class QPainterPathPrivate
+class QPainterPathPrivate : public QSharedData
{
public:
friend class QPainterPath;
@@ -143,7 +144,7 @@ public:
#endif
QPainterPathPrivate() noexcept
- : ref(1),
+ : QSharedData(),
cStart(0),
fillRule(Qt::OddEvenFill),
require_moveTo(false),
@@ -155,7 +156,7 @@ public:
}
QPainterPathPrivate(const QPainterPathPrivate &other) noexcept
- : ref(1),
+ : QSharedData(other),
elements(other.elements),
cStart(other.cStart),
fillRule(other.fillRule),
@@ -184,7 +185,6 @@ public:
}
private:
- QAtomicInt ref;
QList<QPainterPath::Element> elements;
int cStart;