uic: don't use QStringLiteral in comparisons
authorMarc Mutz <marc.mutz@kdab.com>
Wed, 8 Oct 2014 23:43:05 +0000 (01:43 +0200)
committerMarc Mutz <marc.mutz@kdab.com>
Tue, 14 Oct 2014 15:51:34 +0000 (17:51 +0200)
commit65dd5ce869b1c46c70e711c59b061d8e3eb84d88
treea3dc108778bf6e726379c685b44a196e66e507f6
parenta96a15e40fe3a7b9f27582ae7c370d79bd314d66
uic: don't use QStringLiteral in comparisons

For QLatin1String, operator== is overloaded, even for QStringRef,
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: Ice92d40342cb3939e8697d3f778f4421f5f967a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/designer/data/generate_impl.xsl
src/designer/data/generate_shared.xsl
src/designer/src/lib/uilib/ui4.cpp