diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-02-17 17:51:49 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-02-17 19:57:54 +0000 |
commit | 86c5a337e3b123f2e41c8b15b416f39655519acd (patch) | |
tree | efa0f720a190889b3d31ddbd07cee0495b8a15d4 /src/gui/kernel | |
parent | 47ca3f78139ad51a5018dcdad27fa5caf817f08d (diff) | |
parent | 6620045fcaada61a2897195f32c0ee35beebc37b (diff) |
Merge "Merge dev into 5.7" into refs/staging/5.7
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qsurfaceformat.cpp | 7 |
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; |