From eda04e91503fe8573bfaa4384f979596c72a8ae6 Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Date: Tue, 27 Apr 2010 14:09:43 +0200
Subject: make QMakeProject::isEmpty() consider legacy mappings

Reviewed-by: joerg
---
 qmake/project.cpp | 6 ++++++
 qmake/project.h   | 3 ---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/qmake/project.cpp b/qmake/project.cpp
index 942d54b..ee6e7df 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -3161,4 +3161,10 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList
     return place[var];
 }
 
+bool QMakeProject::isEmpty(const QString &v)
+{
+    QMap<QString, QStringList>::ConstIterator it = vars.constFind(varMap(v));
+    return it == vars.constEnd() || it->isEmpty();
+}
+
 QT_END_NAMESPACE
diff --git a/qmake/project.h b/qmake/project.h
index 976236c..0c542db 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -179,9 +179,6 @@ inline QString QMakeProject::configFile()
 inline QStringList &QMakeProject::values(const QString &v)
 { return values(v, vars); }
 
-inline bool QMakeProject::isEmpty(const QString &v)
-{ return !isSet(v) || values(v).isEmpty(); }
-
 inline bool QMakeProject::isSet(const QString &v)
 { return vars.contains(v); }
 
-- 
cgit v0.12