From 75350fa3ec1dd925a30b2511892128a07cbe10de Mon Sep 17 00:00:00 2001
From: Boris Barbulovski <bbarbulovski@gmail.com>
Date: Mon, 17 Oct 2016 22:23:14 +0200
Subject: [PATCH] qconfig initial slider sizes fix.
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@gmail.com>
---
scripts/kconfig/qconf.cc | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
@@ -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