qstring-comparison-to-implicit-char

May 4, 2020 ยท View on GitHub

Finds cases where QString is being compared to an int literal but it's casting to QChar implicitly. This is often a mistake as the developer intended to compare against the string representation of the integer.

Example:

if (myString == 5000) { // warning: QString being compared to implicit QChar
}