summaryrefslogtreecommitdiffstats
path: root/src/preferences
diff options
context:
space:
mode:
authorSwiftb0y <12380386+Swiftb0y@users.noreply.github.com>2021-04-18 20:39:08 +0200
committerSwiftb0y <12380386+Swiftb0y@users.noreply.github.com>2021-04-19 13:09:26 +0200
commitf1aa399eb67f0c8ece97af253fd2d1fbb60a0da0 (patch)
treeae3f8559ff0f7eda79f1cb86f77aa161731e7a17 /src/preferences
parentd989d73709e1ea188768352d3675cf20b0901c06 (diff)
ColorPaletteEditorModel: improve const-correctness
Diffstat (limited to 'src/preferences')
-rw-r--r--src/preferences/colorpaletteeditormodel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/preferences/colorpaletteeditormodel.cpp b/src/preferences/colorpaletteeditormodel.cpp
index f726639c9c..dfc01b3bf8 100644
--- a/src/preferences/colorpaletteeditormodel.cpp
+++ b/src/preferences/colorpaletteeditormodel.cpp
@@ -156,7 +156,7 @@ ColorPalette ColorPaletteEditorModel::getColorPalette(
for (int i = 0; i < rowCount(); i++) {
QStandardItem* pColorItem = item(i, 0);
- auto* pHotcueIndexItem = toHotcueIndexListItem(item(i, 1));
+ const auto* pHotcueIndexItem = toHotcueIndexListItem(item(i, 1));
if (!pHotcueIndexItem) {
continue;
}
@@ -165,10 +165,10 @@ ColorPalette ColorPaletteEditorModel::getColorPalette(
mixxx::RgbColor::fromQString(pColorItem->text());
if (color) {
- QList<int> hotcueIndexes = pHotcueIndexItem->getHotcueIndexList();
+ const QList<int> hotcueIndexes = pHotcueIndexItem->getHotcueIndexList();
colors << *color;
- for (int index : qAsConst(hotcueIndexes)) {
+ for (int index : hotcueIndexes) {
hotcueColorIndices.insert(index - 1, colors.size() - 1);
}
}
@@ -198,7 +198,7 @@ QVariant HotcueIndexListItem::data(int role) const {
void HotcueIndexListItem::setData(const QVariant& value, int role) {
switch (role) {
case Qt::EditRole: {
- QList<int> newHotcueIndicies = mixxx::parseRangeList(value.toString());
+ const QList<int> newHotcueIndicies = mixxx::parseRangeList(value.toString());
if (m_hotcueIndexList != newHotcueIndicies) {
m_hotcueIndexList = newHotcueIndicies;