Commit 5f0da502 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Adding UI option for fallback puppet.

This patch adds an option to configure the usage of qml(2)puppet.
By default the qml(2)puppet that comes together with Qt Creator is used.

Change-Id: Idada8457e81fa17d3290dc97ded303aab475a9f3
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent a0127da1
......@@ -44,7 +44,7 @@ DesignerSettings::DesignerSettings()
showDebugView(false),
enableDebugView(false),
alwaysSaveInCrumbleBar(false),
useOnlyFallbackPuppet(false)
useOnlyFallbackPuppet(true)
{}
void DesignerSettings::fromSettings(QSettings *settings)
......@@ -68,7 +68,7 @@ void DesignerSettings::fromSettings(QSettings *settings)
alwaysSaveInCrumbleBar = settings->value(
QLatin1String(QmlDesigner::Constants::QML_ALWAYS_SAFE_IN_CRUMBLEBAR), QVariant(false)).toBool();
useOnlyFallbackPuppet = settings->value(
QLatin1String(QmlDesigner::Constants::QML_USE_ONLY_FALLBACK_PUPPET), QVariant(false)).toBool();
QLatin1String(QmlDesigner::Constants::QML_USE_ONLY_FALLBACK_PUPPET), QVariant(true)).toBool();
settings->endGroup();
settings->endGroup();
......
......@@ -58,6 +58,7 @@ DesignerSettings SettingsPageWidget::settings() const
designerSettings.designerWarningsInEditor = m_ui.designerWarningsInEditorCheckBox->isChecked();
designerSettings.showDebugView = m_ui.designerShowDebuggerCheckBox->isChecked();
designerSettings.enableDebugView = m_ui.designerEnableDebuggerCheckBox->isChecked();
designerSettings.useOnlyFallbackPuppet = m_ui.designerDefaultPuppetCheckBox->isChecked();
return designerSettings;
}
......@@ -72,6 +73,7 @@ void SettingsPageWidget::setSettings(const DesignerSettings &designerSettings)
m_ui.designerWarningsInEditorCheckBox->setChecked(designerSettings.designerWarningsInEditor);
m_ui.designerShowDebuggerCheckBox->setChecked(designerSettings.showDebugView);
m_ui.designerEnableDebuggerCheckBox->setChecked(designerSettings.enableDebugView);
m_ui.designerDefaultPuppetCheckBox->setChecked(designerSettings.useOnlyFallbackPuppet);
}
void SettingsPageWidget::debugViewEnabledToggled(bool b)
......
......@@ -14,6 +14,19 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="6" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
......@@ -132,7 +145,7 @@
</layout>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Debugging</string>
......@@ -160,6 +173,28 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="title">
<string>Subcomponents</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>Always save when leaving subcomponent in bread crumb</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
......@@ -198,35 +233,19 @@
</layout>
</widget>
</item>
<item row="5" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>Subcomponents</string>
<string>QML Emulation Layer</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QCheckBox" name="checkBox">
<widget class="QCheckBox" name="designerDefaultPuppetCheckBox">
<property name="toolTip">
<string>If you do not select this checkbox, Qt Quick Designer uses the QML emulation layer (QML Puppet) built with the Qt configured in the build and run kit for the project.</string>
</property>
<property name="text">
<string>Always save when leaving subcomponent in bread crumb</string>
<string>Always use the QML emulation layer provided by Qt Creator</string>
</property>
</widget>
</item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment