QmlDesigner: Add ifdef for QDS_USE_PROJECTSTORAGE

Change-Id: I902203d8c747ea85cbba5f7c5351c3f8f8127afb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Thomas Hartmann
2024-09-24 17:12:58 +02:00
committed by Marco Bubke
parent 6068df5540
commit 856608a511

View File

@@ -1432,8 +1432,13 @@ QmlDesigner::PropertyName TextToModelMerger::syncScriptBinding(ModelNode &modelN
prefix, prefix,
script->qualifiedId, script->qualifiedId,
astValue); astValue);
#ifndef QDS_USE_PROJECTSTORAGE
// Can happen if the type was just created and was not fully processed yet // Can happen if the type was just created and was not fully processed yet
const bool newlyCreatedTypeCase = !modelNode.metaInfo().properties().size(); const bool newlyCreatedTypeCase = !modelNode.metaInfo().properties().size();
#else
const bool newlyCreatedTypeCase = false;
#endif
if (enumValue.isValid()) { // It is a qualified enum: if (enumValue.isValid()) { // It is a qualified enum:
AbstractProperty modelProperty = modelNode.property(astPropertyName.toUtf8()); AbstractProperty modelProperty = modelNode.property(astPropertyName.toUtf8());