diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-11 17:17:13 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-11 17:17:51 +0200 |
commit | 4dac45c9ee59ff6586d90d423654da91523ab679 (patch) | |
tree | cd4a4adf2cbc9e77bf86d2d11e71ec66afdf3be4 /src/gui/painting/qbrush.cpp | |
parent | 078cd61751aeaa310d35a3d596a21a36004a1a0f (diff) | |
parent | f44850b5c3464cdda0ee9b1ee858d95f3ffaa3e2 (diff) |
Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
Diffstat (limited to 'src/gui/painting/qbrush.cpp')
-rw-r--r-- | src/gui/painting/qbrush.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index 21e41979af..abb3268dfa 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -352,7 +352,7 @@ public: QBrushData *brush; QNullBrushData() : brush(new QBrushData) { - brush->ref.store(1); + brush->ref.storeRelaxed(1); brush->style = Qt::BrushStyle(0); brush->color = Qt::black; } @@ -411,7 +411,7 @@ void QBrush::init(const QColor &color, Qt::BrushStyle style) d.reset(new QBrushData); break; } - d->ref.store(1); + d->ref.storeRelaxed(1); d->style = style; d->color = color; } @@ -585,7 +585,7 @@ static Q_DECL_CONSTEXPR inline bool use_same_brushdata(Qt::BrushStyle lhs, Qt::B void QBrush::detach(Qt::BrushStyle newStyle) { - if (use_same_brushdata(newStyle, d->style) && d->ref.load() == 1) { + if (use_same_brushdata(newStyle, d->style) && d->ref.loadRelaxed() == 1) { d->style = newStyle; return; } @@ -625,7 +625,7 @@ void QBrush::detach(Qt::BrushStyle newStyle) x.reset(new QBrushData); break; } - x->ref.store(1); // must be first lest the QBrushDataPointerDeleter turns into a no-op + x->ref.storeRelaxed(1); // must be first lest the QBrushDataPointerDeleter turns into a no-op x->style = newStyle; x->color = d->color; x->transform = d->transform; |