Skip to content

Commit

Permalink
kconfig: qconf: remove initial call to conf_changed()
Browse files Browse the repository at this point in the history
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 <masahiroy@kernel.org>
  • Loading branch information
Masahiro Yamada committed Jul 15, 2024
1 parent fb3f7f0 commit 060e05c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1397,8 +1397,6 @@ ConfigMainWindow::ConfigMainWindow(void)

conf_set_changed_callback(conf_changed);

// Set saveAction's initial state
conf_changed();
configname = xstrdup(conf_get_configname());

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

conf_parse(name);
fixup_rootmenu(&rootmenu);
conf_read(NULL);
//zconfdump(stdout);

configApp = new QApplication(ac, av);
Expand All @@ -1916,6 +1913,9 @@ int main(int ac, char** av)
//zconfdump(stdout);
configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit()));
configApp->connect(configApp, SIGNAL(aboutToQuit()), v, SLOT(saveSettings()));

conf_read(NULL);

v->show();
configApp->exec();

Expand Down

0 comments on commit 060e05c

Please sign in to comment.