diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-02-09 10:35:39 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-02-19 08:52:35 +0000 |
commit | 3480d8f9b0d89fc71796e16e8e563e45d0472d83 (patch) | |
tree | b424cbe128074c9de5a8d3908735bd46adce6851 /src/qml/util | |
parent | 55525e90764b4d5e8b737f1e6f6da5573928e472 (diff) |
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 <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/util')
-rw-r--r-- | src/qml/util/qqmladaptormodel.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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) |