aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/Qt6QmlMacros.cmake40
-rw-r--r--src/qml/animations/qabstractanimationjob.cpp2
-rw-r--r--src/qml/common/qv4compileddata_p.h2
-rw-r--r--src/qml/doc/src/cmake/cmake-variables.qdoc30
-rw-r--r--src/qml/doc/src/cmake/qt_add_qml_module.qdoc14
-rw-r--r--src/qml/doc/src/tools/qtqml-tooling-qmlcontextpropertydump.qdoc13
-rw-r--r--src/qml/jsruntime/qv4argumentsobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4argumentsobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4arraybuffer.cpp5
-rw-r--r--src/qml/jsruntime/qv4arraybuffer_p.h1
-rw-r--r--src/qml/jsruntime/qv4arraydata.cpp1
-rw-r--r--src/qml/jsruntime/qv4arraydata_p.h1
-rw-r--r--src/qml/jsruntime/qv4arrayiterator.cpp1
-rw-r--r--src/qml/jsruntime/qv4arrayiterator_p.h1
-rw-r--r--src/qml/jsruntime/qv4arrayobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4arrayobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4atomics.cpp1
-rw-r--r--src/qml/jsruntime/qv4atomics_p.h1
-rw-r--r--src/qml/jsruntime/qv4booleanobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4booleanobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4compilationunitmapper.cpp1
-rw-r--r--src/qml/jsruntime/qv4compilationunitmapper_p.h1
-rw-r--r--src/qml/jsruntime/qv4compilationunitmapper_unix.cpp1
-rw-r--r--src/qml/jsruntime/qv4compilationunitmapper_win.cpp1
-rw-r--r--src/qml/jsruntime/qv4context.cpp1
-rw-r--r--src/qml/jsruntime/qv4context_p.h1
-rw-r--r--src/qml/jsruntime/qv4dataview.cpp1
-rw-r--r--src/qml/jsruntime/qv4dataview_p.h1
-rw-r--r--src/qml/jsruntime/qv4dateobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4dateobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4debugging.cpp1
-rw-r--r--src/qml/jsruntime/qv4debugging_p.h1
-rw-r--r--src/qml/jsruntime/qv4domerrors.cpp1
-rw-r--r--src/qml/jsruntime/qv4domerrors_p.h1
-rw-r--r--src/qml/jsruntime/qv4engine.cpp1
-rw-r--r--src/qml/jsruntime/qv4engine_p.h1
-rw-r--r--src/qml/jsruntime/qv4enginebase_p.h1
-rw-r--r--src/qml/jsruntime/qv4errorobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4errorobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4estable.cpp1
-rw-r--r--src/qml/jsruntime/qv4estable_p.h1
-rw-r--r--src/qml/jsruntime/qv4executableallocator.cpp1
-rw-r--r--src/qml/jsruntime/qv4executableallocator_p.h1
-rw-r--r--src/qml/jsruntime/qv4executablecompilationunit.cpp1
-rw-r--r--src/qml/jsruntime/qv4executablecompilationunit_p.h1
-rw-r--r--src/qml/jsruntime/qv4function.cpp1
-rw-r--r--src/qml/jsruntime/qv4function_p.h1
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4functionobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4functiontable_noop.cpp1
-rw-r--r--src/qml/jsruntime/qv4functiontable_p.h1
-rw-r--r--src/qml/jsruntime/qv4functiontable_unix.cpp1
-rw-r--r--src/qml/jsruntime/qv4functiontable_win64.cpp1
-rw-r--r--src/qml/jsruntime/qv4generatorobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4generatorobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4global_p.h1
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4globalobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4identifierhash.cpp1
-rw-r--r--src/qml/jsruntime/qv4identifierhash_p.h1
-rw-r--r--src/qml/jsruntime/qv4identifierhashdata_p.h1
-rw-r--r--src/qml/jsruntime/qv4identifiertable.cpp1
-rw-r--r--src/qml/jsruntime/qv4identifiertable_p.h1
-rw-r--r--src/qml/jsruntime/qv4include.cpp1
-rw-r--r--src/qml/jsruntime/qv4include_p.h1
-rw-r--r--src/qml/jsruntime/qv4internalclass.cpp1
-rw-r--r--src/qml/jsruntime/qv4internalclass_p.h1
-rw-r--r--src/qml/jsruntime/qv4iterator.cpp1
-rw-r--r--src/qml/jsruntime/qv4iterator_p.h1
-rw-r--r--src/qml/jsruntime/qv4jscall.cpp1
-rw-r--r--src/qml/jsruntime/qv4jscall_p.h1
-rw-r--r--src/qml/jsruntime/qv4jsonobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4lookup.cpp1
-rw-r--r--src/qml/jsruntime/qv4lookup_p.h1
-rw-r--r--src/qml/jsruntime/qv4managed.cpp1
-rw-r--r--src/qml/jsruntime/qv4managed_p.h1
-rw-r--r--src/qml/jsruntime/qv4mapiterator.cpp1
-rw-r--r--src/qml/jsruntime/qv4mapiterator_p.h1
-rw-r--r--src/qml/jsruntime/qv4mapobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4mapobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4math_p.h1
-rw-r--r--src/qml/jsruntime/qv4mathobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4mathobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4memberdata.cpp1
-rw-r--r--src/qml/jsruntime/qv4module.cpp1
-rw-r--r--src/qml/jsruntime/qv4module_p.h1
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4numberobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4object.cpp1
-rw-r--r--src/qml/jsruntime/qv4object_p.h1
-rw-r--r--src/qml/jsruntime/qv4objectiterator.cpp1
-rw-r--r--src/qml/jsruntime/qv4objectiterator_p.h1
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp1
-rw-r--r--src/qml/jsruntime/qv4objectproto_p.h1
-rw-r--r--src/qml/jsruntime/qv4persistent.cpp1
-rw-r--r--src/qml/jsruntime/qv4persistent_p.h1
-rw-r--r--src/qml/jsruntime/qv4profiling.cpp1
-rw-r--r--src/qml/jsruntime/qv4profiling_p.h1
-rw-r--r--src/qml/jsruntime/qv4promiseobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4promiseobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4property_p.h1
-rw-r--r--src/qml/jsruntime/qv4propertykey.cpp1
-rw-r--r--src/qml/jsruntime/qv4propertykey_p.h1
-rw-r--r--src/qml/jsruntime/qv4proxy.cpp1
-rw-r--r--src/qml/jsruntime/qv4proxy_p.h1
-rw-r--r--src/qml/jsruntime/qv4qmetaobjectwrapper.cpp1
-rw-r--r--src/qml/jsruntime/qv4qmetaobjectwrapper_p.h1
-rw-r--r--src/qml/jsruntime/qv4qmlcontext.cpp1
-rw-r--r--src/qml/jsruntime/qv4qmlcontext_p.h1
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp1
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper_p.h1
-rw-r--r--src/qml/jsruntime/qv4referenceobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4referenceobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4reflect.cpp1
-rw-r--r--src/qml/jsruntime/qv4reflect_p.h1
-rw-r--r--src/qml/jsruntime/qv4regexp.cpp2
-rw-r--r--src/qml/jsruntime/qv4regexp_p.h1
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4regexpobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4resolvedtypereference.cpp1
-rw-r--r--src/qml/jsruntime/qv4resolvedtypereference_p.h1
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp1
-rw-r--r--src/qml/jsruntime/qv4runtime_p.h1
-rw-r--r--src/qml/jsruntime/qv4runtimeapi_p.h1
-rw-r--r--src/qml/jsruntime/qv4runtimecodegen.cpp1
-rw-r--r--src/qml/jsruntime/qv4runtimecodegen_p.h1
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h1
-rw-r--r--src/qml/jsruntime/qv4script.cpp1
-rw-r--r--src/qml/jsruntime/qv4script_p.h1
-rw-r--r--src/qml/jsruntime/qv4sequenceobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4sequenceobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4setiterator.cpp1
-rw-r--r--src/qml/jsruntime/qv4setiterator_p.h1
-rw-r--r--src/qml/jsruntime/qv4setobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4setobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4sparsearray.cpp1
-rw-r--r--src/qml/jsruntime/qv4sparsearray_p.h1
-rw-r--r--src/qml/jsruntime/qv4sqlerrors.cpp1
-rw-r--r--src/qml/jsruntime/qv4sqlerrors_p.h1
-rw-r--r--src/qml/jsruntime/qv4stackframe.cpp1
-rw-r--r--src/qml/jsruntime/qv4stackframe_p.h1
-rw-r--r--src/qml/jsruntime/qv4string.cpp1
-rw-r--r--src/qml/jsruntime/qv4string_p.h1
-rw-r--r--src/qml/jsruntime/qv4stringiterator.cpp1
-rw-r--r--src/qml/jsruntime/qv4stringiterator_p.h1
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4stringobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4symbol.cpp1
-rw-r--r--src/qml/jsruntime/qv4symbol_p.h1
-rw-r--r--src/qml/jsruntime/qv4typedarray.cpp1
-rw-r--r--src/qml/jsruntime/qv4typedarray_p.h1
-rw-r--r--src/qml/jsruntime/qv4urlobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4urlobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4value.cpp1
-rw-r--r--src/qml/jsruntime/qv4value_p.h1
-rw-r--r--src/qml/jsruntime/qv4variantassociationobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4variantassociationobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4variantobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4variantobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp1
-rw-r--r--src/qml/jsruntime/qv4vme_moth_p.h1
-rw-r--r--src/qml/jsruntime/qv4vtable_p.h1
-rw-r--r--src/qml/parser/qqmljs.g1
-rw-r--r--src/qml/parser/qqmljsast.cpp1
-rw-r--r--src/qml/parser/qqmljsast_p.h1
-rw-r--r--src/qml/parser/qqmljsastfwd_p.h1
-rw-r--r--src/qml/parser/qqmljsastvisitor.cpp1
-rw-r--r--src/qml/parser/qqmljsastvisitor_p.h1
-rw-r--r--src/qml/parser/qqmljsengine_p.h1
-rw-r--r--src/qml/parser/qqmljskeywords_p.h1
-rw-r--r--src/qml/parser/qqmljslexer.cpp1
-rw-r--r--src/qml/parser/qqmljslexer_p.h1
-rw-r--r--src/qml/qml/qqml.cpp65
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp91
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h9
-rw-r--r--src/qml/qml/qqmlpropertycachecreator_p.h211
176 files changed, 471 insertions, 177 deletions
diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake
index 7cd6f4079e..18b0bfc0ab 100644
--- a/src/qml/Qt6QmlMacros.cmake
+++ b/src/qml/Qt6QmlMacros.cmake
@@ -1752,6 +1752,46 @@ function(_qt_internal_target_enable_qmllint target)
all_qmllint_json ${lint_target_json})
_qt_internal_add_all_qmllint_target(QT_QMLLINT_MODULE_ALL_TARGET
all_qmllint_module ${lint_target_module})
+
+ if(QT_FEATURE_qmlcontextpropertydump)
+ _qt_internal_add_generate_context_property_dump_target(${lint_target})
+ endif()
+endfunction()
+
+function(_qt_internal_add_generate_context_property_dump_target lint_target)
+ set(global_target_name dump_qml_context_properties)
+ set(global_target_clean_name clean_qml_context_properties)
+
+ if(NOT TARGET ${global_target_name})
+ set(qmlcontextpropertydump_file "${CMAKE_BINARY_DIR}/.qt/contextPropertyDump.ini")
+
+ _qt_internal_get_tool_wrapper_script_path(tool_wrapper)
+ add_custom_command(
+ OUTPUT "${qmlcontextpropertydump_file}"
+ COMMAND
+ "${tool_wrapper}"
+ $<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::qmlcontextpropertydump>
+ --cpp-source-directory "${CMAKE_SOURCE_DIR}" --build-directory "${CMAKE_BINARY_DIR}"
+ COMMAND_EXPAND_LISTS
+ DEPENDS
+ ${QT_CMAKE_EXPORT_NAMESPACE}::qmlcontextpropertydump
+ COMMENT "Generating ${qmlcontextpropertydump_file} file for qmllint"
+ )
+
+ add_custom_target(${global_target_name}
+ DEPENDS "${qmlcontextpropertydump_file}"
+ )
+
+ add_custom_target(${global_target_clean_name}
+ COMMAND ${CMAKE_COMMAND} -E rm "${qmlcontextpropertydump_file}"
+ COMMENT "Removing ${qmlcontextpropertydump_file} file"
+ )
+ endif()
+
+ if(QT_QMLLINT_CONTEXT_PROPERTY_DUMP)
+ # make the lint target search for context properties
+ add_dependencies(${lint_target} ${global_target_name})
+ endif()
endfunction()
# Create an 'all_qmllint' target. The target's name can be user-controlled by ${target_var} with the
diff --git a/src/qml/animations/qabstractanimationjob.cpp b/src/qml/animations/qabstractanimationjob.cpp
index a50685ba50..82d807af7e 100644
--- a/src/qml/animations/qabstractanimationjob.cpp
+++ b/src/qml/animations/qabstractanimationjob.cpp
@@ -57,6 +57,8 @@ QQmlAnimationTimer::~QQmlAnimationTimer()
unsetJobTimer(animation);
for (const auto &animation : std::as_const(runningPauseAnimations))
unsetJobTimer(animation);
+
+ QUnifiedTimer::stopAnimationTimer(this);
}
QQmlAnimationTimer *QQmlAnimationTimer::instance(bool create)
diff --git a/src/qml/common/qv4compileddata_p.h b/src/qml/common/qv4compileddata_p.h
index 3f1859c615..46484c0bf0 100644
--- a/src/qml/common/qv4compileddata_p.h
+++ b/src/qml/common/qv4compileddata_p.h
@@ -821,7 +821,7 @@ public:
}
CommonType commonType() const {
- if (data.get<IsCommonTypeField>() != 0)
+ if (isCommonType())
return CommonType(data.get<CommonTypeOrTypeNameIndexField>());
return CommonType::Invalid;
}
diff --git a/src/qml/doc/src/cmake/cmake-variables.qdoc b/src/qml/doc/src/cmake/cmake-variables.qdoc
index f21d93362b..6a6a9ba54e 100644
--- a/src/qml/doc/src/cmake/cmake-variables.qdoc
+++ b/src/qml/doc/src/cmake/cmake-variables.qdoc
@@ -159,3 +159,33 @@ set(QT_QML_GENERATE_AOTSTATS OFF)
\endcode
*/
+
+/*!
+\page cmake-variable-qt-qmllint-no-context-property-dump.html
+\ingroup cmake-variables-qtqml
+
+\title QT_QMLLINT_CONTEXT_PROPERTY_DUMP
+
+\brief Enables dumping of context properties in lint targets.
+\cmakevariablesince 6.11
+
+When the \c QT_QMLLINT_CONTEXT_PROPERTY_DUMP variable is enabled, \l{qmllint-auto}{linting targets}
+created by \l{qt_add_qml_module} will run \l qmlcontextpropertydump before running \l qmllint. This
+allows \l qmllint to warn on the usage of context properties in QML.
+
+To enable this feature, set the \c QT_QMLLINT_CONTEXT_PROPERTY_DUMP variable using
+one of the following methods:
+
+\list
+ \li Pass the option to the CMake executable:
+ \badcode
+ -DQT_QMLLINT_CONTEXT_PROPERTY_DUMP=ON
+ \endcode
+
+ \li Add the setting to your \c CMakeLists.txt file before the first call to
+ \l{qt_add_qml_module}:
+ \badcode
+ set(QT_QMLLINT_CONTEXT_PROPERTY_DUMP ON)
+ \endcode
+\endlist
+*/
diff --git a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
index ef3a31b3a9..92334833c8 100644
--- a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
+++ b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
@@ -325,6 +325,20 @@ target will be the \c target followed by \c{_qmllint}. An \c{all_qmllint}
target which depends on all the individual \c{*_qmllint} targets is also
provided as a convenience.
+A \c dump_qml_context_properties global build target is automatically created
+that runs \l qmlcontextpropertydump when no qml context property dump file
+already exists. \l qmlcontextpropertydump creates a qml context property dump file
+that is read by \l qmllint to warn about usages of context properties in QML.
+
+A \c clean_qml_context_properties global build target allows to delete an already
+existing qml context property dump file, and can be used to recompute the qml context
+property dump file on a future build of the \c dump_qml_context_properties global build
+target.
+
+Linting targets depend on the \c dump_qml_context_properties build target when
+the \l QT_QMLLINT_CONTEXT_PROPERTY_DUMP variable is enabled.
+
+
\target qml-naming-js-files
\section2 Naming conventions for \c{.js} files
diff --git a/src/qml/doc/src/tools/qtqml-tooling-qmlcontextpropertydump.qdoc b/src/qml/doc/src/tools/qtqml-tooling-qmlcontextpropertydump.qdoc
index 7b5344decd..8abd63593e 100644
--- a/src/qml/doc/src/tools/qtqml-tooling-qmlcontextpropertydump.qdoc
+++ b/src/qml/doc/src/tools/qtqml-tooling-qmlcontextpropertydump.qdoc
@@ -8,9 +8,14 @@
\ingroup qtqml-tooling
\ingroup qtqml-tooling-devtools
-\e qmlcontextpropertydump is a tool that searches a C++ directory for potential
-context property definitions, and saves them in a format readable by qmlformat
-and qmlls.
+\e qmlcontextpropertydump scans a C++ source folder for potential
+context property definitions, and stores them in a format readable by \l qmllint
+and \l {\QMLLS}.
-\e qmlcontextpropertydump is best used via the CMake API.
+\e qmlcontextpropertydump is best used via the \l{qmllint-auto}{CMake API}: \l qt_add_qml_module
+creates a global \c dump_qml_context_properties target that invokes \c qmlcontextpropertydump with
+the right arguments. Note that \c dump_qml_context_properties does nothing when a
+dump file already exists. Use the \c clean_qml_context_properties target to delete the
+context property dump. The context property dump file is located in the build folder at
+\c{<build>/.qt/contextPropertyDump.ini}.
*/
diff --git a/src/qml/jsruntime/qv4argumentsobject.cpp b/src/qml/jsruntime/qv4argumentsobject.cpp
index 74b79cb400..6a6fd7e607 100644
--- a/src/qml/jsruntime/qv4argumentsobject.cpp
+++ b/src/qml/jsruntime/qv4argumentsobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4argumentsobject_p.h"
diff --git a/src/qml/jsruntime/qv4argumentsobject_p.h b/src/qml/jsruntime/qv4argumentsobject_p.h
index 0487bd22f8..8be96a690f 100644
--- a/src/qml/jsruntime/qv4argumentsobject_p.h
+++ b/src/qml/jsruntime/qv4argumentsobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4ARGUMENTSOBJECTS_H
#define QV4ARGUMENTSOBJECTS_H
diff --git a/src/qml/jsruntime/qv4arraybuffer.cpp b/src/qml/jsruntime/qv4arraybuffer.cpp
index c4ef28ae49..f61513566b 100644
--- a/src/qml/jsruntime/qv4arraybuffer.cpp
+++ b/src/qml/jsruntime/qv4arraybuffer.cpp
@@ -1,5 +1,10 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:critical reason:data-parser
+
+// Security note: ArrayBuffer can be used with arbitrary binary data stored in QBA
+// and requires some care (we e.g. don't want to create a corrupted QBA in asByteArray)
+
#include "qv4arraybuffer_p.h"
#include "qv4typedarray_p.h"
#include "qv4dataview_p.h"
diff --git a/src/qml/jsruntime/qv4arraybuffer_p.h b/src/qml/jsruntime/qv4arraybuffer_p.h
index af1195a947..c38deb8de8 100644
--- a/src/qml/jsruntime/qv4arraybuffer_p.h
+++ b/src/qml/jsruntime/qv4arraybuffer_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4ARRAYBUFFER_H
#define QV4ARRAYBUFFER_H
diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp
index f691fe6beb..ed8d233578 100644
--- a/src/qml/jsruntime/qv4arraydata.cpp
+++ b/src/qml/jsruntime/qv4arraydata.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4arraydata_p.h"
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
diff --git a/src/qml/jsruntime/qv4arraydata_p.h b/src/qml/jsruntime/qv4arraydata_p.h
index 32ff27b388..337812ce3b 100644
--- a/src/qml/jsruntime/qv4arraydata_p.h
+++ b/src/qml/jsruntime/qv4arraydata_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4ARRAYDATA_H
#define QV4ARRAYDATA_H
diff --git a/src/qml/jsruntime/qv4arrayiterator.cpp b/src/qml/jsruntime/qv4arrayiterator.cpp
index 15e0bf4e4c..d8cdc173b7 100644
--- a/src/qml/jsruntime/qv4arrayiterator.cpp
+++ b/src/qml/jsruntime/qv4arrayiterator.cpp
@@ -1,6 +1,7 @@
// Copyright (C) 2017 Crimson AS <info@crimson.no>
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <private/qv4iterator_p.h>
#include <private/qv4arrayiterator_p.h>
diff --git a/src/qml/jsruntime/qv4arrayiterator_p.h b/src/qml/jsruntime/qv4arrayiterator_p.h
index 79f0898fb6..ab2f7989f9 100644
--- a/src/qml/jsruntime/qv4arrayiterator_p.h
+++ b/src/qml/jsruntime/qv4arrayiterator_p.h
@@ -1,6 +1,7 @@
// Copyright (C) 2017 Crimson AS <info@crimson.no>
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4ARRAYITERATOR_P_H
#define QV4ARRAYITERATOR_P_H
diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp
index 121a15da9a..d41f446594 100644
--- a/src/qml/jsruntime/qv4arrayobject.cpp
+++ b/src/qml/jsruntime/qv4arrayobject.cpp
@@ -1,6 +1,7 @@
// Copyright (C) 2018 Crimson AS <info@crimson.no>
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4arrayobject_p.h"
#include "qv4arrayiterator_p.h"
diff --git a/src/qml/jsruntime/qv4arrayobject_p.h b/src/qml/jsruntime/qv4arrayobject_p.h
index 6cca9055a2..7550b1f8a0 100644
--- a/src/qml/jsruntime/qv4arrayobject_p.h
+++ b/src/qml/jsruntime/qv4arrayobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4ARRAYOBJECT_H
#define QV4ARRAYOBJECT_H
diff --git a/src/qml/jsruntime/qv4atomics.cpp b/src/qml/jsruntime/qv4atomics.cpp
index ccbdef145b..899111be27 100644
--- a/src/qml/jsruntime/qv4atomics.cpp
+++ b/src/qml/jsruntime/qv4atomics.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4arraybuffer_p.h"
#include "qv4typedarray_p.h"
#include "qv4atomics_p.h"
diff --git a/src/qml/jsruntime/qv4atomics_p.h b/src/qml/jsruntime/qv4atomics_p.h
index d55e6bb983..b58522c32b 100644
--- a/src/qml/jsruntime/qv4atomics_p.h
+++ b/src/qml/jsruntime/qv4atomics_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4ATOMICS_H
#define QV4ATOMICS_H
diff --git a/src/qml/jsruntime/qv4booleanobject.cpp b/src/qml/jsruntime/qv4booleanobject.cpp
index 5c1d50e753..45692e8030 100644
--- a/src/qml/jsruntime/qv4booleanobject.cpp
+++ b/src/qml/jsruntime/qv4booleanobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4booleanobject_p.h"
diff --git a/src/qml/jsruntime/qv4booleanobject_p.h b/src/qml/jsruntime/qv4booleanobject_p.h
index 1b2d3914ac..fcaa4d64e4 100644
--- a/src/qml/jsruntime/qv4booleanobject_p.h
+++ b/src/qml/jsruntime/qv4booleanobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4BOOLEANOBJECT_H
#define QV4BOOLEANOBJECT_H
diff --git a/src/qml/jsruntime/qv4compilationunitmapper.cpp b/src/qml/jsruntime/qv4compilationunitmapper.cpp
index e9915c7d26..d4c35fd844 100644
--- a/src/qml/jsruntime/qv4compilationunitmapper.cpp
+++ b/src/qml/jsruntime/qv4compilationunitmapper.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4compilationunitmapper_p.h"
diff --git a/src/qml/jsruntime/qv4compilationunitmapper_p.h b/src/qml/jsruntime/qv4compilationunitmapper_p.h
index c214141804..26558b28f0 100644
--- a/src/qml/jsruntime/qv4compilationunitmapper_p.h
+++ b/src/qml/jsruntime/qv4compilationunitmapper_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4COMPILATIONUNITMAPPER_H
#define QV4COMPILATIONUNITMAPPER_H
diff --git a/src/qml/jsruntime/qv4compilationunitmapper_unix.cpp b/src/qml/jsruntime/qv4compilationunitmapper_unix.cpp
index 204e222121..9675acf8fd 100644
--- a/src/qml/jsruntime/qv4compilationunitmapper_unix.cpp
+++ b/src/qml/jsruntime/qv4compilationunitmapper_unix.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4compilationunitmapper_p.h"
diff --git a/src/qml/jsruntime/qv4compilationunitmapper_win.cpp b/src/qml/jsruntime/qv4compilationunitmapper_win.cpp
index 73096207b4..3b38fc04d6 100644
--- a/src/qml/jsruntime/qv4compilationunitmapper_win.cpp
+++ b/src/qml/jsruntime/qv4compilationunitmapper_win.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4compilationunitmapper_p.h"
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 01f9b4adf3..3e59a2d7df 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <QString>
#include <qv4context_p.h>
diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h
index 48b6e04025..45ee61de4e 100644
--- a/src/qml/jsruntime/qv4context_p.h
+++ b/src/qml/jsruntime/qv4context_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QMLJS_ENVIRONMENT_H
#define QMLJS_ENVIRONMENT_H
diff --git a/src/qml/jsruntime/qv4dataview.cpp b/src/qml/jsruntime/qv4dataview.cpp
index 689eb9232b..440d50e04e 100644
--- a/src/qml/jsruntime/qv4dataview.cpp
+++ b/src/qml/jsruntime/qv4dataview.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4dataview_p.h"
#include "qv4arraybuffer_p.h"
diff --git a/src/qml/jsruntime/qv4dataview_p.h b/src/qml/jsruntime/qv4dataview_p.h
index b5fa41d964..091f7e7ba9 100644
--- a/src/qml/jsruntime/qv4dataview_p.h
+++ b/src/qml/jsruntime/qv4dataview_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4DATAVIEW_H
#define QV4DATAVIEW_H
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp
index 4593c788d3..316f8707ee 100644
--- a/src/qml/jsruntime/qv4dateobject.cpp
+++ b/src/qml/jsruntime/qv4dateobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4dateobject_p.h"
#include "qv4runtime_p.h"
diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h
index 248c549744..6e6546bacc 100644
--- a/src/qml/jsruntime/qv4dateobject_p.h
+++ b/src/qml/jsruntime/qv4dateobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4DATEOBJECT_P_H
#define QV4DATEOBJECT_P_H
diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp
index 57ddaaa2f1..b7b7a5fd4a 100644
--- a/src/qml/jsruntime/qv4debugging.cpp
+++ b/src/qml/jsruntime/qv4debugging.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4debugging_p.h"
diff --git a/src/qml/jsruntime/qv4debugging_p.h b/src/qml/jsruntime/qv4debugging_p.h
index b80567b339..25a510e720 100644
--- a/src/qml/jsruntime/qv4debugging_p.h
+++ b/src/qml/jsruntime/qv4debugging_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4DEBUGGING_H
#define QV4DEBUGGING_H
diff --git a/src/qml/jsruntime/qv4domerrors.cpp b/src/qml/jsruntime/qv4domerrors.cpp
index cd26858aa3..6ecba4a33e 100644
--- a/src/qml/jsruntime/qv4domerrors.cpp
+++ b/src/qml/jsruntime/qv4domerrors.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4domerrors_p.h"
#include "qv4object_p.h"
diff --git a/src/qml/jsruntime/qv4domerrors_p.h b/src/qml/jsruntime/qv4domerrors_p.h
index 491fff9e55..5ea6a898da 100644
--- a/src/qml/jsruntime/qv4domerrors_p.h
+++ b/src/qml/jsruntime/qv4domerrors_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4DOMERRORS_P_H
#define QV4DOMERRORS_P_H
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index f7ab2bd72e..fa03df55d4 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4engine_p.h"
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 6cb4609450..41c7e776ff 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4ENGINE_H
#define QV4ENGINE_H
diff --git a/src/qml/jsruntime/qv4enginebase_p.h b/src/qml/jsruntime/qv4enginebase_p.h
index 68e906baa1..67c5953045 100644
--- a/src/qml/jsruntime/qv4enginebase_p.h
+++ b/src/qml/jsruntime/qv4enginebase_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4ENGINEBASE_P_H
#define QV4ENGINEBASE_P_H
diff --git a/src/qml/jsruntime/qv4errorobject.cpp b/src/qml/jsruntime/qv4errorobject.cpp
index 02145a0243..adf2f30108 100644
--- a/src/qml/jsruntime/qv4errorobject.cpp
+++ b/src/qml/jsruntime/qv4errorobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4errorobject_p.h"
diff --git a/src/qml/jsruntime/qv4errorobject_p.h b/src/qml/jsruntime/qv4errorobject_p.h
index f9adbb443b..508d7657ae 100644
--- a/src/qml/jsruntime/qv4errorobject_p.h
+++ b/src/qml/jsruntime/qv4errorobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4ERROROBJECT_H
#define QV4ERROROBJECT_H
diff --git a/src/qml/jsruntime/qv4estable.cpp b/src/qml/jsruntime/qv4estable.cpp
index 40c62f11e4..8ec17d6066 100644
--- a/src/qml/jsruntime/qv4estable.cpp
+++ b/src/qml/jsruntime/qv4estable.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 Crimson AS <info@crimson.no>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4estable_p.h"
#include "qv4object_p.h"
diff --git a/src/qml/jsruntime/qv4estable_p.h b/src/qml/jsruntime/qv4estable_p.h
index 037a3689aa..32f6c1651f 100644
--- a/src/qml/jsruntime/qv4estable_p.h
+++ b/src/qml/jsruntime/qv4estable_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 Crimson AS <info@crimson.no>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
//
// W A R N I N G
diff --git a/src/qml/jsruntime/qv4executableallocator.cpp b/src/qml/jsruntime/qv4executableallocator.cpp
index 71d8061d65..a534827b65 100644
--- a/src/qml/jsruntime/qv4executableallocator.cpp
+++ b/src/qml/jsruntime/qv4executableallocator.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4executableallocator_p.h"
#include <QtQml/private/qv4functiontable_p.h>
diff --git a/src/qml/jsruntime/qv4executableallocator_p.h b/src/qml/jsruntime/qv4executableallocator_p.h
index 8181bf17ae..3c0fa0e790 100644
--- a/src/qml/jsruntime/qv4executableallocator_p.h
+++ b/src/qml/jsruntime/qv4executableallocator_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4EXECUTABLEALLOCATOR_H
#define QV4EXECUTABLEALLOCATOR_H
diff --git a/src/qml/jsruntime/qv4executablecompilationunit.cpp b/src/qml/jsruntime/qv4executablecompilationunit.cpp
index cd55c20bd0..3ec029cf4b 100644
--- a/src/qml/jsruntime/qv4executablecompilationunit.cpp
+++ b/src/qml/jsruntime/qv4executablecompilationunit.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qml/qqmlprivate.h"
#include "qv4engine_p.h"
diff --git a/src/qml/jsruntime/qv4executablecompilationunit_p.h b/src/qml/jsruntime/qv4executablecompilationunit_p.h
index 9b467564d3..8cead907e7 100644
--- a/src/qml/jsruntime/qv4executablecompilationunit_p.h
+++ b/src/qml/jsruntime/qv4executablecompilationunit_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4EXECUTABLECOMPILATIONUNIT_P_H
#define QV4EXECUTABLECOMPILATIONUNIT_P_H
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp
index 20dbff4cea..267e97ad95 100644
--- a/src/qml/jsruntime/qv4function.cpp
+++ b/src/qml/jsruntime/qv4function.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4function_p.h"
diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h
index 8161c17406..a73be5c2af 100644
--- a/src/qml/jsruntime/qv4function_p.h
+++ b/src/qml/jsruntime/qv4function_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4FUNCTION_H
#define QV4FUNCTION_H
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index f258ecce58..3bf36a7acc 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4object_p.h"
#include "qv4function_p.h"
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h
index f4a2935b5a..e5e4c74ca1 100644
--- a/src/qml/jsruntime/qv4functionobject_p.h
+++ b/src/qml/jsruntime/qv4functionobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4FUNCTIONOBJECT_H
#define QV4FUNCTIONOBJECT_H
diff --git a/src/qml/jsruntime/qv4functiontable_noop.cpp b/src/qml/jsruntime/qv4functiontable_noop.cpp
index 8a72fa5469..0fc98894ff 100644
--- a/src/qml/jsruntime/qv4functiontable_noop.cpp
+++ b/src/qml/jsruntime/qv4functiontable_noop.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4functiontable_p.h"
diff --git a/src/qml/jsruntime/qv4functiontable_p.h b/src/qml/jsruntime/qv4functiontable_p.h
index 8937e2fe85..80b1b80b93 100644
--- a/src/qml/jsruntime/qv4functiontable_p.h
+++ b/src/qml/jsruntime/qv4functiontable_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4FUNCTIONTABLE_P_H
#define QV4FUNCTIONTABLE_P_H
diff --git a/src/qml/jsruntime/qv4functiontable_unix.cpp b/src/qml/jsruntime/qv4functiontable_unix.cpp
index 9561917777..337700d55e 100644
--- a/src/qml/jsruntime/qv4functiontable_unix.cpp
+++ b/src/qml/jsruntime/qv4functiontable_unix.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4functiontable_p.h"
#include "qv4function_p.h"
diff --git a/src/qml/jsruntime/qv4functiontable_win64.cpp b/src/qml/jsruntime/qv4functiontable_win64.cpp
index c21cdb790a..d2772fd9ec 100644
--- a/src/qml/jsruntime/qv4functiontable_win64.cpp
+++ b/src/qml/jsruntime/qv4functiontable_win64.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4functiontable_p.h"
diff --git a/src/qml/jsruntime/qv4generatorobject.cpp b/src/qml/jsruntime/qv4generatorobject.cpp
index efe4cde76b..b294681ad2 100644
--- a/src/qml/jsruntime/qv4generatorobject.cpp
+++ b/src/qml/jsruntime/qv4generatorobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <qv4generatorobject_p.h>
#include <qv4symbol_p.h>
diff --git a/src/qml/jsruntime/qv4generatorobject_p.h b/src/qml/jsruntime/qv4generatorobject_p.h
index a70548128b..a7525853bc 100644
--- a/src/qml/jsruntime/qv4generatorobject_p.h
+++ b/src/qml/jsruntime/qv4generatorobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4GENERATOROBJECT_P_H
#define QV4GENERATOROBJECT_P_H
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index e3fc0ac1b3..b4a23af3b6 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4GLOBAL_H
#define QV4GLOBAL_H
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp
index dffa76aabb..2834b38e37 100644
--- a/src/qml/jsruntime/qv4globalobject.cpp
+++ b/src/qml/jsruntime/qv4globalobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4globalobject_p.h"
diff --git a/src/qml/jsruntime/qv4globalobject_p.h b/src/qml/jsruntime/qv4globalobject_p.h
index fd23d71332..45ca549b2b 100644
--- a/src/qml/jsruntime/qv4globalobject_p.h
+++ b/src/qml/jsruntime/qv4globalobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4GLOBALOBJECT_H
#define QV4GLOBALOBJECT_H
diff --git a/src/qml/jsruntime/qv4identifierhash.cpp b/src/qml/jsruntime/qv4identifierhash.cpp
index 48df2283f0..a89379eb66 100644
--- a/src/qml/jsruntime/qv4identifierhash.cpp
+++ b/src/qml/jsruntime/qv4identifierhash.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <private/qv4identifierhash_p.h>
#include <private/qv4identifiertable_p.h>
diff --git a/src/qml/jsruntime/qv4identifierhash_p.h b/src/qml/jsruntime/qv4identifierhash_p.h
index 6c77a78f85..0a723766b5 100644
--- a/src/qml/jsruntime/qv4identifierhash_p.h
+++ b/src/qml/jsruntime/qv4identifierhash_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4IDENTIFIERHASH_P_H
#define QV4IDENTIFIERHASH_P_H
diff --git a/src/qml/jsruntime/qv4identifierhashdata_p.h b/src/qml/jsruntime/qv4identifierhashdata_p.h
index 664e8e803d..04f845d985 100644
--- a/src/qml/jsruntime/qv4identifierhashdata_p.h
+++ b/src/qml/jsruntime/qv4identifierhashdata_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4IDENTIFIERHASHDATA_H
#define QV4IDENTIFIERHASHDATA_H
diff --git a/src/qml/jsruntime/qv4identifiertable.cpp b/src/qml/jsruntime/qv4identifiertable.cpp
index 4c915442f4..b4ffd070ee 100644
--- a/src/qml/jsruntime/qv4identifiertable.cpp
+++ b/src/qml/jsruntime/qv4identifiertable.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4identifiertable_p.h"
#include "qv4symbol_p.h"
#include <private/qv4identifierhashdata_p.h>
diff --git a/src/qml/jsruntime/qv4identifiertable_p.h b/src/qml/jsruntime/qv4identifiertable_p.h
index 2ecd4a7294..5df18396e5 100644
--- a/src/qml/jsruntime/qv4identifiertable_p.h
+++ b/src/qml/jsruntime/qv4identifiertable_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4IDENTIFIERTABLE_H
#define QV4IDENTIFIERTABLE_H
diff --git a/src/qml/jsruntime/qv4include.cpp b/src/qml/jsruntime/qv4include.cpp
index b09c7c3bd7..b174a79bd8 100644
--- a/src/qml/jsruntime/qv4include.cpp
+++ b/src/qml/jsruntime/qv4include.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4include_p.h"
#include "qv4scopedvalue_p.h"
diff --git a/src/qml/jsruntime/qv4include_p.h b/src/qml/jsruntime/qv4include_p.h
index 5f6e3172da..066a665fee 100644
--- a/src/qml/jsruntime/qv4include_p.h
+++ b/src/qml/jsruntime/qv4include_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4INCLUDE_P_H
#define QV4INCLUDE_P_H
diff --git a/src/qml/jsruntime/qv4internalclass.cpp b/src/qml/jsruntime/qv4internalclass.cpp
index 5b21d5ac07..05d4e07459 100644
--- a/src/qml/jsruntime/qv4internalclass.cpp
+++ b/src/qml/jsruntime/qv4internalclass.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <qv4internalclass_p.h>
#include <qv4string_p.h>
diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h
index 56ce787859..23e8a46506 100644
--- a/src/qml/jsruntime/qv4internalclass_p.h
+++ b/src/qml/jsruntime/qv4internalclass_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4INTERNALCLASS_H
#define QV4INTERNALCLASS_H
diff --git a/src/qml/jsruntime/qv4iterator.cpp b/src/qml/jsruntime/qv4iterator.cpp
index 617037ecdc..3c7045ca7b 100644
--- a/src/qml/jsruntime/qv4iterator.cpp
+++ b/src/qml/jsruntime/qv4iterator.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <qv4iterator_p.h>
#include <qv4symbol_p.h>
#include <qv4engine_p.h>
diff --git a/src/qml/jsruntime/qv4iterator_p.h b/src/qml/jsruntime/qv4iterator_p.h
index 46e48864ed..641e93c4f1 100644
--- a/src/qml/jsruntime/qv4iterator_p.h
+++ b/src/qml/jsruntime/qv4iterator_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4ITERATOR_P_H
#define QV4ITERATOR_P_H
diff --git a/src/qml/jsruntime/qv4jscall.cpp b/src/qml/jsruntime/qv4jscall.cpp
index 513ae59145..060f6bcd0f 100644
--- a/src/qml/jsruntime/qv4jscall.cpp
+++ b/src/qml/jsruntime/qv4jscall.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4jscall_p.h"
diff --git a/src/qml/jsruntime/qv4jscall_p.h b/src/qml/jsruntime/qv4jscall_p.h
index 5df1ca77d3..1666dec8a9 100644
--- a/src/qml/jsruntime/qv4jscall_p.h
+++ b/src/qml/jsruntime/qv4jscall_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4JSCALL_H
#define QV4JSCALL_H
diff --git a/src/qml/jsruntime/qv4jsonobject_p.h b/src/qml/jsruntime/qv4jsonobject_p.h
index f6f63d7eb3..038ab67ba5 100644
--- a/src/qml/jsruntime/qv4jsonobject_p.h
+++ b/src/qml/jsruntime/qv4jsonobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4JSONOBJECT_H
#define QV4JSONOBJECT_H
diff --git a/src/qml/jsruntime/qv4lookup.cpp b/src/qml/jsruntime/qv4lookup.cpp
index beebdcad6b..e97e40be61 100644
--- a/src/qml/jsruntime/qv4lookup.cpp
+++ b/src/qml/jsruntime/qv4lookup.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4lookup_p.h"
diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h
index 61184df4bb..ea6839c76b 100644
--- a/src/qml/jsruntime/qv4lookup_p.h
+++ b/src/qml/jsruntime/qv4lookup_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4LOOKUP_H
#define QV4LOOKUP_H
diff --git a/src/qml/jsruntime/qv4managed.cpp b/src/qml/jsruntime/qv4managed.cpp
index bdc40da779..dedbbdd220 100644
--- a/src/qml/jsruntime/qv4managed.cpp
+++ b/src/qml/jsruntime/qv4managed.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4managed_p.h"
#include <private/qv4mm_p.h>
diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h
index 468be23414..6eaea9a1e9 100644
--- a/src/qml/jsruntime/qv4managed_p.h
+++ b/src/qml/jsruntime/qv4managed_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QMLJS_MANAGED_H
#define QMLJS_MANAGED_H
diff --git a/src/qml/jsruntime/qv4mapiterator.cpp b/src/qml/jsruntime/qv4mapiterator.cpp
index 7afe61cbfd..531db5b47c 100644
--- a/src/qml/jsruntime/qv4mapiterator.cpp
+++ b/src/qml/jsruntime/qv4mapiterator.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 Crimson AS <info@crimson.no>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <private/qv4iterator_p.h>
#include <private/qv4estable_p.h>
diff --git a/src/qml/jsruntime/qv4mapiterator_p.h b/src/qml/jsruntime/qv4mapiterator_p.h
index 97a72db85c..43a767aff6 100644
--- a/src/qml/jsruntime/qv4mapiterator_p.h
+++ b/src/qml/jsruntime/qv4mapiterator_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 Crimson AS <info@crimson.no>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4MAPITERATOR_P_H
#define QV4MAPITERATOR_P_H
diff --git a/src/qml/jsruntime/qv4mapobject.cpp b/src/qml/jsruntime/qv4mapobject.cpp
index aa594ad33e..d40952fa54 100644
--- a/src/qml/jsruntime/qv4mapobject.cpp
+++ b/src/qml/jsruntime/qv4mapobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 Crimson AS <info@crimson.no>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4mapobject_p.h"
#include "qv4mapiterator_p.h"
diff --git a/src/qml/jsruntime/qv4mapobject_p.h b/src/qml/jsruntime/qv4mapobject_p.h
index e7ff02c13a..6745edbde6 100644
--- a/src/qml/jsruntime/qv4mapobject_p.h
+++ b/src/qml/jsruntime/qv4mapobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 Crimson AS <info@crimson.no>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4MAPOBJECT_P_H
#define QV4MAPOBJECT_P_H
diff --git a/src/qml/jsruntime/qv4math_p.h b/src/qml/jsruntime/qv4math_p.h
index b12990700d..9aadf301bc 100644
--- a/src/qml/jsruntime/qv4math_p.h
+++ b/src/qml/jsruntime/qv4math_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QMLJS_MATH_H
#define QMLJS_MATH_H
diff --git a/src/qml/jsruntime/qv4mathobject.cpp b/src/qml/jsruntime/qv4mathobject.cpp
index 71ff6ec0f8..15ea692133 100644
--- a/src/qml/jsruntime/qv4mathobject.cpp
+++ b/src/qml/jsruntime/qv4mathobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4mathobject_p.h"
#include "qv4symbol_p.h"
diff --git a/src/qml/jsruntime/qv4mathobject_p.h b/src/qml/jsruntime/qv4mathobject_p.h
index 5547cbab61..a0ba0b53ed 100644
--- a/src/qml/jsruntime/qv4mathobject_p.h
+++ b/src/qml/jsruntime/qv4mathobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4MATHOBJECT_H
#define QV4MATHOBJECT_H
diff --git a/src/qml/jsruntime/qv4memberdata.cpp b/src/qml/jsruntime/qv4memberdata.cpp
index 0231641609..7768045753 100644
--- a/src/qml/jsruntime/qv4memberdata.cpp
+++ b/src/qml/jsruntime/qv4memberdata.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4memberdata_p.h"
#include <private/qv4mm_p.h>
diff --git a/src/qml/jsruntime/qv4module.cpp b/src/qml/jsruntime/qv4module.cpp
index 3ff9191cb2..16d38ee0b3 100644
--- a/src/qml/jsruntime/qv4module.cpp
+++ b/src/qml/jsruntime/qv4module.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4module_p.h"
diff --git a/src/qml/jsruntime/qv4module_p.h b/src/qml/jsruntime/qv4module_p.h
index 43cd995b06..be03fd98f7 100644
--- a/src/qml/jsruntime/qv4module_p.h
+++ b/src/qml/jsruntime/qv4module_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4MODULE
#define QV4MODULE
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index 8aef0354d8..06b806485c 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4numberobject_p.h"
#include "qv4runtime_p.h"
diff --git a/src/qml/jsruntime/qv4numberobject_p.h b/src/qml/jsruntime/qv4numberobject_p.h
index 3f0d6d9425..0235c20051 100644
--- a/src/qml/jsruntime/qv4numberobject_p.h
+++ b/src/qml/jsruntime/qv4numberobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4NUMBEROBJECT_H
#define QV4NUMBEROBJECT_H
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index ffa17f5a4d..2ee9c80dbf 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4object_p.h"
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 77437273d4..8456a49112 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4_OBJECT_H
#define QV4_OBJECT_H
diff --git a/src/qml/jsruntime/qv4objectiterator.cpp b/src/qml/jsruntime/qv4objectiterator.cpp
index 573f42956d..dea5f23a74 100644
--- a/src/qml/jsruntime/qv4objectiterator.cpp
+++ b/src/qml/jsruntime/qv4objectiterator.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4objectiterator_p.h"
#include "qv4object_p.h"
#include "qv4iterator_p.h"
diff --git a/src/qml/jsruntime/qv4objectiterator_p.h b/src/qml/jsruntime/qv4objectiterator_p.h
index 2b7dd8fae1..ddc782c543 100644
--- a/src/qml/jsruntime/qv4objectiterator_p.h
+++ b/src/qml/jsruntime/qv4objectiterator_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4OBJECTITERATOR_H
#define QV4OBJECTITERATOR_H
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index bd985d6525..3039b5e989 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -1,6 +1,7 @@
// Copyright (C) 2017 Crimson AS <info@crimson.no>
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4objectproto_p.h"
diff --git a/src/qml/jsruntime/qv4objectproto_p.h b/src/qml/jsruntime/qv4objectproto_p.h
index d74cd64926..5342dd2f13 100644
--- a/src/qml/jsruntime/qv4objectproto_p.h
+++ b/src/qml/jsruntime/qv4objectproto_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4ECMAOBJECTS_P_H
#define QV4ECMAOBJECTS_P_H
diff --git a/src/qml/jsruntime/qv4persistent.cpp b/src/qml/jsruntime/qv4persistent.cpp
index 4f11d0a2ad..bd2c358503 100644
--- a/src/qml/jsruntime/qv4persistent.cpp
+++ b/src/qml/jsruntime/qv4persistent.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4persistent_p.h"
#include <private/qv4mm_p.h>
diff --git a/src/qml/jsruntime/qv4persistent_p.h b/src/qml/jsruntime/qv4persistent_p.h
index d0e29a166e..9c9f369139 100644
--- a/src/qml/jsruntime/qv4persistent_p.h
+++ b/src/qml/jsruntime/qv4persistent_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4PERSISTENT_H
#define QV4PERSISTENT_H
diff --git a/src/qml/jsruntime/qv4profiling.cpp b/src/qml/jsruntime/qv4profiling.cpp
index df63d4bdf7..9367445bb5 100644
--- a/src/qml/jsruntime/qv4profiling.cpp
+++ b/src/qml/jsruntime/qv4profiling.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4profiling_p.h"
#include <private/qv4mm_p.h>
diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h
index d1e8e34ba3..d28c3d5422 100644
--- a/src/qml/jsruntime/qv4profiling_p.h
+++ b/src/qml/jsruntime/qv4profiling_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4PROFILING_H
#define QV4PROFILING_H
diff --git a/src/qml/jsruntime/qv4promiseobject.cpp b/src/qml/jsruntime/qv4promiseobject.cpp
index b8ede3e578..8141aba9cb 100644
--- a/src/qml/jsruntime/qv4promiseobject.cpp
+++ b/src/qml/jsruntime/qv4promiseobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <QCoreApplication>
#include <private/qv4promiseobject_p.h>
diff --git a/src/qml/jsruntime/qv4promiseobject_p.h b/src/qml/jsruntime/qv4promiseobject_p.h
index fbde9f95e0..05afb4f249 100644
--- a/src/qml/jsruntime/qv4promiseobject_p.h
+++ b/src/qml/jsruntime/qv4promiseobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4PROMISEOBJECT_H
#define QV4PROMISEOBJECT_H
diff --git a/src/qml/jsruntime/qv4property_p.h b/src/qml/jsruntime/qv4property_p.h
index e7ad6b58d6..563b69d748 100644
--- a/src/qml/jsruntime/qv4property_p.h
+++ b/src/qml/jsruntime/qv4property_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4PROPERTYDESCRIPTOR_H
#define QV4PROPERTYDESCRIPTOR_H
diff --git a/src/qml/jsruntime/qv4propertykey.cpp b/src/qml/jsruntime/qv4propertykey.cpp
index 65dd7e7fc1..f2eb6175fe 100644
--- a/src/qml/jsruntime/qv4propertykey.cpp
+++ b/src/qml/jsruntime/qv4propertykey.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4propertykey_p.h"
diff --git a/src/qml/jsruntime/qv4propertykey_p.h b/src/qml/jsruntime/qv4propertykey_p.h
index f3b05ee0d8..88b91d7499 100644
--- a/src/qml/jsruntime/qv4propertykey_p.h
+++ b/src/qml/jsruntime/qv4propertykey_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4PROPERTYKEY_H
#define QV4PROPERTYKEY_H
diff --git a/src/qml/jsruntime/qv4proxy.cpp b/src/qml/jsruntime/qv4proxy.cpp
index 0bb794187a..7083c96009 100644
--- a/src/qml/jsruntime/qv4proxy.cpp
+++ b/src/qml/jsruntime/qv4proxy.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4proxy_p.h"
diff --git a/src/qml/jsruntime/qv4proxy_p.h b/src/qml/jsruntime/qv4proxy_p.h
index b3ce9c7a96..b56faca2f0 100644
--- a/src/qml/jsruntime/qv4proxy_p.h
+++ b/src/qml/jsruntime/qv4proxy_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4PROXY_P_H
#define QV4PROXY_P_H
diff --git a/src/qml/jsruntime/qv4qmetaobjectwrapper.cpp b/src/qml/jsruntime/qv4qmetaobjectwrapper.cpp
index 6521c98dbf..8396610517 100644
--- a/src/qml/jsruntime/qv4qmetaobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qmetaobjectwrapper.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4qmetaobjectwrapper_p.h"
diff --git a/src/qml/jsruntime/qv4qmetaobjectwrapper_p.h b/src/qml/jsruntime/qv4qmetaobjectwrapper_p.h
index c44b18f291..4623d2840c 100644
--- a/src/qml/jsruntime/qv4qmetaobjectwrapper_p.h
+++ b/src/qml/jsruntime/qv4qmetaobjectwrapper_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4QMETAOBJECTWRAPPER_P_H
#define QV4QMETAOBJECTWRAPPER_P_H
diff --git a/src/qml/jsruntime/qv4qmlcontext.cpp b/src/qml/jsruntime/qv4qmlcontext.cpp
index 7b8b448e5e..2f90237cd9 100644
--- a/src/qml/jsruntime/qv4qmlcontext.cpp
+++ b/src/qml/jsruntime/qv4qmlcontext.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4qmlcontext_p.h"
diff --git a/src/qml/jsruntime/qv4qmlcontext_p.h b/src/qml/jsruntime/qv4qmlcontext_p.h
index 1b337d4c0e..8381893478 100644
--- a/src/qml/jsruntime/qv4qmlcontext_p.h
+++ b/src/qml/jsruntime/qv4qmlcontext_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4QMLCONTEXT_P_H
#define QV4QMLCONTEXT_P_H
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index c3ef472d76..6665264fcc 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4qobjectwrapper_p.h"
diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h
index 397fc05d4a..cf88a2e4ef 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper_p.h
+++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4QOBJECTWRAPPER_P_H
#define QV4QOBJECTWRAPPER_P_H
diff --git a/src/qml/jsruntime/qv4referenceobject.cpp b/src/qml/jsruntime/qv4referenceobject.cpp
index fcad9b92dc..200897eb68 100644
--- a/src/qml/jsruntime/qv4referenceobject.cpp
+++ b/src/qml/jsruntime/qv4referenceobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <private/qv4referenceobject_p.h>
diff --git a/src/qml/jsruntime/qv4referenceobject_p.h b/src/qml/jsruntime/qv4referenceobject_p.h
index fa019f5db0..c42bed63bd 100644
--- a/src/qml/jsruntime/qv4referenceobject_p.h
+++ b/src/qml/jsruntime/qv4referenceobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4REFERENCEOBJECT_P_H
#define QV4REFERENCEOBJECT_P_H
diff --git a/src/qml/jsruntime/qv4reflect.cpp b/src/qml/jsruntime/qv4reflect.cpp
index 98abcff737..c984d821c3 100644
--- a/src/qml/jsruntime/qv4reflect.cpp
+++ b/src/qml/jsruntime/qv4reflect.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4reflect_p.h"
#include "qv4runtimeapi_p.h"
diff --git a/src/qml/jsruntime/qv4reflect_p.h b/src/qml/jsruntime/qv4reflect_p.h
index 40e1874686..3504abdc2a 100644
--- a/src/qml/jsruntime/qv4reflect_p.h
+++ b/src/qml/jsruntime/qv4reflect_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4REFLECT_H
#define QV4REFLECT_H
diff --git a/src/qml/jsruntime/qv4regexp.cpp b/src/qml/jsruntime/qv4regexp.cpp
index 8dd14d3a43..9120d70649 100644
--- a/src/qml/jsruntime/qv4regexp.cpp
+++ b/src/qml/jsruntime/qv4regexp.cpp
@@ -1,5 +1,7 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
+// TODO: verifyj critical part should be in YARR
#include "qv4regexp_p.h"
#include "qv4engine_p.h"
diff --git a/src/qml/jsruntime/qv4regexp_p.h b/src/qml/jsruntime/qv4regexp_p.h
index 89f9515917..754c171dee 100644
--- a/src/qml/jsruntime/qv4regexp_p.h
+++ b/src/qml/jsruntime/qv4regexp_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4REGEXP_H
#define QV4REGEXP_H
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp
index 144716f286..43455f47cd 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4regexpobject_p.h"
#include "qv4regexp_p.h"
diff --git a/src/qml/jsruntime/qv4regexpobject_p.h b/src/qml/jsruntime/qv4regexpobject_p.h
index 179a01fb45..3c99faa183 100644
--- a/src/qml/jsruntime/qv4regexpobject_p.h
+++ b/src/qml/jsruntime/qv4regexpobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4REGEXPOBJECT_H
#define QV4REGEXPOBJECT_H
diff --git a/src/qml/jsruntime/qv4resolvedtypereference.cpp b/src/qml/jsruntime/qv4resolvedtypereference.cpp
index e8622824e2..0fcbbcbfae 100644
--- a/src/qml/jsruntime/qv4resolvedtypereference.cpp
+++ b/src/qml/jsruntime/qv4resolvedtypereference.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4resolvedtypereference_p.h"
diff --git a/src/qml/jsruntime/qv4resolvedtypereference_p.h b/src/qml/jsruntime/qv4resolvedtypereference_p.h
index e7843c297b..087c77fddf 100644
--- a/src/qml/jsruntime/qv4resolvedtypereference_p.h
+++ b/src/qml/jsruntime/qv4resolvedtypereference_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4RESOLVEDTYPEREFERNCE_P_H
#define QV4RESOLVEDTYPEREFERNCE_P_H
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 0034c02b09..eaba955a6b 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4runtime_p.h"
diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h
index a012728cd9..867b1bf479 100644
--- a/src/qml/jsruntime/qv4runtime_p.h
+++ b/src/qml/jsruntime/qv4runtime_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QMLJS_RUNTIME_H
#define QMLJS_RUNTIME_H
diff --git a/src/qml/jsruntime/qv4runtimeapi_p.h b/src/qml/jsruntime/qv4runtimeapi_p.h
index e4a8c09370..0b48b050e6 100644
--- a/src/qml/jsruntime/qv4runtimeapi_p.h
+++ b/src/qml/jsruntime/qv4runtimeapi_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4RUNTIMEAPI_P_H
#define QV4RUNTIMEAPI_P_H
diff --git a/src/qml/jsruntime/qv4runtimecodegen.cpp b/src/qml/jsruntime/qv4runtimecodegen.cpp
index 65dc4a8c17..cabdb551c5 100644
--- a/src/qml/jsruntime/qv4runtimecodegen.cpp
+++ b/src/qml/jsruntime/qv4runtimecodegen.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4engine_p.h"
#include "qv4runtimecodegen_p.h"
diff --git a/src/qml/jsruntime/qv4runtimecodegen_p.h b/src/qml/jsruntime/qv4runtimecodegen_p.h
index 414742eaea..99adde1167 100644
--- a/src/qml/jsruntime/qv4runtimecodegen_p.h
+++ b/src/qml/jsruntime/qv4runtimecodegen_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4RUNTIMECODEGEN_P_H
#define QV4RUNTIMECODEGEN_P_H
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 54579ffce6..7bb37f447f 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4SCOPEDVALUE_P_H
#define QV4SCOPEDVALUE_P_H
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index d045e097a2..c40c105cbb 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4script_p.h"
diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h
index d86b2bd7a0..a6d79cadc2 100644
--- a/src/qml/jsruntime/qv4script_p.h
+++ b/src/qml/jsruntime/qv4script_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4SCRIPT_H
#define QV4SCRIPT_H
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp
index 2a52b56ed2..4a18f18f46 100644
--- a/src/qml/jsruntime/qv4sequenceobject.cpp
+++ b/src/qml/jsruntime/qv4sequenceobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <QtCore/qsequentialiterable.h>
diff --git a/src/qml/jsruntime/qv4sequenceobject_p.h b/src/qml/jsruntime/qv4sequenceobject_p.h
index c61b18bd72..103984cf2b 100644
--- a/src/qml/jsruntime/qv4sequenceobject_p.h
+++ b/src/qml/jsruntime/qv4sequenceobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4SEQUENCEWRAPPER_P_H
#define QV4SEQUENCEWRAPPER_P_H
diff --git a/src/qml/jsruntime/qv4setiterator.cpp b/src/qml/jsruntime/qv4setiterator.cpp
index 95d55af153..a29141ef70 100644
--- a/src/qml/jsruntime/qv4setiterator.cpp
+++ b/src/qml/jsruntime/qv4setiterator.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 Crimson AS <info@crimson.no>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <private/qv4iterator_p.h>
#include <private/qv4estable_p.h>
diff --git a/src/qml/jsruntime/qv4setiterator_p.h b/src/qml/jsruntime/qv4setiterator_p.h
index 37f912e01a..d0957ebf45 100644
--- a/src/qml/jsruntime/qv4setiterator_p.h
+++ b/src/qml/jsruntime/qv4setiterator_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 Crimson AS <info@crimson.no>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4SETITERATOR_P_H
#define QV4SETITERATOR_P_H
diff --git a/src/qml/jsruntime/qv4setobject.cpp b/src/qml/jsruntime/qv4setobject.cpp
index ffd685a10b..382c6f3794 100644
--- a/src/qml/jsruntime/qv4setobject.cpp
+++ b/src/qml/jsruntime/qv4setobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 Crimson AS <info@crimson.no>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4setobject_p.h"
diff --git a/src/qml/jsruntime/qv4setobject_p.h b/src/qml/jsruntime/qv4setobject_p.h
index 118cdebd5a..d3bd0ae88d 100644
--- a/src/qml/jsruntime/qv4setobject_p.h
+++ b/src/qml/jsruntime/qv4setobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 Crimson AS <info@crimson.no>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4SETOBJECT_P_H
#define QV4SETOBJECT_P_H
diff --git a/src/qml/jsruntime/qv4sparsearray.cpp b/src/qml/jsruntime/qv4sparsearray.cpp
index 656c496a2a..5f4b70a93b 100644
--- a/src/qml/jsruntime/qv4sparsearray.cpp
+++ b/src/qml/jsruntime/qv4sparsearray.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4sparsearray_p.h"
#include <stdlib.h>
diff --git a/src/qml/jsruntime/qv4sparsearray_p.h b/src/qml/jsruntime/qv4sparsearray_p.h
index 7da42a4985..c58b756122 100644
--- a/src/qml/jsruntime/qv4sparsearray_p.h
+++ b/src/qml/jsruntime/qv4sparsearray_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4SPARSEARRAY_H
#define QV4SPARSEARRAY_H
diff --git a/src/qml/jsruntime/qv4sqlerrors.cpp b/src/qml/jsruntime/qv4sqlerrors.cpp
index c942871702..8b45fe2ac1 100644
--- a/src/qml/jsruntime/qv4sqlerrors.cpp
+++ b/src/qml/jsruntime/qv4sqlerrors.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4sqlerrors_p.h"
#include "private/qv4engine_p.h"
diff --git a/src/qml/jsruntime/qv4sqlerrors_p.h b/src/qml/jsruntime/qv4sqlerrors_p.h
index a96a9037b2..64db88f6ca 100644
--- a/src/qml/jsruntime/qv4sqlerrors_p.h
+++ b/src/qml/jsruntime/qv4sqlerrors_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4SQLERRORS_P_H
#define QV4SQLERRORS_P_H
diff --git a/src/qml/jsruntime/qv4stackframe.cpp b/src/qml/jsruntime/qv4stackframe.cpp
index 5117e745a0..0d80e1d6ef 100644
--- a/src/qml/jsruntime/qv4stackframe.cpp
+++ b/src/qml/jsruntime/qv4stackframe.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4stackframe_p.h"
#include <private/qv4qobjectwrapper_p.h>
diff --git a/src/qml/jsruntime/qv4stackframe_p.h b/src/qml/jsruntime/qv4stackframe_p.h
index 84ebd5c4aa..874cb57ed3 100644
--- a/src/qml/jsruntime/qv4stackframe_p.h
+++ b/src/qml/jsruntime/qv4stackframe_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4STACKFRAME_H
#define QV4STACKFRAME_H
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp
index 8b5594b43b..2fb7674dea 100644
--- a/src/qml/jsruntime/qv4string.cpp
+++ b/src/qml/jsruntime/qv4string.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4string_p.h"
#include "qv4value_p.h"
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h
index 30e1f806f9..5dadc654fc 100644
--- a/src/qml/jsruntime/qv4string_p.h
+++ b/src/qml/jsruntime/qv4string_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4STRING_H
#define QV4STRING_H
diff --git a/src/qml/jsruntime/qv4stringiterator.cpp b/src/qml/jsruntime/qv4stringiterator.cpp
index 9cb2711efb..c00be938e4 100644
--- a/src/qml/jsruntime/qv4stringiterator.cpp
+++ b/src/qml/jsruntime/qv4stringiterator.cpp
@@ -1,6 +1,7 @@
// Copyright (C) 2017 Crimson AS <info@crimson.no>
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <private/qv4iterator_p.h>
#include <private/qv4stringiterator_p.h>
diff --git a/src/qml/jsruntime/qv4stringiterator_p.h b/src/qml/jsruntime/qv4stringiterator_p.h
index 742b8a895d..9d0e613cea 100644
--- a/src/qml/jsruntime/qv4stringiterator_p.h
+++ b/src/qml/jsruntime/qv4stringiterator_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4STRINGITERATOR_P_H
#define QV4STRINGITERATOR_P_H
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index ac06737bf5..0677917d8d 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4stringobject_p.h"
diff --git a/src/qml/jsruntime/qv4stringobject_p.h b/src/qml/jsruntime/qv4stringobject_p.h
index 73c2bd7b34..6aeacfd3e0 100644
--- a/src/qml/jsruntime/qv4stringobject_p.h
+++ b/src/qml/jsruntime/qv4stringobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4STRINGOBJECT_P_H
#define QV4STRINGOBJECT_P_H
diff --git a/src/qml/jsruntime/qv4symbol.cpp b/src/qml/jsruntime/qv4symbol.cpp
index 85ef57f680..64a40e6c21 100644
--- a/src/qml/jsruntime/qv4symbol.cpp
+++ b/src/qml/jsruntime/qv4symbol.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <qv4symbol_p.h>
#include <qv4functionobject_p.h>
diff --git a/src/qml/jsruntime/qv4symbol_p.h b/src/qml/jsruntime/qv4symbol_p.h
index 29a0189b69..54ebc1c69b 100644
--- a/src/qml/jsruntime/qv4symbol_p.h
+++ b/src/qml/jsruntime/qv4symbol_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4_SYMBOL_H
#define QV4_SYMBOL_H
diff --git a/src/qml/jsruntime/qv4typedarray.cpp b/src/qml/jsruntime/qv4typedarray.cpp
index 1b7fca98a4..7a0e0b5e64 100644
--- a/src/qml/jsruntime/qv4typedarray.cpp
+++ b/src/qml/jsruntime/qv4typedarray.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4typedarray_p.h"
#include "qv4arrayiterator_p.h"
diff --git a/src/qml/jsruntime/qv4typedarray_p.h b/src/qml/jsruntime/qv4typedarray_p.h
index 50db9610c7..8ebec12399 100644
--- a/src/qml/jsruntime/qv4typedarray_p.h
+++ b/src/qml/jsruntime/qv4typedarray_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4TYPEDARRAY_H
#define QV4TYPEDARRAY_H
diff --git a/src/qml/jsruntime/qv4urlobject.cpp b/src/qml/jsruntime/qv4urlobject.cpp
index 6790d4c289..58df08f47d 100644
--- a/src/qml/jsruntime/qv4urlobject.cpp
+++ b/src/qml/jsruntime/qv4urlobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4arrayiterator_p.h"
#include "qv4urlobject_p.h"
diff --git a/src/qml/jsruntime/qv4urlobject_p.h b/src/qml/jsruntime/qv4urlobject_p.h
index b3b76e1158..ae3e9d8351 100644
--- a/src/qml/jsruntime/qv4urlobject_p.h
+++ b/src/qml/jsruntime/qv4urlobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4URLOBJECT_P_H
#define QV4URLOBJECT_P_H
diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp
index 223a004602..ab0e8ac47f 100644
--- a/src/qml/jsruntime/qv4value.cpp
+++ b/src/qml/jsruntime/qv4value.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <qv4runtime_p.h>
#include <qv4propertykey_p.h>
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index 5f9481c0a1..f582fcfa71 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4VALUE_P_H
#define QV4VALUE_P_H
diff --git a/src/qml/jsruntime/qv4variantassociationobject.cpp b/src/qml/jsruntime/qv4variantassociationobject.cpp
index defa40d2ad..b02f31d71e 100644
--- a/src/qml/jsruntime/qv4variantassociationobject.cpp
+++ b/src/qml/jsruntime/qv4variantassociationobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4variantassociationobject_p.h"
diff --git a/src/qml/jsruntime/qv4variantassociationobject_p.h b/src/qml/jsruntime/qv4variantassociationobject_p.h
index 8abf3e3008..90091655ec 100644
--- a/src/qml/jsruntime/qv4variantassociationobject_p.h
+++ b/src/qml/jsruntime/qv4variantassociationobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4VARIANTASSOCIATIONOBJECT_P_H_
#define QV4VARIANTASSOCIATIONOBJECT_P_H_
diff --git a/src/qml/jsruntime/qv4variantobject.cpp b/src/qml/jsruntime/qv4variantobject.cpp
index 62e21a120c..9858046707 100644
--- a/src/qml/jsruntime/qv4variantobject.cpp
+++ b/src/qml/jsruntime/qv4variantobject.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4variantobject_p.h"
#include "qv4functionobject_p.h"
diff --git a/src/qml/jsruntime/qv4variantobject_p.h b/src/qml/jsruntime/qv4variantobject_p.h
index f2394ce9a2..4fa7f2cf6f 100644
--- a/src/qml/jsruntime/qv4variantobject_p.h
+++ b/src/qml/jsruntime/qv4variantobject_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4VARIANTOBJECT_P_H
#define QV4VARIANTOBJECT_P_H
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index 5290b3de6e..b68f69ea5e 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qv4vme_moth_p.h"
diff --git a/src/qml/jsruntime/qv4vme_moth_p.h b/src/qml/jsruntime/qv4vme_moth_p.h
index 786fc3880d..5aefe92ec7 100644
--- a/src/qml/jsruntime/qv4vme_moth_p.h
+++ b/src/qml/jsruntime/qv4vme_moth_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4VME_MOTH_P_H
#define QV4VME_MOTH_P_H
diff --git a/src/qml/jsruntime/qv4vtable_p.h b/src/qml/jsruntime/qv4vtable_p.h
index 0532fdc32d..21324cec97 100644
--- a/src/qml/jsruntime/qv4vtable_p.h
+++ b/src/qml/jsruntime/qv4vtable_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QV4VTABLE_P_H
#define QV4VTABLE_P_H
diff --git a/src/qml/parser/qqmljs.g b/src/qml/parser/qqmljs.g
index c37d9b8d96..df134d6cdd 100644
--- a/src/qml/parser/qqmljs.g
+++ b/src/qml/parser/qqmljs.g
@@ -1,5 +1,6 @@
-- Copyright (C) 2016 The Qt Company Ltd.
-- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+-- Qt-Security score:critical reason:dataparser
%parser QQmlJSGrammar
%decl qqmljsparser_p.h
diff --git a/src/qml/parser/qqmljsast.cpp b/src/qml/parser/qqmljsast.cpp
index 09e396369a..3e08a0775f 100644
--- a/src/qml/parser/qqmljsast.cpp
+++ b/src/qml/parser/qqmljsast.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include <QString>
#include <QLocale>
diff --git a/src/qml/parser/qqmljsast_p.h b/src/qml/parser/qqmljsast_p.h
index 59ca22593b..ba181bfcd1 100644
--- a/src/qml/parser/qqmljsast_p.h
+++ b/src/qml/parser/qqmljsast_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QQMLJSAST_P_H
#define QQMLJSAST_P_H
diff --git a/src/qml/parser/qqmljsastfwd_p.h b/src/qml/parser/qqmljsastfwd_p.h
index df64a9e1d5..6af738cfc6 100644
--- a/src/qml/parser/qqmljsastfwd_p.h
+++ b/src/qml/parser/qqmljsastfwd_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant reason:forward-declarations-only
#ifndef QQMLJSAST_FWD_P_H
#define QQMLJSAST_FWD_P_H
diff --git a/src/qml/parser/qqmljsastvisitor.cpp b/src/qml/parser/qqmljsastvisitor.cpp
index 21a9e92e2c..51dda8530f 100644
--- a/src/qml/parser/qqmljsastvisitor.cpp
+++ b/src/qml/parser/qqmljsastvisitor.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#include "qqmljsastvisitor_p.h"
diff --git a/src/qml/parser/qqmljsastvisitor_p.h b/src/qml/parser/qqmljsastvisitor_p.h
index 228537ab5a..12019bcf29 100644
--- a/src/qml/parser/qqmljsastvisitor_p.h
+++ b/src/qml/parser/qqmljsastvisitor_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QQMLJSASTVISITOR_P_H
#define QQMLJSASTVISITOR_P_H
diff --git a/src/qml/parser/qqmljsengine_p.h b/src/qml/parser/qqmljsengine_p.h
index 37f78a30e1..68208d52d2 100644
--- a/src/qml/parser/qqmljsengine_p.h
+++ b/src/qml/parser/qqmljsengine_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QQMLJSENGINE_P_H
#define QQMLJSENGINE_P_H
diff --git a/src/qml/parser/qqmljskeywords_p.h b/src/qml/parser/qqmljskeywords_p.h
index 231e5c812d..83cbd5907f 100644
--- a/src/qml/parser/qqmljskeywords_p.h
+++ b/src/qml/parser/qqmljskeywords_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:critical reason:data-parser
#ifndef QQMLJSKEYWORDS_P_H
#define QQMLJSKEYWORDS_P_H
diff --git a/src/qml/parser/qqmljslexer.cpp b/src/qml/parser/qqmljslexer.cpp
index 640ab946dc..e61a615377 100644
--- a/src/qml/parser/qqmljslexer.cpp
+++ b/src/qml/parser/qqmljslexer.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:critical reason:dataparser
#include "qqmljslexer_p.h"
#include "qqmljsengine_p.h"
diff --git a/src/qml/parser/qqmljslexer_p.h b/src/qml/parser/qqmljslexer_p.h
index 14fba74d8c..5879a7e578 100644
--- a/src/qml/parser/qqmljslexer_p.h
+++ b/src/qml/parser/qqmljslexer_p.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant
#ifndef QQMLJSLEXER_P_H
#define QQMLJSLEXER_P_H
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp
index 5628f14fa3..0486247d63 100644
--- a/src/qml/qml/qqml.cpp
+++ b/src/qml/qml/qqml.cpp
@@ -2139,8 +2139,13 @@ static bool callQObjectMethodAsVariant(
QV4::Scope scope(engine);
QV4::ScopedValue wrappedObject(scope, QV4::QObjectWrapper::wrap(scope.engine, thisObject));
QV4::ScopedFunctionObject function(scope, lookup->getter(scope.engine, wrappedObject));
- Q_ASSERT(function);
- Q_ASSERT(lookup->asVariant); // The getter mustn't reset the isVariant flag
+
+ // The getter mustn't reset the isVariant flag
+ Q_ASSERT(lookup->asVariant);
+
+ // Since we have an asVariant lookup, the function may have been overridden in the mean time.
+ if (!function)
+ return false;
Q_ALLOCA_VAR(QMetaType, types, (argc + 1) * sizeof(QMetaType));
std::fill(types, types + argc + 1, QMetaType::fromType<QVariant>());
@@ -2232,31 +2237,6 @@ static bool callArrowFunction(
Q_UNREACHABLE_RETURN(false);
}
-static bool callArrowFunctionAsVariant(
- QV4::ExecutionEngine *engine, QV4::ArrowFunction *function,
- QObject *thisObject, void **args, int argc)
-{
- QV4::Function *v4Function = function->function();
- Q_ASSERT(v4Function);
-
- switch (v4Function->kind) {
- case QV4::Function::JsUntyped:
- // We cannot assert anything here because the method can be shadowed.
- // That's why we wrap everything in QVariant.
- case QV4::Function::AotCompiled:
- case QV4::Function::JsTyped: {
- Q_ALLOCA_VAR(QMetaType, types, (argc + 1) * sizeof(QMetaType));
- std::fill(types, types + argc + 1, QMetaType::fromType<QVariant>());
- function->call(thisObject, args, types, argc);
- return !engine->hasException;
- }
- case QV4::Function::Eval:
- break;
- }
-
- Q_UNREACHABLE_RETURN(false);
-}
-
bool AOTCompiledContext::callQmlContextPropertyLookup(uint index, void **args, int argc) const
{
QV4::Lookup *lookup = compilationUnit->runtimeLookups + index;
@@ -2436,16 +2416,25 @@ bool AOTCompiledContext::callObjectPropertyLookup(
: callQObjectMethod(engine->handle(), lookup, object, args, argc);
case QV4::Lookup::Call::GetterQObjectProperty:
case QV4::Lookup::Call::GetterQObjectPropertyFallback: {
- const bool asVariant = lookup->asVariant;
- // Here we always retrieve a fresh method via the getter. No need to re-init.
+ if (lookup->asVariant) {
+ // If the method can be shadowed, the overridden method can be taken away, too.
+ // In that case we might end up with a QObjectMethod or random other values instead.
+ // callQObjectMethodAsVariant is flexible enough to handle that.
+ return callQObjectMethodAsVariant(engine->handle(), lookup, object, args, argc);
+ }
+
+ // Here we always retrieve a fresh ArrowFunction via the getter.
QV4::Scope scope(engine->handle());
QV4::ScopedValue thisObject(scope, QV4::QObjectWrapper::wrap(scope.engine, object));
QV4::Scoped<QV4::ArrowFunction> function(scope, lookup->getter(scope.engine, thisObject));
+
+ // The getter mustn't touch the asVariant bit
+ Q_ASSERT(!lookup->asVariant);
+
+ // If the method can't be shadowed, it has to stay the same.
Q_ASSERT(function);
- Q_ASSERT(lookup->asVariant == asVariant); // The getter mustn't touch the asVariant bit
- return asVariant
- ? callArrowFunctionAsVariant(scope.engine, function, qmlScopeObject, args, argc)
- : callArrowFunction(scope.engine, function, qmlScopeObject, args, argc);
+
+ return callArrowFunction(scope.engine, function, qmlScopeObject, args, argc);
}
default:
break;
@@ -2464,16 +2453,16 @@ void AOTCompiledContext::initCallObjectPropertyLookupAsVariant(uint index, QObje
QV4::Lookup *lookup = compilationUnit->runtimeLookups + index;
QV4::Scope scope(engine->handle());
- const auto throwInvalidObjectError = [&]() {
+ const auto throwInvalidObjectError = [&](const QString &object) {
scope.engine->throwTypeError(
- QStringLiteral("Property '%1' of object [object Object] is not a function")
- .arg(compilationUnit->runtimeStrings[lookup->nameIndex]->toQString()));
+ QStringLiteral("Property '%1' of object %2 is not a function").arg(
+ compilationUnit->runtimeStrings[lookup->nameIndex]->toQString(), object));
};
const auto *ddata = QQmlData::get(object, false);
if (ddata && ddata->hasVMEMetaObject && ddata->jsWrapper.isNullOrUndefined()) {
// We cannot lookup functions on an object with VME metaobject but no QObjectWrapper
- throwInvalidObjectError();
+ throwInvalidObjectError(QStringLiteral("[object Object]"));
return;
}
@@ -2491,7 +2480,7 @@ void AOTCompiledContext::initCallObjectPropertyLookupAsVariant(uint index, QObje
return;
}
- throwInvalidObjectError();
+ throwInvalidObjectError(thisObject->toQStringNoThrow());
}
void AOTCompiledContext::initCallObjectPropertyLookup(
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index fb16e51c2b..68b06be95f 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -205,25 +205,6 @@ QQmlPropertyCache::Ptr QQmlPropertyCache::copyAndReserve(
return rv;
}
-/*! \internal
-
- \a notifyIndex MUST be in the signal index range (see QObjectPrivate::signalIndex()).
- This is different from QMetaMethod::methodIndex().
-*/
-QQmlPropertyCache::OverrideResult
-QQmlPropertyCache::appendProperty(const QString &name, QQmlPropertyData::Flags flags, int coreIndex,
- QMetaType propType, QTypeRevision version, int notifyIndex)
-{
- QQmlPropertyData data;
- data.setPropType(propType);
- data.setCoreIndex(coreIndex);
- data.setNotifyIndex(notifyIndex);
- data.setFlags(flags);
- data.setTypeVersion(version);
-
- return doAppendPropertyData(name, std::move(data));
-}
-
QQmlPropertyCache::OverrideResult
QQmlPropertyCache::appendAlias(const QString &name, QQmlPropertyData::Flags flags, int coreIndex,
QMetaType propType, QTypeRevision version, int notifyIndex,
@@ -396,6 +377,17 @@ static QHashedString signalNameToHandlerName(const QHashedCStringRef &methodName
QLatin1StringView{ methodName.constData(), methodName.length() });
}
+static inline std::pair<bool, int> deriveEncodingAndLength(const char *str)
+{
+ char utf8 = 0;
+ const char *cptr = str;
+ while (*cptr != 0) {
+ utf8 |= *cptr & 0x80;
+ ++cptr;
+ }
+ return std::make_pair(utf8, cptr - str);
+}
+
void QQmlPropertyCache::append(const QMetaObject *metaObject,
QTypeRevision typeVersion,
QQmlPropertyData::Flags propertyFlags,
@@ -455,13 +447,6 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject,
// Extract method name
// It's safe to keep the raw name pointer
Q_ASSERT(QMetaObjectPrivate::get(metaObject)->revision >= 7);
- const char *rawName = m.nameView().constData();
- const char *cptr = rawName;
- char utf8 = 0;
- while (*cptr) {
- utf8 |= *cptr & 0x80;
- ++cptr;
- }
QQmlPropertyData *data = &methodIndexCache[ii - methodIndexCacheStart];
QQmlPropertyData *sigdata = nullptr;
@@ -482,9 +467,8 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject,
sigdata->m_flags.setIsSignalHandler(true);
}
- QQmlPropertyData *old = nullptr;
-
const auto doSetNamedProperty = [&](const auto &methodName) {
+ QQmlPropertyData *old = nullptr;
if (StringCache::mapped_type *it = stringCache.value(methodName)) {
if (handleOverride(methodName, data, (old = it->second)) == InvalidOverride) {
*data = *old;
@@ -504,7 +488,7 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject,
if (data->isSignal()) {
// TODO: Remove this once we can. Signals should not be overridable.
- if (!utf8)
+ if constexpr (std::is_same_v<std::decay_t<decltype(methodName)>, QHashedCStringRef>)
data->m_flags.setIsOverridableSignal(true);
setNamedProperty(signalNameToHandlerName(methodName), ii, sigdata);
@@ -512,10 +496,12 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject,
}
};
- if (utf8)
- doSetNamedProperty(QHashedString(QString::fromUtf8(rawName, cptr - rawName)));
+ const char *str = m.nameView().constData();
+ const auto [isUtf8, len] = deriveEncodingAndLength(str);
+ if (isUtf8)
+ doSetNamedProperty(QHashedString(QString::fromUtf8(str, len)));
else
- doSetNamedProperty(QHashedCStringRef(rawName, cptr - rawName));
+ doSetNamedProperty(QHashedCStringRef(str, len));
}
int propCount = metaObject->propertyCount();
@@ -529,14 +515,6 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject,
if (!p.isScriptable())
continue;
- const char *str = p.name();
- char utf8 = 0;
- const char *cptr = str;
- while (*cptr != 0) {
- utf8 |= *cptr & 0x80;
- ++cptr;
- }
-
QQmlPropertyData *data = &propertyIndexCache[ii - propertyIndexCacheStart];
data->setFlags(propertyFlags);
@@ -546,27 +524,24 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject,
Q_ASSERT((allowedRevisionCache.size() - 1) < Q_INT16_MAX);
data->setMetaObjectOffset(allowedRevisionCache.size() - 1);
- QQmlPropertyData *old = nullptr;
-
- if (utf8) {
- QHashedString propName(QString::fromUtf8(str, cptr - str));
+ const auto doSetNamedProperty = [this](const auto &propName, int index, auto *propData) {
+ QQmlPropertyData *existingPropData = nullptr;
if (StringCache::mapped_type *it = stringCache.value(propName)) {
- if (handleOverride(propName, data, (old = it->second)) == InvalidOverride) {
- *data = *old;
- continue;
- }
- }
- setNamedProperty(propName, ii, data);
- } else {
- QHashedCStringRef propName(str, cptr - str);
- if (StringCache::mapped_type *it = stringCache.value(propName)) {
- if (handleOverride(propName, data, (old = it->second)) == InvalidOverride) {
- *data = *old;
- continue;
+ if (handleOverride(propName, propData, (existingPropData = it->second))
+ == InvalidOverride) {
+ *propData = *existingPropData;
+ return;
}
}
- setNamedProperty(propName, ii, data);
- }
+ setNamedProperty(propName, index, propData);
+ };
+
+ const char *str = p.name();
+ const auto [isUtf8, len] = deriveEncodingAndLength(str);
+ if (isUtf8)
+ doSetNamedProperty(QHashedString(QString::fromUtf8(str, len)), ii, data);
+ else
+ doSetNamedProperty(QHashedCStringRef(str, len), ii, data);
bool isGadget = true;
for (const QMetaObject *it = metaObject; it != nullptr; it = it->superClass()) {
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index dcd7dfe1a6..334bfe4661 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -153,8 +153,6 @@ public:
int propertyCount, int methodCount, int signalCount, int enumCount) const;
enum OverrideResult { NoOverride, InvalidOverride, ValidOverride };
- OverrideResult appendProperty(const QString &, QQmlPropertyData::Flags flags, int coreIndex,
- QMetaType propType, QTypeRevision revision, int notifyIndex);
OverrideResult appendAlias(const QString &, QQmlPropertyData::Flags flags, int coreIndex,
QMetaType propType, QTypeRevision version, int notifyIndex,
int encodedTargetIndex);
@@ -296,12 +294,7 @@ private:
return ValidOverride;
}
- template<typename String>
- OverrideResult handleOverride(const String &name, QQmlPropertyData *data)
- {
- return handleOverride(name, data, findNamedProperty(name));
- }
-
+ // TODO consider making public
OverrideResult doAppendPropertyData(const QString &name, QQmlPropertyData &&data)
{
QQmlPropertyData *old = findNamedProperty(name);
diff --git a/src/qml/qml/qqmlpropertycachecreator_p.h b/src/qml/qml/qqmlpropertycachecreator_p.h
index 789549b5aa..8faf1c7615 100644
--- a/src/qml/qml/qqmlpropertycachecreator_p.h
+++ b/src/qml/qml/qqmlpropertycachecreator_p.h
@@ -21,6 +21,7 @@
#include <private/inlinecomponentutils_p.h>
#include <private/qqmlsourcecoordinate_p.h>
#include <private/qqmlsignalnames_p.h>
+#include <private/qexpected_p.h>
#include <QtCore/qloggingcategory.h>
#include <QtCore/qscopedvaluerollback.h>
@@ -211,7 +212,6 @@ public:
*/
QQmlError verifyNoICCycle();
- using PropertyCacheOrError = std::variant<QQmlPropertyCache::Ptr, QQmlError>;
/*!
\internal
Tries to creates a property cache for the CompiledObject based on the cache of a base type.
@@ -219,10 +219,24 @@ public:
\note: Aliases are added separately in appendAliasToPropertyCache
*/
- [[nodiscard]] PropertyCacheOrError
+ [[nodiscard]] q23::expected<QQmlPropertyCache::Ptr, QQmlError>
tryDeriveCacheFrom(const CompiledObject *obj, const QQmlPropertyCache::ConstPtr &baseTypeCache,
QByteArray dynamicClassName = QByteArray()) const;
+ /*!
+ \internal
+ Tries to create a QQmlPropertyData based on IR of a property.
+ This involves property type resolution and property flags creation
+
+ \a notifyIndex MUST be in the signal index range (see QObjectPrivate::signalIndex()).
+ This is different from QMetaMethod::methodIndex()
+
+ return error in case of failed type resolution
+ */
+ [[nodiscard]] q23::expected<QQmlPropertyData, QQmlError>
+ tryCreateQQmlPropertyData(const QV4::CompiledData::Property &propertyIR, int coreIndex,
+ int notifyIndex) const;
+
protected:
enum class VMEMetaObjectIsRequired { Maybe, Always };
@@ -237,6 +251,23 @@ protected:
QString stringAt(int index) const { return objectContainer->stringAt(index); }
+private:
+ struct PropertyType
+ {
+ QMetaType metaType;
+ QTypeRevision revision = QTypeRevision::zero();
+ QV4::CompiledData::CommonType commonType = QV4::CompiledData::CommonType::Invalid;
+ };
+
+ [[nodiscard]] q23::expected<PropertyType, QQmlError>
+ tryResolvePropertyType(const QV4::CompiledData::Property &propertyIR) const;
+
+ // can be made a free function
+ [[nodiscard]] static QQmlPropertyData::Flags
+ propertyDataFlags(const QV4::CompiledData::Property &propertyIR,
+ const PropertyType &resolvedPropertyType);
+
+protected:
QQmlTypeLoader *const typeLoader;
const ObjectContainer * const objectContainer;
const QQmlImports * const imports;
@@ -335,9 +366,10 @@ QQmlPropertyCacheCreator<ObjectContainer>::buildMetaObjectsIncrementally()
}
template <typename ObjectContainer>
-auto QQmlPropertyCacheCreator<ObjectContainer>::tryDeriveCacheFrom(
+q23::expected<QQmlPropertyCache::Ptr, QQmlError>
+QQmlPropertyCacheCreator<ObjectContainer>::tryDeriveCacheFrom(
const CompiledObject *obj, const QQmlPropertyCache::ConstPtr &baseTypeCache,
- QByteArray dynamicClassName) const -> PropertyCacheOrError
+ QByteArray dynamicClassName) const
{
QQmlPropertyCache::Ptr cache = baseTypeCache->copyAndReserve(
obj->propertyCount() + obj->aliasCount(),
@@ -345,7 +377,6 @@ auto QQmlPropertyCacheCreator<ObjectContainer>::tryDeriveCacheFrom(
obj->signalCount() + obj->propertyCount() + obj->aliasCount(), obj->enumCount());
cache->_dynamicClassName = std::move(dynamicClassName);
- int effectivePropertyIndex = cache->propertyIndexCacheStart;
int effectiveMethodIndex = cache->methodIndexCacheStart;
// For property change signal override detection.
@@ -446,10 +477,10 @@ auto QQmlPropertyCacheCreator<ObjectContainer>::tryDeriveCacheFrom(
QString customTypeName;
QMetaType type = metaTypeForParameter(param->type, &customTypeName);
if (!type.isValid())
- return qQmlCompileError(
+ return q23::make_unexpected(qQmlCompileError(
s->location,
QQmlPropertyCacheCreatorBase::tr("Invalid signal parameter type: %1")
- .arg(customTypeName));
+ .arg(customTypeName)));
paramTypes[i] = type;
}
@@ -472,7 +503,7 @@ auto QQmlPropertyCacheCreator<ObjectContainer>::tryDeriveCacheFrom(
"invalid override of property change signal or superclass signal"));
switch (*it) {
case AllowOverride::No:
- return message;
+ return q23::make_unexpected(std::move(message));
case AllowOverride::Yes:
message.setUrl(objectContainer->url());
qCWarning(invalidOverride).noquote() << message.toString();
@@ -501,7 +532,7 @@ auto QQmlPropertyCacheCreator<ObjectContainer>::tryDeriveCacheFrom(
"invalid override of property change signal or superclass signal"));
switch (*it) {
case AllowOverride::No:
- return message;
+ return q23::make_unexpected(std::move(message));
case AllowOverride::Yes:
message.setUrl(objectContainer->url());
qCWarning(invalidOverride).noquote() << message.toString();
@@ -533,76 +564,54 @@ auto QQmlPropertyCacheCreator<ObjectContainer>::tryDeriveCacheFrom(
}
// Dynamic properties
- int effectiveSignalIndex = cache->signalHandlerIndexCacheStart;
- int propertyIdx = 0;
+ int propertyIndex = cache->propertyIndexCacheStart;
+ int notifyIndex = cache->signalHandlerIndexCacheStart;
+ int objPropertyIdx = 0;
p = obj->propertiesBegin();
pend = obj->propertiesEnd();
- for (; p != pend; ++p, ++propertyIdx) {
- QMetaType propertyType;
- QTypeRevision propertyTypeVersion = QTypeRevision::zero();
- QQmlPropertyData::Flags propertyFlags;
-
- const QV4::CompiledData::CommonType type = p->commonType();
-
- if (p->isList())
- propertyFlags.setType(QQmlPropertyData::Flags::QListType);
- else if (type == QV4::CompiledData::CommonType::Var)
- propertyFlags.setType(QQmlPropertyData::Flags::VarPropertyType);
-
- if (type != QV4::CompiledData::CommonType::Invalid) {
- propertyType =
- p->isList() ? listTypeForPropertyType(type) : metaTypeForPropertyType(type);
- } else {
- Q_ASSERT(!p->isCommonType());
-
- QQmlType qmltype;
- bool selfReference = false;
- QList<QQmlError> errors;
- const QString typeName = stringAt(p->commonTypeOrTypeNameIndex());
- if (!imports->resolveType(typeLoader, typeName, &qmltype, nullptr, nullptr, &errors,
- QQmlType::AnyRegistrationType, &selfReference)) {
- Q_ASSERT(!errors.isEmpty());
- return qQmlCompileError(p->location, typeName + u' ' + errors[0].description());
- }
-
- Q_ASSERT(qmltype.isValid());
- if (p->isList())
- propertyType = qmltype.qListTypeId();
- else
- propertyType = qmltype.typeId();
-
- if (!qmltype.isComposite() && !qmltype.isInlineComponentType())
- propertyTypeVersion = qmltype.version();
-
- if (p->isList())
- propertyFlags.setType(QQmlPropertyData::Flags::QListType);
- else if (propertyType.flags().testFlag(QMetaType::PointerToQObject))
- propertyFlags.setType(QQmlPropertyData::Flags::QObjectDerivedType);
+ for (; p != pend; ++p, ++objPropertyIdx, propertyIndex++, notifyIndex++) {
+ auto propertyDataOrError = tryCreateQQmlPropertyData(*p, propertyIndex, notifyIndex);
+ if (!propertyDataOrError.has_value()) {
+ return q23::make_unexpected(propertyDataOrError.error());
}
- if (!p->isReadOnly() && !propertyType.flags().testFlag(QMetaType::IsQmlList))
- propertyFlags.setIsWritable(true);
- if (p->isFinal())
- propertyFlags.setIsFinal(true);
-
QString propertyName = stringAt(p->nameIndex());
- if (!obj->hasAliasAsDefaultProperty() && propertyIdx == obj->indexOfDefaultPropertyOrAlias)
+ if (!obj->hasAliasAsDefaultProperty()
+ && objPropertyIdx == obj->indexOfDefaultPropertyOrAlias)
cache->_defaultPropertyName = propertyName;
- const auto overrideResult =
- cache->appendProperty(propertyName, propertyFlags, effectivePropertyIndex++,
- propertyType, propertyTypeVersion, effectiveSignalIndex);
- if (overrideResult == QQmlPropertyCache::OverrideResult::InvalidOverride) {
- return qQmlCompileError(
+
+ if (cache->doAppendPropertyData(propertyName, std::move(propertyDataOrError).value())
+ == QQmlPropertyCache::OverrideResult::InvalidOverride) {
+ return q23::make_unexpected(qQmlCompileError(
p->location,
// TODO improve error message
- QQmlPropertyCacheCreatorBase::tr("Cannot override FINAL property"));
+ QQmlPropertyCacheCreatorBase::tr("Cannot override FINAL property")));
}
- effectiveSignalIndex++;
}
return cache;
};
template <typename ObjectContainer>
+q23::expected<QQmlPropertyData, QQmlError>
+QQmlPropertyCacheCreator<ObjectContainer>::tryCreateQQmlPropertyData(
+ const QV4::CompiledData::Property &propertyIR, int coreIndex, int notifyIndex) const
+{
+ const auto propertyTypeOrError = tryResolvePropertyType(propertyIR);
+ if (!propertyTypeOrError.has_value()) {
+ return q23::make_unexpected(propertyTypeOrError.error());
+ }
+ const auto propertyType = propertyTypeOrError.value();
+
+ QQmlPropertyData propertyData;
+ propertyData.setPropType(propertyType.metaType);
+ propertyData.setCoreIndex(coreIndex);
+ propertyData.setNotifyIndex(notifyIndex);
+ propertyData.setFlags(QQmlPropertyCacheCreator::propertyDataFlags(propertyIR, propertyType));
+ propertyData.setTypeVersion(propertyType.revision);
+ return propertyData;
+}
+
+template <typename ObjectContainer>
inline QQmlError QQmlPropertyCacheCreator<ObjectContainer>::buildMetaObjectRecursively(int objectIndex, const QQmlBindingInstantiationContext &context, VMEMetaObjectIsRequired isVMERequired)
{
auto isAddressable = [](const QUrl &url) {
@@ -776,10 +785,10 @@ inline QQmlError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObject(
const auto cacheOrError =
tryDeriveCacheFrom(obj, baseTypeCache, dynamicClassName(objectIndex, baseTypeCache));
- if (std::holds_alternative<QQmlError>(cacheOrError)) {
- return std::get<QQmlError>(cacheOrError);
+ if (!cacheOrError.has_value()) {
+ return cacheOrError.error();
}
- auto cache = std::get<QQmlPropertyCache::Ptr>(cacheOrError);
+ auto &cache = cacheOrError.value();
using ListPropertyAssignBehavior = typename ObjectContainer::ListPropertyAssignBehavior;
switch (objectContainer->listPropertyAssignBehavior()) {
@@ -839,6 +848,72 @@ inline QMetaType QQmlPropertyCacheCreator<ObjectContainer>::metaTypeForParameter
return param.isList() ? qmltype.qListTypeId() : qmltype.typeId();
}
+template <typename ObjectContainer>
+inline auto QQmlPropertyCacheCreator<ObjectContainer>::tryResolvePropertyType(
+ const QV4::CompiledData::Property &propertyIR) const
+ -> q23::expected<PropertyType, QQmlError>
+{
+ PropertyType propertyType;
+ propertyType.commonType = propertyIR.commonType();
+
+ if (propertyType.commonType != QV4::CompiledData::CommonType::Invalid) {
+ // common type
+ propertyType.metaType = propertyIR.isList()
+ ? listTypeForPropertyType(propertyType.commonType)
+ : metaTypeForPropertyType(propertyType.commonType);
+ return propertyType;
+ }
+
+ // needs to be resolved
+ // can be extracted and passed to tryResolvePropertyType as a function object to simplify
+ // dependency injection (imports / typeLoader)
+ Q_ASSERT(!propertyIR.isCommonType());
+ QQmlType qmltype;
+ bool selfReference = false;
+ QList<QQmlError> errors;
+ const QString typeName = stringAt(propertyIR.commonTypeOrTypeNameIndex());
+ if (!imports->resolveType(typeLoader, typeName, &qmltype, nullptr, nullptr, &errors,
+ QQmlType::AnyRegistrationType, &selfReference)) {
+ Q_ASSERT(!errors.isEmpty());
+ return q23::make_unexpected(
+ qQmlCompileError(propertyIR.location, typeName + u' ' + errors[0].description()));
+ }
+
+ Q_ASSERT(qmltype.isValid());
+
+ propertyType.metaType = propertyIR.isList() ? qmltype.qListTypeId() : qmltype.typeId();
+
+ if (!qmltype.isComposite() && !qmltype.isInlineComponentType())
+ propertyType.revision = qmltype.version();
+
+ return propertyType;
+}
+
+template <typename ObjectContainer>
+inline QQmlPropertyData::Flags QQmlPropertyCacheCreator<ObjectContainer>::propertyDataFlags(
+ const QV4::CompiledData::Property &propertyIR, const PropertyType &resolvedPropertyType)
+{
+ QQmlPropertyData::Flags flags;
+
+ // set type flag
+ if (propertyIR.isList()) {
+ flags.setType(QQmlPropertyData::Flags::QListType);
+ } else if (resolvedPropertyType.commonType == QV4::CompiledData::CommonType::Var) {
+ flags.setType(QQmlPropertyData::Flags::VarPropertyType);
+ } else if (resolvedPropertyType.metaType.flags().testFlag(QMetaType::PointerToQObject)) {
+ flags.setType(QQmlPropertyData::Flags::QObjectDerivedType);
+ }
+
+ // set attributes
+ if (!propertyIR.isReadOnly()
+ && !resolvedPropertyType.metaType.flags().testFlag(QMetaType::IsQmlList))
+ flags.setIsWritable(true);
+ if (propertyIR.isFinal())
+ flags.setIsFinal(true);
+
+ return flags;
+}
+
template <typename ObjectContainer, typename CompiledObject>
int objectForId(const ObjectContainer *objectContainer, const CompiledObject &component, int id)
{