mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 00:39:43 -05:00
Support Ctrl+Enter shortcut on all dialogs with QPushButtonBox (#3039)
* Remove specific action from EditEntryWidget * Implement key handling at the lowest level * Fix #3036
This commit is contained in:
parent
cb442f8c6e
commit
acd6847cd4
@ -35,7 +35,8 @@ void DialogyWidget::keyPressEvent(QKeyEvent* e)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (!e->modifiers() || (e->modifiers() & Qt::KeypadModifier && e->key() == Qt::Key_Enter)) {
|
if (!e->modifiers() || e->modifiers() == Qt::ControlModifier
|
||||||
|
|| (e->modifiers() & Qt::KeypadModifier && e->key() == Qt::Key_Enter)) {
|
||||||
switch (e->key()) {
|
switch (e->key()) {
|
||||||
case Qt::Key_Enter:
|
case Qt::Key_Enter:
|
||||||
case Qt::Key_Return:
|
case Qt::Key_Return:
|
||||||
|
@ -152,11 +152,6 @@ void EditEntryWidget::setupMain()
|
|||||||
m_mainUi->expirePresets->setMenu(createPresetsMenu());
|
m_mainUi->expirePresets->setMenu(createPresetsMenu());
|
||||||
connect(m_mainUi->expirePresets->menu(), SIGNAL(triggered(QAction*)), this, SLOT(useExpiryPreset(QAction*)));
|
connect(m_mainUi->expirePresets->menu(), SIGNAL(triggered(QAction*)), this, SLOT(useExpiryPreset(QAction*)));
|
||||||
|
|
||||||
QAction* action = new QAction(this);
|
|
||||||
action->setShortcut(Qt::CTRL | Qt::Key_Return);
|
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(commitEntry()));
|
|
||||||
this->addAction(action);
|
|
||||||
|
|
||||||
m_mainUi->passwordGenerator->hide();
|
m_mainUi->passwordGenerator->hide();
|
||||||
m_mainUi->passwordGenerator->reset();
|
m_mainUi->passwordGenerator->reset();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user