aboutsummaryrefslogtreecommitdiff
path: root/src/dialogs
diff options
context:
space:
mode:
authorKarol Kosek <krkk@krkk.ct8.pl>2020-12-30 15:45:03 +0100
committerFelix Queißner <felix@ib-queissner.de>2020-12-30 20:31:39 +0100
commit07a4ddc230c11c7249acd4c0363c6075e939f11b (patch)
treee6330578c94bedfdc9b552cecbc8a874cc2713b9 /src/dialogs
parent80f64ff08cb3234c124cee786118c8e356942922 (diff)
downloadkristall-07a4ddc230c11c7249acd4c0363c6075e939f11b.tar.gz
Use multi-arg overload to save memory allocations
Diffstat (limited to 'src/dialogs')
-rw-r--r--src/dialogs/certificatemanagementdialog.cpp2
-rw-r--r--src/dialogs/settingsdialog.cpp18
2 files changed, 7 insertions, 13 deletions
diff --git a/src/dialogs/certificatemanagementdialog.cpp b/src/dialogs/certificatemanagementdialog.cpp
index 1ed78dd..9600378 100644
--- a/src/dialogs/certificatemanagementdialog.cpp
+++ b/src/dialogs/certificatemanagementdialog.cpp
@@ -249,7 +249,7 @@ void CertificateManagementDialog::on_import_cert_button_clicked()
&cert_file,
dialog.keyFileName().endsWith(".der") ? QSsl::Der : QSsl::Pem,
};
- ident.user_notes = tr("Imported from:\r\nkey: %1\r\n:cert: %2").arg(dialog.keyFileName()).arg(dialog.certificateFileName());
+ ident.user_notes = tr("Imported from:\r\nkey: %1\r\n:cert: %2").arg(dialog.keyFileName(), dialog.certificateFileName());
ident.display_name = "Imported Certificate";
ident.auto_enable = false;
ident.host_filter = "";
diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp
index 269a0bd..8a319d2 100644
--- a/src/dialogs/settingsdialog.cpp
+++ b/src/dialogs/settingsdialog.cpp
@@ -109,29 +109,23 @@ void SettingsDialog::setGeminiStyle(DocumentStyle const &style)
{
label->setText(formatFont(font));
label->setStyleSheet(COLOR_STYLE
- .arg(this->current_style.background_color.name())
- .arg(color.name()));
+ .arg(this->current_style.background_color.name(), color.name()));
};
ui->bg_preview->setStyleSheet(COLOR_STYLE
- .arg(this->current_style.background_color.name())
- .arg("#FF00FF"));
+ .arg(this->current_style.background_color.name(), "#FF00FF"));
ui->quote_preview->setStyleSheet(COLOR_STYLE
- .arg(this->current_style.blockquote_color.name())
- .arg("#FF00FF"));
+ .arg(this->current_style.blockquote_color.name(), "#FF00FF"));
ui->link_local_preview->setStyleSheet(COLOR_STYLE
- .arg(this->current_style.background_color.name())
- .arg(this->current_style.internal_link_color.name()));
+ .arg(this->current_style.background_color.name(), this->current_style.internal_link_color.name()));
ui->link_foreign_preview->setStyleSheet(COLOR_STYLE
- .arg(this->current_style.background_color.name())
- .arg(this->current_style.external_link_color.name()));
+ .arg(this->current_style.background_color.name(), this->current_style.external_link_color.name()));
ui->link_cross_preview->setStyleSheet(COLOR_STYLE
- .arg(this->current_style.background_color.name())
- .arg(this->current_style.cross_scheme_link_color.name()));
+ .arg(this->current_style.background_color.name(), this->current_style.cross_scheme_link_color.name()));
setFontAndColor(this->ui->std_preview, this->current_style.standard_font, this->current_style.standard_color);
setFontAndColor(this->ui->pre_preview, this->current_style.preformatted_font, this->current_style.preformatted_color);