summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-26 19:20:47 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-26 19:20:47 (GMT)
commitef4c65fc364a0262389c0497092a0fa5e1f7d4c3 (patch)
tree751e2fc44b4fb25946d8358d3d3651213305a29a
parent73979fe4e47a873e2075e60e58c6b54ee6992c38 (diff)
parent26103b69df9bdd32016f3fbab975a26c8a147ea0 (diff)
downloadQt-ef4c65fc364a0262389c0497092a0fa5e1f7d4c3.zip
Qt-ef4c65fc364a0262389c0497092a0fa5e1f7d4c3.tar.gz
Qt-ef4c65fc364a0262389c0497092a0fa5e1f7d4c3.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Added support for DEPLOYMENT.pkg_build_version fix for memory leak in QSysInfo::s60Version()
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp14
-rw-r--r--src/corelib/global/qglobal.cpp2
2 files changed, 15 insertions, 1 deletions
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index d124b02..155dbc9 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -275,6 +275,20 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
if (success)
applicationVersion = QString("%1,%2,%3").arg(major).arg(minor).arg(patch);
+ // Append package build version number if it is set
+ QString pkgBuildVersion = project->first("DEPLOYMENT.pkg_build_version");
+ if (!pkgBuildVersion.isEmpty()) {
+ success = false;
+ uint build = pkgBuildVersion.toUInt(&success);
+ if (success && build < 100) {
+ if (pkgBuildVersion.size() == 1)
+ pkgBuildVersion.prepend(QLatin1Char('0'));
+ applicationVersion.append(pkgBuildVersion);
+ } else {
+ fprintf(stderr, "Warning: Invalid DEPLOYMENT.pkg_build_version (%s), must be a number between 0 - 99\n", qPrintable(pkgBuildVersion));
+ }
+ }
+
// Package header
QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n";
QString visualTarget = generator->escapeFilePath(project->first("TARGET"));
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index af35316..401af85 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1828,6 +1828,7 @@ QSysInfo::S60Version QSysInfo::s60Version()
CDir* contents;
TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_S60SystemInstallDir, contents);
if (err == KErrNone) {
+ QScopedPointer<CDir> contentsDeleter(contents);
err = contents->Sort(EDescending|ESortByName);
if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 12) {
TInt major = (*contents)[0].iName[9] - '0';
@@ -1850,7 +1851,6 @@ QSysInfo::S60Version QSysInfo::s60Version()
}
}
}
- delete contents;
}
# ifdef Q_CC_NOKIAX86