mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-17 21:04:19 -05:00
Coding style fixes.
This commit is contained in:
parent
ca13ad8d25
commit
ee3bc89a54
@ -344,7 +344,8 @@ void Entry::setExpiryTime(const QDateTime& dateTime)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Entry::getSize(QList<QByteArray>* foundAttachements) {
|
int Entry::getSize(QList<QByteArray>* foundAttachements)
|
||||||
|
{
|
||||||
return attributes()->attributesSize() + attachments()->attachmentsSize(foundAttachements);
|
return attributes()->attributesSize() + attachments()->attachmentsSize(foundAttachements);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -382,7 +383,8 @@ void Entry::removeHistoryItems(QList<Entry*> historyEntries)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entry::truncateHistory() {
|
void Entry::truncateHistory()
|
||||||
|
{
|
||||||
const Database* db = database();
|
const Database* db = database();
|
||||||
|
|
||||||
if (!db) {
|
if (!db) {
|
||||||
|
@ -87,7 +87,8 @@ void EntryAttachments::clear()
|
|||||||
Q_EMIT modified();
|
Q_EMIT modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
int EntryAttachments::attachmentsSize(QList<QByteArray>* foundAttachements) {
|
int EntryAttachments::attachmentsSize(QList<QByteArray>* foundAttachements)
|
||||||
|
{
|
||||||
int size = 0;
|
int size = 0;
|
||||||
|
|
||||||
QMapIterator<QString, QByteArray> i(m_attachments);
|
QMapIterator<QString, QByteArray> i(m_attachments);
|
||||||
|
@ -223,7 +223,8 @@ void EntryAttributes::clear()
|
|||||||
Q_EMIT modified();
|
Q_EMIT modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
int EntryAttributes::attributesSize() {
|
int EntryAttributes::attributesSize()
|
||||||
|
{
|
||||||
int size = 0;
|
int size = 0;
|
||||||
|
|
||||||
QMapIterator<QString, QString> i(m_attributes);
|
QMapIterator<QString, QString> i(m_attributes);
|
||||||
|
@ -78,7 +78,8 @@ void Group::updateTimeinfo()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Group::setUpdateTimeinfo(bool value) {
|
void Group::setUpdateTimeinfo(bool value)
|
||||||
|
{
|
||||||
m_updateTimeinfo = value;
|
m_updateTimeinfo = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,8 @@ template <class P, class V> bool Metadata::set(P& property, const V& value, QDat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Metadata::setUpdateDatetime(bool value) {
|
void Metadata::setUpdateDatetime(bool value)
|
||||||
|
{
|
||||||
m_updateDatetime = value;
|
m_updateDatetime = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,8 @@ Uuid::Uuid(const QByteArray& data)
|
|||||||
m_data = data;
|
m_data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
Uuid Uuid::random() {
|
Uuid Uuid::random()
|
||||||
|
{
|
||||||
return Uuid(Random::randomArray(Length));
|
return Uuid(Random::randomArray(Length));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,8 @@ DatabaseTabWidget::~DatabaseTabWidget()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DatabaseTabWidget::toggleTabbar() {
|
void DatabaseTabWidget::toggleTabbar()
|
||||||
|
{
|
||||||
if (count() > 1) {
|
if (count() > 1) {
|
||||||
if (!tabBar()->isVisible()) {
|
if (!tabBar()->isVisible()) {
|
||||||
tabBar()->show();
|
tabBar()->show();
|
||||||
@ -228,7 +229,8 @@ void DatabaseTabWidget::deleteDatabase(Database* db)
|
|||||||
delete db;
|
delete db;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DatabaseTabWidget::closeAllDatabases() {
|
bool DatabaseTabWidget::closeAllDatabases()
|
||||||
|
{
|
||||||
while (!m_dbList.isEmpty()) {
|
while (!m_dbList.isEmpty()) {
|
||||||
if (!closeDatabase()) {
|
if (!closeDatabase()) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -267,7 +267,8 @@ void MainWindow::databaseTabChanged(int tabIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent* event) {
|
void MainWindow::closeEvent(QCloseEvent* event)
|
||||||
|
{
|
||||||
if (!m_ui->tabWidget->closeAllDatabases()) {
|
if (!m_ui->tabWidget->closeAllDatabases()) {
|
||||||
event->ignore();
|
event->ignore();
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,8 @@ QByteArray CompositeKey::transform(const QByteArray& seed, quint64 rounds) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
QByteArray CompositeKey::transformKeyRaw(const QByteArray& key, const QByteArray& seed,
|
QByteArray CompositeKey::transformKeyRaw(const QByteArray& key, const QByteArray& seed,
|
||||||
quint64 rounds) {
|
quint64 rounds)
|
||||||
|
{
|
||||||
QByteArray iv(16, 0);
|
QByteArray iv(16, 0);
|
||||||
SymmetricCipher cipher(SymmetricCipher::Aes256, SymmetricCipher::Ecb,
|
SymmetricCipher cipher(SymmetricCipher::Aes256, SymmetricCipher::Ecb,
|
||||||
SymmetricCipher::Encrypt, seed, iv);
|
SymmetricCipher::Encrypt, seed, iv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user