Improve code quality.
This commit is contained in:
parent
8d52157b41
commit
fe8a983ee3
|
@ -786,7 +786,7 @@ void MApplication::ParseCommandLine(const SocketConnection &connection, const QS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &arg : args)
|
for (const auto &arg : args)
|
||||||
{
|
{
|
||||||
NewMainWindow();
|
NewMainWindow();
|
||||||
if (not MainWindow()->LoadFile(arg))
|
if (not MainWindow()->LoadFile(arg))
|
||||||
|
|
|
@ -202,11 +202,11 @@ QStringList PreferencesConfigurationPage::Apply()
|
||||||
|
|
||||||
if (m_langChanged || m_systemChanged)
|
if (m_langChanged || m_systemChanged)
|
||||||
{
|
{
|
||||||
const QString locale = qvariant_cast<QString>(ui->langCombo->currentData());
|
const auto locale = qvariant_cast<QString>(ui->langCombo->currentData());
|
||||||
settings->SetLocale(locale);
|
settings->SetLocale(locale);
|
||||||
m_langChanged = false;
|
m_langChanged = false;
|
||||||
|
|
||||||
const QString code = qvariant_cast<QString>(ui->systemCombo->currentData());
|
const auto code = qvariant_cast<QString>(ui->systemCombo->currentData());
|
||||||
settings->SetPMSystemCode(code);
|
settings->SetPMSystemCode(code);
|
||||||
m_systemChanged = false;
|
m_systemChanged = false;
|
||||||
|
|
||||||
|
@ -214,14 +214,14 @@ QStringList PreferencesConfigurationPage::Apply()
|
||||||
}
|
}
|
||||||
if (m_unitChanged)
|
if (m_unitChanged)
|
||||||
{
|
{
|
||||||
const QString unit = qvariant_cast<QString>(ui->unitCombo->currentData());
|
const auto unit = qvariant_cast<QString>(ui->unitCombo->currentData());
|
||||||
settings->SetUnit(unit);
|
settings->SetUnit(unit);
|
||||||
m_unitChanged = false;
|
m_unitChanged = false;
|
||||||
preferences.append(tr("default unit"));
|
preferences.append(tr("default unit"));
|
||||||
}
|
}
|
||||||
if (m_labelLangChanged)
|
if (m_labelLangChanged)
|
||||||
{
|
{
|
||||||
const QString locale = qvariant_cast<QString>(ui->labelCombo->currentData());
|
const auto locale = qvariant_cast<QString>(ui->labelCombo->currentData());
|
||||||
settings->SetLabelLanguage(locale);
|
settings->SetLabelLanguage(locale);
|
||||||
m_labelLangChanged = false;
|
m_labelLangChanged = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user