mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-18 09:52:46 -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
ff89a05743
commit
29feb5da79
1 changed files with 1 additions and 1 deletions
|
|
@ -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 filter = QString("%1 (*.passkey);;%2 (*)").arg(tr("Passkey file"), tr("All files"));
|
||||||
auto fileName =
|
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()) {
|
if (fileName.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue