summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorAndre Somers <andre.somers@kdab.com>2016-02-02 14:40:29 +0100
committerAndre Somers <andre@familiesomers.nl>2016-02-12 19:32:05 +0000
commit0df5c366e50b9533fd8ea3f31c4c360ae7f4c5b6 (patch)
tree301cb4fa308fb306f65ca2fa55a157ab6a46798d /src/opengl
parentc5d49725779292a04fed599eb7f508d334ffc5c3 (diff)
Use QFlags::setFlag where prudent in qtbase
QFlags::setFlag is most useful to replace explicit constructs like if (condition) { someFlags |= TheConditionFlag; } else { someFlags &= ~TheConditionFlag; } with someFlags.setFlag(TheConditionFlag, condition); Change-Id: Ie4586681c83e0af812d5bbf14965aad51941a960 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index bf0a2f8dd7..a8409346ba 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -5553,10 +5553,7 @@ QSize QGLTexture::bindCompressedTexturePVR(const char *buf, int len)
// Set the invert flag for the texture. The "vertical flip"
// flag in PVR is the opposite sense to our sense of inversion.
- if ((pvrHeader->flags & PVR_VERTICAL_FLIP) != 0)
- options &= ~QGLContext::InvertedYBindOption;
- else
- options |= QGLContext::InvertedYBindOption;
+ options.setFlag(QGLContext::InvertedYBindOption, !(pvrHeader->flags & PVR_VERTICAL_FLIP));
return QSize(pvrHeader->width, pvrHeader->height);
}