Skip to content

Display only one confirmation dialog when files in archive are modified

Jan Paul Batrina requested to merge work/jbatrina/bug-382606 into master

Since QFileSystemWatcher::fileChanged is emitted everytime flush() is called on a file, slotWatchedFileModified gets called multiple times, especially for large files. (see https://bugreports.qt.io/browse/QTBUG-8244)

If no new fileChanged signal is emitted 200ms after the last one, we interpret that as "the file has been fully written"

200ms was arbitrarily chosen to be a balance between a long enough flush interval and "instant" feedback to the user, but it can be fine tuned later.

BUG: 382606

This MR also removes the overwrite confirmation dialog for changed files so that only one dialog is shown per modified file.

(Also sorry for intruding the main repo, I heard that testing with branches in the main repo a bit simpler)

Edited by Jan Paul Batrina

Merge request reports