mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-23 16:10:00 -05:00
Pass parent to browser popups
This commit is contained in:
parent
3f78e5f7a2
commit
a01400e88d
@ -270,7 +270,7 @@ QJsonObject BrowserService::createNewGroup(const QString& groupName)
|
||||
return result;
|
||||
}
|
||||
|
||||
auto dialogResult = MessageBox::warning(nullptr,
|
||||
auto dialogResult = MessageBox::warning(m_currentDatabaseWidget,
|
||||
tr("KeePassXC: Create a new group"),
|
||||
tr("A request for creating a new group \"%1\" has been received.\n"
|
||||
"Do you want to create this group?\n")
|
||||
@ -443,7 +443,7 @@ QList<Entry*> BrowserService::confirmEntries(QList<Entry*>& entriesToConfirm,
|
||||
|
||||
m_dialogActive = true;
|
||||
updateWindowState();
|
||||
BrowserAccessControlDialog accessControlDialog;
|
||||
BrowserAccessControlDialog accessControlDialog(m_currentDatabaseWidget);
|
||||
|
||||
connect(m_currentDatabaseWidget, SIGNAL(databaseLockRequested()), &accessControlDialog, SLOT(reject()));
|
||||
|
||||
@ -504,7 +504,7 @@ QList<Entry*> BrowserService::confirmEntries(QList<Entry*>& entriesToConfirm,
|
||||
void BrowserService::showPasswordGenerator(const KeyPairMessage& keyPairMessage)
|
||||
{
|
||||
if (!m_passwordGenerator) {
|
||||
m_passwordGenerator.reset(PasswordGeneratorWidget::popupGenerator());
|
||||
m_passwordGenerator.reset(PasswordGeneratorWidget::popupGenerator(m_currentDatabaseWidget));
|
||||
|
||||
connect(m_passwordGenerator.data(), &PasswordGeneratorWidget::closed, m_passwordGenerator.data(), [=] {
|
||||
if (!m_passwordGenerator->isPasswordGenerated()) {
|
||||
@ -556,7 +556,7 @@ QString BrowserService::storeKey(const QString& key)
|
||||
QString id;
|
||||
|
||||
do {
|
||||
QInputDialog keyDialog;
|
||||
QInputDialog keyDialog(m_currentDatabaseWidget);
|
||||
connect(m_currentDatabaseWidget, SIGNAL(databaseLockRequested()), &keyDialog, SLOT(reject()));
|
||||
keyDialog.setWindowTitle(tr("KeePassXC: New key association request"));
|
||||
keyDialog.setLabelText(tr("You have received an association request for the following database:\n%1\n\n"
|
||||
@ -579,7 +579,7 @@ QString BrowserService::storeKey(const QString& key)
|
||||
|
||||
contains = db->metadata()->customData()->contains(CustomData::BrowserKeyPrefix + id);
|
||||
if (contains) {
|
||||
dialogResult = MessageBox::warning(nullptr,
|
||||
dialogResult = MessageBox::warning(m_currentDatabaseWidget,
|
||||
tr("KeePassXC: Overwrite existing key?"),
|
||||
tr("A shared encryption key with the name \"%1\" "
|
||||
"already exists.\nDo you want to overwrite it?")
|
||||
@ -695,7 +695,7 @@ bool BrowserService::updateEntry(const EntryParameters& entryParameters, const Q
|
||||
MessageBox::Button dialogResult = MessageBox::No;
|
||||
if (!browserSettings()->alwaysAllowUpdate()) {
|
||||
raiseWindow();
|
||||
dialogResult = MessageBox::question(nullptr,
|
||||
dialogResult = MessageBox::question(m_currentDatabaseWidget,
|
||||
tr("KeePassXC: Update Entry"),
|
||||
tr("Do you want to update the information in %1 - %2?")
|
||||
.arg(QUrl(entryParameters.siteUrl).host(), username),
|
||||
@ -732,7 +732,7 @@ bool BrowserService::deleteEntry(const QString& uuid)
|
||||
return false;
|
||||
}
|
||||
|
||||
auto dialogResult = MessageBox::warning(nullptr,
|
||||
auto dialogResult = MessageBox::warning(m_currentDatabaseWidget,
|
||||
tr("KeePassXC: Delete entry"),
|
||||
tr("A request for deleting entry \"%1\" has been received.\n"
|
||||
"Do you want to delete the entry?\n")
|
||||
@ -1218,7 +1218,7 @@ QSharedPointer<Database> BrowserService::selectedDatabase()
|
||||
}
|
||||
}
|
||||
|
||||
BrowserEntrySaveDialog browserEntrySaveDialog;
|
||||
BrowserEntrySaveDialog browserEntrySaveDialog(m_currentDatabaseWidget);
|
||||
int openDatabaseCount = browserEntrySaveDialog.setItems(databaseWidgets, m_currentDatabaseWidget);
|
||||
if (openDatabaseCount > 1) {
|
||||
int res = browserEntrySaveDialog.exec();
|
||||
|
Loading…
x
Reference in New Issue
Block a user