diff options
Diffstat (limited to 'src/declarative/items/qsgview.cpp')
-rw-r--r-- | src/declarative/items/qsgview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/items/qsgview.cpp b/src/declarative/items/qsgview.cpp index cd20f6c973..841c8ebe31 100644 --- a/src/declarative/items/qsgview.cpp +++ b/src/declarative/items/qsgview.cpp @@ -68,7 +68,8 @@ void QSGViewPrivate::init() engine.setIncubationController(q->incubationController()); - QDeclarativeInspectorService::instance()->addView(q); + if (QDeclarativeDebugService::isDebuggingEnabled()) + QDeclarativeInspectorService::instance()->addView(q); } QSGViewPrivate::QSGViewPrivate() @@ -78,7 +79,8 @@ QSGViewPrivate::QSGViewPrivate() QSGViewPrivate::~QSGViewPrivate() { - QDeclarativeInspectorService::instance()->removeView(q_func()); + if (QDeclarativeDebugService::isDebuggingEnabled()) + QDeclarativeInspectorService::instance()->removeView(q_func()); delete root; } |