Avoid double overwrite check

Authored by meven on May 25 2019, 1:34 PM.



QFileDialog has by default an overwrite check, avoid the second one done by kate.

Related to D21401

Diff Detail

R40 Kate
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
meven created this revision.May 25 2019, 1:34 PM
Restricted Application added a project: Kate. · View Herald TranscriptMay 25 2019, 1:34 PM
Restricted Application added a subscriber: kwrite-devel. · View Herald Transcript
meven requested review of this revision.May 25 2019, 1:34 PM

Is this correct in all cases? Do we support KIO here? Does that depend on platform integration, i.e. gnome or Windows?

apol added a subscriber: apol.May 25 2019, 3:06 PM

That should work on every platform. In fact, it would be a bug if any platform didn't do it.

See QFileDialog::DontConfirmOverwrite.

cullmann accepted this revision.May 25 2019, 6:19 PM

Ok, then lets do this.

This revision is now accepted and ready to land.May 25 2019, 6:19 PM
This revision was automatically updated to reflect the committed changes.

As wm4 just pointed out on irc, this might need fallback code for older versions of KF, no? Currently Kate has KF5_DEP_VERSION 5.40, so you might either want to bump that min dep to match the version of ktexteditor which does the check itself, or add some (runtime/buildtime) check for the KF version.

Hmm, doesn't this only rely on the behavior of QFileDialog::getSaveFileUrl?