Skip to content

Fix 440122: Defer file overwrite check until the file name is fully known (with extension)

Both Export and Save As dialogs currently rely on the built-in ability of QFileDialog to do the overwrite check. But when we alter the file name later (like by adding the extension to the typed-in file name), this check does not work as expected as it have checked for the file without extension.

To fix this, the overwrite check in this path is moved below the code that infers the extension, and only then the confirmation dialog appears if required. To avoid the dialog popping up twice, the previous check is now inactivated by setting QFileDialog::DontConfirmOverwrite to true. To preserve the unchanged behavior of the KoFileDialog, inactivation is done via new boolean property.

I checked if the path builds and works as expected.

CCBUG:440122 BUG:440122

Merge request reports