summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/project.cpp2
-rw-r--r--qmake/project.h14
2 files changed, 9 insertions, 7 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 45e2ee0e63..80e95f392a 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -3775,7 +3775,7 @@ QStringList &QMakeProject::values(const QString &_var, QHash<QString, QStringLis
return place[var];
}
-bool QMakeProject::isEmpty(const QString &v)
+bool QMakeProject::isEmpty(const QString &v) const
{
QHash<QString, QStringList>::ConstIterator it = vars.constFind(v);
return it == vars.constEnd() || it->isEmpty();
diff --git a/qmake/project.h b/qmake/project.h
index e46c7440ee..171016e264 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -164,11 +164,13 @@ public:
bool isActiveConfig(const QString &x, bool regex=false,
QHash<QString, QStringList> *place=NULL);
- bool isSet(const QString &v) { return vars.contains(v); }
- bool isEmpty(const QString &v);
+ bool isSet(const QString &v) const { return vars.contains(v); }
+ bool isEmpty(const QString &v) const;
+ QStringList values(const QString &v) const { return vars[v]; }
QStringList &values(const QString &v) { return vars[v]; }
- QString first(const QString &v);
- int intValue(const QString &v, int defaultValue = 0);
+ QString first(const QString &v) const;
+ int intValue(const QString &v, int defaultValue = 0) const;
+ const QHash<QString, QStringList> &variables() const { return vars; }
QHash<QString, QStringList> &variables() { return vars; }
bool isRecursive() const { return recursive; }
@@ -189,7 +191,7 @@ inline QString QMakeProject::projectFile()
return pfile;
}
-inline QString QMakeProject::first(const QString &v)
+inline QString QMakeProject::first(const QString &v) const
{
const QStringList vals = values(v);
if(vals.isEmpty())
@@ -197,7 +199,7 @@ inline QString QMakeProject::first(const QString &v)
return vals.first();
}
-inline int QMakeProject::intValue(const QString &v, int defaultValue)
+inline int QMakeProject::intValue(const QString &v, int defaultValue) const
{
const QString str = first(v);
if (!str.isEmpty()) {