MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / initTranslationsList

Method initTranslationsList

gui/settingsdialog.cpp:138–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void SettingsDialog::initTranslationsList()
139{
140 const QString current = mTranslator->getCurrentLanguage();
141 for (const TranslationInfo& translation : mTranslator->getTranslations()) {
142 auto *item = new QListWidgetItem;
143 item->setText(translation.mName);
144 item->setData(mLangCodeRole, QVariant(translation.mCode));
145 mUI->mListLanguages->addItem(item);
146 if (translation.mCode == current || translation.mCode == current.mid(0, 2))
147 mUI->mListLanguages->setCurrentItem(item);
148 }
149}
150
151Qt::CheckState SettingsDialog::boolToCheckState(bool yes)
152{

Callers

nothing calls this directly

Calls 1

addItemMethod · 0.80

Tested by

no test coverage detected