summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2015-02-07 13:00:49 +0100
committerOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>2015-02-08 12:19:07 +0000
commit163b8529516ddda24833f635f737863ba98bd688 (patch)
treecf7fbb32c6f240526132e6a69f214e31a2cbaf3e /src/widgets/kernel
parente768d96e8bc161211b2d4ad377f3fb250f270a9b (diff)
QtWidgets: use Q_ENUM instead of Q_ENUMS
Change-Id: Id5280c1d9feab95e1506569f3d0eb23eeb74935f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qaction.h4
-rw-r--r--src/widgets/kernel/qformlayout.h4
-rw-r--r--src/widgets/kernel/qgesture.h2
-rw-r--r--src/widgets/kernel/qlayout.h2
-rw-r--r--src/widgets/kernel/qsizepolicy.h2
-rw-r--r--src/widgets/kernel/qstackedlayout.h2
6 files changed, 9 insertions, 7 deletions
diff --git a/src/widgets/kernel/qaction.h b/src/widgets/kernel/qaction.h
index 4fc4b424f6..db8231002c 100644
--- a/src/widgets/kernel/qaction.h
+++ b/src/widgets/kernel/qaction.h
@@ -55,8 +55,6 @@ class Q_WIDGETS_EXPORT QAction : public QObject
Q_OBJECT
Q_DECLARE_PRIVATE(QAction)
- Q_ENUMS(MenuRole)
- Q_ENUMS(Priority)
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY changed)
Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY changed)
@@ -81,9 +79,11 @@ public:
// note this is copied into qplatformmenu.h, which must stay in sync
enum MenuRole { NoRole = 0, TextHeuristicRole, ApplicationSpecificRole, AboutQtRole,
AboutRole, PreferencesRole, QuitRole };
+ Q_ENUM(MenuRole)
enum Priority { LowPriority = 0,
NormalPriority = 128,
HighPriority = 256};
+ Q_ENUM(Priority)
explicit QAction(QObject* parent);
QAction(const QString &text, QObject* parent);
QAction(const QIcon &icon, const QString &text, QObject* parent);
diff --git a/src/widgets/kernel/qformlayout.h b/src/widgets/kernel/qformlayout.h
index e06f1f7375..66ec926b29 100644
--- a/src/widgets/kernel/qformlayout.h
+++ b/src/widgets/kernel/qformlayout.h
@@ -44,7 +44,6 @@ class QFormLayoutPrivate;
class Q_WIDGETS_EXPORT QFormLayout : public QLayout
{
Q_OBJECT
- Q_ENUMS(FieldGrowthPolicy RowWrapPolicy ItemRole)
Q_DECLARE_PRIVATE(QFormLayout)
Q_PROPERTY(FieldGrowthPolicy fieldGrowthPolicy READ fieldGrowthPolicy WRITE setFieldGrowthPolicy RESET resetFieldGrowthPolicy)
Q_PROPERTY(RowWrapPolicy rowWrapPolicy READ rowWrapPolicy WRITE setRowWrapPolicy RESET resetRowWrapPolicy)
@@ -59,18 +58,21 @@ public:
ExpandingFieldsGrow,
AllNonFixedFieldsGrow
};
+ Q_ENUM(FieldGrowthPolicy)
enum RowWrapPolicy {
DontWrapRows,
WrapLongRows,
WrapAllRows
};
+ Q_ENUM(RowWrapPolicy)
enum ItemRole {
LabelRole = 0,
FieldRole = 1,
SpanningRole = 2
};
+ Q_ENUM(ItemRole)
explicit QFormLayout(QWidget *parent = 0);
~QFormLayout();
diff --git a/src/widgets/kernel/qgesture.h b/src/widgets/kernel/qgesture.h
index a66132566b..4796a1ca4d 100644
--- a/src/widgets/kernel/qgesture.h
+++ b/src/widgets/kernel/qgesture.h
@@ -200,7 +200,6 @@ class Q_WIDGETS_EXPORT QSwipeGesture : public QGesture
{
Q_OBJECT
Q_DECLARE_PRIVATE(QSwipeGesture)
- Q_ENUMS(SwipeDirection)
Q_PROPERTY(SwipeDirection horizontalDirection READ horizontalDirection STORED false)
Q_PROPERTY(SwipeDirection verticalDirection READ verticalDirection STORED false)
@@ -209,6 +208,7 @@ class Q_WIDGETS_EXPORT QSwipeGesture : public QGesture
public:
enum SwipeDirection { NoDirection, Left, Right, Up, Down };
+ Q_ENUM(SwipeDirection)
explicit QSwipeGesture(QObject *parent = 0);
~QSwipeGesture();
diff --git a/src/widgets/kernel/qlayout.h b/src/widgets/kernel/qlayout.h
index 8bcbb700f4..9400ce442e 100644
--- a/src/widgets/kernel/qlayout.h
+++ b/src/widgets/kernel/qlayout.h
@@ -56,7 +56,6 @@ class Q_WIDGETS_EXPORT QLayout : public QObject, public QLayoutItem
Q_OBJECT
Q_DECLARE_PRIVATE(QLayout)
- Q_ENUMS(SizeConstraint)
Q_PROPERTY(int margin READ margin WRITE setMargin)
Q_PROPERTY(int spacing READ spacing WRITE setSpacing)
Q_PROPERTY(SizeConstraint sizeConstraint READ sizeConstraint WRITE setSizeConstraint)
@@ -69,6 +68,7 @@ public:
SetMaximumSize,
SetMinAndMaxSize
};
+ Q_ENUM(SizeConstraint)
QLayout(QWidget *parent);
QLayout();
diff --git a/src/widgets/kernel/qsizepolicy.h b/src/widgets/kernel/qsizepolicy.h
index 3a4fa80ba7..26d626b1f6 100644
--- a/src/widgets/kernel/qsizepolicy.h
+++ b/src/widgets/kernel/qsizepolicy.h
@@ -44,7 +44,6 @@ class QVariant;
class Q_WIDGETS_EXPORT QSizePolicy
{
Q_GADGET
- Q_ENUMS(Policy)
Q_FLAGS(ControlTypes)
public:
@@ -64,6 +63,7 @@ public:
Expanding = GrowFlag | ShrinkFlag | ExpandFlag,
Ignored = ShrinkFlag | GrowFlag | IgnoreFlag
};
+ Q_ENUM(Policy)
enum ControlType {
DefaultType = 0x00000001,
diff --git a/src/widgets/kernel/qstackedlayout.h b/src/widgets/kernel/qstackedlayout.h
index afa45afc68..0d8c990668 100644
--- a/src/widgets/kernel/qstackedlayout.h
+++ b/src/widgets/kernel/qstackedlayout.h
@@ -45,7 +45,6 @@ class Q_WIDGETS_EXPORT QStackedLayout : public QLayout
{
Q_OBJECT
Q_DECLARE_PRIVATE(QStackedLayout)
- Q_ENUMS(StackingMode)
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentChanged)
Q_PROPERTY(StackingMode stackingMode READ stackingMode WRITE setStackingMode)
QDOC_PROPERTY(int count READ count)
@@ -55,6 +54,7 @@ public:
StackOne,
StackAll
};
+ Q_ENUM(StackingMode)
QStackedLayout();
explicit QStackedLayout(QWidget *parent);