summaryrefslogtreecommitdiffstats
path: root/qmake/project.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-04-23 19:27:43 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-27 14:35:30 +0200
commit2ca26162f8348719ee04e63b4e80be8b5131521d (patch)
treed17f1259e20dcec87dc8db91719c80bae4a053ff /qmake/project.cpp
parenta54875057f3292799f1d9211ded7b7eb19ef3a39 (diff)
repurpose deprecated -E switch
instead of dumping the variables as we are going, dump everything at the end. this is potentially useful, as opposed to the previous functionality which was redundant with -d. Change-Id: Icf14703cb93e03f7079dfc0266b219ad9c902133 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r--qmake/project.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 80e95f392a..c2558cccf6 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1128,14 +1128,6 @@ QMakeProject::parse(const QString &t, QHash<QString, QStringList> &place, int nu
doVariableReplace(var, place);
var = varMap(var); //backwards compatibility
- if(!var.isEmpty() && Option::mkfile::do_preprocess) {
- static QString last_file("*none*");
- if(parser.file != last_file) {
- fprintf(stdout, "#file %s:%d\n", parser.file.toLatin1().constData(), parser.line_no);
- last_file = parser.file;
- }
- fprintf(stdout, "%s %s %s\n", var.toLatin1().constData(), op.toLatin1().constData(), vals.toLatin1().constData());
- }
if(vals.contains('=') && numLines > 1)
warn_msg(WarnParser, "Possible accidental line continuation: {%s} at %s:%d",
@@ -1850,10 +1842,6 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
} else if (!QFile::exists(file)) {
return IncludeNoExist;
}
- if(Option::mkfile::do_preprocess) //nice to see this first..
- fprintf(stderr, "#switching file %s(%s) - %s:%d\n", (flags & IncludeFlagFeature) ? "load" : "include",
- file.toLatin1().constData(),
- parser.file.toLatin1().constData(), parser.line_no);
debug_msg(1, "Project Parser: %s'ing file %s.", (flags & IncludeFlagFeature) ? "load" : "include",
file.toLatin1().constData());
@@ -3781,4 +3769,21 @@ bool QMakeProject::isEmpty(const QString &v) const
return it == vars.constEnd() || it->isEmpty();
}
+void
+QMakeProject::dump() const
+{
+ QStringList out;
+ for (QHash<QString, QStringList>::ConstIterator it = vars.begin(); it != vars.end(); ++it) {
+ if (!it.key().startsWith('.')) {
+ QString str = it.key() + " =";
+ foreach (const QString &v, it.value())
+ str += ' ' + quoteValue(v);
+ out << str;
+ }
+ }
+ out.sort();
+ foreach (const QString &v, out)
+ puts(qPrintable(v));
+}
+
QT_END_NAMESPACE