diff options
author | Thomas Hartmann <Thomas.Hartmann@theqtcompany.com> | 2016-06-23 14:38:39 +0200 |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@theqtcompany.com> | 2016-06-23 12:57:44 +0000 |
commit | 78be4281c179052f1bb4a767ad5999e898b9b569 (patch) | |
tree | e14d4eac0508d0e00c4c76b9e03ba47bedb63612 /src | |
parent | e54b53cdaa1db79558e2e4b676cfc697c0375298 (diff) | |
download | qt-creator-78be4281c179052f1bb4a767ad5999e898b9b569.tar.gz |
QmlDesigner: Fixing DocumentWarningWidget
* Connect was missing
* The check box contains the opposite truth value of the setting.
Change-Id: If6ef86e0e1107ce537ee05ddf983131f65ee9e20
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/qmldesigner/documentwarningwidget.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/documentwarningwidget.cpp b/src/plugins/qmldesigner/documentwarningwidget.cpp index 438de04c2a..1567bb5c14 100644 --- a/src/plugins/qmldesigner/documentwarningwidget.cpp +++ b/src/plugins/qmldesigner/documentwarningwidget.cpp @@ -86,6 +86,8 @@ DocumentWarningWidget::DocumentWarningWidget(QWidget *parent) } }); + connect(m_ignoreWarningsCheckBox, &QCheckBox::toggled, this, &DocumentWarningWidget::ignoreCheckBoxToggled); + QVBoxLayout *layout = new QVBoxLayout(this); layout->addWidget(m_headerLabel); QVBoxLayout *messageLayout = new QVBoxLayout; @@ -117,7 +119,9 @@ void DocumentWarningWidget::refreshContent() m_continueButton->setText(tr("OK")); } else { m_headerLabel->setText(tr("This QML file contains features which are not supported by Qt Quick Designer at:")); + bool block = m_ignoreWarningsCheckBox->blockSignals(true); m_ignoreWarningsCheckBox->setChecked(!warningsEnabled()); + m_ignoreWarningsCheckBox->blockSignals(block); m_ignoreWarningsCheckBox->show(); m_continueButton->setText(tr("Ignore")); } @@ -184,7 +188,7 @@ bool DocumentWarningWidget::warningsEnabled() const void DocumentWarningWidget::ignoreCheckBoxToggled(bool b) { DesignerSettings settings = QmlDesignerPlugin::instance()->settings(); - settings.insert(DesignerSettingsKey::WARNING_FOR_FEATURES_IN_DESIGNER, b); + settings.insert(DesignerSettingsKey::WARNING_FOR_FEATURES_IN_DESIGNER, !b); QmlDesignerPlugin::instance()->setSettings(settings); } |