Merge pull request #603 from hifi/fix-search-leak

🔒 Fix search information leak
This commit is contained in:
Janek Bevendorff 2017-05-29 00:19:25 +02:00 committed by GitHub
commit 79ba3a28e6
3 changed files with 5 additions and 2 deletions

View File

@ -1064,6 +1064,7 @@ void DatabaseWidget::lock()
m_entryBeforeLock = m_entryView->currentEntry()->uuid();
}
endSearch();
clearAllWidgets();
m_unlockDatabaseWidget->load(m_filename);
setCurrentWidget(m_unlockDatabaseWidget);

View File

@ -219,9 +219,11 @@ MainWindow::MainWindow()
m_actionMultiplexer.connect(SIGNAL(entryContextMenuRequested(QPoint)),
this, SLOT(showEntryContextMenu(QPoint)));
// Notify search when the active database changes
// Notify search when the active database changes or gets locked
connect(m_ui->tabWidget, SIGNAL(activateDatabaseChanged(DatabaseWidget*)),
search, SLOT(databaseChanged(DatabaseWidget*)));
connect(m_ui->tabWidget, SIGNAL(databaseLocked(DatabaseWidget*)),
search, SLOT(databaseChanged()));
connect(m_ui->tabWidget, SIGNAL(tabNameChanged()),
SLOT(updateWindowTitle()));

View File

@ -51,7 +51,7 @@ signals:
void enterPressed();
public slots:
void databaseChanged(DatabaseWidget* dbWidget);
void databaseChanged(DatabaseWidget* dbWidget = 0);
private slots:
void startSearchTimer();