Merge lp:~nick-dedekind/unity8/indicator-titles into lp:unity8
- indicator-titles
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Michał Sawicz | ||||
Approved revision: | 333 | ||||
Merged at revision: | 378 | ||||
Proposed branch: | lp:~nick-dedekind/unity8/indicator-titles | ||||
Merge into: | lp:unity8 | ||||
Diff against target: |
452 lines (+50/-101) 15 files modified
Panel/Indicators/DefaultIndicatorWidget.qml (+6/-6) Panel/Indicators/NetworkIndicatorPage.qml (+1/-1) Panel/IndicatorsDataModel.qml (+0/-31) Panel/MenuContent.qml (+9/-2) plugins/Unity/Indicators/indicators.h (+0/-2) plugins/Unity/Indicators/indicatorsmodel.cpp (+1/-9) plugins/Unity/Indicators/qml/IndicatorBase.qml (+8/-5) plugins/Unity/Indicators/qml/IndicatorPage.qml (+7/-5) plugins/Unity/Indicators/qml/IndicatorWidget.qml (+0/-6) plugins/Unity/Indicators/rootactionstate.cpp (+7/-1) plugins/Unity/Indicators/rootactionstate.h (+3/-0) plugins/Unity/Indicators/visibleindicatorsmodel.cpp (+0/-2) tests/mocks/Unity/Indicators/IndicatorsModel.qml (+5/-15) tests/plugins/Unity/Indicators/indicatorsmodeltest.cpp (+0/-13) tests/qmltests/Panel/tst_IndicatorRow.qml (+3/-3) |
||||
To merge this branch: | bzr merge lp:~nick-dedekind/unity8/indicator-titles | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Michał Sawicz | Approve | ||
Review via email:
|
Commit message
Moved indicator page titles to the root action state of menu model.
Description of the change
Moved indicator page titles to the root action state of menu model.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Francis Ginther (fginther) wrote : | # |
Test was aborted, but has been re-triggered.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:327
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michał Sawicz (saviq) wrote : | # |
There's a conflict in Panel/Indicator
- 328. By Nick Dedekind
-
merged with trunk
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> There's a conflict in Panel/Indicator
Fixed.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michał Sawicz (saviq) wrote : | # |
../plugins/
QVariant IndicatorsModel
^
Please mark unused.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michał Sawicz (saviq) wrote : | # |
When indicators are unloaded, their titles are, too, which results in indicator-
- 329. By Nick Dedekind
-
Fixed network indicator not displaying
- 330. By Nick Dedekind
-
Always populate root model pages, but not menu items
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> When indicators are unloaded, their titles are, too, which results in
> indicator-
> Not sure this is acceptable, nor if there's a solution we know? Maybe the
> title could be transferred/cached with the panel icon/label?
I've changed it so that we load up the models for the pages, but still not populate the menu items. This way we get the titles for the pages all the time. Seeing as the modes are created and cached by the panel icons, there is no real overhead.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:328
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michał Sawicz (saviq) wrote : | # |
A warning introduced by this, when an indicator is removed (e.g. disable bluetooth), please protect:
Panel/MenuConte
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:330
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:330
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:330
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 331. By Nick Dedekind
-
fixed warning
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> A warning introduced by this, when an indicator is removed (e.g. disable
> bluetooth), please protect:
>
> Panel/MenuConte
> undefined
Added content activator index checks.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michał Sawicz (saviq) wrote : | # |
141 + console.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:331
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> 141 + console.
neverending!
Fixed.
- 332. By Nick Dedekind
-
removed debug log
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:332
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michał Sawicz (saviq) wrote : | # |
Argh, conflicts now...
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> Argh, conflicts now...
Merged with trunk.
- 333. By Nick Dedekind
-
merged with trunk
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:333
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'Panel/Indicators/DefaultIndicatorWidget.qml' |
2 | --- Panel/Indicators/DefaultIndicatorWidget.qml 2013-09-09 09:21:55 +0000 |
3 | +++ Panel/Indicators/DefaultIndicatorWidget.qml 2013-10-02 16:10:35 +0000 |
4 | @@ -86,8 +86,8 @@ |
5 | } |
6 | } |
7 | |
8 | - onActionStateChanged: { |
9 | - if (actionState == undefined) { |
10 | + onRootActionStateChanged: { |
11 | + if (rootActionState == undefined) { |
12 | leftLabel = ""; |
13 | rightLabel = ""; |
14 | icons = undefined; |
15 | @@ -95,9 +95,9 @@ |
16 | return; |
17 | } |
18 | |
19 | - leftLabel = actionState.leftLabel ? actionState.leftLabel : ""; |
20 | - rightLabel = actionState.rightLabel ? actionState.rightLabel : ""; |
21 | - icons = actionState.icons; |
22 | - enabled = actionState.visible; |
23 | + leftLabel = rootActionState.leftLabel ? rootActionState.leftLabel : ""; |
24 | + rightLabel = rootActionState.rightLabel ? rootActionState.rightLabel : ""; |
25 | + icons = rootActionState.icons; |
26 | + enabled = rootActionState.visible; |
27 | } |
28 | } |
29 | |
30 | === modified file 'Panel/Indicators/NetworkIndicatorPage.qml' |
31 | --- Panel/Indicators/NetworkIndicatorPage.qml 2013-09-09 09:21:55 +0000 |
32 | +++ Panel/Indicators/NetworkIndicatorPage.qml 2013-10-02 16:10:35 +0000 |
33 | @@ -30,7 +30,7 @@ |
34 | // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1211704 |
35 | __propagated: null |
36 | |
37 | - property alias title: _mainPage.title |
38 | + property alias title: pluginItem.title |
39 | property alias emptyText: pluginItem.emptyText |
40 | property alias busName: pluginItem.busName |
41 | property alias actionsObjectPath : pluginItem.actionsObjectPath |
42 | |
43 | === modified file 'Panel/IndicatorsDataModel.qml' |
44 | --- Panel/IndicatorsDataModel.qml 2013-09-09 09:21:55 +0000 |
45 | +++ Panel/IndicatorsDataModel.qml 2013-10-02 16:10:35 +0000 |
46 | @@ -27,39 +27,8 @@ |
47 | Component.onCompleted: load() |
48 | |
49 | indicatorData : { |
50 | - 'indicator-location' : { |
51 | - 'title': 'Location', |
52 | - 'description' : '' |
53 | - }, |
54 | - 'indicator-bluetooth' : { |
55 | - 'title': 'Bluetooth', |
56 | - 'description' : '' |
57 | - }, |
58 | - 'indicator-messages' : { |
59 | - 'title': 'Messaging', |
60 | - 'description' : '' |
61 | - }, |
62 | - 'indicator-sound' : { |
63 | - 'title': 'Sound', |
64 | - 'description' : '' |
65 | - }, |
66 | 'indicator-network' : { |
67 | - 'title': 'Networks', |
68 | - 'description' : '', |
69 | - 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget.qml', |
70 | 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorPage.qml' |
71 | }, |
72 | - 'indicator-power' : { |
73 | - 'title': 'Battery', |
74 | - 'description' : '' |
75 | - }, |
76 | - 'indicator-session' : { |
77 | - 'title': 'Session', |
78 | - 'description' : '' |
79 | - }, |
80 | - 'indicator-datetime' : { |
81 | - 'title': 'Date and Time', |
82 | - 'description' : '' |
83 | - } |
84 | } |
85 | } |
86 | |
87 | === modified file 'Panel/MenuContent.qml' |
88 | --- Panel/MenuContent.qml 2013-09-23 23:53:31 +0000 |
89 | +++ Panel/MenuContent.qml 2013-10-02 16:10:35 +0000 |
90 | @@ -100,16 +100,17 @@ |
91 | Tab { |
92 | id: tab |
93 | objectName: model.identifier |
94 | - title: model.title |
95 | |
96 | page: Page { |
97 | Loader { |
98 | + id: loader |
99 | clip: true |
100 | anchors.fill: parent |
101 | source: pageSource |
102 | asynchronous: true |
103 | |
104 | - property bool contentActive: content.__contentActive && menuActivator.content[index].active |
105 | + readonly property bool indexActive: index >= 0 && index < menuActivator.count && menuActivator.content[index].active |
106 | + readonly property bool contentActive: content.__contentActive && indexActive |
107 | |
108 | onContentActiveChanged: { |
109 | if (contentActive && item) { |
110 | @@ -136,6 +137,12 @@ |
111 | item.start() |
112 | } |
113 | } |
114 | + |
115 | + Binding { |
116 | + target: tab |
117 | + property: "title" |
118 | + value: loader.item && loader.item.hasOwnProperty("title") && loader.item.title !== "" ? loader.item.title : model.identifier |
119 | + } |
120 | } |
121 | } |
122 | } |
123 | |
124 | === modified file 'plugins/Unity/Indicators/indicators.h' |
125 | --- plugins/Unity/Indicators/indicators.h 2013-08-15 16:03:35 +0000 |
126 | +++ plugins/Unity/Indicators/indicators.h 2013-10-02 16:10:35 +0000 |
127 | @@ -74,8 +74,6 @@ |
128 | enum Roles { |
129 | Identifier = 0, |
130 | Position, |
131 | - Title, |
132 | - Description, |
133 | WidgetSource, |
134 | PageSource, |
135 | IndicatorProperties, |
136 | |
137 | === modified file 'plugins/Unity/Indicators/indicatorsmodel.cpp' |
138 | --- plugins/Unity/Indicators/indicatorsmodel.cpp 2013-09-24 10:20:30 +0000 |
139 | +++ plugins/Unity/Indicators/indicatorsmodel.cpp 2013-10-02 16:10:35 +0000 |
140 | @@ -201,8 +201,6 @@ |
141 | { |
142 | roles[IndicatorsModelRole::Identifier] = "identifier"; |
143 | roles[IndicatorsModelRole::Position] = "position"; |
144 | - roles[IndicatorsModelRole::Title] = "title"; |
145 | - roles[IndicatorsModelRole::Description] = "description"; |
146 | roles[IndicatorsModelRole::WidgetSource] = "widgetSource"; |
147 | roles[IndicatorsModelRole::PageSource] = "pageSource"; |
148 | roles[IndicatorsModelRole::IndicatorProperties] = "indicatorProperties"; |
149 | @@ -223,10 +221,6 @@ |
150 | { |
151 | case IndicatorsModelRole::Position: |
152 | return 0; |
153 | - case IndicatorsModelRole::Title: |
154 | - return indicator ? indicator->identifier() : "Unknown"; |
155 | - case IndicatorsModelRole::Description: |
156 | - return ""; |
157 | case IndicatorsModelRole::WidgetSource: |
158 | return shellAppDirectory()+"/Panel/Indicators/DefaultIndicatorWidget.qml"; |
159 | case IndicatorsModelRole::PageSource: |
160 | @@ -268,8 +262,6 @@ |
161 | return QVariant(indicator->indicatorProperties()); |
162 | } |
163 | break; |
164 | - case IndicatorsModelRole::Title: |
165 | - case IndicatorsModelRole::Description: |
166 | case IndicatorsModelRole::WidgetSource: |
167 | case IndicatorsModelRole::PageSource: |
168 | return indicatorData(indicator, role); |
169 | @@ -286,7 +278,7 @@ |
170 | QVariantMap data = m_parsed_indicator_data[indicator->identifier()]; |
171 | if (data.contains(roleNames()[role])) { |
172 | return data[roleNames()[role]]; |
173 | - }; |
174 | + } |
175 | } |
176 | return defaultData(indicator, role); |
177 | } |
178 | |
179 | === modified file 'plugins/Unity/Indicators/qml/IndicatorBase.qml' |
180 | --- plugins/Unity/Indicators/qml/IndicatorBase.qml 2013-08-30 08:17:10 +0000 |
181 | +++ plugins/Unity/Indicators/qml/IndicatorBase.qml 2013-10-02 16:10:35 +0000 |
182 | @@ -27,13 +27,11 @@ |
183 | enabled: menuObjectPaths.hasOwnProperty(device) |
184 | |
185 | //const |
186 | - property string title |
187 | property string busName |
188 | property string actionsObjectPath |
189 | property var menuObjectPaths: undefined |
190 | readonly property string device: "phone" |
191 | property string rootMenuType: "com.canonical.indicator.root" |
192 | - property bool active: false |
193 | |
194 | property string deviceMenuObjectPath: menuObjectPaths.hasOwnProperty(device) ? menuObjectPaths[device] : "" |
195 | |
196 | @@ -41,8 +39,13 @@ |
197 | |
198 | CachedUnityMenuModel { |
199 | id: cachedModel |
200 | - busName: active ? indicatorItem.busName : "" |
201 | - actionsObjectPath: active ? indicatorItem.actionsObjectPath : "" |
202 | - menuObjectPath: active ? indicatorItem.deviceMenuObjectPath : "" |
203 | + busName: indicatorItem.busName |
204 | + actionsObjectPath: indicatorItem.actionsObjectPath |
205 | + menuObjectPath: indicatorItem.deviceMenuObjectPath |
206 | + } |
207 | + |
208 | + property var rootActionState: Indicators.RootActionState { |
209 | + menu: menuModel |
210 | + onUpdated: indicatorItem.rootActionStateChanged() |
211 | } |
212 | } |
213 | |
214 | === modified file 'plugins/Unity/Indicators/qml/IndicatorPage.qml' |
215 | --- plugins/Unity/Indicators/qml/IndicatorPage.qml 2013-09-26 11:00:25 +0000 |
216 | +++ plugins/Unity/Indicators/qml/IndicatorPage.qml 2013-10-02 16:10:35 +0000 |
217 | @@ -26,12 +26,14 @@ |
218 | id: main |
219 | |
220 | //const |
221 | + property bool contentActive: false |
222 | + property string title: rootActionState.title |
223 | property alias emptyText: emptyLabel.text |
224 | property alias highlightFollowsCurrentItem : mainMenu.highlightFollowsCurrentItem |
225 | |
226 | Indicators.UnityMenuModelStack { |
227 | id: menuStack |
228 | - head: main.menuModel |
229 | + head: contentActive ? main.menuModel : null |
230 | } |
231 | |
232 | ListView { |
233 | @@ -162,15 +164,15 @@ |
234 | function start() |
235 | { |
236 | reset() |
237 | - if (!active) { |
238 | - active = true; |
239 | + if (!contentActive) { |
240 | + contentActive = true; |
241 | } |
242 | } |
243 | |
244 | function stop() |
245 | { |
246 | - if (active) { |
247 | - active = false; |
248 | + if (contentActive) { |
249 | + contentActive = false; |
250 | } |
251 | } |
252 | |
253 | |
254 | === modified file 'plugins/Unity/Indicators/qml/IndicatorWidget.qml' |
255 | --- plugins/Unity/Indicators/qml/IndicatorWidget.qml 2013-08-15 16:04:46 +0000 |
256 | +++ plugins/Unity/Indicators/qml/IndicatorWidget.qml 2013-10-02 16:10:35 +0000 |
257 | @@ -23,12 +23,6 @@ |
258 | IndicatorBase { |
259 | id: indicatorWidget |
260 | |
261 | - active: true |
262 | enabled: false |
263 | property int iconSize: height - units.gu(0.5) |
264 | - |
265 | - property var actionState: Indicators.RootActionState { |
266 | - menu: menuModel |
267 | - onUpdated: indicatorWidget.actionStateChanged() |
268 | - } |
269 | } |
270 | |
271 | === modified file 'plugins/Unity/Indicators/rootactionstate.cpp' |
272 | --- plugins/Unity/Indicators/rootactionstate.cpp 2013-09-09 14:34:15 +0000 |
273 | +++ plugins/Unity/Indicators/rootactionstate.cpp 2013-10-02 16:10:35 +0000 |
274 | @@ -102,12 +102,18 @@ |
275 | Q_EMIT updated(); |
276 | } |
277 | |
278 | - |
279 | bool RootActionState::isValid() const |
280 | { |
281 | return m_menu && m_menu->rowCount() > 0; |
282 | } |
283 | |
284 | +QString RootActionState::title() const |
285 | +{ |
286 | + if (!isValid()) return QString(); |
287 | + |
288 | + return m_cachedState.value("title", QVariant::fromValue(QString())).toString(); |
289 | +} |
290 | + |
291 | QString RootActionState::leftLabel() const |
292 | { |
293 | if (!isValid()) return QString(); |
294 | |
295 | === modified file 'plugins/Unity/Indicators/rootactionstate.h' |
296 | --- plugins/Unity/Indicators/rootactionstate.h 2013-09-06 14:09:56 +0000 |
297 | +++ plugins/Unity/Indicators/rootactionstate.h 2013-10-02 16:10:35 +0000 |
298 | @@ -32,6 +32,7 @@ |
299 | Q_PROPERTY(UnityMenuModel* menu READ menu WRITE setMenu NOTIFY menuChanged) |
300 | |
301 | Q_PROPERTY(bool valid READ isValid NOTIFY validChanged) |
302 | + Q_PROPERTY(QString title READ title NOTIFY titleChanged) |
303 | Q_PROPERTY(QString leftLabel READ leftLabel NOTIFY leftLabelChanged) |
304 | Q_PROPERTY(QString rightLabel READ rightLabel NOTIFY rightLabelChanged) |
305 | Q_PROPERTY(QStringList icons READ icons NOTIFY iconsChanged) |
306 | @@ -48,6 +49,7 @@ |
307 | void setIndex(int index); |
308 | |
309 | bool isValid() const; |
310 | + QString title() const; |
311 | QString leftLabel() const; |
312 | QString rightLabel() const; |
313 | QStringList icons() const; |
314 | @@ -64,6 +66,7 @@ |
315 | void indexChanged(); |
316 | |
317 | void validChanged(); |
318 | + void titleChanged(); |
319 | void leftLabelChanged(); |
320 | void rightLabelChanged(); |
321 | void iconsChanged(); |
322 | |
323 | === modified file 'plugins/Unity/Indicators/visibleindicatorsmodel.cpp' |
324 | --- plugins/Unity/Indicators/visibleindicatorsmodel.cpp 2013-09-02 08:11:14 +0000 |
325 | +++ plugins/Unity/Indicators/visibleindicatorsmodel.cpp 2013-10-02 16:10:35 +0000 |
326 | @@ -33,8 +33,6 @@ |
327 | { |
328 | roles[IndicatorsModelRole::Identifier] = "identifier"; |
329 | roles[IndicatorsModelRole::Position] = "position"; |
330 | - roles[IndicatorsModelRole::Title] = "title"; |
331 | - roles[IndicatorsModelRole::Description] = "description"; |
332 | roles[IndicatorsModelRole::WidgetSource] = "widgetSource"; |
333 | roles[IndicatorsModelRole::PageSource] = "pageSource"; |
334 | roles[IndicatorsModelRole::IndicatorProperties] = "indicatorProperties"; |
335 | |
336 | === modified file 'tests/mocks/Unity/Indicators/IndicatorsModel.qml' |
337 | --- tests/mocks/Unity/Indicators/IndicatorsModel.qml 2013-09-02 08:11:14 +0000 |
338 | +++ tests/mocks/Unity/Indicators/IndicatorsModel.qml 2013-10-02 16:10:35 +0000 |
339 | @@ -28,45 +28,35 @@ |
340 | // which throws off the filter for non-visible indicators. |
341 | Component.onCompleted: { |
342 | append({ "identifier": "indicator-fake1", |
343 | - "priority": 0, |
344 | - "title": "Menu1", |
345 | - "description": "", |
346 | + "position": 0, |
347 | "widgetSource": "qrc:/tests/indciators/qml/fake_menu_widget1.qml", |
348 | "pageSource": "qrc:/tests/indciators/qml/fake_menu_page1.qml", |
349 | "indicatorProperties": "" |
350 | }); |
351 | |
352 | append({ "identifier": "indicator-fake2", |
353 | - "priority": 1, |
354 | - "title": "Menu2", |
355 | - "description": "", |
356 | + "position": 1, |
357 | "widgetSource": "qrc:/tests/indciators/qml/fake_menu_widget2.qml", |
358 | "pageSource": "qrc:/tests/indciators/qml/fake_menu_page2.qml", |
359 | "indicatorProperties": "" |
360 | }); |
361 | |
362 | append({ "identifier": "indicator-fake3", |
363 | - "priority": 2, |
364 | - "title": "Menu3", |
365 | - "description": "", |
366 | + "position": 2, |
367 | "widgetSource": "qrc:/tests/indciators/qml/fake_menu_widget3.qml", |
368 | "pageSource": "qrc:/tests/indciators/qml/fake_menu_page3.qml", |
369 | "indicatorProperties": "" |
370 | }); |
371 | |
372 | append({ "identifier": "indicator-fake4", |
373 | - "priority": 3, |
374 | - "title": "Menu4", |
375 | - "description": "", |
376 | + "position": 3, |
377 | "widgetSource": "qrc:/tests/indciators/qml/fake_menu_widget4.qml", |
378 | "pageSource": "qrc:/tests/indciators/qml/fake_menu_page4.qml", |
379 | "indicatorProperties": "" |
380 | }); |
381 | |
382 | append({ "identifier": "indicator-fake5", |
383 | - "priority": 4, |
384 | - "title": "Menu5", |
385 | - "description": "", |
386 | + "position": 4, |
387 | "widgetSource": "qrc:/tests/indciators/qml/fake_menu_widget5.qml", |
388 | "pageSource": "qrc:/tests/indciators/qml/fake_menu_page5.qml", |
389 | "indicatorProperties": "" |
390 | |
391 | === modified file 'tests/plugins/Unity/Indicators/indicatorsmodeltest.cpp' |
392 | --- tests/plugins/Unity/Indicators/indicatorsmodeltest.cpp 2013-09-24 10:20:30 +0000 |
393 | +++ tests/plugins/Unity/Indicators/indicatorsmodeltest.cpp 2013-10-02 16:10:35 +0000 |
394 | @@ -65,38 +65,25 @@ |
395 | void testDataAndOrder() |
396 | { |
397 | // Priority order. (2, 1, 4, 3) |
398 | - QVariantMap map; |
399 | - QVariantMap map1; map1["title"] = "fake1"; |
400 | - QVariantMap map2; map2["title"] = "fake2"; |
401 | - QVariantMap map3; map3["title"] = "fake3"; |
402 | - map["indicator-fake1"] = map1; |
403 | - map["indicator-fake2"] = map2; |
404 | - map["indicator-fake3"] = map3; |
405 | - |
406 | IndicatorsModel model; |
407 | - model.setIndicatorData(map); |
408 | model.load(); |
409 | |
410 | // should be in order: |
411 | // fake3, fake4, fake1, fake2 |
412 | |
413 | QCOMPARE(model.data(0, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake3")); |
414 | - QCOMPARE(model.data(0, IndicatorsModelRole::Title).toString(), QString("fake3")); |
415 | QCOMPARE(model.data(0, IndicatorsModelRole::Position).toInt(), 3); |
416 | QCOMPARE(model.data(0, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake3")); |
417 | |
418 | QCOMPARE(model.data(1, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake4")); |
419 | - QCOMPARE(model.data(1, IndicatorsModelRole::Title).toString(), QString("indicator-fake4")); |
420 | QCOMPARE(model.data(1, IndicatorsModelRole::Position).toInt(), 2); |
421 | QCOMPARE(model.data(1, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake4")); |
422 | |
423 | QCOMPARE(model.data(2, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake1")); |
424 | - QCOMPARE(model.data(2, IndicatorsModelRole::Title).toString(), QString("fake1")); |
425 | QCOMPARE(model.data(2, IndicatorsModelRole::Position).toInt(), 1); |
426 | QCOMPARE(model.data(2, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake1")); |
427 | |
428 | QCOMPARE(model.data(3, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake2")); |
429 | - QCOMPARE(model.data(3, IndicatorsModelRole::Title).toString(), QString("fake2")); |
430 | QCOMPARE(model.data(3, IndicatorsModelRole::Position).toInt(), 0); |
431 | QCOMPARE(model.data(3, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake2")); |
432 | } |
433 | |
434 | === modified file 'tests/qmltests/Panel/tst_IndicatorRow.qml' |
435 | --- tests/qmltests/Panel/tst_IndicatorRow.qml 2013-07-24 11:52:22 +0000 |
436 | +++ tests/qmltests/Panel/tst_IndicatorRow.qml 2013-10-02 16:10:35 +0000 |
437 | @@ -62,13 +62,13 @@ |
438 | function test_set_current_item() { |
439 | init_test(); |
440 | indicatorRow.setCurrentItem(0); |
441 | - compare(indicatorRow.indicatorsModel.get(indicatorRow.currentItemIndex).title, "Menu1", "Incorrect item at position 0"); |
442 | + compare(indicatorRow.indicatorsModel.get(indicatorRow.currentItemIndex).identifier, "indicator-fake1", "Incorrect item at position 0"); |
443 | |
444 | indicatorRow.setCurrentItem(1); |
445 | - compare(indicatorRow.indicatorsModel.get(indicatorRow.currentItemIndex).title, "Menu2", "Incorrect item at position 1"); |
446 | + compare(indicatorRow.indicatorsModel.get(indicatorRow.currentItemIndex).identifier, "indicator-fake2", "Incorrect item at position 1"); |
447 | |
448 | indicatorRow.setCurrentItem(2); |
449 | - compare(indicatorRow.indicatorsModel.get(indicatorRow.currentItemIndex).title, "Menu3", "Incorrect item at position 2"); |
450 | + compare(indicatorRow.indicatorsModel.get(indicatorRow.currentItemIndex).identifier, "indicator-fake3", "Incorrect item at position 2"); |
451 | } |
452 | } |
453 |
FAILED: Continuous integration, rev:327 jenkins. qa.ubuntu. com/job/ unity8- ci/1028/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- saucy/3530 jenkins. qa.ubuntu. com/job/ generic- mediumtests- touch/1058 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- saucy/1733 jenkins. qa.ubuntu. com/job/ unity8- saucy-amd64- ci/52 jenkins. qa.ubuntu. com/job/ unity8- saucy-armhf- ci/1029 jenkins. qa.ubuntu. com/job/ unity8- saucy-armhf- ci/1029/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- saucy-i386- ci/1028 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-i386/ 3542 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-i386/ 3542/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- saucy/2991/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-armhf/ 1060 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-armhf/ 1060/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- maguro/ 883 jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- mako/895
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
None: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ unity8- ci/1028/ rebuild
http://