summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/kconfig/qconf.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 45e3169..ae6c725 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -65,11 +65,19 @@ ConfigSettings::ConfigSettings()
QList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
{
QList<int> result;
- QStringList entryList = value(key).toStringList();
- QStringList::Iterator it;
- for (it = entryList.begin(); it != entryList.end(); ++it)
- result.push_back((*it).toInt());
+ if (contains(key))
+ {
+ QStringList entryList = value(key).toStringList();
+ QStringList::Iterator it;
+
+ for (it = entryList.begin(); it != entryList.end(); ++it)
+ result.push_back((*it).toInt());
+
+ *ok = true;
+ }
+ else
+ *ok = false;
return result;
}
OpenPOWER on IntegriCloud