From 3252ef72d4bb14d1175495ed0be1381fd3b7ec2a Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 17 Dec 2023 11:39:46 +0100 Subject: [PATCH] QFileDialog/win: pass only filename to IFileDialog::SetFileName() One more place were we should only pass the filename instead the full path to IFileDialog::SetFileName() Amends 19c701d370512e81d1b934f899b03ae0c2e6953f Pick-to: 6.6 Task-number: QTBUG-47159 Change-Id: I3ac36eb2b6b6fe84fe6985590da882b1d5733efa Reviewed-by: Axel Spoerl (cherry picked from commit 2643210bd6e07aa1d8ae78c109592bdc2545b074) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index 2c71114690c..5197bcc31d1 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -1551,7 +1551,7 @@ QWindowsNativeDialogBase *QWindowsFileDialogHelper::createNativeDialog() if (!info.isDir()) result->selectFile(info.fileName()); } else { - result->selectFile(url.path()); // TODO url.fileName() once it exists + result->selectFile(url.fileName()); } } // No need to select initialNameFilter if mode is Dir