implement actual evaluation of conditions.

without that, the auto-included highly complex files from mkspecs/ make
it spew out oodles of warnings.
by default, the user-provided files are still scanned in "cumulative"
mode (ignoring conditionals), so we collect as many files as possible.
(ported from qt)
This commit is contained in:
Oswald Buddenhagen
2008-12-12 18:10:42 +01:00
parent da34885420
commit dcb96227ab
3 changed files with 160 additions and 82 deletions

View File

@@ -132,17 +132,20 @@ static void unquote(QString *string)
}
static void insertUnique(QHash<QString, QStringList> *map,
const QString &key, const QStringList &value, bool unique = true)
const QString &key, const QStringList &value)
{
QStringList &sl = (*map)[key];
if (!unique) {
sl += value;
} else {
for (int i = 0; i < value.count(); ++i) {
if (!sl.contains(value.at(i)))
sl.append(value.at(i));
}
}
foreach (const QString &str, value)
if (!sl.contains(str))
sl.append(str);
}
static void removeEach(QHash<QString, QStringList> *map,
const QString &key, const QStringList &value)
{
QStringList &sl = (*map)[key];
foreach (const QString &str, value)
sl.removeAll(str);
}
/*