diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-10-08 11:35:24 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-10-09 09:42:00 +0200 |
commit | 1a5c0b26d062a380fef1bb038a9d96cde7556dc6 (patch) | |
tree | 10f36942a89365b0bea350dab8041801514a2495 /src/plugins/bearer/connman/qofonoservice_linux.cpp | |
parent | bf1df558461f21827eaad9d5d9541def784980a2 (diff) |
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: I7af3bf3a67c55dae33ffaf9922d004fa168a3f9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/bearer/connman/qofonoservice_linux.cpp')
-rw-r--r-- | src/plugins/bearer/connman/qofonoservice_linux.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/bearer/connman/qofonoservice_linux.cpp b/src/plugins/bearer/connman/qofonoservice_linux.cpp index ecf79101f0..2ce2bd40e4 100644 --- a/src/plugins/bearer/connman/qofonoservice_linux.cpp +++ b/src/plugins/bearer/connman/qofonoservice_linux.cpp @@ -293,7 +293,7 @@ QVariantMap QOfonoDataConnectionManagerInterface::getProperties() void QOfonoDataConnectionManagerInterface::propertyChanged(const QString &name, const QDBusVariant &value) { propertiesMap[name] = value.variant(); - if (name == QStringLiteral("RoamingAllowed")) + if (name == QLatin1String("RoamingAllowed")) Q_EMIT roamingAllowedChanged(value.variant().toBool()); } |