From e277575987657aa07444eea9bee99769f039d3b0 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 31 Oct 2011 10:36:57 +0100 Subject: Fix most warnings about assignments of QAtomicInt. Change-Id: Ide409d72d2637b68ec2a85aaca4bc783a7e911e7 Reviewed-by: Bradley T. Hughes --- src/gui/painting/qpainterpath.h | 3 +++ src/gui/painting/qpainterpath_p.h | 4 +--- src/gui/painting/qpen.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/painting') diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h index 9dc435f630..a558abca3d 100644 --- a/src/gui/painting/qpainterpath.h +++ b/src/gui/painting/qpainterpath.h @@ -249,6 +249,9 @@ public: friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QPainterPath &); friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPainterPath &); #endif + + QPainterPathPrivate() : ref(1) {} + private: QAtomicInt ref; QVector elements; diff --git a/src/gui/painting/qpainterpath_p.h b/src/gui/painting/qpainterpath_p.h index 93cc11c8ee..8d5bd7310f 100644 --- a/src/gui/painting/qpainterpath_p.h +++ b/src/gui/painting/qpainterpath_p.h @@ -148,13 +148,12 @@ public: dirtyControlBounds(false), pathConverter(0) { - ref = 1; require_moveTo = false; convex = false; } QPainterPathData(const QPainterPathData &other) : - QPainterPathPrivate(), cStart(other.cStart), fillRule(other.fillRule), + cStart(other.cStart), fillRule(other.fillRule), bounds(other.bounds), controlBounds(other.controlBounds), dirtyBounds(other.dirtyBounds), @@ -162,7 +161,6 @@ public: convex(other.convex), pathConverter(0) { - ref = 1; require_moveTo = false; elements = other.elements; } diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp index 5a4582e31e..5358239014 100644 --- a/src/gui/painting/qpen.cpp +++ b/src/gui/painting/qpen.cpp @@ -358,7 +358,7 @@ void QPen::detach() QPenData *x = new QPenData(*static_cast(d)); if (!d->ref.deref()) delete d; - x->ref = 1; + x->ref.store(1); d = x; } -- cgit v1.2.3