Skip to content

Commit abb970d

Browse files
committed
Rename
Signed-off-by: Raul Metsma <raul@metsma.ee>
1 parent d3e1486 commit abb970d

File tree

13 files changed

+34
-34
lines changed

13 files changed

+34
-34
lines changed

client/CryptoDoc.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ using namespace ria::qdigidoc4;
5151

5252
Q_LOGGING_CATEGORY(CRYPTO, "CRYPTO")
5353

54-
CDKey::CDKey(QSslCertificate _rcpt_cert) : lock(libcdoc::Lock::PUBLIC_KEY), rcpt_cert(_rcpt_cert) {
54+
CKey::CKey(QSslCertificate _rcpt_cert) : lock(libcdoc::Lock::PUBLIC_KEY), rcpt_cert(_rcpt_cert) {
5555
SslCertificate ssl(rcpt_cert);
5656
lock.pk_type = (rcpt_cert.publicKey().algorithm() == QSsl::Ec) ? libcdoc::PKType::ECC : libcdoc::PKType::RSA;
5757
QByteArray der = ssl.publicKeyDer();
@@ -61,7 +61,7 @@ CDKey::CDKey(QSslCertificate _rcpt_cert) : lock(libcdoc::Lock::PUBLIC_KEY), rcpt
6161
}
6262

6363
bool
64-
CDKey::operator==(const CDKey& rhs) const
64+
CKey::operator==(const CKey& rhs) const
6565
{
6666
if (!lock.isPKI() || !rhs.lock.isPKI()) return false;
6767
return lock.getBytes(libcdoc::Lock::RCPT_KEY) == rhs.lock.getBytes(libcdoc::Lock::RCPT_KEY);
@@ -82,7 +82,7 @@ struct CryptoDoc::Private
8282
DDNetworkBackend network;
8383

8484
std::vector<IOEntry> files;
85-
std::vector<CDKey> keys;
85+
std::vector<CKey> keys;
8686

8787
bool isEncryptedWarning(const QString &title) const;
8888

@@ -251,7 +251,7 @@ CryptoDoc::supportsSymmetricKeys() const
251251
return !d->reader && (d->version == 2);
252252
}
253253

254-
bool CryptoDoc::addEncryptionKey(const CDKey& key) {
254+
bool CryptoDoc::addEncryptionKey(const CKey& key) {
255255
if(d->isEncryptedWarning(tr("Failed to add key")))
256256
return false;
257257
for (auto &k : d->keys) {
@@ -521,7 +521,7 @@ bool CryptoDoc::encrypt(const QString &filename, const QString& label, const QBy
521521

522522
QString CryptoDoc::fileName() const { return d->fileName; }
523523

524-
const std::vector<CDKey>&
524+
const std::vector<CKey>&
525525
CryptoDoc::keys() const
526526
{
527527
return d->keys;

client/CryptoDoc.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ Q_DECLARE_LOGGING_CATEGORY(CRYPTO)
4141
// - recipient certificate for encryption
4242
//
4343

44-
struct CDKey {
44+
struct CKey {
4545
public:
46-
CDKey(const libcdoc::Lock& _lock) : lock(_lock) {}
47-
CDKey(QSslCertificate rcpt_cert);
46+
CKey(const libcdoc::Lock& _lock) : lock(_lock) {}
47+
CKey(QSslCertificate rcpt_cert);
4848

4949
libcdoc::Lock lock;
5050
QSslCertificate rcpt_cert;
5151

52-
bool operator== (const CDKey& rhs) const;
52+
bool operator== (const CKey& rhs) const;
5353
};
5454

5555
class CryptoDoc final: public QObject
@@ -60,14 +60,14 @@ class CryptoDoc final: public QObject
6060
~CryptoDoc() final;
6161

6262
bool supportsSymmetricKeys() const;
63-
bool addEncryptionKey(const CDKey& key);
63+
bool addEncryptionKey(const CKey& key);
6464
bool canDecrypt(const QSslCertificate &cert);
6565
void clear(const QString &file = {}, int version = -1);
6666
bool decrypt(const libcdoc::Lock *lock, const QByteArray& secret);
6767
bool encrypt(const QString &filename = {}, const QString& label = {}, const QByteArray& secret = {});
6868
DocumentModel* documentModel() const;
6969
QString fileName() const;
70-
const std::vector<CDKey>& keys() const;
70+
const std::vector<CKey>& keys() const;
7171
bool move(const QString &to);
7272
bool open(const QString &file);
7373
void removeKey(unsigned int id);

client/MainWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ void MainWindow::convertToCDoc()
347347

348348
auto cardData = qApp->signer()->tokenauth();
349349
if (!cardData.cert().isNull()) {
350-
cryptoContainer->addEncryptionKey(CDKey(cardData.cert()));
350+
cryptoContainer->addEncryptionKey(CKey(cardData.cert()));
351351
}
352352

353353
cryptoDoc = std::move(cryptoContainer);

client/dialogs/AddRecipients.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void AddRecipients::addRecipientFromHistory()
156156

157157
void AddRecipients::addRecipient(const QSslCertificate& cert, bool select)
158158
{
159-
CDKey key(cert);
159+
CKey key(cert);
160160
AddressItem *leftItem = itemListValue(ui->leftPane, key);
161161
if(!leftItem)
162162
{
@@ -177,7 +177,7 @@ void AddRecipients::addRecipient(const QSslCertificate& cert, bool select)
177177
void AddRecipients::addRecipientToRightPane(Item *item, bool update)
178178
{
179179
auto *address = qobject_cast<AddressItem*>(item);
180-
const CDKey& key = address->getKey();
180+
const CKey& key = address->getKey();
181181
if(!address) return;
182182
if (rightList.contains(key)) return;
183183

@@ -240,7 +240,7 @@ bool AddRecipients::isUpdated() const
240240
return ui->confirm->isEnabled();
241241
}
242242

243-
AddressItem* AddRecipients::itemListValue(ItemList *list, const CDKey &key)
243+
AddressItem* AddRecipients::itemListValue(ItemList *list, const CKey &key)
244244
{
245245
for(auto *item: list->items)
246246
{
@@ -250,9 +250,9 @@ AddressItem* AddRecipients::itemListValue(ItemList *list, const CDKey &key)
250250
return nullptr;
251251
}
252252

253-
QList<CDKey> AddRecipients::keys() const
253+
QList<CKey> AddRecipients::keys() const
254254
{
255-
QList<CDKey> recipients;
255+
QList<CKey> recipients;
256256
for(auto *item: ui->rightPane->items)
257257
{
258258
if(auto *address = qobject_cast<AddressItem *>(item))

client/dialogs/AddRecipients.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AddRecipients final : public QDialog
4141
explicit AddRecipients(ItemList* itemList, QWidget *parent = nullptr);
4242
~AddRecipients() final;
4343

44-
QList<CDKey> keys() const;
44+
QList<CKey> keys() const;
4545
bool isUpdated() const;
4646

4747
private:
@@ -50,13 +50,13 @@ class AddRecipients final : public QDialog
5050
void addRecipient(const QSslCertificate& cert, bool select = true);
5151
void addRecipientToRightPane(Item *item, bool update = true);
5252

53-
AddressItem* itemListValue(ItemList *list, const CDKey &key);
53+
AddressItem* itemListValue(ItemList *list, const CKey &key);
5454
void search(const QString &term, bool select = false, const QString &type = {});
5555
void showError(const QString &title, const QString &details);
5656
void showResult(const QList<QSslCertificate> &result, int resultCount, const QVariantMap &userData);
5757

5858
Ui::AddRecipients *ui;
59-
QList<CDKey> rightList;
59+
QList<CKey> rightList;
6060
QList<LdapSearch*> ldap_person;
6161
LdapSearch *ldap_corp;
6262
int multiSearch = 0;

client/dialogs/KeyDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "effects/Overlay.h"
2525
#include "dialogs/CertificateDetails.h"
2626

27-
KeyDialog::KeyDialog(const CDKey &k, QWidget *parent )
27+
KeyDialog::KeyDialog(const CKey &k, QWidget *parent )
2828
: QDialog( parent )
2929
{
3030
Ui::KeyDialog d;

client/dialogs/KeyDialog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121

2222
#include <QDialog>
2323

24-
struct CDKey;
24+
struct CKey;
2525

2626
class KeyDialog final: public QDialog
2727
{
2828
Q_OBJECT
2929

3030
public:
31-
KeyDialog(const CDKey &key, QWidget *parent = nullptr);
31+
KeyDialog(const CKey &key, QWidget *parent = nullptr);
3232
};

client/dialogs/PasswordDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ PasswordDialog::PasswordDialog(Mode mode, QWidget *parent)
4141
ui->ok->setText(tr("Decrypt"));
4242
ui->passwordLine->setFocus();
4343
}
44-
auto setError = [this](LineEdit *input, QLabel *error, const QString &msg) {
44+
auto setError = [](LineEdit *input, QLabel *error, const QString &msg) {
4545
input->setLabel(msg.isEmpty() ? QString() : QStringLiteral("error"));
4646
error->setFocusPolicy(msg.isEmpty() ? Qt::NoFocus : Qt::TabFocus);
4747
error->setText(msg);

client/dialogs/PinUnblock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ PinUnblock::PinUnblock(QSmartCardData::PinType type, QSmartCard::PinAction actio
103103
ui->repeat->setValidator(new QRegularExpressionValidator(regexpNewCode, ui->repeat));
104104
ui->puk->setValidator(new QRegularExpressionValidator(regexpValidateCode, ui->puk));
105105

106-
auto setError = [this](LineEdit *input, QLabel *error, const QString &msg) {
106+
auto setError = [](LineEdit *input, QLabel *error, const QString &msg) {
107107
input->setLabel(msg.isEmpty() ? QString() : QStringLiteral("error"));
108108
error->setFocusPolicy(msg.isEmpty() ? Qt::NoFocus : Qt::TabFocus);
109109
error->setText(msg);

client/dialogs/SignatureDialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class QLabel;
3232
class QTreeWidget;
3333
class SslCertificate;
3434

35-
class SignatureDialog : public QDialog
35+
class SignatureDialog final : public QDialog
3636
{
3737
Q_OBJECT
3838

0 commit comments

Comments
 (0)