From 5bf5b93836a8776dc969d5b54defdd85db1d3986 Mon Sep 17 00:00:00 2001 From: Carlo Teubner Date: Sat, 22 Jun 2024 10:28:41 +0100 Subject: [PATCH] Passkey importer: fix file picker parent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/gui/passkeys/PasskeyImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/passkeys/PasskeyImporter.cpp b/src/gui/passkeys/PasskeyImporter.cpp index 22435b99e..45ab48b25 100644 --- a/src/gui/passkeys/PasskeyImporter.cpp +++ b/src/gui/passkeys/PasskeyImporter.cpp @@ -39,7 +39,7 @@ void PasskeyImporter::importPasskey(QSharedPointer& 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; }