Prefix object attribute with "m_".

This commit is contained in:
Felix Geyer 2010-08-23 20:57:38 +02:00
parent 97ca81f316
commit d2e677c7f4
2 changed files with 5 additions and 6 deletions

View File

@ -23,21 +23,21 @@
GroupView::GroupView(Database* db, QWidget* parent) : QTreeView(parent) GroupView::GroupView(Database* db, QWidget* parent) : QTreeView(parent)
{ {
model = new GroupModel(db, this); m_model = new GroupModel(db, this);
QTreeView::setModel(model); QTreeView::setModel(m_model);
recInitExpanded(db->rootGroup()); recInitExpanded(db->rootGroup());
setHeaderHidden(true); setHeaderHidden(true);
} }
void GroupView::expandedChanged(const QModelIndex& index) void GroupView::expandedChanged(const QModelIndex& index)
{ {
Group* group = const_cast<Group*>(model->groupFromIndex(index)); Group* group = const_cast<Group*>(m_model->groupFromIndex(index));
group->setExpanded(isExpanded(index)); group->setExpanded(isExpanded(index));
} }
void GroupView::recInitExpanded(const Group* group) void GroupView::recInitExpanded(const Group* group)
{ {
QModelIndex index = model->index(group); QModelIndex index = m_model->index(group);
setExpanded(index, group->isExpanded()); setExpanded(index, group->isExpanded());
Q_FOREACH (const Group* child, group->children()) { Q_FOREACH (const Group* child, group->children()) {

View File

@ -38,8 +38,7 @@ private Q_SLOTS:
private: private:
void recInitExpanded(const Group* group); void recInitExpanded(const Group* group);
Database* db; GroupModel* m_model;
GroupModel* model;
}; };
#endif // KEEPASSX_GROUPVIEW_H #endif // KEEPASSX_GROUPVIEW_H