2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2010-02-09 11:09:11 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2010-02-09 11:09:11 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2010-02-09 11:09:11 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2010-02-09 11:09:11 +01:00
|
|
|
**
|
2015-09-18 11:34:48 +02:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
2016-01-15 14:57:40 +01:00
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2010-12-17 16:01:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2010-02-09 11:09:11 +01:00
|
|
|
|
2013-03-12 11:49:56 +01:00
|
|
|
#include "settingspage.h"
|
2010-02-09 11:09:11 +01:00
|
|
|
#include "qmldesignerconstants.h"
|
|
|
|
|
#include "qmldesignerplugin.h"
|
2015-07-16 11:49:50 +02:00
|
|
|
#include "designersettings.h"
|
|
|
|
|
#include "puppetcreator.h"
|
|
|
|
|
|
2017-08-29 11:48:48 +02:00
|
|
|
#include <app/app_version.h>
|
|
|
|
|
|
2015-07-16 11:49:50 +02:00
|
|
|
#include <coreplugin/icore.h>
|
2010-02-09 11:09:11 +01:00
|
|
|
|
2011-09-20 16:06:03 +02:00
|
|
|
#include <qmljseditor/qmljseditorconstants.h>
|
2014-06-02 16:50:01 +02:00
|
|
|
#include <qmljstools/qmljstoolsconstants.h>
|
2011-09-20 16:06:03 +02:00
|
|
|
|
2018-03-14 14:45:13 +01:00
|
|
|
#include <utils/qtcassert.h>
|
|
|
|
|
|
2015-07-16 11:49:50 +02:00
|
|
|
#include <QLineEdit>
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QTextStream>
|
2015-07-16 11:49:50 +02:00
|
|
|
#include <QMessageBox>
|
2010-02-09 11:09:11 +01:00
|
|
|
|
|
|
|
|
using namespace QmlDesigner;
|
|
|
|
|
using namespace QmlDesigner::Internal;
|
|
|
|
|
|
2016-01-19 15:05:40 +01:00
|
|
|
namespace {
|
|
|
|
|
QStringList puppetModes()
|
|
|
|
|
{
|
|
|
|
|
static QStringList puppetModeList{QLatin1String(""), QLatin1String("all"),
|
|
|
|
|
QLatin1String("editormode"), QLatin1String("rendermode"), QLatin1String("previewmode")};
|
|
|
|
|
return puppetModeList;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-02-09 11:09:11 +01:00
|
|
|
SettingsPageWidget::SettingsPageWidget(QWidget *parent) :
|
|
|
|
|
QWidget(parent)
|
|
|
|
|
{
|
|
|
|
|
m_ui.setupUi(this);
|
2016-06-16 10:22:34 +02:00
|
|
|
|
2016-01-13 18:24:49 +01:00
|
|
|
connect(m_ui.designerEnableDebuggerCheckBox, &QCheckBox::toggled, [=](bool checked) {
|
|
|
|
|
if (checked && ! m_ui.designerShowDebuggerCheckBox->isChecked())
|
|
|
|
|
m_ui.designerShowDebuggerCheckBox->setChecked(true);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
connect(m_ui.resetFallbackPuppetPathButton, &QPushButton::clicked, [=]() {
|
|
|
|
|
m_ui.fallbackPuppetPathLineEdit->setPath(
|
|
|
|
|
PuppetCreator::defaultPuppetFallbackDirectory());
|
|
|
|
|
}
|
|
|
|
|
);
|
2018-03-14 14:45:13 +01:00
|
|
|
m_ui.fallbackPuppetPathLineEdit->lineEdit()->setPlaceholderText(PuppetCreator::defaultPuppetFallbackDirectory());
|
|
|
|
|
|
2016-01-13 18:24:49 +01:00
|
|
|
connect(m_ui.resetQmlPuppetBuildPathButton, &QPushButton::clicked, [=]() {
|
|
|
|
|
m_ui.puppetBuildPathLineEdit->setPath(
|
|
|
|
|
PuppetCreator::defaultPuppetToplevelBuildDirectory());
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
connect(m_ui.useDefaultPuppetRadioButton, &QRadioButton::toggled,
|
|
|
|
|
m_ui.fallbackPuppetPathLineEdit, &QLineEdit::setEnabled);
|
|
|
|
|
connect(m_ui.useQtRelatedPuppetRadioButton, &QRadioButton::toggled,
|
|
|
|
|
m_ui.puppetBuildPathLineEdit, &QLineEdit::setEnabled);
|
|
|
|
|
connect(m_ui.resetStyle, &QPushButton::clicked,
|
|
|
|
|
m_ui.styleLineEdit, &QLineEdit::clear);
|
2016-06-16 10:22:34 +02:00
|
|
|
connect(m_ui.controls2StyleComboBox, &QComboBox::currentTextChanged, [=]() {
|
|
|
|
|
m_ui.styleLineEdit->setText(m_ui.controls2StyleComboBox->currentText());
|
|
|
|
|
}
|
|
|
|
|
);
|
2016-01-19 15:05:40 +01:00
|
|
|
|
|
|
|
|
m_ui.forwardPuppetOutputComboBox->addItems(puppetModes());
|
|
|
|
|
m_ui.debugPuppetComboBox->addItems(puppetModes());
|
2010-02-09 11:09:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DesignerSettings SettingsPageWidget::settings() const
|
|
|
|
|
{
|
2016-01-13 14:48:40 +01:00
|
|
|
DesignerSettings settings = QmlDesignerPlugin::instance()->settings();
|
|
|
|
|
settings.insert(DesignerSettingsKey::ITEMSPACING, m_ui.spinItemSpacing->value());
|
|
|
|
|
settings.insert(DesignerSettingsKey::CONTAINERPADDING, m_ui.spinSnapMargin->value());
|
|
|
|
|
settings.insert(DesignerSettingsKey::CANVASWIDTH, m_ui.spinCanvasWidth->value());
|
|
|
|
|
settings.insert(DesignerSettingsKey::CANVASHEIGHT, m_ui.spinCanvasHeight->value());
|
2017-04-26 16:31:36 +02:00
|
|
|
settings.insert(DesignerSettingsKey::ROOT_ELEMENT_INIT_WIDTH, m_ui.spinRootItemInitWidth->value());
|
|
|
|
|
settings.insert(DesignerSettingsKey::ROOT_ELEMENT_INIT_HEIGHT, m_ui.spinRootItemInitHeight->value());
|
2016-01-13 14:48:40 +01:00
|
|
|
settings.insert(DesignerSettingsKey::WARNING_FOR_FEATURES_IN_DESIGNER,
|
2016-06-23 15:09:32 +02:00
|
|
|
m_ui.designerWarningsCheckBox->isChecked());
|
|
|
|
|
settings.insert(DesignerSettingsKey::WARNING_FOR_QML_FILES_INSTEAD_OF_UIQML_FILES,
|
|
|
|
|
m_ui.designerWarningsUiQmlfiles->isChecked());
|
|
|
|
|
|
2016-01-13 14:48:40 +01:00
|
|
|
settings.insert(DesignerSettingsKey::WARNING_FOR_DESIGNER_FEATURES_IN_EDITOR,
|
|
|
|
|
m_ui.designerWarningsInEditorCheckBox->isChecked());
|
|
|
|
|
settings.insert(DesignerSettingsKey::SHOW_DEBUGVIEW,
|
|
|
|
|
m_ui.designerShowDebuggerCheckBox->isChecked());
|
|
|
|
|
settings.insert(DesignerSettingsKey::ENABLE_DEBUGVIEW,
|
|
|
|
|
m_ui.designerEnableDebuggerCheckBox->isChecked());
|
2018-10-24 13:40:59 +02:00
|
|
|
settings.insert(DesignerSettingsKey::USE_DEFAULT_PUPPET,
|
2016-01-13 14:48:40 +01:00
|
|
|
m_ui.useDefaultPuppetRadioButton->isChecked());
|
2017-02-10 15:49:35 +01:00
|
|
|
|
|
|
|
|
int typeOfQsTrFunction;
|
|
|
|
|
|
|
|
|
|
if (m_ui.useQsTrFunctionRadioButton->isChecked())
|
|
|
|
|
typeOfQsTrFunction = 0;
|
|
|
|
|
else if (m_ui.useQsTrIdFunctionRadioButton->isChecked())
|
|
|
|
|
typeOfQsTrFunction = 1;
|
|
|
|
|
else if (m_ui.useQsTranslateFunctionRadioButton->isChecked())
|
|
|
|
|
typeOfQsTrFunction = 2;
|
|
|
|
|
else
|
|
|
|
|
typeOfQsTrFunction = 0;
|
|
|
|
|
|
|
|
|
|
settings.insert(DesignerSettingsKey::TYPE_OF_QSTR_FUNCTION, typeOfQsTrFunction);
|
2016-01-13 14:48:40 +01:00
|
|
|
settings.insert(DesignerSettingsKey::CONTROLS_STYLE, m_ui.styleLineEdit->text());
|
2016-01-19 15:05:40 +01:00
|
|
|
settings.insert(DesignerSettingsKey::FORWARD_PUPPET_OUTPUT,
|
|
|
|
|
m_ui.forwardPuppetOutputComboBox->currentText());
|
|
|
|
|
settings.insert(DesignerSettingsKey::DEBUG_PUPPET,
|
|
|
|
|
m_ui.debugPuppetComboBox->currentText());
|
2015-07-16 11:49:50 +02:00
|
|
|
|
2018-03-14 14:45:13 +01:00
|
|
|
QString newFallbackPuppetPath = m_ui.fallbackPuppetPathLineEdit->path();
|
|
|
|
|
QTC_CHECK(PuppetCreator::defaultPuppetFallbackDirectory() ==
|
|
|
|
|
m_ui.fallbackPuppetPathLineEdit->lineEdit()->placeholderText());
|
|
|
|
|
if (newFallbackPuppetPath.isEmpty())
|
|
|
|
|
newFallbackPuppetPath = m_ui.fallbackPuppetPathLineEdit->lineEdit()->placeholderText();
|
2018-10-15 06:21:33 +02:00
|
|
|
QString oldFallbackPuppetPath = PuppetCreator::qmlPuppetFallbackDirectory(settings);
|
|
|
|
|
|
|
|
|
|
if (oldFallbackPuppetPath != newFallbackPuppetPath && QFileInfo::exists(newFallbackPuppetPath)) {
|
|
|
|
|
if (newFallbackPuppetPath == PuppetCreator::defaultPuppetFallbackDirectory())
|
2018-10-24 13:40:59 +02:00
|
|
|
settings.insert(DesignerSettingsKey::PUPPET_DEFAULT_DIRECTORY, QString());
|
2018-10-15 06:21:33 +02:00
|
|
|
else
|
2018-10-24 13:40:59 +02:00
|
|
|
settings.insert(DesignerSettingsKey::PUPPET_DEFAULT_DIRECTORY, newFallbackPuppetPath);
|
2018-10-15 06:21:33 +02:00
|
|
|
} else if (!QFileInfo::exists(oldFallbackPuppetPath) || !QFileInfo::exists(newFallbackPuppetPath)){
|
2018-10-24 13:40:59 +02:00
|
|
|
settings.insert(DesignerSettingsKey::PUPPET_DEFAULT_DIRECTORY, QString());
|
2015-07-16 11:49:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!m_ui.puppetBuildPathLineEdit->path().isEmpty() &&
|
|
|
|
|
m_ui.puppetBuildPathLineEdit->path() != PuppetCreator::defaultPuppetToplevelBuildDirectory()) {
|
2016-01-13 14:48:40 +01:00
|
|
|
settings.insert(DesignerSettingsKey::PUPPET_TOPLEVEL_BUILD_DIRECTORY,
|
|
|
|
|
m_ui.puppetBuildPathLineEdit->path());
|
2015-07-16 11:49:50 +02:00
|
|
|
}
|
2016-01-19 13:59:33 +01:00
|
|
|
settings.insert(DesignerSettingsKey::ALWAYS_SAFE_IN_CRUMBLEBAR,
|
|
|
|
|
m_ui.alwaysSaveSubcomponentsCheckBox->isChecked());
|
2016-01-19 15:05:40 +01:00
|
|
|
settings.insert(DesignerSettingsKey::SHOW_PROPERTYEDITOR_WARNINGS,
|
|
|
|
|
m_ui.showPropertyEditorWarningsCheckBox->isChecked());
|
|
|
|
|
settings.insert(DesignerSettingsKey::ENABLE_MODEL_EXCEPTION_OUTPUT,
|
|
|
|
|
m_ui.showWarnExceptionsCheckBox->isChecked());
|
2019-03-06 17:11:59 +01:00
|
|
|
settings.insert(DesignerSettingsKey::ENABLE_TIMELINEVIEW,
|
|
|
|
|
m_ui.featureTimelineEditorCheckBox->isChecked());
|
2012-10-26 13:57:58 +02:00
|
|
|
|
2016-01-13 14:48:40 +01:00
|
|
|
return settings;
|
2010-02-09 11:09:11 +01:00
|
|
|
}
|
|
|
|
|
|
2016-01-13 14:48:40 +01:00
|
|
|
void SettingsPageWidget::setSettings(const DesignerSettings &settings)
|
2010-02-09 11:09:11 +01:00
|
|
|
{
|
2016-01-13 14:48:40 +01:00
|
|
|
m_ui.spinItemSpacing->setValue(settings.value(
|
|
|
|
|
DesignerSettingsKey::ITEMSPACING).toInt());
|
|
|
|
|
m_ui.spinSnapMargin->setValue(settings.value(
|
|
|
|
|
DesignerSettingsKey::CONTAINERPADDING).toInt());
|
|
|
|
|
m_ui.spinCanvasWidth->setValue(settings.value(
|
|
|
|
|
DesignerSettingsKey::CANVASWIDTH).toInt());
|
|
|
|
|
m_ui.spinCanvasHeight->setValue(settings.value(
|
|
|
|
|
DesignerSettingsKey::CANVASHEIGHT).toInt());
|
2017-04-26 16:31:36 +02:00
|
|
|
m_ui.spinRootItemInitWidth->setValue(settings.value(
|
|
|
|
|
DesignerSettingsKey::ROOT_ELEMENT_INIT_WIDTH).toInt());
|
|
|
|
|
m_ui.spinRootItemInitHeight->setValue(settings.value(
|
|
|
|
|
DesignerSettingsKey::ROOT_ELEMENT_INIT_HEIGHT).toInt());
|
2016-01-13 14:48:40 +01:00
|
|
|
m_ui.designerWarningsCheckBox->setChecked(settings.value(
|
|
|
|
|
DesignerSettingsKey::WARNING_FOR_FEATURES_IN_DESIGNER).toBool());
|
2016-06-23 15:09:32 +02:00
|
|
|
m_ui.designerWarningsUiQmlfiles->setChecked(settings.value(
|
|
|
|
|
DesignerSettingsKey::WARNING_FOR_QML_FILES_INSTEAD_OF_UIQML_FILES).toBool());
|
2016-01-13 14:48:40 +01:00
|
|
|
m_ui.designerWarningsInEditorCheckBox->setChecked(settings.value(
|
|
|
|
|
DesignerSettingsKey::WARNING_FOR_DESIGNER_FEATURES_IN_EDITOR).toBool());
|
|
|
|
|
m_ui.designerShowDebuggerCheckBox->setChecked(settings.value(
|
|
|
|
|
DesignerSettingsKey::SHOW_DEBUGVIEW).toBool());
|
|
|
|
|
m_ui.designerEnableDebuggerCheckBox->setChecked(settings.value(
|
|
|
|
|
DesignerSettingsKey::ENABLE_DEBUGVIEW).toBool());
|
|
|
|
|
m_ui.useDefaultPuppetRadioButton->setChecked(settings.value(
|
2018-10-24 13:40:59 +02:00
|
|
|
DesignerSettingsKey::USE_DEFAULT_PUPPET).toBool());
|
2016-01-13 14:48:40 +01:00
|
|
|
m_ui.useQtRelatedPuppetRadioButton->setChecked(!settings.value(
|
2018-10-24 13:40:59 +02:00
|
|
|
DesignerSettingsKey::USE_DEFAULT_PUPPET).toBool());
|
2016-01-13 14:48:40 +01:00
|
|
|
m_ui.useQsTrFunctionRadioButton->setChecked(settings.value(
|
2017-02-10 15:49:35 +01:00
|
|
|
DesignerSettingsKey::TYPE_OF_QSTR_FUNCTION).toInt() == 0);
|
|
|
|
|
m_ui.useQsTrIdFunctionRadioButton->setChecked(settings.value(
|
|
|
|
|
DesignerSettingsKey::TYPE_OF_QSTR_FUNCTION).toInt() == 1);
|
|
|
|
|
m_ui.useQsTranslateFunctionRadioButton->setChecked(settings.value(
|
|
|
|
|
DesignerSettingsKey::TYPE_OF_QSTR_FUNCTION).toInt() == 2);
|
2016-01-13 14:48:40 +01:00
|
|
|
m_ui.styleLineEdit->setText(settings.value(
|
|
|
|
|
DesignerSettingsKey::CONTROLS_STYLE).toString());
|
|
|
|
|
|
|
|
|
|
QString puppetFallbackDirectory = settings.value(
|
2018-10-24 13:40:59 +02:00
|
|
|
DesignerSettingsKey::PUPPET_DEFAULT_DIRECTORY,
|
2016-01-13 18:24:49 +01:00
|
|
|
PuppetCreator::defaultPuppetFallbackDirectory()).toString();
|
|
|
|
|
m_ui.fallbackPuppetPathLineEdit->setPath(puppetFallbackDirectory);
|
2015-07-16 11:49:50 +02:00
|
|
|
|
2016-01-13 14:48:40 +01:00
|
|
|
QString puppetToplevelBuildDirectory = settings.value(
|
2016-01-13 18:24:49 +01:00
|
|
|
DesignerSettingsKey::PUPPET_TOPLEVEL_BUILD_DIRECTORY,
|
|
|
|
|
PuppetCreator::defaultPuppetToplevelBuildDirectory()).toString();
|
|
|
|
|
m_ui.puppetBuildPathLineEdit->setPath(puppetToplevelBuildDirectory);
|
2016-01-19 15:05:40 +01:00
|
|
|
|
|
|
|
|
m_ui.forwardPuppetOutputComboBox->setCurrentText(settings.value(
|
|
|
|
|
DesignerSettingsKey::FORWARD_PUPPET_OUTPUT).toString());
|
|
|
|
|
m_ui.debugPuppetComboBox->setCurrentText(settings.value(
|
|
|
|
|
DesignerSettingsKey::DEBUG_PUPPET).toString());
|
|
|
|
|
|
2016-01-19 13:59:33 +01:00
|
|
|
m_ui.alwaysSaveSubcomponentsCheckBox->setChecked(settings.value(
|
|
|
|
|
DesignerSettingsKey::ALWAYS_SAFE_IN_CRUMBLEBAR).toBool());
|
2016-01-19 15:05:40 +01:00
|
|
|
m_ui.showPropertyEditorWarningsCheckBox->setChecked(settings.value(
|
|
|
|
|
DesignerSettingsKey::SHOW_PROPERTYEDITOR_WARNINGS).toBool());
|
|
|
|
|
m_ui.showWarnExceptionsCheckBox->setChecked(settings.value(
|
|
|
|
|
DesignerSettingsKey::ENABLE_MODEL_EXCEPTION_OUTPUT).toBool());
|
2016-06-16 10:22:34 +02:00
|
|
|
|
|
|
|
|
m_ui.controls2StyleComboBox->setCurrentText(m_ui.styleLineEdit->text());
|
2018-01-29 14:29:18 +01:00
|
|
|
|
2019-03-06 17:11:59 +01:00
|
|
|
m_ui.featureTimelineEditorCheckBox->setChecked(settings.value(
|
|
|
|
|
DesignerSettingsKey::ENABLE_TIMELINEVIEW).toBool());
|
|
|
|
|
|
2018-01-29 14:29:18 +01:00
|
|
|
if (settings.value(DesignerSettingsKey::STANDALONE_MODE).toBool()) {
|
|
|
|
|
m_ui.emulationGroupBox->hide();
|
|
|
|
|
m_ui.debugGroupBox->hide();
|
2019-03-06 17:11:59 +01:00
|
|
|
m_ui.featuresGroupBox->hide();
|
2018-01-29 14:29:18 +01:00
|
|
|
}
|
2013-03-14 16:02:19 +01:00
|
|
|
}
|
|
|
|
|
|
2010-02-09 11:09:11 +01:00
|
|
|
SettingsPage::SettingsPage() :
|
2018-07-24 23:56:45 +02:00
|
|
|
m_widget(nullptr)
|
2010-02-09 11:09:11 +01:00
|
|
|
{
|
2013-01-16 15:22:58 +01:00
|
|
|
setId("B.QmlDesigner");
|
2012-05-22 11:17:13 +02:00
|
|
|
setDisplayName(tr("Qt Quick Designer"));
|
2012-12-29 03:37:27 +01:00
|
|
|
setCategory(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML);
|
2010-03-26 17:34:10 +01:00
|
|
|
}
|
|
|
|
|
|
2013-12-03 14:17:03 +01:00
|
|
|
QWidget *SettingsPage::widget()
|
2010-02-09 11:09:11 +01:00
|
|
|
{
|
2013-12-03 14:17:03 +01:00
|
|
|
if (!m_widget) {
|
|
|
|
|
m_widget = new SettingsPageWidget;
|
|
|
|
|
m_widget->setSettings(QmlDesignerPlugin::instance()->settings());
|
|
|
|
|
}
|
2010-02-09 11:09:11 +01:00
|
|
|
return m_widget;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsPage::apply()
|
|
|
|
|
{
|
2010-12-02 18:28:16 +01:00
|
|
|
if (!m_widget) // page was never shown
|
|
|
|
|
return;
|
2015-07-16 11:49:50 +02:00
|
|
|
|
2016-01-13 14:48:40 +01:00
|
|
|
DesignerSettings currentSettings(QmlDesignerPlugin::instance()->settings());
|
|
|
|
|
DesignerSettings newSettings(m_widget->settings());
|
|
|
|
|
|
2016-01-13 18:24:49 +01:00
|
|
|
QList<QByteArray> restartNecessaryKeys;
|
2018-10-24 13:40:59 +02:00
|
|
|
restartNecessaryKeys << DesignerSettingsKey::PUPPET_DEFAULT_DIRECTORY
|
2016-01-19 15:05:40 +01:00
|
|
|
<< DesignerSettingsKey::PUPPET_TOPLEVEL_BUILD_DIRECTORY
|
|
|
|
|
<< DesignerSettingsKey::ENABLE_MODEL_EXCEPTION_OUTPUT
|
|
|
|
|
<< DesignerSettingsKey::PUPPET_KILL_TIMEOUT
|
|
|
|
|
<< DesignerSettingsKey::FORWARD_PUPPET_OUTPUT
|
|
|
|
|
<< DesignerSettingsKey::DEBUG_PUPPET
|
2019-03-06 17:11:59 +01:00
|
|
|
<< DesignerSettingsKey::ENABLE_MODEL_EXCEPTION_OUTPUT
|
|
|
|
|
<< DesignerSettingsKey::ENABLE_TIMELINEVIEW;
|
2016-01-13 18:24:49 +01:00
|
|
|
|
|
|
|
|
foreach (const QByteArray &key, restartNecessaryKeys) {
|
|
|
|
|
if (currentSettings.value(key) != newSettings.value(key)) {
|
|
|
|
|
QMessageBox::information(Core::ICore::mainWindow(), tr("Restart Required"),
|
2016-01-19 15:05:40 +01:00
|
|
|
tr("The made changes will take effect after a "
|
2017-08-29 11:48:48 +02:00
|
|
|
"restart of the QML Emulation layer or %1.")
|
|
|
|
|
.arg(Core::Constants::IDE_DISPLAY_NAME));
|
2016-01-13 18:24:49 +01:00
|
|
|
break;
|
|
|
|
|
}
|
2015-07-16 11:49:50 +02:00
|
|
|
}
|
|
|
|
|
|
2016-01-13 14:48:40 +01:00
|
|
|
QmlDesignerPlugin::instance()->setSettings(newSettings);
|
2010-02-09 11:09:11 +01:00
|
|
|
}
|
|
|
|
|
|
2013-12-03 14:17:03 +01:00
|
|
|
void SettingsPage::finish()
|
2010-02-09 11:09:11 +01:00
|
|
|
{
|
2013-12-03 14:17:03 +01:00
|
|
|
delete m_widget;
|
2010-02-09 11:09:11 +01:00
|
|
|
}
|