diff --git a/src/core/Entry.cpp b/src/core/Entry.cpp index 7b81785b3..dd41d90e7 100644 --- a/src/core/Entry.cpp +++ b/src/core/Entry.cpp @@ -344,7 +344,8 @@ void Entry::setExpiryTime(const QDateTime& dateTime) } } -int Entry::getSize(QList* foundAttachements) { +int Entry::getSize(QList* foundAttachements) +{ return attributes()->attributesSize() + attachments()->attachmentsSize(foundAttachements); } @@ -382,7 +383,8 @@ void Entry::removeHistoryItems(QList historyEntries) } } -void Entry::truncateHistory() { +void Entry::truncateHistory() +{ const Database* db = database(); if (!db) { diff --git a/src/core/EntryAttachments.cpp b/src/core/EntryAttachments.cpp index ba0a6a1ae..a8dc89531 100644 --- a/src/core/EntryAttachments.cpp +++ b/src/core/EntryAttachments.cpp @@ -87,7 +87,8 @@ void EntryAttachments::clear() Q_EMIT modified(); } -int EntryAttachments::attachmentsSize(QList* foundAttachements) { +int EntryAttachments::attachmentsSize(QList* foundAttachements) +{ int size = 0; QMapIterator i(m_attachments); diff --git a/src/core/EntryAttributes.cpp b/src/core/EntryAttributes.cpp index df8823c24..ffd6451e7 100644 --- a/src/core/EntryAttributes.cpp +++ b/src/core/EntryAttributes.cpp @@ -223,7 +223,8 @@ void EntryAttributes::clear() Q_EMIT modified(); } -int EntryAttributes::attributesSize() { +int EntryAttributes::attributesSize() +{ int size = 0; QMapIterator i(m_attributes); diff --git a/src/core/Group.cpp b/src/core/Group.cpp index 161845c91..fd4f981dd 100644 --- a/src/core/Group.cpp +++ b/src/core/Group.cpp @@ -78,7 +78,8 @@ void Group::updateTimeinfo() } } -void Group::setUpdateTimeinfo(bool value) { +void Group::setUpdateTimeinfo(bool value) +{ m_updateTimeinfo = value; } diff --git a/src/core/Metadata.cpp b/src/core/Metadata.cpp index 33ea1b732..a033c60f8 100644 --- a/src/core/Metadata.cpp +++ b/src/core/Metadata.cpp @@ -79,7 +79,8 @@ template bool Metadata::set(P& property, const V& value, QDat } } -void Metadata::setUpdateDatetime(bool value) { +void Metadata::setUpdateDatetime(bool value) +{ m_updateDatetime = value; } diff --git a/src/core/Uuid.cpp b/src/core/Uuid.cpp index 75c671713..ae8b2dc5c 100644 --- a/src/core/Uuid.cpp +++ b/src/core/Uuid.cpp @@ -35,7 +35,8 @@ Uuid::Uuid(const QByteArray& data) m_data = data; } -Uuid Uuid::random() { +Uuid Uuid::random() +{ return Uuid(Random::randomArray(Length)); } diff --git a/src/gui/DatabaseTabWidget.cpp b/src/gui/DatabaseTabWidget.cpp index f32ce0dab..3f53ca74c 100644 --- a/src/gui/DatabaseTabWidget.cpp +++ b/src/gui/DatabaseTabWidget.cpp @@ -62,7 +62,8 @@ DatabaseTabWidget::~DatabaseTabWidget() } } -void DatabaseTabWidget::toggleTabbar() { +void DatabaseTabWidget::toggleTabbar() +{ if (count() > 1) { if (!tabBar()->isVisible()) { tabBar()->show(); @@ -228,7 +229,8 @@ void DatabaseTabWidget::deleteDatabase(Database* db) delete db; } -bool DatabaseTabWidget::closeAllDatabases() { +bool DatabaseTabWidget::closeAllDatabases() +{ while (!m_dbList.isEmpty()) { if (!closeDatabase()) { return false; diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 9bac6e548..7265d94b3 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -267,7 +267,8 @@ void MainWindow::databaseTabChanged(int tabIndex) } } -void MainWindow::closeEvent(QCloseEvent* event) { +void MainWindow::closeEvent(QCloseEvent* event) +{ if (!m_ui->tabWidget->closeAllDatabases()) { event->ignore(); } diff --git a/src/keys/CompositeKey.cpp b/src/keys/CompositeKey.cpp index ffcfc8f6b..afd8f0704 100644 --- a/src/keys/CompositeKey.cpp +++ b/src/keys/CompositeKey.cpp @@ -89,7 +89,8 @@ QByteArray CompositeKey::transform(const QByteArray& seed, quint64 rounds) const } QByteArray CompositeKey::transformKeyRaw(const QByteArray& key, const QByteArray& seed, - quint64 rounds) { + quint64 rounds) +{ QByteArray iv(16, 0); SymmetricCipher cipher(SymmetricCipher::Aes256, SymmetricCipher::Ecb, SymmetricCipher::Encrypt, seed, iv);