mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
clang-format Database.cpp
This commit is contained in:
parent
e0e8521eb9
commit
574c5cf1b2
@ -224,14 +224,12 @@ bool Database::setTransformRounds(quint64 rounds)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Database::setKey(const CompositeKey& key, const QByteArray& transformSeed,
|
bool Database::setKey(const CompositeKey& key, const QByteArray& transformSeed, bool updateChangedTime)
|
||||||
bool updateChangedTime)
|
|
||||||
{
|
{
|
||||||
bool ok;
|
bool ok;
|
||||||
QString errorString;
|
QString errorString;
|
||||||
|
|
||||||
QByteArray transformedMasterKey =
|
QByteArray transformedMasterKey = key.transform(transformSeed, transformRounds(), &ok, &errorString);
|
||||||
key.transform(transformSeed, transformRounds(), &ok, &errorString);
|
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -293,23 +291,21 @@ void Database::recycleEntry(Entry* entry)
|
|||||||
createRecycleBin();
|
createRecycleBin();
|
||||||
}
|
}
|
||||||
entry->setGroup(metadata()->recycleBin());
|
entry->setGroup(metadata()->recycleBin());
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
delete entry;
|
delete entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Database::recycleGroup(Group* group)
|
void Database::recycleGroup(Group* group)
|
||||||
{
|
{
|
||||||
if (m_metadata->recycleBinEnabled()) {
|
if (m_metadata->recycleBinEnabled()) {
|
||||||
if (!m_metadata->recycleBin()) {
|
if (!m_metadata->recycleBin()) {
|
||||||
createRecycleBin();
|
createRecycleBin();
|
||||||
}
|
}
|
||||||
group->setParent(metadata()->recycleBin());
|
group->setParent(metadata()->recycleBin());
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
delete group;
|
delete group;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Database::emptyRecycleBin()
|
void Database::emptyRecycleBin()
|
||||||
@ -398,7 +394,6 @@ Database* Database::openDatabaseFile(QString fileName, CompositeKey key)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return db;
|
return db;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Database* Database::unlockFromStdin(QString databaseFilename)
|
Database* Database::unlockFromStdin(QString databaseFilename)
|
||||||
@ -412,7 +407,6 @@ Database* Database::unlockFromStdin(QString databaseFilename)
|
|||||||
QString line = inputTextStream.readLine();
|
QString line = inputTextStream.readLine();
|
||||||
CompositeKey key = CompositeKey::readFromLine(line);
|
CompositeKey key = CompositeKey::readFromLine(line);
|
||||||
return Database::openDatabaseFile(databaseFilename, key);
|
return Database::openDatabaseFile(databaseFilename, key);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Database::saveToFile(QString filePath)
|
QString Database::saveToFile(QString filePath)
|
||||||
@ -437,5 +431,4 @@ QString Database::saveToFile(QString filePath)
|
|||||||
} else {
|
} else {
|
||||||
return saveFile.errorString();
|
return saveFile.errorString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user