summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qmake/project.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/qmake/project.h b/qmake/project.h
index c9d2084..d87380b 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -189,12 +189,18 @@ inline QString QMakeProject::first(const QString &v)
return vals.first();
}
+/*!
+ * 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 QString &v, int defaultValue)
{
const QString str = first(v);
if (!str.isEmpty()) {
bool ok;
- int i = str.toInt(&ok);
+ int i = str.toInt(&ok, 0);
if (ok)
return i;
}