diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2016-08-25 14:41:47 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2016-08-26 11:31:21 +0000 |
commit | 6621e6f89af123d51027e395588ec022bcd466c1 (patch) | |
tree | b3f443b0de26445cac17620e41674b0df42f89c5 /src/gui/kernel/qsurfaceformat.h | |
parent | c47d1d74a7e78c66332d72fa3d313d71f9c68dd2 (diff) |
Make QSurfaceFormat a Q_GADGET and add Q_ENUM for easier debugging
Change-Id: I2fa0bc13bd90da53858ba3e0c6351f545e792fde
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/gui/kernel/qsurfaceformat.h')
-rw-r--r-- | src/gui/kernel/qsurfaceformat.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qsurfaceformat.h b/src/gui/kernel/qsurfaceformat.h index b4e3f68b97..246163609e 100644 --- a/src/gui/kernel/qsurfaceformat.h +++ b/src/gui/kernel/qsurfaceformat.h @@ -41,6 +41,7 @@ #include <QtGui/qtguiglobal.h> #include <QtCore/qpair.h> +#include <QtCore/qobjectdefs.h> QT_BEGIN_NAMESPACE @@ -50,6 +51,7 @@ class QSurfaceFormatPrivate; class Q_GUI_EXPORT QSurfaceFormat { + Q_GADGET public: enum FormatOption { StereoBuffers = 0x0001, @@ -57,6 +59,7 @@ public: DeprecatedFunctions = 0x0004, ResetNotification = 0x0008 }; + Q_ENUM(FormatOption) Q_DECLARE_FLAGS(FormatOptions, FormatOption) enum SwapBehavior { @@ -65,6 +68,7 @@ public: DoubleBuffer, TripleBuffer }; + Q_ENUM(SwapBehavior) enum RenderableType { DefaultRenderableType = 0x0, @@ -72,12 +76,14 @@ public: OpenGLES = 0x2, OpenVG = 0x4 }; + Q_ENUM(RenderableType) enum OpenGLContextProfile { NoProfile, CoreProfile, CompatibilityProfile }; + Q_ENUM(OpenGLContextProfile) QSurfaceFormat(); /*implicit*/ QSurfaceFormat(FormatOptions options); |