diff options
author | con <qtc-committer@nokia.com> | 2009-02-19 12:42:32 +0100 |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2009-02-19 12:42:32 +0100 |
commit | d1edc2a2fa9fb3d8d230e25c966869e43e5f217d (patch) | |
tree | c58e0d02aed66ee6f1198a5abba209a1a1ed9739 | |
parent | e863c9bd9eb8907df71e56cf978fff5b6a4fa049 (diff) | |
download | qt-creator-d1edc2a2fa9fb3d8d230e25c966869e43e5f217d.tar.gz |
Fixes: - Console application doesn't start on Mac
Task: - 244263
RevBy: - dt
-rw-r--r-- | src/shared/proparser/profileevaluator.cpp | 10 | ||||
-rw-r--r-- | src/shared/proparser/proparserutils.h | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index c54b75a1e2..8795b97d5b 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -768,11 +768,15 @@ bool ProFileEvaluator::Private::visitProValue(ProValue *value) case ProVariable::RemoveOperator: // -= if (!m_cumulative) { if (!m_skipLevel) { - removeEach(&m_valuemap, varName, v); - removeEach(&m_filevaluemap[currentProFile()], varName, v); + // the insertUnique is a hack for the moment to fix the + // CONFIG -= app_bundle problem on Mac (add it to a variable -CONFIG as was done before) + if (removeEach(&m_valuemap, varName, v) == 0) + insertUnique(&m_valuemap, QString("-%1").arg(varName), v); + if (removeEach(&m_filevaluemap[currentProFile()], varName, v) == 0) + insertUnique(&m_filevaluemap[currentProFile()], QString("-%1").arg(varName), v); } } else if (!m_skipLevel) { - // this is a hack for the moment to fix the + // the insertUnique is a hack for the moment to fix the // CONFIG -= app_bundle problem on Mac (add it to a variable -CONFIG as was done before) insertUnique(&m_valuemap, QString("-%1").arg(varName), v); insertUnique(&m_filevaluemap[currentProFile()], QString("-%1").arg(varName), v); diff --git a/src/shared/proparser/proparserutils.h b/src/shared/proparser/proparserutils.h index 7c751c9c27..41c62c8819 100644 --- a/src/shared/proparser/proparserutils.h +++ b/src/shared/proparser/proparserutils.h @@ -140,12 +140,14 @@ static void insertUnique(QHash<QString, QStringList> *map, sl.append(str); } -static void removeEach(QHash<QString, QStringList> *map, +static int removeEach(QHash<QString, QStringList> *map, const QString &key, const QStringList &value) { + int count = 0; QStringList &sl = (*map)[key]; foreach (const QString &str, value) - sl.removeAll(str); + count += sl.removeAll(str); + return count; } /* |