Commit 96e877d3 authored by Ulf Hermann's avatar Ulf Hermann

Qml Inspector: Sort watch items if SortStructMembers is set

Change-Id: I94f3a9c24df52c1a5689ea6e73d81a526d12bdc4
Task-number: QTCREATORBUG-16645
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 30eab176
......@@ -663,6 +663,12 @@ void QmlInspectorAgent::addWatchData(const ObjectReference &obj,
propertiesWatch->appendChild(propertyWatch);
}
if (boolSetting(SortStructMembers)) {
propertiesWatch->sortChildren([](const WatchItem *item1, const WatchItem *item2) {
return item1->name < item2->name;
});
}
m_qmlEngine->watchHandler()->insertItem(propertiesWatch);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment