[KUiServerJobTracker] Update destUrl before finishing the job
ClosedPublic

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

Details

Summary

It is not really meant to be changing after the job started, but there can be instances where the job first has to examine the real destination and only can then set it and start.
This patch ensures that at least when the job has finished, the destUrl is correct so that the job view can provide a more useful finished notification.

Test Plan

In plasma-browser-integration I only get the destination after the job has been started.

Now the destUrl I have in plasma notifications is correct when the job is finished

Diff Detail

Repository
R288 KJobWidgets
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Mar 7 2019, 10:00 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 7 2019, 10:00 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.Mar 7 2019, 10:00 AM
broulik edited the test plan for this revision. (Show Details)

Looks ok, but the commit log is missing an actual use case. In which case does the dest URL change, exactly?

Isn't "where the job first has to examine the real destination and only can then set it and start." and "In plasma-browser-integration I only get the destination after the job has been started." sufficient?

I must be missing something.

How can a job "examine the real destination" without having the URL of the destination?
Is there some redirection happening or something?

In plasma-browser-integration I get a download started event by the browser right away and only when the user chose a download location I will get notified of that, so the job does not have a destUrl in the beginning.

dfaure accepted this revision.Mar 11 2019, 1:20 PM

Ah! See that's the information I was missing (download job + user chooses interactively). In KIO we typically ask for a dest first, and only then start a job.

If you could add a word in the commit log about the fact that user chooses interactively the dest as part of the job itself, that would be ideal.

This revision is now accepted and ready to land.Mar 11 2019, 1:20 PM
This revision was automatically updated to reflect the committed changes.