diff --git a/datacontainer.cpp b/datacontainer.cpp index cb73f60d5..f77cedc4f 100644 --- a/datacontainer.cpp +++ b/datacontainer.cpp @@ -18,7 +18,6 @@ #include "datacontainer.h" -#include #include #include @@ -34,7 +33,7 @@ class DataContainer::Private {} DataEngine::Data data; - QAtomic connectCount; + int connectCount; bool dirty : 1; }; @@ -91,7 +90,7 @@ void DataContainer::checkForUpdate() void DataContainer::connectNotify(const char *signal) { if (QLatin1String(signal) == QMetaObject::normalizedSignature(SIGNAL(updated(QString, Plasma::DataEngine::Data))).constData()) { - d->connectCount.ref(); + ++d->connectCount; } } @@ -99,7 +98,7 @@ void DataContainer::disconnectNotify(const char *signal) { if (QLatin1String(signal) == QMetaObject::normalizedSignature(SIGNAL(updated(QString, Plasma::DataEngine::Data))).constData()) { if (d->connectCount > 0) { - d->connectCount.deref(); + --d->connectCount; } if (d->connectCount < 1) { diff --git a/dataengine.cpp b/dataengine.cpp index d25d6c449..8c525dedd 100644 --- a/dataengine.cpp +++ b/dataengine.cpp @@ -114,7 +114,7 @@ class DataEngine::Private updateTimer->start(0); } - QAtomic ref; + int ref; DataEngine::SourceDict sources; QQueue sourceQueue; DataEngine* engine; @@ -308,12 +308,12 @@ void DataEngine::clearSources() void DataEngine::ref() { - d->ref.ref(); + --d->ref; } void DataEngine::deref() { - d->ref.deref(); + ++d->ref; } bool DataEngine::isUsed() const