Merge lp://qastaging/~jamesh/gallery-app/thumbnail-mtime into lp://qastaging/gallery-app
Status: | Merged |
---|---|
Approved by: | Arthur Mello |
Approved revision: | 1236 |
Merged at revision: | 1257 |
Proposed branch: | lp://qastaging/~jamesh/gallery-app/thumbnail-mtime |
Merge into: | lp://qastaging/gallery-app |
Diff against target: |
176 lines (+30/-39) 6 files modified
rc/qml/AlbumViewer/AlbumInternals/FramePortrait.qml (+2/-18) rc/qml/Components/MediaGrid.qml (+1/-10) rc/qml/MediaViewer/MediaViewer.qml (+4/-1) rc/qml/OrganicView/OrganicMediaList.qml (+1/-10) src/media/media-source.cpp (+18/-0) src/media/media-source.h (+4/-0) |
To merge this branch: | bzr merge lp://qastaging/~jamesh/gallery-app/thumbnail-mtime |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Arthur Mello (community) | Approve | ||
PS Jenkins bot | continuous-integration | Needs Fixing | |
Review via email: mp+268185@code.qastaging.launchpad.net |
Commit message
Use the file's last modified date for the "at" parameter when invoking the thumbnailer to avoid needlessly reloading thumbnails.
Description of the change
Currently gallery-app appends an "?at=" parameter to the image:/
At the moment it sets this parameter to Date.now(), which achieves this goal but also results in the thumbnail being reloaded when the file _hasn't_ been changed. What we really want is something that will change when the files contents change. The file's mtime is an obvious candidate here, so that's what I've done here:
1. Add a "lastModified" property to the MediaSource object.
2. set the "at" parameter to mediaSource.
3. Remove the onDataChanged signal connections in the QML, since I've set the dataChanged signal as the notifier for the lastModified property.
FAILED: Continuous integration, rev:1234 jenkins. qa.ubuntu. com/job/ gallery- app-ci/ 1175/ jenkins. qa.ubuntu. com/job/ gallery- app-vivid- amd64-ci/ 103 jenkins. qa.ubuntu. com/job/ gallery- app-vivid- armhf-ci/ 103 jenkins. qa.ubuntu. com/job/ gallery- app-vivid- armhf-ci/ 103/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ gallery- app-vivid- i386-ci/ 103 jenkins. qa.ubuntu. com/job/ generic- click-autopilot -vivid- touch/256 jenkins. qa.ubuntu. com/job/ generic- click-autopilot -runner- mako/908 jenkins. qa.ubuntu. com/job/ generic- click-builder- vivid-armhf/ 722 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 22609
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/gallery- app-ci/ 1175/rebuild
http://