mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-10 16:49:38 -04:00
Fix groupChanged signal not emitted in all cases.
This commit is contained in:
parent
b1db565bee
commit
4e2407b3ba
2 changed files with 8 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue