forked from qt-creator/qt-creator
ModelingLib: Avoid using keys()
Instead, iterate directly over the container. Notably, sorting the result of keys() didn't play any significant role in this contexts. Change-Id: Iba82f3d503143ff0036509d0bf08c87747aeb40c Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -325,11 +325,9 @@ const Style *DefaultStyleEngine::applyObjectStyle(const Style *baseStyle, const
|
|||||||
}
|
}
|
||||||
int depth = 0;
|
int depth = 0;
|
||||||
if (!depths.isEmpty()) {
|
if (!depths.isEmpty()) {
|
||||||
const QList<int> keys = Utils::sorted(depths.keys());
|
for (auto it = depths.cbegin(); it != depths.cend(); ++it) {
|
||||||
for (int d : keys) {
|
if (it->m_elementType == elementType
|
||||||
DepthProperties properties = depths.value(d);
|
&& areStackingRoles(it->m_visualPrimaryRole, it->m_visualSecondaryRole,
|
||||||
if (properties.m_elementType == elementType
|
|
||||||
&& areStackingRoles(properties.m_visualPrimaryRole, properties.m_visualSecondaryRole,
|
|
||||||
styledVisualPrimaryRole, styledVisualSecondaryRole)) {
|
styledVisualPrimaryRole, styledVisualSecondaryRole)) {
|
||||||
++depth;
|
++depth;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user