mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-25 08:51:21 -05:00
Properly initialize various attributes.
This commit is contained in:
parent
c548c7f4b4
commit
5cb906c235
@ -22,10 +22,16 @@
|
||||
|
||||
#include "Metadata.h"
|
||||
#include "crypto/Random.h"
|
||||
#include "format/KeePass2.h"
|
||||
|
||||
Database::Database()
|
||||
{
|
||||
m_metadata = new Metadata(this);
|
||||
m_rootGroup = 0;
|
||||
|
||||
m_cipher = KeePass2::CIPHER_AES;
|
||||
m_compressionAlgo = CompressionNone; // TODO change to CompressionGZip?
|
||||
m_transformRounds = 1000; // TODO random number
|
||||
}
|
||||
|
||||
Group* Database::rootGroup()
|
||||
|
@ -26,6 +26,8 @@ Entry::Entry()
|
||||
{
|
||||
m_group = 0;
|
||||
m_db = 0;
|
||||
|
||||
m_iconNumber = 0; // TODO change?
|
||||
}
|
||||
|
||||
Entry::~Entry()
|
||||
|
@ -28,6 +28,8 @@ Group::Group()
|
||||
{
|
||||
m_parent = 0;
|
||||
m_db = 0;
|
||||
|
||||
m_iconNumber = 0; // TODO change?
|
||||
}
|
||||
|
||||
Group::~Group()
|
||||
|
@ -28,6 +28,14 @@ Metadata::Metadata(Database* parent)
|
||||
m_entryTemplatesGroup = 0;
|
||||
m_lastSelectedGroup = 0;
|
||||
m_lastTopVisibleGroup = 0;
|
||||
|
||||
QDateTime now = QDateTime::currentDateTime();
|
||||
m_nameChanged = now;
|
||||
m_descriptionChanged = now;
|
||||
m_defaultUserNameChanged = now;
|
||||
m_recycleBinChanged = now;
|
||||
m_entryTemplatesGroupChanged = now;
|
||||
m_masterKeyChanged = now;
|
||||
}
|
||||
|
||||
QString Metadata::generator() const
|
||||
|
@ -20,6 +20,14 @@
|
||||
TimeInfo::TimeInfo()
|
||||
{
|
||||
m_expires = false;
|
||||
m_usageCount = 0; // TODO ???
|
||||
|
||||
QDateTime now = QDateTime::currentDateTime();
|
||||
m_lastModificationTime = now;
|
||||
m_creationTime = now;
|
||||
m_lastAccessTime = now;
|
||||
m_expiryTime = now;
|
||||
m_locationChanged = now;
|
||||
}
|
||||
|
||||
QDateTime TimeInfo::lastModificationTime() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user