From 7992144aca4a80cd9903a8ea7df0e210087871b1 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 23 Nov 2018 17:17:26 +0100 Subject: foreach fixes for RandomTab --- randomtab.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'randomtab.cpp') diff --git a/randomtab.cpp b/randomtab.cpp index 2907d86..0b5f8d9 100644 --- a/randomtab.cpp +++ b/randomtab.cpp @@ -183,12 +183,12 @@ void RandomTab::setupGui(){ void RandomTab::writeSettings(){ QSettings s; QStringList selGenres; - foreach(QComboBox *c, mGenreBoxes){ + for(QComboBox *c : mGenreBoxes){ selGenres << c->currentText(); } s.setValue("random/genres", selGenres); QStringList selActors; - foreach(QComboBox *c,mActorBoxes){ + for(QComboBox *c : mActorBoxes){ selActors << c->currentText(); } s.setValue("random/actors", selActors); @@ -288,7 +288,7 @@ void RandomTab::select(){ // Genres QStringList genreIds; - foreach(QComboBox *c, mGenreBoxes){ + for(QComboBox *c : mGenreBoxes){ int curId = c->currentData(IdRole).toInt(); if(curId != -1){ genreIds << QString::number(curId); @@ -307,7 +307,7 @@ void RandomTab::select(){ // Actors QStringList actorIds; - foreach(QComboBox *c, mActorBoxes){ + for(QComboBox *c : mActorBoxes){ int curId = c->currentData(IdRole).toInt(); if(curId != -1){ actorIds << QString::number(curId); @@ -439,7 +439,7 @@ void RandomTab::playSelected(){ logMessage(tr("Playing Selected")); QStringList files; QModelIndexList idxs = mFileView->selectionModel()->selectedRows(FullPath); - foreach(QModelIndex i, idxs){ + for(QModelIndex i : idxs){ QString fp = i.data().toString(); logMessage(QString(tr("Adding %1")).arg(fp)); files << fp; -- cgit v1.2.3-70-g09d2