aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljscompiler_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2025-08-07 09:41:31 +0200
committerUlf Hermann <ulf.hermann@qt.io>2025-08-07 21:32:01 +0200
commit992ca8c4ef1ce4294e5df9c7ca5a73cb8db135f6 (patch)
tree2dbceca276fc8270bcd8990c055aa3884798a53d /src/qmlcompiler/qqmljscompiler_p.h
parent64a5549032eb323e0fc98a366fa9a99cdb1b907f (diff)
QmlCompiler: Pass QQmlJSSaveFunction as const ref
std::function is quite heavy-weight. Coverity-Id: 486648 Change-Id: Ia7c61a726bde9c9d6a02412b9aa5f683bb4d355a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljscompiler_p.h')
-rw-r--r--src/qmlcompiler/qqmljscompiler_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qmlcompiler/qqmljscompiler_p.h b/src/qmlcompiler/qqmljscompiler_p.h
index 51ad2fd4f5..47fa093068 100644
--- a/src/qmlcompiler/qqmljscompiler_p.h
+++ b/src/qmlcompiler/qqmljscompiler_p.h
@@ -116,21 +116,21 @@ using QQmlJSSaveFunction
const QQmlJSAotFunctionMap &, QString *)>;
bool Q_QMLCOMPILER_EXPORT qCompileQmlFile(const QString &inputFileName,
- QQmlJSSaveFunction saveFunction,
+ const QQmlJSSaveFunction &saveFunction,
QQmlJSAotCompiler *aotCompiler, QQmlJSCompileError *error,
bool storeSourceLocation = false,
QV4::Compiler::CodegenWarningInterface *wInterface =
QV4::Compiler::defaultCodegenWarningInterface(),
const QString *fileContents = nullptr);
bool Q_QMLCOMPILER_EXPORT qCompileQmlFile(QmlIR::Document &irDocument, const QString &inputFileName,
- QQmlJSSaveFunction saveFunction,
+ const QQmlJSSaveFunction &saveFunction,
QQmlJSAotCompiler *aotCompiler, QQmlJSCompileError *error,
bool storeSourceLocation = false,
QV4::Compiler::CodegenWarningInterface *wInterface =
QV4::Compiler::defaultCodegenWarningInterface(),
const QString *fileContents = nullptr);
bool Q_QMLCOMPILER_EXPORT qCompileJSFile(const QString &inputFileName, const QString &inputFileUrl,
- QQmlJSSaveFunction saveFunction,
+ const QQmlJSSaveFunction &saveFunction,
QQmlJSCompileError *error);
bool Q_QMLCOMPILER_EXPORT qSaveQmlJSUnitAsCpp(const QString &inputFileName,