forked from qt-creator/qt-creator
Effect Maker: Store property display names when saving effect
Fixes: QDS-11345 Change-Id: Id948bf6474fcc6bfff0d6e2f14241c4e4e916f6a Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
@@ -494,6 +494,9 @@ QJsonObject nodeToJson(const CompositionNode &node)
|
|||||||
QString type = Uniform::stringFromType(uniform->type());
|
QString type = Uniform::stringFromType(uniform->type());
|
||||||
uniformObject.insert("type", type);
|
uniformObject.insert("type", type);
|
||||||
|
|
||||||
|
if (!uniform->displayName().isEmpty())
|
||||||
|
uniformObject.insert("displayName", QString(uniform->displayName()));
|
||||||
|
|
||||||
QString value = variantAsDataString(uniform->type(), uniform->value());
|
QString value = variantAsDataString(uniform->type(), uniform->value());
|
||||||
if (uniform->type() == Uniform::Type::Sampler)
|
if (uniform->type() == Uniform::Type::Sampler)
|
||||||
value = QFileInfo(value).fileName();
|
value = QFileInfo(value).fileName();
|
||||||
|
@@ -114,6 +114,11 @@ QString Uniform::description() const
|
|||||||
return m_description;
|
return m_description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Uniform::displayName() const
|
||||||
|
{
|
||||||
|
return m_displayName;
|
||||||
|
}
|
||||||
|
|
||||||
QString Uniform::customValue() const
|
QString Uniform::customValue() const
|
||||||
{
|
{
|
||||||
return m_customValue;
|
return m_customValue;
|
||||||
|
@@ -59,6 +59,7 @@ public:
|
|||||||
|
|
||||||
QString name() const;
|
QString name() const;
|
||||||
QString description() const;
|
QString description() const;
|
||||||
|
QString displayName() const;
|
||||||
|
|
||||||
QString customValue() const;
|
QString customValue() const;
|
||||||
void setCustomValue(const QString &newCustomValue);
|
void setCustomValue(const QString &newCustomValue);
|
||||||
|
Reference in New Issue
Block a user