aboutsummaryrefslogtreecommitdiffstats
path: root/docs/checks
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2018-10-14 17:59:25 +0100
committerSergio Martins <smartins@kde.org>2018-10-14 17:59:25 +0100
commit7f5dcee2803f9904a70274768c073712e106c305 (patch)
tree73b27266982ed445b036628b6035fb5d012d1116 /docs/checks
parent971c0cc4f3488c847746967450557c4fa390753b (diff)
parentf19d7e9eba697ad110251f3aa8cb16b2a7b51b8a (diff)
Merge branch '1.4' into master
Diffstat (limited to 'docs/checks')
-rw-r--r--docs/checks/README-empty-qstringliteral.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/checks/README-empty-qstringliteral.md b/docs/checks/README-empty-qstringliteral.md
index 3c78ba67..fe8ba4ef 100644
--- a/docs/checks/README-empty-qstringliteral.md
+++ b/docs/checks/README-empty-qstringliteral.md
@@ -3,4 +3,7 @@
Suggests to use an empty `QString` instead of an empty `QStringLiteral`.
The later causes unneeded code bloat.
-You should use `QString()` instead of `QStringLiteral()` and use `QString("")` instead of `QStringLiteral("")`.
+You should use `QString()` instead of `QStringLiteral()` and `QStringLiteral("")`.
+
+Note: Beware that `QString().isNull()` is `true` while both `QStringLiteral().isNull()` and `QStringLiteral("").isNull()` are `false`.
+So be sure not to introduce subtle bugs when doing such replacements. In most cases it's simply a matter of using `isEmpty()` instead, which is `true` for all cases above.