Using format strings.

This commit is contained in:
Louis-Bertrand Varin 2017-03-19 16:05:52 -04:00
parent a3840963e1
commit d8ad360b38
2 changed files with 3 additions and 3 deletions

View File

@ -317,7 +317,7 @@ MainWindow::MainWindow()
if (config()->hasAccessError()) {
m_ui->globalMessageWidget->showMessage(
tr("Access error for config file ") + config()->getFileName(), MessageWidget::Error);
tr("Access error for config file %1").arg(config()->getFileName()), MessageWidget::Error);
}
}

View File

@ -102,7 +102,7 @@ void SettingsWidget::loadSettings()
if (config()->hasAccessError()) {
showMessage(
tr("Access error for config file ") + config()->getFileName(), MessageWidget::Error);
tr("Access error for config file %1").arg(config()->getFileName()), MessageWidget::Error);
}
m_generalUi->rememberLastDatabasesCheckBox->setChecked(config()->get("RememberLastDatabases").toBool());
@ -163,7 +163,7 @@ void SettingsWidget::saveSettings()
if (config()->hasAccessError()) {
showMessage(
tr("Access error for config file ") + config()->getFileName(), MessageWidget::Error);
tr("Access error for config file %1").arg(config()->getFileName()), MessageWidget::Error);
// We prevent closing the settings page if we could not write to
// the config file.
return;