Fixed loading of the wallpapers in the activity switcher
ClosedPublic

Authored by ivan on Sep 18 2016, 6:34 PM.

Details

Summary
  • Created an asynchronous image provider to return wallpaper thumbnails
  • Fixed the code that fetches the activity backgrounds from the config file
  • Removed thumbnail cashing since we are relying on KIO now
  • Removed the fun callback-based code from the QML/JavaScript side

BUG:360034

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ivan updated this revision to Diff 6802.Sep 18 2016, 6:34 PM
ivan retitled this revision from to Fixed loading of the wallpapers in the activity switcher.
ivan updated this object.
ivan edited the test plan for this revision. (Show Details)
ivan added reviewers: Plasma, davidedmundson, mart.
Restricted Application added a project: Plasma. · View Herald TranscriptSep 18 2016, 6:34 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart accepted this revision.Sep 19 2016, 11:01 AM
mart edited edge metadata.
mart added inline comments.
imports/activitymanager/switcherbackend.cpp
156

could this have the implementation after the class definition, just for immediate readability?

This revision is now accepted and ready to land.Sep 19 2016, 11:01 AM
imports/activitymanager/switcherbackend.cpp
161

"The requestedSize corresponds to the Image::sourceSize requested by an Image item. If requestedSize is a valid size, the image returned should be of that size."

source size isn't set which puts you always in this path

181

why not ScaledAndCached?

191

is this needed?

  1. KIO is set to scaled anyway, so will resize it.
  2. the QML code can resize the image at an openGL level by setting an appropriate fillMode.

The above two will keep aspect ratio properly.

mart added inline comments.Sep 19 2016, 12:01 PM
imports/activitymanager/switcherbackend.cpp
161

isn't the size of the geometry of the image Item?

ivan added inline comments.Sep 20 2016, 2:21 PM
imports/activitymanager/switcherbackend.cpp
156

Strange preference, but ok :)

181

save=true, so it should be cached.

'save - if the image should be cached for later use'

191

Probably not, will remove.

ivan updated this revision to Diff 6830.Sep 20 2016, 2:21 PM
ivan edited edge metadata.

Fixed complaints

This revision was automatically updated to reflect the committed changes.