diff options
author | aavit <eirik.aavitsland@digia.com> | 2013-11-11 11:04:16 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-05 14:34:37 +0100 |
commit | 0a1cb466df071d9ae4fb73b6ba981afc675a173c (patch) | |
tree | 872b06f3f363026cf98f2a87f4e60428e5e5bc91 | |
parent | bf246e6c28be88ea71220d8812fdfbb414f070f5 (diff) |
Fix compilation for embedded Android
Change-Id: If42fd83a68543d59b5a3a6b89e2c402aa452b251
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
-rw-r--r-- | src/corelib/global/qglobal.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 0c72bd7022..a648949d26 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 @@ -2387,7 +2387,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 @@ -2423,7 +2423,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; @@ -2479,7 +2479,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(); |