Use isEmpty() instead of count() or size()

Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Alessandro Portale
2020-01-15 19:10:34 +01:00
parent ad4040972b
commit 24a25eed14
70 changed files with 110 additions and 111 deletions

View File

@@ -85,7 +85,7 @@ QString toJSLiteral(const QVariant &val)
QString res;
const auto list = val.toList();
for (const QVariant &child : list) {
if (res.length()) res.append(", ");
if (!res.isEmpty() ) res.append(", ");
res.append(toJSLiteral(child));
}
res.prepend('[');