Perhaps clazy should catch this instead but sharing for awareness.
If you check an item in a QMap, if it doesn't exist using [], it goes ahead and creates it. So if you have a map member variable and call a const != operator and inspect that map data by not using .value() it will go ahead and create it.
Last edit: Steve Albright 2024-05-31
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Perhaps clazy should catch this instead but sharing for awareness.
If you check an item in a QMap, if it doesn't exist using [], it goes ahead and creates it. So if you have a map member variable and call a const != operator and inspect that map data by not using .value() it will go ahead and create it.
Last edit: Steve Albright 2024-05-31