Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmlmetadependencies.cpp
Go to the documentation of this file.
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// Qt-Security score:significant
4
6#include <private/qtqmlglobal_p.h>
7#include <QtQml/qqmlextensionplugin.h>
8
10
11// Prevent the linker from removing those dependencies, so that we don't have to load
12// them from plugins.
13
16#if QT_CONFIG(qml_worker_script)
17void qml_register_types_QtQml_WorkerScript();
18Q_GHS_KEEP_REFERENCE(qml_register_types_QtQml_WorkerScript);
19#endif
20
21bool QQmlMetaDependencies::collect() {
22 volatile auto models = &qml_register_types_QtQml_Models;
23#if QT_CONFIG(qml_worker_script)
24 volatile auto workerScript = &qml_register_types_QtQml_WorkerScript;
25 return models && workerScript;
26#else
27 return models;
28#endif
29}
30
31QT_END_NAMESPACE
Q_GHS_KEEP_REFERENCE(qml_register_types_QtQml_Models)
QT_BEGIN_NAMESPACE void qml_register_types_QtQml_Models()