| 1 | // Copyright (C) 2024 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 "qqmlmetadependencies_p.h" | 
| 5 | #include <private/qtqmlglobal_p.h> | 
| 6 | #include <QtQml/qqmlextensionplugin.h> | 
| 7 | |
| 8 | QT_BEGIN_NAMESPACE | 
| 9 | |
| 10 | // Prevent the linker from removing those dependencies, so that we don't have to load | 
| 11 | // them from plugins. | 
| 12 | |
| 13 | void qml_register_types_QtQml_Models(); | 
| 14 | Q_GHS_KEEP_REFERENCE(qml_register_types_QtQml_Models); | 
| 15 | #if QT_CONFIG(qml_worker_script) | 
| 16 | void qml_register_types_QtQml_WorkerScript(); | 
| 17 | Q_GHS_KEEP_REFERENCE(qml_register_types_QtQml_WorkerScript); | 
| 18 | #endif | 
| 19 | |
| 20 | bool QQmlMetaDependencies::collect() { | 
| 21 | volatile auto models = &qml_register_types_QtQml_Models; | 
| 22 | #if QT_CONFIG(qml_worker_script) | 
| 23 | volatile auto workerScript = &qml_register_types_QtQml_WorkerScript; | 
| 24 | return models && workerScript; | 
| 25 | #else | 
| 26 | return models; | 
| 27 | #endif | 
| 28 | } | 
| 29 | |
| 30 | QT_END_NAMESPACE | 
| 31 | 
