ProjectExplorer: Aspectify Default Build Properties page

Change-Id: I3341ced5597f5b891b66da77e074fdf3217327ea
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2021-03-25 13:26:24 +01:00
parent 5dcf2ba0fa
commit d8770be95e
12 changed files with 181 additions and 250 deletions

View File

@@ -12,8 +12,7 @@ add_qtc_plugin(ProjectExplorer
appoutputpane.cpp appoutputpane.h
baseprojectwizarddialog.cpp baseprojectwizarddialog.h
buildaspects.cpp buildaspects.h
buildpropertiessettings.h
buildpropertiessettingspage.cpp buildpropertiessettingspage.h
buildpropertiessettings.cpp buildpropertiessettings.h
buildconfiguration.cpp buildconfiguration.h
buildinfo.cpp buildinfo.h
buildmanager.cpp buildmanager.h

View File

@@ -136,7 +136,7 @@ SeparateDebugInfoAspect::SeparateDebugInfoAspect()
{
setDisplayName(tr("Separate debug info:"));
setSettingsKey("SeparateDebugInfo");
setValue(ProjectExplorerPlugin::buildPropertiesSettings().separateDebugInfo);
setValue(ProjectExplorerPlugin::buildPropertiesSettings().separateDebugInfo.value());
}
} // namespace ProjectExplorer

View File

@@ -0,0 +1,128 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** 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
** 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.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** 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.
**
****************************************************************************/
#include "buildpropertiessettings.h"
#include "projectexplorerconstants.h"
#include <utils/layoutbuilder.h>
using namespace Utils;
namespace ProjectExplorer {
// Default directory:
const char DEFAULT_BUILD_DIRECTORY_TEMPLATE[]
= "../%{JS: Util.asciify(\"build-%{Project:Name}-%{Kit:FileSystemName}-%{BuildConfig:Name}\")}";
BuildPropertiesSettings::BuildTriStateAspect::BuildTriStateAspect()
: TriStateAspect{
BuildPropertiesSettings::tr("Enable"),
BuildPropertiesSettings::tr("Disable"),
BuildPropertiesSettings::tr("Use Project Default")}
{}
BuildPropertiesSettings::BuildPropertiesSettings()
{
setAutoApply(false);
registerAspect(&buildDirectoryTemplate);
buildDirectoryTemplate.setDisplayStyle(StringAspect::LineEditDisplay);
buildDirectoryTemplate.setSettingsKey("Directories/BuildDirectory.TemplateV2");
buildDirectoryTemplate.setDefaultValue(DEFAULT_BUILD_DIRECTORY_TEMPLATE);
buildDirectoryTemplate.setLabelText(tr("Default build directory:"));
buildDirectoryTemplate.setUseGlobalMacroExpander();
buildDirectoryTemplate.setUseResetButton();
registerAspect(&buildDirectoryTemplateOld); // TODO: Remove in ~4.16
buildDirectoryTemplateOld.setSettingsKey("Directories/BuildDirectory.Template");
buildDirectoryTemplateOld.setDefaultValue(DEFAULT_BUILD_DIRECTORY_TEMPLATE);
registerAspect(&separateDebugInfo);
separateDebugInfo.setSettingsKey("ProjectExplorer/Settings/SeparateDebugInfo");
separateDebugInfo.setLabelText(tr("Separate debug info:"));
registerAspect(&qmlDebugging);
qmlDebugging.setSettingsKey("ProjectExplorer/Settings/QmlDebugging");
qmlDebugging.setLabelText(tr("QML debugging:"));
registerAspect(&qtQuickCompiler);
qtQuickCompiler.setSettingsKey("ProjectExplorer/Settings/QtQuickCompiler");
qtQuickCompiler.setLabelText(tr("Use Qt Quick Compiler:"));
QObject::connect(&showQtSettings, &BoolAspect::valueChanged,
&qmlDebugging, &BaseAspect::setVisible);
QObject::connect(&showQtSettings, &BoolAspect::valueChanged,
&qtQuickCompiler, &BaseAspect::setVisible);
}
void BuildPropertiesSettings::readSettings(QSettings *s)
{
AspectContainer::readSettings(s);
// TODO: Remove in ~4.16
QString v = buildDirectoryTemplate.value();
if (v.isEmpty())
v = buildDirectoryTemplateOld.value();
if (v.isEmpty())
v = DEFAULT_BUILD_DIRECTORY_TEMPLATE;
v.replace("%{CurrentProject:Name}", "%{Project:Name}");
v.replace("%{CurrentKit:FileSystemName}", "%{Kit:FileSystemName}");
v.replace("%{CurrentBuild:Name}", "%{BuildConfig:Name}");
buildDirectoryTemplate.setValue(v);
}
QString BuildPropertiesSettings::defaultBuildDirectoryTemplate()
{
return QString(DEFAULT_BUILD_DIRECTORY_TEMPLATE);
}
namespace Internal {
BuildPropertiesSettingsPage::BuildPropertiesSettingsPage(BuildPropertiesSettings *settings)
{
setId("AB.ProjectExplorer.BuildPropertiesSettingsPage");
setDisplayName(BuildPropertiesSettings::tr("Default Build Properties"));
setCategory(ProjectExplorer::Constants::BUILD_AND_RUN_SETTINGS_CATEGORY);
setSettings(settings);
setLayouter([settings](QWidget *widget) {
BuildPropertiesSettings &s = *settings;
using namespace Layouting;
Column {
Form {
s.buildDirectoryTemplate,
s.separateDebugInfo,
s.qmlDebugging,
s.qtQuickCompiler
},
Stretch()
}.attachTo(widget);
});
}
} // Internal
} // ProjectExplorer

