QtQuickCompilerAspect: Compile fix

Amends 5da8695dca

Change-Id: I532df0d3488750f5792f4ec09558d48d7e3ed752
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Jarek Kobus
2022-04-22 14:27:22 +02:00
parent 4faba42353
commit f630f49924
4 changed files with 5 additions and 10 deletions

View File

@@ -136,7 +136,7 @@ QbsBuildConfiguration::QbsBuildConfiguration(Target *target, Utils::Id id)
connect(qmlDebuggingAspect, &QtSupport::QmlDebuggingAspect::changed, connect(qmlDebuggingAspect, &QtSupport::QmlDebuggingAspect::changed,
this, &QbsBuildConfiguration::qbsConfigurationChanged); this, &QbsBuildConfiguration::qbsConfigurationChanged);
const auto qtQuickCompilerAspect = addAspect<QtSupport::QtQuickCompilerAspect>(); const auto qtQuickCompilerAspect = addAspect<QtSupport::QtQuickCompilerAspect>(qmlDebuggingAspect);
qtQuickCompilerAspect->setKit(target->kit()); qtQuickCompilerAspect->setKit(target->kit());
connect(qtQuickCompilerAspect, &QtSupport::QtQuickCompilerAspect::changed, connect(qtQuickCompilerAspect, &QtSupport::QtQuickCompilerAspect::changed,
this, &QbsBuildConfiguration::qbsConfigurationChanged); this, &QbsBuildConfiguration::qbsConfigurationChanged);

View File

@@ -197,7 +197,7 @@ QmakeBuildConfiguration::QmakeBuildConfiguration(Target *target, Utils::Id id)
qmakeBuildSystem()->scheduleUpdateAllNowOrLater(); qmakeBuildSystem()->scheduleUpdateAllNowOrLater();
}); });
const auto qtQuickCompilerAspect = addAspect<QtQuickCompilerAspect>(); const auto qtQuickCompilerAspect = addAspect<QtQuickCompilerAspect>(qmlDebuggingAspect);
qtQuickCompilerAspect->setKit(target->kit()); qtQuickCompilerAspect->setKit(target->kit());
connect(qtQuickCompilerAspect, &QtQuickCompilerAspect::changed, this, [this] { connect(qtQuickCompilerAspect, &QtQuickCompilerAspect::changed, this, [this] {
emit useQtQuickCompilerChanged(); emit useQtQuickCompilerChanged();

View File

@@ -76,7 +76,8 @@ void QmlDebuggingAspect::addToLayout(LayoutBuilder &builder)
changeHandler(); changeHandler();
} }
QtQuickCompilerAspect::QtQuickCompilerAspect() QtQuickCompilerAspect::QtQuickCompilerAspect(QmlDebuggingAspect *qmlAspect)
: m_qmlDebuggingAspect(qmlAspect)
{ {
setSettingsKey("QtQuickCompiler"); setSettingsKey("QtQuickCompiler");
setDisplayName(tr("Qt Quick Compiler:")); setDisplayName(tr("Qt Quick Compiler:"));
@@ -114,9 +115,4 @@ void QtQuickCompilerAspect::addToLayout(LayoutBuilder &builder)
changeHandler(); changeHandler();
} }
void QtQuickCompilerAspect::acquaintSiblings(const AspectContainer &siblings)
{
m_qmlDebuggingAspect = siblings.aspect<QmlDebuggingAspect>();
}
} // namespace QtSupport } // namespace QtSupport

View File

@@ -50,13 +50,12 @@ class QTSUPPORT_EXPORT QtQuickCompilerAspect : public Utils::TriStateAspect
{ {
Q_OBJECT Q_OBJECT
public: public:
QtQuickCompilerAspect(); QtQuickCompilerAspect(QmlDebuggingAspect *qmlAspect);
void setKit(const ProjectExplorer::Kit *kit) { m_kit = kit; } void setKit(const ProjectExplorer::Kit *kit) { m_kit = kit; }
private: private:
void addToLayout(Utils::LayoutBuilder &builder) override; void addToLayout(Utils::LayoutBuilder &builder) override;
void acquaintSiblings(const Utils::AspectContainer &siblings) override;
const ProjectExplorer::Kit *m_kit = nullptr; const ProjectExplorer::Kit *m_kit = nullptr;
const QmlDebuggingAspect *m_qmlDebuggingAspect = nullptr; const QmlDebuggingAspect *m_qmlDebuggingAspect = nullptr;