diff --git a/src/app/tape/mapplication.cpp b/src/app/tape/mapplication.cpp index 6727c3d93..a365383e9 100644 --- a/src/app/tape/mapplication.cpp +++ b/src/app/tape/mapplication.cpp @@ -786,7 +786,7 @@ void MApplication::ParseCommandLine(const SocketConnection &connection, const QS } } - for (auto &arg : args) + for (const auto &arg : args) { NewMainWindow(); if (not MainWindow()->LoadFile(arg)) diff --git a/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp b/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp index d9f49515a..cbd1c2d47 100644 --- a/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp +++ b/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp @@ -202,11 +202,11 @@ QStringList PreferencesConfigurationPage::Apply() if (m_langChanged || m_systemChanged) { - const QString locale = qvariant_cast(ui->langCombo->currentData()); + const auto locale = qvariant_cast(ui->langCombo->currentData()); settings->SetLocale(locale); m_langChanged = false; - const QString code = qvariant_cast(ui->systemCombo->currentData()); + const auto code = qvariant_cast(ui->systemCombo->currentData()); settings->SetPMSystemCode(code); m_systemChanged = false; @@ -214,14 +214,14 @@ QStringList PreferencesConfigurationPage::Apply() } if (m_unitChanged) { - const QString unit = qvariant_cast(ui->unitCombo->currentData()); + const auto unit = qvariant_cast(ui->unitCombo->currentData()); settings->SetUnit(unit); m_unitChanged = false; preferences.append(tr("default unit")); } if (m_labelLangChanged) { - const QString locale = qvariant_cast(ui->labelCombo->currentData()); + const auto locale = qvariant_cast(ui->labelCombo->currentData()); settings->SetLabelLanguage(locale); m_labelLangChanged = false; }