Home GnuPG

cpp,qt: Reduce risk of typos in preprocessor conditions

Description

cpp,qt: Reduce risk of typos in preprocessor conditions

* configure.ac: Add -Wundef to CPPFLAGS in maintainer mode. Explicitly
define some macros as 0 instead of leaving them undefined.
* qt/capslock.cpp, qt/capslock_p.h, qt/capslock_unix.cpp, qt/main.cpp,
qt5/capslock.cpp, qt5/capslock_p.h, qt5/capslock_unix.cpp: Use #if
instead of #ifdef to check whether a feature should be enabled.

Using -Wundef in combination with #if (instead of #ifdef) should help
reduce the risk of typos in macro identifiers (see previous commit).

Details

Provenance
ikloeckerAuthored on Mar 20 2024, 10:14 AM
Parents
rP844360c9c99d: qt5: Add a '5' to adjust defines
Branches
Unknown
Tags
Unknown