Merge lp:~aacid/unity-api/use_qenum into lp:unity-api
- use_qenum
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Lukáš Tinkl |
Approved revision: | 264 |
Merged at revision: | 263 |
Proposed branch: | lp:~aacid/unity-api/use_qenum |
Merge into: | lp:unity-api |
Prerequisite: | lp:~aacid/unity-api/add_suggest-override |
Diff against target: |
534 lines (+31/-49) 22 files modified
debian/control (+1/-1) include/unity/shell/application/ApplicationInfoInterface.h (+3/-4) include/unity/shell/application/ApplicationManagerInterface.h (+1/-1) include/unity/shell/application/Mir.h (+5/-5) include/unity/shell/application/MirSurfaceItemInterface.h (+1/-2) include/unity/shell/launcher/AppDrawerModelInterface.h (+1/-1) include/unity/shell/notifications/Enums.h (+3/-6) include/unity/shell/notifications/ModelInterface.h (+1/-1) include/unity/shell/scopes/CategoriesInterface.h (+1/-2) include/unity/shell/scopes/FiltersInterface.h (+2/-3) include/unity/shell/scopes/NavigationInterface.h (+1/-2) include/unity/shell/scopes/OptionSelectorOptionsInterface.h (+1/-2) include/unity/shell/scopes/PreviewModelInterface.h (+1/-2) include/unity/shell/scopes/PreviewWidgetModelInterface.h (+1/-2) include/unity/shell/scopes/ResultsModelInterface.h (+1/-2) include/unity/shell/scopes/ScopeInterface.h (+1/-2) include/unity/shell/scopes/ScopesInterface.h (+1/-2) include/unity/shell/scopes/SettingsModelInterface.h (+1/-2) include/unity/shell/scopes/ValueSliderValuesInterface.h (+1/-2) test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockActionModel.h (+1/-2) test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockModel.h (+1/-2) test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewWidgetModel.h (+1/-1) |
To merge this branch: | bzr merge lp:~aacid/unity-api/use_qenum |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paweł Stołowski (community) | Approve | ||
Lukáš Tinkl (community) | Approve | ||
Unity8 CI Bot | continuous-integration | Approve | |
Review via email: mp+313821@code.launchpad.net |
Commit message
Use the new Q_ENUM (Qt 5.5)
It's generally better than Q_ENUMS, one example it will fail to compile if you had specified the name wrong as in OptionSelectorO
Also fixes a warning about MockPreviewData being forward-declared as class but then being a struct
Description of the change
- 263. By Albert Astals Cid
-
Some more i missed somehow
Includes another one that was badly typed
- 264. By Albert Astals Cid
-
Q_FLAG is also the moderm way of Q_FLAGS
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:264
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : | # |
Yup, makes sense, compiles and tests passing
Preview Diff
1 | === modified file 'debian/control' | |||
2 | --- debian/control 2016-08-02 00:40:57 +0000 | |||
3 | +++ debian/control 2016-12-23 10:18:10 +0000 | |||
4 | @@ -17,7 +17,7 @@ | |||
5 | 17 | pkg-config, | 17 | pkg-config, |
6 | 18 | python3:any, | 18 | python3:any, |
7 | 19 | qt5-default, | 19 | qt5-default, |
9 | 20 | qtbase5-dev, | 20 | qtbase5-dev (>= 5.5), |
10 | 21 | qtdeclarative5-dev, | 21 | qtdeclarative5-dev, |
11 | 22 | qtdeclarative5-dev-tools, | 22 | qtdeclarative5-dev-tools, |
12 | 23 | qtdeclarative5-qtquick2-plugin, | 23 | qtdeclarative5-qtquick2-plugin, |
13 | 24 | 24 | ||
14 | === modified file 'include/unity/shell/application/ApplicationInfoInterface.h' | |||
15 | --- include/unity/shell/application/ApplicationInfoInterface.h 2016-11-14 20:35:23 +0000 | |||
16 | +++ include/unity/shell/application/ApplicationInfoInterface.h 2016-12-23 10:18:10 +0000 | |||
17 | @@ -44,10 +44,6 @@ | |||
18 | 44 | { | 44 | { |
19 | 45 | Q_OBJECT | 45 | Q_OBJECT |
20 | 46 | 46 | ||
21 | 47 | Q_ENUMS(Stage) | ||
22 | 48 | Q_ENUMS(State) | ||
23 | 49 | Q_ENUMS(RequestedState) | ||
24 | 50 | |||
25 | 51 | /** | 47 | /** |
26 | 52 | * @brief The appId of the application. | 48 | * @brief The appId of the application. |
27 | 53 | * | 49 | * |
28 | @@ -250,6 +246,7 @@ | |||
29 | 250 | MainStage, | 246 | MainStage, |
30 | 251 | SideStage | 247 | SideStage |
31 | 252 | }; | 248 | }; |
32 | 249 | Q_ENUM(Stage) | ||
33 | 253 | 250 | ||
34 | 254 | /** | 251 | /** |
35 | 255 | * @brief An application's state. | 252 | * @brief An application's state. |
36 | @@ -269,6 +266,7 @@ | |||
37 | 269 | Suspended, | 266 | Suspended, |
38 | 270 | Stopped | 267 | Stopped |
39 | 271 | }; | 268 | }; |
40 | 269 | Q_ENUM(State) | ||
41 | 272 | 270 | ||
42 | 273 | /** | 271 | /** |
43 | 274 | * @brief The desired state of an application | 272 | * @brief The desired state of an application |
44 | @@ -281,6 +279,7 @@ | |||
45 | 281 | RequestedRunning = Running, | 279 | RequestedRunning = Running, |
46 | 282 | RequestedSuspended = Suspended | 280 | RequestedSuspended = Suspended |
47 | 283 | }; | 281 | }; |
48 | 282 | Q_ENUM(RequestedState) | ||
49 | 284 | 283 | ||
50 | 285 | /** | 284 | /** |
51 | 286 | * @brief Closes the application | 285 | * @brief Closes the application |
52 | 287 | 286 | ||
53 | === modified file 'include/unity/shell/application/ApplicationManagerInterface.h' | |||
54 | --- include/unity/shell/application/ApplicationManagerInterface.h 2016-12-07 11:11:32 +0000 | |||
55 | +++ include/unity/shell/application/ApplicationManagerInterface.h 2016-12-23 10:18:10 +0000 | |||
56 | @@ -44,7 +44,6 @@ | |||
57 | 44 | class UNITY_API ApplicationManagerInterface: public QAbstractListModel | 44 | class UNITY_API ApplicationManagerInterface: public QAbstractListModel |
58 | 45 | { | 45 | { |
59 | 46 | Q_OBJECT | 46 | Q_OBJECT |
60 | 47 | Q_ENUMS(Roles) | ||
61 | 48 | 47 | ||
62 | 49 | /** | 48 | /** |
63 | 50 | * @brief The count of the applications known to the manager. | 49 | * @brief The count of the applications known to the manager. |
64 | @@ -98,6 +97,7 @@ | |||
65 | 98 | RoleExemptFromLifecycle, | 97 | RoleExemptFromLifecycle, |
66 | 99 | RoleApplication, | 98 | RoleApplication, |
67 | 100 | }; | 99 | }; |
68 | 100 | Q_ENUM(Roles) | ||
69 | 101 | 101 | ||
70 | 102 | /// @cond | 102 | /// @cond |
71 | 103 | virtual ~ApplicationManagerInterface() {} | 103 | virtual ~ApplicationManagerInterface() {} |
72 | 104 | 104 | ||
73 | === modified file 'include/unity/shell/application/Mir.h' | |||
74 | --- include/unity/shell/application/Mir.h 2016-11-03 12:25:43 +0000 | |||
75 | +++ include/unity/shell/application/Mir.h 2016-12-23 10:18:10 +0000 | |||
76 | @@ -25,11 +25,6 @@ | |||
77 | 25 | class Mir : public QObject | 25 | class Mir : public QObject |
78 | 26 | { | 26 | { |
79 | 27 | Q_OBJECT | 27 | Q_OBJECT |
80 | 28 | Q_ENUMS(Type) | ||
81 | 29 | Q_ENUMS(State) | ||
82 | 30 | Q_ENUMS(OrientationAngle) | ||
83 | 31 | Q_ENUMS(ShellChrome) | ||
84 | 32 | Q_ENUMS(FormFactor) | ||
85 | 33 | 28 | ||
86 | 34 | /** | 29 | /** |
87 | 35 | @brief Name of the mouse cursor to be used. Follows the X Cursor naming convention. | 30 | @brief Name of the mouse cursor to be used. Follows the X Cursor naming convention. |
88 | @@ -54,6 +49,7 @@ | |||
89 | 54 | SatelliteType, | 49 | SatelliteType, |
90 | 55 | TipType, | 50 | TipType, |
91 | 56 | }; | 51 | }; |
92 | 52 | Q_ENUM(Type) | ||
93 | 57 | 53 | ||
94 | 58 | /** | 54 | /** |
95 | 59 | @brief Surface state | 55 | @brief Surface state |
96 | @@ -74,6 +70,7 @@ | |||
97 | 74 | MaximizedBottomRightState, | 70 | MaximizedBottomRightState, |
98 | 75 | HiddenState, | 71 | HiddenState, |
99 | 76 | }; | 72 | }; |
100 | 73 | Q_ENUM(State) | ||
101 | 77 | 74 | ||
102 | 78 | /** | 75 | /** |
103 | 79 | @brief Surface orientation angle | 76 | @brief Surface orientation angle |
104 | @@ -84,6 +81,7 @@ | |||
105 | 84 | Angle180 = 180, | 81 | Angle180 = 180, |
106 | 85 | Angle270 = 270 | 82 | Angle270 = 270 |
107 | 86 | }; | 83 | }; |
108 | 84 | Q_ENUM(OrientationAngle) | ||
109 | 87 | 85 | ||
110 | 88 | /** | 86 | /** |
111 | 89 | @brief Shell chrome | 87 | @brief Shell chrome |
112 | @@ -92,6 +90,7 @@ | |||
113 | 92 | NormalChrome, | 90 | NormalChrome, |
114 | 93 | LowChrome, | 91 | LowChrome, |
115 | 94 | }; | 92 | }; |
116 | 93 | Q_ENUM(ShellChrome) | ||
117 | 95 | 94 | ||
118 | 96 | /** | 95 | /** |
119 | 97 | @brief Form Factor | 96 | @brief Form Factor |
120 | @@ -104,6 +103,7 @@ | |||
121 | 104 | FormFactorTV, | 103 | FormFactorTV, |
122 | 105 | FormFactorProjector, | 104 | FormFactorProjector, |
123 | 106 | }; | 105 | }; |
124 | 106 | Q_ENUM(FormFactor) | ||
125 | 107 | 107 | ||
126 | 108 | /// @cond | 108 | /// @cond |
127 | 109 | virtual void setCursorName(const QString &cursorName) = 0; | 109 | virtual void setCursorName(const QString &cursorName) = 0; |
128 | 110 | 110 | ||
129 | === modified file 'include/unity/shell/application/MirSurfaceItemInterface.h' | |||
130 | --- include/unity/shell/application/MirSurfaceItemInterface.h 2016-11-03 12:25:43 +0000 | |||
131 | +++ include/unity/shell/application/MirSurfaceItemInterface.h 2016-12-23 10:18:10 +0000 | |||
132 | @@ -41,8 +41,6 @@ | |||
133 | 41 | { | 41 | { |
134 | 42 | Q_OBJECT | 42 | Q_OBJECT |
135 | 43 | 43 | ||
136 | 44 | Q_ENUMS(FillMode) | ||
137 | 45 | |||
138 | 46 | /** | 44 | /** |
139 | 47 | * @brief The surface to be displayed | 45 | * @brief The surface to be displayed |
140 | 48 | */ | 46 | */ |
141 | @@ -118,6 +116,7 @@ | |||
142 | 118 | Stretch, | 116 | Stretch, |
143 | 119 | PadOrCrop | 117 | PadOrCrop |
144 | 120 | }; | 118 | }; |
145 | 119 | Q_ENUM(FillMode) | ||
146 | 121 | 120 | ||
147 | 122 | /// @cond | 121 | /// @cond |
148 | 123 | MirSurfaceItemInterface(QQuickItem *parent = 0) : QQuickItem(parent) {} | 122 | MirSurfaceItemInterface(QQuickItem *parent = 0) : QQuickItem(parent) {} |
149 | 124 | 123 | ||
150 | === modified file 'include/unity/shell/launcher/AppDrawerModelInterface.h' | |||
151 | --- include/unity/shell/launcher/AppDrawerModelInterface.h 2016-11-16 18:52:33 +0000 | |||
152 | +++ include/unity/shell/launcher/AppDrawerModelInterface.h 2016-12-23 10:18:10 +0000 | |||
153 | @@ -32,7 +32,6 @@ | |||
154 | 32 | class UNITY_API AppDrawerModelInterface: public QAbstractListModel | 32 | class UNITY_API AppDrawerModelInterface: public QAbstractListModel |
155 | 33 | { | 33 | { |
156 | 34 | Q_OBJECT | 34 | Q_OBJECT |
157 | 35 | Q_ENUMS(Roles) | ||
158 | 36 | public: | 35 | public: |
159 | 37 | /** | 36 | /** |
160 | 38 | * @brief The Roles supported by the model | 37 | * @brief The Roles supported by the model |
161 | @@ -46,6 +45,7 @@ | |||
162 | 46 | RoleKeywords, | 45 | RoleKeywords, |
163 | 47 | RoleUsage | 46 | RoleUsage |
164 | 48 | }; | 47 | }; |
165 | 48 | Q_ENUM(Roles) | ||
166 | 49 | 49 | ||
167 | 50 | /// @cond | 50 | /// @cond |
168 | 51 | AppDrawerModelInterface(QObject* parent = nullptr): QAbstractListModel(parent) {} | 51 | AppDrawerModelInterface(QObject* parent = nullptr): QAbstractListModel(parent) {} |
169 | 52 | 52 | ||
170 | === modified file 'include/unity/shell/notifications/Enums.h' | |||
171 | --- include/unity/shell/notifications/Enums.h 2013-05-30 12:22:50 +0000 | |||
172 | +++ include/unity/shell/notifications/Enums.h 2016-12-23 10:18:10 +0000 | |||
173 | @@ -42,8 +42,6 @@ | |||
174 | 42 | { | 42 | { |
175 | 43 | Q_OBJECT | 43 | Q_OBJECT |
176 | 44 | 44 | ||
177 | 45 | Q_ENUMS(UrgencyEnum) | ||
178 | 46 | |||
179 | 47 | public: | 45 | public: |
180 | 48 | /** | 46 | /** |
181 | 49 | \brief NotificationInterface's urgency enumeration. | 47 | \brief NotificationInterface's urgency enumeration. |
182 | @@ -57,6 +55,7 @@ | |||
183 | 57 | Normal, /**< Displayed before Low, after Critical. */ | 55 | Normal, /**< Displayed before Low, after Critical. */ |
184 | 58 | Critical /**< Displayed before Low and Normal. */ | 56 | Critical /**< Displayed before Low and Normal. */ |
185 | 59 | }; | 57 | }; |
186 | 58 | Q_ENUM(UrgencyEnum) | ||
187 | 60 | }; | 59 | }; |
188 | 61 | 60 | ||
189 | 62 | 61 | ||
190 | @@ -68,8 +67,6 @@ | |||
191 | 68 | { | 67 | { |
192 | 69 | Q_OBJECT | 68 | Q_OBJECT |
193 | 70 | 69 | ||
194 | 71 | Q_ENUMS(TypeEnum) | ||
195 | 72 | |||
196 | 73 | public: | 70 | public: |
197 | 74 | /** | 71 | /** |
198 | 75 | \brief NotificationInterface's type enumeration. | 72 | \brief NotificationInterface's type enumeration. |
199 | @@ -85,6 +82,7 @@ | |||
200 | 85 | SnapDecision, /**< Snap decision (multi-button). */ | 82 | SnapDecision, /**< Snap decision (multi-button). */ |
201 | 86 | Placeholder /**< Non-visible placeholder of default size. */ | 83 | Placeholder /**< Non-visible placeholder of default size. */ |
202 | 87 | }; | 84 | }; |
203 | 85 | Q_ENUM(TypeEnum) | ||
204 | 88 | }; | 86 | }; |
205 | 89 | 87 | ||
206 | 90 | 88 | ||
207 | @@ -96,8 +94,6 @@ | |||
208 | 96 | { | 94 | { |
209 | 97 | Q_OBJECT | 95 | Q_OBJECT |
210 | 98 | 96 | ||
211 | 99 | Q_FLAGS(HintEnum) | ||
212 | 100 | |||
213 | 101 | public: | 97 | public: |
214 | 102 | /** | 98 | /** |
215 | 103 | \brief NotificationInterface's hint flags. | 99 | \brief NotificationInterface's hint flags. |
216 | @@ -110,6 +106,7 @@ | |||
217 | 110 | ButtonTint = 1 << 1, /**< Use a colour tint on the positive button in a snap decision. */ | 106 | ButtonTint = 1 << 1, /**< Use a colour tint on the positive button in a snap decision. */ |
218 | 111 | IconOnly = 1 << 2 /**< Only display the icon, no summary or body. */ | 107 | IconOnly = 1 << 2 /**< Only display the icon, no summary or body. */ |
219 | 112 | }; | 108 | }; |
220 | 109 | Q_FLAG(HintEnum) | ||
221 | 113 | 110 | ||
222 | 114 | Q_DECLARE_FLAGS(Hints, HintEnum) | 111 | Q_DECLARE_FLAGS(Hints, HintEnum) |
223 | 115 | }; | 112 | }; |
224 | 116 | 113 | ||
225 | === modified file 'include/unity/shell/notifications/ModelInterface.h' | |||
226 | --- include/unity/shell/notifications/ModelInterface.h 2014-03-31 16:00:27 +0000 | |||
227 | +++ include/unity/shell/notifications/ModelInterface.h 2016-12-23 10:18:10 +0000 | |||
228 | @@ -47,7 +47,6 @@ | |||
229 | 47 | class UNITY_API ModelInterface : public QAbstractListModel | 47 | class UNITY_API ModelInterface : public QAbstractListModel |
230 | 48 | { | 48 | { |
231 | 49 | Q_OBJECT | 49 | Q_OBJECT |
232 | 50 | Q_ENUMS(Roles) | ||
233 | 51 | 50 | ||
234 | 52 | /** | 51 | /** |
235 | 53 | \brief Whether a placeholder for confirmation should be kept at the beginning | 52 | \brief Whether a placeholder for confirmation should be kept at the beginning |
236 | @@ -91,6 +90,7 @@ | |||
237 | 91 | RoleHints = Qt::UserRole + 10, /** attached hints */ | 90 | RoleHints = Qt::UserRole + 10, /** attached hints */ |
238 | 92 | RoleNotification = Qt::UserRole + 11 /** notification object */ | 91 | RoleNotification = Qt::UserRole + 11 /** notification object */ |
239 | 93 | }; | 92 | }; |
240 | 93 | Q_ENUM(Roles) | ||
241 | 94 | 94 | ||
242 | 95 | Q_SIGNALS: | 95 | Q_SIGNALS: |
243 | 96 | /** | 96 | /** |
244 | 97 | 97 | ||
245 | === modified file 'include/unity/shell/scopes/CategoriesInterface.h' | |||
246 | --- include/unity/shell/scopes/CategoriesInterface.h 2015-10-09 08:30:31 +0000 | |||
247 | +++ include/unity/shell/scopes/CategoriesInterface.h 2016-12-23 10:18:10 +0000 | |||
248 | @@ -38,8 +38,6 @@ | |||
249 | 38 | { | 38 | { |
250 | 39 | Q_OBJECT | 39 | Q_OBJECT |
251 | 40 | 40 | ||
252 | 41 | Q_ENUMS(Roles) | ||
253 | 42 | |||
254 | 43 | protected: | 41 | protected: |
255 | 44 | /// @cond | 42 | /// @cond |
256 | 45 | explicit CategoriesInterface(QObject* parent = 0) : QAbstractListModel(parent) { } | 43 | explicit CategoriesInterface(QObject* parent = 0) : QAbstractListModel(parent) { } |
257 | @@ -60,6 +58,7 @@ | |||
258 | 60 | RoleResults, | 58 | RoleResults, |
259 | 61 | RoleCount | 59 | RoleCount |
260 | 62 | }; | 60 | }; |
261 | 61 | Q_ENUM(Roles) | ||
262 | 63 | 62 | ||
263 | 64 | /** | 63 | /** |
264 | 65 | * @brief Override definition of a category by passing a custom JSON string. | 64 | * @brief Override definition of a category by passing a custom JSON string. |
265 | 66 | 65 | ||
266 | === modified file 'include/unity/shell/scopes/FiltersInterface.h' | |||
267 | --- include/unity/shell/scopes/FiltersInterface.h 2016-03-10 11:11:35 +0000 | |||
268 | +++ include/unity/shell/scopes/FiltersInterface.h 2016-12-23 10:18:10 +0000 | |||
269 | @@ -32,15 +32,13 @@ | |||
270 | 32 | { | 32 | { |
271 | 33 | Q_OBJECT | 33 | Q_OBJECT |
272 | 34 | 34 | ||
273 | 35 | Q_ENUMS(Roles) | ||
274 | 36 | Q_ENUMS(FilterType) | ||
275 | 37 | |||
276 | 38 | public: | 35 | public: |
277 | 39 | enum Roles { | 36 | enum Roles { |
278 | 40 | RoleFilterId = Qt::UserRole + 1, | 37 | RoleFilterId = Qt::UserRole + 1, |
279 | 41 | RoleFilterType, | 38 | RoleFilterType, |
280 | 42 | RoleFilter | 39 | RoleFilter |
281 | 43 | }; | 40 | }; |
282 | 41 | Q_ENUM(Roles) | ||
283 | 44 | 42 | ||
284 | 45 | enum FilterType { | 43 | enum FilterType { |
285 | 46 | Invalid, | 44 | Invalid, |
286 | @@ -50,6 +48,7 @@ | |||
287 | 50 | ExpandableFilterWidget | 48 | ExpandableFilterWidget |
288 | 51 | // TODO add remaining filters | 49 | // TODO add remaining filters |
289 | 52 | }; | 50 | }; |
290 | 51 | Q_ENUM(FilterType) | ||
291 | 53 | 52 | ||
292 | 54 | QHash<int, QByteArray> roleNames() const override | 53 | QHash<int, QByteArray> roleNames() const override |
293 | 55 | { | 54 | { |
294 | 56 | 55 | ||
295 | === modified file 'include/unity/shell/scopes/NavigationInterface.h' | |||
296 | --- include/unity/shell/scopes/NavigationInterface.h 2015-09-28 09:35:17 +0000 | |||
297 | +++ include/unity/shell/scopes/NavigationInterface.h 2016-12-23 10:18:10 +0000 | |||
298 | @@ -35,8 +35,6 @@ | |||
299 | 35 | { | 35 | { |
300 | 36 | Q_OBJECT | 36 | Q_OBJECT |
301 | 37 | 37 | ||
302 | 38 | Q_ENUMS(Roles) | ||
303 | 39 | |||
304 | 40 | /** | 38 | /** |
305 | 41 | * @brief Id of the navigation. | 39 | * @brief Id of the navigation. |
306 | 42 | */ | 40 | */ |
307 | @@ -98,6 +96,7 @@ | |||
308 | 98 | RoleHasChildren, | 96 | RoleHasChildren, |
309 | 99 | RoleIsActive | 97 | RoleIsActive |
310 | 100 | }; | 98 | }; |
311 | 99 | Q_ENUM(Roles) | ||
312 | 101 | 100 | ||
313 | 102 | // @cond | 101 | // @cond |
314 | 103 | virtual QString navigationId() const = 0; | 102 | virtual QString navigationId() const = 0; |
315 | 104 | 103 | ||
316 | === modified file 'include/unity/shell/scopes/OptionSelectorOptionsInterface.h' | |||
317 | --- include/unity/shell/scopes/OptionSelectorOptionsInterface.h 2015-04-02 14:42:29 +0000 | |||
318 | +++ include/unity/shell/scopes/OptionSelectorOptionsInterface.h 2016-12-23 10:18:10 +0000 | |||
319 | @@ -31,14 +31,13 @@ | |||
320 | 31 | { | 31 | { |
321 | 32 | Q_OBJECT | 32 | Q_OBJECT |
322 | 33 | 33 | ||
323 | 34 | Q_ENUMS(OptionRoles) | ||
324 | 35 | |||
325 | 36 | public: | 34 | public: |
326 | 37 | enum Roles { | 35 | enum Roles { |
327 | 38 | RoleOptionId = Qt::UserRole + 1, | 36 | RoleOptionId = Qt::UserRole + 1, |
328 | 39 | RoleOptionLabel, | 37 | RoleOptionLabel, |
329 | 40 | RoleOptionChecked | 38 | RoleOptionChecked |
330 | 41 | }; | 39 | }; |
331 | 40 | Q_ENUM(Roles) | ||
332 | 42 | 41 | ||
333 | 43 | Q_INVOKABLE virtual void setChecked(int index, bool checked) = 0; | 42 | Q_INVOKABLE virtual void setChecked(int index, bool checked) = 0; |
334 | 44 | 43 | ||
335 | 45 | 44 | ||
336 | === modified file 'include/unity/shell/scopes/PreviewModelInterface.h' | |||
337 | --- include/unity/shell/scopes/PreviewModelInterface.h 2014-05-19 08:42:28 +0000 | |||
338 | +++ include/unity/shell/scopes/PreviewModelInterface.h 2016-12-23 10:18:10 +0000 | |||
339 | @@ -38,8 +38,6 @@ | |||
340 | 38 | { | 38 | { |
341 | 39 | Q_OBJECT | 39 | Q_OBJECT |
342 | 40 | 40 | ||
343 | 41 | Q_ENUMS(Roles) | ||
344 | 42 | |||
345 | 43 | /** | 41 | /** |
346 | 44 | * @brief Number of column models this preview should expose. | 42 | * @brief Number of column models this preview should expose. |
347 | 45 | * | 43 | * |
348 | @@ -75,6 +73,7 @@ | |||
349 | 75 | enum Roles { | 73 | enum Roles { |
350 | 76 | RoleColumnModel | 74 | RoleColumnModel |
351 | 77 | }; | 75 | }; |
352 | 76 | Q_ENUM(Roles) | ||
353 | 78 | 77 | ||
354 | 79 | // @cond | 78 | // @cond |
355 | 80 | virtual void setWidgetColumnCount(int count) = 0; | 79 | virtual void setWidgetColumnCount(int count) = 0; |
356 | 81 | 80 | ||
357 | === modified file 'include/unity/shell/scopes/PreviewWidgetModelInterface.h' | |||
358 | --- include/unity/shell/scopes/PreviewWidgetModelInterface.h 2014-05-15 12:04:55 +0000 | |||
359 | +++ include/unity/shell/scopes/PreviewWidgetModelInterface.h 2016-12-23 10:18:10 +0000 | |||
360 | @@ -37,8 +37,6 @@ | |||
361 | 37 | { | 37 | { |
362 | 38 | Q_OBJECT | 38 | Q_OBJECT |
363 | 39 | 39 | ||
364 | 40 | Q_ENUMS(Roles) | ||
365 | 41 | |||
366 | 42 | protected: | 40 | protected: |
367 | 43 | /// @cond | 41 | /// @cond |
368 | 44 | explicit PreviewWidgetModelInterface(QObject* parent = 0) : QAbstractListModel(parent) { } | 42 | explicit PreviewWidgetModelInterface(QObject* parent = 0) : QAbstractListModel(parent) { } |
369 | @@ -53,6 +51,7 @@ | |||
370 | 53 | RoleType, | 51 | RoleType, |
371 | 54 | RoleProperties | 52 | RoleProperties |
372 | 55 | }; | 53 | }; |
373 | 54 | Q_ENUM(Roles) | ||
374 | 56 | 55 | ||
375 | 57 | // @cond | 56 | // @cond |
376 | 58 | QHash<int, QByteArray> roleNames() const override | 57 | QHash<int, QByteArray> roleNames() const override |
377 | 59 | 58 | ||
378 | === modified file 'include/unity/shell/scopes/ResultsModelInterface.h' | |||
379 | --- include/unity/shell/scopes/ResultsModelInterface.h 2016-03-03 09:46:51 +0000 | |||
380 | +++ include/unity/shell/scopes/ResultsModelInterface.h 2016-12-23 10:18:10 +0000 | |||
381 | @@ -35,8 +35,6 @@ | |||
382 | 35 | { | 35 | { |
383 | 36 | Q_OBJECT | 36 | Q_OBJECT |
384 | 37 | 37 | ||
385 | 38 | Q_ENUMS(Roles) | ||
386 | 39 | |||
387 | 40 | /** | 38 | /** |
388 | 41 | * @brief Id of associated category. | 39 | * @brief Id of associated category. |
389 | 42 | */ | 40 | */ |
390 | @@ -74,6 +72,7 @@ | |||
391 | 74 | RoleQuickPreviewData, ///< Data for UI quick previewing. In case of audio should contain uri and duration | 72 | RoleQuickPreviewData, ///< Data for UI quick previewing. In case of audio should contain uri and duration |
392 | 75 | RoleSocialActions ///< Data for social actions (in-card actions such as "+1"). | 73 | RoleSocialActions ///< Data for social actions (in-card actions such as "+1"). |
393 | 76 | }; | 74 | }; |
394 | 75 | Q_ENUM(Roles) | ||
395 | 77 | 76 | ||
396 | 78 | // @cond | 77 | // @cond |
397 | 79 | virtual QString categoryId() const = 0; | 78 | virtual QString categoryId() const = 0; |
398 | 80 | 79 | ||
399 | === modified file 'include/unity/shell/scopes/ScopeInterface.h' | |||
400 | --- include/unity/shell/scopes/ScopeInterface.h 2016-03-07 08:27:25 +0000 | |||
401 | +++ include/unity/shell/scopes/ScopeInterface.h 2016-12-23 10:18:10 +0000 | |||
402 | @@ -43,8 +43,6 @@ | |||
403 | 43 | { | 43 | { |
404 | 44 | Q_OBJECT | 44 | Q_OBJECT |
405 | 45 | 45 | ||
406 | 46 | Q_ENUMS(Status) | ||
407 | 47 | |||
408 | 48 | /** | 46 | /** |
409 | 49 | * @brief Id of the scope. | 47 | * @brief Id of the scope. |
410 | 50 | */ | 48 | */ |
411 | @@ -181,6 +179,7 @@ | |||
412 | 181 | NoLocationData, // No location data available | 179 | NoLocationData, // No location data available |
413 | 182 | Unknown, // A code unknown to the run-time was used | 180 | Unknown, // A code unknown to the run-time was used |
414 | 183 | }; | 181 | }; |
415 | 182 | Q_ENUM(Status) | ||
416 | 184 | 183 | ||
417 | 185 | // @cond | 184 | // @cond |
418 | 186 | virtual QString id() const = 0; | 185 | virtual QString id() const = 0; |
419 | 187 | 186 | ||
420 | === modified file 'include/unity/shell/scopes/ScopesInterface.h' | |||
421 | --- include/unity/shell/scopes/ScopesInterface.h 2015-02-04 17:24:55 +0000 | |||
422 | +++ include/unity/shell/scopes/ScopesInterface.h 2016-12-23 10:18:10 +0000 | |||
423 | @@ -39,8 +39,6 @@ | |||
424 | 39 | { | 39 | { |
425 | 40 | Q_OBJECT | 40 | Q_OBJECT |
426 | 41 | 41 | ||
427 | 42 | Q_ENUMS(Roles) | ||
428 | 43 | |||
429 | 44 | /** | 42 | /** |
430 | 45 | * @brief Boolean indicating whether asynchronous populating of the model finished. | 43 | * @brief Boolean indicating whether asynchronous populating of the model finished. |
431 | 46 | */ | 44 | */ |
432 | @@ -72,6 +70,7 @@ | |||
433 | 72 | RoleId, | 70 | RoleId, |
434 | 73 | RoleTitle | 71 | RoleTitle |
435 | 74 | }; | 72 | }; |
436 | 73 | Q_ENUM(Roles) | ||
437 | 75 | 74 | ||
438 | 76 | /** | 75 | /** |
439 | 77 | * @brief Get ScopeInterface instance associated with a row. | 76 | * @brief Get ScopeInterface instance associated with a row. |
440 | 78 | 77 | ||
441 | === modified file 'include/unity/shell/scopes/SettingsModelInterface.h' | |||
442 | --- include/unity/shell/scopes/SettingsModelInterface.h 2014-07-08 09:30:20 +0000 | |||
443 | +++ include/unity/shell/scopes/SettingsModelInterface.h 2016-12-23 10:18:10 +0000 | |||
444 | @@ -32,8 +32,6 @@ | |||
445 | 32 | { | 32 | { |
446 | 33 | Q_OBJECT | 33 | Q_OBJECT |
447 | 34 | 34 | ||
448 | 35 | Q_ENUMS(Roles) | ||
449 | 36 | |||
450 | 37 | /** | 35 | /** |
451 | 38 | * @brief Integer representing the number of setting elements in the model. | 36 | * @brief Integer representing the number of setting elements in the model. |
452 | 39 | */ | 37 | */ |
453 | @@ -63,6 +61,7 @@ | |||
454 | 63 | RoleProperties, | 61 | RoleProperties, |
455 | 64 | RoleValue | 62 | RoleValue |
456 | 65 | }; | 63 | }; |
457 | 64 | Q_ENUM(Roles) | ||
458 | 66 | 65 | ||
459 | 67 | // @cond | 66 | // @cond |
460 | 68 | QHash<int, QByteArray> roleNames() const override | 67 | QHash<int, QByteArray> roleNames() const override |
461 | 69 | 68 | ||
462 | === modified file 'include/unity/shell/scopes/ValueSliderValuesInterface.h' | |||
463 | --- include/unity/shell/scopes/ValueSliderValuesInterface.h 2015-12-02 15:04:53 +0000 | |||
464 | +++ include/unity/shell/scopes/ValueSliderValuesInterface.h 2016-12-23 10:18:10 +0000 | |||
465 | @@ -31,13 +31,12 @@ | |||
466 | 31 | { | 31 | { |
467 | 32 | Q_OBJECT | 32 | Q_OBJECT |
468 | 33 | 33 | ||
469 | 34 | Q_ENUMS(SliderValueRoles) | ||
470 | 35 | |||
471 | 36 | public: | 34 | public: |
472 | 37 | enum Roles { | 35 | enum Roles { |
473 | 38 | RoleValue = Qt::UserRole + 1, | 36 | RoleValue = Qt::UserRole + 1, |
474 | 39 | RoleLabel | 37 | RoleLabel |
475 | 40 | }; | 38 | }; |
476 | 39 | Q_ENUM(Roles) | ||
477 | 41 | 40 | ||
478 | 42 | QHash<int, QByteArray> roleNames() const override | 41 | QHash<int, QByteArray> roleNames() const override |
479 | 43 | { | 42 | { |
480 | 44 | 43 | ||
481 | === modified file 'test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockActionModel.h' | |||
482 | --- test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockActionModel.h 2016-12-23 10:18:10 +0000 | |||
483 | +++ test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockActionModel.h 2016-12-23 10:18:10 +0000 | |||
484 | @@ -30,8 +30,6 @@ | |||
485 | 30 | class UNITY_API MockActionModel : public QAbstractListModel | 30 | class UNITY_API MockActionModel : public QAbstractListModel |
486 | 31 | { | 31 | { |
487 | 32 | Q_OBJECT | 32 | Q_OBJECT |
488 | 33 | |||
489 | 34 | Q_ENUMS(RoleEnum) | ||
490 | 35 | public: | 33 | public: |
491 | 36 | explicit MockActionModel(QObject *parent = 0); | 34 | explicit MockActionModel(QObject *parent = 0); |
492 | 37 | 35 | ||
493 | @@ -44,6 +42,7 @@ | |||
494 | 44 | Label = Qt::DisplayRole, | 42 | Label = Qt::DisplayRole, |
495 | 45 | Id = Qt::UserRole | 43 | Id = Qt::UserRole |
496 | 46 | }; | 44 | }; |
497 | 45 | Q_ENUM(RoleEnum) | ||
498 | 47 | 46 | ||
499 | 48 | private: | 47 | private: |
500 | 49 | QHash<int, QByteArray> m_roles; | 48 | QHash<int, QByteArray> m_roles; |
501 | 50 | 49 | ||
502 | === modified file 'test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockModel.h' | |||
503 | --- test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockModel.h 2016-12-23 10:18:10 +0000 | |||
504 | +++ test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockModel.h 2016-12-23 10:18:10 +0000 | |||
505 | @@ -36,8 +36,6 @@ | |||
506 | 36 | { | 36 | { |
507 | 37 | Q_OBJECT | 37 | Q_OBJECT |
508 | 38 | 38 | ||
509 | 39 | Q_ENUMS(RoleEnum) | ||
510 | 40 | |||
511 | 41 | public: | 39 | public: |
512 | 42 | MockModel(QObject* parent = 0); | 40 | MockModel(QObject* parent = 0); |
513 | 43 | 41 | ||
514 | @@ -68,6 +66,7 @@ | |||
515 | 68 | Hints, | 66 | Hints, |
516 | 69 | Actions | 67 | Actions |
517 | 70 | }; | 68 | }; |
518 | 69 | Q_ENUM(RoleEnum) | ||
519 | 71 | 70 | ||
520 | 72 | private: | 71 | private: |
521 | 73 | bool m_confirmationPlaceholder; | 72 | bool m_confirmationPlaceholder; |
522 | 74 | 73 | ||
523 | === modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewWidgetModel.h' | |||
524 | --- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewWidgetModel.h 2014-05-13 13:52:12 +0000 | |||
525 | +++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewWidgetModel.h 2016-12-23 10:18:10 +0000 | |||
526 | @@ -22,7 +22,7 @@ | |||
527 | 22 | 22 | ||
528 | 23 | #include <QSharedPointer> | 23 | #include <QSharedPointer> |
529 | 24 | 24 | ||
531 | 25 | class MockPreviewData; | 25 | struct MockPreviewData; |
532 | 26 | 26 | ||
533 | 27 | class MockPreviewWidgetModel : public unity::shell::scopes::PreviewWidgetModelInterface | 27 | class MockPreviewWidgetModel : public unity::shell::scopes::PreviewWidgetModelInterface |
534 | 28 | { | 28 | { |
PASSED: Continuous integration, rev:262 /unity8- jenkins. ubuntu. com/job/ lp-unity- api-ci/ 124/ /unity8- jenkins. ubuntu. com/job/ build/3642 /unity8- jenkins. ubuntu. com/job/ build-0- fetch/3670 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 3514 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 3514/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/3514 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/3514/ artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 3514 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 3514/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/3514 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/3514/ artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 3514 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 3514/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/3514 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/3514/ artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-unity- api-ci/ 124/rebuild
https:/