forked from qt-creator/qt-creator
QmakeBuildConfiguration: Make use of SeparateDebugInfoAspect
Change-Id: I0dceadf2a6ef34187fa4107f3fc5d6831ecb7bfe Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -224,7 +224,7 @@ void MakeFileParse::parseAssignments(QList<QMakeAssignment> *assignments)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (foundForceDebugInfo && foundSeparateDebugInfo) {
|
if (foundForceDebugInfo && foundSeparateDebugInfo) {
|
||||||
m_config.separateDebugInfo = true;
|
m_config.separateDebugInfo = ProjectExplorer::SeparateDebugInfoAspect::Value::Enabled;
|
||||||
} else if (foundForceDebugInfo) {
|
} else if (foundForceDebugInfo) {
|
||||||
// Found only force_debug_info, so readd it
|
// Found only force_debug_info, so readd it
|
||||||
QMakeAssignment newQA;
|
QMakeAssignment newQA;
|
||||||
@@ -376,7 +376,8 @@ void MakeFileParse::parseCommandLine(const QString &command, const QString &proj
|
|||||||
qCDebug(logging()) << " OsType" << m_config.osType;
|
qCDebug(logging()) << " OsType" << m_config.osType;
|
||||||
qCDebug(logging()) << " LinkQmlDebuggingQQ2" << m_config.linkQmlDebuggingQQ2;
|
qCDebug(logging()) << " LinkQmlDebuggingQQ2" << m_config.linkQmlDebuggingQQ2;
|
||||||
qCDebug(logging()) << " Qt Quick Compiler" << m_config.useQtQuickCompiler;
|
qCDebug(logging()) << " Qt Quick Compiler" << m_config.useQtQuickCompiler;
|
||||||
qCDebug(logging()) << " Separate Debug Info" << m_config.separateDebugInfo;
|
qCDebug(logging()) << " Separate Debug Info"
|
||||||
|
<< (m_config.separateDebugInfo == ProjectExplorer::SeparateDebugInfoAspect::Value::Enabled);
|
||||||
|
|
||||||
// Create command line of all unfiltered arguments
|
// Create command line of all unfiltered arguments
|
||||||
foreach (const QMakeAssignment &qa, assignments)
|
foreach (const QMakeAssignment &qa, assignments)
|
||||||
@@ -523,6 +524,7 @@ void QmakeProjectManagerPlugin::testMakefileParser()
|
|||||||
QCOMPARE(qmsc.osType, static_cast<QMakeStepConfig::OsType>(osType));
|
QCOMPARE(qmsc.osType, static_cast<QMakeStepConfig::OsType>(osType));
|
||||||
QCOMPARE(qmsc.linkQmlDebuggingQQ2, linkQmlDebuggingQQ2);
|
QCOMPARE(qmsc.linkQmlDebuggingQQ2, linkQmlDebuggingQQ2);
|
||||||
QCOMPARE(qmsc.useQtQuickCompiler, useQtQuickCompiler);
|
QCOMPARE(qmsc.useQtQuickCompiler, useQtQuickCompiler);
|
||||||
QCOMPARE(qmsc.separateDebugInfo, separateDebugInfo);
|
QCOMPARE(qmsc.separateDebugInfo == ProjectExplorer::SeparateDebugInfoAspect::Value::Enabled,
|
||||||
|
separateDebugInfo);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -41,7 +41,6 @@
|
|||||||
#include <coreplugin/documentmanager.h>
|
#include <coreplugin/documentmanager.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
#include <projectexplorer/buildaspects.h>
|
|
||||||
#include <projectexplorer/buildinfo.h>
|
#include <projectexplorer/buildinfo.h>
|
||||||
#include <projectexplorer/buildmanager.h>
|
#include <projectexplorer/buildmanager.h>
|
||||||
#include <projectexplorer/buildsteplist.h>
|
#include <projectexplorer/buildsteplist.h>
|
||||||
@@ -130,6 +129,13 @@ QmakeBuildConfiguration::QmakeBuildConfiguration(Target *target, Core::Id id)
|
|||||||
connect(target, &Target::parsingFinished, this, &QmakeBuildConfiguration::updateProblemLabel);
|
connect(target, &Target::parsingFinished, this, &QmakeBuildConfiguration::updateProblemLabel);
|
||||||
connect(target, &Target::kitChanged, this, &QmakeBuildConfiguration::updateProblemLabel);
|
connect(target, &Target::kitChanged, this, &QmakeBuildConfiguration::updateProblemLabel);
|
||||||
|
|
||||||
|
const auto separateDebugInfoAspect = addAspect<SeparateDebugInfoAspect>();
|
||||||
|
connect(separateDebugInfoAspect, &SeparateDebugInfoAspect::changed, this, [this] {
|
||||||
|
emit separateDebugInfoChanged();
|
||||||
|
emit qmakeBuildConfigurationChanged();
|
||||||
|
qmakeBuildSystem()->scheduleUpdateAllNowOrLater();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmakeBuildConfiguration::initialize()
|
void QmakeBuildConfiguration::initialize()
|
||||||
@@ -157,7 +163,8 @@ void QmakeBuildConfiguration::initialize()
|
|||||||
if (!additionalArguments.isEmpty())
|
if (!additionalArguments.isEmpty())
|
||||||
qmakeStep->setUserArguments(additionalArguments);
|
qmakeStep->setUserArguments(additionalArguments);
|
||||||
qmakeStep->setLinkQmlDebuggingLibrary(qmakeExtra.config.linkQmlDebuggingQQ2);
|
qmakeStep->setLinkQmlDebuggingLibrary(qmakeExtra.config.linkQmlDebuggingQQ2);
|
||||||
qmakeStep->setSeparateDebugInfo(qmakeExtra.config.separateDebugInfo);
|
if (qmakeExtra.config.separateDebugInfo == SeparateDebugInfoAspect::Value::Enabled)
|
||||||
|
forceSeparateDebugInfo(true);
|
||||||
qmakeStep->setUseQtQuickCompiler(qmakeExtra.config.useQtQuickCompiler);
|
qmakeStep->setUseQtQuickCompiler(qmakeExtra.config.useQtQuickCompiler);
|
||||||
|
|
||||||
setQMakeBuildConfiguration(config);
|
setQMakeBuildConfiguration(config);
|
||||||
@@ -388,6 +395,18 @@ bool QmakeBuildConfiguration::isBuildDirAtSafeLocation() const
|
|||||||
buildDirectory().toString());
|
buildDirectory().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SeparateDebugInfoAspect::Value QmakeBuildConfiguration::separateDebugInfo() const
|
||||||
|
{
|
||||||
|
return aspect<SeparateDebugInfoAspect>()->setting();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QmakeBuildConfiguration::forceSeparateDebugInfo(bool sepDebugInfo)
|
||||||
|
{
|
||||||
|
aspect<SeparateDebugInfoAspect>()->setSetting(sepDebugInfo
|
||||||
|
? SeparateDebugInfoAspect::Value::Enabled
|
||||||
|
: SeparateDebugInfoAspect::Value::Disabled);
|
||||||
|
}
|
||||||
|
|
||||||
QStringList QmakeBuildConfiguration::configCommandLineArguments() const
|
QStringList QmakeBuildConfiguration::configCommandLineArguments() const
|
||||||
{
|
{
|
||||||
QStringList result;
|
QStringList result;
|
||||||
@@ -684,7 +703,7 @@ BuildInfo QmakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
|
|||||||
info.displayName = tr("Profile");
|
info.displayName = tr("Profile");
|
||||||
//: Non-ASCII characters in directory suffix may cause build issues.
|
//: Non-ASCII characters in directory suffix may cause build issues.
|
||||||
suffix = tr("Profile", "Shadow build directory suffix");
|
suffix = tr("Profile", "Shadow build directory suffix");
|
||||||
extraInfo.config.separateDebugInfo = true;
|
extraInfo.config.separateDebugInfo = SeparateDebugInfoAspect::Value::Enabled;
|
||||||
if (version && version->isQtQuickCompilerSupported())
|
if (version && version->isQtQuickCompilerSupported())
|
||||||
extraInfo.config.useQtQuickCompiler = true;
|
extraInfo.config.useQtQuickCompiler = true;
|
||||||
}
|
}
|
||||||
@@ -747,13 +766,11 @@ QList<BuildInfo> QmakeBuildConfigurationFactory::availableBuilds(const Kit *k, c
|
|||||||
|
|
||||||
BuildConfiguration::BuildType QmakeBuildConfiguration::buildType() const
|
BuildConfiguration::BuildType QmakeBuildConfiguration::buildType() const
|
||||||
{
|
{
|
||||||
QMakeStep *qs = qmakeStep();
|
|
||||||
if (qmakeBuildConfiguration() & BaseQtVersion::DebugBuild)
|
if (qmakeBuildConfiguration() & BaseQtVersion::DebugBuild)
|
||||||
return Debug;
|
return Debug;
|
||||||
else if (qs && qs->separateDebugInfo())
|
if (separateDebugInfo() == SeparateDebugInfoAspect::Value::Enabled)
|
||||||
return Profile;
|
return Profile;
|
||||||
else
|
return Release;
|
||||||
return Release;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmakeBuildConfiguration::addToEnvironment(Environment &env) const
|
void QmakeBuildConfiguration::addToEnvironment(Environment &env) const
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "qmakeprojectmanager_global.h"
|
#include "qmakeprojectmanager_global.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/buildaspects.h>
|
||||||
#include <projectexplorer/buildconfiguration.h>
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <qtsupport/baseqtversion.h>
|
#include <qtsupport/baseqtversion.h>
|
||||||
|
|
||||||
@@ -95,11 +96,16 @@ public:
|
|||||||
static bool isBuildDirAtSafeLocation(const QString &sourceDir, const QString &buildDir);
|
static bool isBuildDirAtSafeLocation(const QString &sourceDir, const QString &buildDir);
|
||||||
bool isBuildDirAtSafeLocation() const;
|
bool isBuildDirAtSafeLocation() const;
|
||||||
|
|
||||||
|
ProjectExplorer::SeparateDebugInfoAspect::Value separateDebugInfo() const;
|
||||||
|
void forceSeparateDebugInfo(bool sepDebugInfo);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
/// emitted for setQMakeBuildConfig, not emitted for Qt version changes, even
|
/// emitted for setQMakeBuildConfig, not emitted for Qt version changes, even
|
||||||
/// if those change the qmakebuildconfig
|
/// if those change the qmakebuildconfig
|
||||||
void qmakeBuildConfigurationChanged();
|
void qmakeBuildConfigurationChanged();
|
||||||
|
|
||||||
|
void separateDebugInfoChanged(); // TODO: Check whether really needed.
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
bool regenerateBuildFiles(ProjectExplorer::Node *node = nullptr) override;
|
bool regenerateBuildFiles(ProjectExplorer::Node *node = nullptr) override;
|
||||||
|
@@ -73,7 +73,6 @@ namespace {
|
|||||||
const char QMAKE_ARGUMENTS_KEY[] = "QtProjectManager.QMakeBuildStep.QMakeArguments";
|
const char QMAKE_ARGUMENTS_KEY[] = "QtProjectManager.QMakeBuildStep.QMakeArguments";
|
||||||
const char QMAKE_FORCED_KEY[] = "QtProjectManager.QMakeBuildStep.QMakeForced";
|
const char QMAKE_FORCED_KEY[] = "QtProjectManager.QMakeBuildStep.QMakeForced";
|
||||||
const char QMAKE_USE_QTQUICKCOMPILER[] = "QtProjectManager.QMakeBuildStep.UseQtQuickCompiler";
|
const char QMAKE_USE_QTQUICKCOMPILER[] = "QtProjectManager.QMakeBuildStep.UseQtQuickCompiler";
|
||||||
const char QMAKE_SEPARATEDEBUGINFO_KEY[] = "QtProjectManager.QMakeBuildStep.SeparateDebugInfo";
|
|
||||||
const char QMAKE_QMLDEBUGLIBAUTO_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto";
|
const char QMAKE_QMLDEBUGLIBAUTO_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto";
|
||||||
const char QMAKE_QMLDEBUGLIB_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary";
|
const char QMAKE_QMLDEBUGLIB_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary";
|
||||||
}
|
}
|
||||||
@@ -168,8 +167,7 @@ QMakeStepConfig QMakeStep::deducedArguments() const
|
|||||||
if (useQtQuickCompiler() && version)
|
if (useQtQuickCompiler() && version)
|
||||||
config.useQtQuickCompiler = true;
|
config.useQtQuickCompiler = true;
|
||||||
|
|
||||||
if (separateDebugInfo())
|
config.separateDebugInfo = qmakeBuildConfiguration()->separateDebugInfo();
|
||||||
config.separateDebugInfo = true;
|
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
@@ -434,23 +432,6 @@ void QMakeStep::setUseQtQuickCompiler(bool enable)
|
|||||||
qmakeBuildSystem()->scheduleUpdateAllNowOrLater();
|
qmakeBuildSystem()->scheduleUpdateAllNowOrLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QMakeStep::separateDebugInfo() const
|
|
||||||
{
|
|
||||||
return m_separateDebugInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QMakeStep::setSeparateDebugInfo(bool enable)
|
|
||||||
{
|
|
||||||
if (enable == m_separateDebugInfo)
|
|
||||||
return;
|
|
||||||
m_separateDebugInfo = enable;
|
|
||||||
|
|
||||||
emit separateDebugInfoChanged();
|
|
||||||
|
|
||||||
emit qmakeBuildConfiguration()->qmakeBuildConfigurationChanged();
|
|
||||||
qmakeBuildSystem()->scheduleUpdateAllNowOrLater();
|
|
||||||
}
|
|
||||||
|
|
||||||
FilePath QMakeStep::makeCommand() const
|
FilePath QMakeStep::makeCommand() const
|
||||||
{
|
{
|
||||||
if (auto ms = stepList()->firstOfType<MakeStep>())
|
if (auto ms = stepList()->firstOfType<MakeStep>())
|
||||||
@@ -529,7 +510,6 @@ QVariantMap QMakeStep::toMap() const
|
|||||||
map.insert(QMAKE_QMLDEBUGLIB_KEY, m_linkQmlDebuggingLibrary);
|
map.insert(QMAKE_QMLDEBUGLIB_KEY, m_linkQmlDebuggingLibrary);
|
||||||
map.insert(QMAKE_FORCED_KEY, m_forced);
|
map.insert(QMAKE_FORCED_KEY, m_forced);
|
||||||
map.insert(QMAKE_USE_QTQUICKCOMPILER, m_useQtQuickCompiler);
|
map.insert(QMAKE_USE_QTQUICKCOMPILER, m_useQtQuickCompiler);
|
||||||
map.insert(QMAKE_SEPARATEDEBUGINFO_KEY, m_separateDebugInfo);
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -549,7 +529,12 @@ bool QMakeStep::fromMap(const QVariantMap &map)
|
|||||||
} else {
|
} else {
|
||||||
m_linkQmlDebuggingLibrary = map.value(QMAKE_QMLDEBUGLIB_KEY, false).toBool();
|
m_linkQmlDebuggingLibrary = map.value(QMAKE_QMLDEBUGLIB_KEY, false).toBool();
|
||||||
}
|
}
|
||||||
m_separateDebugInfo = map.value(QMAKE_SEPARATEDEBUGINFO_KEY, false).toBool();
|
|
||||||
|
// Backwards compatibility with < Creator 4.12.
|
||||||
|
const QVariant separateDebugInfo
|
||||||
|
= map.value("QtProjectManager.QMakeBuildStep.SeparateDebugInfo");
|
||||||
|
if (separateDebugInfo.isValid())
|
||||||
|
qmakeBuildConfiguration()->forceSeparateDebugInfo(separateDebugInfo.toBool());
|
||||||
|
|
||||||
return BuildStep::fromMap(map);
|
return BuildStep::fromMap(map);
|
||||||
}
|
}
|
||||||
@@ -584,12 +569,6 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
|
|
||||||
qmakeAdditonalArgumentsLineEdit = new QLineEdit(this);
|
qmakeAdditonalArgumentsLineEdit = new QLineEdit(this);
|
||||||
|
|
||||||
auto separateDebugInfoLabel = new QLabel(tr("Generate separate debug info:"), this);
|
|
||||||
|
|
||||||
auto widget_2 = new QWidget(this);
|
|
||||||
|
|
||||||
auto separateDebugInfoCheckBox = new QCheckBox(widget_2);
|
|
||||||
|
|
||||||
debuggingLibraryLabel = new QLabel("Link QML debugging library:", this);
|
debuggingLibraryLabel = new QLabel("Link QML debugging library:", this);
|
||||||
|
|
||||||
auto widget_3 = new QWidget(this);
|
auto widget_3 = new QWidget(this);
|
||||||
@@ -640,7 +619,6 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
|
|
||||||
abisListWidget = new QListWidget(this);
|
abisListWidget = new QListWidget(this);
|
||||||
|
|
||||||
separateDebugInfoCheckBox->setText(QString());
|
|
||||||
qmlDebuggingLibraryCheckBox->setText(QString());
|
qmlDebuggingLibraryCheckBox->setText(QString());
|
||||||
qmlDebuggingWarningText->setText(QString());
|
qmlDebuggingWarningText->setText(QString());
|
||||||
qtQuickCompilerCheckBox->setText(QString());
|
qtQuickCompilerCheckBox->setText(QString());
|
||||||
@@ -649,20 +627,13 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
qmakeAdditonalArgumentsLineEdit->setText(m_step->userArguments());
|
qmakeAdditonalArgumentsLineEdit->setText(m_step->userArguments());
|
||||||
qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
||||||
qtQuickCompilerCheckBox->setChecked(m_step->useQtQuickCompiler());
|
qtQuickCompilerCheckBox->setChecked(m_step->useQtQuickCompiler());
|
||||||
separateDebugInfoCheckBox->setChecked(m_step->separateDebugInfo());
|
|
||||||
const QPixmap warning = Utils::Icons::WARNING.pixmap();
|
const QPixmap warning = Utils::Icons::WARNING.pixmap();
|
||||||
qmlDebuggingWarningIcon->setPixmap(warning);
|
qmlDebuggingWarningIcon->setPixmap(warning);
|
||||||
qtQuickCompilerWarningIcon->setPixmap(warning);
|
qtQuickCompilerWarningIcon->setPixmap(warning);
|
||||||
|
|
||||||
auto horizontalLayout_2 = new QHBoxLayout(widget_2);
|
|
||||||
horizontalLayout_2->setContentsMargins(0, 0, 0, 0);
|
|
||||||
horizontalLayout_2->addWidget(separateDebugInfoCheckBox);
|
|
||||||
horizontalLayout_2->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
|
|
||||||
|
|
||||||
auto formLayout = new QFormLayout(this);
|
auto formLayout = new QFormLayout(this);
|
||||||
formLayout->addRow(label_0, buildConfigurationWidget);
|
formLayout->addRow(label_0, buildConfigurationWidget);
|
||||||
formLayout->addRow(qmakeArgsLabel, qmakeAdditonalArgumentsLineEdit);
|
formLayout->addRow(qmakeArgsLabel, qmakeAdditonalArgumentsLineEdit);
|
||||||
formLayout->addRow(separateDebugInfoLabel, widget_2);
|
|
||||||
formLayout->addRow(debuggingLibraryLabel, widget_3);
|
formLayout->addRow(debuggingLibraryLabel, widget_3);
|
||||||
formLayout->addRow(qtQuickCompilerLabel, widget_4);
|
formLayout->addRow(qtQuickCompilerLabel, widget_4);
|
||||||
formLayout->addRow(label, qmakeArgumentsEdit);
|
formLayout->addRow(label, qmakeArgumentsEdit);
|
||||||
@@ -688,10 +659,6 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
this, &QMakeStepConfigWidget::useQtQuickCompilerChecked);
|
this, &QMakeStepConfigWidget::useQtQuickCompilerChecked);
|
||||||
connect(qtQuickCompilerCheckBox, &QCheckBox::clicked,
|
connect(qtQuickCompilerCheckBox, &QCheckBox::clicked,
|
||||||
this, [this] { askForRebuild(tr("QML Debugging")); });
|
this, [this] { askForRebuild(tr("QML Debugging")); });
|
||||||
connect(separateDebugInfoCheckBox, &QAbstractButton::toggled,
|
|
||||||
this, &QMakeStepConfigWidget::separateDebugInfoChecked);
|
|
||||||
connect(separateDebugInfoCheckBox, &QCheckBox::clicked,
|
|
||||||
this, [this] { askForRebuild(tr("QMake Configuration")); });
|
|
||||||
connect(step, &QMakeStep::userArgumentsChanged,
|
connect(step, &QMakeStep::userArgumentsChanged,
|
||||||
this, &QMakeStepConfigWidget::userArgumentsChanged);
|
this, &QMakeStepConfigWidget::userArgumentsChanged);
|
||||||
connect(step, &QMakeStep::linkQmlDebuggingLibraryChanged,
|
connect(step, &QMakeStep::linkQmlDebuggingLibraryChanged,
|
||||||
@@ -702,7 +669,7 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
this, &QMakeStepConfigWidget::updateEffectiveQMakeCall);
|
this, &QMakeStepConfigWidget::updateEffectiveQMakeCall);
|
||||||
connect(step, &QMakeStep::useQtQuickCompilerChanged,
|
connect(step, &QMakeStep::useQtQuickCompilerChanged,
|
||||||
this, &QMakeStepConfigWidget::useQtQuickCompilerChanged);
|
this, &QMakeStepConfigWidget::useQtQuickCompilerChanged);
|
||||||
connect(step, &QMakeStep::separateDebugInfoChanged,
|
connect(step->qmakeBuildConfiguration(), &QmakeBuildConfiguration::separateDebugInfoChanged,
|
||||||
this, &QMakeStepConfigWidget::separateDebugInfoChanged);
|
this, &QMakeStepConfigWidget::separateDebugInfoChanged);
|
||||||
connect(step->qmakeBuildConfiguration(), &QmakeBuildConfiguration::qmakeBuildConfigurationChanged,
|
connect(step->qmakeBuildConfiguration(), &QmakeBuildConfiguration::qmakeBuildConfigurationChanged,
|
||||||
this, &QMakeStepConfigWidget::qmakeBuildConfigChanged);
|
this, &QMakeStepConfigWidget::qmakeBuildConfigChanged);
|
||||||
@@ -784,6 +751,7 @@ void QMakeStepConfigWidget::separateDebugInfoChanged()
|
|||||||
|
|
||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
|
askForRebuild(tr("Separate Debug Information"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::abisChanged()
|
void QMakeStepConfigWidget::abisChanged()
|
||||||
@@ -885,19 +853,6 @@ void QMakeStepConfigWidget::useQtQuickCompilerChecked(bool checked)
|
|||||||
updateQtQuickCompilerOption();
|
updateQtQuickCompilerOption();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::separateDebugInfoChecked(bool checked)
|
|
||||||
{
|
|
||||||
if (m_ignoreChange)
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_ignoreChange = true;
|
|
||||||
m_step->setSeparateDebugInfo(checked);
|
|
||||||
m_ignoreChange = false;
|
|
||||||
|
|
||||||
updateSummaryLabel();
|
|
||||||
updateEffectiveQMakeCall();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QMakeStepConfigWidget::updateSummaryLabel()
|
void QMakeStepConfigWidget::updateSummaryLabel()
|
||||||
{
|
{
|
||||||
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(m_step->target()->kit());
|
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(m_step->target()->kit());
|
||||||
@@ -1071,8 +1026,10 @@ QStringList QMakeStepConfig::toArguments() const
|
|||||||
if (useQtQuickCompiler)
|
if (useQtQuickCompiler)
|
||||||
arguments << "CONFIG+=qtquickcompiler";
|
arguments << "CONFIG+=qtquickcompiler";
|
||||||
|
|
||||||
if (separateDebugInfo)
|
if (separateDebugInfo == SeparateDebugInfoAspect::Value::Enabled)
|
||||||
arguments << "CONFIG+=force_debug_info" << "CONFIG+=separate_debug_info";
|
arguments << "CONFIG+=force_debug_info" << "CONFIG+=separate_debug_info";
|
||||||
|
else if (separateDebugInfo == SeparateDebugInfoAspect::Value::Disabled)
|
||||||
|
arguments << "CONFIG-=separate_debug_info";
|
||||||
|
|
||||||
if (!sysRoot.isEmpty()) {
|
if (!sysRoot.isEmpty()) {
|
||||||
arguments << ("QMAKE_CFLAGS+=--sysroot=\"" + sysRoot + "\"");
|
arguments << ("QMAKE_CFLAGS+=--sysroot=\"" + sysRoot + "\"");
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
#include "qmakeprojectmanager_global.h"
|
#include "qmakeprojectmanager_global.h"
|
||||||
|
|
||||||
#include <projectexplorer/abstractprocessstep.h>
|
#include <projectexplorer/abstractprocessstep.h>
|
||||||
|
#include <projectexplorer/buildaspects.h>
|
||||||
|
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
|
|
||||||
@@ -83,9 +84,10 @@ public:
|
|||||||
QString targetTriple;
|
QString targetTriple;
|
||||||
TargetArchConfig archConfig = NoArch;
|
TargetArchConfig archConfig = NoArch;
|
||||||
OsType osType = NoOsType;
|
OsType osType = NoOsType;
|
||||||
|
ProjectExplorer::SeparateDebugInfoAspect::Value separateDebugInfo
|
||||||
|
= ProjectExplorer::SeparateDebugInfoAspect::Value::Default;
|
||||||
bool linkQmlDebuggingQQ2 = false;
|
bool linkQmlDebuggingQQ2 = false;
|
||||||
bool useQtQuickCompiler = false;
|
bool useQtQuickCompiler = false;
|
||||||
bool separateDebugInfo = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -102,7 +104,8 @@ inline bool operator !=(const QMakeStepConfig &a, const QMakeStepConfig &b) {
|
|||||||
|
|
||||||
inline QDebug operator<<(QDebug dbg, const QMakeStepConfig &c)
|
inline QDebug operator<<(QDebug dbg, const QMakeStepConfig &c)
|
||||||
{
|
{
|
||||||
dbg << c.archConfig << c.osType << c.linkQmlDebuggingQQ2 << c.useQtQuickCompiler << c.separateDebugInfo;
|
dbg << c.archConfig << c.osType << c.linkQmlDebuggingQQ2 << c.useQtQuickCompiler
|
||||||
|
<< (c.separateDebugInfo == ProjectExplorer::SeparateDebugInfoAspect::Value::Enabled);
|
||||||
return dbg;
|
return dbg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,8 +154,6 @@ public:
|
|||||||
void setLinkQmlDebuggingLibrary(bool enable);
|
void setLinkQmlDebuggingLibrary(bool enable);
|
||||||
bool useQtQuickCompiler() const;
|
bool useQtQuickCompiler() const;
|
||||||
void setUseQtQuickCompiler(bool enable);
|
void setUseQtQuickCompiler(bool enable);
|
||||||
bool separateDebugInfo() const;
|
|
||||||
void setSeparateDebugInfo(bool enable);
|
|
||||||
|
|
||||||
Utils::FilePath makeCommand() const;
|
Utils::FilePath makeCommand() const;
|
||||||
QString makeArguments(const QString &makefile) const;
|
QString makeArguments(const QString &makefile) const;
|
||||||
@@ -165,7 +166,6 @@ signals:
|
|||||||
void extraArgumentsChanged();
|
void extraArgumentsChanged();
|
||||||
void linkQmlDebuggingLibraryChanged();
|
void linkQmlDebuggingLibraryChanged();
|
||||||
void useQtQuickCompilerChanged();
|
void useQtQuickCompilerChanged();
|
||||||
void separateDebugInfoChanged();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
@@ -198,7 +198,6 @@ private:
|
|||||||
bool m_linkQmlDebuggingLibrary = false;
|
bool m_linkQmlDebuggingLibrary = false;
|
||||||
bool m_useQtQuickCompiler = false;
|
bool m_useQtQuickCompiler = false;
|
||||||
bool m_scriptTemplate = false;
|
bool m_scriptTemplate = false;
|
||||||
bool m_separateDebugInfo = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -224,7 +223,6 @@ private:
|
|||||||
void buildConfigurationSelected();
|
void buildConfigurationSelected();
|
||||||
void linkQmlDebuggingLibraryChecked(bool checked);
|
void linkQmlDebuggingLibraryChecked(bool checked);
|
||||||
void useQtQuickCompilerChecked(bool checked);
|
void useQtQuickCompilerChecked(bool checked);
|
||||||
void separateDebugInfoChecked(bool checked);
|
|
||||||
void askForRebuild(const QString &title);
|
void askForRebuild(const QString &title);
|
||||||
|
|
||||||
void recompileMessageBoxFinished(int button);
|
void recompileMessageBoxFinished(int button);
|
||||||
@@ -242,7 +240,6 @@ private:
|
|||||||
QLabel *abisLabel = nullptr;
|
QLabel *abisLabel = nullptr;
|
||||||
QComboBox *buildConfigurationComboBox = nullptr;
|
QComboBox *buildConfigurationComboBox = nullptr;
|
||||||
QLineEdit *qmakeAdditonalArgumentsLineEdit = nullptr;
|
QLineEdit *qmakeAdditonalArgumentsLineEdit = nullptr;
|
||||||
QCheckBox *separateDebugInfoCheckBox = nullptr;
|
|
||||||
QLabel *debuggingLibraryLabel = nullptr;
|
QLabel *debuggingLibraryLabel = nullptr;
|
||||||
QCheckBox *qmlDebuggingLibraryCheckBox = nullptr;
|
QCheckBox *qmlDebuggingLibraryCheckBox = nullptr;
|
||||||
QCheckBox *qtQuickCompilerCheckBox = nullptr;
|
QCheckBox *qtQuickCompilerCheckBox = nullptr;
|
||||||
|
Reference in New Issue
Block a user