diff --git a/src/plugins/qmldesigner/libs/designercore/model/signalhandlerproperty.cpp b/src/plugins/qmldesigner/libs/designercore/model/signalhandlerproperty.cpp index e7f0e4208a3..e02ca7b6dd3 100644 --- a/src/plugins/qmldesigner/libs/designercore/model/signalhandlerproperty.cpp +++ b/src/plugins/qmldesigner/libs/designercore/model/signalhandlerproperty.cpp @@ -2,8 +2,9 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "signalhandlerproperty.h" -#include "internalproperty.h" +#include "externaldependenciesinterface.h" #include "internalnode_p.h" +#include "internalproperty.h" #include "model.h" #include "model_p.h" @@ -64,6 +65,12 @@ bool SignalHandlerProperty::useNewFunctionSyntax() if (name().contains('.')) return false; + if (!view()) + return false; + + if (view()->externalDependencies().isQtForMcusProject()) + return false; + return parentModelNode().metaInfo().isQtQmlConnections(); }