Merge lp:~ken-vandine/ubuntu-system-settings/lp1364452 into lp:ubuntu-system-settings

Proposed by Ken VanDine
Status: Merged
Approved by: Ken VanDine
Approved revision: 1508
Merged at revision: 1507
Proposed branch: lp:~ken-vandine/ubuntu-system-settings/lp1364452
Merge into: lp:ubuntu-system-settings
Diff against target: 222 lines (+1/-173)
5 files modified
plugins/about/CMakeLists.txt (+0/-2)
plugins/about/PageComponent.qml (+1/-18)
plugins/about/PhoneNumber.qml (+0/-42)
plugins/about/PhoneNumbers.qml (+0/-96)
tests/autopilot/ubuntu_system_settings/tests/test_about.py (+0/-15)
To merge this branch: bzr merge lp:~ken-vandine/ubuntu-system-settings/lp1364452
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Jonas G. Drange (community) Approve
Review via email: mp+268482@code.launchpad.net

Commit message

Don't show the phone number in the about page, that is now provided by address-book-app

Description of the change

Don't show the phone number in the about page, that is now provided by address-book-app

To post a comment you must log in.
1508. By Ken VanDine

removed phone number tests from the about page tests

Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

Thanks

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
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 'plugins/about/CMakeLists.txt'
2--- plugins/about/CMakeLists.txt 2014-09-25 11:17:42 +0000
3+++ plugins/about/CMakeLists.txt 2015-08-19 14:05:17 +0000
4@@ -9,8 +9,6 @@
5 EntryComponent.qml
6 License.qml
7 PageComponent.qml
8- PhoneNumber.qml
9- PhoneNumbers.qml
10 SingleValueStacked.qml
11 Software.qml
12 Storage.qml
13
14=== modified file 'plugins/about/PageComponent.qml'
15--- plugins/about/PageComponent.qml 2015-04-13 19:06:15 +0000
16+++ plugins/about/PageComponent.qml 2015-08-19 14:05:17 +0000
17@@ -45,18 +45,7 @@
18
19 OfonoManager {
20 id: manager
21- onModemsChanged: {
22- root.modemsSorted = modems.slice(0).sort();
23- if (modems.length === 1) {
24- phoneNumbers.setSource("PhoneNumber.qml", {
25- path: manager.modems[0]
26- });
27- } else if (modems.length > 1) {
28- phoneNumbers.setSource("PhoneNumbers.qml", {
29- paths: root.modemsSorted
30- });
31- }
32- }
33+ onModemsChanged: root.modemsSorted = modems.slice(0).sort()
34 }
35
36 NetworkAbout {
37@@ -104,12 +93,6 @@
38 highlightWhenPressed: false
39 }
40
41- Loader {
42- id: phoneNumbers
43- anchors.left: parent.left
44- anchors.right: parent.right
45- }
46-
47 ListItem.SingleValue {
48 id: serialItem
49 objectName: "serialItem"
50
51=== removed file 'plugins/about/PhoneNumber.qml'
52--- plugins/about/PhoneNumber.qml 2014-09-01 16:10:30 +0000
53+++ plugins/about/PhoneNumber.qml 1970-01-01 00:00:00 +0000
54@@ -1,42 +0,0 @@
55-/*
56- * This file is part of system-settings
57- *
58- * Copyright (C) 2014 Canonical Ltd.
59- *
60- * Contact: Jonas G. Drange <jonas.drange@canonical.com>
61- *
62- * This program is free software: you can redistribute it and/or modify it
63- * under the terms of the GNU General Public License version 3, as published
64- * by the Free Software Foundation.
65- *
66- * This program is distributed in the hope that it will be useful, but
67- * WITHOUT ANY WARRANTY; without even the implied warranties of
68- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
69- * PURPOSE. See the GNU General Public License for more details.
70- *
71- * You should have received a copy of the GNU General Public License along
72- * with this program. If not, see <http://www.gnu.org/licenses/>.
73- */
74-
75-import QtQuick 2.0
76-import MeeGo.QOfono 0.2
77-import Ubuntu.Components.ListItems 0.1 as ListItem
78-
79-ListItem.SingleValue {
80-
81- property string path
82-
83- OfonoSimManager {
84- id: sim
85- modemPath: path
86- }
87-
88- id: numberItem
89- objectName: "numberItem"
90- text: i18n.tr("Phone number")
91- property string phoneNumber
92- phoneNumber: sim.subscriberNumbers.length > 0 ?
93- sim.subscriberNumbers[0] : ""
94- value: phoneNumber
95- visible: value
96-}
97
98=== removed file 'plugins/about/PhoneNumbers.qml'
99--- plugins/about/PhoneNumbers.qml 2014-09-01 16:10:30 +0000
100+++ plugins/about/PhoneNumbers.qml 1970-01-01 00:00:00 +0000
101@@ -1,96 +0,0 @@
102-/*
103- * This file is part of system-settings
104- *
105- * Copyright (C) 2014 Canonical Ltd.
106- *
107- * Contact: Jonas G. Drange <jonas.drange@canonical.com>
108- *
109- * This program is free software: you can redistribute it and/or modify it
110- * under the terms of the GNU General Public License version 3, as published
111- * by the Free Software Foundation.
112- *
113- * This program is distributed in the hope that it will be useful, but
114- * WITHOUT ANY WARRANTY; without even the implied warranties of
115- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
116- * PURPOSE. See the GNU General Public License for more details.
117- *
118- * You should have received a copy of the GNU General Public License along
119- * with this program. If not, see <http://www.gnu.org/licenses/>.
120- */
121-
122-import QtQuick 2.0
123-import GSettings 1.0
124-import MeeGo.QOfono 0.2
125-import Ubuntu.Components.ListItems 0.1 as ListItem
126-
127-Column {
128-
129- property var paths
130-
131- ListItem.Standard {
132- text: i18n.tr("Phone number:")
133- visible: phoneNumber1.visible
134- }
135-
136- ListItem.SingleValue {
137-
138- id: phoneNumber1
139- objectName: "numberItem1"
140-
141- OfonoSimManager {
142- id: sim1
143- modemPath: paths[0]
144- }
145- property string phoneNumber
146- phoneNumber: sim1.subscriberNumbers.length > 0 ?
147- sim1.subscriberNumbers[0] : ""
148- value: phoneNumber
149- visible: value
150- }
151-
152- ListItem.SingleValue {
153-
154- id: phoneNumber2
155- objectName: "numberItem2"
156-
157- OfonoSimManager {
158- id: sim2
159- modemPath: paths[1]
160- }
161- property string phoneNumber
162- phoneNumber: sim2.subscriberNumbers.length > 0 ?
163- sim2.subscriberNumbers[0] : ""
164- value: phoneNumber
165- visible: value
166- }
167-
168- GSettings {
169- id: phoneSettings
170- schema.id: "com.ubuntu.phone"
171- Component.onCompleted: {
172- // set default names
173- var simNames = phoneSettings.simNames;
174- var m0 = paths[0];
175- var m1 = paths[1];
176- if (!simNames[m0]) {
177- simNames[m0] = "SIM 1";
178- }
179- if (!simNames[m1]) {
180- simNames[m1] = "SIM 2";
181- }
182- phoneSettings.simNames = simNames;
183- }
184- }
185-
186- Binding {
187- target: phoneNumber1
188- property: "text"
189- value: phoneSettings.simNames[paths[0]]
190- }
191-
192- Binding {
193- target: phoneNumber2
194- property: "text"
195- value: phoneSettings.simNames[paths[1]]
196- }
197-}
198
199=== modified file 'tests/autopilot/ubuntu_system_settings/tests/test_about.py'
200--- tests/autopilot/ubuntu_system_settings/tests/test_about.py 2014-12-10 20:47:38 +0000
201+++ tests/autopilot/ubuntu_system_settings/tests/test_about.py 2015-08-19 14:05:17 +0000
202@@ -132,21 +132,6 @@
203 displayed_imei = self.about_page.get_imei()
204 self.assertThat(displayed_imei, Equals(device_imei))
205
206- def test_phone_number(self):
207- self.assertEqual(str(self.about_page.get_number('numberItem')),
208- '123456789')
209-
210-
211-class AboutOfonoMultiSimTestCase(AboutOfonoBaseTestCase):
212-
213- use_sims = 2
214-
215- def test_phone_numbers(self):
216- self.assertEqual(str(self.about_page.get_number('numberItem1')),
217- '123456789')
218- self.assertEqual(str(self.about_page.get_number('numberItem2')),
219- '08123')
220-
221
222 class AboutSystemImageTestCase(AboutSystemImageBaseTestCase):
223

Subscribers

People subscribed via source and target branches