Diffusion Krita c5c9528b1d2c

Fix no warning for overwriting files in non-native dialogs

Authored by Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> on Oct 14 2019, 7:49 PM.

Description

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

Details

Committed
tymondOct 30 2019, 5:19 PM
Parents
R37:43e934da6279: Merge branch 'master' of invent.kde.org:kde/krita
Branches
Unknown
Tags
Unknown
tymond committed R37:c5c9528b1d2c: Fix no warning for overwriting files in non-native dialogs (authored by Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>).Oct 30 2019, 5:19 PM