on xenial help sign in
Switch to new Q_ENUM macro
8e933c9Michael Terry
plugins/LightDM/PromptsModel.h+2−4
@@ -23,8 +23,6 @@ class PromptsModel : public QAbstractListModel
23{
23{
24 Q_OBJECT
24 Q_OBJECT
25
25
26− Q_ENUMS(PromptsModelRoles PromptType)
27−
28 Q_PROPERTY(int count READ rowCount NOTIFY countChanged)
26 Q_PROPERTY(int count READ rowCount NOTIFY countChanged)
29
27
30public:
28public:
@@ -32,6 +30,7 @@ public:
32 TypeRole = Qt::UserRole,
30 TypeRole = Qt::UserRole,
33 TextRole,
31 TextRole,
34 };
32 };
33+ Q_ENUM(PromptsModelRoles)
35
34
36 enum PromptType {
35 enum PromptType {
37 Message,
36 Message,
@@ -40,6 +39,7 @@ public:
40 Question,
39 Question,
41 Button,
40 Button,
42 };
41 };
42+ Q_ENUM(PromptType)
43
43
44 explicit PromptsModel(QObject* parent=0);
44 explicit PromptsModel(QObject* parent=0);
45
45
@@ -68,5 +68,3 @@ private:
68 QList<PromptInfo> m_prompts;
68 QList<PromptInfo> m_prompts;
69 QHash<int, QByteArray> m_roleNames;
69 QHash<int, QByteArray> m_roleNames;
70};
70};
71−
72−Q_DECLARE_METATYPE(PromptsModel::PromptType)