From 69e550886bb51234ebe55c521af0e74eaee7b5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Tue, 1 Jun 2021 10:50:39 +0800 Subject: [PATCH] add command --- doric-Qt/example/doric/plugin/DoricShaderPlugin.cpp | 4 ++++ doric-Qt/example/doric/plugin/DoricShaderPlugin.h | 2 ++ doric-Qt/example/doric/shader/slider/DoricSliderNode.cpp | 1 + 3 files changed, 7 insertions(+) diff --git a/doric-Qt/example/doric/plugin/DoricShaderPlugin.cpp b/doric-Qt/example/doric/plugin/DoricShaderPlugin.cpp index 6da90c9e..2c7648a6 100644 --- a/doric-Qt/example/doric/plugin/DoricShaderPlugin.cpp +++ b/doric-Qt/example/doric/plugin/DoricShaderPlugin.cpp @@ -34,3 +34,7 @@ void DoricShaderPlugin::render(QString jsValueString, QString callbackId) { }, DoricThreadMode::UI); } + +void DoricShaderPlugin::command(QString jsValueString, QString callbackId) { + qCritical() << "command: " << jsValueString << " " << callbackId; +} diff --git a/doric-Qt/example/doric/plugin/DoricShaderPlugin.h b/doric-Qt/example/doric/plugin/DoricShaderPlugin.h index c7186135..474f5a8c 100644 --- a/doric-Qt/example/doric/plugin/DoricShaderPlugin.h +++ b/doric-Qt/example/doric/plugin/DoricShaderPlugin.h @@ -11,6 +11,8 @@ public: using DoricNativePlugin::DoricNativePlugin; Q_INVOKABLE void render(QString jsValueString, QString callbackId); + + Q_INVOKABLE void command(QString jsValueString, QString callbackId); }; #endif // SHADERPLUGIN_H diff --git a/doric-Qt/example/doric/shader/slider/DoricSliderNode.cpp b/doric-Qt/example/doric/shader/slider/DoricSliderNode.cpp index 93901f9f..d076206c 100644 --- a/doric-Qt/example/doric/shader/slider/DoricSliderNode.cpp +++ b/doric-Qt/example/doric/shader/slider/DoricSliderNode.cpp @@ -25,6 +25,7 @@ DoricViewNode *DoricSliderNode::getSubNodeById(QString id) { return childNodes.at(i); } } + return nullptr; } void DoricSliderNode::blendSubNode(QJsonValue subProperties) {