]> Git Repo - linux.git/commitdiff
xconfig: merge code path to conf_write()
authorArnaud Lacombe <[email protected]>
Tue, 24 May 2011 18:16:18 +0000 (14:16 -0400)
committerMichal Marek <[email protected]>
Wed, 25 May 2011 13:05:07 +0000 (15:05 +0200)
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 <[email protected]>
Pointed-out-by: Michal Marek <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
scripts/kconfig/qconf.cc

index 06dd2e33581de5de81863bd1b74b2fb7100af5ed..c2796b866f8f14a37453f409429b900e1f11ba44 100644 (file)
@@ -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;
This page took 0.064145 seconds and 4 git commands to generate.