Skip to content

Commit 060e05c

Browse files
committed
kconfig: qconf: remove initial call to conf_changed()
If any CONFIG option is changed while loading the .config file, conf_read() calls conf_set_changed(true) and then the conf_changed() callback. With conf_read() moved after window initialization, the explicit conf_changed() call can be removed. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent fb3f7f0 commit 060e05c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/kconfig/qconf.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,8 +1397,6 @@ ConfigMainWindow::ConfigMainWindow(void)
13971397

13981398
conf_set_changed_callback(conf_changed);
13991399

1400-
// Set saveAction's initial state
1401-
conf_changed();
14021400
configname = xstrdup(conf_get_configname());
14031401

14041402
QAction *saveAsAction = new QAction("Save &As...", this);
@@ -1904,7 +1902,6 @@ int main(int ac, char** av)
19041902

19051903
conf_parse(name);
19061904
fixup_rootmenu(&rootmenu);
1907-
conf_read(NULL);
19081905
//zconfdump(stdout);
19091906

19101907
configApp = new QApplication(ac, av);
@@ -1916,6 +1913,9 @@ int main(int ac, char** av)
19161913
//zconfdump(stdout);
19171914
configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit()));
19181915
configApp->connect(configApp, SIGNAL(aboutToQuit()), v, SLOT(saveSettings()));
1916+
1917+
conf_read(NULL);
1918+
19191919
v->show();
19201920
configApp->exec();
19211921

0 commit comments

Comments
 (0)