From 4c0a177747e739f03ed4f187141d72bbfa4b6476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Tue, 23 Feb 2021 15:10:19 +0800 Subject: [PATCH] error log filter --- doric-Qt/doric/shader/DoricStackNode.cpp | 4 +++- doric-Qt/doric/shader/DoricVLayoutNode.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doric-Qt/doric/shader/DoricStackNode.cpp b/doric-Qt/doric/shader/DoricStackNode.cpp index 2ff3321f..8e070cf2 100644 --- a/doric-Qt/doric/shader/DoricStackNode.cpp +++ b/doric-Qt/doric/shader/DoricStackNode.cpp @@ -6,7 +6,9 @@ QQuickItem *DoricStackNode::build() { const QUrl url(QStringLiteral("qrc:/doric/qml/stack.qml")); component.loadUrl(url); - qCritical() << component.errorString(); + if (component.isError()) { + qCritical() << component.errorString(); + } QQuickItem *item = qobject_cast(component.create()); return item; diff --git a/doric-Qt/doric/shader/DoricVLayoutNode.cpp b/doric-Qt/doric/shader/DoricVLayoutNode.cpp index 46de707d..32f8b932 100644 --- a/doric-Qt/doric/shader/DoricVLayoutNode.cpp +++ b/doric-Qt/doric/shader/DoricVLayoutNode.cpp @@ -6,7 +6,9 @@ QQuickItem *DoricVLayoutNode::build() { const QUrl url(QStringLiteral("qrc:/doric/qml/vlayout.qml")); component.loadUrl(url); - qCritical() << component.errorString(); + if (component.isError()) { + qCritical() << component.errorString(); + } QQuickItem *item = qobject_cast(component.create()); return item;