Commit 0f27d112 authored by Anton Kudryavtsev's avatar Anton Kudryavtsev
Browse files

Don't use QStringLiteral in comparisons


For QLatin1String, operator== is overloaded, so comparing to a latin-1
(C) string literal is efficient, since strlen() is comparatively fast.

OTOH, QStringLiteral, when not using RVO, litters the code with
QString dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.

So, just compare using QLatin1String instead.

Change-Id: I761b2b26ab5b416bc695f524a9ee607dacf0a7b2
Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
Reviewed-by: default avatarMarc Mutz <marc.mutz@kdab.com>
Showing with 69 additions and 71 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment