mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-07 06:22:44 -04:00
Pass parent to browser popups
This commit is contained in:
parent
3f78e5f7a2
commit
a01400e88d
1 changed files with 8 additions and 8 deletions
|
@ -270,7 +270,7 @@ QJsonObject BrowserService::createNewGroup(const QString& groupName)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto dialogResult = MessageBox::warning(nullptr,
|
auto dialogResult = MessageBox::warning(m_currentDatabaseWidget,
|
||||||
tr("KeePassXC: Create a new group"),
|
tr("KeePassXC: Create a new group"),
|
||||||
tr("A request for creating a new group \"%1\" has been received.\n"
|
tr("A request for creating a new group \"%1\" has been received.\n"
|
||||||
"Do you want to create this group?\n")
|
"Do you want to create this group?\n")
|
||||||
|
@ -443,7 +443,7 @@ QList<Entry*> BrowserService::confirmEntries(QList<Entry*>& entriesToConfirm,
|
||||||
|
|
||||||
m_dialogActive = true;
|
m_dialogActive = true;
|
||||||
updateWindowState();
|
updateWindowState();
|
||||||
BrowserAccessControlDialog accessControlDialog;
|
BrowserAccessControlDialog accessControlDialog(m_currentDatabaseWidget);
|
||||||
|
|
||||||
connect(m_currentDatabaseWidget, SIGNAL(databaseLockRequested()), &accessControlDialog, SLOT(reject()));
|
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)
|
void BrowserService::showPasswordGenerator(const KeyPairMessage& keyPairMessage)
|
||||||
{
|
{
|
||||||
if (!m_passwordGenerator) {
|
if (!m_passwordGenerator) {
|
||||||
m_passwordGenerator.reset(PasswordGeneratorWidget::popupGenerator());
|
m_passwordGenerator.reset(PasswordGeneratorWidget::popupGenerator(m_currentDatabaseWidget));
|
||||||
|
|
||||||
connect(m_passwordGenerator.data(), &PasswordGeneratorWidget::closed, m_passwordGenerator.data(), [=] {
|
connect(m_passwordGenerator.data(), &PasswordGeneratorWidget::closed, m_passwordGenerator.data(), [=] {
|
||||||
if (!m_passwordGenerator->isPasswordGenerated()) {
|
if (!m_passwordGenerator->isPasswordGenerated()) {
|
||||||
|
@ -556,7 +556,7 @@ QString BrowserService::storeKey(const QString& key)
|
||||||
QString id;
|
QString id;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
QInputDialog keyDialog;
|
QInputDialog keyDialog(m_currentDatabaseWidget);
|
||||||
connect(m_currentDatabaseWidget, SIGNAL(databaseLockRequested()), &keyDialog, SLOT(reject()));
|
connect(m_currentDatabaseWidget, SIGNAL(databaseLockRequested()), &keyDialog, SLOT(reject()));
|
||||||
keyDialog.setWindowTitle(tr("KeePassXC: New key association request"));
|
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"
|
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);
|
contains = db->metadata()->customData()->contains(CustomData::BrowserKeyPrefix + id);
|
||||||
if (contains) {
|
if (contains) {
|
||||||
dialogResult = MessageBox::warning(nullptr,
|
dialogResult = MessageBox::warning(m_currentDatabaseWidget,
|
||||||
tr("KeePassXC: Overwrite existing key?"),
|
tr("KeePassXC: Overwrite existing key?"),
|
||||||
tr("A shared encryption key with the name \"%1\" "
|
tr("A shared encryption key with the name \"%1\" "
|
||||||
"already exists.\nDo you want to overwrite it?")
|
"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;
|
MessageBox::Button dialogResult = MessageBox::No;
|
||||||
if (!browserSettings()->alwaysAllowUpdate()) {
|
if (!browserSettings()->alwaysAllowUpdate()) {
|
||||||
raiseWindow();
|
raiseWindow();
|
||||||
dialogResult = MessageBox::question(nullptr,
|
dialogResult = MessageBox::question(m_currentDatabaseWidget,
|
||||||
tr("KeePassXC: Update Entry"),
|
tr("KeePassXC: Update Entry"),
|
||||||
tr("Do you want to update the information in %1 - %2?")
|
tr("Do you want to update the information in %1 - %2?")
|
||||||
.arg(QUrl(entryParameters.siteUrl).host(), username),
|
.arg(QUrl(entryParameters.siteUrl).host(), username),
|
||||||
|
@ -732,7 +732,7 @@ bool BrowserService::deleteEntry(const QString& uuid)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto dialogResult = MessageBox::warning(nullptr,
|
auto dialogResult = MessageBox::warning(m_currentDatabaseWidget,
|
||||||
tr("KeePassXC: Delete entry"),
|
tr("KeePassXC: Delete entry"),
|
||||||
tr("A request for deleting entry \"%1\" has been received.\n"
|
tr("A request for deleting entry \"%1\" has been received.\n"
|
||||||
"Do you want to delete the entry?\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);
|
int openDatabaseCount = browserEntrySaveDialog.setItems(databaseWidgets, m_currentDatabaseWidget);
|
||||||
if (openDatabaseCount > 1) {
|
if (openDatabaseCount > 1) {
|
||||||
int res = browserEntrySaveDialog.exec();
|
int res = browserEntrySaveDialog.exec();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue