Use explicit flag values or explicit constructor instead of nullptr

Authored by kossebau on Jun 5 2017, 2:56 PM.

Description

Use explicit flag values or explicit constructor instead of nullptr

Summary:
The constructor of QFlags which was intended to handle literal "0"
as commonly used indicator of no-flags-set has been done with a
trick based on pointer types. Which these days of nullptr existing and
compilers pushing to use that sadly fired back and, instead of
allowing convenient code with commonly understood literal "0" values,
resulted in quite some code using "nullptr" to indicate a QFLags-based
type value with no flags set, which can be puzzling for humans
reading the code.

To improve the code again, instead of "nullptr" are used:

  • enum item representing the 0=no-flag-set value, if existing
  • explicit constructor

Details

Committed
kossebauJun 5 2017, 2:56 PM
Parents
R282:ec85a32e0db0: GIT_SILENT Upgrade ECM and KF5 version requirements for 5.35.0 release.
Branches
Unknown
Tags
Unknown