summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-07-11 17:44:27 +0200
committerQt by Nokia <qt-info@nokia.com>2011-07-11 18:58:41 +0200
commit0f32f596eaa06737c5362f47d1cafef7edf2fa5f (patch)
tree1385117fc048ae3d40340733e920afa788441216 /qmake
parent1aa9affcf1cd177b91e0a92a18e937f8ae892af2 (diff)
inline resoveDepends()
that's common practice for the expand functions, and that one isn't even particularly big Change-Id: I66c22e11edb66bd00d211fc1282eb75f5dd4832d Reviewed-on: http://codereview.qt.nokia.com/1456 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/project.cpp27
-rw-r--r--qmake/project.h2
2 files changed, 9 insertions, 20 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 4a3d7b5737..4a4b73f11e 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1822,20 +1822,6 @@ void calculateDeps(QStringList &sortedList, const QString &item, const QString &
}
QStringList
-QMakeProject::resolveDepends(const QStringList &deps, const QString &prefix, bool resolve,
- QMap<QString, QStringList> &place)
-{
- QStringList sortedList;
- QStringList org = deps;
- foreach(QString item, deps) {
- calculateDeps(sortedList, item, prefix, org, resolve, place);
- if (!resolve && org.isEmpty())
- break;
- }
- return sortedList;
-}
-
-QStringList
QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
QMap<QString, QStringList> &place)
{
@@ -2287,10 +2273,15 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
fprintf(stderr, "%s:%d: %s(var, prefix) requires one or two arguments.\n",
parser.file.toLatin1().constData(), parser.line_no, func.toLatin1().constData());
} else {
- ret += resolveDepends(values(args[0], place),
- (args.count() != 2 ? QString() : args[1]),
- (func_t == E_RESOLVE_DEPENDS),
- place);
+ bool resolve = (func_t == E_RESOLVE_DEPENDS);
+ QString prefix = (args.count() != 2 ? QString() : args[1]);
+ QStringList deps = values(args[0], place);
+ QStringList org = deps;
+ foreach(const QString &item, deps) {
+ calculateDeps(ret, item, prefix, org, resolve, place);
+ if (!resolve && org.isEmpty())
+ break;
+ }
}
break; }
default: {
diff --git a/qmake/project.h b/qmake/project.h
index 5581d1fc00..68110a8448 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -107,8 +107,6 @@ class QMakeProject
QStringList doVariableReplaceExpand(const QString &str, QMap<QString, QStringList> &place, bool *ok=0);
void init(QMakeProperty *, const QMap<QString, QStringList> *);
QStringList &values(const QString &v, QMap<QString, QStringList> &place);
- QStringList resolveDepends(const QStringList &deps, const QString &prefix, bool resolve,
- QMap<QString, QStringList> &place);
void validateModes();
public: