GUI: Renamed private variable LangCodeRole

This commit is contained in:
Daniel Marjamäki 2018-06-18 14:19:14 +02:00
parent bae36bddd2
commit d6b976fd21
2 changed files with 3 additions and 3 deletions

View File

@ -105,7 +105,7 @@ void SettingsDialog::initTranslationsList()
foreach (TranslationInfo translation, translations) {
QListWidgetItem *item = new QListWidgetItem;
item->setText(translation.mName);
item->setData(LangCodeRole, QVariant(translation.mCode));
item->setData(mLangCodeRole, QVariant(translation.mCode));
mUI.mListLanguages->addItem(item);
if (translation.mCode == current || translation.mCode == current.mid(0, 2))
mUI.mListLanguages->setCurrentItem(item);
@ -172,7 +172,7 @@ void SettingsDialog::saveSettingValues() const
const QListWidgetItem *currentLang = mUI.mListLanguages->currentItem();
if (currentLang) {
const QString langcode = currentLang->data(LangCodeRole).toString();
const QString langcode = currentLang->data(mLangCodeRole).toString();
settings.setValue(SETTINGS_LANGUAGE, langcode);
}
}

View File

@ -211,7 +211,7 @@ protected:
*/
Ui::Settings mUI;
private:
static const int LangCodeRole = Qt::UserRole;
static const int mLangCodeRole = Qt::UserRole;
};
/// @}
#endif // SETTINGSDIALOG_H