diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-10-19 10:07:40 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-10-19 10:07:40 (GMT) |
commit | 29495592d27505feff024d574e1333809794c304 (patch) | |
tree | 3883618895e2ec78a1b10c5a0e31974f88d03051 | |
parent | 72bf6105214bfc26cff33632f7f4bdeed9cdf362 (diff) | |
download | Qt-29495592d27505feff024d574e1333809794c304.zip Qt-29495592d27505feff024d574e1333809794c304.tar.gz Qt-29495592d27505feff024d574e1333809794c304.tar.bz2 |
Use QBasicAtomicInt as a static variable
QAtomicInt has a constructor, so QBasicAtomicInt needs to be used
instead to allow compile time initialisation.
Task-Number: QTBUG-20343
Reviewed-By: Olivier Goffart
-rw-r--r-- | src/network/access/qnetworkaccessbackend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp index 88c45d1..1dc1268 100644 --- a/src/network/access/qnetworkaccessbackend.cpp +++ b/src/network/access/qnetworkaccessbackend.cpp @@ -72,10 +72,10 @@ public: QMutex mutex; //this is used to avoid (re)constructing factory data from destructors of other global classes - static QAtomicInt valid; + static QBasicAtomicInt valid; }; Q_GLOBAL_STATIC(QNetworkAccessBackendFactoryData, factoryData) -QAtomicInt QNetworkAccessBackendFactoryData::valid; +QBasicAtomicInt QNetworkAccessBackendFactoryData::valid = Q_BASIC_ATOMIC_INITIALIZER(0); QNetworkAccessBackendFactory::QNetworkAccessBackendFactory() { |