UI: Use C++11 ranged-for instead of Q_FOREACH

Qt has been porting uses of Q_FOREACH/foreach to C++11's ranged-for.
Let's do the same.

References:
 * https://doc.qt.io/qt-6/foreach-keyword.html
 * https://codereview.qt-project.org/q/Q_FOREACH
This commit is contained in:
Ryan Foster
2023-10-04 17:32:44 -04:00
parent 0866688953
commit 3d05d681b7

View File

@@ -10882,9 +10882,11 @@ void OBSBasic::CheckDiskSpaceRemaining()
void OBSBasic::ResetStatsHotkey()
{
QList<OBSBasicStats *> list = findChildren<OBSBasicStats *>();
const QList<OBSBasicStats *> list = findChildren<OBSBasicStats *>();
foreach(OBSBasicStats * s, list) s->Reset();
for (OBSBasicStats *s : list) {
s->Reset();
}
}
void OBSBasic::on_OBSBasic_customContextMenuRequested(const QPoint &pos)