summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-12-09 16:22:06 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-02-01 17:21:50 (GMT)
commit55ca7d36d35c8ecac27b6866f40a5f2de799debd (patch)
tree9874492063adcedc8e29104ed0fb8b0e4490b46a /qmake
parentbbe1a089c43f0b706d33bb08fbeae256b6e34d30 (diff)
downloadQt-55ca7d36d35c8ecac27b6866f40a5f2de799debd.zip
Qt-55ca7d36d35c8ecac27b6866f40a5f2de799debd.tar.gz
Qt-55ca7d36d35c8ecac27b6866f40a5f2de799debd.tar.bz2
qmake: use isActiveConfig() instead of hand-crafting comparisons
ensures consistent handling of CONFIG values. this is incompatible with 4.6.1, as it removes case-insentitivity from some of the config keys, but those pro files wouldn't be portable beyond symbian anyway, and symbian compatibility guarantees start with 4.6.2. Reviewed-by: mariusSO
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/symbian/symmake.cpp26
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp2
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp2
3 files changed, 15 insertions, 15 deletions
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 20e2d0e..63676d1 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -261,7 +261,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
writeMmpFile(mmpFilename, symbianLangCodes);
if (targetType == TypeExe) {
- if (!project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) {
+ if (!project->isActiveConfig("no_icon")) {
writeRegRssFile(userRssRules);
writeRssFile(numberOfIcons, iconFile);
writeLocFile(symbianLangCodes);
@@ -375,7 +375,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme
.arg(exeFile) << endl;
// deploy rsc & reg_rsc file
- if (!project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) {
+ if (!project->isActiveConfig("no_icon")) {
t << QString("\"%1epoc32/data/z/resource/apps/%2\" - \"%3\\%4\"")
.arg(epocRoot())
.arg(fixedTarget + ".rsc")
@@ -444,7 +444,7 @@ bool SymbianMakefileGenerator::containsStartWithItem(const QChar &c, const QStri
void SymbianMakefileGenerator::writeCustomDefFile()
{
- if (targetType == TypePlugin && !project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) {
+ if (targetType == TypePlugin && !project->isActiveConfig("stdbinary")) {
// Create custom def file for plugin
QFile ft(QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL));
@@ -509,9 +509,9 @@ void SymbianMakefileGenerator::init()
targetType = TypeExe;
else if ((project->values("TEMPLATE")).contains("lib")) {
// Check CONFIG to see if we are to build staticlib or dll
- if (project->values("CONFIG").contains("staticlib") || project->values("CONFIG").contains("static"))
+ if (project->isActiveConfig("staticlib") || project->isActiveConfig("static"))
targetType = TypeLib;
- else if (project->values("CONFIG").contains("plugin"))
+ else if (project->isActiveConfig("plugin"))
targetType = TypePlugin;
else
targetType = TypeDll;
@@ -521,7 +521,7 @@ void SymbianMakefileGenerator::init()
if (0 != project->values("TARGET.UID2").size()) {
uid2 = project->first("TARGET.UID2");
- } else if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) {
+ } else if (project->isActiveConfig("stdbinary")) {
uid2 = "0x20004C45";
} else {
if (targetType == TypeExe) {
@@ -788,7 +788,7 @@ void SymbianMakefileGenerator::writeMmpFile(QString &filename, QStringList &symb
}
t << endl;
- if (!project->values("CONFIG").contains("static") && !project->values("CONFIG").contains("staticlib")) {
+ if (!project->isActiveConfig("static") && !project->isActiveConfig("staticlib")) {
writeMmpFileLibraryPart(t);
}
@@ -841,7 +841,7 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t)
if (targetType == TypeExe) {
t << MMP_TARGET "\t\t" << fixedTarget << ".exe" << endl;
if (!skipTargetType) {
- if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive))
+ if (project->isActiveConfig("stdbinary"))
t << MMP_TARGETTYPE "\t\tSTDEXE" << endl;
else
t << MMP_TARGETTYPE "\t\tEXE" << endl;
@@ -849,7 +849,7 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t)
} else if (targetType == TypeDll || targetType == TypePlugin) {
t << MMP_TARGET "\t\t" << fixedTarget << ".dll" << endl;
if (!skipTargetType) {
- if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive))
+ if (project->isActiveConfig("stdbinary"))
t << MMP_TARGETTYPE "\t\tSTDDLL" << endl;
else
t << MMP_TARGETTYPE "\t\tDLL" << endl;
@@ -857,7 +857,7 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t)
} else if (targetType == TypeLib) {
t << MMP_TARGET "\t\t" << fixedTarget << ".lib" << endl;
if (!skipTargetType) {
- if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive))
+ if (project->isActiveConfig("stdbinary"))
t << MMP_TARGETTYPE "\t\tSTDLIB" << endl;
else
t << MMP_TARGETTYPE "\t\tLIB" << endl;
@@ -893,7 +893,7 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t)
if (0 != project->values("TARGET.EPOCALLOWDLLDATA").size())
t << MMP_EPOCALLOWDLLDATA << endl;
- if (targetType == TypePlugin && !project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) {
+ if (targetType == TypePlugin && !project->isActiveConfig("stdbinary")) {
// Use custom def file for Qt plugins
t << "DEFFILE " PLUGIN_COMMON_DEF_FILE_FOR_MMP << endl;
}
@@ -909,7 +909,7 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t)
void SymbianMakefileGenerator::writeMmpFileResourcePart(QTextStream& t, QStringList &symbianLangCodes)
{
if ((targetType == TypeExe) &&
- !project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) {
+ !project->isActiveConfig("no_icon")) {
QString locTarget = fixedTarget;
locTarget.append(".rss");
@@ -1267,7 +1267,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
// Add project mmps and old style extension makefiles
QString mmpTag;
- if (project->values("CONFIG").contains("symbian_test", Qt::CaseInsensitive))
+ if (project->isActiveConfig("symbian_test"))
mmpTag = QLatin1String(BLD_INF_TAG_TESTMMPFILES);
else
mmpTag = QLatin1String(BLD_INF_TAG_MMPFILES);
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index d1e63cb..033bcbe 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -172,7 +172,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
releasePlatforms.removeAll("winscw"); // No release for emulator
QString testClause;
- if (project->values("CONFIG").contains("symbian_test", Qt::CaseInsensitive))
+ if (project->isActiveConfig("symbian_test"))
testClause = QLatin1String(" test");
else
testClause = QLatin1String("");
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 5adf30d..e081b19 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -106,7 +106,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
releasePlatforms.removeAll("winscw"); // No release for emulator
QString testClause;
- if (project->values("CONFIG").contains("symbian_test", Qt::CaseInsensitive))
+ if (project->isActiveConfig("symbian_test"))
testClause = QLatin1String(".test");
else
testClause = QLatin1String("");