forked from qt-creator/qt-creator
QmakeBuildConfiguration: Make use of Qt-related build aspects
Change-Id: Ia14bb468fe75403839d8dcc8022c4f233c363f62 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -241,20 +241,13 @@ bool DebuggerRunConfigurationAspect::useQmlDebugger() const
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Try to find a build step (qmake) to check whether qml debugging is enabled there
|
// Try to find a build configuration to check whether qml debugging is enabled there
|
||||||
// (Using the Qt metatype system to avoid a hard qt4projectmanager dependency)
|
// (Using the Qt metatype system to avoid a hard build system dependency)
|
||||||
//
|
//
|
||||||
if (BuildConfiguration *bc = m_target->activeBuildConfiguration()) {
|
if (BuildConfiguration *bc = m_target->activeBuildConfiguration()) {
|
||||||
QVariant linkProperty = bc->property("linkQmlDebuggingLibrary");
|
const QVariant linkProperty = bc->property("linkQmlDebuggingLibrary");
|
||||||
if (linkProperty.isValid() && linkProperty.canConvert(QVariant::Bool))
|
if (linkProperty.isValid() && linkProperty.canConvert(QVariant::Bool))
|
||||||
return linkProperty.toBool();
|
return linkProperty.toBool();
|
||||||
if (BuildStepList *bsl = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD)) {
|
|
||||||
foreach (BuildStep *step, bsl->steps()) {
|
|
||||||
QVariant linkProperty = step->property("linkQmlDebuggingLibrary");
|
|
||||||
if (linkProperty.isValid() && linkProperty.canConvert(QVariant::Bool))
|
|
||||||
return linkProperty.toBool();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return !languages.contains(ProjectExplorer::Constants::CXX_LANGUAGE_ID);
|
return !languages.contains(ProjectExplorer::Constants::CXX_LANGUAGE_ID);
|
||||||
|
@@ -41,6 +41,7 @@ using namespace Internal;
|
|||||||
|
|
||||||
using Utils::FilePath;
|
using Utils::FilePath;
|
||||||
using Utils::QtcProcess;
|
using Utils::QtcProcess;
|
||||||
|
using ProjectExplorer::BaseTriStateAspect;
|
||||||
using QtSupport::QtVersionManager;
|
using QtSupport::QtVersionManager;
|
||||||
using QtSupport::BaseQtVersion;
|
using QtSupport::BaseQtVersion;
|
||||||
|
|
||||||
@@ -191,14 +192,14 @@ void MakeFileParse::parseAssignments(QList<QMakeAssignment> *assignments)
|
|||||||
m_config.osType = QMakeStepConfig::NoOsType;
|
m_config.osType = QMakeStepConfig::NoOsType;
|
||||||
} else if (value == QLatin1String("qml_debug")) {
|
} else if (value == QLatin1String("qml_debug")) {
|
||||||
if (qa.op == QLatin1String("+="))
|
if (qa.op == QLatin1String("+="))
|
||||||
m_config.linkQmlDebuggingQQ2 = true;
|
m_config.linkQmlDebuggingQQ2 = BaseTriStateAspect::Value::Enabled;
|
||||||
else
|
else
|
||||||
m_config.linkQmlDebuggingQQ2 = false;
|
m_config.linkQmlDebuggingQQ2 = BaseTriStateAspect::Value::Disabled;
|
||||||
} else if (value == QLatin1String("qtquickcompiler")) {
|
} else if (value == QLatin1String("qtquickcompiler")) {
|
||||||
if (qa.op == QLatin1String("+="))
|
if (qa.op == QLatin1String("+="))
|
||||||
m_config.useQtQuickCompiler = true;
|
m_config.useQtQuickCompiler = BaseTriStateAspect::Value::Enabled;
|
||||||
else
|
else
|
||||||
m_config.useQtQuickCompiler = false;
|
m_config.useQtQuickCompiler = BaseTriStateAspect::Value::Disabled;
|
||||||
} else if (value == QLatin1String("force_debug_info")) {
|
} else if (value == QLatin1String("force_debug_info")) {
|
||||||
if (qa.op == QLatin1String("+="))
|
if (qa.op == QLatin1String("+="))
|
||||||
foundForceDebugInfo = true;
|
foundForceDebugInfo = true;
|
||||||
@@ -224,7 +225,7 @@ void MakeFileParse::parseAssignments(QList<QMakeAssignment> *assignments)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (foundForceDebugInfo && foundSeparateDebugInfo) {
|
if (foundForceDebugInfo && foundSeparateDebugInfo) {
|
||||||
m_config.separateDebugInfo = ProjectExplorer::SeparateDebugInfoAspect::Value::Enabled;
|
m_config.separateDebugInfo = ProjectExplorer::BaseTriStateAspect::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;
|
||||||
@@ -374,10 +375,12 @@ void MakeFileParse::parseCommandLine(const QString &command, const QString &proj
|
|||||||
qCDebug(logging()) << " Explicit NoBuildAll" << m_qmakeBuildConfig.explicitNoBuildAll;
|
qCDebug(logging()) << " Explicit NoBuildAll" << m_qmakeBuildConfig.explicitNoBuildAll;
|
||||||
qCDebug(logging()) << " TargetArch" << m_config.archConfig;
|
qCDebug(logging()) << " TargetArch" << m_config.archConfig;
|
||||||
qCDebug(logging()) << " OsType" << m_config.osType;
|
qCDebug(logging()) << " OsType" << m_config.osType;
|
||||||
qCDebug(logging()) << " LinkQmlDebuggingQQ2" << m_config.linkQmlDebuggingQQ2;
|
qCDebug(logging()) << " LinkQmlDebuggingQQ2"
|
||||||
qCDebug(logging()) << " Qt Quick Compiler" << m_config.useQtQuickCompiler;
|
<< (m_config.linkQmlDebuggingQQ2 == BaseTriStateAspect::Value::Enabled);
|
||||||
|
qCDebug(logging()) << " Qt Quick Compiler"
|
||||||
|
<< (m_config.useQtQuickCompiler == BaseTriStateAspect::Value::Enabled);
|
||||||
qCDebug(logging()) << " Separate Debug Info"
|
qCDebug(logging()) << " Separate Debug Info"
|
||||||
<< (m_config.separateDebugInfo == ProjectExplorer::SeparateDebugInfoAspect::Value::Enabled);
|
<< (m_config.separateDebugInfo == BaseTriStateAspect::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)
|
||||||
@@ -522,9 +525,8 @@ void QmakeProjectManagerPlugin::testMakefileParser()
|
|||||||
const QMakeStepConfig qmsc = parser.config();
|
const QMakeStepConfig qmsc = parser.config();
|
||||||
QCOMPARE(qmsc.archConfig, static_cast<QMakeStepConfig::TargetArchConfig>(archConfig));
|
QCOMPARE(qmsc.archConfig, static_cast<QMakeStepConfig::TargetArchConfig>(archConfig));
|
||||||
QCOMPARE(qmsc.osType, static_cast<QMakeStepConfig::OsType>(osType));
|
QCOMPARE(qmsc.osType, static_cast<QMakeStepConfig::OsType>(osType));
|
||||||
QCOMPARE(qmsc.linkQmlDebuggingQQ2, linkQmlDebuggingQQ2);
|
QCOMPARE(qmsc.linkQmlDebuggingQQ2 == BaseTriStateAspect::Value::Enabled, linkQmlDebuggingQQ2);
|
||||||
QCOMPARE(qmsc.useQtQuickCompiler, useQtQuickCompiler);
|
QCOMPARE(qmsc.useQtQuickCompiler == BaseTriStateAspect::Value::Enabled, useQtQuickCompiler);
|
||||||
QCOMPARE(qmsc.separateDebugInfo == ProjectExplorer::SeparateDebugInfoAspect::Value::Enabled,
|
QCOMPARE(qmsc.separateDebugInfo == BaseTriStateAspect::Value::Enabled, separateDebugInfo);
|
||||||
separateDebugInfo);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
#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>
|
||||||
@@ -50,6 +51,7 @@
|
|||||||
#include <projectexplorer/projectmacroexpander.h>
|
#include <projectexplorer/projectmacroexpander.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
|
#include <qtsupport/qtbuildaspects.h>
|
||||||
#include <qtsupport/qtkitinformation.h>
|
#include <qtsupport/qtkitinformation.h>
|
||||||
#include <qtsupport/qtversionmanager.h>
|
#include <qtsupport/qtversionmanager.h>
|
||||||
|
|
||||||
@@ -136,6 +138,21 @@ QmakeBuildConfiguration::QmakeBuildConfiguration(Target *target, Core::Id id)
|
|||||||
qmakeBuildSystem()->scheduleUpdateAllNowOrLater();
|
qmakeBuildSystem()->scheduleUpdateAllNowOrLater();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const auto qmlDebuggingAspect = addAspect<QmlDebuggingAspect>();
|
||||||
|
qmlDebuggingAspect->setKit(target->kit());
|
||||||
|
connect(qmlDebuggingAspect, &QmlDebuggingAspect::changed, this, [this] {
|
||||||
|
emit qmlDebuggingChanged();
|
||||||
|
emit qmakeBuildConfigurationChanged();
|
||||||
|
qmakeBuildSystem()->scheduleUpdateAllNowOrLater();
|
||||||
|
});
|
||||||
|
|
||||||
|
const auto qtQuickCompilerAspect = addAspect<QtQuickCompilerAspect>();
|
||||||
|
qtQuickCompilerAspect->setKit(target->kit());
|
||||||
|
connect(qtQuickCompilerAspect, &QtQuickCompilerAspect::changed, this, [this] {
|
||||||
|
emit useQtQuickCompilerChanged();
|
||||||
|
emit qmakeBuildConfigurationChanged();
|
||||||
|
qmakeBuildSystem()->scheduleUpdateAllNowOrLater();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmakeBuildConfiguration::initialize()
|
void QmakeBuildConfiguration::initialize()
|
||||||
@@ -162,10 +179,16 @@ void QmakeBuildConfiguration::initialize()
|
|||||||
QString additionalArguments = qmakeExtra.additionalArguments;
|
QString additionalArguments = qmakeExtra.additionalArguments;
|
||||||
if (!additionalArguments.isEmpty())
|
if (!additionalArguments.isEmpty())
|
||||||
qmakeStep->setUserArguments(additionalArguments);
|
qmakeStep->setUserArguments(additionalArguments);
|
||||||
qmakeStep->setLinkQmlDebuggingLibrary(qmakeExtra.config.linkQmlDebuggingQQ2);
|
|
||||||
if (qmakeExtra.config.separateDebugInfo == SeparateDebugInfoAspect::Value::Enabled)
|
if (qmakeExtra.config.separateDebugInfo == SeparateDebugInfoAspect::Value::Enabled)
|
||||||
forceSeparateDebugInfo(true);
|
forceSeparateDebugInfo(true);
|
||||||
qmakeStep->setUseQtQuickCompiler(qmakeExtra.config.useQtQuickCompiler);
|
if (qmakeExtra.config.linkQmlDebuggingQQ2 != QmlDebuggingAspect::Value::Default) {
|
||||||
|
forceQmlDebugging(qmakeExtra.config.linkQmlDebuggingQQ2
|
||||||
|
== QmlDebuggingAspect::Value::Enabled);
|
||||||
|
}
|
||||||
|
if (qmakeExtra.config.useQtQuickCompiler != QtQuickCompilerAspect::Value::Default) {
|
||||||
|
forceQtQuickCompiler(qmakeExtra.config.useQtQuickCompiler
|
||||||
|
== QtQuickCompilerAspect::Value::Enabled);
|
||||||
|
}
|
||||||
|
|
||||||
setQMakeBuildConfiguration(config);
|
setQMakeBuildConfiguration(config);
|
||||||
|
|
||||||
@@ -407,6 +430,35 @@ void QmakeBuildConfiguration::forceSeparateDebugInfo(bool sepDebugInfo)
|
|||||||
: SeparateDebugInfoAspect::Value::Disabled);
|
: SeparateDebugInfoAspect::Value::Disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BaseTriStateAspect::Value QmakeBuildConfiguration::qmlDebugging() const
|
||||||
|
{
|
||||||
|
return aspect<QmlDebuggingAspect>()->setting();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QmakeBuildConfiguration::linkQmlDebuggingLibrary() const
|
||||||
|
{
|
||||||
|
return qmlDebugging() == QmlDebuggingAspect::Value::Enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QmakeBuildConfiguration::forceQmlDebugging(bool enable)
|
||||||
|
{
|
||||||
|
aspect<QmlDebuggingAspect>()->setSetting(enable
|
||||||
|
? QmlDebuggingAspect::Value::Enabled
|
||||||
|
: QmlDebuggingAspect::Value::Disabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
BaseTriStateAspect::Value QmakeBuildConfiguration::useQtQuickCompiler() const
|
||||||
|
{
|
||||||
|
return aspect<QtQuickCompilerAspect>()->setting();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QmakeBuildConfiguration::forceQtQuickCompiler(bool enable)
|
||||||
|
{
|
||||||
|
aspect<QtQuickCompilerAspect>()->setSetting(enable
|
||||||
|
? QtQuickCompilerAspect::Value::Enabled
|
||||||
|
: QtQuickCompilerAspect::Value::Disabled);
|
||||||
|
}
|
||||||
|
|
||||||
QStringList QmakeBuildConfiguration::configCommandLineArguments() const
|
QStringList QmakeBuildConfiguration::configCommandLineArguments() const
|
||||||
{
|
{
|
||||||
QStringList result;
|
QStringList result;
|
||||||
@@ -691,7 +743,7 @@ BuildInfo QmakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
|
|||||||
//: Non-ASCII characters in directory suffix may cause build issues.
|
//: Non-ASCII characters in directory suffix may cause build issues.
|
||||||
suffix = tr("Release", "Shadow build directory suffix");
|
suffix = tr("Release", "Shadow build directory suffix");
|
||||||
if (version && version->isQtQuickCompilerSupported())
|
if (version && version->isQtQuickCompilerSupported())
|
||||||
extraInfo.config.useQtQuickCompiler = true;
|
extraInfo.config.useQtQuickCompiler = QtQuickCompilerAspect::Value::Enabled;
|
||||||
} else {
|
} else {
|
||||||
if (type == BuildConfiguration::Debug) {
|
if (type == BuildConfiguration::Debug) {
|
||||||
//: The name of the debug build configuration created by default for a qmake project.
|
//: The name of the debug build configuration created by default for a qmake project.
|
||||||
@@ -705,10 +757,10 @@ BuildInfo QmakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
|
|||||||
suffix = tr("Profile", "Shadow build directory suffix");
|
suffix = tr("Profile", "Shadow build directory suffix");
|
||||||
extraInfo.config.separateDebugInfo = SeparateDebugInfoAspect::Value::Enabled;
|
extraInfo.config.separateDebugInfo = SeparateDebugInfoAspect::Value::Enabled;
|
||||||
if (version && version->isQtQuickCompilerSupported())
|
if (version && version->isQtQuickCompilerSupported())
|
||||||
extraInfo.config.useQtQuickCompiler = true;
|
extraInfo.config.useQtQuickCompiler = QtQuickCompilerAspect::Value::Enabled;
|
||||||
}
|
}
|
||||||
if (version && version->isQmlDebuggingSupported())
|
if (version && version->isQmlDebuggingSupported())
|
||||||
extraInfo.config.linkQmlDebuggingQQ2 = true;
|
extraInfo.config.linkQmlDebuggingQQ2 = QmlDebuggingAspect::Value::Enabled;
|
||||||
}
|
}
|
||||||
info.typeName = info.displayName;
|
info.typeName = info.displayName;
|
||||||
// Leave info.buildDirectory unset;
|
// Leave info.buildDirectory unset;
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include "qmakeprojectmanager_global.h"
|
#include "qmakeprojectmanager_global.h"
|
||||||
|
|
||||||
#include <projectexplorer/buildaspects.h>
|
#include <projectexplorer/projectconfigurationaspects.h>
|
||||||
#include <projectexplorer/buildconfiguration.h>
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <qtsupport/baseqtversion.h>
|
#include <qtsupport/baseqtversion.h>
|
||||||
|
|
||||||
@@ -44,6 +44,9 @@ class QMAKEPROJECTMANAGER_EXPORT QmakeBuildConfiguration : public ProjectExplore
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
// used in DebuggerRunConfigurationAspect
|
||||||
|
Q_PROPERTY(bool linkQmlDebuggingLibrary READ linkQmlDebuggingLibrary NOTIFY qmlDebuggingChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QmakeBuildConfiguration(ProjectExplorer::Target *target, Core::Id id);
|
QmakeBuildConfiguration(ProjectExplorer::Target *target, Core::Id id);
|
||||||
~QmakeBuildConfiguration() override;
|
~QmakeBuildConfiguration() override;
|
||||||
@@ -96,15 +99,24 @@ 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;
|
ProjectExplorer::BaseTriStateAspect::Value separateDebugInfo() const;
|
||||||
void forceSeparateDebugInfo(bool sepDebugInfo);
|
void forceSeparateDebugInfo(bool sepDebugInfo);
|
||||||
|
|
||||||
|
ProjectExplorer::BaseTriStateAspect::Value qmlDebugging() const;
|
||||||
|
bool linkQmlDebuggingLibrary() const;
|
||||||
|
void forceQmlDebugging(bool enable);
|
||||||
|
|
||||||
|
ProjectExplorer::BaseTriStateAspect::Value useQtQuickCompiler() const;
|
||||||
|
void forceQtQuickCompiler(bool enable);
|
||||||
|
|
||||||
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.
|
void separateDebugInfoChanged();
|
||||||
|
void qmlDebuggingChanged();
|
||||||
|
void useQtQuickCompilerChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
|
@@ -72,9 +72,6 @@ using namespace Utils;
|
|||||||
namespace {
|
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_QMLDEBUGLIBAUTO_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto";
|
|
||||||
const char QMAKE_QMLDEBUGLIB_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMakeStep::QMakeStep(BuildStepList *bsl) : AbstractProcessStep(bsl, Constants::QMAKE_BS_ID)
|
QMakeStep::QMakeStep(BuildStepList *bsl) : AbstractProcessStep(bsl, Constants::QMAKE_BS_ID)
|
||||||
@@ -161,13 +158,9 @@ QMakeStepConfig QMakeStep::deducedArguments() const
|
|||||||
|
|
||||||
config.archConfig = QMakeStepConfig::targetArchFor(targetAbi, version);
|
config.archConfig = QMakeStepConfig::targetArchFor(targetAbi, version);
|
||||||
config.osType = QMakeStepConfig::osTypeFor(targetAbi, version);
|
config.osType = QMakeStepConfig::osTypeFor(targetAbi, version);
|
||||||
if (linkQmlDebuggingLibrary() && version && version->qtVersion().majorVersion >= 5)
|
|
||||||
config.linkQmlDebuggingQQ2 = true;
|
|
||||||
|
|
||||||
if (useQtQuickCompiler() && version)
|
|
||||||
config.useQtQuickCompiler = true;
|
|
||||||
|
|
||||||
config.separateDebugInfo = qmakeBuildConfiguration()->separateDebugInfo();
|
config.separateDebugInfo = qmakeBuildConfiguration()->separateDebugInfo();
|
||||||
|
config.linkQmlDebuggingQQ2 = qmakeBuildConfiguration()->qmlDebugging();
|
||||||
|
config.useQtQuickCompiler = qmakeBuildConfiguration()->useQtQuickCompiler();
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
@@ -396,42 +389,6 @@ void QMakeStep::setExtraParserArguments(const QStringList &args)
|
|||||||
m_extraParserArgs = args;
|
m_extraParserArgs = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QMakeStep::linkQmlDebuggingLibrary() const
|
|
||||||
{
|
|
||||||
return m_linkQmlDebuggingLibrary;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QMakeStep::setLinkQmlDebuggingLibrary(bool enable)
|
|
||||||
{
|
|
||||||
if (enable == m_linkQmlDebuggingLibrary)
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_linkQmlDebuggingLibrary = enable;
|
|
||||||
|
|
||||||
emit linkQmlDebuggingLibraryChanged();
|
|
||||||
|
|
||||||
emit qmakeBuildConfiguration()->qmakeBuildConfigurationChanged();
|
|
||||||
qmakeBuildSystem()->scheduleUpdateAllNowOrLater();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool QMakeStep::useQtQuickCompiler() const
|
|
||||||
{
|
|
||||||
return m_useQtQuickCompiler;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QMakeStep::setUseQtQuickCompiler(bool enable)
|
|
||||||
{
|
|
||||||
if (enable == m_useQtQuickCompiler)
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_useQtQuickCompiler = enable;
|
|
||||||
|
|
||||||
emit useQtQuickCompilerChanged();
|
|
||||||
|
|
||||||
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>())
|
||||||
@@ -507,9 +464,7 @@ QVariantMap QMakeStep::toMap() const
|
|||||||
{
|
{
|
||||||
QVariantMap map(AbstractProcessStep::toMap());
|
QVariantMap map(AbstractProcessStep::toMap());
|
||||||
map.insert(QMAKE_ARGUMENTS_KEY, m_userArgs);
|
map.insert(QMAKE_ARGUMENTS_KEY, m_userArgs);
|
||||||
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);
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -517,24 +472,20 @@ bool QMakeStep::fromMap(const QVariantMap &map)
|
|||||||
{
|
{
|
||||||
m_userArgs = map.value(QMAKE_ARGUMENTS_KEY).toString();
|
m_userArgs = map.value(QMAKE_ARGUMENTS_KEY).toString();
|
||||||
m_forced = map.value(QMAKE_FORCED_KEY, false).toBool();
|
m_forced = map.value(QMAKE_FORCED_KEY, false).toBool();
|
||||||
m_useQtQuickCompiler = map.value(QMAKE_USE_QTQUICKCOMPILER, false).toBool();
|
|
||||||
|
|
||||||
// QMAKE_QMLDEBUGLIBAUTO_KEY was used in versions 2.3 to 3.5 (both included) to automatically
|
|
||||||
// change the qml_debug CONFIG flag based no the qmake build configuration.
|
|
||||||
if (map.value(QMAKE_QMLDEBUGLIBAUTO_KEY, false).toBool()) {
|
|
||||||
m_linkQmlDebuggingLibrary =
|
|
||||||
project()->projectLanguages().contains(
|
|
||||||
ProjectExplorer::Constants::QMLJS_LANGUAGE_ID) &&
|
|
||||||
(qmakeBuildConfiguration()->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild);
|
|
||||||
} else {
|
|
||||||
m_linkQmlDebuggingLibrary = map.value(QMAKE_QMLDEBUGLIB_KEY, false).toBool();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Backwards compatibility with < Creator 4.12.
|
// Backwards compatibility with < Creator 4.12.
|
||||||
const QVariant separateDebugInfo
|
const QVariant separateDebugInfo
|
||||||
= map.value("QtProjectManager.QMakeBuildStep.SeparateDebugInfo");
|
= map.value("QtProjectManager.QMakeBuildStep.SeparateDebugInfo");
|
||||||
if (separateDebugInfo.isValid())
|
if (separateDebugInfo.isValid())
|
||||||
qmakeBuildConfiguration()->forceSeparateDebugInfo(separateDebugInfo.toBool());
|
qmakeBuildConfiguration()->forceSeparateDebugInfo(separateDebugInfo.toBool());
|
||||||
|
const QVariant qmlDebugging
|
||||||
|
= map.value("QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary");
|
||||||
|
if (qmlDebugging.isValid())
|
||||||
|
qmakeBuildConfiguration()->forceQmlDebugging(qmlDebugging.toBool());
|
||||||
|
const QVariant useQtQuickCompiler
|
||||||
|
= map.value("QtProjectManager.QMakeBuildStep.UseQtQuickCompiler");
|
||||||
|
if (useQtQuickCompiler.isValid())
|
||||||
|
qmakeBuildConfiguration()->forceQtQuickCompiler(useQtQuickCompiler.toBool());
|
||||||
|
|
||||||
return BuildStep::fromMap(map);
|
return BuildStep::fromMap(map);
|
||||||
}
|
}
|
||||||
@@ -569,43 +520,6 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
|
|
||||||
qmakeAdditonalArgumentsLineEdit = new QLineEdit(this);
|
qmakeAdditonalArgumentsLineEdit = new QLineEdit(this);
|
||||||
|
|
||||||
debuggingLibraryLabel = new QLabel("Link QML debugging library:", this);
|
|
||||||
|
|
||||||
auto widget_3 = new QWidget(this);
|
|
||||||
qmlDebuggingLibraryCheckBox = new QCheckBox(widget_3);
|
|
||||||
|
|
||||||
qmlDebuggingWarningIcon = new QLabel(widget_3);
|
|
||||||
|
|
||||||
auto horizontalLayout_3 = new QHBoxLayout(widget_3);
|
|
||||||
horizontalLayout_3->setContentsMargins(0, 0, 0, 0);
|
|
||||||
horizontalLayout_3->addWidget(qmlDebuggingLibraryCheckBox);
|
|
||||||
horizontalLayout_3->addWidget(qmlDebuggingWarningIcon);
|
|
||||||
|
|
||||||
qmlDebuggingWarningText = new QLabel(widget_3);
|
|
||||||
|
|
||||||
horizontalLayout_3->addWidget(qmlDebuggingWarningText);
|
|
||||||
|
|
||||||
horizontalLayout_3->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
|
|
||||||
|
|
||||||
qtQuickCompilerLabel = new QLabel(tr("Use QML compiler:"), this);
|
|
||||||
|
|
||||||
auto widget_4 = new QWidget(this);
|
|
||||||
auto horizontalLayout_4 = new QHBoxLayout(widget_4);
|
|
||||||
horizontalLayout_4->setContentsMargins(0, 0, 0, 0);
|
|
||||||
qtQuickCompilerCheckBox = new QCheckBox(widget_4);
|
|
||||||
|
|
||||||
horizontalLayout_4->addWidget(qtQuickCompilerCheckBox);
|
|
||||||
|
|
||||||
qtQuickCompilerWarningIcon = new QLabel(widget_4);
|
|
||||||
|
|
||||||
horizontalLayout_4->addWidget(qtQuickCompilerWarningIcon);
|
|
||||||
|
|
||||||
qtQuickCompilerWarningText = new QLabel(widget_4);
|
|
||||||
|
|
||||||
horizontalLayout_4->addWidget(qtQuickCompilerWarningText);
|
|
||||||
|
|
||||||
horizontalLayout_4->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
|
|
||||||
|
|
||||||
auto label = new QLabel(tr("Effective qmake call:"), this);
|
auto label = new QLabel(tr("Effective qmake call:"), this);
|
||||||
label->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
|
label->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
|
||||||
|
|
||||||
@@ -619,23 +533,9 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
|
|
||||||
abisListWidget = new QListWidget(this);
|
abisListWidget = new QListWidget(this);
|
||||||
|
|
||||||
qmlDebuggingLibraryCheckBox->setText(QString());
|
|
||||||
qmlDebuggingWarningText->setText(QString());
|
|
||||||
qtQuickCompilerCheckBox->setText(QString());
|
|
||||||
qtQuickCompilerWarningText->setText(QString());
|
|
||||||
|
|
||||||
qmakeAdditonalArgumentsLineEdit->setText(m_step->userArguments());
|
|
||||||
qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
|
||||||
qtQuickCompilerCheckBox->setChecked(m_step->useQtQuickCompiler());
|
|
||||||
const QPixmap warning = Utils::Icons::WARNING.pixmap();
|
|
||||||
qmlDebuggingWarningIcon->setPixmap(warning);
|
|
||||||
qtQuickCompilerWarningIcon->setPixmap(warning);
|
|
||||||
|
|
||||||
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(debuggingLibraryLabel, widget_3);
|
|
||||||
formLayout->addRow(qtQuickCompilerLabel, widget_4);
|
|
||||||
formLayout->addRow(label, qmakeArgumentsEdit);
|
formLayout->addRow(label, qmakeArgumentsEdit);
|
||||||
formLayout->addRow(abisLabel, abisListWidget);
|
formLayout->addRow(abisLabel, abisListWidget);
|
||||||
|
|
||||||
@@ -643,31 +543,21 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
|
|
||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
updateQmlDebuggingOption();
|
|
||||||
updateQtQuickCompilerOption();
|
|
||||||
|
|
||||||
connect(qmakeAdditonalArgumentsLineEdit, &QLineEdit::textEdited,
|
connect(qmakeAdditonalArgumentsLineEdit, &QLineEdit::textEdited,
|
||||||
this, &QMakeStepConfigWidget::qmakeArgumentsLineEdited);
|
this, &QMakeStepConfigWidget::qmakeArgumentsLineEdited);
|
||||||
connect(buildConfigurationComboBox,
|
connect(buildConfigurationComboBox,
|
||||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
this, &QMakeStepConfigWidget::buildConfigurationSelected);
|
this, &QMakeStepConfigWidget::buildConfigurationSelected);
|
||||||
connect(qmlDebuggingLibraryCheckBox, &QCheckBox::toggled,
|
|
||||||
this, &QMakeStepConfigWidget::linkQmlDebuggingLibraryChecked);
|
|
||||||
connect(qmlDebuggingLibraryCheckBox, &QCheckBox::clicked,
|
|
||||||
this, [this] { askForRebuild(tr("QML Debugging")); });
|
|
||||||
connect(qtQuickCompilerCheckBox, &QAbstractButton::toggled,
|
|
||||||
this, &QMakeStepConfigWidget::useQtQuickCompilerChecked);
|
|
||||||
connect(qtQuickCompilerCheckBox, &QCheckBox::clicked,
|
|
||||||
this, [this] { askForRebuild(tr("QML Debugging")); });
|
|
||||||
connect(step, &QMakeStep::userArgumentsChanged,
|
connect(step, &QMakeStep::userArgumentsChanged,
|
||||||
this, &QMakeStepConfigWidget::userArgumentsChanged);
|
this, &QMakeStepConfigWidget::userArgumentsChanged);
|
||||||
connect(step, &QMakeStep::linkQmlDebuggingLibraryChanged,
|
connect(step->qmakeBuildConfiguration(), &QmakeBuildConfiguration::qmlDebuggingChanged,
|
||||||
this, &QMakeStepConfigWidget::linkQmlDebuggingLibraryChanged);
|
this, &QMakeStepConfigWidget::linkQmlDebuggingLibraryChanged);
|
||||||
connect(step->project(), &Project::projectLanguagesUpdated,
|
connect(step->project(), &Project::projectLanguagesUpdated,
|
||||||
this, &QMakeStepConfigWidget::linkQmlDebuggingLibraryChanged);
|
this, &QMakeStepConfigWidget::linkQmlDebuggingLibraryChanged);
|
||||||
connect(step->target(), &Target::parsingFinished,
|
connect(step->target(), &Target::parsingFinished,
|
||||||
this, &QMakeStepConfigWidget::updateEffectiveQMakeCall);
|
this, &QMakeStepConfigWidget::updateEffectiveQMakeCall);
|
||||||
connect(step, &QMakeStep::useQtQuickCompilerChanged,
|
connect(step->qmakeBuildConfiguration(), &QmakeBuildConfiguration::useQtQuickCompilerChanged,
|
||||||
this, &QMakeStepConfigWidget::useQtQuickCompilerChanged);
|
this, &QMakeStepConfigWidget::useQtQuickCompilerChanged);
|
||||||
connect(step->qmakeBuildConfiguration(), &QmakeBuildConfiguration::separateDebugInfoChanged,
|
connect(step->qmakeBuildConfiguration(), &QmakeBuildConfiguration::separateDebugInfoChanged,
|
||||||
this, &QMakeStepConfigWidget::separateDebugInfoChanged);
|
this, &QMakeStepConfigWidget::separateDebugInfoChanged);
|
||||||
@@ -698,8 +588,6 @@ void QMakeStepConfigWidget::qtVersionChanged()
|
|||||||
{
|
{
|
||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
updateQmlDebuggingOption();
|
|
||||||
updateQtQuickCompilerOption();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::qmakeBuildConfigChanged()
|
void QMakeStepConfigWidget::qmakeBuildConfigChanged()
|
||||||
@@ -724,31 +612,20 @@ void QMakeStepConfigWidget::userArgumentsChanged()
|
|||||||
|
|
||||||
void QMakeStepConfigWidget::linkQmlDebuggingLibraryChanged()
|
void QMakeStepConfigWidget::linkQmlDebuggingLibraryChanged()
|
||||||
{
|
{
|
||||||
if (m_ignoreChange)
|
|
||||||
return;
|
|
||||||
qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
|
||||||
|
|
||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
updateQmlDebuggingOption();
|
askForRebuild(tr("QML Debugging"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::useQtQuickCompilerChanged()
|
void QMakeStepConfigWidget::useQtQuickCompilerChanged()
|
||||||
{
|
{
|
||||||
if (m_ignoreChange)
|
|
||||||
return;
|
|
||||||
|
|
||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
updateQtQuickCompilerOption();
|
askForRebuild(tr("Qt Quick Compiler"));
|
||||||
updateQmlDebuggingOption();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::separateDebugInfoChanged()
|
void QMakeStepConfigWidget::separateDebugInfoChanged()
|
||||||
{
|
{
|
||||||
if (m_ignoreChange)
|
|
||||||
return;
|
|
||||||
|
|
||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
askForRebuild(tr("Separate Debug Information"));
|
askForRebuild(tr("Separate Debug Information"));
|
||||||
@@ -813,20 +690,6 @@ void QMakeStepConfigWidget::buildConfigurationSelected()
|
|||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::linkQmlDebuggingLibraryChecked(bool checked)
|
|
||||||
{
|
|
||||||
if (m_ignoreChange)
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_ignoreChange = true;
|
|
||||||
m_step->setLinkQmlDebuggingLibrary(checked);
|
|
||||||
m_ignoreChange = false;
|
|
||||||
|
|
||||||
updateSummaryLabel();
|
|
||||||
updateEffectiveQMakeCall();
|
|
||||||
updateQmlDebuggingOption();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QMakeStepConfigWidget::askForRebuild(const QString &title)
|
void QMakeStepConfigWidget::askForRebuild(const QString &title)
|
||||||
{
|
{
|
||||||
auto *question = new QMessageBox(Core::ICore::mainWindow());
|
auto *question = new QMessageBox(Core::ICore::mainWindow());
|
||||||
@@ -838,21 +701,6 @@ void QMakeStepConfigWidget::askForRebuild(const QString &title)
|
|||||||
question->show();
|
question->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::useQtQuickCompilerChecked(bool checked)
|
|
||||||
{
|
|
||||||
if (m_ignoreChange)
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_ignoreChange = true;
|
|
||||||
m_step->setUseQtQuickCompiler(checked);
|
|
||||||
m_ignoreChange = false;
|
|
||||||
|
|
||||||
updateSummaryLabel();
|
|
||||||
updateEffectiveQMakeCall();
|
|
||||||
updateQmlDebuggingOption();
|
|
||||||
updateQtQuickCompilerOption();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QMakeStepConfigWidget::updateSummaryLabel()
|
void QMakeStepConfigWidget::updateSummaryLabel()
|
||||||
{
|
{
|
||||||
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(m_step->target()->kit());
|
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(m_step->target()->kit());
|
||||||
@@ -896,39 +744,6 @@ void QMakeStepConfigWidget::updateSummaryLabel()
|
|||||||
setSummaryText(tr("<b>qmake:</b> %1 %2").arg(program, args));
|
setSummaryText(tr("<b>qmake:</b> %1 %2").arg(program, args));
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::updateQmlDebuggingOption()
|
|
||||||
{
|
|
||||||
QString warningText;
|
|
||||||
bool supported = BaseQtVersion::isQmlDebuggingSupported(m_step->target()->kit(),
|
|
||||||
&warningText);
|
|
||||||
|
|
||||||
qmlDebuggingLibraryCheckBox->setEnabled(supported);
|
|
||||||
debuggingLibraryLabel->setText(tr("Enable QML debugging and profiling:"));
|
|
||||||
|
|
||||||
if (supported && m_step->linkQmlDebuggingLibrary())
|
|
||||||
warningText = tr("Might make your application vulnerable. Only use in a safe environment.");
|
|
||||||
|
|
||||||
qmlDebuggingWarningText->setText(warningText);
|
|
||||||
qmlDebuggingWarningIcon->setVisible(!warningText.isEmpty());
|
|
||||||
|
|
||||||
updateQtQuickCompilerOption(); // show or clear compiler warning text
|
|
||||||
}
|
|
||||||
|
|
||||||
void QMakeStepConfigWidget::updateQtQuickCompilerOption()
|
|
||||||
{
|
|
||||||
QString warningText;
|
|
||||||
bool supported = BaseQtVersion::isQtQuickCompilerSupported(m_step->target()->kit(),
|
|
||||||
&warningText);
|
|
||||||
qtQuickCompilerCheckBox->setEnabled(supported);
|
|
||||||
qtQuickCompilerLabel->setText(tr("Enable Qt Quick Compiler:"));
|
|
||||||
|
|
||||||
if (supported && m_step->useQtQuickCompiler() && m_step->linkQmlDebuggingLibrary())
|
|
||||||
warningText = tr("Disables QML debugging. QML profiling will still work.");
|
|
||||||
|
|
||||||
qtQuickCompilerWarningText->setText(warningText);
|
|
||||||
qtQuickCompilerWarningIcon->setVisible(!warningText.isEmpty());
|
|
||||||
}
|
|
||||||
|
|
||||||
void QMakeStepConfigWidget::updateEffectiveQMakeCall()
|
void QMakeStepConfigWidget::updateEffectiveQMakeCall()
|
||||||
{
|
{
|
||||||
qmakeArgumentsEdit->setPlainText(m_step->effectiveQMakeCall());
|
qmakeArgumentsEdit->setPlainText(m_step->effectiveQMakeCall());
|
||||||
@@ -1020,15 +835,19 @@ QStringList QMakeStepConfig::toArguments() const
|
|||||||
else if (osType == IphoneOS)
|
else if (osType == IphoneOS)
|
||||||
arguments << "CONFIG+=iphoneos" << "CONFIG+=device" /*since Qt 5.7*/;
|
arguments << "CONFIG+=iphoneos" << "CONFIG+=device" /*since Qt 5.7*/;
|
||||||
|
|
||||||
if (linkQmlDebuggingQQ2)
|
if (linkQmlDebuggingQQ2 == BaseTriStateAspect::Value::Enabled)
|
||||||
arguments << "CONFIG+=qml_debug";
|
arguments << "CONFIG+=qml_debug";
|
||||||
|
else if (linkQmlDebuggingQQ2 == BaseTriStateAspect::Value::Disabled)
|
||||||
|
arguments << "CONFIG-=qml_debug";
|
||||||
|
|
||||||
if (useQtQuickCompiler)
|
if (useQtQuickCompiler == BaseTriStateAspect::Value::Enabled)
|
||||||
arguments << "CONFIG+=qtquickcompiler";
|
arguments << "CONFIG+=qtquickcompiler";
|
||||||
|
else if (useQtQuickCompiler == BaseTriStateAspect::Value::Disabled)
|
||||||
|
arguments << "CONFIG-=qtquickcompiler";
|
||||||
|
|
||||||
if (separateDebugInfo == SeparateDebugInfoAspect::Value::Enabled)
|
if (separateDebugInfo == BaseTriStateAspect::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)
|
else if (separateDebugInfo == BaseTriStateAspect::Value::Disabled)
|
||||||
arguments << "CONFIG-=separate_debug_info";
|
arguments << "CONFIG-=separate_debug_info";
|
||||||
|
|
||||||
if (!sysRoot.isEmpty()) {
|
if (!sysRoot.isEmpty()) {
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#include "qmakeprojectmanager_global.h"
|
#include "qmakeprojectmanager_global.h"
|
||||||
|
|
||||||
#include <projectexplorer/abstractprocessstep.h>
|
#include <projectexplorer/abstractprocessstep.h>
|
||||||
#include <projectexplorer/buildaspects.h>
|
#include <projectexplorer/projectconfigurationaspects.h>
|
||||||
|
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
|
|
||||||
@@ -84,10 +84,12 @@ public:
|
|||||||
QString targetTriple;
|
QString targetTriple;
|
||||||
TargetArchConfig archConfig = NoArch;
|
TargetArchConfig archConfig = NoArch;
|
||||||
OsType osType = NoOsType;
|
OsType osType = NoOsType;
|
||||||
ProjectExplorer::SeparateDebugInfoAspect::Value separateDebugInfo
|
ProjectExplorer::BaseTriStateAspect::Value separateDebugInfo
|
||||||
= ProjectExplorer::SeparateDebugInfoAspect::Value::Default;
|
= ProjectExplorer::BaseTriStateAspect::Value::Default;
|
||||||
bool linkQmlDebuggingQQ2 = false;
|
ProjectExplorer::BaseTriStateAspect::Value linkQmlDebuggingQQ2
|
||||||
bool useQtQuickCompiler = false;
|
= ProjectExplorer::BaseTriStateAspect::Value::Default;
|
||||||
|
ProjectExplorer::BaseTriStateAspect::Value useQtQuickCompiler
|
||||||
|
= ProjectExplorer::BaseTriStateAspect::Value::Default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -104,8 +106,10 @@ 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
|
dbg << c.archConfig << c.osType
|
||||||
<< (c.separateDebugInfo == ProjectExplorer::SeparateDebugInfoAspect::Value::Enabled);
|
<< (c.linkQmlDebuggingQQ2 == ProjectExplorer::BaseTriStateAspect::Value::Enabled)
|
||||||
|
<< (c.useQtQuickCompiler == ProjectExplorer::BaseTriStateAspect::Value::Enabled)
|
||||||
|
<< (c.separateDebugInfo == ProjectExplorer::BaseTriStateAspect::Value::Enabled);
|
||||||
return dbg;
|
return dbg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,9 +118,6 @@ class QMAKEPROJECTMANAGER_EXPORT QMakeStep : public ProjectExplorer::AbstractPro
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
friend class Internal::QMakeStepFactory;
|
friend class Internal::QMakeStepFactory;
|
||||||
|
|
||||||
// used in DebuggerRunConfigurationAspect
|
|
||||||
Q_PROPERTY(bool linkQmlDebuggingLibrary READ linkQmlDebuggingLibrary WRITE setLinkQmlDebuggingLibrary NOTIFY linkQmlDebuggingLibraryChanged)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit QMakeStep(ProjectExplorer::BuildStepList *parent);
|
explicit QMakeStep(ProjectExplorer::BuildStepList *parent);
|
||||||
|
|
||||||
@@ -150,10 +151,6 @@ public:
|
|||||||
QStringList extraParserArguments() const;
|
QStringList extraParserArguments() const;
|
||||||
void setExtraParserArguments(const QStringList &args);
|
void setExtraParserArguments(const QStringList &args);
|
||||||
QString mkspec() const;
|
QString mkspec() const;
|
||||||
bool linkQmlDebuggingLibrary() const;
|
|
||||||
void setLinkQmlDebuggingLibrary(bool enable);
|
|
||||||
bool useQtQuickCompiler() const;
|
|
||||||
void setUseQtQuickCompiler(bool enable);
|
|
||||||
|
|
||||||
Utils::FilePath makeCommand() const;
|
Utils::FilePath makeCommand() const;
|
||||||
QString makeArguments(const QString &makefile) const;
|
QString makeArguments(const QString &makefile) const;
|
||||||
@@ -164,8 +161,6 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void userArgumentsChanged();
|
void userArgumentsChanged();
|
||||||
void extraArgumentsChanged();
|
void extraArgumentsChanged();
|
||||||
void linkQmlDebuggingLibraryChanged();
|
|
||||||
void useQtQuickCompilerChanged();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
@@ -195,8 +190,6 @@ private:
|
|||||||
bool m_needToRunQMake = false; // set in init(), read in run()
|
bool m_needToRunQMake = false; // set in init(), read in run()
|
||||||
|
|
||||||
bool m_runMakeQmake = false;
|
bool m_runMakeQmake = false;
|
||||||
bool m_linkQmlDebuggingLibrary = false;
|
|
||||||
bool m_useQtQuickCompiler = false;
|
|
||||||
bool m_scriptTemplate = false;
|
bool m_scriptTemplate = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -221,15 +214,11 @@ private:
|
|||||||
// slots for dealing with user changes in our UI
|
// slots for dealing with user changes in our UI
|
||||||
void qmakeArgumentsLineEdited();
|
void qmakeArgumentsLineEdited();
|
||||||
void buildConfigurationSelected();
|
void buildConfigurationSelected();
|
||||||
void linkQmlDebuggingLibraryChecked(bool checked);
|
|
||||||
void useQtQuickCompilerChecked(bool checked);
|
|
||||||
void askForRebuild(const QString &title);
|
void askForRebuild(const QString &title);
|
||||||
|
|
||||||
void recompileMessageBoxFinished(int button);
|
void recompileMessageBoxFinished(int button);
|
||||||
|
|
||||||
void updateSummaryLabel();
|
void updateSummaryLabel();
|
||||||
void updateQmlDebuggingOption();
|
|
||||||
void updateQtQuickCompilerOption();
|
|
||||||
void updateEffectiveQMakeCall();
|
void updateEffectiveQMakeCall();
|
||||||
|
|
||||||
QMakeStep *m_step = nullptr;
|
QMakeStep *m_step = nullptr;
|
||||||
@@ -240,16 +229,8 @@ private:
|
|||||||
QLabel *abisLabel = nullptr;
|
QLabel *abisLabel = nullptr;
|
||||||
QComboBox *buildConfigurationComboBox = nullptr;
|
QComboBox *buildConfigurationComboBox = nullptr;
|
||||||
QLineEdit *qmakeAdditonalArgumentsLineEdit = nullptr;
|
QLineEdit *qmakeAdditonalArgumentsLineEdit = nullptr;
|
||||||
QLabel *debuggingLibraryLabel = nullptr;
|
|
||||||
QCheckBox *qmlDebuggingLibraryCheckBox = nullptr;
|
|
||||||
QCheckBox *qtQuickCompilerCheckBox = nullptr;
|
|
||||||
QPlainTextEdit *qmakeArgumentsEdit = nullptr;
|
QPlainTextEdit *qmakeArgumentsEdit = nullptr;
|
||||||
QListWidget *abisListWidget = nullptr;
|
QListWidget *abisListWidget = nullptr;
|
||||||
QLabel *qmlDebuggingWarningIcon = nullptr;
|
|
||||||
QLabel *qmlDebuggingWarningText = nullptr;
|
|
||||||
QLabel *qtQuickCompilerLabel = nullptr;
|
|
||||||
QLabel *qtQuickCompilerWarningIcon = nullptr;
|
|
||||||
QLabel *qtQuickCompilerWarningText = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmakeProjectManager
|
} // namespace QmakeProjectManager
|
||||||
|
Reference in New Issue
Block a user