QWidget: micro-optimisation
Compare string size before content. Change-Id: I00f9c6c6cf31148af4807455fa6f6b9254dda9d7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>bb10
parent
c400e16a58
commit
2f531d8db3
|
|
@ -8259,7 +8259,7 @@ bool QWidget::event(QEvent *event)
|
|||
#ifndef QT_NO_PROPERTIES
|
||||
case QEvent::DynamicPropertyChange: {
|
||||
const QByteArray &propName = static_cast<QDynamicPropertyChangeEvent *>(event)->propertyName();
|
||||
if (!qstrncmp(propName, "_q_customDpi", 12) && propName.length() == 13) {
|
||||
if (propName.length() == 13 && !qstrncmp(propName, "_q_customDpi", 12)) {
|
||||
uint value = property(propName.constData()).toUInt();
|
||||
if (!d->extra)
|
||||
d->createExtra();
|
||||
|
|
|
|||
Loading…
Reference in New Issue