aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlworkerscript/qquickworkerscript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlworkerscript/qquickworkerscript.cpp')
-rw-r--r--src/qmlworkerscript/qquickworkerscript.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qmlworkerscript/qquickworkerscript.cpp b/src/qmlworkerscript/qquickworkerscript.cpp
index b4fd21fe7e..f892343b85 100644
--- a/src/qmlworkerscript/qquickworkerscript.cpp
+++ b/src/qmlworkerscript/qquickworkerscript.cpp
@@ -180,8 +180,8 @@ bool QQuickWorkerScriptEnginePrivate::event(QEvent *event)
} else if (event->type() == (QEvent::Type)WorkerRemoveEvent::WorkerRemove) {
QMutexLocker locker(&m_lock);
WorkerRemoveEvent *workerEvent = static_cast<WorkerRemoveEvent *>(event);
- auto itr = workers.find(workerEvent->workerId());
- if (itr != workers.end()) {
+ auto itr = workers.constFind(workerEvent->workerId());
+ if (itr != workers.cend()) {
if (itr->isT1())
delete itr->asT1();
workers.erase(itr);
@@ -417,8 +417,8 @@ int QQuickWorkerScriptEngine::registerWorkerScript(QQuickWorkerScript *owner)
void QQuickWorkerScriptEngine::removeWorkerScript(int id)
{
- const auto it = d->workers.find(id);
- if (it == d->workers.end())
+ const auto it = d->workers.constFind(id);
+ if (it == d->workers.cend())
return;
if (it->isT1()) {