From 74ef389673741cbdeca61ca9589c54206366c2df Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Sun, 3 Aug 2025 14:51:55 +0200 Subject: QMetaProperty implementation: replace QByteArray with a QBAView When looking up the unresolved notify signal of a property, use QBAV to find the index of the property using indexOfMethodRelative, which already takes a QBAV. This code path gets frequently hit when starting a Qt Quick UI, so this might save a few cycles during startup. Pick-to: 6.10 Change-Id: If542ac5086078f10befc86d8387abd2268546ab7 Reviewed-by: Fabian Kosmale Reviewed-by: Artem Dyomin --- src/corelib/kernel/qmetaobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/kernel/qmetaobject.cpp') diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 0757936949e..f5cbf45a1df 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -4232,7 +4232,7 @@ int QMetaProperty::notifySignalIndex() const if (!(methodIndex & IsUnresolvedSignal)) return methodIndex + mobj->methodOffset(); methodIndex &= ~IsUnresolvedSignal; - const QByteArray signalName = stringData(mobj, methodIndex); + const QByteArrayView signalName = stringDataView(mobj, methodIndex); const QMetaObject *m = mobj; // try 0-arg signal int idx = QMetaObjectPrivate::indexOfMethodRelative(&m, signalName, 0, nullptr); -- cgit v1.2.3