summaryrefslogtreecommitdiffstats
path: root/qmake/project.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-04-20 15:37:25 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-19 16:39:56 +0200
commitf97913f2da5b4c46056b7d16ca30a3ae7874bbf7 (patch)
tree279bee0ac0354393f131bd4fd5780ef08f237f7f /qmake/project.cpp
parent1261c9b2f483a63894f629cc0400970bd036239d (diff)
add $$clean_path() function
just QDir::cleanPath() Change-Id: I2d51e2385939d8926c00f296537ab7f6757d9a79 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r--qmake/project.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 24ea3a0257..88d55aef7f 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -82,7 +82,7 @@ enum ExpandFunc { E_MEMBER=1, E_FIRST, E_LAST, E_CAT, E_FROMFILE, E_EVAL, E_LIST
E_FIND, E_SYSTEM, E_UNIQUE, E_QUOTE, E_ESCAPE_EXPAND,
E_UPPER, E_LOWER, E_FILES, E_PROMPT, E_RE_ESCAPE, E_VAL_ESCAPE, E_REPLACE,
E_SIZE, E_SORT_DEPENDS, E_RESOLVE_DEPENDS, E_ENUMERATE_VARS,
- E_SHADOWED };
+ E_SHADOWED, E_CLEAN_PATH };
QHash<QString, ExpandFunc> qmake_expandFunctions()
{
static QHash<QString, ExpandFunc> *qmake_expand_functions = 0;
@@ -120,6 +120,7 @@ QHash<QString, ExpandFunc> qmake_expandFunctions()
qmake_expand_functions->insert("resolve_depends", E_RESOLVE_DEPENDS);
qmake_expand_functions->insert("enumerate_vars", E_ENUMERATE_VARS);
qmake_expand_functions->insert("shadowed", E_SHADOWED);
+ qmake_expand_functions->insert("clean_path", E_CLEAN_PATH);
}
return *qmake_expand_functions;
}
@@ -2576,6 +2577,13 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
else if (val.startsWith(Option::mkfile::source_root))
ret += Option::mkfile::build_root + val.mid(Option::mkfile::source_root.length());
break; }
+ case E_CLEAN_PATH:
+ if (args.count() != 1)
+ fprintf(stderr, "%s:%d clean_path(path) requires one argument.\n",
+ parser.file.toLatin1().constData(), parser.line_no);
+ else
+ ret += QDir::cleanPath(args.at(0));
+ break;
default: {
fprintf(stderr, "%s:%d: Unknown replace function: %s\n",
parser.file.toLatin1().constData(), parser.line_no,