diff --git a/panels/notification/bubble/bubblemodel.cpp b/panels/notification/bubble/bubblemodel.cpp index a79f50cec..26d7bb1f7 100644 --- a/panels/notification/bubble/bubblemodel.cpp +++ b/panels/notification/bubble/bubblemodel.cpp @@ -292,9 +292,10 @@ void BubbleModel::updateLevel() if (m_bubbles.isEmpty()) return; + int lastBubbleMaxIndex = BubbleMaxCount - 1; for (int i = 0; i < displayRowCount(); i++) { auto item = m_bubbles.at(i); - item->setLevel(i == LastBubbleMaxIndex ? 1 + overlayCount() : 1); + item->setLevel(i == lastBubbleMaxIndex ? 1 + overlayCount() : 1); } Q_EMIT dataChanged(index(0), index(displayRowCount() - 1), {BubbleModel::Level}); } diff --git a/panels/notification/bubble/bubblemodel.h b/panels/notification/bubble/bubblemodel.h index 12ebb391f..7645d6375 100644 --- a/panels/notification/bubble/bubblemodel.h +++ b/panels/notification/bubble/bubblemodel.h @@ -75,7 +75,6 @@ class BubbleModel : public QAbstractListModel QTimer *m_updateTimeTipTimer = nullptr; QList m_bubbles; int BubbleMaxCount{3}; - const int LastBubbleMaxIndex{BubbleMaxCount - 1}; const int OverlayMaxCount{2}; const int NoReplaceId{0}; QList m_delayBubbles;