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)
{
model = new GroupModel(db, this);
QTreeView::setModel(model);
m_model = new GroupModel(db, this);
QTreeView::setModel(m_model);
recInitExpanded(db->rootGroup());
setHeaderHidden(true);
}
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));
}
void GroupView::recInitExpanded(const Group* group)
{
QModelIndex index = model->index(group);
QModelIndex index = m_model->index(group);
setExpanded(index, group->isExpanded());
Q_FOREACH (const Group* child, group->children()) {

View File

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