Repository: FreeCAD/FreeCAD
File: src/Gui/propertyeditor/PropertyItem.cpp (C++)

Code before:
        tr("Defines the color of a surface that appears to emit as if it were a light source, "
           "independent of external lighting, making the object look self-illuminated. Set to "
           "black to have no emissive color.")
    );
    this->appendChild(emissive);

    shininess = static_cast<PropertyIntegerConstraintItem*>(PropertyIntegerConstraintItem::create());
    shininess->setRange(min, max);
    shininess->setStepSize(steps);
    shininess->setParent(this);
    shininess->setPropertyName(QLatin1String("Shininess"));
    shininess->setNameToolTipOverride(
        tr("Defines the size and sharpness of specular highlights on a surface. Higher values "
           "produce small, sharp highlights, while lower values create broad, soft highlights. "
           "Note that the highlight intensity is defined by specular color.")
    );
    this->appendChild(shininess);

    transparency = static_cast<PropertyIntegerConstraintItem*>(PropertyIntegerConstraintItem::create());
    transparency->setRange(min, max);
    transparency->setStepSize(steps);
    transparency->setParent(this);
    transparency->setPropertyName(QLatin1String("Transparency"));
    transparency->setNameToolTipOverride(
        tr("Defines how much light passes through an object, making it "
           "partially or fully see-through.")
    );
    this->appendChild(transparency);
}

PropertyMaterialListItem::~PropertyMaterialListItem() = default;

void PropertyMaterialListItem::propertyBound()
{}

QColor PropertyMaterialListItem::getDiffuseColor() const
{
    QVariant value = data(1, Qt::EditRole);
    if (!value.canConvert<QVariantList>()) {
        return {};
    }

    QVariantList list = value.toList();
    if (list.isEmpty()) {
        return {};
    }

    if (!list[0].canConvert<Material>()) {
        return {};
    }


Review comment (suggestion):
```suggestion
           "partially or fully see-through")
```

Code after:
        tr("Defines the color of a surface that appears to emit as if it were a light source, "
           "independent of external lighting, making the object look self-illuminated. Set to "
           "black to have no emissive color.")
    );
    this->appendChild(emissive);

    shininess = static_cast<PropertyIntegerConstraintItem*>(PropertyIntegerConstraintItem::create());
    shininess->setRange(min, max);
    shininess->setStepSize(steps);
    shininess->setParent(this);
    shininess->setPropertyName(QLatin1String("Shininess"));
    shininess->setNameToolTipOverride(
        tr("Defines the size and sharpness of specular highlights on a surface. Higher values "
           "produce small, sharp highlights, while lower values create broad, soft highlights. "
           "Note that the highlight intensity is defined by specular color.")
    );
    this->appendChild(shininess);

    transparency = static_cast<PropertyIntegerConstraintItem*>(PropertyIntegerConstraintItem::create());
    transparency->setRange(min, max);
    transparency->setStepSize(steps);
    transparency->setParent(this);
    transparency->setPropertyName(QLatin1String("Transparency"));
    transparency->setNameToolTipOverride(
        tr("Defines how much light passes through an object, making it "
           "partially or fully see-through")
    );
    this->appendChild(transparency);
}

PropertyMaterialListItem::~PropertyMaterialListItem() = default;

void PropertyMaterialListItem::propertyBound()
{}

QColor PropertyMaterialListItem::getDiffuseColor() const
{
    QVariant value = data(1, Qt::EditRole);
    if (!value.canConvert<QVariantList>()) {
        return {};
    }

    QVariantList list = value.toList();
    if (list.isEmpty()) {
        return {};
    }

    if (!list[0].canConvert<Material>()) {
        return {};
    }