diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2017-08-02 16:50:03 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2017-08-11 11:23:35 +0000 |
commit | 1f47b1a7ae58702dccc57a9ccbaa905441f4fecb (patch) | |
tree | 523666bcfdb7d92d53bf226976f328e9234f3504 /examples/charts/modeldata/customtablemodel.cpp | |
parent | 8847c9049daf91f5a9f71840cc499c1cbb2668ac (diff) |
Use range-for instead of foreach in examples
Task-number: QTBUG-60662
Change-Id: Ief9264e2b6670466bd74278dbd194a7be81d614f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'examples/charts/modeldata/customtablemodel.cpp')
-rw-r--r-- | examples/charts/modeldata/customtablemodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/charts/modeldata/customtablemodel.cpp b/examples/charts/modeldata/customtablemodel.cpp index 1bc607be..f86c7ed7 100644 --- a/examples/charts/modeldata/customtablemodel.cpp +++ b/examples/charts/modeldata/customtablemodel.cpp @@ -88,7 +88,7 @@ QVariant CustomTableModel::data(const QModelIndex &index, int role) const } else if (role == Qt::EditRole) { return m_data[index.row()]->at(index.column()); } else if (role == Qt::BackgroundRole) { - foreach (QRect rect, m_mapping) { + for (const QRect &rect : m_mapping) { if (rect.contains(index.column(), index.row())) return QColor(m_mapping.key(rect)); } |