forked from qt-creator/qt-creator
QmlDesigner: set QT_QUICK_CONTROLS_CONF
If we have a qtquickcontrols2.conf we set QT_QUICK_CONTROLS_CONF for the qml2puppet. For this we have to forward the project to PuppetCreator. I forwarded the project instead of just the path to qtquickcontrols2.conf, because we most likely add more project specific features in the future. Change-Id: I0a90636ca6903e28499018c8d769bb07f7be5bb6 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -608,6 +608,7 @@ void DesignDocument::setEditor(Core::IEditor *editor)
|
||||
this, &DesignDocument::updateFileName);
|
||||
|
||||
updateActiveQtVersion();
|
||||
updateCurrentProject();
|
||||
}
|
||||
|
||||
Core::IEditor *DesignDocument::editor() const
|
||||
@@ -666,6 +667,12 @@ static inline Kit *getActiveKit(DesignDocument *designDocument)
|
||||
QObject::connect(currentProject, &Project::activeTargetChanged,
|
||||
designDocument, &DesignDocument::updateActiveQtVersion, Qt::UniqueConnection);
|
||||
|
||||
QObject::connect(ProjectTree::instance(), &ProjectTree::currentProjectChanged,
|
||||
designDocument, &DesignDocument::updateCurrentProject, Qt::UniqueConnection);
|
||||
|
||||
QObject::connect(currentProject, &Project::activeTargetChanged,
|
||||
designDocument, &DesignDocument::updateCurrentProject, Qt::UniqueConnection);
|
||||
|
||||
|
||||
Target *target = currentProject->activeTarget();
|
||||
|
||||
@@ -686,6 +693,12 @@ void DesignDocument::updateActiveQtVersion()
|
||||
viewManager().setNodeInstanceViewKit(m_currentKit);
|
||||
}
|
||||
|
||||
void DesignDocument::updateCurrentProject()
|
||||
{
|
||||
ProjectExplorer::Project *currentProject = ProjectExplorer::SessionManager::projectForFile(fileName());
|
||||
viewManager().setNodeInstanceViewProject(currentProject);
|
||||
}
|
||||
|
||||
QString DesignDocument::contextHelpId() const
|
||||
{
|
||||
if (view())
|
||||
|
||||
Reference in New Issue
Block a user