summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobject.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2025-08-03 14:51:55 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2025-08-04 14:42:40 +0200
commit74ef389673741cbdeca61ca9589c54206366c2df (patch)
tree15abba828372acc96b74438a7c798d09dccd7e3a /src/corelib/kernel/qmetaobject.cpp
parentc3c9f3a9d6d60abd8a1c1eb0a11758e3cecaf911 (diff)
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 <fabian.kosmale@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
-rw-r--r--src/corelib/kernel/qmetaobject.cpp2
1 files changed, 1 insertions, 1 deletions
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<MethodSignal>(&m, signalName, 0, nullptr);