Instead compare string length with an integer
- Group Reviewers
- R108:1dcf514e21f6: Don't compare string with empty string
R108:a650e6520f3e: Don't compare string with empty string
Compile && run
There's also ?? operator in Qt 5.15 which is the proper Null coalescing operator
If fileUrl is a QUrl, then that can lead to funky results as url basic type isn't astring. So fileUrl != "" it is (not the strict operator).. or fileUrl.toString() !== ""