View File

@@ -27,19 +27,44 @@
#include "projectexplorer_export.h"
#include <coreplugin/dialogs/ioptionspage.h>
#include <utils/aspects.h>
namespace ProjectExplorer {
class PROJECTEXPLORER_EXPORT BuildPropertiesSettings
class PROJECTEXPLORER_EXPORT BuildPropertiesSettings : public Utils::AspectContainer
{
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::BuildPropertiesSettings)
public:
BuildPropertiesSettings();
class BuildTriStateAspect : public Utils::TriStateAspect
{
public:
QString buildDirectoryTemplate;
QString buildDirectoryTemplateOld; // TODO: Remove in ~4.16
Utils::TriState separateDebugInfo;
Utils::TriState qmlDebugging;
Utils::TriState qtQuickCompiler;
bool showQtSettings = false;
BuildTriStateAspect();
};
Utils::StringAspect buildDirectoryTemplate;
Utils::StringAspect buildDirectoryTemplateOld; // TODO: Remove in ~4.16
BuildTriStateAspect separateDebugInfo;
BuildTriStateAspect qmlDebugging;
BuildTriStateAspect qtQuickCompiler;
Utils::BoolAspect showQtSettings;
void readSettings(QSettings *settings);
QString defaultBuildDirectoryTemplate();
};
namespace Internal {
class BuildPropertiesSettingsPage final : public Core::IOptionsPage
{
public:
explicit BuildPropertiesSettingsPage(BuildPropertiesSettings *settings);
};
} // namespace Internal
} // namespace ProjectExplorer

View File

