Coding style fixes.

This commit is contained in:
Felix Geyer 2012-06-30 00:22:07 +02:00
parent ca13ad8d25
commit ee3bc89a54
9 changed files with 22 additions and 11 deletions

View File

@ -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);
}
@ -382,7 +383,8 @@ void Entry::removeHistoryItems(QList<Entry*> historyEntries)
}
}
void Entry::truncateHistory() {
void Entry::truncateHistory()
{
const Database* db = database();
if (!db) {

View File

@ -87,7 +87,8 @@ void EntryAttachments::clear()
Q_EMIT modified();
}
int EntryAttachments::attachmentsSize(QList<QByteArray>* foundAttachements) {
int EntryAttachments::attachmentsSize(QList<QByteArray>* foundAttachements)
{
int size = 0;
QMapIterator<QString, QByteArray> i(m_attachments);

View File

@ -223,7 +223,8 @@ void EntryAttributes::clear()
Q_EMIT modified();
}
int EntryAttributes::attributesSize() {
int EntryAttributes::attributesSize()
{
int size = 0;
QMapIterator<QString, QString> i(m_attributes);

View File

@ -78,7 +78,8 @@ void Group::updateTimeinfo()
}
}
void Group::setUpdateTimeinfo(bool value) {
void Group::setUpdateTimeinfo(bool value)
{
m_updateTimeinfo = value;
}

View File

@ -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;
}

View File

@ -35,7 +35,8 @@ Uuid::Uuid(const QByteArray& data)
m_data = data;
}
Uuid Uuid::random() {
Uuid Uuid::random()
{
return Uuid(Random::randomArray(Length));
}

View File

@ -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;

View File

@ -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();
}

View File

@ -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);