Fix bug 188857 "Ark follows settings in the Extraction dialog even when it was not used"

Review Request #6736 - Created June 30, 2011 and updated

Information
Scott Leggett
kde
188857
Reviewers
kdeutils
Simple patch to display an error dialog and stop the ExtractJob when cancelling extraction of an archive in the 'overwrite query' dialog.

Fixes bug 188857 "Ark follows settings in the Extraction dialog even when it was not used"
Extracted, then cancelled files which use the three different plugin types (in use): cli, libarchive, libsinglefile.
Raphael Kubo da Costa
Sorry for taking so long to answer.

The patch is on the right way, but showing an error message for that looks kind of annoying, even though we currently need to send an error message for things to work.

I suggest changing Job::onError() to make it accept an optional error number instead of the unused details parameter (it could default to UserDefinedError), so we can pass an error number which represents cancellation that would make the error dialog not be shown. It would look like this:

 * In kerfuffle/archive.h, create an enum like the one in kdelibs/kio/kio/global.h with error numbers.
 * Make onError accept an error code instead of the details parameter.
 * In the Part code, do not show the error message if the job was cancelled/aborted.
This is not needed; the Q_UNUSED macro already expands to something which ends with a trailing ";"
Loading...