summaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-01-23 14:02:49 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2018-01-25 21:01:26 +0000
commitfff473c6387b0ab241a9b2e1f6e8843d777befb8 (patch)
treedef2e04fa3a7628f3755d473a34199ce5ed61329 /src/qml/jsruntime/qv4script_p.h
parentc8366096c41f44bd6f05dcd1aef4fd8372902c97 (diff)
Remove some duplicated code
We can centralize the code that initializes a V4::Script instance used in worker scripts as well as in the Qt.include() function. Change-Id: I9a83f990c694eb4d793ec5ac3b1c917d8c068d06 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4script_p.h')
-rw-r--r--src/qml/jsruntime/qv4script_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h
index 158d21c69d..e6b60105f7 100644
--- a/src/qml/jsruntime/qv4script_p.h
+++ b/src/qml/jsruntime/qv4script_p.h
@@ -99,6 +99,7 @@ struct Q_QML_EXPORT Script {
static QQmlRefPointer<CompiledData::CompilationUnit> precompile(QV4::Compiler::Module *module, Compiler::JSUnitGenerator *unitGenerator, const QUrl &url, const QString &source,
QList<QQmlError> *reportedErrors = 0, QQmlJS::Directives *directivesCollector = 0);
+ static Script *createFromFileOrCache(ExecutionEngine *engine, QmlContext *qmlContext, const QString &fileName, const QUrl &originalUrl);
static ReturnedValue evaluate(ExecutionEngine *engine, const QString &script, QmlContext *qmlContext);
};