Nitpick: `QString` docs say "Returns -1 if str is not found.", so might want to use `== -1` instead of just `< 0` here.