summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorArnaud Lacombe <lacombar@gmail.com>2011-05-24 14:16:18 -0400
committerMichal Marek <mmarek@suse.cz>2011-05-25 15:05:07 +0200
commitd49e46875c11a09e80e76c66db90710369b8fe12 (patch)
tree7a5b6400e49cffbcb708ac562cf50735a2c0d1d2 /scripts
parentbdebd4892e05cc9068659f25af33c6b322034eb2 (diff)
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 <hiromu1996@gmail.com> Pointed-out-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/qconf.cc5
1 files changed, 2 insertions, 3 deletions
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;