From 3480d8f9b0d89fc71796e16e8e563e45d0472d83 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 9 Feb 2018 10:35:39 +0100 Subject: QQmlDMCachedModelData: don't emit indexChanged twice The call to setIndex will both set the index and emit the signal. So don't do it again in the line after. Change-Id: Ice38d88b28bdaf391fcf12a4095c345b0135adb6 Reviewed-by: Shawn Rutledge --- src/qml/util/qqmladaptormodel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/qml/util') diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp index 104d655820..b59e11c5ec 100644 --- a/src/qml/util/qqmladaptormodel.cpp +++ b/src/qml/util/qqmladaptormodel.cpp @@ -330,9 +330,8 @@ bool QQmlDMCachedModelData::resolveIndex(const QQmlAdaptorModel &, int idx) { if (index == -1) { Q_ASSERT(idx >= 0); - setModelIndex(idx); cachedData.clear(); - emit modelIndexChanged(); + setModelIndex(idx); const QMetaObject *meta = metaObject(); const int propertyCount = type->propertyRoles.count(); for (int i = 0; i < propertyCount; ++i) -- cgit v1.2.3