Skip to content

Commit

Permalink
clang-format Database.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
louib committed Jun 15, 2017
1 parent e0e8521 commit 574c5cf
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions src/core/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,12 @@ bool Database::setTransformRounds(quint64 rounds)
return true;
}

bool Database::setKey(const CompositeKey& key, const QByteArray& transformSeed,
bool updateChangedTime)
bool Database::setKey(const CompositeKey& key, const QByteArray& transformSeed, bool updateChangedTime)
{
bool ok;
QString errorString;

QByteArray transformedMasterKey =
key.transform(transformSeed, transformRounds(), &ok, &errorString);
QByteArray transformedMasterKey = key.transform(transformSeed, transformRounds(), &ok, &errorString);
if (!ok) {
return false;
}
Expand Down Expand Up @@ -293,23 +291,21 @@ void Database::recycleEntry(Entry* entry)
createRecycleBin();
}
entry->setGroup(metadata()->recycleBin());
}
else {
} else {
delete entry;
}
}

void Database::recycleGroup(Group* group)
{
if (m_metadata->recycleBinEnabled()) {
if (m_metadata->recycleBinEnabled()) {
if (!m_metadata->recycleBin()) {
createRecycleBin();
}
group->setParent(metadata()->recycleBin());
}
else {
} else {
delete group;
}
}
}

void Database::emptyRecycleBin()
Expand Down Expand Up @@ -398,7 +394,6 @@ Database* Database::openDatabaseFile(QString fileName, CompositeKey key)
}

return db;

}

Database* Database::unlockFromStdin(QString databaseFilename)
Expand All @@ -412,7 +407,6 @@ Database* Database::unlockFromStdin(QString databaseFilename)
QString line = inputTextStream.readLine();
CompositeKey key = CompositeKey::readFromLine(line);
return Database::openDatabaseFile(databaseFilename, key);

}

QString Database::saveToFile(QString filePath)
Expand All @@ -437,5 +431,4 @@ QString Database::saveToFile(QString filePath)
} else {
return saveFile.errorString();
}

}

0 comments on commit 574c5cf

Please sign in to comment.