summaryrefslogtreecommitdiffstats
path: root/qmake/generators/symbian
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-20 03:48:01 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-20 03:48:01 (GMT)
commit09b3ebb0693a7c1449bfb86885c13deca71d98b1 (patch)
tree3e31e66956330554b669b2e8bbbd70a0a589996c /qmake/generators/symbian
parent0579ebd898f4e208ce0bd4c332d71eb878c5059f (diff)
parentecd5b132929c5e4d43aa7409ef4ff2c22037b4f8 (diff)
downloadQt-09b3ebb0693a7c1449bfb86885c13deca71d98b1.zip
Qt-09b3ebb0693a7c1449bfb86885c13deca71d98b1.tar.gz
Qt-09b3ebb0693a7c1449bfb86885c13deca71d98b1.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging: Increased EPOCHEAPSIZE for qpainter benchmark Increased EPOCHEAPSIZE for few benchmarks Update Symbian DEF-files Improve DEFINES crossplatform compatibility in Symbian builds. Freezing the QtCore defs again for 4.8.
Diffstat (limited to 'qmake/generators/symbian')
-rw-r--r--qmake/generators/symbian/symmake.cpp25
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp21
2 files changed, 42 insertions, 4 deletions
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 8bf2176..bdba329 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -574,7 +574,30 @@ void SymbianMakefileGenerator::writeMmpFileMacrosPart(QTextStream& t)
void SymbianMakefileGenerator::addMacro(QTextStream& t, const QString& value)
{
- t << "MACRO\t\t" << value << endl;
+ // String macros for Makefile based platforms are defined like this in pro files:
+ //
+ // DEFINES += VERSION_STRING=\\\"1.2.3\\\"
+ //
+ // This will not work in *.mmp files, which don't need double escaping, and
+ // will therefore result in a VERSION_STRING value of \"1.2.3\" instead of "1.2.3".
+ // Improve cross platform support by removing one level of escaping from all
+ // DEFINES values.
+ static QChar backslash = QLatin1Char('\\');
+ QString fixedValue;
+ fixedValue.reserve(value.size());
+ int pos = 0;
+ int prevPos = 0;
+ while (pos < value.size()) {
+ if (value.at(pos) == backslash) {
+ fixedValue += value.mid(prevPos, pos - prevPos);
+ pos++;
+ prevPos = pos;
+ }
+ pos++;
+ }
+ fixedValue += value.mid(prevPos);
+
+ t << "MACRO\t\t" << fixedValue << endl;
}
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 84236f1..78a9024 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -569,12 +569,27 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
exportFlm();
// Parse extra compilers data
+ QStringList rawDefines;
QStringList defines;
QStringList incPath;
- defines << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ")
- << varGlue("QMAKE_COMPILER_DEFINES", "-D", "-D", " ")
- << varGlue("DEFINES","-D"," -D","");
+ rawDefines << project->values("PRL_EXPORT_DEFINES")
+ << project->values("QMAKE_COMPILER_DEFINES")
+ << project->values("DEFINES");
+
+ // Remove defines containing doubly-escaped characters (e.g. escaped double-quotation mark
+ // inside a string define) as bld.inf parsing done by sbsv2 toolchain breaks if they are
+ // present.
+ static QString backslashes = QLatin1String("\\\\");
+ QMutableStringListIterator i(rawDefines);
+ while (i.hasNext()) {
+ QString val = i.next();
+ if (val.indexOf(backslashes) != -1)
+ i.remove();
+ }
+
+ defines << valGlue(rawDefines,"-D"," -D","");
+
for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {