summaryrefslogtreecommitdiffstats
path: root/Source/ThirdParty/leveldb/port/port_qt.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/ThirdParty/leveldb/port/port_qt.h')
-rw-r--r--Source/ThirdParty/leveldb/port/port_qt.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/ThirdParty/leveldb/port/port_qt.h b/Source/ThirdParty/leveldb/port/port_qt.h
index cc8db5fe8..556e00368 100644
--- a/Source/ThirdParty/leveldb/port/port_qt.h
+++ b/Source/ThirdParty/leveldb/port/port_qt.h
@@ -20,8 +20,7 @@
#ifndef STORAGE_LEVELDB_PORT_PORT_QT_H_
#define STORAGE_LEVELDB_PORT_PORT_QT_H_
-#include <QAtomicInteger>
-#include <QAtomicPointer>
+#include <QtCore/qatomic.h>
#include <QMutex>
#include <QWaitCondition>
@@ -34,6 +33,8 @@
#ifdef Q_CC_MSVC
#include "win/stdint.h"
#define snprintf _snprintf
+#else
+#include <stdint.h>
#endif
namespace leveldb {
@@ -61,7 +62,12 @@ private:
Mutex* m_mutex;
};
+#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
typedef QAtomicInteger<int> OnceType;
+#else
+typedef QAtomicInt OnceType;
+#endif
+
#define LEVELDB_ONCE_INIT 0
inline void InitOnce(port::OnceType* once, void (*initializer)())
{