QmlDesigner: Skip watcher setup for shaders when not inside a project

Fixes: QDS-6871
Change-Id: I25c677ecac30fc4496467f888060b0b4d8fb5df7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Miikka Heikkinen
2022-05-05 14:26:46 +03:00
parent 20c6ad2dfe
commit aed87f257a

View File

@@ -1907,6 +1907,9 @@ void NodeInstanceView::updateWatcher(const QString &path)
const QString projPath = QFileInfo(model()->fileUrl().toLocalFile()).absolutePath();
#endif
if (projPath.isEmpty())
return;
const QStringList files = m_fileSystemWatcher->files();
const QStringList directories = m_fileSystemWatcher->directories();
if (path.isEmpty()) {
@@ -2034,6 +2037,9 @@ void NodeInstanceView::updateQsbPathToFilterMap()
#else
const QString projPath = QFileInfo(model()->fileUrl().toLocalFile()).absolutePath();
#endif
if (projPath.isEmpty())
return;
// Parse ShaderTool files from project configuration.
// Separate files to path and file name (called filter here as it can contain wildcards)
// and group filters by paths. Blank path indicates project-wide file wildcard.