Switch to for range loop

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2020-07-23 18:43:57 +02:00 committed by Kevin Ottens (Rebase PR Action)
parent 14ecf535f9
commit 983c02b6db

View file

@ -144,9 +144,8 @@ QIcon Theme::themeIcon(const QString &name, bool sysTray) const
return cached = QIcon::fromTheme(name);
}
QList<int> sizes;
sizes << 16 << 32 << 64 << 128 << 256;
foreach (int size, sizes) {
const auto sizes = QVector<int>{ 16, 32, 64, 128, 256 };
for (int size : sizes) {
QString svgName = QString::fromLatin1(":/client/theme/%1/%2.svg").arg(flavor).arg(name);
QSvgRenderer renderer(svgName);
QImage img(size, size, QImage::Format_ARGB32);