some initial classes for keys form

This commit is contained in:
Blue 2023-01-03 18:27:03 +03:00
parent b45a73b723
commit 5aa0f4bca9
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
11 changed files with 361 additions and 159 deletions

View file

@ -39,8 +39,29 @@ Shared::KeyInfo::KeyInfo():
id(0),
fingerPrint(),
label(),
trustLevel(TrustLevel::Undecided),
trustLevel(TrustLevel::undecided),
protocol(EncryptionProtocol::omemo),
currentDevice(false)
{
}
Shared::KeyInfo::KeyInfo(const Shared::KeyInfo& other):
id(other.id),
fingerPrint(other.fingerPrint),
label(other.label),
trustLevel(other.trustLevel),
protocol(other.protocol),
currentDevice(other.currentDevice)
{
}
Shared::KeyInfo & Shared::KeyInfo::operator=(const Shared::KeyInfo& other) {
id = other.id;
fingerPrint = other.fingerPrint;
label = other.label;
trustLevel = other.trustLevel;
protocol = other.protocol;
currentDevice = other.currentDevice;
return *this;
}

View file

@ -39,8 +39,11 @@ public:
bool currentDevice = false
);
KeyInfo();
KeyInfo(const KeyInfo& other);
private:
KeyInfo& operator=(const KeyInfo& other);
public:
uint32_t id;
QByteArray fingerPrint;
QString label;