summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2009-09-25 10:48:08 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2009-09-25 10:48:08 (GMT)
commit165767d7ca890e9da9c660034fd76393fe7e87e1 (patch)
tree9d7fc5696fa8f4aeb300ac719da81e3febb4fd98 /src/corelib/global
parent29234e97ad6187f9f7625ef75baaf43a05eeafad (diff)
downloadQt-165767d7ca890e9da9c660034fd76393fe7e87e1.zip
Qt-165767d7ca890e9da9c660034fd76393fe7e87e1.tar.gz
Qt-165767d7ca890e9da9c660034fd76393fe7e87e1.tar.bz2
Changed S60 version check to do runtime check also in emulator.
S60 version check for emulator was hardcoded, which caused problems for users of our binary packages, which deploy same binaries to all environments. Changed the check to look for platform .sis files also in emulator and use the hardcoded version only as a fallback option for those SDKs that do not provide these files. Task-number: QTBUG-4579 Reviewed-by: axis
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qglobal.cpp34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 4974acf..97362af 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1769,25 +1769,6 @@ static QSysInfo::S60Version cachedS60Version = QSysInfo::S60Version(-1);
QSysInfo::S60Version QSysInfo::s60Version()
{
-# ifdef Q_CC_NOKIAX86
- // For emulator builds. Emulators don't support the trick we use to figure
- // out which SDK we are running under, so simply hardcode it there.
-# if defined(__SERIES60_31__)
- return SV_S60_3_1;
-
-# elif defined(__S60_32__)
- return SV_S60_3_2;
-
-# elif defined(__S60_50__)
- return SV_S60_5_0;
-
-# else
- return SV_S60_Unknown;
-
-# endif
-
-# else
- // For hardware builds.
if (cachedS60Version != -1)
return cachedS60Version;
@@ -1818,6 +1799,19 @@ QSysInfo::S60Version QSysInfo::s60Version()
delete contents;
}
+# ifdef Q_CC_NOKIAX86
+ // Some emulator environments may not contain the version specific .sis files, so
+ // simply hardcode the version on those environments.
+# if defined(__SERIES60_31__)
+ return cachedS60Version = SV_S60_3_1;
+# elif defined(__S60_32__)
+ return cachedS60Version = SV_S60_3_2;
+# elif defined(__S60_50__)
+ return cachedS60Version = SV_S60_5_0;
+# else
+ return cachedS60Version = SV_S60_Unknown;
+# endif
+# else
return cachedS60Version = SV_S60_Unknown;
# endif
}
@@ -2718,7 +2712,7 @@ int qrand()
\since 4.6
\brief The QT_TRID_NOOP macro marks an id for dynamic translation.
-
+
The only purpose of this macro is to provide an anchor for attaching
meta data like to qtTrId().