Skip to content
Snippets Groups Projects
Commit 52ac08a0 authored by Miikka Heikkinen's avatar Miikka Heikkinen
Browse files

Add clear function to Pass.commands property


Change-Id: I753c802bef590c58b31d9b9d85616b759263f9f7
Reviewed-by: default avatarTomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: default avatarAndy Nichols <andy.nichols@qt.io>
parent 2b8ef810
No related branches found
No related tags found
No related merge requests found
...@@ -565,6 +565,12 @@ int QQuick3DShaderUtilsRenderPass::qmlCommandCount(QQmlListProperty<QQuick3DShad ...@@ -565,6 +565,12 @@ int QQuick3DShaderUtilsRenderPass::qmlCommandCount(QQmlListProperty<QQuick3DShad
return that->m_commands.count(); return that->m_commands.count();
} }
void QQuick3DShaderUtilsRenderPass::qmlCommandClear(QQmlListProperty<QQuick3DShaderUtilsRenderCommand> *list)
{
QQuick3DShaderUtilsRenderPass *that = qobject_cast<QQuick3DShaderUtilsRenderPass *>(list->object);
that->m_commands.clear();
}
QQmlListProperty<QQuick3DShaderUtilsRenderCommand> QQuick3DShaderUtilsRenderPass::commands() QQmlListProperty<QQuick3DShaderUtilsRenderCommand> QQuick3DShaderUtilsRenderPass::commands()
{ {
return QQmlListProperty<QQuick3DShaderUtilsRenderCommand>(this, return QQmlListProperty<QQuick3DShaderUtilsRenderCommand>(this,
...@@ -572,7 +578,7 @@ QQmlListProperty<QQuick3DShaderUtilsRenderCommand> QQuick3DShaderUtilsRenderPass ...@@ -572,7 +578,7 @@ QQmlListProperty<QQuick3DShaderUtilsRenderCommand> QQuick3DShaderUtilsRenderPass
QQuick3DShaderUtilsRenderPass::qmlAppendCommand, QQuick3DShaderUtilsRenderPass::qmlAppendCommand,
QQuick3DShaderUtilsRenderPass::qmlCommandCount, QQuick3DShaderUtilsRenderPass::qmlCommandCount,
QQuick3DShaderUtilsRenderPass::qmlCommandAt, QQuick3DShaderUtilsRenderPass::qmlCommandAt,
nullptr); QQuick3DShaderUtilsRenderPass::qmlCommandClear);
} }
void QQuick3DShaderUtilsRenderPass::qmlAppendShader(QQmlListProperty<QQuick3DShaderUtilsShader> *list, void QQuick3DShaderUtilsRenderPass::qmlAppendShader(QQmlListProperty<QQuick3DShaderUtilsShader> *list,
......
...@@ -459,6 +459,7 @@ public: ...@@ -459,6 +459,7 @@ public:
static void qmlAppendCommand(QQmlListProperty<QQuick3DShaderUtilsRenderCommand> *list, QQuick3DShaderUtilsRenderCommand *command); static void qmlAppendCommand(QQmlListProperty<QQuick3DShaderUtilsRenderCommand> *list, QQuick3DShaderUtilsRenderCommand *command);
static QQuick3DShaderUtilsRenderCommand *qmlCommandAt(QQmlListProperty<QQuick3DShaderUtilsRenderCommand> *list, int index); static QQuick3DShaderUtilsRenderCommand *qmlCommandAt(QQmlListProperty<QQuick3DShaderUtilsRenderCommand> *list, int index);
static int qmlCommandCount(QQmlListProperty<QQuick3DShaderUtilsRenderCommand> *list); static int qmlCommandCount(QQmlListProperty<QQuick3DShaderUtilsRenderCommand> *list);
static void qmlCommandClear(QQmlListProperty<QQuick3DShaderUtilsRenderCommand> *list);
static void qmlAppendShader(QQmlListProperty<QQuick3DShaderUtilsShader> *list, QQuick3DShaderUtilsShader *shader); static void qmlAppendShader(QQmlListProperty<QQuick3DShaderUtilsShader> *list, QQuick3DShaderUtilsShader *shader);
static QQuick3DShaderUtilsShader *qmlShaderAt(QQmlListProperty<QQuick3DShaderUtilsShader> *list, int index); static QQuick3DShaderUtilsShader *qmlShaderAt(QQmlListProperty<QQuick3DShaderUtilsShader> *list, int index);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment