mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-25 07:19:42 -05:00
Passkey importer: fix file picker parent
When selecting "Database → Import Passkey", we show a file picker. Previously, we did not specify a parent widget for it. This could have undesirable effects on its presentation. (For example, with the Sway tiling Wayland compositor, it would show the file picker as a tiled window rather than a floating one.) Fix the issue by passing in the parent widget. This is also in line with all other usages of FileDialog::getOpenFileName() in this project.
This commit is contained in:
parent
07f565aa49
commit
5bf5b93836
@ -39,7 +39,7 @@ void PasskeyImporter::importPasskey(QSharedPointer<Database>& database, Entry* e
|
||||
{
|
||||
auto filter = QString("%1 (*.passkey);;%2 (*)").arg(tr("Passkey file"), tr("All files"));
|
||||
auto fileName =
|
||||
fileDialog()->getOpenFileName(nullptr, tr("Open passkey file"), FileDialog::getLastDir("passkey"), filter);
|
||||
fileDialog()->getOpenFileName(m_parent, tr("Open passkey file"), FileDialog::getLastDir("passkey"), filter);
|
||||
if (fileName.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user