diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-10-08 10:26:27 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-10-09 09:41:51 +0200 |
commit | bf1df558461f21827eaad9d5d9541def784980a2 (patch) | |
tree | 1c58599a96968000808362b47f069302fa0582ee /src/widgets/dialogs | |
parent | 05663e29d047851adb9a1ef440fb78b38ff3cc9b (diff) |
Don't use QByteArrayLiteral in comparisons
For const char*s, operator== is overloaded, so comparing to a (C) string
literal is efficient, since qstrcmp doesn't require the length of the
strings to compare.
OTOH, QByteArrayLiteral, when not using RVO, litters the code with
QByteArray dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.
So, just compare with a (C) string literal instead.
Change-Id: Id3bfdc89558ba51911f6317a7a73c287f96e6f24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qwizard.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 1a12b334e6..1f7b18e824 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -3254,7 +3254,7 @@ bool QWizard::nativeEvent(const QByteArray &eventType, void *message, long *resu { #if !defined(QT_NO_STYLE_WINDOWSVISTA) Q_D(QWizard); - if (d->isVistaThemeEnabled() && eventType == QByteArrayLiteral("windows_generic_MSG")) { + if (d->isVistaThemeEnabled() && eventType == "windows_generic_MSG") { MSG *windowsMessage = static_cast<MSG *>(message); const bool winEventResult = d->vistaHelper->handleWinEvent(windowsMessage, result); if (QVistaHelper::vistaState() != d->vistaState) { |