aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/ssltrusteditor.cpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2021-03-17 11:54:43 +0100
committerFelix (xq) Queißner <git@mq32.de>2021-05-08 10:44:03 +0200
commit10684b6d82f1843eff3921da40802d335fb3cf5c (patch)
treea80d403f0668686de90c2cd48786e7b5e5fc2128 /src/widgets/ssltrusteditor.cpp
parenta2f36ec4d14ddf1bcee98e52a0f3a924804d06fb (diff)
downloadkristall-10684b6d82f1843eff3921da40802d335fb3cf5c.tar.gz
Further improves localization (#191). Allows switching and setting the chosen localization properly.
Diffstat (limited to 'src/widgets/ssltrusteditor.cpp')
-rw-r--r--src/widgets/ssltrusteditor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/ssltrusteditor.cpp b/src/widgets/ssltrusteditor.cpp
index e740977..7ae3090 100644
--- a/src/widgets/ssltrusteditor.cpp
+++ b/src/widgets/ssltrusteditor.cpp
@@ -1,12 +1,20 @@
#include "ssltrusteditor.hpp"
#include "ui_ssltrusteditor.h"
+#include "kristall.hpp"
+
SslTrustEditor::SslTrustEditor(QWidget *parent) :
QWidget(parent),
ui(new Ui::SslTrustEditor)
{
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->trust_level->clear();
this->ui->trust_level->addItem(tr("Trust on first encounter"), QVariant::fromValue<int>(SslTrust::TrustOnFirstUse));
this->ui->trust_level->addItem(tr("Trust everything"), QVariant::fromValue<int>(SslTrust::TrustEverything));