summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-11-22 12:08:39 +0100
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-12-03 13:48:03 +0100
commitf424c3460f135aee2facc111869b678d65f125a6 (patch)
tree8c564cff93c6dfb2f3793dbaae4842837c3fe7df
parent3f517783d4ce31f970e6e1f2d4ff5add9073da3d (diff)
fix misleading uppercasing deprecation warning
don't complain about uppercasing in the function's name if the real problem is that it's not defined at all. this is also slighly more efficient, as we try to lowercase only as a fallback now. Reviewed-by: joerg
-rw-r--r--qmake/project.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 2586c575e2..d967a63a18 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1813,11 +1813,10 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
for(int i = 0; i < args_list.size(); ++i)
args += args_list[i].join(QString(Option::field_sep));
- QString lfunc = func.toLower();
- if (!lfunc.isSharedWith(func))
+ ExpandFunc func_t = qmake_expandFunctions().value(func);
+ if (!func_t && (func_t = qmake_expandFunctions().value(func.toLower())))
warn_msg(WarnDeprecated, "%s:%d: Using uppercased builtin functions is deprecated.",
parser.file.toLatin1().constData(), parser.line_no);
- ExpandFunc func_t = qmake_expandFunctions().value(lfunc);
debug_msg(1, "Running project expand: %s(%s) [%d]",
func.toLatin1().constData(), args.join("::").toLatin1().constData(), func_t);