Merge lp:~renatofilho/address-book-app/fix-1522010 into lp:address-book-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Bill Filler
Approved revision: 516
Merged at revision: 514
Proposed branch: lp:~renatofilho/address-book-app/fix-1522010
Merge into: lp:address-book-app
Diff against target: 74 lines (+17/-1)
3 files modified
src/imports/Settings/SettingsPage.qml (+3/-0)
src/imports/Ubuntu/Contacts/SIMCardImportPage.qml (+4/-1)
src/imports/Ubuntu/Contacts/SIMList.qml (+10/-0)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/fix-1522010
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+279274@code.launchpad.net

Commit message

Check for sim card contacts on "GSettings.schemaChanged" signal.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
515. By Renato Araujo Oliveira Filho

Check for sim card contacts on "GSettings.schemaChanged" signal.

516. By Renato Araujo Oliveira Filho

Remove unused var.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/Settings/SettingsPage.qml'
2--- src/imports/Settings/SettingsPage.qml 2015-10-26 13:18:11 +0000
3+++ src/imports/Settings/SettingsPage.qml 2015-12-02 15:54:38 +0000
4@@ -84,9 +84,12 @@
5 id: simCardImportPageComponent
6
7 ContactsUI.SIMCardImportPage {
8+ id: importFromSimPage
9+
10 objectName: "simCardImportPage"
11 targetModel: root.contactListModel
12 sims: simList.sims
13+ onImportCompleted: pageStack.removePages(root)
14 }
15 }
16 }
17
18=== modified file 'src/imports/Ubuntu/Contacts/SIMCardImportPage.qml'
19--- src/imports/Ubuntu/Contacts/SIMCardImportPage.qml 2015-10-26 13:18:11 +0000
20+++ src/imports/Ubuntu/Contacts/SIMCardImportPage.qml 2015-12-02 15:54:38 +0000
21@@ -31,6 +31,8 @@
22 property var targetModel: null
23 property var sims: []
24
25+ signal importCompleted()
26+
27 title: i18n.dtr("address-book-app", "SIM contacts")
28
29 function lockedSIMCount()
30@@ -145,6 +147,7 @@
31 if (vcardFile != "" && !contactImported) {
32 contactImported = true
33 contactList.listModel.importContacts(vcardFile)
34+
35 }
36 }
37 onVcardFileChanged: {
38@@ -167,7 +170,7 @@
39 if ((error === ContactModel.ExportNoError) && targetModel) {
40 targetModel.importContacts(url)
41 }
42- pageStack.removePages(root)
43+ root.importCompleted()
44 }
45 }
46
47
48=== modified file 'src/imports/Ubuntu/Contacts/SIMList.qml'
49--- src/imports/Ubuntu/Contacts/SIMList.qml 2015-10-26 13:18:11 +0000
50+++ src/imports/Ubuntu/Contacts/SIMList.qml 2015-12-02 15:54:38 +0000
51@@ -39,6 +39,10 @@
52
53 function createQML (modems)
54 {
55+ if (!phoneSettings.simNames) {
56+ return
57+ }
58+
59 var component = Qt.createComponent(Qt.resolvedUrl("Ofono.qml"));
60
61 sims.forEach(function (sim) {
62@@ -72,6 +76,12 @@
63 GSettings {
64 id: phoneSettings
65 schema.id: "com.ubuntu.phone"
66+ onChanged: {
67+ if (key === "simNames") {
68+ root.createQML(ofonoManager.modems.slice(0).sort())
69+ }
70+ }
71+ onSchemaChanged: root.createQML(ofonoManager.modems.slice(0).sort())
72 }
73
74 OfonoManager {

Subscribers

People subscribed via source and target branches