mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-24 00:19:57 -05:00
Close popups when database is locked
This commit is contained in:
parent
a2caa31eca
commit
0f8d2986af
@ -296,6 +296,7 @@ QString BrowserService::storeKey(const QString& key)
|
||||
|
||||
do {
|
||||
QInputDialog keyDialog;
|
||||
connect(m_dbTabWidget, SIGNAL(databaseLocked(DatabaseWidget*)), &keyDialog, SLOT(reject()));
|
||||
keyDialog.setWindowTitle(tr("KeePassXC: New key association request"));
|
||||
keyDialog.setLabelText(tr("You have received an association request for the above key.\n\n"
|
||||
"If you would like to allow it access to your KeePassXC database,\n"
|
||||
@ -310,7 +311,7 @@ QString BrowserService::storeKey(const QString& key)
|
||||
|
||||
id = keyDialog.textValue();
|
||||
|
||||
if (ok != QDialog::Accepted || id.isEmpty()) {
|
||||
if (ok != QDialog::Accepted || id.isEmpty() || !isDatabaseOpened()) {
|
||||
hideWindow();
|
||||
return {};
|
||||
}
|
||||
@ -406,6 +407,11 @@ QJsonArray BrowserService::findMatchingEntries(const QString& id,
|
||||
return QJsonArray();
|
||||
}
|
||||
|
||||
// Ensure that database is not locked when the popup was visible
|
||||
if (!isDatabaseOpened()) {
|
||||
return QJsonArray();
|
||||
}
|
||||
|
||||
// Sort results
|
||||
pwEntries = sortEntries(pwEntries, host, submitUrl);
|
||||
|
||||
@ -760,6 +766,7 @@ bool BrowserService::confirmEntries(QList<Entry*>& pwEntriesToConfirm,
|
||||
|
||||
m_dialogActive = true;
|
||||
BrowserAccessControlDialog accessControlDialog;
|
||||
connect(m_dbTabWidget, SIGNAL(databaseLocked(DatabaseWidget*)), &accessControlDialog, SLOT(reject()));
|
||||
accessControlDialog.setUrl(url);
|
||||
accessControlDialog.setItems(pwEntriesToConfirm);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user