Fix wallpaper destination path
ClosedPublic

Authored by trmdi on Wed, Jan 8, 3:46 PM.

Details

Summary
  • Correct the destination path when downloading images.
  • Switch from FileCopyJob to CopyJob to allow showing file overwrite dialog.

BUG: 379469

Test Plan

Drop files from Firefox to the desktop to set the wallpaper successfully.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
trmdi created this revision.Wed, Jan 8, 3:46 PM
Restricted Application added a project: Plasma. · View Herald TranscriptWed, Jan 8, 3:46 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
trmdi requested review of this revision.Wed, Jan 8, 3:46 PM
trmdi updated this revision to Diff 73115.Thu, Jan 9, 6:11 AM
  • Improve code
mart added a subscriber: mart.Fri, Jan 10, 12:20 PM
mart added inline comments.
wallpapers/image/image.cpp
558

this is for first run when ~/.local/share/wallpapers isn't there yet?

559

I would prefer it to ask before owerwriting

trmdi added inline comments.Fri, Jan 10, 12:40 PM
wallpapers/image/image.cpp
558

This is to check if the directory is available before copying, otherwise FileCopyJob would fail.

mart accepted this revision.Fri, Jan 10, 12:49 PM
This revision is now accepted and ready to land.Fri, Jan 10, 12:49 PM
trmdi added inline comments.Fri, Jan 10, 1:57 PM
wallpapers/image/image.cpp
559

Do I need to modify this or just land it now?

trmdi updated this revision to Diff 73217.Fri, Jan 10, 5:16 PM
  • Switch from FileCopyJob to CopyJob to allow showing file overwrite dialog
trmdi edited the summary of this revision. (Show Details)Fri, Jan 10, 5:18 PM
trmdi edited the summary of this revision. (Show Details)
trmdi added a comment.Fri, Jan 10, 5:21 PM

@mart
Are you ok with this now ?

trmdi marked 4 inline comments as done.Fri, Jan 10, 5:23 PM
trmdi added a comment.Wed, Jan 15, 4:36 PM

Ping. Could I land this now?

ngraham accepted this revision.Wed, Jan 15, 5:02 PM

Yep, go ahead.

This revision was automatically updated to reflect the committed changes.