mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
replace foreach macro with standard for each loop (#5485)
This commit is contained in:
parent
0cbad25385
commit
c148c8df7f
17 changed files with 31 additions and 31 deletions
|
|
@ -25,7 +25,7 @@ DlgEditUser::DlgEditUser(QWidget *parent, QString email, QString country, QStrin
|
|||
|
||||
QStringList countries = SettingsCache::instance().getCountries();
|
||||
int i = 1;
|
||||
foreach (QString c, countries) {
|
||||
for (const QString &c : countries) {
|
||||
countryEdit->addItem(QPixmap("theme:countries/" + c.toLower()), c);
|
||||
if (c == country)
|
||||
countryEdit->setCurrentIndex(i);
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ DlgRegister::DlgRegister(QWidget *parent) : QDialog(parent)
|
|||
countryEdit->addItem(QPixmap("theme:countries/zw"), "zw");
|
||||
countryEdit->setCurrentIndex(0);
|
||||
QStringList countries = SettingsCache::instance().getCountries();
|
||||
foreach (QString c, countries)
|
||||
for (const QString &c : countries)
|
||||
countryEdit->addItem(QPixmap("theme:countries/" + c.toLower()), c);
|
||||
|
||||
realnameLabel = new QLabel(tr("Real name:"));
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ void DlgViewLog::actCheckBoxChanged(bool abNewValue)
|
|||
void DlgViewLog::loadInitialLogBuffer()
|
||||
{
|
||||
QList<QString> logBuffer = Logger::getInstance().getLogBuffer();
|
||||
foreach (QString message, logBuffer)
|
||||
for (const QString &message : logBuffer)
|
||||
logEntryAdded(message);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue