diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2024-03-08 13:10:53 +0100 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2024-03-12 12:50:37 +0100 |
commit | 4786eb0b0f2c90c0e5f456fd51cca51ddf44531c (patch) | |
tree | ed7db8d0d8ded199be3cd1b5054c5a8f9c56708d /src/qml/CMakeLists.txt | |
parent | 7318e939c57c5904517ff7f2563285d7a7fddd67 (diff) |
Remove the explicit declaration of QQmlComponent::createObject(QQmlV4Function *)
Now when manual moc provides the required QT_DISABLE_DEPRECATED_UP_TO
definition we don't need to declare the
QQmlComponent::createObject(QQmlV4Function *) for moc explicitly.
Also we need to manually add imported dependencies of Qt6::Qml to
make sure that we passed to moc all the required frameworks on the
Apple platforms.
Fixes: QTBUG-104898
Change-Id: I5404808b2589463d1b0ea5884f40e8e67cd5cb0e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jari Helaakoski <jari.helaakoski@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/CMakeLists.txt')
-rw-r--r-- | src/qml/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt index 9cbc8e10a5..352a2d4c63 100644 --- a/src/qml/CMakeLists.txt +++ b/src/qml/CMakeLists.txt @@ -39,6 +39,10 @@ set_source_files_properties( SKIP_AUTOMOC TRUE ) +set(extra_manual_moc_deps "") +if(QT_FEATURE_qml_network) + list(APPEND extra_manual_moc_deps Qt6::Network) +endif() # We want QQmlComponent, QQmlComponentAttached, and QQmlScriptString to be available as metatypes in # the builtins, but without depending on QtQml and without duplicating the metaobjects. qt_manual_moc(extra_builtins_moc_files @@ -46,7 +50,7 @@ qt_manual_moc(extra_builtins_moc_files qml/qqmlcomponent.h qml/qqmlcomponentattached_p.h qml/qqmlscriptstring.h - TARGETS Qt6::Qml + TARGETS Qt6::Qml Qt6::Core ${extra_manual_moc_deps} ) # The moc files are included directly by qqmlcomponent.cpp and qqmlscriptstring.cpp |