[Differential] [Request, 29 lines] D2511: [Slideshow Wallpaper] Don't hardcode list of supported image formats

broulik (Kai Uwe Broulik) noreply at phabricator.kde.org
Sat Aug 20 22:14:43 UTC 2016


broulik created this revision.
broulik added a reviewer: Plasma.
broulik set the repository for this revision to rPLASMAWORKSPACE Plasma Workspace.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  Instead use QImageReader to get the glob patterns of all supported formats, similar to what the "Open image" dialog in the regular image wallpaper did.
  
  Also, make use of QDir::setNameFilters rather than manually filtering out non-matching files.

TEST PLAN
  As reported in https://www.reddit.com/r/kde/comments/4yqv68/webp_as_wallpaper/ and thanks for seeking the proper code snippets.
  
  Created a test folder with a few .jpg and .webp files and some other junk as well as two sub folders with images in them.
  Slideshow would pick up the .jpg and .webp images as well as the images from the subdirectories but not the other junk files.

REPOSITORY
  rPLASMAWORKSPACE Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D2511

AFFECTED FILES
  wallpapers/image/backgroundlistmodel.cpp
  wallpapers/image/backgroundlistmodel.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: broulik, #plasma
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160820/6e602e63/attachment.html>


More information about the Plasma-devel mailing list