@@ -1,118 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** 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
** 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.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** 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.
**
****************************************************************************/
#include "buildpropertiessettingspage.h"
#include "buildpropertiessettings.h"
#include "projectexplorer.h"
#include <utils/variablechooser.h>
#include <QComboBox>
#include <QFormLayout>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QPushButton>
using namespace Utils;
namespace ProjectExplorer {
namespace Internal {
class BuildPropertiesSettingsWidget final : public Core::IOptionsPageWidget
{
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::BuildPropertiesSettingsPage)
public:
BuildPropertiesSettingsWidget()
{
const BuildPropertiesSettings &settings = ProjectExplorerPlugin::buildPropertiesSettings();
for (QComboBox * const comboBox : {&m_separateDebugInfoComboBox, &m_qmlDebuggingComboBox,
&m_qtQuickCompilerComboBox}) {
comboBox->addItem(tr("Enable"), TriState::Enabled.toVariant());
comboBox->addItem(tr("Disable"),TriState::Disabled.toVariant());
comboBox->addItem(tr("Use Project Default"), TriState::Default.toVariant());
}
m_separateDebugInfoComboBox.setCurrentIndex(m_separateDebugInfoComboBox
.findData(settings.separateDebugInfo.toVariant()));
m_qmlDebuggingComboBox.setCurrentIndex(m_qmlDebuggingComboBox
.findData(settings.qmlDebugging.toVariant()));
m_qtQuickCompilerComboBox.setCurrentIndex(m_qtQuickCompilerComboBox
.findData(settings.qtQuickCompiler.toVariant()));
const auto layout = new QFormLayout(this);
const auto buildDirLayout = new QHBoxLayout;
const auto resetButton = new QPushButton(tr("Reset"));
connect(resetButton, &QPushButton::clicked, this, [this] {
m_buildDirTemplateLineEdit.setText(
ProjectExplorerPlugin::defaultBuildDirectoryTemplate());
});
connect(&m_buildDirTemplateLineEdit, &QLineEdit::textChanged,
this, [this, resetButton] {
resetButton->setEnabled(m_buildDirTemplateLineEdit.text()
!= ProjectExplorerPlugin::defaultBuildDirectoryTemplate());
});
const auto chooser = new VariableChooser(this);
chooser->addSupportedWidget(&m_buildDirTemplateLineEdit);
m_buildDirTemplateLineEdit.setText(settings.buildDirectoryTemplate);
buildDirLayout->addWidget(&m_buildDirTemplateLineEdit);
buildDirLayout->addWidget(resetButton);
layout->addRow(tr("Default build directory:"), buildDirLayout);
layout->addRow(tr("Separate debug info:"), &m_separateDebugInfoComboBox);
if (settings.showQtSettings) {
layout->addRow(tr("QML debugging:"), &m_qmlDebuggingComboBox);
layout->addRow(tr("Use Qt Quick Compiler:"), &m_qtQuickCompilerComboBox);
} else {
m_qmlDebuggingComboBox.hide();
m_qtQuickCompilerComboBox.hide();
}
}
void apply() final
{
BuildPropertiesSettings s = ProjectExplorerPlugin::buildPropertiesSettings();
s.buildDirectoryTemplate = m_buildDirTemplateLineEdit.text();
s.separateDebugInfo = TriState::fromVariant(m_separateDebugInfoComboBox.currentData());
s.qmlDebugging = TriState::fromVariant(m_qmlDebuggingComboBox.currentData());
s.qtQuickCompiler = TriState::fromVariant(m_qtQuickCompilerComboBox.currentData());
ProjectExplorerPlugin::setBuildPropertiesSettings(s);
}
private:
QLineEdit m_buildDirTemplateLineEdit;
QComboBox m_separateDebugInfoComboBox;
QComboBox m_qmlDebuggingComboBox;
QComboBox m_qtQuickCompilerComboBox;
};
BuildPropertiesSettingsPage::BuildPropertiesSettingsPage()
{
setId("AB.ProjectExplorer.BuildPropertiesSettingsPage");
setDisplayName(BuildPropertiesSettingsWidget::tr("Default Build Properties"));
setCategory(Constants::BUILD_AND_RUN_SETTINGS_CATEGORY);
setWidgetCreator([] { return new BuildPropertiesSettingsWidget; });
}
} // namespace Internal
} // namespace ProjectExplorer

View File

@@ -1,40 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** 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
** 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.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** 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.
**
****************************************************************************/
#pragma once
#include <coreplugin/dialogs/ioptionspage.h>
namespace ProjectExplorer {
namespace Internal {
class BuildPropertiesSettingsPage final : public Core::IOptionsPage
{
public:
BuildPropertiesSettingsPage();
};
} // namespace Internal
} // namespace ProjectExplorer

View File

