diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-20 14:35:40 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-21 06:33:35 +0000 |
commit | ec022d0efec47e0e68cdec1c2e018ce864cc015c (patch) | |
tree | 4e98ce197a8a2e54c00638770485457656c80684 /src/qml/types/qqmllistmodel.cpp | |
parent | 4b73fc5bd2fd3df10f1e7499c82da08fbd417055 (diff) |
Port WorkerScript threading examples to use ES modules
This is the more modern way of doing things, so demonstrate that in our
examples and documentation.
Change-Id: Icd5316fbeeb00c34d470c8d871851945dc831244
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/types/qqmllistmodel.cpp')
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 282977e95e..7509a63777 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -1882,13 +1882,13 @@ void DynamicRoleModelNodeMetaObject::propertyWritten(int index) \snippet ../quick/threading/threadedlistmodel/timedisplay.qml 0 - The included file, \tt dataloader.js, looks like this: + The included file, \tt dataloader.mjs, looks like this: - \snippet ../quick/threading/threadedlistmodel/dataloader.js 0 + \snippet ../quick/threading/threadedlistmodel/dataloader.mjs 0 The timer in the main example sends messages to the worker script by calling \l WorkerScript::sendMessage(). When this message is received, - \c WorkerScript.onMessage() is invoked in \c dataloader.js, + \c WorkerScript.onMessage() is invoked in \c dataloader.mjs, which appends the current time to the list model. Note the call to sync() from the external thread. |