mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-12-05 08:12:35 -08:00
Browser: Fix cancel with database unlock dialog (#11435)
This commit is contained in:
1 parent
bff0b93f5f
commit
2fc24be331
5 files changed
+23
-1
No files matched your search
@@ -86,6 +86,10 @@ BrowserService::BrowserService()
|
||||
connect(getMainWindow(), &MainWindow::databaseUnlocked, this, &BrowserService::databaseUnlocked);
|
||||
connect(getMainWindow(), &MainWindow::databaseLocked, this, &BrowserService::databaseLocked);
|
||||
connect(getMainWindow(), &MainWindow::activeDatabaseChanged, this, &BrowserService::activeDatabaseChanged);
|
||||
connect(getMainWindow(),
|
||||
&MainWindow::databaseUnlockDialogFinished,
|
||||
this,
|
||||
&BrowserService::handleDatabaseUnlockDialogFinished);
|
||||
|
||||
setEnabled(browserSettings()->isEnabled());
|
||||
}
|
||||
@@ -1678,6 +1682,15 @@ void BrowserService::activeDatabaseChanged(DatabaseWidget* dbWidget)
|
||||
m_currentDatabaseWidget = dbWidget;
|
||||
}
|
||||
|
||||
void BrowserService::handleDatabaseUnlockDialogFinished(bool accepted, DatabaseWidget* dbWidget)
|
||||
{
|
||||
// User canceled the database open dialog
|
||||
if (dbWidget && !accepted && m_bringToFrontRequested) {
|
||||
m_bringToFrontRequested = false;
|
||||
hideWindow();
|
||||
}
|
||||
}
|
||||
|
||||
void BrowserService::processClientMessage(QLocalSocket* socket, const QJsonObject& message)
|
||||
{
|
||||
auto clientID = message["clientID"].toString();
|
||||
|
||||
@@ -145,6 +145,7 @@ public slots:
|
||||
|
||||
private slots:
|
||||
void processClientMessage(QLocalSocket* socket, const QJsonObject& message);
|
||||
void handleDatabaseUnlockDialogFinished(bool accepted, DatabaseWidget* dbWidget);
|
||||
|
||||
private:
|
||||
enum Access
|
||||
|
||||
Reference in new issue
Block a user