[CopyJob] Report results after finishing copy
ClosedPublic

Authored by broulik on Mar 7 2019, 10:09 AM.

Details

Summary

Currently, slotReport is called all the way at the end when in STATE_SETTING_DIR_ATTRIBUTES. However, slotReport does nothing in this state.
Instead, move it to before changing away from STATE_COPYING_FILES so that progress is correctly reported for a final time.

BUG: 407656

Test Plan

Opened Dolphin, Ctrl+C on a file, Ctrl+V it into the same folder, let it sit at the "Override?" prompt until the job view in Plasma showed up. Chose a different filename and continued.

Before, the job would finish without having reported any progress as the report timer never fired since that one file was copied super quickly. With this patch, the final progress is correct. The URL isn't updated in case of a rename but I bet it just needs a m_bURLDirty call somewhere in the conflict handler

Diff Detail

Repository
R241 KIO
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Mar 7 2019, 10:09 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 7 2019, 10:09 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.Mar 7 2019, 10:09 AM

Opened Dolphin, Ctrl+C on a file, Ctrl+V it into the same folder, let it sit at the "Override?" prompt until the job view in Plasma showed up. >Chose a different filename and continued.
[...]
The URL isn't updated in case of a rename but I bet it just needs a m_bURLDirty call somewhere in the conflict handler

I followed the steps for $HOME/foo.
Before: notification showed $HOME/foo
After: notification showed $HOME/foo1

Keeping or removing the line in D19586 had no effect at all.

dfaure requested changes to this revision.Mar 9 2019, 10:17 AM

It makes more sense to me to do the final report when we're fully done.
How about adding a case statement for STATE_SETTING_DIR_ATTRIBUTES to the switch in slotReport?

This is more future-proof in case we want to show progress while deleting dirs for instance.

This revision now requires changes to proceed.Mar 9 2019, 10:17 AM
broulik edited the summary of this revision. (Show Details)May 23 2019, 1:22 PM
dfaure accepted this revision.Jun 27 2019, 6:43 PM

OK I see what you mean, after looking more at slotReport().

This revision is now accepted and ready to land.Jun 27 2019, 6:43 PM
This revision was automatically updated to reflect the committed changes.