Skip to content

Commit

Permalink
Use findDate(langPrefix) instead of for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
CoBC committed Aug 21, 2024
1 parent 9c6970f commit bc6cde4
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Client/qtTeamTalk/preferencesdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,15 +492,7 @@ void PreferencesDlg::initDisplayTab()
if (index < 0)
{
QString langPrefix = lang.section('_', 0, 0);
for (int i = 0; i < ui.languageBox->count(); ++i)
{
QString itemData = ui.languageBox->itemData(i).toString();
if (itemData == langPrefix)
{
index = i;
break;
}
}
index = ui.languageBox->findData(langPrefix);
}
if (index >= 0)
ui.languageBox->setCurrentIndex(index);
Expand Down

0 comments on commit bc6cde4

Please sign in to comment.