QmlDesigner: Never instantiate controls from component

This will break the file selectors for styles.

Change-Id: Ie539f768eb277fb4dc0df3eceb736ff9e4353837
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2021-08-31 22:22:33 +02:00
parent c8d1f32e76
commit 913d034e52

View File

@@ -221,6 +221,9 @@ QString static getErrorString(QQmlEngine *engine, const QString &componentPath)
bool isInPathList(const QStringList &pathList, const QString &componentPath)
{
if (componentPath.indexOf("qml/QtQuick/Controls") > 0)
return true;
return std::any_of(pathList.begin(), pathList.end(), [&](auto &&path) {
return componentPath.startsWith(path);
});