From 9ecc88dda38388871d3d316e93df7b5b629b3e47 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Thu, 15 Apr 2021 18:29:33 +0200 Subject: Unwarp tr() from QStrings We don't need to wrap tr() with QString, because it returns QString anyway. Although it doesn't change the binary size (mostly because compilers were smart to remove that already), it helps to make the code a little bit cleaner. It's a somewhat continuation of c740189bcaa5bc6c073f8b3802303acf5ac36e47, but I thought back then it happened only there, so now I've removed it from all places. --- src/dialogs/settingsdialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/dialogs/settingsdialog.cpp') diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index ea30d4f..c97d74c 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -663,7 +663,7 @@ void SettingsDialog::on_preset_new_clicked() bool override = false; if(this->predefined_styles.contains(name)) { - auto response = QMessageBox::question(this, "Kristall", QString(tr("A style with the name '%1' already exists! Replace?")).arg(name)); + auto response = QMessageBox::question(this, "Kristall", tr("A style with the name '%1' already exists! Replace?").arg(name)); if(response != QMessageBox::Yes) return; override = true; @@ -683,7 +683,7 @@ void SettingsDialog::on_preset_save_clicked() if(name.isEmpty()) return; - auto response = QMessageBox::question(this, "Kristall", QString(tr("Do you want to override the style '%1'?")).arg(name)); + auto response = QMessageBox::question(this, "Kristall", tr("Do you want to override the style '%1'?").arg(name)); if(response != QMessageBox::Yes) return; @@ -697,7 +697,7 @@ void SettingsDialog::on_preset_load_clicked() if(name.isEmpty()) return; - auto response = QMessageBox::question(this, "Kristall", QString(tr("Do you want to load the style '%1'?\r\nThis will discard all currently set up values!")).arg(name)); + auto response = QMessageBox::question(this, "Kristall", tr("Do you want to load the style '%1'?\r\nThis will discard all currently set up values!").arg(name)); if(response != QMessageBox::Yes) return; @@ -763,7 +763,7 @@ void SettingsDialog::on_preset_import_clicked() bool override = false; if(this->predefined_styles.contains(name)) { - auto response = QMessageBox::question(this, "Kristall", QString(tr("Do you want to override the style '%1'?")).arg(name)); + auto response = QMessageBox::question(this, "Kristall", tr("Do you want to override the style '%1'?").arg(name)); if(response != QMessageBox::Yes) return; override = true; -- cgit v1.2.3