From: Arnaud Lacombe Date: Tue, 24 May 2011 18:16:18 +0000 (-0400) Subject: xconfig: merge code path to conf_write() X-Git-Tag: v3.0-rc1~149^2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=d49e46875c11a09e80e76c66db90710369b8fe12;hp=-c;ds=sidebyside xconfig: merge code path to conf_write() Avoid to have multiple path saving the config. This fixes an error check miss when the window is being closed and the user requested the config to be written. Reported-by: Hiromu Yakura Pointed-out-by: Michal Marek Signed-off-by: Michal Marek --- d49e46875c11a09e80e76c66db90710369b8fe12 diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 06dd2e33581d..c2796b866f8f 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1489,8 +1489,7 @@ void ConfigMainWindow::saveConfigAs(void) QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this); if (s.isNull()) return; - if (conf_write(QFile::encodeName(s))) - QMessageBox::information(this, "qconf", _("Unable to save configuration!")); + saveConfig(); } void ConfigMainWindow::searchConfig(void) @@ -1643,7 +1642,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); switch (mb.exec()) { case QMessageBox::Yes: - conf_write(NULL); + saveConfig(); case QMessageBox::No: e->accept(); break;