relation.h:30:1: warning: Move qHash(Akonadi::Relation) into Akonadi namespace for ADL lookup [-Wclazy-qhash-namespace]
itemcreatehandlertest.cpp:874:30: warning: Don't call QVector::operator[]() on temporary [-Wclazy-detaching-temporary]
tagmodeltest.cpp:266:5: warning: unused QList<QVariant> (removedTagList)
Details
- Reviewers
dvratil vkrause - Commits
- R165:4463bb8a2003: akonadi: fix some clazy warnings
builds, ctest passes
Diff Detail
- Repository
- R165 Akonadi
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/server/handler/itemcreatehandler.cpp | ||
---|---|---|
402 | @dfaure This looks suspicious. There's a difference in how this is translated in the SQL query: the original version gets translated into ... WHERE gid = "", while the new version gets translated into ... WHERE gid = NULL, which is always false (a null never compares to another null). Even if you would change it to IS NULL this would still yield different results, since an empty value is not the same as a null value in SQL. |
src/server/handler/itemcreatehandler.cpp | ||
---|---|---|
402 | README-empty-qstringliteral.md says: "Note: Beware that QString().isNull() is true while both QStringLiteral().isEmpty() and QStringLiteral("").isNull() are false. |
src/server/handler/itemcreatehandler.cpp | ||
---|---|---|
402 | Just QLatin1String("") even, I've checked with heaptrack and it doesn't allocate memory (unlike QString("")) |