Skip to content

Commit

Permalink
Passkey importer: fix file picker parent
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
c4rlo authored and droidmonkey committed Jun 22, 2024
1 parent 07f565a commit 5bf5b93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/passkeys/PasskeyImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5bf5b93

Please sign in to comment.