summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/componentmodel.cpp
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2021-12-31 11:32:41 +0200
committerKatja Marttila <katja.marttila@qt.io>2022-01-05 14:24:50 +0200
commitb33e027fdbe0e29dac3094d8fef5b69ca02faff7 (patch)
tree9ae8a75ee1518cb1059c92d0ccbc21fab3fc0f36 /src/libs/installer/componentmodel.cpp
parent7fb43b6c8ed8031f72ce4a8ddc52bce1202ceebb (diff)
Replace obsoleted functions
qSort is obsoleted and std::sort should be used instead. Also QHash insertMulti is obsoleted and QMultiHash should be used instead. Change-Id: Ie4a44355d25d44943a4eeefc2842b4af3e126101 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs/installer/componentmodel.cpp')
-rw-r--r--src/libs/installer/componentmodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index 3862f8dc5..dcecf74ce 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -559,10 +559,10 @@ static Qt::CheckState verifyPartiallyChecked(Component *component)
QSet<QModelIndex> ComponentModel::updateCheckedState(const ComponentSet &components, Qt::CheckState state)
{
// get all parent nodes for the components we're going to update
- QMap<QString, Component *> sortedNodesMap;
+ QMultiMap<QString, Component *> sortedNodesMap;
foreach (Component *component, components) {
while (component && !sortedNodesMap.values(component->treeName()).contains(component)) {
- sortedNodesMap.insertMulti(component->treeName(), component);
+ sortedNodesMap.insert(component->treeName(), component);
component = component->parentComponent();
}
}