mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix groupChanged signal not emitted in all cases.
This commit is contained in:
parent
b1db565bee
commit
4e2407b3ba
@ -31,7 +31,8 @@ GroupView::GroupView(Database* db, QWidget* parent)
|
||||
setHeaderHidden(true);
|
||||
setUniformRowHeights(true);
|
||||
|
||||
connect(this, SIGNAL(clicked(const QModelIndex&)), SLOT(emitGroupChanged(const QModelIndex&)));
|
||||
connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
||||
SLOT(emitGroupChanged()));
|
||||
|
||||
recInitExpanded(db->rootGroup());
|
||||
|
||||
@ -72,3 +73,8 @@ void GroupView::setModel(QAbstractItemModel* model)
|
||||
Q_UNUSED(model);
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
|
||||
void GroupView::emitGroupChanged()
|
||||
{
|
||||
Q_EMIT groupChanged(currentGroup());
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ Q_SIGNALS:
|
||||
private Q_SLOTS:
|
||||
void expandedChanged(const QModelIndex& index);
|
||||
void emitGroupChanged(const QModelIndex& index);
|
||||
void emitGroupChanged();
|
||||
|
||||
private:
|
||||
void recInitExpanded(Group* group);
|
||||
|
Loading…
Reference in New Issue
Block a user