Merge lp:~artmello/gallery-app/gallery-app-fix_crash_adding_files into lp:gallery-app
- gallery-app-fix_crash_adding_files
- Merge into trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Gustavo Pichorim Boiko | ||||||||
Approved revision: | no longer in the source branch. | ||||||||
Merged at revision: | 1244 | ||||||||
Proposed branch: | lp:~artmello/gallery-app/gallery-app-fix_crash_adding_files | ||||||||
Merge into: | lp:gallery-app | ||||||||
Diff against target: |
124 lines (+43/-9) 4 files modified
rc/qml/Components/MediaSelector.qml (+1/-0) rc/qml/OrganicView/OrganicMediaList.qml (+31/-4) src/media/media-collection.cpp (+1/-1) tests/autopilot/gallery_app/emulators/media_selector.py (+10/-4) |
||||||||
To merge this branch: | bzr merge lp:~artmello/gallery-app/gallery-app-fix_crash_adding_files | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Gustavo Pichorim Boiko (community) | Approve | ||
Review via email: mp+265731@code.launchpad.net |
Commit message
Use a Loader for OrganicMediaLst delegates to avoid crashes when loading multiple files
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1225
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1225
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1226
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1226
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1227
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1227
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1226
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:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1228
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1228
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1230
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:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1231
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1231
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Gustavo Pichorim Boiko (boiko) wrote : | # |
Looks good!
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1234
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1235
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:
http://
- 1234. By Launchpad Translations on behalf of phablet-team
-
Launchpad automatic translations update.
- 1235. By Launchpad Translations on behalf of phablet-team
-
Launchpad automatic translations update.
- 1236. By Arthur Mello
-
Do not ignore file if gallery is not able to read its metadata.
Add libqt5svg5 as build dep to run unittests. Fixes: #1452572, #1470638
Approved by: Ugo Riboni - 1237. By Arthur Mello
-
Request only one thumbnail to be displayed at SingleMediaViewer to avoid reloading at fullscreen toggle Fixes: #1494383
Approved by: Florian Boucault - 1238. By CI Train Bot Account
-
Releasing 0.0.67+
15.10.20150923- 0ubuntu1 - 1239. By Launchpad Translations on behalf of phablet-team
-
Launchpad automatic translations update.
- 1240. By Launchpad Translations on behalf of phablet-team
-
Launchpad automatic translations update.
- 1241. By Launchpad Translations on behalf of phablet-team
-
Launchpad automatic translations update.
- 1242. By Launchpad Translations on behalf of phablet-team
-
Launchpad automatic translations update.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1236
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:
http://
- 1243. By Arthur Mello
-
Update QML code to work with Ubuntu.Components 1.3 Fixes: #1508363
Approved by: Renato Araujo Oliveira Filho - 1244. By Arthur Mello
-
Use a Loader for OrganicMediaLst delegates to avoid crashes when loading multiple files Fixes: #1470109, #1475210
Approved by: Gustavo Pichorim Boiko
Preview Diff
1 | === modified file 'rc/qml/Components/MediaSelector.qml' |
2 | --- rc/qml/Components/MediaSelector.qml 2014-08-27 02:20:58 +0000 |
3 | +++ rc/qml/Components/MediaSelector.qml 2015-11-05 12:35:25 +0000 |
4 | @@ -69,6 +69,7 @@ |
5 | } |
6 | |
7 | delegate: OrganicMediaList { |
8 | + objectName: "mediaSelectorList" + index |
9 | width: mediaSelector.width |
10 | event: model.event |
11 | selection: mediaSelector.selection |
12 | |
13 | === modified file 'rc/qml/OrganicView/OrganicMediaList.qml' |
14 | --- rc/qml/OrganicView/OrganicMediaList.qml 2015-07-27 22:48:49 +0000 |
15 | +++ rc/qml/OrganicView/OrganicMediaList.qml 2015-11-05 12:35:25 +0000 |
16 | @@ -124,7 +124,10 @@ |
17 | id: thumbnailDelegate |
18 | Item { |
19 | objectName: "eventPhoto" |
20 | + property variant model |
21 | + property int index: 0 |
22 | property int patternPhoto: index % __mediaPerPattern |
23 | + property alias thumbnailLoaded: thumbnail.visible |
24 | |
25 | width: __photoWidth[patternPhoto] |
26 | height: __photoSize[patternPhoto] |
27 | @@ -185,7 +188,7 @@ |
28 | } |
29 | |
30 | Connections { |
31 | - target: model.mediaSource |
32 | + target: model && model.mediaSource ? model.mediaSource : null |
33 | onDataChanged: { |
34 | // data changed but filename didn't, so we need to bypass the qml image |
35 | // cache by tacking a timestamp to the filename so sees it as different. |
36 | @@ -197,7 +200,7 @@ |
37 | // Display a play icon if the thumbnail is from a video |
38 | source: "../../img/icon_play.png" |
39 | anchors.centerIn: parent |
40 | - visible: mediaSource.type === MediaSource.Video |
41 | + visible: model.mediaSource.type === MediaSource.Video |
42 | } |
43 | |
44 | OrganicItemInteraction { |
45 | @@ -259,7 +262,7 @@ |
46 | |
47 | maximumFlickVelocity: units.gu(300) |
48 | flickDeceleration: maximumFlickVelocity / 3 |
49 | - cacheBuffer: 0 |
50 | + cacheBuffer: width |
51 | |
52 | model: MediaCollectionModel { |
53 | id: mediaModel |
54 | @@ -271,7 +274,31 @@ |
55 | |
56 | header: eventHeader |
57 | spacing: __margin |
58 | - delegate: thumbnailDelegate |
59 | + delegate: Loader { |
60 | + id: thumbnailLoader |
61 | + objectName: "thumbnailLoader" + index |
62 | + |
63 | + property int patternPhoto: index % __mediaPerPattern |
64 | + |
65 | + sourceComponent: eventView.header.status == Component.Ready ? thumbnailDelegate : undefined |
66 | + asynchronous: true |
67 | + |
68 | + width: __photoWidth[patternPhoto] |
69 | + height: __photoSize[patternPhoto] |
70 | + |
71 | + Binding { |
72 | + target: thumbnailLoader.item |
73 | + property: "model" |
74 | + value: model |
75 | + when: thumbnailLoader.status == Loader.Ready |
76 | + } |
77 | + Binding { |
78 | + target: thumbnailLoader.item |
79 | + property: "index" |
80 | + value: index |
81 | + when: thumbnailLoader.status == Loader.Ready |
82 | + } |
83 | + } |
84 | footer: Item { |
85 | width: eventView.rightBuffer + |
86 | __footerWidth[mediaModel.count % __mediaPerPattern] + |
87 | |
88 | === modified file 'src/media/media-collection.cpp' |
89 | --- src/media/media-collection.cpp 2015-01-26 16:43:17 +0000 |
90 | +++ src/media/media-collection.cpp 2015-11-05 12:35:25 +0000 |
91 | @@ -57,7 +57,7 @@ |
92 | const QDateTime &exptime_b = qobject_cast<MediaSource*>(b)->exposureDateTime(); |
93 | |
94 | return (exptime_a == exptime_b) ? |
95 | - (DataCollection::defaultDataObjectComparator(a, b)) : |
96 | + (!DataCollection::defaultDataObjectComparator(a, b)) : |
97 | (exptime_a < exptime_b); |
98 | } |
99 | |
100 | |
101 | === modified file 'tests/autopilot/gallery_app/emulators/media_selector.py' |
102 | --- tests/autopilot/gallery_app/emulators/media_selector.py 2014-04-30 23:28:14 +0000 |
103 | +++ tests/autopilot/gallery_app/emulators/media_selector.py 2015-11-05 12:35:25 +0000 |
104 | @@ -21,10 +21,16 @@ |
105 | def get_second_photo(self): |
106 | """Return the second photo item""" |
107 | selector = self.get_media_selector() |
108 | - medias = selector.select_many("OrganicItemInteraction", |
109 | - objectName="eventsViewPhoto") |
110 | - # needs fixing: can't rely no list ordering lp:1247711 |
111 | - return medias[0] |
112 | + |
113 | + # get the first row in the selector |
114 | + mediaRow = selector.wait_select_single(objectName="mediaSelectorList0") |
115 | + |
116 | + # get the loader for the second item |
117 | + thumbnailLoader = mediaRow.wait_select_single(objectName="thumbnailLoader1") |
118 | + |
119 | + # return the item itself |
120 | + return thumbnailLoader.wait_select_single(objectName="eventPhoto", |
121 | + thumbnailLoaded=True) |
122 | |
123 | def ensure_fully_open(self): |
124 | """Ensure media selector is fully open""" |
Just one remark, but other than that the code looks good