mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-03 11:41:03 -05:00
replaced hard function call with signal connection
Signed-off-by: Ettore Dreucci <ettore.dreucci@gmail.com>
This commit is contained in:
parent
03bd346432
commit
12b5cf0331
@ -465,10 +465,6 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
|||||||
|
|
||||||
m_searchWidgetAction->setEnabled(true);
|
m_searchWidgetAction->setEnabled(true);
|
||||||
|
|
||||||
//if not already in search mode focus the search widget and select all its content
|
|
||||||
if (!inSearch) {
|
|
||||||
m_ui->toolBar->findChild<SearchWidget *>("SearchWidget")->searchFocus();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DatabaseWidget::EditMode:
|
case DatabaseWidget::EditMode:
|
||||||
|
@ -119,7 +119,8 @@ void SearchWidget::databaseChanged(DatabaseWidget* dbWidget)
|
|||||||
if (dbWidget != nullptr) {
|
if (dbWidget != nullptr) {
|
||||||
// Set current search text from this database
|
// Set current search text from this database
|
||||||
m_ui->searchEdit->setText(dbWidget->getCurrentSearch());
|
m_ui->searchEdit->setText(dbWidget->getCurrentSearch());
|
||||||
|
// Keyboard focus on search widget at database unlocking
|
||||||
|
connect(dbWidget, SIGNAL(unlockedDatabase()), this, SLOT(searchFocus()));
|
||||||
// Enforce search policy
|
// Enforce search policy
|
||||||
emit caseSensitiveChanged(m_actionCaseSensitive->isChecked());
|
emit caseSensitiveChanged(m_actionCaseSensitive->isChecked());
|
||||||
emit limitGroupChanged(m_actionLimitGroup->isChecked());
|
emit limitGroupChanged(m_actionLimitGroup->isChecked());
|
||||||
|
@ -55,13 +55,13 @@ signals:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void databaseChanged(DatabaseWidget* dbWidget = 0);
|
void databaseChanged(DatabaseWidget* dbWidget = 0);
|
||||||
void searchFocus();
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void startSearchTimer();
|
void startSearchTimer();
|
||||||
void startSearch();
|
void startSearch();
|
||||||
void updateCaseSensitive();
|
void updateCaseSensitive();
|
||||||
void updateLimitGroup();
|
void updateLimitGroup();
|
||||||
|
void searchFocus();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QScopedPointer<Ui::SearchWidget> m_ui;
|
const QScopedPointer<Ui::SearchWidget> m_ui;
|
||||||
|
Loading…
Reference in New Issue
Block a user