Add missing const
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
|
||||
#include <QtGlobal>
|
||||
@@ -202,7 +203,7 @@ void ContextAlbum::DrawSpinner(QPainter *p) {
|
||||
|
||||
void ContextAlbum::DrawPreviousCovers(QPainter *p) {
|
||||
|
||||
for (SharedPtr<PreviousCover> previous_cover : previous_covers_) {
|
||||
for (SharedPtr<PreviousCover> previous_cover : std::as_const(previous_covers_)) {
|
||||
DrawImage(p, previous_cover->pixmap, previous_cover->opacity);
|
||||
}
|
||||
|
||||
@@ -254,7 +255,7 @@ void ContextAlbum::ScaleCover() {
|
||||
|
||||
void ContextAlbum::ScalePreviousCovers() {
|
||||
|
||||
for (SharedPtr<PreviousCover> previous_cover : previous_covers_) {
|
||||
for (SharedPtr<PreviousCover> previous_cover : std::as_const(previous_covers_)) {
|
||||
QImage image = ImageUtils::ScaleImage(previous_cover->image, QSize(desired_height_, desired_height_), devicePixelRatioF(), true);
|
||||
if (image.isNull()) {
|
||||
previous_cover->pixmap = QPixmap();
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QObject>
|
||||
#include <QWidget>
|
||||
@@ -429,10 +431,10 @@ void ContextView::NoSong() {
|
||||
|
||||
void ContextView::UpdateFonts() {
|
||||
|
||||
for (QLabel *l : labels_play_all_) {
|
||||
for (QLabel *l : std::as_const(labels_play_all_)) {
|
||||
l->setFont(font_normal_);
|
||||
}
|
||||
for (QTextEdit *e : textedit_play_) {
|
||||
for (QTextEdit *e : std::as_const(textedit_play_)) {
|
||||
e->setFont(font_normal_);
|
||||
}
|
||||
|
||||
@@ -620,11 +622,11 @@ void ContextView::UpdateSong(const Song &song) {
|
||||
|
||||
void ContextView::ResetSong() {
|
||||
|
||||
for (QLabel *l : labels_play_data_) {
|
||||
for (QLabel *l : std::as_const(labels_play_data_)) {
|
||||
l->clear();
|
||||
}
|
||||
|
||||
for (QTextEdit *l : textedit_play_) {
|
||||
for (QTextEdit *l : std::as_const(textedit_play_)) {
|
||||
l->clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user