mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-25 17:01:17 -05: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);
|
setHeaderHidden(true);
|
||||||
setUniformRowHeights(true);
|
setUniformRowHeights(true);
|
||||||
|
|
||||||
connect(this, SIGNAL(clicked(const QModelIndex&)), SLOT(emitGroupChanged(const QModelIndex&)));
|
connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
||||||
|
SLOT(emitGroupChanged()));
|
||||||
|
|
||||||
recInitExpanded(db->rootGroup());
|
recInitExpanded(db->rootGroup());
|
||||||
|
|
||||||
@ -72,3 +73,8 @@ void GroupView::setModel(QAbstractItemModel* model)
|
|||||||
Q_UNUSED(model);
|
Q_UNUSED(model);
|
||||||
Q_ASSERT(false);
|
Q_ASSERT(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GroupView::emitGroupChanged()
|
||||||
|
{
|
||||||
|
Q_EMIT groupChanged(currentGroup());
|
||||||
|
}
|
||||||
|
@ -39,6 +39,7 @@ Q_SIGNALS:
|
|||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void expandedChanged(const QModelIndex& index);
|
void expandedChanged(const QModelIndex& index);
|
||||||
void emitGroupChanged(const QModelIndex& index);
|
void emitGroupChanged(const QModelIndex& index);
|
||||||
|
void emitGroupChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void recInitExpanded(Group* group);
|
void recInitExpanded(Group* group);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user