@@ -27,7 +27,6 @@
#include "appoutputpane.h"
#include "buildpropertiessettings.h"
#include "buildpropertiessettingspage.h"
#include "buildsteplist.h"
#include "buildsystem.h"
#include "compileoutputwindow.h"
@@ -256,10 +255,6 @@ const char RUNMENUCONTEXTMENU[] = "Project.RunMenu";
const char FOLDER_OPEN_LOCATIONS_CONTEXT_MENU[] = "Project.F.OpenLocation.CtxMenu";
const char PROJECT_OPEN_LOCATIONS_CONTEXT_MENU[] = "Project.P.OpenLocation.CtxMenu";
// Default directories:
const char DEFAULT_BUILD_DIRECTORY_TEMPLATE[] = "../%{JS: Util.asciify(\"build-%{Project:Name}-%{Kit:FileSystemName}-%{BuildConfig:Name}\")}";
const char DEFAULT_BUILD_DIRECTORY_TEMPLATE_KEY_OLD[] = "Directories/BuildDirectory.Template"; // TODO: Remove in ~4.16
const char DEFAULT_BUILD_DIRECTORY_TEMPLATE_KEY[] = "Directories/BuildDirectory.TemplateV2";
const char RECENTPROJECTS_FILE_NAMES_KEY[] = "ProjectExplorer/RecentProjects/FileNames";
const char RECENTPROJECTS_DISPLAY_NAMES_KEY[] = "ProjectExplorer/RecentProjects/DisplayNames";
@@ -284,10 +279,6 @@ const char ABORT_BUILD_ALL_ON_ERROR_SETTINGS_KEY[]
= "ProjectExplorer/Settings/AbortBuildAllOnError";
const char LOW_BUILD_PRIORITY_SETTINGS_KEY[] = "ProjectExplorer/Settings/LowBuildPriority";
const char SEPARATE_DEBUG_INFO_SETTINGS_KEY[] = "ProjectExplorer/Settings/SeparateDebugInfo";
const char QML_DEBUGGING_SETTINGS_KEY[] = "ProjectExplorer/Settings/QmlDebugging";
const char QT_QUICK_COMPILER_SETTINGS_KEY[] = "ProjectExplorer/Settings/QtQuickCompiler";
const char CUSTOM_PARSER_COUNT_KEY[] = "ProjectExplorer/Settings/CustomParserCount";
const char CUSTOM_PARSER_PREFIX_KEY[] = "ProjectExplorer/Settings/CustomParser";
@@ -642,7 +633,7 @@ public:
// Settings pages
ProjectExplorerSettingsPage m_projectExplorerSettingsPage;
BuildPropertiesSettingsPage m_buildPropertiesSettingsPage;
BuildPropertiesSettingsPage m_buildPropertiesSettingsPage{&m_buildPropertiesSettings};
AppOutputSettingsPage m_appOutputSettingsPage;
CompileOutputSettingsPage m_compileOutputSettingsPage;
DeviceSettingsPage m_deviceSettingsPage;
@@ -1583,33 +1574,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
= s->value(Constants::LOW_BUILD_PRIORITY_SETTINGS_KEY, defaultSettings.lowBuildPriority)
.toBool();
dd->m_buildPropertiesSettings.buildDirectoryTemplateOld
= s->value(Constants::DEFAULT_BUILD_DIRECTORY_TEMPLATE_KEY_OLD).toString();
dd->m_buildPropertiesSettings.buildDirectoryTemplate
= s->value(Constants::DEFAULT_BUILD_DIRECTORY_TEMPLATE_KEY).toString();
if (dd->m_buildPropertiesSettings.buildDirectoryTemplate.isEmpty()) {
dd->m_buildPropertiesSettings.buildDirectoryTemplate
= dd->m_buildPropertiesSettings.buildDirectoryTemplateOld;
}
if (dd->m_buildPropertiesSettings.buildDirectoryTemplate.isEmpty())
dd->m_buildPropertiesSettings.buildDirectoryTemplate = Constants::DEFAULT_BUILD_DIRECTORY_TEMPLATE;
// TODO: Remove in ~4.16
dd->m_buildPropertiesSettings.buildDirectoryTemplate.replace("%{CurrentProject:Name}",
"%{Project:Name}");
dd->m_buildPropertiesSettings.buildDirectoryTemplate.replace("%{CurrentKit:FileSystemName}",
"%{Kit:FileSystemName}");
dd->m_buildPropertiesSettings.buildDirectoryTemplate.replace("%{CurrentBuild:Name}",
"%{BuildConfig:Name}");
const auto loadTriStateValue = [&s](const QString &key) {
return TriState::fromVariant(s->value(key, TriState::Default.toVariant()));
};
dd->m_buildPropertiesSettings.separateDebugInfo
= loadTriStateValue(Constants::SEPARATE_DEBUG_INFO_SETTINGS_KEY);
dd->m_buildPropertiesSettings.qmlDebugging
= loadTriStateValue(Constants::QML_DEBUGGING_SETTINGS_KEY);
dd->m_buildPropertiesSettings.qtQuickCompiler
= loadTriStateValue(Constants::QT_QUICK_COMPILER_SETTINGS_KEY);
dd->m_buildPropertiesSettings.readSettings(s);
const int customParserCount = s->value(Constants::CUSTOM_PARSER_COUNT_KEY).toInt();
for (int i = 0; i < customParserCount; ++i) {
@@ -2249,27 +2214,7 @@ void ProjectExplorerPluginPrivate::savePersistentSettings()
int(dd->m_projectExplorerSettings.stopBeforeBuild),
int(defaultSettings.stopBeforeBuild));
// Store this in the Core directory scope for backward compatibility!
if (dd->m_buildPropertiesSettings.buildDirectoryTemplate
== Constants::DEFAULT_BUILD_DIRECTORY_TEMPLATE) {
s->remove(Constants::DEFAULT_BUILD_DIRECTORY_TEMPLATE_KEY_OLD);
s->remove(Constants::DEFAULT_BUILD_DIRECTORY_TEMPLATE_KEY);
} else {
s->setValue(Constants::DEFAULT_BUILD_DIRECTORY_TEMPLATE_KEY_OLD,
dd->m_buildPropertiesSettings.buildDirectoryTemplateOld);
s->setValue(Constants::DEFAULT_BUILD_DIRECTORY_TEMPLATE_KEY,
dd->m_buildPropertiesSettings.buildDirectoryTemplate);
}
s->setValueWithDefault(Constants::SEPARATE_DEBUG_INFO_SETTINGS_KEY,
dd->m_buildPropertiesSettings.separateDebugInfo.toVariant(),
TriState::Default.toVariant());
s->setValueWithDefault(Constants::QML_DEBUGGING_SETTINGS_KEY,
dd->m_buildPropertiesSettings.qmlDebugging.toVariant(),
TriState::Default.toVariant());
s->setValueWithDefault(Constants::QT_QUICK_COMPILER_SETTINGS_KEY,
dd->m_buildPropertiesSettings.qtQuickCompiler.toVariant(),
TriState::Default.toVariant());
dd->m_buildPropertiesSettings.writeSettings(s);
s->setValueWithDefault(Constants::CUSTOM_PARSER_COUNT_KEY, int(dd->m_customParsers.count()), 0);
for (int i = 0; i < dd->m_customParsers.count(); ++i) {
@@ -3965,19 +3910,14 @@ const AppOutputSettings &ProjectExplorerPlugin::appOutputSettings()
return dd->m_outputPane.settings();
}
void ProjectExplorerPlugin::setBuildPropertiesSettings(const BuildPropertiesSettings &settings)
{
dd->m_buildPropertiesSettings = settings;
}
const BuildPropertiesSettings &ProjectExplorerPlugin::buildPropertiesSettings()
BuildPropertiesSettings &ProjectExplorerPlugin::buildPropertiesSettings()
{
return dd->m_buildPropertiesSettings;
}
void ProjectExplorerPlugin::showQtSettings()
{
dd->m_buildPropertiesSettings.showQtSettings = true;
dd->m_buildPropertiesSettings.showQtSettings.setValue(true);
}
void ProjectExplorerPlugin::setCustomParsers(const QList<CustomParserSettings> &settings)
@@ -4050,12 +3990,12 @@ void ProjectExplorerPlugin::openOpenProjectDialog()
*/
QString ProjectExplorerPlugin::buildDirectoryTemplate()
{
return dd->m_buildPropertiesSettings.buildDirectoryTemplate;
return dd->m_buildPropertiesSettings.buildDirectoryTemplate.value();
}
QString ProjectExplorerPlugin::defaultBuildDirectoryTemplate()
{
return QString(Constants::DEFAULT_BUILD_DIRECTORY_TEMPLATE);
return dd->m_buildPropertiesSettings.defaultBuildDirectoryTemplate();
}
void ProjectExplorerPlugin::updateActions()

