diff --git a/src/internet/groovesharkservice.cpp b/src/internet/groovesharkservice.cpp index 11722411d..f00fb096a 100644 --- a/src/internet/groovesharkservice.cpp +++ b/src/internet/groovesharkservice.cpp @@ -1125,7 +1125,7 @@ QList GroovesharkService::playlistitem_actions(const Song& song) { QAction* add_to_playlists = new QAction( IconLoader::Load("list-add"), tr("Add to Grooveshark playlists"), this); QMenu* playlists_menu = new QMenu(); - for (PlaylistInfo playlist_info : playlists_.values()) { + for (const PlaylistInfo& playlist_info : playlists_.values()) { QAction* add_to_playlist = new QAction(playlist_info.name_, this); add_to_playlist->setData(playlist_info.id_); playlists_menu->addAction(add_to_playlist); diff --git a/src/internet/savedradio.cpp b/src/internet/savedradio.cpp index b3bd08b78..64ce750ff 100644 --- a/src/internet/savedradio.cpp +++ b/src/internet/savedradio.cpp @@ -52,7 +52,9 @@ QStandardItem* SavedRadio::CreateRootItem() { void SavedRadio::LazyPopulate(QStandardItem* item) { switch (item->data(InternetModel::Role_Type).toInt()) { case InternetModel::Type_Service: - for (const Stream& stream : streams_) AddStreamToList(stream, root_); + for (const Stream& stream : streams_) { + AddStreamToList(stream, root_); + } break; diff --git a/src/ui/about.cpp b/src/ui/about.cpp index ca50978e7..35691c0ee 100644 --- a/src/ui/about.cpp +++ b/src/ui/about.cpp @@ -66,11 +66,15 @@ QString About::MakeHtml() const { "

%2

" "

%3:").arg(kUrl, kUrl, tr("Authors")); - for (const Person& person : authors_) ret += "
" + MakeHtml(person); + for (const Person& person : authors_) { + ret += "
" + MakeHtml(person); + } ret += QString("

%3:").arg(tr("Thanks to")); - for (const Person& person : thanks_to_) ret += "
" + MakeHtml(person); + for (const Person& person : thanks_to_) { + ret += "
" + MakeHtml(person); + } ret += QString( "
" + tr("All the translators") + " <" diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 3472d6818..4f72829a5 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -1639,7 +1639,7 @@ void MainWindow::PlaylistRightClick(const QPoint& global_pos, QMenu* add_to_another_menu = new QMenu(tr("Add to another playlist"), this); add_to_another_menu->setIcon(IconLoader::Load("list-add")); - for (PlaylistBackend::Playlist playlist : + for (const PlaylistBackend::Playlist& playlist : app_->playlist_backend()->GetAllOpenPlaylists()) { // don't add the current playlist if (playlist.id != app_->playlist_manager()->current()->id()) { diff --git a/src/widgets/freespacebar.cpp b/src/widgets/freespacebar.cpp index 763e56cbe..3067f722b 100644 --- a/src/widgets/freespacebar.cpp +++ b/src/widgets/freespacebar.cpp @@ -171,9 +171,10 @@ void FreeSpaceBar::DrawText(QPainter* p, const QRect& r) { labels << Label(TextForSize(free_text_, free_ - additional_), kColorBg2); int text_width = 0; - for (const Label& label : labels) + for (const Label& label : labels) { text_width += kLabelBoxSize + kLabelBoxPadding + kLabelSpacing + small_metrics.width(label.text); + } // Draw the text int x = (r.width() - text_width) / 2; diff --git a/src/widgets/stylehelper.cpp b/src/widgets/stylehelper.cpp index 25dc1f128..23ab4c697 100644 --- a/src/widgets/stylehelper.cpp +++ b/src/widgets/stylehelper.cpp @@ -108,7 +108,9 @@ void StyleHelper::setBaseColor(const QColor& newcolor) { if (color.isValid() && color != m_baseColor) { m_baseColor = color; - for (QWidget* w : QApplication::topLevelWidgets()) w->update(); + for (QWidget* w : QApplication::topLevelWidgets()) { + w->update(); + } } }