diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-12-26 12:04:24 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-12-27 17:30:06 +0100 |
commit | 1e852bb496b93908f24869631443f1c971f2ce09 (patch) | |
tree | 5d30bbfac584c40c23b1300dc6aed1c3a3ae4b48 /src/qml/qml/qqml.cpp | |
parent | 04a155dba4ac2c905eb6b6f9920dbc45012f3c68 (diff) |
De-inline QQmlPrivate::revisionClassInfos()
It was compiled 1152 times, with the QList::push_back alone
contributing a cumulative ~24sec to a 'ninja qtdeclarative'. There's
no reason it should be inline, so make it out-of-line.
This function was the highest non-QMetaType/non-std contributor in a
Clang -ftime-trace build of qtdeclarative.
Pick-to: 6.5
Task-number: QTBUG-97601
Change-Id: I143639168f859dc604b902647fe921332bbe49c0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/qml/qml/qqml.cpp')
-rw-r--r-- | src/qml/qml/qqml.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp index 3eebbb6df7..db04e7c6d8 100644 --- a/src/qml/qml/qqml.cpp +++ b/src/qml/qml/qqml.cpp @@ -712,6 +712,19 @@ void QQmlPrivate::qmlunregister(RegistrationType type, quintptr data) } } +QList<QTypeRevision> QQmlPrivate::revisionClassInfos(const QMetaObject *metaObject, + const char *key) +{ + QList<QTypeRevision> revisions; + for (int index = indexOfOwnClassInfo(metaObject, key); index != -1; + index = indexOfOwnClassInfo(metaObject, key, index - 1)) { + revisions.push_back(QTypeRevision::fromEncodedVersion( + QByteArray(metaObject->classInfo(index).value()).toInt())); + } + return revisions; +} + + namespace QQmlPrivate { template<> void qmlRegisterTypeAndRevisions<QQmlTypeNotAvailable, void>( |