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 /examples/charts | |
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 'examples/charts')
4 files changed, 6 insertions, 6 deletions
diff --git a/examples/charts/barmodelmapper/customtablemodel.cpp b/examples/charts/barmodelmapper/customtablemodel.cpp index c722f089..b73a992b 100644 --- a/examples/charts/barmodelmapper/customtablemodel.cpp +++ b/examples/charts/barmodelmapper/customtablemodel.cpp @@ -116,5 +116,5 @@ Qt::ItemFlags CustomTableModel::flags(const QModelIndex &index) const void CustomTableModel::addMapping(QString color, QRect area) { - m_mapping.insertMulti(color, area); + m_mapping.insert(color, area); } diff --git a/examples/charts/barmodelmapper/customtablemodel.h b/examples/charts/barmodelmapper/customtablemodel.h index d8de5d24..1c14b93e 100644 --- a/examples/charts/barmodelmapper/customtablemodel.h +++ b/examples/charts/barmodelmapper/customtablemodel.h @@ -31,7 +31,7 @@ #define CUSTOMTABLEMODEL_H #include <QtCore/QAbstractTableModel> -#include <QtCore/QHash> +#include <QtCore/QMultiHash> #include <QtCore/QRect> class CustomTableModel : public QAbstractTableModel @@ -53,7 +53,7 @@ public: private: QList<QList<qreal> *> m_data; - QHash<QString, QRect> m_mapping; + QMultiHash<QString, QRect> m_mapping; int m_columnCount; int m_rowCount; }; diff --git a/examples/charts/modeldata/customtablemodel.cpp b/examples/charts/modeldata/customtablemodel.cpp index dfa92944..a428cbbd 100644 --- a/examples/charts/modeldata/customtablemodel.cpp +++ b/examples/charts/modeldata/customtablemodel.cpp @@ -113,5 +113,5 @@ Qt::ItemFlags CustomTableModel::flags(const QModelIndex &index) const void CustomTableModel::addMapping(QString color, QRect area) { - m_mapping.insertMulti(color, area); + m_mapping.insert(color, area); } diff --git a/examples/charts/modeldata/customtablemodel.h b/examples/charts/modeldata/customtablemodel.h index 66396204..2d52c79b 100644 --- a/examples/charts/modeldata/customtablemodel.h +++ b/examples/charts/modeldata/customtablemodel.h @@ -31,7 +31,7 @@ #define CUSTOMTABLEMODEL_H #include <QtCore/QAbstractTableModel> -#include <QtCore/QHash> +#include <QtCore/QMultiHash> #include <QtCore/QRect> class CustomTableModel : public QAbstractTableModel @@ -52,7 +52,7 @@ public: private: QList<QList<qreal> *> m_data; - QHash<QString, QRect> m_mapping; + QMultiHash<QString, QRect> m_mapping; int m_columnCount; int m_rowCount; }; |