From 77cc9125906783a92e86da020891b412e98b7159 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 18 Apr 2012 14:47:32 +0200 Subject: [PATCH] Don't use QByteArrayLiteral for a non-stored QByteArray Unless you're creating a QByteArray that you will store, don't use QByteArrayLiteral. Using it for 1 byte that is always concatenated to something else is an extreme waste. Change-Id: Icc29e4c4cb1d0aad1714bdeec8ff41da7c301af9 Reviewed-by: Stephen Kelly --- src/corelib/kernel/qmetatype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 14f3490..66e1dd2 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -574,7 +574,7 @@ struct QMetaTypeIdQObject { static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); if (!metatype_id.load()) - metatype_id.storeRelease(qRegisterMetaType(QByteArray(T::staticMetaObject.className() + QByteArrayLiteral("*")).constData(), + metatype_id.storeRelease(qRegisterMetaType(QByteArray(T::staticMetaObject.className() + QByteArray("*")).constData(), reinterpret_cast(quintptr(-1)))); return metatype_id.loadAcquire(); } -- 2.7.4