Skip to content

Commit

Permalink
Merge branch 'qt_fix' into 'master'
Browse files Browse the repository at this point in the history
Register language selector properly

Closes #7727

See merge request OpenMW/openmw!3666
  • Loading branch information
Capostrophic committed Dec 20, 2023
2 parents 36b61d7 + 8d06a99 commit 7074ea0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/wizard/installationpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void Wizard::InstallationPage::startInstallation()
mUnshield->setPath(path);

// Set the right codec to use for Morrowind.ini
QString language(field(QLatin1String("installation.language")).value<QComboBox*>()->currentData().toString());
QString language(field(QLatin1String("installation.language")).toString());

if (language == QLatin1String("Polish"))
{
Expand Down
2 changes: 1 addition & 1 deletion apps/wizard/languageselectionpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Wizard::LanguageSelectionPage::LanguageSelectionPage(QWidget* parent)

setupUi(this);

registerField(QLatin1String("installation.language"), languageComboBox);
registerField(QLatin1String("installation.language"), languageComboBox, "currentData", "currentDataChanged");
}

void Wizard::LanguageSelectionPage::initializePage()
Expand Down
4 changes: 2 additions & 2 deletions apps/wizard/mainwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ void Wizard::MainWizard::runSettingsImporter()
arguments.append(QLatin1String("--encoding"));

// Set encoding
QString language(field(QLatin1String("installation.language")).value<QComboBox*>()->currentData().toString());
QString language(field(QLatin1String("installation.language")).toString());
if (language == QLatin1String("Polish"))
{
arguments.append(QLatin1String("win1250"));
Expand Down Expand Up @@ -391,7 +391,7 @@ void Wizard::MainWizard::reject()
void Wizard::MainWizard::writeSettings()
{
// Write the encoding and language settings
QString language(field(QLatin1String("installation.language")).value<QComboBox*>()->currentData().toString());
QString language(field(QLatin1String("installation.language")).toString());
mLauncherSettings.setLanguage(language);

if (language == QLatin1String("Polish"))
Expand Down

0 comments on commit 7074ea0

Please sign in to comment.