QmlDesigner: Fix build with tests

Amends c3b90c0ce5.

Change-Id: I52eee2e9bcf78a1fb7315927efc861115b96a16a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Christian Stenger
2022-06-02 08:03:19 +02:00
parent e5ce1f98f7
commit 6469f99995

View File

@@ -1147,9 +1147,13 @@ CreateSceneCommand NodeInstanceView::createCreateSceneCommand()
if (stateNode.isValid() && stateNode.metaInfo().isSubclassOf("QtQuick.State", 1, 0))
stateInstanceId = stateNode.internalId();
auto value = QmlDesigner::DesignerSettings::getValue(
QmlDesigner::DesignerSettingsKey::EDIT3DVIEW_BACKGROUND_COLOR);
auto value
#ifndef QMLDESIGNER_TEST
= QmlDesigner::DesignerSettings::getValue(
QmlDesigner::DesignerSettingsKey::EDIT3DVIEW_BACKGROUND_COLOR);
#else
= QColor();
#endif
QList<QColor> edit3dBackgroundColor;
if (value.isValid())
edit3dBackgroundColor = readBackgroundColorConfiguration(value);