File indexing completed on 2024-12-08 04:34:21

0001 /*
0002   SPDX-FileCopyrightText: 2024 Laurent Montel <montel.org>
0003 
0004   SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "e2edecodeencryptionkeyfailedwidget.h"
0008 #include <KLocalizedString>
0009 
0010 E2eDecodeEncryptionKeyFailedWidget::E2eDecodeEncryptionKeyFailedWidget(QWidget *parent)
0011     : KMessageWidget(parent)
0012 {
0013     setVisible(false);
0014     setCloseButtonVisible(true);
0015     setMessageType(Error);
0016     setPosition(KMessageWidget::Header);
0017     setText(i18n("It was not possible to decode your encryption key to be imported. Your encryption password seems wrong."));
0018 
0019     auto decodeEncryptionKeyAction = new QAction(i18n("Decrypte Encryption Key"), this);
0020     decodeEncryptionKeyAction->setObjectName(QStringLiteral("decodeEncryptionKeyAction"));
0021     connect(decodeEncryptionKeyAction, &QAction::triggered, this, &E2eDecodeEncryptionKeyFailedWidget::decodeEncrytionKey);
0022     addAction(decodeEncryptionKeyAction);
0023 }
0024 
0025 E2eDecodeEncryptionKeyFailedWidget::~E2eDecodeEncryptionKeyFailedWidget() = default;
0026 
0027 #include "moc_e2edecodeencryptionkeyfailedwidget.cpp"