xconfig: fix missing suboption and help panels on first run
authorBoris Barbulovski <bbarbulovski@gmail.com>
Wed, 30 Nov 2016 22:57:55 +0000 (14:57 -0800)
committerMichal Marek <mmarek@suse.com>
Sun, 11 Dec 2016 20:40:54 +0000 (21:40 +0100)
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.

Reported-by: Jason Vas Dias <jason.vas.dias@gmail.com>
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
scripts/kconfig/qconf.cc

index 45e3169e8ee1faf6b3c2d14602f66b1c1876494a..ae6c725464110c67bf1e72325c4f7fa8879b6c94 100644 (file)
@@ -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;
 }