From 3322759b49973c1b8f6372c72eace3dc38de36e6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 28 Aug 2012 20:53:25 +0200 Subject: [PATCH] give location information for QMAKE_SUBSTITUTES conditionals Change-Id: I9b6bee252d4ed4bf263394ace29a4fb3b324a8cd Reviewed-by: Daniel Teske Reviewed-by: Joerg Bornemann --- qmake/generators/makefile.cpp | 4 ++-- qmake/project.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 2cfbccb2b5d..5bd96a14660 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -538,7 +538,7 @@ MakefileGenerator::init() if (line.startsWith("!!IF ")) { if (state.isEmpty() || state.top() == IN_CONDITION) { QString test = line.mid(5, line.length()-(5+1)); - if (project->test(test)) + if (project->test(test, inn, count)) state.push(IN_CONDITION); else state.push(PENDING_CONDITION); @@ -551,7 +551,7 @@ MakefileGenerator::init() in.fileName().toLatin1().constData(), count); } else if (state.top() == PENDING_CONDITION) { QString test = line.mid(7, line.length()-(7+1)); - if (project->test(test)) { + if (project->test(test, inn, count)) { state.pop(); state.push(IN_CONDITION); } diff --git a/qmake/project.h b/qmake/project.h index efee3173862..f38b4351feb 100644 --- a/qmake/project.h +++ b/qmake/project.h @@ -64,8 +64,8 @@ public: ProString expand(const QString &v, const QString &file, int line); QStringList expand(const ProKey &func, const QList &args); - bool test(const QString &v) - { m_current.clear(); return evaluateConditional(v, QStringLiteral("(generator)")); } + bool test(const QString &v, const QString &file, int line) + { m_current.clear(); return evaluateConditional(v, file, line); } bool test(const ProKey &func, const QList &args); bool isSet(const ProKey &v) const { return m_valuemapStack.first().contains(v); }