From 6997e461fdb39985957d24d81e612113cf39e35c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 4 Apr 2013 11:24:24 +0000 Subject: support/kconfig: upgrade to 3.9-rc2 Our kconfig code is updated to the version of kernel 3.9-rc2. No major issues during the migration, except: * Some conflicts when applying 03-change-config-option-prefix.patch due to upstream kernel changes. * The need of adding a new patch, 15-fix-qconf-moc-rule.patch, to fix the make rule that generates the moc file for the Qt-based interface. Signed-off-by: Thomas Petazzoni Acked-by: Gustavo Zacarias Tested-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- support/kconfig/qconf.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'support/kconfig/qconf.cc') diff --git a/support/kconfig/qconf.cc b/support/kconfig/qconf.cc index c2796b866..1500c38f0 100644 --- a/support/kconfig/qconf.cc +++ b/support/kconfig/qconf.cc @@ -6,6 +6,7 @@ #include #if QT_VERSION < 0x040000 +#include #include #include #include @@ -1478,10 +1479,13 @@ void ConfigMainWindow::loadConfig(void) ConfigView::updateListAll(); } -void ConfigMainWindow::saveConfig(void) +bool ConfigMainWindow::saveConfig(void) { - if (conf_write(NULL)) + if (conf_write(NULL)) { QMessageBox::information(this, "qconf", _("Unable to save configuration!")); + return false; + } + return true; } void ConfigMainWindow::saveConfigAs(void) @@ -1642,7 +1646,11 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); switch (mb.exec()) { case QMessageBox::Yes: - saveConfig(); + if (saveConfig()) + e->accept(); + else + e->ignore(); + break; case QMessageBox::No: e->accept(); break; @@ -1745,10 +1753,6 @@ int main(int ac, char** av) bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); -#ifndef LKC_DIRECT_LINK - kconfig_load(); -#endif - progname = av[0]; configApp = new QApplication(ac, av); if (ac > 1 && av[1][0] == '-') { -- cgit v1.2.3