summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsurfaceformat.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2013-02-08 08:11:55 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-08 20:00:00 +0100
commitbfa1584162960a76170f941d490014f070e4a676 (patch)
tree1d2872fc25ad7736ec108f4c1c4440133ac8658e /src/gui/kernel/qsurfaceformat.h
parentefbecc1a94250e6fc55b3c31bab18819d2a07ccf (diff)
Added version() and setVersion() convenience API to QSurfaceFormat.
This lets you write code like format.version() >= qMakePair(3, 2), and format.setVersion(4, 2) instead of format.setMajorVersion(4); format.setMinorVersion(2); Change-Id: Ib052091cc12865ea0d5db52e468ed6cd28f14840 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/gui/kernel/qsurfaceformat.h')
-rw-r--r--src/gui/kernel/qsurfaceformat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qsurfaceformat.h b/src/gui/kernel/qsurfaceformat.h
index 69dece0941..7c3c846df3 100644
--- a/src/gui/kernel/qsurfaceformat.h
+++ b/src/gui/kernel/qsurfaceformat.h
@@ -42,6 +42,7 @@
#define QSURFACEFORMAT_H
#include <QtCore/qglobal.h>
+#include <QtCore/qpair.h>
QT_BEGIN_NAMESPACE
@@ -120,6 +121,9 @@ public:
void setMinorVersion(int minorVersion);
int minorVersion() const;
+ QPair<int, int> version() const;
+ void setVersion(int major, int minor);
+
bool stereo() const;
void setStereo(bool enable);