1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qqmlobjectorgadget_p.h"
5
6QT_BEGIN_NAMESPACE
7
8void QQmlObjectOrGadget::metacall(QMetaObject::Call type, int index, void **argv) const
9{
10 if (ptr.isNull()) {
11 _m->d.static_metacall(nullptr, type, index, argv);
12 }
13 else if (ptr.isT1()) {
14 QMetaObject::metacall(ptr.asT1(), type, index, argv);
15 }
16 else {
17 const QMetaObject *metaObject = _m;
18 QQmlMetaObject::resolveGadgetMethodOrPropertyIndex(type, metaObject: &metaObject, index: &index);
19 metaObject->d.static_metacall(reinterpret_cast<QObject*>(ptr.asT2()), type, index, argv);
20 }
21}
22
23QT_END_NAMESPACE
24

source code of qtdeclarative/src/qml/qml/qqmlobjectorgadget.cpp