Skip to content
Commit c5c9528b authored by Friedemann Kleint's avatar Friedemann Kleint Committed by Agata Cacko
Browse files

Fix no warning for overwriting files in non-native dialogs

Before this commit, in case a user wanted to Save As "filename",
Krita would add an extension based on the selected filter.
In native file dialogs, Krita will warn user if it would
overwrite the file. In non-native file dialogs though
(based on Qt widgets), it wouldn't happen.

This commit makes it possible to append the extension before
the non-native file dialog is closed, which enables warning
before overwriting the file inside the file dialog.

This commit applies the patch from Qt bug report:
https://bugreports.qt.io/browse/QTBUG-27186
https://codereview.qt-project.org/c/qt/qtbase/+/109815/

Author of the patch and info from the original commit:
Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Task-number: QTBUG-27186
Change-Id: I3ece055b328dfe361b93e68954cb0a33bd9e7d94
"The Windows native dialog prefers the name filter over the
defaultSuffix (uses the same mechanism), I chose the convervative
approach here (defaultSuffix takes precedence)."

CCBUG:412651
parent 43e934da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment