|
@@ -1478,10 +1478,13 @@ void ConfigMainWindow::loadConfig(void)
|
|
ConfigView::updateListAll();
|
|
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!"));
|
|
QMessageBox::information(this, "qconf", _("Unable to save configuration!"));
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
}
|
|
}
|
|
|
|
|
|
void ConfigMainWindow::saveConfigAs(void)
|
|
void ConfigMainWindow::saveConfigAs(void)
|
|
@@ -1642,7 +1645,11 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e)
|
|
mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit"));
|
|
mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit"));
|
|
switch (mb.exec()) {
|
|
switch (mb.exec()) {
|
|
case QMessageBox::Yes:
|
|
case QMessageBox::Yes:
|
|
- saveConfig();
|
|
|
|
|
|
+ if (saveConfig())
|
|
|
|
+ e->accept();
|
|
|
|
+ else
|
|
|
|
+ e->ignore();
|
|
|
|
+ break;
|
|
case QMessageBox::No:
|
|
case QMessageBox::No:
|
|
e->accept();
|
|
e->accept();
|
|
break;
|
|
break;
|