GUI: Renamed private variable LangCodeRole
This commit is contained in:
parent
bae36bddd2
commit
d6b976fd21
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -211,7 +211,7 @@ protected:
|
|||
*/
|
||||
Ui::Settings mUI;
|
||||
private:
|
||||
static const int LangCodeRole = Qt::UserRole;
|
||||
static const int mLangCodeRole = Qt::UserRole;
|
||||
};
|
||||
/// @}
|
||||
#endif // SETTINGSDIALOG_H
|
||||
|
|
Loading…
Reference in New Issue