From dca581d641964bb8994769ecc9bdc85ad74f14bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Thu, 3 Jun 2021 14:37:18 +0800 Subject: [PATCH] refactor doric layouts --- doric-Qt/example/doric/shader/DoricViewNode.cpp | 14 +++++++------- doric-Qt/example/doric/shader/DoricViewNode.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doric-Qt/example/doric/shader/DoricViewNode.cpp b/doric-Qt/example/doric/shader/DoricViewNode.cpp index 2988c23b..30b7c6f1 100644 --- a/doric-Qt/example/doric/shader/DoricViewNode.cpp +++ b/doric-Qt/example/doric/shader/DoricViewNode.cpp @@ -47,17 +47,17 @@ void DoricViewNode::blendLayoutConfig(QJsonValue jsValue) { } void DoricViewNode::createLayouts(QQuickItem *view) { - if (mLayouts == nullptr) { - mLayouts = new DoricLayouts(); - mLayouts->setWidth(view->width()); - mLayouts->setHeight(view->height()); - mLayouts->setView(view); + if (mDoricLayouts == nullptr) { + mDoricLayouts = new DoricLayouts(); + mDoricLayouts->setWidth(view->width()); + mDoricLayouts->setHeight(view->height()); + mDoricLayouts->setView(view); - view->setProperty("doricLayout", QString::number((qint64)mLayouts)); + view->setProperty("doricLayout", QString::number((qint64)mDoricLayouts)); } } -DoricLayouts *DoricViewNode::getLayouts() { return mLayouts; } +DoricLayouts *DoricViewNode::getLayouts() { return mDoricLayouts; } void DoricViewNode::setLayoutConfig(QJsonValue layoutConfig) { if (mSuperNode != nullptr) { diff --git a/doric-Qt/example/doric/shader/DoricViewNode.h b/doric-Qt/example/doric/shader/DoricViewNode.h index 840ed21b..c698e938 100644 --- a/doric-Qt/example/doric/shader/DoricViewNode.h +++ b/doric-Qt/example/doric/shader/DoricViewNode.h @@ -17,7 +17,7 @@ class DORIC_EXPORT DoricViewNode : public DoricContextHolder { protected: QQuickItem *mView; - DoricLayouts *mLayouts = nullptr; + DoricLayouts *mDoricLayouts = nullptr; virtual QQuickItem *build() = 0;