diff options
author | Andre Somers <andre.somers@kdab.com> | 2016-02-02 14:40:29 +0100 |
---|---|---|
committer | Andre Somers <andre@familiesomers.nl> | 2016-02-12 19:32:05 +0000 |
commit | 0df5c366e50b9533fd8ea3f31c4c360ae7f4c5b6 (patch) | |
tree | 301cb4fa308fb306f65ca2fa55a157ab6a46798d /src/gui/text | |
parent | c5d49725779292a04fed599eb7f508d334ffc5c3 (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/gui/text')
-rw-r--r-- | src/gui/text/qglyphrun.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/text/qglyphrun.cpp b/src/gui/text/qglyphrun.cpp index 0988454410..bd44e11dce 100644 --- a/src/gui/text/qglyphrun.cpp +++ b/src/gui/text/qglyphrun.cpp @@ -414,10 +414,7 @@ void QGlyphRun::setFlag(GlyphRunFlag flag, bool enabled) return; detach(); - if (enabled) - d->flags |= flag; - else - d->flags &= ~flag; + d->flags.setFlag(flag, enabled); } /*! |