Merge lp:~nick-dedekind/unity8/indicator.positions into lp:unity8
- indicator.positions
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | MichaĆ Sawicz |
Approved revision: | 181 |
Merged at revision: | 190 |
Proposed branch: | lp:~nick-dedekind/unity8/indicator.positions |
Merge into: | lp:unity8 |
Diff against target: |
365 lines (+68/-31) 16 files modified
Panel/IndicatorsDataModel.qml (+0/-5) plugins/Unity/Indicators/indicator.cpp (+16/-1) plugins/Unity/Indicators/indicator.h (+5/-0) plugins/Unity/Indicators/indicators.h (+1/-1) plugins/Unity/Indicators/indicatorsmodel.cpp (+10/-5) src/Panel/Indicators/servicefiles/com.canonical.indicator.battery (+1/-0) src/Panel/Indicators/servicefiles/com.canonical.indicator.messages (+1/-0) src/Panel/Indicators/servicefiles/com.canonical.indicator.time (+1/-0) src/Panel/Indicators/servicefiles/com.canonical.settings.network (+1/-0) src/Panel/Indicators/servicefiles/com.canonical.settings.sound (+1/-0) tests/data/unity/indicators/com.canonical.indicator.fake1 (+1/-0) tests/data/unity/indicators/com.canonical.indicator.fake2 (+1/-0) tests/data/unity/indicators/com.canonical.indicator.fake3 (+1/-0) tests/data/unity/indicators/com.canonical.indicator.fake4 (+1/-0) tests/plugins/Unity/Indicators/indicatorsmanagertest.cpp (+1/-0) tests/plugins/Unity/Indicators/indicatorsmodeltest.cpp (+26/-19) |
To merge this branch: | bzr merge lp:~nick-dedekind/unity8/indicator.positions |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Albert Astals Cid (community) | Approve | ||
Review via email:
|
Commit message
Use key from indicator service file to source indicator positions.
Description of the change
Use key from indicator service file to source indicator positions.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:181
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Albert Astals Cid (aacid) wrote : | # |
Looks and works good
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'Panel/IndicatorsDataModel.qml' | |||
2 | --- Panel/IndicatorsDataModel.qml 2013-07-08 11:02:06 +0000 | |||
3 | +++ Panel/IndicatorsDataModel.qml 2013-08-09 17:42:20 +0000 | |||
4 | @@ -30,35 +30,30 @@ | |||
5 | 30 | 'indicator-messaging' : { | 30 | 'indicator-messaging' : { |
6 | 31 | 'title': 'Messaging', | 31 | 'title': 'Messaging', |
7 | 32 | 'description' : '', | 32 | 'description' : '', |
8 | 33 | 'priority': 10, | ||
9 | 34 | 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorWidget.qml', | 33 | 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorWidget.qml', |
10 | 35 | 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorPage.qml' | 34 | 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorPage.qml' |
11 | 36 | }, | 35 | }, |
12 | 37 | 'indicator-sound' : { | 36 | 'indicator-sound' : { |
13 | 38 | 'title': 'Sound', | 37 | 'title': 'Sound', |
14 | 39 | 'description' : '', | 38 | 'description' : '', |
15 | 40 | 'priority': 20, | ||
16 | 41 | 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/SoundIndicatorWidget.qml', | 39 | 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/SoundIndicatorWidget.qml', |
17 | 42 | 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage.qml' | 40 | 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage.qml' |
18 | 43 | }, | 41 | }, |
19 | 44 | 'indicator-network' : { | 42 | 'indicator-network' : { |
20 | 45 | 'title': 'Networks', | 43 | 'title': 'Networks', |
21 | 46 | 'description' : '', | 44 | 'description' : '', |
22 | 47 | 'priority': 30, | ||
23 | 48 | 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorWidget.qml', | 45 | 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorWidget.qml', |
24 | 49 | 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorPage.qml' | 46 | 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorPage.qml' |
25 | 50 | }, | 47 | }, |
26 | 51 | 'indicator-battery' : { | 48 | 'indicator-battery' : { |
27 | 52 | 'title': 'Battery', | 49 | 'title': 'Battery', |
28 | 53 | 'description' : '', | 50 | 'description' : '', |
29 | 54 | 'priority': 40, | ||
30 | 55 | 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget.qml', | 51 | 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget.qml', |
31 | 56 | 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage.qml' | 52 | 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage.qml' |
32 | 57 | }, | 53 | }, |
33 | 58 | 'indicator-time' : { | 54 | 'indicator-time' : { |
34 | 59 | 'title': 'Date and Time', | 55 | 'title': 'Date and Time', |
35 | 60 | 'description' : '', | 56 | 'description' : '', |
36 | 61 | 'priority': 100, | ||
37 | 62 | 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DatetimeIndicatorWidget.qml', | 57 | 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DatetimeIndicatorWidget.qml', |
38 | 63 | 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DatetimeIndicatorPage.qml' | 58 | 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DatetimeIndicatorPage.qml' |
39 | 64 | } | 59 | } |
40 | 65 | 60 | ||
41 | === modified file 'plugins/Unity/Indicators/indicator.cpp' | |||
42 | --- plugins/Unity/Indicators/indicator.cpp 2013-06-17 12:27:05 +0000 | |||
43 | +++ plugins/Unity/Indicators/indicator.cpp 2013-08-09 17:42:20 +0000 | |||
44 | @@ -22,7 +22,8 @@ | |||
45 | 22 | #include <QStringList> | 22 | #include <QStringList> |
46 | 23 | 23 | ||
47 | 24 | Indicator::Indicator(QObject *parent) | 24 | Indicator::Indicator(QObject *parent) |
49 | 25 | : QObject(parent) | 25 | : QObject(parent), |
50 | 26 | m_position(0) | ||
51 | 26 | { | 27 | { |
52 | 27 | } | 28 | } |
53 | 28 | 29 | ||
54 | @@ -33,6 +34,7 @@ | |||
55 | 33 | void Indicator::init(const QString& busName, const QSettings& settings) | 34 | void Indicator::init(const QString& busName, const QSettings& settings) |
56 | 34 | { | 35 | { |
57 | 35 | setId(settings.value("Indicator Service/Name").toString()); | 36 | setId(settings.value("Indicator Service/Name").toString()); |
58 | 37 | setPosition(settings.value("Indicator Service/Position", QVariant::fromValue(0)).toInt()); | ||
59 | 36 | 38 | ||
60 | 37 | QString actionObjectPath = settings.value("Indicator Service/ObjectPath").toString(); | 39 | QString actionObjectPath = settings.value("Indicator Service/ObjectPath").toString(); |
61 | 38 | 40 | ||
62 | @@ -72,6 +74,19 @@ | |||
63 | 72 | } | 74 | } |
64 | 73 | } | 75 | } |
65 | 74 | 76 | ||
66 | 77 | int Indicator::position() const | ||
67 | 78 | { | ||
68 | 79 | return m_position; | ||
69 | 80 | } | ||
70 | 81 | |||
71 | 82 | void Indicator::setPosition(int position) | ||
72 | 83 | { | ||
73 | 84 | if (position != m_position) { | ||
74 | 85 | m_position = position; | ||
75 | 86 | Q_EMIT positionChanged(m_position); | ||
76 | 87 | } | ||
77 | 88 | } | ||
78 | 89 | |||
79 | 75 | 90 | ||
80 | 76 | QVariant Indicator::indicatorProperties() const | 91 | QVariant Indicator::indicatorProperties() const |
81 | 77 | { | 92 | { |
82 | 78 | 93 | ||
83 | === modified file 'plugins/Unity/Indicators/indicator.h' | |||
84 | --- plugins/Unity/Indicators/indicator.h 2013-07-17 08:57:57 +0000 | |||
85 | +++ plugins/Unity/Indicators/indicator.h 2013-08-09 17:42:20 +0000 | |||
86 | @@ -30,6 +30,7 @@ | |||
87 | 30 | { | 30 | { |
88 | 31 | Q_OBJECT | 31 | Q_OBJECT |
89 | 32 | Q_PROPERTY(QString identifier READ identifier NOTIFY identifierChanged) | 32 | Q_PROPERTY(QString identifier READ identifier NOTIFY identifierChanged) |
90 | 33 | Q_PROPERTY(int position READ position NOTIFY positionChanged) | ||
91 | 33 | Q_PROPERTY(QVariant indicatorProperties READ indicatorProperties NOTIFY indicatorPropertiesChanged) | 34 | Q_PROPERTY(QVariant indicatorProperties READ indicatorProperties NOTIFY indicatorPropertiesChanged) |
92 | 34 | 35 | ||
93 | 35 | public: | 36 | public: |
94 | @@ -41,18 +42,22 @@ | |||
95 | 41 | void init(const QString& busName, const QSettings& settings); | 42 | void init(const QString& busName, const QSettings& settings); |
96 | 42 | 43 | ||
97 | 43 | QString identifier() const; | 44 | QString identifier() const; |
98 | 45 | int position() const; | ||
99 | 44 | QVariant indicatorProperties() const; | 46 | QVariant indicatorProperties() const; |
100 | 45 | 47 | ||
101 | 46 | Q_SIGNALS: | 48 | Q_SIGNALS: |
102 | 47 | void identifierChanged(const QString &identifier); | 49 | void identifierChanged(const QString &identifier); |
103 | 50 | void positionChanged(int position); | ||
104 | 48 | void indicatorPropertiesChanged(const QVariant &properties); | 51 | void indicatorPropertiesChanged(const QVariant &properties); |
105 | 49 | 52 | ||
106 | 50 | protected: | 53 | protected: |
107 | 51 | void setId(const QString &id); | 54 | void setId(const QString &id); |
108 | 55 | void setPosition(int position); | ||
109 | 52 | void setIndicatorProperties(const QVariant &properties); | 56 | void setIndicatorProperties(const QVariant &properties); |
110 | 53 | 57 | ||
111 | 54 | private: | 58 | private: |
112 | 55 | QString m_identifier; | 59 | QString m_identifier; |
113 | 60 | int m_position; | ||
114 | 56 | QVariant m_properties; | 61 | QVariant m_properties; |
115 | 57 | }; | 62 | }; |
116 | 58 | 63 | ||
117 | 59 | 64 | ||
118 | === modified file 'plugins/Unity/Indicators/indicators.h' | |||
119 | --- plugins/Unity/Indicators/indicators.h 2013-07-17 08:57:57 +0000 | |||
120 | +++ plugins/Unity/Indicators/indicators.h 2013-08-09 17:42:20 +0000 | |||
121 | @@ -73,7 +73,7 @@ | |||
122 | 73 | Q_ENUMS(Roles) | 73 | Q_ENUMS(Roles) |
123 | 74 | enum Roles { | 74 | enum Roles { |
124 | 75 | Identifier = 0, | 75 | Identifier = 0, |
126 | 76 | Priority, | 76 | Position, |
127 | 77 | Title, | 77 | Title, |
128 | 78 | Description, | 78 | Description, |
129 | 79 | WidgetSource, | 79 | WidgetSource, |
130 | 80 | 80 | ||
131 | === modified file 'plugins/Unity/Indicators/indicatorsmodel.cpp' | |||
132 | --- plugins/Unity/Indicators/indicatorsmodel.cpp 2013-07-18 15:57:36 +0000 | |||
133 | +++ plugins/Unity/Indicators/indicatorsmodel.cpp 2013-08-09 17:42:20 +0000 | |||
134 | @@ -118,8 +118,8 @@ | |||
135 | 118 | int pos = 0; | 118 | int pos = 0; |
136 | 119 | while (pos < count()) | 119 | while (pos < count()) |
137 | 120 | { | 120 | { |
140 | 121 | // keep going while the existing priority is less. | 121 | // keep going while the existing position is greater. (put lower position on end) |
141 | 122 | if (indicatorData(indicator, IndicatorsModelRole::Priority).toInt() < data(index(pos), IndicatorsModelRole::Priority).toInt()) | 122 | if (indicator->position() >= data(index(pos), IndicatorsModelRole::Position).toInt()) |
142 | 123 | break; | 123 | break; |
143 | 124 | pos++; | 124 | pos++; |
144 | 125 | } | 125 | } |
145 | @@ -200,7 +200,7 @@ | |||
146 | 200 | if (roles.isEmpty()) | 200 | if (roles.isEmpty()) |
147 | 201 | { | 201 | { |
148 | 202 | roles[IndicatorsModelRole::Identifier] = "identifier"; | 202 | roles[IndicatorsModelRole::Identifier] = "identifier"; |
150 | 203 | roles[IndicatorsModelRole::Priority] = "priority"; | 203 | roles[IndicatorsModelRole::Position] = "position"; |
151 | 204 | roles[IndicatorsModelRole::Title] = "title"; | 204 | roles[IndicatorsModelRole::Title] = "title"; |
152 | 205 | roles[IndicatorsModelRole::Description] = "description"; | 205 | roles[IndicatorsModelRole::Description] = "description"; |
153 | 206 | roles[IndicatorsModelRole::WidgetSource] = "widgetSource"; | 206 | roles[IndicatorsModelRole::WidgetSource] = "widgetSource"; |
154 | @@ -222,7 +222,7 @@ | |||
155 | 222 | { | 222 | { |
156 | 223 | switch (role) | 223 | switch (role) |
157 | 224 | { | 224 | { |
159 | 225 | case IndicatorsModelRole::Priority: | 225 | case IndicatorsModelRole::Position: |
160 | 226 | return 0; | 226 | return 0; |
161 | 227 | case IndicatorsModelRole::Title: | 227 | case IndicatorsModelRole::Title: |
162 | 228 | return indicator ? indicator->identifier() : "Unknown"; | 228 | return indicator ? indicator->identifier() : "Unknown"; |
163 | @@ -257,6 +257,12 @@ | |||
164 | 257 | return QVariant(indicator->identifier()); | 257 | return QVariant(indicator->identifier()); |
165 | 258 | } | 258 | } |
166 | 259 | break; | 259 | break; |
167 | 260 | case IndicatorsModelRole::Position: | ||
168 | 261 | if (indicator) | ||
169 | 262 | { | ||
170 | 263 | return QVariant(indicator->position()); | ||
171 | 264 | } | ||
172 | 265 | break; | ||
173 | 260 | case IndicatorsModelRole::IndicatorProperties: | 266 | case IndicatorsModelRole::IndicatorProperties: |
174 | 261 | if (indicator) | 267 | if (indicator) |
175 | 262 | { | 268 | { |
176 | @@ -265,7 +271,6 @@ | |||
177 | 265 | break; | 271 | break; |
178 | 266 | case IndicatorsModelRole::IsValid: | 272 | case IndicatorsModelRole::IsValid: |
179 | 267 | return (indicator ? true : false); | 273 | return (indicator ? true : false); |
180 | 268 | case IndicatorsModelRole::Priority: | ||
181 | 269 | case IndicatorsModelRole::Title: | 274 | case IndicatorsModelRole::Title: |
182 | 270 | case IndicatorsModelRole::Description: | 275 | case IndicatorsModelRole::Description: |
183 | 271 | case IndicatorsModelRole::WidgetSource: | 276 | case IndicatorsModelRole::WidgetSource: |
184 | 272 | 277 | ||
185 | === modified file 'src/Panel/Indicators/servicefiles/com.canonical.indicator.battery' | |||
186 | --- src/Panel/Indicators/servicefiles/com.canonical.indicator.battery 2013-07-08 11:02:06 +0000 | |||
187 | +++ src/Panel/Indicators/servicefiles/com.canonical.indicator.battery 2013-08-09 17:42:20 +0000 | |||
188 | @@ -1,6 +1,7 @@ | |||
189 | 1 | [Indicator Service] | 1 | [Indicator Service] |
190 | 2 | Name=indicator-battery | 2 | Name=indicator-battery |
191 | 3 | ObjectPath=/com/canonical/indicator/battery | 3 | ObjectPath=/com/canonical/indicator/battery |
192 | 4 | Position=40 | ||
193 | 4 | 5 | ||
194 | 5 | [phone] | 6 | [phone] |
195 | 6 | ObjectPath=/com/canonical/indicator/battery/phone | 7 | ObjectPath=/com/canonical/indicator/battery/phone |
196 | 7 | 8 | ||
197 | === modified file 'src/Panel/Indicators/servicefiles/com.canonical.indicator.messages' | |||
198 | --- src/Panel/Indicators/servicefiles/com.canonical.indicator.messages 2013-06-07 12:51:16 +0000 | |||
199 | +++ src/Panel/Indicators/servicefiles/com.canonical.indicator.messages 2013-08-09 17:42:20 +0000 | |||
200 | @@ -1,6 +1,7 @@ | |||
201 | 1 | [Indicator Service] | 1 | [Indicator Service] |
202 | 2 | Name=indicator-messaging | 2 | Name=indicator-messaging |
203 | 3 | ObjectPath=/com/canonical/indicator/messages | 3 | ObjectPath=/com/canonical/indicator/messages |
204 | 4 | Position=50 | ||
205 | 4 | 5 | ||
206 | 5 | [phone] | 6 | [phone] |
207 | 6 | ObjectPath=/com/canonical/indicator/messages/phone | 7 | ObjectPath=/com/canonical/indicator/messages/phone |
208 | 7 | 8 | ||
209 | === modified file 'src/Panel/Indicators/servicefiles/com.canonical.indicator.time' | |||
210 | --- src/Panel/Indicators/servicefiles/com.canonical.indicator.time 2013-07-08 11:02:06 +0000 | |||
211 | +++ src/Panel/Indicators/servicefiles/com.canonical.indicator.time 2013-08-09 17:42:20 +0000 | |||
212 | @@ -1,6 +1,7 @@ | |||
213 | 1 | [Indicator Service] | 1 | [Indicator Service] |
214 | 2 | Name=indicator-time | 2 | Name=indicator-time |
215 | 3 | ObjectPath=/com/canonical/indicator/time | 3 | ObjectPath=/com/canonical/indicator/time |
216 | 4 | Position=20 | ||
217 | 4 | 5 | ||
218 | 5 | [phone] | 6 | [phone] |
219 | 6 | ObjectPath=/com/canonical/indicator/time/phone | 7 | ObjectPath=/com/canonical/indicator/time/phone |
220 | 7 | 8 | ||
221 | === modified file 'src/Panel/Indicators/servicefiles/com.canonical.settings.network' | |||
222 | --- src/Panel/Indicators/servicefiles/com.canonical.settings.network 2013-06-07 12:51:16 +0000 | |||
223 | +++ src/Panel/Indicators/servicefiles/com.canonical.settings.network 2013-08-09 17:42:20 +0000 | |||
224 | @@ -1,6 +1,7 @@ | |||
225 | 1 | [Indicator Service] | 1 | [Indicator Service] |
226 | 2 | Name=indicator-network | 2 | Name=indicator-network |
227 | 3 | ObjectPath=/com/canonical/settings/network | 3 | ObjectPath=/com/canonical/settings/network |
228 | 4 | Position=69 | ||
229 | 4 | 5 | ||
230 | 5 | [phone] | 6 | [phone] |
231 | 6 | ObjectPath=/com/canonical/settings/network/phone | 7 | ObjectPath=/com/canonical/settings/network/phone |
232 | 7 | 8 | ||
233 | === modified file 'src/Panel/Indicators/servicefiles/com.canonical.settings.sound' | |||
234 | --- src/Panel/Indicators/servicefiles/com.canonical.settings.sound 2013-06-07 12:51:16 +0000 | |||
235 | +++ src/Panel/Indicators/servicefiles/com.canonical.settings.sound 2013-08-09 17:42:20 +0000 | |||
236 | @@ -1,6 +1,7 @@ | |||
237 | 1 | [Indicator Service] | 1 | [Indicator Service] |
238 | 2 | Name=indicator-sound | 2 | Name=indicator-sound |
239 | 3 | ObjectPath=/com/canonical/settings/sound | 3 | ObjectPath=/com/canonical/settings/sound |
240 | 4 | Position=30 | ||
241 | 4 | 5 | ||
242 | 5 | [phone] | 6 | [phone] |
243 | 6 | ObjectPath=/com/canonical/settings/sound/phone | 7 | ObjectPath=/com/canonical/settings/sound/phone |
244 | 7 | 8 | ||
245 | === modified file 'tests/data/unity/indicators/com.canonical.indicator.fake1' | |||
246 | --- tests/data/unity/indicators/com.canonical.indicator.fake1 2013-06-12 10:09:43 +0000 | |||
247 | +++ tests/data/unity/indicators/com.canonical.indicator.fake1 2013-08-09 17:42:20 +0000 | |||
248 | @@ -1,6 +1,7 @@ | |||
249 | 1 | [Indicator Service] | 1 | [Indicator Service] |
250 | 2 | Name=indicator-fake1 | 2 | Name=indicator-fake1 |
251 | 3 | ObjectPath=/com/canonical/indicator/fake1 | 3 | ObjectPath=/com/canonical/indicator/fake1 |
252 | 4 | Position=1 | ||
253 | 4 | 5 | ||
254 | 5 | [phone] | 6 | [phone] |
255 | 6 | ObjectPath=/com/canonical/indicator/fake1/phone | 7 | ObjectPath=/com/canonical/indicator/fake1/phone |
256 | 7 | 8 | ||
257 | === modified file 'tests/data/unity/indicators/com.canonical.indicator.fake2' | |||
258 | --- tests/data/unity/indicators/com.canonical.indicator.fake2 2013-06-12 10:09:43 +0000 | |||
259 | +++ tests/data/unity/indicators/com.canonical.indicator.fake2 2013-08-09 17:42:20 +0000 | |||
260 | @@ -1,6 +1,7 @@ | |||
261 | 1 | [Indicator Service] | 1 | [Indicator Service] |
262 | 2 | Name=indicator-fake2 | 2 | Name=indicator-fake2 |
263 | 3 | ObjectPath=/com/canonical/indicator/fake2 | 3 | ObjectPath=/com/canonical/indicator/fake2 |
264 | 4 | Position=0 | ||
265 | 4 | 5 | ||
266 | 5 | [phone] | 6 | [phone] |
267 | 6 | ObjectPath=/com/canonical/indicator/fake2/phone | 7 | ObjectPath=/com/canonical/indicator/fake2/phone |
268 | 7 | 8 | ||
269 | === modified file 'tests/data/unity/indicators/com.canonical.indicator.fake3' | |||
270 | --- tests/data/unity/indicators/com.canonical.indicator.fake3 2013-06-12 10:09:43 +0000 | |||
271 | +++ tests/data/unity/indicators/com.canonical.indicator.fake3 2013-08-09 17:42:20 +0000 | |||
272 | @@ -1,6 +1,7 @@ | |||
273 | 1 | [Indicator Service] | 1 | [Indicator Service] |
274 | 2 | Name=indicator-fake3 | 2 | Name=indicator-fake3 |
275 | 3 | ObjectPath=/com/canonical/indicator/fake3 | 3 | ObjectPath=/com/canonical/indicator/fake3 |
276 | 4 | Position=3 | ||
277 | 4 | 5 | ||
278 | 5 | [phone] | 6 | [phone] |
279 | 6 | ObjectPath=/com/canonical/indicator/fake3/phone | 7 | ObjectPath=/com/canonical/indicator/fake3/phone |
280 | 7 | 8 | ||
281 | === modified file 'tests/data/unity/indicators/com.canonical.indicator.fake4' | |||
282 | --- tests/data/unity/indicators/com.canonical.indicator.fake4 2013-06-12 10:09:43 +0000 | |||
283 | +++ tests/data/unity/indicators/com.canonical.indicator.fake4 2013-08-09 17:42:20 +0000 | |||
284 | @@ -1,6 +1,7 @@ | |||
285 | 1 | [Indicator Service] | 1 | [Indicator Service] |
286 | 2 | Name=indicator-fake4 | 2 | Name=indicator-fake4 |
287 | 3 | ObjectPath=/com/canonical/indicator/fake4 | 3 | ObjectPath=/com/canonical/indicator/fake4 |
288 | 4 | Position=2 | ||
289 | 4 | 5 | ||
290 | 5 | [phone] | 6 | [phone] |
291 | 6 | ObjectPath=/com/canonical/indicator/fake4/phone | 7 | ObjectPath=/com/canonical/indicator/fake4/phone |
292 | 7 | 8 | ||
293 | === modified file 'tests/plugins/Unity/Indicators/indicatorsmanagertest.cpp' | |||
294 | --- tests/plugins/Unity/Indicators/indicatorsmanagertest.cpp 2013-07-29 11:29:15 +0000 | |||
295 | +++ tests/plugins/Unity/Indicators/indicatorsmanagertest.cpp 2013-08-09 17:42:20 +0000 | |||
296 | @@ -72,6 +72,7 @@ | |||
297 | 72 | QVERIFY(indicator ? true : false); | 72 | QVERIFY(indicator ? true : false); |
298 | 73 | 73 | ||
299 | 74 | QCOMPARE(indicator->identifier(), QString("indicator-fake1")); | 74 | QCOMPARE(indicator->identifier(), QString("indicator-fake1")); |
300 | 75 | QCOMPARE(indicator->position(), 1); | ||
301 | 75 | 76 | ||
302 | 76 | // Check that the initial properties have been set. | 77 | // Check that the initial properties have been set. |
303 | 77 | QVariantMap props = indicator->indicatorProperties().toMap(); | 78 | QVariantMap props = indicator->indicatorProperties().toMap(); |
304 | 78 | 79 | ||
305 | === modified file 'tests/plugins/Unity/Indicators/indicatorsmodeltest.cpp' | |||
306 | --- tests/plugins/Unity/Indicators/indicatorsmodeltest.cpp 2013-07-29 11:29:15 +0000 | |||
307 | +++ tests/plugins/Unity/Indicators/indicatorsmodeltest.cpp 2013-08-09 17:42:20 +0000 | |||
308 | @@ -66,10 +66,10 @@ | |||
309 | 66 | { | 66 | { |
310 | 67 | // Priority order. (2, 1, 4, 3) | 67 | // Priority order. (2, 1, 4, 3) |
311 | 68 | QVariantMap map; | 68 | QVariantMap map; |
316 | 69 | QVariantMap map1; map1["priority"] = 1; map1["title"] = "fake1"; | 69 | QVariantMap map1; map1["title"] = "fake1"; |
317 | 70 | QVariantMap map2; map2["priority"] = 0; map2["title"] = "fake2"; | 70 | QVariantMap map2; map2["title"] = "fake2"; |
318 | 71 | QVariantMap map3; map3["priority"] = 3; map3["title"] = "fake3"; | 71 | QVariantMap map3; map3["title"] = "fake3"; |
319 | 72 | QVariantMap map4; map4["priority"] = 2; map4["title"] = "fake4"; | 72 | QVariantMap map4; map4["title"] = "fake4"; |
320 | 73 | map["indicator-fake1"] = map1; | 73 | map["indicator-fake1"] = map1; |
321 | 74 | map["indicator-fake2"] = map2; | 74 | map["indicator-fake2"] = map2; |
322 | 75 | map["indicator-fake3"] = map3; | 75 | map["indicator-fake3"] = map3; |
323 | @@ -79,21 +79,28 @@ | |||
324 | 79 | model.setIndicatorData(map); | 79 | model.setIndicatorData(map); |
325 | 80 | model.load(); | 80 | model.load(); |
326 | 81 | 81 | ||
342 | 82 | QCOMPARE(model.data(0, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake2")); | 82 | // should be in order: |
343 | 83 | QCOMPARE(model.data(0, IndicatorsModelRole::Title).toString(), QString("fake2")); | 83 | // fake3, fake4, fake1, fake2 |
344 | 84 | QCOMPARE(model.data(0, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake2")); | 84 | |
345 | 85 | 85 | QCOMPARE(model.data(0, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake3")); | |
346 | 86 | QCOMPARE(model.data(1, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake1")); | 86 | QCOMPARE(model.data(0, IndicatorsModelRole::Title).toString(), QString("fake3")); |
347 | 87 | QCOMPARE(model.data(1, IndicatorsModelRole::Title).toString(), QString("fake1")); | 87 | QCOMPARE(model.data(0, IndicatorsModelRole::Position).toInt(), 3); |
348 | 88 | QCOMPARE(model.data(1, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake1")); | 88 | QCOMPARE(model.data(0, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake3")); |
349 | 89 | 89 | ||
350 | 90 | QCOMPARE(model.data(2, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake4")); | 90 | QCOMPARE(model.data(1, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake4")); |
351 | 91 | QCOMPARE(model.data(2, IndicatorsModelRole::Title).toString(), QString("fake4")); | 91 | QCOMPARE(model.data(1, IndicatorsModelRole::Title).toString(), QString("fake4")); |
352 | 92 | QCOMPARE(model.data(2, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake4")); | 92 | QCOMPARE(model.data(1, IndicatorsModelRole::Position).toInt(), 2); |
353 | 93 | 93 | QCOMPARE(model.data(1, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake4")); | |
354 | 94 | QCOMPARE(model.data(3, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake3")); | 94 | |
355 | 95 | QCOMPARE(model.data(3, IndicatorsModelRole::Title).toString(), QString("fake3")); | 95 | QCOMPARE(model.data(2, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake1")); |
356 | 96 | QCOMPARE(model.data(3, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake3")); | 96 | QCOMPARE(model.data(2, IndicatorsModelRole::Title).toString(), QString("fake1")); |
357 | 97 | QCOMPARE(model.data(2, IndicatorsModelRole::Position).toInt(), 1); | ||
358 | 98 | QCOMPARE(model.data(2, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake1")); | ||
359 | 99 | |||
360 | 100 | QCOMPARE(model.data(3, IndicatorsModelRole::Identifier).toString(), QString("indicator-fake2")); | ||
361 | 101 | QCOMPARE(model.data(3, IndicatorsModelRole::Title).toString(), QString("fake2")); | ||
362 | 102 | QCOMPARE(model.data(3, IndicatorsModelRole::Position).toInt(), 0); | ||
363 | 103 | QCOMPARE(model.data(3, IndicatorsModelRole::IndicatorProperties).toMap()["busName"].toString(), QString("com.canonical.indicator.fake2")); | ||
364 | 97 | } | 104 | } |
365 | 98 | }; | 105 | }; |
366 | 99 | 106 |
FAILED: Continuous integration, rev:181 jenkins. qa.ubuntu. com/job/ unity8- ci/570/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- saucy/2092 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- saucy/1010/ console jenkins. qa.ubuntu. com/job/ unity8- saucy-armhf- ci/571 jenkins. qa.ubuntu. com/job/ unity8- saucy-armhf- ci/571/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- saucy-i386- ci/570 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy/2097 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy/2097/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- saucy/1784
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ unity8- ci/570/ rebuild
http://