From bf7cc1fa02cd0d04495b33f813feb1b6c4575e3c Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Wed, 20 Oct 2021 22:50:38 +0200 Subject: [PATCH] qmlpreview: enable language combobox Change-Id: Ie1719d620608b94360a3831d138e1be25bae7b10 Reviewed-by: Tim Jenssen --- .../qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp b/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp index 04ac06ce392..bcdd87b749a 100644 --- a/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp +++ b/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp @@ -217,14 +217,13 @@ SwitchLanguageComboboxAction::SwitchLanguageComboboxAction(QObject *parent) QWidget *SwitchLanguageComboboxAction::createWidget(QWidget *parent) { QPointer comboBox = new QComboBox(parent); - // FIXME: this combobox does not work at the moment - comboBox->setDisabled(true); const QString toolTip(tr("Switch the language used by preview.")); comboBox->setToolTip(toolTip); comboBox->addItem(tr("Default")); auto refreshComboBoxFunction = [this, comboBox, toolTip] (ProjectExplorer::Project *project) { if (comboBox && project) { + comboBox->setDisabled(true); QString errorMessage; auto locales = project->availableQmlPreviewTranslations(&errorMessage); if (!errorMessage.isEmpty()) @@ -234,6 +233,7 @@ QWidget *SwitchLanguageComboboxAction::createWidget(QWidget *parent) comboBox->addItem(tr("Default")); comboBox->addItems(locales); m_previousLocales = locales; + comboBox->setEnabled(true); } } };