Merge lp:~vthompson/music-app/fix-console-errors into lp:music-app/trusty

Proposed by Victor Thompson
Status: Merged
Approved by: Victor Thompson
Approved revision: 397
Merged at revision: 403
Proposed branch: lp:~vthompson/music-app/fix-console-errors
Merge into: lp:music-app/trusty
Diff against target: 57 lines (+6/-7)
4 files modified
MusicNowPlaying.qml (+1/-1)
MusicaddtoPlaylist.qml (+2/-2)
music-app.qml (+1/-1)
playlists.js (+2/-3)
To merge this branch: bzr merge lp:~vthompson/music-app/fix-console-errors
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
David Planella Approve
Andrew Hayzen Approve
Review via email: mp+212832@code.launchpad.net

Commit message

* Fix various console errors
* Allow Playlist count to be updated

Description of the change

The aim of this MR is to fix various console errors which might be preventing other logic that follows this errors from taking place--which could affect other areas of the app. Additionally, it was noticed that the playlist count is no longer being updated since the move to Qt 5.2. This has been fixed as well.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

LGTM

review: Approve
Revision history for this message
David Planella (dpm) wrote :

Looks good to me too!

Revision history for this message
David Planella (dpm) :
review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
397. By Victor Thompson

Merge from trunk and fix conflict

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MusicNowPlaying.qml'
2--- MusicNowPlaying.qml 2014-03-28 00:38:01 +0000
3+++ MusicNowPlaying.qml 2014-03-28 16:22:04 +0000
4@@ -650,7 +650,7 @@
5
6 function onCollapseExpand(indexCol)
7 {
8- if ((indexCol === index || indexCol === -1) && expandable !== undefined && expandable.visible === true)
9+ if (indexCol === -1 && expandable !== undefined && expandable.visible === true)
10 {
11 customdebug("auto collapse")
12 expandable.visible = false
13
14=== modified file 'MusicaddtoPlaylist.qml'
15--- MusicaddtoPlaylist.qml 2014-03-27 23:33:35 +0000
16+++ MusicaddtoPlaylist.qml 2014-03-28 16:22:04 +0000
17@@ -86,8 +86,8 @@
18 chosenElement.album,
19 chosenElement.cover,
20 "","","","")
21- var count = Playlists.getPlaylistCount(name) // get the new count
22- playlistModel.model.set(index, {"count": count.toString()}) // update number ot tracks in playlist
23+ count = Playlists.getPlaylistCount(name) // get the new count
24+ playlistModel.model.set(index, {"count": count}) // update number ot tracks in playlist
25 onDoneClicked: PopupUtils.close(addtoPlaylist)
26 }
27
28
29=== modified file 'music-app.qml'
30--- music-app.qml 2014-03-28 01:00:11 +0000
31+++ music-app.qml 2014-03-28 16:22:04 +0000
32@@ -1104,7 +1104,7 @@
33 // Set the models in the tab to allow/disallow loading
34 function allowLoading(tabToLoad, state)
35 {
36- if (tabToLoad.model !== undefined)
37+ if (tabToLoad !== undefined && tabToLoad.model !== undefined)
38 {
39 for (var i=0; i < tabToLoad.model.length; i++)
40 {
41
42=== modified file 'playlists.js'
43--- playlists.js 2014-01-15 00:32:16 +0000
44+++ playlists.js 2014-03-28 16:22:04 +0000
45@@ -87,10 +87,9 @@
46 try {
47 db.transaction(function(tx) {
48 // Get the maximum id for the playlist
49- var rs = tx.executeSql('SELECT MAX(id) FROM playlist WHERE playlist=?;',[playlist]);
50-
51+ var rs = tx.executeSql('SELECT id FROM playlist ORDER BY id DESC LIMIT 1');
52 // Set res to max id or -1 if no ids exist
53- res = rs.rows.length === 0 ? -1 : rs.rows.item(0).id;
54+ if (rs.rows.length > 0) res = rs.rows.item(0).id;
55 })
56 } catch(e) {
57 return res;

Subscribers

People subscribed via source and target branches

to status/vote changes: