Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.2.10, 6.5.3, 6.6.1
-
Windows 10 22H2, MSVC 2019 x64
-
1cc20d181 (dev), d340459e7 (6.7), 025c130c1 (6.6), 6e2239381 (tqtc/lts-6.5)
-
G&UI Finishing 2023
Description
According to https://doc.qt.io/qt-6/qml-qtquick-dialogs-filedialog.html#options-prop, attempting to select an existing file for saving should produce a confirmation prompt about overwriting the file.
However, this is not the case for the non-native dialog.
Code
import QtQuick import QtQuick.Dialogs Window { width: 640 height: 480 visible: true FileDialog { id: dlg fileMode: FileDialog.SaveFile options: FileDialog.DontUseNativeDialog onAccepted: console.log("Selected", selectedFile) } Component.onCompleted: dlg.open() }
Expected outcomes
When you select an existing file, you'll be prompted about overwriting it. This behaviour occurs with the native Windows dialog.
Actual outcomes
When you select an existing file, no confirmation is requested.
Attachments
For Gerrit Dashboard: QTBUG-119916 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
524497,12 | FileDialog: prompt the user when selecting an existing file | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
527355,2 | FileDialog: prompt the user when selecting an existing file | 6.7 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
527506,2 | FileDialog: prompt the user when selecting an existing file | 6.6 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
527594,2 | FileDialog: prompt the user when selecting an existing file | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |