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]>
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)
mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit"));
switch (mb.exec()) {
case QMessageBox::Yes:
- conf_write(NULL);
+ saveConfig();
case QMessageBox::No:
e->accept();
break;