summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-12-09 10:13:48 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-09 10:13:48 +0100
commit25b390256bf2a699231a165e49f4100262ed29ac (patch)
tree4c3c3cc8dbbe1a523edb26aefd29c22da8732e1f /src/corelib/global
parentbcf346a76659f896a25f31aa44f64ba5f28ba8e1 (diff)
parentf6dbdd9c16166f345fd5743886229192c97c2c4f (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qglobal.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index f72d27c2e5..041b522023 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -76,7 +76,7 @@
#include <CoreServices/CoreServices.h>
#endif
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#include <private/qjni_p.h>
#endif
@@ -2400,7 +2400,7 @@ typedef uint SeedStorageType;
typedef QThreadStorage<SeedStorageType *> SeedStorage;
Q_GLOBAL_STATIC(SeedStorage, randTLS) // Thread Local Storage for seed value
-#elif defined(Q_OS_ANDROID)
+#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
typedef QThreadStorage<QJNIObjectPrivate> AndroidRandomStorage;
Q_GLOBAL_STATIC(AndroidRandomStorage, randomTLS)
#endif
@@ -2436,7 +2436,7 @@ void qsrand(uint seed)
//global static object, fallback to srand(seed)
srand(seed);
}
-#elif defined(Q_OS_ANDROID)
+#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
if (randomTLS->hasLocalData()) {
randomTLS->localData().callMethod<void>("setSeed", "(J)V", jlong(seed));
return;
@@ -2492,7 +2492,7 @@ int qrand()
//global static object, fallback to rand()
return rand();
}
-#elif defined(Q_OS_ANDROID)
+#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
AndroidRandomStorage *randomStorage = randomTLS();
if (!randomStorage)
return rand();