aboutsummaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-19 12:45:50 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-19 12:45:50 +0100
commitd6cf6b32cdd2843c40fc696accd8a6456f1ea15c (patch)
tree8299df2f413749badf90a96f92e2866976acc6cb /.clang-format
parent76b6238af16a1ccd284831ce42ec9e2cb1fba2c5 (diff)
downloadlibquotient-d6cf6b32cdd2843c40fc696accd8a6456f1ea15c.tar.gz
libquotient-d6cf6b32cdd2843c40fc696accd8a6456f1ea15c.zip
Make enum values logging more terse()
By default enum class values are logged along with the qualifier; this may or may not be desirable in a given setting. For JoinState(s) and Membership(Mask) operator<< was overloaded to implicitly suppress qualification; however, this is both overly sweeping and uses Qt's internal API for the backend. Instead, a new QDebug manipulator, terse(), is introduced, that does the same as those operator<< overloads but on a per-invocation basis. This makes it slightly more verbose to log enums but makes the QDebug reconfiguration explicit and doesn't require to produce new overloads every time a new enum ends up in logs. And it's built entirely on the published Qt API, reusing the QDebugManip framework that Quotient already has. Also: operator<<(QDebug, QDebugManip) has been moved out of the namespace to fix lookup issues when there's no prior `using namespace Quotient`.
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions