[PATCH] qconfig initial slider sizes fix.

From: Boris Barbulovski
Date: Mon Oct 17 2016 - 16:23:14 EST


On first `make xconfig`, suboption and help panels were hidden.
Now we properly detect the first run, and show those panels.

Signed-off-by: Boris Barbulovski <bbarbulovski@xxxxxxxxx>
---
scripts/kconfig/qconf.cc | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index fc55559..e99c04f 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;
}
--
2.7.4


--------------018C795E7C20F82C2B5A1CF6--