mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-06 12:25:11 -04:00
Pressing escape quits search
This commit is contained in:
parent
bb70edfdb3
commit
6ccae6cc37
2 changed files with 2 additions and 2 deletions
|
@ -41,6 +41,7 @@ SearchWidget::SearchWidget(QWidget *parent)
|
||||||
connect(this, SIGNAL(escapePressed()), m_ui->searchEdit, SLOT(clear()));
|
connect(this, SIGNAL(escapePressed()), m_ui->searchEdit, SLOT(clear()));
|
||||||
|
|
||||||
new QShortcut(Qt::CTRL + Qt::Key_F, this, SLOT(searchFocus()), nullptr, Qt::ApplicationShortcut);
|
new QShortcut(Qt::CTRL + Qt::Key_F, this, SLOT(searchFocus()), nullptr, Qt::ApplicationShortcut);
|
||||||
|
new QShortcut(Qt::Key_Escape, m_ui->searchEdit, SLOT(clear()), nullptr, Qt::ApplicationShortcut);
|
||||||
|
|
||||||
m_ui->searchEdit->installEventFilter(this);
|
m_ui->searchEdit->installEventFilter(this);
|
||||||
|
|
||||||
|
|
|
@ -481,8 +481,7 @@ void TestGui::testSearch()
|
||||||
QCOMPARE(entry->title(), origTitle.append("_edited"));
|
QCOMPARE(entry->title(), origTitle.append("_edited"));
|
||||||
|
|
||||||
// Cancel search, should return to normal view
|
// Cancel search, should return to normal view
|
||||||
QTest::mouseClick(searchTextEdit, Qt::LeftButton);
|
QTest::keyClick(m_mainWindow, Qt::Key_Escape);
|
||||||
QTest::keyClick(searchTextEdit, Qt::Key_Escape);
|
|
||||||
QTRY_COMPARE(m_dbWidget->currentMode(), DatabaseWidget::ViewMode);
|
QTRY_COMPARE(m_dbWidget->currentMode(), DatabaseWidget::ViewMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue