qtbase/examples/corelib/serialization
Edward Welbourne 0b1670134b Replace confusing member variable with a predicate
The Converter class, in the eponymous example, had a null member
variable that wasn't a nullptr - it pointed to an instance of
NullConverter - so that other converters could test whether a
Converter * they'd been passed was null (in the sense of pointing to a
NullConverter). This, however, was susceptible to misreading - I
misread one such comparison as a nullptr check and thus thought it
redundant with an earlier actual nullptr check. To spare future
readers similar confusion, replace the public static member variable
with a protected (since only other derived classes need it) static
predicate, to at least give the reader a clue that this is using the
word null in a class-specific sense.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I1e4f494b303d1bf90107f8c6fa3a4a22f6d81b90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-01 21:28:55 +01:00
..
cbordump corelib/serialization examples: clang-tidy and coding style clean-up 2023-09-08 18:17:37 +02:00
convert Replace confusing member variable with a predicate 2023-11-01 21:28:55 +01:00
savegame Rename the JSON Save Game Example to Saving a Game to File 2023-10-20 11:19:48 +02:00
streambookmarks corelib/serialization examples: clang-tidy and coding style clean-up 2023-09-08 18:17:37 +02:00
CMakeLists.txt Exclude some examples from Android build 2023-08-28 16:00:45 +03:00
serialization.pro Move RSS listing example to networking 2023-06-14 11:57:31 +02:00