QmlDesigner: take the setting into account

This was a regression after the merge of error/warning
dialog.

Change-Id: I6bd9d2e81d118018a40745a98e67b1bff8f84d4f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
Tim Jenssen
2016-06-23 17:03:40 +02:00
parent e1f5fd202a
commit b9f699f957

View File

@@ -307,6 +307,12 @@ static bool warningsForQmlFilesInsteadOfUiQmlEnabled()
return settings.value(DesignerSettingsKey::WARNING_FOR_QML_FILES_INSTEAD_OF_UIQML_FILES).toBool(); return settings.value(DesignerSettingsKey::WARNING_FOR_QML_FILES_INSTEAD_OF_UIQML_FILES).toBool();
} }
static bool showWarningsForFeaturesInDesigner()
{
DesignerSettings settings = QmlDesignerPlugin::instance()->settings();
return settings.value(DesignerSettingsKey::WARNING_FOR_FEATURES_IN_DESIGNER).toBool();
}
void QmlDesignerPlugin::showDesigner() void QmlDesignerPlugin::showDesigner()
{ {
QTC_ASSERT(!d->documentManager.hasCurrentDesignDocument(), return); QTC_ASSERT(!d->documentManager.hasCurrentDesignDocument(), return);
@@ -425,7 +431,7 @@ void QmlDesignerPlugin::activateAutoSynchronization()
selectModelNodeUnderTextCursor(); selectModelNodeUnderTextCursor();
d->mainWidget->enableWidgets(); d->mainWidget->enableWidgets();
d->mainWidget->setupNavigatorHistory(currentDesignDocument()->textEditor()); d->mainWidget->setupNavigatorHistory(currentDesignDocument()->textEditor());
if (currentDesignDocument()->hasQmlParseWarnings()) if (showWarningsForFeaturesInDesigner() && currentDesignDocument()->hasQmlParseWarnings())
d->mainWidget->showWarningMessageBox(currentDesignDocument()->qmlParseWarnings()); d->mainWidget->showWarningMessageBox(currentDesignDocument()->qmlParseWarnings());
} else { } else {
d->mainWidget->disableWidgets(); d->mainWidget->disableWidgets();