aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmllistmodelworkeragent.cpp
diff options
context:
space:
mode:
authorFrank Meerkoetter <frank.meerkoetter@basyskom.com>2015-12-11 20:37:32 +0100
committerFrank Meerkoetter <frank.meerkoetter@basyskom.com>2015-12-15 05:11:29 +0000
commite77bf29218c9421d0d24c4a8954ebcea69ea81ed (patch)
treec07c2bf8c29c2d4ea632ed1aaf6e896746176742 /src/qml/types/qqmllistmodelworkeragent.cpp
parent40c725099afe809d825b864ca1ba20dd4d54da7c (diff)
Provide a proper constructor
Fixes coverity CID10755. A proper constructor enforces that the 'Sync' type is properly initialized. Change-Id: I8a4758e5bb1cfea09664961b3d32db5ddf0e4515 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/types/qqmllistmodelworkeragent.cpp')
-rw-r--r--src/qml/types/qqmllistmodelworkeragent.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qml/types/qqmllistmodelworkeragent.cpp b/src/qml/types/qqmllistmodelworkeragent.cpp
index 76aab248bc..bcf9cd94f7 100644
--- a/src/qml/types/qqmllistmodelworkeragent.cpp
+++ b/src/qml/types/qqmllistmodelworkeragent.cpp
@@ -161,9 +161,7 @@ void QQmlListModelWorkerAgent::move(int from, int to, int count)
void QQmlListModelWorkerAgent::sync()
{
- Sync *s = new Sync;
- s->data = data;
- s->list = m_copy;
+ Sync *s = new Sync(data, m_copy);
data.changes.clear();
mutex.lock();