From 246bc0115e538c92e4f002d444cc502a1cea4dda Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Thu, 19 Apr 2012 00:25:57 +0200 Subject: [PATCH] More coding style fixes. --- src/core/Database.cpp | 12 ++++++++---- src/gui/DatabaseOpenDialog.cpp | 4 ++-- src/gui/MainWindow.cpp | 3 +-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/core/Database.cpp b/src/core/Database.cpp index 65ec5b84e..a50044355 100644 --- a/src/core/Database.cpp +++ b/src/core/Database.cpp @@ -75,14 +75,16 @@ Entry* Database::resolveEntry(const Uuid& uuid) Entry* Database::recFindEntry(const Uuid& uuid, Group* group) { Q_FOREACH (Entry* entry, group->entries()) { - if (entry->uuid() == uuid) + if (entry->uuid() == uuid) { return entry; + } } Q_FOREACH (Group* child, group->children()) { Entry* result = recFindEntry(uuid, child); - if (result) + if (result) { return result; + } } return 0; @@ -95,13 +97,15 @@ Group* Database::resolveGroup(const Uuid& uuid) Group* Database::recFindGroup(const Uuid& uuid, Group* group) { - if (group->uuid() == uuid) + if (group->uuid() == uuid) { return group; + } Q_FOREACH (Group* child, group->children()) { Group* result = recFindGroup(uuid, child); - if (result) + if (result) { return result; + } } return 0; diff --git a/src/gui/DatabaseOpenDialog.cpp b/src/gui/DatabaseOpenDialog.cpp index 335955147..829d64541 100644 --- a/src/gui/DatabaseOpenDialog.cpp +++ b/src/gui/DatabaseOpenDialog.cpp @@ -50,7 +50,7 @@ DatabaseOpenDialog::DatabaseOpenDialog(QFile* file, QString filename, QWidget* p connect(m_ui->buttonBox, SIGNAL(accepted()), SLOT(openDatabase())); connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(reject())); - QHash lastKeyFiles = config()->get("LastKeyFiles").toHash(); + QHash lastKeyFiles = config()->get("LastKeyFiles").toHash(); if (lastKeyFiles.contains(m_filename)) { m_ui->checkKeyFile->setChecked(true); m_ui->comboKeyFile->addItem(lastKeyFiles[m_filename].toString()); @@ -75,7 +75,7 @@ void DatabaseOpenDialog::openDatabase() masterKey.addKey(PasswordKey(m_ui->editPassword->text())); } - QHash lastKeyFiles = config()->get("LastKeyFiles").toHash(); + QHash lastKeyFiles = config()->get("LastKeyFiles").toHash(); if (m_ui->checkKeyFile->isChecked()) { FileKey key; diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index c50e81553..b7cb3719f 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -56,8 +56,7 @@ MainWindow::~MainWindow() void MainWindow::setMenuActionState(int index) { - if (m_ui->tabWidget->currentIndex() != -1) - { + if (m_ui->tabWidget->currentIndex() != -1) { m_ui->actionDatabaseClose->setEnabled(true); DatabaseWidget* dbWidget = m_ui->tabWidget->currentDatabaseWidget(); Q_ASSERT(dbWidget);