Add some more asserts to make sure we only store UTC QDateTimes.

This commit is contained in:
Felix Geyer 2012-05-16 00:04:10 +02:00
parent fb5a5041d5
commit 5ef3cdb428
2 changed files with 7 additions and 0 deletions

View File

@ -129,6 +129,7 @@ QList<DeletedObject> Database::deletedObjects()
void Database::addDeletedObject(const DeletedObject& delObj)
{
Q_ASSERT(delObj.deletionTime.timeSpec() == Qt::UTC);
m_deletedObjects.append(delObj);
}

View File

@ -262,6 +262,7 @@ void Metadata::setName(const QString& value)
void Metadata::setNameChanged(const QDateTime& value)
{
Q_ASSERT(value.timeSpec() == Qt::UTC);
m_nameChanged = value;
}
@ -272,6 +273,7 @@ void Metadata::setDescription(const QString& value)
void Metadata::setDescriptionChanged(const QDateTime& value)
{
Q_ASSERT(value.timeSpec() == Qt::UTC);
m_descriptionChanged = value;
}
@ -282,6 +284,7 @@ void Metadata::setDefaultUserName(const QString& value)
void Metadata::setDefaultUserNameChanged(const QDateTime& value)
{
Q_ASSERT(value.timeSpec() == Qt::UTC);
m_defaultUserNameChanged = value;
}
@ -359,6 +362,7 @@ void Metadata::setRecycleBin(Group* group)
void Metadata::setRecycleBinChanged(const QDateTime& value)
{
Q_ASSERT(value.timeSpec() == Qt::UTC);
m_recycleBinChanged = value;
}
@ -369,6 +373,7 @@ void Metadata::setEntryTemplatesGroup(Group* group)
void Metadata::setEntryTemplatesGroupChanged(const QDateTime& value)
{
Q_ASSERT(value.timeSpec() == Qt::UTC);
m_entryTemplatesGroupChanged = value;
}
@ -384,6 +389,7 @@ void Metadata::setLastTopVisibleGroup(Group* group)
void Metadata::setMasterKeyChanged(const QDateTime& value)
{
Q_ASSERT(value.timeSpec() == Qt::UTC);
m_masterKeyChanged = value;
}