aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels/qqmllistmodel.cpp
diff options
context:
space:
mode:
authorOliver Eftevaag <oliver.eftevaag@qt.io>2023-06-23 16:11:31 +0200
committerOliver Eftevaag <oliver.eftevaag@qt.io>2023-07-04 00:18:47 +0200
commit38373b81f37ccbf6ec66f43a70fe9622bbcc9593 (patch)
treeb66eeb48b0a982cb3fd19e18ca8468dec6c1700f /src/qmlmodels/qqmllistmodel.cpp
parentadd2620e2e710bd2f594973f22f048314d7060d8 (diff)
convert threading example to manual tests
The threading example used a LauncherList to combine two different but related examples into one. I've now separated both into a shared directory called 'threading' Pick-to: 6.6 Change-Id: Iee8898e61adcf69dc67157a1eff5f6ac019a39ca Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qmlmodels/qqmllistmodel.cpp')
-rw-r--r--src/qmlmodels/qqmllistmodel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qmlmodels/qqmllistmodel.cpp b/src/qmlmodels/qqmllistmodel.cpp
index 3bd180d072..e75fe22ebc 100644
--- a/src/qmlmodels/qqmllistmodel.cpp
+++ b/src/qmlmodels/qqmllistmodel.cpp
@@ -1981,7 +1981,7 @@ void DynamicRoleModelNodeMetaObject::propertyWritten(int index)
\section1 Using Threaded List Models with WorkerScript
- ListModel can be used together with WorkerScript access a list model
+ ListModel can be used together with WorkerScript to access a list model
from multiple threads. This is useful if list modifications are
synchronous and take some time: the list operations can be moved to a
different thread to avoid blocking of the main GUI thread.
@@ -1989,11 +1989,11 @@ void DynamicRoleModelNodeMetaObject::propertyWritten(int index)
Here is an example that uses WorkerScript to periodically append the
current time to a list model:
- \snippet ../../examples/quick/threading/threadedlistmodel/timedisplay.qml 0
+ \snippet qml/listmodel/WorkerScript.qml 0
The included file, \tt dataloader.mjs, looks like this:
- \snippet ../../examples/quick/threading/threadedlistmodel/dataloader.mjs 0
+ \snippet qml/listmodel/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,
@@ -2004,7 +2004,7 @@ void DynamicRoleModelNodeMetaObject::propertyWritten(int index)
You must call sync() or else the changes made to the list from that
thread will not be reflected in the list model in the main thread.
- \sa {qml-data-models}{Data Models}, {Qt Quick Examples - Threading}, {Qt QML}
+ \sa {qml-data-models}{Data Models}, {Qt QML}
*/
QQmlListModel::QQmlListModel(QObject *parent)