diff options
author | Michal Klocek <michal.klocek@qt.io> | 2020-07-28 16:13:00 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2020-08-14 15:17:01 +0200 |
commit | 8cd7292c2b30565a2d498a146436fc8b897ac975 (patch) | |
tree | ac4bb90c959aec35626d6017ed84c09956acd6db /tests/manual | |
parent | a80964df897baba4280c1f68d4832f1ea493acfa (diff) |
Fix removed calls to insertMulti
Use QMultiMap, QMulitHash instead.
Change-Id: I0782aa189a4465619757cb8204189bda888d641a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/candlesticktester/customtablemodel.cpp | 2 | ||||
-rw-r--r-- | tests/manual/candlesticktester/customtablemodel.h | 2 | ||||
-rw-r--r-- | tests/manual/chartdesigner/engine.cpp | 4 | ||||
-rw-r--r-- | tests/manual/chartdesigner/mainwindow.cpp | 4 | ||||
-rw-r--r-- | tests/manual/chartviewer/window.cpp | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/tests/manual/candlesticktester/customtablemodel.cpp b/tests/manual/candlesticktester/customtablemodel.cpp index 0466e39c..fdb7745d 100644 --- a/tests/manual/candlesticktester/customtablemodel.cpp +++ b/tests/manual/candlesticktester/customtablemodel.cpp @@ -151,7 +151,7 @@ void CustomTableModel::clearRows() void CustomTableModel::addMapping(QString color, QRect area) { - m_mapping.insertMulti(color, area); + m_mapping.insert(color, area); } void CustomTableModel::clearMapping() diff --git a/tests/manual/candlesticktester/customtablemodel.h b/tests/manual/candlesticktester/customtablemodel.h index fe332f1a..ebff4d53 100644 --- a/tests/manual/candlesticktester/customtablemodel.h +++ b/tests/manual/candlesticktester/customtablemodel.h @@ -67,7 +67,7 @@ public: private: QStringList m_categories; QList<QList<qreal> *> m_data; - QHash<QString, QRect> m_mapping; + QMultiHash<QString, QRect> m_mapping; }; #endif // CUSTOMTABLEMODEL_H diff --git a/tests/manual/chartdesigner/engine.cpp b/tests/manual/chartdesigner/engine.cpp index 2fd664c8..6433db5b 100644 --- a/tests/manual/chartdesigner/engine.cpp +++ b/tests/manual/chartdesigner/engine.cpp @@ -75,10 +75,10 @@ QList<QAbstractSeries*> Engine::addSeries(QAbstractSeries::SeriesType type) { const QModelIndexList& list = m_selection->selectedIndexes(); - QMap<int, QModelIndex> columns; + QMultiMap<int, QModelIndex> columns; foreach (const QModelIndex& index, list) { - columns.insertMulti(index.column(), index); + columns.insert(index.column(), index); } QList<int> keys = columns.uniqueKeys(); diff --git a/tests/manual/chartdesigner/mainwindow.cpp b/tests/manual/chartdesigner/mainwindow.cpp index 04f3a07f..d4fe38ed 100644 --- a/tests/manual/chartdesigner/mainwindow.cpp +++ b/tests/manual/chartdesigner/mainwindow.cpp @@ -241,10 +241,10 @@ void MainWindow::updateUI() QItemSelectionModel* selection = m_table->selectionModel(); const QModelIndexList& list = selection->selectedIndexes(); - QMap<int, QModelIndex> columns; + QMultiMap<int, QModelIndex> columns; foreach (const QModelIndex& index, list) { - columns.insertMulti(index.column(), index); + columns.insert(index.column(), index); } QList<int> keys = columns.uniqueKeys(); diff --git a/tests/manual/chartviewer/window.cpp b/tests/manual/chartviewer/window.cpp index d9214493..da90a2b3 100644 --- a/tests/manual/chartviewer/window.cpp +++ b/tests/manual/chartviewer/window.cpp @@ -255,7 +255,7 @@ QComboBox *Window::createTempleteBox() QMultiMap<QString, Chart *> categoryMap; foreach (Chart *chart, list) - categoryMap.insertMulti(chart->category(), chart); + categoryMap.insert(chart->category(), chart); foreach (const QString &category, categoryMap.uniqueKeys()) templateComboBox->addItem(category, category); @@ -552,7 +552,7 @@ QMenu *Window::createMenu() QMenu *result = new QMenu(this); foreach (Chart *chart, list) - categoryMap.insertMulti(chart->category(), chart); + categoryMap.insert(chart->category(), chart); foreach (const QString &category, categoryMap.uniqueKeys()) { QMenu *menu(0); |