-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QFlags: simplify operator<< for QDebug
Instead of declaring three different template overloads (with an #if in the middle), reduce to explicitly two: 1) one for the Q_ENUMs that aren't QFlags 2) one for QFlags This does change how an enum that is a Q_FLAG gets printed: previously, it was printed as itself, now it's printed as QFlags, even if no QFlags are present. Then use if constexpr for that second one to get the enumeration from QMetaObject, if the flags are associated with a QMetaObject. Change-Id: Ifb754f0e28774c20aa7cfffd17e7f8b9c68b292b Reviewed-by: Fabian Kosmale <[email protected]>
- Loading branch information
1 parent
05aaf2a
commit 0c707c6
Showing
3 changed files
with
55 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters