summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsurfaceformat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qsurfaceformat.cpp')
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp
index 83481692ff..d7dc0faceb 100644
--- a/src/gui/kernel/qsurfaceformat.cpp
+++ b/src/gui/kernel/qsurfaceformat.cpp
@@ -282,11 +282,8 @@ QSurfaceFormat::~QSurfaceFormat()
void QSurfaceFormat::setStereo(bool enable)
{
QSurfaceFormat::FormatOptions newOptions = d->opts;
- if (enable) {
- newOptions |= QSurfaceFormat::StereoBuffers;
- } else {
- newOptions &= ~QSurfaceFormat::StereoBuffers;
- }
+ newOptions.setFlag(QSurfaceFormat::StereoBuffers, enable);
+
if (int(newOptions) != int(d->opts)) {
detach();
d->opts = newOptions;