Commit b78cc083 authored by Craig Watson's avatar Craig Watson

Added loadAcquire() to get int value of QAtomicInt variables. (Was previously...

Added loadAcquire() to get int value of QAtomicInt variables. (Was previously done automatically with the operatorint() of QAtomicInt)
parent 4a7854e0
...@@ -64,7 +64,7 @@ void UBSpinningWheel::paintEvent(QPaintEvent *event) ...@@ -64,7 +64,7 @@ void UBSpinningWheel::paintEvent(QPaintEvent *event)
pen.setCapStyle(Qt::RoundCap); pen.setCapStyle(Qt::RoundCap);
painter.setPen(pen); painter.setPen(pen);
painter.rotate(30 * (mPosition % 12)); painter.rotate(30 * (mPosition.loadAcquire() % 12));
for(int i = 0; i < 12; i++) for(int i = 0; i < 12; i++)
{ {
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <QFile> #include <QFile>
#include <QDesktopWidget>
#include "PDFRenderer.h" #include "PDFRenderer.h"
...@@ -97,7 +98,7 @@ void PDFRenderer::attach() ...@@ -97,7 +98,7 @@ void PDFRenderer::attach()
void PDFRenderer::detach() void PDFRenderer::detach()
{ {
mRefCount.deref(); mRefCount.deref();
if (mRefCount == 0) if (mRefCount.loadAcquire() == 0)
{ {
sRenderers.remove(mFileUuid); sRenderers.remove(mFileUuid);
delete this; delete this;
......
...@@ -66,7 +66,7 @@ XPDFRenderer::~XPDFRenderer() ...@@ -66,7 +66,7 @@ XPDFRenderer::~XPDFRenderer()
sInstancesCount.deref(); sInstancesCount.deref();
} }
if (sInstancesCount == 0 && globalParams) if (sInstancesCount.loadAcquire() == 0 && globalParams)
{ {
delete globalParams; delete globalParams;
globalParams = 0; globalParams = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment