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

Task-number: QTBUG-47159
Change-Id: I3ac36eb2b6b6fe84fe6985590da882b1d5733efa
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 2643210bd6e07aa1d8ae78c109592bdc2545b074)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3252ef72d4bb14d1175495ed0be1381fd3b7ec2a)
This commit is contained in:
Christian Ehrlicher 2023-12-17 11:39:46 +01:00 committed by Qt Cherry-pick Bot
parent b791b19d3d
commit 55d4ee6586

View File

@ -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