Merge lp:~aacid/unity-api/use_qenum into lp:unity-api

Proposed by Albert Astals Cid
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
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 OptionSelectorOptionsInterface.h

Also fixes a warning about MockPreviewData being forward-declared as class but then being a struct

To post a comment you must log in.
lp:~aacid/unity-api/use_qenum updated
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

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:262
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/124/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3642
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3670
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3514
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3514/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3514
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3514/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3514
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3514/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3514
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3514/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3514
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3514/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3514
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3514/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/124/rebuild

review: Approve (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:264
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/125/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3646
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3674
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3519/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3519/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3519/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3519/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3519/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3519/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/125/rebuild

review: Approve (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Yup, makes sense, compiles and tests passing

review: Approve
Revision history for this message
Paweł Stołowski (stolowski) wrote :

+1, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2016-08-02 00:40:57 +0000
+++ debian/control 2016-12-23 10:18:10 +0000
@@ -17,7 +17,7 @@
17 pkg-config,17 pkg-config,
18 python3:any,18 python3:any,
19 qt5-default,19 qt5-default,
20 qtbase5-dev,20 qtbase5-dev (>= 5.5),
21 qtdeclarative5-dev,21 qtdeclarative5-dev,
22 qtdeclarative5-dev-tools,22 qtdeclarative5-dev-tools,
23 qtdeclarative5-qtquick2-plugin,23 qtdeclarative5-qtquick2-plugin,
2424
=== modified file 'include/unity/shell/application/ApplicationInfoInterface.h'
--- include/unity/shell/application/ApplicationInfoInterface.h 2016-11-14 20:35:23 +0000
+++ include/unity/shell/application/ApplicationInfoInterface.h 2016-12-23 10:18:10 +0000
@@ -44,10 +44,6 @@
44{44{
45 Q_OBJECT45 Q_OBJECT
4646
47 Q_ENUMS(Stage)
48 Q_ENUMS(State)
49 Q_ENUMS(RequestedState)
50
51 /**47 /**
52 * @brief The appId of the application.48 * @brief The appId of the application.
53 *49 *
@@ -250,6 +246,7 @@
250 MainStage,246 MainStage,
251 SideStage247 SideStage
252 };248 };
249 Q_ENUM(Stage)
253250
254 /**251 /**
255 * @brief An application's state.252 * @brief An application's state.
@@ -269,6 +266,7 @@
269 Suspended,266 Suspended,
270 Stopped267 Stopped
271 };268 };
269 Q_ENUM(State)
272270
273 /**271 /**
274 * @brief The desired state of an application272 * @brief The desired state of an application
@@ -281,6 +279,7 @@
281 RequestedRunning = Running,279 RequestedRunning = Running,
282 RequestedSuspended = Suspended280 RequestedSuspended = Suspended
283 };281 };
282 Q_ENUM(RequestedState)
284283
285 /**284 /**
286 * @brief Closes the application285 * @brief Closes the application
287286
=== modified file 'include/unity/shell/application/ApplicationManagerInterface.h'
--- include/unity/shell/application/ApplicationManagerInterface.h 2016-12-07 11:11:32 +0000
+++ include/unity/shell/application/ApplicationManagerInterface.h 2016-12-23 10:18:10 +0000
@@ -44,7 +44,6 @@
44class UNITY_API ApplicationManagerInterface: public QAbstractListModel44class UNITY_API ApplicationManagerInterface: public QAbstractListModel
45{45{
46 Q_OBJECT46 Q_OBJECT
47 Q_ENUMS(Roles)
4847
49 /**48 /**
50 * @brief The count of the applications known to the manager.49 * @brief The count of the applications known to the manager.
@@ -98,6 +97,7 @@
98 RoleExemptFromLifecycle,97 RoleExemptFromLifecycle,
99 RoleApplication,98 RoleApplication,
100 };99 };
100 Q_ENUM(Roles)
101101
102 /// @cond102 /// @cond
103 virtual ~ApplicationManagerInterface() {}103 virtual ~ApplicationManagerInterface() {}
104104
=== modified file 'include/unity/shell/application/Mir.h'
--- include/unity/shell/application/Mir.h 2016-11-03 12:25:43 +0000
+++ include/unity/shell/application/Mir.h 2016-12-23 10:18:10 +0000
@@ -25,11 +25,6 @@
25class Mir : public QObject25class Mir : public QObject
26{26{
27 Q_OBJECT27 Q_OBJECT
28 Q_ENUMS(Type)
29 Q_ENUMS(State)
30 Q_ENUMS(OrientationAngle)
31 Q_ENUMS(ShellChrome)
32 Q_ENUMS(FormFactor)
3328
34 /**29 /**
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.
@@ -54,6 +49,7 @@
54 SatelliteType,49 SatelliteType,
55 TipType,50 TipType,
56 };51 };
52 Q_ENUM(Type)
5753
58 /**54 /**
59 @brief Surface state55 @brief Surface state
@@ -74,6 +70,7 @@
74 MaximizedBottomRightState,70 MaximizedBottomRightState,
75 HiddenState,71 HiddenState,
76 };72 };
73 Q_ENUM(State)
7774
78 /**75 /**
79 @brief Surface orientation angle76 @brief Surface orientation angle
@@ -84,6 +81,7 @@
84 Angle180 = 180,81 Angle180 = 180,
85 Angle270 = 27082 Angle270 = 270
86 };83 };
84 Q_ENUM(OrientationAngle)
8785
88 /**86 /**
89 @brief Shell chrome87 @brief Shell chrome
@@ -92,6 +90,7 @@
92 NormalChrome,90 NormalChrome,
93 LowChrome,91 LowChrome,
94 };92 };
93 Q_ENUM(ShellChrome)
9594
96 /**95 /**
97 @brief Form Factor96 @brief Form Factor
@@ -104,6 +103,7 @@
104 FormFactorTV,103 FormFactorTV,
105 FormFactorProjector,104 FormFactorProjector,
106 };105 };
106 Q_ENUM(FormFactor)
107107
108 /// @cond108 /// @cond
109 virtual void setCursorName(const QString &cursorName) = 0;109 virtual void setCursorName(const QString &cursorName) = 0;
110110
=== modified file 'include/unity/shell/application/MirSurfaceItemInterface.h'
--- include/unity/shell/application/MirSurfaceItemInterface.h 2016-11-03 12:25:43 +0000
+++ include/unity/shell/application/MirSurfaceItemInterface.h 2016-12-23 10:18:10 +0000
@@ -41,8 +41,6 @@
41{41{
42 Q_OBJECT42 Q_OBJECT
4343
44 Q_ENUMS(FillMode)
45
46 /**44 /**
47 * @brief The surface to be displayed45 * @brief The surface to be displayed
48 */46 */
@@ -118,6 +116,7 @@
118 Stretch,116 Stretch,
119 PadOrCrop117 PadOrCrop
120 };118 };
119 Q_ENUM(FillMode)
121120
122 /// @cond121 /// @cond
123 MirSurfaceItemInterface(QQuickItem *parent = 0) : QQuickItem(parent) {}122 MirSurfaceItemInterface(QQuickItem *parent = 0) : QQuickItem(parent) {}
124123
=== modified file 'include/unity/shell/launcher/AppDrawerModelInterface.h'
--- include/unity/shell/launcher/AppDrawerModelInterface.h 2016-11-16 18:52:33 +0000
+++ include/unity/shell/launcher/AppDrawerModelInterface.h 2016-12-23 10:18:10 +0000
@@ -32,7 +32,6 @@
32class UNITY_API AppDrawerModelInterface: public QAbstractListModel32class UNITY_API AppDrawerModelInterface: public QAbstractListModel
33{33{
34 Q_OBJECT34 Q_OBJECT
35 Q_ENUMS(Roles)
36public:35public:
37 /**36 /**
38 * @brief The Roles supported by the model37 * @brief The Roles supported by the model
@@ -46,6 +45,7 @@
46 RoleKeywords,45 RoleKeywords,
47 RoleUsage46 RoleUsage
48 };47 };
48 Q_ENUM(Roles)
4949
50 /// @cond50 /// @cond
51 AppDrawerModelInterface(QObject* parent = nullptr): QAbstractListModel(parent) {}51 AppDrawerModelInterface(QObject* parent = nullptr): QAbstractListModel(parent) {}
5252
=== modified file 'include/unity/shell/notifications/Enums.h'
--- include/unity/shell/notifications/Enums.h 2013-05-30 12:22:50 +0000
+++ include/unity/shell/notifications/Enums.h 2016-12-23 10:18:10 +0000
@@ -42,8 +42,6 @@
42{42{
43 Q_OBJECT43 Q_OBJECT
4444
45 Q_ENUMS(UrgencyEnum)
46
47public:45public:
48 /**46 /**
49 \brief NotificationInterface's urgency enumeration.47 \brief NotificationInterface's urgency enumeration.
@@ -57,6 +55,7 @@
57 Normal, /**< Displayed before Low, after Critical. */55 Normal, /**< Displayed before Low, after Critical. */
58 Critical /**< Displayed before Low and Normal. */56 Critical /**< Displayed before Low and Normal. */
59 };57 };
58 Q_ENUM(UrgencyEnum)
60};59};
6160
6261
@@ -68,8 +67,6 @@
68{67{
69 Q_OBJECT68 Q_OBJECT
7069
71 Q_ENUMS(TypeEnum)
72
73public:70public:
74 /**71 /**
75 \brief NotificationInterface's type enumeration.72 \brief NotificationInterface's type enumeration.
@@ -85,6 +82,7 @@
85 SnapDecision, /**< Snap decision (multi-button). */82 SnapDecision, /**< Snap decision (multi-button). */
86 Placeholder /**< Non-visible placeholder of default size. */83 Placeholder /**< Non-visible placeholder of default size. */
87 };84 };
85 Q_ENUM(TypeEnum)
88};86};
8987
9088
@@ -96,8 +94,6 @@
96{94{
97 Q_OBJECT95 Q_OBJECT
9896
99 Q_FLAGS(HintEnum)
100
101public:97public:
102 /**98 /**
103 \brief NotificationInterface's hint flags.99 \brief NotificationInterface's hint flags.
@@ -110,6 +106,7 @@
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. */
111 IconOnly = 1 << 2 /**< Only display the icon, no summary or body. */107 IconOnly = 1 << 2 /**< Only display the icon, no summary or body. */
112 };108 };
109 Q_FLAG(HintEnum)
113110
114 Q_DECLARE_FLAGS(Hints, HintEnum)111 Q_DECLARE_FLAGS(Hints, HintEnum)
115};112};
116113
=== modified file 'include/unity/shell/notifications/ModelInterface.h'
--- include/unity/shell/notifications/ModelInterface.h 2014-03-31 16:00:27 +0000
+++ include/unity/shell/notifications/ModelInterface.h 2016-12-23 10:18:10 +0000
@@ -47,7 +47,6 @@
47class UNITY_API ModelInterface : public QAbstractListModel47class UNITY_API ModelInterface : public QAbstractListModel
48{48{
49 Q_OBJECT49 Q_OBJECT
50 Q_ENUMS(Roles)
5150
52 /**51 /**
53 \brief Whether a placeholder for confirmation should be kept at the beginning52 \brief Whether a placeholder for confirmation should be kept at the beginning
@@ -91,6 +90,7 @@
91 RoleHints = Qt::UserRole + 10, /** attached hints */90 RoleHints = Qt::UserRole + 10, /** attached hints */
92 RoleNotification = Qt::UserRole + 11 /** notification object */91 RoleNotification = Qt::UserRole + 11 /** notification object */
93 };92 };
93 Q_ENUM(Roles)
9494
95Q_SIGNALS:95Q_SIGNALS:
96 /**96 /**
9797
=== modified file 'include/unity/shell/scopes/CategoriesInterface.h'
--- include/unity/shell/scopes/CategoriesInterface.h 2015-10-09 08:30:31 +0000
+++ include/unity/shell/scopes/CategoriesInterface.h 2016-12-23 10:18:10 +0000
@@ -38,8 +38,6 @@
38{38{
39 Q_OBJECT39 Q_OBJECT
4040
41 Q_ENUMS(Roles)
42
43protected:41protected:
44 /// @cond42 /// @cond
45 explicit CategoriesInterface(QObject* parent = 0) : QAbstractListModel(parent) { }43 explicit CategoriesInterface(QObject* parent = 0) : QAbstractListModel(parent) { }
@@ -60,6 +58,7 @@
60 RoleResults,58 RoleResults,
61 RoleCount59 RoleCount
62 };60 };
61 Q_ENUM(Roles)
6362
64 /**63 /**
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.
6665
=== modified file 'include/unity/shell/scopes/FiltersInterface.h'
--- include/unity/shell/scopes/FiltersInterface.h 2016-03-10 11:11:35 +0000
+++ include/unity/shell/scopes/FiltersInterface.h 2016-12-23 10:18:10 +0000
@@ -32,15 +32,13 @@
32{32{
33 Q_OBJECT33 Q_OBJECT
3434
35 Q_ENUMS(Roles)
36 Q_ENUMS(FilterType)
37
38public:35public:
39 enum Roles {36 enum Roles {
40 RoleFilterId = Qt::UserRole + 1,37 RoleFilterId = Qt::UserRole + 1,
41 RoleFilterType,38 RoleFilterType,
42 RoleFilter39 RoleFilter
43 };40 };
41 Q_ENUM(Roles)
4442
45 enum FilterType {43 enum FilterType {
46 Invalid,44 Invalid,
@@ -50,6 +48,7 @@
50 ExpandableFilterWidget48 ExpandableFilterWidget
51 // TODO add remaining filters49 // TODO add remaining filters
52 };50 };
51 Q_ENUM(FilterType)
5352
54 QHash<int, QByteArray> roleNames() const override53 QHash<int, QByteArray> roleNames() const override
55 {54 {
5655
=== modified file 'include/unity/shell/scopes/NavigationInterface.h'
--- include/unity/shell/scopes/NavigationInterface.h 2015-09-28 09:35:17 +0000
+++ include/unity/shell/scopes/NavigationInterface.h 2016-12-23 10:18:10 +0000
@@ -35,8 +35,6 @@
35{35{
36 Q_OBJECT36 Q_OBJECT
3737
38 Q_ENUMS(Roles)
39
40 /**38 /**
41 * @brief Id of the navigation.39 * @brief Id of the navigation.
42 */40 */
@@ -98,6 +96,7 @@
98 RoleHasChildren,96 RoleHasChildren,
99 RoleIsActive97 RoleIsActive
100 };98 };
99 Q_ENUM(Roles)
101100
102 // @cond101 // @cond
103 virtual QString navigationId() const = 0;102 virtual QString navigationId() const = 0;
104103
=== modified file 'include/unity/shell/scopes/OptionSelectorOptionsInterface.h'
--- include/unity/shell/scopes/OptionSelectorOptionsInterface.h 2015-04-02 14:42:29 +0000
+++ include/unity/shell/scopes/OptionSelectorOptionsInterface.h 2016-12-23 10:18:10 +0000
@@ -31,14 +31,13 @@
31{31{
32 Q_OBJECT32 Q_OBJECT
3333
34 Q_ENUMS(OptionRoles)
35
36public:34public:
37 enum Roles {35 enum Roles {
38 RoleOptionId = Qt::UserRole + 1,36 RoleOptionId = Qt::UserRole + 1,
39 RoleOptionLabel,37 RoleOptionLabel,
40 RoleOptionChecked38 RoleOptionChecked
41 };39 };
40 Q_ENUM(Roles)
4241
43 Q_INVOKABLE virtual void setChecked(int index, bool checked) = 0;42 Q_INVOKABLE virtual void setChecked(int index, bool checked) = 0;
4443
4544
=== modified file 'include/unity/shell/scopes/PreviewModelInterface.h'
--- include/unity/shell/scopes/PreviewModelInterface.h 2014-05-19 08:42:28 +0000
+++ include/unity/shell/scopes/PreviewModelInterface.h 2016-12-23 10:18:10 +0000
@@ -38,8 +38,6 @@
38{38{
39 Q_OBJECT39 Q_OBJECT
4040
41 Q_ENUMS(Roles)
42
43 /**41 /**
44 * @brief Number of column models this preview should expose.42 * @brief Number of column models this preview should expose.
45 *43 *
@@ -75,6 +73,7 @@
75 enum Roles {73 enum Roles {
76 RoleColumnModel74 RoleColumnModel
77 };75 };
76 Q_ENUM(Roles)
7877
79 // @cond78 // @cond
80 virtual void setWidgetColumnCount(int count) = 0;79 virtual void setWidgetColumnCount(int count) = 0;
8180
=== modified file 'include/unity/shell/scopes/PreviewWidgetModelInterface.h'
--- include/unity/shell/scopes/PreviewWidgetModelInterface.h 2014-05-15 12:04:55 +0000
+++ include/unity/shell/scopes/PreviewWidgetModelInterface.h 2016-12-23 10:18:10 +0000
@@ -37,8 +37,6 @@
37{37{
38 Q_OBJECT38 Q_OBJECT
3939
40 Q_ENUMS(Roles)
41
42protected:40protected:
43 /// @cond41 /// @cond
44 explicit PreviewWidgetModelInterface(QObject* parent = 0) : QAbstractListModel(parent) { }42 explicit PreviewWidgetModelInterface(QObject* parent = 0) : QAbstractListModel(parent) { }
@@ -53,6 +51,7 @@
53 RoleType,51 RoleType,
54 RoleProperties52 RoleProperties
55 };53 };
54 Q_ENUM(Roles)
5655
57 // @cond56 // @cond
58 QHash<int, QByteArray> roleNames() const override57 QHash<int, QByteArray> roleNames() const override
5958
=== modified file 'include/unity/shell/scopes/ResultsModelInterface.h'
--- include/unity/shell/scopes/ResultsModelInterface.h 2016-03-03 09:46:51 +0000
+++ include/unity/shell/scopes/ResultsModelInterface.h 2016-12-23 10:18:10 +0000
@@ -35,8 +35,6 @@
35{35{
36 Q_OBJECT36 Q_OBJECT
3737
38 Q_ENUMS(Roles)
39
40 /**38 /**
41 * @brief Id of associated category.39 * @brief Id of associated category.
42 */40 */
@@ -74,6 +72,7 @@
74 RoleQuickPreviewData, ///< Data for UI quick previewing. In case of audio should contain uri and duration72 RoleQuickPreviewData, ///< Data for UI quick previewing. In case of audio should contain uri and duration
75 RoleSocialActions ///< Data for social actions (in-card actions such as "+1").73 RoleSocialActions ///< Data for social actions (in-card actions such as "+1").
76 };74 };
75 Q_ENUM(Roles)
7776
78 // @cond77 // @cond
79 virtual QString categoryId() const = 0;78 virtual QString categoryId() const = 0;
8079
=== modified file 'include/unity/shell/scopes/ScopeInterface.h'
--- include/unity/shell/scopes/ScopeInterface.h 2016-03-07 08:27:25 +0000
+++ include/unity/shell/scopes/ScopeInterface.h 2016-12-23 10:18:10 +0000
@@ -43,8 +43,6 @@
43{43{
44 Q_OBJECT44 Q_OBJECT
4545
46 Q_ENUMS(Status)
47
48 /**46 /**
49 * @brief Id of the scope.47 * @brief Id of the scope.
50 */48 */
@@ -181,6 +179,7 @@
181 NoLocationData, // No location data available179 NoLocationData, // No location data available
182 Unknown, // A code unknown to the run-time was used180 Unknown, // A code unknown to the run-time was used
183 };181 };
182 Q_ENUM(Status)
184183
185 // @cond184 // @cond
186 virtual QString id() const = 0;185 virtual QString id() const = 0;
187186
=== modified file 'include/unity/shell/scopes/ScopesInterface.h'
--- include/unity/shell/scopes/ScopesInterface.h 2015-02-04 17:24:55 +0000
+++ include/unity/shell/scopes/ScopesInterface.h 2016-12-23 10:18:10 +0000
@@ -39,8 +39,6 @@
39{39{
40 Q_OBJECT40 Q_OBJECT
4141
42 Q_ENUMS(Roles)
43
44 /**42 /**
45 * @brief Boolean indicating whether asynchronous populating of the model finished.43 * @brief Boolean indicating whether asynchronous populating of the model finished.
46 */44 */
@@ -72,6 +70,7 @@
72 RoleId,70 RoleId,
73 RoleTitle71 RoleTitle
74 };72 };
73 Q_ENUM(Roles)
7574
76 /**75 /**
77 * @brief Get ScopeInterface instance associated with a row.76 * @brief Get ScopeInterface instance associated with a row.
7877
=== modified file 'include/unity/shell/scopes/SettingsModelInterface.h'
--- include/unity/shell/scopes/SettingsModelInterface.h 2014-07-08 09:30:20 +0000
+++ include/unity/shell/scopes/SettingsModelInterface.h 2016-12-23 10:18:10 +0000
@@ -32,8 +32,6 @@
32{32{
33Q_OBJECT33Q_OBJECT
3434
35Q_ENUMS(Roles)
36
37/**35/**
38 * @brief Integer representing the number of setting elements in the model.36 * @brief Integer representing the number of setting elements in the model.
39 */37 */
@@ -63,6 +61,7 @@
63 RoleProperties,61 RoleProperties,
64 RoleValue62 RoleValue
65 };63 };
64 Q_ENUM(Roles)
6665
67 // @cond66 // @cond
68 QHash<int, QByteArray> roleNames() const override67 QHash<int, QByteArray> roleNames() const override
6968
=== modified file 'include/unity/shell/scopes/ValueSliderValuesInterface.h'
--- include/unity/shell/scopes/ValueSliderValuesInterface.h 2015-12-02 15:04:53 +0000
+++ include/unity/shell/scopes/ValueSliderValuesInterface.h 2016-12-23 10:18:10 +0000
@@ -31,13 +31,12 @@
31{31{
32 Q_OBJECT32 Q_OBJECT
3333
34 Q_ENUMS(SliderValueRoles)
35
36public:34public:
37 enum Roles {35 enum Roles {
38 RoleValue = Qt::UserRole + 1,36 RoleValue = Qt::UserRole + 1,
39 RoleLabel37 RoleLabel
40 };38 };
39 Q_ENUM(Roles)
4140
42 QHash<int, QByteArray> roleNames() const override41 QHash<int, QByteArray> roleNames() const override
43 {42 {
4443
=== modified file 'test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockActionModel.h'
--- test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockActionModel.h 2016-12-23 10:18:10 +0000
+++ test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockActionModel.h 2016-12-23 10:18:10 +0000
@@ -30,8 +30,6 @@
30class UNITY_API MockActionModel : public QAbstractListModel30class UNITY_API MockActionModel : public QAbstractListModel
31{31{
32 Q_OBJECT32 Q_OBJECT
33
34 Q_ENUMS(RoleEnum)
35public:33public:
36 explicit MockActionModel(QObject *parent = 0);34 explicit MockActionModel(QObject *parent = 0);
3735
@@ -44,6 +42,7 @@
44 Label = Qt::DisplayRole,42 Label = Qt::DisplayRole,
45 Id = Qt::UserRole43 Id = Qt::UserRole
46 };44 };
45 Q_ENUM(RoleEnum)
4746
48private:47private:
49 QHash<int, QByteArray> m_roles;48 QHash<int, QByteArray> m_roles;
5049
=== modified file 'test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockModel.h'
--- test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockModel.h 2016-12-23 10:18:10 +0000
+++ test/qmltest/mocks/plugins/Unity/Notifications/Mocks/MockModel.h 2016-12-23 10:18:10 +0000
@@ -36,8 +36,6 @@
36{36{
37 Q_OBJECT37 Q_OBJECT
3838
39 Q_ENUMS(RoleEnum)
40
41public:39public:
42 MockModel(QObject* parent = 0);40 MockModel(QObject* parent = 0);
4341
@@ -68,6 +66,7 @@
68 Hints,66 Hints,
69 Actions67 Actions
70 };68 };
69 Q_ENUM(RoleEnum)
7170
72private:71private:
73 bool m_confirmationPlaceholder;72 bool m_confirmationPlaceholder;
7473
=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewWidgetModel.h'
--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewWidgetModel.h 2014-05-13 13:52:12 +0000
+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewWidgetModel.h 2016-12-23 10:18:10 +0000
@@ -22,7 +22,7 @@
2222
23#include <QSharedPointer>23#include <QSharedPointer>
2424
25class MockPreviewData;25struct MockPreviewData;
2626
27class MockPreviewWidgetModel : public unity::shell::scopes::PreviewWidgetModelInterface27class MockPreviewWidgetModel : public unity::shell::scopes::PreviewWidgetModelInterface
28{28{

Subscribers

People subscribed via source and target branches

to all changes: