Coding style++

This commit is contained in:
Felix Geyer 2010-08-24 23:12:01 +02:00
parent 194a081bd7
commit ef52e98ee6
6 changed files with 16 additions and 8 deletions

View File

@ -40,10 +40,12 @@ QImage Entry::icon() const
{ {
Q_ASSERT(m_iconNumber != 0 || !m_customIcon.isNull()); Q_ASSERT(m_iconNumber != 0 || !m_customIcon.isNull());
if (m_iconNumber == 0) if (m_iconNumber == 0) {
return m_db->customIcon(m_customIcon); return m_db->customIcon(m_customIcon);
else }
else {
return Database::icon(m_iconNumber); return Database::icon(m_iconNumber);
}
} }
int Entry::iconNumber() const int Entry::iconNumber() const

View File

@ -50,10 +50,12 @@ QString Group::notes() const
QImage Group::icon() const QImage Group::icon() const
{ {
if (m_iconNumber == 0) if (m_iconNumber == 0) {
return m_db->customIcon(m_customIcon); return m_db->customIcon(m_customIcon);
else }
else {
return Database::icon(m_iconNumber); return Database::icon(m_iconNumber);
}
} }
int Group::iconNumber() const int Group::iconNumber() const

View File

@ -19,7 +19,8 @@
#include "Database.h" #include "Database.h"
Metadata::Metadata(Database* parent) : QObject(parent) Metadata::Metadata(Database* parent)
: QObject(parent)
{ {
m_generator = "KeePassX"; m_generator = "KeePassX";
m_maintenanceHistoryDays = 365; m_maintenanceHistoryDays = 365;

View File

@ -21,7 +21,8 @@
const int Uuid::length = 16; const int Uuid::length = 16;
Uuid::Uuid() : m_data(length, 0) Uuid::Uuid()
: m_data(length, 0)
{ {
} }

View File

@ -20,7 +20,8 @@
#include "core/Database.h" #include "core/Database.h"
#include "core/Group.h" #include "core/Group.h"
GroupModel::GroupModel(Database* db, QObject* parent) : QAbstractItemModel(parent) GroupModel::GroupModel(Database* db, QObject* parent)
: QAbstractItemModel(parent)
{ {
m_root = db->rootGroup(); m_root = db->rootGroup();
connect(db, SIGNAL(groupDataChanged(Group*)), SLOT(groupDataChanged(Group*))); connect(db, SIGNAL(groupDataChanged(Group*)), SLOT(groupDataChanged(Group*)));

View File

@ -21,7 +21,8 @@
#include "core/Group.h" #include "core/Group.h"
#include "gui/GroupModel.h" #include "gui/GroupModel.h"
GroupView::GroupView(Database* db, QWidget* parent) : QTreeView(parent) GroupView::GroupView(Database* db, QWidget* parent)
: QTreeView(parent)
{ {
m_model = new GroupModel(db, this); m_model = new GroupModel(db, this);
QTreeView::setModel(m_model); QTreeView::setModel(m_model);