View File

@@ -137,8 +137,7 @@ public:
static void setAppOutputSettings(const Internal::AppOutputSettings &settings);
static const Internal::AppOutputSettings &appOutputSettings();
static void setBuildPropertiesSettings(const BuildPropertiesSettings &settings);
static const BuildPropertiesSettings &buildPropertiesSettings();
static BuildPropertiesSettings &buildPropertiesSettings();
static void showQtSettings();
static void setCustomParsers(const QList<CustomParserSettings> &settings);

View File

@@ -14,7 +14,6 @@ HEADERS += projectexplorer.h \
buildaspects.h \
buildinfo.h \
buildpropertiessettings.h \
buildpropertiessettingspage.h \
buildsystem.h \
buildtargettype.h \
clangparser.h \
@@ -173,7 +172,7 @@ SOURCES += projectexplorer.cpp \
addrunconfigdialog.cpp \
buildaspects.cpp \
buildinfo.cpp \
buildpropertiessettingspage.cpp \
buildpropertiessettings.cpp \
buildsystem.cpp \
clangparser.cpp \
customparserssettingspage.cpp \

View File

@@ -33,8 +33,7 @@ Project {
"buildinfo.cpp", "buildinfo.h",
"buildmanager.cpp", "buildmanager.h",
"buildprogress.cpp", "buildprogress.h",
"buildpropertiessettings.h",
"buildpropertiessettingspage.cpp", "buildpropertiessettingspage.h",
"buildpropertiessettings.cpp", "buildpropertiessettings.h",
"buildsettingspropertiespage.cpp", "buildsettingspropertiespage.h",
"buildstep.cpp", "buildstep.h",
"buildsteplist.cpp", "buildsteplist.h",

View File

@@ -89,9 +89,9 @@ public:
QmakeExtraBuildInfo::QmakeExtraBuildInfo()
{
const BuildPropertiesSettings &settings = ProjectExplorerPlugin::buildPropertiesSettings();
config.separateDebugInfo = settings.separateDebugInfo;
config.linkQmlDebuggingQQ2 = settings.qmlDebugging;
config.useQtQuickCompiler = settings.qtQuickCompiler;
config.separateDebugInfo = settings.separateDebugInfo.value();
config.linkQmlDebuggingQQ2 = settings.qmlDebugging.value();
config.useQtQuickCompiler = settings.qtQuickCompiler.value();
}
// --------------------------------------------------------------------
@@ -725,7 +725,7 @@ static BuildInfo createBuildInfo(const Kit *k, const FilePath &projectPath,
info.displayName = BuildConfiguration::tr("Release");
//: Non-ASCII characters in directory suffix may cause build issues.
suffix = QmakeBuildConfiguration::tr("Release", "Shadow build directory suffix");
if (settings.qtQuickCompiler == TriState::Default) {
if (settings.qtQuickCompiler.value() == TriState::Default) {
if (version && version->isQtQuickCompilerSupported())
extraInfo.config.useQtQuickCompiler = TriState::Enabled;
}
@@ -740,15 +740,15 @@ static BuildInfo createBuildInfo(const Kit *k, const FilePath &projectPath,
info.displayName = BuildConfiguration::tr("Profile");
//: Non-ASCII characters in directory suffix may cause build issues.
suffix = QmakeBuildConfiguration::tr("Profile", "Shadow build directory suffix");
if (settings.separateDebugInfo == TriState::Default)
if (settings.separateDebugInfo.value() == TriState::Default)
extraInfo.config.separateDebugInfo = TriState::Enabled;
if (settings.qtQuickCompiler == TriState::Default) {
if (settings.qtQuickCompiler.value() == TriState::Default) {
if (version && version->isQtQuickCompilerSupported())
extraInfo.config.useQtQuickCompiler = TriState::Enabled;
}
}
if (settings.qmlDebugging == TriState::Default) {
if (settings.qmlDebugging.value() == TriState::Default) {
if (version && version->isQmlDebuggingSupported())
extraInfo.config.linkQmlDebuggingQQ2 = TriState::Enabled;
}

View File

@@ -46,7 +46,7 @@ QmlDebuggingAspect::QmlDebuggingAspect()
{
setSettingsKey("EnableQmlDebugging");
setDisplayName(tr("QML debugging and profiling:"));
setValue(ProjectExplorerPlugin::buildPropertiesSettings().qmlDebugging);
setValue(ProjectExplorerPlugin::buildPropertiesSettings().qmlDebugging.value());
}
void QmlDebuggingAspect::addToLayout(LayoutBuilder &builder)
@@ -79,7 +79,7 @@ QtQuickCompilerAspect::QtQuickCompilerAspect()
{
setSettingsKey("QtQuickCompiler");
setDisplayName(tr("Qt Quick Compiler:"));
setValue(ProjectExplorerPlugin::buildPropertiesSettings().qtQuickCompiler);
setValue(ProjectExplorerPlugin::buildPropertiesSettings().qtQuickCompiler.value());
}
void QtQuickCompilerAspect::addToLayout(LayoutBuilder &builder)