summaryrefslogtreecommitdiffstats
path: root/qmake/project.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-03-01 18:49:20 +0100
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-19 16:39:55 +0200
commitade089907b01288fa7ef1dc1b3bad592fdb61863 (patch)
tree1c2226ed8bdc6ebf20e14f63da8a1d9ae9be276e /qmake/project.cpp
parent1388199d4ff041cbd382acf754edbfdb3d8da8a7 (diff)
add $$enumerate_vars() function
this simply returns the keys of all variables in the context. Change-Id: I0092f827744fcd257dfb9e7ca664c87c6f1cc763 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r--qmake/project.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 0df2169ad8..85ba72acb9 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -81,7 +81,7 @@ enum ExpandFunc { E_MEMBER=1, E_FIRST, E_LAST, E_CAT, E_FROMFILE, E_EVAL, E_LIST
E_SPRINTF, E_JOIN, E_SPLIT, E_BASENAME, E_DIRNAME, E_SECTION,
E_FIND, E_SYSTEM, E_UNIQUE, E_QUOTE, E_ESCAPE_EXPAND,
E_UPPER, E_LOWER, E_FILES, E_PROMPT, E_RE_ESCAPE, E_REPLACE,
- E_SIZE, E_SORT_DEPENDS, E_RESOLVE_DEPENDS };
+ E_SIZE, E_SORT_DEPENDS, E_RESOLVE_DEPENDS, E_ENUMERATE_VARS };
QHash<QString, ExpandFunc> qmake_expandFunctions()
{
static QHash<QString, ExpandFunc> *qmake_expand_functions = 0;
@@ -115,6 +115,7 @@ QHash<QString, ExpandFunc> qmake_expandFunctions()
qmake_expand_functions->insert("size", E_SIZE);
qmake_expand_functions->insert("sort_depends", E_SORT_DEPENDS);
qmake_expand_functions->insert("resolve_depends", E_RESOLVE_DEPENDS);
+ qmake_expand_functions->insert("enumerate_vars", E_ENUMERATE_VARS);
}
return *qmake_expand_functions;
}
@@ -2477,6 +2478,9 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
}
}
break; }
+ case E_ENUMERATE_VARS:
+ ret += place.keys();
+ break;
default: {
fprintf(stderr, "%s:%d: Unknown replace function: %s\n",
parser.file.toLatin1().constData(), parser.line_no,