From 10684b6d82f1843eff3921da40802d335fb3cf5c Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Wed, 17 Mar 2021 11:54:43 +0100 Subject: Further improves localization (#191). Allows switching and setting the chosen localization properly. --- src/dialogs/certificateiodialog.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/dialogs/certificateiodialog.cpp') diff --git a/src/dialogs/certificateiodialog.cpp b/src/dialogs/certificateiodialog.cpp index 75b9775..1f2b975 100644 --- a/src/dialogs/certificateiodialog.cpp +++ b/src/dialogs/certificateiodialog.cpp @@ -1,5 +1,6 @@ #include "certificateiodialog.hpp" #include "ui_certificateiodialog.h" +#include "kristall.hpp" #include #include @@ -11,6 +12,12 @@ CertificateIoDialog::CertificateIoDialog(QWidget *parent) : { ui->setupUi(this); + connect( // connect with "this" as context, so the connection will die when the window is destroyed + kristall::globals().localization.get(), &Localization::translationChanged, + this, [this]() { this->ui->retranslateUi(this); }, + Qt::DirectConnection + ); + this->ui->key_type->clear(); this->ui->key_type->addItem("RSA", QVariant::fromValue(QSsl::Rsa)); this->ui->key_type->addItem("ECDSA", QVariant::fromValue(QSsl::Ec)); -- cgit v1.2.3