summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/project.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/qmake/project.h b/qmake/project.h
index e3b2925ccf..c07b6e6e46 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -95,12 +95,18 @@ private:
static bool boolRet(VisitReturn vr);
};
+/*!
+ * For variables that are supposed to contain a single int,
+ * this method returns the numeric value.
+ * Only the first value of the variable is taken into account.
+ * The string representation is assumed to look like a C int literal.
+ */
inline int QMakeProject::intValue(const ProKey &v, int defaultValue) const
{
const ProString &str = first(v);
if (!str.isEmpty()) {
bool ok;
- int i = str.toInt(&ok);
+ int i = str.toInt(&ok, 0);
if (ok)
return i;
}