mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-10-15 15:00:58 -04:00
Use static method instead of a constructor for random Uuids.
This commit is contained in:
parent
d8b21c8b04
commit
a3211872e0
3 changed files with 8 additions and 10 deletions
|
@ -25,15 +25,6 @@ Uuid::Uuid() : m_data(length, 0)
|
|||
{
|
||||
}
|
||||
|
||||
Uuid::Uuid(bool generate) : m_data(length, 0)
|
||||
{
|
||||
if (generate) {
|
||||
while (isNull()) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Uuid::Uuid(const QByteArray& data)
|
||||
{
|
||||
Q_ASSERT(data.size() == 16);
|
||||
|
@ -41,6 +32,12 @@ Uuid::Uuid(const QByteArray& data)
|
|||
m_data = data;
|
||||
}
|
||||
|
||||
Uuid Uuid::random() {
|
||||
QByteArray randomAray;
|
||||
// TODO fill with random data
|
||||
return Uuid(randomAray);
|
||||
}
|
||||
|
||||
QString Uuid::toBase64() const
|
||||
{
|
||||
return m_data.toBase64();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue