mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 15:32:48 -07:00
Don't use 'else' after return/break
This commit is contained in:
parent
78ab0e4ba9
commit
8a3f942385
15 changed files with 75 additions and 83 deletions
|
@ -1209,32 +1209,32 @@ int OptionsDialog::getMaxConnecs() const
|
|||
{
|
||||
if (!m_ui->checkMaxConnecs->isChecked())
|
||||
return -1;
|
||||
else
|
||||
return m_ui->spinMaxConnec->value();
|
||||
|
||||
return m_ui->spinMaxConnec->value();
|
||||
}
|
||||
|
||||
int OptionsDialog::getMaxConnecsPerTorrent() const
|
||||
{
|
||||
if (!m_ui->checkMaxConnecsPerTorrent->isChecked())
|
||||
return -1;
|
||||
else
|
||||
return m_ui->spinMaxConnecPerTorrent->value();
|
||||
|
||||
return m_ui->spinMaxConnecPerTorrent->value();
|
||||
}
|
||||
|
||||
int OptionsDialog::getMaxUploads() const
|
||||
{
|
||||
if (!m_ui->checkMaxUploads->isChecked())
|
||||
return -1;
|
||||
else
|
||||
return m_ui->spinMaxUploads->value();
|
||||
|
||||
return m_ui->spinMaxUploads->value();
|
||||
}
|
||||
|
||||
int OptionsDialog::getMaxUploadsPerTorrent() const
|
||||
{
|
||||
if (!m_ui->checkMaxUploadsPerTorrent->isChecked())
|
||||
return -1;
|
||||
else
|
||||
return m_ui->spinMaxUploadsPerTorrent->value();
|
||||
|
||||
return m_ui->spinMaxUploadsPerTorrent->value();
|
||||
}
|
||||
|
||||
void OptionsDialog::on_buttonBox_accepted()
|
||||
|
@ -1645,7 +1645,7 @@ QString OptionsDialog::languageToLocalizedString(const QLocale &locale)
|
|||
case QLocale::English: {
|
||||
if (locale.country() == QLocale::Australia)
|
||||
return QString::fromUtf8(C_LOCALE_ENGLISH_AUSTRALIA);
|
||||
else if (locale.country() == QLocale::UnitedKingdom)
|
||||
if (locale.country() == QLocale::UnitedKingdom)
|
||||
return QString::fromUtf8(C_LOCALE_ENGLISH_UNITEDKINGDOM);
|
||||
return QString::fromUtf8(C_LOCALE_ENGLISH);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue