forked from qt-creator/qt-creator
QmlDesigner: Do not assume QmlBuildSystem is current build system
It's possible to open qml files for visual editing from qmake/cmake based projects as well. Fixes: QDS-6836 Change-Id: I15840dbe0f67711b162f7f7f492f7ab813ea7fca Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -2025,6 +2025,8 @@ void NodeInstanceView::updateQsbPathToFilterMap()
|
||||
m_qsbPathToFilterMap.clear();
|
||||
if (m_currentTarget && !m_qsbPath.isEmpty()) {
|
||||
const auto bs = qobject_cast<QmlProjectManager::QmlBuildSystem *>(m_currentTarget->buildSystem());
|
||||
if (!bs)
|
||||
return;
|
||||
const QStringList shaderToolFiles = bs->shaderToolFiles();
|
||||
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
@@ -2056,6 +2058,9 @@ void NodeInstanceView::handleShaderChanges()
|
||||
return;
|
||||
|
||||
const auto bs = qobject_cast<QmlProjectManager::QmlBuildSystem *>(m_currentTarget->buildSystem());
|
||||
if (!bs)
|
||||
return;
|
||||
|
||||
QStringList baseArgs = bs->shaderToolArgs();
|
||||
if (baseArgs.isEmpty())
|
||||
return;
|
||||
|
Reference in New Issue
Block a user