mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-11 16:33:02 -04:00
parent
5786e2620a
commit
bf906a7867
4 changed files with 21 additions and 6 deletions
|
@ -43,7 +43,7 @@ EntryView::EntryView(QWidget* parent)
|
|||
// QAbstractItemView::startDrag() uses this property as the default drag action
|
||||
setDefaultDropAction(Qt::MoveAction);
|
||||
|
||||
connect(this, SIGNAL(activated(QModelIndex)), SLOT(emitEntryActivated(QModelIndex)));
|
||||
connect(this, SIGNAL(activated(QModelIndex)), SLOT(emitEntryActivationSignal(QModelIndex)));
|
||||
connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SIGNAL(entrySelectionChanged()));
|
||||
connect(m_model, SIGNAL(switchedToEntryListMode()), SLOT(switchToEntryListMode()));
|
||||
connect(m_model, SIGNAL(switchedToGroupMode()), SLOT(switchToGroupMode()));
|
||||
|
@ -66,9 +66,16 @@ bool EntryView::inEntryListMode()
|
|||
return m_inEntryListMode;
|
||||
}
|
||||
|
||||
void EntryView::emitEntryActivated(const QModelIndex& index)
|
||||
void EntryView::emitEntryActivationSignal(const QModelIndex& index)
|
||||
{
|
||||
Q_EMIT entryActivated(entryFromIndex(index));
|
||||
Entry* entry = entryFromIndex(index);
|
||||
|
||||
if (m_sortModel->mapToSource(index).column() == 3) {
|
||||
Q_EMIT openUrl(entry);
|
||||
}
|
||||
else {
|
||||
Q_EMIT entryActivated(entry);
|
||||
}
|
||||
}
|
||||
|
||||
void EntryView::setModel(QAbstractItemModel* model)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue